Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

asty-astq

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asty-astq - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

6

bower.json
{
"name": "asty-astq",
"version": "1.0.5",
"version": "1.0.6",
"description": "ASTy integration to ASTq",

@@ -13,4 +13,4 @@ "main": "lib/asty-astq.browser.js",

"dependencies": {
"asty": "~1.0.3",
"astq": "~1.2.1"
"asty": "~1.0.5",
"astq": "~1.2.4"
},

@@ -17,0 +17,0 @@ "ignore": [

@@ -46,3 +46,3 @@ /*

options: {
transform: [ "6to5ify" ],
transform: [ "babelify" ],
plugin: [

@@ -66,3 +66,3 @@ [ "minifyify", { map: "asty-astq.browser.map", output: "lib/asty-astq.browser.map" } ],

options: {
transform: [ "6to5ify" ],
transform: [ "babelify" ],
plugin: [

@@ -69,0 +69,0 @@ [ "browserify-derequire" ],

@@ -28,3 +28,3 @@ /*

!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.ASTQ=e()}}(function(){return function e(t,r,n){function i(s,u){if(!r[s]){if(!t[s]){var o="function"==typeof _dereq_&&_dereq_;if(!u&&o)return o(s,!0);if(a)return a(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=r[s]={exports:{}};t[s][0].call(l.exports,function(e){var r=t[s][1][e];return i(r?r:e)},l,l.exports,e,t,r,n)}return r[s].exports}for(var a="function"==typeof _dereq_&&_dereq_,s=0;s<n.length;s++)i(n[s]);return i}({1:[function(e,t){"use strict";var r={taste:function(e){return"object"==typeof e&&"boolean"==typeof e.ASTy},getParentNode:function(e){return e.parent()},getChildNodes:function(e){return e.childs()},getNodeType:function(e){return e.type()},getNodeAttrNames:function(e){return e.attrs()},getNodeAttrValue:function(e,t){return e.get(t)}};t.exports=r},{}],2:[function(e,t){"use strict";var r={taste:function(e){return"object"==typeof e&&"string"==typeof e.type&&"object"==typeof e.loc},getParentNode:function(){throw new Error("Mozilla SpiderMonkey AST does not support parent node traversal")},getChildNodes:function(e){var t=this,r=[];for(var n in e)e.hasOwnProperty(n)&&this.taste(e[n])?r.push(e):e.hasOwnProperty(n)&&"object"==typeof e[n]&&e[n]instanceof Array&&e[n].forEach(function(e){t.taste(e)&&r.push(e)});return r},getNodeType:function(e){return e.type},getNodeAttrNames:function(e){var t=[];for(var r in e)e.hasOwnProperty(r)&&"object"!=typeof e[r]&&"type"!==r&&"loc"!==r&&t.push(r);return t},getNodeAttrValue:function(e,t){return e.hasOwnProperty(t)&&"object"!=typeof e[t]&&"type"!==t&&"loc"!==t?e[t]:void 0}};t.exports=r},{}],3:[function(e,t){"use strict";var r={taste:function(e){return"object"==typeof Node&&e instanceof Node&&"object"==typeof e&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},getParentNode:function(e){return e.parentNode},getChildNodes:function(e){return e.childNodes},getNodeType:function(e){return e.nodeName},getNodeAttrNames:function(e){return Array.prototype.slice.call(e.attributes,0).map(function(e){return e.nodeName})},getNodeAttrValue:function(e,t){return e.getAttribute(t)}};t.exports=r},{}],4:[function(e,t){"use strict";var r=function(e,t,r){t&&Object.defineProperties(e,t),r&&Object.defineProperties(e.prototype,r)},n=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},i=function(){function e(){return n(this,e),this._adapters=[],this}return r(e,null,{register:{value:function(e){return this._adapters.unshift(e),this},writable:!0,configurable:!0},unregister:{value:function(e){if(void 0===e)this._adapters=[];else{for(var t=[],r=0;r<this._adapters.length;r++)this._adapters[r]!==e&&t.push(this._adapters[r]);this._adapters=t}return this},writable:!0,configurable:!0},select:{value:function(e){for(var t=0;t<this._adapters.length;t++)if(this._adapters[t].taste(e))return this._adapters[t];return void 0},writable:!0,configurable:!0}}),e}();t.exports=i},{}],5:[function(e,t){"use strict";var r={type:function(e,t){return e.getNodeType(t)},depth:function(e,t){for(var r=1,n=t;null!==(n=e.getParentNode(n));)r++;return r},pos:function(e,t){var r=e.getParentNode(t);if(null===r)return 1;for(var n=e.getChildNodes(r),i=0;i<n.length;i++)if(n[i]===t)return i+1;throw new Error("cannot find myself")},nth:function(e,t,r){r=parseInt(r,10);var n=e.getParentNode(t);if(null!==n){var i=e.getChildNodes(n);0>r&&(r=i-(r+1));for(var a=0;a<i.length;a++)if(i[a]===t)return a+1===r;return!1}return 1===r?!0:!1},first:function(e,t){return r.nth(e,t,1)},last:function(e,t){return r.nth(e,t,-1)},count:function(e,t,r){return"object"==typeof r&&r instanceof Array?r.length:"object"==typeof r?Object.keys(r).length:"string"==typeof r?r.length:String(r).length},substr:function(e,t,r,n,i){return String(r).substr(n,i)},lc:function(e,t,r){return String(r).toLowerCase()},uc:function(e,t,r){return String(r).toUpperCase()}};t.exports=r},{}],6:[function(e,t){"use strict";var r=function(e,t,r){t&&Object.defineProperties(e,t),r&&Object.defineProperties(e.prototype,r)},n=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},i=function(){function e(){return n(this,e),this._funcs={},this}return r(e,null,{register:{value:function(e,t){this._funcs[e]=t},writable:!0,configurable:!0},run:{value:function(e,t){var r=this._funcs[e];if("function"!=typeof r)throw new Error('invalid function "'+e+'"');return r.apply(null,t)},writable:!0,configurable:!0}}),e}();t.exports=i},{}],7:[function(e,t){"use strict";var r=function(e){return e&&e.__esModule?e["default"]:e},n=function(e,t,r){t&&Object.defineProperties(e,t),r&&Object.defineProperties(e.prototype,r)},i=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(e.__proto__=t)},a=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},s=r(e("./astq-util.js")),u=r(e("./astq-query-trace.js")),o=function(e){function t(e,r,n,i){a(this,t),this.adapter=e,this.params=r,this.funcs=n,this.trace=i}return i(t,e),n(t,null,{execQuery:{value:function(e,t){var r=this;this.traceBegin(e,t);var n=[];return e.childs().forEach(function(e){n=n.concat(r.execPath(e,t))}),this.traceEnd(e,t,n),n},writable:!0,configurable:!0},execPath:{value:function(e,t){var r=this;this.traceBegin(e,t);var n=[t];return e.childs().forEach(function(e){var t=[];n.forEach(function(n){t=t.concat(r.execStep(e,n))}),n=t}),this.traceEnd(e,t,n),n},writable:!0,configurable:!0},execStep:{value:function(e,t){var r=this;this.traceBegin(e,t);var n=e.childs(),i=null,a=null,s=null,u=0;if(u<n.length&&"Axis"===n[u].type()&&(i=n[u++]),u<n.length&&"Match"===n[u].type()&&(a=n[u++]),u<n.length&&"Filter"===n[u].type()&&(s=n[u++]),null===a)throw new Error("no matching part in query step");var o=[],c=a.get("id"),l=function(e){var t=r.adapter.getNodeType(e);if("*"===c||c===t){var n=!0;null!==s&&(r.execFilter(s,e)||(n=!1)),n&&o.push(e)}};if(null!==i){var f=i.get("op");if("/"===f)this.adapter.getChildNodes(t).forEach(function(e){return l(e)});else if("//"===f)!function(){var e=function(t){l(t),r.adapter.getChildNodes(t).forEach(function(t){return e(t)})};r.adapter.getChildNodes(t).forEach(function(t){return e(t)})}();else if("-/"===f){var p=this.adapter.getParentNode(t);if(null!==p){for(var h=this.adapter.getChildNodes(p),d=null,v=0;v<h.length&&h[v]!==t;v++)d=h[v];l(d)}}else if("-//"===f){var g=this.adapter.getParentNode(t);if(null!==g)for(var h=this.adapter.getChildNodes(g),b=0;b<h.length&&h[b]!==t;b++)l(h[b])}else if("+/"===f){var x=this.adapter.getParentNode(t);if(null!==x){var h=this.adapter.getChildNodes(x),y=void 0;for(y=0;y<h.length&&h[y]!==t;y++);y<h.length&&(y++,l(h[y]))}}else if("+//"===f){var A=this.adapter.getParentNode(t);if(null!==A){var h=this.adapter.getChildNodes(A),m=void 0;for(m=0;m<h.length&&h[m]!==t;m++);if(m<h.length)for(m++;m<h.length;)l(h[m++])}}else if("../"===f){var w=this.adapter.getParentNode(t);null!==w&&l(w)}else if("..//"===f)for(var E=t;;){var P=this.adapter.getParentNode(E);if(null===P)break;l(P),E=P}}else l(t);return this.traceEnd(e,t,o),o},writable:!0,configurable:!0},execFilter:{value:function(e,t){this.traceBegin(e,t);var r=e.childs()[0],n=this.execExpr(r,t);return n=s.truthy(n),this.traceEnd(e,t,n),n},writable:!0,configurable:!0},execExpr:{value:function(e,t){switch(e.type()){case"ConditionalBinary":return this.execExprConditionalBinary(e,t);case"ConditionalTernary":return this.execExprConditionalTernary(e,t);case"Logical":return this.execExprLogical(e,t);case"Bitwise":return this.execExprBitwise(e,t);case"Relational":return this.execExprRelational(e,t);case"Arithmetical":return this.execExprArithmetical(e,t);case"Unary":return this.execExprUnary(e,t);case"FuncCall":return this.execExprFuncCall(e,t);case"Attribute":return this.execExprAttribute(e,t);case"Param":return this.execExprParam(e,t);case"LiteralString":return this.execExprLiteralString(e,t);case"LiteralRegExp":return this.execExprLiteralRegExp(e,t);case"LiteralNumber":return this.execExprLiteralNumber(e,t);case"LiteralValue":return this.execExprLiteralValue(e,t);case"Path":return this.execExprPath(e,t)}},writable:!0,configurable:!0},execExprConditionalBinary:{value:function(e,t){this.traceBegin(e,t);var r=this.execExpr(e.childs()[0],t);return s.truthy(r)||(r=this.execExpr(e.childs()[1],t)),this.traceEnd(e,t,r),r},writable:!0,configurable:!0},execExprConditionalTernary:{value:function(e,t){this.traceBegin(e,t);var r=this.execExpr(e.childs()[0],t);return r=s.truthy(r)?this.execExpr(e.childs()[1],t):this.execExpr(e.childs()[2],t),this.traceEnd(e,t,r),r},writable:!0,configurable:!0},execExprLogical:{value:function(e,t){this.traceBegin(e,t);var r=!1;switch(e.get("op")){case"&&":r=s.truthy(this.execExpr(e.childs()[0],t)),r&&(r=r&&s.truthy(this.execExpr(e.childs()[1],t)));break;case"||":r=s.truthy(this.execExpr(e.childs()[0],t)),r||(r=r||s.truthy(this.execExpr(e.childs()[1],t)))}return this.traceEnd(e,t,r),r},writable:!0,configurable:!0},execExprBitwise:{value:function(e,t){this.traceBegin(e,t);var r=s.coerce(this.execExpr(e.childs()[0],t),"number"),n=s.coerce(this.execExpr(e.childs()[1],t),"number"),i=void 0;switch(e.get("op")){case"&":i=r&n;break;case"|":i=r|n;break;case"<<":i=r<<n;break;case">>":i=r>>n}return this.traceEnd(e,t,i),i},writable:!0,configurable:!0},execExprRelational:{value:function(e,t){this.traceBegin(e,t);var r=this.execExpr(e.childs()[0],t),n=this.execExpr(e.childs()[1],t),i=void 0;switch(e.get("op")){case"==":i=r===n;break;case"!=":i=r!==n;break;case"<=":i=s.coerce(r,"number")<=s.coerce(n,"number");break;case">=":i=s.coerce(r,"number")>=s.coerce(n,"number");break;case"<":i=s.coerce(r,"number")<s.coerce(n,"number");break;case">":i=s.coerce(r,"number")>s.coerce(n,"number");break;case"=~":i=null!==s.coerce(r,"string").match(s.coerce(n,"regexp"));break;case"!~":i=null===s.coerce(r,"string").match(s.coerce(n,"regexp"))}return this.traceEnd(e,t,i),i},writable:!0,configurable:!0},execExprArithmetical:{value:function(e,t){this.traceBegin(e,t);var r=this.execExpr(e.childs()[0],t),n=this.execExpr(e.childs()[1],t),i=void 0;switch(e.get("op")){case"+":i="string"==typeof r?r+s.coerce(n,"string"):s.coerce(r,"number")+s.coerce(n,"number");break;case"-":i=s.coerce(r,"number")+s.coerce(n,"number");break;case"*":i=s.coerce(r,"number")*s.coerce(n,"number");break;case"/":i=s.coerce(r,"number")/s.coerce(n,"number");break;case"%":i=s.coerce(r,"number")%s.coerce(n,"number");break;case"**":i=Math.pow(s.coerce(r,"number"),s.coerce(n,"number"))}return this.traceEnd(e,t,i),i},writable:!0,configurable:!0},execExprUnary:{value:function(e,t){this.traceBegin(e,t);var r=this.execExpr(e.childs()[0],t),n=void 0;switch(e.get("op")){case"!":n=!s.coerce(r,"boolean");break;case"~":n=~s.coerce(r,"number")}return this.traceEnd(e,t,n),n},writable:!0,configurable:!0},execExprFuncCall:{value:function(e,t){var r=this;this.traceBegin(e,t);var n=e.get("id"),i=[this.adapter,t];e.childs().forEach(function(e){i.push(r.execExpr(e,t))});var a=this.funcs.run(n,i);return this.traceEnd(e,t,a),a},writable:!0,configurable:!0},execExprAttribute:{value:function(e,t){this.traceBegin(e,t);var r=e.get("id"),n=this.adapter.getNodeAttrValue(t,r);return this.traceEnd(e,t,n),n},writable:!0,configurable:!0},execExprParam:{value:function(e,t){this.traceBegin(e,t);var r=e.get("id");if("undefined"==typeof this.params[r])throw new Error('invalid parameter "'+r+'"');var n=this.params[r];return this.traceEnd(e,t,n),n},writable:!0,configurable:!0},execExprLiteralString:{value:function(e,t){this.traceBegin(e,t);var r=e.get("value");return this.traceEnd(e,t,r),r},writable:!0,configurable:!0},execExprLiteralRegExp:{value:function(e,t){this.traceBegin(e,t);var r=e.get("value");return this.traceEnd(e,t,r),r},writable:!0,configurable:!0},execExprLiteralNumber:{value:function(e,t){this.traceBegin(e,t);var r=e.get("value");return this.traceEnd(e,t,r),r},writable:!0,configurable:!0},execExprLiteralValue:{value:function(e,t){this.traceBegin(e,t);var r=e.get("value");return this.traceEnd(e,t,r),r},writable:!0,configurable:!0},execExprPath:{value:function(e,t){this.traceBegin(e,t);var r=this.execPath(e,t);return this.traceEnd(e,t,r),r},writable:!0,configurable:!0}}),t}(u);t.exports=o},{"./astq-query-trace.js":8,"./astq-util.js":10}],8:[function(e,t){"use strict";var r=function(e){return e&&e.__esModule?e["default"]:e},n=function(e,t,r){t&&Object.defineProperties(e,t),r&&Object.defineProperties(e.prototype,r)},i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},a=r(e("./astq-util.js")),s=function(){function e(){i(this,e)}return n(e,null,{prefixOf:{value:function(e,t){for(var r=0,n=e;null!==(n=n.parent());)r++;var i=a.pad("",4*r);for(r=0,n=t;null!==(n=this.adapter.getParentNode(n));)r++;var s=a.pad("",4*r);return{prefix1:i,prefix2:s}},writable:!0,configurable:!0},traceBegin:{value:function(e,t){if(this.trace){var r=this.prefixOf(e,t),n=r.prefix1,i=r.prefix2;console.log("ASTQ: execute: | "+a.pad(n+e.type()+" (",-60)+" | "+i+this.adapter.getNodeType(t))}},writable:!0,configurable:!0},traceEnd:{value:function(e,t,r){var n=this;if(this.trace){var i=this.prefixOf(e,t),s=i.prefix1,u=i.prefix2,o=void 0;void 0===r?o="undefined":"object"==typeof r&&r instanceof Array?(o="[",r.forEach(function(e){o+="node("+n.adapter.getNodeType(e)+"),"}),o=o.replace(/,$/,"")+"]"):o=typeof r+"("+r+")",o.length>60&&(o=o.substr(0,60)+"..."),console.log("ASTQ: execute: | "+a.pad(s+"): "+o,-60)+" | "+u+this.adapter.getNodeType(t))}},writable:!0,configurable:!0}}),e}();t.exports=s},{"./astq-util.js":10}],9:[function(e,t){"use strict";var r=function(e){return e&&e.__esModule?e["default"]:e},n=function(e,t,r){t&&Object.defineProperties(e,t),r&&Object.defineProperties(e.prototype,r)},i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},a=e("asty"),s=e("pegjs-util"),u=function(){function e(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}function t(e,t,r,n,i,a){this.message=e,this.expected=t,this.found=r,this.offset=n,this.line=i,this.column=a,this.name="SyntaxError"}function r(e){function r(){return ra}function n(){return s(ra).line}function i(){return s(ra).column}function a(e){throw o(e,null,ra)}function s(t){function r(t,r,n){var i,a;for(i=r;n>i;i++)a=e.charAt(i),"\n"===a?(t.seenCR||t.line++,t.column=1,t.seenCR=!1):"\r"===a||"\u2028"===a||"\u2029"===a?(t.line++,t.column=1,t.seenCR=!0):(t.column++,t.seenCR=!1)}return na!==t&&(na>t&&(na=0,ia={line:1,column:1,seenCR:!1}),r(ia,na,t),na=t),ia}function u(e){aa>ta||(ta>aa&&(aa=ta,sa=[]),sa.push(e))}function o(r,n,i){function a(e){var t=1;for(e.sort(function(e,t){return e.description<t.description?-1:e.description>t.description?1:0});t<e.length;)e[t-1]===e[t]?e.splice(t,1):t++}function u(e,t){function r(e){function t(e){return e.charCodeAt(0).toString(16).toUpperCase()}return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g,function(e){return"\\x0"+t(e)}).replace(/[\x10-\x1F\x80-\xFF]/g,function(e){return"\\x"+t(e)}).replace(/[\u0180-\u0FFF]/g,function(e){return"\\u0"+t(e)}).replace(/[\u1080-\uFFFF]/g,function(e){return"\\u"+t(e)})}var n,i,a,s=new Array(e.length);for(a=0;a<e.length;a++)s[a]=e[a].description;return n=e.length>1?s.slice(0,-1).join(", ")+" or "+s[e.length-1]:s[0],i=t?'"'+r(t)+'"':"end of input","Expected "+n+" but "+i+" found."}var o=s(i),c=i<e.length?e.charAt(i):null;return null!==n&&a(n),new t(null!==r?r:u(n,c),n,c,i,o.line,o.column)}function c(){var e,t,r,n,i,a=36*ta+0,s=oa[a];return s?(ta=s.nextPos,s.result):(e=ta,t=z(),t!==G?(r=l(),r!==G?(n=z(),n!==G?(i=Z(),i!==G?(ra=e,t=W(r),e=t):(ta=e,e=K)):(ta=e,e=K)):(ta=e,e=K)):(ta=e,e=K),oa[a]={nextPos:ta,result:e},e)}function l(){var t,r,n,i,a,s,o,c,l=36*ta+1,p=oa[l];if(p)return ta=p.nextPos,p.result;if(t=ta,r=f(),r!==G){for(n=[],i=ta,a=z(),a!==G?(44===e.charCodeAt(ta)?(s=X,ta++):(s=G,0===ua&&u(Y)),s!==G?(o=z(),o!==G?(c=f(),c!==G?(a=[a,s,o,c],i=a):(ta=i,i=K)):(ta=i,i=K)):(ta=i,i=K)):(ta=i,i=K);i!==G;)n.push(i),i=ta,a=z(),a!==G?(44===e.charCodeAt(ta)?(s=X,ta++):(s=G,0===ua&&u(Y)),s!==G?(o=z(),o!==G?(c=f(),c!==G?(a=[a,s,o,c],i=a):(ta=i,i=K)):(ta=i,i=K)):(ta=i,i=K)):(ta=i,i=K);n!==G?(ra=t,r=et(r,n),t=r):(ta=t,t=K)}else ta=t,t=K;return oa[l]={nextPos:ta,result:t},t}function f(){var e,t,r,n,i,a,s=36*ta+2,u=oa[s];if(u)return ta=u.nextPos,u.result;if(e=ta,t=p(),t!==G){for(r=[],n=ta,i=z(),i!==G?(a=h(),a!==G?(i=[i,a],n=i):(ta=n,n=K)):(ta=n,n=K);n!==G;)r.push(n),n=ta,i=z(),i!==G?(a=h(),a!==G?(i=[i,a],n=i):(ta=n,n=K)):(ta=n,n=K);r!==G?(ra=e,t=tt(t,r),e=t):(ta=e,e=K)}else ta=e,e=K;return oa[s]={nextPos:ta,result:e},e}function p(){var e,t,r,n,i,a,s=36*ta+3,u=oa[s];return u?(ta=u.nextPos,u.result):(e=ta,t=d(),t===G&&(t=rt),t!==G?(r=z(),r!==G?(n=v(),n!==G?(i=z(),i!==G?(a=g(),a===G&&(a=rt),a!==G?(ra=e,t=nt(t,n,a),e=t):(ta=e,e=K)):(ta=e,e=K)):(ta=e,e=K)):(ta=e,e=K)):(ta=e,e=K),oa[s]={nextPos:ta,result:e},e)}function h(){var e,t,r,n,i,a,s=36*ta+4,u=oa[s];return u?(ta=u.nextPos,u.result):(e=ta,t=d(),t!==G?(r=z(),r!==G?(n=v(),n!==G?(i=z(),i!==G?(a=g(),a===G&&(a=rt),a!==G?(ra=e,t=nt(t,n,a),e=t):(ta=e,e=K)):(ta=e,e=K)):(ta=e,e=K)):(ta=e,e=K)):(ta=e,e=K),oa[s]={nextPos:ta,result:e},e)}function d(){var t,r,n,i=36*ta+5,a=oa[i];return a?(ta=a.nextPos,a.result):(ua++,t=ta,r=ta,e.substr(ta,2)===at?(n=at,ta+=2):(n=G,0===ua&&u(st)),n===G&&(47===e.charCodeAt(ta)?(n=ut,ta++):(n=G,0===ua&&u(ot)),n===G&&(e.substr(ta,3)===ct?(n=ct,ta+=3):(n=G,0===ua&&u(lt)),n===G&&(e.substr(ta,2)===ft?(n=ft,ta+=2):(n=G,0===ua&&u(pt)),n===G&&(e.substr(ta,3)===ht?(n=ht,ta+=3):(n=G,0===ua&&u(dt)),n===G&&(e.substr(ta,2)===vt?(n=vt,ta+=2):(n=G,0===ua&&u(gt)),n===G&&(e.substr(ta,4)===bt?(n=bt,ta+=4):(n=G,0===ua&&u(xt)),n===G&&(e.substr(ta,3)===yt?(n=yt,ta+=3):(n=G,0===ua&&u(At))))))))),n!==G&&(n=e.substring(r,ta)),r=n,r!==G&&(ra=t,r=mt(r)),t=r,ua--,t===G&&(r=G,0===ua&&u(it)),oa[i]={nextPos:ta,result:t},t)}function v(){var t,r,n=36*ta+6,i=oa[n];return i?(ta=i.nextPos,i.result):(t=ta,r=O(),r!==G&&(ra=t,r=wt(r)),t=r,t===G&&(t=ta,42===e.charCodeAt(ta)?(r=Et,ta++):(r=G,0===ua&&u(Pt)),r!==G&&(ra=t,r=Ct()),t=r),oa[n]={nextPos:ta,result:t},t)}function g(){var t,r,n,i,a,s,o=36*ta+7,c=oa[o];return c?(ta=c.nextPos,c.result):(t=ta,91===e.charCodeAt(ta)?(r=Nt,ta++):(r=G,0===ua&&u(jt)),r!==G?(n=z(),n!==G?(i=b(),i!==G?(a=z(),a!==G?(93===e.charCodeAt(ta)?(s=_t,ta++):(s=G,0===ua&&u(Tt)),s!==G?(ra=t,r=qt(i),t=r):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K),oa[o]={nextPos:ta,result:t},t)}function b(){var t,r,n,i,a,s,o,c,l,f,p=36*ta+8,h=oa[p];return h?(ta=h.nextPos,h.result):(t=ta,r=x(),r!==G?(n=z(),n!==G?(e.substr(ta,2)===St?(i=St,ta+=2):(i=G,0===ua&&u(kt)),i!==G?(a=z(),a!==G?(s=x(),s!==G?(ra=t,r=Lt(r,s),t=r):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K),t===G&&(t=ta,r=x(),r!==G?(n=z(),n!==G?(63===e.charCodeAt(ta)?(i=Bt,ta++):(i=G,0===ua&&u(Ot)),i!==G?(a=z(),a!==G?(s=x(),s!==G?(o=z(),o!==G?(58===e.charCodeAt(ta)?(c=Ft,ta++):(c=G,0===ua&&u(Rt)),c!==G?(l=z(),l!==G?(f=x(),f!==G?(ra=t,r=Qt(r,s,f),t=r):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K),t===G&&(t=x())),oa[p]={nextPos:ta,result:t},t)}function x(){var t,r,n,i,a,s,o=36*ta+9,c=oa[o];return c?(ta=c.nextPos,c.result):(t=ta,r=y(),r!==G?(n=z(),n!==G?(i=ta,e.substr(ta,2)===Mt?(a=Mt,ta+=2):(a=G,0===ua&&u(Vt)),a!==G&&(a=e.substring(i,ta)),i=a,i!==G?(a=z(),a!==G?(s=x(),s!==G?(ra=t,r=zt(r,i,s),t=r):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K),t===G&&(t=y()),oa[o]={nextPos:ta,result:t},t)}function y(){var t,r,n,i,a,s,o=36*ta+10,c=oa[o];return c?(ta=c.nextPos,c.result):(t=ta,r=A(),r!==G?(n=z(),n!==G?(i=ta,e.substr(ta,2)===Ut?(a=Ut,ta+=2):(a=G,0===ua&&u(It)),a!==G&&(a=e.substring(i,ta)),i=a,i!==G?(a=z(),a!==G?(s=y(),s!==G?(ra=t,r=zt(r,i,s),t=r):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K),t===G&&(t=A()),oa[o]={nextPos:ta,result:t},t)}function A(){var t,r,n,i,a,s,o=36*ta+11,c=oa[o];return c?(ta=c.nextPos,c.result):(t=ta,r=m(),r!==G?(n=z(),n!==G?(i=ta,124===e.charCodeAt(ta)?(a=Zt,ta++):(a=G,0===ua&&u(Dt)),a!==G&&(a=e.substring(i,ta)),i=a,i!==G?(a=z(),a!==G?(s=A(),s!==G?(ra=t,r=$t(r,i,s),t=r):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K),t===G&&(t=m()),oa[o]={nextPos:ta,result:t},t)}function m(){var t,r,n,i,a,s,o=36*ta+12,c=oa[o];return c?(ta=c.nextPos,c.result):(t=ta,r=w(),r!==G?(n=z(),n!==G?(i=ta,94===e.charCodeAt(ta)?(a=Gt,ta++):(a=G,0===ua&&u(Ht)),a!==G&&(a=e.substring(i,ta)),i=a,i!==G?(a=z(),a!==G?(s=m(),s!==G?(ra=t,r=$t(r,i,s),t=r):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K),t===G&&(t=w()),oa[o]={nextPos:ta,result:t},t)}function w(){var t,r,n,i,a,s,o=36*ta+13,c=oa[o];return c?(ta=c.nextPos,c.result):(t=ta,r=E(),r!==G?(n=z(),n!==G?(i=ta,38===e.charCodeAt(ta)?(a=Jt,ta++):(a=G,0===ua&&u(Kt)),a!==G&&(a=e.substring(i,ta)),i=a,i!==G?(a=z(),a!==G?(s=w(),s!==G?(ra=t,r=$t(r,i,s),t=r):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K),t===G&&(t=E()),oa[o]={nextPos:ta,result:t},t)}function E(){var t,r,n,i,a,s,o=36*ta+14,c=oa[o];return c?(ta=c.nextPos,c.result):(t=ta,r=P(),r!==G?(n=z(),n!==G?(i=ta,e.substr(ta,2)===Wt?(a=Wt,ta+=2):(a=G,0===ua&&u(Xt)),a===G&&(e.substr(ta,2)===Yt?(a=Yt,ta+=2):(a=G,0===ua&&u(er)),a===G&&(e.substr(ta,2)===tr?(a=tr,ta+=2):(a=G,0===ua&&u(rr)),a===G&&(e.substr(ta,2)===nr?(a=nr,ta+=2):(a=G,0===ua&&u(ir)),a===G&&(60===e.charCodeAt(ta)?(a=ar,ta++):(a=G,0===ua&&u(sr)),a===G&&(62===e.charCodeAt(ta)?(a=ur,ta++):(a=G,0===ua&&u(or)),a===G&&(e.substr(ta,2)===cr?(a=cr,ta+=2):(a=G,0===ua&&u(lr)),a===G&&(e.substr(ta,2)===fr?(a=fr,ta+=2):(a=G,0===ua&&u(pr))))))))),a!==G&&(a=e.substring(i,ta)),i=a,i!==G?(a=z(),a!==G?(s=E(),s!==G?(ra=t,r=hr(r,i,s),t=r):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K),t===G&&(t=P()),oa[o]={nextPos:ta,result:t},t)}function P(){var t,r,n,i,a,s,o=36*ta+15,c=oa[o];return c?(ta=c.nextPos,c.result):(t=ta,r=C(),r!==G?(n=z(),n!==G?(i=ta,e.substr(ta,2)===dr?(a=dr,ta+=2):(a=G,0===ua&&u(vr)),a===G&&(e.substr(ta,2)===gr?(a=gr,ta+=2):(a=G,0===ua&&u(br))),a!==G&&(a=e.substring(i,ta)),i=a,i!==G?(a=z(),a!==G?(s=P(),s!==G?(ra=t,r=$t(r,i,s),t=r):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K),t===G&&(t=C()),oa[o]={nextPos:ta,result:t},t)}function C(){var t,r,n,i,a,s,o=36*ta+16,c=oa[o];return c?(ta=c.nextPos,c.result):(t=ta,r=N(),r!==G?(n=z(),n!==G?(i=ta,43===e.charCodeAt(ta)?(a=xr,ta++):(a=G,0===ua&&u(yr)),a===G&&(45===e.charCodeAt(ta)?(a=Ar,ta++):(a=G,0===ua&&u(mr))),a!==G&&(a=e.substring(i,ta)),i=a,i!==G?(a=z(),a!==G?(s=C(),s!==G?(ra=t,r=wr(r,i,s),t=r):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K),t===G&&(t=N()),oa[o]={nextPos:ta,result:t},t)}function N(){var t,r,n,i,a,s,o=36*ta+17,c=oa[o];return c?(ta=c.nextPos,c.result):(t=ta,r=j(),r!==G?(n=z(),n!==G?(i=ta,e.substr(ta,2)===Er?(a=Er,ta+=2):(a=G,0===ua&&u(Pr)),a===G&&(42===e.charCodeAt(ta)?(a=Et,ta++):(a=G,0===ua&&u(Pt)),a===G&&(47===e.charCodeAt(ta)?(a=ut,ta++):(a=G,0===ua&&u(ot)),a===G&&(37===e.charCodeAt(ta)?(a=Cr,ta++):(a=G,0===ua&&u(Nr))))),a!==G&&(a=e.substring(i,ta)),i=a,i!==G?(a=z(),a!==G?(s=N(),s!==G?(ra=t,r=wr(r,i,s),t=r):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K),t===G&&(t=j()),oa[o]={nextPos:ta,result:t},t)}function j(){var t,r,n,i=36*ta+18,a=oa[i];return a?(ta=a.nextPos,a.result):(t=ta,r=ta,33===e.charCodeAt(ta)?(n=jr,ta++):(n=G,0===ua&&u(_r)),n===G&&(126===e.charCodeAt(ta)?(n=Tr,ta++):(n=G,0===ua&&u(qr))),n!==G&&(n=e.substring(r,ta)),r=n,r!==G?(n=_(),n!==G?(ra=t,r=Sr(r,n),t=r):(ta=t,t=K)):(ta=t,t=K),t===G&&(t=_()),oa[i]={nextPos:ta,result:t},t)}function _(){var e,t=36*ta+19,r=oa[t];return r?(ta=r.nextPos,r.result):(e=T(),e===G&&(e=S(),e===G&&(e=k(),e===G&&(e=L(),e===G&&(e=B(),e===G&&(e=f()))))),oa[t]={nextPos:ta,result:e},e)}function T(){var t,r,n,i,a,s,o,c,l=36*ta+20,f=oa[l];return f?(ta=f.nextPos,f.result):(t=ta,r=O(),r!==G?(n=z(),n!==G?(40===e.charCodeAt(ta)?(i=kr,ta++):(i=G,0===ua&&u(Lr)),i!==G?(a=z(),a!==G?(s=q(),s===G&&(s=rt),s!==G?(o=z(),o!==G?(41===e.charCodeAt(ta)?(c=Br,ta++):(c=G,0===ua&&u(Or)),c!==G?(ra=t,r=Fr(r,s),t=r):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K),oa[l]={nextPos:ta,result:t},t)}function q(){var t,r,n,i,a,s,o,c,l=36*ta+21,f=oa[l];if(f)return ta=f.nextPos,f.result;if(t=ta,r=b(),r!==G){for(n=[],i=ta,a=z(),a!==G?(44===e.charCodeAt(ta)?(s=X,ta++):(s=G,0===ua&&u(Y)),s!==G?(o=z(),o!==G?(c=b(),c!==G?(a=[a,s,o,c],i=a):(ta=i,i=K)):(ta=i,i=K)):(ta=i,i=K)):(ta=i,i=K);i!==G;)n.push(i),i=ta,a=z(),a!==G?(44===e.charCodeAt(ta)?(s=X,ta++):(s=G,0===ua&&u(Y)),s!==G?(o=z(),o!==G?(c=b(),c!==G?(a=[a,s,o,c],i=a):(ta=i,i=K)):(ta=i,i=K)):(ta=i,i=K)):(ta=i,i=K);n!==G?(ra=t,r=Rr(r,n),t=r):(ta=t,t=K)}else ta=t,t=K;return oa[l]={nextPos:ta,result:t},t}function S(){var t,r,n,i=36*ta+22,a=oa[i];return a?(ta=a.nextPos,a.result):(ua++,t=ta,64===e.charCodeAt(ta)?(r=Mr,ta++):(r=G,0===ua&&u(Vr)),r!==G?(n=O(),n!==G?(ra=t,r=zr(n),t=r):(ta=t,t=K)):(ta=t,t=K),ua--,t===G&&(r=G,0===ua&&u(Qr)),oa[i]={nextPos:ta,result:t},t)}function k(){var t,r,n,i,a,s,o=36*ta+23,c=oa[o];return c?(ta=c.nextPos,c.result):(ua++,t=ta,123===e.charCodeAt(ta)?(r=Ir,ta++):(r=G,0===ua&&u(Zr)),r!==G?(n=z(),n!==G?(i=O(),i!==G?(a=z(),a!==G?(125===e.charCodeAt(ta)?(s=Dr,ta++):(s=G,0===ua&&u($r)),s!==G?(ra=t,r=Gr(i),t=r):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K),ua--,t===G&&(r=G,0===ua&&u(Ur)),oa[o]={nextPos:ta,result:t},t)}function L(){var e,t=36*ta+24,r=oa[t];return r?(ta=r.nextPos,r.result):(e=F(),e===G&&(e=Q(),e===G&&(e=M(),e===G&&(e=V()))),oa[t]={nextPos:ta,result:e},e)}function B(){var t,r,n,i,a,s,o=36*ta+25,c=oa[o];return c?(ta=c.nextPos,c.result):(t=ta,40===e.charCodeAt(ta)?(r=kr,ta++):(r=G,0===ua&&u(Lr)),r!==G?(n=z(),n!==G?(i=b(),i!==G?(a=z(),a!==G?(41===e.charCodeAt(ta)?(s=Br,ta++):(s=G,0===ua&&u(Or)),s!==G?(ra=t,r=Hr(i),t=r):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K)):(ta=t,t=K),oa[o]={nextPos:ta,result:t},t)}function O(){var t,r,n,i,a,s,o,c=36*ta+26,l=oa[c];if(l)return ta=l.nextPos,l.result;if(ua++,t=ta,r=ta,n=ta,i=ta,ua++,a=V(),ua--,a===G?i=Kr:(ta=i,i=K),i!==G)if(Wr.test(e.charAt(ta))?(a=e.charAt(ta),ta++):(a=G,0===ua&&u(Xr)),a!==G){for(s=[],Yr.test(e.charAt(ta))?(o=e.charAt(ta),ta++):(o=G,0===ua&&u(en));o!==G;)s.push(o),Yr.test(e.charAt(ta))?(o=e.charAt(ta),ta++):(o=G,0===ua&&u(en));s!==G?(i=[i,a,s],n=i):(ta=n,n=K)}else ta=n,n=K;else ta=n,n=K;return n!==G&&(n=e.substring(r,ta)),r=n,r!==G&&(ra=t,r=tn(r)),t=r,ua--,t===G&&(r=G,0===ua&&u(Jr)),oa[c]={nextPos:ta,result:t},t}function F(){var t,r,n,i,a,s=36*ta+27,o=oa[s];if(o)return ta=o.nextPos,o.result;if(ua++,t=ta,34===e.charCodeAt(ta)?(r=nn,ta++):(r=G,0===ua&&u(an)),r!==G){for(n=[],i=R(),i===G&&(sn.test(e.charAt(ta))?(i=e.charAt(ta),ta++):(i=G,0===ua&&u(un)));i!==G;)n.push(i),i=R(),i===G&&(sn.test(e.charAt(ta))?(i=e.charAt(ta),ta++):(i=G,0===ua&&u(un)));n!==G?(34===e.charCodeAt(ta)?(i=nn,ta++):(i=G,0===ua&&u(an)),i!==G?(ra=t,r=on(n),t=r):(ta=t,t=K)):(ta=t,t=K)}else ta=t,t=K;if(t===G)if(t=ta,39===e.charCodeAt(ta)?(r=cn,ta++):(r=G,0===ua&&u(ln)),r!==G){for(n=ta,i=[],e.substr(ta,2)===fn?(a=fn,ta+=2):(a=G,0===ua&&u(pn)),a===G&&(hn.test(e.charAt(ta))?(a=e.charAt(ta),ta++):(a=G,0===ua&&u(dn)));a!==G;)i.push(a),e.substr(ta,2)===fn?(a=fn,ta+=2):(a=G,0===ua&&u(pn)),a===G&&(hn.test(e.charAt(ta))?(a=e.charAt(ta),ta++):(a=G,0===ua&&u(dn)));i!==G&&(i=e.substring(n,ta)),n=i,n!==G?(39===e.charCodeAt(ta)?(i=cn,ta++):(i=G,0===ua&&u(ln)),i!==G?(ra=t,r=vn(n),t=r):(ta=t,t=K)):(ta=t,t=K)}else ta=t,t=K;return ua--,t===G&&(r=G,0===ua&&u(rn)),oa[s]={nextPos:ta,result:t},t}function R(){var t,r,n,i,a,s,o,c,l=36*ta+28,f=oa[l];return f?(ta=f.nextPos,f.result):(ua++,t=ta,e.substr(ta,2)===bn?(r=bn,ta+=2):(r=G,0===ua&&u(xn)),r!==G&&(ra=t,r=yn()),t=r,t===G&&(t=ta,e.substr(ta,2)===An?(r=An,ta+=2):(r=G,0===ua&&u(mn)),r!==G&&(ra=t,r=wn()),t=r,t===G&&(t=ta,39===e.charCodeAt(ta)?(r=cn,ta++):(r=G,0===ua&&u(ln)),r!==G&&(ra=t,r=En()),t=r,t===G&&(t=ta,e.substr(ta,2)===Pn?(r=Pn,ta+=2):(r=G,0===ua&&u(Cn)),r!==G&&(ra=t,r=Nn()),t=r,t===G&&(t=ta,e.substr(ta,2)===jn?(r=jn,ta+=2):(r=G,0===ua&&u(_n)),r!==G&&(ra=t,r=Tn()),t=r,t===G&&(t=ta,e.substr(ta,2)===qn?(r=qn,ta+=2):(r=G,0===ua&&u(Sn)),r!==G&&(ra=t,r=kn()),t=r,t===G&&(t=ta,e.substr(ta,2)===Ln?(r=Ln,ta+=2):(r=G,0===ua&&u(Bn)),r!==G&&(ra=t,r=On()),t=r,t===G&&(t=ta,e.substr(ta,2)===Fn?(r=Fn,ta+=2):(r=G,0===ua&&u(Rn)),r!==G&&(ra=t,r=Qn()),t=r,t===G&&(t=ta,e.substr(ta,2)===Mn?(r=Mn,ta+=2):(r=G,0===ua&&u(Vn)),r!==G&&(ra=t,r=zn()),t=r,t===G&&(t=ta,e.substr(ta,2)===Un?(r=Un,ta+=2):(r=G,0===ua&&u(In)),r!==G&&(ra=t,r=Zn()),t=r,t===G&&(t=ta,e.substr(ta,2)===Dn?(r=Dn,ta+=2):(r=G,0===ua&&u($n)),r!==G?(n=ta,i=ta,Gn.test(e.charAt(ta))?(a=e.charAt(ta),ta++):(a=G,0===ua&&u(Hn)),a!==G?(Gn.test(e.charAt(ta))?(s=e.charAt(ta),ta++):(s=G,0===ua&&u(Hn)),s!==G?(a=[a,s],i=a):(ta=i,i=K)):(ta=i,i=K),i!==G&&(i=e.substring(n,ta)),n=i,n!==G?(ra=t,r=Jn(n),t=r):(ta=t,t=K)):(ta=t,t=K),t===G&&(t=ta,e.substr(ta,2)===Kn?(r=Kn,ta+=2):(r=G,0===ua&&u(Wn)),r!==G?(n=ta,i=ta,Gn.test(e.charAt(ta))?(a=e.charAt(ta),ta++):(a=G,0===ua&&u(Hn)),a!==G?(Gn.test(e.charAt(ta))?(s=e.charAt(ta),ta++):(s=G,0===ua&&u(Hn)),s!==G?(Gn.test(e.charAt(ta))?(o=e.charAt(ta),ta++):(o=G,0===ua&&u(Hn)),o!==G?(Gn.test(e.charAt(ta))?(c=e.charAt(ta),ta++):(c=G,0===ua&&u(Hn)),c!==G?(a=[a,s,o,c],i=a):(ta=i,i=K)):(ta=i,i=K)):(ta=i,i=K)):(ta=i,i=K),i!==G&&(i=e.substring(n,ta)),n=i,n!==G?(ra=t,r=Jn(n),t=r):(ta=t,t=K)):(ta=t,t=K)))))))))))),ua--,t===G&&(r=G,0===ua&&u(gn)),oa[l]={nextPos:ta,result:t},t)}function Q(){var t,r,n,i,a,s=36*ta+29,o=oa[s];if(o)return ta=o.nextPos,o.result;if(ua++,t=ta,47===e.charCodeAt(ta)?(r=ut,ta++):(r=G,0===ua&&u(ot)),r!==G){for(n=ta,i=[],e.substr(ta,2)===Yn?(a=Yn,ta+=2):(a=G,0===ua&&u(ei)),a===G&&(ti.test(e.charAt(ta))?(a=e.charAt(ta),ta++):(a=G,0===ua&&u(ri)));a!==G;)i.push(a),e.substr(ta,2)===Yn?(a=Yn,ta+=2):(a=G,0===ua&&u(ei)),a===G&&(ti.test(e.charAt(ta))?(a=e.charAt(ta),ta++):(a=G,0===ua&&u(ri)));i!==G&&(i=e.substring(n,ta)),n=i,n!==G?(47===e.charCodeAt(ta)?(i=ut,ta++):(i=G,0===ua&&u(ot)),i!==G?(ra=t,r=ni(n),t=r):(ta=t,t=K)):(ta=t,t=K)}else ta=t,t=K;return ua--,t===G&&(r=G,0===ua&&u(Xn)),oa[s]={nextPos:ta,result:t},t}function M(){var t,r,n,i,a,s,o,c,l,f,p,h,d=36*ta+30,v=oa[d];if(v)return ta=v.nextPos,v.result;if(ua++,t=ta,r=ta,ai.test(e.charAt(ta))?(n=e.charAt(ta),ta++):(n=G,0===ua&&u(si)),n===G&&(n=rt),n!==G&&(n=e.substring(r,ta)),r=n,r!==G)if(e.substr(ta,2)===ui?(n=ui,ta+=2):(n=G,0===ua&&u(oi)),n!==G){if(i=ta,a=[],ci.test(e.charAt(ta))?(s=e.charAt(ta),ta++):(s=G,0===ua&&u(li)),s!==G)for(;s!==G;)a.push(s),ci.test(e.charAt(ta))?(s=e.charAt(ta),ta++):(s=G,0===ua&&u(li));else a=K;a!==G&&(a=e.substring(i,ta)),i=a,i!==G?(ra=t,r=fi(r,i),t=r):(ta=t,t=K)}else ta=t,t=K;else ta=t,t=K;if(t===G){if(t=ta,r=ta,ai.test(e.charAt(ta))?(n=e.charAt(ta),ta++):(n=G,0===ua&&u(si)),n===G&&(n=rt),n!==G&&(n=e.substring(r,ta)),r=n,r!==G)if(e.substr(ta,2)===pi?(n=pi,ta+=2):(n=G,0===ua&&u(hi)),n!==G){if(i=ta,a=[],di.test(e.charAt(ta))?(s=e.charAt(ta),ta++):(s=G,0===ua&&u(vi)),s!==G)for(;s!==G;)a.push(s),di.test(e.charAt(ta))?(s=e.charAt(ta),ta++):(s=G,0===ua&&u(vi));else a=K;a!==G&&(a=e.substring(i,ta)),i=a,i!==G?(ra=t,r=gi(r,i),t=r):(ta=t,t=K)}else ta=t,t=K;else ta=t,t=K;if(t===G){if(t=ta,r=ta,ai.test(e.charAt(ta))?(n=e.charAt(ta),ta++):(n=G,0===ua&&u(si)),n===G&&(n=rt),n!==G&&(n=e.substring(r,ta)),r=n,r!==G)if(e.substr(ta,2)===bi?(n=bi,ta+=2):(n=G,0===ua&&u(xi)),n!==G){if(i=ta,a=[],Gn.test(e.charAt(ta))?(s=e.charAt(ta),ta++):(s=G,0===ua&&u(Hn)),s!==G)for(;s!==G;)a.push(s),Gn.test(e.charAt(ta))?(s=e.charAt(ta),ta++):(s=G,0===ua&&u(Hn));
else a=K;a!==G&&(a=e.substring(i,ta)),i=a,i!==G?(ra=t,r=yi(r,i),t=r):(ta=t,t=K)}else ta=t,t=K;else ta=t,t=K;if(t===G){if(t=ta,r=ta,n=ta,ai.test(e.charAt(ta))?(i=e.charAt(ta),ta++):(i=G,0===ua&&u(si)),i===G&&(i=rt),i!==G){for(a=[],Ai.test(e.charAt(ta))?(s=e.charAt(ta),ta++):(s=G,0===ua&&u(mi));s!==G;)a.push(s),Ai.test(e.charAt(ta))?(s=e.charAt(ta),ta++):(s=G,0===ua&&u(mi));if(a!==G)if(46===e.charCodeAt(ta)?(s=wi,ta++):(s=G,0===ua&&u(Ei)),s!==G){if(o=[],Ai.test(e.charAt(ta))?(c=e.charAt(ta),ta++):(c=G,0===ua&&u(mi)),c!==G)for(;c!==G;)o.push(c),Ai.test(e.charAt(ta))?(c=e.charAt(ta),ta++):(c=G,0===ua&&u(mi));else o=K;if(o!==G){if(c=ta,Pi.test(e.charAt(ta))?(l=e.charAt(ta),ta++):(l=G,0===ua&&u(Ci)),l!==G)if(ai.test(e.charAt(ta))?(f=e.charAt(ta),ta++):(f=G,0===ua&&u(si)),f===G&&(f=rt),f!==G){if(p=[],Ai.test(e.charAt(ta))?(h=e.charAt(ta),ta++):(h=G,0===ua&&u(mi)),h!==G)for(;h!==G;)p.push(h),Ai.test(e.charAt(ta))?(h=e.charAt(ta),ta++):(h=G,0===ua&&u(mi));else p=K;p!==G?(l=[l,f,p],c=l):(ta=c,c=K)}else ta=c,c=K;else ta=c,c=K;c===G&&(c=rt),c!==G?(i=[i,a,s,o,c],n=i):(ta=n,n=K)}else ta=n,n=K}else ta=n,n=K;else ta=n,n=K}else ta=n,n=K;if(n!==G&&(n=e.substring(r,ta)),r=n,r!==G&&(ra=t,r=Ni(r)),t=r,t===G){if(t=ta,r=ta,n=ta,ai.test(e.charAt(ta))?(i=e.charAt(ta),ta++):(i=G,0===ua&&u(si)),i===G&&(i=rt),i!==G){if(a=[],Ai.test(e.charAt(ta))?(s=e.charAt(ta),ta++):(s=G,0===ua&&u(mi)),s!==G)for(;s!==G;)a.push(s),Ai.test(e.charAt(ta))?(s=e.charAt(ta),ta++):(s=G,0===ua&&u(mi));else a=K;a!==G?(i=[i,a],n=i):(ta=n,n=K)}else ta=n,n=K;n!==G&&(n=e.substring(r,ta)),r=n,r!==G&&(ra=t,r=ji(r)),t=r}}}}return ua--,t===G&&(r=G,0===ua&&u(ii)),oa[d]={nextPos:ta,result:t},t}function V(){var t,r,n=36*ta+31,i=oa[n];return i?(ta=i.nextPos,i.result):(ua++,t=ta,e.substr(ta,4)===Ti?(r=Ti,ta+=4):(r=G,0===ua&&u(qi)),r!==G&&(ra=t,r=Si()),t=r,t===G&&(t=ta,e.substr(ta,5)===ki?(r=ki,ta+=5):(r=G,0===ua&&u(Li)),r!==G&&(ra=t,r=Bi()),t=r,t===G&&(t=ta,e.substr(ta,4)===Oi?(r=Oi,ta+=4):(r=G,0===ua&&u(Fi)),r!==G&&(ra=t,r=Ri()),t=r,t===G&&(t=ta,e.substr(ta,3)===Qi?(r=Qi,ta+=3):(r=G,0===ua&&u(Mi)),r!==G&&(ra=t,r=Vi()),t=r,t===G&&(t=ta,e.substr(ta,9)===zi?(r=zi,ta+=9):(r=G,0===ua&&u(Ui)),r!==G&&(ra=t,r=Ii()),t=r)))),ua--,t===G&&(r=G,0===ua&&u(_i)),oa[n]={nextPos:ta,result:t},t)}function z(){var e,t,r=36*ta+32,n=oa[r];if(n)return ta=n.nextPos,n.result;for(ua++,e=[],t=U(),t===G&&(t=I());t!==G;)e.push(t),t=U(),t===G&&(t=I());return ua--,e===G&&(t=G,0===ua&&u(Zi)),oa[r]={nextPos:ta,result:e},e}function U(){var t,r,n,i,a,s,o=36*ta+33,c=oa[o];if(c)return ta=c.nextPos,c.result;if(ua++,t=ta,e.substr(ta,2)===$i?(r=$i,ta+=2):(r=G,0===ua&&u(Gi)),r!==G){for(n=[],i=ta,a=ta,ua++,e.substr(ta,2)===Hi?(s=Hi,ta+=2):(s=G,0===ua&&u(Ji)),ua--,s===G?a=Kr:(ta=a,a=K),a!==G?(e.length>ta?(s=e.charAt(ta),ta++):(s=G,0===ua&&u(Ki)),s!==G?(a=[a,s],i=a):(ta=i,i=K)):(ta=i,i=K);i!==G;)n.push(i),i=ta,a=ta,ua++,e.substr(ta,2)===Hi?(s=Hi,ta+=2):(s=G,0===ua&&u(Ji)),ua--,s===G?a=Kr:(ta=a,a=K),a!==G?(e.length>ta?(s=e.charAt(ta),ta++):(s=G,0===ua&&u(Ki)),s!==G?(a=[a,s],i=a):(ta=i,i=K)):(ta=i,i=K);n!==G?(e.substr(ta,2)===Hi?(i=Hi,ta+=2):(i=G,0===ua&&u(Ji)),i!==G?(r=[r,n,i],t=r):(ta=t,t=K)):(ta=t,t=K)}else ta=t,t=K;return ua--,t===G&&(r=G,0===ua&&u(Di)),oa[o]={nextPos:ta,result:t},t}function I(){var t,r,n=36*ta+34,i=oa[n];if(i)return ta=i.nextPos,i.result;if(ua++,t=[],Xi.test(e.charAt(ta))?(r=e.charAt(ta),ta++):(r=G,0===ua&&u(Yi)),r!==G)for(;r!==G;)t.push(r),Xi.test(e.charAt(ta))?(r=e.charAt(ta),ta++):(r=G,0===ua&&u(Yi));else t=K;return ua--,t===G&&(r=G,0===ua&&u(Wi)),oa[n]={nextPos:ta,result:t},t}function Z(){var t,r,n=36*ta+35,i=oa[n];return i?(ta=i.nextPos,i.result):(ua++,t=ta,ua++,e.length>ta?(r=e.charAt(ta),ta++):(r=G,0===ua&&u(Ki)),ua--,r===G?t=Kr:(ta=t,t=K),ua--,t===G&&(r=G,0===ua&&u(ea)),oa[n]={nextPos:ta,result:t},t)}var D,$=arguments.length>1?arguments[1]:{},G={},H={query:c},J=c,K=G,W=function(e){return e},X=",",Y={type:"literal",value:",",description:'","'},et=function(e,t){return la("Query").add(ca(e,t,3))},tt=function(e,t){return la("Path").add(ca(e,t,1))},rt=null,nt=function(e,t,r){return la("Step").add(e,t,r)},it={type:"other",description:"axis"},at="//",st={type:"literal",value:"//",description:'"//"'},ut="/",ot={type:"literal",value:"/",description:'"/"'},ct="+//",lt={type:"literal",value:"+//",description:'"+//"'},ft="+/",pt={type:"literal",value:"+/",description:'"+/"'},ht="-//",dt={type:"literal",value:"-//",description:'"-//"'},vt="-/",gt={type:"literal",value:"-/",description:'"-/"'},bt="..//",xt={type:"literal",value:"..//",description:'"..//"'},yt="../",At={type:"literal",value:"../",description:'"../"'},mt=function(e){return la("Axis").set({op:e})},wt=function(e){return la("Match").merge(e)},Et="*",Pt={type:"literal",value:"*",description:'"*"'},Ct=function(){return la("Match").set({id:"*"})},Nt="[",jt={type:"literal",value:"[",description:'"["'},_t="]",Tt={type:"literal",value:"]",description:'"]"'},qt=function(e){return la("Filter").add(e)},St="?:",kt={type:"literal",value:"?:",description:'"?:"'},Lt=function(e,t){return la("ConditionalBinary").add(e,t)},Bt="?",Ot={type:"literal",value:"?",description:'"?"'},Ft=":",Rt={type:"literal",value:":",description:'":"'},Qt=function(e,t,r){return la("ConditionalTernary").add(e,t,r)},Mt="||",Vt={type:"literal",value:"||",description:'"||"'},zt=function(e,t,r){return la("Logical").set({op:t}).add(e,r)},Ut="&&",It={type:"literal",value:"&&",description:'"&&"'},Zt="|",Dt={type:"literal",value:"|",description:'"|"'},$t=function(e,t,r){return la("Bitwise").set({op:t}).add(e,r)},Gt="^",Ht={type:"literal",value:"^",description:'"^"'},Jt="&",Kt={type:"literal",value:"&",description:'"&"'},Wt="==",Xt={type:"literal",value:"==",description:'"=="'},Yt="!=",er={type:"literal",value:"!=",description:'"!="'},tr="<=",rr={type:"literal",value:"<=",description:'"<="'},nr=">=",ir={type:"literal",value:">=",description:'">="'},ar="<",sr={type:"literal",value:"<",description:'"<"'},ur=">",or={type:"literal",value:">",description:'">"'},cr="=~",lr={type:"literal",value:"=~",description:'"=~"'},fr="!~",pr={type:"literal",value:"!~",description:'"!~"'},hr=function(e,t,r){return la("Relational").set({op:t}).add(e,r)},dr="<<",vr={type:"literal",value:"<<",description:'"<<"'},gr=">>",br={type:"literal",value:">>",description:'">>"'},xr="+",yr={type:"literal",value:"+",description:'"+"'},Ar="-",mr={type:"literal",value:"-",description:'"-"'},wr=function(e,t,r){return la("Arithmetical").set({op:t}).add(e,r)},Er="**",Pr={type:"literal",value:"**",description:'"**"'},Cr="%",Nr={type:"literal",value:"%",description:'"%"'},jr="!",_r={type:"literal",value:"!",description:'"!"'},Tr="~",qr={type:"literal",value:"~",description:'"~"'},Sr=function(e,t){return la("Unary").set({op:e}).add(t)},kr="(",Lr={type:"literal",value:"(",description:'"("'},Br=")",Or={type:"literal",value:")",description:'")"'},Fr=function(e,t){return la("FuncCall").merge(e).add(t)},Rr=function(e,t){return ca(e,t,3)},Qr={type:"other",description:"node attribute"},Mr="@",Vr={type:"literal",value:"@",description:'"@"'},zr=function(e){return la("Attribute").merge(e)},Ur={type:"other",description:"query parameter reference"},Ir="{",Zr={type:"literal",value:"{",description:'"{"'},Dr="}",$r={type:"literal",value:"}",description:'"}"'},Gr=function(e){return la("Param").merge(e)},Hr=function(e){return e},Jr={type:"other",description:"identifier"},Kr=void 0,Wr=/^[a-zA-Z_]/,Xr={type:"class",value:"[a-zA-Z_]",description:"[a-zA-Z_]"},Yr=/^[a-zA-Z0-9_\-]/,en={type:"class",value:"[a-zA-Z0-9_\\-]",description:"[a-zA-Z0-9_\\-]"},tn=function(e){return la("Identifier").set({id:e})},rn={type:"other",description:"quoted string literal"},nn='"',an={type:"literal",value:'"',description:'"\\""'},sn=/^[^"]/,un={type:"class",value:'[^"]',description:'[^"]'},on=function(e){return la("LiteralString").set({value:e.join("")})},cn="'",ln={type:"literal",value:"'",description:'"\'"'},fn="\\'",pn={type:"literal",value:"\\'",description:'"\\\\\'"'},hn=/^[^']/,dn={type:"class",value:"[^']",description:"[^']"},vn=function(e){return la("LiteralString").set({value:e.replace(/\\'/g,"'")})},gn={type:"other",description:"escaped string character"},bn="\\\\",xn={type:"literal",value:"\\\\",description:'"\\\\\\\\"'},yn=function(){return"\\"},An='\\"',mn={type:"literal",value:'\\"',description:'"\\\\\\""'},wn=function(){return'"'},En=function(){return"'"},Pn="\\b",Cn={type:"literal",value:"\\b",description:'"\\\\b"'},Nn=function(){return"\b"},jn="\\v",_n={type:"literal",value:"\\v",description:'"\\\\v"'},Tn=function(){return" "},qn="\\f",Sn={type:"literal",value:"\\f",description:'"\\\\f"'},kn=function(){return"\f"},Ln="\\t",Bn={type:"literal",value:"\\t",description:'"\\\\t"'},On=function(){return" "},Fn="\\r",Rn={type:"literal",value:"\\r",description:'"\\\\r"'},Qn=function(){return"\r"},Mn="\\n",Vn={type:"literal",value:"\\n",description:'"\\\\n"'},zn=function(){return"\n"},Un="\\e",In={type:"literal",value:"\\e",description:'"\\\\e"'},Zn=function(){return""},Dn="\\x",$n={type:"literal",value:"\\x",description:'"\\\\x"'},Gn=/^[0-9a-fA-F]/,Hn={type:"class",value:"[0-9a-fA-F]",description:"[0-9a-fA-F]"},Jn=function(e){return String.fromCharCode(parseInt(e,16))},Kn="\\u",Wn={type:"literal",value:"\\u",description:'"\\\\u"'},Xn={type:"other",description:"regular expression literal"},Yn="\\/",ei={type:"literal",value:"\\/",description:'"\\\\/"'},ti=/^[^\/]/,ri={type:"class",value:"[^\\/]",description:"[^\\/]"},ni=function(e){var t;try{t=new RegExp(e.replace(/\\\//g,"/"))}catch(r){a(r.message)}return la("LiteralRegExp").set({value:t})},ii={type:"other",description:"numeric literal"},ai=/^[+\-]/,si={type:"class",value:"[+\\-]",description:"[+\\-]"},ui="0b",oi={type:"literal",value:"0b",description:'"0b"'},ci=/^[01]/,li={type:"class",value:"[01]",description:"[01]"},fi=function(e,t){return la("LiteralNumber").set({value:parseInt(e+t,2)})},pi="0o",hi={type:"literal",value:"0o",description:'"0o"'},di=/^[0-7]/,vi={type:"class",value:"[0-7]",description:"[0-7]"},gi=function(e,t){return la("LiteralNumber").set({value:parseInt(e+t,8)})},bi="0x",xi={type:"literal",value:"0x",description:'"0x"'},yi=function(e,t){return la("LiteralNumber").set({value:parseInt(e+t,16)})},Ai=/^[0-9]/,mi={type:"class",value:"[0-9]",description:"[0-9]"},wi=".",Ei={type:"literal",value:".",description:'"."'},Pi=/^[eE]/,Ci={type:"class",value:"[eE]",description:"[eE]"},Ni=function(e){return la("LiteralNumber").set({value:parseFloat(e)})},ji=function(e){return la("LiteralNumber").set({value:parseInt(e,10)})},_i={type:"other",description:"global value"},Ti="true",qi={type:"literal",value:"true",description:'"true"'},Si=function(){return la("LiteralValue").set({value:!0})},ki="false",Li={type:"literal",value:"false",description:'"false"'},Bi=function(){return la("LiteralValue").set({value:!1})},Oi="null",Fi={type:"literal",value:"null",description:'"null"'},Ri=function(){return la("LiteralValue").set({value:null})},Qi="NaN",Mi={type:"literal",value:"NaN",description:'"NaN"'},Vi=function(){return la("LiteralValue").set({value:0/0})},zi="undefined",Ui={type:"literal",value:"undefined",description:'"undefined"'},Ii=function(){return la("LiteralValue").set({value:void 0})},Zi={type:"other",description:"optional blank"},Di={type:"other",description:"multi-line comment"},$i="/*",Gi={type:"literal",value:"/*",description:'"/*"'},Hi="*/",Ji={type:"literal",value:"*/",description:'"*/"'},Ki={type:"any",description:"any character"},Wi={type:"other",description:"any whitespaces"},Xi=/^[ \t\r\n]/,Yi={type:"class",value:"[ \\t\\r\\n]",description:"[ \\t\\r\\n]"},ea={type:"other",description:"end of file"},ta=0,ra=0,na=0,ia={line:1,column:1,seenCR:!1},aa=0,sa=[],ua=0,oa={};if("startRule"in $){if(!($.startRule in H))throw new Error("Can't start parsing from rule \""+$.startRule+'".');J=H[$.startRule]}var ca=$.util.makeUnroll(n,i,r,t),la=$.util.makeAST(n,i,r,$);if(D=J(),D!==G&&ta===e.length)return D;throw D!==G&&ta<e.length&&u({type:"end",description:"end of input"}),o(null,sa,aa)}return e(t,Error),{SyntaxError:t,parse:r}}(),o=r(e("./astq-query-exec.js")),c=function(){function e(t){i(this,e),this.asty=new a,this.ast=null,t&&this.compile(t)}return n(e,null,{compile:{value:function(e,t){var r=this;t&&console.log("ASTQ: compile: +-------------------------------------------------------------------------------------------------------\nASTQ: compile: | "+e);var n=s.parse(u,e,{startRule:"query",makeAST:function(e,t,n,i){return r.asty.create.apply(r.asty,i).pos(e,t,n)}});if(null!==n.error)throw new Error("ASTQ: compile: query parsing failed:\n"+s.errorMessage(n.error,!0).replace(/^/gm,"ERROR: "));return this.ast=n.ast,t&&console.log("ASTQ: compile: +-------------------------------------------------------------------------------------------------------\n"+this.dump().replace(/\n$/,"").replace(/^/gm,"ASTQ: compile: | ")),this},writable:!0,configurable:!0},dump:{value:function(){return this.ast.dump()},writable:!0,configurable:!0},execute:{value:function(e,t,r,n,i){i&&console.log("ASTQ: execute: +--------------------------------------------------------------+----------------------------------------");var a=new o(t,r,n,i);return a.execQuery(this.ast,e)},writable:!0,configurable:!0}}),e}();t.exports=c},{"./astq-query-exec.js":7,asty:"asty","pegjs-util":"pegjs-util"}],10:[function(e,t){"use strict";var r=function(e,t,r){t&&Object.defineProperties(e,t),r&&Object.defineProperties(e.prototype,r)},n=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},i=function(){function e(){n(this,e)}return r(e,{pad:{value:function t(e,r){var n=0>r?-r:r;if(e.length>n)e=e.substr(0,n);else{var t=Array(n+1-e.length).join(" ");e=0>r?e+t:t+e}return e},writable:!0,configurable:!0},truthy:{value:function(e){var t=void 0;switch(typeof e){case"boolean":t=e;break;case"number":t=0!==e&&!isNaN(e);break;case"string":t=""!==e;break;case"object":t=!1,null!==e&&(t=!0,e instanceof Array&&(t=e.length>0));break;default:t=!1}return t},writable:!0,configurable:!0},coerce:{value:function(e,t){if(typeof e!==t)try{switch(t){case"boolean":e=Boolean(e);break;case"number":e=Number(e);break;case"string":e=String(e);break;case"regexp":e=new RegExp(e)}}catch(r){throw new Error("cannot coerce value into type "+t)}return e},writable:!0,configurable:!0}}),e}();t.exports=i},{}],11:[function(e,t){"use strict";var r={major:1,minor:2,micro:3,date:20150211};t.exports=r},{}],12:[function(e,t){"use strict";var r=function(e){return e&&e.__esModule?e["default"]:e},n=function(e,t,r){t&&Object.defineProperties(e,t),r&&Object.defineProperties(e.prototype,r)},i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},a=e("cache-lru"),s=r(e("./astq-adapter.js")),u=r(e("./astq-adapter-asty.js")),o=r(e("./astq-adapter-mozast.js")),c=r(e("./astq-adapter-xmldom.js")),l=r(e("./astq-funcs.js")),f=r(e("./astq-funcs-std.js")),p=r(e("./astq-query.js")),h=r(e("./astq-version.js")),d=function(){function e(){i(this,e),this._adapter=new s,this._adapter.register(o),this._adapter.register(c),this._adapter.register(u),this._funcs=new l;for(var t in f)this.func(t,f[t]);this._cache=new a}return n(e,null,{version:{value:function(){return h},writable:!0,configurable:!0},adapter:{value:function t(t){if(1!==arguments.length)throw new Error("ASTQ#adapter: invalid number of arguments");return this._adapter.unregister(),this._adapter.register(t),this},writable:!0,configurable:!0},func:{value:function r(e,r){if(2!==arguments.length)throw new Error("ASTQ#func: invalid number of arguments");return this._funcs.register(e,r),this},writable:!0,configurable:!0},cache:{value:function(e){if(1!==arguments.length)throw new Error("ASTQ#cache: invalid number of arguments");return this._cache.limit(e),this},writable:!0,configurable:!0},compile:{value:function(e,t){if(arguments.length<1)throw new Error("ASTQ#compile: too less arguments");if(arguments.length>2)throw new Error("ASTQ#compile: too many arguments");void 0===t&&(t=!1);var r=this._cache.get(e);return void 0===r&&(r=new p,r.compile(e,t),this._cache.set(e,r)),r},writable:!0,configurable:!0},execute:{value:function(e,t,r,n){if(arguments.length<2)throw new Error("ASTQ#execute: too less arguments");if(arguments.length>4)throw new Error("ASTQ#execute: too many arguments");void 0===r&&(r={}),void 0===n&&(n=!1);var i=this._adapter.select(e);if(void 0===i)throw new Error("ASTQ#execute: no suitable adapter found for node");return t.execute(e,i,r,this._funcs,n)},writable:!0,configurable:!0},query:{value:function(e,t,r,n){if(arguments.length<2)throw new Error("ASTQ#query: too less arguments");if(arguments.length>4)throw new Error("ASTQ#query: too many arguments");return void 0===r&&(r={}),void 0===n&&(n=!1),this.execute(e,this.compile(t,n),r,n)},writable:!0,configurable:!0}}),e}();t.exports=d},{"./astq-adapter-asty.js":1,"./astq-adapter-mozast.js":2,"./astq-adapter-xmldom.js":3,"./astq-adapter.js":4,"./astq-funcs-std.js":5,"./astq-funcs.js":6,"./astq-query.js":9,"./astq-version.js":11,"cache-lru":"cache-lru"}]},{},[1,2,3,4,5,6,7,8,9,10,11,12])(12)});
else a=K;a!==G&&(a=e.substring(i,ta)),i=a,i!==G?(ra=t,r=yi(r,i),t=r):(ta=t,t=K)}else ta=t,t=K;else ta=t,t=K;if(t===G){if(t=ta,r=ta,n=ta,ai.test(e.charAt(ta))?(i=e.charAt(ta),ta++):(i=G,0===ua&&u(si)),i===G&&(i=rt),i!==G){for(a=[],Ai.test(e.charAt(ta))?(s=e.charAt(ta),ta++):(s=G,0===ua&&u(mi));s!==G;)a.push(s),Ai.test(e.charAt(ta))?(s=e.charAt(ta),ta++):(s=G,0===ua&&u(mi));if(a!==G)if(46===e.charCodeAt(ta)?(s=wi,ta++):(s=G,0===ua&&u(Ei)),s!==G){if(o=[],Ai.test(e.charAt(ta))?(c=e.charAt(ta),ta++):(c=G,0===ua&&u(mi)),c!==G)for(;c!==G;)o.push(c),Ai.test(e.charAt(ta))?(c=e.charAt(ta),ta++):(c=G,0===ua&&u(mi));else o=K;if(o!==G){if(c=ta,Pi.test(e.charAt(ta))?(l=e.charAt(ta),ta++):(l=G,0===ua&&u(Ci)),l!==G)if(ai.test(e.charAt(ta))?(f=e.charAt(ta),ta++):(f=G,0===ua&&u(si)),f===G&&(f=rt),f!==G){if(p=[],Ai.test(e.charAt(ta))?(h=e.charAt(ta),ta++):(h=G,0===ua&&u(mi)),h!==G)for(;h!==G;)p.push(h),Ai.test(e.charAt(ta))?(h=e.charAt(ta),ta++):(h=G,0===ua&&u(mi));else p=K;p!==G?(l=[l,f,p],c=l):(ta=c,c=K)}else ta=c,c=K;else ta=c,c=K;c===G&&(c=rt),c!==G?(i=[i,a,s,o,c],n=i):(ta=n,n=K)}else ta=n,n=K}else ta=n,n=K;else ta=n,n=K}else ta=n,n=K;if(n!==G&&(n=e.substring(r,ta)),r=n,r!==G&&(ra=t,r=Ni(r)),t=r,t===G){if(t=ta,r=ta,n=ta,ai.test(e.charAt(ta))?(i=e.charAt(ta),ta++):(i=G,0===ua&&u(si)),i===G&&(i=rt),i!==G){if(a=[],Ai.test(e.charAt(ta))?(s=e.charAt(ta),ta++):(s=G,0===ua&&u(mi)),s!==G)for(;s!==G;)a.push(s),Ai.test(e.charAt(ta))?(s=e.charAt(ta),ta++):(s=G,0===ua&&u(mi));else a=K;a!==G?(i=[i,a],n=i):(ta=n,n=K)}else ta=n,n=K;n!==G&&(n=e.substring(r,ta)),r=n,r!==G&&(ra=t,r=ji(r)),t=r}}}}return ua--,t===G&&(r=G,0===ua&&u(ii)),oa[d]={nextPos:ta,result:t},t}function V(){var t,r,n=36*ta+31,i=oa[n];return i?(ta=i.nextPos,i.result):(ua++,t=ta,e.substr(ta,4)===Ti?(r=Ti,ta+=4):(r=G,0===ua&&u(qi)),r!==G&&(ra=t,r=Si()),t=r,t===G&&(t=ta,e.substr(ta,5)===ki?(r=ki,ta+=5):(r=G,0===ua&&u(Li)),r!==G&&(ra=t,r=Bi()),t=r,t===G&&(t=ta,e.substr(ta,4)===Oi?(r=Oi,ta+=4):(r=G,0===ua&&u(Fi)),r!==G&&(ra=t,r=Ri()),t=r,t===G&&(t=ta,e.substr(ta,3)===Qi?(r=Qi,ta+=3):(r=G,0===ua&&u(Mi)),r!==G&&(ra=t,r=Vi()),t=r,t===G&&(t=ta,e.substr(ta,9)===zi?(r=zi,ta+=9):(r=G,0===ua&&u(Ui)),r!==G&&(ra=t,r=Ii()),t=r)))),ua--,t===G&&(r=G,0===ua&&u(_i)),oa[n]={nextPos:ta,result:t},t)}function z(){var e,t,r=36*ta+32,n=oa[r];if(n)return ta=n.nextPos,n.result;for(ua++,e=[],t=U(),t===G&&(t=I());t!==G;)e.push(t),t=U(),t===G&&(t=I());return ua--,e===G&&(t=G,0===ua&&u(Zi)),oa[r]={nextPos:ta,result:e},e}function U(){var t,r,n,i,a,s,o=36*ta+33,c=oa[o];if(c)return ta=c.nextPos,c.result;if(ua++,t=ta,e.substr(ta,2)===$i?(r=$i,ta+=2):(r=G,0===ua&&u(Gi)),r!==G){for(n=[],i=ta,a=ta,ua++,e.substr(ta,2)===Hi?(s=Hi,ta+=2):(s=G,0===ua&&u(Ji)),ua--,s===G?a=Kr:(ta=a,a=K),a!==G?(e.length>ta?(s=e.charAt(ta),ta++):(s=G,0===ua&&u(Ki)),s!==G?(a=[a,s],i=a):(ta=i,i=K)):(ta=i,i=K);i!==G;)n.push(i),i=ta,a=ta,ua++,e.substr(ta,2)===Hi?(s=Hi,ta+=2):(s=G,0===ua&&u(Ji)),ua--,s===G?a=Kr:(ta=a,a=K),a!==G?(e.length>ta?(s=e.charAt(ta),ta++):(s=G,0===ua&&u(Ki)),s!==G?(a=[a,s],i=a):(ta=i,i=K)):(ta=i,i=K);n!==G?(e.substr(ta,2)===Hi?(i=Hi,ta+=2):(i=G,0===ua&&u(Ji)),i!==G?(r=[r,n,i],t=r):(ta=t,t=K)):(ta=t,t=K)}else ta=t,t=K;return ua--,t===G&&(r=G,0===ua&&u(Di)),oa[o]={nextPos:ta,result:t},t}function I(){var t,r,n=36*ta+34,i=oa[n];if(i)return ta=i.nextPos,i.result;if(ua++,t=[],Xi.test(e.charAt(ta))?(r=e.charAt(ta),ta++):(r=G,0===ua&&u(Yi)),r!==G)for(;r!==G;)t.push(r),Xi.test(e.charAt(ta))?(r=e.charAt(ta),ta++):(r=G,0===ua&&u(Yi));else t=K;return ua--,t===G&&(r=G,0===ua&&u(Wi)),oa[n]={nextPos:ta,result:t},t}function Z(){var t,r,n=36*ta+35,i=oa[n];return i?(ta=i.nextPos,i.result):(ua++,t=ta,ua++,e.length>ta?(r=e.charAt(ta),ta++):(r=G,0===ua&&u(Ki)),ua--,r===G?t=Kr:(ta=t,t=K),ua--,t===G&&(r=G,0===ua&&u(ea)),oa[n]={nextPos:ta,result:t},t)}var D,$=arguments.length>1?arguments[1]:{},G={},H={query:c},J=c,K=G,W=function(e){return e},X=",",Y={type:"literal",value:",",description:'","'},et=function(e,t){return la("Query").add(ca(e,t,3))},tt=function(e,t){return la("Path").add(ca(e,t,1))},rt=null,nt=function(e,t,r){return la("Step").add(e,t,r)},it={type:"other",description:"axis"},at="//",st={type:"literal",value:"//",description:'"//"'},ut="/",ot={type:"literal",value:"/",description:'"/"'},ct="+//",lt={type:"literal",value:"+//",description:'"+//"'},ft="+/",pt={type:"literal",value:"+/",description:'"+/"'},ht="-//",dt={type:"literal",value:"-//",description:'"-//"'},vt="-/",gt={type:"literal",value:"-/",description:'"-/"'},bt="..//",xt={type:"literal",value:"..//",description:'"..//"'},yt="../",At={type:"literal",value:"../",description:'"../"'},mt=function(e){return la("Axis").set({op:e})},wt=function(e){return la("Match").merge(e)},Et="*",Pt={type:"literal",value:"*",description:'"*"'},Ct=function(){return la("Match").set({id:"*"})},Nt="[",jt={type:"literal",value:"[",description:'"["'},_t="]",Tt={type:"literal",value:"]",description:'"]"'},qt=function(e){return la("Filter").add(e)},St="?:",kt={type:"literal",value:"?:",description:'"?:"'},Lt=function(e,t){return la("ConditionalBinary").add(e,t)},Bt="?",Ot={type:"literal",value:"?",description:'"?"'},Ft=":",Rt={type:"literal",value:":",description:'":"'},Qt=function(e,t,r){return la("ConditionalTernary").add(e,t,r)},Mt="||",Vt={type:"literal",value:"||",description:'"||"'},zt=function(e,t,r){return la("Logical").set({op:t}).add(e,r)},Ut="&&",It={type:"literal",value:"&&",description:'"&&"'},Zt="|",Dt={type:"literal",value:"|",description:'"|"'},$t=function(e,t,r){return la("Bitwise").set({op:t}).add(e,r)},Gt="^",Ht={type:"literal",value:"^",description:'"^"'},Jt="&",Kt={type:"literal",value:"&",description:'"&"'},Wt="==",Xt={type:"literal",value:"==",description:'"=="'},Yt="!=",er={type:"literal",value:"!=",description:'"!="'},tr="<=",rr={type:"literal",value:"<=",description:'"<="'},nr=">=",ir={type:"literal",value:">=",description:'">="'},ar="<",sr={type:"literal",value:"<",description:'"<"'},ur=">",or={type:"literal",value:">",description:'">"'},cr="=~",lr={type:"literal",value:"=~",description:'"=~"'},fr="!~",pr={type:"literal",value:"!~",description:'"!~"'},hr=function(e,t,r){return la("Relational").set({op:t}).add(e,r)},dr="<<",vr={type:"literal",value:"<<",description:'"<<"'},gr=">>",br={type:"literal",value:">>",description:'">>"'},xr="+",yr={type:"literal",value:"+",description:'"+"'},Ar="-",mr={type:"literal",value:"-",description:'"-"'},wr=function(e,t,r){return la("Arithmetical").set({op:t}).add(e,r)},Er="**",Pr={type:"literal",value:"**",description:'"**"'},Cr="%",Nr={type:"literal",value:"%",description:'"%"'},jr="!",_r={type:"literal",value:"!",description:'"!"'},Tr="~",qr={type:"literal",value:"~",description:'"~"'},Sr=function(e,t){return la("Unary").set({op:e}).add(t)},kr="(",Lr={type:"literal",value:"(",description:'"("'},Br=")",Or={type:"literal",value:")",description:'")"'},Fr=function(e,t){return la("FuncCall").merge(e).add(t)},Rr=function(e,t){return ca(e,t,3)},Qr={type:"other",description:"node attribute"},Mr="@",Vr={type:"literal",value:"@",description:'"@"'},zr=function(e){return la("Attribute").merge(e)},Ur={type:"other",description:"query parameter reference"},Ir="{",Zr={type:"literal",value:"{",description:'"{"'},Dr="}",$r={type:"literal",value:"}",description:'"}"'},Gr=function(e){return la("Param").merge(e)},Hr=function(e){return e},Jr={type:"other",description:"identifier"},Kr=void 0,Wr=/^[a-zA-Z_]/,Xr={type:"class",value:"[a-zA-Z_]",description:"[a-zA-Z_]"},Yr=/^[a-zA-Z0-9_\-]/,en={type:"class",value:"[a-zA-Z0-9_\\-]",description:"[a-zA-Z0-9_\\-]"},tn=function(e){return la("Identifier").set({id:e})},rn={type:"other",description:"quoted string literal"},nn='"',an={type:"literal",value:'"',description:'"\\""'},sn=/^[^"]/,un={type:"class",value:'[^"]',description:'[^"]'},on=function(e){return la("LiteralString").set({value:e.join("")})},cn="'",ln={type:"literal",value:"'",description:'"\'"'},fn="\\'",pn={type:"literal",value:"\\'",description:'"\\\\\'"'},hn=/^[^']/,dn={type:"class",value:"[^']",description:"[^']"},vn=function(e){return la("LiteralString").set({value:e.replace(/\\'/g,"'")})},gn={type:"other",description:"escaped string character"},bn="\\\\",xn={type:"literal",value:"\\\\",description:'"\\\\\\\\"'},yn=function(){return"\\"},An='\\"',mn={type:"literal",value:'\\"',description:'"\\\\\\""'},wn=function(){return'"'},En=function(){return"'"},Pn="\\b",Cn={type:"literal",value:"\\b",description:'"\\\\b"'},Nn=function(){return"\b"},jn="\\v",_n={type:"literal",value:"\\v",description:'"\\\\v"'},Tn=function(){return" "},qn="\\f",Sn={type:"literal",value:"\\f",description:'"\\\\f"'},kn=function(){return"\f"},Ln="\\t",Bn={type:"literal",value:"\\t",description:'"\\\\t"'},On=function(){return" "},Fn="\\r",Rn={type:"literal",value:"\\r",description:'"\\\\r"'},Qn=function(){return"\r"},Mn="\\n",Vn={type:"literal",value:"\\n",description:'"\\\\n"'},zn=function(){return"\n"},Un="\\e",In={type:"literal",value:"\\e",description:'"\\\\e"'},Zn=function(){return""},Dn="\\x",$n={type:"literal",value:"\\x",description:'"\\\\x"'},Gn=/^[0-9a-fA-F]/,Hn={type:"class",value:"[0-9a-fA-F]",description:"[0-9a-fA-F]"},Jn=function(e){return String.fromCharCode(parseInt(e,16))},Kn="\\u",Wn={type:"literal",value:"\\u",description:'"\\\\u"'},Xn={type:"other",description:"regular expression literal"},Yn="\\/",ei={type:"literal",value:"\\/",description:'"\\\\/"'},ti=/^[^\/]/,ri={type:"class",value:"[^\\/]",description:"[^\\/]"},ni=function(e){var t;try{t=new RegExp(e.replace(/\\\//g,"/"))}catch(r){a(r.message)}return la("LiteralRegExp").set({value:t})},ii={type:"other",description:"numeric literal"},ai=/^[+\-]/,si={type:"class",value:"[+\\-]",description:"[+\\-]"},ui="0b",oi={type:"literal",value:"0b",description:'"0b"'},ci=/^[01]/,li={type:"class",value:"[01]",description:"[01]"},fi=function(e,t){return la("LiteralNumber").set({value:parseInt(e+t,2)})},pi="0o",hi={type:"literal",value:"0o",description:'"0o"'},di=/^[0-7]/,vi={type:"class",value:"[0-7]",description:"[0-7]"},gi=function(e,t){return la("LiteralNumber").set({value:parseInt(e+t,8)})},bi="0x",xi={type:"literal",value:"0x",description:'"0x"'},yi=function(e,t){return la("LiteralNumber").set({value:parseInt(e+t,16)})},Ai=/^[0-9]/,mi={type:"class",value:"[0-9]",description:"[0-9]"},wi=".",Ei={type:"literal",value:".",description:'"."'},Pi=/^[eE]/,Ci={type:"class",value:"[eE]",description:"[eE]"},Ni=function(e){return la("LiteralNumber").set({value:parseFloat(e)})},ji=function(e){return la("LiteralNumber").set({value:parseInt(e,10)})},_i={type:"other",description:"global value"},Ti="true",qi={type:"literal",value:"true",description:'"true"'},Si=function(){return la("LiteralValue").set({value:!0})},ki="false",Li={type:"literal",value:"false",description:'"false"'},Bi=function(){return la("LiteralValue").set({value:!1})},Oi="null",Fi={type:"literal",value:"null",description:'"null"'},Ri=function(){return la("LiteralValue").set({value:null})},Qi="NaN",Mi={type:"literal",value:"NaN",description:'"NaN"'},Vi=function(){return la("LiteralValue").set({value:0/0})},zi="undefined",Ui={type:"literal",value:"undefined",description:'"undefined"'},Ii=function(){return la("LiteralValue").set({value:void 0})},Zi={type:"other",description:"optional blank"},Di={type:"other",description:"multi-line comment"},$i="/*",Gi={type:"literal",value:"/*",description:'"/*"'},Hi="*/",Ji={type:"literal",value:"*/",description:'"*/"'},Ki={type:"any",description:"any character"},Wi={type:"other",description:"any whitespaces"},Xi=/^[ \t\r\n]/,Yi={type:"class",value:"[ \\t\\r\\n]",description:"[ \\t\\r\\n]"},ea={type:"other",description:"end of file"},ta=0,ra=0,na=0,ia={line:1,column:1,seenCR:!1},aa=0,sa=[],ua=0,oa={};if("startRule"in $){if(!($.startRule in H))throw new Error("Can't start parsing from rule \""+$.startRule+'".');J=H[$.startRule]}var ca=$.util.makeUnroll(n,i,r,t),la=$.util.makeAST(n,i,r,$);if(D=J(),D!==G&&ta===e.length)return D;throw D!==G&&ta<e.length&&u({type:"end",description:"end of input"}),o(null,sa,aa)}return e(t,Error),{SyntaxError:t,parse:r}}(),o=r(e("./astq-query-exec.js")),c=function(){function e(t){i(this,e),this.asty=new a,this.ast=null,t&&this.compile(t)}return n(e,null,{compile:{value:function(e,t){var r=this;t&&console.log("ASTQ: compile: +-------------------------------------------------------------------------------------------------------\nASTQ: compile: | "+e);var n=s.parse(u,e,{startRule:"query",makeAST:function(e,t,n,i){return r.asty.create.apply(r.asty,i).pos(e,t,n)}});if(null!==n.error)throw new Error("ASTQ: compile: query parsing failed:\n"+s.errorMessage(n.error,!0).replace(/^/gm,"ERROR: "));return this.ast=n.ast,t&&console.log("ASTQ: compile: +-------------------------------------------------------------------------------------------------------\n"+this.dump().replace(/\n$/,"").replace(/^/gm,"ASTQ: compile: | ")),this},writable:!0,configurable:!0},dump:{value:function(){return this.ast.dump()},writable:!0,configurable:!0},execute:{value:function(e,t,r,n,i){i&&console.log("ASTQ: execute: +--------------------------------------------------------------+----------------------------------------");var a=new o(t,r,n,i);return a.execQuery(this.ast,e)},writable:!0,configurable:!0}}),e}();t.exports=c},{"./astq-query-exec.js":7,asty:"asty","pegjs-util":"pegjs-util"}],10:[function(e,t){"use strict";var r=function(e,t,r){t&&Object.defineProperties(e,t),r&&Object.defineProperties(e.prototype,r)},n=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},i=function(){function e(){n(this,e)}return r(e,{pad:{value:function t(e,r){var n=0>r?-r:r;if(e.length>n)e=e.substr(0,n);else{var t=Array(n+1-e.length).join(" ");e=0>r?e+t:t+e}return e},writable:!0,configurable:!0},truthy:{value:function(e){var t=void 0;switch(typeof e){case"boolean":t=e;break;case"number":t=0!==e&&!isNaN(e);break;case"string":t=""!==e;break;case"object":t=!1,null!==e&&(t=!0,e instanceof Array&&(t=e.length>0));break;default:t=!1}return t},writable:!0,configurable:!0},coerce:{value:function(e,t){if(typeof e!==t)try{switch(t){case"boolean":e=Boolean(e);break;case"number":e=Number(e);break;case"string":e=String(e);break;case"regexp":e=new RegExp(e)}}catch(r){throw new Error("cannot coerce value into type "+t)}return e},writable:!0,configurable:!0}}),e}();t.exports=i},{}],11:[function(e,t){"use strict";var r={major:1,minor:2,micro:4,date:20150215};t.exports=r},{}],12:[function(e,t){"use strict";var r=function(e){return e&&e.__esModule?e["default"]:e},n=function(e,t,r){t&&Object.defineProperties(e,t),r&&Object.defineProperties(e.prototype,r)},i=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},a=e("cache-lru"),s=r(e("./astq-adapter.js")),u=r(e("./astq-adapter-asty.js")),o=r(e("./astq-adapter-mozast.js")),c=r(e("./astq-adapter-xmldom.js")),l=r(e("./astq-funcs.js")),f=r(e("./astq-funcs-std.js")),p=r(e("./astq-query.js")),h=r(e("./astq-version.js")),d=function(){function e(){i(this,e),this._adapter=new s,this._adapter.register(o),this._adapter.register(c),this._adapter.register(u),this._funcs=new l;for(var t in f)this.func(t,f[t]);this._cache=new a}return n(e,null,{version:{value:function(){return h},writable:!0,configurable:!0},adapter:{value:function t(t){if(1!==arguments.length)throw new Error("ASTQ#adapter: invalid number of arguments");return this._adapter.unregister(),this._adapter.register(t),this},writable:!0,configurable:!0},func:{value:function r(e,r){if(2!==arguments.length)throw new Error("ASTQ#func: invalid number of arguments");return this._funcs.register(e,r),this},writable:!0,configurable:!0},cache:{value:function(e){if(1!==arguments.length)throw new Error("ASTQ#cache: invalid number of arguments");return this._cache.limit(e),this},writable:!0,configurable:!0},compile:{value:function(e,t){if(arguments.length<1)throw new Error("ASTQ#compile: too less arguments");if(arguments.length>2)throw new Error("ASTQ#compile: too many arguments");void 0===t&&(t=!1);var r=this._cache.get(e);return void 0===r&&(r=new p,r.compile(e,t),this._cache.set(e,r)),r},writable:!0,configurable:!0},execute:{value:function(e,t,r,n){if(arguments.length<2)throw new Error("ASTQ#execute: too less arguments");if(arguments.length>4)throw new Error("ASTQ#execute: too many arguments");void 0===r&&(r={}),void 0===n&&(n=!1);var i=this._adapter.select(e);if(void 0===i)throw new Error("ASTQ#execute: no suitable adapter found for node");return t.execute(e,i,r,this._funcs,n)},writable:!0,configurable:!0},query:{value:function(e,t,r,n){if(arguments.length<2)throw new Error("ASTQ#query: too less arguments");if(arguments.length>4)throw new Error("ASTQ#query: too many arguments");return void 0===r&&(r={}),void 0===n&&(n=!1),this.execute(e,this.compile(t,n),r,n)},writable:!0,configurable:!0}}),e}();t.exports=d},{"./astq-adapter-asty.js":1,"./astq-adapter-mozast.js":2,"./astq-adapter-xmldom.js":3,"./astq-adapter.js":4,"./astq-funcs-std.js":5,"./astq-funcs.js":6,"./astq-query.js":9,"./astq-version.js":11,"cache-lru":"cache-lru"}]},{},[1,2,3,4,5,6,7,8,9,10,11,12])(12)});
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})

@@ -34,3 +34,3 @@

(function (global){
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.ASTY=t()}}(function(){return function t(e,n,r){function i(a,u){if(!n[a]){if(!e[a]){var f="function"==typeof _dereq_&&_dereq_;if(!u&&f)return f(a,!0);if(o)return o(a,!0);var s=new Error("Cannot find module '"+a+"'");throw s.code="MODULE_NOT_FOUND",s}var c=n[a]={exports:{}};e[a][0].call(c.exports,function(t){var n=e[a][1][t];return i(n?n:t)},c,c.exports,t,e,n,r)}return n[a].exports}for(var o="function"==typeof _dereq_&&_dereq_,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(t,e){"use strict";var n=function(t,e,n){e&&Object.defineProperties(t,e),n&&Object.defineProperties(t.prototype,n)},r=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},i=function(){function t(){r(this,t)}return n(t,null,{init:{value:function(t,e,n){if("undefined"==typeof t)throw new Error("init: invalid argument");if(this.ASTy=!0,this.T=t,this.L={L:0,C:0,O:0},this.A={},this.C=[],this.P=null,"object"==typeof e)for(var r in e)e.hasOwnProperty(r)&&this.set(r,e[r]);return"object"==typeof n&&n instanceof Array&&this.add(n),this},writable:!0,configurable:!0},type:{value:function(t){if(0===arguments.length)return this.T;if(1===arguments.length)return this.T=t,this;throw new Error("type: invalid number of arguments")},writable:!0,configurable:!0},pos:{value:function(t,e,n){if(0===arguments.length)return this.L;if(arguments.length<=3)return this.L.L=t||0,this.L.C=e||0,this.L.O=n||0,this;throw new Error("pos: invalid number of arguments")},writable:!0,configurable:!0},set:{value:function(){var t=this,e=arguments;if(1===arguments.length&&"object"==typeof arguments[0])!function(){var n=e;Object.keys(n[0]).forEach(function(e){t.A[e]=n[0][e]})}();else{if(2!==arguments.length)throw new Error("set: invalid arguments");this.A[arguments[0]]=arguments[1]}return this},writable:!0,configurable:!0},get:{value:function(t){if(1!==arguments.length)throw new Error("get: invalid number of arguments");if("string"!=typeof t)throw new Error("get: invalid argument");return this.A[t]},writable:!0,configurable:!0},attrs:{value:function(){return Object.keys(this.A)},writable:!0,configurable:!0},add:{value:function(){var t=this;if(0===arguments.length)throw new Error("add: missing argument(s)");var e=function(t,e){if(!("object"==typeof e&&"string"==typeof e.T&&"object"==typeof e.L&&"object"==typeof e.A&&"object"==typeof e.P&&"object"==typeof e.C&&e.C instanceof Array))throw new Error("add: invalid AST node: "+JSON.stringify(e));t.C.push(e),e.P=t};return null!==arguments&&Array.prototype.slice.call(arguments,0).forEach(function(n){"object"==typeof n&&n instanceof Array?n.forEach(function(n){e(t,n)}):null!==n&&e(t,n)}),this},writable:!0,configurable:!0},del:{value:function(){var t=this;if(0===arguments.length)throw new Error("del: invalid argument");return Array.prototype.slice.call(arguments,0).forEach(function(e){for(var n=!1,r=0;r<t.C.length;r++)if(t.C[r]===e){t.C.splice(r,1),e.P=null,n=!0;break}if(!n)throw new Error("del: child not found")}),this},writable:!0,configurable:!0},childs:{value:function(){return this.C},writable:!0,configurable:!0},parent:{value:function(){return this.P},writable:!0,configurable:!0}}),t}();e.exports=i},{}],2:[function(t,e){"use strict";var n=function(t,e,n){e&&Object.defineProperties(t,e),n&&Object.defineProperties(t.prototype,n)},r=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},i=function(){function t(){r(this,t)}return n(t,null,{dump:{value:function(t){void 0===t&&(t=1/0);var e="";return this.walk(function(n,r){if(!(r>t)){for(var i=0;r>i;i++)e+=" ";e+=n.T+" ";var o=Object.keys(n.A);o.length>0&&!function(){e+="(";var t=!0;o.forEach(function(r){t?t=!1:e+=", ",e+=r+": ";var i=n.A[r];switch(typeof i){case"string":e+='"'+i.replace(/\n/,"\\n").replace(/"/,'\\"')+'"';break;case"object":e+=i instanceof RegExp?"/"+i.toString().replace(/^\//,"").replace(/\/$/,"").replace(/\//g,"\\/")+"/":JSON.stringify(i);break;default:e+=JSON.stringify(i)}}),e+=") "}(),e+="["+n.L.L+"/"+n.L.C+"]\n"}},"downward"),e},writable:!0,configurable:!0}}),t}();e.exports=i},{}],3:[function(t,e){"use strict";var n=function(t,e,n){e&&Object.defineProperties(t,e),n&&Object.defineProperties(t.prototype,n)},r=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},i=function(){function t(){r(this,t)}return n(t,null,{merge:{value:function(t,e,n){var r=this;if("object"!=typeof t)throw new Error("merge: invalid AST node argument");if("undefined"==typeof e&&(e=!1),"undefined"==typeof n&&(n={}),e){var i=t.pos();this.pos(i.L,i.C,i.O)}return t.attrs().forEach(function(e){var i="undefined"!=typeof n[e]?n[e]:e;null!==i&&r.set(i,t.get(e))}),t.childs().forEach(function(t){r.add(t)}),this},writable:!0,configurable:!0}}),t}();e.exports=i},{}],4:[function(t,e){"use strict";var n={major:1,minor:0,micro:4,date:20150211};e.exports=n},{}],5:[function(t,e){"use strict";var n=function(t,e,n){e&&Object.defineProperties(t,e),n&&Object.defineProperties(t.prototype,n)},r=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},i=function(){function t(){r(this,t)}return n(t,null,{walk:{value:function(t,e){"undefined"==typeof e&&(e="downward");var n=function(r,i,o){("downward"===e||"both"===e)&&t.call(null,r,i,o,"downward"),r.C.forEach(function(t){n(t,i+1,r)}),("upward"===e||"both"===e)&&t.call(null,r,i,o,"upward")};return n(this,0,null),this},writable:!0,configurable:!0}}),t}();e.exports=i},{}],6:[function(t,e){"use strict";var n=function(t){return t&&t.__esModule?t["default"]:t},r=function(t,e,n){e&&Object.defineProperties(t,e),n&&Object.defineProperties(t.prototype,n)},i=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},o=n(t("./asty-base.js")),a=n(t("./asty-merge.js")),u=n(t("./asty-walk.js")),f=n(t("./asty-dump.js")),s=n(t("./asty-version.js")),c=function(){function t(){var e=this;i(this,t),this.ASTYNode=function(){};var n=[[o,"init","type","pos","set","get","attrs","add","del","childs","parent"],[a,"merge"],[u,"walk"],[f,"dump"]];return n.forEach(function(t){var n=t[0].prototype;t.slice(1).forEach(function(t){e.ASTYNode.prototype[t]=n[t]})}),this}return r(t,null,{version:{value:function(){return s},writable:!0,configurable:!0},extend:{value:function(t){for(var e in t)t.hasOwnProperty(e)&&(this.ASTYNode.prototype[e]=t[e]);return this},writable:!0,configurable:!0},create:{value:function(t){return(new this.ASTYNode).init(t)},writable:!0,configurable:!0},isA:{value:function(t){return"object"==typeof t&&t instanceof this.ASTYNode&&"boolean"==typeof t.ASTy&&t.ASTy===!0},writable:!0,configurable:!0}}),t}();e.exports=c},{"./asty-base.js":1,"./asty-dump.js":2,"./asty-merge.js":3,"./asty-version.js":4,"./asty-walk.js":5}]},{},[1,2,3,4,5,6])(6)});
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.ASTY=t()}}(function(){return function t(e,n,r){function i(a,u){if(!n[a]){if(!e[a]){var f="function"==typeof _dereq_&&_dereq_;if(!u&&f)return f(a,!0);if(o)return o(a,!0);var s=new Error("Cannot find module '"+a+"'");throw s.code="MODULE_NOT_FOUND",s}var c=n[a]={exports:{}};e[a][0].call(c.exports,function(t){var n=e[a][1][t];return i(n?n:t)},c,c.exports,t,e,n,r)}return n[a].exports}for(var o="function"==typeof _dereq_&&_dereq_,a=0;a<r.length;a++)i(r[a]);return i}({1:[function(t,e){"use strict";var n=function(t,e,n){e&&Object.defineProperties(t,e),n&&Object.defineProperties(t.prototype,n)},r=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},i=function(){function t(){r(this,t)}return n(t,null,{init:{value:function(t,e,n){if("undefined"==typeof t)throw new Error("init: invalid argument");if(this.ASTy=!0,this.T=t,this.L={L:0,C:0,O:0},this.A={},this.C=[],this.P=null,"object"==typeof e)for(var r in e)e.hasOwnProperty(r)&&this.set(r,e[r]);return"object"==typeof n&&n instanceof Array&&this.add(n),this},writable:!0,configurable:!0},type:{value:function(t){if(0===arguments.length)return this.T;if(1===arguments.length)return this.T=t,this;throw new Error("type: invalid number of arguments")},writable:!0,configurable:!0},pos:{value:function(t,e,n){if(0===arguments.length)return this.L;if(arguments.length<=3)return this.L.L=t||0,this.L.C=e||0,this.L.O=n||0,this;throw new Error("pos: invalid number of arguments")},writable:!0,configurable:!0},set:{value:function(){var t=this,e=arguments;if(1===arguments.length&&"object"==typeof arguments[0])!function(){var n=e;Object.keys(n[0]).forEach(function(e){t.A[e]=n[0][e]})}();else{if(2!==arguments.length)throw new Error("set: invalid arguments");this.A[arguments[0]]=arguments[1]}return this},writable:!0,configurable:!0},get:{value:function(t){if(1!==arguments.length)throw new Error("get: invalid number of arguments");if("string"!=typeof t)throw new Error("get: invalid argument");return this.A[t]},writable:!0,configurable:!0},attrs:{value:function(){return Object.keys(this.A)},writable:!0,configurable:!0},add:{value:function(){var t=this;if(0===arguments.length)throw new Error("add: missing argument(s)");var e=function(t,e){if(!("object"==typeof e&&"string"==typeof e.T&&"object"==typeof e.L&&"object"==typeof e.A&&"object"==typeof e.P&&"object"==typeof e.C&&e.C instanceof Array))throw new Error("add: invalid AST node: "+JSON.stringify(e));t.C.push(e),e.P=t};return null!==arguments&&Array.prototype.slice.call(arguments,0).forEach(function(n){"object"==typeof n&&n instanceof Array?n.forEach(function(n){e(t,n)}):null!==n&&e(t,n)}),this},writable:!0,configurable:!0},del:{value:function(){var t=this;if(0===arguments.length)throw new Error("del: invalid argument");return Array.prototype.slice.call(arguments,0).forEach(function(e){for(var n=!1,r=0;r<t.C.length;r++)if(t.C[r]===e){t.C.splice(r,1),e.P=null,n=!0;break}if(!n)throw new Error("del: child not found")}),this},writable:!0,configurable:!0},childs:{value:function(){return this.C},writable:!0,configurable:!0},parent:{value:function(){return this.P},writable:!0,configurable:!0}}),t}();e.exports=i},{}],2:[function(t,e){"use strict";var n=function(t,e,n){e&&Object.defineProperties(t,e),n&&Object.defineProperties(t.prototype,n)},r=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},i=function(){function t(){r(this,t)}return n(t,null,{dump:{value:function(t){void 0===t&&(t=1/0);var e="";return this.walk(function(n,r){if(!(r>t)){for(var i=0;r>i;i++)e+=" ";e+=n.T+" ";var o=Object.keys(n.A);o.length>0&&!function(){e+="(";var t=!0;o.forEach(function(r){t?t=!1:e+=", ",e+=r+": ";var i=n.A[r];switch(typeof i){case"string":e+='"'+i.replace(/\n/,"\\n").replace(/"/,'\\"')+'"';break;case"object":e+=i instanceof RegExp?"/"+i.toString().replace(/^\//,"").replace(/\/$/,"").replace(/\//g,"\\/")+"/":JSON.stringify(i);break;default:e+=JSON.stringify(i)}}),e+=") "}(),e+="["+n.L.L+"/"+n.L.C+"]\n"}},"downward"),e},writable:!0,configurable:!0}}),t}();e.exports=i},{}],3:[function(t,e){"use strict";var n=function(t,e,n){e&&Object.defineProperties(t,e),n&&Object.defineProperties(t.prototype,n)},r=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},i=function(){function t(){r(this,t)}return n(t,null,{merge:{value:function(t,e,n){var r=this;if("object"!=typeof t)throw new Error("merge: invalid AST node argument");if("undefined"==typeof e&&(e=!1),"undefined"==typeof n&&(n={}),e){var i=t.pos();this.pos(i.L,i.C,i.O)}return t.attrs().forEach(function(e){var i="undefined"!=typeof n[e]?n[e]:e;null!==i&&r.set(i,t.get(e))}),t.childs().forEach(function(t){r.add(t)}),this},writable:!0,configurable:!0}}),t}();e.exports=i},{}],4:[function(t,e){"use strict";var n={major:1,minor:0,micro:5,date:20150215};e.exports=n},{}],5:[function(t,e){"use strict";var n=function(t,e,n){e&&Object.defineProperties(t,e),n&&Object.defineProperties(t.prototype,n)},r=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},i=function(){function t(){r(this,t)}return n(t,null,{walk:{value:function(t,e){"undefined"==typeof e&&(e="downward");var n=function(r,i,o){("downward"===e||"both"===e)&&t.call(null,r,i,o,"downward"),r.C.forEach(function(t){n(t,i+1,r)}),("upward"===e||"both"===e)&&t.call(null,r,i,o,"upward")};return n(this,0,null),this},writable:!0,configurable:!0}}),t}();e.exports=i},{}],6:[function(t,e){"use strict";var n=function(t){return t&&t.__esModule?t["default"]:t},r=function(t,e,n){e&&Object.defineProperties(t,e),n&&Object.defineProperties(t.prototype,n)},i=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},o=n(t("./asty-base.js")),a=n(t("./asty-merge.js")),u=n(t("./asty-walk.js")),f=n(t("./asty-dump.js")),s=n(t("./asty-version.js")),c=function(){function t(){var e=this;i(this,t),this.ASTYNode=function(){};var n=[[o,"init","type","pos","set","get","attrs","add","del","childs","parent"],[a,"merge"],[u,"walk"],[f,"dump"]];return n.forEach(function(t){var n=t[0].prototype;t.slice(1).forEach(function(t){e.ASTYNode.prototype[t]=n[t]})}),this}return r(t,null,{version:{value:function(){return s},writable:!0,configurable:!0},extend:{value:function(t){for(var e in t)t.hasOwnProperty(e)&&(this.ASTYNode.prototype[e]=t[e]);return this},writable:!0,configurable:!0},create:{value:function(t){return(new this.ASTYNode).init(t)},writable:!0,configurable:!0},isA:{value:function(t){return"object"==typeof t&&t instanceof this.ASTYNode&&"boolean"==typeof t.ASTy&&t.ASTy===!0},writable:!0,configurable:!0}}),t}();e.exports=c},{"./asty-base.js":1,"./asty-dump.js":2,"./asty-merge.js":3,"./asty-version.js":4,"./asty-walk.js":5}]},{},[1,2,3,4,5,6])(6)});
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})

@@ -37,0 +37,0 @@

@@ -124,5 +124,5 @@ /*

/* allow us to be called without "new" */
if (!(this instanceof ASTYASTQ)) return new ASTYASTQ();
/* give ASTy super class a chance to initialize */
if (!(this instanceof ASTYASTQ)) {
return new ASTYASTQ();
} /* give ASTy super class a chance to initialize */
_get(Object.getPrototypeOf(ASTYASTQ.prototype), "constructor", this).call(this);

@@ -129,0 +129,0 @@

{
"name": "asty-astq",
"version": "1.0.5",
"version": "1.0.6",
"description": "Abstract Syntax Tree With Integrated Query Engine",

@@ -30,3 +30,3 @@ "keywords": [ "ast", "abstract", "syntax", "tree", "query", "engine", "integration", "asty", "astq" ],

"chai": "~2.0.0",
"6to5ify": "~4.1.0",
"babelify": "~5.0.3",
"minifyify": "~6.1.0",

@@ -37,5 +37,5 @@ "browserify-header": "~0.9.1",

"dependencies": {
"asty": "~1.0.4",
"astq": "~1.2.3"
"asty": "~1.0.5",
"astq": "~1.2.4"
}
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc