You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

626 lines
1.1 MiB
JavaScript

!function(l,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define("test",[],n):"object"==typeof exports?exports.test=n():(l.peg=l.peg||{},l.peg.test=n())}("undefined"!=typeof self?self:window,function(){return function(l){var n={};function e(t){if(n[t])return n[t].exports;var u=n[t]={i:t,l:!1,exports:{}};return l[t].call(u.exports,u,u.exports,e),u.l=!0,u.exports}return e.m=l,e.c=n,e.d=function(l,n,t){e.o(l,n)||Object.defineProperty(l,n,{enumerable:!0,get:t})},e.r=function(l){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(l,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(l,"__esModule",{value:!0})},e.t=function(l,n){if(1&n&&(l=e(l)),8&n)return l;if(4&n&&"object"==typeof l&&l&&l.__esModule)return l;var t=Object.create(null);if(e.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:l}),2&n&&"string"!=typeof l)for(var u in l)e.d(t,u,function(n){return l[n]}.bind(null,u));return t},e.n=function(l){var n=l&&l.__esModule?function(){return l.default}:function(){return l};return e.d(n,"a",n),n},e.o=function(l,n){return Object.prototype.hasOwnProperty.call(l,n)},e.p="",e(e.s=52)}([function(l,n,e){"use strict";var t=e(9),u=e(5),r=e(23),o=e(14),i=e(1),a={VERSION:e(13).version,GrammarError:t,ast:u,parser:o,compiler:r,util:i,generate:function(l){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=new r.Session({passes:i.convertPasses(r.passes)});return Array.isArray(n.plugins)&&n.plugins.forEach(function(l){"function"==typeof l.use&&l.use(e,n)}),r.compile(e.parse(l,n.parser||{}),e,n)}};l.exports=a},function(l,n,e){"use strict";var t=e(19),u=e(20),r=e(21),o=e(11),i=function(){function l(l){return Array.isArray(l)?l:r.values(l)}return function(n){return r.map(n,l)}}();l.exports={find:t.find,findIndex:t.findIndex,stringEscape:u.stringEscape,regexpEscape:u.regexpEscape,reservedWords:u.reservedWords,clone:r.clone,each:r.each,extend:r.extend,map:r.map,values:r.values,enforceFastProperties:r.enforceFastProperties,evalModule:o.evalModule,convertPasses:i,processOptions:function(l,n){var e={};return r.extend(e,l),r.extend(e,n),e},noop:function(){}}},function(l,n,e){l.exports=e(6)},function(l,n){
/*!
* Chai - flag utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
l.exports=function(l,n,e){var t=l.__flags||(l.__flags=Object.create(null));if(3!==arguments.length)return t[n];t[n]=e}},function(l,n,e){"use strict";var t=e(84),u=e(0).compiler.Session;l.exports=function(l,n){l.use(t);var e=l.Assertion;function r(l,n,e){var t=n.parse(l);return e.allowedStartRules||(e.allowedStartRules=t.rules.length>0?[t.rules[0].name]:[]),t}e.addMethod("changeAST",function(l,t,o,i){o=void 0!==o?o:{},i=void 0!==i?i:{reportFailures:!0};var a=new u({grammar:l}),s=r(l,a,o);s.rules=s.rules.map(function(l){return Object.assign(l,i)}),n.flag(this,"object")(s,a,o),new e(s).like(t)}),e.addMethod("reportError",function(l,t,o){o=void 0!==o?o:{};var i,a,s=new u({grammar:l}),c=r(l,s,o);try{n.flag(this,"object")(c,s,o),i=!0}catch(l){a=l,i=!1}this.assert(!i,"expected #{this} to report an error but it didn't","expected #{this} to not report an error but #{act} was reported",null,a),i||void 0===t||("string"==typeof t&&(t={message:t}),Object.keys(t).forEach(function(l){new e(a).to.have.property(l).that.is.deep.equal(t[l])}))}),e.addMethod("reportWarning",function(l,e,t){var o=this;e=Array.isArray(e)?e:null==e?[]:[e],t=void 0!==t?t:{};var i=[];var a=new u({grammar:l,warn:function(l){i.push(l)}}),s=r(l,a,t);n.flag(this,"object")(s,a,t);var c=i.length,f=e.length;e.length&&this.assert(c===f,"expected #{this} to report ".concat(f," warnings, but it reported ").concat(c," warnings"),"expected #{this} to not report ".concat(f," warnings"),e,i),e.forEach(function(l){o.assert(-1!==i.indexOf(l),"expected #{this} to report the warning #{exp}, but it didn't","expected #{this} to not report the warning #{exp}",l)})})}},function(l,n,e){"use strict";n.visitor=e(10),n.Node=e(12),n.Grammar=e(22)},function(l,n,e){
/*!
* chai
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
var t=[];
/*!
* Chai version
*/n.version="4.2.0",
/*!
* Assertion Error
*/
n.AssertionError=e(43);
/*!
* Utils for plugins (not exported)
*/
var u=e(57);n.use=function(l){return~t.indexOf(l)||(l(n,u),t.push(l)),n},
/*!
* Utility Functions
*/
n.util=u;
/*!
* Configuration
*/
var r=e(8);n.config=r;
/*!
* Primary `Assertion` prototype
*/
var o=e(74);n.use(o);
/*!
* Core Assertions
*/
var i=e(75);n.use(i);
/*!
* Expect interface
*/
var a=e(76);n.use(a);
/*!
* Should interface
*/
var s=e(77);n.use(s);
/*!
* Assert interface
*/
var c=e(78);n.use(c)},function(l,n){
/*!
* Chai - transferFlags utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
l.exports=function(l,n,e){var t=l.__flags||(l.__flags=Object.create(null));for(var u in n.__flags||(n.__flags=Object.create(null)),e=3!==arguments.length||e,t)(e||"object"!==u&&"ssfi"!==u&&"lockSsfi"!==u&&"message"!=u)&&(n.__flags[u]=t[u])}},function(l,n){l.exports={includeStack:!1,showDiff:!0,truncateThreshold:40,useProxy:!0,proxyExcludedKeys:["then","catch","inspect","toJSON"]}},function(l,n,e){"use strict";l.exports=function l(n,e){!function(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")}(this,l),this.name="GrammarError",this.message=n,this.location=e,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,l)}},function(l,n,e){"use strict";function t(l,n){for(var e=0;e<n.length;e++){var t=n[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(l,t.key,t)}}var u=e(1),r=function(){function l(){!function(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")}(this,l)}var n,e,u;return n=l,(e=[{key:"visit",value:function(l){if(!l)throw new Error("Visitor function called with no arguments or a `falsy` node");var n=this[l.type];if(!n)throw new Error('Visitor function for node type "'.concat(l.type,'" not defined'));return n.apply(this,arguments)}}])&&t(n.prototype,e),u&&t(n,u),l}();l.exports={ASTVisitor:r,build:function(l){var n=new r;return u.extend(n,l),(n=u.enforceFastProperties(n)).visit.bind(n)}};var o=r.on={property:function(l){return function(n){for(var e=n[l],t=arguments.length,u=new Array(t>1?t-1:0),r=1;r<t;r++)u[r-1]=arguments[r];u.length?this.visit.apply(this,[e].concat(u)):this.visit(e)}},children:function(l){return function(n){for(var e=arguments.length,t=new Array(e>1?e-1:0),u=1;u<e;u++)t[u-1]=arguments[u];var r=n[l],o=this,i=t.length<1?function(l){o.visit(l)}:function(l){o.visit.apply(o,[l].concat(t))};r.forEach(i)}}},i=u.noop,a=o.property("expression"),s={grammar:function(l){for(var n=this,e=arguments.length,t=new Array(e>1?e-1:0),u=1;u<e;u++)t[u-1]=arguments[u];l.initializer&&this.visit.apply(this,[l.initializer].concat(t)),l.rules.forEach(function(l){n.visit.apply(n,[l].concat(t))})},initializer:i,rule:a,named:a,choice:o.children("alternatives"),action:a,sequence:o.children("elements"),labeled:a,text:a,simple_and:a,simple_not:a,optional:a,zero_or_more:a,one_or_more:a,group:a,semantic_and:i,semantic_not:i,rule_ref:i,literal:i,class:i,any:i};u.each(s,function(l,n){r.prototype[n]=l})},function(l,n,e){"use strict";function t(l){return function(l){if(Array.isArray(l)){for(var n=0,e=new Array(l.length);n<l.length;n++)e[n]=l[n];return e}}(l)||function(l){if(Symbol.iterator in Object(l)||"[object Arguments]"===Object.prototype.toString.call(l))return Array.from(l)}(l)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}l.exports={evalModule:function(l,n){var e=Object.keys(n),u=e.map(function(l){return n[l]}),r={exports:{}};return e.push("module","exports",l),u.push(r,r.exports),Function.apply(void 0,t(e)).apply(void 0,t(u)),r.exports}}},function(l,n,e){"use strict";l.exports=function l(n,e){!function(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")}(this,l),this.type=n,this.location=e}},function(l){l.exports={name:"pegjs",version:"0.11.0-dev",description:"Parser generator for JavaScript",keywords:["PEG.js","pegjs","grammar","parser","generator","language","PEG"],homepage:"https://pegjs.org/",repository:"pegjs/pegjs",license:"MIT",contributors:["David Majda <david@majda.cz> (https://majda.cz/)","Futago-za Ryuu <futagoza.ryuu@gmail.com>"],types:"typings/pegjs.d.ts",main:"lib/peg.js",bin:"bin/peg.js",engines:{node:">= 6"}}},function(l,n,e){"use strict";var t=e(5),u=e(1);function r(l,n,e,t){this.message=l,this.expected=n,this.found=e,this.location=t,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,r)}!function(l,n){function e(){this.constructor=l}e.prototype=n.prototype,l.prototype=new e}(r,Error),r.buildMessage=function(l,n){var e={literal:function(l){return'"'+u(l.text)+'"'},
/*!
* Chai - isProxyEnabled helper
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/l.exports=function(){return t.useProxy&&"undefined"!=typeof Proxy&&"undefined"!=typeof Reflect}},function(l,n){var e=Object.getOwnPropertyDescriptor(function(){},"length");
/*!
* Chai - addLengthGuard utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/l.exports=function(l,n,t){return e.configurable?(Object.defineProperty(l,"length",{get:function(){if(t)throw Error("Invalid Chai property: "+n+'.length. Due to a compatibility issue, "length" cannot directly follow "'+n+'". Use "'+n+'.lengthOf" instead.');throw Error("Invalid Chai property: "+n+'.length. See docs for proper usage of "'+n+'".')}}),l):l}},function(l,n,e){var t=e(8),u=e(3),r=e(47),o=e(16),i=["__flags","__methods","_obj","assert"];l.exports=function(l,n){return o()?new Proxy(l,{get:function l(e,o){if("string"==typeof o&&-1===t.proxyExcludedKeys.indexOf(o)&&!Reflect.has(e,o)){if(n)throw Error("Invalid Chai property: "+n+"."+o+'. See docs for proper usage of "'+n+'".');var a=null,s=4;throw r(e).forEach(function(l){if(!Object.prototype.hasOwnProperty(l)&&-1===i.indexOf(l)){var n=function(l,n,e){if(Math.abs(l.length-n.length)>=e)return e;for(var t=[],u=0;u<=l.length;u++)t[u]=Array(n.length+1).fill(0),t[u][0]=u;for(var r=0;r<n.length;r++)t[0][r]=r;for(var u=1;u<=l.length;u++)for(var o=l.charCodeAt(u-1),r=1;r<=n.length;r++)Math.abs(u-r)>=e?t[u][r]=e:t[u][r]=Math.min(t[u-1][r]+1,t[u][r-1]+1,t[u-1][r-1]+(o===n.charCodeAt(r-1)?0:1));return t[l.length][n.length]}(o,l,s);n<s&&(a=l,s=n)}}),null!==a?Error("Invalid Chai property: "+o+'. Did you mean "'+a+'"?'):Error("Invalid Chai property: "+o)}return-1!==i.indexOf(o)||u(e,"lockSsfi")||u(e,"ssfi",l),Reflect.get(e,o)}}):l}},function(l,n,e){"use strict";function t(l,n){for(var e=0;e<l.length;++e)if(n(l[e],e))return e;return-1}l.exports={findIndex:t,find:function(l,n){var e=t(l,n);return e<0?void 0:l[e]}}},function(l,n,e){"use strict";function t(l){return l.charCodeAt(0).toString(16).toUpperCase()}function u(l){return l.replace(/\0/g,"\\0").replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\v/g,"\\v").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,function(l){return"\\x0"+t(l)}).replace(/[\x10-\x1F\x7F-\xFF]/g,function(l){return"\\x"+t(l)}).replace(/[\u0100-\u0FFF]/g,function(l){return"\\u0"+t(l)}).replace(/[\u1000-\uFFFF]/g,function(l){return"\\u"+t(l)})}var r={stringEscape:function(l){return u(l.replace(/\\/g,"\\\\").replace(/"/g,'\\"'))},regexpEscape:function(l){return u(l.replace(/\\/g,"\\\\").replace(/\//g,"\\/").replace(/]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-"))},reservedWords:["break","case","catch","continue","debugger","default","delete","do","else","finally","for","function","if","in","instanceof","new","return","switch","this","throw","try","typeof","var","void","while","with","class","const","enum","export","extends","implements","import","interface","let","package","private","protected","public","static","super","yield","false","null","true"]};l.exports=r},function(l,n,e){"use strict";function t(l){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(l){return typeof l}:function(l){return l&&"function"==typeof Symbol&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l})(l)}var u=Object.prototype.hasOwnProperty,r={clone:function(l){var n={};for(var e in l)u.call(l,e)&&(n[e]=l[e]);return n},each:function(l,n){for(var e in l)u.call(l,e)&&n(l[e],e)},extend:function(l,n){for(var e in n)u.call(n,e)&&(u.call(l,e)||(l[e]=n[e]));return l},map:function(l,n){var e={};for(var t in l)u.call(l,t)&&(e[t]=n(l[t],t));return e},values:function(l,n){var e,t,r=[],o=-1;for(e in l)u.call(l,e)&&(t=l[e],r[++o]=n?n(t,e):t);return r},enforceFastProperties:function l(n){function e(){}e.prototype=n;var u=new e;function r(){return t(u.foo)}return r(),r(),n}};l.exports=r},function(l,n,e){"use strict";function t(l){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(l){return typeof l}:function(l){return l&&"function"==typeof Symbol&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l})(l)}function u(l,n){if(!(l instanceof n))throw new TypeError("Cannot call a class as a function")}function r(l,n){for(var e=0;e<n.length;e++){var t=n[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(l,t.key,t)}}function o(l,n,e){r
/*!
* assertion-error
* Copyright(c) 2013 Jake Luer <jake@qualiancy.com>
* MIT Licensed
*/
/*!
* Return a function that will copy properties from
* one object to another excluding any originally
* listed. Returned function will create a new `{}`.
*
* @param {String} excluded properties ...
* @return {Function}
*/
function e(){var l=[].slice.call(arguments);function n(n,e){Object.keys(e).forEach(function(t){~l.indexOf(t)||(n[t]=e[t])})}return function(){for(var l=[].slice.call(arguments),e=0,t={};e<l.length;e++)n(t,l[e]);return t}}function t(l,n,u){var r=e("name","message","stack","constructor","toJSON")(n||{});for(var o in this.message=l||"Unspecified AssertionError",this.showDiff=!1,r)this[o]=r[o];if(u=u||t,Error.captureStackTrace)Error.captureStackTrace(this,u);else try{throw new Error}catch(l){this.stack=l.stack}}
/*!
* Inherit from Error.prototype
*/
/*!
* Primary Exports
*/
l.exports=t,t.prototype=Object.create(Error.prototype),
/*!
* Statically set name
*/
t.prototype.name="AssertionError",
/*!
* Ensure correct constructor
*/
t.prototype.constructor=t,t.prototype.toJSON=function(l){var n=e("constructor","toJSON","stack")({name:this.name},this);return!1!==l&&this.stack&&(n.stack=this.stack),n}},function(l,n){
/*!
* Chai - getActual utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
l.exports=function(l,n){return n.length>4?n[4]:l._obj}},function(l,n,e){
/*!
* Chai - flag utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
/*!
* Module dependencies
*/
var t=e(40),u=e(8);l.exports=function(l){var n=t(l),e=Object.prototype.toString.call(l);if(u.truncateThreshold&&n.length>=u.truncateThreshold){if("[object Function]"===e)return l.name&&""!==l.name?"[Function: "+l.name+"]":"[Function]";if("[object Array]"===e)return"[ Array("+l.length+") ]";if("[object Object]"===e){var r=Object.keys(l);return"{ Object ("+(r.length>2?r.splice(0,2).join(", ")+", ...":r.join(", "))+") }"}return n}return n}},function(l,n,e){"use strict";var t=Function.prototype.toString,u=/\s*function(?:\s|\s*\/\*[^(?:*\/)]+\*\/\s*)*([^\s\(\/]+)/;l.exports=function(l){if("function"!=typeof l)return null;var n="";if(void 0===Function.prototype.name&&void 0===l.name){var e=t.call(l).match(u);e&&(n=e[1])}else n=l.name;return n}},function(l,n){
/*!
* Chai - getProperties utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
l.exports=function(l){var n=Object.getOwnPropertyNames(l);function e(l){-1===n.indexOf(l)&&n.push(l)}for(var t=Object.getPrototypeOf(l);null!==t;)Object.getOwnPropertyNames(t).forEach(e),t=Object.getPrototypeOf(t);return n}},function(l,n){
/*!
* Chai - getOwnEnumerablePropertySymbols utility
* Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
l.exports=function(l){return"function"!=typeof Object.getOwnPropertySymbols?[]:Object.getOwnPropertySymbols(l).filter(function(n){return Object.getOwnPropertyDescriptor(l,n).enumerable})}},,,,function(l,n,e){"use strict";(function(l){e(53),mocha.setup({reporter:"spec",ui:"bdd"});var n=e(55);n.keys().forEach(n),l.nextTick(function(){return mocha.run()})}).call(this,e(42))},function(l,n,e){(function(l,n){var e;!function(){return function l(n,t,u){function r(i,a){if(!t[i]){if(!n[i]){if(!a&&"function"==typeof e&&e)return e(i,!0);if(o)return o(i,!0);var s=new Error("Cannot find module '"+i+"'");throw s.code="MODULE_NOT_FOUND",s}var c=t[i]={exports:{}};n[i][0].call(c.exports,function(l){return r(n[i][1][l]||l)},c,c.exports,l,n,t,u)}return t[i].exports}for(var o="function"==typeof e&&e,i=0;i<u.length;i++)r(u[i]);return r}}()({1:[function(n,e,t){(function(l,t){"use strict";l.stdout=n("browser-stdout")({level:!1});var u=n("./lib/mocha"),r=new u({reporter:"html"}),o=t.Date,i=t.setTimeout,a=(t.setInterval,t.clearTimeout,t.clearInterval,[]),s=t.onerror;l.removeListener=function(l,n){if("uncaughtException"===l){t.onerror=s||function(){};var e=a.indexOf(n);-1!==e&&a.splice(e,1)}},l.on=function(l,n){"uncaughtException"===l&&(t.onerror=function(l,e,t){return n(new Error(l+" ("+e+":"+t+")")),!r.allowUncaught},a.push(n))},r.suite.removeAllListeners("pre-require");var c,f=[];function p(){for(var l=(new o).getTime();f.length&&(new o).getTime()-l<100;)f.shift()();c=f.length?i(p,0):null}u.Runner.immediately=function(l){f.push(l),c||(c=i(p,0))},r.throwError=function(l){throw a.forEach(function(n){n(l)}),l},r.ui=function(l){return u.prototype.ui.call(this,l),this.suite.emit("pre-require",t,null,this),this},r.setup=function(l){for(var n in"string"==typeof l&&(l={ui:l}),l)l.hasOwnProperty(n)&&this[n](l[n]);return this},r.run=function(l){var n=r.options;r.globals("location");var e=u.utils.parseQuery(t.location.search||"");return e.grep&&r.grep(e.grep),e.fgrep&&r.fgrep(e.fgrep),e.invert&&r.invert(),u.prototype.run.call(r,function(e){var r=t.document;r&&r.getElementById("mocha")&&!0!==n.noHighlighting&&u.utils.highlightTags("code"),l&&l(e)})},u.process=l,t.Mocha=u,t.mocha=r,e.exports=t}).call(this,n("_process"),void 0!==l?l:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./lib/mocha":13,_process:56,"browser-stdout":39}],2:[function(l,n,e){"use strict";n.exports=l("../utils").noop},{"../utils":36}],3:[function(l,n,e){"use strict";function t(){this.percent=0,this.size(0),this.fontSize(11),this.font("helvetica, arial, sans-serif")}n.exports=t,t.prototype.size=function(l){return this._size=l,this},t.prototype.text=function(l){return this._text=l,this},t.prototype.fontSize=function(l){return this._fontSize=l,this},t.prototype.font=function(l){return this._font=l,this},t.prototype.update=function(l){return this.percent=l,this},t.prototype.draw=function(l){try{var n=Math.min(this.percent,100),e=this._size,t=e/2,u=t,r=t,o=t-1,i=this._fontSize;l.font=i+"px "+this._font;var a=2*Math.PI*(n/100);l.clearRect(0,0,e,e),l.strokeStyle="#9f9f9f",l.beginPath(),l.arc(u,r,o,0,a,!1),l.stroke(),l.strokeStyle="#eee",l.beginPath(),l.arc(u,r,o-1,0,a,!0),l.stroke();var s=this._text||(0|n)+"%",c=l.measureText(s).width;l.fillText(s,u-c/2+1,r+i/2-1)}catch(l){}return this}},{}],4:[function(n,e,t){(function(l){"use strict";t.isatty=function(){return!0},t.getWindowSize=function(){return"innerHeight"in l?[l.innerHeight,l.innerWidth]:[640,480]}}).call(this,void 0!==l?l:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],5:[function(l,n,e){"use strict";function t(){}n.exports=t,t.prototype.runnable=function(l){return arguments.length?(this.test=this._runnable=l,this):this._runnable},t.prototype.timeout=function(l){return arguments.length?(this.runnable().timeout(l),this):this.runnable().timeout()},t.prototype.enableTimeouts=function(l){return arguments.length?(this.runnable().enableTimeouts(l),this):this.runnable().enableTimeouts()},t.prototype.slow=function(l){return arguments.length?(this.runnable().slow(l),this):this.runnable().slow()},t
/*!
* mocha
* Copyright(c) 2011 TJ Holowaychuk <tj@vision-media.ca>
* MIT Licensed
*/var o=n("escape-string-regexp"),i=n("path"),a=n("./reporters"),s=n("./utils");if(t=e.exports=p,!l.browser){var c=l.cwd();e.paths.push(c,i.join(c,"node_modules"))}function f(l){return i.join(r,"..","assets","growl",l+".png")}function p(l){l=l||{},this.files=[],this.options=l,l.grep&&this.grep(new RegExp(l.grep)),l.fgrep&&this.fgrep(l.fgrep),this.suite=new t.Suite("",new t.Context),this.ui(l.ui),this.bail(l.bail),this.reporter(l.reporter,l.reporterOptions),void 0!==l.timeout&&null!==l.timeout&&this.timeout(l.timeout),void 0!==l.retries&&null!==l.retries&&this.retries(l.retries),this.useColors(l.useColors),null!==l.enableTimeouts&&this.enableTimeouts(l.enableTimeouts),l.slow&&this.slow(l.slow)}t.utils=s,t.interfaces=n("./interfaces"),t.reporters=a,t.Runnable=n("./runnable"),t.Context=n("./context"),t.Runner=n("./runner"),t.Suite=n("./suite"),t.Hook=n("./hook"),t.Test=n("./test"),p.prototype.bail=function(l){return arguments.length||(l=!0),this.suite.bail(l),this},p.prototype.addFile=function(l){return this.files.push(l),this},p.prototype.reporter=function(e,t){if("function"==typeof e)this._reporter=e;else{var u;if(a[e=e||"spec"]&&(u=a[e]),!u)try{u=n(e)}catch(t){if(-1!==t.message.indexOf("Cannot find module"))try{u=n(i.resolve(l.cwd(),e))}catch(l){-1!==t.message.indexOf("Cannot find module")?console.warn('"'+e+'" reporter not found'):console.warn('"'+e+'" reporter blew up with error:\n'+t.stack)}else console.warn('"'+e+'" reporter blew up with error:\n'+t.stack)}if(u||"teamcity"!==e||console.warn("The Teamcity reporter was moved to a package named mocha-teamcity-reporter (https://npmjs.org/package/mocha-teamcity-reporter)."),!u)throw new Error('invalid reporter "'+e+'"');this._reporter=u}return this.options.reporterOptions=t,this},p.prototype.ui=function(l){if(l=l||"bdd",this._ui=t.interfaces[l],!this._ui)try{this._ui=n(l)}catch(n){throw new Error('invalid interface "'+l+'"')}return this._ui=this._ui(this.suite),this.suite.on("pre-require",function(l){t.afterEach=l.afterEach||l.teardown,t.after=l.after||l.suiteTeardown,t.beforeEach=l.beforeEach||l.setup,t.before=l.before||l.suiteSetup,t.describe=l.describe||l.suite,t.it=l.it||l.test,t.xit=l.xit||l.test.skip,t.setup=l.setup||l.beforeEach,t.suiteSetup=l.suiteSetup||l.before,t.suiteTeardown=l.suiteTeardown||l.after,t.suite=l.suite||l.describe,t.teardown=l.teardown||l.afterEach,t.test=l.test||l.it,t.run=l.run}),this},p.prototype.loadFiles=function(l){var e=this,t=this.suite;this.files.forEach(function(l){l=i.resolve(l),t.emit("pre-require",u,l,e),t.emit("require",n(l),l,e),t.emit("post-require",u,l,e)}),l&&l()},p.prototype._growl=function(l,e){var t=n("growl");l.on("end",function(){var n=e.stats;if(n.failures){var u=n.failures+" of "+l.total+" tests failed";t(u,{name:"mocha",title:"Failed",image:f("error")})}else t(n.passes+" tests passed in "+n.duration+"ms",{name:"mocha",title:"Passed",image:f("ok")})})},p.prototype.fgrep=function(l){return this.grep(new RegExp(o(l)))},p.prototype.grep=function(l){if(s.isString(l)){var n=l.match(/^\/(.*)\/(g|i|)$|.*/);this.options.grep=new RegExp(n[1]||n[0],n[2])}else this.options.grep=l;return this},p.prototype.invert=function(){return this.options.invert=!0,this},p.prototype.ignoreLeaks=function(l){return this.options.ignoreLeaks=Boolean(l),this},p.prototype.checkLeaks=function(){return this.options.ignoreLeaks=!1,this},p.prototype.fullTrace=function(){return this.options.fullStackTrace=!0,this},p.prototype.growl=function(){return this.options.growl=!0,this},p.prototype.globals=function(l){return this.options.globals=(this.options.globals||[]).concat(l),this},p.prototype.useColors=function(l){return void 0!==l&&(this.options.useColors=l),this},p.prototype.useInlineDiffs=function(l){return this.options.useInlineDiffs=void 0!==l&&l,this},p.prototype.hideDiff=function(l){return this.options.hideDiff=void 0!==l&&l,this},p.prototype.timeout=function(l){return this.suite.timeout(l),this},p.prototype.retries=function(l){return this.suite.retries(l),this},p.prototype.slow=function(l){return this.suite.slow(l),this},p.prototype.enableTimeouts=fun
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
"use strict";var t=l("base64-js"),u=l("ieee754");e.Buffer=i,e.SlowBuffer=function(l){+l!=l&&(l=0);return i.alloc(+l)},e.INSPECT_MAX_BYTES=50;var r=2147483647;function o(l){if(l>r)throw new RangeError("Invalid typed array length");var n=new Uint8Array(l);return n.__proto__=i.prototype,n}function i(l,n,e){if("number"==typeof l){if("string"==typeof n)throw new Error("If encoding is specified then the first argument must be a string");return c(l)}return a(l,n,e)}function a(l,n,e){if("number"==typeof l)throw new TypeError('"value" argument must not be a number');return I(l)||l&&I(l.buffer)?function(l,n,e){if(n<0||l.byteLength<n)throw new RangeError('"offset" is outside of buffer bounds');if(l.byteLength<n+(e||0))throw new RangeError('"length" is outside of buffer bounds');var t;t=void 0===n&&void 0===e?new Uint8Array(l):void 0===e?new Uint8Array(l,n):new Uint8Array(l,n,e);return t.__proto__=i.prototype,t}(l,n,e):"string"==typeof l?function(l,n){"string"==typeof n&&""!==n||(n="utf8");if(!i.isEncoding(n))throw new TypeError("Unknown encoding: "+n);var e=0|h(l,n),t=o(e),u=t.write(l,n);u!==e&&(t=t.slice(0,u));return t}(l,n):function(l){if(i.isBuffer(l)){var n=0|p(l.length),e=o(n);return 0===e.length?e:(l.copy(e,0,0,n),e)}if(l){if(ArrayBuffer.isView(l)||"length"in l)return"number"!=typeof l.length||q(l.length)?o(0):f(l);if("Buffer"===l.type&&Array.isArray(l.data))return f(l.data)}throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object.")}(l)}function s(l){if("number"!=typeof l)throw new TypeError('"size" argument must be of type number');if(l<0)throw new RangeError('"size" argument must not be negative')}function c(l){return s(l),o(l<0?0:0|p(l))}function f(l){for(var n=l.length<0?0:0|p(l.length),e=o(n),t=0;t<n;t+=1)e[t]=255&l[t];return e}function p(l){if(l>=r)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r.toString(16)+" bytes");return 0|l}function h(l,n){if(i.isBuffer(l))return l.length;if(ArrayBuffer.isView(l)||I(l))return l.byteLength;"string"!=typeof l&&(l=""+l);var e=l.length;if(0===e)return 0;for(var t=!1;;)switch(n){case"ascii":case"latin1":case"binary":return e;case"utf8":case"utf-8":case void 0:return N(l).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*e;case"hex":return e>>>1;case"base64":return M(l).length;default:if(t)return N(l).length;n=(""+n).toLowerCase(),t=!0}}function d(l,n,e){var t=l[n];l[n]=l[e],l[e]=t}function g(l,n,e,t,u){if(0===l.length)return-1;if("string"==typeof e?(t=e,e=0):e>2147483647?e=2147483647:e<-2147483648&&(e=-2147483648),q(e=+e)&&(e=u?0:l.length-1),e<0&&(e=l.length+e),e>=l.length){if(u)return-1;e=l.length-1}else if(e<0){if(!u)return-1;e=0}if("string"==typeof n&&(n=i.from(n,t)),i.isBuffer(n))return 0===n.length?-1:m(l,n,e,t,u);if("number"==typeof n)return n&=255,"function"==typeof Uint8Array.prototype.indexOf?u?Uint8Array.prototype.indexOf.call(l,n,e):Uint8Array.prototype.lastIndexOf.call(l,n,e):m(l,[n],e,t,u);throw new TypeError("val must be string, number or Buffer")}function m(l,n,e,t,u){var r,o=1,i=l.length,a=n.length;if(void 0!==t&&("ucs2"===(t=String(t).toLowerCase())||"ucs-2"===t||"utf16le"===t||"utf-16le"===t)){if(l.length<2||n.length<2)return-1;o=2,i/=2,a/=2,e/=2}function s(l,n){return 1===o?l[n]:l.readUInt16BE(n*o)}if(u){var c=-1;for(r=e;r<i;r++)if(s(l,r)===s(n,-1===c?0:r-c)){if(-1===c&&(c=r),r-c+1===a)return c*o}else-1!==c&&(r-=r-c),c=-1}else for(e+a>i&&(e=i-a),r=e;r>=0;r--){for(var f=!0,p=0;p<a;p++)if(s(l,r+p)!==s(n,p)){f=!1;break}if(f)return r}return-1}function y(l,n,e,t){e=Number(e)||0;var u=l.length-e;t?(t=Number(t))>u&&(t=u):t=u;var r=n.length;t>r/2&&(t=r/2);for(var o=0;o<t;++o){var i=parseInt(n.substr(2*o,2),16);if(q(i))return o;l[e+o]=i}return o}function b(l,n,e,t){return R(N(n,l.length-e),l,e,t)}function v(l,n,e,t){return R(function(l){for(var n=[],e=0;e<l.length;++e)n.push(255&l.charCodeAt(e));return n}(n),l,e,t)}function w(l,n,e,t){return v(l,n,e,t)}function A(l,n,e,t){return R(M(n),l,e,t)}function E(l,n,e,t){return R(function(l,n){for(var e,t,u,r=[],o=0;o<l.leng
/*!
diff v3.5.0
Software License Agreement (BSD License)
Copyright (c) 2009-2015, Kevin Decker <kpdecker@gmail.com>
All rights reserved.
Redistribution and use of this software in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above
copyright notice, this list of conditions and the
following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the
following disclaimer in the documentation and/or other
materials provided with the distribution.
* Neither the name of Kevin Decker nor the names of its
contributors may be used to endorse or promote products
derived from this software without specific prior
written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
@license
*/
var t,u;t=this,u=function(){return function(l){var n={};function e(t){if(n[t])return n[t].exports;var u=n[t]={exports:{},id:t,loaded:!1};return l[t].call(u.exports,u,u.exports,e),u.loaded=!0,u.exports}return e.m=l,e.c=n,e.p="",e(0)}([function(l,n,e){"use strict";n.__esModule=!0,n.canonicalize=n.convertChangesToXML=n.convertChangesToDMP=n.merge=n.parsePatch=n.applyPatches=n.applyPatch=n.createPatch=n.createTwoFilesPatch=n.structuredPatch=n.diffArrays=n.diffJson=n.diffCss=n.diffSentences=n.diffTrimmedLines=n.diffLines=n.diffWordsWithSpace=n.diffWords=n.diffChars=n.Diff=void 0;var t,u=e(1),r=(t=u)&&t.__esModule?t:{default:t},o=e(2),i=e(3),a=e(5),s=e(6),c=e(7),f=e(8),p=e(9),h=e(10),d=e(11),g=e(13),m=e(14),y=e(16),b=e(17);n.Diff=r.default,n.diffChars=o.diffChars,n.diffWords=i.diffWords,n.diffWordsWithSpace=i.diffWordsWithSpace,n.diffLines=a.diffLines,n.diffTrimmedLines=a.diffTrimmedLines,n.diffSentences=s.diffSentences,n.diffCss=c.diffCss,n.diffJson=f.diffJson,n.diffArrays=p.diffArrays,n.structuredPatch=m.structuredPatch,n.createTwoFilesPatch=m.createTwoFilesPatch,n.createPatch=m.createPatch,n.applyPatch=h.applyPatch,n.applyPatches=h.applyPatches,n.parsePatch=d.parsePatch,n.merge=g.merge,n.convertChangesToDMP=y.convertChangesToDMP,n.convertChangesToXML=b.convertChangesToXML,n.canonicalize=f.canonicalize},function(l,n){"use strict";function e(){}function t(l,n,e,t,u){for(var r=0,o=n.length,i=0,a=0;r<o;r++){var s=n[r];if(s.removed){if(s.value=l.join(t.slice(a,a+s.count)),a+=s.count,r&&n[r-1].added){var c=n[r-1];n[r-1]=n[r],n[r]=c}}else{if(!s.added&&u){var f=e.slice(i,i+s.count);f=f.map(function(l,n){var e=t[a+n];return e.length>l.length?e:l}),s.value=l.join(f)}else s.value=l.join(e.slice(i,i+s.count));i+=s.count,s.added||(a+=s.count)}}var p=n[o-1];return o>1&&"string"==typeof p.value&&(p.added||p.removed)&&l.equals("",p.value)&&(n[o-2].value+=p.value,n.pop()),n}n.__esModule=!0,n.default=e,e.prototype={diff:function(l,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=e.callback;"function"==typeof e&&(u=e,e={}),this.options=e;var r=this;function o(l){return u?(setTimeout(function(){u(void 0,l)},0),!0):l}l=this.castInput(l),n=this.castInput(n),l=this.removeEmpty(this.tokenize(l));var i=(n=this.removeEmpty(this.tokenize(n))).length,a=l.length,s=1,c=i+a,f=[{newPos:-1,components:[]}],p=this.extractCommon(f[0],n,l,0);if(f[0].newPos+1>=i&&p+1>=a)return o([{value:this.join(n),count:n.length}]);function h(){for(var e=-1*s;e<=s;e+=2){var u=void 0,c=f[e-1],p=f[e+1],h=(p?p.newPos:0)-e;c&&(f[e-1]=void 0);var d=c&&c.newPos+1<i,g=p&&0<=h&&h<a;if(d||g){if(!d||g&&c.newPos<p.newPos?(u={newPos:(m=p).newPos,components:m.components.slice(0)},r.pushComponent(u.components,void 0,!0)):((u=c).newPos++,r.pushComponent(u.components,!0,void 0)),h=r.extractCommon(u,n,l,e),u.newPos+1>=i&&h+1>=a)return o(t(r,u.components,n,l,r.useLongestToken));f[e]=u}else f[e]=void 0}var m;s++}if(u)!function l(){setTimeout(function(){if(s>c)return u();h()||l()},0)}();else for(;s<=c;){var d=h();if(d)return d}},pushComponent:function(l,n,e){var t=l[l.length-1];t&&t.added===n&&t.removed===e?l[l.length-1]={count:t.count+1,added:n,removed:e}:l.push({count:1,added:n,removed:e})},extractCommon:function(l,n,e,t){for(var u=n.length,r=e.length,o=l.newPos,i=o-t,a=0;o+1<u&&i+1<r&&this.equals(n[o+1],e[i+1]);)o++,i++,a++;return a&&l.components.push({count:a}),l.newPos=o,i},equals:function(l,n){return this.options.comparator?this.options.comparator(l,n):l===n||this.options.ignoreCase&&l.toLowerCase()===n.toLowerCase()},removeEmpty:function(l){for(var n=[],e=0;e<l.length;e++)l[e]&&n.push(l[e]);return n},castInput:function(l){return l},tokenize:function(l){return l.split("")},join:function(l){return l.join("")}}},function(l,n,e){"use strict";n.__esModule=!0,n.characterDiff=void 0,n.diffChars=function(l,n,e){return o.diff(l,n,e)};var t,u=e(1),r=(t=u)&&t.__esModule?t:{default:t};var o=n.characterDiff=new r.default},function(l,n,e){"use strict";n.__esModule=!0,n.wordDiff=void 0,n.diffWords=function(l,n,e){return e=(0,o.generateOptions)(e,{ignoreWhitespace:!0}),s.diff(l,n,e)}
/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
n.exports=function(l){return null!=l&&(t(l)||function(l){return"function"==typeof l.readFloatLE&&"function"==typeof l.slice&&t(l.slice(0,0))}(l)||!!l._isBuffer)}},{}],52:[function(l,n,e){var t={}.toString;n.exports=Array.isArray||function(l){return"[object Array]"==t.call(l)}},{}],53:[function(l,n,e){(function(e){var t=l("path"),u=l("fs"),r=parseInt("0777",8);function o(l,n,i,a){"function"==typeof n?(i=n,n={}):n&&"object"==typeof n||(n={mode:n});var s=n.mode,c=n.fs||u;void 0===s&&(s=r&~e.umask()),a||(a=null);var f=i||function(){};l=t.resolve(l),c.mkdir(l,s,function(e){if(!e)return f(null,a=a||l);switch(e.code){case"ENOENT":o(t.dirname(l),n,function(e,t){e?f(e,t):o(l,n,f,t)});break;default:c.stat(l,function(l,n){l||!n.isDirectory()?f(e,a):f(null,a)})}})}n.exports=o.mkdirp=o.mkdirP=o,o.sync=function l(n,o,i){o&&"object"==typeof o||(o={mode:o});var a=o.mode,s=o.fs||u;void 0===a&&(a=r&~e.umask()),i||(i=null),n=t.resolve(n);try{s.mkdirSync(n,a),i=i||n}catch(e){switch(e.code){case"ENOENT":i=l(t.dirname(n),o,i),l(n,o,i);break;default:var c;try{c=s.statSync(n)}catch(l){throw e}if(!c.isDirectory())throw e}}return i}}).call(this,l("_process"))},{_process:56,fs:40,path:40}],54:[function(l,n,e){var t=1e3,u=60*t,r=60*u,o=24*r,i=365.25*o;function a(l,n,e){if(!(l<n))return l<1.5*n?Math.floor(l/n)+" "+e:Math.ceil(l/n)+" "+e+"s"}n.exports=function(l,n){n=n||{};var e,s=typeof l;if("string"===s&&l.length>0)return function(l){if((l=String(l)).length>100)return;var n=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(l);if(!n)return;var e=parseFloat(n[1]);switch((n[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return e*i;case"days":case"day":case"d":return e*o;case"hours":case"hour":case"hrs":case"hr":case"h":return e*r;case"minutes":case"minute":case"mins":case"min":case"m":return e*u;case"seconds":case"second":case"secs":case"sec":case"s":return e*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return e;default:return}}(l);if("number"===s&&!1===isNaN(l))return n.long?a(e=l,o,"day")||a(e,r,"hour")||a(e,u,"minute")||a(e,t,"second")||e+" ms":function(l){if(l>=o)return Math.round(l/o)+"d";if(l>=r)return Math.round(l/r)+"h";if(l>=u)return Math.round(l/u)+"m";if(l>=t)return Math.round(l/t)+"s";return l+"ms"}(l);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(l))}},{}],55:[function(l,n,e){(function(l){"use strict";!l.version||0===l.version.indexOf("v0.")||0===l.version.indexOf("v1.")&&0!==l.version.indexOf("v1.8.")?n.exports={nextTick:function(n,e,t,u){if("function"!=typeof n)throw new TypeError('"callback" argument must be a function');var r,o,i=arguments.length;switch(i){case 0:case 1:return l.nextTick(n);case 2:return l.nextTick(function(){n.call(null,e)});case 3:return l.nextTick(function(){n.call(null,e,t)});case 4:return l.nextTick(function(){n.call(null,e,t,u)});default:for(r=new Array(i-1),o=0;o<r.length;)r[o++]=arguments[o];return l.nextTick(function(){n.apply(null,r)})}}}:n.exports=l}).call(this,l("_process"))},{_process:56}],56:[function(l,n,e){var t,u,r=n.exports={};function o(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function a(l){if(t===setTimeout)return setTimeout(l,0);if((t===o||!t)&&setTimeout)return t=setTimeout,setTimeout(l,0);try{return t(l,0)}catch(n){try{return t.call(null,l,0)}catch(n){return t.call(this,l,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:o}catch(l){t=o}try{u="function"==typeof clearTimeout?clearTimeout:i}catch(l){u=i}}();var s,c=[],f=!1,p=-1;function h(){f&&s&&(f=!1,s.length?c=s.concat(c):p=-1,c.length&&d())}function d(){if(!f){var l=a(h);f=!0;for(var n=c.length;n;){for(s=c,c=[];++p<n;)s&&s[p].run();p=-1,n=c.length}s=null,f=!1,function(l){if(u===clearTimeout)return clearTimeout(l);if((u===i||!u)&&clearTimeout)return u=clearTimeout,clearTimeout(l);try{u(l)}catch(n){try{return u.call(null,l)}catch(n){return u.call(this,l)}}}(l)}}function g(l,n){this.fun=l,
/*!
* chai
* Copyright(c) 2011 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
/*!
* Dependencies that are used for multiple exports are required here only once
*/
var t=e(58);
/*!
* test utility
*/n.test=e(59),
/*!
* type utility
*/
n.type=e(39),
/*!
* expectTypes utility
*/
n.expectTypes=e(60),
/*!
* message utility
*/
n.getMessage=e(61),
/*!
* actual utility
*/
n.getActual=e(44),
/*!
* Inspect util
*/
n.inspect=e(40),
/*!
* Object Display util
*/
n.objDisplay=e(45),
/*!
* Flag utility
*/
n.flag=e(3),
/*!
* Flag transferring utility
*/
n.transferFlags=e(7),
/*!
* Deep equal utility
*/
n.eql=e(63),
/*!
* Deep path info
*/
n.getPathInfo=t.getPathInfo,
/*!
* Check if a property exists
*/
n.hasProperty=t.hasProperty,
/*!
* Function name
*/
n.getName=e(46),
/*!
* add Property
*/
n.addProperty=e(64),
/*!
* add Method
*/
n.addMethod=e(65),
/*!
* overwrite Property
*/
n.overwriteProperty=e(66),
/*!
* overwrite Method
*/
n.overwriteMethod=e(67),
/*!
* Add a chainable method
*/
n.addChainableMethod=e(68),
/*!
* Overwrite chainable method
*/
n.overwriteChainableMethod=e(69),
/*!
* Compare by inspect method
*/
n.compareByInspect=e(70),
/*!
* Get own enumerable property symbols method
*/
n.getOwnEnumerablePropertySymbols=e(48),
/*!
* Get own enumerable properties method
*/
n.getOwnEnumerableProperties=e(71),
/*!
* Checks error against a given set of criteria
*/
n.checkError=e(72),
/*!
* Proxify util
*/
n.proxify=e(18),
/*!
* addLengthGuard util
*/
n.addLengthGuard=e(17),
/*!
* isProxyEnabled helper
*/
n.isProxyEnabled=e(16),
/*!
* isNaN method
*/
n.isNaN=e(73)},function(l,n,e){"use strict";function t(l,n){return null!=l&&n in Object(l)}function u(l){return l.replace(/([^\\])\[/g,"$1.[").match(/(\\\.|[^.]+?)+/g).map(function(l){var n=/^\[(\d+)\]$/.exec(l);return n?{i:parseFloat(n[1])}:{p:l.replace(/\\([.\[\]])/g,"$1")}})}function r(l,n,e){var t=l,u=null;e=void 0===e?n.length:e;for(var r=0;r<e;r++){var o=n[r];t&&(t=void 0===o.p?t[o.i]:t[o.p],r===e-1&&(u=t))}return u}function o(l,n){var e=u(n),o=e[e.length-1],i={parent:e.length>1?r(l,e,e.length-1):l,name:o.p||o.i,value:r(l,e)};return i.exists=t(i.parent,i.name),i}l.exports={hasProperty:t,getPathInfo:o,getPathValue:function(l,n){return o(l,n).value},setPathValue:function(l,n,e){return function(l,n,e){for(var t=l,u=e.length,r=null,o=0;o<u;o++){var i=null,a=null;if(r=e[o],o===u-1)t[i=void 0===r.p?r.i:r.p]=n;else if(void 0!==r.p&&t[r.p])t=t[r.p];else if(void 0!==r.i&&t[r.i])t=t[r.i];else{var s=e[o+1];i=void 0===r.p?r.i:r.p,a=void 0===s.p?[]:{},t[i]=a,t=t[i]}}}(l,e,u(n)),l}}},function(l,n,e){
/*!
* Chai - test utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
/*!
* Module dependencies
*/
var t=e(3);l.exports=function(l,n){var e=t(l,"negate"),u=n[0];return e?!u:u}},function(l,n,e){
/*!
* Chai - expectTypes utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
var t=e(43),u=e(3),r=e(39);l.exports=function(l,n){var e=u(l,"message"),o=u(l,"ssfi");e=e?e+": ":"",l=u(l,"object"),(n=n.map(function(l){return l.toLowerCase()})).sort();var i=n.map(function(l,e){var t=~["a","e","i","o","u"].indexOf(l.charAt(0))?"an":"a";return(n.length>1&&e===n.length-1?"or ":"")+t+" "+l}).join(", "),a=r(l).toLowerCase();if(!n.some(function(l){return a===l}))throw new t(e+"object tested must be "+i+", but "+a+" given",void 0,o)}},function(l,n,e){
/*!
* Chai - message composition utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
/*!
* Module dependencies
*/
var t=e(3),u=e(44),r=e(45);l.exports=function(l,n){var e=t(l,"negate"),o=t(l,"object"),i=n[3],a=u(l,n),s=e?n[2]:n[1],c=t(l,"message");return"function"==typeof s&&(s=s()),s=(s=s||"").replace(/#\{this\}/g,function(){return r(o)}).replace(/#\{act\}/g,function(){return r(a)}).replace(/#\{exp\}/g,function(){return r(i)}),c?c+": "+s:s}},function(l,n){
/*!
* Chai - getEnumerableProperties utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
l.exports=function(l){var n=[];for(var e in l)n.push(e);return n}},function(l,n,e){"use strict";
/*!
* deep-eql
* Copyright(c) 2013 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/var t=e(39);function u(){this._key="chai/deep-eql__"+Math.random()+Date.now()}u.prototype={get:function(l){return l[this._key]},set:function(l,n){Object.isExtensible(l)&&Object.defineProperty(l,this._key,{value:n,configurable:!0})}};var r="function"==typeof WeakMap?WeakMap:u;
/*!
* Check to see if the MemoizeMap has recorded a result of the two operands
*
* @param {Mixed} leftHandOperand
* @param {Mixed} rightHandOperand
* @param {MemoizeMap} memoizeMap
* @returns {Boolean|null} result
*/function o(l,n,e){if(!e||m(l)||m(n))return null;var t=e.get(l);if(t){var u=t.get(n);if("boolean"==typeof u)return u}return null}
/*!
* Set the result of the equality into the MemoizeMap
*
* @param {Mixed} leftHandOperand
* @param {Mixed} rightHandOperand
* @param {MemoizeMap} memoizeMap
* @param {Boolean} result
*/function i(l,n,e,t){if(e&&!m(l)&&!m(n)){var u=e.get(l);u?u.set(n,t):((u=new r).set(n,t),e.set(l,u))}}
/*!
* Primary Export
*/function a(l,n,e){if(e&&e.comparator)return c(l,n,e);var t=s(l,n);return null!==t?t:c(l,n,e)}function s(l,n){return l===n?0!==l||1/l==1/n:l!=l&&n!=n||!m(l)&&!m(n)&&null}
/*!
* The main logic of the `deepEqual` function.
*
* @param {Mixed} leftHandOperand
* @param {Mixed} rightHandOperand
* @param {Object} [options] (optional) Additional options
* @param {Array} [options.comparator] (optional) Override default algorithm, determining custom equality.
* @param {Array} [options.memoize] (optional) Provide a custom memoization object which will cache the results of
complex objects for a speed boost. By passing `false` you can disable memoization, but this will cause circular
references to blow the stack.
* @return {Boolean} equal match
*/function c(l,n,e){(e=e||{}).memoize=!1!==e.memoize&&(e.memoize||new r);var u=e&&e.comparator,c=o(l,n,e.memoize);if(null!==c)return c;var m=o(n,l,e.memoize);if(null!==m)return m;if(u){var y=u(l,n);if(!1===y||!0===y)return i(l,n,e.memoize,y),y;var b=s(l,n);if(null!==b)return b}var v=t(l);if(v!==t(n))return i(l,n,e.memoize,!1),!1;i(l,n,e.memoize,!0);var w=function(l,n,e,t){switch(e){case"String":case"Number":case"Boolean":case"Date":return a(l.valueOf(),n.valueOf());case"Promise":case"Symbol":case"function":case"WeakMap":case"WeakSet":case"Error":return l===n;case"Arguments":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"Array":return p(l,n,t);case"RegExp":
/*!
* Compare two Regular Expressions for equality.
*
* @param {RegExp} leftHandOperand
* @param {RegExp} rightHandOperand
* @return {Boolean} result
*/
return function(l,n){return l.toString()===n.toString()}
/*!
* Compare two Sets/Maps for equality. Faster than other equality functions.
*
* @param {Set} leftHandOperand
* @param {Set} rightHandOperand
* @param {Object} [options] (Optional)
* @return {Boolean} result
*/(l,n);case"Generator":
/*!
* Simple equality for generator objects such as those returned by generator functions.
*
* @param {Iterable} leftHandOperand
* @param {Iterable} rightHandOperand
* @param {Object} [options] (Optional)
* @return {Boolean} result
*/
return function(l,n,e){return p(d(l),d(n),e)}
/*!
* Determine if the given object has an @@iterator function.
*
* @param {Object} target
* @return {Boolean} `true` if the object has an @@iterator function.
*/(l,n,t);case"DataView":return p(new Uint8Array(l.buffer),new Uint8Array(n.buffer),t);case"ArrayBuffer":return p(new Uint8Array(l),new Uint8Array(n),t);case"Set":case"Map":return f(l,n,t);default:
/*!
* Recursively check the equality of two Objects. Once basic sameness has been established it will defer to `deepEqual`
* for each enumerable key in the object.
*
* @param {Mixed} leftHandOperand
* @param {Mixed} rightHandOperand
* @param {Object} [options] (Optional)
* @return {Boolean} result
*/
return function(l,n,e){var t=g(l),u=g(n);if(t.length&&t.length===u.length)return t.sort(),u.sort(),!1!==p(t,u)&&
/*!
* Determines if two objects have matching values, given a set of keys. Defers to deepEqual for the equality check of
* each key. If any value of the given key is not equal, the function will return false (early).
*
* @param {Mixed} leftHandOperand
* @param {Mixed} rightHandOperand
* @param {Array} keys An array of keys to compare the values of leftHandOperand and rightHandOperand against
* @param {Object} [options] (Optional)
* @return {Boolean} result
*/
function(l,n,e,t){var u=e.length;if(0===u)return!0;for(var r=0;r<u;r+=1)if(!1===a(l[e[r]],n[e[r]],t))return!1;return!0}(l,n,t,e);var r=h(l),o=h(n);if(r.length&&r.length===o.length)return r.sort(),o.sort(),p(r,o,e);if(0===t.length&&0===r.length&&0===u.length&&0===o.length)return!0;return!1}
/*!
* Returns true if the argument is a primitive.
*
* This intentionally returns true for all objects that can be compared by reference,
* including functions and symbols.
*
* @param {Mixed} value
* @return {Boolean} result
*/(l,n,t)}}(l,n,v,e);return i(l,n,e.memoize,w),w}function f(l,n,e){if(l.size!==n.size)return!1;if(0===l.size)return!0;var t=[],u=[];return l.forEach(function(l,n){t.push([l,n])}),n.forEach(function(l,n){u.push([l,n])}),p(t.sort(),u.sort(),e)}
/*!
* Simple equality for flat iterable objects such as Arrays, TypedArrays or Node.js buffers.
*
* @param {Iterable} leftHandOperand
* @param {Iterable} rightHandOperand
* @param {Object} [options] (Optional)
* @return {Boolean} result
*/function p(l,n,e){var t=l.length;if(t!==n.length)return!1;if(0===t)return!0;for(var u=-1;++u<t;)if(!1===a(l[u],n[u],e))return!1;return!0}
/*!
* Gets all iterator entries from the given Object. If the Object has no @@iterator function, returns an empty array.
* This will consume the iterator - which could have side effects depending on the @@iterator implementation.
*
* @param {Object} target
* @returns {Array} an array of entries from the @@iterator function
*/
function h(l){if(function(l){return"undefined"!=typeof Symbol&&"object"==typeof l&&void 0!==Symbol.iterator&&"function"==typeof l[Symbol.iterator]}(l))try{return d(l[Symbol.iterator]())}catch(l){return[]}return[]}
/*!
* Gets all entries from a Generator. This will consume the generator - which could have side effects.
*
* @param {Generator} target
* @returns {Array} an array of entries from the Generator.
*/function d(l){for(var n=l.next(),e=[n.value];!1===n.done;)n=l.next(),e.push(n.value);return e}
/*!
* Gets all own and inherited enumerable keys from a target.
*
* @param {Object} target
* @returns {Array} an array of own and inherited enumerable keys from the target.
*/function g(l){var n=[];for(var e in l)n.push(e);return n}function m(l){return null===l||"object"!=typeof l}l.exports=a,l.exports.MemoizeMap=r},function(l,n,e){
/*!
* Chai - addProperty utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
var t=e(6),u=e(3),r=e(16),o=e(7);l.exports=function(l,n,e){e=void 0===e?function(){}:e,Object.defineProperty(l,n,{get:function l(){r()||u(this,"lockSsfi")||u(this,"ssfi",l);var n=e.call(this);if(void 0!==n)return n;var i=new t.Assertion;return o(this,i),i},configurable:!0})}},function(l,n,e){
/*!
* Chai - addMethod utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
var t=e(17),u=e(6),r=e(3),o=e(18),i=e(7);l.exports=function(l,n,e){var a=function(){r(this,"lockSsfi")||r(this,"ssfi",a);var l=e.apply(this,arguments);if(void 0!==l)return l;var n=new u.Assertion;return i(this,n),n};t(a,n,!1),l[n]=o(a,n)}},function(l,n,e){
/*!
* Chai - overwriteProperty utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
var t=e(6),u=e(3),r=e(16),o=e(7);l.exports=function(l,n,e){var i=Object.getOwnPropertyDescriptor(l,n),a=function(){};i&&"function"==typeof i.get&&(a=i.get),Object.defineProperty(l,n,{get:function l(){r()||u(this,"lockSsfi")||u(this,"ssfi",l);var n=u(this,"lockSsfi");u(this,"lockSsfi",!0);var i=e(a).call(this);if(u(this,"lockSsfi",n),void 0!==i)return i;var s=new t.Assertion;return o(this,s),s},configurable:!0})}},function(l,n,e){
/*!
* Chai - overwriteMethod utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
var t=e(17),u=e(6),r=e(3),o=e(18),i=e(7);l.exports=function(l,n,e){var a=l[n],s=function(){throw new Error(n+" is not a function")};a&&"function"==typeof a&&(s=a);var c=function(){r(this,"lockSsfi")||r(this,"ssfi",c);var l=r(this,"lockSsfi");r(this,"lockSsfi",!0);var n=e(s).apply(this,arguments);if(r(this,"lockSsfi",l),void 0!==n)return n;var t=new u.Assertion;return i(this,t),t};t(c,n,!1),l[n]=o(c,n)}},function(l,n,e){
/*!
* Chai - addChainingMethod utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
/*!
* Module dependencies
*/
var t=e(17),u=e(6),r=e(3),o=e(18),i=e(7),a="function"==typeof Object.setPrototypeOf,s=function(){},c=Object.getOwnPropertyNames(s).filter(function(l){var n=Object.getOwnPropertyDescriptor(s,l);return"object"!=typeof n||!n.configurable}),f=Function.prototype.call,p=Function.prototype.apply;l.exports=function(l,n,e,s){"function"!=typeof s&&(s=function(){});var h={method:e,chainingBehavior:s};l.__methods||(l.__methods={}),l.__methods[n]=h,Object.defineProperty(l,n,{get:function(){h.chainingBehavior.call(this);var e=function(){r(this,"lockSsfi")||r(this,"ssfi",e);var l=h.method.apply(this,arguments);if(void 0!==l)return l;var n=new u.Assertion;return i(this,n),n};if(t(e,n,!0),a){var s=Object.create(this);s.call=f,s.apply=p,Object.setPrototypeOf(e,s)}else{Object.getOwnPropertyNames(l).forEach(function(n){if(-1===c.indexOf(n)){var t=Object.getOwnPropertyDescriptor(l,n);Object.defineProperty(e,n,t)}})}return i(this,e),o(e)},configurable:!0})}},function(l,n,e){
/*!
* Chai - overwriteChainableMethod utility
* Copyright(c) 2012-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
var t=e(6),u=e(7);l.exports=function(l,n,e,r){var o=l.__methods[n],i=o.chainingBehavior;o.chainingBehavior=function(){var l=r(i).call(this);if(void 0!==l)return l;var n=new t.Assertion;return u(this,n),n};var a=o.method;o.method=function(){var l=e(a).apply(this,arguments);if(void 0!==l)return l;var n=new t.Assertion;return u(this,n),n}}},function(l,n,e){
/*!
* Chai - compareByInspect utility
* Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
/*!
* Module dependencies
*/
var t=e(40);l.exports=function(l,n){return t(l)<t(n)?-1:1}},function(l,n,e){
/*!
* Chai - getOwnEnumerableProperties utility
* Copyright(c) 2011-2016 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
/*!
* Module dependencies
*/
var t=e(48);l.exports=function(l){return Object.keys(l).concat(t(l))}},function(l,n,e){"use strict";var t=/\s*function(?:\s|\s*\/\*[^(?:*\/)]+\*\/\s*)*([^\(\/]+)/;function u(l){var n="";if(void 0===l.name){var e=String(l).match(t);e&&(n=e[1])}else n=l.name;return n}l.exports={compatibleInstance:function(l,n){return n instanceof Error&&l===n},compatibleConstructor:function(l,n){return n instanceof Error?l.constructor===n.constructor||l instanceof n.constructor:(n.prototype instanceof Error||n===Error)&&(l.constructor===n||l instanceof n)},compatibleMessage:function(l,n){var e="string"==typeof l?l:l.message;return n instanceof RegExp?n.test(e):"string"==typeof n&&-1!==e.indexOf(n)},getMessage:function(l){var n="";return l&&l.message?n=l.message:"string"==typeof l&&(n=l),n},getConstructorName:function(l){var n=l;return l instanceof Error?n=u(l.constructor):"function"==typeof l&&(n=u(l).trim()||u(new l)),n}}},function(l,n){l.exports=Number.isNaN||
/*!
* Chai - isNaN utility
* Copyright(c) 2012-2015 Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
* MIT Licensed
*/
function(l){return l!=l}},function(l,n,e){
/*!
* chai
* http://chaijs.com
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
var t=e(8);l.exports=function(l,n){
/*!
* Module dependencies.
*/
var e=l.AssertionError,u=n.flag;
/*!
* Module export.
*/
/*!
* Assertion Constructor
*
* Creates object for chaining.
*
* `Assertion` objects contain metadata in the form of flags. Three flags can
* be assigned during instantiation by passing arguments to this constructor:
*
* - `object`: This flag contains the target of the assertion. For example, in
* the assertion `expect(numKittens).to.equal(7);`, the `object` flag will
* contain `numKittens` so that the `equal` assertion can reference it when
* needed.
*
* - `message`: This flag contains an optional custom error message to be
* prepended to the error message that's generated by the assertion when it
* fails.
*
* - `ssfi`: This flag stands for "start stack function indicator". It
* contains a function reference that serves as the starting point for
* removing frames from the stack trace of the error that's created by the
* assertion when it fails. The goal is to provide a cleaner stack trace to
* end users by removing Chai's internal functions. Note that it only works
* in environments that support `Error.captureStackTrace`, and only when
* `Chai.config.includeStack` hasn't been set to `false`.
*
* - `lockSsfi`: This flag controls whether or not the given `ssfi` flag
* should retain its current value, even as assertions are chained off of
* this object. This is usually set to `true` when creating a new assertion
* from within another assertion. It's also temporarily set to `true` before
* an overwritten assertion gets called by the overwriting assertion.
*
* @param {Mixed} obj target of the assertion
* @param {String} msg (optional) custom error message
* @param {Function} ssfi (optional) starting point for removing stack frames
* @param {Boolean} lockSsfi (optional) whether or not the ssfi flag is locked
* @api private
*/
function r(l,e,t,o){return u(this,"ssfi",t||r),u(this,"lockSsfi",o),u(this,"object",l),u(this,"message",e),n.proxify(this)}l.Assertion=r,Object.defineProperty(r,"includeStack",{get:function(){return console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),t.includeStack},set:function(l){console.warn("Assertion.includeStack is deprecated, use chai.config.includeStack instead."),t.includeStack=l}}),Object.defineProperty(r,"showDiff",{get:function(){return console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),t.showDiff},set:function(l){console.warn("Assertion.showDiff is deprecated, use chai.config.showDiff instead."),t.showDiff=l}}),r.addProperty=function(l,e){n.addProperty(this.prototype,l,e)},r.addMethod=function(l,e){n.addMethod(this.prototype,l,e)},r.addChainableMethod=function(l,e,t){n.addChainableMethod(this.prototype,l,e,t)},r.overwriteProperty=function(l,e){n.overwriteProperty(this.prototype,l,e)},r.overwriteMethod=function(l,e){n.overwriteMethod(this.prototype,l,e)},r.overwriteChainableMethod=function(l,e,t){n.overwriteChainableMethod(this.prototype,l,e,t)},r.prototype.assert=function(l,r,o,i,a,s){var c=n.test(this,arguments);if(!1!==s&&(s=!0),void 0===i&&void 0===a&&(s=!1),!0!==t.showDiff&&(s=!1),!c){r=n.getMessage(this,arguments);var f=n.getActual(this,arguments);throw new e(r,{actual:f,expected:i,showDiff:s},t.includeStack?this.assert:u(this,"ssfi"))}},
/*!
* ### ._obj
*
* Quick reference to stored `actual` value for plugin developers.
*
* @api private
*/
Object.defineProperty(r.prototype,"_obj",{get:function(){return u(this,"object")},set:function(l){u(this,"object",l)}})}},function(l,n){
/*!
* chai
* http://chaijs.com
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
l.exports=function(l,n){var e=l.Assertion,t=l.AssertionError,u=n.flag;function r(l,e){e&&u(this,"message",e),l=l.toLowerCase();var t=u(this,"object"),r=~["a","e","i","o","u"].indexOf(l.charAt(0))?"an ":"a ";this.assert(l===n.type(t).toLowerCase(),"expected #{this} to be "+r+l,"expected #{this} not to be "+r+l)}function o(l,e){return n.isNaN(l)&&n.isNaN(e)||l===e}function i(){u(this,"contains",!0)}function a(l,r){r&&u(this,"message",r);var i=u(this,"object"),a=n.type(i).toLowerCase(),s=u(this,"message"),c=u(this,"negate"),f=u(this,"ssfi"),p=u(this,"deep"),h=p?"deep ":"";s=s?s+": ":"";var d=!1;switch(a){case"string":d=-1!==i.indexOf(l);break;case"weakset":if(p)throw new t(s+"unable to use .deep.include with WeakSet",void 0,f);d=i.has(l);break;case"map":var g=p?n.eql:o;i.forEach(function(n){d=d||g(n,l)});break;case"set":p?i.forEach(function(e){d=d||n.eql(e,l)}):d=i.has(l);break;case"array":d=p?i.some(function(e){return n.eql(e,l)}):-1!==i.indexOf(l);break;default:if(l!==Object(l))throw new t(s+"object tested must be an array, a map, an object, a set, a string, or a weakset, but "+a+" given",void 0,f);var m=Object.keys(l),y=null,b=0;if(m.forEach(function(r){var o=new e(i);if(n.transferFlags(this,o,!0),u(o,"lockSsfi",!0),c&&1!==m.length)try{o.property(r,l[r])}catch(l){if(!n.checkError.compatibleConstructor(l,t))throw l;null===y&&(y=l),b++}else o.property(r,l[r])},this),c&&m.length>1&&b===m.length)throw y;return}this.assert(d,"expected #{this} to "+h+"include "+n.inspect(l),"expected #{this} to not "+h+"include "+n.inspect(l))}function s(){var l=u(this,"object"),e=n.type(l);this.assert("Arguments"===e,"expected #{this} to be arguments but got "+e,"expected #{this} to not be arguments")}function c(l,n){n&&u(this,"message",n);var e=u(this,"object");if(u(this,"deep")){var t=u(this,"lockSsfi");u(this,"lockSsfi",!0),this.eql(l),u(this,"lockSsfi",t)}else this.assert(l===e,"expected #{this} to equal #{exp}","expected #{this} to not equal #{exp}",l,this._obj,!0)}function f(l,e){e&&u(this,"message",e),this.assert(n.eql(l,u(this,"object")),"expected #{this} to deeply equal #{exp}","expected #{this} to not deeply equal #{exp}",l,this._obj,!0)}function p(l,r){r&&u(this,"message",r);var o,i=u(this,"object"),a=u(this,"doLength"),s=u(this,"message"),c=s?s+": ":"",f=u(this,"ssfi"),p=n.type(i).toLowerCase(),h=n.type(l).toLowerCase(),d=!0;if(a&&"map"!==p&&"set"!==p&&new e(i,s,f,!0).to.have.property("length"),a||"date"!==p||"date"===h)if("number"===h||!a&&"number"!==p)if(a||"date"===p||"number"===p)d=!1;else{o=c+"expected "+("string"===p?"'"+i+"'":i)+" to be a number or a date"}else o=c+"the argument to above must be a number";else o=c+"the argument to above must be a date";if(d)throw new t(o,void 0,f);if(a){var g,m="length";"map"===p||"set"===p?(m="size",g=i.size):g=i.length,this.assert(g>l,"expected #{this} to have a "+m+" above #{exp} but got #{act}","expected #{this} to not have a "+m+" above #{exp}",l,g)}else this.assert(i>l,"expected #{this} to be above #{exp}","expected #{this} to be at most #{exp}",l)}function h(l,r){r&&u(this,"message",r);var o,i=u(this,"object"),a=u(this,"doLength"),s=u(this,"message"),c=s?s+": ":"",f=u(this,"ssfi"),p=n.type(i).toLowerCase(),h=n.type(l).toLowerCase(),d=!0;if(a&&"map"!==p&&"set"!==p&&new e(i,s,f,!0).to.have.property("length"),a||"date"!==p||"date"===h)if("number"===h||!a&&"number"!==p)if(a||"date"===p||"number"===p)d=!1;else{o=c+"expected "+("string"===p?"'"+i+"'":i)+" to be a number or a date"}else o=c+"the argument to least must be a number";else o=c+"the argument to least must be a date";if(d)throw new t(o,void 0,f);if(a){var g,m="length";"map"===p||"set"===p?(m="size",g=i.size):g=i.length,this.assert(g>=l,"expected #{this} to have a "+m+" at least #{exp} but got #{act}","expected #{this} to have a "+m+" below #{exp}",l,g)}else this.assert(i>=l,"expected #{this} to be at least #{exp}","expected #{this} to be below #{exp}",l)}function d(l,r){r&&u(this,"message",r);var o,i=u(this,"object"),a=u(this,"doLength"),s=u(this,"message"),c=s?s+": ":"",f=u(this,"ssfi"),p=n.type(i).toLowerCase(),h=n.type(l).toL
/*!
* chai
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
l.exports=function(l,n){l.expect=function(n,e){return new l.Assertion(n,e)},l.expect.fail=function(n,e,t,u){throw arguments.length<2&&(t=n,n=void 0),t=t||"expect.fail()",new l.AssertionError(t,{actual:n,expected:e,operator:u},l.expect.fail)}}},function(l,n){
/*!
* chai
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
l.exports=function(l,n){var e=l.Assertion;function t(){Object.defineProperty(Object.prototype,"should",{set:function(l){Object.defineProperty(this,"should",{value:l,enumerable:!0,configurable:!0,writable:!0})},get:function l(){return this instanceof String||this instanceof Number||this instanceof Boolean||"function"==typeof Symbol&&this instanceof Symbol?new e(this.valueOf(),null,l):new e(this,null,l)},configurable:!0});var n={fail:function(e,t,u,r){throw arguments.length<2&&(u=e,e=void 0),u=u||"should.fail()",new l.AssertionError(u,{actual:e,expected:t,operator:r},n.fail)},equal:function(l,n,t){new e(l,t).to.equal(n)},Throw:function(l,n,t,u){new e(l,u).to.Throw(n,t)},exist:function(l,n){new e(l,n).to.exist},not:{}};return n.not.equal=function(l,n,t){new e(l,t).to.not.equal(n)},n.not.Throw=function(l,n,t,u){new e(l,u).to.not.Throw(n,t)},n.not.exist=function(l,n){new e(l,n).to.not.exist},n.throw=n.Throw,n.not.throw=n.not.Throw,n}l.should=t,l.Should=t}},function(l,n){
/*!
* chai
* Copyright(c) 2011-2014 Jake Luer <jake@alogicalparadox.com>
* MIT Licensed
*/
l.exports=function(l,n){
/*!
* Chai dependencies.
*/
var e=l.Assertion,t=n.flag,u=l.assert=function(n,t){new e(null,null,l.assert,!0).assert(n,t,"[ negation message unavailable ]")};
/*!
* Module export.
*/u.fail=function(n,e,t,r){throw arguments.length<2&&(t=n,n=void 0),t=t||"assert.fail()",new l.AssertionError(t,{actual:n,expected:e,operator:r},u.fail)},u.isOk=function(l,n){new e(l,n,u.isOk,!0).is.ok},u.isNotOk=function(l,n){new e(l,n,u.isNotOk,!0).is.not.ok},u.equal=function(l,n,r){var o=new e(l,r,u.equal,!0);o.assert(n==t(o,"object"),"expected #{this} to equal #{exp}","expected #{this} to not equal #{act}",n,l,!0)},u.notEqual=function(l,n,r){var o=new e(l,r,u.notEqual,!0);o.assert(n!=t(o,"object"),"expected #{this} to not equal #{exp}","expected #{this} to equal #{act}",n,l,!0)},u.strictEqual=function(l,n,t){new e(l,t,u.strictEqual,!0).to.equal(n)},u.notStrictEqual=function(l,n,t){new e(l,t,u.notStrictEqual,!0).to.not.equal(n)},u.deepEqual=u.deepStrictEqual=function(l,n,t){new e(l,t,u.deepEqual,!0).to.eql(n)},u.notDeepEqual=function(l,n,t){new e(l,t,u.notDeepEqual,!0).to.not.eql(n)},u.isAbove=function(l,n,t){new e(l,t,u.isAbove,!0).to.be.above(n)},u.isAtLeast=function(l,n,t){new e(l,t,u.isAtLeast,!0).to.be.least(n)},u.isBelow=function(l,n,t){new e(l,t,u.isBelow,!0).to.be.below(n)},u.isAtMost=function(l,n,t){new e(l,t,u.isAtMost,!0).to.be.most(n)},u.isTrue=function(l,n){new e(l,n,u.isTrue,!0).is.true},u.isNotTrue=function(l,n){new e(l,n,u.isNotTrue,!0).to.not.equal(!0)},u.isFalse=function(l,n){new e(l,n,u.isFalse,!0).is.false},u.isNotFalse=function(l,n){new e(l,n,u.isNotFalse,!0).to.not.equal(!1)},u.isNull=function(l,n){new e(l,n,u.isNull,!0).to.equal(null)},u.isNotNull=function(l,n){new e(l,n,u.isNotNull,!0).to.not.equal(null)},u.isNaN=function(l,n){new e(l,n,u.isNaN,!0).to.be.NaN},u.isNotNaN=function(l,n){new e(l,n,u.isNotNaN,!0).not.to.be.NaN},u.exists=function(l,n){new e(l,n,u.exists,!0).to.exist},u.notExists=function(l,n){new e(l,n,u.notExists,!0).to.not.exist},u.isUndefined=function(l,n){new e(l,n,u.isUndefined,!0).to.equal(void 0)},u.isDefined=function(l,n){new e(l,n,u.isDefined,!0).to.not.equal(void 0)},u.isFunction=function(l,n){new e(l,n,u.isFunction,!0).to.be.a("function")},u.isNotFunction=function(l,n){new e(l,n,u.isNotFunction,!0).to.not.be.a("function")},u.isObject=function(l,n){new e(l,n,u.isObject,!0).to.be.a("object")},u.isNotObject=function(l,n){new e(l,n,u.isNotObject,!0).to.not.be.a("object")},u.isArray=function(l,n){new e(l,n,u.isArray,!0).to.be.an("array")},u.isNotArray=function(l,n){new e(l,n,u.isNotArray,!0).to.not.be.an("array")},u.isString=function(l,n){new e(l,n,u.isString,!0).to.be.a("string")},u.isNotString=function(l,n){new e(l,n,u.isNotString,!0).to.not.be.a("string")},u.isNumber=function(l,n){new e(l,n,u.isNumber,!0).to.be.a("number")},u.isNotNumber=function(l,n){new e(l,n,u.isNotNumber,!0).to.not.be.a("number")},u.isFinite=function(l,n){new e(l,n,u.isFinite,!0).to.be.finite},u.isBoolean=function(l,n){new e(l,n,u.isBoolean,!0).to.be.a("boolean")},u.isNotBoolean=function(l,n){new e(l,n,u.isNotBoolean,!0).to.not.be.a("boolean")},u.typeOf=function(l,n,t){new e(l,t,u.typeOf,!0).to.be.a(n)},u.notTypeOf=function(l,n,t){new e(l,t,u.notTypeOf,!0).to.not.be.a(n)},u.instanceOf=function(l,n,t){new e(l,t,u.instanceOf,!0).to.be.instanceOf(n)},u.notInstanceOf=function(l,n,t){new e(l,t,u.notInstanceOf,!0).to.not.be.instanceOf(n)},u.include=function(l,n,t){new e(l,t,u.include,!0).include(n)},u.notInclude=function(l,n,t){new e(l,t,u.notInclude,!0).not.include(n)},u.deepInclude=function(l,n,t){new e(l,t,u.deepInclude,!0).deep.include(n)},u.notDeepInclude=function(l,n,t){new e(l,t,u.notDeepInclude,!0).not.deep.include(n)},u.nestedInclude=function(l,n,t){new e(l,t,u.nestedInclude,!0).nested.include(n)},u.notNestedInclude=function(l,n,t){new e(l,t,u.notNestedInclude,!0).not.nested.include(n)},u.deepNestedInclude=function(l,n,t){new e(l,t,u.deepNestedInclude,!0).deep.nested.include(n)},u.notDeepNestedInclude=function(l,n,t){new e(l,t,u.notDeepNestedInclude,!0).not.deep.nested.include(n)},u.ownInclude=function(l,n,t){new e(l,t,u.ownInclude,!0).own.include(n)},u.notOwnInclude=function(l,n,t){new e(l,t,u.notOwnInclude,!0).not.own.include(n)},u.deepOwnInclude=function(l,n,t){new e(l,t,u.deepOwnInclude,!0).de
/*!
* ### .ifError(object)
*
* Asserts if value is not a false value, and throws if it is a true value.
* This is added to allow for chai to be a drop-in replacement for Node's
* assert class.
*
* var err = new Error('I am a custom error');
* assert.ifError(err); // Rethrows err!
*
* @name ifError
* @param {Object} object
* @namespace Assert
* @api public
*/,u.ifError=function(l){if(l)throw l},u.isExtensible=function(l,n){new e(l,n,u.isExtensible,!0).to.be.extensible},u.isNotExtensible=function(l,n){new e(l,n,u.isNotExtensible,!0).to.not.be.extensible},u.isSealed=function(l,n){new e(l,n,u.isSealed,!0).to.be.sealed},u.isNotSealed=function(l,n){new e(l,n,u.isNotSealed,!0).to.not.be.sealed},u.isFrozen=function(l,n){new e(l,n,u.isFrozen,!0).to.be.frozen},u.isNotFrozen=function(l,n){new e(l,n,u.isNotFrozen,!0).to.not.be.frozen},u.isEmpty=function(l,n){new e(l,n,u.isEmpty,!0).to.be.empty},u.isNotEmpty=function(l,n){new e(l,n,u.isNotEmpty,!0).to.not.be.empty},
/*!
* Aliases.
*/
function l(n,e){return u[e]=u[n],l}("isOk","ok")("isNotOk","notOk")("throws","throw")("throws","Throw")("isExtensible","extensible")("isNotExtensible","notExtensible")("isSealed","sealed")("isNotSealed","notSealed")("isFrozen","frozen")("isNotFrozen","notFrozen")("isEmpty","empty")("isNotEmpty","notEmpty")}},function(module,exports,__webpack_require__){"use strict";var chai=__webpack_require__(2),peg=__webpack_require__(0),sinon=__webpack_require__(41),expect=chai.expect;describe("PEG.js API",function(){describe("generate",function(){it("generates a parser",function(){var l=peg.generate("start = 'a'");expect(l).to.be.an("object"),expect(l.parse("a")).to.equal("a")}),it("throws an exception on syntax error",function(){expect(function(){peg.generate("start = @")}).to.throw()}),it("throws an exception on semantic error",function(){expect(function(){peg.generate("start = undefined")}).to.throw()}),describe("allowed start rules",function(){var l="\n\n a = 'x'\n b = 'x'\n c = 'x'\n\n ";it("throws an error on missing rule",function(){expect(function(){peg.generate(l,{allowedStartRules:["missing"]})}).to.throw()}),describe("when optimizing for parsing speed",function(){describe("when |allowedStartRules| is not set",function(){it("generated parser can start only from the first rule",function(){var n=peg.generate(l,{optimize:"speed"});expect(n.parse("x",{startRule:"a"})).to.equal("x"),expect(function(){n.parse("x",{startRule:"b"})}).to.throw(),expect(function(){n.parse("x",{startRule:"c"})}).to.throw()})}),describe("when |allowedStartRules| is set",function(){it("generated parser can start only from specified rules",function(){var n=peg.generate(l,{optimize:"speed",allowedStartRules:["b","c"]});expect(function(){n.parse("x",{startRule:"a"})}).to.throw(),expect(n.parse("x",{startRule:"b"})).to.equal("x"),expect(n.parse("x",{startRule:"c"})).to.equal("x")})})}),describe("when optimizing for code size",function(){describe("when |allowedStartRules| is not set",function(){it("generated parser can start only from the first rule",function(){var n=peg.generate(l,{optimize:"size"});expect(n.parse("x",{startRule:"a"})).to.equal("x"),expect(function(){n.parse("x",{startRule:"b"})}).to.throw(),expect(function(){n.parse("x",{startRule:"c"})}).to.throw()})}),describe("when |allowedStartRules| is set",function(){it("generated parser can start only from specified rules",function(){var n=peg.generate(l,{optimize:"size",allowedStartRules:["b","c"]});expect(function(){n.parse("x",{startRule:"a"})}).to.throw(),expect(n.parse("x",{startRule:"b"})).to.equal("x"),expect(n.parse("x",{startRule:"c"})).to.equal("x")})})})}),describe("intermediate results caching",function(){var l="\n\n { var n = 0; }\n start = (a 'b') / (a 'c') { return n; }\n a = 'a' { n++; }\n\n ";describe("when |cache| is not set",function(){it("generated parser doesn't cache intermediate parse results",function(){var n=peg.generate(l);expect(n.parse("ac")).to.equal(2)})}),describe("when |cache| is set to |false|",function(){it("generated parser doesn't cache intermediate parse results",function(){var n=peg.generate(l,{cache:!1});expect(n.parse("ac")).to.equal(2)})}),describe("when |cache| is set to |true|",function(){it("generated parser caches intermediate parse results",function(){var n=peg.generate(l,{cache:!0});expect(n.parse("ac")).to.equal(1)})})}),describe("tracing",function(){describe("when |trace| is not set",function(){it("generated parser doesn't trace",function(){var l=peg.generate("start = 'a'"),n={trace:sinon.spy()};l.parse("a",{tracer:n}),expect(n.trace.called).to.equal(!1)})}),describe("when |trace| is set to |false|",function(){it("generated parser doesn't trace",function(){var l=peg.generate("start = 'a'",{trace:!1}),n={trace:sinon.spy()};l.parse("a",{tracer:n}),expect(n.trace.called).to.equal(!1)})}),describe("when |trace| is set to |true|",function(){it("generated parser traces",function(){var l=peg.generate("start = 'a'",{trace:!0}),n={trace:sinon.spy()}