diff --git a/.gitignore b/.gitignore index f6fc8c0..a18bc36 100644 --- a/.gitignore +++ b/.gitignore @@ -19,4 +19,5 @@ build/ .yardoc _yardoc doc/ -.idea/ \ No newline at end of file +.idea/ +node_modules \ No newline at end of file diff --git a/LICENSE b/LICENSE index 5ceddf5..42a7dae 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,3 @@ -Copyright 2008-2013 Concur Technologies, Inc. - 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 @@ -10,4 +8,4 @@ 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 +under the License. diff --git a/README.md b/README.md index a97d327..de8343c 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,46 @@ [Slate](https://github.com/tripit/slate) with node.js ======== -A port of the documentation generator Slate to node.js. -[See it](http://jmanek.github.io/slate_node/) in action! -I was looking to create API docs and Slate's UI was exactly what I wanted. I came upon this *glaring* issue though. I had to use Ruby! Not that there's anything wrong with that! But I want to be able to host it on our site, and use the same framework throughout to build everything -- I can't justify setting up Ruby to create one page. +A port of the documentation generator Slate to node.js, that can optionally be built in the browser. +[See it](http://jmanek.github.io/slate_node/) in action! The major difference is the use of [marked](https://github.com/chjj/marked) for parsing the .md, [highlight](https://highlightjs.org/) for syntax highlighting, and [Handlebars](http://handlebarsjs.com/) for templating. -### Running - -1. Clone the repo, install the npm modules. -2. Run `node marked.js` -3. This will build the page and save it to /source/index.html -4. You're done! - -- Replace /source/index.md with your own markdown to use that instead - -### Todo/Bugs - +## Building + +### Node.js +This outputs to the `build` directory. Replace `source/slate.md` with your own markdown to use that instead +``` +git clone https://github.com/jmanek/slate_node.git +npm install +npm run build +# Docs are now viewable at build/index.html +``` + +### Browser +Alternatively, you can directly serve the `source` directory from a webhost and the documentation will be built at runtime. +``` +git clone https://github.com/jmanek/slate_node.git +npm install serve # included in npm install +./node_modules/.bin/serve source +# Docs are now viewable at localhost:5000 +``` +Any changes to `source/slate.md` will be incorporated into `source/index.html` when it is reloaded. There is now no need to have node.js installed on the machine. This way you don't have to worry about incorpoting Slate into your current build process or creating an entirely new toolchain for it (`python3 -m http.server`). It is a "static" version of Slate. This is inherently slower than the node.js pre-built version, but it is completely independent of operating system or platform. You will not be able to view the documentation until deploying it to a server. + +## Code Highlighting +[Numerous themes](https://highlightjs.org/static/demo/) for highlight.js are available in `source/stylesheets/highlight`. You can switch between them by changing this line in `source/index.html` +```html + +``` + +## Includes +Includes are handled as described in the [Slate Wiki](https://github.com/lord/slate/wiki/Using-Includes). The filename must have an underscore prepended to it, which is not included in the markdown file description. + +## Todo/Bugs + +- Package it in a more modular way (Grunt?) +- marked seems to be handling tables a bit differently, if there's too many em-dashes it's failing +- highlight.js might have some differences in language detection than Rouge; at the very least 'shell' becomes 'bash'. Ideally this repo should be compatible with any markdown made for Ruby Slate. +- Cleanup how marked parses the top-level settings. Right now they are manually being parsed. +- Actually build the scss/js diff --git a/marked.js b/marked.js deleted file mode 100644 index 068c596..0000000 --- a/marked.js +++ /dev/null @@ -1,87 +0,0 @@ -var marked = require('marked'); -var fs = require('fs'); -var highlight = require('highlight.js'); -var Handlebars = require('handlebars'); - -marked.setOptions({ - renderer: new marked.Renderer(), - gfm: true, - tables: true, - breaks: false, - pedantic: true, - sanitize: false, - smartLists: true, - smartypants: false, - highlight: function (code, lang) { - return highlight.highlight(lang, code).value; - } -}); - -//Easier than changing Slate's js -marked.defaults.langPrefix = 'highlight '; - -Handlebars.registerHelper('str', function(item){ - return '"' + item + '"'; -}); - -Handlebars.registerHelper('html', function(content){ - return new Handlebars.SafeString(content); -}); - -fs.readFile('./source/index.md', 'utf8', function (err, content) { - if (err) {console.log(err)}; - - // // marked doens't recognize "shell"? - content = content.replace(/``` shell/gm, '``` bash'); - content = content.split(/---/g); - - if (content.length === 1) { - throw new Error('No markdown page settings found!'); - } - - var data = {}; - var tokens = new marked.Lexer().lex(content[1]); - var token; - var listName; - - for (var idx = 0; idx < tokens.length; idx++) { - - token = tokens[idx]; - - if (token.type === 'list_item_start'){ - token = tokens[idx+1].text; - if (listName === 'language_tabs' && token === 'shell'){ - token = 'bash'; - } - data[listName].push(token); - idx += 2; - } - - if (token.type === 'paragraph') { - - if (tokens[idx+1] !== undefined && tokens[idx+1].type === 'list_start') { - - listName = token.text.slice(0, -1); - data[listName] = []; - - } else { - - token = token.text.split(': '); - data[token[0]] = token[1]; - - } - } - - } - - fs.readFile('./source/layouts/layout.html', 'utf8', function (err, source) { - if (err) {console.log(err)}; - - var template = Handlebars.compile(source); - data['content'] = marked(content.slice(2).join('')); - fs.writeFile('./source/index.html', template(data), function(err){ - if (err) {console.log(err);} - }); - }); - -}); diff --git a/node_modules/.bin/handlebars b/node_modules/.bin/handlebars deleted file mode 100644 index 77a6339..0000000 --- a/node_modules/.bin/handlebars +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=`dirname "$0"` - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../handlebars/bin/handlebars" "$@" - ret=$? -else - node "$basedir/../handlebars/bin/handlebars" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/handlebars.cmd b/node_modules/.bin/handlebars.cmd deleted file mode 100644 index 0738f3e..0000000 --- a/node_modules/.bin/handlebars.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\handlebars\bin\handlebars" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\handlebars\bin\handlebars" %* -) \ No newline at end of file diff --git a/node_modules/.bin/marked b/node_modules/.bin/marked deleted file mode 100644 index 62a2fc4..0000000 --- a/node_modules/.bin/marked +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh -basedir=`dirname "$0"` - -case `uname` in - *CYGWIN*) basedir=`cygpath -w "$basedir"`;; -esac - -if [ -x "$basedir/node" ]; then - "$basedir/node" "$basedir/../marked/bin/marked" "$@" - ret=$? -else - node "$basedir/../marked/bin/marked" "$@" - ret=$? -fi -exit $ret diff --git a/node_modules/.bin/marked.cmd b/node_modules/.bin/marked.cmd deleted file mode 100644 index 88ce6d6..0000000 --- a/node_modules/.bin/marked.cmd +++ /dev/null @@ -1,7 +0,0 @@ -@IF EXIST "%~dp0\node.exe" ( - "%~dp0\node.exe" "%~dp0\..\marked\bin\marked" %* -) ELSE ( - @SETLOCAL - @SET PATHEXT=%PATHEXT:;.JS;=;% - node "%~dp0\..\marked\bin\marked" %* -) \ No newline at end of file diff --git a/node_modules/handlebars/.gitmodules b/node_modules/handlebars/.gitmodules deleted file mode 100644 index 1739275..0000000 --- a/node_modules/handlebars/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "spec/mustache"] - path = spec/mustache - url = git://github.com/mustache/spec.git diff --git a/node_modules/handlebars/.istanbul.yml b/node_modules/handlebars/.istanbul.yml deleted file mode 100644 index e6911f1..0000000 --- a/node_modules/handlebars/.istanbul.yml +++ /dev/null @@ -1,2 +0,0 @@ -instrumentation: - excludes: ['**/spec/**'] diff --git a/node_modules/handlebars/.npmignore b/node_modules/handlebars/.npmignore deleted file mode 100644 index f10592c..0000000 --- a/node_modules/handlebars/.npmignore +++ /dev/null @@ -1,25 +0,0 @@ -.DS_Store -.gitignore -.rvmrc -.eslintrc -.travis.yml -.rspec -Gemfile -Gemfile.lock -Rakefile -Gruntfile.js -*.gemspec -*.nuspec -*.log -bench/* -configurations/* -components/* -coverage/* -dist/cdnjs/* -dist/components/* -spec/* -src/* -tasks/* -tmp/* -publish/* -vendor/* diff --git a/node_modules/handlebars/CONTRIBUTING.md b/node_modules/handlebars/CONTRIBUTING.md deleted file mode 100644 index b84fdb0..0000000 --- a/node_modules/handlebars/CONTRIBUTING.md +++ /dev/null @@ -1,80 +0,0 @@ -# How to Contribute - -## Reporting Issues - -Please see our [FAQ](https://github.com/wycats/handlebars.js/blob/master/FAQ.md) for common issues that people run into. - -Should you run into other issues with the project, please don't hesitate to let us know by filing an [issue][issue]! In general we are going to ask for an example of the problem failing, which can be as simple as a jsfiddle/jsbin/etc. We've put together a jsfiddle [template][jsfiddle] to ease this. (We will keep this link up to date as new releases occur, so feel free to check back here) - -Pull requests containing only failing thats demonstrating the issue are welcomed and this also helps ensure that your issue won't regress in the future once it's fixed. - -Documentation issues on the handlebarsjs.com site should be reported on [handlebars-site](https://github.com/wycats/handlebars-site). - -## Pull Requests - -We also accept [pull requests][pull-request]! - -Generally we like to see pull requests that -- Maintain the existing code style -- Are focused on a single change (i.e. avoid large refactoring or style adjustments in untouched code if not the primary goal of the pull request) -- Have [good commit messages](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) -- Have tests -- Don't significantly decrease the current code coverage (see coverage/lcov-report/index.html) - -## Building - -To build Handlebars.js you'll need a few things installed. - -* Node.js -* [Grunt](http://gruntjs.com/getting-started) - -Before building, you need to make sure that the Git submodule `spec/mustache` is included (i.e. the directory `spec/mustache` should not be empty). To include it, if using Git version 1.6.5 or newer, use `git clone --recursive` rather than `git clone`. Or, if you already cloned without `--recursive`, use `git submodule update --init`. - -Project dependencies may be installed via `npm install`. - -To build Handlebars.js from scratch, you'll want to run `grunt` -in the root of the project. That will build Handlebars and output the -results to the dist/ folder. To re-run tests, run `grunt test` or `npm test`. -You can also run our set of benchmarks with `grunt bench`. - -The `grunt dev` implements watching for tests and allows for in browser testing at `http://localhost:9999/spec/`. - -If you notice any problems, please report them to the GitHub issue tracker at -[http://github.com/wycats/handlebars.js/issues](http://github.com/wycats/handlebars.js/issues). - -## Ember testing - -The current ember distribution should be tested as part of the handlebars release process. This requires building the `handlebars-source` gem locally and then executing the ember test script. - -```sh -npm link -grunt build release -cp dist/*.js $emberRepoDir/bower_components/handlebars/ - -cd $emberRepoDir -npm link handlebars -npm test -``` - -## Releasing - -Handlebars utilizes the [release yeoman generator][generator-release] to perform most release tasks. - -A full release may be completed with the following: - -``` -yo release -npm publish -yo release:publish components handlebars.js dist/components/ - -cd dist/components/ -gem build handlebars-source.gemspec -gem push handlebars-source-*.gem -``` - -After this point the handlebars site needs to be updated to point to the new version numbers. The jsfiddle link should be updated to point to the most recent distribution for all instances in our documentation. - -[generator-release]: https://github.com/walmartlabs/generator-release -[pull-request]: https://github.com/wycats/handlebars.js/pull/new/master -[issue]: https://github.com/wycats/handlebars.js/issues/new -[jsfiddle]: http://jsfiddle.net/9D88g/26/ diff --git a/node_modules/handlebars/FAQ.md b/node_modules/handlebars/FAQ.md deleted file mode 100644 index 108e839..0000000 --- a/node_modules/handlebars/FAQ.md +++ /dev/null @@ -1,60 +0,0 @@ -# Frequently Asked Questions - -1. How can I file a bug report: - - See our guidelines on [reporting issues](https://github.com/wycats/handlebars.js/blob/master/CONTRIBUTING.md#reporting-issues). - -1. Why isn't my Mustache template working? - - Handlebars deviates from Mustache slightly on a few behaviors. These variations are documented in our [readme](https://github.com/wycats/handlebars.js#differences-between-handlebarsjs-and-mustache). - -1. Why is it slower when compiling? - - The Handlebars compiler must parse the template and construct a JavaScript program which can then be run. Under some environments such as older mobile devices this can have a performance impact which can be avoided by precompiling. Generally it's recommended that precompilation and the runtime library be used on all clients. - -1. Why doesn't this work with Content Security Policy restrictions? - - When not using the precompiler, Handlebars generates a dynamic function for each template which can cause issues with pages that have enabled Content Policy. It's recommended that templates are precompiled or the `unsafe-eval` policy is enabled for sites that must generate dynamic templates at runtime. - -1. How can I include script tags in my template? - - If loading the template via an inlined ` - ``` - - It's generally recommended that templates are served through external, precompiled, files, which do not suffer from this issue. - -1. Why are my precompiled scripts throwing exceptions? - - When using the precompiler, it's important that a supporting version of the Handlebars runtime be loaded on the target page. In version 1.x there were rudimentary checks to compare the version but these did not always work. This is fixed under 2.x but the version checking does not work between these two versions. If you see unexpected errors such as `undefined is not a function` or similar, please verify that the same version is being used for both the precompiler and the client. This can be checked via: - - ```sh - handlebars --version - ``` - If using the integrated precompiler and - - ```javascript - console.log(Handlebars.VERSION); - ``` - On the client side. - - We include the built client libraries in the npm package for those who want to be certain that they are using the same client libraries as the compiler. - - Should these match, please file an issue with us, per our [issue filing guidelines](https://github.com/wycats/handlebars.js/blob/master/CONTRIBUTING.md#reporting-issues). - -1. Why doesn't IE like the `default` name in the AMD module? - - Some browsers such as particular versions of IE treat `default` as a reserved word in JavaScript source files. To safely use this you need to reference this via the `Handlebars['default']` lookup method. This is an unfortunate side effect of the shims necessary to backport the Handlebars ES6 code to all current browsers. - -1. How do I load the runtime library when using AMD? - - There are two options for loading under AMD environments. The first is to use the `handlebars.runtime.amd.js` file. This may require a [path mapping](https://github.com/wycats/handlebars.js/blob/master/spec/amd-runtime.html#L31) as well as access via the `default` field. - - The other option is to load the `handlebars.runtime.js` UMD build, which might not require path configuration and exposes the library as both the module root and the `default` field for compatibility. - - If not using ES6 transpilers or accessing submodules in the build the former option should be sufficient for most use cases. diff --git a/node_modules/handlebars/LICENSE b/node_modules/handlebars/LICENSE deleted file mode 100644 index a2d22cb..0000000 --- a/node_modules/handlebars/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (C) 2011-2014 by Yehuda Katz - -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/node_modules/handlebars/README.markdown b/node_modules/handlebars/README.markdown deleted file mode 100644 index d6aa6bd..0000000 --- a/node_modules/handlebars/README.markdown +++ /dev/null @@ -1,438 +0,0 @@ -[![Travis Build Status](https://img.shields.io/travis/wycats/handlebars.js/master.svg)](https://travis-ci.org/wycats/handlebars.js) -[![Selenium Test Status](https://saucelabs.com/buildstatus/handlebars)](https://saucelabs.com/u/handlebars) - -Handlebars.js -============= - -Handlebars.js is an extension to the [Mustache templating -language](http://mustache.github.com/) created by Chris Wanstrath. -Handlebars.js and Mustache are both logicless templating languages that -keep the view and the code separated like we all know they should be. - -Checkout the official Handlebars docs site at -[http://www.handlebarsjs.com](http://www.handlebarsjs.com). - -Installing ----------- -Installing Handlebars is easy. Simply download the package [from the official site](http://handlebarsjs.com/) or the [bower repository][bower-repo] and add it to your web pages (you should usually use the most recent version). - -For web browsers, a free CDN is available at [jsDelivr](http://www.jsdelivr.com/#!handlebarsjs). Advanced usage, such as [version aliasing & concocting](https://github.com/jsdelivr/jsdelivr#usage), is available. - -Alternatively, if you prefer having the latest version of handlebars from -the 'master' branch, passing builds of the 'master' branch are automatically -published to S3. You may download the latest passing master build by grabbing -a `handlebars-latest.js` file from the [builds page][builds-page]. When the -build is published, it is also available as a `handlebars-gitSHA.js` file on -the builds page if you need a version to refer to others. -`handlebars-runtime.js` builds are also available. - -**Note**: The S3 builds page is provided as a convenience for the community, -but you should not use it for hosting Handlebars in production. - -Usage ------ -In general, the syntax of Handlebars.js templates is a superset -of Mustache templates. For basic syntax, check out the [Mustache -manpage](http://mustache.github.com/mustache.5.html). - -Once you have a template, use the `Handlebars.compile` method to compile -the template into a function. The generated function takes a context -argument, which will be used to render the template. - -```js -var source = "
Hello, my name is {{name}}. I am from {{hometown}}. I have " + - "{{kids.length}} kids:
" + - "Hello, my name is Alan. I am from Somewhere, TX. I have 2 kids:
-//-Precompile handlebar templates. -Usage: handlebars template... - -Options: - -a, --amd Create an AMD format function (allows loading with RequireJS) [boolean] - -f, --output Output File [string] - -k, --known Known helpers [string] - -o, --knownOnly Known helpers only [boolean] - -m, --min Minimize output [boolean] - -s, --simple Output template function only. [boolean] - -r, --root Template root. Base value that will be stripped from template names. [string] - -c, --commonjs Exports CommonJS style, path to Handlebars module [string] - -h, --handlebarPath Path to handlebar.js (only valid for amd-style) [string] - -n, --namespace Template namespace [string] - -p, --partial Compiling a partial template [boolean] - -d, --data Include data when compiling [boolean] - -e, --extension Template extension. [string] - -b, --bom Removes the BOM (Byte Order Mark) from the beginning of the templates. [boolean] -- -If using the precompiler's normal mode, the resulting templates will be -stored to the `Handlebars.templates` object using the relative template -name sans the extension. These templates may be executed in the same -manner as templates. - -If using the simple mode the precompiler will generate a single -javascript method. To execute this method it must be passed to -the `Handlebars.template` method and the resulting object may be used as normal. - -### Optimizations - -- Rather than using the full _handlebars.js_ library, implementations that - do not need to compile templates at runtime may include _handlebars.runtime.js_ - whose min+gzip size is approximately 1k. -- If a helper is known to exist in the target environment they may be defined - using the `--known name` argument may be used to optimize accesses to these - helpers for size and speed. -- When all helpers are known in advance the `--knownOnly` argument may be used - to optimize all block helper references. -- Implementations that do not use `@data` variables can improve performance of - iteration centric templates by specifying `{data: false}` in the compiler options. - -Supported Environments ----------------------- - -Handlebars has been designed to work in any ECMAScript 3 environment. This includes - -- Node.js -- Chrome -- Firefox -- Safari 5+ -- Opera 11+ -- IE 6+ - -Older versions and other runtimes are likely to work but have not been formally -tested. The compiler requires `JSON.stringify` to be implemented natively or via a polyfill. If using the precompiler this is not necessary. - -[![Selenium Test Status](https://saucelabs.com/browser-matrix/handlebars.svg)](https://saucelabs.com/u/handlebars) - -Performance ------------ - -In a rough performance test, precompiled Handlebars.js templates (in -the original version of Handlebars.js) rendered in about half the -time of Mustache templates. It would be a shame if it were any other -way, since they were precompiled, but the difference in architecture -does have some big performance advantages. Justin Marney, a.k.a. -[gotascii](http://github.com/gotascii), confirmed that with an -[independent test](http://sorescode.com/2010/09/12/benchmarks.html). The -rewritten Handlebars (current version) is faster than the old version, -with many [performance tests](https://travis-ci.org/wycats/handlebars.js/builds/33392182#L538) being 5 to 7 times faster than the Mustache equivalent. - - -Upgrading ---------- - -See [release-notes.md](https://github.com/wycats/handlebars.js/blob/master/release-notes.md) for upgrade notes. - -Known Issues ------------- - -See [FAQ.md](https://github.com/wycats/handlebars.js/blob/master/FAQ.md) for known issues and common pitfalls. - - -Handlebars in the Wild ----------------------- - -* [Assemble](http://assemble.io), by [@jonschlinkert](https://github.com/jonschlinkert) - and [@doowb](https://github.com/doowb), is a static site generator that uses Handlebars.js - as its template engine. -* [CoSchedule](http://coschedule.com) An editorial calendar for WordPress that uses Handlebars.js -* [dashbars](https://github.com/pismute/dashbars) A modern helper library for Handlebars.js. -* [Ember.js](http://www.emberjs.com) makes Handlebars.js the primary way to - structure your views, also with automatic data binding support. -* [Ghost](https://ghost.org/) Just a blogging platform. -* [handlebars_assets](http://github.com/leshill/handlebars_assets): A Rails Asset Pipeline gem - from Les Hill (@leshill). -* [handlebars-helpers](https://github.com/assemble/handlebars-helpers) is an extensive library - with 100+ handlebars helpers. -* [handlebars-layouts](https://github.com/shannonmoeller/handlebars-layouts) is a set of helpers which implement extendible and embeddable layout blocks as seen in other popular templating languages. -* [hbs](http://github.com/donpark/hbs): An Express.js view engine adapter for Handlebars.js, - from Don Park. -* [koa-hbs](https://github.com/jwilm/koa-hbs): [koa](https://github.com/koajs/koa) generator based - renderer for Handlebars.js. -* [jblotus](http://github.com/jblotus) created [http://tryhandlebarsjs.com](http://tryhandlebarsjs.com) - for anyone who would like to try out Handlebars.js in their browser. -* [jQuery plugin](http://71104.github.io/jquery-handlebars/): allows you to use - Handlebars.js with [jQuery](http://jquery.com/). -* [Lumbar](http://walmartlabs.github.io/lumbar) provides easy module-based template management for - handlebars projects. -* [sammy.js](http://github.com/quirkey/sammy) by Aaron Quint, a.k.a. quirkey, - supports Handlebars.js as one of its template plugins. -* [SproutCore](http://www.sproutcore.com) uses Handlebars.js as its main - templating engine, extending it with automatic data binding support. -* [YUI](http://yuilibrary.com/yui/docs/handlebars/) implements a port of handlebars -* [Swag](https://github.com/elving/swag) by [@elving](https://github.com/elving) is a growing collection of helpers for handlebars.js. Give your handlebars.js templates some swag son! -* [DOMBars](https://github.com/blakeembrey/dombars) is a DOM-based templating engine built on the Handlebars parser and runtime - -External Resources ------------------- - -* [Gist about Synchronous and asynchronous loading of external handlebars templates](https://gist.github.com/2287070) - -Have a project using Handlebars? Send us a [pull request][pull-request]! - -License -------- -Handlebars.js is released under the MIT license. - -[bower-repo]: https://github.com/components/handlebars.js -[builds-page]: http://builds.handlebarsjs.com.s3.amazonaws.com/bucket-listing.html?sort=lastmod&sortdir=desc -[pull-request]: https://github.com/wycats/handlebars.js/pull/new/master diff --git a/node_modules/handlebars/bin/handlebars b/node_modules/handlebars/bin/handlebars deleted file mode 100644 index 4ed98b3..0000000 --- a/node_modules/handlebars/bin/handlebars +++ /dev/null @@ -1,111 +0,0 @@ -#!/usr/bin/env node - -var optimist = require('optimist') - .usage('Precompile handlebar templates.\nUsage: $0 [template|directory]...', { - 'f': { - 'type': 'string', - 'description': 'Output File', - 'alias': 'output' - }, - 'map': { - 'type': 'string', - 'description': 'Source Map File' - }, - 'a': { - 'type': 'boolean', - 'description': 'Exports amd style (require.js)', - 'alias': 'amd' - }, - 'c': { - 'type': 'string', - 'description': 'Exports CommonJS style, path to Handlebars module', - 'alias': 'commonjs', - 'default': null - }, - 'h': { - 'type': 'string', - 'description': 'Path to handlebar.js (only valid for amd-style)', - 'alias': 'handlebarPath', - 'default': '' - }, - 'k': { - 'type': 'string', - 'description': 'Known helpers', - 'alias': 'known' - }, - 'o': { - 'type': 'boolean', - 'description': 'Known helpers only', - 'alias': 'knownOnly' - }, - 'm': { - 'type': 'boolean', - 'description': 'Minimize output', - 'alias': 'min' - }, - 'n': { - 'type': 'string', - 'description': 'Template namespace', - 'alias': 'namespace', - 'default': 'Handlebars.templates' - }, - 's': { - 'type': 'boolean', - 'description': 'Output template function only.', - 'alias': 'simple' - }, - 'r': { - 'type': 'string', - 'description': 'Template root. Base value that will be stripped from template names.', - 'alias': 'root' - }, - 'p' : { - 'type': 'boolean', - 'description': 'Compiling a partial template', - 'alias': 'partial' - }, - 'd' : { - 'type': 'boolean', - 'description': 'Include data when compiling', - 'alias': 'data' - }, - 'e': { - 'type': 'string', - 'description': 'Template extension.', - 'alias': 'extension', - 'default': 'handlebars' - }, - 'b': { - 'type': 'boolean', - 'description': 'Removes the BOM (Byte Order Mark) from the beginning of the templates.', - 'alias': 'bom' - }, - 'v': { - 'type': 'boolean', - 'description': 'Prints the current compiler version', - 'alias': 'version' - }, - - 'help': { - 'type': 'boolean', - 'description': 'Outputs this message' - } - }) - - .check(function(argv) { - if (argv.version) { - return; - } - }); - - -var argv = optimist.argv; -argv.templates = argv._; -delete argv._; - -if (argv.help || (!argv.templates.length && !argv.version)) { - optimist.showHelp(); - return; -} - -return require('../dist/cjs/precompiler').cli(argv); diff --git a/node_modules/handlebars/dist/amd/handlebars.js b/node_modules/handlebars/dist/amd/handlebars.js deleted file mode 100644 index 3e2b5f9..0000000 --- a/node_modules/handlebars/dist/amd/handlebars.js +++ /dev/null @@ -1,48 +0,0 @@ -define(['exports', 'module', './handlebars.runtime', './handlebars/compiler/ast', './handlebars/compiler/base', './handlebars/compiler/compiler', './handlebars/compiler/javascript-compiler', './handlebars/compiler/visitor', './handlebars/no-conflict'], function (exports, module, _handlebarsRuntime, _handlebarsCompilerAst, _handlebarsCompilerBase, _handlebarsCompilerCompiler, _handlebarsCompilerJavascriptCompiler, _handlebarsCompilerVisitor, _handlebarsNoConflict) { - 'use strict'; - - var _interopRequire = function (obj) { return obj && obj.__esModule ? obj['default'] : obj; }; - - var _runtime = _interopRequire(_handlebarsRuntime); - - // Compiler imports - - var _AST = _interopRequire(_handlebarsCompilerAst); - - var _JavaScriptCompiler = _interopRequire(_handlebarsCompilerJavascriptCompiler); - - var _Visitor = _interopRequire(_handlebarsCompilerVisitor); - - var _noConflict = _interopRequire(_handlebarsNoConflict); - - var _create = _runtime.create; - function create() { - var hb = _create(); - - hb.compile = function (input, options) { - return _handlebarsCompilerCompiler.compile(input, options, hb); - }; - hb.precompile = function (input, options) { - return _handlebarsCompilerCompiler.precompile(input, options, hb); - }; - - hb.AST = _AST; - hb.Compiler = _handlebarsCompilerCompiler.Compiler; - hb.JavaScriptCompiler = _JavaScriptCompiler; - hb.Parser = _handlebarsCompilerBase.parser; - hb.parse = _handlebarsCompilerBase.parse; - - return hb; - } - - var inst = create(); - inst.create = create; - - _noConflict(inst); - - inst.Visitor = _Visitor; - - inst['default'] = inst; - - module.exports = inst; -}); \ No newline at end of file diff --git a/node_modules/handlebars/dist/amd/handlebars.runtime.js b/node_modules/handlebars/dist/amd/handlebars.runtime.js deleted file mode 100644 index 73218be..0000000 --- a/node_modules/handlebars/dist/amd/handlebars.runtime.js +++ /dev/null @@ -1,41 +0,0 @@ -define(['exports', 'module', './handlebars/base', './handlebars/safe-string', './handlebars/exception', './handlebars/utils', './handlebars/runtime', './handlebars/no-conflict'], function (exports, module, _handlebarsBase, _handlebarsSafeString, _handlebarsException, _handlebarsUtils, _handlebarsRuntime, _handlebarsNoConflict) { - 'use strict'; - - var _interopRequire = function (obj) { return obj && obj.__esModule ? obj['default'] : obj; }; - - // Each of these augment the Handlebars object. No need to setup here. - // (This is done to easily share code between commonjs and browse envs) - - var _SafeString = _interopRequire(_handlebarsSafeString); - - var _Exception = _interopRequire(_handlebarsException); - - var _noConflict = _interopRequire(_handlebarsNoConflict); - - // For compatibility and usage outside of module systems, make the Handlebars object a namespace - function create() { - var hb = new _handlebarsBase.HandlebarsEnvironment(); - - _handlebarsUtils.extend(hb, _handlebarsBase); - hb.SafeString = _SafeString; - hb.Exception = _Exception; - hb.Utils = _handlebarsUtils; - hb.escapeExpression = _handlebarsUtils.escapeExpression; - - hb.VM = _handlebarsRuntime; - hb.template = function (spec) { - return _handlebarsRuntime.template(spec, hb); - }; - - return hb; - } - - var inst = create(); - inst.create = create; - - _noConflict(inst); - - inst['default'] = inst; - - module.exports = inst; -}); \ No newline at end of file diff --git a/node_modules/handlebars/dist/amd/handlebars/base.js b/node_modules/handlebars/dist/amd/handlebars/base.js deleted file mode 100644 index 4b7e4b3..0000000 --- a/node_modules/handlebars/dist/amd/handlebars/base.js +++ /dev/null @@ -1,268 +0,0 @@ -define(['exports', './utils', './exception'], function (exports, _utils, _exception) { - 'use strict'; - - var _interopRequire = function (obj) { return obj && obj.__esModule ? obj['default'] : obj; }; - - exports.__esModule = true; - exports.HandlebarsEnvironment = HandlebarsEnvironment; - exports.createFrame = createFrame; - - var _Exception = _interopRequire(_exception); - - var VERSION = '3.0.1'; - exports.VERSION = VERSION; - var COMPILER_REVISION = 6; - - exports.COMPILER_REVISION = COMPILER_REVISION; - var REVISION_CHANGES = { - 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it - 2: '== 1.0.0-rc.3', - 3: '== 1.0.0-rc.4', - 4: '== 1.x.x', - 5: '== 2.0.0-alpha.x', - 6: '>= 2.0.0-beta.1' - }; - - exports.REVISION_CHANGES = REVISION_CHANGES; - var isArray = _utils.isArray, - isFunction = _utils.isFunction, - toString = _utils.toString, - objectType = '[object Object]'; - - function HandlebarsEnvironment(helpers, partials) { - this.helpers = helpers || {}; - this.partials = partials || {}; - - registerDefaultHelpers(this); - } - - HandlebarsEnvironment.prototype = { - constructor: HandlebarsEnvironment, - - logger: logger, - log: log, - - registerHelper: function registerHelper(name, fn) { - if (toString.call(name) === objectType) { - if (fn) { - throw new _Exception('Arg not supported with multiple helpers'); - } - _utils.extend(this.helpers, name); - } else { - this.helpers[name] = fn; - } - }, - unregisterHelper: function unregisterHelper(name) { - delete this.helpers[name]; - }, - - registerPartial: function registerPartial(name, partial) { - if (toString.call(name) === objectType) { - _utils.extend(this.partials, name); - } else { - if (typeof partial === 'undefined') { - throw new _Exception('Attempting to register a partial as undefined'); - } - this.partials[name] = partial; - } - }, - unregisterPartial: function unregisterPartial(name) { - delete this.partials[name]; - } - }; - - function registerDefaultHelpers(instance) { - instance.registerHelper('helperMissing', function () { - if (arguments.length === 1) { - // A missing field in a {{foo}} constuct. - return undefined; - } else { - // Someone is actually trying to call something, blow up. - throw new _Exception('Missing helper: "' + arguments[arguments.length - 1].name + '"'); - } - }); - - instance.registerHelper('blockHelperMissing', function (context, options) { - var inverse = options.inverse, - fn = options.fn; - - if (context === true) { - return fn(this); - } else if (context === false || context == null) { - return inverse(this); - } else if (isArray(context)) { - if (context.length > 0) { - if (options.ids) { - options.ids = [options.name]; - } - - return instance.helpers.each(context, options); - } else { - return inverse(this); - } - } else { - if (options.data && options.ids) { - var data = createFrame(options.data); - data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name); - options = { data: data }; - } - - return fn(context, options); - } - }); - - instance.registerHelper('each', function (context, options) { - if (!options) { - throw new _Exception('Must pass iterator to #each'); - } - - var fn = options.fn, - inverse = options.inverse, - i = 0, - ret = '', - data = undefined, - contextPath = undefined; - - if (options.data && options.ids) { - contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.'; - } - - if (isFunction(context)) { - context = context.call(this); - } - - if (options.data) { - data = createFrame(options.data); - } - - function execIteration(field, index, last) { - if (data) { - data.key = field; - data.index = index; - data.first = index === 0; - data.last = !!last; - - if (contextPath) { - data.contextPath = contextPath + field; - } - } - - ret = ret + fn(context[field], { - data: data, - blockParams: _utils.blockParams([context[field], field], [contextPath + field, null]) - }); - } - - if (context && typeof context === 'object') { - if (isArray(context)) { - for (var j = context.length; i < j; i++) { - execIteration(i, i, i === context.length - 1); - } - } else { - var priorKey = undefined; - - for (var key in context) { - if (context.hasOwnProperty(key)) { - // We're running the iterations one step out of sync so we can detect - // the last iteration without have to scan the object twice and create - // an itermediate keys array. - if (priorKey) { - execIteration(priorKey, i - 1); - } - priorKey = key; - i++; - } - } - if (priorKey) { - execIteration(priorKey, i - 1, true); - } - } - } - - if (i === 0) { - ret = inverse(this); - } - - return ret; - }); - - instance.registerHelper('if', function (conditional, options) { - if (isFunction(conditional)) { - conditional = conditional.call(this); - } - - // Default behavior is to render the positive path if the value is truthy and not empty. - // The `includeZero` option may be set to treat the condtional as purely not empty based on the - // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative. - if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) { - return options.inverse(this); - } else { - return options.fn(this); - } - }); - - instance.registerHelper('unless', function (conditional, options) { - return instance.helpers['if'].call(this, conditional, { fn: options.inverse, inverse: options.fn, hash: options.hash }); - }); - - instance.registerHelper('with', function (context, options) { - if (isFunction(context)) { - context = context.call(this); - } - - var fn = options.fn; - - if (!_utils.isEmpty(context)) { - if (options.data && options.ids) { - var data = createFrame(options.data); - data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]); - options = { data: data }; - } - - return fn(context, options); - } else { - return options.inverse(this); - } - }); - - instance.registerHelper('log', function (message, options) { - var level = options.data && options.data.level != null ? parseInt(options.data.level, 10) : 1; - instance.log(level, message); - }); - - instance.registerHelper('lookup', function (obj, field) { - return obj && obj[field]; - }); - } - - var logger = { - methodMap: { 0: 'debug', 1: 'info', 2: 'warn', 3: 'error' }, - - // State enum - DEBUG: 0, - INFO: 1, - WARN: 2, - ERROR: 3, - level: 1, - - // Can be overridden in the host environment - log: function log(level, message) { - if (typeof console !== 'undefined' && logger.level <= level) { - var method = logger.methodMap[level]; - (console[method] || console.log).call(console, message); // eslint-disable-line no-console - } - } - }; - - exports.logger = logger; - var log = logger.log; - - exports.log = log; - - function createFrame(object) { - var frame = _utils.extend({}, object); - frame._parent = object; - return frame; - } -}); -/* [args, ]options */ \ No newline at end of file diff --git a/node_modules/handlebars/dist/amd/handlebars/compiler/ast.js b/node_modules/handlebars/dist/amd/handlebars/compiler/ast.js deleted file mode 100644 index c025389..0000000 --- a/node_modules/handlebars/dist/amd/handlebars/compiler/ast.js +++ /dev/null @@ -1,152 +0,0 @@ -define(['exports', 'module'], function (exports, module) { - 'use strict'; - - var AST = { - Program: function Program(statements, blockParams, strip, locInfo) { - this.loc = locInfo; - this.type = 'Program'; - this.body = statements; - - this.blockParams = blockParams; - this.strip = strip; - }, - - MustacheStatement: function MustacheStatement(path, params, hash, escaped, strip, locInfo) { - this.loc = locInfo; - this.type = 'MustacheStatement'; - - this.path = path; - this.params = params || []; - this.hash = hash; - this.escaped = escaped; - - this.strip = strip; - }, - - BlockStatement: function BlockStatement(path, params, hash, program, inverse, openStrip, inverseStrip, closeStrip, locInfo) { - this.loc = locInfo; - this.type = 'BlockStatement'; - - this.path = path; - this.params = params || []; - this.hash = hash; - this.program = program; - this.inverse = inverse; - - this.openStrip = openStrip; - this.inverseStrip = inverseStrip; - this.closeStrip = closeStrip; - }, - - PartialStatement: function PartialStatement(name, params, hash, strip, locInfo) { - this.loc = locInfo; - this.type = 'PartialStatement'; - - this.name = name; - this.params = params || []; - this.hash = hash; - - this.indent = ''; - this.strip = strip; - }, - - ContentStatement: function ContentStatement(string, locInfo) { - this.loc = locInfo; - this.type = 'ContentStatement'; - this.original = this.value = string; - }, - - CommentStatement: function CommentStatement(comment, strip, locInfo) { - this.loc = locInfo; - this.type = 'CommentStatement'; - this.value = comment; - - this.strip = strip; - }, - - SubExpression: function SubExpression(path, params, hash, locInfo) { - this.loc = locInfo; - - this.type = 'SubExpression'; - this.path = path; - this.params = params || []; - this.hash = hash; - }, - - PathExpression: function PathExpression(data, depth, parts, original, locInfo) { - this.loc = locInfo; - this.type = 'PathExpression'; - - this.data = data; - this.original = original; - this.parts = parts; - this.depth = depth; - }, - - StringLiteral: function StringLiteral(string, locInfo) { - this.loc = locInfo; - this.type = 'StringLiteral'; - this.original = this.value = string; - }, - - NumberLiteral: function NumberLiteral(number, locInfo) { - this.loc = locInfo; - this.type = 'NumberLiteral'; - this.original = this.value = Number(number); - }, - - BooleanLiteral: function BooleanLiteral(bool, locInfo) { - this.loc = locInfo; - this.type = 'BooleanLiteral'; - this.original = this.value = bool === 'true'; - }, - - UndefinedLiteral: function UndefinedLiteral(locInfo) { - this.loc = locInfo; - this.type = 'UndefinedLiteral'; - this.original = this.value = undefined; - }, - - NullLiteral: function NullLiteral(locInfo) { - this.loc = locInfo; - this.type = 'NullLiteral'; - this.original = this.value = null; - }, - - Hash: function Hash(pairs, locInfo) { - this.loc = locInfo; - this.type = 'Hash'; - this.pairs = pairs; - }, - HashPair: function HashPair(key, value, locInfo) { - this.loc = locInfo; - this.type = 'HashPair'; - this.key = key; - this.value = value; - }, - - // Public API used to evaluate derived attributes regarding AST nodes - helpers: { - // a mustache is definitely a helper if: - // * it is an eligible helper, and - // * it has at least one parameter or hash segment - helperExpression: function helperExpression(node) { - return !!(node.type === 'SubExpression' || node.params.length || node.hash); - }, - - scopedId: function scopedId(path) { - return /^\.|this\b/.test(path.original); - }, - - // an ID is simple if it only has one part, and that part is not - // `..` or `this`. - simpleId: function simpleId(path) { - return path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth; - } - } - }; - - // Must be exported as an object rather than the root of the module as the jison lexer - // must modify the object to operate properly. - module.exports = AST; -}); \ No newline at end of file diff --git a/node_modules/handlebars/dist/amd/handlebars/compiler/base.js b/node_modules/handlebars/dist/amd/handlebars/compiler/base.js deleted file mode 100644 index 35473b1..0000000 --- a/node_modules/handlebars/dist/amd/handlebars/compiler/base.js +++ /dev/null @@ -1,36 +0,0 @@ -define(['exports', './parser', './ast', './whitespace-control', './helpers', '../utils'], function (exports, _parser, _ast, _whitespaceControl, _helpers, _utils) { - 'use strict'; - - var _interopRequire = function (obj) { return obj && obj.__esModule ? obj['default'] : obj; }; - - exports.__esModule = true; - exports.parse = parse; - - var _parser2 = _interopRequire(_parser); - - var _AST = _interopRequire(_ast); - - var _WhitespaceControl = _interopRequire(_whitespaceControl); - - exports.parser = _parser2; - - var yy = {}; - _utils.extend(yy, _helpers, _AST); - - function parse(input, options) { - // Just return if an already-compiled AST was passed in. - if (input.type === 'Program') { - return input; - } - - _parser2.yy = yy; - - // Altering the shared object here, but this is ok as parser is a sync operation - yy.locInfo = function (locInfo) { - return new yy.SourceLocation(options && options.srcName, locInfo); - }; - - var strip = new _WhitespaceControl(); - return strip.accept(_parser2.parse(input)); - } -}); \ No newline at end of file diff --git a/node_modules/handlebars/dist/amd/handlebars/compiler/code-gen.js b/node_modules/handlebars/dist/amd/handlebars/compiler/code-gen.js deleted file mode 100644 index 4baf088..0000000 --- a/node_modules/handlebars/dist/amd/handlebars/compiler/code-gen.js +++ /dev/null @@ -1,161 +0,0 @@ -define(['exports', 'module', '../utils'], function (exports, module, _utils) { - 'use strict'; - - var SourceNode = undefined; - - try { - /* istanbul ignore next */ - if (typeof define !== 'function' || !define.amd) { - // We don't support this in AMD environments. For these environments, we asusme that - // they are running on the browser and thus have no need for the source-map library. - var SourceMap = require('source-map'); - SourceNode = SourceMap.SourceNode; - } - } catch (err) {} - - /* istanbul ignore if: tested but not covered in istanbul due to dist build */ - if (!SourceNode) { - SourceNode = function (line, column, srcFile, chunks) { - this.src = ''; - if (chunks) { - this.add(chunks); - } - }; - /* istanbul ignore next */ - SourceNode.prototype = { - add: function add(chunks) { - if (_utils.isArray(chunks)) { - chunks = chunks.join(''); - } - this.src += chunks; - }, - prepend: function prepend(chunks) { - if (_utils.isArray(chunks)) { - chunks = chunks.join(''); - } - this.src = chunks + this.src; - }, - toStringWithSourceMap: function toStringWithSourceMap() { - return { code: this.toString() }; - }, - toString: function toString() { - return this.src; - } - }; - } - - function castChunk(chunk, codeGen, loc) { - if (_utils.isArray(chunk)) { - var ret = []; - - for (var i = 0, len = chunk.length; i < len; i++) { - ret.push(codeGen.wrap(chunk[i], loc)); - } - return ret; - } else if (typeof chunk === 'boolean' || typeof chunk === 'number') { - // Handle primitives that the SourceNode will throw up on - return chunk + ''; - } - return chunk; - } - - function CodeGen(srcFile) { - this.srcFile = srcFile; - this.source = []; - } - - CodeGen.prototype = { - prepend: function prepend(source, loc) { - this.source.unshift(this.wrap(source, loc)); - }, - push: function push(source, loc) { - this.source.push(this.wrap(source, loc)); - }, - - merge: function merge() { - var source = this.empty(); - this.each(function (line) { - source.add([' ', line, '\n']); - }); - return source; - }, - - each: function each(iter) { - for (var i = 0, len = this.source.length; i < len; i++) { - iter(this.source[i]); - } - }, - - empty: function empty() { - var loc = arguments[0] === undefined ? this.currentLocation || { start: {} } : arguments[0]; - - return new SourceNode(loc.start.line, loc.start.column, this.srcFile); - }, - wrap: function wrap(chunk) { - var loc = arguments[1] === undefined ? this.currentLocation || { start: {} } : arguments[1]; - - if (chunk instanceof SourceNode) { - return chunk; - } - - chunk = castChunk(chunk, this, loc); - - return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk); - }, - - functionCall: function functionCall(fn, type, params) { - params = this.generateList(params); - return this.wrap([fn, type ? '.' + type + '(' : '(', params, ')']); - }, - - quotedString: function quotedString(str) { - return '"' + (str + '').replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\u2028/g, '\\u2028') // Per Ecma-262 7.3 + 7.8.4 - .replace(/\u2029/g, '\\u2029') + '"'; - }, - - objectLiteral: function objectLiteral(obj) { - var pairs = []; - - for (var key in obj) { - if (obj.hasOwnProperty(key)) { - var value = castChunk(obj[key], this); - if (value !== 'undefined') { - pairs.push([this.quotedString(key), ':', value]); - } - } - } - - var ret = this.generateList(pairs); - ret.prepend('{'); - ret.add('}'); - return ret; - }, - - generateList: function generateList(entries, loc) { - var ret = this.empty(loc); - - for (var i = 0, len = entries.length; i < len; i++) { - if (i) { - ret.add(','); - } - - ret.add(castChunk(entries[i], this, loc)); - } - - return ret; - }, - - generateArray: function generateArray(entries, loc) { - var ret = this.generateList(entries, loc); - ret.prepend('['); - ret.add(']'); - - return ret; - } - }; - - module.exports = CodeGen; -}); -/*global define */ - -/* NOP */ \ No newline at end of file diff --git a/node_modules/handlebars/dist/amd/handlebars/compiler/compiler.js b/node_modules/handlebars/dist/amd/handlebars/compiler/compiler.js deleted file mode 100644 index 152e528..0000000 --- a/node_modules/handlebars/dist/amd/handlebars/compiler/compiler.js +++ /dev/null @@ -1,523 +0,0 @@ -define(['exports', '../exception', '../utils', './ast'], function (exports, _exception, _utils, _ast) { - 'use strict'; - - var _interopRequire = function (obj) { return obj && obj.__esModule ? obj['default'] : obj; }; - - exports.__esModule = true; - exports.Compiler = Compiler; - exports.precompile = precompile; - exports.compile = compile; - - var _Exception = _interopRequire(_exception); - - var _AST = _interopRequire(_ast); - - var slice = [].slice; - - function Compiler() {} - - // the foundHelper register will disambiguate helper lookup from finding a - // function in a context. This is necessary for mustache compatibility, which - // requires that context functions in blocks are evaluated by blockHelperMissing, - // and then proceed as if the resulting value was provided to blockHelperMissing. - - Compiler.prototype = { - compiler: Compiler, - - equals: function equals(other) { - var len = this.opcodes.length; - if (other.opcodes.length !== len) { - return false; - } - - for (var i = 0; i < len; i++) { - var opcode = this.opcodes[i], - otherOpcode = other.opcodes[i]; - if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) { - return false; - } - } - - // We know that length is the same between the two arrays because they are directly tied - // to the opcode behavior above. - len = this.children.length; - for (var i = 0; i < len; i++) { - if (!this.children[i].equals(other.children[i])) { - return false; - } - } - - return true; - }, - - guid: 0, - - compile: function compile(program, options) { - this.sourceNode = []; - this.opcodes = []; - this.children = []; - this.options = options; - this.stringParams = options.stringParams; - this.trackIds = options.trackIds; - - options.blockParams = options.blockParams || []; - - // These changes will propagate to the other compiler components - var knownHelpers = options.knownHelpers; - options.knownHelpers = { - helperMissing: true, - blockHelperMissing: true, - each: true, - 'if': true, - unless: true, - 'with': true, - log: true, - lookup: true - }; - if (knownHelpers) { - for (var _name in knownHelpers) { - if (_name in knownHelpers) { - options.knownHelpers[_name] = knownHelpers[_name]; - } - } - } - - return this.accept(program); - }, - - compileProgram: function compileProgram(program) { - var childCompiler = new this.compiler(), - // eslint-disable-line new-cap - result = childCompiler.compile(program, this.options), - guid = this.guid++; - - this.usePartial = this.usePartial || result.usePartial; - - this.children[guid] = result; - this.useDepths = this.useDepths || result.useDepths; - - return guid; - }, - - accept: function accept(node) { - this.sourceNode.unshift(node); - var ret = this[node.type](node); - this.sourceNode.shift(); - return ret; - }, - - Program: function Program(program) { - this.options.blockParams.unshift(program.blockParams); - - var body = program.body, - bodyLength = body.length; - for (var i = 0; i < bodyLength; i++) { - this.accept(body[i]); - } - - this.options.blockParams.shift(); - - this.isSimple = bodyLength === 1; - this.blockParams = program.blockParams ? program.blockParams.length : 0; - - return this; - }, - - BlockStatement: function BlockStatement(block) { - transformLiteralToPath(block); - - var program = block.program, - inverse = block.inverse; - - program = program && this.compileProgram(program); - inverse = inverse && this.compileProgram(inverse); - - var type = this.classifySexpr(block); - - if (type === 'helper') { - this.helperSexpr(block, program, inverse); - } else if (type === 'simple') { - this.simpleSexpr(block); - - // now that the simple mustache is resolved, we need to - // evaluate it by executing `blockHelperMissing` - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - this.opcode('emptyHash'); - this.opcode('blockValue', block.path.original); - } else { - this.ambiguousSexpr(block, program, inverse); - - // now that the simple mustache is resolved, we need to - // evaluate it by executing `blockHelperMissing` - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - this.opcode('emptyHash'); - this.opcode('ambiguousBlockValue'); - } - - this.opcode('append'); - }, - - PartialStatement: function PartialStatement(partial) { - this.usePartial = true; - - var params = partial.params; - if (params.length > 1) { - throw new _Exception('Unsupported number of partial arguments: ' + params.length, partial); - } else if (!params.length) { - params.push({ type: 'PathExpression', parts: [], depth: 0 }); - } - - var partialName = partial.name.original, - isDynamic = partial.name.type === 'SubExpression'; - if (isDynamic) { - this.accept(partial.name); - } - - this.setupFullMustacheParams(partial, undefined, undefined, true); - - var indent = partial.indent || ''; - if (this.options.preventIndent && indent) { - this.opcode('appendContent', indent); - indent = ''; - } - - this.opcode('invokePartial', isDynamic, partialName, indent); - this.opcode('append'); - }, - - MustacheStatement: function MustacheStatement(mustache) { - this.SubExpression(mustache); // eslint-disable-line new-cap - - if (mustache.escaped && !this.options.noEscape) { - this.opcode('appendEscaped'); - } else { - this.opcode('append'); - } - }, - - ContentStatement: function ContentStatement(content) { - if (content.value) { - this.opcode('appendContent', content.value); - } - }, - - CommentStatement: function CommentStatement() {}, - - SubExpression: function SubExpression(sexpr) { - transformLiteralToPath(sexpr); - var type = this.classifySexpr(sexpr); - - if (type === 'simple') { - this.simpleSexpr(sexpr); - } else if (type === 'helper') { - this.helperSexpr(sexpr); - } else { - this.ambiguousSexpr(sexpr); - } - }, - ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) { - var path = sexpr.path, - name = path.parts[0], - isBlock = program != null || inverse != null; - - this.opcode('getContext', path.depth); - - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - - this.accept(path); - - this.opcode('invokeAmbiguous', name, isBlock); - }, - - simpleSexpr: function simpleSexpr(sexpr) { - this.accept(sexpr.path); - this.opcode('resolvePossibleLambda'); - }, - - helperSexpr: function helperSexpr(sexpr, program, inverse) { - var params = this.setupFullMustacheParams(sexpr, program, inverse), - path = sexpr.path, - name = path.parts[0]; - - if (this.options.knownHelpers[name]) { - this.opcode('invokeKnownHelper', params.length, name); - } else if (this.options.knownHelpersOnly) { - throw new _Exception('You specified knownHelpersOnly, but used the unknown helper ' + name, sexpr); - } else { - path.falsy = true; - - this.accept(path); - this.opcode('invokeHelper', params.length, path.original, _AST.helpers.simpleId(path)); - } - }, - - PathExpression: function PathExpression(path) { - this.addDepth(path.depth); - this.opcode('getContext', path.depth); - - var name = path.parts[0], - scoped = _AST.helpers.scopedId(path), - blockParamId = !path.depth && !scoped && this.blockParamIndex(name); - - if (blockParamId) { - this.opcode('lookupBlockParam', blockParamId, path.parts); - } else if (!name) { - // Context reference, i.e. `{{foo .}}` or `{{foo ..}}` - this.opcode('pushContext'); - } else if (path.data) { - this.options.data = true; - this.opcode('lookupData', path.depth, path.parts); - } else { - this.opcode('lookupOnContext', path.parts, path.falsy, scoped); - } - }, - - StringLiteral: function StringLiteral(string) { - this.opcode('pushString', string.value); - }, - - NumberLiteral: function NumberLiteral(number) { - this.opcode('pushLiteral', number.value); - }, - - BooleanLiteral: function BooleanLiteral(bool) { - this.opcode('pushLiteral', bool.value); - }, - - UndefinedLiteral: function UndefinedLiteral() { - this.opcode('pushLiteral', 'undefined'); - }, - - NullLiteral: function NullLiteral() { - this.opcode('pushLiteral', 'null'); - }, - - Hash: function Hash(hash) { - var pairs = hash.pairs, - i = 0, - l = pairs.length; - - this.opcode('pushHash'); - - for (; i < l; i++) { - this.pushParam(pairs[i].value); - } - while (i--) { - this.opcode('assignToHash', pairs[i].key); - } - this.opcode('popHash'); - }, - - // HELPERS - opcode: function opcode(name) { - this.opcodes.push({ opcode: name, args: slice.call(arguments, 1), loc: this.sourceNode[0].loc }); - }, - - addDepth: function addDepth(depth) { - if (!depth) { - return; - } - - this.useDepths = true; - }, - - classifySexpr: function classifySexpr(sexpr) { - var isSimple = _AST.helpers.simpleId(sexpr.path); - - var isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]); - - // a mustache is an eligible helper if: - // * its id is simple (a single part, not `this` or `..`) - var isHelper = !isBlockParam && _AST.helpers.helperExpression(sexpr); - - // if a mustache is an eligible helper but not a definite - // helper, it is ambiguous, and will be resolved in a later - // pass or at runtime. - var isEligible = !isBlockParam && (isHelper || isSimple); - - // if ambiguous, we can possibly resolve the ambiguity now - // An eligible helper is one that does not have a complex path, i.e. `this.foo`, `../foo` etc. - if (isEligible && !isHelper) { - var _name2 = sexpr.path.parts[0], - options = this.options; - - if (options.knownHelpers[_name2]) { - isHelper = true; - } else if (options.knownHelpersOnly) { - isEligible = false; - } - } - - if (isHelper) { - return 'helper'; - } else if (isEligible) { - return 'ambiguous'; - } else { - return 'simple'; - } - }, - - pushParams: function pushParams(params) { - for (var i = 0, l = params.length; i < l; i++) { - this.pushParam(params[i]); - } - }, - - pushParam: function pushParam(val) { - var value = val.value != null ? val.value : val.original || ''; - - if (this.stringParams) { - if (value.replace) { - value = value.replace(/^(\.?\.\/)*/g, '').replace(/\//g, '.'); - } - - if (val.depth) { - this.addDepth(val.depth); - } - this.opcode('getContext', val.depth || 0); - this.opcode('pushStringParam', value, val.type); - - if (val.type === 'SubExpression') { - // SubExpressions get evaluated and passed in - // in string params mode. - this.accept(val); - } - } else { - if (this.trackIds) { - var blockParamIndex = undefined; - if (val.parts && !_AST.helpers.scopedId(val) && !val.depth) { - blockParamIndex = this.blockParamIndex(val.parts[0]); - } - if (blockParamIndex) { - var blockParamChild = val.parts.slice(1).join('.'); - this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild); - } else { - value = val.original || value; - if (value.replace) { - value = value.replace(/^\.\//g, '').replace(/^\.$/g, ''); - } - - this.opcode('pushId', val.type, value); - } - } - this.accept(val); - } - }, - - setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty) { - var params = sexpr.params; - this.pushParams(params); - - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - - if (sexpr.hash) { - this.accept(sexpr.hash); - } else { - this.opcode('emptyHash', omitEmpty); - } - - return params; - }, - - blockParamIndex: function blockParamIndex(name) { - for (var depth = 0, len = this.options.blockParams.length; depth < len; depth++) { - var blockParams = this.options.blockParams[depth], - param = blockParams && _utils.indexOf(blockParams, name); - if (blockParams && param >= 0) { - return [depth, param]; - } - } - } - }; - - function precompile(input, options, env) { - if (input == null || typeof input !== 'string' && input.type !== 'Program') { - throw new _Exception('You must pass a string or Handlebars AST to Handlebars.precompile. You passed ' + input); - } - - options = options || {}; - if (!('data' in options)) { - options.data = true; - } - if (options.compat) { - options.useDepths = true; - } - - var ast = env.parse(input, options), - environment = new env.Compiler().compile(ast, options); - return new env.JavaScriptCompiler().compile(environment, options); - } - - function compile(input, _x, env) { - var options = arguments[1] === undefined ? {} : arguments[1]; - - if (input == null || typeof input !== 'string' && input.type !== 'Program') { - throw new _Exception('You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + input); - } - - if (!('data' in options)) { - options.data = true; - } - if (options.compat) { - options.useDepths = true; - } - - var compiled = undefined; - - function compileInput() { - var ast = env.parse(input, options), - environment = new env.Compiler().compile(ast, options), - templateSpec = new env.JavaScriptCompiler().compile(environment, options, undefined, true); - return env.template(templateSpec); - } - - // Template is only compiled on first use and cached after that point. - function ret(context, execOptions) { - if (!compiled) { - compiled = compileInput(); - } - return compiled.call(this, context, execOptions); - } - ret._setup = function (setupOptions) { - if (!compiled) { - compiled = compileInput(); - } - return compiled._setup(setupOptions); - }; - ret._child = function (i, data, blockParams, depths) { - if (!compiled) { - compiled = compileInput(); - } - return compiled._child(i, data, blockParams, depths); - }; - return ret; - } - - function argEquals(a, b) { - if (a === b) { - return true; - } - - if (_utils.isArray(a) && _utils.isArray(b) && a.length === b.length) { - for (var i = 0; i < a.length; i++) { - if (!argEquals(a[i], b[i])) { - return false; - } - } - return true; - } - } - - function transformLiteralToPath(sexpr) { - if (!sexpr.path.parts) { - var literal = sexpr.path; - // Casting to string here to make false and 0 literal values play nicely with the rest - // of the system. - sexpr.path = new _AST.PathExpression(false, 0, [literal.original + ''], literal.original + '', literal.loc); - } - } -}); \ No newline at end of file diff --git a/node_modules/handlebars/dist/amd/handlebars/compiler/helpers.js b/node_modules/handlebars/dist/amd/handlebars/compiler/helpers.js deleted file mode 100644 index 97efc9e..0000000 --- a/node_modules/handlebars/dist/amd/handlebars/compiler/helpers.js +++ /dev/null @@ -1,131 +0,0 @@ -define(['exports', '../exception'], function (exports, _exception) { - 'use strict'; - - var _interopRequire = function (obj) { return obj && obj.__esModule ? obj['default'] : obj; }; - - exports.__esModule = true; - exports.SourceLocation = SourceLocation; - exports.id = id; - exports.stripFlags = stripFlags; - exports.stripComment = stripComment; - exports.preparePath = preparePath; - exports.prepareMustache = prepareMustache; - exports.prepareRawBlock = prepareRawBlock; - exports.prepareBlock = prepareBlock; - - var _Exception = _interopRequire(_exception); - - function SourceLocation(source, locInfo) { - this.source = source; - this.start = { - line: locInfo.first_line, - column: locInfo.first_column - }; - this.end = { - line: locInfo.last_line, - column: locInfo.last_column - }; - } - - function id(token) { - if (/^\[.*\]$/.test(token)) { - return token.substr(1, token.length - 2); - } else { - return token; - } - } - - function stripFlags(open, close) { - return { - open: open.charAt(2) === '~', - close: close.charAt(close.length - 3) === '~' - }; - } - - function stripComment(comment) { - return comment.replace(/^\{\{~?\!-?-?/, '').replace(/-?-?~?\}\}$/, ''); - } - - function preparePath(data, parts, locInfo) { - locInfo = this.locInfo(locInfo); - - var original = data ? '@' : '', - dig = [], - depth = 0, - depthString = ''; - - for (var i = 0, l = parts.length; i < l; i++) { - var part = parts[i].part, - - // If we have [] syntax then we do not treat path references as operators, - // i.e. foo.[this] resolves to approximately context.foo['this'] - isLiteral = parts[i].original !== part; - original += (parts[i].separator || '') + part; - - if (!isLiteral && (part === '..' || part === '.' || part === 'this')) { - if (dig.length > 0) { - throw new _Exception('Invalid path: ' + original, { loc: locInfo }); - } else if (part === '..') { - depth++; - depthString += '../'; - } - } else { - dig.push(part); - } - } - - return new this.PathExpression(data, depth, dig, original, locInfo); - } - - function prepareMustache(path, params, hash, open, strip, locInfo) { - // Must use charAt to support IE pre-10 - var escapeFlag = open.charAt(3) || open.charAt(2), - escaped = escapeFlag !== '{' && escapeFlag !== '&'; - - return new this.MustacheStatement(path, params, hash, escaped, strip, this.locInfo(locInfo)); - } - - function prepareRawBlock(openRawBlock, content, close, locInfo) { - if (openRawBlock.path.original !== close) { - var errorNode = { loc: openRawBlock.path.loc }; - - throw new _Exception(openRawBlock.path.original + ' doesn\'t match ' + close, errorNode); - } - - locInfo = this.locInfo(locInfo); - var program = new this.Program([content], null, {}, locInfo); - - return new this.BlockStatement(openRawBlock.path, openRawBlock.params, openRawBlock.hash, program, undefined, {}, {}, {}, locInfo); - } - - function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) { - // When we are chaining inverse calls, we will not have a close path - if (close && close.path && openBlock.path.original !== close.path.original) { - var errorNode = { loc: openBlock.path.loc }; - - throw new _Exception(openBlock.path.original + ' doesn\'t match ' + close.path.original, errorNode); - } - - program.blockParams = openBlock.blockParams; - - var inverse = undefined, - inverseStrip = undefined; - - if (inverseAndProgram) { - if (inverseAndProgram.chain) { - inverseAndProgram.program.body[0].closeStrip = close.strip; - } - - inverseStrip = inverseAndProgram.strip; - inverse = inverseAndProgram.program; - } - - if (inverted) { - inverted = inverse; - inverse = program; - program = inverted; - } - - return new this.BlockStatement(openBlock.path, openBlock.params, openBlock.hash, program, inverse, openBlock.strip, inverseStrip, close && close.strip, this.locInfo(locInfo)); - } -}); \ No newline at end of file diff --git a/node_modules/handlebars/dist/amd/handlebars/compiler/javascript-compiler.js b/node_modules/handlebars/dist/amd/handlebars/compiler/javascript-compiler.js deleted file mode 100644 index befdf50..0000000 --- a/node_modules/handlebars/dist/amd/handlebars/compiler/javascript-compiler.js +++ /dev/null @@ -1,1053 +0,0 @@ -define(['exports', 'module', '../base', '../exception', '../utils', './code-gen'], function (exports, module, _base, _exception, _utils, _codeGen) { - 'use strict'; - - var _interopRequire = function (obj) { return obj && obj.__esModule ? obj['default'] : obj; }; - - var _Exception = _interopRequire(_exception); - - var _CodeGen = _interopRequire(_codeGen); - - function Literal(value) { - this.value = value; - } - - function JavaScriptCompiler() {} - - JavaScriptCompiler.prototype = { - // PUBLIC API: You can override these methods in a subclass to provide - // alternative compiled forms for name lookup and buffering semantics - nameLookup: function nameLookup(parent, name /* , type*/) { - if (JavaScriptCompiler.isValidJavaScriptVariableName(name)) { - return [parent, '.', name]; - } else { - return [parent, '[\'', name, '\']']; - } - }, - depthedLookup: function depthedLookup(name) { - return [this.aliasable('this.lookup'), '(depths, "', name, '")']; - }, - - compilerInfo: function compilerInfo() { - var revision = _base.COMPILER_REVISION, - versions = _base.REVISION_CHANGES[revision]; - return [revision, versions]; - }, - - appendToBuffer: function appendToBuffer(source, location, explicit) { - // Force a source as this simplifies the merge logic. - if (!_utils.isArray(source)) { - source = [source]; - } - source = this.source.wrap(source, location); - - if (this.environment.isSimple) { - return ['return ', source, ';']; - } else if (explicit) { - // This is a case where the buffer operation occurs as a child of another - // construct, generally braces. We have to explicitly output these buffer - // operations to ensure that the emitted code goes in the correct location. - return ['buffer += ', source, ';']; - } else { - source.appendToBuffer = true; - return source; - } - }, - - initializeBuffer: function initializeBuffer() { - return this.quotedString(''); - }, - // END PUBLIC API - - compile: function compile(environment, options, context, asObject) { - this.environment = environment; - this.options = options; - this.stringParams = this.options.stringParams; - this.trackIds = this.options.trackIds; - this.precompile = !asObject; - - this.name = this.environment.name; - this.isChild = !!context; - this.context = context || { - programs: [], - environments: [] - }; - - this.preamble(); - - this.stackSlot = 0; - this.stackVars = []; - this.aliases = {}; - this.registers = { list: [] }; - this.hashes = []; - this.compileStack = []; - this.inlineStack = []; - this.blockParams = []; - - this.compileChildren(environment, options); - - this.useDepths = this.useDepths || environment.useDepths || this.options.compat; - this.useBlockParams = this.useBlockParams || environment.useBlockParams; - - var opcodes = environment.opcodes, - opcode = undefined, - firstLoc = undefined, - i = undefined, - l = undefined; - - for (i = 0, l = opcodes.length; i < l; i++) { - opcode = opcodes[i]; - - this.source.currentLocation = opcode.loc; - firstLoc = firstLoc || opcode.loc; - this[opcode.opcode].apply(this, opcode.args); - } - - // Flush any trailing content that might be pending. - this.source.currentLocation = firstLoc; - this.pushSource(''); - - /* istanbul ignore next */ - if (this.stackSlot || this.inlineStack.length || this.compileStack.length) { - throw new _Exception('Compile completed with content left on stack'); - } - - var fn = this.createFunctionContext(asObject); - if (!this.isChild) { - var ret = { - compiler: this.compilerInfo(), - main: fn - }; - var programs = this.context.programs; - for (i = 0, l = programs.length; i < l; i++) { - if (programs[i]) { - ret[i] = programs[i]; - } - } - - if (this.environment.usePartial) { - ret.usePartial = true; - } - if (this.options.data) { - ret.useData = true; - } - if (this.useDepths) { - ret.useDepths = true; - } - if (this.useBlockParams) { - ret.useBlockParams = true; - } - if (this.options.compat) { - ret.compat = true; - } - - if (!asObject) { - ret.compiler = JSON.stringify(ret.compiler); - - this.source.currentLocation = { start: { line: 1, column: 0 } }; - ret = this.objectLiteral(ret); - - if (options.srcName) { - ret = ret.toStringWithSourceMap({ file: options.destName }); - ret.map = ret.map && ret.map.toString(); - } else { - ret = ret.toString(); - } - } else { - ret.compilerOptions = this.options; - } - - return ret; - } else { - return fn; - } - }, - - preamble: function preamble() { - // track the last context pushed into place to allow skipping the - // getContext opcode when it would be a noop - this.lastContext = 0; - this.source = new _CodeGen(this.options.srcName); - }, - - createFunctionContext: function createFunctionContext(asObject) { - var varDeclarations = ''; - - var locals = this.stackVars.concat(this.registers.list); - if (locals.length > 0) { - varDeclarations += ', ' + locals.join(', '); - } - - // Generate minimizer alias mappings - // - // When using true SourceNodes, this will update all references to the given alias - // as the source nodes are reused in situ. For the non-source node compilation mode, - // aliases will not be used, but this case is already being run on the client and - // we aren't concern about minimizing the template size. - var aliasCount = 0; - for (var alias in this.aliases) { - // eslint-disable-line guard-for-in - var node = this.aliases[alias]; - - if (this.aliases.hasOwnProperty(alias) && node.children && node.referenceCount > 1) { - varDeclarations += ', alias' + ++aliasCount + '=' + alias; - node.children[0] = 'alias' + aliasCount; - } - } - - var params = ['depth0', 'helpers', 'partials', 'data']; - - if (this.useBlockParams || this.useDepths) { - params.push('blockParams'); - } - if (this.useDepths) { - params.push('depths'); - } - - // Perform a second pass over the output to merge content when possible - var source = this.mergeSource(varDeclarations); - - if (asObject) { - params.push(source); - - return Function.apply(this, params); - } else { - return this.source.wrap(['function(', params.join(','), ') {\n ', source, '}']); - } - }, - mergeSource: function mergeSource(varDeclarations) { - var isSimple = this.environment.isSimple, - appendOnly = !this.forceBuffer, - appendFirst = undefined, - sourceSeen = undefined, - bufferStart = undefined, - bufferEnd = undefined; - this.source.each(function (line) { - if (line.appendToBuffer) { - if (bufferStart) { - line.prepend(' + '); - } else { - bufferStart = line; - } - bufferEnd = line; - } else { - if (bufferStart) { - if (!sourceSeen) { - appendFirst = true; - } else { - bufferStart.prepend('buffer += '); - } - bufferEnd.add(';'); - bufferStart = bufferEnd = undefined; - } - - sourceSeen = true; - if (!isSimple) { - appendOnly = false; - } - } - }); - - if (appendOnly) { - if (bufferStart) { - bufferStart.prepend('return '); - bufferEnd.add(';'); - } else if (!sourceSeen) { - this.source.push('return "";'); - } - } else { - varDeclarations += ', buffer = ' + (appendFirst ? '' : this.initializeBuffer()); - - if (bufferStart) { - bufferStart.prepend('return buffer + '); - bufferEnd.add(';'); - } else { - this.source.push('return buffer;'); - } - } - - if (varDeclarations) { - this.source.prepend('var ' + varDeclarations.substring(2) + (appendFirst ? '' : ';\n')); - } - - return this.source.merge(); - }, - - // [blockValue] - // - // On stack, before: hash, inverse, program, value - // On stack, after: return value of blockHelperMissing - // - // The purpose of this opcode is to take a block of the form - // `{{#this.foo}}...{{/this.foo}}`, resolve the value of `foo`, and - // replace it on the stack with the result of properly - // invoking blockHelperMissing. - blockValue: function blockValue(name) { - var blockHelperMissing = this.aliasable('helpers.blockHelperMissing'), - params = [this.contextName(0)]; - this.setupHelperArgs(name, 0, params); - - var blockName = this.popStack(); - params.splice(1, 0, blockName); - - this.push(this.source.functionCall(blockHelperMissing, 'call', params)); - }, - - // [ambiguousBlockValue] - // - // On stack, before: hash, inverse, program, value - // Compiler value, before: lastHelper=value of last found helper, if any - // On stack, after, if no lastHelper: same as [blockValue] - // On stack, after, if lastHelper: value - ambiguousBlockValue: function ambiguousBlockValue() { - // We're being a bit cheeky and reusing the options value from the prior exec - var blockHelperMissing = this.aliasable('helpers.blockHelperMissing'), - params = [this.contextName(0)]; - this.setupHelperArgs('', 0, params, true); - - this.flushInline(); - - var current = this.topStack(); - params.splice(1, 0, current); - - this.pushSource(['if (!', this.lastHelper, ') { ', current, ' = ', this.source.functionCall(blockHelperMissing, 'call', params), '}']); - }, - - // [appendContent] - // - // On stack, before: ... - // On stack, after: ... - // - // Appends the string value of `content` to the current buffer - appendContent: function appendContent(content) { - if (this.pendingContent) { - content = this.pendingContent + content; - } else { - this.pendingLocation = this.source.currentLocation; - } - - this.pendingContent = content; - }, - - // [append] - // - // On stack, before: value, ... - // On stack, after: ... - // - // Coerces `value` to a String and appends it to the current buffer. - // - // If `value` is truthy, or 0, it is coerced into a string and appended - // Otherwise, the empty string is appended - append: function append() { - if (this.isInline()) { - this.replaceStack(function (current) { - return [' != null ? ', current, ' : ""']; - }); - - this.pushSource(this.appendToBuffer(this.popStack())); - } else { - var local = this.popStack(); - this.pushSource(['if (', local, ' != null) { ', this.appendToBuffer(local, undefined, true), ' }']); - if (this.environment.isSimple) { - this.pushSource(['else { ', this.appendToBuffer('\'\'', undefined, true), ' }']); - } - } - }, - - // [appendEscaped] - // - // On stack, before: value, ... - // On stack, after: ... - // - // Escape `value` and append it to the buffer - appendEscaped: function appendEscaped() { - this.pushSource(this.appendToBuffer([this.aliasable('this.escapeExpression'), '(', this.popStack(), ')'])); - }, - - // [getContext] - // - // On stack, before: ... - // On stack, after: ... - // Compiler value, after: lastContext=depth - // - // Set the value of the `lastContext` compiler value to the depth - getContext: function getContext(depth) { - this.lastContext = depth; - }, - - // [pushContext] - // - // On stack, before: ... - // On stack, after: currentContext, ... - // - // Pushes the value of the current context onto the stack. - pushContext: function pushContext() { - this.pushStackLiteral(this.contextName(this.lastContext)); - }, - - // [lookupOnContext] - // - // On stack, before: ... - // On stack, after: currentContext[name], ... - // - // Looks up the value of `name` on the current context and pushes - // it onto the stack. - lookupOnContext: function lookupOnContext(parts, falsy, scoped) { - var i = 0; - - if (!scoped && this.options.compat && !this.lastContext) { - // The depthed query is expected to handle the undefined logic for the root level that - // is implemented below, so we evaluate that directly in compat mode - this.push(this.depthedLookup(parts[i++])); - } else { - this.pushContext(); - } - - this.resolvePath('context', parts, i, falsy); - }, - - // [lookupBlockParam] - // - // On stack, before: ... - // On stack, after: blockParam[name], ... - // - // Looks up the value of `parts` on the given block param and pushes - // it onto the stack. - lookupBlockParam: function lookupBlockParam(blockParamId, parts) { - this.useBlockParams = true; - - this.push(['blockParams[', blockParamId[0], '][', blockParamId[1], ']']); - this.resolvePath('context', parts, 1); - }, - - // [lookupData] - // - // On stack, before: ... - // On stack, after: data, ... - // - // Push the data lookup operator - lookupData: function lookupData(depth, parts) { - if (!depth) { - this.pushStackLiteral('data'); - } else { - this.pushStackLiteral('this.data(data, ' + depth + ')'); - } - - this.resolvePath('data', parts, 0, true); - }, - - resolvePath: function resolvePath(type, parts, i, falsy) { - var _this = this; - - if (this.options.strict || this.options.assumeObjects) { - this.push(strictLookup(this.options.strict, this, parts, type)); - return; - } - - var len = parts.length; - for (; i < len; i++) { - /*eslint-disable no-loop-func */ - this.replaceStack(function (current) { - var lookup = _this.nameLookup(current, parts[i], type); - // We want to ensure that zero and false are handled properly if the context (falsy flag) - // needs to have the special handling for these values. - if (!falsy) { - return [' != null ? ', lookup, ' : ', current]; - } else { - // Otherwise we can use generic falsy handling - return [' && ', lookup]; - } - }); - /*eslint-enable no-loop-func */ - } - }, - - // [resolvePossibleLambda] - // - // On stack, before: value, ... - // On stack, after: resolved value, ... - // - // If the `value` is a lambda, replace it on the stack by - // the return value of the lambda - resolvePossibleLambda: function resolvePossibleLambda() { - this.push([this.aliasable('this.lambda'), '(', this.popStack(), ', ', this.contextName(0), ')']); - }, - - // [pushStringParam] - // - // On stack, before: ... - // On stack, after: string, currentContext, ... - // - // This opcode is designed for use in string mode, which - // provides the string value of a parameter along with its - // depth rather than resolving it immediately. - pushStringParam: function pushStringParam(string, type) { - this.pushContext(); - this.pushString(type); - - // If it's a subexpression, the string result - // will be pushed after this opcode. - if (type !== 'SubExpression') { - if (typeof string === 'string') { - this.pushString(string); - } else { - this.pushStackLiteral(string); - } - } - }, - - emptyHash: function emptyHash(omitEmpty) { - if (this.trackIds) { - this.push('{}'); // hashIds - } - if (this.stringParams) { - this.push('{}'); // hashContexts - this.push('{}'); // hashTypes - } - this.pushStackLiteral(omitEmpty ? 'undefined' : '{}'); - }, - pushHash: function pushHash() { - if (this.hash) { - this.hashes.push(this.hash); - } - this.hash = { values: [], types: [], contexts: [], ids: [] }; - }, - popHash: function popHash() { - var hash = this.hash; - this.hash = this.hashes.pop(); - - if (this.trackIds) { - this.push(this.objectLiteral(hash.ids)); - } - if (this.stringParams) { - this.push(this.objectLiteral(hash.contexts)); - this.push(this.objectLiteral(hash.types)); - } - - this.push(this.objectLiteral(hash.values)); - }, - - // [pushString] - // - // On stack, before: ... - // On stack, after: quotedString(string), ... - // - // Push a quoted version of `string` onto the stack - pushString: function pushString(string) { - this.pushStackLiteral(this.quotedString(string)); - }, - - // [pushLiteral] - // - // On stack, before: ... - // On stack, after: value, ... - // - // Pushes a value onto the stack. This operation prevents - // the compiler from creating a temporary variable to hold - // it. - pushLiteral: function pushLiteral(value) { - this.pushStackLiteral(value); - }, - - // [pushProgram] - // - // On stack, before: ... - // On stack, after: program(guid), ... - // - // Push a program expression onto the stack. This takes - // a compile-time guid and converts it into a runtime-accessible - // expression. - pushProgram: function pushProgram(guid) { - if (guid != null) { - this.pushStackLiteral(this.programExpression(guid)); - } else { - this.pushStackLiteral(null); - } - }, - - // [invokeHelper] - // - // On stack, before: hash, inverse, program, params..., ... - // On stack, after: result of helper invocation - // - // Pops off the helper's parameters, invokes the helper, - // and pushes the helper's return value onto the stack. - // - // If the helper is not found, `helperMissing` is called. - invokeHelper: function invokeHelper(paramSize, name, isSimple) { - var nonHelper = this.popStack(), - helper = this.setupHelper(paramSize, name), - simple = isSimple ? [helper.name, ' || '] : ''; - - var lookup = ['('].concat(simple, nonHelper); - if (!this.options.strict) { - lookup.push(' || ', this.aliasable('helpers.helperMissing')); - } - lookup.push(')'); - - this.push(this.source.functionCall(lookup, 'call', helper.callParams)); - }, - - // [invokeKnownHelper] - // - // On stack, before: hash, inverse, program, params..., ... - // On stack, after: result of helper invocation - // - // This operation is used when the helper is known to exist, - // so a `helperMissing` fallback is not required. - invokeKnownHelper: function invokeKnownHelper(paramSize, name) { - var helper = this.setupHelper(paramSize, name); - this.push(this.source.functionCall(helper.name, 'call', helper.callParams)); - }, - - // [invokeAmbiguous] - // - // On stack, before: hash, inverse, program, params..., ... - // On stack, after: result of disambiguation - // - // This operation is used when an expression like `{{foo}}` - // is provided, but we don't know at compile-time whether it - // is a helper or a path. - // - // This operation emits more code than the other options, - // and can be avoided by passing the `knownHelpers` and - // `knownHelpersOnly` flags at compile-time. - invokeAmbiguous: function invokeAmbiguous(name, helperCall) { - this.useRegister('helper'); - - var nonHelper = this.popStack(); - - this.emptyHash(); - var helper = this.setupHelper(0, name, helperCall); - - var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper'); - - var lookup = ['(', '(helper = ', helperName, ' || ', nonHelper, ')']; - if (!this.options.strict) { - lookup[0] = '(helper = '; - lookup.push(' != null ? helper : ', this.aliasable('helpers.helperMissing')); - } - - this.push(['(', lookup, helper.paramsInit ? ['),(', helper.paramsInit] : [], '),', '(typeof helper === ', this.aliasable('"function"'), ' ? ', this.source.functionCall('helper', 'call', helper.callParams), ' : helper))']); - }, - - // [invokePartial] - // - // On stack, before: context, ... - // On stack after: result of partial invocation - // - // This operation pops off a context, invokes a partial with that context, - // and pushes the result of the invocation back. - invokePartial: function invokePartial(isDynamic, name, indent) { - var params = [], - options = this.setupParams(name, 1, params, false); - - if (isDynamic) { - name = this.popStack(); - delete options.name; - } - - if (indent) { - options.indent = JSON.stringify(indent); - } - options.helpers = 'helpers'; - options.partials = 'partials'; - - if (!isDynamic) { - params.unshift(this.nameLookup('partials', name, 'partial')); - } else { - params.unshift(name); - } - - if (this.options.compat) { - options.depths = 'depths'; - } - options = this.objectLiteral(options); - params.push(options); - - this.push(this.source.functionCall('this.invokePartial', '', params)); - }, - - // [assignToHash] - // - // On stack, before: value, ..., hash, ... - // On stack, after: ..., hash, ... - // - // Pops a value off the stack and assigns it to the current hash - assignToHash: function assignToHash(key) { - var value = this.popStack(), - context = undefined, - type = undefined, - id = undefined; - - if (this.trackIds) { - id = this.popStack(); - } - if (this.stringParams) { - type = this.popStack(); - context = this.popStack(); - } - - var hash = this.hash; - if (context) { - hash.contexts[key] = context; - } - if (type) { - hash.types[key] = type; - } - if (id) { - hash.ids[key] = id; - } - hash.values[key] = value; - }, - - pushId: function pushId(type, name, child) { - if (type === 'BlockParam') { - this.pushStackLiteral('blockParams[' + name[0] + '].path[' + name[1] + ']' + (child ? ' + ' + JSON.stringify('.' + child) : '')); - } else if (type === 'PathExpression') { - this.pushString(name); - } else if (type === 'SubExpression') { - this.pushStackLiteral('true'); - } else { - this.pushStackLiteral('null'); - } - }, - - // HELPERS - - compiler: JavaScriptCompiler, - - compileChildren: function compileChildren(environment, options) { - var children = environment.children, - child = undefined, - compiler = undefined; - - for (var i = 0, l = children.length; i < l; i++) { - child = children[i]; - compiler = new this.compiler(); // eslint-disable-line new-cap - - var index = this.matchExistingProgram(child); - - if (index == null) { - this.context.programs.push(''); // Placeholder to prevent name conflicts for nested children - index = this.context.programs.length; - child.index = index; - child.name = 'program' + index; - this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile); - this.context.environments[index] = child; - - this.useDepths = this.useDepths || compiler.useDepths; - this.useBlockParams = this.useBlockParams || compiler.useBlockParams; - } else { - child.index = index; - child.name = 'program' + index; - - this.useDepths = this.useDepths || child.useDepths; - this.useBlockParams = this.useBlockParams || child.useBlockParams; - } - } - }, - matchExistingProgram: function matchExistingProgram(child) { - for (var i = 0, len = this.context.environments.length; i < len; i++) { - var environment = this.context.environments[i]; - if (environment && environment.equals(child)) { - return i; - } - } - }, - - programExpression: function programExpression(guid) { - var child = this.environment.children[guid], - programParams = [child.index, 'data', child.blockParams]; - - if (this.useBlockParams || this.useDepths) { - programParams.push('blockParams'); - } - if (this.useDepths) { - programParams.push('depths'); - } - - return 'this.program(' + programParams.join(', ') + ')'; - }, - - useRegister: function useRegister(name) { - if (!this.registers[name]) { - this.registers[name] = true; - this.registers.list.push(name); - } - }, - - push: function push(expr) { - if (!(expr instanceof Literal)) { - expr = this.source.wrap(expr); - } - - this.inlineStack.push(expr); - return expr; - }, - - pushStackLiteral: function pushStackLiteral(item) { - this.push(new Literal(item)); - }, - - pushSource: function pushSource(source) { - if (this.pendingContent) { - this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation)); - this.pendingContent = undefined; - } - - if (source) { - this.source.push(source); - } - }, - - replaceStack: function replaceStack(callback) { - var prefix = ['('], - stack = undefined, - createdStack = undefined, - usedLiteral = undefined; - - /* istanbul ignore next */ - if (!this.isInline()) { - throw new _Exception('replaceStack on non-inline'); - } - - // We want to merge the inline statement into the replacement statement via ',' - var top = this.popStack(true); - - if (top instanceof Literal) { - // Literals do not need to be inlined - stack = [top.value]; - prefix = ['(', stack]; - usedLiteral = true; - } else { - // Get or create the current stack name for use by the inline - createdStack = true; - var _name = this.incrStack(); - - prefix = ['((', this.push(_name), ' = ', top, ')']; - stack = this.topStack(); - } - - var item = callback.call(this, stack); - - if (!usedLiteral) { - this.popStack(); - } - if (createdStack) { - this.stackSlot--; - } - this.push(prefix.concat(item, ')')); - }, - - incrStack: function incrStack() { - this.stackSlot++; - if (this.stackSlot > this.stackVars.length) { - this.stackVars.push('stack' + this.stackSlot); - } - return this.topStackName(); - }, - topStackName: function topStackName() { - return 'stack' + this.stackSlot; - }, - flushInline: function flushInline() { - var inlineStack = this.inlineStack; - this.inlineStack = []; - for (var i = 0, len = inlineStack.length; i < len; i++) { - var entry = inlineStack[i]; - /* istanbul ignore if */ - if (entry instanceof Literal) { - this.compileStack.push(entry); - } else { - var stack = this.incrStack(); - this.pushSource([stack, ' = ', entry, ';']); - this.compileStack.push(stack); - } - } - }, - isInline: function isInline() { - return this.inlineStack.length; - }, - - popStack: function popStack(wrapped) { - var inline = this.isInline(), - item = (inline ? this.inlineStack : this.compileStack).pop(); - - if (!wrapped && item instanceof Literal) { - return item.value; - } else { - if (!inline) { - /* istanbul ignore next */ - if (!this.stackSlot) { - throw new _Exception('Invalid stack pop'); - } - this.stackSlot--; - } - return item; - } - }, - - topStack: function topStack() { - var stack = this.isInline() ? this.inlineStack : this.compileStack, - item = stack[stack.length - 1]; - - /* istanbul ignore if */ - if (item instanceof Literal) { - return item.value; - } else { - return item; - } - }, - - contextName: function contextName(context) { - if (this.useDepths && context) { - return 'depths[' + context + ']'; - } else { - return 'depth' + context; - } - }, - - quotedString: function quotedString(str) { - return this.source.quotedString(str); - }, - - objectLiteral: function objectLiteral(obj) { - return this.source.objectLiteral(obj); - }, - - aliasable: function aliasable(name) { - var ret = this.aliases[name]; - if (ret) { - ret.referenceCount++; - return ret; - } - - ret = this.aliases[name] = this.source.wrap(name); - ret.aliasable = true; - ret.referenceCount = 1; - - return ret; - }, - - setupHelper: function setupHelper(paramSize, name, blockHelper) { - var params = [], - paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper); - var foundHelper = this.nameLookup('helpers', name, 'helper'); - - return { - params: params, - paramsInit: paramsInit, - name: foundHelper, - callParams: [this.contextName(0)].concat(params) - }; - }, - - setupParams: function setupParams(helper, paramSize, params) { - var options = {}, - contexts = [], - types = [], - ids = [], - param = undefined; - - options.name = this.quotedString(helper); - options.hash = this.popStack(); - - if (this.trackIds) { - options.hashIds = this.popStack(); - } - if (this.stringParams) { - options.hashTypes = this.popStack(); - options.hashContexts = this.popStack(); - } - - var inverse = this.popStack(), - program = this.popStack(); - - // Avoid setting fn and inverse if neither are set. This allows - // helpers to do a check for `if (options.fn)` - if (program || inverse) { - options.fn = program || 'this.noop'; - options.inverse = inverse || 'this.noop'; - } - - // The parameters go on to the stack in order (making sure that they are evaluated in order) - // so we need to pop them off the stack in reverse order - var i = paramSize; - while (i--) { - param = this.popStack(); - params[i] = param; - - if (this.trackIds) { - ids[i] = this.popStack(); - } - if (this.stringParams) { - types[i] = this.popStack(); - contexts[i] = this.popStack(); - } - } - - if (this.trackIds) { - options.ids = this.source.generateArray(ids); - } - if (this.stringParams) { - options.types = this.source.generateArray(types); - options.contexts = this.source.generateArray(contexts); - } - - if (this.options.data) { - options.data = 'data'; - } - if (this.useBlockParams) { - options.blockParams = 'blockParams'; - } - return options; - }, - - setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister) { - var options = this.setupParams(helper, paramSize, params, true); - options = this.objectLiteral(options); - if (useRegister) { - this.useRegister('options'); - params.push('options'); - return ['options=', options]; - } else { - params.push(options); - return ''; - } - } - }; - - (function () { - var reservedWords = ('break else new var' + ' case finally return void' + ' catch for switch while' + ' continue function this with' + ' default if throw' + ' delete in try' + ' do instanceof typeof' + ' abstract enum int short' + ' boolean export interface static' + ' byte extends long super' + ' char final native synchronized' + ' class float package throws' + ' const goto private transient' + ' debugger implements protected volatile' + ' double import public let yield await' + ' null true false').split(' '); - - var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {}; - - for (var i = 0, l = reservedWords.length; i < l; i++) { - compilerWords[reservedWords[i]] = true; - } - })(); - - JavaScriptCompiler.isValidJavaScriptVariableName = function (name) { - return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name); - }; - - function strictLookup(requireTerminal, compiler, parts, type) { - var stack = compiler.popStack(), - i = 0, - len = parts.length; - if (requireTerminal) { - len--; - } - - for (; i < len; i++) { - stack = compiler.nameLookup(stack, parts[i], type); - } - - if (requireTerminal) { - return [compiler.aliasable('this.strict'), '(', stack, ', ', compiler.quotedString(parts[i]), ')']; - } else { - return stack; - } - } - - module.exports = JavaScriptCompiler; -}); \ No newline at end of file diff --git a/node_modules/handlebars/dist/amd/handlebars/compiler/parser.js b/node_modules/handlebars/dist/amd/handlebars/compiler/parser.js deleted file mode 100644 index 889545d..0000000 --- a/node_modules/handlebars/dist/amd/handlebars/compiler/parser.js +++ /dev/null @@ -1,678 +0,0 @@ -define(["exports", "module"], function (exports, module) { - /* istanbul ignore next */ - /* Jison generated parser */ - "use strict"; - - var handlebars = (function () { - var parser = { trace: function trace() {}, - yy: {}, - symbols_: { error: 2, root: 3, program: 4, EOF: 5, program_repetition0: 6, statement: 7, mustache: 8, block: 9, rawBlock: 10, partial: 11, content: 12, COMMENT: 13, CONTENT: 14, openRawBlock: 15, END_RAW_BLOCK: 16, OPEN_RAW_BLOCK: 17, helperName: 18, openRawBlock_repetition0: 19, openRawBlock_option0: 20, CLOSE_RAW_BLOCK: 21, openBlock: 22, block_option0: 23, closeBlock: 24, openInverse: 25, block_option1: 26, OPEN_BLOCK: 27, openBlock_repetition0: 28, openBlock_option0: 29, openBlock_option1: 30, CLOSE: 31, OPEN_INVERSE: 32, openInverse_repetition0: 33, openInverse_option0: 34, openInverse_option1: 35, openInverseChain: 36, OPEN_INVERSE_CHAIN: 37, openInverseChain_repetition0: 38, openInverseChain_option0: 39, openInverseChain_option1: 40, inverseAndProgram: 41, INVERSE: 42, inverseChain: 43, inverseChain_option0: 44, OPEN_ENDBLOCK: 45, OPEN: 46, mustache_repetition0: 47, mustache_option0: 48, OPEN_UNESCAPED: 49, mustache_repetition1: 50, mustache_option1: 51, CLOSE_UNESCAPED: 52, OPEN_PARTIAL: 53, partialName: 54, partial_repetition0: 55, partial_option0: 56, param: 57, sexpr: 58, OPEN_SEXPR: 59, sexpr_repetition0: 60, sexpr_option0: 61, CLOSE_SEXPR: 62, hash: 63, hash_repetition_plus0: 64, hashSegment: 65, ID: 66, EQUALS: 67, blockParams: 68, OPEN_BLOCK_PARAMS: 69, blockParams_repetition_plus0: 70, CLOSE_BLOCK_PARAMS: 71, path: 72, dataName: 73, STRING: 74, NUMBER: 75, BOOLEAN: 76, UNDEFINED: 77, NULL: 78, DATA: 79, pathSegments: 80, SEP: 81, $accept: 0, $end: 1 }, - terminals_: { 2: "error", 5: "EOF", 13: "COMMENT", 14: "CONTENT", 16: "END_RAW_BLOCK", 17: "OPEN_RAW_BLOCK", 21: "CLOSE_RAW_BLOCK", 27: "OPEN_BLOCK", 31: "CLOSE", 32: "OPEN_INVERSE", 37: "OPEN_INVERSE_CHAIN", 42: "INVERSE", 45: "OPEN_ENDBLOCK", 46: "OPEN", 49: "OPEN_UNESCAPED", 52: "CLOSE_UNESCAPED", 53: "OPEN_PARTIAL", 59: "OPEN_SEXPR", 62: "CLOSE_SEXPR", 66: "ID", 67: "EQUALS", 69: "OPEN_BLOCK_PARAMS", 71: "CLOSE_BLOCK_PARAMS", 74: "STRING", 75: "NUMBER", 76: "BOOLEAN", 77: "UNDEFINED", 78: "NULL", 79: "DATA", 81: "SEP" }, - productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [12, 1], [10, 3], [15, 5], [9, 4], [9, 4], [22, 6], [25, 6], [36, 6], [41, 2], [43, 3], [43, 1], [24, 3], [8, 5], [8, 5], [11, 5], [57, 1], [57, 1], [58, 5], [63, 1], [65, 3], [68, 3], [18, 1], [18, 1], [18, 1], [18, 1], [18, 1], [18, 1], [18, 1], [54, 1], [54, 1], [73, 2], [72, 1], [80, 3], [80, 1], [6, 0], [6, 2], [19, 0], [19, 2], [20, 0], [20, 1], [23, 0], [23, 1], [26, 0], [26, 1], [28, 0], [28, 2], [29, 0], [29, 1], [30, 0], [30, 1], [33, 0], [33, 2], [34, 0], [34, 1], [35, 0], [35, 1], [38, 0], [38, 2], [39, 0], [39, 1], [40, 0], [40, 1], [44, 0], [44, 1], [47, 0], [47, 2], [48, 0], [48, 1], [50, 0], [50, 2], [51, 0], [51, 1], [55, 0], [55, 2], [56, 0], [56, 1], [60, 0], [60, 2], [61, 0], [61, 1], [64, 1], [64, 2], [70, 1], [70, 2]], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { - - var $0 = $$.length - 1; - switch (yystate) { - case 1: - return $$[$0 - 1]; - break; - case 2: - this.$ = new yy.Program($$[$0], null, {}, yy.locInfo(this._$)); - break; - case 3: - this.$ = $$[$0]; - break; - case 4: - this.$ = $$[$0]; - break; - case 5: - this.$ = $$[$0]; - break; - case 6: - this.$ = $$[$0]; - break; - case 7: - this.$ = $$[$0]; - break; - case 8: - this.$ = new yy.CommentStatement(yy.stripComment($$[$0]), yy.stripFlags($$[$0], $$[$0]), yy.locInfo(this._$)); - break; - case 9: - this.$ = new yy.ContentStatement($$[$0], yy.locInfo(this._$)); - break; - case 10: - this.$ = yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); - break; - case 11: - this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1] }; - break; - case 12: - this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$); - break; - case 13: - this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$); - break; - case 14: - this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; - break; - case 15: - this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; - break; - case 16: - this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; - break; - case 17: - this.$ = { strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]), program: $$[$0] }; - break; - case 18: - var inverse = yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$), - program = new yy.Program([inverse], null, {}, yy.locInfo(this._$)); - program.chained = true; - - this.$ = { strip: $$[$0 - 2].strip, program: program, chain: true }; - - break; - case 19: - this.$ = $$[$0]; - break; - case 20: - this.$ = { path: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 2], $$[$0]) }; - break; - case 21: - this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); - break; - case 22: - this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); - break; - case 23: - this.$ = new yy.PartialStatement($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], yy.stripFlags($$[$0 - 4], $$[$0]), yy.locInfo(this._$)); - break; - case 24: - this.$ = $$[$0]; - break; - case 25: - this.$ = $$[$0]; - break; - case 26: - this.$ = new yy.SubExpression($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], yy.locInfo(this._$)); - break; - case 27: - this.$ = new yy.Hash($$[$0], yy.locInfo(this._$)); - break; - case 28: - this.$ = new yy.HashPair(yy.id($$[$0 - 2]), $$[$0], yy.locInfo(this._$)); - break; - case 29: - this.$ = yy.id($$[$0 - 1]); - break; - case 30: - this.$ = $$[$0]; - break; - case 31: - this.$ = $$[$0]; - break; - case 32: - this.$ = new yy.StringLiteral($$[$0], yy.locInfo(this._$)); - break; - case 33: - this.$ = new yy.NumberLiteral($$[$0], yy.locInfo(this._$)); - break; - case 34: - this.$ = new yy.BooleanLiteral($$[$0], yy.locInfo(this._$)); - break; - case 35: - this.$ = new yy.UndefinedLiteral(yy.locInfo(this._$)); - break; - case 36: - this.$ = new yy.NullLiteral(yy.locInfo(this._$)); - break; - case 37: - this.$ = $$[$0]; - break; - case 38: - this.$ = $$[$0]; - break; - case 39: - this.$ = yy.preparePath(true, $$[$0], this._$); - break; - case 40: - this.$ = yy.preparePath(false, $$[$0], this._$); - break; - case 41: - $$[$0 - 2].push({ part: yy.id($$[$0]), original: $$[$0], separator: $$[$0 - 1] });this.$ = $$[$0 - 2]; - break; - case 42: - this.$ = [{ part: yy.id($$[$0]), original: $$[$0] }]; - break; - case 43: - this.$ = []; - break; - case 44: - $$[$0 - 1].push($$[$0]); - break; - case 45: - this.$ = []; - break; - case 46: - $$[$0 - 1].push($$[$0]); - break; - case 53: - this.$ = []; - break; - case 54: - $$[$0 - 1].push($$[$0]); - break; - case 59: - this.$ = []; - break; - case 60: - $$[$0 - 1].push($$[$0]); - break; - case 65: - this.$ = []; - break; - case 66: - $$[$0 - 1].push($$[$0]); - break; - case 73: - this.$ = []; - break; - case 74: - $$[$0 - 1].push($$[$0]); - break; - case 77: - this.$ = []; - break; - case 78: - $$[$0 - 1].push($$[$0]); - break; - case 81: - this.$ = []; - break; - case 82: - $$[$0 - 1].push($$[$0]); - break; - case 85: - this.$ = []; - break; - case 86: - $$[$0 - 1].push($$[$0]); - break; - case 89: - this.$ = [$$[$0]]; - break; - case 90: - $$[$0 - 1].push($$[$0]); - break; - case 91: - this.$ = [$$[$0]]; - break; - case 92: - $$[$0 - 1].push($$[$0]); - break; - } - }, - table: [{ 3: 1, 4: 2, 5: [2, 43], 6: 3, 13: [2, 43], 14: [2, 43], 17: [2, 43], 27: [2, 43], 32: [2, 43], 46: [2, 43], 49: [2, 43], 53: [2, 43] }, { 1: [3] }, { 5: [1, 4] }, { 5: [2, 2], 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: [1, 11], 14: [1, 18], 15: 16, 17: [1, 21], 22: 14, 25: 15, 27: [1, 19], 32: [1, 20], 37: [2, 2], 42: [2, 2], 45: [2, 2], 46: [1, 12], 49: [1, 13], 53: [1, 17] }, { 1: [2, 1] }, { 5: [2, 44], 13: [2, 44], 14: [2, 44], 17: [2, 44], 27: [2, 44], 32: [2, 44], 37: [2, 44], 42: [2, 44], 45: [2, 44], 46: [2, 44], 49: [2, 44], 53: [2, 44] }, { 5: [2, 3], 13: [2, 3], 14: [2, 3], 17: [2, 3], 27: [2, 3], 32: [2, 3], 37: [2, 3], 42: [2, 3], 45: [2, 3], 46: [2, 3], 49: [2, 3], 53: [2, 3] }, { 5: [2, 4], 13: [2, 4], 14: [2, 4], 17: [2, 4], 27: [2, 4], 32: [2, 4], 37: [2, 4], 42: [2, 4], 45: [2, 4], 46: [2, 4], 49: [2, 4], 53: [2, 4] }, { 5: [2, 5], 13: [2, 5], 14: [2, 5], 17: [2, 5], 27: [2, 5], 32: [2, 5], 37: [2, 5], 42: [2, 5], 45: [2, 5], 46: [2, 5], 49: [2, 5], 53: [2, 5] }, { 5: [2, 6], 13: [2, 6], 14: [2, 6], 17: [2, 6], 27: [2, 6], 32: [2, 6], 37: [2, 6], 42: [2, 6], 45: [2, 6], 46: [2, 6], 49: [2, 6], 53: [2, 6] }, { 5: [2, 7], 13: [2, 7], 14: [2, 7], 17: [2, 7], 27: [2, 7], 32: [2, 7], 37: [2, 7], 42: [2, 7], 45: [2, 7], 46: [2, 7], 49: [2, 7], 53: [2, 7] }, { 5: [2, 8], 13: [2, 8], 14: [2, 8], 17: [2, 8], 27: [2, 8], 32: [2, 8], 37: [2, 8], 42: [2, 8], 45: [2, 8], 46: [2, 8], 49: [2, 8], 53: [2, 8] }, { 18: 22, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 18: 33, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 4: 34, 6: 3, 13: [2, 43], 14: [2, 43], 17: [2, 43], 27: [2, 43], 32: [2, 43], 37: [2, 43], 42: [2, 43], 45: [2, 43], 46: [2, 43], 49: [2, 43], 53: [2, 43] }, { 4: 35, 6: 3, 13: [2, 43], 14: [2, 43], 17: [2, 43], 27: [2, 43], 32: [2, 43], 42: [2, 43], 45: [2, 43], 46: [2, 43], 49: [2, 43], 53: [2, 43] }, { 12: 36, 14: [1, 18] }, { 18: 38, 54: 37, 58: 39, 59: [1, 40], 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 5: [2, 9], 13: [2, 9], 14: [2, 9], 16: [2, 9], 17: [2, 9], 27: [2, 9], 32: [2, 9], 37: [2, 9], 42: [2, 9], 45: [2, 9], 46: [2, 9], 49: [2, 9], 53: [2, 9] }, { 18: 41, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 18: 42, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 18: 43, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 31: [2, 73], 47: 44, 59: [2, 73], 66: [2, 73], 74: [2, 73], 75: [2, 73], 76: [2, 73], 77: [2, 73], 78: [2, 73], 79: [2, 73] }, { 21: [2, 30], 31: [2, 30], 52: [2, 30], 59: [2, 30], 62: [2, 30], 66: [2, 30], 69: [2, 30], 74: [2, 30], 75: [2, 30], 76: [2, 30], 77: [2, 30], 78: [2, 30], 79: [2, 30] }, { 21: [2, 31], 31: [2, 31], 52: [2, 31], 59: [2, 31], 62: [2, 31], 66: [2, 31], 69: [2, 31], 74: [2, 31], 75: [2, 31], 76: [2, 31], 77: [2, 31], 78: [2, 31], 79: [2, 31] }, { 21: [2, 32], 31: [2, 32], 52: [2, 32], 59: [2, 32], 62: [2, 32], 66: [2, 32], 69: [2, 32], 74: [2, 32], 75: [2, 32], 76: [2, 32], 77: [2, 32], 78: [2, 32], 79: [2, 32] }, { 21: [2, 33], 31: [2, 33], 52: [2, 33], 59: [2, 33], 62: [2, 33], 66: [2, 33], 69: [2, 33], 74: [2, 33], 75: [2, 33], 76: [2, 33], 77: [2, 33], 78: [2, 33], 79: [2, 33] }, { 21: [2, 34], 31: [2, 34], 52: [2, 34], 59: [2, 34], 62: [2, 34], 66: [2, 34], 69: [2, 34], 74: [2, 34], 75: [2, 34], 76: [2, 34], 77: [2, 34], 78: [2, 34], 79: [2, 34] }, { 21: [2, 35], 31: [2, 35], 52: [2, 35], 59: [2, 35], 62: [2, 35], 66: [2, 35], 69: [2, 35], 74: [2, 35], 75: [2, 35], 76: [2, 35], 77: [2, 35], 78: [2, 35], 79: [2, 35] }, { 21: [2, 36], 31: [2, 36], 52: [2, 36], 59: [2, 36], 62: [2, 36], 66: [2, 36], 69: [2, 36], 74: [2, 36], 75: [2, 36], 76: [2, 36], 77: [2, 36], 78: [2, 36], 79: [2, 36] }, { 21: [2, 40], 31: [2, 40], 52: [2, 40], 59: [2, 40], 62: [2, 40], 66: [2, 40], 69: [2, 40], 74: [2, 40], 75: [2, 40], 76: [2, 40], 77: [2, 40], 78: [2, 40], 79: [2, 40], 81: [1, 45] }, { 66: [1, 32], 80: 46 }, { 21: [2, 42], 31: [2, 42], 52: [2, 42], 59: [2, 42], 62: [2, 42], 66: [2, 42], 69: [2, 42], 74: [2, 42], 75: [2, 42], 76: [2, 42], 77: [2, 42], 78: [2, 42], 79: [2, 42], 81: [2, 42] }, { 50: 47, 52: [2, 77], 59: [2, 77], 66: [2, 77], 74: [2, 77], 75: [2, 77], 76: [2, 77], 77: [2, 77], 78: [2, 77], 79: [2, 77] }, { 23: 48, 36: 50, 37: [1, 52], 41: 51, 42: [1, 53], 43: 49, 45: [2, 49] }, { 26: 54, 41: 55, 42: [1, 53], 45: [2, 51] }, { 16: [1, 56] }, { 31: [2, 81], 55: 57, 59: [2, 81], 66: [2, 81], 74: [2, 81], 75: [2, 81], 76: [2, 81], 77: [2, 81], 78: [2, 81], 79: [2, 81] }, { 31: [2, 37], 59: [2, 37], 66: [2, 37], 74: [2, 37], 75: [2, 37], 76: [2, 37], 77: [2, 37], 78: [2, 37], 79: [2, 37] }, { 31: [2, 38], 59: [2, 38], 66: [2, 38], 74: [2, 38], 75: [2, 38], 76: [2, 38], 77: [2, 38], 78: [2, 38], 79: [2, 38] }, { 18: 58, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 28: 59, 31: [2, 53], 59: [2, 53], 66: [2, 53], 69: [2, 53], 74: [2, 53], 75: [2, 53], 76: [2, 53], 77: [2, 53], 78: [2, 53], 79: [2, 53] }, { 31: [2, 59], 33: 60, 59: [2, 59], 66: [2, 59], 69: [2, 59], 74: [2, 59], 75: [2, 59], 76: [2, 59], 77: [2, 59], 78: [2, 59], 79: [2, 59] }, { 19: 61, 21: [2, 45], 59: [2, 45], 66: [2, 45], 74: [2, 45], 75: [2, 45], 76: [2, 45], 77: [2, 45], 78: [2, 45], 79: [2, 45] }, { 18: 65, 31: [2, 75], 48: 62, 57: 63, 58: 66, 59: [1, 40], 63: 64, 64: 67, 65: 68, 66: [1, 69], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 66: [1, 70] }, { 21: [2, 39], 31: [2, 39], 52: [2, 39], 59: [2, 39], 62: [2, 39], 66: [2, 39], 69: [2, 39], 74: [2, 39], 75: [2, 39], 76: [2, 39], 77: [2, 39], 78: [2, 39], 79: [2, 39], 81: [1, 45] }, { 18: 65, 51: 71, 52: [2, 79], 57: 72, 58: 66, 59: [1, 40], 63: 73, 64: 67, 65: 68, 66: [1, 69], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 24: 74, 45: [1, 75] }, { 45: [2, 50] }, { 4: 76, 6: 3, 13: [2, 43], 14: [2, 43], 17: [2, 43], 27: [2, 43], 32: [2, 43], 37: [2, 43], 42: [2, 43], 45: [2, 43], 46: [2, 43], 49: [2, 43], 53: [2, 43] }, { 45: [2, 19] }, { 18: 77, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 4: 78, 6: 3, 13: [2, 43], 14: [2, 43], 17: [2, 43], 27: [2, 43], 32: [2, 43], 45: [2, 43], 46: [2, 43], 49: [2, 43], 53: [2, 43] }, { 24: 79, 45: [1, 75] }, { 45: [2, 52] }, { 5: [2, 10], 13: [2, 10], 14: [2, 10], 17: [2, 10], 27: [2, 10], 32: [2, 10], 37: [2, 10], 42: [2, 10], 45: [2, 10], 46: [2, 10], 49: [2, 10], 53: [2, 10] }, { 18: 65, 31: [2, 83], 56: 80, 57: 81, 58: 66, 59: [1, 40], 63: 82, 64: 67, 65: 68, 66: [1, 69], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 59: [2, 85], 60: 83, 62: [2, 85], 66: [2, 85], 74: [2, 85], 75: [2, 85], 76: [2, 85], 77: [2, 85], 78: [2, 85], 79: [2, 85] }, { 18: 65, 29: 84, 31: [2, 55], 57: 85, 58: 66, 59: [1, 40], 63: 86, 64: 67, 65: 68, 66: [1, 69], 69: [2, 55], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 18: 65, 31: [2, 61], 34: 87, 57: 88, 58: 66, 59: [1, 40], 63: 89, 64: 67, 65: 68, 66: [1, 69], 69: [2, 61], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 18: 65, 20: 90, 21: [2, 47], 57: 91, 58: 66, 59: [1, 40], 63: 92, 64: 67, 65: 68, 66: [1, 69], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 31: [1, 93] }, { 31: [2, 74], 59: [2, 74], 66: [2, 74], 74: [2, 74], 75: [2, 74], 76: [2, 74], 77: [2, 74], 78: [2, 74], 79: [2, 74] }, { 31: [2, 76] }, { 21: [2, 24], 31: [2, 24], 52: [2, 24], 59: [2, 24], 62: [2, 24], 66: [2, 24], 69: [2, 24], 74: [2, 24], 75: [2, 24], 76: [2, 24], 77: [2, 24], 78: [2, 24], 79: [2, 24] }, { 21: [2, 25], 31: [2, 25], 52: [2, 25], 59: [2, 25], 62: [2, 25], 66: [2, 25], 69: [2, 25], 74: [2, 25], 75: [2, 25], 76: [2, 25], 77: [2, 25], 78: [2, 25], 79: [2, 25] }, { 21: [2, 27], 31: [2, 27], 52: [2, 27], 62: [2, 27], 65: 94, 66: [1, 95], 69: [2, 27] }, { 21: [2, 89], 31: [2, 89], 52: [2, 89], 62: [2, 89], 66: [2, 89], 69: [2, 89] }, { 21: [2, 42], 31: [2, 42], 52: [2, 42], 59: [2, 42], 62: [2, 42], 66: [2, 42], 67: [1, 96], 69: [2, 42], 74: [2, 42], 75: [2, 42], 76: [2, 42], 77: [2, 42], 78: [2, 42], 79: [2, 42], 81: [2, 42] }, { 21: [2, 41], 31: [2, 41], 52: [2, 41], 59: [2, 41], 62: [2, 41], 66: [2, 41], 69: [2, 41], 74: [2, 41], 75: [2, 41], 76: [2, 41], 77: [2, 41], 78: [2, 41], 79: [2, 41], 81: [2, 41] }, { 52: [1, 97] }, { 52: [2, 78], 59: [2, 78], 66: [2, 78], 74: [2, 78], 75: [2, 78], 76: [2, 78], 77: [2, 78], 78: [2, 78], 79: [2, 78] }, { 52: [2, 80] }, { 5: [2, 12], 13: [2, 12], 14: [2, 12], 17: [2, 12], 27: [2, 12], 32: [2, 12], 37: [2, 12], 42: [2, 12], 45: [2, 12], 46: [2, 12], 49: [2, 12], 53: [2, 12] }, { 18: 98, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 36: 50, 37: [1, 52], 41: 51, 42: [1, 53], 43: 100, 44: 99, 45: [2, 71] }, { 31: [2, 65], 38: 101, 59: [2, 65], 66: [2, 65], 69: [2, 65], 74: [2, 65], 75: [2, 65], 76: [2, 65], 77: [2, 65], 78: [2, 65], 79: [2, 65] }, { 45: [2, 17] }, { 5: [2, 13], 13: [2, 13], 14: [2, 13], 17: [2, 13], 27: [2, 13], 32: [2, 13], 37: [2, 13], 42: [2, 13], 45: [2, 13], 46: [2, 13], 49: [2, 13], 53: [2, 13] }, { 31: [1, 102] }, { 31: [2, 82], 59: [2, 82], 66: [2, 82], 74: [2, 82], 75: [2, 82], 76: [2, 82], 77: [2, 82], 78: [2, 82], 79: [2, 82] }, { 31: [2, 84] }, { 18: 65, 57: 104, 58: 66, 59: [1, 40], 61: 103, 62: [2, 87], 63: 105, 64: 67, 65: 68, 66: [1, 69], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 30: 106, 31: [2, 57], 68: 107, 69: [1, 108] }, { 31: [2, 54], 59: [2, 54], 66: [2, 54], 69: [2, 54], 74: [2, 54], 75: [2, 54], 76: [2, 54], 77: [2, 54], 78: [2, 54], 79: [2, 54] }, { 31: [2, 56], 69: [2, 56] }, { 31: [2, 63], 35: 109, 68: 110, 69: [1, 108] }, { 31: [2, 60], 59: [2, 60], 66: [2, 60], 69: [2, 60], 74: [2, 60], 75: [2, 60], 76: [2, 60], 77: [2, 60], 78: [2, 60], 79: [2, 60] }, { 31: [2, 62], 69: [2, 62] }, { 21: [1, 111] }, { 21: [2, 46], 59: [2, 46], 66: [2, 46], 74: [2, 46], 75: [2, 46], 76: [2, 46], 77: [2, 46], 78: [2, 46], 79: [2, 46] }, { 21: [2, 48] }, { 5: [2, 21], 13: [2, 21], 14: [2, 21], 17: [2, 21], 27: [2, 21], 32: [2, 21], 37: [2, 21], 42: [2, 21], 45: [2, 21], 46: [2, 21], 49: [2, 21], 53: [2, 21] }, { 21: [2, 90], 31: [2, 90], 52: [2, 90], 62: [2, 90], 66: [2, 90], 69: [2, 90] }, { 67: [1, 96] }, { 18: 65, 57: 112, 58: 66, 59: [1, 40], 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 5: [2, 22], 13: [2, 22], 14: [2, 22], 17: [2, 22], 27: [2, 22], 32: [2, 22], 37: [2, 22], 42: [2, 22], 45: [2, 22], 46: [2, 22], 49: [2, 22], 53: [2, 22] }, { 31: [1, 113] }, { 45: [2, 18] }, { 45: [2, 72] }, { 18: 65, 31: [2, 67], 39: 114, 57: 115, 58: 66, 59: [1, 40], 63: 116, 64: 67, 65: 68, 66: [1, 69], 69: [2, 67], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 5: [2, 23], 13: [2, 23], 14: [2, 23], 17: [2, 23], 27: [2, 23], 32: [2, 23], 37: [2, 23], 42: [2, 23], 45: [2, 23], 46: [2, 23], 49: [2, 23], 53: [2, 23] }, { 62: [1, 117] }, { 59: [2, 86], 62: [2, 86], 66: [2, 86], 74: [2, 86], 75: [2, 86], 76: [2, 86], 77: [2, 86], 78: [2, 86], 79: [2, 86] }, { 62: [2, 88] }, { 31: [1, 118] }, { 31: [2, 58] }, { 66: [1, 120], 70: 119 }, { 31: [1, 121] }, { 31: [2, 64] }, { 14: [2, 11] }, { 21: [2, 28], 31: [2, 28], 52: [2, 28], 62: [2, 28], 66: [2, 28], 69: [2, 28] }, { 5: [2, 20], 13: [2, 20], 14: [2, 20], 17: [2, 20], 27: [2, 20], 32: [2, 20], 37: [2, 20], 42: [2, 20], 45: [2, 20], 46: [2, 20], 49: [2, 20], 53: [2, 20] }, { 31: [2, 69], 40: 122, 68: 123, 69: [1, 108] }, { 31: [2, 66], 59: [2, 66], 66: [2, 66], 69: [2, 66], 74: [2, 66], 75: [2, 66], 76: [2, 66], 77: [2, 66], 78: [2, 66], 79: [2, 66] }, { 31: [2, 68], 69: [2, 68] }, { 21: [2, 26], 31: [2, 26], 52: [2, 26], 59: [2, 26], 62: [2, 26], 66: [2, 26], 69: [2, 26], 74: [2, 26], 75: [2, 26], 76: [2, 26], 77: [2, 26], 78: [2, 26], 79: [2, 26] }, { 13: [2, 14], 14: [2, 14], 17: [2, 14], 27: [2, 14], 32: [2, 14], 37: [2, 14], 42: [2, 14], 45: [2, 14], 46: [2, 14], 49: [2, 14], 53: [2, 14] }, { 66: [1, 125], 71: [1, 124] }, { 66: [2, 91], 71: [2, 91] }, { 13: [2, 15], 14: [2, 15], 17: [2, 15], 27: [2, 15], 32: [2, 15], 42: [2, 15], 45: [2, 15], 46: [2, 15], 49: [2, 15], 53: [2, 15] }, { 31: [1, 126] }, { 31: [2, 70] }, { 31: [2, 29] }, { 66: [2, 92], 71: [2, 92] }, { 13: [2, 16], 14: [2, 16], 17: [2, 16], 27: [2, 16], 32: [2, 16], 37: [2, 16], 42: [2, 16], 45: [2, 16], 46: [2, 16], 49: [2, 16], 53: [2, 16] }], - defaultActions: { 4: [2, 1], 49: [2, 50], 51: [2, 19], 55: [2, 52], 64: [2, 76], 73: [2, 80], 78: [2, 17], 82: [2, 84], 92: [2, 48], 99: [2, 18], 100: [2, 72], 105: [2, 88], 107: [2, 58], 110: [2, 64], 111: [2, 11], 123: [2, 70], 124: [2, 29] }, - parseError: function parseError(str, hash) { - throw new Error(str); - }, - parse: function parse(input) { - var self = this, - stack = [0], - vstack = [null], - lstack = [], - table = this.table, - yytext = "", - yylineno = 0, - yyleng = 0, - recovering = 0, - TERROR = 2, - EOF = 1; - this.lexer.setInput(input); - this.lexer.yy = this.yy; - this.yy.lexer = this.lexer; - this.yy.parser = this; - if (typeof this.lexer.yylloc == "undefined") this.lexer.yylloc = {}; - var yyloc = this.lexer.yylloc; - lstack.push(yyloc); - var ranges = this.lexer.options && this.lexer.options.ranges; - if (typeof this.yy.parseError === "function") this.parseError = this.yy.parseError; - function popStack(n) { - stack.length = stack.length - 2 * n; - vstack.length = vstack.length - n; - lstack.length = lstack.length - n; - } - function lex() { - var token; - token = self.lexer.lex() || 1; - if (typeof token !== "number") { - token = self.symbols_[token] || token; - } - return token; - } - var symbol, - preErrorSymbol, - state, - action, - a, - r, - yyval = {}, - p, - len, - newState, - expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - if (!recovering) { - expected = []; - for (p in table[state]) if (this.terminals_[p] && p > 2) { - expected.push("'" + this.terminals_[p] + "'"); - } - if (this.lexer.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1 ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected }); - } - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(this.lexer.yytext); - lstack.push(this.lexer.yylloc); - stack.push(action[1]); - symbol = null; - if (!preErrorSymbol) { - yyleng = this.lexer.yyleng; - yytext = this.lexer.yytext; - yylineno = this.lexer.yylineno; - yyloc = this.lexer.yylloc; - if (recovering > 0) recovering--; - } else { - symbol = preErrorSymbol; - preErrorSymbol = null; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column }; - if (ranges) { - yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]]; - } - r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; - } - }; - /* Jison generated lexer */ - var lexer = (function () { - var lexer = { EOF: 1, - parseError: function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - setInput: function setInput(input) { - this._input = input; - this._more = this._less = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ""; - this.conditionStack = ["INITIAL"]; - this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 }; - if (this.options.ranges) this.yylloc.range = [0, 0]; - this.offset = 0; - return this; - }, - input: function input() { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) this.yylloc.range[1]++; - - this._input = this._input.slice(1); - return ch; - }, - unput: function unput(ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len - 1); - //this.yyleng -= len; - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - - if (lines.length - 1) this.yylineno -= lines.length - 1; - var r = this.yylloc.range; - - this.yylloc = { first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len - }; - - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - return this; - }, - more: function more() { - this._more = true; - return this; - }, - less: function less(n) { - this.unput(this.match.slice(n)); - }, - pastInput: function pastInput() { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); - }, - upcomingInput: function upcomingInput() { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20 - next.length); - } - return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); - }, - showPosition: function showPosition() { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - next: function next() { - if (this.done) { - return this.EOF; - } - if (!this._input) this.done = true; - - var token, match, tempMatch, index, col, lines; - if (!this._more) { - this.yytext = ""; - this.match = ""; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (!this.options.flex) break; - } - } - if (match) { - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) this.yylineno += lines.length; - this.yylloc = { first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) this.done = false; - if (token) { - return token; - } else { - return; - } - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { text: "", token: null, line: this.yylineno }); - } - }, - lex: function lex() { - var r = this.next(); - if (typeof r !== "undefined") { - return r; - } else { - return this.lex(); - } - }, - begin: function begin(condition) { - this.conditionStack.push(condition); - }, - popState: function popState() { - return this.conditionStack.pop(); - }, - _currentRules: function _currentRules() { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - }, - topState: function topState() { - return this.conditionStack[this.conditionStack.length - 2]; - }, - pushState: function begin(condition) { - this.begin(condition); - } }; - lexer.options = {}; - lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { - - function strip(start, end) { - return yy_.yytext = yy_.yytext.substr(start, yy_.yyleng - end); - } - - var YYSTATE = YY_START; - switch ($avoiding_name_collisions) { - case 0: - if (yy_.yytext.slice(-2) === "\\\\") { - strip(0, 1); - this.begin("mu"); - } else if (yy_.yytext.slice(-1) === "\\") { - strip(0, 1); - this.begin("emu"); - } else { - this.begin("mu"); - } - if (yy_.yytext) { - return 14; - }break; - case 1: - return 14; - break; - case 2: - this.popState(); - return 14; - - break; - case 3: - yy_.yytext = yy_.yytext.substr(5, yy_.yyleng - 9); - this.popState(); - return 16; - - break; - case 4: - return 14; - break; - case 5: - this.popState(); - return 13; - - break; - case 6: - return 59; - break; - case 7: - return 62; - break; - case 8: - return 17; - break; - case 9: - this.popState(); - this.begin("raw"); - return 21; - - break; - case 10: - return 53; - break; - case 11: - return 27; - break; - case 12: - return 45; - break; - case 13: - this.popState();return 42; - break; - case 14: - this.popState();return 42; - break; - case 15: - return 32; - break; - case 16: - return 37; - break; - case 17: - return 49; - break; - case 18: - return 46; - break; - case 19: - this.unput(yy_.yytext); - this.popState(); - this.begin("com"); - - break; - case 20: - this.popState(); - return 13; - - break; - case 21: - return 46; - break; - case 22: - return 67; - break; - case 23: - return 66; - break; - case 24: - return 66; - break; - case 25: - return 81; - break; - case 26: - // ignore whitespace - break; - case 27: - this.popState();return 52; - break; - case 28: - this.popState();return 31; - break; - case 29: - yy_.yytext = strip(1, 2).replace(/\\"/g, "\"");return 74; - break; - case 30: - yy_.yytext = strip(1, 2).replace(/\\'/g, "'");return 74; - break; - case 31: - return 79; - break; - case 32: - return 76; - break; - case 33: - return 76; - break; - case 34: - return 77; - break; - case 35: - return 78; - break; - case 36: - return 75; - break; - case 37: - return 69; - break; - case 38: - return 71; - break; - case 39: - return 66; - break; - case 40: - return 66; - break; - case 41: - return "INVALID"; - break; - case 42: - return 5; - break; - } - }; - lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]*?(?=(\{\{\{\{\/)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[[^\]]*\])/, /^(?:.)/, /^(?:$)/]; - lexer.conditions = { mu: { rules: [6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42], inclusive: false }, emu: { rules: [2], inclusive: false }, com: { rules: [5], inclusive: false }, raw: { rules: [3, 4], inclusive: false }, INITIAL: { rules: [0, 1, 42], inclusive: true } }; - return lexer; - })(); - parser.lexer = lexer; - function Parser() { - this.yy = {}; - }Parser.prototype = parser;parser.Parser = Parser; - return new Parser(); - })();module.exports = handlebars; -}); \ No newline at end of file diff --git a/node_modules/handlebars/dist/amd/handlebars/compiler/printer.js b/node_modules/handlebars/dist/amd/handlebars/compiler/printer.js deleted file mode 100644 index 6b4c230..0000000 --- a/node_modules/handlebars/dist/amd/handlebars/compiler/printer.js +++ /dev/null @@ -1,165 +0,0 @@ -define(['exports', './visitor'], function (exports, _visitor) { - 'use strict'; - - var _interopRequire = function (obj) { return obj && obj.__esModule ? obj['default'] : obj; }; - - exports.__esModule = true; - exports.print = print; - exports.PrintVisitor = PrintVisitor; - /*eslint-disable new-cap */ - - var _Visitor = _interopRequire(_visitor); - - function print(ast) { - return new PrintVisitor().accept(ast); - } - - function PrintVisitor() { - this.padding = 0; - } - - PrintVisitor.prototype = new _Visitor(); - - PrintVisitor.prototype.pad = function (string) { - var out = ''; - - for (var i = 0, l = this.padding; i < l; i++) { - out = out + ' '; - } - - out = out + string + '\n'; - return out; - }; - - PrintVisitor.prototype.Program = function (program) { - var out = '', - body = program.body, - i = undefined, - l = undefined; - - if (program.blockParams) { - var blockParams = 'BLOCK PARAMS: ['; - for (i = 0, l = program.blockParams.length; i < l; i++) { - blockParams += ' ' + program.blockParams[i]; - } - blockParams += ' ]'; - out += this.pad(blockParams); - } - - for (i = 0, l = body.length; i < l; i++) { - out = out + this.accept(body[i]); - } - - this.padding--; - - return out; - }; - - PrintVisitor.prototype.MustacheStatement = function (mustache) { - return this.pad('{{ ' + this.SubExpression(mustache) + ' }}'); - }; - - PrintVisitor.prototype.BlockStatement = function (block) { - var out = ''; - - out = out + this.pad('BLOCK:'); - this.padding++; - out = out + this.pad(this.SubExpression(block)); - if (block.program) { - out = out + this.pad('PROGRAM:'); - this.padding++; - out = out + this.accept(block.program); - this.padding--; - } - if (block.inverse) { - if (block.program) { - this.padding++; - } - out = out + this.pad('{{^}}'); - this.padding++; - out = out + this.accept(block.inverse); - this.padding--; - if (block.program) { - this.padding--; - } - } - this.padding--; - - return out; - }; - - PrintVisitor.prototype.PartialStatement = function (partial) { - var content = 'PARTIAL:' + partial.name.original; - if (partial.params[0]) { - content += ' ' + this.accept(partial.params[0]); - } - if (partial.hash) { - content += ' ' + this.accept(partial.hash); - } - return this.pad('{{> ' + content + ' }}'); - }; - - PrintVisitor.prototype.ContentStatement = function (content) { - return this.pad('CONTENT[ \'' + content.value + '\' ]'); - }; - - PrintVisitor.prototype.CommentStatement = function (comment) { - return this.pad('{{! \'' + comment.value + '\' }}'); - }; - - PrintVisitor.prototype.SubExpression = function (sexpr) { - var params = sexpr.params, - paramStrings = [], - hash = undefined; - - for (var i = 0, l = params.length; i < l; i++) { - paramStrings.push(this.accept(params[i])); - } - - params = '[' + paramStrings.join(', ') + ']'; - - hash = sexpr.hash ? ' ' + this.accept(sexpr.hash) : ''; - - return this.accept(sexpr.path) + ' ' + params + hash; - }; - - PrintVisitor.prototype.PathExpression = function (id) { - var path = id.parts.join('/'); - return (id.data ? '@' : '') + 'PATH:' + path; - }; - - PrintVisitor.prototype.StringLiteral = function (string) { - return '"' + string.value + '"'; - }; - - PrintVisitor.prototype.NumberLiteral = function (number) { - return 'NUMBER{' + number.value + '}'; - }; - - PrintVisitor.prototype.BooleanLiteral = function (bool) { - return 'BOOLEAN{' + bool.value + '}'; - }; - - PrintVisitor.prototype.UndefinedLiteral = function () { - return 'UNDEFINED'; - }; - - PrintVisitor.prototype.NullLiteral = function () { - return 'NULL'; - }; - - PrintVisitor.prototype.Hash = function (hash) { - var pairs = hash.pairs, - joinedPairs = []; - - for (var i = 0, l = pairs.length; i < l; i++) { - joinedPairs.push(this.accept(pairs[i])); - } - - return 'HASH{' + joinedPairs.join(', ') + '}'; - }; - PrintVisitor.prototype.HashPair = function (pair) { - return pair.key + '=' + this.accept(pair.value); - }; - /*eslint-enable new-cap */ -}); \ No newline at end of file diff --git a/node_modules/handlebars/dist/amd/handlebars/compiler/visitor.js b/node_modules/handlebars/dist/amd/handlebars/compiler/visitor.js deleted file mode 100644 index c86bd51..0000000 --- a/node_modules/handlebars/dist/amd/handlebars/compiler/visitor.js +++ /dev/null @@ -1,127 +0,0 @@ -define(['exports', 'module', '../exception', './ast'], function (exports, module, _exception, _ast) { - 'use strict'; - - var _interopRequire = function (obj) { return obj && obj.__esModule ? obj['default'] : obj; }; - - var _Exception = _interopRequire(_exception); - - var _AST = _interopRequire(_ast); - - function Visitor() { - this.parents = []; - } - - Visitor.prototype = { - constructor: Visitor, - mutating: false, - - // Visits a given value. If mutating, will replace the value if necessary. - acceptKey: function acceptKey(node, name) { - var value = this.accept(node[name]); - if (this.mutating) { - // Hacky sanity check: - if (value && (!value.type || !_AST[value.type])) { - throw new _Exception('Unexpected node type "' + value.type + '" found when accepting ' + name + ' on ' + node.type); - } - node[name] = value; - } - }, - - // Performs an accept operation with added sanity check to ensure - // required keys are not removed. - acceptRequired: function acceptRequired(node, name) { - this.acceptKey(node, name); - - if (!node[name]) { - throw new _Exception(node.type + ' requires ' + name); - } - }, - - // Traverses a given array. If mutating, empty respnses will be removed - // for child elements. - acceptArray: function acceptArray(array) { - for (var i = 0, l = array.length; i < l; i++) { - this.acceptKey(array, i); - - if (!array[i]) { - array.splice(i, 1); - i--; - l--; - } - } - }, - - accept: function accept(object) { - if (!object) { - return; - } - - if (this.current) { - this.parents.unshift(this.current); - } - this.current = object; - - var ret = this[object.type](object); - - this.current = this.parents.shift(); - - if (!this.mutating || ret) { - return ret; - } else if (ret !== false) { - return object; - } - }, - - Program: function Program(program) { - this.acceptArray(program.body); - }, - - MustacheStatement: function MustacheStatement(mustache) { - this.acceptRequired(mustache, 'path'); - this.acceptArray(mustache.params); - this.acceptKey(mustache, 'hash'); - }, - - BlockStatement: function BlockStatement(block) { - this.acceptRequired(block, 'path'); - this.acceptArray(block.params); - this.acceptKey(block, 'hash'); - - this.acceptKey(block, 'program'); - this.acceptKey(block, 'inverse'); - }, - - PartialStatement: function PartialStatement(partial) { - this.acceptRequired(partial, 'name'); - this.acceptArray(partial.params); - this.acceptKey(partial, 'hash'); - }, - - ContentStatement: function ContentStatement() {}, - CommentStatement: function CommentStatement() {}, - - SubExpression: function SubExpression(sexpr) { - this.acceptRequired(sexpr, 'path'); - this.acceptArray(sexpr.params); - this.acceptKey(sexpr, 'hash'); - }, - - PathExpression: function PathExpression() {}, - - StringLiteral: function StringLiteral() {}, - NumberLiteral: function NumberLiteral() {}, - BooleanLiteral: function BooleanLiteral() {}, - UndefinedLiteral: function UndefinedLiteral() {}, - NullLiteral: function NullLiteral() {}, - - Hash: function Hash(hash) { - this.acceptArray(hash.pairs); - }, - HashPair: function HashPair(pair) { - this.acceptRequired(pair, 'value'); - } - }; - - module.exports = Visitor; -}); -/* content */ /* comment */ /* path */ /* string */ /* number */ /* bool */ /* literal */ /* literal */ \ No newline at end of file diff --git a/node_modules/handlebars/dist/amd/handlebars/compiler/whitespace-control.js b/node_modules/handlebars/dist/amd/handlebars/compiler/whitespace-control.js deleted file mode 100644 index 9f1d30f..0000000 --- a/node_modules/handlebars/dist/amd/handlebars/compiler/whitespace-control.js +++ /dev/null @@ -1,209 +0,0 @@ -define(['exports', 'module', './visitor'], function (exports, module, _visitor) { - 'use strict'; - - var _interopRequire = function (obj) { return obj && obj.__esModule ? obj['default'] : obj; }; - - var _Visitor = _interopRequire(_visitor); - - function WhitespaceControl() {} - WhitespaceControl.prototype = new _Visitor(); - - WhitespaceControl.prototype.Program = function (program) { - var isRoot = !this.isRootSeen; - this.isRootSeen = true; - - var body = program.body; - for (var i = 0, l = body.length; i < l; i++) { - var current = body[i], - strip = this.accept(current); - - if (!strip) { - continue; - } - - var _isPrevWhitespace = isPrevWhitespace(body, i, isRoot), - _isNextWhitespace = isNextWhitespace(body, i, isRoot), - openStandalone = strip.openStandalone && _isPrevWhitespace, - closeStandalone = strip.closeStandalone && _isNextWhitespace, - inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace; - - if (strip.close) { - omitRight(body, i, true); - } - if (strip.open) { - omitLeft(body, i, true); - } - - if (inlineStandalone) { - omitRight(body, i); - - if (omitLeft(body, i)) { - // If we are on a standalone node, save the indent info for partials - if (current.type === 'PartialStatement') { - // Pull out the whitespace from the final line - current.indent = /([ \t]+$)/.exec(body[i - 1].original)[1]; - } - } - } - if (openStandalone) { - omitRight((current.program || current.inverse).body); - - // Strip out the previous content node if it's whitespace only - omitLeft(body, i); - } - if (closeStandalone) { - // Always strip the next node - omitRight(body, i); - - omitLeft((current.inverse || current.program).body); - } - } - - return program; - }; - WhitespaceControl.prototype.BlockStatement = function (block) { - this.accept(block.program); - this.accept(block.inverse); - - // Find the inverse program that is involed with whitespace stripping. - var program = block.program || block.inverse, - inverse = block.program && block.inverse, - firstInverse = inverse, - lastInverse = inverse; - - if (inverse && inverse.chained) { - firstInverse = inverse.body[0].program; - - // Walk the inverse chain to find the last inverse that is actually in the chain. - while (lastInverse.chained) { - lastInverse = lastInverse.body[lastInverse.body.length - 1].program; - } - } - - var strip = { - open: block.openStrip.open, - close: block.closeStrip.close, - - // Determine the standalone candiacy. Basically flag our content as being possibly standalone - // so our parent can determine if we actually are standalone - openStandalone: isNextWhitespace(program.body), - closeStandalone: isPrevWhitespace((firstInverse || program).body) - }; - - if (block.openStrip.close) { - omitRight(program.body, null, true); - } - - if (inverse) { - var inverseStrip = block.inverseStrip; - - if (inverseStrip.open) { - omitLeft(program.body, null, true); - } - - if (inverseStrip.close) { - omitRight(firstInverse.body, null, true); - } - if (block.closeStrip.open) { - omitLeft(lastInverse.body, null, true); - } - - // Find standalone else statments - if (isPrevWhitespace(program.body) && isNextWhitespace(firstInverse.body)) { - omitLeft(program.body); - omitRight(firstInverse.body); - } - } else if (block.closeStrip.open) { - omitLeft(program.body, null, true); - } - - return strip; - }; - - WhitespaceControl.prototype.MustacheStatement = function (mustache) { - return mustache.strip; - }; - - WhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function (node) { - /* istanbul ignore next */ - var strip = node.strip || {}; - return { - inlineStandalone: true, - open: strip.open, - close: strip.close - }; - }; - - function isPrevWhitespace(body, i, isRoot) { - if (i === undefined) { - i = body.length; - } - - // Nodes that end with newlines are considered whitespace (but are special - // cased for strip operations) - var prev = body[i - 1], - sibling = body[i - 2]; - if (!prev) { - return isRoot; - } - - if (prev.type === 'ContentStatement') { - return (sibling || !isRoot ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(prev.original); - } - } - function isNextWhitespace(body, i, isRoot) { - if (i === undefined) { - i = -1; - } - - var next = body[i + 1], - sibling = body[i + 2]; - if (!next) { - return isRoot; - } - - if (next.type === 'ContentStatement') { - return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(next.original); - } - } - - // Marks the node to the right of the position as omitted. - // I.e. {{foo}}' ' will mark the ' ' node as omitted. - // - // If i is undefined, then the first child will be marked as such. - // - // If mulitple is truthy then all whitespace will be stripped out until non-whitespace - // content is met. - function omitRight(body, i, multiple) { - var current = body[i == null ? 0 : i + 1]; - if (!current || current.type !== 'ContentStatement' || !multiple && current.rightStripped) { - return; - } - - var original = current.value; - current.value = current.value.replace(multiple ? /^\s+/ : /^[ \t]*\r?\n?/, ''); - current.rightStripped = current.value !== original; - } - - // Marks the node to the left of the position as omitted. - // I.e. ' '{{foo}} will mark the ' ' node as omitted. - // - // If i is undefined then the last child will be marked as such. - // - // If mulitple is truthy then all whitespace will be stripped out until non-whitespace - // content is met. - function omitLeft(body, i, multiple) { - var current = body[i == null ? body.length - 1 : i - 1]; - if (!current || current.type !== 'ContentStatement' || !multiple && current.leftStripped) { - return; - } - - // We omit the last node if it's whitespace only and not preceeded by a non-content node. - var original = current.value; - current.value = current.value.replace(multiple ? /\s+$/ : /[ \t]+$/, ''); - current.leftStripped = current.value !== original; - return current.leftStripped; - } - - module.exports = WhitespaceControl; -}); \ No newline at end of file diff --git a/node_modules/handlebars/dist/amd/handlebars/exception.js b/node_modules/handlebars/dist/amd/handlebars/exception.js deleted file mode 100644 index a1ccecf..0000000 --- a/node_modules/handlebars/dist/amd/handlebars/exception.js +++ /dev/null @@ -1,37 +0,0 @@ -define(['exports', 'module'], function (exports, module) { - 'use strict'; - - var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack']; - - function Exception(message, node) { - var loc = node && node.loc, - line = undefined, - column = undefined; - if (loc) { - line = loc.start.line; - column = loc.start.column; - - message += ' - ' + line + ':' + column; - } - - var tmp = Error.prototype.constructor.call(this, message); - - // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. - for (var idx = 0; idx < errorProps.length; idx++) { - this[errorProps[idx]] = tmp[errorProps[idx]]; - } - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, Exception); - } - - if (loc) { - this.lineNumber = line; - this.column = column; - } - } - - Exception.prototype = new Error(); - - module.exports = Exception; -}); \ No newline at end of file diff --git a/node_modules/handlebars/dist/amd/handlebars/no-conflict.js b/node_modules/handlebars/dist/amd/handlebars/no-conflict.js deleted file mode 100644 index c7dda86..0000000 --- a/node_modules/handlebars/dist/amd/handlebars/no-conflict.js +++ /dev/null @@ -1,16 +0,0 @@ -define(['exports', 'module'], function (exports, module) { - /*global window */ - 'use strict'; - - module.exports = function (Handlebars) { - /* istanbul ignore next */ - var root = typeof global !== 'undefined' ? global : window, - $Handlebars = root.Handlebars; - /* istanbul ignore next */ - Handlebars.noConflict = function () { - if (root.Handlebars === Handlebars) { - root.Handlebars = $Handlebars; - } - }; - }; -}); \ No newline at end of file diff --git a/node_modules/handlebars/dist/amd/handlebars/runtime.js b/node_modules/handlebars/dist/amd/handlebars/runtime.js deleted file mode 100644 index e1186e4..0000000 --- a/node_modules/handlebars/dist/amd/handlebars/runtime.js +++ /dev/null @@ -1,226 +0,0 @@ -define(['exports', './utils', './exception', './base'], function (exports, _utils, _exception, _base) { - 'use strict'; - - var _interopRequire = function (obj) { return obj && obj.__esModule ? obj['default'] : obj; }; - - exports.__esModule = true; - exports.checkRevision = checkRevision; - - // TODO: Remove this line and break up compilePartial - - exports.template = template; - exports.wrapProgram = wrapProgram; - exports.resolvePartial = resolvePartial; - exports.invokePartial = invokePartial; - exports.noop = noop; - - var _Exception = _interopRequire(_exception); - - function checkRevision(compilerInfo) { - var compilerRevision = compilerInfo && compilerInfo[0] || 1, - currentRevision = _base.COMPILER_REVISION; - - if (compilerRevision !== currentRevision) { - if (compilerRevision < currentRevision) { - var runtimeVersions = _base.REVISION_CHANGES[currentRevision], - compilerVersions = _base.REVISION_CHANGES[compilerRevision]; - throw new _Exception('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').'); - } else { - // Use the embedded version info since the runtime doesn't know about this revision yet - throw new _Exception('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').'); - } - } - } - - function template(templateSpec, env) { - /* istanbul ignore next */ - if (!env) { - throw new _Exception('No environment passed to template'); - } - if (!templateSpec || !templateSpec.main) { - throw new _Exception('Unknown template object: ' + typeof templateSpec); - } - - // Note: Using env.VM references rather than local var references throughout this section to allow - // for external users to override these as psuedo-supported APIs. - env.VM.checkRevision(templateSpec.compiler); - - function invokePartialWrapper(partial, context, options) { - if (options.hash) { - context = _utils.extend({}, context, options.hash); - } - - partial = env.VM.resolvePartial.call(this, partial, context, options); - var result = env.VM.invokePartial.call(this, partial, context, options); - - if (result == null && env.compile) { - options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env); - result = options.partials[options.name](context, options); - } - if (result != null) { - if (options.indent) { - var lines = result.split('\n'); - for (var i = 0, l = lines.length; i < l; i++) { - if (!lines[i] && i + 1 === l) { - break; - } - - lines[i] = options.indent + lines[i]; - } - result = lines.join('\n'); - } - return result; - } else { - throw new _Exception('The partial ' + options.name + ' could not be compiled when running in runtime-only mode'); - } - } - - // Just add water - var container = { - strict: function strict(obj, name) { - if (!(name in obj)) { - throw new _Exception('"' + name + '" not defined in ' + obj); - } - return obj[name]; - }, - lookup: function lookup(depths, name) { - var len = depths.length; - for (var i = 0; i < len; i++) { - if (depths[i] && depths[i][name] != null) { - return depths[i][name]; - } - } - }, - lambda: function lambda(current, context) { - return typeof current === 'function' ? current.call(context) : current; - }, - - escapeExpression: _utils.escapeExpression, - invokePartial: invokePartialWrapper, - - fn: function fn(i) { - return templateSpec[i]; - }, - - programs: [], - program: function program(i, data, declaredBlockParams, blockParams, depths) { - var programWrapper = this.programs[i], - fn = this.fn(i); - if (data || depths || blockParams || declaredBlockParams) { - programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths); - } else if (!programWrapper) { - programWrapper = this.programs[i] = wrapProgram(this, i, fn); - } - return programWrapper; - }, - - data: function data(value, depth) { - while (value && depth--) { - value = value._parent; - } - return value; - }, - merge: function merge(param, common) { - var obj = param || common; - - if (param && common && param !== common) { - obj = _utils.extend({}, common, param); - } - - return obj; - }, - - noop: env.VM.noop, - compilerInfo: templateSpec.compiler - }; - - function ret(context) { - var options = arguments[1] === undefined ? {} : arguments[1]; - - var data = options.data; - - ret._setup(options); - if (!options.partial && templateSpec.useData) { - data = initData(context, data); - } - var depths = undefined, - blockParams = templateSpec.useBlockParams ? [] : undefined; - if (templateSpec.useDepths) { - depths = options.depths ? [context].concat(options.depths) : [context]; - } - - return templateSpec.main.call(container, context, container.helpers, container.partials, data, blockParams, depths); - } - ret.isTop = true; - - ret._setup = function (options) { - if (!options.partial) { - container.helpers = container.merge(options.helpers, env.helpers); - - if (templateSpec.usePartial) { - container.partials = container.merge(options.partials, env.partials); - } - } else { - container.helpers = options.helpers; - container.partials = options.partials; - } - }; - - ret._child = function (i, data, blockParams, depths) { - if (templateSpec.useBlockParams && !blockParams) { - throw new _Exception('must pass block params'); - } - if (templateSpec.useDepths && !depths) { - throw new _Exception('must pass parent depths'); - } - - return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths); - }; - return ret; - } - - function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) { - function prog(context) { - var options = arguments[1] === undefined ? {} : arguments[1]; - - return fn.call(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), depths && [context].concat(depths)); - } - prog.program = i; - prog.depth = depths ? depths.length : 0; - prog.blockParams = declaredBlockParams || 0; - return prog; - } - - function resolvePartial(partial, context, options) { - if (!partial) { - partial = options.partials[options.name]; - } else if (!partial.call && !options.name) { - // This is a dynamic partial that returned a string - options.name = partial; - partial = options.partials[partial]; - } - return partial; - } - - function invokePartial(partial, context, options) { - options.partial = true; - - if (partial === undefined) { - throw new _Exception('The partial ' + options.name + ' could not be found'); - } else if (partial instanceof Function) { - return partial(context, options); - } - } - - function noop() { - return ''; - } - - function initData(context, data) { - if (!data || !('root' in data)) { - data = data ? _base.createFrame(data) : {}; - data.root = context; - } - return data; - } -}); \ No newline at end of file diff --git a/node_modules/handlebars/dist/amd/handlebars/safe-string.js b/node_modules/handlebars/dist/amd/handlebars/safe-string.js deleted file mode 100644 index f2b3d53..0000000 --- a/node_modules/handlebars/dist/amd/handlebars/safe-string.js +++ /dev/null @@ -1,14 +0,0 @@ -define(['exports', 'module'], function (exports, module) { - // Build out our basic SafeString type - 'use strict'; - - function SafeString(string) { - this.string = string; - } - - SafeString.prototype.toString = SafeString.prototype.toHTML = function () { - return '' + this.string; - }; - - module.exports = SafeString; -}); \ No newline at end of file diff --git a/node_modules/handlebars/dist/amd/handlebars/utils.js b/node_modules/handlebars/dist/amd/handlebars/utils.js deleted file mode 100644 index e2d6fff..0000000 --- a/node_modules/handlebars/dist/amd/handlebars/utils.js +++ /dev/null @@ -1,116 +0,0 @@ -define(['exports'], function (exports) { - 'use strict'; - - exports.__esModule = true; - exports.extend = extend; - - // Older IE versions do not directly support indexOf so we must implement our own, sadly. - exports.indexOf = indexOf; - exports.escapeExpression = escapeExpression; - exports.isEmpty = isEmpty; - exports.blockParams = blockParams; - exports.appendContextPath = appendContextPath; - var escape = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - '\'': ''', - '`': '`' - }; - - var badChars = /[&<>"'`]/g, - possible = /[&<>"'`]/; - - function escapeChar(chr) { - return escape[chr]; - } - - function extend(obj /* , ...source */) { - for (var i = 1; i < arguments.length; i++) { - for (var key in arguments[i]) { - if (Object.prototype.hasOwnProperty.call(arguments[i], key)) { - obj[key] = arguments[i][key]; - } - } - } - - return obj; - } - - var toString = Object.prototype.toString; - - exports.toString = toString; - // Sourced from lodash - // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt - /*eslint-disable func-style, no-var */ - var isFunction = function isFunction(value) { - return typeof value === 'function'; - }; - // fallback for older versions of Chrome and Safari - /* istanbul ignore next */ - if (isFunction(/x/)) { - exports.isFunction = isFunction = function (value) { - return typeof value === 'function' && toString.call(value) === '[object Function]'; - }; - } - var isFunction; - exports.isFunction = isFunction; - /*eslint-enable func-style, no-var */ - - /* istanbul ignore next */ - var isArray = Array.isArray || function (value) { - return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false; - };exports.isArray = isArray; - - function indexOf(array, value) { - for (var i = 0, len = array.length; i < len; i++) { - if (array[i] === value) { - return i; - } - } - return -1; - } - - function escapeExpression(string) { - if (typeof string !== 'string') { - // don't escape SafeStrings, since they're already safe - if (string && string.toHTML) { - return string.toHTML(); - } else if (string == null) { - return ''; - } else if (!string) { - return string + ''; - } - - // Force a string conversion as this will be done by the append regardless and - // the regex test will do this transparently behind the scenes, causing issues if - // an object's to string has escaped characters in it. - string = '' + string; - } - - if (!possible.test(string)) { - return string; - } - return string.replace(badChars, escapeChar); - } - - function isEmpty(value) { - if (!value && value !== 0) { - return true; - } else if (isArray(value) && value.length === 0) { - return true; - } else { - return false; - } - } - - function blockParams(params, ids) { - params.path = ids; - return params; - } - - function appendContextPath(contextPath, id) { - return (contextPath ? contextPath + '.' : '') + id; - } -}); \ No newline at end of file diff --git a/node_modules/handlebars/dist/amd/precompiler.js b/node_modules/handlebars/dist/amd/precompiler.js deleted file mode 100644 index dc5aac8..0000000 --- a/node_modules/handlebars/dist/amd/precompiler.js +++ /dev/null @@ -1,184 +0,0 @@ -define(['exports', 'fs', './handlebars', 'path', 'source-map', 'uglify-js'], function (exports, _fs, _handlebars, _path, _sourceMap, _uglifyJs) { - 'use strict'; - - var _interopRequire = function (obj) { return obj && obj.__esModule ? obj['default'] : obj; }; - - /*eslint-disable no-console */ - - var _fs2 = _interopRequire(_fs); - - var _uglify = _interopRequire(_uglifyJs); - - module.exports.cli = function (opts) { - if (opts.version) { - console.log(_handlebars.VERSION); - return; - } - - if (!opts.templates.length) { - throw new _handlebars.Exception('Must define at least one template or directory.'); - } - - opts.templates.forEach(function (template) { - try { - _fs2.statSync(template); - } catch (err) { - throw new _handlebars.Exception('Unable to open template file "' + template + '"'); - } - }); - - if (opts.simple && opts.min) { - throw new _handlebars.Exception('Unable to minimize simple output'); - } - if (opts.simple && (opts.templates.length !== 1 || _fs2.statSync(opts.templates[0]).isDirectory())) { - throw new _handlebars.Exception('Unable to output multiple templates in simple mode'); - } - - // Convert the known list into a hash - var known = {}; - if (opts.known && !Array.isArray(opts.known)) { - opts.known = [opts.known]; - } - if (opts.known) { - for (var i = 0, len = opts.known.length; i < len; i++) { - known[opts.known[i]] = true; - } - } - - // Build file extension pattern - var extension = opts.extension.replace(/[\\^$*+?.():=!|{}\-\[\]]/g, function (arg) { - return '\\' + arg; - }); - extension = new RegExp('\\.' + extension + '$'); - - var output = new _sourceMap.SourceNode(); - if (!opts.simple) { - if (opts.amd) { - output.add('define([\'' + opts.handlebarPath + 'handlebars.runtime\'], function(Handlebars) {\n Handlebars = Handlebars["default"];'); - } else if (opts.commonjs) { - output.add('var Handlebars = require("' + opts.commonjs + '");'); - } else { - output.add('(function() {\n'); - } - output.add(' var template = Handlebars.template, templates = '); - if (opts.namespace) { - output.add(opts.namespace); - output.add(' = '); - output.add(opts.namespace); - output.add(' || '); - } - output.add('{};\n'); - } - function processTemplate(template, root) { - var path = template, - stat = _fs2.statSync(path); - if (stat.isDirectory()) { - _fs2.readdirSync(template).map(function (file) { - var childPath = template + '/' + file; - - if (extension.test(childPath) || _fs2.statSync(childPath).isDirectory()) { - processTemplate(childPath, root || template); - } - }); - } else { - var data = _fs2.readFileSync(path, 'utf8'); - - if (opts.bom && data.indexOf('') === 0) { - data = data.substring(1); - } - - var options = { - knownHelpers: known, - knownHelpersOnly: opts.o - }; - - if (opts.map) { - options.srcName = path; - } - if (opts.data) { - options.data = true; - } - - // Clean the template name - if (!root) { - template = _path.basename(template); - } else if (template.indexOf(root) === 0) { - template = template.substring(root.length + 1); - } - template = template.replace(extension, ''); - - var precompiled = _handlebars.precompile(data, options); - - // If we are generating a source map, we have to reconstruct the SourceNode object - if (opts.map) { - var consumer = new _sourceMap.SourceMapConsumer(precompiled.map); - precompiled = _sourceMap.SourceNode.fromStringWithSourceMap(precompiled.code, consumer); - } - - if (opts.simple) { - output.add([precompiled, '\n']); - } else if (opts.partial) { - if (opts.amd && (opts.templates.length == 1 && !_fs2.statSync(opts.templates[0]).isDirectory())) { - output.add('return '); - } - output.add(['Handlebars.partials[\'', template, '\'] = template(', precompiled, ');\n']); - } else { - if (opts.amd && (opts.templates.length == 1 && !_fs2.statSync(opts.templates[0]).isDirectory())) { - output.add('return '); - } - output.add(['templates[\'', template, '\'] = template(', precompiled, ');\n']); - } - } - } - - opts.templates.forEach(function (template) { - processTemplate(template, opts.root); - }); - - // Output the content - if (!opts.simple) { - if (opts.amd) { - if (opts.templates.length > 1 || opts.templates.length == 1 && _fs2.statSync(opts.templates[0]).isDirectory()) { - if (opts.partial) { - output.add('return Handlebars.partials;\n'); - } else { - output.add('return templates;\n'); - } - } - output.add('});'); - } else if (!opts.commonjs) { - output.add('})();'); - } - } - - if (opts.map) { - output.add('\n//# sourceMappingURL=' + opts.map + '\n'); - } - - output = output.toStringWithSourceMap(); - output.map = output.map + ''; - - if (opts.min) { - output = _uglify.minify(output.code, { - fromString: true, - - outSourceMap: opts.map, - inSourceMap: JSON.parse(output.map) - }); - if (opts.map) { - output.code += '\n//# sourceMappingURL=' + opts.map + '\n'; - } - } - - if (opts.map) { - _fs2.writeFileSync(opts.map, output.map, 'utf8'); - } - output = output.code; - - if (opts.output) { - _fs2.writeFileSync(opts.output, output, 'utf8'); - } else { - console.log(output); - } - }; -}); \ No newline at end of file diff --git a/node_modules/handlebars/dist/cjs/handlebars.js b/node_modules/handlebars/dist/cjs/handlebars.js deleted file mode 100644 index f294436..0000000 --- a/node_modules/handlebars/dist/cjs/handlebars.js +++ /dev/null @@ -1,63 +0,0 @@ -'use strict'; - -var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - -exports.__esModule = true; - -var _runtime = require('./handlebars.runtime'); - -var _runtime2 = _interopRequireWildcard(_runtime); - -// Compiler imports - -var _AST = require('./handlebars/compiler/ast'); - -var _AST2 = _interopRequireWildcard(_AST); - -var _Parser$parse = require('./handlebars/compiler/base'); - -var _Compiler$compile$precompile = require('./handlebars/compiler/compiler'); - -var _JavaScriptCompiler = require('./handlebars/compiler/javascript-compiler'); - -var _JavaScriptCompiler2 = _interopRequireWildcard(_JavaScriptCompiler); - -var _Visitor = require('./handlebars/compiler/visitor'); - -var _Visitor2 = _interopRequireWildcard(_Visitor); - -var _noConflict = require('./handlebars/no-conflict'); - -var _noConflict2 = _interopRequireWildcard(_noConflict); - -var _create = _runtime2['default'].create; -function create() { - var hb = _create(); - - hb.compile = function (input, options) { - return _Compiler$compile$precompile.compile(input, options, hb); - }; - hb.precompile = function (input, options) { - return _Compiler$compile$precompile.precompile(input, options, hb); - }; - - hb.AST = _AST2['default']; - hb.Compiler = _Compiler$compile$precompile.Compiler; - hb.JavaScriptCompiler = _JavaScriptCompiler2['default']; - hb.Parser = _Parser$parse.parser; - hb.parse = _Parser$parse.parse; - - return hb; -} - -var inst = create(); -inst.create = create; - -_noConflict2['default'](inst); - -inst.Visitor = _Visitor2['default']; - -inst['default'] = inst; - -exports['default'] = inst; -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/handlebars/dist/cjs/handlebars.runtime.js b/node_modules/handlebars/dist/cjs/handlebars.runtime.js deleted file mode 100644 index e52f2fd..0000000 --- a/node_modules/handlebars/dist/cjs/handlebars.runtime.js +++ /dev/null @@ -1,60 +0,0 @@ -'use strict'; - -var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - -exports.__esModule = true; - -var _import = require('./handlebars/base'); - -var base = _interopRequireWildcard(_import); - -// Each of these augment the Handlebars object. No need to setup here. -// (This is done to easily share code between commonjs and browse envs) - -var _SafeString = require('./handlebars/safe-string'); - -var _SafeString2 = _interopRequireWildcard(_SafeString); - -var _Exception = require('./handlebars/exception'); - -var _Exception2 = _interopRequireWildcard(_Exception); - -var _import2 = require('./handlebars/utils'); - -var Utils = _interopRequireWildcard(_import2); - -var _import3 = require('./handlebars/runtime'); - -var runtime = _interopRequireWildcard(_import3); - -var _noConflict = require('./handlebars/no-conflict'); - -var _noConflict2 = _interopRequireWildcard(_noConflict); - -// For compatibility and usage outside of module systems, make the Handlebars object a namespace -function create() { - var hb = new base.HandlebarsEnvironment(); - - Utils.extend(hb, base); - hb.SafeString = _SafeString2['default']; - hb.Exception = _Exception2['default']; - hb.Utils = Utils; - hb.escapeExpression = Utils.escapeExpression; - - hb.VM = runtime; - hb.template = function (spec) { - return runtime.template(spec, hb); - }; - - return hb; -} - -var inst = create(); -inst.create = create; - -_noConflict2['default'](inst); - -inst['default'] = inst; - -exports['default'] = inst; -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/handlebars/dist/cjs/handlebars/base.js b/node_modules/handlebars/dist/cjs/handlebars/base.js deleted file mode 100644 index c7c6a69..0000000 --- a/node_modules/handlebars/dist/cjs/handlebars/base.js +++ /dev/null @@ -1,273 +0,0 @@ -'use strict'; - -var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - -exports.__esModule = true; -exports.HandlebarsEnvironment = HandlebarsEnvironment; -exports.createFrame = createFrame; - -var _import = require('./utils'); - -var Utils = _interopRequireWildcard(_import); - -var _Exception = require('./exception'); - -var _Exception2 = _interopRequireWildcard(_Exception); - -var VERSION = '3.0.1'; -exports.VERSION = VERSION; -var COMPILER_REVISION = 6; - -exports.COMPILER_REVISION = COMPILER_REVISION; -var REVISION_CHANGES = { - 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it - 2: '== 1.0.0-rc.3', - 3: '== 1.0.0-rc.4', - 4: '== 1.x.x', - 5: '== 2.0.0-alpha.x', - 6: '>= 2.0.0-beta.1' -}; - -exports.REVISION_CHANGES = REVISION_CHANGES; -var isArray = Utils.isArray, - isFunction = Utils.isFunction, - toString = Utils.toString, - objectType = '[object Object]'; - -function HandlebarsEnvironment(helpers, partials) { - this.helpers = helpers || {}; - this.partials = partials || {}; - - registerDefaultHelpers(this); -} - -HandlebarsEnvironment.prototype = { - constructor: HandlebarsEnvironment, - - logger: logger, - log: log, - - registerHelper: function registerHelper(name, fn) { - if (toString.call(name) === objectType) { - if (fn) { - throw new _Exception2['default']('Arg not supported with multiple helpers'); - } - Utils.extend(this.helpers, name); - } else { - this.helpers[name] = fn; - } - }, - unregisterHelper: function unregisterHelper(name) { - delete this.helpers[name]; - }, - - registerPartial: function registerPartial(name, partial) { - if (toString.call(name) === objectType) { - Utils.extend(this.partials, name); - } else { - if (typeof partial === 'undefined') { - throw new _Exception2['default']('Attempting to register a partial as undefined'); - } - this.partials[name] = partial; - } - }, - unregisterPartial: function unregisterPartial(name) { - delete this.partials[name]; - } -}; - -function registerDefaultHelpers(instance) { - instance.registerHelper('helperMissing', function () { - if (arguments.length === 1) { - // A missing field in a {{foo}} constuct. - return undefined; - } else { - // Someone is actually trying to call something, blow up. - throw new _Exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"'); - } - }); - - instance.registerHelper('blockHelperMissing', function (context, options) { - var inverse = options.inverse, - fn = options.fn; - - if (context === true) { - return fn(this); - } else if (context === false || context == null) { - return inverse(this); - } else if (isArray(context)) { - if (context.length > 0) { - if (options.ids) { - options.ids = [options.name]; - } - - return instance.helpers.each(context, options); - } else { - return inverse(this); - } - } else { - if (options.data && options.ids) { - var data = createFrame(options.data); - data.contextPath = Utils.appendContextPath(options.data.contextPath, options.name); - options = { data: data }; - } - - return fn(context, options); - } - }); - - instance.registerHelper('each', function (context, options) { - if (!options) { - throw new _Exception2['default']('Must pass iterator to #each'); - } - - var fn = options.fn, - inverse = options.inverse, - i = 0, - ret = '', - data = undefined, - contextPath = undefined; - - if (options.data && options.ids) { - contextPath = Utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.'; - } - - if (isFunction(context)) { - context = context.call(this); - } - - if (options.data) { - data = createFrame(options.data); - } - - function execIteration(field, index, last) { - if (data) { - data.key = field; - data.index = index; - data.first = index === 0; - data.last = !!last; - - if (contextPath) { - data.contextPath = contextPath + field; - } - } - - ret = ret + fn(context[field], { - data: data, - blockParams: Utils.blockParams([context[field], field], [contextPath + field, null]) - }); - } - - if (context && typeof context === 'object') { - if (isArray(context)) { - for (var j = context.length; i < j; i++) { - execIteration(i, i, i === context.length - 1); - } - } else { - var priorKey = undefined; - - for (var key in context) { - if (context.hasOwnProperty(key)) { - // We're running the iterations one step out of sync so we can detect - // the last iteration without have to scan the object twice and create - // an itermediate keys array. - if (priorKey) { - execIteration(priorKey, i - 1); - } - priorKey = key; - i++; - } - } - if (priorKey) { - execIteration(priorKey, i - 1, true); - } - } - } - - if (i === 0) { - ret = inverse(this); - } - - return ret; - }); - - instance.registerHelper('if', function (conditional, options) { - if (isFunction(conditional)) { - conditional = conditional.call(this); - } - - // Default behavior is to render the positive path if the value is truthy and not empty. - // The `includeZero` option may be set to treat the condtional as purely not empty based on the - // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative. - if (!options.hash.includeZero && !conditional || Utils.isEmpty(conditional)) { - return options.inverse(this); - } else { - return options.fn(this); - } - }); - - instance.registerHelper('unless', function (conditional, options) { - return instance.helpers['if'].call(this, conditional, { fn: options.inverse, inverse: options.fn, hash: options.hash }); - }); - - instance.registerHelper('with', function (context, options) { - if (isFunction(context)) { - context = context.call(this); - } - - var fn = options.fn; - - if (!Utils.isEmpty(context)) { - if (options.data && options.ids) { - var data = createFrame(options.data); - data.contextPath = Utils.appendContextPath(options.data.contextPath, options.ids[0]); - options = { data: data }; - } - - return fn(context, options); - } else { - return options.inverse(this); - } - }); - - instance.registerHelper('log', function (message, options) { - var level = options.data && options.data.level != null ? parseInt(options.data.level, 10) : 1; - instance.log(level, message); - }); - - instance.registerHelper('lookup', function (obj, field) { - return obj && obj[field]; - }); -} - -var logger = { - methodMap: { 0: 'debug', 1: 'info', 2: 'warn', 3: 'error' }, - - // State enum - DEBUG: 0, - INFO: 1, - WARN: 2, - ERROR: 3, - level: 1, - - // Can be overridden in the host environment - log: function log(level, message) { - if (typeof console !== 'undefined' && logger.level <= level) { - var method = logger.methodMap[level]; - (console[method] || console.log).call(console, message); // eslint-disable-line no-console - } - } -}; - -exports.logger = logger; -var log = logger.log; - -exports.log = log; - -function createFrame(object) { - var frame = Utils.extend({}, object); - frame._parent = object; - return frame; -} - -/* [args, ]options */ \ No newline at end of file diff --git a/node_modules/handlebars/dist/cjs/handlebars/compiler/ast.js b/node_modules/handlebars/dist/cjs/handlebars/compiler/ast.js deleted file mode 100644 index 88b290a..0000000 --- a/node_modules/handlebars/dist/cjs/handlebars/compiler/ast.js +++ /dev/null @@ -1,152 +0,0 @@ -'use strict'; - -exports.__esModule = true; -var AST = { - Program: function Program(statements, blockParams, strip, locInfo) { - this.loc = locInfo; - this.type = 'Program'; - this.body = statements; - - this.blockParams = blockParams; - this.strip = strip; - }, - - MustacheStatement: function MustacheStatement(path, params, hash, escaped, strip, locInfo) { - this.loc = locInfo; - this.type = 'MustacheStatement'; - - this.path = path; - this.params = params || []; - this.hash = hash; - this.escaped = escaped; - - this.strip = strip; - }, - - BlockStatement: function BlockStatement(path, params, hash, program, inverse, openStrip, inverseStrip, closeStrip, locInfo) { - this.loc = locInfo; - this.type = 'BlockStatement'; - - this.path = path; - this.params = params || []; - this.hash = hash; - this.program = program; - this.inverse = inverse; - - this.openStrip = openStrip; - this.inverseStrip = inverseStrip; - this.closeStrip = closeStrip; - }, - - PartialStatement: function PartialStatement(name, params, hash, strip, locInfo) { - this.loc = locInfo; - this.type = 'PartialStatement'; - - this.name = name; - this.params = params || []; - this.hash = hash; - - this.indent = ''; - this.strip = strip; - }, - - ContentStatement: function ContentStatement(string, locInfo) { - this.loc = locInfo; - this.type = 'ContentStatement'; - this.original = this.value = string; - }, - - CommentStatement: function CommentStatement(comment, strip, locInfo) { - this.loc = locInfo; - this.type = 'CommentStatement'; - this.value = comment; - - this.strip = strip; - }, - - SubExpression: function SubExpression(path, params, hash, locInfo) { - this.loc = locInfo; - - this.type = 'SubExpression'; - this.path = path; - this.params = params || []; - this.hash = hash; - }, - - PathExpression: function PathExpression(data, depth, parts, original, locInfo) { - this.loc = locInfo; - this.type = 'PathExpression'; - - this.data = data; - this.original = original; - this.parts = parts; - this.depth = depth; - }, - - StringLiteral: function StringLiteral(string, locInfo) { - this.loc = locInfo; - this.type = 'StringLiteral'; - this.original = this.value = string; - }, - - NumberLiteral: function NumberLiteral(number, locInfo) { - this.loc = locInfo; - this.type = 'NumberLiteral'; - this.original = this.value = Number(number); - }, - - BooleanLiteral: function BooleanLiteral(bool, locInfo) { - this.loc = locInfo; - this.type = 'BooleanLiteral'; - this.original = this.value = bool === 'true'; - }, - - UndefinedLiteral: function UndefinedLiteral(locInfo) { - this.loc = locInfo; - this.type = 'UndefinedLiteral'; - this.original = this.value = undefined; - }, - - NullLiteral: function NullLiteral(locInfo) { - this.loc = locInfo; - this.type = 'NullLiteral'; - this.original = this.value = null; - }, - - Hash: function Hash(pairs, locInfo) { - this.loc = locInfo; - this.type = 'Hash'; - this.pairs = pairs; - }, - HashPair: function HashPair(key, value, locInfo) { - this.loc = locInfo; - this.type = 'HashPair'; - this.key = key; - this.value = value; - }, - - // Public API used to evaluate derived attributes regarding AST nodes - helpers: { - // a mustache is definitely a helper if: - // * it is an eligible helper, and - // * it has at least one parameter or hash segment - helperExpression: function helperExpression(node) { - return !!(node.type === 'SubExpression' || node.params.length || node.hash); - }, - - scopedId: function scopedId(path) { - return /^\.|this\b/.test(path.original); - }, - - // an ID is simple if it only has one part, and that part is not - // `..` or `this`. - simpleId: function simpleId(path) { - return path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth; - } - } -}; - -// Must be exported as an object rather than the root of the module as the jison lexer -// must modify the object to operate properly. -exports['default'] = AST; -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js b/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js deleted file mode 100644 index d4bafe0..0000000 --- a/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js +++ /dev/null @@ -1,46 +0,0 @@ -'use strict'; - -var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - -exports.__esModule = true; -exports.parse = parse; - -var _parser = require('./parser'); - -var _parser2 = _interopRequireWildcard(_parser); - -var _AST = require('./ast'); - -var _AST2 = _interopRequireWildcard(_AST); - -var _WhitespaceControl = require('./whitespace-control'); - -var _WhitespaceControl2 = _interopRequireWildcard(_WhitespaceControl); - -var _import = require('./helpers'); - -var Helpers = _interopRequireWildcard(_import); - -var _extend = require('../utils'); - -exports.parser = _parser2['default']; - -var yy = {}; -_extend.extend(yy, Helpers, _AST2['default']); - -function parse(input, options) { - // Just return if an already-compiled AST was passed in. - if (input.type === 'Program') { - return input; - } - - _parser2['default'].yy = yy; - - // Altering the shared object here, but this is ok as parser is a sync operation - yy.locInfo = function (locInfo) { - return new yy.SourceLocation(options && options.srcName, locInfo); - }; - - var strip = new _WhitespaceControl2['default'](); - return strip.accept(_parser2['default'].parse(input)); -} \ No newline at end of file diff --git a/node_modules/handlebars/dist/cjs/handlebars/compiler/code-gen.js b/node_modules/handlebars/dist/cjs/handlebars/compiler/code-gen.js deleted file mode 100644 index 8c48c8b..0000000 --- a/node_modules/handlebars/dist/cjs/handlebars/compiler/code-gen.js +++ /dev/null @@ -1,164 +0,0 @@ -'use strict'; - -exports.__esModule = true; -/*global define */ - -var _isArray = require('../utils'); - -var SourceNode = undefined; - -try { - /* istanbul ignore next */ - if (typeof define !== 'function' || !define.amd) { - // We don't support this in AMD environments. For these environments, we asusme that - // they are running on the browser and thus have no need for the source-map library. - var SourceMap = require('source-map'); - SourceNode = SourceMap.SourceNode; - } -} catch (err) {} - -/* istanbul ignore if: tested but not covered in istanbul due to dist build */ -if (!SourceNode) { - SourceNode = function (line, column, srcFile, chunks) { - this.src = ''; - if (chunks) { - this.add(chunks); - } - }; - /* istanbul ignore next */ - SourceNode.prototype = { - add: function add(chunks) { - if (_isArray.isArray(chunks)) { - chunks = chunks.join(''); - } - this.src += chunks; - }, - prepend: function prepend(chunks) { - if (_isArray.isArray(chunks)) { - chunks = chunks.join(''); - } - this.src = chunks + this.src; - }, - toStringWithSourceMap: function toStringWithSourceMap() { - return { code: this.toString() }; - }, - toString: function toString() { - return this.src; - } - }; -} - -function castChunk(chunk, codeGen, loc) { - if (_isArray.isArray(chunk)) { - var ret = []; - - for (var i = 0, len = chunk.length; i < len; i++) { - ret.push(codeGen.wrap(chunk[i], loc)); - } - return ret; - } else if (typeof chunk === 'boolean' || typeof chunk === 'number') { - // Handle primitives that the SourceNode will throw up on - return chunk + ''; - } - return chunk; -} - -function CodeGen(srcFile) { - this.srcFile = srcFile; - this.source = []; -} - -CodeGen.prototype = { - prepend: function prepend(source, loc) { - this.source.unshift(this.wrap(source, loc)); - }, - push: function push(source, loc) { - this.source.push(this.wrap(source, loc)); - }, - - merge: function merge() { - var source = this.empty(); - this.each(function (line) { - source.add([' ', line, '\n']); - }); - return source; - }, - - each: function each(iter) { - for (var i = 0, len = this.source.length; i < len; i++) { - iter(this.source[i]); - } - }, - - empty: function empty() { - var loc = arguments[0] === undefined ? this.currentLocation || { start: {} } : arguments[0]; - - return new SourceNode(loc.start.line, loc.start.column, this.srcFile); - }, - wrap: function wrap(chunk) { - var loc = arguments[1] === undefined ? this.currentLocation || { start: {} } : arguments[1]; - - if (chunk instanceof SourceNode) { - return chunk; - } - - chunk = castChunk(chunk, this, loc); - - return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk); - }, - - functionCall: function functionCall(fn, type, params) { - params = this.generateList(params); - return this.wrap([fn, type ? '.' + type + '(' : '(', params, ')']); - }, - - quotedString: function quotedString(str) { - return '"' + (str + '').replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\u2028/g, '\\u2028') // Per Ecma-262 7.3 + 7.8.4 - .replace(/\u2029/g, '\\u2029') + '"'; - }, - - objectLiteral: function objectLiteral(obj) { - var pairs = []; - - for (var key in obj) { - if (obj.hasOwnProperty(key)) { - var value = castChunk(obj[key], this); - if (value !== 'undefined') { - pairs.push([this.quotedString(key), ':', value]); - } - } - } - - var ret = this.generateList(pairs); - ret.prepend('{'); - ret.add('}'); - return ret; - }, - - generateList: function generateList(entries, loc) { - var ret = this.empty(loc); - - for (var i = 0, len = entries.length; i < len; i++) { - if (i) { - ret.add(','); - } - - ret.add(castChunk(entries[i], this, loc)); - } - - return ret; - }, - - generateArray: function generateArray(entries, loc) { - var ret = this.generateList(entries, loc); - ret.prepend('['); - ret.add(']'); - - return ret; - } -}; - -exports['default'] = CodeGen; -module.exports = exports['default']; - -/* NOP */ \ No newline at end of file diff --git a/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js b/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js deleted file mode 100644 index 4840fa5..0000000 --- a/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js +++ /dev/null @@ -1,527 +0,0 @@ -'use strict'; - -var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - -exports.__esModule = true; -exports.Compiler = Compiler; -exports.precompile = precompile; -exports.compile = compile; - -var _Exception = require('../exception'); - -var _Exception2 = _interopRequireWildcard(_Exception); - -var _isArray$indexOf = require('../utils'); - -var _AST = require('./ast'); - -var _AST2 = _interopRequireWildcard(_AST); - -var slice = [].slice; - -function Compiler() {} - -// the foundHelper register will disambiguate helper lookup from finding a -// function in a context. This is necessary for mustache compatibility, which -// requires that context functions in blocks are evaluated by blockHelperMissing, -// and then proceed as if the resulting value was provided to blockHelperMissing. - -Compiler.prototype = { - compiler: Compiler, - - equals: function equals(other) { - var len = this.opcodes.length; - if (other.opcodes.length !== len) { - return false; - } - - for (var i = 0; i < len; i++) { - var opcode = this.opcodes[i], - otherOpcode = other.opcodes[i]; - if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) { - return false; - } - } - - // We know that length is the same between the two arrays because they are directly tied - // to the opcode behavior above. - len = this.children.length; - for (var i = 0; i < len; i++) { - if (!this.children[i].equals(other.children[i])) { - return false; - } - } - - return true; - }, - - guid: 0, - - compile: function compile(program, options) { - this.sourceNode = []; - this.opcodes = []; - this.children = []; - this.options = options; - this.stringParams = options.stringParams; - this.trackIds = options.trackIds; - - options.blockParams = options.blockParams || []; - - // These changes will propagate to the other compiler components - var knownHelpers = options.knownHelpers; - options.knownHelpers = { - helperMissing: true, - blockHelperMissing: true, - each: true, - 'if': true, - unless: true, - 'with': true, - log: true, - lookup: true - }; - if (knownHelpers) { - for (var _name in knownHelpers) { - if (_name in knownHelpers) { - options.knownHelpers[_name] = knownHelpers[_name]; - } - } - } - - return this.accept(program); - }, - - compileProgram: function compileProgram(program) { - var childCompiler = new this.compiler(), - // eslint-disable-line new-cap - result = childCompiler.compile(program, this.options), - guid = this.guid++; - - this.usePartial = this.usePartial || result.usePartial; - - this.children[guid] = result; - this.useDepths = this.useDepths || result.useDepths; - - return guid; - }, - - accept: function accept(node) { - this.sourceNode.unshift(node); - var ret = this[node.type](node); - this.sourceNode.shift(); - return ret; - }, - - Program: function Program(program) { - this.options.blockParams.unshift(program.blockParams); - - var body = program.body, - bodyLength = body.length; - for (var i = 0; i < bodyLength; i++) { - this.accept(body[i]); - } - - this.options.blockParams.shift(); - - this.isSimple = bodyLength === 1; - this.blockParams = program.blockParams ? program.blockParams.length : 0; - - return this; - }, - - BlockStatement: function BlockStatement(block) { - transformLiteralToPath(block); - - var program = block.program, - inverse = block.inverse; - - program = program && this.compileProgram(program); - inverse = inverse && this.compileProgram(inverse); - - var type = this.classifySexpr(block); - - if (type === 'helper') { - this.helperSexpr(block, program, inverse); - } else if (type === 'simple') { - this.simpleSexpr(block); - - // now that the simple mustache is resolved, we need to - // evaluate it by executing `blockHelperMissing` - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - this.opcode('emptyHash'); - this.opcode('blockValue', block.path.original); - } else { - this.ambiguousSexpr(block, program, inverse); - - // now that the simple mustache is resolved, we need to - // evaluate it by executing `blockHelperMissing` - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - this.opcode('emptyHash'); - this.opcode('ambiguousBlockValue'); - } - - this.opcode('append'); - }, - - PartialStatement: function PartialStatement(partial) { - this.usePartial = true; - - var params = partial.params; - if (params.length > 1) { - throw new _Exception2['default']('Unsupported number of partial arguments: ' + params.length, partial); - } else if (!params.length) { - params.push({ type: 'PathExpression', parts: [], depth: 0 }); - } - - var partialName = partial.name.original, - isDynamic = partial.name.type === 'SubExpression'; - if (isDynamic) { - this.accept(partial.name); - } - - this.setupFullMustacheParams(partial, undefined, undefined, true); - - var indent = partial.indent || ''; - if (this.options.preventIndent && indent) { - this.opcode('appendContent', indent); - indent = ''; - } - - this.opcode('invokePartial', isDynamic, partialName, indent); - this.opcode('append'); - }, - - MustacheStatement: function MustacheStatement(mustache) { - this.SubExpression(mustache); // eslint-disable-line new-cap - - if (mustache.escaped && !this.options.noEscape) { - this.opcode('appendEscaped'); - } else { - this.opcode('append'); - } - }, - - ContentStatement: function ContentStatement(content) { - if (content.value) { - this.opcode('appendContent', content.value); - } - }, - - CommentStatement: function CommentStatement() {}, - - SubExpression: function SubExpression(sexpr) { - transformLiteralToPath(sexpr); - var type = this.classifySexpr(sexpr); - - if (type === 'simple') { - this.simpleSexpr(sexpr); - } else if (type === 'helper') { - this.helperSexpr(sexpr); - } else { - this.ambiguousSexpr(sexpr); - } - }, - ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) { - var path = sexpr.path, - name = path.parts[0], - isBlock = program != null || inverse != null; - - this.opcode('getContext', path.depth); - - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - - this.accept(path); - - this.opcode('invokeAmbiguous', name, isBlock); - }, - - simpleSexpr: function simpleSexpr(sexpr) { - this.accept(sexpr.path); - this.opcode('resolvePossibleLambda'); - }, - - helperSexpr: function helperSexpr(sexpr, program, inverse) { - var params = this.setupFullMustacheParams(sexpr, program, inverse), - path = sexpr.path, - name = path.parts[0]; - - if (this.options.knownHelpers[name]) { - this.opcode('invokeKnownHelper', params.length, name); - } else if (this.options.knownHelpersOnly) { - throw new _Exception2['default']('You specified knownHelpersOnly, but used the unknown helper ' + name, sexpr); - } else { - path.falsy = true; - - this.accept(path); - this.opcode('invokeHelper', params.length, path.original, _AST2['default'].helpers.simpleId(path)); - } - }, - - PathExpression: function PathExpression(path) { - this.addDepth(path.depth); - this.opcode('getContext', path.depth); - - var name = path.parts[0], - scoped = _AST2['default'].helpers.scopedId(path), - blockParamId = !path.depth && !scoped && this.blockParamIndex(name); - - if (blockParamId) { - this.opcode('lookupBlockParam', blockParamId, path.parts); - } else if (!name) { - // Context reference, i.e. `{{foo .}}` or `{{foo ..}}` - this.opcode('pushContext'); - } else if (path.data) { - this.options.data = true; - this.opcode('lookupData', path.depth, path.parts); - } else { - this.opcode('lookupOnContext', path.parts, path.falsy, scoped); - } - }, - - StringLiteral: function StringLiteral(string) { - this.opcode('pushString', string.value); - }, - - NumberLiteral: function NumberLiteral(number) { - this.opcode('pushLiteral', number.value); - }, - - BooleanLiteral: function BooleanLiteral(bool) { - this.opcode('pushLiteral', bool.value); - }, - - UndefinedLiteral: function UndefinedLiteral() { - this.opcode('pushLiteral', 'undefined'); - }, - - NullLiteral: function NullLiteral() { - this.opcode('pushLiteral', 'null'); - }, - - Hash: function Hash(hash) { - var pairs = hash.pairs, - i = 0, - l = pairs.length; - - this.opcode('pushHash'); - - for (; i < l; i++) { - this.pushParam(pairs[i].value); - } - while (i--) { - this.opcode('assignToHash', pairs[i].key); - } - this.opcode('popHash'); - }, - - // HELPERS - opcode: function opcode(name) { - this.opcodes.push({ opcode: name, args: slice.call(arguments, 1), loc: this.sourceNode[0].loc }); - }, - - addDepth: function addDepth(depth) { - if (!depth) { - return; - } - - this.useDepths = true; - }, - - classifySexpr: function classifySexpr(sexpr) { - var isSimple = _AST2['default'].helpers.simpleId(sexpr.path); - - var isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]); - - // a mustache is an eligible helper if: - // * its id is simple (a single part, not `this` or `..`) - var isHelper = !isBlockParam && _AST2['default'].helpers.helperExpression(sexpr); - - // if a mustache is an eligible helper but not a definite - // helper, it is ambiguous, and will be resolved in a later - // pass or at runtime. - var isEligible = !isBlockParam && (isHelper || isSimple); - - // if ambiguous, we can possibly resolve the ambiguity now - // An eligible helper is one that does not have a complex path, i.e. `this.foo`, `../foo` etc. - if (isEligible && !isHelper) { - var _name2 = sexpr.path.parts[0], - options = this.options; - - if (options.knownHelpers[_name2]) { - isHelper = true; - } else if (options.knownHelpersOnly) { - isEligible = false; - } - } - - if (isHelper) { - return 'helper'; - } else if (isEligible) { - return 'ambiguous'; - } else { - return 'simple'; - } - }, - - pushParams: function pushParams(params) { - for (var i = 0, l = params.length; i < l; i++) { - this.pushParam(params[i]); - } - }, - - pushParam: function pushParam(val) { - var value = val.value != null ? val.value : val.original || ''; - - if (this.stringParams) { - if (value.replace) { - value = value.replace(/^(\.?\.\/)*/g, '').replace(/\//g, '.'); - } - - if (val.depth) { - this.addDepth(val.depth); - } - this.opcode('getContext', val.depth || 0); - this.opcode('pushStringParam', value, val.type); - - if (val.type === 'SubExpression') { - // SubExpressions get evaluated and passed in - // in string params mode. - this.accept(val); - } - } else { - if (this.trackIds) { - var blockParamIndex = undefined; - if (val.parts && !_AST2['default'].helpers.scopedId(val) && !val.depth) { - blockParamIndex = this.blockParamIndex(val.parts[0]); - } - if (blockParamIndex) { - var blockParamChild = val.parts.slice(1).join('.'); - this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild); - } else { - value = val.original || value; - if (value.replace) { - value = value.replace(/^\.\//g, '').replace(/^\.$/g, ''); - } - - this.opcode('pushId', val.type, value); - } - } - this.accept(val); - } - }, - - setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty) { - var params = sexpr.params; - this.pushParams(params); - - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - - if (sexpr.hash) { - this.accept(sexpr.hash); - } else { - this.opcode('emptyHash', omitEmpty); - } - - return params; - }, - - blockParamIndex: function blockParamIndex(name) { - for (var depth = 0, len = this.options.blockParams.length; depth < len; depth++) { - var blockParams = this.options.blockParams[depth], - param = blockParams && _isArray$indexOf.indexOf(blockParams, name); - if (blockParams && param >= 0) { - return [depth, param]; - } - } - } -}; - -function precompile(input, options, env) { - if (input == null || typeof input !== 'string' && input.type !== 'Program') { - throw new _Exception2['default']('You must pass a string or Handlebars AST to Handlebars.precompile. You passed ' + input); - } - - options = options || {}; - if (!('data' in options)) { - options.data = true; - } - if (options.compat) { - options.useDepths = true; - } - - var ast = env.parse(input, options), - environment = new env.Compiler().compile(ast, options); - return new env.JavaScriptCompiler().compile(environment, options); -} - -function compile(input, _x, env) { - var options = arguments[1] === undefined ? {} : arguments[1]; - - if (input == null || typeof input !== 'string' && input.type !== 'Program') { - throw new _Exception2['default']('You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + input); - } - - if (!('data' in options)) { - options.data = true; - } - if (options.compat) { - options.useDepths = true; - } - - var compiled = undefined; - - function compileInput() { - var ast = env.parse(input, options), - environment = new env.Compiler().compile(ast, options), - templateSpec = new env.JavaScriptCompiler().compile(environment, options, undefined, true); - return env.template(templateSpec); - } - - // Template is only compiled on first use and cached after that point. - function ret(context, execOptions) { - if (!compiled) { - compiled = compileInput(); - } - return compiled.call(this, context, execOptions); - } - ret._setup = function (setupOptions) { - if (!compiled) { - compiled = compileInput(); - } - return compiled._setup(setupOptions); - }; - ret._child = function (i, data, blockParams, depths) { - if (!compiled) { - compiled = compileInput(); - } - return compiled._child(i, data, blockParams, depths); - }; - return ret; -} - -function argEquals(a, b) { - if (a === b) { - return true; - } - - if (_isArray$indexOf.isArray(a) && _isArray$indexOf.isArray(b) && a.length === b.length) { - for (var i = 0; i < a.length; i++) { - if (!argEquals(a[i], b[i])) { - return false; - } - } - return true; - } -} - -function transformLiteralToPath(sexpr) { - if (!sexpr.path.parts) { - var literal = sexpr.path; - // Casting to string here to make false and 0 literal values play nicely with the rest - // of the system. - sexpr.path = new _AST2['default'].PathExpression(false, 0, [literal.original + ''], literal.original + '', literal.loc); - } -} \ No newline at end of file diff --git a/node_modules/handlebars/dist/cjs/handlebars/compiler/helpers.js b/node_modules/handlebars/dist/cjs/handlebars/compiler/helpers.js deleted file mode 100644 index dac4f0c..0000000 --- a/node_modules/handlebars/dist/cjs/handlebars/compiler/helpers.js +++ /dev/null @@ -1,131 +0,0 @@ -'use strict'; - -var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - -exports.__esModule = true; -exports.SourceLocation = SourceLocation; -exports.id = id; -exports.stripFlags = stripFlags; -exports.stripComment = stripComment; -exports.preparePath = preparePath; -exports.prepareMustache = prepareMustache; -exports.prepareRawBlock = prepareRawBlock; -exports.prepareBlock = prepareBlock; - -var _Exception = require('../exception'); - -var _Exception2 = _interopRequireWildcard(_Exception); - -function SourceLocation(source, locInfo) { - this.source = source; - this.start = { - line: locInfo.first_line, - column: locInfo.first_column - }; - this.end = { - line: locInfo.last_line, - column: locInfo.last_column - }; -} - -function id(token) { - if (/^\[.*\]$/.test(token)) { - return token.substr(1, token.length - 2); - } else { - return token; - } -} - -function stripFlags(open, close) { - return { - open: open.charAt(2) === '~', - close: close.charAt(close.length - 3) === '~' - }; -} - -function stripComment(comment) { - return comment.replace(/^\{\{~?\!-?-?/, '').replace(/-?-?~?\}\}$/, ''); -} - -function preparePath(data, parts, locInfo) { - locInfo = this.locInfo(locInfo); - - var original = data ? '@' : '', - dig = [], - depth = 0, - depthString = ''; - - for (var i = 0, l = parts.length; i < l; i++) { - var part = parts[i].part, - - // If we have [] syntax then we do not treat path references as operators, - // i.e. foo.[this] resolves to approximately context.foo['this'] - isLiteral = parts[i].original !== part; - original += (parts[i].separator || '') + part; - - if (!isLiteral && (part === '..' || part === '.' || part === 'this')) { - if (dig.length > 0) { - throw new _Exception2['default']('Invalid path: ' + original, { loc: locInfo }); - } else if (part === '..') { - depth++; - depthString += '../'; - } - } else { - dig.push(part); - } - } - - return new this.PathExpression(data, depth, dig, original, locInfo); -} - -function prepareMustache(path, params, hash, open, strip, locInfo) { - // Must use charAt to support IE pre-10 - var escapeFlag = open.charAt(3) || open.charAt(2), - escaped = escapeFlag !== '{' && escapeFlag !== '&'; - - return new this.MustacheStatement(path, params, hash, escaped, strip, this.locInfo(locInfo)); -} - -function prepareRawBlock(openRawBlock, content, close, locInfo) { - if (openRawBlock.path.original !== close) { - var errorNode = { loc: openRawBlock.path.loc }; - - throw new _Exception2['default'](openRawBlock.path.original + ' doesn\'t match ' + close, errorNode); - } - - locInfo = this.locInfo(locInfo); - var program = new this.Program([content], null, {}, locInfo); - - return new this.BlockStatement(openRawBlock.path, openRawBlock.params, openRawBlock.hash, program, undefined, {}, {}, {}, locInfo); -} - -function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) { - // When we are chaining inverse calls, we will not have a close path - if (close && close.path && openBlock.path.original !== close.path.original) { - var errorNode = { loc: openBlock.path.loc }; - - throw new _Exception2['default'](openBlock.path.original + ' doesn\'t match ' + close.path.original, errorNode); - } - - program.blockParams = openBlock.blockParams; - - var inverse = undefined, - inverseStrip = undefined; - - if (inverseAndProgram) { - if (inverseAndProgram.chain) { - inverseAndProgram.program.body[0].closeStrip = close.strip; - } - - inverseStrip = inverseAndProgram.strip; - inverse = inverseAndProgram.program; - } - - if (inverted) { - inverted = inverse; - inverse = program; - program = inverted; - } - - return new this.BlockStatement(openBlock.path, openBlock.params, openBlock.hash, program, inverse, openBlock.strip, inverseStrip, close && close.strip, this.locInfo(locInfo)); -} \ No newline at end of file diff --git a/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js b/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js deleted file mode 100644 index c77f270..0000000 --- a/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js +++ /dev/null @@ -1,1062 +0,0 @@ -'use strict'; - -var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - -exports.__esModule = true; - -var _COMPILER_REVISION$REVISION_CHANGES = require('../base'); - -var _Exception = require('../exception'); - -var _Exception2 = _interopRequireWildcard(_Exception); - -var _isArray = require('../utils'); - -var _CodeGen = require('./code-gen'); - -var _CodeGen2 = _interopRequireWildcard(_CodeGen); - -function Literal(value) { - this.value = value; -} - -function JavaScriptCompiler() {} - -JavaScriptCompiler.prototype = { - // PUBLIC API: You can override these methods in a subclass to provide - // alternative compiled forms for name lookup and buffering semantics - nameLookup: function nameLookup(parent, name /* , type*/) { - if (JavaScriptCompiler.isValidJavaScriptVariableName(name)) { - return [parent, '.', name]; - } else { - return [parent, '[\'', name, '\']']; - } - }, - depthedLookup: function depthedLookup(name) { - return [this.aliasable('this.lookup'), '(depths, "', name, '")']; - }, - - compilerInfo: function compilerInfo() { - var revision = _COMPILER_REVISION$REVISION_CHANGES.COMPILER_REVISION, - versions = _COMPILER_REVISION$REVISION_CHANGES.REVISION_CHANGES[revision]; - return [revision, versions]; - }, - - appendToBuffer: function appendToBuffer(source, location, explicit) { - // Force a source as this simplifies the merge logic. - if (!_isArray.isArray(source)) { - source = [source]; - } - source = this.source.wrap(source, location); - - if (this.environment.isSimple) { - return ['return ', source, ';']; - } else if (explicit) { - // This is a case where the buffer operation occurs as a child of another - // construct, generally braces. We have to explicitly output these buffer - // operations to ensure that the emitted code goes in the correct location. - return ['buffer += ', source, ';']; - } else { - source.appendToBuffer = true; - return source; - } - }, - - initializeBuffer: function initializeBuffer() { - return this.quotedString(''); - }, - // END PUBLIC API - - compile: function compile(environment, options, context, asObject) { - this.environment = environment; - this.options = options; - this.stringParams = this.options.stringParams; - this.trackIds = this.options.trackIds; - this.precompile = !asObject; - - this.name = this.environment.name; - this.isChild = !!context; - this.context = context || { - programs: [], - environments: [] - }; - - this.preamble(); - - this.stackSlot = 0; - this.stackVars = []; - this.aliases = {}; - this.registers = { list: [] }; - this.hashes = []; - this.compileStack = []; - this.inlineStack = []; - this.blockParams = []; - - this.compileChildren(environment, options); - - this.useDepths = this.useDepths || environment.useDepths || this.options.compat; - this.useBlockParams = this.useBlockParams || environment.useBlockParams; - - var opcodes = environment.opcodes, - opcode = undefined, - firstLoc = undefined, - i = undefined, - l = undefined; - - for (i = 0, l = opcodes.length; i < l; i++) { - opcode = opcodes[i]; - - this.source.currentLocation = opcode.loc; - firstLoc = firstLoc || opcode.loc; - this[opcode.opcode].apply(this, opcode.args); - } - - // Flush any trailing content that might be pending. - this.source.currentLocation = firstLoc; - this.pushSource(''); - - /* istanbul ignore next */ - if (this.stackSlot || this.inlineStack.length || this.compileStack.length) { - throw new _Exception2['default']('Compile completed with content left on stack'); - } - - var fn = this.createFunctionContext(asObject); - if (!this.isChild) { - var ret = { - compiler: this.compilerInfo(), - main: fn - }; - var programs = this.context.programs; - for (i = 0, l = programs.length; i < l; i++) { - if (programs[i]) { - ret[i] = programs[i]; - } - } - - if (this.environment.usePartial) { - ret.usePartial = true; - } - if (this.options.data) { - ret.useData = true; - } - if (this.useDepths) { - ret.useDepths = true; - } - if (this.useBlockParams) { - ret.useBlockParams = true; - } - if (this.options.compat) { - ret.compat = true; - } - - if (!asObject) { - ret.compiler = JSON.stringify(ret.compiler); - - this.source.currentLocation = { start: { line: 1, column: 0 } }; - ret = this.objectLiteral(ret); - - if (options.srcName) { - ret = ret.toStringWithSourceMap({ file: options.destName }); - ret.map = ret.map && ret.map.toString(); - } else { - ret = ret.toString(); - } - } else { - ret.compilerOptions = this.options; - } - - return ret; - } else { - return fn; - } - }, - - preamble: function preamble() { - // track the last context pushed into place to allow skipping the - // getContext opcode when it would be a noop - this.lastContext = 0; - this.source = new _CodeGen2['default'](this.options.srcName); - }, - - createFunctionContext: function createFunctionContext(asObject) { - var varDeclarations = ''; - - var locals = this.stackVars.concat(this.registers.list); - if (locals.length > 0) { - varDeclarations += ', ' + locals.join(', '); - } - - // Generate minimizer alias mappings - // - // When using true SourceNodes, this will update all references to the given alias - // as the source nodes are reused in situ. For the non-source node compilation mode, - // aliases will not be used, but this case is already being run on the client and - // we aren't concern about minimizing the template size. - var aliasCount = 0; - for (var alias in this.aliases) { - // eslint-disable-line guard-for-in - var node = this.aliases[alias]; - - if (this.aliases.hasOwnProperty(alias) && node.children && node.referenceCount > 1) { - varDeclarations += ', alias' + ++aliasCount + '=' + alias; - node.children[0] = 'alias' + aliasCount; - } - } - - var params = ['depth0', 'helpers', 'partials', 'data']; - - if (this.useBlockParams || this.useDepths) { - params.push('blockParams'); - } - if (this.useDepths) { - params.push('depths'); - } - - // Perform a second pass over the output to merge content when possible - var source = this.mergeSource(varDeclarations); - - if (asObject) { - params.push(source); - - return Function.apply(this, params); - } else { - return this.source.wrap(['function(', params.join(','), ') {\n ', source, '}']); - } - }, - mergeSource: function mergeSource(varDeclarations) { - var isSimple = this.environment.isSimple, - appendOnly = !this.forceBuffer, - appendFirst = undefined, - sourceSeen = undefined, - bufferStart = undefined, - bufferEnd = undefined; - this.source.each(function (line) { - if (line.appendToBuffer) { - if (bufferStart) { - line.prepend(' + '); - } else { - bufferStart = line; - } - bufferEnd = line; - } else { - if (bufferStart) { - if (!sourceSeen) { - appendFirst = true; - } else { - bufferStart.prepend('buffer += '); - } - bufferEnd.add(';'); - bufferStart = bufferEnd = undefined; - } - - sourceSeen = true; - if (!isSimple) { - appendOnly = false; - } - } - }); - - if (appendOnly) { - if (bufferStart) { - bufferStart.prepend('return '); - bufferEnd.add(';'); - } else if (!sourceSeen) { - this.source.push('return "";'); - } - } else { - varDeclarations += ', buffer = ' + (appendFirst ? '' : this.initializeBuffer()); - - if (bufferStart) { - bufferStart.prepend('return buffer + '); - bufferEnd.add(';'); - } else { - this.source.push('return buffer;'); - } - } - - if (varDeclarations) { - this.source.prepend('var ' + varDeclarations.substring(2) + (appendFirst ? '' : ';\n')); - } - - return this.source.merge(); - }, - - // [blockValue] - // - // On stack, before: hash, inverse, program, value - // On stack, after: return value of blockHelperMissing - // - // The purpose of this opcode is to take a block of the form - // `{{#this.foo}}...{{/this.foo}}`, resolve the value of `foo`, and - // replace it on the stack with the result of properly - // invoking blockHelperMissing. - blockValue: function blockValue(name) { - var blockHelperMissing = this.aliasable('helpers.blockHelperMissing'), - params = [this.contextName(0)]; - this.setupHelperArgs(name, 0, params); - - var blockName = this.popStack(); - params.splice(1, 0, blockName); - - this.push(this.source.functionCall(blockHelperMissing, 'call', params)); - }, - - // [ambiguousBlockValue] - // - // On stack, before: hash, inverse, program, value - // Compiler value, before: lastHelper=value of last found helper, if any - // On stack, after, if no lastHelper: same as [blockValue] - // On stack, after, if lastHelper: value - ambiguousBlockValue: function ambiguousBlockValue() { - // We're being a bit cheeky and reusing the options value from the prior exec - var blockHelperMissing = this.aliasable('helpers.blockHelperMissing'), - params = [this.contextName(0)]; - this.setupHelperArgs('', 0, params, true); - - this.flushInline(); - - var current = this.topStack(); - params.splice(1, 0, current); - - this.pushSource(['if (!', this.lastHelper, ') { ', current, ' = ', this.source.functionCall(blockHelperMissing, 'call', params), '}']); - }, - - // [appendContent] - // - // On stack, before: ... - // On stack, after: ... - // - // Appends the string value of `content` to the current buffer - appendContent: function appendContent(content) { - if (this.pendingContent) { - content = this.pendingContent + content; - } else { - this.pendingLocation = this.source.currentLocation; - } - - this.pendingContent = content; - }, - - // [append] - // - // On stack, before: value, ... - // On stack, after: ... - // - // Coerces `value` to a String and appends it to the current buffer. - // - // If `value` is truthy, or 0, it is coerced into a string and appended - // Otherwise, the empty string is appended - append: function append() { - if (this.isInline()) { - this.replaceStack(function (current) { - return [' != null ? ', current, ' : ""']; - }); - - this.pushSource(this.appendToBuffer(this.popStack())); - } else { - var local = this.popStack(); - this.pushSource(['if (', local, ' != null) { ', this.appendToBuffer(local, undefined, true), ' }']); - if (this.environment.isSimple) { - this.pushSource(['else { ', this.appendToBuffer('\'\'', undefined, true), ' }']); - } - } - }, - - // [appendEscaped] - // - // On stack, before: value, ... - // On stack, after: ... - // - // Escape `value` and append it to the buffer - appendEscaped: function appendEscaped() { - this.pushSource(this.appendToBuffer([this.aliasable('this.escapeExpression'), '(', this.popStack(), ')'])); - }, - - // [getContext] - // - // On stack, before: ... - // On stack, after: ... - // Compiler value, after: lastContext=depth - // - // Set the value of the `lastContext` compiler value to the depth - getContext: function getContext(depth) { - this.lastContext = depth; - }, - - // [pushContext] - // - // On stack, before: ... - // On stack, after: currentContext, ... - // - // Pushes the value of the current context onto the stack. - pushContext: function pushContext() { - this.pushStackLiteral(this.contextName(this.lastContext)); - }, - - // [lookupOnContext] - // - // On stack, before: ... - // On stack, after: currentContext[name], ... - // - // Looks up the value of `name` on the current context and pushes - // it onto the stack. - lookupOnContext: function lookupOnContext(parts, falsy, scoped) { - var i = 0; - - if (!scoped && this.options.compat && !this.lastContext) { - // The depthed query is expected to handle the undefined logic for the root level that - // is implemented below, so we evaluate that directly in compat mode - this.push(this.depthedLookup(parts[i++])); - } else { - this.pushContext(); - } - - this.resolvePath('context', parts, i, falsy); - }, - - // [lookupBlockParam] - // - // On stack, before: ... - // On stack, after: blockParam[name], ... - // - // Looks up the value of `parts` on the given block param and pushes - // it onto the stack. - lookupBlockParam: function lookupBlockParam(blockParamId, parts) { - this.useBlockParams = true; - - this.push(['blockParams[', blockParamId[0], '][', blockParamId[1], ']']); - this.resolvePath('context', parts, 1); - }, - - // [lookupData] - // - // On stack, before: ... - // On stack, after: data, ... - // - // Push the data lookup operator - lookupData: function lookupData(depth, parts) { - if (!depth) { - this.pushStackLiteral('data'); - } else { - this.pushStackLiteral('this.data(data, ' + depth + ')'); - } - - this.resolvePath('data', parts, 0, true); - }, - - resolvePath: function resolvePath(type, parts, i, falsy) { - var _this = this; - - if (this.options.strict || this.options.assumeObjects) { - this.push(strictLookup(this.options.strict, this, parts, type)); - return; - } - - var len = parts.length; - for (; i < len; i++) { - /*eslint-disable no-loop-func */ - this.replaceStack(function (current) { - var lookup = _this.nameLookup(current, parts[i], type); - // We want to ensure that zero and false are handled properly if the context (falsy flag) - // needs to have the special handling for these values. - if (!falsy) { - return [' != null ? ', lookup, ' : ', current]; - } else { - // Otherwise we can use generic falsy handling - return [' && ', lookup]; - } - }); - /*eslint-enable no-loop-func */ - } - }, - - // [resolvePossibleLambda] - // - // On stack, before: value, ... - // On stack, after: resolved value, ... - // - // If the `value` is a lambda, replace it on the stack by - // the return value of the lambda - resolvePossibleLambda: function resolvePossibleLambda() { - this.push([this.aliasable('this.lambda'), '(', this.popStack(), ', ', this.contextName(0), ')']); - }, - - // [pushStringParam] - // - // On stack, before: ... - // On stack, after: string, currentContext, ... - // - // This opcode is designed for use in string mode, which - // provides the string value of a parameter along with its - // depth rather than resolving it immediately. - pushStringParam: function pushStringParam(string, type) { - this.pushContext(); - this.pushString(type); - - // If it's a subexpression, the string result - // will be pushed after this opcode. - if (type !== 'SubExpression') { - if (typeof string === 'string') { - this.pushString(string); - } else { - this.pushStackLiteral(string); - } - } - }, - - emptyHash: function emptyHash(omitEmpty) { - if (this.trackIds) { - this.push('{}'); // hashIds - } - if (this.stringParams) { - this.push('{}'); // hashContexts - this.push('{}'); // hashTypes - } - this.pushStackLiteral(omitEmpty ? 'undefined' : '{}'); - }, - pushHash: function pushHash() { - if (this.hash) { - this.hashes.push(this.hash); - } - this.hash = { values: [], types: [], contexts: [], ids: [] }; - }, - popHash: function popHash() { - var hash = this.hash; - this.hash = this.hashes.pop(); - - if (this.trackIds) { - this.push(this.objectLiteral(hash.ids)); - } - if (this.stringParams) { - this.push(this.objectLiteral(hash.contexts)); - this.push(this.objectLiteral(hash.types)); - } - - this.push(this.objectLiteral(hash.values)); - }, - - // [pushString] - // - // On stack, before: ... - // On stack, after: quotedString(string), ... - // - // Push a quoted version of `string` onto the stack - pushString: function pushString(string) { - this.pushStackLiteral(this.quotedString(string)); - }, - - // [pushLiteral] - // - // On stack, before: ... - // On stack, after: value, ... - // - // Pushes a value onto the stack. This operation prevents - // the compiler from creating a temporary variable to hold - // it. - pushLiteral: function pushLiteral(value) { - this.pushStackLiteral(value); - }, - - // [pushProgram] - // - // On stack, before: ... - // On stack, after: program(guid), ... - // - // Push a program expression onto the stack. This takes - // a compile-time guid and converts it into a runtime-accessible - // expression. - pushProgram: function pushProgram(guid) { - if (guid != null) { - this.pushStackLiteral(this.programExpression(guid)); - } else { - this.pushStackLiteral(null); - } - }, - - // [invokeHelper] - // - // On stack, before: hash, inverse, program, params..., ... - // On stack, after: result of helper invocation - // - // Pops off the helper's parameters, invokes the helper, - // and pushes the helper's return value onto the stack. - // - // If the helper is not found, `helperMissing` is called. - invokeHelper: function invokeHelper(paramSize, name, isSimple) { - var nonHelper = this.popStack(), - helper = this.setupHelper(paramSize, name), - simple = isSimple ? [helper.name, ' || '] : ''; - - var lookup = ['('].concat(simple, nonHelper); - if (!this.options.strict) { - lookup.push(' || ', this.aliasable('helpers.helperMissing')); - } - lookup.push(')'); - - this.push(this.source.functionCall(lookup, 'call', helper.callParams)); - }, - - // [invokeKnownHelper] - // - // On stack, before: hash, inverse, program, params..., ... - // On stack, after: result of helper invocation - // - // This operation is used when the helper is known to exist, - // so a `helperMissing` fallback is not required. - invokeKnownHelper: function invokeKnownHelper(paramSize, name) { - var helper = this.setupHelper(paramSize, name); - this.push(this.source.functionCall(helper.name, 'call', helper.callParams)); - }, - - // [invokeAmbiguous] - // - // On stack, before: hash, inverse, program, params..., ... - // On stack, after: result of disambiguation - // - // This operation is used when an expression like `{{foo}}` - // is provided, but we don't know at compile-time whether it - // is a helper or a path. - // - // This operation emits more code than the other options, - // and can be avoided by passing the `knownHelpers` and - // `knownHelpersOnly` flags at compile-time. - invokeAmbiguous: function invokeAmbiguous(name, helperCall) { - this.useRegister('helper'); - - var nonHelper = this.popStack(); - - this.emptyHash(); - var helper = this.setupHelper(0, name, helperCall); - - var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper'); - - var lookup = ['(', '(helper = ', helperName, ' || ', nonHelper, ')']; - if (!this.options.strict) { - lookup[0] = '(helper = '; - lookup.push(' != null ? helper : ', this.aliasable('helpers.helperMissing')); - } - - this.push(['(', lookup, helper.paramsInit ? ['),(', helper.paramsInit] : [], '),', '(typeof helper === ', this.aliasable('"function"'), ' ? ', this.source.functionCall('helper', 'call', helper.callParams), ' : helper))']); - }, - - // [invokePartial] - // - // On stack, before: context, ... - // On stack after: result of partial invocation - // - // This operation pops off a context, invokes a partial with that context, - // and pushes the result of the invocation back. - invokePartial: function invokePartial(isDynamic, name, indent) { - var params = [], - options = this.setupParams(name, 1, params, false); - - if (isDynamic) { - name = this.popStack(); - delete options.name; - } - - if (indent) { - options.indent = JSON.stringify(indent); - } - options.helpers = 'helpers'; - options.partials = 'partials'; - - if (!isDynamic) { - params.unshift(this.nameLookup('partials', name, 'partial')); - } else { - params.unshift(name); - } - - if (this.options.compat) { - options.depths = 'depths'; - } - options = this.objectLiteral(options); - params.push(options); - - this.push(this.source.functionCall('this.invokePartial', '', params)); - }, - - // [assignToHash] - // - // On stack, before: value, ..., hash, ... - // On stack, after: ..., hash, ... - // - // Pops a value off the stack and assigns it to the current hash - assignToHash: function assignToHash(key) { - var value = this.popStack(), - context = undefined, - type = undefined, - id = undefined; - - if (this.trackIds) { - id = this.popStack(); - } - if (this.stringParams) { - type = this.popStack(); - context = this.popStack(); - } - - var hash = this.hash; - if (context) { - hash.contexts[key] = context; - } - if (type) { - hash.types[key] = type; - } - if (id) { - hash.ids[key] = id; - } - hash.values[key] = value; - }, - - pushId: function pushId(type, name, child) { - if (type === 'BlockParam') { - this.pushStackLiteral('blockParams[' + name[0] + '].path[' + name[1] + ']' + (child ? ' + ' + JSON.stringify('.' + child) : '')); - } else if (type === 'PathExpression') { - this.pushString(name); - } else if (type === 'SubExpression') { - this.pushStackLiteral('true'); - } else { - this.pushStackLiteral('null'); - } - }, - - // HELPERS - - compiler: JavaScriptCompiler, - - compileChildren: function compileChildren(environment, options) { - var children = environment.children, - child = undefined, - compiler = undefined; - - for (var i = 0, l = children.length; i < l; i++) { - child = children[i]; - compiler = new this.compiler(); // eslint-disable-line new-cap - - var index = this.matchExistingProgram(child); - - if (index == null) { - this.context.programs.push(''); // Placeholder to prevent name conflicts for nested children - index = this.context.programs.length; - child.index = index; - child.name = 'program' + index; - this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile); - this.context.environments[index] = child; - - this.useDepths = this.useDepths || compiler.useDepths; - this.useBlockParams = this.useBlockParams || compiler.useBlockParams; - } else { - child.index = index; - child.name = 'program' + index; - - this.useDepths = this.useDepths || child.useDepths; - this.useBlockParams = this.useBlockParams || child.useBlockParams; - } - } - }, - matchExistingProgram: function matchExistingProgram(child) { - for (var i = 0, len = this.context.environments.length; i < len; i++) { - var environment = this.context.environments[i]; - if (environment && environment.equals(child)) { - return i; - } - } - }, - - programExpression: function programExpression(guid) { - var child = this.environment.children[guid], - programParams = [child.index, 'data', child.blockParams]; - - if (this.useBlockParams || this.useDepths) { - programParams.push('blockParams'); - } - if (this.useDepths) { - programParams.push('depths'); - } - - return 'this.program(' + programParams.join(', ') + ')'; - }, - - useRegister: function useRegister(name) { - if (!this.registers[name]) { - this.registers[name] = true; - this.registers.list.push(name); - } - }, - - push: function push(expr) { - if (!(expr instanceof Literal)) { - expr = this.source.wrap(expr); - } - - this.inlineStack.push(expr); - return expr; - }, - - pushStackLiteral: function pushStackLiteral(item) { - this.push(new Literal(item)); - }, - - pushSource: function pushSource(source) { - if (this.pendingContent) { - this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation)); - this.pendingContent = undefined; - } - - if (source) { - this.source.push(source); - } - }, - - replaceStack: function replaceStack(callback) { - var prefix = ['('], - stack = undefined, - createdStack = undefined, - usedLiteral = undefined; - - /* istanbul ignore next */ - if (!this.isInline()) { - throw new _Exception2['default']('replaceStack on non-inline'); - } - - // We want to merge the inline statement into the replacement statement via ',' - var top = this.popStack(true); - - if (top instanceof Literal) { - // Literals do not need to be inlined - stack = [top.value]; - prefix = ['(', stack]; - usedLiteral = true; - } else { - // Get or create the current stack name for use by the inline - createdStack = true; - var _name = this.incrStack(); - - prefix = ['((', this.push(_name), ' = ', top, ')']; - stack = this.topStack(); - } - - var item = callback.call(this, stack); - - if (!usedLiteral) { - this.popStack(); - } - if (createdStack) { - this.stackSlot--; - } - this.push(prefix.concat(item, ')')); - }, - - incrStack: function incrStack() { - this.stackSlot++; - if (this.stackSlot > this.stackVars.length) { - this.stackVars.push('stack' + this.stackSlot); - } - return this.topStackName(); - }, - topStackName: function topStackName() { - return 'stack' + this.stackSlot; - }, - flushInline: function flushInline() { - var inlineStack = this.inlineStack; - this.inlineStack = []; - for (var i = 0, len = inlineStack.length; i < len; i++) { - var entry = inlineStack[i]; - /* istanbul ignore if */ - if (entry instanceof Literal) { - this.compileStack.push(entry); - } else { - var stack = this.incrStack(); - this.pushSource([stack, ' = ', entry, ';']); - this.compileStack.push(stack); - } - } - }, - isInline: function isInline() { - return this.inlineStack.length; - }, - - popStack: function popStack(wrapped) { - var inline = this.isInline(), - item = (inline ? this.inlineStack : this.compileStack).pop(); - - if (!wrapped && item instanceof Literal) { - return item.value; - } else { - if (!inline) { - /* istanbul ignore next */ - if (!this.stackSlot) { - throw new _Exception2['default']('Invalid stack pop'); - } - this.stackSlot--; - } - return item; - } - }, - - topStack: function topStack() { - var stack = this.isInline() ? this.inlineStack : this.compileStack, - item = stack[stack.length - 1]; - - /* istanbul ignore if */ - if (item instanceof Literal) { - return item.value; - } else { - return item; - } - }, - - contextName: function contextName(context) { - if (this.useDepths && context) { - return 'depths[' + context + ']'; - } else { - return 'depth' + context; - } - }, - - quotedString: function quotedString(str) { - return this.source.quotedString(str); - }, - - objectLiteral: function objectLiteral(obj) { - return this.source.objectLiteral(obj); - }, - - aliasable: function aliasable(name) { - var ret = this.aliases[name]; - if (ret) { - ret.referenceCount++; - return ret; - } - - ret = this.aliases[name] = this.source.wrap(name); - ret.aliasable = true; - ret.referenceCount = 1; - - return ret; - }, - - setupHelper: function setupHelper(paramSize, name, blockHelper) { - var params = [], - paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper); - var foundHelper = this.nameLookup('helpers', name, 'helper'); - - return { - params: params, - paramsInit: paramsInit, - name: foundHelper, - callParams: [this.contextName(0)].concat(params) - }; - }, - - setupParams: function setupParams(helper, paramSize, params) { - var options = {}, - contexts = [], - types = [], - ids = [], - param = undefined; - - options.name = this.quotedString(helper); - options.hash = this.popStack(); - - if (this.trackIds) { - options.hashIds = this.popStack(); - } - if (this.stringParams) { - options.hashTypes = this.popStack(); - options.hashContexts = this.popStack(); - } - - var inverse = this.popStack(), - program = this.popStack(); - - // Avoid setting fn and inverse if neither are set. This allows - // helpers to do a check for `if (options.fn)` - if (program || inverse) { - options.fn = program || 'this.noop'; - options.inverse = inverse || 'this.noop'; - } - - // The parameters go on to the stack in order (making sure that they are evaluated in order) - // so we need to pop them off the stack in reverse order - var i = paramSize; - while (i--) { - param = this.popStack(); - params[i] = param; - - if (this.trackIds) { - ids[i] = this.popStack(); - } - if (this.stringParams) { - types[i] = this.popStack(); - contexts[i] = this.popStack(); - } - } - - if (this.trackIds) { - options.ids = this.source.generateArray(ids); - } - if (this.stringParams) { - options.types = this.source.generateArray(types); - options.contexts = this.source.generateArray(contexts); - } - - if (this.options.data) { - options.data = 'data'; - } - if (this.useBlockParams) { - options.blockParams = 'blockParams'; - } - return options; - }, - - setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister) { - var options = this.setupParams(helper, paramSize, params, true); - options = this.objectLiteral(options); - if (useRegister) { - this.useRegister('options'); - params.push('options'); - return ['options=', options]; - } else { - params.push(options); - return ''; - } - } -}; - -(function () { - var reservedWords = ('break else new var' + ' case finally return void' + ' catch for switch while' + ' continue function this with' + ' default if throw' + ' delete in try' + ' do instanceof typeof' + ' abstract enum int short' + ' boolean export interface static' + ' byte extends long super' + ' char final native synchronized' + ' class float package throws' + ' const goto private transient' + ' debugger implements protected volatile' + ' double import public let yield await' + ' null true false').split(' '); - - var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {}; - - for (var i = 0, l = reservedWords.length; i < l; i++) { - compilerWords[reservedWords[i]] = true; - } -})(); - -JavaScriptCompiler.isValidJavaScriptVariableName = function (name) { - return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name); -}; - -function strictLookup(requireTerminal, compiler, parts, type) { - var stack = compiler.popStack(), - i = 0, - len = parts.length; - if (requireTerminal) { - len--; - } - - for (; i < len; i++) { - stack = compiler.nameLookup(stack, parts[i], type); - } - - if (requireTerminal) { - return [compiler.aliasable('this.strict'), '(', stack, ', ', compiler.quotedString(parts[i]), ')']; - } else { - return stack; - } -} - -exports['default'] = JavaScriptCompiler; -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js b/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js deleted file mode 100644 index c942f58..0000000 --- a/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js +++ /dev/null @@ -1,678 +0,0 @@ -"use strict"; - -exports.__esModule = true; -/* istanbul ignore next */ -/* Jison generated parser */ -var handlebars = (function () { - var parser = { trace: function trace() {}, - yy: {}, - symbols_: { error: 2, root: 3, program: 4, EOF: 5, program_repetition0: 6, statement: 7, mustache: 8, block: 9, rawBlock: 10, partial: 11, content: 12, COMMENT: 13, CONTENT: 14, openRawBlock: 15, END_RAW_BLOCK: 16, OPEN_RAW_BLOCK: 17, helperName: 18, openRawBlock_repetition0: 19, openRawBlock_option0: 20, CLOSE_RAW_BLOCK: 21, openBlock: 22, block_option0: 23, closeBlock: 24, openInverse: 25, block_option1: 26, OPEN_BLOCK: 27, openBlock_repetition0: 28, openBlock_option0: 29, openBlock_option1: 30, CLOSE: 31, OPEN_INVERSE: 32, openInverse_repetition0: 33, openInverse_option0: 34, openInverse_option1: 35, openInverseChain: 36, OPEN_INVERSE_CHAIN: 37, openInverseChain_repetition0: 38, openInverseChain_option0: 39, openInverseChain_option1: 40, inverseAndProgram: 41, INVERSE: 42, inverseChain: 43, inverseChain_option0: 44, OPEN_ENDBLOCK: 45, OPEN: 46, mustache_repetition0: 47, mustache_option0: 48, OPEN_UNESCAPED: 49, mustache_repetition1: 50, mustache_option1: 51, CLOSE_UNESCAPED: 52, OPEN_PARTIAL: 53, partialName: 54, partial_repetition0: 55, partial_option0: 56, param: 57, sexpr: 58, OPEN_SEXPR: 59, sexpr_repetition0: 60, sexpr_option0: 61, CLOSE_SEXPR: 62, hash: 63, hash_repetition_plus0: 64, hashSegment: 65, ID: 66, EQUALS: 67, blockParams: 68, OPEN_BLOCK_PARAMS: 69, blockParams_repetition_plus0: 70, CLOSE_BLOCK_PARAMS: 71, path: 72, dataName: 73, STRING: 74, NUMBER: 75, BOOLEAN: 76, UNDEFINED: 77, NULL: 78, DATA: 79, pathSegments: 80, SEP: 81, $accept: 0, $end: 1 }, - terminals_: { 2: "error", 5: "EOF", 13: "COMMENT", 14: "CONTENT", 16: "END_RAW_BLOCK", 17: "OPEN_RAW_BLOCK", 21: "CLOSE_RAW_BLOCK", 27: "OPEN_BLOCK", 31: "CLOSE", 32: "OPEN_INVERSE", 37: "OPEN_INVERSE_CHAIN", 42: "INVERSE", 45: "OPEN_ENDBLOCK", 46: "OPEN", 49: "OPEN_UNESCAPED", 52: "CLOSE_UNESCAPED", 53: "OPEN_PARTIAL", 59: "OPEN_SEXPR", 62: "CLOSE_SEXPR", 66: "ID", 67: "EQUALS", 69: "OPEN_BLOCK_PARAMS", 71: "CLOSE_BLOCK_PARAMS", 74: "STRING", 75: "NUMBER", 76: "BOOLEAN", 77: "UNDEFINED", 78: "NULL", 79: "DATA", 81: "SEP" }, - productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [12, 1], [10, 3], [15, 5], [9, 4], [9, 4], [22, 6], [25, 6], [36, 6], [41, 2], [43, 3], [43, 1], [24, 3], [8, 5], [8, 5], [11, 5], [57, 1], [57, 1], [58, 5], [63, 1], [65, 3], [68, 3], [18, 1], [18, 1], [18, 1], [18, 1], [18, 1], [18, 1], [18, 1], [54, 1], [54, 1], [73, 2], [72, 1], [80, 3], [80, 1], [6, 0], [6, 2], [19, 0], [19, 2], [20, 0], [20, 1], [23, 0], [23, 1], [26, 0], [26, 1], [28, 0], [28, 2], [29, 0], [29, 1], [30, 0], [30, 1], [33, 0], [33, 2], [34, 0], [34, 1], [35, 0], [35, 1], [38, 0], [38, 2], [39, 0], [39, 1], [40, 0], [40, 1], [44, 0], [44, 1], [47, 0], [47, 2], [48, 0], [48, 1], [50, 0], [50, 2], [51, 0], [51, 1], [55, 0], [55, 2], [56, 0], [56, 1], [60, 0], [60, 2], [61, 0], [61, 1], [64, 1], [64, 2], [70, 1], [70, 2]], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { - - var $0 = $$.length - 1; - switch (yystate) { - case 1: - return $$[$0 - 1]; - break; - case 2: - this.$ = new yy.Program($$[$0], null, {}, yy.locInfo(this._$)); - break; - case 3: - this.$ = $$[$0]; - break; - case 4: - this.$ = $$[$0]; - break; - case 5: - this.$ = $$[$0]; - break; - case 6: - this.$ = $$[$0]; - break; - case 7: - this.$ = $$[$0]; - break; - case 8: - this.$ = new yy.CommentStatement(yy.stripComment($$[$0]), yy.stripFlags($$[$0], $$[$0]), yy.locInfo(this._$)); - break; - case 9: - this.$ = new yy.ContentStatement($$[$0], yy.locInfo(this._$)); - break; - case 10: - this.$ = yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); - break; - case 11: - this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1] }; - break; - case 12: - this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$); - break; - case 13: - this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$); - break; - case 14: - this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; - break; - case 15: - this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; - break; - case 16: - this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; - break; - case 17: - this.$ = { strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]), program: $$[$0] }; - break; - case 18: - var inverse = yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$), - program = new yy.Program([inverse], null, {}, yy.locInfo(this._$)); - program.chained = true; - - this.$ = { strip: $$[$0 - 2].strip, program: program, chain: true }; - - break; - case 19: - this.$ = $$[$0]; - break; - case 20: - this.$ = { path: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 2], $$[$0]) }; - break; - case 21: - this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); - break; - case 22: - this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); - break; - case 23: - this.$ = new yy.PartialStatement($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], yy.stripFlags($$[$0 - 4], $$[$0]), yy.locInfo(this._$)); - break; - case 24: - this.$ = $$[$0]; - break; - case 25: - this.$ = $$[$0]; - break; - case 26: - this.$ = new yy.SubExpression($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], yy.locInfo(this._$)); - break; - case 27: - this.$ = new yy.Hash($$[$0], yy.locInfo(this._$)); - break; - case 28: - this.$ = new yy.HashPair(yy.id($$[$0 - 2]), $$[$0], yy.locInfo(this._$)); - break; - case 29: - this.$ = yy.id($$[$0 - 1]); - break; - case 30: - this.$ = $$[$0]; - break; - case 31: - this.$ = $$[$0]; - break; - case 32: - this.$ = new yy.StringLiteral($$[$0], yy.locInfo(this._$)); - break; - case 33: - this.$ = new yy.NumberLiteral($$[$0], yy.locInfo(this._$)); - break; - case 34: - this.$ = new yy.BooleanLiteral($$[$0], yy.locInfo(this._$)); - break; - case 35: - this.$ = new yy.UndefinedLiteral(yy.locInfo(this._$)); - break; - case 36: - this.$ = new yy.NullLiteral(yy.locInfo(this._$)); - break; - case 37: - this.$ = $$[$0]; - break; - case 38: - this.$ = $$[$0]; - break; - case 39: - this.$ = yy.preparePath(true, $$[$0], this._$); - break; - case 40: - this.$ = yy.preparePath(false, $$[$0], this._$); - break; - case 41: - $$[$0 - 2].push({ part: yy.id($$[$0]), original: $$[$0], separator: $$[$0 - 1] });this.$ = $$[$0 - 2]; - break; - case 42: - this.$ = [{ part: yy.id($$[$0]), original: $$[$0] }]; - break; - case 43: - this.$ = []; - break; - case 44: - $$[$0 - 1].push($$[$0]); - break; - case 45: - this.$ = []; - break; - case 46: - $$[$0 - 1].push($$[$0]); - break; - case 53: - this.$ = []; - break; - case 54: - $$[$0 - 1].push($$[$0]); - break; - case 59: - this.$ = []; - break; - case 60: - $$[$0 - 1].push($$[$0]); - break; - case 65: - this.$ = []; - break; - case 66: - $$[$0 - 1].push($$[$0]); - break; - case 73: - this.$ = []; - break; - case 74: - $$[$0 - 1].push($$[$0]); - break; - case 77: - this.$ = []; - break; - case 78: - $$[$0 - 1].push($$[$0]); - break; - case 81: - this.$ = []; - break; - case 82: - $$[$0 - 1].push($$[$0]); - break; - case 85: - this.$ = []; - break; - case 86: - $$[$0 - 1].push($$[$0]); - break; - case 89: - this.$ = [$$[$0]]; - break; - case 90: - $$[$0 - 1].push($$[$0]); - break; - case 91: - this.$ = [$$[$0]]; - break; - case 92: - $$[$0 - 1].push($$[$0]); - break; - } - }, - table: [{ 3: 1, 4: 2, 5: [2, 43], 6: 3, 13: [2, 43], 14: [2, 43], 17: [2, 43], 27: [2, 43], 32: [2, 43], 46: [2, 43], 49: [2, 43], 53: [2, 43] }, { 1: [3] }, { 5: [1, 4] }, { 5: [2, 2], 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: [1, 11], 14: [1, 18], 15: 16, 17: [1, 21], 22: 14, 25: 15, 27: [1, 19], 32: [1, 20], 37: [2, 2], 42: [2, 2], 45: [2, 2], 46: [1, 12], 49: [1, 13], 53: [1, 17] }, { 1: [2, 1] }, { 5: [2, 44], 13: [2, 44], 14: [2, 44], 17: [2, 44], 27: [2, 44], 32: [2, 44], 37: [2, 44], 42: [2, 44], 45: [2, 44], 46: [2, 44], 49: [2, 44], 53: [2, 44] }, { 5: [2, 3], 13: [2, 3], 14: [2, 3], 17: [2, 3], 27: [2, 3], 32: [2, 3], 37: [2, 3], 42: [2, 3], 45: [2, 3], 46: [2, 3], 49: [2, 3], 53: [2, 3] }, { 5: [2, 4], 13: [2, 4], 14: [2, 4], 17: [2, 4], 27: [2, 4], 32: [2, 4], 37: [2, 4], 42: [2, 4], 45: [2, 4], 46: [2, 4], 49: [2, 4], 53: [2, 4] }, { 5: [2, 5], 13: [2, 5], 14: [2, 5], 17: [2, 5], 27: [2, 5], 32: [2, 5], 37: [2, 5], 42: [2, 5], 45: [2, 5], 46: [2, 5], 49: [2, 5], 53: [2, 5] }, { 5: [2, 6], 13: [2, 6], 14: [2, 6], 17: [2, 6], 27: [2, 6], 32: [2, 6], 37: [2, 6], 42: [2, 6], 45: [2, 6], 46: [2, 6], 49: [2, 6], 53: [2, 6] }, { 5: [2, 7], 13: [2, 7], 14: [2, 7], 17: [2, 7], 27: [2, 7], 32: [2, 7], 37: [2, 7], 42: [2, 7], 45: [2, 7], 46: [2, 7], 49: [2, 7], 53: [2, 7] }, { 5: [2, 8], 13: [2, 8], 14: [2, 8], 17: [2, 8], 27: [2, 8], 32: [2, 8], 37: [2, 8], 42: [2, 8], 45: [2, 8], 46: [2, 8], 49: [2, 8], 53: [2, 8] }, { 18: 22, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 18: 33, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 4: 34, 6: 3, 13: [2, 43], 14: [2, 43], 17: [2, 43], 27: [2, 43], 32: [2, 43], 37: [2, 43], 42: [2, 43], 45: [2, 43], 46: [2, 43], 49: [2, 43], 53: [2, 43] }, { 4: 35, 6: 3, 13: [2, 43], 14: [2, 43], 17: [2, 43], 27: [2, 43], 32: [2, 43], 42: [2, 43], 45: [2, 43], 46: [2, 43], 49: [2, 43], 53: [2, 43] }, { 12: 36, 14: [1, 18] }, { 18: 38, 54: 37, 58: 39, 59: [1, 40], 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 5: [2, 9], 13: [2, 9], 14: [2, 9], 16: [2, 9], 17: [2, 9], 27: [2, 9], 32: [2, 9], 37: [2, 9], 42: [2, 9], 45: [2, 9], 46: [2, 9], 49: [2, 9], 53: [2, 9] }, { 18: 41, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 18: 42, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 18: 43, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 31: [2, 73], 47: 44, 59: [2, 73], 66: [2, 73], 74: [2, 73], 75: [2, 73], 76: [2, 73], 77: [2, 73], 78: [2, 73], 79: [2, 73] }, { 21: [2, 30], 31: [2, 30], 52: [2, 30], 59: [2, 30], 62: [2, 30], 66: [2, 30], 69: [2, 30], 74: [2, 30], 75: [2, 30], 76: [2, 30], 77: [2, 30], 78: [2, 30], 79: [2, 30] }, { 21: [2, 31], 31: [2, 31], 52: [2, 31], 59: [2, 31], 62: [2, 31], 66: [2, 31], 69: [2, 31], 74: [2, 31], 75: [2, 31], 76: [2, 31], 77: [2, 31], 78: [2, 31], 79: [2, 31] }, { 21: [2, 32], 31: [2, 32], 52: [2, 32], 59: [2, 32], 62: [2, 32], 66: [2, 32], 69: [2, 32], 74: [2, 32], 75: [2, 32], 76: [2, 32], 77: [2, 32], 78: [2, 32], 79: [2, 32] }, { 21: [2, 33], 31: [2, 33], 52: [2, 33], 59: [2, 33], 62: [2, 33], 66: [2, 33], 69: [2, 33], 74: [2, 33], 75: [2, 33], 76: [2, 33], 77: [2, 33], 78: [2, 33], 79: [2, 33] }, { 21: [2, 34], 31: [2, 34], 52: [2, 34], 59: [2, 34], 62: [2, 34], 66: [2, 34], 69: [2, 34], 74: [2, 34], 75: [2, 34], 76: [2, 34], 77: [2, 34], 78: [2, 34], 79: [2, 34] }, { 21: [2, 35], 31: [2, 35], 52: [2, 35], 59: [2, 35], 62: [2, 35], 66: [2, 35], 69: [2, 35], 74: [2, 35], 75: [2, 35], 76: [2, 35], 77: [2, 35], 78: [2, 35], 79: [2, 35] }, { 21: [2, 36], 31: [2, 36], 52: [2, 36], 59: [2, 36], 62: [2, 36], 66: [2, 36], 69: [2, 36], 74: [2, 36], 75: [2, 36], 76: [2, 36], 77: [2, 36], 78: [2, 36], 79: [2, 36] }, { 21: [2, 40], 31: [2, 40], 52: [2, 40], 59: [2, 40], 62: [2, 40], 66: [2, 40], 69: [2, 40], 74: [2, 40], 75: [2, 40], 76: [2, 40], 77: [2, 40], 78: [2, 40], 79: [2, 40], 81: [1, 45] }, { 66: [1, 32], 80: 46 }, { 21: [2, 42], 31: [2, 42], 52: [2, 42], 59: [2, 42], 62: [2, 42], 66: [2, 42], 69: [2, 42], 74: [2, 42], 75: [2, 42], 76: [2, 42], 77: [2, 42], 78: [2, 42], 79: [2, 42], 81: [2, 42] }, { 50: 47, 52: [2, 77], 59: [2, 77], 66: [2, 77], 74: [2, 77], 75: [2, 77], 76: [2, 77], 77: [2, 77], 78: [2, 77], 79: [2, 77] }, { 23: 48, 36: 50, 37: [1, 52], 41: 51, 42: [1, 53], 43: 49, 45: [2, 49] }, { 26: 54, 41: 55, 42: [1, 53], 45: [2, 51] }, { 16: [1, 56] }, { 31: [2, 81], 55: 57, 59: [2, 81], 66: [2, 81], 74: [2, 81], 75: [2, 81], 76: [2, 81], 77: [2, 81], 78: [2, 81], 79: [2, 81] }, { 31: [2, 37], 59: [2, 37], 66: [2, 37], 74: [2, 37], 75: [2, 37], 76: [2, 37], 77: [2, 37], 78: [2, 37], 79: [2, 37] }, { 31: [2, 38], 59: [2, 38], 66: [2, 38], 74: [2, 38], 75: [2, 38], 76: [2, 38], 77: [2, 38], 78: [2, 38], 79: [2, 38] }, { 18: 58, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 28: 59, 31: [2, 53], 59: [2, 53], 66: [2, 53], 69: [2, 53], 74: [2, 53], 75: [2, 53], 76: [2, 53], 77: [2, 53], 78: [2, 53], 79: [2, 53] }, { 31: [2, 59], 33: 60, 59: [2, 59], 66: [2, 59], 69: [2, 59], 74: [2, 59], 75: [2, 59], 76: [2, 59], 77: [2, 59], 78: [2, 59], 79: [2, 59] }, { 19: 61, 21: [2, 45], 59: [2, 45], 66: [2, 45], 74: [2, 45], 75: [2, 45], 76: [2, 45], 77: [2, 45], 78: [2, 45], 79: [2, 45] }, { 18: 65, 31: [2, 75], 48: 62, 57: 63, 58: 66, 59: [1, 40], 63: 64, 64: 67, 65: 68, 66: [1, 69], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 66: [1, 70] }, { 21: [2, 39], 31: [2, 39], 52: [2, 39], 59: [2, 39], 62: [2, 39], 66: [2, 39], 69: [2, 39], 74: [2, 39], 75: [2, 39], 76: [2, 39], 77: [2, 39], 78: [2, 39], 79: [2, 39], 81: [1, 45] }, { 18: 65, 51: 71, 52: [2, 79], 57: 72, 58: 66, 59: [1, 40], 63: 73, 64: 67, 65: 68, 66: [1, 69], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 24: 74, 45: [1, 75] }, { 45: [2, 50] }, { 4: 76, 6: 3, 13: [2, 43], 14: [2, 43], 17: [2, 43], 27: [2, 43], 32: [2, 43], 37: [2, 43], 42: [2, 43], 45: [2, 43], 46: [2, 43], 49: [2, 43], 53: [2, 43] }, { 45: [2, 19] }, { 18: 77, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 4: 78, 6: 3, 13: [2, 43], 14: [2, 43], 17: [2, 43], 27: [2, 43], 32: [2, 43], 45: [2, 43], 46: [2, 43], 49: [2, 43], 53: [2, 43] }, { 24: 79, 45: [1, 75] }, { 45: [2, 52] }, { 5: [2, 10], 13: [2, 10], 14: [2, 10], 17: [2, 10], 27: [2, 10], 32: [2, 10], 37: [2, 10], 42: [2, 10], 45: [2, 10], 46: [2, 10], 49: [2, 10], 53: [2, 10] }, { 18: 65, 31: [2, 83], 56: 80, 57: 81, 58: 66, 59: [1, 40], 63: 82, 64: 67, 65: 68, 66: [1, 69], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 59: [2, 85], 60: 83, 62: [2, 85], 66: [2, 85], 74: [2, 85], 75: [2, 85], 76: [2, 85], 77: [2, 85], 78: [2, 85], 79: [2, 85] }, { 18: 65, 29: 84, 31: [2, 55], 57: 85, 58: 66, 59: [1, 40], 63: 86, 64: 67, 65: 68, 66: [1, 69], 69: [2, 55], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 18: 65, 31: [2, 61], 34: 87, 57: 88, 58: 66, 59: [1, 40], 63: 89, 64: 67, 65: 68, 66: [1, 69], 69: [2, 61], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 18: 65, 20: 90, 21: [2, 47], 57: 91, 58: 66, 59: [1, 40], 63: 92, 64: 67, 65: 68, 66: [1, 69], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 31: [1, 93] }, { 31: [2, 74], 59: [2, 74], 66: [2, 74], 74: [2, 74], 75: [2, 74], 76: [2, 74], 77: [2, 74], 78: [2, 74], 79: [2, 74] }, { 31: [2, 76] }, { 21: [2, 24], 31: [2, 24], 52: [2, 24], 59: [2, 24], 62: [2, 24], 66: [2, 24], 69: [2, 24], 74: [2, 24], 75: [2, 24], 76: [2, 24], 77: [2, 24], 78: [2, 24], 79: [2, 24] }, { 21: [2, 25], 31: [2, 25], 52: [2, 25], 59: [2, 25], 62: [2, 25], 66: [2, 25], 69: [2, 25], 74: [2, 25], 75: [2, 25], 76: [2, 25], 77: [2, 25], 78: [2, 25], 79: [2, 25] }, { 21: [2, 27], 31: [2, 27], 52: [2, 27], 62: [2, 27], 65: 94, 66: [1, 95], 69: [2, 27] }, { 21: [2, 89], 31: [2, 89], 52: [2, 89], 62: [2, 89], 66: [2, 89], 69: [2, 89] }, { 21: [2, 42], 31: [2, 42], 52: [2, 42], 59: [2, 42], 62: [2, 42], 66: [2, 42], 67: [1, 96], 69: [2, 42], 74: [2, 42], 75: [2, 42], 76: [2, 42], 77: [2, 42], 78: [2, 42], 79: [2, 42], 81: [2, 42] }, { 21: [2, 41], 31: [2, 41], 52: [2, 41], 59: [2, 41], 62: [2, 41], 66: [2, 41], 69: [2, 41], 74: [2, 41], 75: [2, 41], 76: [2, 41], 77: [2, 41], 78: [2, 41], 79: [2, 41], 81: [2, 41] }, { 52: [1, 97] }, { 52: [2, 78], 59: [2, 78], 66: [2, 78], 74: [2, 78], 75: [2, 78], 76: [2, 78], 77: [2, 78], 78: [2, 78], 79: [2, 78] }, { 52: [2, 80] }, { 5: [2, 12], 13: [2, 12], 14: [2, 12], 17: [2, 12], 27: [2, 12], 32: [2, 12], 37: [2, 12], 42: [2, 12], 45: [2, 12], 46: [2, 12], 49: [2, 12], 53: [2, 12] }, { 18: 98, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 36: 50, 37: [1, 52], 41: 51, 42: [1, 53], 43: 100, 44: 99, 45: [2, 71] }, { 31: [2, 65], 38: 101, 59: [2, 65], 66: [2, 65], 69: [2, 65], 74: [2, 65], 75: [2, 65], 76: [2, 65], 77: [2, 65], 78: [2, 65], 79: [2, 65] }, { 45: [2, 17] }, { 5: [2, 13], 13: [2, 13], 14: [2, 13], 17: [2, 13], 27: [2, 13], 32: [2, 13], 37: [2, 13], 42: [2, 13], 45: [2, 13], 46: [2, 13], 49: [2, 13], 53: [2, 13] }, { 31: [1, 102] }, { 31: [2, 82], 59: [2, 82], 66: [2, 82], 74: [2, 82], 75: [2, 82], 76: [2, 82], 77: [2, 82], 78: [2, 82], 79: [2, 82] }, { 31: [2, 84] }, { 18: 65, 57: 104, 58: 66, 59: [1, 40], 61: 103, 62: [2, 87], 63: 105, 64: 67, 65: 68, 66: [1, 69], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 30: 106, 31: [2, 57], 68: 107, 69: [1, 108] }, { 31: [2, 54], 59: [2, 54], 66: [2, 54], 69: [2, 54], 74: [2, 54], 75: [2, 54], 76: [2, 54], 77: [2, 54], 78: [2, 54], 79: [2, 54] }, { 31: [2, 56], 69: [2, 56] }, { 31: [2, 63], 35: 109, 68: 110, 69: [1, 108] }, { 31: [2, 60], 59: [2, 60], 66: [2, 60], 69: [2, 60], 74: [2, 60], 75: [2, 60], 76: [2, 60], 77: [2, 60], 78: [2, 60], 79: [2, 60] }, { 31: [2, 62], 69: [2, 62] }, { 21: [1, 111] }, { 21: [2, 46], 59: [2, 46], 66: [2, 46], 74: [2, 46], 75: [2, 46], 76: [2, 46], 77: [2, 46], 78: [2, 46], 79: [2, 46] }, { 21: [2, 48] }, { 5: [2, 21], 13: [2, 21], 14: [2, 21], 17: [2, 21], 27: [2, 21], 32: [2, 21], 37: [2, 21], 42: [2, 21], 45: [2, 21], 46: [2, 21], 49: [2, 21], 53: [2, 21] }, { 21: [2, 90], 31: [2, 90], 52: [2, 90], 62: [2, 90], 66: [2, 90], 69: [2, 90] }, { 67: [1, 96] }, { 18: 65, 57: 112, 58: 66, 59: [1, 40], 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 5: [2, 22], 13: [2, 22], 14: [2, 22], 17: [2, 22], 27: [2, 22], 32: [2, 22], 37: [2, 22], 42: [2, 22], 45: [2, 22], 46: [2, 22], 49: [2, 22], 53: [2, 22] }, { 31: [1, 113] }, { 45: [2, 18] }, { 45: [2, 72] }, { 18: 65, 31: [2, 67], 39: 114, 57: 115, 58: 66, 59: [1, 40], 63: 116, 64: 67, 65: 68, 66: [1, 69], 69: [2, 67], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 5: [2, 23], 13: [2, 23], 14: [2, 23], 17: [2, 23], 27: [2, 23], 32: [2, 23], 37: [2, 23], 42: [2, 23], 45: [2, 23], 46: [2, 23], 49: [2, 23], 53: [2, 23] }, { 62: [1, 117] }, { 59: [2, 86], 62: [2, 86], 66: [2, 86], 74: [2, 86], 75: [2, 86], 76: [2, 86], 77: [2, 86], 78: [2, 86], 79: [2, 86] }, { 62: [2, 88] }, { 31: [1, 118] }, { 31: [2, 58] }, { 66: [1, 120], 70: 119 }, { 31: [1, 121] }, { 31: [2, 64] }, { 14: [2, 11] }, { 21: [2, 28], 31: [2, 28], 52: [2, 28], 62: [2, 28], 66: [2, 28], 69: [2, 28] }, { 5: [2, 20], 13: [2, 20], 14: [2, 20], 17: [2, 20], 27: [2, 20], 32: [2, 20], 37: [2, 20], 42: [2, 20], 45: [2, 20], 46: [2, 20], 49: [2, 20], 53: [2, 20] }, { 31: [2, 69], 40: 122, 68: 123, 69: [1, 108] }, { 31: [2, 66], 59: [2, 66], 66: [2, 66], 69: [2, 66], 74: [2, 66], 75: [2, 66], 76: [2, 66], 77: [2, 66], 78: [2, 66], 79: [2, 66] }, { 31: [2, 68], 69: [2, 68] }, { 21: [2, 26], 31: [2, 26], 52: [2, 26], 59: [2, 26], 62: [2, 26], 66: [2, 26], 69: [2, 26], 74: [2, 26], 75: [2, 26], 76: [2, 26], 77: [2, 26], 78: [2, 26], 79: [2, 26] }, { 13: [2, 14], 14: [2, 14], 17: [2, 14], 27: [2, 14], 32: [2, 14], 37: [2, 14], 42: [2, 14], 45: [2, 14], 46: [2, 14], 49: [2, 14], 53: [2, 14] }, { 66: [1, 125], 71: [1, 124] }, { 66: [2, 91], 71: [2, 91] }, { 13: [2, 15], 14: [2, 15], 17: [2, 15], 27: [2, 15], 32: [2, 15], 42: [2, 15], 45: [2, 15], 46: [2, 15], 49: [2, 15], 53: [2, 15] }, { 31: [1, 126] }, { 31: [2, 70] }, { 31: [2, 29] }, { 66: [2, 92], 71: [2, 92] }, { 13: [2, 16], 14: [2, 16], 17: [2, 16], 27: [2, 16], 32: [2, 16], 37: [2, 16], 42: [2, 16], 45: [2, 16], 46: [2, 16], 49: [2, 16], 53: [2, 16] }], - defaultActions: { 4: [2, 1], 49: [2, 50], 51: [2, 19], 55: [2, 52], 64: [2, 76], 73: [2, 80], 78: [2, 17], 82: [2, 84], 92: [2, 48], 99: [2, 18], 100: [2, 72], 105: [2, 88], 107: [2, 58], 110: [2, 64], 111: [2, 11], 123: [2, 70], 124: [2, 29] }, - parseError: function parseError(str, hash) { - throw new Error(str); - }, - parse: function parse(input) { - var self = this, - stack = [0], - vstack = [null], - lstack = [], - table = this.table, - yytext = "", - yylineno = 0, - yyleng = 0, - recovering = 0, - TERROR = 2, - EOF = 1; - this.lexer.setInput(input); - this.lexer.yy = this.yy; - this.yy.lexer = this.lexer; - this.yy.parser = this; - if (typeof this.lexer.yylloc == "undefined") this.lexer.yylloc = {}; - var yyloc = this.lexer.yylloc; - lstack.push(yyloc); - var ranges = this.lexer.options && this.lexer.options.ranges; - if (typeof this.yy.parseError === "function") this.parseError = this.yy.parseError; - function popStack(n) { - stack.length = stack.length - 2 * n; - vstack.length = vstack.length - n; - lstack.length = lstack.length - n; - } - function lex() { - var token; - token = self.lexer.lex() || 1; - if (typeof token !== "number") { - token = self.symbols_[token] || token; - } - return token; - } - var symbol, - preErrorSymbol, - state, - action, - a, - r, - yyval = {}, - p, - len, - newState, - expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - if (!recovering) { - expected = []; - for (p in table[state]) if (this.terminals_[p] && p > 2) { - expected.push("'" + this.terminals_[p] + "'"); - } - if (this.lexer.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1 ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected }); - } - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(this.lexer.yytext); - lstack.push(this.lexer.yylloc); - stack.push(action[1]); - symbol = null; - if (!preErrorSymbol) { - yyleng = this.lexer.yyleng; - yytext = this.lexer.yytext; - yylineno = this.lexer.yylineno; - yyloc = this.lexer.yylloc; - if (recovering > 0) recovering--; - } else { - symbol = preErrorSymbol; - preErrorSymbol = null; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column }; - if (ranges) { - yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]]; - } - r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; - } - }; - /* Jison generated lexer */ - var lexer = (function () { - var lexer = { EOF: 1, - parseError: function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - setInput: function setInput(input) { - this._input = input; - this._more = this._less = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ""; - this.conditionStack = ["INITIAL"]; - this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 }; - if (this.options.ranges) this.yylloc.range = [0, 0]; - this.offset = 0; - return this; - }, - input: function input() { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) this.yylloc.range[1]++; - - this._input = this._input.slice(1); - return ch; - }, - unput: function unput(ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len - 1); - //this.yyleng -= len; - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - - if (lines.length - 1) this.yylineno -= lines.length - 1; - var r = this.yylloc.range; - - this.yylloc = { first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len - }; - - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - return this; - }, - more: function more() { - this._more = true; - return this; - }, - less: function less(n) { - this.unput(this.match.slice(n)); - }, - pastInput: function pastInput() { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); - }, - upcomingInput: function upcomingInput() { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20 - next.length); - } - return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); - }, - showPosition: function showPosition() { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - next: function next() { - if (this.done) { - return this.EOF; - } - if (!this._input) this.done = true; - - var token, match, tempMatch, index, col, lines; - if (!this._more) { - this.yytext = ""; - this.match = ""; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (!this.options.flex) break; - } - } - if (match) { - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) this.yylineno += lines.length; - this.yylloc = { first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) this.done = false; - if (token) { - return token; - } else { - return; - } - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { text: "", token: null, line: this.yylineno }); - } - }, - lex: function lex() { - var r = this.next(); - if (typeof r !== "undefined") { - return r; - } else { - return this.lex(); - } - }, - begin: function begin(condition) { - this.conditionStack.push(condition); - }, - popState: function popState() { - return this.conditionStack.pop(); - }, - _currentRules: function _currentRules() { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - }, - topState: function topState() { - return this.conditionStack[this.conditionStack.length - 2]; - }, - pushState: function begin(condition) { - this.begin(condition); - } }; - lexer.options = {}; - lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { - - function strip(start, end) { - return yy_.yytext = yy_.yytext.substr(start, yy_.yyleng - end); - } - - var YYSTATE = YY_START; - switch ($avoiding_name_collisions) { - case 0: - if (yy_.yytext.slice(-2) === "\\\\") { - strip(0, 1); - this.begin("mu"); - } else if (yy_.yytext.slice(-1) === "\\") { - strip(0, 1); - this.begin("emu"); - } else { - this.begin("mu"); - } - if (yy_.yytext) { - return 14; - }break; - case 1: - return 14; - break; - case 2: - this.popState(); - return 14; - - break; - case 3: - yy_.yytext = yy_.yytext.substr(5, yy_.yyleng - 9); - this.popState(); - return 16; - - break; - case 4: - return 14; - break; - case 5: - this.popState(); - return 13; - - break; - case 6: - return 59; - break; - case 7: - return 62; - break; - case 8: - return 17; - break; - case 9: - this.popState(); - this.begin("raw"); - return 21; - - break; - case 10: - return 53; - break; - case 11: - return 27; - break; - case 12: - return 45; - break; - case 13: - this.popState();return 42; - break; - case 14: - this.popState();return 42; - break; - case 15: - return 32; - break; - case 16: - return 37; - break; - case 17: - return 49; - break; - case 18: - return 46; - break; - case 19: - this.unput(yy_.yytext); - this.popState(); - this.begin("com"); - - break; - case 20: - this.popState(); - return 13; - - break; - case 21: - return 46; - break; - case 22: - return 67; - break; - case 23: - return 66; - break; - case 24: - return 66; - break; - case 25: - return 81; - break; - case 26: - // ignore whitespace - break; - case 27: - this.popState();return 52; - break; - case 28: - this.popState();return 31; - break; - case 29: - yy_.yytext = strip(1, 2).replace(/\\"/g, "\"");return 74; - break; - case 30: - yy_.yytext = strip(1, 2).replace(/\\'/g, "'");return 74; - break; - case 31: - return 79; - break; - case 32: - return 76; - break; - case 33: - return 76; - break; - case 34: - return 77; - break; - case 35: - return 78; - break; - case 36: - return 75; - break; - case 37: - return 69; - break; - case 38: - return 71; - break; - case 39: - return 66; - break; - case 40: - return 66; - break; - case 41: - return "INVALID"; - break; - case 42: - return 5; - break; - } - }; - lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]*?(?=(\{\{\{\{\/)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[[^\]]*\])/, /^(?:.)/, /^(?:$)/]; - lexer.conditions = { mu: { rules: [6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42], inclusive: false }, emu: { rules: [2], inclusive: false }, com: { rules: [5], inclusive: false }, raw: { rules: [3, 4], inclusive: false }, INITIAL: { rules: [0, 1, 42], inclusive: true } }; - return lexer; - })(); - parser.lexer = lexer; - function Parser() { - this.yy = {}; - }Parser.prototype = parser;parser.Parser = Parser; - return new Parser(); -})();exports["default"] = handlebars; -module.exports = exports["default"]; \ No newline at end of file diff --git a/node_modules/handlebars/dist/cjs/handlebars/compiler/printer.js b/node_modules/handlebars/dist/cjs/handlebars/compiler/printer.js deleted file mode 100644 index 8caebf6..0000000 --- a/node_modules/handlebars/dist/cjs/handlebars/compiler/printer.js +++ /dev/null @@ -1,165 +0,0 @@ -'use strict'; - -var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - -exports.__esModule = true; -exports.print = print; -exports.PrintVisitor = PrintVisitor; -/*eslint-disable new-cap */ - -var _Visitor = require('./visitor'); - -var _Visitor2 = _interopRequireWildcard(_Visitor); - -function print(ast) { - return new PrintVisitor().accept(ast); -} - -function PrintVisitor() { - this.padding = 0; -} - -PrintVisitor.prototype = new _Visitor2['default'](); - -PrintVisitor.prototype.pad = function (string) { - var out = ''; - - for (var i = 0, l = this.padding; i < l; i++) { - out = out + ' '; - } - - out = out + string + '\n'; - return out; -}; - -PrintVisitor.prototype.Program = function (program) { - var out = '', - body = program.body, - i = undefined, - l = undefined; - - if (program.blockParams) { - var blockParams = 'BLOCK PARAMS: ['; - for (i = 0, l = program.blockParams.length; i < l; i++) { - blockParams += ' ' + program.blockParams[i]; - } - blockParams += ' ]'; - out += this.pad(blockParams); - } - - for (i = 0, l = body.length; i < l; i++) { - out = out + this.accept(body[i]); - } - - this.padding--; - - return out; -}; - -PrintVisitor.prototype.MustacheStatement = function (mustache) { - return this.pad('{{ ' + this.SubExpression(mustache) + ' }}'); -}; - -PrintVisitor.prototype.BlockStatement = function (block) { - var out = ''; - - out = out + this.pad('BLOCK:'); - this.padding++; - out = out + this.pad(this.SubExpression(block)); - if (block.program) { - out = out + this.pad('PROGRAM:'); - this.padding++; - out = out + this.accept(block.program); - this.padding--; - } - if (block.inverse) { - if (block.program) { - this.padding++; - } - out = out + this.pad('{{^}}'); - this.padding++; - out = out + this.accept(block.inverse); - this.padding--; - if (block.program) { - this.padding--; - } - } - this.padding--; - - return out; -}; - -PrintVisitor.prototype.PartialStatement = function (partial) { - var content = 'PARTIAL:' + partial.name.original; - if (partial.params[0]) { - content += ' ' + this.accept(partial.params[0]); - } - if (partial.hash) { - content += ' ' + this.accept(partial.hash); - } - return this.pad('{{> ' + content + ' }}'); -}; - -PrintVisitor.prototype.ContentStatement = function (content) { - return this.pad('CONTENT[ \'' + content.value + '\' ]'); -}; - -PrintVisitor.prototype.CommentStatement = function (comment) { - return this.pad('{{! \'' + comment.value + '\' }}'); -}; - -PrintVisitor.prototype.SubExpression = function (sexpr) { - var params = sexpr.params, - paramStrings = [], - hash = undefined; - - for (var i = 0, l = params.length; i < l; i++) { - paramStrings.push(this.accept(params[i])); - } - - params = '[' + paramStrings.join(', ') + ']'; - - hash = sexpr.hash ? ' ' + this.accept(sexpr.hash) : ''; - - return this.accept(sexpr.path) + ' ' + params + hash; -}; - -PrintVisitor.prototype.PathExpression = function (id) { - var path = id.parts.join('/'); - return (id.data ? '@' : '') + 'PATH:' + path; -}; - -PrintVisitor.prototype.StringLiteral = function (string) { - return '"' + string.value + '"'; -}; - -PrintVisitor.prototype.NumberLiteral = function (number) { - return 'NUMBER{' + number.value + '}'; -}; - -PrintVisitor.prototype.BooleanLiteral = function (bool) { - return 'BOOLEAN{' + bool.value + '}'; -}; - -PrintVisitor.prototype.UndefinedLiteral = function () { - return 'UNDEFINED'; -}; - -PrintVisitor.prototype.NullLiteral = function () { - return 'NULL'; -}; - -PrintVisitor.prototype.Hash = function (hash) { - var pairs = hash.pairs, - joinedPairs = []; - - for (var i = 0, l = pairs.length; i < l; i++) { - joinedPairs.push(this.accept(pairs[i])); - } - - return 'HASH{' + joinedPairs.join(', ') + '}'; -}; -PrintVisitor.prototype.HashPair = function (pair) { - return pair.key + '=' + this.accept(pair.value); -}; -/*eslint-enable new-cap */ \ No newline at end of file diff --git a/node_modules/handlebars/dist/cjs/handlebars/compiler/visitor.js b/node_modules/handlebars/dist/cjs/handlebars/compiler/visitor.js deleted file mode 100644 index d5a909b..0000000 --- a/node_modules/handlebars/dist/cjs/handlebars/compiler/visitor.js +++ /dev/null @@ -1,132 +0,0 @@ -'use strict'; - -var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - -exports.__esModule = true; - -var _Exception = require('../exception'); - -var _Exception2 = _interopRequireWildcard(_Exception); - -var _AST = require('./ast'); - -var _AST2 = _interopRequireWildcard(_AST); - -function Visitor() { - this.parents = []; -} - -Visitor.prototype = { - constructor: Visitor, - mutating: false, - - // Visits a given value. If mutating, will replace the value if necessary. - acceptKey: function acceptKey(node, name) { - var value = this.accept(node[name]); - if (this.mutating) { - // Hacky sanity check: - if (value && (!value.type || !_AST2['default'][value.type])) { - throw new _Exception2['default']('Unexpected node type "' + value.type + '" found when accepting ' + name + ' on ' + node.type); - } - node[name] = value; - } - }, - - // Performs an accept operation with added sanity check to ensure - // required keys are not removed. - acceptRequired: function acceptRequired(node, name) { - this.acceptKey(node, name); - - if (!node[name]) { - throw new _Exception2['default'](node.type + ' requires ' + name); - } - }, - - // Traverses a given array. If mutating, empty respnses will be removed - // for child elements. - acceptArray: function acceptArray(array) { - for (var i = 0, l = array.length; i < l; i++) { - this.acceptKey(array, i); - - if (!array[i]) { - array.splice(i, 1); - i--; - l--; - } - } - }, - - accept: function accept(object) { - if (!object) { - return; - } - - if (this.current) { - this.parents.unshift(this.current); - } - this.current = object; - - var ret = this[object.type](object); - - this.current = this.parents.shift(); - - if (!this.mutating || ret) { - return ret; - } else if (ret !== false) { - return object; - } - }, - - Program: function Program(program) { - this.acceptArray(program.body); - }, - - MustacheStatement: function MustacheStatement(mustache) { - this.acceptRequired(mustache, 'path'); - this.acceptArray(mustache.params); - this.acceptKey(mustache, 'hash'); - }, - - BlockStatement: function BlockStatement(block) { - this.acceptRequired(block, 'path'); - this.acceptArray(block.params); - this.acceptKey(block, 'hash'); - - this.acceptKey(block, 'program'); - this.acceptKey(block, 'inverse'); - }, - - PartialStatement: function PartialStatement(partial) { - this.acceptRequired(partial, 'name'); - this.acceptArray(partial.params); - this.acceptKey(partial, 'hash'); - }, - - ContentStatement: function ContentStatement() {}, - CommentStatement: function CommentStatement() {}, - - SubExpression: function SubExpression(sexpr) { - this.acceptRequired(sexpr, 'path'); - this.acceptArray(sexpr.params); - this.acceptKey(sexpr, 'hash'); - }, - - PathExpression: function PathExpression() {}, - - StringLiteral: function StringLiteral() {}, - NumberLiteral: function NumberLiteral() {}, - BooleanLiteral: function BooleanLiteral() {}, - UndefinedLiteral: function UndefinedLiteral() {}, - NullLiteral: function NullLiteral() {}, - - Hash: function Hash(hash) { - this.acceptArray(hash.pairs); - }, - HashPair: function HashPair(pair) { - this.acceptRequired(pair, 'value'); - } -}; - -exports['default'] = Visitor; -module.exports = exports['default']; -/* content */ /* comment */ /* path */ /* string */ /* number */ /* bool */ /* literal */ /* literal */ \ No newline at end of file diff --git a/node_modules/handlebars/dist/cjs/handlebars/compiler/whitespace-control.js b/node_modules/handlebars/dist/cjs/handlebars/compiler/whitespace-control.js deleted file mode 100644 index a8bc936..0000000 --- a/node_modules/handlebars/dist/cjs/handlebars/compiler/whitespace-control.js +++ /dev/null @@ -1,212 +0,0 @@ -'use strict'; - -var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - -exports.__esModule = true; - -var _Visitor = require('./visitor'); - -var _Visitor2 = _interopRequireWildcard(_Visitor); - -function WhitespaceControl() {} -WhitespaceControl.prototype = new _Visitor2['default'](); - -WhitespaceControl.prototype.Program = function (program) { - var isRoot = !this.isRootSeen; - this.isRootSeen = true; - - var body = program.body; - for (var i = 0, l = body.length; i < l; i++) { - var current = body[i], - strip = this.accept(current); - - if (!strip) { - continue; - } - - var _isPrevWhitespace = isPrevWhitespace(body, i, isRoot), - _isNextWhitespace = isNextWhitespace(body, i, isRoot), - openStandalone = strip.openStandalone && _isPrevWhitespace, - closeStandalone = strip.closeStandalone && _isNextWhitespace, - inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace; - - if (strip.close) { - omitRight(body, i, true); - } - if (strip.open) { - omitLeft(body, i, true); - } - - if (inlineStandalone) { - omitRight(body, i); - - if (omitLeft(body, i)) { - // If we are on a standalone node, save the indent info for partials - if (current.type === 'PartialStatement') { - // Pull out the whitespace from the final line - current.indent = /([ \t]+$)/.exec(body[i - 1].original)[1]; - } - } - } - if (openStandalone) { - omitRight((current.program || current.inverse).body); - - // Strip out the previous content node if it's whitespace only - omitLeft(body, i); - } - if (closeStandalone) { - // Always strip the next node - omitRight(body, i); - - omitLeft((current.inverse || current.program).body); - } - } - - return program; -}; -WhitespaceControl.prototype.BlockStatement = function (block) { - this.accept(block.program); - this.accept(block.inverse); - - // Find the inverse program that is involed with whitespace stripping. - var program = block.program || block.inverse, - inverse = block.program && block.inverse, - firstInverse = inverse, - lastInverse = inverse; - - if (inverse && inverse.chained) { - firstInverse = inverse.body[0].program; - - // Walk the inverse chain to find the last inverse that is actually in the chain. - while (lastInverse.chained) { - lastInverse = lastInverse.body[lastInverse.body.length - 1].program; - } - } - - var strip = { - open: block.openStrip.open, - close: block.closeStrip.close, - - // Determine the standalone candiacy. Basically flag our content as being possibly standalone - // so our parent can determine if we actually are standalone - openStandalone: isNextWhitespace(program.body), - closeStandalone: isPrevWhitespace((firstInverse || program).body) - }; - - if (block.openStrip.close) { - omitRight(program.body, null, true); - } - - if (inverse) { - var inverseStrip = block.inverseStrip; - - if (inverseStrip.open) { - omitLeft(program.body, null, true); - } - - if (inverseStrip.close) { - omitRight(firstInverse.body, null, true); - } - if (block.closeStrip.open) { - omitLeft(lastInverse.body, null, true); - } - - // Find standalone else statments - if (isPrevWhitespace(program.body) && isNextWhitespace(firstInverse.body)) { - omitLeft(program.body); - omitRight(firstInverse.body); - } - } else if (block.closeStrip.open) { - omitLeft(program.body, null, true); - } - - return strip; -}; - -WhitespaceControl.prototype.MustacheStatement = function (mustache) { - return mustache.strip; -}; - -WhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function (node) { - /* istanbul ignore next */ - var strip = node.strip || {}; - return { - inlineStandalone: true, - open: strip.open, - close: strip.close - }; -}; - -function isPrevWhitespace(body, i, isRoot) { - if (i === undefined) { - i = body.length; - } - - // Nodes that end with newlines are considered whitespace (but are special - // cased for strip operations) - var prev = body[i - 1], - sibling = body[i - 2]; - if (!prev) { - return isRoot; - } - - if (prev.type === 'ContentStatement') { - return (sibling || !isRoot ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(prev.original); - } -} -function isNextWhitespace(body, i, isRoot) { - if (i === undefined) { - i = -1; - } - - var next = body[i + 1], - sibling = body[i + 2]; - if (!next) { - return isRoot; - } - - if (next.type === 'ContentStatement') { - return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(next.original); - } -} - -// Marks the node to the right of the position as omitted. -// I.e. {{foo}}' ' will mark the ' ' node as omitted. -// -// If i is undefined, then the first child will be marked as such. -// -// If mulitple is truthy then all whitespace will be stripped out until non-whitespace -// content is met. -function omitRight(body, i, multiple) { - var current = body[i == null ? 0 : i + 1]; - if (!current || current.type !== 'ContentStatement' || !multiple && current.rightStripped) { - return; - } - - var original = current.value; - current.value = current.value.replace(multiple ? /^\s+/ : /^[ \t]*\r?\n?/, ''); - current.rightStripped = current.value !== original; -} - -// Marks the node to the left of the position as omitted. -// I.e. ' '{{foo}} will mark the ' ' node as omitted. -// -// If i is undefined then the last child will be marked as such. -// -// If mulitple is truthy then all whitespace will be stripped out until non-whitespace -// content is met. -function omitLeft(body, i, multiple) { - var current = body[i == null ? body.length - 1 : i - 1]; - if (!current || current.type !== 'ContentStatement' || !multiple && current.leftStripped) { - return; - } - - // We omit the last node if it's whitespace only and not preceeded by a non-content node. - var original = current.value; - current.value = current.value.replace(multiple ? /\s+$/ : /[ \t]+$/, ''); - current.leftStripped = current.value !== original; - return current.leftStripped; -} - -exports['default'] = WhitespaceControl; -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/handlebars/dist/cjs/handlebars/exception.js b/node_modules/handlebars/dist/cjs/handlebars/exception.js deleted file mode 100644 index 9bf550a..0000000 --- a/node_modules/handlebars/dist/cjs/handlebars/exception.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -exports.__esModule = true; - -var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack']; - -function Exception(message, node) { - var loc = node && node.loc, - line = undefined, - column = undefined; - if (loc) { - line = loc.start.line; - column = loc.start.column; - - message += ' - ' + line + ':' + column; - } - - var tmp = Error.prototype.constructor.call(this, message); - - // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. - for (var idx = 0; idx < errorProps.length; idx++) { - this[errorProps[idx]] = tmp[errorProps[idx]]; - } - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, Exception); - } - - if (loc) { - this.lineNumber = line; - this.column = column; - } -} - -Exception.prototype = new Error(); - -exports['default'] = Exception; -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/handlebars/dist/cjs/handlebars/no-conflict.js b/node_modules/handlebars/dist/cjs/handlebars/no-conflict.js deleted file mode 100644 index 149e421..0000000 --- a/node_modules/handlebars/dist/cjs/handlebars/no-conflict.js +++ /dev/null @@ -1,18 +0,0 @@ -'use strict'; - -exports.__esModule = true; -/*global window */ - -exports['default'] = function (Handlebars) { - /* istanbul ignore next */ - var root = typeof global !== 'undefined' ? global : window, - $Handlebars = root.Handlebars; - /* istanbul ignore next */ - Handlebars.noConflict = function () { - if (root.Handlebars === Handlebars) { - root.Handlebars = $Handlebars; - } - }; -}; - -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/handlebars/dist/cjs/handlebars/runtime.js b/node_modules/handlebars/dist/cjs/handlebars/runtime.js deleted file mode 100644 index 188ac80..0000000 --- a/node_modules/handlebars/dist/cjs/handlebars/runtime.js +++ /dev/null @@ -1,232 +0,0 @@ -'use strict'; - -var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - -exports.__esModule = true; -exports.checkRevision = checkRevision; - -// TODO: Remove this line and break up compilePartial - -exports.template = template; -exports.wrapProgram = wrapProgram; -exports.resolvePartial = resolvePartial; -exports.invokePartial = invokePartial; -exports.noop = noop; - -var _import = require('./utils'); - -var Utils = _interopRequireWildcard(_import); - -var _Exception = require('./exception'); - -var _Exception2 = _interopRequireWildcard(_Exception); - -var _COMPILER_REVISION$REVISION_CHANGES$createFrame = require('./base'); - -function checkRevision(compilerInfo) { - var compilerRevision = compilerInfo && compilerInfo[0] || 1, - currentRevision = _COMPILER_REVISION$REVISION_CHANGES$createFrame.COMPILER_REVISION; - - if (compilerRevision !== currentRevision) { - if (compilerRevision < currentRevision) { - var runtimeVersions = _COMPILER_REVISION$REVISION_CHANGES$createFrame.REVISION_CHANGES[currentRevision], - compilerVersions = _COMPILER_REVISION$REVISION_CHANGES$createFrame.REVISION_CHANGES[compilerRevision]; - throw new _Exception2['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').'); - } else { - // Use the embedded version info since the runtime doesn't know about this revision yet - throw new _Exception2['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').'); - } - } -} - -function template(templateSpec, env) { - /* istanbul ignore next */ - if (!env) { - throw new _Exception2['default']('No environment passed to template'); - } - if (!templateSpec || !templateSpec.main) { - throw new _Exception2['default']('Unknown template object: ' + typeof templateSpec); - } - - // Note: Using env.VM references rather than local var references throughout this section to allow - // for external users to override these as psuedo-supported APIs. - env.VM.checkRevision(templateSpec.compiler); - - function invokePartialWrapper(partial, context, options) { - if (options.hash) { - context = Utils.extend({}, context, options.hash); - } - - partial = env.VM.resolvePartial.call(this, partial, context, options); - var result = env.VM.invokePartial.call(this, partial, context, options); - - if (result == null && env.compile) { - options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env); - result = options.partials[options.name](context, options); - } - if (result != null) { - if (options.indent) { - var lines = result.split('\n'); - for (var i = 0, l = lines.length; i < l; i++) { - if (!lines[i] && i + 1 === l) { - break; - } - - lines[i] = options.indent + lines[i]; - } - result = lines.join('\n'); - } - return result; - } else { - throw new _Exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode'); - } - } - - // Just add water - var container = { - strict: function strict(obj, name) { - if (!(name in obj)) { - throw new _Exception2['default']('"' + name + '" not defined in ' + obj); - } - return obj[name]; - }, - lookup: function lookup(depths, name) { - var len = depths.length; - for (var i = 0; i < len; i++) { - if (depths[i] && depths[i][name] != null) { - return depths[i][name]; - } - } - }, - lambda: function lambda(current, context) { - return typeof current === 'function' ? current.call(context) : current; - }, - - escapeExpression: Utils.escapeExpression, - invokePartial: invokePartialWrapper, - - fn: function fn(i) { - return templateSpec[i]; - }, - - programs: [], - program: function program(i, data, declaredBlockParams, blockParams, depths) { - var programWrapper = this.programs[i], - fn = this.fn(i); - if (data || depths || blockParams || declaredBlockParams) { - programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths); - } else if (!programWrapper) { - programWrapper = this.programs[i] = wrapProgram(this, i, fn); - } - return programWrapper; - }, - - data: function data(value, depth) { - while (value && depth--) { - value = value._parent; - } - return value; - }, - merge: function merge(param, common) { - var obj = param || common; - - if (param && common && param !== common) { - obj = Utils.extend({}, common, param); - } - - return obj; - }, - - noop: env.VM.noop, - compilerInfo: templateSpec.compiler - }; - - function ret(context) { - var options = arguments[1] === undefined ? {} : arguments[1]; - - var data = options.data; - - ret._setup(options); - if (!options.partial && templateSpec.useData) { - data = initData(context, data); - } - var depths = undefined, - blockParams = templateSpec.useBlockParams ? [] : undefined; - if (templateSpec.useDepths) { - depths = options.depths ? [context].concat(options.depths) : [context]; - } - - return templateSpec.main.call(container, context, container.helpers, container.partials, data, blockParams, depths); - } - ret.isTop = true; - - ret._setup = function (options) { - if (!options.partial) { - container.helpers = container.merge(options.helpers, env.helpers); - - if (templateSpec.usePartial) { - container.partials = container.merge(options.partials, env.partials); - } - } else { - container.helpers = options.helpers; - container.partials = options.partials; - } - }; - - ret._child = function (i, data, blockParams, depths) { - if (templateSpec.useBlockParams && !blockParams) { - throw new _Exception2['default']('must pass block params'); - } - if (templateSpec.useDepths && !depths) { - throw new _Exception2['default']('must pass parent depths'); - } - - return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths); - }; - return ret; -} - -function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) { - function prog(context) { - var options = arguments[1] === undefined ? {} : arguments[1]; - - return fn.call(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), depths && [context].concat(depths)); - } - prog.program = i; - prog.depth = depths ? depths.length : 0; - prog.blockParams = declaredBlockParams || 0; - return prog; -} - -function resolvePartial(partial, context, options) { - if (!partial) { - partial = options.partials[options.name]; - } else if (!partial.call && !options.name) { - // This is a dynamic partial that returned a string - options.name = partial; - partial = options.partials[partial]; - } - return partial; -} - -function invokePartial(partial, context, options) { - options.partial = true; - - if (partial === undefined) { - throw new _Exception2['default']('The partial ' + options.name + ' could not be found'); - } else if (partial instanceof Function) { - return partial(context, options); - } -} - -function noop() { - return ''; -} - -function initData(context, data) { - if (!data || !('root' in data)) { - data = data ? _COMPILER_REVISION$REVISION_CHANGES$createFrame.createFrame(data) : {}; - data.root = context; - } - return data; -} \ No newline at end of file diff --git a/node_modules/handlebars/dist/cjs/handlebars/safe-string.js b/node_modules/handlebars/dist/cjs/handlebars/safe-string.js deleted file mode 100644 index 62eb2d8..0000000 --- a/node_modules/handlebars/dist/cjs/handlebars/safe-string.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict'; - -exports.__esModule = true; -// Build out our basic SafeString type -function SafeString(string) { - this.string = string; -} - -SafeString.prototype.toString = SafeString.prototype.toHTML = function () { - return '' + this.string; -}; - -exports['default'] = SafeString; -module.exports = exports['default']; \ No newline at end of file diff --git a/node_modules/handlebars/dist/cjs/handlebars/utils.js b/node_modules/handlebars/dist/cjs/handlebars/utils.js deleted file mode 100644 index 6ff8f37..0000000 --- a/node_modules/handlebars/dist/cjs/handlebars/utils.js +++ /dev/null @@ -1,114 +0,0 @@ -'use strict'; - -exports.__esModule = true; -exports.extend = extend; - -// Older IE versions do not directly support indexOf so we must implement our own, sadly. -exports.indexOf = indexOf; -exports.escapeExpression = escapeExpression; -exports.isEmpty = isEmpty; -exports.blockParams = blockParams; -exports.appendContextPath = appendContextPath; -var escape = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - '\'': ''', - '`': '`' -}; - -var badChars = /[&<>"'`]/g, - possible = /[&<>"'`]/; - -function escapeChar(chr) { - return escape[chr]; -} - -function extend(obj /* , ...source */) { - for (var i = 1; i < arguments.length; i++) { - for (var key in arguments[i]) { - if (Object.prototype.hasOwnProperty.call(arguments[i], key)) { - obj[key] = arguments[i][key]; - } - } - } - - return obj; -} - -var toString = Object.prototype.toString; - -exports.toString = toString; -// Sourced from lodash -// https://github.com/bestiejs/lodash/blob/master/LICENSE.txt -/*eslint-disable func-style, no-var */ -var isFunction = function isFunction(value) { - return typeof value === 'function'; -}; -// fallback for older versions of Chrome and Safari -/* istanbul ignore next */ -if (isFunction(/x/)) { - exports.isFunction = isFunction = function (value) { - return typeof value === 'function' && toString.call(value) === '[object Function]'; - }; -} -var isFunction; -exports.isFunction = isFunction; -/*eslint-enable func-style, no-var */ - -/* istanbul ignore next */ -var isArray = Array.isArray || function (value) { - return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false; -};exports.isArray = isArray; - -function indexOf(array, value) { - for (var i = 0, len = array.length; i < len; i++) { - if (array[i] === value) { - return i; - } - } - return -1; -} - -function escapeExpression(string) { - if (typeof string !== 'string') { - // don't escape SafeStrings, since they're already safe - if (string && string.toHTML) { - return string.toHTML(); - } else if (string == null) { - return ''; - } else if (!string) { - return string + ''; - } - - // Force a string conversion as this will be done by the append regardless and - // the regex test will do this transparently behind the scenes, causing issues if - // an object's to string has escaped characters in it. - string = '' + string; - } - - if (!possible.test(string)) { - return string; - } - return string.replace(badChars, escapeChar); -} - -function isEmpty(value) { - if (!value && value !== 0) { - return true; - } else if (isArray(value) && value.length === 0) { - return true; - } else { - return false; - } -} - -function blockParams(params, ids) { - params.path = ids; - return params; -} - -function appendContextPath(contextPath, id) { - return (contextPath ? contextPath + '.' : '') + id; -} \ No newline at end of file diff --git a/node_modules/handlebars/dist/cjs/precompiler.js b/node_modules/handlebars/dist/cjs/precompiler.js deleted file mode 100644 index e9f9648..0000000 --- a/node_modules/handlebars/dist/cjs/precompiler.js +++ /dev/null @@ -1,194 +0,0 @@ -'use strict'; - -var _interopRequireWildcard = function (obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }; - -/*eslint-disable no-console */ - -var _fs = require('fs'); - -var _fs2 = _interopRequireWildcard(_fs); - -var _import = require('./handlebars'); - -var Handlebars = _interopRequireWildcard(_import); - -var _basename = require('path'); - -var _SourceMapConsumer$SourceNode = require('source-map'); - -var _uglify = require('uglify-js'); - -var _uglify2 = _interopRequireWildcard(_uglify); - -module.exports.cli = function (opts) { - if (opts.version) { - console.log(Handlebars.VERSION); - return; - } - - if (!opts.templates.length) { - throw new Handlebars.Exception('Must define at least one template or directory.'); - } - - opts.templates.forEach(function (template) { - try { - _fs2['default'].statSync(template); - } catch (err) { - throw new Handlebars.Exception('Unable to open template file "' + template + '"'); - } - }); - - if (opts.simple && opts.min) { - throw new Handlebars.Exception('Unable to minimize simple output'); - } - if (opts.simple && (opts.templates.length !== 1 || _fs2['default'].statSync(opts.templates[0]).isDirectory())) { - throw new Handlebars.Exception('Unable to output multiple templates in simple mode'); - } - - // Convert the known list into a hash - var known = {}; - if (opts.known && !Array.isArray(opts.known)) { - opts.known = [opts.known]; - } - if (opts.known) { - for (var i = 0, len = opts.known.length; i < len; i++) { - known[opts.known[i]] = true; - } - } - - // Build file extension pattern - var extension = opts.extension.replace(/[\\^$*+?.():=!|{}\-\[\]]/g, function (arg) { - return '\\' + arg; - }); - extension = new RegExp('\\.' + extension + '$'); - - var output = new _SourceMapConsumer$SourceNode.SourceNode(); - if (!opts.simple) { - if (opts.amd) { - output.add('define([\'' + opts.handlebarPath + 'handlebars.runtime\'], function(Handlebars) {\n Handlebars = Handlebars["default"];'); - } else if (opts.commonjs) { - output.add('var Handlebars = require("' + opts.commonjs + '");'); - } else { - output.add('(function() {\n'); - } - output.add(' var template = Handlebars.template, templates = '); - if (opts.namespace) { - output.add(opts.namespace); - output.add(' = '); - output.add(opts.namespace); - output.add(' || '); - } - output.add('{};\n'); - } - function processTemplate(template, root) { - var path = template, - stat = _fs2['default'].statSync(path); - if (stat.isDirectory()) { - _fs2['default'].readdirSync(template).map(function (file) { - var childPath = template + '/' + file; - - if (extension.test(childPath) || _fs2['default'].statSync(childPath).isDirectory()) { - processTemplate(childPath, root || template); - } - }); - } else { - var data = _fs2['default'].readFileSync(path, 'utf8'); - - if (opts.bom && data.indexOf('') === 0) { - data = data.substring(1); - } - - var options = { - knownHelpers: known, - knownHelpersOnly: opts.o - }; - - if (opts.map) { - options.srcName = path; - } - if (opts.data) { - options.data = true; - } - - // Clean the template name - if (!root) { - template = _basename.basename(template); - } else if (template.indexOf(root) === 0) { - template = template.substring(root.length + 1); - } - template = template.replace(extension, ''); - - var precompiled = Handlebars.precompile(data, options); - - // If we are generating a source map, we have to reconstruct the SourceNode object - if (opts.map) { - var consumer = new _SourceMapConsumer$SourceNode.SourceMapConsumer(precompiled.map); - precompiled = _SourceMapConsumer$SourceNode.SourceNode.fromStringWithSourceMap(precompiled.code, consumer); - } - - if (opts.simple) { - output.add([precompiled, '\n']); - } else if (opts.partial) { - if (opts.amd && (opts.templates.length == 1 && !_fs2['default'].statSync(opts.templates[0]).isDirectory())) { - output.add('return '); - } - output.add(['Handlebars.partials[\'', template, '\'] = template(', precompiled, ');\n']); - } else { - if (opts.amd && (opts.templates.length == 1 && !_fs2['default'].statSync(opts.templates[0]).isDirectory())) { - output.add('return '); - } - output.add(['templates[\'', template, '\'] = template(', precompiled, ');\n']); - } - } - } - - opts.templates.forEach(function (template) { - processTemplate(template, opts.root); - }); - - // Output the content - if (!opts.simple) { - if (opts.amd) { - if (opts.templates.length > 1 || opts.templates.length == 1 && _fs2['default'].statSync(opts.templates[0]).isDirectory()) { - if (opts.partial) { - output.add('return Handlebars.partials;\n'); - } else { - output.add('return templates;\n'); - } - } - output.add('});'); - } else if (!opts.commonjs) { - output.add('})();'); - } - } - - if (opts.map) { - output.add('\n//# sourceMappingURL=' + opts.map + '\n'); - } - - output = output.toStringWithSourceMap(); - output.map = output.map + ''; - - if (opts.min) { - output = _uglify2['default'].minify(output.code, { - fromString: true, - - outSourceMap: opts.map, - inSourceMap: JSON.parse(output.map) - }); - if (opts.map) { - output.code += '\n//# sourceMappingURL=' + opts.map + '\n'; - } - } - - if (opts.map) { - _fs2['default'].writeFileSync(opts.map, output.map, 'utf8'); - } - output = output.code; - - if (opts.output) { - _fs2['default'].writeFileSync(opts.output, output, 'utf8'); - } else { - console.log(output); - } -}; \ No newline at end of file diff --git a/node_modules/handlebars/dist/handlebars.amd.js b/node_modules/handlebars/dist/handlebars.amd.js deleted file mode 100644 index 07640c5..0000000 --- a/node_modules/handlebars/dist/handlebars.amd.js +++ /dev/null @@ -1,3862 +0,0 @@ -/*! - - handlebars v3.0.3 - -Copyright (C) 2011-2014 by Yehuda Katz - -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. - -@license -*/ -define('handlebars/utils',['exports'], function (exports) { - - - exports.__esModule = true; - exports.extend = extend; - - // Older IE versions do not directly support indexOf so we must implement our own, sadly. - exports.indexOf = indexOf; - exports.escapeExpression = escapeExpression; - exports.isEmpty = isEmpty; - exports.blockParams = blockParams; - exports.appendContextPath = appendContextPath; - var escape = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - '\'': ''', - '`': '`' - }; - - var badChars = /[&<>"'`]/g, - possible = /[&<>"'`]/; - - function escapeChar(chr) { - return escape[chr]; - } - - function extend(obj /* , ...source */) { - for (var i = 1; i < arguments.length; i++) { - for (var key in arguments[i]) { - if (Object.prototype.hasOwnProperty.call(arguments[i], key)) { - obj[key] = arguments[i][key]; - } - } - } - - return obj; - } - - var toString = Object.prototype.toString; - - exports.toString = toString; - // Sourced from lodash - // https://github.com/bestiejs/lodash/blob/master/LICENSE.txt - /*eslint-disable func-style, no-var */ - var isFunction = function isFunction(value) { - return typeof value === 'function'; - }; - // fallback for older versions of Chrome and Safari - /* istanbul ignore next */ - if (isFunction(/x/)) { - exports.isFunction = isFunction = function (value) { - return typeof value === 'function' && toString.call(value) === '[object Function]'; - }; - } - var isFunction; - exports.isFunction = isFunction; - /*eslint-enable func-style, no-var */ - - /* istanbul ignore next */ - var isArray = Array.isArray || function (value) { - return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false; - };exports.isArray = isArray; - - function indexOf(array, value) { - for (var i = 0, len = array.length; i < len; i++) { - if (array[i] === value) { - return i; - } - } - return -1; - } - - function escapeExpression(string) { - if (typeof string !== 'string') { - // don't escape SafeStrings, since they're already safe - if (string && string.toHTML) { - return string.toHTML(); - } else if (string == null) { - return ''; - } else if (!string) { - return string + ''; - } - - // Force a string conversion as this will be done by the append regardless and - // the regex test will do this transparently behind the scenes, causing issues if - // an object's to string has escaped characters in it. - string = '' + string; - } - - if (!possible.test(string)) { - return string; - } - return string.replace(badChars, escapeChar); - } - - function isEmpty(value) { - if (!value && value !== 0) { - return true; - } else if (isArray(value) && value.length === 0) { - return true; - } else { - return false; - } - } - - function blockParams(params, ids) { - params.path = ids; - return params; - } - - function appendContextPath(contextPath, id) { - return (contextPath ? contextPath + '.' : '') + id; - } -}); -define('handlebars/exception',['exports', 'module'], function (exports, module) { - - - var errorProps = ['description', 'fileName', 'lineNumber', 'message', 'name', 'number', 'stack']; - - function Exception(message, node) { - var loc = node && node.loc, - line = undefined, - column = undefined; - if (loc) { - line = loc.start.line; - column = loc.start.column; - - message += ' - ' + line + ':' + column; - } - - var tmp = Error.prototype.constructor.call(this, message); - - // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. - for (var idx = 0; idx < errorProps.length; idx++) { - this[errorProps[idx]] = tmp[errorProps[idx]]; - } - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, Exception); - } - - if (loc) { - this.lineNumber = line; - this.column = column; - } - } - - Exception.prototype = new Error(); - - module.exports = Exception; -}); -define('handlebars/base',['exports', './utils', './exception'], function (exports, _utils, _exception) { - - - var _interopRequire = function (obj) { return obj && obj.__esModule ? obj['default'] : obj; }; - - exports.__esModule = true; - exports.HandlebarsEnvironment = HandlebarsEnvironment; - exports.createFrame = createFrame; - - var _Exception = _interopRequire(_exception); - - var VERSION = '3.0.1'; - exports.VERSION = VERSION; - var COMPILER_REVISION = 6; - - exports.COMPILER_REVISION = COMPILER_REVISION; - var REVISION_CHANGES = { - 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it - 2: '== 1.0.0-rc.3', - 3: '== 1.0.0-rc.4', - 4: '== 1.x.x', - 5: '== 2.0.0-alpha.x', - 6: '>= 2.0.0-beta.1' - }; - - exports.REVISION_CHANGES = REVISION_CHANGES; - var isArray = _utils.isArray, - isFunction = _utils.isFunction, - toString = _utils.toString, - objectType = '[object Object]'; - - function HandlebarsEnvironment(helpers, partials) { - this.helpers = helpers || {}; - this.partials = partials || {}; - - registerDefaultHelpers(this); - } - - HandlebarsEnvironment.prototype = { - constructor: HandlebarsEnvironment, - - logger: logger, - log: log, - - registerHelper: function registerHelper(name, fn) { - if (toString.call(name) === objectType) { - if (fn) { - throw new _Exception('Arg not supported with multiple helpers'); - } - _utils.extend(this.helpers, name); - } else { - this.helpers[name] = fn; - } - }, - unregisterHelper: function unregisterHelper(name) { - delete this.helpers[name]; - }, - - registerPartial: function registerPartial(name, partial) { - if (toString.call(name) === objectType) { - _utils.extend(this.partials, name); - } else { - if (typeof partial === 'undefined') { - throw new _Exception('Attempting to register a partial as undefined'); - } - this.partials[name] = partial; - } - }, - unregisterPartial: function unregisterPartial(name) { - delete this.partials[name]; - } - }; - - function registerDefaultHelpers(instance) { - instance.registerHelper('helperMissing', function () { - if (arguments.length === 1) { - // A missing field in a {{foo}} constuct. - return undefined; - } else { - // Someone is actually trying to call something, blow up. - throw new _Exception('Missing helper: "' + arguments[arguments.length - 1].name + '"'); - } - }); - - instance.registerHelper('blockHelperMissing', function (context, options) { - var inverse = options.inverse, - fn = options.fn; - - if (context === true) { - return fn(this); - } else if (context === false || context == null) { - return inverse(this); - } else if (isArray(context)) { - if (context.length > 0) { - if (options.ids) { - options.ids = [options.name]; - } - - return instance.helpers.each(context, options); - } else { - return inverse(this); - } - } else { - if (options.data && options.ids) { - var data = createFrame(options.data); - data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name); - options = { data: data }; - } - - return fn(context, options); - } - }); - - instance.registerHelper('each', function (context, options) { - if (!options) { - throw new _Exception('Must pass iterator to #each'); - } - - var fn = options.fn, - inverse = options.inverse, - i = 0, - ret = '', - data = undefined, - contextPath = undefined; - - if (options.data && options.ids) { - contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.'; - } - - if (isFunction(context)) { - context = context.call(this); - } - - if (options.data) { - data = createFrame(options.data); - } - - function execIteration(field, index, last) { - if (data) { - data.key = field; - data.index = index; - data.first = index === 0; - data.last = !!last; - - if (contextPath) { - data.contextPath = contextPath + field; - } - } - - ret = ret + fn(context[field], { - data: data, - blockParams: _utils.blockParams([context[field], field], [contextPath + field, null]) - }); - } - - if (context && typeof context === 'object') { - if (isArray(context)) { - for (var j = context.length; i < j; i++) { - execIteration(i, i, i === context.length - 1); - } - } else { - var priorKey = undefined; - - for (var key in context) { - if (context.hasOwnProperty(key)) { - // We're running the iterations one step out of sync so we can detect - // the last iteration without have to scan the object twice and create - // an itermediate keys array. - if (priorKey) { - execIteration(priorKey, i - 1); - } - priorKey = key; - i++; - } - } - if (priorKey) { - execIteration(priorKey, i - 1, true); - } - } - } - - if (i === 0) { - ret = inverse(this); - } - - return ret; - }); - - instance.registerHelper('if', function (conditional, options) { - if (isFunction(conditional)) { - conditional = conditional.call(this); - } - - // Default behavior is to render the positive path if the value is truthy and not empty. - // The `includeZero` option may be set to treat the condtional as purely not empty based on the - // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative. - if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) { - return options.inverse(this); - } else { - return options.fn(this); - } - }); - - instance.registerHelper('unless', function (conditional, options) { - return instance.helpers['if'].call(this, conditional, { fn: options.inverse, inverse: options.fn, hash: options.hash }); - }); - - instance.registerHelper('with', function (context, options) { - if (isFunction(context)) { - context = context.call(this); - } - - var fn = options.fn; - - if (!_utils.isEmpty(context)) { - if (options.data && options.ids) { - var data = createFrame(options.data); - data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]); - options = { data: data }; - } - - return fn(context, options); - } else { - return options.inverse(this); - } - }); - - instance.registerHelper('log', function (message, options) { - var level = options.data && options.data.level != null ? parseInt(options.data.level, 10) : 1; - instance.log(level, message); - }); - - instance.registerHelper('lookup', function (obj, field) { - return obj && obj[field]; - }); - } - - var logger = { - methodMap: { 0: 'debug', 1: 'info', 2: 'warn', 3: 'error' }, - - // State enum - DEBUG: 0, - INFO: 1, - WARN: 2, - ERROR: 3, - level: 1, - - // Can be overridden in the host environment - log: function log(level, message) { - if (typeof console !== 'undefined' && logger.level <= level) { - var method = logger.methodMap[level]; - (console[method] || console.log).call(console, message); // eslint-disable-line no-console - } - } - }; - - exports.logger = logger; - var log = logger.log; - - exports.log = log; - - function createFrame(object) { - var frame = _utils.extend({}, object); - frame._parent = object; - return frame; - } -}); -/* [args, ]options */; -define('handlebars/safe-string',['exports', 'module'], function (exports, module) { - // Build out our basic SafeString type - - - function SafeString(string) { - this.string = string; - } - - SafeString.prototype.toString = SafeString.prototype.toHTML = function () { - return '' + this.string; - }; - - module.exports = SafeString; -}); -define('handlebars/runtime',['exports', './utils', './exception', './base'], function (exports, _utils, _exception, _base) { - - - var _interopRequire = function (obj) { return obj && obj.__esModule ? obj['default'] : obj; }; - - exports.__esModule = true; - exports.checkRevision = checkRevision; - - // TODO: Remove this line and break up compilePartial - - exports.template = template; - exports.wrapProgram = wrapProgram; - exports.resolvePartial = resolvePartial; - exports.invokePartial = invokePartial; - exports.noop = noop; - - var _Exception = _interopRequire(_exception); - - function checkRevision(compilerInfo) { - var compilerRevision = compilerInfo && compilerInfo[0] || 1, - currentRevision = _base.COMPILER_REVISION; - - if (compilerRevision !== currentRevision) { - if (compilerRevision < currentRevision) { - var runtimeVersions = _base.REVISION_CHANGES[currentRevision], - compilerVersions = _base.REVISION_CHANGES[compilerRevision]; - throw new _Exception('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').'); - } else { - // Use the embedded version info since the runtime doesn't know about this revision yet - throw new _Exception('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').'); - } - } - } - - function template(templateSpec, env) { - /* istanbul ignore next */ - if (!env) { - throw new _Exception('No environment passed to template'); - } - if (!templateSpec || !templateSpec.main) { - throw new _Exception('Unknown template object: ' + typeof templateSpec); - } - - // Note: Using env.VM references rather than local var references throughout this section to allow - // for external users to override these as psuedo-supported APIs. - env.VM.checkRevision(templateSpec.compiler); - - function invokePartialWrapper(partial, context, options) { - if (options.hash) { - context = _utils.extend({}, context, options.hash); - } - - partial = env.VM.resolvePartial.call(this, partial, context, options); - var result = env.VM.invokePartial.call(this, partial, context, options); - - if (result == null && env.compile) { - options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env); - result = options.partials[options.name](context, options); - } - if (result != null) { - if (options.indent) { - var lines = result.split('\n'); - for (var i = 0, l = lines.length; i < l; i++) { - if (!lines[i] && i + 1 === l) { - break; - } - - lines[i] = options.indent + lines[i]; - } - result = lines.join('\n'); - } - return result; - } else { - throw new _Exception('The partial ' + options.name + ' could not be compiled when running in runtime-only mode'); - } - } - - // Just add water - var container = { - strict: function strict(obj, name) { - if (!(name in obj)) { - throw new _Exception('"' + name + '" not defined in ' + obj); - } - return obj[name]; - }, - lookup: function lookup(depths, name) { - var len = depths.length; - for (var i = 0; i < len; i++) { - if (depths[i] && depths[i][name] != null) { - return depths[i][name]; - } - } - }, - lambda: function lambda(current, context) { - return typeof current === 'function' ? current.call(context) : current; - }, - - escapeExpression: _utils.escapeExpression, - invokePartial: invokePartialWrapper, - - fn: function fn(i) { - return templateSpec[i]; - }, - - programs: [], - program: function program(i, data, declaredBlockParams, blockParams, depths) { - var programWrapper = this.programs[i], - fn = this.fn(i); - if (data || depths || blockParams || declaredBlockParams) { - programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths); - } else if (!programWrapper) { - programWrapper = this.programs[i] = wrapProgram(this, i, fn); - } - return programWrapper; - }, - - data: function data(value, depth) { - while (value && depth--) { - value = value._parent; - } - return value; - }, - merge: function merge(param, common) { - var obj = param || common; - - if (param && common && param !== common) { - obj = _utils.extend({}, common, param); - } - - return obj; - }, - - noop: env.VM.noop, - compilerInfo: templateSpec.compiler - }; - - function ret(context) { - var options = arguments[1] === undefined ? {} : arguments[1]; - - var data = options.data; - - ret._setup(options); - if (!options.partial && templateSpec.useData) { - data = initData(context, data); - } - var depths = undefined, - blockParams = templateSpec.useBlockParams ? [] : undefined; - if (templateSpec.useDepths) { - depths = options.depths ? [context].concat(options.depths) : [context]; - } - - return templateSpec.main.call(container, context, container.helpers, container.partials, data, blockParams, depths); - } - ret.isTop = true; - - ret._setup = function (options) { - if (!options.partial) { - container.helpers = container.merge(options.helpers, env.helpers); - - if (templateSpec.usePartial) { - container.partials = container.merge(options.partials, env.partials); - } - } else { - container.helpers = options.helpers; - container.partials = options.partials; - } - }; - - ret._child = function (i, data, blockParams, depths) { - if (templateSpec.useBlockParams && !blockParams) { - throw new _Exception('must pass block params'); - } - if (templateSpec.useDepths && !depths) { - throw new _Exception('must pass parent depths'); - } - - return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths); - }; - return ret; - } - - function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) { - function prog(context) { - var options = arguments[1] === undefined ? {} : arguments[1]; - - return fn.call(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), depths && [context].concat(depths)); - } - prog.program = i; - prog.depth = depths ? depths.length : 0; - prog.blockParams = declaredBlockParams || 0; - return prog; - } - - function resolvePartial(partial, context, options) { - if (!partial) { - partial = options.partials[options.name]; - } else if (!partial.call && !options.name) { - // This is a dynamic partial that returned a string - options.name = partial; - partial = options.partials[partial]; - } - return partial; - } - - function invokePartial(partial, context, options) { - options.partial = true; - - if (partial === undefined) { - throw new _Exception('The partial ' + options.name + ' could not be found'); - } else if (partial instanceof Function) { - return partial(context, options); - } - } - - function noop() { - return ''; - } - - function initData(context, data) { - if (!data || !('root' in data)) { - data = data ? _base.createFrame(data) : {}; - data.root = context; - } - return data; - } -}); -define('handlebars/no-conflict',['exports', 'module'], function (exports, module) { - /*global window */ - - - module.exports = function (Handlebars) { - /* istanbul ignore next */ - var root = typeof global !== 'undefined' ? global : window, - $Handlebars = root.Handlebars; - /* istanbul ignore next */ - Handlebars.noConflict = function () { - if (root.Handlebars === Handlebars) { - root.Handlebars = $Handlebars; - } - }; - }; -}); -define('handlebars.runtime',['exports', 'module', './handlebars/base', './handlebars/safe-string', './handlebars/exception', './handlebars/utils', './handlebars/runtime', './handlebars/no-conflict'], function (exports, module, _handlebarsBase, _handlebarsSafeString, _handlebarsException, _handlebarsUtils, _handlebarsRuntime, _handlebarsNoConflict) { - - - var _interopRequire = function (obj) { return obj && obj.__esModule ? obj['default'] : obj; }; - - // Each of these augment the Handlebars object. No need to setup here. - // (This is done to easily share code between commonjs and browse envs) - - var _SafeString = _interopRequire(_handlebarsSafeString); - - var _Exception = _interopRequire(_handlebarsException); - - var _noConflict = _interopRequire(_handlebarsNoConflict); - - // For compatibility and usage outside of module systems, make the Handlebars object a namespace - function create() { - var hb = new _handlebarsBase.HandlebarsEnvironment(); - - _handlebarsUtils.extend(hb, _handlebarsBase); - hb.SafeString = _SafeString; - hb.Exception = _Exception; - hb.Utils = _handlebarsUtils; - hb.escapeExpression = _handlebarsUtils.escapeExpression; - - hb.VM = _handlebarsRuntime; - hb.template = function (spec) { - return _handlebarsRuntime.template(spec, hb); - }; - - return hb; - } - - var inst = create(); - inst.create = create; - - _noConflict(inst); - - inst['default'] = inst; - - module.exports = inst; -}); -define('handlebars/compiler/ast',['exports', 'module'], function (exports, module) { - - - var AST = { - Program: function Program(statements, blockParams, strip, locInfo) { - this.loc = locInfo; - this.type = 'Program'; - this.body = statements; - - this.blockParams = blockParams; - this.strip = strip; - }, - - MustacheStatement: function MustacheStatement(path, params, hash, escaped, strip, locInfo) { - this.loc = locInfo; - this.type = 'MustacheStatement'; - - this.path = path; - this.params = params || []; - this.hash = hash; - this.escaped = escaped; - - this.strip = strip; - }, - - BlockStatement: function BlockStatement(path, params, hash, program, inverse, openStrip, inverseStrip, closeStrip, locInfo) { - this.loc = locInfo; - this.type = 'BlockStatement'; - - this.path = path; - this.params = params || []; - this.hash = hash; - this.program = program; - this.inverse = inverse; - - this.openStrip = openStrip; - this.inverseStrip = inverseStrip; - this.closeStrip = closeStrip; - }, - - PartialStatement: function PartialStatement(name, params, hash, strip, locInfo) { - this.loc = locInfo; - this.type = 'PartialStatement'; - - this.name = name; - this.params = params || []; - this.hash = hash; - - this.indent = ''; - this.strip = strip; - }, - - ContentStatement: function ContentStatement(string, locInfo) { - this.loc = locInfo; - this.type = 'ContentStatement'; - this.original = this.value = string; - }, - - CommentStatement: function CommentStatement(comment, strip, locInfo) { - this.loc = locInfo; - this.type = 'CommentStatement'; - this.value = comment; - - this.strip = strip; - }, - - SubExpression: function SubExpression(path, params, hash, locInfo) { - this.loc = locInfo; - - this.type = 'SubExpression'; - this.path = path; - this.params = params || []; - this.hash = hash; - }, - - PathExpression: function PathExpression(data, depth, parts, original, locInfo) { - this.loc = locInfo; - this.type = 'PathExpression'; - - this.data = data; - this.original = original; - this.parts = parts; - this.depth = depth; - }, - - StringLiteral: function StringLiteral(string, locInfo) { - this.loc = locInfo; - this.type = 'StringLiteral'; - this.original = this.value = string; - }, - - NumberLiteral: function NumberLiteral(number, locInfo) { - this.loc = locInfo; - this.type = 'NumberLiteral'; - this.original = this.value = Number(number); - }, - - BooleanLiteral: function BooleanLiteral(bool, locInfo) { - this.loc = locInfo; - this.type = 'BooleanLiteral'; - this.original = this.value = bool === 'true'; - }, - - UndefinedLiteral: function UndefinedLiteral(locInfo) { - this.loc = locInfo; - this.type = 'UndefinedLiteral'; - this.original = this.value = undefined; - }, - - NullLiteral: function NullLiteral(locInfo) { - this.loc = locInfo; - this.type = 'NullLiteral'; - this.original = this.value = null; - }, - - Hash: function Hash(pairs, locInfo) { - this.loc = locInfo; - this.type = 'Hash'; - this.pairs = pairs; - }, - HashPair: function HashPair(key, value, locInfo) { - this.loc = locInfo; - this.type = 'HashPair'; - this.key = key; - this.value = value; - }, - - // Public API used to evaluate derived attributes regarding AST nodes - helpers: { - // a mustache is definitely a helper if: - // * it is an eligible helper, and - // * it has at least one parameter or hash segment - helperExpression: function helperExpression(node) { - return !!(node.type === 'SubExpression' || node.params.length || node.hash); - }, - - scopedId: function scopedId(path) { - return /^\.|this\b/.test(path.original); - }, - - // an ID is simple if it only has one part, and that part is not - // `..` or `this`. - simpleId: function simpleId(path) { - return path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth; - } - } - }; - - // Must be exported as an object rather than the root of the module as the jison lexer - // must modify the object to operate properly. - module.exports = AST; -}); -define('handlebars/compiler/parser',["exports", "module"], function (exports, module) { - /* istanbul ignore next */ - /* Jison generated parser */ - - - var handlebars = (function () { - var parser = { trace: function trace() {}, - yy: {}, - symbols_: { error: 2, root: 3, program: 4, EOF: 5, program_repetition0: 6, statement: 7, mustache: 8, block: 9, rawBlock: 10, partial: 11, content: 12, COMMENT: 13, CONTENT: 14, openRawBlock: 15, END_RAW_BLOCK: 16, OPEN_RAW_BLOCK: 17, helperName: 18, openRawBlock_repetition0: 19, openRawBlock_option0: 20, CLOSE_RAW_BLOCK: 21, openBlock: 22, block_option0: 23, closeBlock: 24, openInverse: 25, block_option1: 26, OPEN_BLOCK: 27, openBlock_repetition0: 28, openBlock_option0: 29, openBlock_option1: 30, CLOSE: 31, OPEN_INVERSE: 32, openInverse_repetition0: 33, openInverse_option0: 34, openInverse_option1: 35, openInverseChain: 36, OPEN_INVERSE_CHAIN: 37, openInverseChain_repetition0: 38, openInverseChain_option0: 39, openInverseChain_option1: 40, inverseAndProgram: 41, INVERSE: 42, inverseChain: 43, inverseChain_option0: 44, OPEN_ENDBLOCK: 45, OPEN: 46, mustache_repetition0: 47, mustache_option0: 48, OPEN_UNESCAPED: 49, mustache_repetition1: 50, mustache_option1: 51, CLOSE_UNESCAPED: 52, OPEN_PARTIAL: 53, partialName: 54, partial_repetition0: 55, partial_option0: 56, param: 57, sexpr: 58, OPEN_SEXPR: 59, sexpr_repetition0: 60, sexpr_option0: 61, CLOSE_SEXPR: 62, hash: 63, hash_repetition_plus0: 64, hashSegment: 65, ID: 66, EQUALS: 67, blockParams: 68, OPEN_BLOCK_PARAMS: 69, blockParams_repetition_plus0: 70, CLOSE_BLOCK_PARAMS: 71, path: 72, dataName: 73, STRING: 74, NUMBER: 75, BOOLEAN: 76, UNDEFINED: 77, NULL: 78, DATA: 79, pathSegments: 80, SEP: 81, $accept: 0, $end: 1 }, - terminals_: { 2: "error", 5: "EOF", 13: "COMMENT", 14: "CONTENT", 16: "END_RAW_BLOCK", 17: "OPEN_RAW_BLOCK", 21: "CLOSE_RAW_BLOCK", 27: "OPEN_BLOCK", 31: "CLOSE", 32: "OPEN_INVERSE", 37: "OPEN_INVERSE_CHAIN", 42: "INVERSE", 45: "OPEN_ENDBLOCK", 46: "OPEN", 49: "OPEN_UNESCAPED", 52: "CLOSE_UNESCAPED", 53: "OPEN_PARTIAL", 59: "OPEN_SEXPR", 62: "CLOSE_SEXPR", 66: "ID", 67: "EQUALS", 69: "OPEN_BLOCK_PARAMS", 71: "CLOSE_BLOCK_PARAMS", 74: "STRING", 75: "NUMBER", 76: "BOOLEAN", 77: "UNDEFINED", 78: "NULL", 79: "DATA", 81: "SEP" }, - productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [12, 1], [10, 3], [15, 5], [9, 4], [9, 4], [22, 6], [25, 6], [36, 6], [41, 2], [43, 3], [43, 1], [24, 3], [8, 5], [8, 5], [11, 5], [57, 1], [57, 1], [58, 5], [63, 1], [65, 3], [68, 3], [18, 1], [18, 1], [18, 1], [18, 1], [18, 1], [18, 1], [18, 1], [54, 1], [54, 1], [73, 2], [72, 1], [80, 3], [80, 1], [6, 0], [6, 2], [19, 0], [19, 2], [20, 0], [20, 1], [23, 0], [23, 1], [26, 0], [26, 1], [28, 0], [28, 2], [29, 0], [29, 1], [30, 0], [30, 1], [33, 0], [33, 2], [34, 0], [34, 1], [35, 0], [35, 1], [38, 0], [38, 2], [39, 0], [39, 1], [40, 0], [40, 1], [44, 0], [44, 1], [47, 0], [47, 2], [48, 0], [48, 1], [50, 0], [50, 2], [51, 0], [51, 1], [55, 0], [55, 2], [56, 0], [56, 1], [60, 0], [60, 2], [61, 0], [61, 1], [64, 1], [64, 2], [70, 1], [70, 2]], - performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { - - var $0 = $$.length - 1; - switch (yystate) { - case 1: - return $$[$0 - 1]; - break; - case 2: - this.$ = new yy.Program($$[$0], null, {}, yy.locInfo(this._$)); - break; - case 3: - this.$ = $$[$0]; - break; - case 4: - this.$ = $$[$0]; - break; - case 5: - this.$ = $$[$0]; - break; - case 6: - this.$ = $$[$0]; - break; - case 7: - this.$ = $$[$0]; - break; - case 8: - this.$ = new yy.CommentStatement(yy.stripComment($$[$0]), yy.stripFlags($$[$0], $$[$0]), yy.locInfo(this._$)); - break; - case 9: - this.$ = new yy.ContentStatement($$[$0], yy.locInfo(this._$)); - break; - case 10: - this.$ = yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); - break; - case 11: - this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1] }; - break; - case 12: - this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$); - break; - case 13: - this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$); - break; - case 14: - this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; - break; - case 15: - this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; - break; - case 16: - this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; - break; - case 17: - this.$ = { strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]), program: $$[$0] }; - break; - case 18: - var inverse = yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$), - program = new yy.Program([inverse], null, {}, yy.locInfo(this._$)); - program.chained = true; - - this.$ = { strip: $$[$0 - 2].strip, program: program, chain: true }; - - break; - case 19: - this.$ = $$[$0]; - break; - case 20: - this.$ = { path: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 2], $$[$0]) }; - break; - case 21: - this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); - break; - case 22: - this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); - break; - case 23: - this.$ = new yy.PartialStatement($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], yy.stripFlags($$[$0 - 4], $$[$0]), yy.locInfo(this._$)); - break; - case 24: - this.$ = $$[$0]; - break; - case 25: - this.$ = $$[$0]; - break; - case 26: - this.$ = new yy.SubExpression($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], yy.locInfo(this._$)); - break; - case 27: - this.$ = new yy.Hash($$[$0], yy.locInfo(this._$)); - break; - case 28: - this.$ = new yy.HashPair(yy.id($$[$0 - 2]), $$[$0], yy.locInfo(this._$)); - break; - case 29: - this.$ = yy.id($$[$0 - 1]); - break; - case 30: - this.$ = $$[$0]; - break; - case 31: - this.$ = $$[$0]; - break; - case 32: - this.$ = new yy.StringLiteral($$[$0], yy.locInfo(this._$)); - break; - case 33: - this.$ = new yy.NumberLiteral($$[$0], yy.locInfo(this._$)); - break; - case 34: - this.$ = new yy.BooleanLiteral($$[$0], yy.locInfo(this._$)); - break; - case 35: - this.$ = new yy.UndefinedLiteral(yy.locInfo(this._$)); - break; - case 36: - this.$ = new yy.NullLiteral(yy.locInfo(this._$)); - break; - case 37: - this.$ = $$[$0]; - break; - case 38: - this.$ = $$[$0]; - break; - case 39: - this.$ = yy.preparePath(true, $$[$0], this._$); - break; - case 40: - this.$ = yy.preparePath(false, $$[$0], this._$); - break; - case 41: - $$[$0 - 2].push({ part: yy.id($$[$0]), original: $$[$0], separator: $$[$0 - 1] });this.$ = $$[$0 - 2]; - break; - case 42: - this.$ = [{ part: yy.id($$[$0]), original: $$[$0] }]; - break; - case 43: - this.$ = []; - break; - case 44: - $$[$0 - 1].push($$[$0]); - break; - case 45: - this.$ = []; - break; - case 46: - $$[$0 - 1].push($$[$0]); - break; - case 53: - this.$ = []; - break; - case 54: - $$[$0 - 1].push($$[$0]); - break; - case 59: - this.$ = []; - break; - case 60: - $$[$0 - 1].push($$[$0]); - break; - case 65: - this.$ = []; - break; - case 66: - $$[$0 - 1].push($$[$0]); - break; - case 73: - this.$ = []; - break; - case 74: - $$[$0 - 1].push($$[$0]); - break; - case 77: - this.$ = []; - break; - case 78: - $$[$0 - 1].push($$[$0]); - break; - case 81: - this.$ = []; - break; - case 82: - $$[$0 - 1].push($$[$0]); - break; - case 85: - this.$ = []; - break; - case 86: - $$[$0 - 1].push($$[$0]); - break; - case 89: - this.$ = [$$[$0]]; - break; - case 90: - $$[$0 - 1].push($$[$0]); - break; - case 91: - this.$ = [$$[$0]]; - break; - case 92: - $$[$0 - 1].push($$[$0]); - break; - } - }, - table: [{ 3: 1, 4: 2, 5: [2, 43], 6: 3, 13: [2, 43], 14: [2, 43], 17: [2, 43], 27: [2, 43], 32: [2, 43], 46: [2, 43], 49: [2, 43], 53: [2, 43] }, { 1: [3] }, { 5: [1, 4] }, { 5: [2, 2], 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: [1, 11], 14: [1, 18], 15: 16, 17: [1, 21], 22: 14, 25: 15, 27: [1, 19], 32: [1, 20], 37: [2, 2], 42: [2, 2], 45: [2, 2], 46: [1, 12], 49: [1, 13], 53: [1, 17] }, { 1: [2, 1] }, { 5: [2, 44], 13: [2, 44], 14: [2, 44], 17: [2, 44], 27: [2, 44], 32: [2, 44], 37: [2, 44], 42: [2, 44], 45: [2, 44], 46: [2, 44], 49: [2, 44], 53: [2, 44] }, { 5: [2, 3], 13: [2, 3], 14: [2, 3], 17: [2, 3], 27: [2, 3], 32: [2, 3], 37: [2, 3], 42: [2, 3], 45: [2, 3], 46: [2, 3], 49: [2, 3], 53: [2, 3] }, { 5: [2, 4], 13: [2, 4], 14: [2, 4], 17: [2, 4], 27: [2, 4], 32: [2, 4], 37: [2, 4], 42: [2, 4], 45: [2, 4], 46: [2, 4], 49: [2, 4], 53: [2, 4] }, { 5: [2, 5], 13: [2, 5], 14: [2, 5], 17: [2, 5], 27: [2, 5], 32: [2, 5], 37: [2, 5], 42: [2, 5], 45: [2, 5], 46: [2, 5], 49: [2, 5], 53: [2, 5] }, { 5: [2, 6], 13: [2, 6], 14: [2, 6], 17: [2, 6], 27: [2, 6], 32: [2, 6], 37: [2, 6], 42: [2, 6], 45: [2, 6], 46: [2, 6], 49: [2, 6], 53: [2, 6] }, { 5: [2, 7], 13: [2, 7], 14: [2, 7], 17: [2, 7], 27: [2, 7], 32: [2, 7], 37: [2, 7], 42: [2, 7], 45: [2, 7], 46: [2, 7], 49: [2, 7], 53: [2, 7] }, { 5: [2, 8], 13: [2, 8], 14: [2, 8], 17: [2, 8], 27: [2, 8], 32: [2, 8], 37: [2, 8], 42: [2, 8], 45: [2, 8], 46: [2, 8], 49: [2, 8], 53: [2, 8] }, { 18: 22, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 18: 33, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 4: 34, 6: 3, 13: [2, 43], 14: [2, 43], 17: [2, 43], 27: [2, 43], 32: [2, 43], 37: [2, 43], 42: [2, 43], 45: [2, 43], 46: [2, 43], 49: [2, 43], 53: [2, 43] }, { 4: 35, 6: 3, 13: [2, 43], 14: [2, 43], 17: [2, 43], 27: [2, 43], 32: [2, 43], 42: [2, 43], 45: [2, 43], 46: [2, 43], 49: [2, 43], 53: [2, 43] }, { 12: 36, 14: [1, 18] }, { 18: 38, 54: 37, 58: 39, 59: [1, 40], 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 5: [2, 9], 13: [2, 9], 14: [2, 9], 16: [2, 9], 17: [2, 9], 27: [2, 9], 32: [2, 9], 37: [2, 9], 42: [2, 9], 45: [2, 9], 46: [2, 9], 49: [2, 9], 53: [2, 9] }, { 18: 41, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 18: 42, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 18: 43, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 31: [2, 73], 47: 44, 59: [2, 73], 66: [2, 73], 74: [2, 73], 75: [2, 73], 76: [2, 73], 77: [2, 73], 78: [2, 73], 79: [2, 73] }, { 21: [2, 30], 31: [2, 30], 52: [2, 30], 59: [2, 30], 62: [2, 30], 66: [2, 30], 69: [2, 30], 74: [2, 30], 75: [2, 30], 76: [2, 30], 77: [2, 30], 78: [2, 30], 79: [2, 30] }, { 21: [2, 31], 31: [2, 31], 52: [2, 31], 59: [2, 31], 62: [2, 31], 66: [2, 31], 69: [2, 31], 74: [2, 31], 75: [2, 31], 76: [2, 31], 77: [2, 31], 78: [2, 31], 79: [2, 31] }, { 21: [2, 32], 31: [2, 32], 52: [2, 32], 59: [2, 32], 62: [2, 32], 66: [2, 32], 69: [2, 32], 74: [2, 32], 75: [2, 32], 76: [2, 32], 77: [2, 32], 78: [2, 32], 79: [2, 32] }, { 21: [2, 33], 31: [2, 33], 52: [2, 33], 59: [2, 33], 62: [2, 33], 66: [2, 33], 69: [2, 33], 74: [2, 33], 75: [2, 33], 76: [2, 33], 77: [2, 33], 78: [2, 33], 79: [2, 33] }, { 21: [2, 34], 31: [2, 34], 52: [2, 34], 59: [2, 34], 62: [2, 34], 66: [2, 34], 69: [2, 34], 74: [2, 34], 75: [2, 34], 76: [2, 34], 77: [2, 34], 78: [2, 34], 79: [2, 34] }, { 21: [2, 35], 31: [2, 35], 52: [2, 35], 59: [2, 35], 62: [2, 35], 66: [2, 35], 69: [2, 35], 74: [2, 35], 75: [2, 35], 76: [2, 35], 77: [2, 35], 78: [2, 35], 79: [2, 35] }, { 21: [2, 36], 31: [2, 36], 52: [2, 36], 59: [2, 36], 62: [2, 36], 66: [2, 36], 69: [2, 36], 74: [2, 36], 75: [2, 36], 76: [2, 36], 77: [2, 36], 78: [2, 36], 79: [2, 36] }, { 21: [2, 40], 31: [2, 40], 52: [2, 40], 59: [2, 40], 62: [2, 40], 66: [2, 40], 69: [2, 40], 74: [2, 40], 75: [2, 40], 76: [2, 40], 77: [2, 40], 78: [2, 40], 79: [2, 40], 81: [1, 45] }, { 66: [1, 32], 80: 46 }, { 21: [2, 42], 31: [2, 42], 52: [2, 42], 59: [2, 42], 62: [2, 42], 66: [2, 42], 69: [2, 42], 74: [2, 42], 75: [2, 42], 76: [2, 42], 77: [2, 42], 78: [2, 42], 79: [2, 42], 81: [2, 42] }, { 50: 47, 52: [2, 77], 59: [2, 77], 66: [2, 77], 74: [2, 77], 75: [2, 77], 76: [2, 77], 77: [2, 77], 78: [2, 77], 79: [2, 77] }, { 23: 48, 36: 50, 37: [1, 52], 41: 51, 42: [1, 53], 43: 49, 45: [2, 49] }, { 26: 54, 41: 55, 42: [1, 53], 45: [2, 51] }, { 16: [1, 56] }, { 31: [2, 81], 55: 57, 59: [2, 81], 66: [2, 81], 74: [2, 81], 75: [2, 81], 76: [2, 81], 77: [2, 81], 78: [2, 81], 79: [2, 81] }, { 31: [2, 37], 59: [2, 37], 66: [2, 37], 74: [2, 37], 75: [2, 37], 76: [2, 37], 77: [2, 37], 78: [2, 37], 79: [2, 37] }, { 31: [2, 38], 59: [2, 38], 66: [2, 38], 74: [2, 38], 75: [2, 38], 76: [2, 38], 77: [2, 38], 78: [2, 38], 79: [2, 38] }, { 18: 58, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 28: 59, 31: [2, 53], 59: [2, 53], 66: [2, 53], 69: [2, 53], 74: [2, 53], 75: [2, 53], 76: [2, 53], 77: [2, 53], 78: [2, 53], 79: [2, 53] }, { 31: [2, 59], 33: 60, 59: [2, 59], 66: [2, 59], 69: [2, 59], 74: [2, 59], 75: [2, 59], 76: [2, 59], 77: [2, 59], 78: [2, 59], 79: [2, 59] }, { 19: 61, 21: [2, 45], 59: [2, 45], 66: [2, 45], 74: [2, 45], 75: [2, 45], 76: [2, 45], 77: [2, 45], 78: [2, 45], 79: [2, 45] }, { 18: 65, 31: [2, 75], 48: 62, 57: 63, 58: 66, 59: [1, 40], 63: 64, 64: 67, 65: 68, 66: [1, 69], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 66: [1, 70] }, { 21: [2, 39], 31: [2, 39], 52: [2, 39], 59: [2, 39], 62: [2, 39], 66: [2, 39], 69: [2, 39], 74: [2, 39], 75: [2, 39], 76: [2, 39], 77: [2, 39], 78: [2, 39], 79: [2, 39], 81: [1, 45] }, { 18: 65, 51: 71, 52: [2, 79], 57: 72, 58: 66, 59: [1, 40], 63: 73, 64: 67, 65: 68, 66: [1, 69], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 24: 74, 45: [1, 75] }, { 45: [2, 50] }, { 4: 76, 6: 3, 13: [2, 43], 14: [2, 43], 17: [2, 43], 27: [2, 43], 32: [2, 43], 37: [2, 43], 42: [2, 43], 45: [2, 43], 46: [2, 43], 49: [2, 43], 53: [2, 43] }, { 45: [2, 19] }, { 18: 77, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 4: 78, 6: 3, 13: [2, 43], 14: [2, 43], 17: [2, 43], 27: [2, 43], 32: [2, 43], 45: [2, 43], 46: [2, 43], 49: [2, 43], 53: [2, 43] }, { 24: 79, 45: [1, 75] }, { 45: [2, 52] }, { 5: [2, 10], 13: [2, 10], 14: [2, 10], 17: [2, 10], 27: [2, 10], 32: [2, 10], 37: [2, 10], 42: [2, 10], 45: [2, 10], 46: [2, 10], 49: [2, 10], 53: [2, 10] }, { 18: 65, 31: [2, 83], 56: 80, 57: 81, 58: 66, 59: [1, 40], 63: 82, 64: 67, 65: 68, 66: [1, 69], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 59: [2, 85], 60: 83, 62: [2, 85], 66: [2, 85], 74: [2, 85], 75: [2, 85], 76: [2, 85], 77: [2, 85], 78: [2, 85], 79: [2, 85] }, { 18: 65, 29: 84, 31: [2, 55], 57: 85, 58: 66, 59: [1, 40], 63: 86, 64: 67, 65: 68, 66: [1, 69], 69: [2, 55], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 18: 65, 31: [2, 61], 34: 87, 57: 88, 58: 66, 59: [1, 40], 63: 89, 64: 67, 65: 68, 66: [1, 69], 69: [2, 61], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 18: 65, 20: 90, 21: [2, 47], 57: 91, 58: 66, 59: [1, 40], 63: 92, 64: 67, 65: 68, 66: [1, 69], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 31: [1, 93] }, { 31: [2, 74], 59: [2, 74], 66: [2, 74], 74: [2, 74], 75: [2, 74], 76: [2, 74], 77: [2, 74], 78: [2, 74], 79: [2, 74] }, { 31: [2, 76] }, { 21: [2, 24], 31: [2, 24], 52: [2, 24], 59: [2, 24], 62: [2, 24], 66: [2, 24], 69: [2, 24], 74: [2, 24], 75: [2, 24], 76: [2, 24], 77: [2, 24], 78: [2, 24], 79: [2, 24] }, { 21: [2, 25], 31: [2, 25], 52: [2, 25], 59: [2, 25], 62: [2, 25], 66: [2, 25], 69: [2, 25], 74: [2, 25], 75: [2, 25], 76: [2, 25], 77: [2, 25], 78: [2, 25], 79: [2, 25] }, { 21: [2, 27], 31: [2, 27], 52: [2, 27], 62: [2, 27], 65: 94, 66: [1, 95], 69: [2, 27] }, { 21: [2, 89], 31: [2, 89], 52: [2, 89], 62: [2, 89], 66: [2, 89], 69: [2, 89] }, { 21: [2, 42], 31: [2, 42], 52: [2, 42], 59: [2, 42], 62: [2, 42], 66: [2, 42], 67: [1, 96], 69: [2, 42], 74: [2, 42], 75: [2, 42], 76: [2, 42], 77: [2, 42], 78: [2, 42], 79: [2, 42], 81: [2, 42] }, { 21: [2, 41], 31: [2, 41], 52: [2, 41], 59: [2, 41], 62: [2, 41], 66: [2, 41], 69: [2, 41], 74: [2, 41], 75: [2, 41], 76: [2, 41], 77: [2, 41], 78: [2, 41], 79: [2, 41], 81: [2, 41] }, { 52: [1, 97] }, { 52: [2, 78], 59: [2, 78], 66: [2, 78], 74: [2, 78], 75: [2, 78], 76: [2, 78], 77: [2, 78], 78: [2, 78], 79: [2, 78] }, { 52: [2, 80] }, { 5: [2, 12], 13: [2, 12], 14: [2, 12], 17: [2, 12], 27: [2, 12], 32: [2, 12], 37: [2, 12], 42: [2, 12], 45: [2, 12], 46: [2, 12], 49: [2, 12], 53: [2, 12] }, { 18: 98, 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 36: 50, 37: [1, 52], 41: 51, 42: [1, 53], 43: 100, 44: 99, 45: [2, 71] }, { 31: [2, 65], 38: 101, 59: [2, 65], 66: [2, 65], 69: [2, 65], 74: [2, 65], 75: [2, 65], 76: [2, 65], 77: [2, 65], 78: [2, 65], 79: [2, 65] }, { 45: [2, 17] }, { 5: [2, 13], 13: [2, 13], 14: [2, 13], 17: [2, 13], 27: [2, 13], 32: [2, 13], 37: [2, 13], 42: [2, 13], 45: [2, 13], 46: [2, 13], 49: [2, 13], 53: [2, 13] }, { 31: [1, 102] }, { 31: [2, 82], 59: [2, 82], 66: [2, 82], 74: [2, 82], 75: [2, 82], 76: [2, 82], 77: [2, 82], 78: [2, 82], 79: [2, 82] }, { 31: [2, 84] }, { 18: 65, 57: 104, 58: 66, 59: [1, 40], 61: 103, 62: [2, 87], 63: 105, 64: 67, 65: 68, 66: [1, 69], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 30: 106, 31: [2, 57], 68: 107, 69: [1, 108] }, { 31: [2, 54], 59: [2, 54], 66: [2, 54], 69: [2, 54], 74: [2, 54], 75: [2, 54], 76: [2, 54], 77: [2, 54], 78: [2, 54], 79: [2, 54] }, { 31: [2, 56], 69: [2, 56] }, { 31: [2, 63], 35: 109, 68: 110, 69: [1, 108] }, { 31: [2, 60], 59: [2, 60], 66: [2, 60], 69: [2, 60], 74: [2, 60], 75: [2, 60], 76: [2, 60], 77: [2, 60], 78: [2, 60], 79: [2, 60] }, { 31: [2, 62], 69: [2, 62] }, { 21: [1, 111] }, { 21: [2, 46], 59: [2, 46], 66: [2, 46], 74: [2, 46], 75: [2, 46], 76: [2, 46], 77: [2, 46], 78: [2, 46], 79: [2, 46] }, { 21: [2, 48] }, { 5: [2, 21], 13: [2, 21], 14: [2, 21], 17: [2, 21], 27: [2, 21], 32: [2, 21], 37: [2, 21], 42: [2, 21], 45: [2, 21], 46: [2, 21], 49: [2, 21], 53: [2, 21] }, { 21: [2, 90], 31: [2, 90], 52: [2, 90], 62: [2, 90], 66: [2, 90], 69: [2, 90] }, { 67: [1, 96] }, { 18: 65, 57: 112, 58: 66, 59: [1, 40], 66: [1, 32], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 5: [2, 22], 13: [2, 22], 14: [2, 22], 17: [2, 22], 27: [2, 22], 32: [2, 22], 37: [2, 22], 42: [2, 22], 45: [2, 22], 46: [2, 22], 49: [2, 22], 53: [2, 22] }, { 31: [1, 113] }, { 45: [2, 18] }, { 45: [2, 72] }, { 18: 65, 31: [2, 67], 39: 114, 57: 115, 58: 66, 59: [1, 40], 63: 116, 64: 67, 65: 68, 66: [1, 69], 69: [2, 67], 72: 23, 73: 24, 74: [1, 25], 75: [1, 26], 76: [1, 27], 77: [1, 28], 78: [1, 29], 79: [1, 31], 80: 30 }, { 5: [2, 23], 13: [2, 23], 14: [2, 23], 17: [2, 23], 27: [2, 23], 32: [2, 23], 37: [2, 23], 42: [2, 23], 45: [2, 23], 46: [2, 23], 49: [2, 23], 53: [2, 23] }, { 62: [1, 117] }, { 59: [2, 86], 62: [2, 86], 66: [2, 86], 74: [2, 86], 75: [2, 86], 76: [2, 86], 77: [2, 86], 78: [2, 86], 79: [2, 86] }, { 62: [2, 88] }, { 31: [1, 118] }, { 31: [2, 58] }, { 66: [1, 120], 70: 119 }, { 31: [1, 121] }, { 31: [2, 64] }, { 14: [2, 11] }, { 21: [2, 28], 31: [2, 28], 52: [2, 28], 62: [2, 28], 66: [2, 28], 69: [2, 28] }, { 5: [2, 20], 13: [2, 20], 14: [2, 20], 17: [2, 20], 27: [2, 20], 32: [2, 20], 37: [2, 20], 42: [2, 20], 45: [2, 20], 46: [2, 20], 49: [2, 20], 53: [2, 20] }, { 31: [2, 69], 40: 122, 68: 123, 69: [1, 108] }, { 31: [2, 66], 59: [2, 66], 66: [2, 66], 69: [2, 66], 74: [2, 66], 75: [2, 66], 76: [2, 66], 77: [2, 66], 78: [2, 66], 79: [2, 66] }, { 31: [2, 68], 69: [2, 68] }, { 21: [2, 26], 31: [2, 26], 52: [2, 26], 59: [2, 26], 62: [2, 26], 66: [2, 26], 69: [2, 26], 74: [2, 26], 75: [2, 26], 76: [2, 26], 77: [2, 26], 78: [2, 26], 79: [2, 26] }, { 13: [2, 14], 14: [2, 14], 17: [2, 14], 27: [2, 14], 32: [2, 14], 37: [2, 14], 42: [2, 14], 45: [2, 14], 46: [2, 14], 49: [2, 14], 53: [2, 14] }, { 66: [1, 125], 71: [1, 124] }, { 66: [2, 91], 71: [2, 91] }, { 13: [2, 15], 14: [2, 15], 17: [2, 15], 27: [2, 15], 32: [2, 15], 42: [2, 15], 45: [2, 15], 46: [2, 15], 49: [2, 15], 53: [2, 15] }, { 31: [1, 126] }, { 31: [2, 70] }, { 31: [2, 29] }, { 66: [2, 92], 71: [2, 92] }, { 13: [2, 16], 14: [2, 16], 17: [2, 16], 27: [2, 16], 32: [2, 16], 37: [2, 16], 42: [2, 16], 45: [2, 16], 46: [2, 16], 49: [2, 16], 53: [2, 16] }], - defaultActions: { 4: [2, 1], 49: [2, 50], 51: [2, 19], 55: [2, 52], 64: [2, 76], 73: [2, 80], 78: [2, 17], 82: [2, 84], 92: [2, 48], 99: [2, 18], 100: [2, 72], 105: [2, 88], 107: [2, 58], 110: [2, 64], 111: [2, 11], 123: [2, 70], 124: [2, 29] }, - parseError: function parseError(str, hash) { - throw new Error(str); - }, - parse: function parse(input) { - var self = this, - stack = [0], - vstack = [null], - lstack = [], - table = this.table, - yytext = "", - yylineno = 0, - yyleng = 0, - recovering = 0, - TERROR = 2, - EOF = 1; - this.lexer.setInput(input); - this.lexer.yy = this.yy; - this.yy.lexer = this.lexer; - this.yy.parser = this; - if (typeof this.lexer.yylloc == "undefined") this.lexer.yylloc = {}; - var yyloc = this.lexer.yylloc; - lstack.push(yyloc); - var ranges = this.lexer.options && this.lexer.options.ranges; - if (typeof this.yy.parseError === "function") this.parseError = this.yy.parseError; - function popStack(n) { - stack.length = stack.length - 2 * n; - vstack.length = vstack.length - n; - lstack.length = lstack.length - n; - } - function lex() { - var token; - token = self.lexer.lex() || 1; - if (typeof token !== "number") { - token = self.symbols_[token] || token; - } - return token; - } - var symbol, - preErrorSymbol, - state, - action, - a, - r, - yyval = {}, - p, - len, - newState, - expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - if (!recovering) { - expected = []; - for (p in table[state]) if (this.terminals_[p] && p > 2) { - expected.push("'" + this.terminals_[p] + "'"); - } - if (this.lexer.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1 ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected }); - } - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(this.lexer.yytext); - lstack.push(this.lexer.yylloc); - stack.push(action[1]); - symbol = null; - if (!preErrorSymbol) { - yyleng = this.lexer.yyleng; - yytext = this.lexer.yytext; - yylineno = this.lexer.yylineno; - yyloc = this.lexer.yylloc; - if (recovering > 0) recovering--; - } else { - symbol = preErrorSymbol; - preErrorSymbol = null; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = { first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column }; - if (ranges) { - yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]]; - } - r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; - } - }; - /* Jison generated lexer */ - var lexer = (function () { - var lexer = { EOF: 1, - parseError: function parseError(str, hash) { - if (this.yy.parser) { - this.yy.parser.parseError(str, hash); - } else { - throw new Error(str); - } - }, - setInput: function setInput(input) { - this._input = input; - this._more = this._less = this.done = false; - this.yylineno = this.yyleng = 0; - this.yytext = this.matched = this.match = ""; - this.conditionStack = ["INITIAL"]; - this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 }; - if (this.options.ranges) this.yylloc.range = [0, 0]; - this.offset = 0; - return this; - }, - input: function input() { - var ch = this._input[0]; - this.yytext += ch; - this.yyleng++; - this.offset++; - this.match += ch; - this.matched += ch; - var lines = ch.match(/(?:\r\n?|\n).*/g); - if (lines) { - this.yylineno++; - this.yylloc.last_line++; - } else { - this.yylloc.last_column++; - } - if (this.options.ranges) this.yylloc.range[1]++; - - this._input = this._input.slice(1); - return ch; - }, - unput: function unput(ch) { - var len = ch.length; - var lines = ch.split(/(?:\r\n?|\n)/g); - - this._input = ch + this._input; - this.yytext = this.yytext.substr(0, this.yytext.length - len - 1); - //this.yyleng -= len; - this.offset -= len; - var oldLines = this.match.split(/(?:\r\n?|\n)/g); - this.match = this.match.substr(0, this.match.length - 1); - this.matched = this.matched.substr(0, this.matched.length - 1); - - if (lines.length - 1) this.yylineno -= lines.length - 1; - var r = this.yylloc.range; - - this.yylloc = { first_line: this.yylloc.first_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.first_column, - last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len - }; - - if (this.options.ranges) { - this.yylloc.range = [r[0], r[0] + this.yyleng - len]; - } - return this; - }, - more: function more() { - this._more = true; - return this; - }, - less: function less(n) { - this.unput(this.match.slice(n)); - }, - pastInput: function pastInput() { - var past = this.matched.substr(0, this.matched.length - this.match.length); - return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, ""); - }, - upcomingInput: function upcomingInput() { - var next = this.match; - if (next.length < 20) { - next += this._input.substr(0, 20 - next.length); - } - return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, ""); - }, - showPosition: function showPosition() { - var pre = this.pastInput(); - var c = new Array(pre.length + 1).join("-"); - return pre + this.upcomingInput() + "\n" + c + "^"; - }, - next: function next() { - if (this.done) { - return this.EOF; - } - if (!this._input) this.done = true; - - var token, match, tempMatch, index, col, lines; - if (!this._more) { - this.yytext = ""; - this.match = ""; - } - var rules = this._currentRules(); - for (var i = 0; i < rules.length; i++) { - tempMatch = this._input.match(this.rules[rules[i]]); - if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { - match = tempMatch; - index = i; - if (!this.options.flex) break; - } - } - if (match) { - lines = match[0].match(/(?:\r\n?|\n).*/g); - if (lines) this.yylineno += lines.length; - this.yylloc = { first_line: this.yylloc.last_line, - last_line: this.yylineno + 1, - first_column: this.yylloc.last_column, - last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length }; - this.yytext += match[0]; - this.match += match[0]; - this.matches = match; - this.yyleng = this.yytext.length; - if (this.options.ranges) { - this.yylloc.range = [this.offset, this.offset += this.yyleng]; - } - this._more = false; - this._input = this._input.slice(match[0].length); - this.matched += match[0]; - token = this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]); - if (this.done && this._input) this.done = false; - if (token) { - return token; - } else { - return; - } - } - if (this._input === "") { - return this.EOF; - } else { - return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { text: "", token: null, line: this.yylineno }); - } - }, - lex: function lex() { - var r = this.next(); - if (typeof r !== "undefined") { - return r; - } else { - return this.lex(); - } - }, - begin: function begin(condition) { - this.conditionStack.push(condition); - }, - popState: function popState() { - return this.conditionStack.pop(); - }, - _currentRules: function _currentRules() { - return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; - }, - topState: function topState() { - return this.conditionStack[this.conditionStack.length - 2]; - }, - pushState: function begin(condition) { - this.begin(condition); - } }; - lexer.options = {}; - lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { - - function strip(start, end) { - return yy_.yytext = yy_.yytext.substr(start, yy_.yyleng - end); - } - - var YYSTATE = YY_START; - switch ($avoiding_name_collisions) { - case 0: - if (yy_.yytext.slice(-2) === "\\\\") { - strip(0, 1); - this.begin("mu"); - } else if (yy_.yytext.slice(-1) === "\\") { - strip(0, 1); - this.begin("emu"); - } else { - this.begin("mu"); - } - if (yy_.yytext) { - return 14; - }break; - case 1: - return 14; - break; - case 2: - this.popState(); - return 14; - - break; - case 3: - yy_.yytext = yy_.yytext.substr(5, yy_.yyleng - 9); - this.popState(); - return 16; - - break; - case 4: - return 14; - break; - case 5: - this.popState(); - return 13; - - break; - case 6: - return 59; - break; - case 7: - return 62; - break; - case 8: - return 17; - break; - case 9: - this.popState(); - this.begin("raw"); - return 21; - - break; - case 10: - return 53; - break; - case 11: - return 27; - break; - case 12: - return 45; - break; - case 13: - this.popState();return 42; - break; - case 14: - this.popState();return 42; - break; - case 15: - return 32; - break; - case 16: - return 37; - break; - case 17: - return 49; - break; - case 18: - return 46; - break; - case 19: - this.unput(yy_.yytext); - this.popState(); - this.begin("com"); - - break; - case 20: - this.popState(); - return 13; - - break; - case 21: - return 46; - break; - case 22: - return 67; - break; - case 23: - return 66; - break; - case 24: - return 66; - break; - case 25: - return 81; - break; - case 26: - // ignore whitespace - break; - case 27: - this.popState();return 52; - break; - case 28: - this.popState();return 31; - break; - case 29: - yy_.yytext = strip(1, 2).replace(/\\"/g, "\"");return 74; - break; - case 30: - yy_.yytext = strip(1, 2).replace(/\\'/g, "'");return 74; - break; - case 31: - return 79; - break; - case 32: - return 76; - break; - case 33: - return 76; - break; - case 34: - return 77; - break; - case 35: - return 78; - break; - case 36: - return 75; - break; - case 37: - return 69; - break; - case 38: - return 71; - break; - case 39: - return 66; - break; - case 40: - return 66; - break; - case 41: - return "INVALID"; - break; - case 42: - return 5; - break; - } - }; - lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]*?(?=(\{\{\{\{\/)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[[^\]]*\])/, /^(?:.)/, /^(?:$)/]; - lexer.conditions = { mu: { rules: [6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42], inclusive: false }, emu: { rules: [2], inclusive: false }, com: { rules: [5], inclusive: false }, raw: { rules: [3, 4], inclusive: false }, INITIAL: { rules: [0, 1, 42], inclusive: true } }; - return lexer; - })(); - parser.lexer = lexer; - function Parser() { - this.yy = {}; - }Parser.prototype = parser;parser.Parser = Parser; - return new Parser(); - })();module.exports = handlebars; -}); -define('handlebars/compiler/visitor',['exports', 'module', '../exception', './ast'], function (exports, module, _exception, _ast) { - - - var _interopRequire = function (obj) { return obj && obj.__esModule ? obj['default'] : obj; }; - - var _Exception = _interopRequire(_exception); - - var _AST = _interopRequire(_ast); - - function Visitor() { - this.parents = []; - } - - Visitor.prototype = { - constructor: Visitor, - mutating: false, - - // Visits a given value. If mutating, will replace the value if necessary. - acceptKey: function acceptKey(node, name) { - var value = this.accept(node[name]); - if (this.mutating) { - // Hacky sanity check: - if (value && (!value.type || !_AST[value.type])) { - throw new _Exception('Unexpected node type "' + value.type + '" found when accepting ' + name + ' on ' + node.type); - } - node[name] = value; - } - }, - - // Performs an accept operation with added sanity check to ensure - // required keys are not removed. - acceptRequired: function acceptRequired(node, name) { - this.acceptKey(node, name); - - if (!node[name]) { - throw new _Exception(node.type + ' requires ' + name); - } - }, - - // Traverses a given array. If mutating, empty respnses will be removed - // for child elements. - acceptArray: function acceptArray(array) { - for (var i = 0, l = array.length; i < l; i++) { - this.acceptKey(array, i); - - if (!array[i]) { - array.splice(i, 1); - i--; - l--; - } - } - }, - - accept: function accept(object) { - if (!object) { - return; - } - - if (this.current) { - this.parents.unshift(this.current); - } - this.current = object; - - var ret = this[object.type](object); - - this.current = this.parents.shift(); - - if (!this.mutating || ret) { - return ret; - } else if (ret !== false) { - return object; - } - }, - - Program: function Program(program) { - this.acceptArray(program.body); - }, - - MustacheStatement: function MustacheStatement(mustache) { - this.acceptRequired(mustache, 'path'); - this.acceptArray(mustache.params); - this.acceptKey(mustache, 'hash'); - }, - - BlockStatement: function BlockStatement(block) { - this.acceptRequired(block, 'path'); - this.acceptArray(block.params); - this.acceptKey(block, 'hash'); - - this.acceptKey(block, 'program'); - this.acceptKey(block, 'inverse'); - }, - - PartialStatement: function PartialStatement(partial) { - this.acceptRequired(partial, 'name'); - this.acceptArray(partial.params); - this.acceptKey(partial, 'hash'); - }, - - ContentStatement: function ContentStatement() {}, - CommentStatement: function CommentStatement() {}, - - SubExpression: function SubExpression(sexpr) { - this.acceptRequired(sexpr, 'path'); - this.acceptArray(sexpr.params); - this.acceptKey(sexpr, 'hash'); - }, - - PathExpression: function PathExpression() {}, - - StringLiteral: function StringLiteral() {}, - NumberLiteral: function NumberLiteral() {}, - BooleanLiteral: function BooleanLiteral() {}, - UndefinedLiteral: function UndefinedLiteral() {}, - NullLiteral: function NullLiteral() {}, - - Hash: function Hash(hash) { - this.acceptArray(hash.pairs); - }, - HashPair: function HashPair(pair) { - this.acceptRequired(pair, 'value'); - } - }; - - module.exports = Visitor; -}); -/* content */ /* comment */ /* path */ /* string */ /* number */ /* bool */ /* literal */ /* literal */; -define('handlebars/compiler/whitespace-control',['exports', 'module', './visitor'], function (exports, module, _visitor) { - - - var _interopRequire = function (obj) { return obj && obj.__esModule ? obj['default'] : obj; }; - - var _Visitor = _interopRequire(_visitor); - - function WhitespaceControl() {} - WhitespaceControl.prototype = new _Visitor(); - - WhitespaceControl.prototype.Program = function (program) { - var isRoot = !this.isRootSeen; - this.isRootSeen = true; - - var body = program.body; - for (var i = 0, l = body.length; i < l; i++) { - var current = body[i], - strip = this.accept(current); - - if (!strip) { - continue; - } - - var _isPrevWhitespace = isPrevWhitespace(body, i, isRoot), - _isNextWhitespace = isNextWhitespace(body, i, isRoot), - openStandalone = strip.openStandalone && _isPrevWhitespace, - closeStandalone = strip.closeStandalone && _isNextWhitespace, - inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace; - - if (strip.close) { - omitRight(body, i, true); - } - if (strip.open) { - omitLeft(body, i, true); - } - - if (inlineStandalone) { - omitRight(body, i); - - if (omitLeft(body, i)) { - // If we are on a standalone node, save the indent info for partials - if (current.type === 'PartialStatement') { - // Pull out the whitespace from the final line - current.indent = /([ \t]+$)/.exec(body[i - 1].original)[1]; - } - } - } - if (openStandalone) { - omitRight((current.program || current.inverse).body); - - // Strip out the previous content node if it's whitespace only - omitLeft(body, i); - } - if (closeStandalone) { - // Always strip the next node - omitRight(body, i); - - omitLeft((current.inverse || current.program).body); - } - } - - return program; - }; - WhitespaceControl.prototype.BlockStatement = function (block) { - this.accept(block.program); - this.accept(block.inverse); - - // Find the inverse program that is involed with whitespace stripping. - var program = block.program || block.inverse, - inverse = block.program && block.inverse, - firstInverse = inverse, - lastInverse = inverse; - - if (inverse && inverse.chained) { - firstInverse = inverse.body[0].program; - - // Walk the inverse chain to find the last inverse that is actually in the chain. - while (lastInverse.chained) { - lastInverse = lastInverse.body[lastInverse.body.length - 1].program; - } - } - - var strip = { - open: block.openStrip.open, - close: block.closeStrip.close, - - // Determine the standalone candiacy. Basically flag our content as being possibly standalone - // so our parent can determine if we actually are standalone - openStandalone: isNextWhitespace(program.body), - closeStandalone: isPrevWhitespace((firstInverse || program).body) - }; - - if (block.openStrip.close) { - omitRight(program.body, null, true); - } - - if (inverse) { - var inverseStrip = block.inverseStrip; - - if (inverseStrip.open) { - omitLeft(program.body, null, true); - } - - if (inverseStrip.close) { - omitRight(firstInverse.body, null, true); - } - if (block.closeStrip.open) { - omitLeft(lastInverse.body, null, true); - } - - // Find standalone else statments - if (isPrevWhitespace(program.body) && isNextWhitespace(firstInverse.body)) { - omitLeft(program.body); - omitRight(firstInverse.body); - } - } else if (block.closeStrip.open) { - omitLeft(program.body, null, true); - } - - return strip; - }; - - WhitespaceControl.prototype.MustacheStatement = function (mustache) { - return mustache.strip; - }; - - WhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function (node) { - /* istanbul ignore next */ - var strip = node.strip || {}; - return { - inlineStandalone: true, - open: strip.open, - close: strip.close - }; - }; - - function isPrevWhitespace(body, i, isRoot) { - if (i === undefined) { - i = body.length; - } - - // Nodes that end with newlines are considered whitespace (but are special - // cased for strip operations) - var prev = body[i - 1], - sibling = body[i - 2]; - if (!prev) { - return isRoot; - } - - if (prev.type === 'ContentStatement') { - return (sibling || !isRoot ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(prev.original); - } - } - function isNextWhitespace(body, i, isRoot) { - if (i === undefined) { - i = -1; - } - - var next = body[i + 1], - sibling = body[i + 2]; - if (!next) { - return isRoot; - } - - if (next.type === 'ContentStatement') { - return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(next.original); - } - } - - // Marks the node to the right of the position as omitted. - // I.e. {{foo}}' ' will mark the ' ' node as omitted. - // - // If i is undefined, then the first child will be marked as such. - // - // If mulitple is truthy then all whitespace will be stripped out until non-whitespace - // content is met. - function omitRight(body, i, multiple) { - var current = body[i == null ? 0 : i + 1]; - if (!current || current.type !== 'ContentStatement' || !multiple && current.rightStripped) { - return; - } - - var original = current.value; - current.value = current.value.replace(multiple ? /^\s+/ : /^[ \t]*\r?\n?/, ''); - current.rightStripped = current.value !== original; - } - - // Marks the node to the left of the position as omitted. - // I.e. ' '{{foo}} will mark the ' ' node as omitted. - // - // If i is undefined then the last child will be marked as such. - // - // If mulitple is truthy then all whitespace will be stripped out until non-whitespace - // content is met. - function omitLeft(body, i, multiple) { - var current = body[i == null ? body.length - 1 : i - 1]; - if (!current || current.type !== 'ContentStatement' || !multiple && current.leftStripped) { - return; - } - - // We omit the last node if it's whitespace only and not preceeded by a non-content node. - var original = current.value; - current.value = current.value.replace(multiple ? /\s+$/ : /[ \t]+$/, ''); - current.leftStripped = current.value !== original; - return current.leftStripped; - } - - module.exports = WhitespaceControl; -}); -define('handlebars/compiler/helpers',['exports', '../exception'], function (exports, _exception) { - - - var _interopRequire = function (obj) { return obj && obj.__esModule ? obj['default'] : obj; }; - - exports.__esModule = true; - exports.SourceLocation = SourceLocation; - exports.id = id; - exports.stripFlags = stripFlags; - exports.stripComment = stripComment; - exports.preparePath = preparePath; - exports.prepareMustache = prepareMustache; - exports.prepareRawBlock = prepareRawBlock; - exports.prepareBlock = prepareBlock; - - var _Exception = _interopRequire(_exception); - - function SourceLocation(source, locInfo) { - this.source = source; - this.start = { - line: locInfo.first_line, - column: locInfo.first_column - }; - this.end = { - line: locInfo.last_line, - column: locInfo.last_column - }; - } - - function id(token) { - if (/^\[.*\]$/.test(token)) { - return token.substr(1, token.length - 2); - } else { - return token; - } - } - - function stripFlags(open, close) { - return { - open: open.charAt(2) === '~', - close: close.charAt(close.length - 3) === '~' - }; - } - - function stripComment(comment) { - return comment.replace(/^\{\{~?\!-?-?/, '').replace(/-?-?~?\}\}$/, ''); - } - - function preparePath(data, parts, locInfo) { - locInfo = this.locInfo(locInfo); - - var original = data ? '@' : '', - dig = [], - depth = 0, - depthString = ''; - - for (var i = 0, l = parts.length; i < l; i++) { - var part = parts[i].part, - - // If we have [] syntax then we do not treat path references as operators, - // i.e. foo.[this] resolves to approximately context.foo['this'] - isLiteral = parts[i].original !== part; - original += (parts[i].separator || '') + part; - - if (!isLiteral && (part === '..' || part === '.' || part === 'this')) { - if (dig.length > 0) { - throw new _Exception('Invalid path: ' + original, { loc: locInfo }); - } else if (part === '..') { - depth++; - depthString += '../'; - } - } else { - dig.push(part); - } - } - - return new this.PathExpression(data, depth, dig, original, locInfo); - } - - function prepareMustache(path, params, hash, open, strip, locInfo) { - // Must use charAt to support IE pre-10 - var escapeFlag = open.charAt(3) || open.charAt(2), - escaped = escapeFlag !== '{' && escapeFlag !== '&'; - - return new this.MustacheStatement(path, params, hash, escaped, strip, this.locInfo(locInfo)); - } - - function prepareRawBlock(openRawBlock, content, close, locInfo) { - if (openRawBlock.path.original !== close) { - var errorNode = { loc: openRawBlock.path.loc }; - - throw new _Exception(openRawBlock.path.original + ' doesn\'t match ' + close, errorNode); - } - - locInfo = this.locInfo(locInfo); - var program = new this.Program([content], null, {}, locInfo); - - return new this.BlockStatement(openRawBlock.path, openRawBlock.params, openRawBlock.hash, program, undefined, {}, {}, {}, locInfo); - } - - function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) { - // When we are chaining inverse calls, we will not have a close path - if (close && close.path && openBlock.path.original !== close.path.original) { - var errorNode = { loc: openBlock.path.loc }; - - throw new _Exception(openBlock.path.original + ' doesn\'t match ' + close.path.original, errorNode); - } - - program.blockParams = openBlock.blockParams; - - var inverse = undefined, - inverseStrip = undefined; - - if (inverseAndProgram) { - if (inverseAndProgram.chain) { - inverseAndProgram.program.body[0].closeStrip = close.strip; - } - - inverseStrip = inverseAndProgram.strip; - inverse = inverseAndProgram.program; - } - - if (inverted) { - inverted = inverse; - inverse = program; - program = inverted; - } - - return new this.BlockStatement(openBlock.path, openBlock.params, openBlock.hash, program, inverse, openBlock.strip, inverseStrip, close && close.strip, this.locInfo(locInfo)); - } -}); -define('handlebars/compiler/base',['exports', './parser', './ast', './whitespace-control', './helpers', '../utils'], function (exports, _parser, _ast, _whitespaceControl, _helpers, _utils) { - - - var _interopRequire = function (obj) { return obj && obj.__esModule ? obj['default'] : obj; }; - - exports.__esModule = true; - exports.parse = parse; - - var _parser2 = _interopRequire(_parser); - - var _AST = _interopRequire(_ast); - - var _WhitespaceControl = _interopRequire(_whitespaceControl); - - exports.parser = _parser2; - - var yy = {}; - _utils.extend(yy, _helpers, _AST); - - function parse(input, options) { - // Just return if an already-compiled AST was passed in. - if (input.type === 'Program') { - return input; - } - - _parser2.yy = yy; - - // Altering the shared object here, but this is ok as parser is a sync operation - yy.locInfo = function (locInfo) { - return new yy.SourceLocation(options && options.srcName, locInfo); - }; - - var strip = new _WhitespaceControl(); - return strip.accept(_parser2.parse(input)); - } -}); -define('handlebars/compiler/compiler',['exports', '../exception', '../utils', './ast'], function (exports, _exception, _utils, _ast) { - - - var _interopRequire = function (obj) { return obj && obj.__esModule ? obj['default'] : obj; }; - - exports.__esModule = true; - exports.Compiler = Compiler; - exports.precompile = precompile; - exports.compile = compile; - - var _Exception = _interopRequire(_exception); - - var _AST = _interopRequire(_ast); - - var slice = [].slice; - - function Compiler() {} - - // the foundHelper register will disambiguate helper lookup from finding a - // function in a context. This is necessary for mustache compatibility, which - // requires that context functions in blocks are evaluated by blockHelperMissing, - // and then proceed as if the resulting value was provided to blockHelperMissing. - - Compiler.prototype = { - compiler: Compiler, - - equals: function equals(other) { - var len = this.opcodes.length; - if (other.opcodes.length !== len) { - return false; - } - - for (var i = 0; i < len; i++) { - var opcode = this.opcodes[i], - otherOpcode = other.opcodes[i]; - if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) { - return false; - } - } - - // We know that length is the same between the two arrays because they are directly tied - // to the opcode behavior above. - len = this.children.length; - for (var i = 0; i < len; i++) { - if (!this.children[i].equals(other.children[i])) { - return false; - } - } - - return true; - }, - - guid: 0, - - compile: function compile(program, options) { - this.sourceNode = []; - this.opcodes = []; - this.children = []; - this.options = options; - this.stringParams = options.stringParams; - this.trackIds = options.trackIds; - - options.blockParams = options.blockParams || []; - - // These changes will propagate to the other compiler components - var knownHelpers = options.knownHelpers; - options.knownHelpers = { - helperMissing: true, - blockHelperMissing: true, - each: true, - 'if': true, - unless: true, - 'with': true, - log: true, - lookup: true - }; - if (knownHelpers) { - for (var _name in knownHelpers) { - if (_name in knownHelpers) { - options.knownHelpers[_name] = knownHelpers[_name]; - } - } - } - - return this.accept(program); - }, - - compileProgram: function compileProgram(program) { - var childCompiler = new this.compiler(), - // eslint-disable-line new-cap - result = childCompiler.compile(program, this.options), - guid = this.guid++; - - this.usePartial = this.usePartial || result.usePartial; - - this.children[guid] = result; - this.useDepths = this.useDepths || result.useDepths; - - return guid; - }, - - accept: function accept(node) { - this.sourceNode.unshift(node); - var ret = this[node.type](node); - this.sourceNode.shift(); - return ret; - }, - - Program: function Program(program) { - this.options.blockParams.unshift(program.blockParams); - - var body = program.body, - bodyLength = body.length; - for (var i = 0; i < bodyLength; i++) { - this.accept(body[i]); - } - - this.options.blockParams.shift(); - - this.isSimple = bodyLength === 1; - this.blockParams = program.blockParams ? program.blockParams.length : 0; - - return this; - }, - - BlockStatement: function BlockStatement(block) { - transformLiteralToPath(block); - - var program = block.program, - inverse = block.inverse; - - program = program && this.compileProgram(program); - inverse = inverse && this.compileProgram(inverse); - - var type = this.classifySexpr(block); - - if (type === 'helper') { - this.helperSexpr(block, program, inverse); - } else if (type === 'simple') { - this.simpleSexpr(block); - - // now that the simple mustache is resolved, we need to - // evaluate it by executing `blockHelperMissing` - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - this.opcode('emptyHash'); - this.opcode('blockValue', block.path.original); - } else { - this.ambiguousSexpr(block, program, inverse); - - // now that the simple mustache is resolved, we need to - // evaluate it by executing `blockHelperMissing` - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - this.opcode('emptyHash'); - this.opcode('ambiguousBlockValue'); - } - - this.opcode('append'); - }, - - PartialStatement: function PartialStatement(partial) { - this.usePartial = true; - - var params = partial.params; - if (params.length > 1) { - throw new _Exception('Unsupported number of partial arguments: ' + params.length, partial); - } else if (!params.length) { - params.push({ type: 'PathExpression', parts: [], depth: 0 }); - } - - var partialName = partial.name.original, - isDynamic = partial.name.type === 'SubExpression'; - if (isDynamic) { - this.accept(partial.name); - } - - this.setupFullMustacheParams(partial, undefined, undefined, true); - - var indent = partial.indent || ''; - if (this.options.preventIndent && indent) { - this.opcode('appendContent', indent); - indent = ''; - } - - this.opcode('invokePartial', isDynamic, partialName, indent); - this.opcode('append'); - }, - - MustacheStatement: function MustacheStatement(mustache) { - this.SubExpression(mustache); // eslint-disable-line new-cap - - if (mustache.escaped && !this.options.noEscape) { - this.opcode('appendEscaped'); - } else { - this.opcode('append'); - } - }, - - ContentStatement: function ContentStatement(content) { - if (content.value) { - this.opcode('appendContent', content.value); - } - }, - - CommentStatement: function CommentStatement() {}, - - SubExpression: function SubExpression(sexpr) { - transformLiteralToPath(sexpr); - var type = this.classifySexpr(sexpr); - - if (type === 'simple') { - this.simpleSexpr(sexpr); - } else if (type === 'helper') { - this.helperSexpr(sexpr); - } else { - this.ambiguousSexpr(sexpr); - } - }, - ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) { - var path = sexpr.path, - name = path.parts[0], - isBlock = program != null || inverse != null; - - this.opcode('getContext', path.depth); - - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - - this.accept(path); - - this.opcode('invokeAmbiguous', name, isBlock); - }, - - simpleSexpr: function simpleSexpr(sexpr) { - this.accept(sexpr.path); - this.opcode('resolvePossibleLambda'); - }, - - helperSexpr: function helperSexpr(sexpr, program, inverse) { - var params = this.setupFullMustacheParams(sexpr, program, inverse), - path = sexpr.path, - name = path.parts[0]; - - if (this.options.knownHelpers[name]) { - this.opcode('invokeKnownHelper', params.length, name); - } else if (this.options.knownHelpersOnly) { - throw new _Exception('You specified knownHelpersOnly, but used the unknown helper ' + name, sexpr); - } else { - path.falsy = true; - - this.accept(path); - this.opcode('invokeHelper', params.length, path.original, _AST.helpers.simpleId(path)); - } - }, - - PathExpression: function PathExpression(path) { - this.addDepth(path.depth); - this.opcode('getContext', path.depth); - - var name = path.parts[0], - scoped = _AST.helpers.scopedId(path), - blockParamId = !path.depth && !scoped && this.blockParamIndex(name); - - if (blockParamId) { - this.opcode('lookupBlockParam', blockParamId, path.parts); - } else if (!name) { - // Context reference, i.e. `{{foo .}}` or `{{foo ..}}` - this.opcode('pushContext'); - } else if (path.data) { - this.options.data = true; - this.opcode('lookupData', path.depth, path.parts); - } else { - this.opcode('lookupOnContext', path.parts, path.falsy, scoped); - } - }, - - StringLiteral: function StringLiteral(string) { - this.opcode('pushString', string.value); - }, - - NumberLiteral: function NumberLiteral(number) { - this.opcode('pushLiteral', number.value); - }, - - BooleanLiteral: function BooleanLiteral(bool) { - this.opcode('pushLiteral', bool.value); - }, - - UndefinedLiteral: function UndefinedLiteral() { - this.opcode('pushLiteral', 'undefined'); - }, - - NullLiteral: function NullLiteral() { - this.opcode('pushLiteral', 'null'); - }, - - Hash: function Hash(hash) { - var pairs = hash.pairs, - i = 0, - l = pairs.length; - - this.opcode('pushHash'); - - for (; i < l; i++) { - this.pushParam(pairs[i].value); - } - while (i--) { - this.opcode('assignToHash', pairs[i].key); - } - this.opcode('popHash'); - }, - - // HELPERS - opcode: function opcode(name) { - this.opcodes.push({ opcode: name, args: slice.call(arguments, 1), loc: this.sourceNode[0].loc }); - }, - - addDepth: function addDepth(depth) { - if (!depth) { - return; - } - - this.useDepths = true; - }, - - classifySexpr: function classifySexpr(sexpr) { - var isSimple = _AST.helpers.simpleId(sexpr.path); - - var isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]); - - // a mustache is an eligible helper if: - // * its id is simple (a single part, not `this` or `..`) - var isHelper = !isBlockParam && _AST.helpers.helperExpression(sexpr); - - // if a mustache is an eligible helper but not a definite - // helper, it is ambiguous, and will be resolved in a later - // pass or at runtime. - var isEligible = !isBlockParam && (isHelper || isSimple); - - // if ambiguous, we can possibly resolve the ambiguity now - // An eligible helper is one that does not have a complex path, i.e. `this.foo`, `../foo` etc. - if (isEligible && !isHelper) { - var _name2 = sexpr.path.parts[0], - options = this.options; - - if (options.knownHelpers[_name2]) { - isHelper = true; - } else if (options.knownHelpersOnly) { - isEligible = false; - } - } - - if (isHelper) { - return 'helper'; - } else if (isEligible) { - return 'ambiguous'; - } else { - return 'simple'; - } - }, - - pushParams: function pushParams(params) { - for (var i = 0, l = params.length; i < l; i++) { - this.pushParam(params[i]); - } - }, - - pushParam: function pushParam(val) { - var value = val.value != null ? val.value : val.original || ''; - - if (this.stringParams) { - if (value.replace) { - value = value.replace(/^(\.?\.\/)*/g, '').replace(/\//g, '.'); - } - - if (val.depth) { - this.addDepth(val.depth); - } - this.opcode('getContext', val.depth || 0); - this.opcode('pushStringParam', value, val.type); - - if (val.type === 'SubExpression') { - // SubExpressions get evaluated and passed in - // in string params mode. - this.accept(val); - } - } else { - if (this.trackIds) { - var blockParamIndex = undefined; - if (val.parts && !_AST.helpers.scopedId(val) && !val.depth) { - blockParamIndex = this.blockParamIndex(val.parts[0]); - } - if (blockParamIndex) { - var blockParamChild = val.parts.slice(1).join('.'); - this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild); - } else { - value = val.original || value; - if (value.replace) { - value = value.replace(/^\.\//g, '').replace(/^\.$/g, ''); - } - - this.opcode('pushId', val.type, value); - } - } - this.accept(val); - } - }, - - setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty) { - var params = sexpr.params; - this.pushParams(params); - - this.opcode('pushProgram', program); - this.opcode('pushProgram', inverse); - - if (sexpr.hash) { - this.accept(sexpr.hash); - } else { - this.opcode('emptyHash', omitEmpty); - } - - return params; - }, - - blockParamIndex: function blockParamIndex(name) { - for (var depth = 0, len = this.options.blockParams.length; depth < len; depth++) { - var blockParams = this.options.blockParams[depth], - param = blockParams && _utils.indexOf(blockParams, name); - if (blockParams && param >= 0) { - return [depth, param]; - } - } - } - }; - - function precompile(input, options, env) { - if (input == null || typeof input !== 'string' && input.type !== 'Program') { - throw new _Exception('You must pass a string or Handlebars AST to Handlebars.precompile. You passed ' + input); - } - - options = options || {}; - if (!('data' in options)) { - options.data = true; - } - if (options.compat) { - options.useDepths = true; - } - - var ast = env.parse(input, options), - environment = new env.Compiler().compile(ast, options); - return new env.JavaScriptCompiler().compile(environment, options); - } - - function compile(input, _x, env) { - var options = arguments[1] === undefined ? {} : arguments[1]; - - if (input == null || typeof input !== 'string' && input.type !== 'Program') { - throw new _Exception('You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + input); - } - - if (!('data' in options)) { - options.data = true; - } - if (options.compat) { - options.useDepths = true; - } - - var compiled = undefined; - - function compileInput() { - var ast = env.parse(input, options), - environment = new env.Compiler().compile(ast, options), - templateSpec = new env.JavaScriptCompiler().compile(environment, options, undefined, true); - return env.template(templateSpec); - } - - // Template is only compiled on first use and cached after that point. - function ret(context, execOptions) { - if (!compiled) { - compiled = compileInput(); - } - return compiled.call(this, context, execOptions); - } - ret._setup = function (setupOptions) { - if (!compiled) { - compiled = compileInput(); - } - return compiled._setup(setupOptions); - }; - ret._child = function (i, data, blockParams, depths) { - if (!compiled) { - compiled = compileInput(); - } - return compiled._child(i, data, blockParams, depths); - }; - return ret; - } - - function argEquals(a, b) { - if (a === b) { - return true; - } - - if (_utils.isArray(a) && _utils.isArray(b) && a.length === b.length) { - for (var i = 0; i < a.length; i++) { - if (!argEquals(a[i], b[i])) { - return false; - } - } - return true; - } - } - - function transformLiteralToPath(sexpr) { - if (!sexpr.path.parts) { - var literal = sexpr.path; - // Casting to string here to make false and 0 literal values play nicely with the rest - // of the system. - sexpr.path = new _AST.PathExpression(false, 0, [literal.original + ''], literal.original + '', literal.loc); - } - } -}); -define('handlebars/compiler/code-gen',['exports', 'module', '../utils'], function (exports, module, _utils) { - - - var SourceNode = undefined; - - try { - /* istanbul ignore next */ - if (typeof define !== 'function' || !define.amd) { - // We don't support this in AMD environments. For these environments, we asusme that - // they are running on the browser and thus have no need for the source-map library. - var SourceMap = require('source-map'); - SourceNode = SourceMap.SourceNode; - } - } catch (err) {} - - /* istanbul ignore if: tested but not covered in istanbul due to dist build */ - if (!SourceNode) { - SourceNode = function (line, column, srcFile, chunks) { - this.src = ''; - if (chunks) { - this.add(chunks); - } - }; - /* istanbul ignore next */ - SourceNode.prototype = { - add: function add(chunks) { - if (_utils.isArray(chunks)) { - chunks = chunks.join(''); - } - this.src += chunks; - }, - prepend: function prepend(chunks) { - if (_utils.isArray(chunks)) { - chunks = chunks.join(''); - } - this.src = chunks + this.src; - }, - toStringWithSourceMap: function toStringWithSourceMap() { - return { code: this.toString() }; - }, - toString: function toString() { - return this.src; - } - }; - } - - function castChunk(chunk, codeGen, loc) { - if (_utils.isArray(chunk)) { - var ret = []; - - for (var i = 0, len = chunk.length; i < len; i++) { - ret.push(codeGen.wrap(chunk[i], loc)); - } - return ret; - } else if (typeof chunk === 'boolean' || typeof chunk === 'number') { - // Handle primitives that the SourceNode will throw up on - return chunk + ''; - } - return chunk; - } - - function CodeGen(srcFile) { - this.srcFile = srcFile; - this.source = []; - } - - CodeGen.prototype = { - prepend: function prepend(source, loc) { - this.source.unshift(this.wrap(source, loc)); - }, - push: function push(source, loc) { - this.source.push(this.wrap(source, loc)); - }, - - merge: function merge() { - var source = this.empty(); - this.each(function (line) { - source.add([' ', line, '\n']); - }); - return source; - }, - - each: function each(iter) { - for (var i = 0, len = this.source.length; i < len; i++) { - iter(this.source[i]); - } - }, - - empty: function empty() { - var loc = arguments[0] === undefined ? this.currentLocation || { start: {} } : arguments[0]; - - return new SourceNode(loc.start.line, loc.start.column, this.srcFile); - }, - wrap: function wrap(chunk) { - var loc = arguments[1] === undefined ? this.currentLocation || { start: {} } : arguments[1]; - - if (chunk instanceof SourceNode) { - return chunk; - } - - chunk = castChunk(chunk, this, loc); - - return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk); - }, - - functionCall: function functionCall(fn, type, params) { - params = this.generateList(params); - return this.wrap([fn, type ? '.' + type + '(' : '(', params, ')']); - }, - - quotedString: function quotedString(str) { - return '"' + (str + '').replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\u2028/g, '\\u2028') // Per Ecma-262 7.3 + 7.8.4 - .replace(/\u2029/g, '\\u2029') + '"'; - }, - - objectLiteral: function objectLiteral(obj) { - var pairs = []; - - for (var key in obj) { - if (obj.hasOwnProperty(key)) { - var value = castChunk(obj[key], this); - if (value !== 'undefined') { - pairs.push([this.quotedString(key), ':', value]); - } - } - } - - var ret = this.generateList(pairs); - ret.prepend('{'); - ret.add('}'); - return ret; - }, - - generateList: function generateList(entries, loc) { - var ret = this.empty(loc); - - for (var i = 0, len = entries.length; i < len; i++) { - if (i) { - ret.add(','); - } - - ret.add(castChunk(entries[i], this, loc)); - } - - return ret; - }, - - generateArray: function generateArray(entries, loc) { - var ret = this.generateList(entries, loc); - ret.prepend('['); - ret.add(']'); - - return ret; - } - }; - - module.exports = CodeGen; -}); -/*global define */ - -/* NOP */; -define('handlebars/compiler/javascript-compiler',['exports', 'module', '../base', '../exception', '../utils', './code-gen'], function (exports, module, _base, _exception, _utils, _codeGen) { - - - var _interopRequire = function (obj) { return obj && obj.__esModule ? obj['default'] : obj; }; - - var _Exception = _interopRequire(_exception); - - var _CodeGen = _interopRequire(_codeGen); - - function Literal(value) { - this.value = value; - } - - function JavaScriptCompiler() {} - - JavaScriptCompiler.prototype = { - // PUBLIC API: You can override these methods in a subclass to provide - // alternative compiled forms for name lookup and buffering semantics - nameLookup: function nameLookup(parent, name /* , type*/) { - if (JavaScriptCompiler.isValidJavaScriptVariableName(name)) { - return [parent, '.', name]; - } else { - return [parent, '[\'', name, '\']']; - } - }, - depthedLookup: function depthedLookup(name) { - return [this.aliasable('this.lookup'), '(depths, "', name, '")']; - }, - - compilerInfo: function compilerInfo() { - var revision = _base.COMPILER_REVISION, - versions = _base.REVISION_CHANGES[revision]; - return [revision, versions]; - }, - - appendToBuffer: function appendToBuffer(source, location, explicit) { - // Force a source as this simplifies the merge logic. - if (!_utils.isArray(source)) { - source = [source]; - } - source = this.source.wrap(source, location); - - if (this.environment.isSimple) { - return ['return ', source, ';']; - } else if (explicit) { - // This is a case where the buffer operation occurs as a child of another - // construct, generally braces. We have to explicitly output these buffer - // operations to ensure that the emitted code goes in the correct location. - return ['buffer += ', source, ';']; - } else { - source.appendToBuffer = true; - return source; - } - }, - - initializeBuffer: function initializeBuffer() { - return this.quotedString(''); - }, - // END PUBLIC API - - compile: function compile(environment, options, context, asObject) { - this.environment = environment; - this.options = options; - this.stringParams = this.options.stringParams; - this.trackIds = this.options.trackIds; - this.precompile = !asObject; - - this.name = this.environment.name; - this.isChild = !!context; - this.context = context || { - programs: [], - environments: [] - }; - - this.preamble(); - - this.stackSlot = 0; - this.stackVars = []; - this.aliases = {}; - this.registers = { list: [] }; - this.hashes = []; - this.compileStack = []; - this.inlineStack = []; - this.blockParams = []; - - this.compileChildren(environment, options); - - this.useDepths = this.useDepths || environment.useDepths || this.options.compat; - this.useBlockParams = this.useBlockParams || environment.useBlockParams; - - var opcodes = environment.opcodes, - opcode = undefined, - firstLoc = undefined, - i = undefined, - l = undefined; - - for (i = 0, l = opcodes.length; i < l; i++) { - opcode = opcodes[i]; - - this.source.currentLocation = opcode.loc; - firstLoc = firstLoc || opcode.loc; - this[opcode.opcode].apply(this, opcode.args); - } - - // Flush any trailing content that might be pending. - this.source.currentLocation = firstLoc; - this.pushSource(''); - - /* istanbul ignore next */ - if (this.stackSlot || this.inlineStack.length || this.compileStack.length) { - throw new _Exception('Compile completed with content left on stack'); - } - - var fn = this.createFunctionContext(asObject); - if (!this.isChild) { - var ret = { - compiler: this.compilerInfo(), - main: fn - }; - var programs = this.context.programs; - for (i = 0, l = programs.length; i < l; i++) { - if (programs[i]) { - ret[i] = programs[i]; - } - } - - if (this.environment.usePartial) { - ret.usePartial = true; - } - if (this.options.data) { - ret.useData = true; - } - if (this.useDepths) { - ret.useDepths = true; - } - if (this.useBlockParams) { - ret.useBlockParams = true; - } - if (this.options.compat) { - ret.compat = true; - } - - if (!asObject) { - ret.compiler = JSON.stringify(ret.compiler); - - this.source.currentLocation = { start: { line: 1, column: 0 } }; - ret = this.objectLiteral(ret); - - if (options.srcName) { - ret = ret.toStringWithSourceMap({ file: options.destName }); - ret.map = ret.map && ret.map.toString(); - } else { - ret = ret.toString(); - } - } else { - ret.compilerOptions = this.options; - } - - return ret; - } else { - return fn; - } - }, - - preamble: function preamble() { - // track the last context pushed into place to allow skipping the - // getContext opcode when it would be a noop - this.lastContext = 0; - this.source = new _CodeGen(this.options.srcName); - }, - - createFunctionContext: function createFunctionContext(asObject) { - var varDeclarations = ''; - - var locals = this.stackVars.concat(this.registers.list); - if (locals.length > 0) { - varDeclarations += ', ' + locals.join(', '); - } - - // Generate minimizer alias mappings - // - // When using true SourceNodes, this will update all references to the given alias - // as the source nodes are reused in situ. For the non-source node compilation mode, - // aliases will not be used, but this case is already being run on the client and - // we aren't concern about minimizing the template size. - var aliasCount = 0; - for (var alias in this.aliases) { - // eslint-disable-line guard-for-in - var node = this.aliases[alias]; - - if (this.aliases.hasOwnProperty(alias) && node.children && node.referenceCount > 1) { - varDeclarations += ', alias' + ++aliasCount + '=' + alias; - node.children[0] = 'alias' + aliasCount; - } - } - - var params = ['depth0', 'helpers', 'partials', 'data']; - - if (this.useBlockParams || this.useDepths) { - params.push('blockParams'); - } - if (this.useDepths) { - params.push('depths'); - } - - // Perform a second pass over the output to merge content when possible - var source = this.mergeSource(varDeclarations); - - if (asObject) { - params.push(source); - - return Function.apply(this, params); - } else { - return this.source.wrap(['function(', params.join(','), ') {\n ', source, '}']); - } - }, - mergeSource: function mergeSource(varDeclarations) { - var isSimple = this.environment.isSimple, - appendOnly = !this.forceBuffer, - appendFirst = undefined, - sourceSeen = undefined, - bufferStart = undefined, - bufferEnd = undefined; - this.source.each(function (line) { - if (line.appendToBuffer) { - if (bufferStart) { - line.prepend(' + '); - } else { - bufferStart = line; - } - bufferEnd = line; - } else { - if (bufferStart) { - if (!sourceSeen) { - appendFirst = true; - } else { - bufferStart.prepend('buffer += '); - } - bufferEnd.add(';'); - bufferStart = bufferEnd = undefined; - } - - sourceSeen = true; - if (!isSimple) { - appendOnly = false; - } - } - }); - - if (appendOnly) { - if (bufferStart) { - bufferStart.prepend('return '); - bufferEnd.add(';'); - } else if (!sourceSeen) { - this.source.push('return "";'); - } - } else { - varDeclarations += ', buffer = ' + (appendFirst ? '' : this.initializeBuffer()); - - if (bufferStart) { - bufferStart.prepend('return buffer + '); - bufferEnd.add(';'); - } else { - this.source.push('return buffer;'); - } - } - - if (varDeclarations) { - this.source.prepend('var ' + varDeclarations.substring(2) + (appendFirst ? '' : ';\n')); - } - - return this.source.merge(); - }, - - // [blockValue] - // - // On stack, before: hash, inverse, program, value - // On stack, after: return value of blockHelperMissing - // - // The purpose of this opcode is to take a block of the form - // `{{#this.foo}}...{{/this.foo}}`, resolve the value of `foo`, and - // replace it on the stack with the result of properly - // invoking blockHelperMissing. - blockValue: function blockValue(name) { - var blockHelperMissing = this.aliasable('helpers.blockHelperMissing'), - params = [this.contextName(0)]; - this.setupHelperArgs(name, 0, params); - - var blockName = this.popStack(); - params.splice(1, 0, blockName); - - this.push(this.source.functionCall(blockHelperMissing, 'call', params)); - }, - - // [ambiguousBlockValue] - // - // On stack, before: hash, inverse, program, value - // Compiler value, before: lastHelper=value of last found helper, if any - // On stack, after, if no lastHelper: same as [blockValue] - // On stack, after, if lastHelper: value - ambiguousBlockValue: function ambiguousBlockValue() { - // We're being a bit cheeky and reusing the options value from the prior exec - var blockHelperMissing = this.aliasable('helpers.blockHelperMissing'), - params = [this.contextName(0)]; - this.setupHelperArgs('', 0, params, true); - - this.flushInline(); - - var current = this.topStack(); - params.splice(1, 0, current); - - this.pushSource(['if (!', this.lastHelper, ') { ', current, ' = ', this.source.functionCall(blockHelperMissing, 'call', params), '}']); - }, - - // [appendContent] - // - // On stack, before: ... - // On stack, after: ... - // - // Appends the string value of `content` to the current buffer - appendContent: function appendContent(content) { - if (this.pendingContent) { - content = this.pendingContent + content; - } else { - this.pendingLocation = this.source.currentLocation; - } - - this.pendingContent = content; - }, - - // [append] - // - // On stack, before: value, ... - // On stack, after: ... - // - // Coerces `value` to a String and appends it to the current buffer. - // - // If `value` is truthy, or 0, it is coerced into a string and appended - // Otherwise, the empty string is appended - append: function append() { - if (this.isInline()) { - this.replaceStack(function (current) { - return [' != null ? ', current, ' : ""']; - }); - - this.pushSource(this.appendToBuffer(this.popStack())); - } else { - var local = this.popStack(); - this.pushSource(['if (', local, ' != null) { ', this.appendToBuffer(local, undefined, true), ' }']); - if (this.environment.isSimple) { - this.pushSource(['else { ', this.appendToBuffer('\'\'', undefined, true), ' }']); - } - } - }, - - // [appendEscaped] - // - // On stack, before: value, ... - // On stack, after: ... - // - // Escape `value` and append it to the buffer - appendEscaped: function appendEscaped() { - this.pushSource(this.appendToBuffer([this.aliasable('this.escapeExpression'), '(', this.popStack(), ')'])); - }, - - // [getContext] - // - // On stack, before: ... - // On stack, after: ... - // Compiler value, after: lastContext=depth - // - // Set the value of the `lastContext` compiler value to the depth - getContext: function getContext(depth) { - this.lastContext = depth; - }, - - // [pushContext] - // - // On stack, before: ... - // On stack, after: currentContext, ... - // - // Pushes the value of the current context onto the stack. - pushContext: function pushContext() { - this.pushStackLiteral(this.contextName(this.lastContext)); - }, - - // [lookupOnContext] - // - // On stack, before: ... - // On stack, after: currentContext[name], ... - // - // Looks up the value of `name` on the current context and pushes - // it onto the stack. - lookupOnContext: function lookupOnContext(parts, falsy, scoped) { - var i = 0; - - if (!scoped && this.options.compat && !this.lastContext) { - // The depthed query is expected to handle the undefined logic for the root level that - // is implemented below, so we evaluate that directly in compat mode - this.push(this.depthedLookup(parts[i++])); - } else { - this.pushContext(); - } - - this.resolvePath('context', parts, i, falsy); - }, - - // [lookupBlockParam] - // - // On stack, before: ... - // On stack, after: blockParam[name], ... - // - // Looks up the value of `parts` on the given block param and pushes - // it onto the stack. - lookupBlockParam: function lookupBlockParam(blockParamId, parts) { - this.useBlockParams = true; - - this.push(['blockParams[', blockParamId[0], '][', blockParamId[1], ']']); - this.resolvePath('context', parts, 1); - }, - - // [lookupData] - // - // On stack, before: ... - // On stack, after: data, ... - // - // Push the data lookup operator - lookupData: function lookupData(depth, parts) { - if (!depth) { - this.pushStackLiteral('data'); - } else { - this.pushStackLiteral('this.data(data, ' + depth + ')'); - } - - this.resolvePath('data', parts, 0, true); - }, - - resolvePath: function resolvePath(type, parts, i, falsy) { - var _this = this; - - if (this.options.strict || this.options.assumeObjects) { - this.push(strictLookup(this.options.strict, this, parts, type)); - return; - } - - var len = parts.length; - for (; i < len; i++) { - /*eslint-disable no-loop-func */ - this.replaceStack(function (current) { - var lookup = _this.nameLookup(current, parts[i], type); - // We want to ensure that zero and false are handled properly if the context (falsy flag) - // needs to have the special handling for these values. - if (!falsy) { - return [' != null ? ', lookup, ' : ', current]; - } else { - // Otherwise we can use generic falsy handling - return [' && ', lookup]; - } - }); - /*eslint-enable no-loop-func */ - } - }, - - // [resolvePossibleLambda] - // - // On stack, before: value, ... - // On stack, after: resolved value, ... - // - // If the `value` is a lambda, replace it on the stack by - // the return value of the lambda - resolvePossibleLambda: function resolvePossibleLambda() { - this.push([this.aliasable('this.lambda'), '(', this.popStack(), ', ', this.contextName(0), ')']); - }, - - // [pushStringParam] - // - // On stack, before: ... - // On stack, after: string, currentContext, ... - // - // This opcode is designed for use in string mode, which - // provides the string value of a parameter along with its - // depth rather than resolving it immediately. - pushStringParam: function pushStringParam(string, type) { - this.pushContext(); - this.pushString(type); - - // If it's a subexpression, the string result - // will be pushed after this opcode. - if (type !== 'SubExpression') { - if (typeof string === 'string') { - this.pushString(string); - } else { - this.pushStackLiteral(string); - } - } - }, - - emptyHash: function emptyHash(omitEmpty) { - if (this.trackIds) { - this.push('{}'); // hashIds - } - if (this.stringParams) { - this.push('{}'); // hashContexts - this.push('{}'); // hashTypes - } - this.pushStackLiteral(omitEmpty ? 'undefined' : '{}'); - }, - pushHash: function pushHash() { - if (this.hash) { - this.hashes.push(this.hash); - } - this.hash = { values: [], types: [], contexts: [], ids: [] }; - }, - popHash: function popHash() { - var hash = this.hash; - this.hash = this.hashes.pop(); - - if (this.trackIds) { - this.push(this.objectLiteral(hash.ids)); - } - if (this.stringParams) { - this.push(this.objectLiteral(hash.contexts)); - this.push(this.objectLiteral(hash.types)); - } - - this.push(this.objectLiteral(hash.values)); - }, - - // [pushString] - // - // On stack, before: ... - // On stack, after: quotedString(string), ... - // - // Push a quoted version of `string` onto the stack - pushString: function pushString(string) { - this.pushStackLiteral(this.quotedString(string)); - }, - - // [pushLiteral] - // - // On stack, before: ... - // On stack, after: value, ... - // - // Pushes a value onto the stack. This operation prevents - // the compiler from creating a temporary variable to hold - // it. - pushLiteral: function pushLiteral(value) { - this.pushStackLiteral(value); - }, - - // [pushProgram] - // - // On stack, before: ... - // On stack, after: program(guid), ... - // - // Push a program expression onto the stack. This takes - // a compile-time guid and converts it into a runtime-accessible - // expression. - pushProgram: function pushProgram(guid) { - if (guid != null) { - this.pushStackLiteral(this.programExpression(guid)); - } else { - this.pushStackLiteral(null); - } - }, - - // [invokeHelper] - // - // On stack, before: hash, inverse, program, params..., ... - // On stack, after: result of helper invocation - // - // Pops off the helper's parameters, invokes the helper, - // and pushes the helper's return value onto the stack. - // - // If the helper is not found, `helperMissing` is called. - invokeHelper: function invokeHelper(paramSize, name, isSimple) { - var nonHelper = this.popStack(), - helper = this.setupHelper(paramSize, name), - simple = isSimple ? [helper.name, ' || '] : ''; - - var lookup = ['('].concat(simple, nonHelper); - if (!this.options.strict) { - lookup.push(' || ', this.aliasable('helpers.helperMissing')); - } - lookup.push(')'); - - this.push(this.source.functionCall(lookup, 'call', helper.callParams)); - }, - - // [invokeKnownHelper] - // - // On stack, before: hash, inverse, program, params..., ... - // On stack, after: result of helper invocation - // - // This operation is used when the helper is known to exist, - // so a `helperMissing` fallback is not required. - invokeKnownHelper: function invokeKnownHelper(paramSize, name) { - var helper = this.setupHelper(paramSize, name); - this.push(this.source.functionCall(helper.name, 'call', helper.callParams)); - }, - - // [invokeAmbiguous] - // - // On stack, before: hash, inverse, program, params..., ... - // On stack, after: result of disambiguation - // - // This operation is used when an expression like `{{foo}}` - // is provided, but we don't know at compile-time whether it - // is a helper or a path. - // - // This operation emits more code than the other options, - // and can be avoided by passing the `knownHelpers` and - // `knownHelpersOnly` flags at compile-time. - invokeAmbiguous: function invokeAmbiguous(name, helperCall) { - this.useRegister('helper'); - - var nonHelper = this.popStack(); - - this.emptyHash(); - var helper = this.setupHelper(0, name, helperCall); - - var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper'); - - var lookup = ['(', '(helper = ', helperName, ' || ', nonHelper, ')']; - if (!this.options.strict) { - lookup[0] = '(helper = '; - lookup.push(' != null ? helper : ', this.aliasable('helpers.helperMissing')); - } - - this.push(['(', lookup, helper.paramsInit ? ['),(', helper.paramsInit] : [], '),', '(typeof helper === ', this.aliasable('"function"'), ' ? ', this.source.functionCall('helper', 'call', helper.callParams), ' : helper))']); - }, - - // [invokePartial] - // - // On stack, before: context, ... - // On stack after: result of partial invocation - // - // This operation pops off a context, invokes a partial with that context, - // and pushes the result of the invocation back. - invokePartial: function invokePartial(isDynamic, name, indent) { - var params = [], - options = this.setupParams(name, 1, params, false); - - if (isDynamic) { - name = this.popStack(); - delete options.name; - } - - if (indent) { - options.indent = JSON.stringify(indent); - } - options.helpers = 'helpers'; - options.partials = 'partials'; - - if (!isDynamic) { - params.unshift(this.nameLookup('partials', name, 'partial')); - } else { - params.unshift(name); - } - - if (this.options.compat) { - options.depths = 'depths'; - } - options = this.objectLiteral(options); - params.push(options); - - this.push(this.source.functionCall('this.invokePartial', '', params)); - }, - - // [assignToHash] - // - // On stack, before: value, ..., hash, ... - // On stack, after: ..., hash, ... - // - // Pops a value off the stack and assigns it to the current hash - assignToHash: function assignToHash(key) { - var value = this.popStack(), - context = undefined, - type = undefined, - id = undefined; - - if (this.trackIds) { - id = this.popStack(); - } - if (this.stringParams) { - type = this.popStack(); - context = this.popStack(); - } - - var hash = this.hash; - if (context) { - hash.contexts[key] = context; - } - if (type) { - hash.types[key] = type; - } - if (id) { - hash.ids[key] = id; - } - hash.values[key] = value; - }, - - pushId: function pushId(type, name, child) { - if (type === 'BlockParam') { - this.pushStackLiteral('blockParams[' + name[0] + '].path[' + name[1] + ']' + (child ? ' + ' + JSON.stringify('.' + child) : '')); - } else if (type === 'PathExpression') { - this.pushString(name); - } else if (type === 'SubExpression') { - this.pushStackLiteral('true'); - } else { - this.pushStackLiteral('null'); - } - }, - - // HELPERS - - compiler: JavaScriptCompiler, - - compileChildren: function compileChildren(environment, options) { - var children = environment.children, - child = undefined, - compiler = undefined; - - for (var i = 0, l = children.length; i < l; i++) { - child = children[i]; - compiler = new this.compiler(); // eslint-disable-line new-cap - - var index = this.matchExistingProgram(child); - - if (index == null) { - this.context.programs.push(''); // Placeholder to prevent name conflicts for nested children - index = this.context.programs.length; - child.index = index; - child.name = 'program' + index; - this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile); - this.context.environments[index] = child; - - this.useDepths = this.useDepths || compiler.useDepths; - this.useBlockParams = this.useBlockParams || compiler.useBlockParams; - } else { - child.index = index; - child.name = 'program' + index; - - this.useDepths = this.useDepths || child.useDepths; - this.useBlockParams = this.useBlockParams || child.useBlockParams; - } - } - }, - matchExistingProgram: function matchExistingProgram(child) { - for (var i = 0, len = this.context.environments.length; i < len; i++) { - var environment = this.context.environments[i]; - if (environment && environment.equals(child)) { - return i; - } - } - }, - - programExpression: function programExpression(guid) { - var child = this.environment.children[guid], - programParams = [child.index, 'data', child.blockParams]; - - if (this.useBlockParams || this.useDepths) { - programParams.push('blockParams'); - } - if (this.useDepths) { - programParams.push('depths'); - } - - return 'this.program(' + programParams.join(', ') + ')'; - }, - - useRegister: function useRegister(name) { - if (!this.registers[name]) { - this.registers[name] = true; - this.registers.list.push(name); - } - }, - - push: function push(expr) { - if (!(expr instanceof Literal)) { - expr = this.source.wrap(expr); - } - - this.inlineStack.push(expr); - return expr; - }, - - pushStackLiteral: function pushStackLiteral(item) { - this.push(new Literal(item)); - }, - - pushSource: function pushSource(source) { - if (this.pendingContent) { - this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation)); - this.pendingContent = undefined; - } - - if (source) { - this.source.push(source); - } - }, - - replaceStack: function replaceStack(callback) { - var prefix = ['('], - stack = undefined, - createdStack = undefined, - usedLiteral = undefined; - - /* istanbul ignore next */ - if (!this.isInline()) { - throw new _Exception('replaceStack on non-inline'); - } - - // We want to merge the inline statement into the replacement statement via ',' - var top = this.popStack(true); - - if (top instanceof Literal) { - // Literals do not need to be inlined - stack = [top.value]; - prefix = ['(', stack]; - usedLiteral = true; - } else { - // Get or create the current stack name for use by the inline - createdStack = true; - var _name = this.incrStack(); - - prefix = ['((', this.push(_name), ' = ', top, ')']; - stack = this.topStack(); - } - - var item = callback.call(this, stack); - - if (!usedLiteral) { - this.popStack(); - } - if (createdStack) { - this.stackSlot--; - } - this.push(prefix.concat(item, ')')); - }, - - incrStack: function incrStack() { - this.stackSlot++; - if (this.stackSlot > this.stackVars.length) { - this.stackVars.push('stack' + this.stackSlot); - } - return this.topStackName(); - }, - topStackName: function topStackName() { - return 'stack' + this.stackSlot; - }, - flushInline: function flushInline() { - var inlineStack = this.inlineStack; - this.inlineStack = []; - for (var i = 0, len = inlineStack.length; i < len; i++) { - var entry = inlineStack[i]; - /* istanbul ignore if */ - if (entry instanceof Literal) { - this.compileStack.push(entry); - } else { - var stack = this.incrStack(); - this.pushSource([stack, ' = ', entry, ';']); - this.compileStack.push(stack); - } - } - }, - isInline: function isInline() { - return this.inlineStack.length; - }, - - popStack: function popStack(wrapped) { - var inline = this.isInline(), - item = (inline ? this.inlineStack : this.compileStack).pop(); - - if (!wrapped && item instanceof Literal) { - return item.value; - } else { - if (!inline) { - /* istanbul ignore next */ - if (!this.stackSlot) { - throw new _Exception('Invalid stack pop'); - } - this.stackSlot--; - } - return item; - } - }, - - topStack: function topStack() { - var stack = this.isInline() ? this.inlineStack : this.compileStack, - item = stack[stack.length - 1]; - - /* istanbul ignore if */ - if (item instanceof Literal) { - return item.value; - } else { - return item; - } - }, - - contextName: function contextName(context) { - if (this.useDepths && context) { - return 'depths[' + context + ']'; - } else { - return 'depth' + context; - } - }, - - quotedString: function quotedString(str) { - return this.source.quotedString(str); - }, - - objectLiteral: function objectLiteral(obj) { - return this.source.objectLiteral(obj); - }, - - aliasable: function aliasable(name) { - var ret = this.aliases[name]; - if (ret) { - ret.referenceCount++; - return ret; - } - - ret = this.aliases[name] = this.source.wrap(name); - ret.aliasable = true; - ret.referenceCount = 1; - - return ret; - }, - - setupHelper: function setupHelper(paramSize, name, blockHelper) { - var params = [], - paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper); - var foundHelper = this.nameLookup('helpers', name, 'helper'); - - return { - params: params, - paramsInit: paramsInit, - name: foundHelper, - callParams: [this.contextName(0)].concat(params) - }; - }, - - setupParams: function setupParams(helper, paramSize, params) { - var options = {}, - contexts = [], - types = [], - ids = [], - param = undefined; - - options.name = this.quotedString(helper); - options.hash = this.popStack(); - - if (this.trackIds) { - options.hashIds = this.popStack(); - } - if (this.stringParams) { - options.hashTypes = this.popStack(); - options.hashContexts = this.popStack(); - } - - var inverse = this.popStack(), - program = this.popStack(); - - // Avoid setting fn and inverse if neither are set. This allows - // helpers to do a check for `if (options.fn)` - if (program || inverse) { - options.fn = program || 'this.noop'; - options.inverse = inverse || 'this.noop'; - } - - // The parameters go on to the stack in order (making sure that they are evaluated in order) - // so we need to pop them off the stack in reverse order - var i = paramSize; - while (i--) { - param = this.popStack(); - params[i] = param; - - if (this.trackIds) { - ids[i] = this.popStack(); - } - if (this.stringParams) { - types[i] = this.popStack(); - contexts[i] = this.popStack(); - } - } - - if (this.trackIds) { - options.ids = this.source.generateArray(ids); - } - if (this.stringParams) { - options.types = this.source.generateArray(types); - options.contexts = this.source.generateArray(contexts); - } - - if (this.options.data) { - options.data = 'data'; - } - if (this.useBlockParams) { - options.blockParams = 'blockParams'; - } - return options; - }, - - setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister) { - var options = this.setupParams(helper, paramSize, params, true); - options = this.objectLiteral(options); - if (useRegister) { - this.useRegister('options'); - params.push('options'); - return ['options=', options]; - } else { - params.push(options); - return ''; - } - } - }; - - (function () { - var reservedWords = ('break else new var' + ' case finally return void' + ' catch for switch while' + ' continue function this with' + ' default if throw' + ' delete in try' + ' do instanceof typeof' + ' abstract enum int short' + ' boolean export interface static' + ' byte extends long super' + ' char final native synchronized' + ' class float package throws' + ' const goto private transient' + ' debugger implements protected volatile' + ' double import public let yield await' + ' null true false').split(' '); - - var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {}; - - for (var i = 0, l = reservedWords.length; i < l; i++) { - compilerWords[reservedWords[i]] = true; - } - })(); - - JavaScriptCompiler.isValidJavaScriptVariableName = function (name) { - return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name); - }; - - function strictLookup(requireTerminal, compiler, parts, type) { - var stack = compiler.popStack(), - i = 0, - len = parts.length; - if (requireTerminal) { - len--; - } - - for (; i < len; i++) { - stack = compiler.nameLookup(stack, parts[i], type); - } - - if (requireTerminal) { - return [compiler.aliasable('this.strict'), '(', stack, ', ', compiler.quotedString(parts[i]), ')']; - } else { - return stack; - } - } - - module.exports = JavaScriptCompiler; -}); -define('handlebars',['exports', 'module', './handlebars.runtime', './handlebars/compiler/ast', './handlebars/compiler/base', './handlebars/compiler/compiler', './handlebars/compiler/javascript-compiler', './handlebars/compiler/visitor', './handlebars/no-conflict'], function (exports, module, _handlebarsRuntime, _handlebarsCompilerAst, _handlebarsCompilerBase, _handlebarsCompilerCompiler, _handlebarsCompilerJavascriptCompiler, _handlebarsCompilerVisitor, _handlebarsNoConflict) { - - - var _interopRequire = function (obj) { return obj && obj.__esModule ? obj['default'] : obj; }; - - var _runtime = _interopRequire(_handlebarsRuntime); - - // Compiler imports - - var _AST = _interopRequire(_handlebarsCompilerAst); - - var _JavaScriptCompiler = _interopRequire(_handlebarsCompilerJavascriptCompiler); - - var _Visitor = _interopRequire(_handlebarsCompilerVisitor); - - var _noConflict = _interopRequire(_handlebarsNoConflict); - - var _create = _runtime.create; - function create() { - var hb = _create(); - - hb.compile = function (input, options) { - return _handlebarsCompilerCompiler.compile(input, options, hb); - }; - hb.precompile = function (input, options) { - return _handlebarsCompilerCompiler.precompile(input, options, hb); - }; - - hb.AST = _AST; - hb.Compiler = _handlebarsCompilerCompiler.Compiler; - hb.JavaScriptCompiler = _JavaScriptCompiler; - hb.Parser = _handlebarsCompilerBase.parser; - hb.parse = _handlebarsCompilerBase.parse; - - return hb; - } - - var inst = create(); - inst.create = create; - - _noConflict(inst); - - inst.Visitor = _Visitor; - - inst['default'] = inst; - - module.exports = inst; -}); diff --git a/node_modules/handlebars/dist/handlebars.amd.min.js b/node_modules/handlebars/dist/handlebars.amd.min.js deleted file mode 100644 index 752a053..0000000 --- a/node_modules/handlebars/dist/handlebars.amd.min.js +++ /dev/null @@ -1,29 +0,0 @@ -/*! - - handlebars v3.0.3 - -Copyright (C) 2011-2014 by Yehuda Katz - -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. - -@license -*/ -define("handlebars/utils",["exports"],function(a){function b(a){return i[a]}function c(a){for(var b=1;b
` tags; it tries
-to detect the language automatically. If automatic detection doesn’t
-work for you, you can specify the language in the `class` attribute:
-
-```html
-...
-```
-
-The list of supported language classes is available in the [class
-reference][2]. Classes can also be prefixed with either `language-` or
-`lang-`.
-
-To disable highlighting altogether use the `nohighlight` class:
-
-```html
-...
-```
-
-## Custom Initialization
-
-When you need a bit more control over the initialization of
-highlight.js, you can use the [`highlightBlock`][3] and [`configure`][4]
-functions. This allows you to control *what* to highlight and *when*.
-
-Here’s an equivalent way to calling [`initHighlightingOnLoad`][1] using
-jQuery:
-
-```javascript
-$(document).ready(function() {
- $('pre code').each(function(i, block) {
- hljs.highlightBlock(block);
- });
-});
-```
-
-You can use any tags instead of `` to mark up your code. If
-you don't use a container that preserve line breaks you will need to
-configure highlight.js to use the `
` tag:
-
-```javascript
-hljs.configure({useBR: true});
-
-$('div.code').each(function(i, block) {
- hljs.highlightBlock(block);
-});
-```
-
-For other options refer to the documentation for [`configure`][4].
-
-## Getting the Library
-
-You can get highlight.js as a hosted, or custom-build, browser script or
-as a server module. Right out of the box the browser script supports
-both AMD and CommonJS, so if you wish you can use RequireJS or
-Browserify without having to build from source. The server module also
-works perfectly fine with Browserify, but there is the option to use a
-build specific to browsers rather than something meant for a server.
-Head over to the [download page][5] for all the options.
-
-**Note:** the library is not supposed to work straight from the source
-on GitHub; it requires building. If none of the pre-packaged options
-work for you refer to the [building documentation][6].
-
-## License
-
-Highlight.js is released under the BSD License. See [LICENSE][7] file
-for details.
-
-## Links
-
-The official site for the library is at .
-
-Further in-depth documentation for the API and other topics is at
- .
-
-Authors and contributors are listed in the [AUTHORS.en.txt][8] file.
-
-[1]: http://highlightjs.readthedocs.org/en/latest/api.html#inithighlightingonload
-[2]: http://highlightjs.readthedocs.org/en/latest/css-classes-reference.html
-[3]: http://highlightjs.readthedocs.org/en/latest/api.html#highlightblock-block
-[4]: http://highlightjs.readthedocs.org/en/latest/api.html#configure-options
-[5]: https://highlightjs.org/download/
-[6]: http://highlightjs.readthedocs.org/en/latest/building-testing.html
-[7]: https://github.com/isagalaev/highlight.js/blob/master/LICENSE
-[8]: https://github.com/isagalaev/highlight.js/blob/master/AUTHORS.en.txt
diff --git a/node_modules/highlight.js/docs/api.rst b/node_modules/highlight.js/docs/api.rst
deleted file mode 100644
index d3418a7..0000000
--- a/node_modules/highlight.js/docs/api.rst
+++ /dev/null
@@ -1,116 +0,0 @@
-Library API
-===========
-
-Highlight.js exports a few functions as methods of the ``hljs`` object.
-
-
-``highlight(name, value, ignore_illegals, continuation)``
----------------------------------------------------------
-
-Core highlighting function.
-Accepts a language name, or an alias, and a string with the code to highlight.
-The ``ignore_illegals`` parameter, when present and evaluates to a true value,
-forces highlighting to finish even in case of detecting illegal syntax for the
-language instead of throwing an exception.
-The ``continuation`` is an optional mode stack representing unfinished parsing.
-When present, the function will restart parsing from this state instead of
-initializing a new one.
-Returns an object with the following properties:
-
-* ``language``: language name, same as the one passed into a function, returned for consistency with ``highlightAuto``
-* ``relevance``: integer value
-* ``value``: HTML string with highlighting markup
-* ``top``: top of the current mode stack
-
-
-``highlightAuto(value, languageSubset)``
-----------------------------------------
-
-Highlighting with language detection.
-Accepts a string with the code to highlight and an optional array of language names and aliases restricting detection to only those languages. The subset can also be set with ``configure``, but the local parameter overrides the option if set.
-Returns an object with the following properties:
-
-* ``language``: detected language
-* ``relevance``: integer value
-* ``value``: HTML string with highlighting markup
-* ``second_best``: object with the same structure for second-best heuristically detected language, may be absent
-
-
-``fixMarkup(value)``
---------------------
-
-Post-processing of the highlighted markup. Currently consists of replacing indentation TAB characters and using ``
`` tags instead of new-line characters. Options are set globally with ``configure``.
-
-Accepts a string with the highlighted markup.
-
-
-``highlightBlock(block)``
--------------------------
-
-Applies highlighting to a DOM node containing code.
-
-This function is the one to use to apply highlighting dynamically after page load
-or within initialization code of third-party Javascript frameworks.
-
-
-``configure(options)``
-----------------------
-
-Configures global options:
-
-* ``tabReplace``: a string used to replace TAB characters in indentation.
-* ``useBR``: a flag to generate ``
`` tags instead of new-line characters in the output, useful when code is marked up using a non-```` container.
-* ``classPrefix``: a string prefix added before class names in the generated markup, used for backwards compatibility with stylesheets.
-* ``languages``: an array of language names and aliases restricting auto detection to only these languages.
-
-Accepts an object representing options with the values to updated. Other options don't change
-::
-
- hljs.configure({
- tabReplace: ' ', // 4 spaces
- classPrefix: '' // don't append class prefix
- // … other options aren't changed
- })
- hljs.initHighlighting();
-
-
-``initHighlighting()``
-----------------------
-
-Applies highlighting to all ``..
`` blocks on a page.
-
-
-
-``initHighlightingOnLoad()``
-----------------------------
-
-Attaches highlighting to the page load event.
-
-
-``registerLanguage(name, language)``
-------------------------------------
-
-Adds new language to the library under the specified name. Used mostly internally.
-
-* ``name``: a string with the name of the language being registered
-* ``language``: a function that returns an object which represents the
- language definition. The function is passed the ``hljs`` object to be able
- to use common regular expressions defined within it.
-
-
-``listLanguages()``
-----------------------------
-
-Returns the languages names list.
-
-
-
-.. _getLanguage:
-
-
-``getLanguage(name)``
----------------------
-
-Looks up a language by name or alias.
-
-Returns the language object if found, ``undefined`` otherwise.
diff --git a/node_modules/highlight.js/docs/building-testing.rst b/node_modules/highlight.js/docs/building-testing.rst
deleted file mode 100644
index 16292cb..0000000
--- a/node_modules/highlight.js/docs/building-testing.rst
+++ /dev/null
@@ -1,88 +0,0 @@
-Building and testing
-====================
-
-To actually run highlight.js it is necessary to build it for the environment
-where you're going to run it: a browser, the node.js server, etc.
-
-
-Building
---------
-
-The build tool is written in JavaScript using node.js. Before running the
-script, make sure to have node installed and run ``npm install`` to get the
-dependencies.
-
-The tool is located in ``tools/build.js``. A few useful examples:
-
-* Build for a browser using only common languages::
-
- node tools/build.js :common
-
-* Build for node.js including all available languages::
-
- node tools/build.js -t node
-
-* Build two specific languages for debugging, skipping compression in this case::
-
- node tools/build.js -n python ruby
-
-On some systems the node binary is named ``nodejs``; simply replace ``node``
-with ``nodejs`` in the examples above if that is the case.
-
-The full option reference is available with the usual ``--help`` option.
-
-The build result will be in the ``build/`` directory.
-
-.. _basic-testing:
-
-Basic testing
--------------
-
-The usual approach to debugging and testing a language is first doing it
-visually. You need to build highlight.js with only the language you're working
-on (without compression, to have readable code in browser error messages) and
-then use the Developer tool in ``tools/developer.html`` to see how it highlights
-a test snippet in that language.
-
-A test snippet should be short and give the idea of the overall look of the
-language. It shouldn't include every possible syntactic element and shouldn't
-even make practical sense.
-
-After you satisfied with the result you need to make sure that language
-detection still works with your language definition included in the whole suite.
-
-Testing is done using `Mocha `_ and the
-files are found in the ``test/`` directory. You can use the node build to
-run the tests in the command line with ``npm test`` after installing the
-dependencies with ``npm install``.
-
-**Note**: for Debian-based machine, like Ubuntu, you might need to create an
-alias or symbolic link for nodejs to node. The reason for this is the
-dependencies that are requires to test highlight.js has a reference to
-"node".
-
-Place the snippet you used inside the browser in
-``test/detect//default.txt``, build the package with all the languages
-for node and run the test suite. If your language breaks auto-detection, it
-should be fixed by :ref:`improving relevance `, which is a black art
-in and of itself. When in doubt, please refer to the discussion group!
-
-
-Testing markup
---------------
-
-You can also provide additional markup tests for the language to test isolated
-cases of various syntactic construct. If your language has 19 different string
-literals or complicated heuristics for telling division (``/``) apart from
-regexes (``/ .. /``) -- this is the place.
-
-A test case consists of two files:
-
-* ``test/markup//.txt``: test code
-* ``test/markup//.expect.txt``: reference rendering
-
-To generate reference rendering use the Developer tool located at
-``tools/developer.html``. Make sure to explicitly select your language in the
-drop-down menu, as automatic detection is unlikely to work in this case.
-
-
diff --git a/node_modules/highlight.js/docs/css-classes-reference.rst b/node_modules/highlight.js/docs/css-classes-reference.rst
deleted file mode 100644
index 4b4095d..0000000
--- a/node_modules/highlight.js/docs/css-classes-reference.rst
+++ /dev/null
@@ -1,1488 +0,0 @@
-CSS classes reference
-=====================
-
-This is a full list of available classes corresponding to languages'
-syntactic structures. The parentheses after language name contain identifiers
-used as class names in ```` element.
-
-Python ("python", "py", "gyp")
-------------------------------
-
-* ``keyword``: keyword
-* ``built_in``: built-in objects (None, False, True and Ellipsis)
-* ``number``: number
-* ``string``: string (of any type)
-* ``comment``: comment
-* ``decorator``: @-decorator for functions
-* ``function``: function header "def some_name(...):"
-* ``class``: class header "class SomeName(...):"
-* ``title``: name of a function or a class inside a header
-* ``params``: everything inside parentheses in a function's or class' header
-
-Python profiler results ("profile")
------------------------------------
-
-* ``number``: number
-* ``string``: string
-* ``built_in``: built-in function entry
-* ``filename``: filename in an entry
-* ``summary``: profiling summary
-* ``header``: header of table of results
-* ``keyword``: column header
-* ``function``: function name in an entry (including parentheses)
-* ``title``: actual name of a function in an entry (excluding parentheses)
-* ``prompt``: interpreter prompt (>>> or ...)
-
-Ruby ("ruby", "rb", "gemspec", "podspec", "thor", "irb")
---------------------------------------------------------
-
-* ``keyword``: keyword
-* ``string``: string
-* ``subst``: in-string substitution (#{...})
-* ``comment``: comment
-* ``doctag``: YARD doctag
-* ``function``: function header "def some_name(...):"
-* ``class``: class header "class SomeName(...):"
-* ``title``: name of a function or a class inside a header
-* ``parent``: name of a parent class
-* ``symbol``: symbol
-* ``input``: complete input line (interpreter)
-* ``output``: complete output line (interpreter)
-* ``prompt``: interpreter prompt (>>)
-* ``status``: interpreter response (=>)
-
-Haml ("haml")
--------------
-
-* ``tag``: any tag starting with "%"
-* ``title``: tag's name
-* ``attribute``: tag's attribute
-* ``keyword``: tag's attribute that is a keyword
-* ``string``: attribute's value that is a string
-* ``value``: attribute's value, shorthand id or class for tag
-* ``comment``: comment
-* ``doctype``: !!! declaration
-* ``bullet``: line defined by variable
-
-Perl ("perl", "pl")
--------------------
-
-* ``keyword``: keyword
-* ``comment``: comment
-* ``number``: number
-* ``string``: string
-* ``regexp``: regular expression
-* ``sub``: subroutine header (from "sub" till "{")
-* ``variable``: variable starting with "$", "%", "@"
-* ``operator``: operator
-* ``pod``: plain old doc
-
-PHP ("php", "php3", "php4", "php5", "php6")
--------------------------------------------
-
-* ``keyword``: keyword
-* ``number``: number
-* ``string``: string (of any type)
-* ``comment``: comment
-* ``doctag``: phpdoc params in comments
-* ``variable``: variable starting with "$"
-* ``preprocessor``: preprocessor marks: ""
-* ``class``: class header
-* ``function``: header of a function
-* ``title``: name of a function inside a header
-* ``params``: parentheses and everything inside them in a function's header
-
-Scala ("scala")
----------------
-
-* ``keyword``: keyword
-* ``number``: number
-* ``string``: string
-* ``comment``: comment
-* ``doctag``: @-tag in javadoc comment
-* ``annotation``: annotation
-* ``class``: class header
-* ``title``: class name inside a header
-* ``params``: everything in parentheses inside a class header
-* ``inheritance``: keywords "extends" and "with" inside class header
-
-Groovy ("groovy")
------------------
-
-* ``keyword``: keyword
-* ``number``: number
-* ``string``: string, map string keys and named argument labels
-* ``regex``: regular expression
-* ``comment``: comment
-* ``doctag``: @-tag in javadoc comment
-* ``annotation``: annotation
-* ``class``: class header
-* ``title``: class name inside a header
-* ``label``: label
-* ``shebang``: Groovy shell script header
-
-Go ("go", "golang")
--------------------
-
-* ``comment``: comment
-* ``string``: string constant
-* ``number``: number
-* ``keyword``: language keywords
-* ``constant``: true false nil iota
-* ``typename``: built-in plain types (int, string etc.)
-* ``built_in``: built-in functions
-
-Gradle ("gradle")
------------------
-
-* ``keyword``: keyword
-* ``number``: number
-* ``string``: string and character
-* ``comment``: comment
-* ``regexp``: regular expression
-
-
-HTML, XML ("xml", "html", "xhtml", "rss", "atom", "xsl", "plist")
------------------------------------------------------------------
-
-* ``tag``: any tag from "<" till ">"
-* ``attribute``: tag's attribute with or without value
-* ``value``: attribute's value
-* ``comment``: comment
-* ``pi``: processing instruction ( ... ?>)
-* ``doctype``: declaration
-* ``cdata``: CDATA section
-
-Lasso ("lasso", "ls", "lassoscript")
-------------------------------------
-
-* ``preprocessor``: delimiters and interpreter flags
-* ``shebang``: Lasso 9 shell script header
-* ``comment``: single- or multi-line comment
-* ``keyword``: keyword
-* ``literal``: keyword representing a value
-* ``built_in``: built-in types and variables
-* ``number``: number
-* ``string``: string
-* ``variable``: variable reference starting with "#" or "$"
-* ``tag``: tag literal
-* ``attribute``: named or rest parameter in method signature
-* ``subst``: unary/binary/ternary operator symbols
-* ``class``: type, trait, or method header
-* ``title``: name following "define" inside a header
-
-CSS ("css")
------------
-
-* ``tag``: tag in selectors
-* ``id``: #some_name in selectors
-* ``class``: .some_name in selectors
-* ``at_rule``: @-rule till first "{" or ";"
-* ``keyword``: name of @-rule after @ sign
-* ``attr_selector``: attribute selector (square brackets in a[href^=http://])
-* ``pseudo``: pseudo classes and elements (:after, ::after etc.)
-* ``comment``: comment
-* ``rules``: everything from "{" till "}"
-* ``rule``: rule itself — everything inside "{" and "}"
-* ``attribute``: property name inside a rule
-* ``value``: property value inside a rule, from ":" till ";" or till the end of rule block
-* ``number``: number within a value
-* ``string``: string within a value
-* ``hexcolor``: hex color (#FFFFFF) within a value
-* ``function``: CSS function within a value
-* ``important``: "!important" symbol
-
-SCSS ("scss")
--------------
-
-* ``tag``: tag in selectors
-* ``id``: #some_name in selectors
-* ``class``: .some_name in selectors
-* ``at_rule``: @-rule till first "{" or ";"
-* ``attr_selector``: attribute selector (square brackets in a[href^=http://])
-* ``pseudo``: pseudo classes and elements (:after, ::after etc.)
-* ``comment``: comment
-* ``rules``: everything from "{" till "}"
-* ``attribute``: property name inside a rule
-* ``value``: property value inside a rule, from ":" till ";" or till the end of rule block
-* ``number``: number within a value
-* ``string``: string within a value
-* ``hexcolor``: hex color (#FFFFFF) within a value
-* ``function``: CSS function within a value
-* ``important``: "!important" symbol
-* ``variable``: variable starting with "$"
-* ``preprocessor``: keywords after @
-
-Less ("less")
--------------
-
-* ``comment``: comment
-* ``number``: number
-* ``string``: string
-* ``attribute``: property name
-* ``variable``: @var, @@var or @{var}
-* ``keyword``: Less keywords (when, extend etc.)
-* ``function``: Less and CSS functions (rgba, unit etc.)
-* ``tag``: tag
-* ``id``: #id
-* ``class``: .class
-* ``at_rule``: at-rule keyword (@media, @keyframes etc.)
-* ``attr_selector``: attribute selector (e.g. [href^=http://])
-* ``pseudo``: pseudo classes and elements (:hover, ::before etc.)
-* ``hexcolor``: hex color (#FFF)
-* ``built_in``: inline javascript (or whatever host language) string
-
-Stylus ("stylus", "styl")
--------------------------
-
-* ``at_rule``: @-rule till first "{" or ";"
-* ``attribute``: property name inside a rule
-* ``class``: .some_name in selectors
-* ``comment``: comment
-* ``function``: Stylus function
-* ``hexcolor``: hex color (#FFFFFF) within a value
-* ``id``: #some_name in selectors
-* ``number``: number within a value
-* ``pseudo``: pseudo classes and elements (:after, ::after etc.)
-* ``string``: string within a value
-* ``tag``: tag in selectors
-* ``variable``: variable starting with "$"
-
-Markdown ("markdown", "md", "mkdown", "mkd")
---------------------------------------------
-
-* ``header``: header
-* ``bullet``: list bullet
-* ``emphasis``: emphasis
-* ``strong``: strong emphasis
-* ``blockquote``: blockquote
-* ``code``: code
-* ``horizontal_rule``: horizontal rule
-* ``link_label``: link label
-* ``link_url``: link url
-* ``link_reference``: link reference
-
-AsciiDoc ("asciidoc", "adoc")
------------------------------
-
-* ``header``: heading
-* ``bullet``: list or labeled bullet
-* ``emphasis``: emphasis
-* ``strong``: strong emphasis
-* ``blockquote``: blockquote
-* ``code``: inline or block code
-* ``horizontal_rule``: horizontal rule
-* ``link_label``: link or image label
-* ``link_url``: link or image url
-* ``comment``: comment
-* ``attribute``: document attribute, block attributes
-* ``label``: admonition label
-
-Django ("django", "jinja")
---------------------------
-
-* ``keyword``: HTML tag in HTML, default tags and default filters in templates
-* ``tag``: any tag from "<" till ">"
-* ``comment``: template comment, both {# .. #} and {% comment %}
-* ``doctype``: declaration
-* ``attribute``: tag's attribute with or without value
-* ``value``: attribute's value
-* ``template_tag``: template tag {% .. %}
-* ``variable``: template variable {{ .. }}
-* ``filter``: filter from "|" till the next filter or the end of tag
-* ``argument``: filter argument
-
-
-Twig ("twig", "craftcms")
--------------------------
-
-* ``keyword``: HTML tag in HTML, default tags and default filters in templates
-* ``tag``: any tag from "<" till ">"
-* ``comment``: template comment {# .. #}
-* ``doctype``: declaration
-* ``attribute``: tag's attribute with or withou value
-* ``value``: attribute's value
-* ``template_tag``: template tag {% .. %}
-* ``variable``: template variable {{ .. }}
-* ``filter``: filter from "|" till the next filter or the end of tag
-* ``argument``: filter argument
-
-
-Handlebars ("handlebars", "hbs", "html.hbs", "html.handlebars")
----------------------------------------------------------------
-
-* ``expression``: expression to be evaluated
-* ``variable``: variable
-* ``begin-block``: the beginning of a block
-* ``end-block``: the ending of a block
-* ``string``: string
-
-Dust ("dust", "dst")
---------------------
-
-* ``expression``: expression to be evaluated
-* ``variable``: variable
-* ``begin-block``: the beginning of a block
-* ``end-block``: the ending of a block
-* ``string``: string
-
-JSON ("json")
--------------
-
-* ``number``: number
-* ``literal``: "true", "false" and "null"
-* ``string``: string value
-* ``attribute``: name of an object property
-* ``value``: value of an object property
-
-Mathematica ("mathematica", "mma")
-----------------------------------
-
-* ``keyword``: keyword
-* ``number``: number
-* ``comment``: comment
-* ``string``: string
-* ``list``: a list { .. } - the basic Mma structure
-
-JavaScript ("javascript", "js")
--------------------------------
-
-* ``keyword``: keyword
-* ``comment``: comment
-* ``number``: number
-* ``literal``: special literal: "true", "false" and "null"
-* ``built_in``: built-in objects and functions ("window", "console", "require", etc...)
-* ``string``: string
-* ``regexp``: regular expression
-* ``function``: header of a function
-* ``title``: name of a function inside a header
-* ``params``: parentheses and everything inside them in a function's header
-* ``pi``: 'use strict' processing instruction
-
-TypeScript ("typescript", "ts")
--------------------------------
-
-* ``keyword``: keyword
-* ``comment``: comment
-* ``number``: number
-* ``literal``: special literal: "true", "false" and "null"
-* ``built_in``: built-in objects and functions ("window", "console", "require", etc...)
-* ``string``: string
-* ``regexp``: regular expression
-* ``function``: header of a function
-* ``title``: name of a function inside a header
-* ``params``: parentheses and everything inside them in a function's header
-* ``pi``: 'use strict' processing instruction
-
-CoffeeScript ("coffeescript", "coffee", "cson", "iced")
--------------------------------------------------------
-
-* ``keyword``: keyword
-* ``comment``: comment
-* ``number``: number
-* ``literal``: special literal: "true", "false" and "null"
-* ``built_in``: built-in objects and functions ("window", "console", "require", etc...)
-* ``string``: string
-* ``subst``: #{ ... } interpolation in double-quoted strings
-* ``regexp``: regular expression
-* ``function``: header of a function
-* ``class``: header of a class
-* ``title``: name of a function variable inside a header
-* ``params``: parentheses and everything inside them in a function's header
-* ``property``: @-property within class and functions
-
-Dart ("dart")
--------------
-
-* ``keyword``: keyword
-* ``literal``: keyword that can be uses as identifier but have special meaning in some cases
-* ``built_in``: some of basic built in classes and function
-* ``number``: number
-* ``string``: string
-* ``subst``: in-string substitution (${...})
-* ``comment``: commment
-* ``annotation``: annotation
-* ``class``: class header from "class" till "{"
-* ``title``: class name
-
-LiveScript ("livescript", "ls")
--------------------------------
-
-* ``keyword``: keyword
-* ``comment``: comment
-* ``number``: number
-* ``literal``: special literal: "true", "false" and "null"
-* ``built_in``: built-in objects and functions ("window", "console", "require", etc...)
-* ``string``: string
-* ``subst``: #{ ... } interpolation in double-quoted strings
-* ``regexp``: regular expression
-* ``function``: header of a function
-* ``class``: header of a class
-* ``title``: name of a function variable inside a header
-* ``params``: parentheses and everything inside them in a function's header
-* ``property``: @-property within class and functions
-
-ActionScript ("actionscript", "as")
------------------------------------
-
-* ``comment``: comment
-* ``string``: string
-* ``number``: number
-* ``keyword``: keywords
-* ``literal``: literal
-* ``reserved``: reserved keyword
-* ``title``: name of declaration (package, class or function)
-* ``preprocessor``: preprocessor directive (import, include)
-* ``type``: type of returned value (for functions)
-* ``package``: package (named or not)
-* ``class``: class/interface
-* ``function``: function
-* ``param``: params of function
-* ``rest_arg``: rest argument of function
-
-Haxe ("haxe", "hx")
--------------------
-
-* ``comment``: comment
-* ``string``: string
-* ``number``: number
-* ``keyword``: keywords
-* ``literal``: literal
-* ``reserved``: reserved keyword
-* ``title``: name of declaration (package, class or function)
-* ``preprocessor``: preprocessor directive (if, else, elseif, error)
-* ``type``: type of returned value (for functions)
-* ``package``: package (named or not)
-* ``class``: class/interface
-* ``function``: function
-* ``param``: params of function
-* ``rest_arg``: rest argument of function
-
-VBScript ("vbscript", "vbs")
-----------------------------
-
-* ``keyword``: keyword
-* ``number``: number
-* ``string``: string
-* ``comment``: comment
-* ``built_in``: built-in function
-
-VB.Net ("vbnet", "vb")
-----------------------
-
-* ``keyword``: keyword
-* ``built_in``: built-in types
-* ``literal``: "true", "false" and "nothing"
-* ``string``: string
-* ``comment``: comment
-* ``xmlDocTag``: xmldoc tag ("'''", "", "<..>")
-* ``preprocessor``: preprocessor directive
-
-Protocol Buffers ("protobuf")
------------------------------
-
-* ``keyword``: keyword
-* ``built_in``: built-in types (e.g. `int64`, `string`)
-* ``string``: string
-* ``number``: number
-* ``literal``: "true" and "false"
-* ``comment``: comment
-* ``class``: message, service or enum definition header
-* ``title``: message, service or enum identifier
-* ``function``: RPC call identifier
-
-Cap’n Proto ("capnproto", "capnp")
-----------------------------------
-
-* ``shebang``: message identifier
-* ``keyword``: keyword
-* ``built_in``: built-in types (e.g. `Int64`, `Text`)
-* ``string``: string
-* ``number``: number or field number (e.g. @N)
-* ``literal``: "true" and "false"
-* ``comment``: comment
-* ``class``: message, interface or enum definition header
-* ``title``: message, interface or enum identifier
-
-Thrift ("thrift")
------------------
-
-* ``keyword``: keyword
-* ``built_in``: built-in types (e.g. `byte`, `i32`)
-* ``string``: string
-* ``number``: number
-* ``literal``: "true" and "false"
-* ``comment``: comment
-* ``class``: struct, enum, service or exception definition header
-* ``title``: struct, enum, service or exception identifier
-
-HTTP ("http", "https")
-----------------------
-
-* ``request``: first line of a request
-* ``status``: first line of a response
-* ``attribute``: header name
-* ``string``: header value or query string in a request line
-* ``number``: status code
-
-Lua ("lua")
------------
-
-* ``keyword``: keyword
-* ``number``: number
-* ``string``: string
-* ``comment``: comment
-* ``built_in``: built-in operator
-* ``function``: header of a function
-* ``title``: name of a function inside a header
-* ``params``: everything inside parentheses in a function's header
-* ``long_brackets``: multiline string in [=[ .. ]=]
-
-Delphi ("delphi")
------------------
-
-* ``keyword``: keyword
-* ``comment``: comment (of any type)
-* ``number``: number
-* ``string``: string
-* ``function``: header of a function, procedure, constructor and destructor
-* ``title``: name of a function, procedure, constructor or destructor inside a header
-* ``params``: everything inside parentheses in a function's header
-* ``class``: class' body from "= class" till "end;"
-
-Oxygene ("oxygene")
--------------------
-
-* ``keyword``: keyword
-* ``comment``: comment (of any type)
-* ``string``: string/char
-* ``function``: method, destructor, procedure or function
-* ``title``: name of a function (inside function)
-* ``params``: everything inside parentheses in a function's header
-* ``number``: number
-* ``class``: class' body from "= class" till "end;"
-
-Java ("java", "jsp")
---------------------
-
-* ``keyword``: keyword
-* ``number``: number
-* ``string``: string
-* ``comment``: comment
-* ``annotaion``: annotation
-* ``class``: class header from "class" till "{"
-* ``function``: method header
-* ``title``: class or method name
-* ``params``: everything in parentheses inside a class header
-* ``inheritance``: keywords "extends" and "implements" inside class header
-
-Processing ("processing")
--------------------------
-
-* ``constant``: Processing constants
-* ``variable``: Processing special variables
-* ``keyword``: Variable types
-* ``function``: Processing setup and draw functions
-* ``built_in``: Processing built in functions
-
-AspectJ ("aspectj")
--------------------
-
-* ``comment``: comment
-* ``doctag``: @-tag in javadoc comment
-* ``string``: string
-* ``number``: number
-* ``keyword``: keyword
-* ``annotation``: annotation
-* ``function``: method and intertype method header
-* ``aspect``: aspect header from "aspect" till "{"
-* ``params``: everything in parentheses inside an aspect header
-* ``inheritance``: keywords "extends" and "implements" inside an aspect header
-* ``title``: aspect, (intertype) method name or pointcut name inside an aspect header
-
-Fortran ("fortran", "f90", "f95")
----------------------------------
-
-* ``comment``: comment
-* ``string``: string constant (single or double quote)
-* ``number``: number
-* ``keyword``: language keywords (function, if)
-
-C++ ("cpp", "c", "cc", "h", "c++", "h++", "hpp")
-------------------------------------------------
-
-* ``keyword``: keyword
-* ``number``: number
-* ``string``: string and character
-* ``comment``: comment
-* ``preprocessor``: preprocessor directive
-
-Objective C ("objectivec", "mm", "objc", "obj-c")
--------------------------------------------------
-
-* ``keyword``: keyword
-* ``built_in``: Cocoa/Cocoa Touch constants and classes
-* ``number``: number
-* ``string``: string
-* ``comment``: comment
-* ``preprocessor``: preprocessor directive
-* ``class``: interface/implementation, protocol and forward class declaration
-* ``title``: title (id) of interface, implementation, protocol, class
-* ``variable``: properties and struct accessors
-
-Vala ("vala")
--------------
-
-* ``keyword``: keyword
-* ``number``: number
-* ``string``: string
-* ``comment``: comment
-* ``class``: class definitions
-* ``title``: in class definition
-* ``constant``: ALL_UPPER_CASE
-
-C# ("cs", "csharp")
--------------------
-
-* ``keyword``: keyword
-* ``number``: number
-* ``string``: string
-* ``comment``: comment
-* ``xmlDocTag``: xmldoc tag ("///", "", "<..>")
-* ``class``: class header from "class" till "{"
-* ``function``: method header
-* ``title``: title of namespace or class
-
-F# ("fsharp", "fs")
--------------------
-
-* ``keywords``: keyword
-* ``number``: number
-* ``string``: string
-* ``comment``: comment
-* ``class``: any custom F# type
-* ``title``: the name of a custom F# type
-* ``annotation``: any attribute
-
-OCaml ("ocaml", "ml")
----------------------
-
-* ``keywords``: keyword
-* ``literal``: true false etc.
-* ``number``: number
-* ``string``: string
-* ``char``: character
-* ``comment``: comment
-* ``built_in``: built-in type (int, list etc.)
-* ``type``: variant constructor, module name
-* ``tag``: polymorphic variant tag
-* ``symbol``: type variable
-
-D ("d")
--------
-
-* ``comment``: comment
-* ``string``: string constant
-* ``number``: number
-* ``keyword``: language keywords (including @attributes)
-* ``constant``: true false null
-* ``built_in``: built-in plain types (int, string etc.)
-
-RenderMan RSL ("rsl")
----------------------
-
-* ``keyword``: keyword
-* ``number``: number
-* ``string``: string (including @"..")
-* ``comment``: comment
-* ``preprocessor``: preprocessor directive
-* ``shader``: shader keywords
-* ``shading``: shading keywords
-* ``built_in``: built-in function
-
-RenderMan RIB ("rib")
----------------------
-
-* ``keyword``: keyword
-* ``number``: number
-* ``string``: string
-* ``comment``: comment
-* ``commands``: command
-
-Maya Embedded Language ("mel")
-------------------------------
-
-* ``keyword``: keyword
-* ``number``: number
-* ``string``: string
-* ``comment``: comment
-* ``variable``: variable
-
-SQL ("sql")
------------
-
-* ``keyword``: keyword (mostly SQL'92, SQL'99 and T-SQL)
-* ``literal``: special literal: "true" and "false"
-* ``built_in``: built-in type name
-* ``number``: number
-* ``string``: string (of any type: "..", '..', \`..\`)
-* ``comment``: comment
-
-Smalltalk ("smalltalk", "st")
------------------------------
-
-* ``keyword``: keyword
-* ``number``: number
-* ``string``: string
-* ``comment``: comment
-* ``symbol``: symbol
-* ``array``: array
-* ``class``: name of a class
-* ``char``: char
-* ``localvars``: block of local variables
-
-Lisp ("lisp")
--------------
-
-* ``number``: number
-* ``string``: string
-* ``comment``: comment
-* ``variable``: variable
-* ``literal``: b, t and nil
-* ``list``: non-quoted list
-* ``keyword``: first symbol in a non-quoted list
-* ``body``: remainder of the non-quoted list
-* ``quoted``: quoted list, both "(quote .. )" and "'(..)"
-
-Clojure ("clojure", "clj")
---------------------------
-
-* ``comment``: comments and hints
-* ``string``: string
-* ``number``: number
-* ``collection``: collections
-* ``attribute``: :keyword
-* ``list``: non-quoted list
-* ``keyword``: first symbol in a list
-* ``built_in``: built-in function name as the first symbol in a list
-* ``prompt``: REPL prompt
-
-Scheme ("scheme")
------------------
-
-* ``shebang``: script interpreter header
-* ``comment``: comment
-* ``string``: string
-* ``number``: number
-* ``regexp``: regexp
-* ``variable``: single-quote 'identifier
-* ``list``: non-quoted list
-* ``keyword``: first symbol in a list
-* ``built_in``: built-in function name as the first symbol in a list
-* ``literal``: #t, #f, #\...\
-
-Ini ("ini")
------------
-
-* ``title``: title of a section
-* ``value``: value of a setting of any type
-* ``string``: string
-* ``number``: number
-* ``keyword``: boolean value keyword
-
-Apache ("apache", "apacheconf")
--------------------------------
-
-* ``keyword``: keyword
-* ``number``: number
-* ``comment``: comment
-* ``literal``: On and Off
-* ``sqbracket``: variables in rewrites "%{..}"
-* ``cbracket``: options in rewrites "[..]"
-* ``tag``: begin and end of a configuration section
-
-Nginx ("nginx", "nginxconf")
-----------------------------
-
-* ``title``: directive title
-* ``string``: string
-* ``number``: number
-* ``comment``: comment
-* ``built_in``: built-in constant
-* ``variable``: $-variable
-* ``regexp``: regexp
-
-Diff ("diff", "patch")
-----------------------
-
-* ``header``: file header
-* ``chunk``: chunk header within a file
-* ``addition``: added lines
-* ``deletion``: deleted lines
-* ``change``: changed lines
-
-DOS ("dos", "bat", "cmd")
--------------------------
-
-* ``keyword``: keyword
-* ``flow``: batch control keyword
-* ``stream``: DOS special files ("con", "prn", ...)
-* ``winutils``: some commands (see dos.js specifically)
-* ``envvar``: environment variables
-
-PowerShell ("powershell", "ps")
--------------------------------
-
-* ``keyword``: keyword
-* ``string``: string
-* ``number``: number
-* ``comment``: comment
-* ``literal``: special literal: "true" and "false"
-* ``variable``: variable
-
-Bash ("bash", "sh", "zsh")
---------------------------
-
-* ``keyword``: keyword
-* ``string``: string
-* ``number``: number
-* ``comment``: comment
-* ``literal``: special literal: "true" and "false"
-* ``variable``: variable
-* ``shebang``: script interpreter header
-
-Makefile ("makefile", "mk", "mak")
-----------------------------------
-
-* ``keyword``: keyword ".PHONY" within the phony line
-* ``string``: string
-* ``comment``: comment
-* ``variable``: $(..) variable
-* ``title``: target title
-* ``constant``: constant within the initial definition
-
-CMake ("cmake", "cmake.in")
----------------------------
-
-* ``keyword``: keyword
-* ``number``: number
-* ``string``: string
-* ``comment``: comment
-* ``envvar``: $-variable
-* ``operator``: operator (LESS, STREQUAL, MATCHES, etc)
-
-Nix ("nix")
------------
-
-* ``keyword``: keyword
-* ``built_in``: built-in constant
-* ``number``: number
-* ``string``: single and double quotes
-* ``subst``: antiquote ${}
-* ``comment``: comment
-* ``variable``: function parameter name
-
-NSIS ("nsis")
--------------
-
-* ``symbol``: directory constants
-* ``number``: number
-* ``constant``: definitions, language-strings, compiler commands
-* ``variable``: $-variable
-* ``string``: string
-* ``comment``: comment
-* ``params``: parameters
-* ``keyword``: keywords
-* ``literal``: keyword options
-
-Axapta ("axapta")
------------------
-
-* ``keyword``: keyword
-* ``number``: number
-* ``string``: string
-* ``comment``: comment
-* ``class``: class header from "class" till "{"
-* ``title``: class name inside a header
-* ``params``: everything in parentheses inside a class header
-* ``preprocessor``: preprocessor directive
-
-Oracle Rules Language ("ruleslanguage")
----------------------------------------
-
-* ``comment``: comment
-* ``string``: string constant
-* ``number``: number
-* ``keyword``: language keywords
-* ``built_in``: built-in functions
-* ``array``: array stem
-
-1C ("1c")
----------
-
-* ``keyword``: keyword
-* ``number``: number
-* ``date``: date
-* ``string``: string
-* ``comment``: comment
-* ``function``: header of function or procedure
-* ``title``: function name inside a header
-* ``params``: everything in parentheses inside a function header
-* ``preprocessor``: preprocessor directive
-
-x86 Assembly ("x86asm")
------------------------
-
-* ``keyword``: instruction mnemonic
-* ``literal``: register name
-* ``pseudo``: assembler's pseudo instruction
-* ``preprocessor``: macro
-* ``built_in``: assembler's keyword
-* ``comment``: comment
-* ``number``: number
-* ``string``: string
-* ``label``: jump label
-* ``argument``: macro's argument
-
-AVR assembler ("avrasm")
-------------------------
-
-* ``keyword``: keyword
-* ``built_in``: pre-defined register
-* ``number``: number
-* ``string``: string
-* ``comment``: comment
-* ``label``: label
-* ``preprocessor``: preprocessor directive
-* ``localvars``: substitution in .macro
-
-VHDL ("vhdl")
--------------
-
-* ``keyword``: keyword
-* ``number``: number
-* ``string``: string
-* ``comment``: comment
-* ``literal``: signal logical value
-* ``typename``: typename
-* ``attribute``: signal attribute
-
-Parser3 ("parser3")
--------------------
-
-* ``keyword``: keyword
-* ``number``: number
-* ``comment``: comment
-* ``variable``: variable starting with "$"
-* ``preprocessor``: preprocessor directive
-* ``title``: user-defined name starting with "@"
-
-LiveCode Server ("livecodeserver")
-----------------------------------
-
-* ``variable``: variable starting with "g", "t", "p", "s", "$_"
-* ``string``: string
-* ``comment``: comment
-* ``number``: number
-* ``title``: name of a command or a function
-* ``keyword``: keyword
-* ``constant``: constant
-* ``operator``: operator
-* ``built_in``: built_in functions and commands
-* ``function``: header of a function
-* ``command``: header of a command
-* ``preprocessor``: preprocessor marks: "", ""
-
-TeX ("tex")
------------
-
-* ``comment``: comment
-* ``number``: number
-* ``command``: command
-* ``parameter``: parameter
-* ``formula``: formula
-* ``special``: special symbol
-
-Haskell ("haskell", "hs")
--------------------------
-
-* ``comment``: comment
-* ``pragma``: GHC pragma
-* ``preprocessor``: CPP preprocessor directive
-* ``keyword``: keyword
-* ``number``: number
-* ``string``: string
-* ``title``: function or variable name
-* ``type``: value, type or type class constructor name (i.e. capitalized)
-* ``container``: (..., ...) or {...; ...} list in declaration or record
-* ``module``: module declaration
-* ``import``: import declaration
-* ``class``: type class or instance declaration
-* ``typedef``: type declaration (type, newtype, data)
-* ``default``: default declaration
-* ``infix``: infix declaration
-* ``foreign``: FFI declaration
-* ``shebang``: shebang line
-
-Elm ("elm")
--------------------------
-
-* ``comment``: comment
-* ``keyword``: keyword
-* ``number``: number
-* ``string``: string
-* ``title``: function or variable name
-* ``type``: value or type constructor name (i.e. capitalized)
-* ``container``: (..., ...) or {...; ...} list in declaration or record
-* ``module``: module declaration
-* ``import``: import declaration
-* ``typedef``: type declaration (type, type alias)
-* ``infix``: infix declaration
-* ``foreign``: javascript interop declaration
-
-Erlang ("erlang", "erl")
-------------------------
-
-* ``comment``: comment
-* ``string``: string
-* ``number``: number
-* ``keyword``: keyword
-* ``record_name``: record access (#record_name)
-* ``title``: name of declaration function
-* ``variable``: variable (starts with capital letter or with _)
-* ``pp``:.keywords module's attribute (-attribute)
-* ``function_name``: atom or atom:atom in case of function call
-
-Elixir ("elixir")
------------------
-
-* ``keyword``: keyword
-* ``string``: string
-* ``subst``: in-string substitution (#{...})
-* ``comment``: comment
-* ``function``: function header "def some_name(...):"
-* ``class``: defmodule and defrecord headers
-* ``title``: name of a function or a module inside a header
-* ``symbol``: atom
-* ``constant``: name of a module
-* ``number``: number
-* ``variable``: variable
-* ``regexp``: regexp
-
-Rust ("rust", "rs")
--------------------
-
-* ``comment``: comment
-* ``string``: string
-* ``number``: number
-* ``keyword``: keyword
-* ``title``: name of declaration
-* ``preprocessor``: preprocessor directive
-
-Matlab ("matlab")
------------------
-
-* ``comment``: comment
-* ``string``: string
-* ``number``: number
-* ``keyword``: keyword
-* ``title``: function name
-* ``function``: function
-* ``param``: params of function
-* ``matrix``: matrix in [ .. ]
-* ``cell``: cell in { .. }
-
-Scilab ("scilab", "sci")
-------------------------
-
-* ``comment``: comment
-* ``string``: string
-* ``number``: number
-* ``keyword``: keyword
-* ``title``: function name
-* ``function``: function
-* ``param``: params of function
-* ``matrix``: matrix in [ .. ]
-
-R ("r")
--------
-
-* ``comment``: comment
-* ``string``: string constant
-* ``number``: number
-* ``keyword``: language keywords (function, if) plus "structural" functions (attach, require, setClass)
-* ``literal``: special literal: TRUE, FALSE, NULL, NA, etc.
-
-OpenGL Shading Language ("glsl")
---------------------------------
-
-* ``comment``: comment
-* ``number``: number
-* ``preprocessor``: preprocessor directive
-* ``keyword``: keyword
-* ``built_in``: GLSL built-in functions and variables
-* ``literal``: true false
-
-AppleScript ("applescript", "osascript")
-----------------------------------------
-
-* ``keyword``: keyword
-* ``command``: core AppleScript command
-* ``constant``: AppleScript built in constant
-* ``type``: AppleScript variable type (integer, etc.)
-* ``property``: Applescript built in property (length, etc.)
-* ``number``: number
-* ``string``: string
-* ``comment``: comment
-* ``title``: name of a handler
-
-Vim Script ("vim")
-------------------
-
-* ``keyword``: keyword
-* ``built_in``: built-in functions
-* ``string``: string, comment
-* ``number``: number
-* ``function``: function header "function Foo(...)"
-* ``title``: name of a function
-* ``params``: everything inside parentheses in a function's header
-* ``variable``: vim variables with different visibilities "g:foo, b:bar"
-
-Brainfuck ("brainfuck", "bf")
------------------------------
-
-* ``title``: Brainfuck while loop command
-* ``literal``: Brainfuck inc and dec commands
-* ``comment``: comment
-* ``string``: Brainfuck input and output commands
-
-Mizar ("mizar")
----------------
-
-* ``keyword``: keyword
-* ``comment``: comment
-
-AutoHotkey ("autohotkey")
--------------------------
-
-* ``keyword``: keyword
-* ``literal``: A (active window), true, false, NOT, AND, OR
-* ``built_in``: built-in variables
-* ``string``: string
-* ``comment``: comment
-* ``number``: number
-* ``var_expand``: variable expansion (enclosed in percent sign)
-* ``label``: label, hotkey label, hotstring label
-
-Monkey ("monkey")
------------------
-
-* ``keyword``: keyword
-* ``built_in``: built-in functions, variables and types of variables
-* ``literal``: True, False, Null, And, Or, Shl, Shr, Mod
-* ``string``: string
-* ``comment``: comment
-* ``number``: number
-* ``function``: header of a function, method and constructor
-* ``class``: class header
-* ``title``: name of an alias, class, interface, function or method inside a header
-* ``variable``: self and super keywords
-* ``preprocessor``: import and preprocessor
-* ``pi``: Strict directive
-
-FIX ("fix")
------------
-
-* ``attribute``: attribute name
-* ``string``: attribute value
-
-Gherkin ("gherkin")
--------------------
-
-* ``keyword``: keyword
-* ``number``: number
-* ``comment``: comment
-* ``string``: string
-
-TP ("tp")
----------
-
-* ``keyword``: keyword
-* ``constant``: ON, OFF, max_speed, LPOS, JPOS, ENABLE, DISABLE, START, STOP, RESET
-* ``number``: number
-* ``comment``: comment
-* ``string``: string
-* ``data``: numeric registers, positions, position registers, etc.
-* ``io``: inputs and outputs
-* ``label``: data and io labels
-* ``variable``: system variables
-* ``units``: units (e.g. mm/sec, sec, deg)
-
-Nimrod ("nimrod", "nim")
-------------------------
-
-* ``decorator`` pragma
-* ``string`` string literal
-* ``type`` variable type
-* ``number`` numeric literal
-* ``comment`` comment
-
-Swift ("swift")
----------------
-
-* ``keyword``: keyword
-* ``comment``: comment
-* ``number``: number
-* ``string``: string
-* ``literal``: special literal: "true", "false" and "nil"
-* ``built_in``: built-in Swift functions
-* ``func``: header of a function
-* ``class``: class, protocol, enum, struct, or extension declaration
-* ``title``: name of a function or class (or protocol, etc)
-* ``generics``: generic type of a function
-* ``params``: parameters of a function
-* ``type``: a type
-* ``preprocessor``: @attributes
-
-G-Code ("gcode", "nc")
-----------------------
-
-* ``keyword``: G words, looping constructs and conditional operators
-* ``comment``: comment
-* ``number``: number
-* ``built_in``: trigonometric and mathematical functions
-* ``title``: M words and variable registers
-* ``preprocessor``: program number and ending character
-* ``label``: block number
-
-Q ("k", "kdb")
---------------
-
-* ``comment``: comment
-* ``string``: string constant
-* ``number``: number
-* ``keyword``: language keywords
-* ``constant``: 0/1b
-* ``typename``: built-in plain types (int, symbol etc.)
-* ``built_in``: built-in function
-
-Tcl ("tcl", "tk")
------------------
-
-* ``keyword``: keyword
-* ``comment``: comment
-* ``symbol``: function (proc)
-* ``variable``: variable
-* ``string``: string
-* ``number``: number
-
-Puppet ("puppet", "pp")
------------------------
-
-* ``comment``: comment
-* ``string``: string
-* ``number``: number
-* ``keyword``: classes and types
-* ``constant``: dependencies
-
-Stata ("stata")
----------------
-
-* ``keyword``: commands and control flow
-* ``label``: macros (locals and globals)
-* ``string``: string
-* ``comment``: comment
-* ``literal``: built-in functions
-
-XL ("xl", "tao")
-----------------
-
-* ``keyword``: keywords defined in the default syntax file
-* ``literal``: names entered in the compiler (true, false, nil)
-* ``type``: basic types (integer, real, text, name, etc)
-* ``built_in``: built-in functions (sin, exp, mod, etc)
-* ``module``: names of frequently used Tao modules
-* ``id``: names of frequently used Tao functions
-* ``constant``: all-uppercase names such as HELLO
-* ``variable``: Mixed-case names such as Hello (style convention)
-* ``id``: Lower-case names such as hello
-* ``string``: Text between single or double quote, long text << >>
-* ``number``: Number values
-* ``function``: Function or variable definition
-* ``import``: Import clause
-
-Roboconf ("graph", "instances")
--------------------------------
-
-* ``keyword``: keyword
-* ``string``: names of imported variables
-* ``comment``: comment
-* ``facet``: a **facet** section
-* ``component``: a **component** section
-* ``instance-of``: an **instance** section
-
-STEP Part 21 ("p21", "step", "stp")
------------------------------------
-
-* ``preprocessor``: delimiters
-* ``comment``: single- or multi-line comment
-* ``keyword``: keyword
-* ``number``: number
-* ``string``: string
-* ``label``: variable reference starting with "#"
-
-Mercury ("mercury")
--------------------
-
-* ``keyword``: keyword
-* ``pragma``: compiler directive
-* ``preprocessor``: foreign language interface
-* ``built_in``: control flow, logical, implication, head-body conjunction, purity
-* ``number``: number, numcode of character
-* ``comment``: comment
-* ``label``: TODO label inside comment
-* ``string``: string
-* ``constant``: string format
-
-Smali ("smali")
----------------
-
-* ``string``: string
-* ``comment``: comment
-* ``keyword``: smali keywords
-* ``instruction``: instruction
-* ``class``: classtypes
-* ``function``: function (call or signature)
-* ``variable``: variable or parameter
-
-Verilog ("verilog", "v")
-------------------------
-
-* ``keyword``: keyword, operator
-* ``comment``: comment
-* ``typename``: types of data, register, and net
-* ``number``: number literals (including X and Z)
-* ``value``: parameters passed to instances
-
-Dockerfile ("dockerfile", "docker")
------------------------------------
-
-* ``keyword``: instruction keyword
-* ``comment``: comment
-* ``number``: number
-* ``string``: string
-
-PF ("pf", "pf.conf")
---------------------
-
-* ``built_in``: top level action, e.g. block/match/pass
-* ``keyword``: some parameter/modifier to an action (in, on, nat-to, most reserved words)
-* ``literal``: words representing special values, e.g. all, egress
-* ``comment``: comment
-* ``number``: number
-* ``string``: string
-* ``variable``: used for both macros and tables
-
-XQuery ("xpath", "xq")
-----------------------
-
-* ``keyword``: instruction keyword
-* ``literal``: words representing special values, e.g. all, egress
-* ``comment``: comment
-* ``number``: number
-* ``string``: string
-* ``variable``: variable
-* ``decorator``: annotations
-* ``function``: function
-
-C/AL ("cal")
-------------
-
-* ``keyword``: keyword
-* ``comment``: comment (of any type)
-* ``number``: number
-* ``string``: string
-* ``date``: date, time, or datetime
-* ``function``: header of a procedure
-* ``title``: name of an object or procedure inside a header
-* ``params``: everything inside parentheses in a function's header
-* ``class``: objects body
-* ``variable``: reference to variables
-
-Inform7 ("I7")
---------------
-
-* ``string``: string
-* ``comment``: comment
-* ``title``: a section header or table header
-* ``subst``: a substitution inside a string
-* ``kind``: a built-in kind (thing, room, person, etc), for relevance
-* ``characteristic``: a commonly-used characteristic (open, closed, scenery, etc), for relevance
-* ``verb``: a commonly-used verb (is, understand), for relevance.
-* ``misc_keyword``: a word with specific I7 meaning (kind, rule), for relevance.
-
-Prolog ("prolog")
------------------
-
-* ``atom``: non-quoted atoms and functor names
-* ``string``: quoted atoms, strings, character code list literals, character code literals
-* ``number``: numbers
-* ``variable``: variables
-* ``comment``: comments
-
-DNS Zone file ("dns", "zone", "bind")
--------------------------------------
-
-* ``keyword``: DNS resource records as defined in various RFCs
-* ``operator``: operator
-* ``number``: IPv4 and IPv6 addresses
-* ``comment``: comments
-
-Ceylon ("ceylon")
------------------
-
-* ``keyword``: keyword
-* ``annotation``: language annotation or compiler annotation
-* ``string``: string literal, part of string template, character literal
-* ``number``: number
-* ``comment``: comment
-
-OpenSCAD ("openscad", "scad")
------------------------------
-
-* ``built_in``: built-in functions (cube, sphere, translate, ...)
-* ``comment``: comments
-* ``function``: function or module definition
-* ``keyword``: keywords
-* ``literal``: words representing values (e.g. false, undef, PI)
-* ``number``: numbers
-* ``params``: parameters in function or module header or call
-* ``preprocessor``: file includes (i.e. include, use)
-* ``string``: quoted strings
-* ``title``: names of function or module in a header
-
-ARM assembler ("armasm", "arm")
--------------------------------
-
-* ``keyword``: keyword (instruction mnemonics)
-* ``literal``: pre-defined register
-* ``number``: number
-* ``built_in``: constants (true, false)
-* ``string``: string
-* ``comment``: comment
-* ``label``: label
-* ``preprocessor``: preprocessor directive
-* ``title``: symbol versions
-
-AutoIt ("autoit")
--------------------------
-
-* ``keyword``: keyword
-* ``literal``: True, False, And, Null, Not, Or
-* ``built_in``: built-in functions and UDF
-* ``constant``: constant, macros
-* ``variable``: variables
-* ``string``: string
-* ``comment``: comment
-* ``number``: number
-* ``preprocessor``: AutoIt3Wrapper directives section
\ No newline at end of file
diff --git a/node_modules/highlight.js/docs/index.rst b/node_modules/highlight.js/docs/index.rst
deleted file mode 100644
index f80250d..0000000
--- a/node_modules/highlight.js/docs/index.rst
+++ /dev/null
@@ -1,51 +0,0 @@
-.. highlight.js documentation master file, created by
- sphinx-quickstart on Wed Sep 12 23:48:27 2012.
- You can adapt this file completely to your liking, but it should at least
- contain the root `toctree` directive.
-
-``highlight.js`` developer documentation
-==========================================
-
-Contents:
-
-.. toctree::
- :maxdepth: 1
-
- api
- language-guide
- reference
- css-classes-reference
- style-guide
- building-testing
- release-process
-
-Contribution:
-
-.. toctree::
- :maxdepth: 1
-
- language-contribution
- style-contribution
-
-Miscellaneous:
-
-.. toctree::
- :maxdepth: 1
-
- line-numbers
- language-requests
-
-Links:
-
-- Code: https://github.com/isagalaev/highlight.js
-- Discussion: http://groups.google.com/group/highlightjs
-- Bug tracking: https://github.com/isagalaev/highlight.js/issues
-
-
-Indices and tables
-==================
-
-* :ref:`genindex`
-* :ref:`modindex`
-* :ref:`search`
-
diff --git a/node_modules/highlight.js/docs/language-contribution.rst b/node_modules/highlight.js/docs/language-contribution.rst
deleted file mode 100644
index 4deae3f..0000000
--- a/node_modules/highlight.js/docs/language-contribution.rst
+++ /dev/null
@@ -1,78 +0,0 @@
-Language contributor checklist
-==============================
-
-1. Put language definition into a .js file
-------------------------------------------
-
-The file defines a function accepting a reference to the library and returning a language object.
-The library parameter is useful to access common modes and regexps. You should not immediately call this function,
-this is done during the build process and details differ for different build targets.
-
-::
-
- function(hljs) {
- return {
- keywords: 'foo bar',
- contains: [ ..., hljs.NUMBER_MODE, ... ]
- }
- }
-
-The name of the file is used as a short language identifier and should be usable as a class name in HTML and CSS.
-
-
-2. Provide meta data
---------------------
-
-At the top of the file there is a specially formatted comment with meta data processed by a build system.
-Meta data format is simply key-value pairs each occupying its own line:
-
-::
-
- /*
- Language: Superlanguage
- Requires: java.js, sql.js
- Author: John Smith
- Contributors: Mike Johnson <...@...>, Matt Wilson <...@...>
- Description: Some cool language definition
- */
-
-``Language`` — the only required header giving a human-readable language name.
-
-``Requires`` — a list of other language files required for this language to work.
-This make it possible to describe languages that extend definitions of other ones.
-Required files aren't processed in any special way.
-The build system just makes sure that they will be in the final package in
-``LANGUAGES`` object.
-
-The meaning of the other headers is pretty obvious.
-
-
-3. Create a code example
-------------------------
-
-The code example is used both to test language detection and for the demo page
-on https://highlightjs.org/. Put it in ``test/detect//default.txt``.
-
-Take inspiration from other languages in ``test/detect/`` and read
-:ref:`testing instructions ` for more details.
-
-
-4. Write class reference
-------------------------
-
-Class reference lives in the :doc:`CSS classes reference `..
-Describe shortly names of all meaningful modes used in your language definition.
-
-
-5. Add yourself to AUTHORS.*.txt and CHANGES.md
------------------------------------------------
-
-If you're a new contributor add yourself to the authors list. Feel free to use
-either English and/or Russian version.
-Also it will be good to update CHANGES.md.
-
-
-6. Create a pull request
-------------------------
-
-Send your contribution as a pull request on GitHub.
diff --git a/node_modules/highlight.js/docs/language-guide.rst b/node_modules/highlight.js/docs/language-guide.rst
deleted file mode 100644
index e5df0f8..0000000
--- a/node_modules/highlight.js/docs/language-guide.rst
+++ /dev/null
@@ -1,247 +0,0 @@
-Language definition guide
-=========================
-
-Highlighting overview
----------------------
-
-Programming language code consists of parts with different rules of parsing: keywords like ``for`` or ``if``
-don't make sense inside strings, strings may contain backslash-escaped symbols like ``\"``
-and comments usually don't contain anything interesting except the end of the comment.
-
-In highlight.js such parts are called "modes".
-
-Each mode consists of:
-
-* starting condition
-* ending condition
-* list of contained sub-modes
-* lexing rules and keywords
-* …exotic stuff like another language inside a language
-
-The parser's work is to look for modes and their keywords.
-Upon finding, it wraps them into the markup ``...``
-and puts the name of the mode ("string", "comment", "number")
-or a keyword group name ("keyword", "literal", "built-in") as the span's class name.
-
-
-General syntax
---------------
-
-A language definition is a JavaScript object describing the default parsing mode for the language.
-This default mode contains sub-modes which in turn contain other sub-modes, effectively making the language definition a tree of modes.
-
-Here's an example:
-
-::
-
- {
- case_insensitive: true, // language is case-insensitive
- keywords: 'for if while',
- contains: [
- {
- className: 'string',
- begin: '"', end: '"'
- },
- hljs.COMMENT(
- '/\\*', // begin
- '\\*/', // end
- {
- contains: [
- {
- className: 'doc', begin: '@\\w+'
- }
- ]
- }
- )
- ]
- }
-
-Usually the default mode accounts for the majority of the code and describes all language keywords.
-A notable exception here is XML in which a default mode is just a user text that doesn't contain any keywords,
-and most interesting parsing happens inside tags.
-
-
-Keywords
---------
-
-In the simple case language keywords are defined in a string, separated by space:
-
-::
-
- {
- keywords: 'else for if while'
- }
-
-Some languages have different kinds of "keywords" that might not be called as such by the language spec
-but are very close to them from the point of view of a syntax highlighter. These are all sorts of "literals", "built-ins", "symbols" and such.
-To define such keyword groups the attribute ``keywords`` becomes an object each property of which defines its own group of keywords:
-
-::
-
- {
- keywords: {
- keyword: 'else for if while',
- literal: 'false true null'
- }
- }
-
-The group name becomes then a class name in a generated markup enabling different styling for different kinds of keywords.
-
-To detect keywords highlight.js breaks the processed chunk of code into separate words — a process called lexing.
-The "word" here is defined by the regexp ``[a-zA-Z][a-zA-Z0-9_]*`` that works for keywords in most languages.
-Different lexing rules can be defined by the ``lexemes`` attribute:
-
-::
-
- {
- lexemes '-[a-z]+',
- keywords: '-import -export'
- }
-
-
-Sub-modes
----------
-
-Sub-modes are listed in the ``contains`` attribute:
-
-::
-
- {
- keywords: '...',
- contains: [
- hljs.QUOTE_STRING_MODE,
- hljs.C_LINE_COMMENT,
- { ... custom mode definition ... }
- ]
- }
-
-A mode can reference itself in the ``contains`` array by using a special keyword ``'self``'.
-This is commonly used to define nested modes:
-
-::
-
- {
- className: 'object',
- begin: '{', end: '}',
- contains: [hljs.QUOTE_STRING_MODE, 'self']
- }
-
-
-Markup generation
------------------
-
-Modes usually generate actual highlighting markup — ```` elements with specific class names that are defined by the ``className`` attribute:
-
-::
-
- {
- contains: [
- {
- className: 'string',
- // ... other attributes
- },
- {
- className: 'number',
- // ...
- }
- ]
- }
-
-Names are not required to be unique, it's quite common to have several definitions with the same name.
-For example, many languages have various syntaxes for strings, comments, etc…
-
-Sometimes modes are defined only to support specific parsing rules and aren't needed in the final markup.
-A classic example is an escaping sequence inside strings allowing them to contain an ending quote.
-
-::
-
- {
- className: 'string',
- begin: '"', end: '"',
- contains: [{begin: '\\\\.'}],
- }
-
-For such modes ``className`` attribute should be omitted so they won't generate excessive markup.
-
-
-Mode attributes
----------------
-
-Other useful attributes are defined in the :doc:`mode reference `.
-
-
-.. _relevance:
-
-Relevance
----------
-
-Highlight.js tries to automatically detect the language of a code fragment.
-The heuristics is essentially simple: it tries to highlight a fragment with all the language definitions
-and the one that yields most specific modes and keywords wins. The job of a language definition
-is to help this heuristics by hinting relative relevance (or irrelevance) of modes.
-
-This is best illustrated by example. Python has special kinds of strings defined by prefix letters before the quotes:
-``r"..."``, ``u"..."``. If a code fragment contains such strings there is a good chance that it's in Python.
-So these string modes are given high relevance:
-
-::
-
- {
- className: 'string',
- begin: 'r"', end: '"',
- relevance: 10
- }
-
-On the other hand, conventional strings in plain single or double quotes aren't specific to any language
-and it makes sense to bring their relevance to zero to lessen statistical noise:
-
-::
-
- {
- className: 'string',
- begin: '"', end: '"',
- relevance: 0
- }
-
-The default value for relevance is 1. When setting an explicit value it's recommended to use either 10 or 0.
-
-Keywords also influence relevance. Each of them usually has a relevance of 1, but there are some unique names
-that aren't likely to be found outside of their languages, even in the form of variable names.
-For example just having ``reinterpret_cast`` somewhere in the code is a good indicator that we're looking at C++.
-It's worth to set relevance of such keywords a bit higher. This is done with a pipe:
-
-::
-
- {
- keywords: 'for if reinterpret_cast|10'
- }
-
-
-Illegal symbols
----------------
-
-Another way to improve language detection is to define illegal symbols for a mode.
-For example in Python first line of class definition (``class MyClass(object):``) cannot contain symbol "{" or a newline.
-Presence of these symbols clearly shows that the language is not Python and the parser can drop this attempt early.
-
-Illegal symbols are defined as a a single regular expression:
-
-::
-
- {
- className: 'class',
- illegal: '[${]'
- }
-
-
-Pre-defined modes and regular expressions
------------------------------------------
-
-Many languages share common modes and regular expressions. Such expressions are defined in core highlight.js code
-at the end under "Common regexps" and "Common modes" titles. Use them when possible.
-
-
-Contributing
-------------
-
-Follow the :doc:`contributor checklist `.
diff --git a/node_modules/highlight.js/docs/language-requests.rst b/node_modules/highlight.js/docs/language-requests.rst
deleted file mode 100644
index 4e4c2f0..0000000
--- a/node_modules/highlight.js/docs/language-requests.rst
+++ /dev/null
@@ -1,17 +0,0 @@
-On requesting new languages
-===========================
-
-This is a general answer to requests for adding new languages that appear from
-time to time in the highlight.js issue tracker and discussion group.
-
- Highlight.js doesn't have a fundamental plan for implementing languages,
- instead the project works by accepting language definitions from
- interested contributors. There are also no rules at the moment forbidding
- any languages from being added to the library, no matter how obscure or
- weird.
-
- This means that there's no point in requesting a new language without
- providing an implementation for it. If you want to see a particular language
- included in highlight.js but cannot implement it, the best way to make it
- happen is to get another developer interested in doing so. Here's our
- :doc:`language-guide`.
diff --git a/node_modules/highlight.js/docs/line-numbers.rst b/node_modules/highlight.js/docs/line-numbers.rst
deleted file mode 100644
index 674542d..0000000
--- a/node_modules/highlight.js/docs/line-numbers.rst
+++ /dev/null
@@ -1,39 +0,0 @@
-Line numbers
-============
-
-Highlight.js' notable lack of line numbers support is not an oversight but a
-feature. Following is the explanation of this policy from the current project
-maintainer (hey guys!):
-
- One of the defining design principles for highlight.js from the start was
- simplicity. Not the simplicity of code (in fact, it's quite complex) but
- the simplicity of usage and of the actual look of highlighted snippets on
- HTML pages. Many highlighters, in my opinion, are overdoing it with such
- things as separate colors for every single type of lexemes, striped
- backgrounds, fancy buttons around code blocks and — yes — line numbers.
- The more fancy stuff resides around the code the more it distracts a
- reader from understanding it.
-
- This is why it's not a straightforward decision: this new feature will not
- just make highlight.js better, it might actually make it worse simply by
- making it look more bloated in blog posts around the Internet. This is why
- I'm asking people to show that it's worth it.
-
- The only real use-case that ever was brought up in support of line numbers
- is referencing code from the descriptive text around it. On my own blog I
- was always solving this either with comments within the code itself or by
- breaking the larger snippets into smaller ones and describing each small
- part separately. I'm not saying that my solution is better. But I don't
- see how line numbers are better either. And the only way to show that they
- are better is to set up some usability research on the subject. I doubt
- anyone would bother to do it.
-
- Then there's maintenance. So far the core code of highlight.js is
- maintained by only one person — yours truly. Inclusion of any new code in
- highlight.js means that from that moment I will have to fix bugs in it,
- improve it further, make it work together with the rest of the code,
- defend its design. And I don't want to do all this for the feature that I
- consider "evil" and probably will never use myself.
-
-This position is `subject to discuss `_.
-Also it doesn't stop anyone from forking the code and maintaining line-numbers implementation separately.
diff --git a/node_modules/highlight.js/docs/reference.rst b/node_modules/highlight.js/docs/reference.rst
deleted file mode 100644
index ff4f2ef..0000000
--- a/node_modules/highlight.js/docs/reference.rst
+++ /dev/null
@@ -1,298 +0,0 @@
-Mode reference
-==============
-
-Types
------
-
-Types of attributes values in this reference:
-
-+------------+-------------------------------------------------------------------------------------+
-| identifier | String suitable to be used as a Javascript variable and CSS class name |
-| | (i.e. mostly ``/[A-Za-z0-9_]+/``) |
-+------------+-------------------------------------------------------------------------------------+
-| regexp | String representing a Javascript regexp. |
-| | Note that since it's not a literal regexp all back-slashes should be repeated twice |
-+------------+-------------------------------------------------------------------------------------+
-| boolean | Javascript boolean: ``true`` or ``false`` |
-+------------+-------------------------------------------------------------------------------------+
-| number | Javascript number |
-+------------+-------------------------------------------------------------------------------------+
-| object | Javascript object: ``{ ... }`` |
-+------------+-------------------------------------------------------------------------------------+
-| array | Javascript array: ``[ ... ]`` |
-+------------+-------------------------------------------------------------------------------------+
-
-
-Attributes
-----------
-
-case_insensitive
-^^^^^^^^^^^^^^^^
-
-**type**: boolean
-
-Case insensitivity of language keywords and regexps. Used only on the top-level mode.
-
-
-aliases
-^^^^^^^
-
-**type**: array
-
-A list of additional names (besides the canonical one given by the filename) that can be used to identify a language in HTML classes and in a call to :ref:`getLanguage `.
-
-
-className
-^^^^^^^^^
-
-**type**: identifier
-
-The name of the mode. It is used as a class name in HTML markup.
-
-Multiple modes can have the same name. This is useful when a language has multiple variants of syntax
-for one thing like string in single or double quotes.
-
-
-begin
-^^^^^
-
-**type**: regexp
-
-Regular expression starting a mode. For example a single quote for strings or two forward slashes for C-style comments.
-If absent, ``begin`` defaults to a regexp that matches anything, so the mode starts immediately.
-
-
-end
-^^^
-
-**type**: regexp
-
-Regular expression ending a mode. For example a single quote for strings or "$" (end of line) for one-line comments.
-
-It's often the case that a beginning regular expression defines the entire mode and doesn't need any special ending.
-For example a number can be defined with ``begin: "\\b\\d+"`` which spans all the digits.
-
-If absent, ``end`` defaults to a regexp that matches anything, so the mode ends immediately.
-
-Sometimes a mode can end not by itself but implicitly with its containing (parent) mode.
-This is achieved with :ref:`endsWithParent ` attribute.
-
-
-beginKeywords
-^^^^^^^^^^^^^^^^
-
-**type**: string
-
-Used instead of ``begin`` for modes starting with keywords to avoid needless repetition:
-
-::
-
- {
- begin: '\\b(extends|implements) ',
- keywords: 'extends implements'
- }
-
-… becomes:
-
-::
-
- {
- beginKeywords: 'extends implements'
- }
-
-Unlike the :ref:`keywords ` attribute, this one allows only a simple list of space separated keywords.
-If you do need additional features of ``keywords`` or you just need more keywords for this mode you may include ``keywords`` along with ``beginKeywords``.
-
-
-.. _endsWithParent:
-
-endsWithParent
-^^^^^^^^^^^^^^
-
-**type**: boolean
-
-A flag showing that a mode ends when its parent ends.
-
-This is best demonstrated by example. In CSS syntax a selector has a set of rules contained within symbols "{" and "}".
-Individual rules separated by ";" but the last one in a set can omit the terminating semicolon:
-
-::
-
- p {
- width: 100%; color: red
- }
-
-This is when ``endsWithParent`` comes into play:
-
-::
-
- {
- className: 'rules', begin: '{', end: '}',
- contains: [
- {className: 'rule', /* ... */ end: ';', endsWithParent: true}
- ]
- }
-
-.. _endsParent:
-
-endsParent
-^^^^^^^^^^^^^^
-
-**type**: boolean
-
-Forces closing of the parent mode right after the current mode is closed.
-
-This is used for modes that don't have an easily expressible ending lexeme but
-instead could be closed after the last interesting sub-mode is found.
-
-Here's an example with two ways of defining functions in Elixir, one using a
-keyword ``do`` and another using a comma:
-
-::
-
- def foo :clear, list do
- :ok
- end
-
- def foo, do: IO.puts "hello world"
-
-Note that in the first case the parameter list after the function title may also
-include a comma. And iIf we're only interested in highlighting a title we can
-tell it to end the function definition after itself:
-
-::
-
- {
- className: 'function',
- beginKeywords: 'def', end: /\B\b/,
- contains: [
- {
- className: 'title',
- begin: hljs.IDENT_RE, endsParent: true
- }
- ]
- }
-
-(The ``end: /\B\b/`` regex tells function to never end by itself.)
-
-.. _lexemes:
-
-lexemes
-^^^^^^^
-
-**type**: regexp
-
-A regular expression that extracts individual lexemes from language text to find :ref:`keywords ` among them.
-Default value is ``hljs.IDENT_RE`` which works for most languages.
-
-
-.. _keywords:
-
-keywords
-^^^^^^^^
-
-**type**: object
-
-Keyword definition comes in two forms:
-
-* ``'for while if else weird_voodoo|10 ... '`` -- a string of space-separated keywords with an optional relevance over a pipe
-* ``{'keyword': ' ... ', 'literal': ' ... '}`` -- an object whose keys are names of different kinds of keywords and values are keyword definition strings in the first form
-
-For detailed explanation see :doc:`Language definition guide `.
-
-
-illegal
-^^^^^^^
-
-**type**: regexp
-
-A regular expression that defines symbols illegal for the mode.
-When the parser finds a match for illegal expression it immediately drops parsing the whole language altogether.
-
-
-excludeBegin, excludeEnd
-^^^^^^^^^^^^^^^^^^^^^^^^
-
-**type**: boolean
-
-Exclude beginning or ending lexemes out of mode's generated markup. For example in CSS syntax a rule ends with a semicolon.
-However visually it's better not to color it as the rule contents. Having ``excludeEnd: true`` forces a ```` element for the rule to close before the semicolon.
-
-
-returnBegin
-^^^^^^^^^^^
-
-**type**: boolean
-
-Returns just found beginning lexeme back into parser. This is used when beginning of a sub-mode is a complex expression
-that should not only be found within a parent mode but also parsed according to the rules of a sub-mode.
-
-Since the parser is effectively goes back it's quite possible to create a infinite loop here so use with caution!
-
-
-returnEnd
-^^^^^^^^^
-
-**type**: boolean
-
-Returns just found ending lexeme back into parser. This is used for example to parse Javascript embedded into HTML.
-A Javascript block ends with the HTML closing tag ```` that cannot be parsed with Javascript rules.
-So it is returned back into its parent HTML mode that knows what to do with it.
-
-Since the parser is effectively goes back it's quite possible to create a infinite loop here so use with caution!
-
-
-contains
-^^^^^^^^
-
-**type**: array
-
-The list of sub-modes that can be found inside the mode. For detailed explanation see :doc:`Language definition guide `.
-
-
-starts
-^^^^^^
-
-**type**: identifier
-
-The name of the mode that will start right after the current mode ends. The new mode won't be contained within the current one.
-
-Currently this attribute is used to highlight Javascript and CSS contained within HTML.
-Tags ``
-
-
-
-
-
-