From d832636a686e8dddc1f827573c5bbccf826593fc Mon Sep 17 00:00:00 2001 From: nicolaslabbe Date: Wed, 31 Aug 2016 16:26:49 +0200 Subject: [PATCH] bug include apache --- dist/cli/controllers/Page.js | 6 +- dist/cli/helpers/file-attr.js | 1 + dist/server/app.js | 3 +- dist/server/public/libs/bootstrap.min.js | 2 +- dist/server/public/libs/jquery-2.1.0.min.js | 2 +- dist/server/public/scripts/admin-compiled.js | 819 ++++++++------- .../scripts/template-engine-compiled.js | 933 +++++++++--------- dist/server/public/scripts/template-engine.js | 2 +- dist/server/routes/get-main.js | 2 +- dist/tasks/sass.js | 10 +- src/server/public/scripts/template-engine.js | 2 +- src/server/routes/get-main.js | 2 +- 12 files changed, 881 insertions(+), 903 deletions(-) diff --git a/dist/cli/controllers/Page.js b/dist/cli/controllers/Page.js index 6b21dd3..7f67c88 100644 --- a/dist/cli/controllers/Page.js +++ b/dist/cli/controllers/Page.js @@ -46,6 +46,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons * Page class * manage HTML generation for page template */ + var Page = function () { /** @@ -56,6 +57,7 @@ var Page = function () { * @param {Boolean} onlyHTML default = false, if true HTML content will contains abe attributs * @return {String} HTML page as string */ + function Page(path, text, json) { var _this = this; @@ -75,8 +77,8 @@ var Page = function () { _handlebars2.default.registerHelper('i18nAbe', _.translate); // HandlebarsJS unique text helper _handlebars2.default.registerHelper('math', _.math); // HandlebarsJS unique text helper _handlebars2.default.registerHelper('moduloIf', _.moduloIf); // HandlebarsJS helper for modulo test - _handlebars2.default.registerHelper('testObj', _.testObj); // - _handlebars2.default.registerHelper('attrAbe', _.attrAbe); // + _handlebars2.default.registerHelper('testObj', _.testObj); // + _handlebars2.default.registerHelper('attrAbe', _.attrAbe); // _handlebars2.default.registerHelper('printJson', _.printJson); _handlebars2.default.registerHelper('printBlock', _.printBlock); _handlebars2.default.registerHelper('className', _.className); diff --git a/dist/cli/helpers/file-attr.js b/dist/cli/helpers/file-attr.js index a46241a..ea5d8c0 100755 --- a/dist/cli/helpers/file-attr.js +++ b/dist/cli/helpers/file-attr.js @@ -31,6 +31,7 @@ var Attr = function () { * @param {String} str string to work with * @return {void} */ + function Attr(str) { _classCallCheck(this, Attr); diff --git a/dist/server/app.js b/dist/server/app.js index c35d607..67f156c 100755 --- a/dist/server/app.js +++ b/dist/server/app.js @@ -132,9 +132,10 @@ if (_cli.config.security === true) { sandbox: ['allow-same-origin', 'allow-scripts', "allow-modals", 'allow-popups', 'allow-forms'], reportUri: '/report-violation', objectSrc: [] }, + // An empty array allows nothing through reportOnly: false, // Set to true if you only want browsers to report errors, not block them setAllHeaders: false, // Set to true if you want to blindly set all headers: Content-Security-Policy, X-WebKit-CSP, and X-Content-Security-Policy. - disableAndroid: false, // Set to true if you want to disable CSP on Android where it can be buggy. + disableAndroid: false, // Set to true if you want to disable CSP on Android where it can be buggy. browserSniff: true // Set to false if you want to completely disable any user-agent sniffing. This may make the headers less compatible but it will be much faster. This defaults to `true`. })); } diff --git a/dist/server/public/libs/bootstrap.min.js b/dist/server/public/libs/bootstrap.min.js index 2de5a21..22cced7 100755 --- a/dist/server/public/libs/bootstrap.min.js +++ b/dist/server/public/libs/bootstrap.min.js @@ -416,7 +416,7 @@ if ("undefined" == typeof jQuery) throw new Error("Bootstrap's JavaScript requir c = this.options;return a = b.attr("data-original-title") || ("function" == typeof c.title ? c.title.call(b[0]) : c.title); }, c.prototype.getUID = function (a) { do { - a += ~~(1e6 * Math.random()); + a += ~ ~(1e6 * Math.random()); } while (document.getElementById(a));return a; }, c.prototype.tip = function () { if (!this.$tip && (this.$tip = a(this.options.template), 1 != this.$tip.length)) throw new Error(this.type + " `template` option must consist of exactly 1 top-level element!");return this.$tip; diff --git a/dist/server/public/libs/jquery-2.1.0.min.js b/dist/server/public/libs/jquery-2.1.0.min.js index ec25d90..8a9bf21 100755 --- a/dist/server/public/libs/jquery-2.1.0.min.js +++ b/dist/server/public/libs/jquery-2.1.0.min.js @@ -922,7 +922,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol b(a[h], c, g ? d : d.call(a[h], h, b(a[h], c))); }return e ? a : j ? b.call(a) : i ? b(a[0], c) : f; };o.acceptData = function (a) { - return 1 === a.nodeType || 9 === a.nodeType || !+a.nodeType; + return 1 === a.nodeType || 9 === a.nodeType || ! +a.nodeType; };function K() { Object.defineProperty(this.cache = {}, 0, { get: function get() { return {}; diff --git a/dist/server/public/scripts/admin-compiled.js b/dist/server/public/scripts/admin-compiled.js index a3fd31c..fd2f158 100644 --- a/dist/server/public/scripts/admin-compiled.js +++ b/dist/server/public/scripts/admin-compiled.js @@ -1,8 +1,8 @@ -"use strict";var _typeof=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(obj){return typeof obj;}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol?"symbol":typeof obj;};(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f;}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e);},l,l.exports,e,t,n,r);}return n[o].exports;}var i=typeof require=="function"&&require;for(var o=0;o0){ary.splice(i-1,2);i-=2;}}}}function normalize(name,baseName){var baseParts;//Adjust any relative paths. -if(name&&name.charAt(0)==='.'){//If have a base name, try to normalize against it, +break;}else if(i>0){ary.splice(i-1,2);i-=2;}}}}function normalize(name,baseName){var baseParts; //Adjust any relative paths. +if(name&&name.charAt(0)==='.'){ //If have a base name, try to normalize against it, //otherwise, assume it is a top-level require that will //be relative to baseUrl in the end. -if(baseName){baseParts=baseName.split('/');baseParts=baseParts.slice(0,baseParts.length-1);baseParts=baseParts.concat(name.split('/'));trimDots(baseParts);name=baseParts.join('/');}}return name;}/** +if(baseName){baseParts=baseName.split('/');baseParts=baseParts.slice(0,baseParts.length-1);baseParts=baseParts.concat(name.split('/'));trimDots(baseParts);name=baseParts.join('/');}}return name;} /** * Create the normalize() function passed to a loader plugin's * normalize method. - */function makeNormalize(relName){return function(name){return normalize(name,relName);};}function makeLoad(id){function load(value){loaderCache[id]=value;}load.fromText=function(id,text){//This one is difficult because the text can/probably uses + */function makeNormalize(relName){return function(name){return normalize(name,relName);};}function makeLoad(id){function load(value){loaderCache[id]=value;}load.fromText=function(id,text){ //This one is difficult because the text can/probably uses //define, and any relative paths and requires should be relative //to that id was it would be found on disk. But this would require //bootstrapping a module/require fairly deeply from node core. //Not sure how best to go about that yet. -throw new Error('amdefine does not implement load.fromText');};return load;}makeRequire=function makeRequire(systemRequire,exports,module,relId){function amdRequire(deps,callback){if(typeof deps==='string'){//Synchronous, single module require('') -return _stringRequire(systemRequire,exports,module,deps,relId);}else{//Array of dependencies with a callback. +throw new Error('amdefine does not implement load.fromText');};return load;}makeRequire=function makeRequire(systemRequire,exports,module,relId){function amdRequire(deps,callback){if(typeof deps==='string'){ //Synchronous, single module require('') +return _stringRequire(systemRequire,exports,module,deps,relId);}else { //Array of dependencies with a callback. //Convert the dependencies to modules. -deps=deps.map(function(depName){return _stringRequire(systemRequire,exports,module,depName,relId);});//Wait for next tick to call back the require call. -if(callback){process.nextTick(function(){callback.apply(null,deps);});}}}amdRequire.toUrl=function(filePath){if(filePath.indexOf('.')===0){return normalize(filePath,path.dirname(module.filename));}else{return filePath;}};return amdRequire;};//Favor explicit value, passed in if the module wants to support Node 0.4. -requireFn=requireFn||function req(){return module.require.apply(module,arguments);};function runFactory(id,deps,factory){var r,e,m,result;if(id){e=loaderCache[id]={};m={id:id,uri:__filename,exports:e};r=makeRequire(requireFn,e,m,id);}else{//Only support one define call per file -if(alreadyCalled){throw new Error('amdefine with no module ID cannot be called more than once per file.');}alreadyCalled=true;//Use the real variables from node +deps=deps.map(function(depName){return _stringRequire(systemRequire,exports,module,depName,relId);}); //Wait for next tick to call back the require call. +if(callback){process.nextTick(function(){callback.apply(null,deps);});}}}amdRequire.toUrl=function(filePath){if(filePath.indexOf('.')===0){return normalize(filePath,path.dirname(module.filename));}else {return filePath;}};return amdRequire;}; //Favor explicit value, passed in if the module wants to support Node 0.4. +requireFn=requireFn||function req(){return module.require.apply(module,arguments);};function runFactory(id,deps,factory){var r,e,m,result;if(id){e=loaderCache[id]={};m={id:id,uri:__filename,exports:e};r=makeRequire(requireFn,e,m,id);}else { //Only support one define call per file +if(alreadyCalled){throw new Error('amdefine with no module ID cannot be called more than once per file.');}alreadyCalled=true; //Use the real variables from node //Use module.exports for exports, since //the exports in here is amdefine exports. -e=module.exports;m=module;r=makeRequire(requireFn,e,m,module.id);}//If there are dependencies, they are strings, so need +e=module.exports;m=module;r=makeRequire(requireFn,e,m,module.id);} //If there are dependencies, they are strings, so need //to convert them to dependency values. -if(deps){deps=deps.map(function(depName){return r(depName);});}//Call the factory with the right dependencies. -if(typeof factory==='function'){result=factory.apply(m.exports,deps);}else{result=factory;}if(result!==undefined){m.exports=result;if(id){loaderCache[id]=m.exports;}}}_stringRequire=function stringRequire(systemRequire,exports,module,id,relId){//Split the ID by a ! so that -var index=id.indexOf('!'),originalId=id,prefix,plugin;if(index===-1){id=normalize(id,relId);//Straight module lookup. If it is one of the special dependencies, +if(deps){deps=deps.map(function(depName){return r(depName);});} //Call the factory with the right dependencies. +if(typeof factory==='function'){result=factory.apply(m.exports,deps);}else {result=factory;}if(result!==undefined){m.exports=result;if(id){loaderCache[id]=m.exports;}}}_stringRequire=function stringRequire(systemRequire,exports,module,id,relId){ //Split the ID by a ! so that +var index=id.indexOf('!'),originalId=id,prefix,plugin;if(index===-1){id=normalize(id,relId); //Straight module lookup. If it is one of the special dependencies, //deal with it, otherwise, delegate to node. -if(id==='require'){return makeRequire(systemRequire,exports,module,relId);}else if(id==='exports'){return exports;}else if(id==='module'){return module;}else if(loaderCache.hasOwnProperty(id)){return loaderCache[id];}else if(defineCache[id]){runFactory.apply(null,defineCache[id]);return loaderCache[id];}else{if(systemRequire){return systemRequire(originalId);}else{throw new Error('No module with ID: '+id);}}}else{//There is a plugin in play. -prefix=id.substring(0,index);id=id.substring(index+1,id.length);plugin=_stringRequire(systemRequire,exports,module,prefix,relId);if(plugin.normalize){id=plugin.normalize(id,makeNormalize(relId));}else{//Normalize the ID normally. -id=normalize(id,relId);}if(loaderCache[id]){return loaderCache[id];}else{plugin.load(id,makeRequire(systemRequire,exports,module,relId),makeLoad(id),{});return loaderCache[id];}}};//Create a define function specific to the module asking for amdefine. -function define(id,deps,factory){if(Array.isArray(id)){factory=deps;deps=id;id=undefined;}else if(typeof id!=='string'){factory=id;id=deps=undefined;}if(deps&&!Array.isArray(deps)){factory=deps;deps=undefined;}if(!deps){deps=['require','exports','module'];}//Set up properties for this module. If an ID, then use +if(id==='require'){return makeRequire(systemRequire,exports,module,relId);}else if(id==='exports'){return exports;}else if(id==='module'){return module;}else if(loaderCache.hasOwnProperty(id)){return loaderCache[id];}else if(defineCache[id]){runFactory.apply(null,defineCache[id]);return loaderCache[id];}else {if(systemRequire){return systemRequire(originalId);}else {throw new Error('No module with ID: '+id);}}}else { //There is a plugin in play. +prefix=id.substring(0,index);id=id.substring(index+1,id.length);plugin=_stringRequire(systemRequire,exports,module,prefix,relId);if(plugin.normalize){id=plugin.normalize(id,makeNormalize(relId));}else { //Normalize the ID normally. +id=normalize(id,relId);}if(loaderCache[id]){return loaderCache[id];}else {plugin.load(id,makeRequire(systemRequire,exports,module,relId),makeLoad(id),{});return loaderCache[id];}}}; //Create a define function specific to the module asking for amdefine. +function define(id,deps,factory){if(Array.isArray(id)){factory=deps;deps=id;id=undefined;}else if(typeof id!=='string'){factory=id;id=deps=undefined;}if(deps&&!Array.isArray(deps)){factory=deps;deps=undefined;}if(!deps){deps=['require','exports','module'];} //Set up properties for this module. If an ID, then use //internal cache. If no ID, then use the external variables //for this node module. -if(id){//Put the module in deep freeze until there is a +if(id){ //Put the module in deep freeze until there is a //require call for it. -defineCache[id]=[id,deps,factory];}else{runFactory(id,deps,factory);}}//define.require, which has access to all the values in the +defineCache[id]=[id,deps,factory];}else {runFactory(id,deps,factory);}} //define.require, which has access to all the values in the //cache. Useful for AMD modules that all have IDs in the file, //but need to finally export a value to node based on one of those //IDs. -define.require=function(id){if(loaderCache[id]){return loaderCache[id];}if(defineCache[id]){runFactory.apply(null,defineCache[id]);return loaderCache[id];}};define.amd={};return define;}module.exports=amdefine;}).call(this,require('_process'),"/node_modules/amdefine/amdefine.js");},{"_process":46,"path":45}],2:[function(require,module,exports){},{}],3:[function(require,module,exports){'use strict';exports.__esModule=true;// istanbul ignore next -function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}var _handlebarsRuntime=require('./handlebars.runtime');var _handlebarsRuntime2=_interopRequireDefault(_handlebarsRuntime);// Compiler imports -var _handlebarsCompilerAst=require('./handlebars/compiler/ast');var _handlebarsCompilerAst2=_interopRequireDefault(_handlebarsCompilerAst);var _handlebarsCompilerBase=require('./handlebars/compiler/base');var _handlebarsCompilerCompiler=require('./handlebars/compiler/compiler');var _handlebarsCompilerJavascriptCompiler=require('./handlebars/compiler/javascript-compiler');var _handlebarsCompilerJavascriptCompiler2=_interopRequireDefault(_handlebarsCompilerJavascriptCompiler);var _handlebarsCompilerVisitor=require('./handlebars/compiler/visitor');var _handlebarsCompilerVisitor2=_interopRequireDefault(_handlebarsCompilerVisitor);var _handlebarsNoConflict=require('./handlebars/no-conflict');var _handlebarsNoConflict2=_interopRequireDefault(_handlebarsNoConflict);var _create=_handlebarsRuntime2['default'].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=_handlebarsCompilerAst2['default'];hb.Compiler=_handlebarsCompilerCompiler.Compiler;hb.JavaScriptCompiler=_handlebarsCompilerJavascriptCompiler2['default'];hb.Parser=_handlebarsCompilerBase.parser;hb.parse=_handlebarsCompilerBase.parse;return hb;}var inst=create();inst.create=create;_handlebarsNoConflict2['default'](inst);inst.Visitor=_handlebarsCompilerVisitor2['default'];inst['default']=inst;exports['default']=inst;module.exports=exports['default'];},{"./handlebars.runtime":4,"./handlebars/compiler/ast":6,"./handlebars/compiler/base":7,"./handlebars/compiler/compiler":9,"./handlebars/compiler/javascript-compiler":11,"./handlebars/compiler/visitor":14,"./handlebars/no-conflict":28}],4:[function(require,module,exports){'use strict';exports.__esModule=true;// istanbul ignore next -function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}// istanbul ignore next -function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key];}}newObj['default']=obj;return newObj;}}var _handlebarsBase=require('./handlebars/base');var base=_interopRequireWildcard(_handlebarsBase);// Each of these augment the Handlebars object. No need to setup here. +define.require=function(id){if(loaderCache[id]){return loaderCache[id];}if(defineCache[id]){runFactory.apply(null,defineCache[id]);return loaderCache[id];}};define.amd={};return define;}module.exports=amdefine;}).call(this,require('_process'),"/node_modules/amdefine/amdefine.js");},{"_process":46,"path":45}],2:[function(require,module,exports){},{}],3:[function(require,module,exports){'use strict';exports.__esModule=true; // istanbul ignore next +function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}var _handlebarsRuntime=require('./handlebars.runtime');var _handlebarsRuntime2=_interopRequireDefault(_handlebarsRuntime); // Compiler imports +var _handlebarsCompilerAst=require('./handlebars/compiler/ast');var _handlebarsCompilerAst2=_interopRequireDefault(_handlebarsCompilerAst);var _handlebarsCompilerBase=require('./handlebars/compiler/base');var _handlebarsCompilerCompiler=require('./handlebars/compiler/compiler');var _handlebarsCompilerJavascriptCompiler=require('./handlebars/compiler/javascript-compiler');var _handlebarsCompilerJavascriptCompiler2=_interopRequireDefault(_handlebarsCompilerJavascriptCompiler);var _handlebarsCompilerVisitor=require('./handlebars/compiler/visitor');var _handlebarsCompilerVisitor2=_interopRequireDefault(_handlebarsCompilerVisitor);var _handlebarsNoConflict=require('./handlebars/no-conflict');var _handlebarsNoConflict2=_interopRequireDefault(_handlebarsNoConflict);var _create=_handlebarsRuntime2['default'].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=_handlebarsCompilerAst2['default'];hb.Compiler=_handlebarsCompilerCompiler.Compiler;hb.JavaScriptCompiler=_handlebarsCompilerJavascriptCompiler2['default'];hb.Parser=_handlebarsCompilerBase.parser;hb.parse=_handlebarsCompilerBase.parse;return hb;}var inst=create();inst.create=create;_handlebarsNoConflict2['default'](inst);inst.Visitor=_handlebarsCompilerVisitor2['default'];inst['default']=inst;exports['default']=inst;module.exports=exports['default'];},{"./handlebars.runtime":4,"./handlebars/compiler/ast":6,"./handlebars/compiler/base":7,"./handlebars/compiler/compiler":9,"./handlebars/compiler/javascript-compiler":11,"./handlebars/compiler/visitor":14,"./handlebars/no-conflict":28}],4:[function(require,module,exports){'use strict';exports.__esModule=true; // istanbul ignore next +function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};} // istanbul ignore next +function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}else {var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key];}}newObj['default']=obj;return newObj;}}var _handlebarsBase=require('./handlebars/base');var base=_interopRequireWildcard(_handlebarsBase); // 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 _handlebarsSafeString=require('./handlebars/safe-string');var _handlebarsSafeString2=_interopRequireDefault(_handlebarsSafeString);var _handlebarsException=require('./handlebars/exception');var _handlebarsException2=_interopRequireDefault(_handlebarsException);var _handlebarsUtils=require('./handlebars/utils');var Utils=_interopRequireWildcard(_handlebarsUtils);var _handlebarsRuntime=require('./handlebars/runtime');var runtime=_interopRequireWildcard(_handlebarsRuntime);var _handlebarsNoConflict=require('./handlebars/no-conflict');var _handlebarsNoConflict2=_interopRequireDefault(_handlebarsNoConflict);// 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=_handlebarsSafeString2['default'];hb.Exception=_handlebarsException2['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;_handlebarsNoConflict2['default'](inst);inst['default']=inst;exports['default']=inst;module.exports=exports['default'];},{"./handlebars/base":5,"./handlebars/exception":18,"./handlebars/no-conflict":28,"./handlebars/runtime":29,"./handlebars/safe-string":30,"./handlebars/utils":31}],5:[function(require,module,exports){'use strict';exports.__esModule=true;exports.HandlebarsEnvironment=HandlebarsEnvironment;// istanbul ignore next -function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}var _utils=require('./utils');var _exception=require('./exception');var _exception2=_interopRequireDefault(_exception);var _helpers=require('./helpers');var _decorators=require('./decorators');var _logger=require('./logger');var _logger2=_interopRequireDefault(_logger);var VERSION='4.0.5';exports.VERSION=VERSION;var COMPILER_REVISION=7;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',7:'>= 4.0.0'};exports.REVISION_CHANGES=REVISION_CHANGES;var objectType='[object Object]';function HandlebarsEnvironment(helpers,partials,decorators){this.helpers=helpers||{};this.partials=partials||{};this.decorators=decorators||{};_helpers.registerDefaultHelpers(this);_decorators.registerDefaultDecorators(this);}HandlebarsEnvironment.prototype={constructor:HandlebarsEnvironment,logger:_logger2['default'],log:_logger2['default'].log,registerHelper:function registerHelper(name,fn){if(_utils.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(_utils.toString.call(name)===objectType){_utils.extend(this.partials,name);}else{if(typeof partial==='undefined'){throw new _exception2['default']('Attempting to register a partial called "'+name+'" as undefined');}this.partials[name]=partial;}},unregisterPartial:function unregisterPartial(name){delete this.partials[name];},registerDecorator:function registerDecorator(name,fn){if(_utils.toString.call(name)===objectType){if(fn){throw new _exception2['default']('Arg not supported with multiple decorators');}_utils.extend(this.decorators,name);}else{this.decorators[name]=fn;}},unregisterDecorator:function unregisterDecorator(name){delete this.decorators[name];}};var log=_logger2['default'].log;exports.log=log;exports.createFrame=_utils.createFrame;exports.logger=_logger2['default'];},{"./decorators":16,"./exception":18,"./helpers":19,"./logger":27,"./utils":31}],6:[function(require,module,exports){'use strict';exports.__esModule=true;var AST={// Public API used to evaluate derived attributes regarding AST nodes -helpers:{// a mustache is definitely a helper if: +var _handlebarsSafeString=require('./handlebars/safe-string');var _handlebarsSafeString2=_interopRequireDefault(_handlebarsSafeString);var _handlebarsException=require('./handlebars/exception');var _handlebarsException2=_interopRequireDefault(_handlebarsException);var _handlebarsUtils=require('./handlebars/utils');var Utils=_interopRequireWildcard(_handlebarsUtils);var _handlebarsRuntime=require('./handlebars/runtime');var runtime=_interopRequireWildcard(_handlebarsRuntime);var _handlebarsNoConflict=require('./handlebars/no-conflict');var _handlebarsNoConflict2=_interopRequireDefault(_handlebarsNoConflict); // 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=_handlebarsSafeString2['default'];hb.Exception=_handlebarsException2['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;_handlebarsNoConflict2['default'](inst);inst['default']=inst;exports['default']=inst;module.exports=exports['default'];},{"./handlebars/base":5,"./handlebars/exception":18,"./handlebars/no-conflict":28,"./handlebars/runtime":29,"./handlebars/safe-string":30,"./handlebars/utils":31}],5:[function(require,module,exports){'use strict';exports.__esModule=true;exports.HandlebarsEnvironment=HandlebarsEnvironment; // istanbul ignore next +function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}var _utils=require('./utils');var _exception=require('./exception');var _exception2=_interopRequireDefault(_exception);var _helpers=require('./helpers');var _decorators=require('./decorators');var _logger=require('./logger');var _logger2=_interopRequireDefault(_logger);var VERSION='4.0.5';exports.VERSION=VERSION;var COMPILER_REVISION=7;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',7:'>= 4.0.0'};exports.REVISION_CHANGES=REVISION_CHANGES;var objectType='[object Object]';function HandlebarsEnvironment(helpers,partials,decorators){this.helpers=helpers||{};this.partials=partials||{};this.decorators=decorators||{};_helpers.registerDefaultHelpers(this);_decorators.registerDefaultDecorators(this);}HandlebarsEnvironment.prototype={constructor:HandlebarsEnvironment,logger:_logger2['default'],log:_logger2['default'].log,registerHelper:function registerHelper(name,fn){if(_utils.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(_utils.toString.call(name)===objectType){_utils.extend(this.partials,name);}else {if(typeof partial==='undefined'){throw new _exception2['default']('Attempting to register a partial called "'+name+'" as undefined');}this.partials[name]=partial;}},unregisterPartial:function unregisterPartial(name){delete this.partials[name];},registerDecorator:function registerDecorator(name,fn){if(_utils.toString.call(name)===objectType){if(fn){throw new _exception2['default']('Arg not supported with multiple decorators');}_utils.extend(this.decorators,name);}else {this.decorators[name]=fn;}},unregisterDecorator:function unregisterDecorator(name){delete this.decorators[name];}};var log=_logger2['default'].log;exports.log=log;exports.createFrame=_utils.createFrame;exports.logger=_logger2['default'];},{"./decorators":16,"./exception":18,"./helpers":19,"./logger":27,"./utils":31}],6:[function(require,module,exports){'use strict';exports.__esModule=true;var AST={ // 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.type==='MustacheStatement'||node.type==='BlockStatement')&&!!(node.params&&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 +helperExpression:function helperExpression(node){return node.type==='SubExpression'||(node.type==='MustacheStatement'||node.type==='BlockStatement')&&!!(node.params&&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 +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'];},{}],7:[function(require,module,exports){'use strict';exports.__esModule=true;exports.parse=parse;// istanbul ignore next -function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key];}}newObj['default']=obj;return newObj;}}// istanbul ignore next -function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}var _parser=require('./parser');var _parser2=_interopRequireDefault(_parser);var _whitespaceControl=require('./whitespace-control');var _whitespaceControl2=_interopRequireDefault(_whitespaceControl);var _helpers=require('./helpers');var Helpers=_interopRequireWildcard(_helpers);var _utils=require('../utils');exports.parser=_parser2['default'];var yy={};_utils.extend(yy,Helpers);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'](options);return strip.accept(_parser2['default'].parse(input));}},{"../utils":31,"./helpers":10,"./parser":12,"./whitespace-control":15}],8:[function(require,module,exports){/* global define */'use strict';exports.__esModule=true;var _utils=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 +exports['default']=AST;module.exports=exports['default'];},{}],7:[function(require,module,exports){'use strict';exports.__esModule=true;exports.parse=parse; // istanbul ignore next +function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}else {var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key];}}newObj['default']=obj;return newObj;}} // istanbul ignore next +function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}var _parser=require('./parser');var _parser2=_interopRequireDefault(_parser);var _whitespaceControl=require('./whitespace-control');var _whitespaceControl2=_interopRequireDefault(_whitespaceControl);var _helpers=require('./helpers');var Helpers=_interopRequireWildcard(_helpers);var _utils=require('../utils');exports.parser=_parser2['default'];var yy={};_utils.extend(yy,Helpers);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'](options);return strip.accept(_parser2['default'].parse(input));}},{"../utils":31,"./helpers":10,"./parser":12,"./whitespace-control":15}],8:[function(require,module,exports){ /* global define */'use strict';exports.__esModule=true;var _utils=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){}/* NOP *//* istanbul ignore if: tested but not covered in istanbul due to dist build */if(!SourceNode){SourceNode=function SourceNode(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;i1){throw new _exception2['default']('Unsupported number of partial arguments: '+params.length,partial);}else if(!params.length){if(this.options.explicitPartialContext){this.opcode('pushLiteral','undefined');}else{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,program,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');},PartialBlockStatement:function PartialBlockStatement(partialBlock){this.PartialStatement(partialBlock);},MustacheStatement:function MustacheStatement(mustache){this.SubExpression(mustache);if(mustache.escaped&&!this.options.noEscape){this.opcode('appendEscaped');}else{this.opcode('append');}},Decorator:function Decorator(decorator){this.DecoratorBlock(decorator);},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);path.strict=true;this.accept(path);this.opcode('invokeAmbiguous',name,isBlock);},simpleSexpr:function simpleSexpr(sexpr){var path=sexpr.path;path.strict=true;this.accept(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.strict=true;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,path.strict);}else{this.opcode('lookupOnContext',path.parts,path.falsy,path.strict,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(;i1){throw new _exception2['default']('Unsupported number of partial arguments: '+params.length,partial);}else if(!params.length){if(this.options.explicitPartialContext){this.opcode('pushLiteral','undefined');}else {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,program,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');},PartialBlockStatement:function PartialBlockStatement(partialBlock){this.PartialStatement(partialBlock);},MustacheStatement:function MustacheStatement(mustache){this.SubExpression(mustache);if(mustache.escaped&&!this.options.noEscape){this.opcode('appendEscaped');}else {this.opcode('append');}},Decorator:function Decorator(decorator){this.DecoratorBlock(decorator);},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);path.strict=true;this.accept(path);this.opcode('invokeAmbiguous',name,isBlock);},simpleSexpr:function simpleSexpr(sexpr){var path=sexpr.path;path.strict=true;this.accept(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.strict=true;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,path.strict);}else {this.opcode('lookupOnContext',path.parts,path.falsy,path.strict,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=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,options,env){if(options===undefined)options={};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(_utils.isArray(a)&&_utils.isArray(b)&&a.length===b.length){for(var i=0;i=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,options,env){if(options===undefined)options={};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(_utils.isArray(a)&&_utils.isArray(b)&&a.length===b.length){for(var i=0;i0){throw new _exception2['default']('Invalid path: '+original,{loc:loc});}else if(part==='..'){depth++;depthString+='../';}}else{dig.push(part);}}return{type:'PathExpression',data:data,depth:depth,parts:dig,original:original,loc:loc};}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!=='&';var decorator=/\*/.test(open);return{type:decorator?'Decorator':'MustacheStatement',path:path,params:params,hash:hash,escaped:escaped,strip:strip,loc:this.locInfo(locInfo)};}function prepareRawBlock(openRawBlock,contents,close,locInfo){validateClose(openRawBlock,close);locInfo=this.locInfo(locInfo);var program={type:'Program',body:contents,strip:{},loc:locInfo};return{type:'BlockStatement',path:openRawBlock.path,params:openRawBlock.params,hash:openRawBlock.hash,program:program,openStrip:{},inverseStrip:{},closeStrip:{},loc:locInfo};}function prepareBlock(openBlock,program,inverseAndProgram,close,inverted,locInfo){if(close&&close.path){validateClose(openBlock,close);}var decorator=/\*/.test(openBlock.open);program.blockParams=openBlock.blockParams;var inverse=undefined,inverseStrip=undefined;if(inverseAndProgram){if(decorator){throw new _exception2['default']('Unexpected inverse block on decorator',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{type:decorator?'DecoratorBlock':'BlockStatement',path:openBlock.path,params:openBlock.params,hash:openBlock.hash,program:program,inverse:inverse,openStrip:openBlock.strip,inverseStrip:inverseStrip,closeStrip:close&&close.strip,loc:this.locInfo(locInfo)};}function prepareProgram(statements,loc){if(!loc&&statements.length){var firstLoc=statements[0].loc,lastLoc=statements[statements.length-1].loc;/* istanbul ignore else */if(firstLoc&&lastLoc){loc={source:firstLoc.source,start:{line:firstLoc.start.line,column:firstLoc.start.column},end:{line:lastLoc.end.line,column:lastLoc.end.column}};}}return{type:'Program',body:statements,strip:{},loc:loc};}function preparePartialBlock(open,program,close,locInfo){validateClose(open,close);return{type:'PartialBlockStatement',name:open.path,params:open.params,hash:open.hash,program:program,openStrip:open.strip,closeStrip:close&&close.strip,loc:this.locInfo(locInfo)};}},{"../exception":18}],11:[function(require,module,exports){'use strict';exports.__esModule=true;// istanbul ignore next -function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}var _base=require('../base');var _exception=require('../exception');var _exception2=_interopRequireDefault(_exception);var _utils=require('../utils');var _codeGen=require('./code-gen');var _codeGen2=_interopRequireDefault(_codeGen);function Literal(value){this.value=value;}function JavaScriptCompiler(){}JavaScriptCompiler.prototype={// PUBLIC API: You can override these methods in a subclass to provide +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:loc});}else if(part==='..'){depth++;depthString+='../';}}else {dig.push(part);}}return {type:'PathExpression',data:data,depth:depth,parts:dig,original:original,loc:loc};}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!=='&';var decorator=/\*/.test(open);return {type:decorator?'Decorator':'MustacheStatement',path:path,params:params,hash:hash,escaped:escaped,strip:strip,loc:this.locInfo(locInfo)};}function prepareRawBlock(openRawBlock,contents,close,locInfo){validateClose(openRawBlock,close);locInfo=this.locInfo(locInfo);var program={type:'Program',body:contents,strip:{},loc:locInfo};return {type:'BlockStatement',path:openRawBlock.path,params:openRawBlock.params,hash:openRawBlock.hash,program:program,openStrip:{},inverseStrip:{},closeStrip:{},loc:locInfo};}function prepareBlock(openBlock,program,inverseAndProgram,close,inverted,locInfo){if(close&&close.path){validateClose(openBlock,close);}var decorator=/\*/.test(openBlock.open);program.blockParams=openBlock.blockParams;var inverse=undefined,inverseStrip=undefined;if(inverseAndProgram){if(decorator){throw new _exception2['default']('Unexpected inverse block on decorator',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 {type:decorator?'DecoratorBlock':'BlockStatement',path:openBlock.path,params:openBlock.params,hash:openBlock.hash,program:program,inverse:inverse,openStrip:openBlock.strip,inverseStrip:inverseStrip,closeStrip:close&&close.strip,loc:this.locInfo(locInfo)};}function prepareProgram(statements,loc){if(!loc&&statements.length){var firstLoc=statements[0].loc,lastLoc=statements[statements.length-1].loc; /* istanbul ignore else */if(firstLoc&&lastLoc){loc={source:firstLoc.source,start:{line:firstLoc.start.line,column:firstLoc.start.column},end:{line:lastLoc.end.line,column:lastLoc.end.column}};}}return {type:'Program',body:statements,strip:{},loc:loc};}function preparePartialBlock(open,program,close,locInfo){validateClose(open,close);return {type:'PartialBlockStatement',name:open.path,params:open.params,hash:open.hash,program:program,openStrip:open.strip,closeStrip:close&&close.strip,loc:this.locInfo(locInfo)};}},{"../exception":18}],11:[function(require,module,exports){'use strict';exports.__esModule=true; // istanbul ignore next +function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}var _base=require('../base');var _exception=require('../exception');var _exception2=_interopRequireDefault(_exception);var _utils=require('../utils');var _codeGen=require('./code-gen');var _codeGen2=_interopRequireDefault(_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,'[',JSON.stringify(name),']'];}},depthedLookup:function depthedLookup(name){return[this.aliasable('container.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 +nameLookup:function nameLookup(parent,name /* , type*/){if(JavaScriptCompiler.isValidJavaScriptVariableName(name)){return [parent,'.',name];}else {return [parent,'[',JSON.stringify(name),']'];}},depthedLookup:function depthedLookup(name){return [this.aliasable('container.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||{decorators:[],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||environment.useDecorators||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;i0){varDeclarations+=', '+locals.join(', ');}// Generate minimizer alias mappings +this.lastContext=0;this.source=new _codeGen2['default'](this.options.srcName);this.decorators=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=['container','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] +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=['container','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 @@ -149,20 +149,20 @@ var source=this.mergeSource(varDeclarations);if(asObject){params.push(source);re // `{{#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] +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] +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] +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: ... @@ -171,59 +171,59 @@ appendContent:function appendContent(content){if(this.pendingContent){content=th // // 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] +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('container.escapeExpression'),'(',this.popStack(),')']));},// [getContext] +appendEscaped:function appendEscaped(){this.pushSource(this.appendToBuffer([this.aliasable('container.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] +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] +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,strict,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 +lookupOnContext:function lookupOnContext(parts,falsy,strict,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,strict);},// [lookupBlockParam] +this.push(this.depthedLookup(parts[i++]));}else {this.pushContext();}this.resolvePath('context',parts,i,falsy,strict);}, // [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] +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,strict){if(!depth){this.pushStackLiteral('data');}else{this.pushStackLiteral('container.data(data, '+depth+')');}this.resolvePath('data',parts,0,true,strict);},resolvePath:function resolvePath(type,parts,i,falsy,strict){// istanbul ignore next -var _this=this;if(this.options.strict||this.options.assumeObjects){this.push(strictLookup(this.options.strict&&strict,this,parts,type));return;}var len=parts.length;for(;ithis.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;ithis.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;i2){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;imatch[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 15;break;case 1:return 15;break;case 2:this.popState();return 15;break;case 3:this.begin('raw');return 15;break;case 4:this.popState();// Should be using `this.topState()` below, but it currently +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(objectArgs){options.args=this.source.generateArray(params);}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);options=this.objectLiteral(options);if(useRegister){this.useRegister('options');params.push('options');return ['options=',options];}else if(params){params.push(options);return '';}else {return options;}}};(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;i2){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;imatch[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 15;break;case 1:return 15;break;case 2:this.popState();return 15;break;case 3:this.begin('raw');return 15;break;case 4:this.popState(); // Should be using `this.topState()` below, but it currently // returns the second top instead of the first top. Opened an // issue about it at https://github.com/zaach/jison/issues/291 -if(this.conditionStack[this.conditionStack.length-1]==='raw'){return 15;}else{yy_.yytext=yy_.yytext.substr(5,yy_.yyleng-9);return'END_RAW_BLOCK';}break;case 5:return 15;break;case 6:this.popState();return 14;break;case 7:return 65;break;case 8:return 68;break;case 9:return 19;break;case 10:this.popState();this.begin('raw');return 23;break;case 11:return 55;break;case 12:return 60;break;case 13:return 29;break;case 14:return 47;break;case 15:this.popState();return 44;break;case 16:this.popState();return 44;break;case 17:return 34;break;case 18:return 39;break;case 19:return 51;break;case 20:return 48;break;case 21:this.unput(yy_.yytext);this.popState();this.begin('com');break;case 22:this.popState();return 14;break;case 23:return 48;break;case 24:return 73;break;case 25:return 72;break;case 26:return 72;break;case 27:return 87;break;case 28:// ignore whitespace -break;case 29:this.popState();return 54;break;case 30:this.popState();return 33;break;case 31:yy_.yytext=strip(1,2).replace(/\\"/g,'"');return 80;break;case 32:yy_.yytext=strip(1,2).replace(/\\'/g,"'");return 80;break;case 33:return 85;break;case 34:return 82;break;case 35:return 82;break;case 36:return 83;break;case 37:return 84;break;case 38:return 81;break;case 39:return 75;break;case 40:return 77;break;case 41:return 72;break;case 42:yy_.yytext=yy_.yytext.replace(/\\([\\\]])/g,'$1');return 72;break;case 43:return'INVALID';break;case 44: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":[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,43,44],"inclusive":false},"emu":{"rules":[2],"inclusive":false},"com":{"rules":[6],"inclusive":false},"raw":{"rules":[3,4,5],"inclusive":false},"INITIAL":{"rules":[0,1,44],"inclusive":true}};return lexer;}();parser.lexer=lexer;function Parser(){this.yy={};}Parser.prototype=parser;parser.Parser=Parser;return new Parser();}();exports.__esModule=true;exports['default']=handlebars;},{}],13:[function(require,module,exports){/* eslint-disable new-cap */'use strict';exports.__esModule=true;exports.print=print;exports.PrintVisitor=PrintVisitor;// istanbul ignore next -function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}var _visitor=require('./visitor');var _visitor2=_interopRequireDefault(_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 '+content+' }}');};PrintVisitor.prototype.PartialBlockStatement=function(partial){var content='PARTIAL BLOCK:'+partial.name.original;if(partial.params[0]){content+=' '+this.accept(partial.params[0]);}if(partial.hash){content+=' '+this.accept(partial.hash);}content+=' '+this.pad('PROGRAM:');this.padding++;content+=this.accept(partial.program);this.padding--;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@\[-\^`\{-~]+(?=[=}\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":[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,43,44],"inclusive":false},"emu":{"rules":[2],"inclusive":false},"com":{"rules":[6],"inclusive":false},"raw":{"rules":[3,4,5],"inclusive":false},"INITIAL":{"rules":[0,1,44],"inclusive":true}};return lexer;}();parser.lexer=lexer;function Parser(){this.yy={};}Parser.prototype=parser;parser.Parser=Parser;return new Parser();}();exports.__esModule=true;exports['default']=handlebars;},{}],13:[function(require,module,exports){ /* eslint-disable new-cap */'use strict';exports.__esModule=true;exports.print=print;exports.PrintVisitor=PrintVisitor; // istanbul ignore next +function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}var _visitor=require('./visitor');var _visitor2=_interopRequireDefault(_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 '+content+' }}');};PrintVisitor.prototype.PartialBlockStatement=function(partial){var content='PARTIAL BLOCK:'+partial.name.original;if(partial.params[0]){content+=' '+this.accept(partial.params[0]);}if(partial.hash){content+=' '+this.accept(partial.hash);}content+=' '+this.pad('PROGRAM:');this.padding++;content+=this.accept(partial.program);this.padding--;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;i0){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=_utils.createFrame(options.data);data.contextPath=_utils.appendContextPath(options.data.contextPath,options.name);options={data:data};}return fn(context,options);}});};module.exports=exports['default'];},{"../utils":31}],21:[function(require,module,exports){'use strict';exports.__esModule=true;// istanbul ignore next -function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}var _utils=require('../utils');var _exception=require('../exception');var _exception2=_interopRequireDefault(_exception);exports['default']=function(instance){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(_utils.isFunction(context)){context=context.call(this);}if(options.data){data=_utils.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==="undefined"?"undefined":_typeof(context))==='object'){if(_utils.isArray(context)){for(var j=context.length;i0){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=_utils.createFrame(options.data);data.contextPath=_utils.appendContextPath(options.data.contextPath,options.name);options={data:data};}return fn(context,options);}});};module.exports=exports['default'];},{"../utils":31}],21:[function(require,module,exports){'use strict';exports.__esModule=true; // istanbul ignore next +function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}var _utils=require('../utils');var _exception=require('../exception');var _exception2=_interopRequireDefault(_exception);exports['default']=function(instance){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(_utils.isFunction(context)){context=context.call(this);}if(options.data){data=_utils.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==="undefined"?"undefined":_typeof(context))==='object'){if(_utils.isArray(context)){for(var j=context.length;i=0){level=levelMap;}else{level=parseInt(level,10);}}return level;},// Can be overridden in the host environment -log:function log(level){level=logger.lookupLevel(level);if(typeof console!=='undefined'&&logger.lookupLevel(logger.level)<=level){var method=logger.methodMap[level];if(!console[method]){// eslint-disable-line no-console -method='log';}for(var _len=arguments.length,message=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){message[_key-1]=arguments[_key];}console[method].apply(console,message);// eslint-disable-line no-console -}}};exports['default']=logger;module.exports=exports['default'];},{"./utils":31}],28:[function(require,module,exports){(function(global){/* global window */'use strict';exports.__esModule=true;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;}return Handlebars;};};module.exports=exports['default'];}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{});},{}],29:[function(require,module,exports){'use strict';exports.__esModule=true;exports.checkRevision=checkRevision;exports.template=template;exports.wrapProgram=wrapProgram;exports.resolvePartial=resolvePartial;exports.invokePartial=invokePartial;exports.noop=noop;// istanbul ignore next -function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};}// istanbul ignore next -function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}else{var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key];}}newObj['default']=obj;return newObj;}}var _utils=require('./utils');var Utils=_interopRequireWildcard(_utils);var _exception=require('./exception');var _exception2=_interopRequireDefault(_exception);var _base=require('./base');function checkRevision(compilerInfo){var compilerRevision=compilerInfo&&compilerInfo[0]||1,currentRevision=_base.COMPILER_REVISION;if(compilerRevision!==currentRevision){if(compilerRevision=0){level=levelMap;}else {level=parseInt(level,10);}}return level;}, // Can be overridden in the host environment +log:function log(level){level=logger.lookupLevel(level);if(typeof console!=='undefined'&&logger.lookupLevel(logger.level)<=level){var method=logger.methodMap[level];if(!console[method]){ // eslint-disable-line no-console +method='log';}for(var _len=arguments.length,message=Array(_len>1?_len-1:0),_key=1;_key<_len;_key++){message[_key-1]=arguments[_key];}console[method].apply(console,message); // eslint-disable-line no-console +}}};exports['default']=logger;module.exports=exports['default'];},{"./utils":31}],28:[function(require,module,exports){(function(global){ /* global window */'use strict';exports.__esModule=true;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;}return Handlebars;};};module.exports=exports['default'];}).call(this,typeof global!=="undefined"?global:typeof self!=="undefined"?self:typeof window!=="undefined"?window:{});},{}],29:[function(require,module,exports){'use strict';exports.__esModule=true;exports.checkRevision=checkRevision;exports.template=template;exports.wrapProgram=wrapProgram;exports.resolvePartial=resolvePartial;exports.invokePartial=invokePartial;exports.noop=noop; // istanbul ignore next +function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{'default':obj};} // istanbul ignore next +function _interopRequireWildcard(obj){if(obj&&obj.__esModule){return obj;}else {var newObj={};if(obj!=null){for(var key in obj){if(Object.prototype.hasOwnProperty.call(obj,key))newObj[key]=obj[key];}}newObj['default']=obj;return newObj;}}var _utils=require('./utils');var Utils=_interopRequireWildcard(_utils);var _exception=require('./exception');var _exception2=_interopRequireDefault(_exception);var _base=require('./base');function checkRevision(compilerInfo){var compilerRevision=compilerInfo&&compilerInfo[0]||1,currentRevision=_base.COMPILER_REVISION;if(compilerRevision!==currentRevision){if(compilerRevision':'>','"':'"',"'":''','`':'`','=':'='};var badChars=/[&<>"'`=]/g,possible=/[&<>"'`=]/;function escapeChar(chr){return escape[chr];}function extend(obj/* , ...source */){for(var i=1;i':'>','"':'"',"'":''','`':'`','=':'='};var badChars=/[&<>"'`=]/g,possible=/[&<>"'`=]/;function escapeChar(chr){return escape[chr];}function extend(obj /* , ...source */){for(var i=1;i=0&&aIdx=0&&aIdx>1;return isNegative?-shifted:shifted;}/** + */function fromVLQSigned(aValue){var isNegative=(aValue&1)===1;var shifted=aValue>>1;return isNegative?-shifted:shifted;} /** * Returns the base 64 VLQ encoded value. - */exports.encode=function base64VLQ_encode(aValue){var encoded="";var digit;var vlq=toVLQSigned(aValue);do{digit=vlq&VLQ_BASE_MASK;vlq>>>=VLQ_BASE_SHIFT;if(vlq>0){// There are still more digits in this value, so we must make sure the + */exports.encode=function base64VLQ_encode(aValue){var encoded="";var digit;var vlq=toVLQSigned(aValue);do {digit=vlq&VLQ_BASE_MASK;vlq>>>=VLQ_BASE_SHIFT;if(vlq>0){ // There are still more digits in this value, so we must make sure the // continuation bit is marked. -digit|=VLQ_CONTINUATION_BIT;}encoded+=base64.encode(digit);}while(vlq>0);return encoded;};/** +digit|=VLQ_CONTINUATION_BIT;}encoded+=base64.encode(digit);}while(vlq>0);return encoded;}; /** * Decodes the next base 64 VLQ value from the given string and returns the * value and the rest of the string via the out parameter. - */exports.decode=function base64VLQ_decode(aStr,aIndex,aOutParam){var strLen=aStr.length;var result=0;var shift=0;var continuation,digit;do{if(aIndex>=strLen){throw new Error("Expected more digits in base 64 VLQ value.");}digit=base64.decode(aStr.charCodeAt(aIndex++));if(digit===-1){throw new Error("Invalid base64 digit: "+aStr.charAt(aIndex-1));}continuation=!!(digit&VLQ_CONTINUATION_BIT);digit&=VLQ_BASE_MASK;result=result+(digit<=strLen){throw new Error("Expected more digits in base 64 VLQ value.");}digit=base64.decode(aStr.charCodeAt(aIndex++));if(digit===-1){throw new Error("Invalid base64 digit: "+aStr.charAt(aIndex-1));}continuation=!!(digit&VLQ_CONTINUATION_BIT);digit&=VLQ_BASE_MASK;result=result+(digit<0){// Our needle is greater than aHaystack[mid]. -if(aHigh-mid>1){// The element is in the upper half. -return recursiveSearch(mid,aHigh,aNeedle,aHaystack,aCompare,aBias);}// The exact needle element was not found in this haystack. Determine if +var mid=Math.floor((aHigh-aLow)/2)+aLow;var cmp=aCompare(aNeedle,aHaystack[mid],true);if(cmp===0){ // Found the element we are looking for. +return mid;}else if(cmp>0){ // Our needle is greater than aHaystack[mid]. +if(aHigh-mid>1){ // The element is in the upper half. +return recursiveSearch(mid,aHigh,aNeedle,aHaystack,aCompare,aBias);} // The exact needle element was not found in this haystack. Determine if // we are in termination case (3) or (2) and return the appropriate thing. -if(aBias==exports.LEAST_UPPER_BOUND){return aHigh1){// The element is in the lower half. -return recursiveSearch(aLow,mid,aNeedle,aHaystack,aCompare,aBias);}// we are in termination case (3) or (2) and return the appropriate thing. -if(aBias==exports.LEAST_UPPER_BOUND){return mid;}else{return aLow<0?-1:aLow;}}}/** +if(aBias==exports.LEAST_UPPER_BOUND){return aHigh1){ // The element is in the lower half. +return recursiveSearch(aLow,mid,aNeedle,aHaystack,aCompare,aBias);} // we are in termination case (3) or (2) and return the appropriate thing. +if(aBias==exports.LEAST_UPPER_BOUND){return mid;}else {return aLow<0?-1:aLow;}}} /** * This is an implementation of binary search which will always try and return * the index of the closest element if there is no exact hit. This is because * mappings between original and generated line/col pairs are single points, @@ -573,32 +573,32 @@ if(aBias==exports.LEAST_UPPER_BOUND){return mid;}else{return aLow<0?-1:aLow;}}}/ * closest element that is smaller than or greater than the one we are * searching for, respectively, if the exact element cannot be found. * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. - */exports.search=function search(aNeedle,aHaystack,aCompare,aBias){if(aHaystack.length===0){return-1;}var index=recursiveSearch(-1,aHaystack.length,aNeedle,aHaystack,aCompare,aBias||exports.GREATEST_LOWER_BOUND);if(index<0){return-1;}// We have found either the exact element, or the next-closest element than + */exports.search=function search(aNeedle,aHaystack,aCompare,aBias){if(aHaystack.length===0){return -1;}var index=recursiveSearch(-1,aHaystack.length,aNeedle,aHaystack,aCompare,aBias||exports.GREATEST_LOWER_BOUND);if(index<0){return -1;} // We have found either the exact element, or the next-closest element than // the one we are searching for. However, there may be more than one such // element. Make sure we always return the smallest of these. -while(index-1>=0){if(aCompare(aHaystack[index],aHaystack[index-1],true)!==0){break;}--index;}return index;};});},{"amdefine":1}],38:[function(require,module,exports){/* -*- Mode: js; js-indent-level: 2; -*- *//* +while(index-1>=0){if(aCompare(aHaystack[index],aHaystack[index-1],true)!==0){break;}--index;}return index;};});},{"amdefine":1}],38:[function(require,module,exports){ /* -*- Mode: js; js-indent-level: 2; -*- */ /* * Copyright 2014 Mozilla Foundation and contributors * Licensed under the New BSD license. See LICENSE or: * http://opensource.org/licenses/BSD-3-Clause - */if(typeof define!=='function'){var define=require('amdefine')(module,require);}define(function(require,exports,module){var util=require('./util');/** + */if(typeof define!=='function'){var define=require('amdefine')(module,require);}define(function(require,exports,module){var util=require('./util'); /** * Determine whether mappingB is after mappingA with respect to generated * position. - */function generatedPositionAfter(mappingA,mappingB){// Optimized for most common case -var lineA=mappingA.generatedLine;var lineB=mappingB.generatedLine;var columnA=mappingA.generatedColumn;var columnB=mappingB.generatedColumn;return lineB>lineA||lineB==lineA&&columnB>=columnA||util.compareByGeneratedPositionsInflated(mappingA,mappingB)<=0;}/** + */function generatedPositionAfter(mappingA,mappingB){ // Optimized for most common case +var lineA=mappingA.generatedLine;var lineB=mappingB.generatedLine;var columnA=mappingA.generatedColumn;var columnB=mappingB.generatedColumn;return lineB>lineA||lineB==lineA&&columnB>=columnA||util.compareByGeneratedPositionsInflated(mappingA,mappingB)<=0;} /** * A data structure to provide a sorted view of accumulated mappings in a * performance conscious manner. It trades a neglibable overhead in general * case for a large speedup in case of mappings being added in order. - */function MappingList(){this._array=[];this._sorted=true;// Serves as infimum -this._last={generatedLine:-1,generatedColumn:0};}/** + */function MappingList(){this._array=[];this._sorted=true; // Serves as infimum +this._last={generatedLine:-1,generatedColumn:0};} /** * Iterate through internal items. This method takes the same arguments that * `Array.prototype.forEach` takes. * * NOTE: The order of the mappings is NOT guaranteed. - */MappingList.prototype.unsortedForEach=function MappingList_forEach(aCallback,aThisArg){this._array.forEach(aCallback,aThisArg);};/** + */MappingList.prototype.unsortedForEach=function MappingList_forEach(aCallback,aThisArg){this._array.forEach(aCallback,aThisArg);}; /** * Add the given source mapping. * * @param Object aMapping - */MappingList.prototype.add=function MappingList_add(aMapping){var mapping;if(generatedPositionAfter(this._last,aMapping)){this._last=aMapping;this._array.push(aMapping);}else{this._sorted=false;this._array.push(aMapping);}};/** + */MappingList.prototype.add=function MappingList_add(aMapping){var mapping;if(generatedPositionAfter(this._last,aMapping)){this._last=aMapping;this._array.push(aMapping);}else {this._sorted=false;this._array.push(aMapping);}}; /** * Returns the flat, sorted array of mappings. The mappings are sorted by * generated position. * @@ -606,11 +606,11 @@ this._last={generatedLine:-1,generatedColumn:0};}/** * performance. The return value must NOT be mutated, and should be treated as * an immutable borrow. If you want to take ownership, you must make your own * copy. - */MappingList.prototype.toArray=function MappingList_toArray(){if(!this._sorted){this._array.sort(util.compareByGeneratedPositionsInflated);this._sorted=true;}return this._array;};exports.MappingList=MappingList;});},{"./util":43,"amdefine":1}],39:[function(require,module,exports){/* -*- Mode: js; js-indent-level: 2; -*- *//* + */MappingList.prototype.toArray=function MappingList_toArray(){if(!this._sorted){this._array.sort(util.compareByGeneratedPositionsInflated);this._sorted=true;}return this._array;};exports.MappingList=MappingList;});},{"./util":43,"amdefine":1}],39:[function(require,module,exports){ /* -*- Mode: js; js-indent-level: 2; -*- */ /* * Copyright 2011 Mozilla Foundation and contributors * Licensed under the New BSD license. See LICENSE or: * http://opensource.org/licenses/BSD-3-Clause - */if(typeof define!=='function'){var define=require('amdefine')(module,require);}define(function(require,exports,module){// It turns out that some (most?) JavaScript engines don't self-host + */if(typeof define!=='function'){var define=require('amdefine')(module,require);}define(function(require,exports,module){ // It turns out that some (most?) JavaScript engines don't self-host // `Array.prototype.sort`. This makes sense because C++ will likely remain // faster than JS when doing raw CPU-intensive sorting. However, when using a // custom comparator function, calling back and forth between the VM's C++ and @@ -628,14 +628,14 @@ this._last={generatedLine:-1,generatedColumn:0};}/** * The index of the first item. * @param {Number} y * The index of the second item. - */function swap(ary,x,y){var temp=ary[x];ary[x]=ary[y];ary[y]=temp;}/** + */function swap(ary,x,y){var temp=ary[x];ary[x]=ary[y];ary[y]=temp;} /** * Returns a random integer within the range `low .. high` inclusive. * * @param {Number} low * The lower bound on the range. * @param {Number} high * The upper bound on the range. - */function randomIntInRange(low,high){return Math.round(low+Math.random()*(high-low));}/** + */function randomIntInRange(low,high){return Math.round(low+Math.random()*(high-low));} /** * The Quick Sort algorithm. * * @param {Array} ary @@ -646,10 +646,10 @@ this._last={generatedLine:-1,generatedColumn:0};}/** * Start index of the array * @param {Number} r * End index of the array - */function doQuickSort(ary,comparator,p,r){// If our lower bound is less than our upper bound, we (1) partition the + */function doQuickSort(ary,comparator,p,r){ // If our lower bound is less than our upper bound, we (1) partition the // array into two pieces and (2) recurse on each half. If it is not, this is // the empty array and our base case. -if(p=0){var mapping=this._originalMappings[index];if(aArgs.column===undefined){var originalLine=mapping.originalLine;// Iterate until either we run out of mappings, or we run into +var needle={source:util.getArg(aArgs,'source'),originalLine:line,originalColumn:util.getArg(aArgs,'column',0)};if(this.sourceRoot!=null){needle.source=util.relative(this.sourceRoot,needle.source);}if(!this._sources.has(needle.source)){return [];}needle.source=this._sources.indexOf(needle.source);var mappings=[];var index=this._findMapping(needle,this._originalMappings,"originalLine","originalColumn",util.compareByOriginalPositions,binarySearch.LEAST_UPPER_BOUND);if(index>=0){var mapping=this._originalMappings[index];if(aArgs.column===undefined){var originalLine=mapping.originalLine; // Iterate until either we run out of mappings, or we run into // a mapping for a different line than the one we found. Since // mappings are sorted, this is guaranteed to find all mappings for // the line we found. -while(mapping&&mapping.originalLine===originalLine){mappings.push({line:util.getArg(mapping,'generatedLine',null),column:util.getArg(mapping,'generatedColumn',null),lastColumn:util.getArg(mapping,'lastGeneratedColumn',null)});mapping=this._originalMappings[++index];}}else{var originalColumn=mapping.originalColumn;// Iterate until either we run out of mappings, or we run into +while(mapping&&mapping.originalLine===originalLine){mappings.push({line:util.getArg(mapping,'generatedLine',null),column:util.getArg(mapping,'generatedColumn',null),lastColumn:util.getArg(mapping,'lastGeneratedColumn',null)});mapping=this._originalMappings[++index];}}else {var originalColumn=mapping.originalColumn; // Iterate until either we run out of mappings, or we run into // a mapping for a different line than the one we were searching for. // Since mappings are sorted, this is guaranteed to find all mappings for // the line we are searching for. -while(mapping&&mapping.originalLine===line&&mapping.originalColumn==originalColumn){mappings.push({line:util.getArg(mapping,'generatedLine',null),column:util.getArg(mapping,'generatedColumn',null),lastColumn:util.getArg(mapping,'lastGeneratedColumn',null)});mapping=this._originalMappings[++index];}}}return mappings;};exports.SourceMapConsumer=SourceMapConsumer;/** +while(mapping&&mapping.originalLine===line&&mapping.originalColumn==originalColumn){mappings.push({line:util.getArg(mapping,'generatedLine',null),column:util.getArg(mapping,'generatedColumn',null),lastColumn:util.getArg(mapping,'lastGeneratedColumn',null)});mapping=this._originalMappings[++index];}}}return mappings;};exports.SourceMapConsumer=SourceMapConsumer; /** * A BasicSourceMapConsumer instance represents a parsed source map which we can * query for information about the original file positions by giving it a file * position in the generated source. @@ -786,64 +786,64 @@ while(mapping&&mapping.originalLine===line&&mapping.originalColumn==originalColu * } * * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */function BasicSourceMapConsumer(aSourceMap){var sourceMap=aSourceMap;if(typeof aSourceMap==='string'){sourceMap=JSON.parse(aSourceMap.replace(/^\)\]\}'/,''));}var version=util.getArg(sourceMap,'version');var sources=util.getArg(sourceMap,'sources');// Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + */function BasicSourceMapConsumer(aSourceMap){var sourceMap=aSourceMap;if(typeof aSourceMap==='string'){sourceMap=JSON.parse(aSourceMap.replace(/^\)\]\}'/,''));}var version=util.getArg(sourceMap,'version');var sources=util.getArg(sourceMap,'sources'); // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which // requires the array) to play nice here. -var names=util.getArg(sourceMap,'names',[]);var sourceRoot=util.getArg(sourceMap,'sourceRoot',null);var sourcesContent=util.getArg(sourceMap,'sourcesContent',null);var mappings=util.getArg(sourceMap,'mappings');var file=util.getArg(sourceMap,'file',null);// Once again, Sass deviates from the spec and supplies the version as a +var names=util.getArg(sourceMap,'names',[]);var sourceRoot=util.getArg(sourceMap,'sourceRoot',null);var sourcesContent=util.getArg(sourceMap,'sourcesContent',null);var mappings=util.getArg(sourceMap,'mappings');var file=util.getArg(sourceMap,'file',null); // Once again, Sass deviates from the spec and supplies the version as a // string rather than a number, so we use loose equality checking here. -if(version!=this._version){throw new Error('Unsupported version: '+version);}// Some source maps produce relative source paths like "./foo.js" instead of +if(version!=this._version){throw new Error('Unsupported version: '+version);} // Some source maps produce relative source paths like "./foo.js" instead of // "foo.js". Normalize these first so that future comparisons will succeed. // See bugzil.la/1090768. -sources=sources.map(util.normalize);// Pass `true` below to allow duplicate names and sources. While source maps +sources=sources.map(util.normalize); // Pass `true` below to allow duplicate names and sources. While source maps // are intended to be compressed and deduplicated, the TypeScript compiler // sometimes generates source maps with duplicates in them. See Github issue // #72 and bugzil.la/889492. -this._names=ArraySet.fromArray(names,true);this._sources=ArraySet.fromArray(sources,true);this.sourceRoot=sourceRoot;this.sourcesContent=sourcesContent;this._mappings=mappings;this.file=file;}BasicSourceMapConsumer.prototype=Object.create(SourceMapConsumer.prototype);BasicSourceMapConsumer.prototype.consumer=SourceMapConsumer;/** +this._names=ArraySet.fromArray(names,true);this._sources=ArraySet.fromArray(sources,true);this.sourceRoot=sourceRoot;this.sourcesContent=sourcesContent;this._mappings=mappings;this.file=file;}BasicSourceMapConsumer.prototype=Object.create(SourceMapConsumer.prototype);BasicSourceMapConsumer.prototype.consumer=SourceMapConsumer; /** * Create a BasicSourceMapConsumer from a SourceMapGenerator. * * @param SourceMapGenerator aSourceMap * The source map that will be consumed. * @returns BasicSourceMapConsumer - */BasicSourceMapConsumer.fromSourceMap=function SourceMapConsumer_fromSourceMap(aSourceMap){var smc=Object.create(BasicSourceMapConsumer.prototype);var names=smc._names=ArraySet.fromArray(aSourceMap._names.toArray(),true);var sources=smc._sources=ArraySet.fromArray(aSourceMap._sources.toArray(),true);smc.sourceRoot=aSourceMap._sourceRoot;smc.sourcesContent=aSourceMap._generateSourcesContent(smc._sources.toArray(),smc.sourceRoot);smc.file=aSourceMap._file;// Because we are modifying the entries (by converting string sources and + */BasicSourceMapConsumer.fromSourceMap=function SourceMapConsumer_fromSourceMap(aSourceMap){var smc=Object.create(BasicSourceMapConsumer.prototype);var names=smc._names=ArraySet.fromArray(aSourceMap._names.toArray(),true);var sources=smc._sources=ArraySet.fromArray(aSourceMap._sources.toArray(),true);smc.sourceRoot=aSourceMap._sourceRoot;smc.sourcesContent=aSourceMap._generateSourcesContent(smc._sources.toArray(),smc.sourceRoot);smc.file=aSourceMap._file; // Because we are modifying the entries (by converting string sources and // names to indices into the sources and names ArraySets), we have to make // a copy of the entry or else bad things happen. Shared mutable state // strikes again! See github issue #191. -var generatedMappings=aSourceMap._mappings.toArray().slice();var destGeneratedMappings=smc.__generatedMappings=[];var destOriginalMappings=smc.__originalMappings=[];for(var i=0,length=generatedMappings.length;i