-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapg-exp-min.js
7 lines (7 loc) · 195 KB
/
apg-exp-min.js
1
2
3
4
5
6
7
!function(e){function t(n){if(r[n])return r[n].exports;var s=r[n]={i:n,l:!1,exports:{}};return e[n].call(s.exports,s,s.exports,t),s.l=!0,s.exports}var r={};return t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=35)}([function(e,t,r){"use strict";t.ast=r(36),t.circular=r(8),t.ids=r(1),t.parser=r(37),t.stats=r(38),t.trace=r(39),t.utils=r(2),t.emitcss=r(9),t.style=r(3)},function(e,t,r){"use strict";e.exports={ALT:1,CAT:2,REP:3,RNM:4,TRG:5,TBS:6,TLS:7,UDT:11,AND:12,NOT:13,BKR:14,BKA:15,BKN:16,ABG:17,AEN:18,ACTIVE:100,MATCH:101,EMPTY:102,NOMATCH:103,SEM_PRE:200,SEM_POST:201,SEM_OK:300,SEM_SKIP:301,ATTR_N:400,ATTR_R:401,ATTR_MR:402,ATTR_NMR:403,ATTR_RMR:404,LOOKAROUND_NONE:500,LOOKAROUND_AHEAD:501,LOOKAROUND_BEHIND:502,BKR_MODE_UM:601,BKR_MODE_PM:602,BKR_MODE_CS:603,BKR_MODE_CI:604}},function(e,t,r){"use strict";var n="utilities.js: ",s=r(3),i=r(5).converter,a=this,o=function(e,t,r){for(var n;;){if(e<=0){t=0,n=0;break}if("number"!=typeof t){t=0,n=e;break}if(t>=e){t=e,n=e;break}if("number"!=typeof r){n=e;break}if(n=t+r,n>e){n=e;break}break}return{beg:t,end:n}};t.htmlToPage=function(e,t){var n="utilities.js: ",s=r(9);if("string"!=typeof e)throw new Error(n+"htmlToPage: input HTML is not a string");"string"!=typeof t&&(t="htmlToPage");var i="";return i+="<!DOCTYPE html>\n",i+='<html lang="en">\n',i+="<head>\n",i+='<meta charset="utf-8">\n',i+="<title>"+t+"</title>\n",i+="<style>\n",i+=s(),i+="</style>\n",i+="</head>\n<body>\n",i+="<p>"+new Date+"</p>\n",i+=e,i+="</body>\n</html>\n"},t.parserResultToHtml=function(e,t){var n=r(1),i=null;"string"==typeof t&&""!==t&&(i=t);var a,o;a=e.success===!0?'<span class="'+s.CLASS_MATCH+'">true</span>':'<span class="'+s.CLASS_NOMATCH+'">false</span>',o=e.state===n.EMPTY?'<span class="'+s.CLASS_EMPTY+'">EMPTY</span>':e.state===n.MATCH?'<span class="'+s.CLASS_MATCH+'">MATCH</span>':e.state===n.NOMATCH?'<span class="'+s.CLASS_NOMATCH+'">NOMATCH</span>':'<span class="'+s.CLASS_NOMATCH+'">unrecognized</span>';var l="";return l+='<table class="'+s.CLASS_STATE+'">\n',i&&(l+="<caption>"+i+"</caption>\n"),l+="<tr><th>state item</th><th>value</th><th>description</th></tr>\n",l+="<tr><td>parser success</td><td>"+a+"</td>\n",l+='<td><span class="'+s.CLASS_MATCH+'">true</span> if the parse succeeded,\n',l+=' <span class="'+s.CLASS_NOMATCH+'">false</span> otherwise',l+="<br><i>NOTE: for success, entire string must be matched</i></td></tr>\n",l+="<tr><td>parser state</td><td>"+o+"</td>\n",l+='<td><span class="'+s.CLASS_EMPTY+'">EMPTY</span>, ',l+='<span class="'+s.CLASS_MATCH+'">MATCH</span> or \n',l+='<span class="'+s.CLASS_NOMATCH+'">NOMATCH</span></td></tr>\n',l+="<tr><td>string length</td><td>"+e.length+"</td><td>length of the input (sub)string</td></tr>\n",l+="<tr><td>matched length</td><td>"+e.matched+"</td><td>number of input string characters matched</td></tr>\n",l+="<tr><td>max matched</td><td>"+e.maxMatched+"</td><td>maximum number of input string characters matched</td></tr>\n",l+="<tr><td>max tree depth</td><td>"+e.maxTreeDepth+"</td><td>maximum depth of the parse tree reached</td></tr>\n",l+="<tr><td>node hits</td><td>"+e.nodeHits+"</td><td>number of parse tree node hits (opcode function calls)</td></tr>\n",l+="<tr><td>input length</td><td>"+e.inputLength+"</td><td>length of full input string</td></tr>\n",l+="<tr><td>sub-string begin</td><td>"+e.subBegin+"</td><td>sub-string first character index</td></tr>\n",l+="<tr><td>sub-string end</td><td>"+e.subEnd+"</td><td>sub-string end-of-string index</td></tr>\n",l+="<tr><td>sub-string length</td><td>"+e.subLength+"</td><td>sub-string length</td></tr>\n",l+="</table>\n"},t.charsToString=function(e,t,r){var n=e.slice(t,t+r),s=i.encode("UTF16LE",n);return s.toString("utf16le")},t.stringToChars=function(e){return i.decode("STRING",e)},t.opcodeToString=function(e){var t=r(1),n="unknown";switch(e){case t.ALT:n="ALT";break;case t.CAT:n="CAT";break;case t.RNM:n="RNM";break;case t.UDT:n="UDT";break;case t.AND:n="AND";break;case t.NOT:n="NOT";break;case t.REP:n="REP";break;case t.TRG:n="TRG";break;case t.TBS:n="TBS";break;case t.TLS:n="TLS";break;case t.BKR:n="BKR";break;case t.BKA:n="BKA";break;case t.BKN:n="BKN";break;case t.ABG:n="ABG";break;case t.AEN:n="AEN"}return n},t.asciiChars=["NUL","SOH","STX","ETX","EOT","ENQ","ACK","BEL","BS","TAB","LF","VT","FF","CR","SO","SI","DLE","DC1","DC2","DC3","DC4","NAK","SYN","ETB","CAN","EM","SUB","ESC","FS","GS","RS","US"," ","!",""","#","$","%","&","'","(",")","*","+",",","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","?","@","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","[","\","]","^","_","`","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","{","|","}","~","DEL"],t.charToHex=function(e){var t=e.toString(16).toUpperCase();switch(t.length){case 1:case 3:case 7:t="0"+t;break;case 6:t="00"+t;break;case 5:t="000"+t}return t},t.charsToDec=function(e,t,r){var s="";if(!Array.isArray(e))throw new Error(n+"charsToDec: input must be an array of integers");var i=o(e.length,t,r);if(i.end>i.beg){s+=e[i.beg];for(var a=i.beg+1;a<i.end;a+=1)s+=","+e[a]}return s},t.charsToHex=function(e,t,r){var s="";if(!Array.isArray(e))throw new Error(n+"charsToHex: input must be an array of integers");var i=o(e.length,t,r);if(i.end>i.beg){s+="\\x"+a.charToHex(e[i.beg]);for(var l=i.beg+1;l<i.end;l+=1)s+=",\\x"+a.charToHex(e[l])}return s},t.charsToUnicode=function(e,t,r){var s="";if(!Array.isArray(e))throw new Error(n+"charsToUnicode: input must be an array of integers");var i=o(e.length,t,r);if(i.end>i.beg){s+="U+"+a.charToHex(e[i.beg]);for(var l=i.beg+1;l<i.end;l+=1)s+=",U+"+a.charToHex(e[l])}return s},t.charsToJsUnicode=function(e,t,r){var s="";if(!Array.isArray(e))throw new Error(n+"charsToJsUnicode: input must be an array of integers");var i=o(e.length,t,r);if(i.end>i.beg){s+="\\u"+a.charToHex(e[i.beg]);for(var l=i.beg+1;l<i.end;l+=1)s+=",\\u"+a.charToHex(e[l])}return s},t.charsToAscii=function(e,t,r){var s="";if(!Array.isArray(e))throw new Error(n+"charsToAscii: input must be an array of integers");for(var i=o(e.length,t,r),l=i.beg;l<i.end;l+=1){var c=e[l];s+=c>=32&&c<=126?String.fromCharCode(c):"\\x"+a.charToHex(c)}return s},t.charsToAsciiHtml=function(e,t,r){if(!Array.isArray(e))throw new Error(n+"charsToAsciiHtml: input must be an array of integers");for(var i,l="",c=o(e.length,t,r),h=c.beg;h<c.end;h+=1)i=e[h],l+=i<32||127===i?'<span class="'+s.CLASS_CTRLCHAR+'">'+a.asciiChars[i]+"</span>":i>127?'<span class="'+s.CLASS_CTRLCHAR+'">U+'+a.charToHex(i)+"</span>":a.asciiChars[i];return l},t.stringToAsciiHtml=function(e){var t=i.decode("STRING",e);return this.charsToAsciiHtml(t)}},function(e,t){e.exports={CLASS_MONOSPACE:"apg-mono",CLASS_ACTIVE:"apg-active",CLASS_EMPTY:"apg-empty",CLASS_MATCH:"apg-match",CLASS_NOMATCH:"apg-nomatch",CLASS_LOOKAHEAD:"apg-lh-match",CLASS_LOOKBEHIND:"apg-lb-match",CLASS_REMAINDER:"apg-remainder",CLASS_CTRLCHAR:"apg-ctrl-char",CLASS_LINEEND:"apg-line-end",CLASS_ERROR:"apg-error",CLASS_PHRASE:"apg-phrase",CLASS_EMPTYPHRASE:"apg-empty-phrase",CLASS_STATE:"apg-state",CLASS_STATS:"apg-stats",CLASS_TRACE:"apg-trace",CLASS_GRAMMAR:"apg-grammar",CLASS_RULES:"apg-rules",CLASS_RULESLINK:"apg-rules-link",CLASS_ATTRIBUTES:"apg-attrs"}},function(e,t,r){"use strict";(function(e){function n(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}function s(){return a.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(e,t){if(s()<t)throw new RangeError("Invalid typed array length");return a.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t),e.__proto__=a.prototype):(null===e&&(e=new a(t)),e.length=t),e}function a(e,t,r){if(!(a.TYPED_ARRAY_SUPPORT||this instanceof a))return new a(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return h(this,e)}return o(this,e,t,r)}function o(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?d(e,t,r,n):"string"==typeof t?u(e,t,r):f(e,t)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function c(e,t,r,n){return l(t),t<=0?i(e,t):void 0!==r?"string"==typeof n?i(e,t).fill(r,n):i(e,t).fill(r):i(e,t)}function h(e,t){if(l(t),e=i(e,t<0?0:0|g(t)),!a.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function u(e,t,r){if("string"==typeof r&&""!==r||(r="utf8"),!a.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|b(t,r);e=i(e,n);var s=e.write(t,r);return s!==n&&(e=e.slice(0,s)),e}function p(e,t){var r=t.length<0?0:0|g(t.length);e=i(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function d(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");return t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n),a.TYPED_ARRAY_SUPPORT?(e=t,e.__proto__=a.prototype):e=p(e,t),e}function f(e,t){if(a.isBuffer(t)){var r=0|g(t.length);return e=i(e,r),0===e.length?e:(t.copy(e,0,0,r),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||X(t.length)?i(e,0):p(e,t);if("Buffer"===t.type&&Q(t.data))return p(e,t.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function g(e){if(e>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function m(e){return+e!=e&&(e=0),a.alloc(+e)}function b(e,t){if(a.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return q(e).length;default:if(n)return G(e).length;t=(""+t).toLowerCase(),n=!0}}function y(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if(r>>>=0,t>>>=0,r<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return B(this,t,r);case"utf8":case"utf-8":return O(this,t,r);case"ascii":return L(this,t,r);case"latin1":case"binary":return _(this,t,r);case"base64":return M(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function x(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function T(e,t,r,n,s){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=s?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(s)return-1;r=e.length-1}else if(r<0){if(!s)return-1;r=0}if("string"==typeof t&&(t=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:E(e,t,r,n,s);if("number"==typeof t)return t=255&t,a.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?s?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):E(e,[t],r,n,s);throw new TypeError("val must be string, number or Buffer")}function E(e,t,r,n,s){function i(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,o=e.length,l=t.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,o/=2,l/=2,r/=2}var c;if(s){var h=-1;for(c=r;c<o;c++)if(i(e,c)===i(t,h===-1?0:c-h)){if(h===-1&&(h=c),c-h+1===l)return h*a}else h!==-1&&(c-=c-h),h=-1}else for(r+l>o&&(r=o-l),c=r;c>=0;c--){for(var u=!0,p=0;p<l;p++)if(i(e,c+p)!==i(t,p)){u=!1;break}if(u)return c}return-1}function k(e,t,r,n){r=Number(r)||0;var s=e.length-r;n?(n=Number(n),n>s&&(n=s)):n=s;var i=t.length;if(i%2!==0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var a=0;a<n;++a){var o=parseInt(t.substr(2*a,2),16);if(isNaN(o))return a;e[r+a]=o}return a}function A(e,t,r,n){return J(G(t,e.length-r),e,r,n)}function v(e,t,r,n){return J($(t),e,r,n)}function w(e,t,r,n){return v(e,t,r,n)}function S(e,t,r,n){return J(q(t),e,r,n)}function C(e,t,r,n){return J(z(t,e.length-r),e,r,n)}function M(e,t,r){return 0===t&&r===e.length?W.fromByteArray(e):W.fromByteArray(e.slice(t,r))}function O(e,t,r){r=Math.min(e.length,r);for(var n=[],s=t;s<r;){var i=e[s],a=null,o=i>239?4:i>223?3:i>191?2:1;if(s+o<=r){var l,c,h,u;switch(o){case 1:i<128&&(a=i);break;case 2:l=e[s+1],128===(192&l)&&(u=(31&i)<<6|63&l,u>127&&(a=u));break;case 3:l=e[s+1],c=e[s+2],128===(192&l)&&128===(192&c)&&(u=(15&i)<<12|(63&l)<<6|63&c,u>2047&&(u<55296||u>57343)&&(a=u));break;case 4:l=e[s+1],c=e[s+2],h=e[s+3],128===(192&l)&&128===(192&c)&&128===(192&h)&&(u=(15&i)<<18|(63&l)<<12|(63&c)<<6|63&h,u>65535&&u<1114112&&(a=u))}}null===a?(a=65533,o=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),s+=o}return R(n)}function R(e){var t=e.length;if(t<=ee)return String.fromCharCode.apply(String,e);for(var r="",n=0;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=ee));return r}function L(e,t,r){var n="";r=Math.min(e.length,r);for(var s=t;s<r;++s)n+=String.fromCharCode(127&e[s]);return n}function _(e,t,r){var n="";r=Math.min(e.length,r);for(var s=t;s<r;++s)n+=String.fromCharCode(e[s]);return n}function B(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var s="",i=t;i<r;++i)s+=V(e[i]);return s}function N(e,t,r){for(var n=e.slice(t,r),s="",i=0;i<n.length;i+=2)s+=String.fromCharCode(n[i]+256*n[i+1]);return s}function P(e,t,r){if(e%1!==0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function H(e,t,r,n,s,i){if(!a.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>s||t<i)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function I(e,t,r,n){t<0&&(t=65535+t+1);for(var s=0,i=Math.min(e.length-r,2);s<i;++s)e[r+s]=(t&255<<8*(n?s:1-s))>>>8*(n?s:1-s)}function D(e,t,r,n){t<0&&(t=4294967295+t+1);for(var s=0,i=Math.min(e.length-r,4);s<i;++s)e[r+s]=t>>>8*(n?s:3-s)&255}function U(e,t,r,n,s,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function F(e,t,r,n,s){return s||U(e,t,r,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(e,t,r,n,23,4),r+4}function K(e,t,r,n,s){return s||U(e,t,r,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(e,t,r,n,52,8),r+8}function Y(e){if(e=j(e).replace(te,""),e.length<2)return"";for(;e.length%4!==0;)e+="=";return e}function j(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function V(e){return e<16?"0"+e.toString(16):e.toString(16)}function G(e,t){t=t||1/0;for(var r,n=e.length,s=null,i=[],a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!s){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&i.push(239,191,189);continue}s=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),s=r;continue}r=(s-55296<<10|r-56320)+65536}else s&&(t-=3)>-1&&i.push(239,191,189);if(s=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return i}function $(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}function z(e,t){for(var r,n,s,i=[],a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,s=r%256,i.push(s),i.push(n);return i}function q(e){return W.toByteArray(Y(e))}function J(e,t,r,n){for(var s=0;s<n&&!(s+r>=t.length||s>=e.length);++s)t[s+r]=e[s];return s}function X(e){return e!==e}var W=r(12),Z=r(13),Q=r(14);t.Buffer=a,t.SlowBuffer=m,t.INSPECT_MAX_BYTES=50,a.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:n(),t.kMaxLength=s(),a.poolSize=8192,a._augment=function(e){return e.__proto__=a.prototype,e},a.from=function(e,t,r){return o(null,e,t,r)},a.TYPED_ARRAY_SUPPORT&&(a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0})),a.alloc=function(e,t,r){return c(null,e,t,r)},a.allocUnsafe=function(e){return h(null,e)},a.allocUnsafeSlow=function(e){return h(null,e)},a.isBuffer=function(e){return!(null==e||!e._isBuffer)},a.compare=function(e,t){if(!a.isBuffer(e)||!a.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,s=0,i=Math.min(r,n);s<i;++s)if(e[s]!==t[s]){r=e[s],n=t[s];break}return r<n?-1:n<r?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!Q(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=a.allocUnsafe(t),s=0;for(r=0;r<e.length;++r){var i=e[r];if(!a.isBuffer(i))throw new TypeError('"list" argument must be an Array of Buffers');i.copy(n,s),s+=i.length}return n},a.byteLength=b,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)x(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)x(this,t,t+3),x(this,t+1,t+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)x(this,t,t+7),x(this,t+1,t+6),x(this,t+2,t+5),x(this,t+3,t+4);return this},a.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?O(this,0,e):y.apply(this,arguments)},a.prototype.equals=function(e){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},a.prototype.compare=function(e,t,r,n,s){if(!a.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===s&&(s=this.length),t<0||r>e.length||n<0||s>this.length)throw new RangeError("out of range index");if(n>=s&&t>=r)return 0;if(n>=s)return-1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,s>>>=0,this===e)return 0;for(var i=s-n,o=r-t,l=Math.min(i,o),c=this.slice(n,s),h=e.slice(t,r),u=0;u<l;++u)if(c[u]!==h[u]){i=c[u],o=h[u];break}return i<o?-1:o<i?1:0},a.prototype.includes=function(e,t,r){return this.indexOf(e,t,r)!==-1},a.prototype.indexOf=function(e,t,r){return T(this,e,t,r,!0)},a.prototype.lastIndexOf=function(e,t,r){return T(this,e,t,r,!1)},a.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t=0|t,isFinite(r)?(r=0|r,void 0===n&&(n="utf8")):(n=r,r=void 0)}var s=this.length-t;if((void 0===r||r>s)&&(r=s),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return k(this,e,t,r);case"utf8":case"utf-8":return A(this,e,t,r);case"ascii":return v(this,e,t,r);case"latin1":case"binary":return w(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t,r);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var ee=4096;a.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),t<0?(t+=r,t<0&&(t=0)):t>r&&(t=r),t<e&&(t=e);var n;if(a.TYPED_ARRAY_SUPPORT)n=this.subarray(e,t),n.__proto__=a.prototype;else{var s=t-e;n=new a(s,void 0);for(var i=0;i<s;++i)n[i]=this[i+e]}return n},a.prototype.readUIntLE=function(e,t,r){e=0|e,t=0|t,r||P(e,t,this.length);for(var n=this[e],s=1,i=0;++i<t&&(s*=256);)n+=this[e+i]*s;return n},a.prototype.readUIntBE=function(e,t,r){e=0|e,t=0|t,r||P(e,t,this.length);for(var n=this[e+--t],s=1;t>0&&(s*=256);)n+=this[e+--t]*s;return n},a.prototype.readUInt8=function(e,t){return t||P(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return t||P(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return t||P(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUInt32BE=function(e,t){return t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,r){e=0|e,t=0|t,r||P(e,t,this.length);for(var n=this[e],s=1,i=0;++i<t&&(s*=256);)n+=this[e+i]*s;return s*=128,n>=s&&(n-=Math.pow(2,8*t)),n},a.prototype.readIntBE=function(e,t,r){e=0|e,t=0|t,r||P(e,t,this.length);for(var n=t,s=1,i=this[e+--n];n>0&&(s*=256);)i+=this[e+--n]*s;return s*=128,i>=s&&(i-=Math.pow(2,8*t)),i},a.prototype.readInt8=function(e,t){return t||P(e,1,this.length),128&this[e]?(255-this[e]+1)*-1:this[e]},a.prototype.readInt16LE=function(e,t){t||P(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(e,t){t||P(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(e,t){return t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return t||P(e,4,this.length),Z.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return t||P(e,4,this.length),Z.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return t||P(e,8,this.length),Z.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return t||P(e,8,this.length),Z.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t=0|t,r=0|r,!n){var s=Math.pow(2,8*r)-1;H(this,e,t,r,s,0)}var i=1,a=0;for(this[t]=255&e;++a<r&&(i*=256);)this[t+a]=e/i&255;return t+r},a.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t=0|t,r=0|r,!n){var s=Math.pow(2,8*r)-1;H(this,e,t,r,s,0)}var i=r-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+r},a.prototype.writeUInt8=function(e,t,r){return e=+e,t=0|t,r||H(this,e,t,1,255,0),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,r){return e=+e,t=0|t,r||H(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},a.prototype.writeUInt16BE=function(e,t,r){return e=+e,t=0|t,r||H(this,e,t,2,65535,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},a.prototype.writeUInt32LE=function(e,t,r){return e=+e,t=0|t,r||H(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):D(this,e,t,!0),t+4},a.prototype.writeUInt32BE=function(e,t,r){return e=+e,t=0|t,r||H(this,e,t,4,4294967295,0),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},a.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t=0|t,!n){var s=Math.pow(2,8*r-1);H(this,e,t,r,s-1,-s)}var i=0,a=1,o=0;for(this[t]=255&e;++i<r&&(a*=256);)e<0&&0===o&&0!==this[t+i-1]&&(o=1),this[t+i]=(e/a>>0)-o&255;return t+r},a.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t=0|t,!n){var s=Math.pow(2,8*r-1);H(this,e,t,r,s-1,-s)}var i=r-1,a=1,o=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/a>>0)-o&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e=+e,t=0|t,r||H(this,e,t,1,127,-128),a.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e=+e,t=0|t,r||H(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},a.prototype.writeInt16BE=function(e,t,r){return e=+e,t=0|t,r||H(this,e,t,2,32767,-32768),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},a.prototype.writeInt32LE=function(e,t,r){return e=+e,t=0|t,r||H(this,e,t,4,2147483647,-2147483648),a.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):D(this,e,t,!0),t+4},a.prototype.writeInt32BE=function(e,t,r){return e=+e,t=0|t,r||H(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),a.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},a.prototype.writeFloatLE=function(e,t,r){return F(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return F(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return K(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return K(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var s,i=n-r;if(this===e&&r<t&&t<n)for(s=i-1;s>=0;--s)e[s+t]=this[s+r];else if(i<1e3||!a.TYPED_ARRAY_SUPPORT)for(s=0;s<i;++s)e[s+t]=this[s+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+i),t);return i},a.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var s=e.charCodeAt(0);s<256&&(e=s)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e=255&e);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var i;if("number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{var o=a.isBuffer(e)?e:G(new a(e,n).toString()),l=o.length;for(i=0;i<r-t;++i)this[i+t]=o[i%l]}return this};var te=/[^+\/0-9A-Za-z-_]/g}).call(t,r(11))},function(e,t,r){"use strict";t.converter=r(27),t.transformers=r(6)},function(e,t,r){(function(e){"use strict;";var r=this,n=4294967292,s=4294967293,i=4294967294,a=4294967295,o=[0,1,3,7,15,31,63,127,255,511,1023],l=["00","01","02","03","04","05","06","07","08","09","0A","0B","0C","0D","0E","0F","10","11","12","13","14","15","16","17","18","19","1A","1B","1C","1D","1E","1F","20","21","22","23","24","25","26","27","28","29","2A","2B","2C","2D","2E","2F","30","31","32","33","34","35","36","37","38","39","3A","3B","3C","3D","3E","3F","40","41","42","43","44","45","46","47","48","49","4A","4B","4C","4D","4E","4F","50","51","52","53","54","55","56","57","58","59","5A","5B","5C","5D","5E","5F","60","61","62","63","64","65","66","67","68","69","6A","6B","6C","6D","6E","6F","70","71","72","73","74","75","76","77","78","79","7A","7B","7C","7D","7E","7F","80","81","82","83","84","85","86","87","88","89","8A","8B","8C","8D","8E","8F","90","91","92","93","94","95","96","97","98","99","9A","9B","9C","9D","9E","9F","A0","A1","A2","A3","A4","A5","A6","A7","A8","A9","AA","AB","AC","AD","AE","AF","B0","B1","B2","B3","B4","B5","B6","B7","B8","B9","BA","BB","BC","BD","BE","BF","C0","C1","C2","C3","C4","C5","C6","C7","C8","C9","CA","CB","CC","CD","CE","CF","D0","D1","D2","D3","D4","D5","D6","D7","D8","D9","DA","DB","DC","DD","DE","DF","E0","E1","E2","E3","E4","E5","E6","E7","E8","E9","EA","EB","EC","ED","EE","EF","F0","F1","F2","F3","F4","F5","F6","F7","F8","F9","FA","FB","FC","FD","FE","FF"],c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".split(""),h=[];c.forEach(function(e){h.push(e.charCodeAt(0))}),t.utf8={encode:function(t){var r=[];return t.forEach(function(e){if(e>=0&&e<=127)r.push(e);else if(e<=2047)r.push(192+(e>>6&o[5])),r.push(128+(e&o[6]));else if(e<55296||e>57343&&e<=65535)r.push(224+(e>>12&o[4])),r.push(128+(e>>6&o[6])),r.push(128+(e&o[6]));else{if(!(e>=65536&&e<=1114111))throw new RangeError("utf8.encode: character out of range: char: "+e);var t=e>>16&o[5];r.push(240+(t>>2)),r.push(128+((t&o[2])<<4)+(e>>12&o[4])),r.push(128+(e>>6&o[6])),r.push(128+(e&o[6]))}}),e.from(r)},decode:function(e,t){function r(e,t){if(128!==(192&t))return s;var r=((e&o[5])<<6)+(t&o[6]);return r<128?n:r}function l(e,t,r){if(128!==(192&r)||128!==(192&t))return s;var a=((e&o[4])<<12)+((t&o[6])<<6)+(r&o[6]);return a<2048?n:a>=55296&&a<=57343?i:a}function c(e,t,r,a){if(128!==(192&a)||128!==(192&r)||128!==(192&t))return s;var l=(((e&o[3])<<2)+(t>>4&o[2])<<16)+((t&o[4])<<12)+((r&o[6])<<6)+(a&o[6]);return l<65536?n:l>1114111?i:l}for(var h,u,p,d,f,g,m=e.length,b=t?3:0,y=[];b<m;){for(u=e[b],h=a;;){if(u>=0&&u<=127){h=u,g=1;break}if(p=b+1,p<m&&u>=194&&u<=223){h=r(u,e[p]),g=2;break}if(d=b+2,d<m&&u>=224&&u<=239){h=l(u,e[p],e[d]),g=3;break}if(f=b+3,f<m&&u>=240&&u<=244){h=c(u,e[p],e[d],e[f]),g=4;break}break}if(h>1114111){var x="byte["+b+"]";if(h===a)throw new RangeError("utf8.decode: ill-formed UTF8 byte sequence found at: "+x);if(h===s)throw new RangeError("utf8.decode: illegal trailing byte found at: "+x);if(h===i)throw new RangeError("utf8.decode: code point out of range found at: "+x);if(h===n)throw new RangeError("utf8.decode: non-shortest form found at: "+x);throw new RangeError("utf8.decode: unrecognized error found at: "+x)}y.push(h),b+=g}return y}},t.utf16be={encode:function(t){for(var r,n,s,i=[],a=0;a<t.length;a+=1)if(r=t[a],r>=0&&r<=55295||r>=57344&&r<=65535)i.push(r>>8&o[8]),i.push(r&o[8]);else{if(!(r>=65536&&r<=1114111))throw new RangeError("utf16be.encode: UTF16BE value out of range: char["+a+"]: "+r);s=r-65536,n=55296+(s>>10),s=56320+(s&o[10]),i.push(n>>8&o[8]),i.push(n&o[8]),i.push(s>>8&o[8]),i.push(s&o[8])}return e.from(i)},decode:function(e,t){if(e.length%2>0)throw new RangeError("utf16be.decode: data length must be even multiple of 2: length: "+e.length);for(var r,n,s,i,a,o,l=[],c=e.length,h=t?2:0,u=0;h<c;){for(;;){if(s=h+1,s<c){if(a=(e[h]<<8)+e[s],a<55296||a>57343){r=a,n=2;break}if(i=h+3,i<c&&(o=(e[h+2]<<8)+e[i],a<=56319&&o>=56320&&o<=57343)){r=65536+(a-55296<<10)+(o-56320),n=4;break}}throw new RangeError("utf16be.decode: ill-formed UTF16BE byte sequence found: byte["+h+"]")}l[u++]=r,h+=n}return l}},t.utf16le={encode:function(t){for(var r,n,s,i=[],a=0;a<t.length;a+=1)if(r=t[a],r>=0&&r<=55295||r>=57344&&r<=65535)i.push(r&o[8]),i.push(r>>8&o[8]);else{if(!(r>=65536&&r<=1114111))throw new RangeError("utf16le.encode: UTF16LE value out of range: char["+a+"]: "+r);s=r-65536,n=55296+(s>>10),
s=56320+(s&o[10]),i.push(n&o[8]),i.push(n>>8&o[8]),i.push(s&o[8]),i.push(s>>8&o[8])}return e.from(i)},decode:function(e,t){if(e.length%2>0)throw new RangeError("utf16le.decode: data length must be even multiple of 2: length: "+e.length);for(var r,n,s,i,a,o,l=[],c=e.length,h=t?2:0,u=0;h<c;){for(;;){if(s=h+1,s<c){if(a=(e[s]<<8)+e[h],a<55296||a>57343){r=a,n=2;break}if(i=h+3,i<c&&(o=(e[i]<<8)+e[h+2],a<=56319&&o>=56320&&o<=57343)){r=65536+(a-55296<<10)+(o-56320),n=4;break}}throw new RangeError("utf16le.decode: ill-formed UTF16LE byte sequence found: byte["+h+"]")}l[u++]=r,h+=n}return l}},t.utf32be={encode:function(t){var r=e.alloc(4*t.length),n=0;return t.forEach(function(e){if(e>=55296&&e<=57343||e>1114111)throw new RangeError("utf32be.encode: UTF32BE character code out of range: char["+n/4+"]: "+e);r[n++]=e>>24&o[8],r[n++]=e>>16&o[8],r[n++]=e>>8&o[8],r[n++]=e&o[8]}),r},decode:function(e,t){if(e.length%4>0)throw new RangeError("utf32be.decode: UTF32BE byte length must be even multiple of 4: length: "+e.length);for(var r=[],n=t?4:0;n<e.length;n+=4){var s=(e[n]<<24)+(e[n+1]<<16)+(e[n+2]<<8)+e[n+3];if(s>=55296&&s<=57343||s>1114111)throw new RangeError("utf32be.decode: UTF32BE character code out of range: char["+n/4+"]: "+s);r.push(s)}return r}},t.utf32le={encode:function(t){var r=e.alloc(4*t.length),n=0;return t.forEach(function(e){if(e>=55296&&e<=57343||e>1114111)throw new RangeError("utf32le.encode: UTF32LE character code out of range: char["+n/4+"]: "+e);r[n++]=e&o[8],r[n++]=e>>8&o[8],r[n++]=e>>16&o[8],r[n++]=e>>24&o[8]}),r},decode:function(e,t){if(e.length%4>0)throw new RangeError("utf32be.decode: UTF32LE byte length must be even multiple of 4: length: "+e.length);for(var r=[],n=t?4:0;n<e.length;n+=4){var s=(e[n+3]<<24)+(e[n+2]<<16)+(e[n+1]<<8)+e[n];if(s>=55296&&s<=57343||s>1114111)throw new RangeError("utf32le.encode: UTF32LE character code out of range: char["+n/4+"]: "+s);r.push(s)}return r}},t.uint7={encode:function(t){for(var r=e.alloc(t.length),n=0;n<t.length;n+=1){if(t[n]>127)throw new RangeError("uint7.encode: UINT7 character code out of range: char["+n+"]: "+t[n]);r[n]=t[n]}return r},decode:function(e){for(var t=[],r=0;r<e.length;r+=1){if(e[r]>127)throw new RangeError("uint7.decode: UINT7 character code out of range: byte["+r+"]: "+e[r]);t[r]=e[r]}return t}},t.uint8={encode:function(t){for(var r=e.alloc(t.length),n=0;n<t.length;n+=1){if(t[n]>255)throw new RangeError("uint8.encode: UINT8 character code out of range: char["+n+"]: "+t[n]);r[n]=t[n]}return r},decode:function(e){for(var t=[],r=0;r<e.length;r+=1)t[r]=e[r];return t}},t.uint16be={encode:function(t){var r=e.alloc(2*t.length),n=0;return t.forEach(function(e){if(e>65535)throw new RangeError("uint16be.encode: UINT16BE character code out of range: char["+n/2+"]: "+e);r[n++]=e>>8&o[8],r[n++]=e&o[8]}),r},decode:function(e){if(e.length%2>0)throw new RangeError("uint16be.decode: UINT16BE byte length must be even multiple of 2: length: "+e.length);for(var t=[],r=0;r<e.length;r+=2)t.push((e[r]<<8)+e[r+1]);return t}},t.uint16le={encode:function(t){var r=e.alloc(2*t.length),n=0;return t.forEach(function(e){if(e>65535)throw new RangeError("uint16le.encode: UINT16LE character code out of range: char["+n/2+"]: "+e);r[n++]=e&o[8],r[n++]=e>>8&o[8]}),r},decode:function(e){if(e.length%2>0)throw new RangeError("uint16le.decode: UINT16LE byte length must be even multiple of 2: length: "+e.length);for(var t=[],r=0;r<e.length;r+=2)t.push((e[r+1]<<8)+e[r]);return t}},t.uint32be={encode:function(t){var r=e.alloc(4*t.length),n=0;return t.forEach(function(e){r[n++]=e>>24&o[8],r[n++]=e>>16&o[8],r[n++]=e>>8&o[8],r[n++]=e&o[8]}),r},decode:function(e){if(e.length%4>0)throw new RangeError("uint32be.decode: UINT32BE byte length must be even multiple of 4: length: "+e.length);for(var t=[],r=0;r<e.length;r+=4)t.push((e[r]<<24)+(e[r+1]<<16)+(e[r+2]<<8)+e[r+3]);return t}},t.uint32le={encode:function(t){var r=e.alloc(4*t.length),n=0;return t.forEach(function(e){r[n++]=e&o[8],r[n++]=e>>8&o[8],r[n++]=e>>16&o[8],r[n++]=e>>24&o[8]}),r},decode:function(e){if(e.length%4>0)throw new RangeError("uint32le.decode: UINT32LE byte length must be even multiple of 4: length: "+e.length);for(var t=[],r=0;r<e.length;r+=4)t.push((e[r+3]<<24)+(e[r+2]<<16)+(e[r+1]<<8)+e[r]);return t}},t.string={encode:function(e){return r.utf16le.encode(e).toString("utf16le")},decode:function(t){return r.utf16le.decode(e.from(t,"utf16le"),0)}},t.escaped={encode:function(t){for(var r=[],n=0;n<t.length;n+=1){var s=t[n];if(96===s)r.push(s),r.push(s);else if(10===s)r.push(s);else if(s>=32&&s<=126)r.push(s);else{var i="";if(s>=0&&s<=31)i+="`x"+l[s];else if(s>=127&&s<=255)i+="`x"+l[s];else if(s>=256&&s<=65535)i+="`u"+l[s>>8&o[8]]+l[s&o[8]];else{if(!(s>=65536&&s<=4294967295))throw new Error("escape.encode(char): char > 0xffffffff not allowed");i+="`u{";var a=s>>24&o[8];a>0&&(i+=l[a]),i+=l[s>>16&o[8]]+l[s>>8&o[8]]+l[s&o[8]]+"}"}var c=e.from(i);c.forEach(function(e){r.push(e)})}}return e.from(r)},decode:function(e){function t(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function r(e,r,n){var s={char:null,nexti:e+2,error:!0};if(e+1<r&&t(n[e])&&t(n[e+1])){var i=String.fromCodePoint(n[e],n[e+1]);s.char=parseInt(i,16),isNaN(s.char)||(s.error=!1)}return s}function n(e,r,n){var s={char:null,nexti:e+4,error:!0};if(e+3<r&&t(n[e])&&t(n[e+1])&&t(n[e+2])&&t(n[e+3])){var i=String.fromCodePoint(n[e],n[e+1],n[e+2],n[e+3]);s.char=parseInt(i,16),isNaN(s.char)||(s.error=!1)}return s}function s(e,r,n){for(var s={char:null,nexti:e+4,error:!0},i="";e<r&&t(n[e]);)i+=String.fromCodePoint(n[e]),e+=1;return s.char=parseInt(i,16),125!==n[e]||isNaN(s.char)||(s.error=!1),s.nexti=e+1,s}for(var i,a,o,l=[],c=e.length,h=0;h<c;){for(;;){if(o=!0,96!==e[h]){l.push(e[h]),h+=1,o=!1;break}if(i=h+1,i>=c)break;if(96===e[i]){l.push(96),h+=2,o=!1;break}if(120===e[i]){if(a=r(i+1,c,e),a.error)break;l.push(a.char),h=a.nexti,o=!1;break}if(117===e[i]){if(123===e[i+1]){if(a=s(i+2,c,e),a.error)break;l.push(a.char),h=a.nexti,o=!1;break}if(a=n(i+1,c,e),a.error)break;l.push(a.char),h=a.nexti,o=!1;break}break}if(o)throw new Error("escaped.decode: ill-formed escape sequence at buf["+h+"]")}return l}};var u=13,p=10;t.lineEnds={crlf:function(e){for(var t=[],r=0;r<e.length;)switch(e[r]){case u:r+=r+1<e.length&&e[r+1]===p?2:1,t.push(u),t.push(p);break;case p:t.push(u),t.push(p),r+=1;break;default:t.push(e[r]),r+=1}return t.length>0&&t[t.length-1]!==p&&(t.push(u),t.push(p)),t},lf:function(e){for(var t=[],r=0;r<e.length;)switch(e[r]){case u:r+=r+1<e.length&&e[r+1]===p?2:1,t.push(p);break;case p:t.push(p),r+=1;break;default:t.push(e[r]),r+=1}return t.length>0&&t[t.length-1]!==p&&t.push(p),t}},t.base64={encode:function(t){if(0===t.length)return e.alloc(0);var r,n,s,i=t.length%3;i=i>0?3-i:0;var a=(t.length+i)/3,l=e.alloc(4*a);i>0&&(a-=1),r=0,n=0;for(var c=0;c<a;c+=1)s=t[r++]<<16,s+=t[r++]<<8,s+=t[r++],l[n++]=h[s>>18&o[6]],l[n++]=h[s>>12&o[6]],l[n++]=h[s>>6&o[6]],l[n++]=h[s&o[6]];return 0===i?l:1===i?(s=t[r++]<<16,s+=t[r]<<8,l[n++]=h[s>>18&o[6]],l[n++]=h[s>>12&o[6]],l[n++]=h[s>>6&o[6]],l[n]=h[64],l):2===i?(s=t[r]<<16,l[n++]=h[s>>18&o[6]],l[n++]=h[s>>12&o[6]],l[n++]=h[64],l[n]=h[64],l):void 0},decode:function(t){function r(t){for(var r=[],n=0,s=0;s<t.length;s+=1)for(var i=t[s];;){if(32===i||9===i||10===i||13===i)break;if(i>=65&&i<=90){r.push(i-65);break}if(i>=97&&i<=122){r.push(i-71);break}if(i>=48&&i<=57){r.push(i+4);break}if(43===i){r.push(62);break}if(47===i){r.push(63);break}if(61===i){r.push(64),n+=1;break}throw new RangeError("base64.decode: invalid character buf["+s+"]: "+i)}if(r.length%4>0)throw new RangeError("base64.decode: string length not integral multiple of 4: "+r.length);switch(n){case 0:break;case 1:if(64!==r[r.length-1])throw new RangeError("base64.decode: one tail character found: not last character");break;case 2:if(64!==r[r.length-1]||64!==r[r.length-2])throw new RangeError("base64.decode: two tail characters found: not last characters");break;default:throw new RangeError("base64.decode: more than two tail characters found: "+n)}return{tail:n,buf:e.from(r)}}if(0===t.length)return e.alloc(0);var n,s,i,a=r(t),l=a.tail,c=a.buf,h=c.length/4,u=e.alloc(3*h-l);l>0&&(h-=1),s=0,n=0;for(var p=0;p<h;p+=1)i=c[n++]<<18,i+=c[n++]<<12,i+=c[n++]<<6,i+=c[n++],u[s++]=i>>16&o[8],u[s++]=i>>8&o[8],u[s++]=i&o[8];return 1===l&&(i=c[n++]<<18,i+=c[n++]<<12,i+=c[n]<<6,u[s++]=i>>16&o[8],u[s]=i>>8&o[8]),2===l&&(i=c[n++]<<18,i+=c[n++]<<12,u[s]=i>>16&o[8]),u},toString:function(e){function t(e,t,r,i){switch(s){case 76:n+="\r\n"+e+t+r+i,s=4;break;case 75:n+=e+"\r\n"+t+r+i,s=3;break;case 74:n+=e+t+"\r\n"+r+i,s=2;break;case 73:n+=e+t+r+"\r\n"+i,s=1;break;default:n+=e+t+r+i,s+=4}}function r(e){return e>=65&&e<=90||(e>=97&&e<=122||(e>=48&&e<=57||(43===e||(47===e||61===e))))}if(e.length%4>0)throw new RangeError("base64.toString: input buffer length not multiple of 4: "+e.length);for(var n="",s=0,i=0;i<e.length;i+=4){for(var a=i;a<i+4;a+=1)if(!r(e[a]))throw new RangeError("base64.toString: buf["+a+"]: "+e[a]+" : not valid base64 character code");t(String.fromCharCode(e[i]),String.fromCharCode(e[i+1]),String.fromCharCode(e[i+2]),String.fromCharCode(e[i+3]))}return n}}}).call(t,r(4).Buffer)},function(e,t,r){"use strict;";var n=r(0),s=n.utils,i=n.style,a=16,o=10,l=8,c=32,h=function(e,t){if(""===e)return'<span class="'+i.CLASS_EMPTY+'">𝜺</span>';if(void 0===e)return'<span class="'+i.CLASS_REMAINDER+'">undefined</span>';var r=i.CLASS_REMAINDER;"string"==typeof t&&("match"===t.toLowerCase()?r=i.CLASS_MATCH:"nomatch"===t.toLowerCase()&&(r=i.CLASS_NOMATCH));var s=n.utils.stringToChars(e),a='<span class="'+r+'">';return a+=n.utils.charsToAsciiHtml(s),a+"</span>"},u=function(e){var t="";t+=" result:\n",t+=" [0]: ",t+=e[0],t+="\n",t+=" input: "+e.input,t+="\n",t+=" index: "+e.index,t+="\n",t+=" length: "+e.length,t+="\n",t+="tree depth: "+e.treeDepth,t+="\n",t+=" node hits: "+e.nodeHits,t+="\n",t+=" rules: ";var r="",n=" : ",s=e.rules;for(var i in s){var a=s[i];if(a)for(var o=0;o<a.length;o+=1){var l=a[o];t+=r+i+" : "+l.index+": ",t+=l.phrase,t+="\n",r=n}else t+=r+i+": ",t+="undefined",t+="\n";r=n}return t},p=function(e){var t="",r="result:";t+='<table class="'+i.CLASS_STATE+'">\n',t+="<caption>"+r+"</caption>\n",t+="<tr>",t+="<th>item</th><th>value</th><th>phrase</th>",t+="</tr>\n",t+="<tr>",t+="<td>[0]</td>",t+="<td>"+e.index+"</td>",t+="<td>"+h(e[0],"match")+"</td>",t+="</tr>\n",t+="<tr>",t+="<td>input</td>",t+="<td>0</td>",t+="<td>"+h(e.input)+"</td>",t+="</tr>\n",t+="<tr>",t+="<td>index</td><td>"+e.index+"</td>",t+="<td></td>",t+="</tr>\n",t+="<tr>",t+="<td>length</td><td>"+e.length+"</td>",t+="<td></td>",t+="</tr>\n",t+="<tr>",t+="<td>tree depth</td><td>"+e.treeDepth+"</td>",t+="<td></td>",t+="</tr>\n",t+="<tr>",t+="<td>node hits</td><td>"+e.nodeHits+"</td>",t+="<td></td>",t+="</tr>\n",t+="<tr>",t+="<th>rules</th><th>index</th><th>phrase</th>",t+="</tr>\n";var n=e.rules;for(var s in n){var a=n[s];if(a)for(var o=0;o<a.length;o+=1){var l=a[o];t+="<tr>",t+="<td>"+s+"</td>",t+="<td>"+l.index+"</td>",t+="<td>"+h(l.phrase,"match")+"</td>",t+="\n"}else t+="<tr>",t+="<td>"+s+"</td>",t+="<td></td>",t+="<td>"+h(void 0)+"</td>",t+="\n"}return t+="</table>\n"},d=function(e){return s.htmlToPage(p(e),"apg-exp result")},f=function(e){var t="";if(t+=" last match:\n",t+=" lastIndex: ",t+=e.lastIndex,t+="\n",t+=' flags: "',t+=e.flags+'"',t+="\n",t+=" global: ",t+=e.global,t+="\n",t+=" sticky: ",t+=e.sticky,t+="\n",t+=" unicode: ",t+=e.unicode,t+="\n",t+=" debug: ",t+=e.debug,t+="\n",void 0===e["$&"])return t+=" last match: undefined",t+="\n";t+=" input: ",t+=e.input,t+="\n",t+=" leftContext: ",t+=e.leftContext,t+="\n",t+=" lastMatch: ",t+=e.lastMatch,t+="\n",t+="rightContext: ",t+=e.rightContext,t+="\n",t+=" rules: ";var r="",n=" : ";for(var s in e.rules)t+=r+s+" : ",t+=e.rules[s],t+="\n",r=n;t+="\n",t+="alias:\n",t+=' ["$_"]: ',t+=e.$_,t+="\n",t+=' ["$`"]: ',t+=e["$`"],t+="\n",t+=' ["$&"]: ',t+=e["$&"],t+="\n",t+=' ["$\'"]: ',t+=e["$'"],t+="\n";for(var s in e.rules)t+=' ["${'+s+'}"]: ',t+=e["${"+s+"}"],t+="\n";return t},g=function(e){var t="",r="last match:";if(t+='<table class="'+i.CLASS_STATE+'">\n',t+="<caption>"+r+"</caption>\n",t+="<tr>",t+="<th>item</th><th>value</th>",t+="</tr>\n",t+="<tr>",t+="<td>lastIndex</td>",t+="<td>"+e.lastIndex+"</td>",t+="</tr>\n",t+="<tr>",t+="<td>flags</td>",t+="<td>""+e.flags+""</td>",t+="</tr>\n",t+="<tr>",t+="<td>global</td>",t+="<td>"+e.global+"</td>",t+="</tr>\n",t+="<tr>",t+="<td>sticky</td>",t+="<td>"+e.sticky+"</td>",t+="</tr>\n",t+="<tr>",t+="<td>unicode</td>",t+="<td>"+e.unicode+"</td>",t+="</tr>\n",t+="<tr>",t+="<td>debug</td>",t+="<td>"+e.debug+"</td>",t+="</tr>\n",void 0===e["$&"])return t+="<tr>",t+="<td>lastMatch</td>",t+="<td>"+h(void 0)+"</td>",t+="</tr>\n",t+="</table>\n";t+="<th>item</th><th>phrase</th>",t+="</tr>\n",t+="<tr>",t+="<td>input</td>",t+="<td>"+h(e.input)+"</td>",t+="</tr>\n",t+="<tr>",t+="<td>leftContext</td>",t+="<td>"+h(e.leftContext)+"</td>",t+="</tr>\n",t+="<tr>",t+="<td>lastMatch</td>",t+="<td>"+h(e.lastMatch,"match")+"</td>",t+="</tr>\n",t+="<tr>",t+="<td>rightContext</td>",t+="<td>"+h(e.rightContext)+"</td>",t+="</tr>\n",t+="<tr>",t+="<th>rule</th><th>phrase</th>",t+="</tr>\n";for(var n in e.rules)t+="<tr>",t+="<td>"+n+"</td>",t+="<td>"+h(e.rules[n])+"</td>",t+="</tr>\n";t+="<tr>",t+="<th>alias</th><th>phrase</th>",t+="</tr>\n",t+="<tr>",t+='<td>["$_"]</td>',t+="<td>"+h(e.$_)+"</td>",t+="</tr>\n",t+="<tr>",t+='<td>["$`"]</td>',t+="<td>"+h(e["$`"])+"</td>",t+="</tr>\n",t+="<tr>",t+='<td>["$&"]</td>',t+="<td>"+h(e["$&"],"match")+"</td>",t+="</tr>\n",t+="<tr>",t+='<td>["$\'"]</td>',t+="<td>"+h(e["$'"])+"</td>",t+="</tr>\n";for(var n in e.rules)t+="<tr>",t+='<td>["${'+n+'}"]</td>',t+="<td>"+h(e["${"+n+"}"])+"</td>",t+="</tr>\n";return t+="</table>\n"},m=function(e){return s.htmlToPage(g(e),"apg-exp last result")},b=function(e){var t=l;if("string"==typeof e&&e.length>=3){var r=e.toLowerCase().slice(0,3);"hex"===r?t=a:"dec"===r?t=o:"uni"===r&&(t=c)}return t},y=function(e){var t;switch(e){case l:t="ascii";break;case a:t="hexidecimal";break;case o:t="decimal";break;case c:t="Unicode"}return t},x=function(e){var t=e.toString(16);return t.length%2!==0&&(t="0"+t),t},T=function(e,t){var r="";if(t===l)r+=n.utils.charsToString(e);else if(t===o){if(r+="[",e.length>0){r+=e[0];for(var s=1;s<e.length;s+=1)r+=","+e[s]}r+="]"}else if(t===a){if(r+="[",e.length>0){r+="\\x"+x(e[0]);for(var s=1;s<e.length;s+=1)r+=",\\x"+x(e[s])}r+="]"}else if(t===c){if(r+="[",e.length>0){r+="\\u"+x(e[0]);for(var s=1;s<e.length;s+=1)r+=",\\u"+x(e[s])}r+="]"}return r},E=function(e,t){t=b(t);var r="";r+=" result("+y(t)+")\n",r+=" [0]: ",r+=T(e[0],t),r+="\n",r+=" input: "+T(e.input,t),r+="\n",r+=" index: "+e.index,r+="\n",r+=" length: "+e.length,r+="\n",r+="tree depth: "+e.treeDepth,r+="\n",r+=" node hits: "+e.nodeHits,r+="\n",r+=" rules: ",r+="\n";var n=e.rules;for(var s in n){var i=n[s];if(i)for(var a=0;a<i.length;a+=1){var o=i[a];r+=" :"+s+" : "+o.index+": ",r+=T(o.phrase,t),r+="\n"}else r+=" :"+s+": ",r+="undefined",r+="\n"}return r},k=function(e,t){t=b(t);var r="",n="result:";n+="("+y(t)+")",r+='<table class="'+i.CLASS_STATE+'">\n',r+="<caption>"+n+"</caption>\n",r+="<tr>",r+="<th>item</th><th>value</th><th>phrase</th>",r+="</tr>\n",r+="<tr>",r+="<td>[0]</td>",r+="<td>"+e.index+"</td>",r+="<td>"+h(T(e[0],t),"match")+"</td>",r+="</tr>\n",r+="<tr>",r+="<td>input</td>",r+="<td>0</td>",r+="<td>"+h(T(e.input,t))+"</td>",r+="</tr>\n",r+="<tr>",r+="<td>index</td><td>"+e.index+"</td>",r+="<td></td>",r+="</tr>\n",r+="<tr>",r+="<td>length</td><td>"+e.length+"</td>",r+="<td></td>",r+="</tr>\n",r+="<tr>",r+="<td>tree depth</td><td>"+e.treeDepth+"</td>",r+="<td></td>",r+="</tr>\n",r+="<tr>",r+="<td>node hits</td><td>"+e.nodeHits+"</td>",r+="<td></td>",r+="</tr>\n",r+="<tr>",r+="<th>rules</th><th>index</th><th>phrase</th>",r+="</tr>\n";var s=e.rules;for(var a in s){var o=s[a];if(o)for(var l=0;l<o.length;l+=1){var c=o[l];r+="<tr>",r+="<td>"+a+"</td>",r+="<td>"+c.index+"</td>",r+="<td>"+h(T(c.phrase,t),"match")+"</td>",r+="\n"}else r+="<tr>",r+="<td>"+a+"</td>",r+="<td></td>",r+="<td>"+h(void 0)+"</td>",r+="\n"}return r+="</table>\n"},A=function(e,t){return s.htmlToPage(k(e,t))},v=function(e,t){t=b(t);var r="";if(r+=" last match("+y(t)+")\n",r+=" lastIndex: "+e.lastIndex,r+="\n",r+=' flags: "'+e.flags+'"',r+="\n",r+=" global: "+e.global,r+="\n",r+=" sticky: "+e.sticky,r+="\n",r+=" unicode: "+e.unicode,r+="\n",r+=" debug: "+e.debug,r+="\n",void 0===e["$&"])return r+=" lastMatch: undefined",r+="\n";r+=" input: ",r+=T(e.input,t),r+="\n",r+=" leftContext: ",r+=T(e.leftContext,t),r+="\n",r+=" lastMatch: ",r+=T(e.lastMatch,t),r+="\n",r+="rightContext: ",r+=T(e.rightContext,t),r+="\n",r+=" rules:";var n="",s=" :";for(var i in e.rules)r+=n+i+" : ",r+=e.rules[i]?T(e.rules[i],t):"undefined",r+="\n",n=s;r+="\n",r+=" alias:\n",r+=' ["$_"]: ',r+=T(e.$_,t),r+="\n",r+=' ["$`"]: ',r+=T(e["$`"],t),r+="\n",r+=' ["$&"]: ',r+=T(e["$&"],t),r+="\n",r+=' ["$\'"]: ',r+=T(e["$'"],t),r+="\n";for(var i in e.rules)r+=' ["${'+i+'}"]: ',r+=e["${"+i+"}"]?T(e["${"+i+"}"],t):"undefined",r+="\n";return r},w=function(e,t){t=b(t);var r="",n="last match:";if(n+="("+y(t)+")",r+='<table class="'+i.CLASS_STATE+'">\n',r+="<caption>"+n+"</caption>\n",r+="<tr>",r+="<th>item</th><th>value</th>",r+="</tr>\n",r+="<tr>",r+="<td>lastIndex</td>",r+="<td>"+e.lastIndex+"</td>",r+="</tr>\n",r+="<tr>",r+="<td>flags</td>",r+="<td>""+e.flags+""</td>",r+="</tr>\n",r+="<tr>",r+="<td>global</td>",r+="<td>"+e.global+"</td>",r+="</tr>\n",r+="<tr>",r+="<td>sticky</td>",r+="<td>"+e.sticky+"</td>",r+="</tr>\n",r+="<tr>",r+="<td>unicode</td>",r+="<td>"+e.unicode+"</td>",r+="</tr>\n",r+="<tr>",r+="<td>debug</td>",r+="<td>"+e.debug+"</td>",r+="</tr>\n",r+="<tr>",r+="<th>item</th><th>phrase</th>",r+="</tr>\n",void 0===e["$&"])return r+="<tr>",r+="<td>lastMatch</td>",r+="<td>"+h(void 0)+"</td>",r+="</tr>\n",r+="</table>\n";r+="<tr>",r+="<td>input</td>",r+="<td>"+h(T(e.input,t))+"</td>",r+="</tr>\n",r+="<tr>",r+="<td>leftContext</td>",r+="<td>"+h(T(e.leftContext,t))+"</td>",r+="</tr>\n",r+="<tr>",r+="<td>lastMatch</td>",r+="<td>"+h(T(e.lastMatch,t),"match")+"</td>",r+="</tr>\n",r+="<tr>",r+="<td>rightContext</td>",r+="<td>"+h(T(e.rightContext,t))+"</td>",r+="</tr>\n",r+="<tr>",r+="<th>rules</th><th>phrase</th>",r+="</tr>\n";for(var s in e.rules)r+="<tr>",r+="<td>"+s+"</td>",r+=e.rules[s]?"<td>"+h(T(e.rules[s],t))+"</td>":"<td>"+h(void 0)+"</td>",r+="</tr>\n";r+="<tr>",r+="<th>alias</th><th>phrase</th>",r+="</tr>\n",r+="<tr>",r+='<td>["$_"]</td>',r+="<td>"+h(T(e.$_,t))+"</td>",r+="</tr>\n",r+="<tr>",r+='<td>["$`"]</td>',r+="<td>"+h(T(e["$`"],t))+"</td>",r+="</tr>\n",r+="<tr>",r+='<td>["$&"]</td>',r+="<td>"+h(T(e["$&"],t),"match")+"</td>",r+="</tr>\n",r+="<tr>",r+='<td>["$\'"]</td>',r+="<td>"+h(T(e["$'"],t))+"</td>",r+="</tr>\n";for(var s in e.rules)r+="<tr>",r+='<td>["${'+s+'}"]</td>',r+=e["${"+s+"}"]?"<td>"+h(T(e["${"+s+"}"],t))+"</td>":"<td>"+h(void 0)+"</td>",r+="</tr>\n";return r+="</table>\n"},S=function(e,t){return s.htmlToPage(w(e,t))},C=function(e){return e.source},M=function(e){var t,r,s,i=/.*(\r\n|\n|\r)/g;for(s="<pre>\n";;){if(t=i.exec(e.source),null===t||""===t[0])break;r=n.utils.stringToChars(t[0]),s+=n.utils.charsToAsciiHtml(r),s+="\n"}return s+="</pre>\n"},O=function(e){return n.utils.htmlToPage(M(e),"apg-exp source")};e.exports={s:{resultToText:u,resultToHtml:p,resultToHtmlPage:d,expToText:f,expToHtml:g,expToHtmlPage:m,sourceToText:C,sourceToHtml:M,sourceToHtmlPage:O},u:{resultToText:E,resultToHtml:k,resultToHtmlPage:A,expToText:v,expToHtml:w,expToHtmlPage:S}}},function(e,t){e.exports=function(){"use strict;";var e="circular-buffer.js: ",t=-1,r=0;this.init=function(n){if("number"!=typeof n||n<=0)throw new Error(e+"init: circular buffer size must an integer > 0");r=Math.ceil(n),t=-1},this.increment=function(){return t+=1,(t+r)%r},this.maxSize=function(){return r},this.items=function(){return t+1},this.getListIndex=function(e){return t===-1?-1:e<0||e>t?-1:t-e>=r?-1:(e+r)%r},this.forEach=function(e){if(t!==-1)if(t<r)for(var n=0;n<=t;n+=1)e(n,n);else for(var n=t-r+1;n<=t;n+=1){var s=(n+r)%r;e(s,n)}}}},function(e,t){e.exports=function(){return"/* This file automatically generated by toless() and LESS. */\n.apg-mono {\n font-family: monospace;\n}\n.apg-active {\n font-weight: bold;\n color: #000000;\n}\n.apg-match {\n font-weight: bold;\n color: #264BFF;\n}\n.apg-empty {\n font-weight: bold;\n color: #0fbd0f;\n}\n.apg-nomatch {\n font-weight: bold;\n color: #FF4000;\n}\n.apg-lh-match {\n font-weight: bold;\n color: #1A97BA;\n}\n.apg-lb-match {\n font-weight: bold;\n color: #5F1687;\n}\n.apg-remainder {\n font-weight: bold;\n color: #999999;\n}\n.apg-ctrl-char {\n font-weight: bolder;\n font-style: italic;\n font-size: .6em;\n}\n.apg-line-end {\n font-weight: bold;\n color: #000000;\n}\n.apg-error {\n font-weight: bold;\n color: #FF4000;\n}\n.apg-phrase {\n color: #000000;\n background-color: #8caae6;\n}\n.apg-empty-phrase {\n color: #0fbd0f;\n}\ntable.apg-state {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: left;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-state th,\ntable.apg-state td {\n text-align: left;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-state th:nth-last-child(2),\ntable.apg-state td:nth-last-child(2) {\n text-align: right;\n}\ntable.apg-state caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-stats {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-stats th,\ntable.apg-stats td {\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-stats caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-trace {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-trace caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-trace th,\ntable.apg-trace td {\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-trace th:last-child,\ntable.apg-trace th:nth-last-child(2),\ntable.apg-trace td:last-child,\ntable.apg-trace td:nth-last-child(2) {\n text-align: left;\n}\ntable.apg-grammar {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-grammar caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-grammar th,\ntable.apg-grammar td {\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-grammar th:last-child,\ntable.apg-grammar td:last-child {\n text-align: left;\n}\ntable.apg-rules {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-rules caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-rules th,\ntable.apg-rules td {\n text-align: right;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-rules a {\n color: #003399 !important;\n}\ntable.apg-rules a:hover {\n color: #8caae6 !important;\n}\ntable.apg-attrs {\n font-family: monospace;\n margin-top: 5px;\n font-size: 11px;\n line-height: 130%;\n text-align: center;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-attrs caption {\n font-size: 125%;\n line-height: 130%;\n font-weight: bold;\n text-align: left;\n}\ntable.apg-attrs th,\ntable.apg-attrs td {\n text-align: center;\n border: 1px solid black;\n border-collapse: collapse;\n}\ntable.apg-attrs th:nth-child(1),\ntable.apg-attrs th:nth-child(2),\ntable.apg-attrs th:nth-child(3) {\n text-align: right;\n}\ntable.apg-attrs td:nth-child(1),\ntable.apg-attrs td:nth-child(2),\ntable.apg-attrs td:nth-child(3) {\n text-align: right;\n}\ntable.apg-attrs a {\n color: #003399 !important;\n}\ntable.apg-attrs a:hover {\n color: #8caae6 !important;\n}\n"}},function(e,t,r){e.exports=function(e,t,n,s){"use strict;";var i=this,a="apg-exp: ",o=a,l=r(0),c=r(28),h=r(32),u=r(7),p=r(34),d=r(29),f=r(33),g={writable:!1,enumerable:!1,configurable:!0},m={_this:this,grammarObject:null,ruleNames:[],str:null,chars:null,parser:null,result:null,charsToString:null,match:function(e){return e===l.ids.MATCH||e===l.ids.EMPTY}},b=function(e,t,r){this.message=e,this.name="ApgExpError";var n=t,s=r;this.toText=function(){var e="";return e+=this.message,e+="\n",n&&(e+=n),e},this.toHtml=function(){var e="";return e+="<h3>"+l.utils.stringToAsciiHtml(this.message)+"</h3>",e+="\n",s&&(e+=s),e}};b.prototype=new Error;var y=function(e){for(var t=[],r=null,n=0;n<m.grammarObject.udts.length;n+=1){var s=m.grammarObject.udts[n].lower;"function"!=typeof m.parser.callbacks[s]&&t.push(m.ruleNames[s])}return t.length>0&&(r="undefined UDT callback functions: "+t),r};o=a+"constructor: ";var x=null,T=null;try{for(;;){if(x=d(this,t)){x=new b(x);break}if("string"==typeof e){if(this.source=e,T=f(e),T.error){x=new b(T.error,T.text,T.html);break}m.grammarObject=T.obj}else{if("object"!=typeof e||"string"!=typeof e.grammarObject||"grammarObject"!==e.grammarObject){x=new b(a+"invalid SABNF grammar input"),this.source="";break}m.grammarObject=e,this.source=m.grammarObject.toString()}Object.defineProperty(this,"source",g),m.charsToString=l.utils.charsToString,m.parser=new l.parser,this.ast=new l.ast,this.trace=this.debug?new l.trace:null;for(var E=0;E<m.grammarObject.rules.length;E+=1){var k=m.grammarObject.rules[E];m.ruleNames[k.lower]=k.name,m.parser.callbacks[k.lower]=!1,this.ast.callbacks[k.lower]=!0}for(var E=0;E<m.grammarObject.udts.length;E+=1){var k=m.grammarObject.udts[E];m.ruleNames[k.lower]=k.name,m.parser.callbacks[k.lower]=!1,this.ast.callbacks[k.lower]=!0}if("number"==typeof n){if(this.nodeHits=Math.floor(n),!(this.nodeHits>0)){x=new b(a+"nodeHits must be integer > 0: "+n),this.nodeHits=1/0;break}m.parser.setMaxNodeHits(this.nodeHits)}else this.nodeHits=1/0;if("number"==typeof s){if(this.treeDepth=Math.floor(s),!(this.treeDepth>0)){x=new b(a+"treeDepth must be integer > 0: "+s),this.treeDepth=1/0;break}m.parser.setMaxTreeDepth(this.treeDepth)}else this.treeDepth=1/0;Object.defineProperty(this,"nodeHits",g),Object.defineProperty(this,"treeDepth",g),this.lastIndex=0;break}}catch(e){x=new b(e.name+": "+e.message)}if(x)throw x;this.exec=function(e){var t,r=null;if(o=a="exec(): ","string"==typeof e)m.str=e,m.chars=l.utils.stringToChars(e);else{if(!Array.isArray(e))return r;m.str=null,m.chars=e}if(m.parser.ast=this.ast,m.parser.trace=this.trace,t=y(o))throw new b(o+t);return r=this.sticky?c.execAnchor(m):c.execForward(m)},this.test=function(e){var t,r=null;if(o=a+"test(): ","string"==typeof e)m.str=e,m.chars=l.utils.stringToChars(e);else{if(!Array.isArray(e))return r;m.str=null,m.chars=e}if(m.parser.ast=null,m.parser.trace=null,this.ast=null,this.trace=null,t=y(o))throw new b(o+t);return r=this.sticky?c.testAnchor(m):c.testForward(m)},this.replace=function(e,t){if(o=a+"replace(): ",this.unicode)throw new b(o+"cannot do string replacement in 'unicode' mode. Insure that 'u' flag is absent.");if("string"!=typeof e)throw new b(o+"input type error: str not a string");if("string"==typeof t)return h.replaceString(m,e,t);if("function"==typeof t)return h.replaceFunction(m,e,t);throw new b(o+"input type error: replacement not a string or function")},this.split=function(e,t){if(o=a+"split(): ",this.unicode)throw new b(o+"cannot do string split in 'unicode' mode. Insure that 'u' flag is absent.");if(void 0===e||null===e||""===e)return[""];if("string"!=typeof e)throw new b(o+"argument must be a string: typeof(arg): "+typeof e);if("number"!=typeof t)t=1/0;else if(t=Math.floor(t),t<=0)throw new b(o+"limit must be >= 0: limit: "+t);return p.split(m,e,t)},this.include=function(e){if(o=a+"include(): ",void 0===e||null==e||"string"==typeof e&&"all"===e.toLowerCase())for(var t in m.grammarObject.callbacks)i.ast.callbacks[t]=!0;else{if(!Array.isArray(e))throw new b(o+"unrecognized list type");for(var t in m.grammarObject.callbacks)i.ast.callbacks[t]=!1;for(var r=0;r<e.length;r+=1){var n=e[r];if("string"!=typeof n)throw new b(o+"invalid name type in list");if(n=n.toLowerCase(),void 0===i.ast.callbacks[n])throw new b(o+"unrecognized name in list: "+e[r]);i.ast.callbacks[n]=!0}}},this.exclude=function(e){if(o=a+"exclude(): ",void 0===e||null==e||"string"==typeof e&&"all"===e.toLowerCase())for(var t in m.grammarObject.callbacks)i.ast.callbacks[t]=!1;else{if(!Array.isArray(e))throw new b(o+"unrecognized list type");for(var t in m.grammarObject.callbacks)i.ast.callbacks[t]=!0;for(var r=0;r<e.length;r+=1){var n=e[r];if("string"!=typeof n)throw new b(o+"invalid name type in list");if(n=n.toLowerCase(),void 0===i.ast.callbacks[n])throw new b(o+"unrecognized name in list: "+e[r]);i.ast.callbacks[n]=!1}}},this.defineUdt=function(e,t){if(o=a+"defineUdt(): ","string"!=typeof e)throw new b(o+"'name' must be a string");if("function"!=typeof t)throw new b(o+"'func' must be a function reference");for(var r=e.toLowerCase(),n=0;n<m.grammarObject.udts.length;n+=1)if(m.grammarObject.udts[n].lower===r)return void(m.parser.callbacks[r]=t);throw new b(o+"'name' not a UDT name: "+e)},this.maxCallStackDepth=function(){try{return 1+this.maxCallStackDepth()}catch(e){return 1}},this.toText=function(e){return this.unicode?u.u.expToText(this,e):u.s.expToText(this)},this.toHtml=function(e){return this.unicode?u.u.expToHtml(this,e):u.s.expToHtml(this)},this.toHtmlPage=function(e){return this.unicode?u.u.expToHtmlPage(this,e):u.s.expToHtmlPage(this)},this.sourceToText=function(){return u.s.sourceToText(this)},this.sourceToHtml=function(){return u.s.sourceToHtml(this)},this.sourceToHtmlPage=function(){return u.s.sourceToHtmlPage(this)}}},function(e,t){var r;r=function(){return this}();try{r=r||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";function n(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===e[t-2]?2:"="===e[t-1]?1:0}function s(e){return 3*e.length/4-n(e)}function i(e){var t,r,s,i,a,o,l=e.length;a=n(e),o=new u(3*l/4-a),s=a>0?l-4:l;var c=0;for(t=0,r=0;t<s;t+=4,r+=3)i=h[e.charCodeAt(t)]<<18|h[e.charCodeAt(t+1)]<<12|h[e.charCodeAt(t+2)]<<6|h[e.charCodeAt(t+3)],o[c++]=i>>16&255,o[c++]=i>>8&255,o[c++]=255&i;return 2===a?(i=h[e.charCodeAt(t)]<<2|h[e.charCodeAt(t+1)]>>4,o[c++]=255&i):1===a&&(i=h[e.charCodeAt(t)]<<10|h[e.charCodeAt(t+1)]<<4|h[e.charCodeAt(t+2)]>>2,o[c++]=i>>8&255,o[c++]=255&i),o}function a(e){return c[e>>18&63]+c[e>>12&63]+c[e>>6&63]+c[63&e]}function o(e,t,r){for(var n,s=[],i=t;i<r;i+=3)n=(e[i]<<16)+(e[i+1]<<8)+e[i+2],s.push(a(n));return s.join("")}function l(e){for(var t,r=e.length,n=r%3,s="",i=[],a=16383,l=0,h=r-n;l<h;l+=a)i.push(o(e,l,l+a>h?h:l+a));return 1===n?(t=e[r-1],s+=c[t>>2],s+=c[t<<4&63],s+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],s+=c[t>>10],s+=c[t>>4&63],s+=c[t<<2&63],s+="="),i.push(s),i.join("")}t.byteLength=s,t.toByteArray=i,t.fromByteArray=l;for(var c=[],h=[],u="undefined"!=typeof Uint8Array?Uint8Array:Array,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,f=p.length;d<f;++d)c[d]=p[d],h[p.charCodeAt(d)]=d;h["-".charCodeAt(0)]=62,h["_".charCodeAt(0)]=63;
},function(e,t){t.read=function(e,t,r,n,s){var i,a,o=8*s-n-1,l=(1<<o)-1,c=l>>1,h=-7,u=r?s-1:0,p=r?-1:1,d=e[t+u];for(u+=p,i=d&(1<<-h)-1,d>>=-h,h+=o;h>0;i=256*i+e[t+u],u+=p,h-=8);for(a=i&(1<<-h)-1,i>>=-h,h+=n;h>0;a=256*a+e[t+u],u+=p,h-=8);if(0===i)i=1-c;else{if(i===l)return a?NaN:(d?-1:1)*(1/0);a+=Math.pow(2,n),i-=c}return(d?-1:1)*a*Math.pow(2,i-n)},t.write=function(e,t,r,n,s,i){var a,o,l,c=8*i-s-1,h=(1<<c)-1,u=h>>1,p=23===s?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:i-1,f=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,a=h):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),t+=a+u>=1?p/l:p*Math.pow(2,1-u),t*l>=2&&(a++,l/=2),a+u>=h?(o=0,a=h):a+u>=1?(o=(t*l-1)*Math.pow(2,s),a+=u):(o=t*Math.pow(2,u-1)*Math.pow(2,s),a=0));s>=8;e[r+d]=255&o,d+=f,o/=256,s-=8);for(a=a<<s|o,c+=s;c>0;e[r+d]=255&a,d+=f,a/=256,c-=8);e[r+d-f]|=128*g}},function(e,t){var r={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==r.call(e)}},function(e,t,r){(function(t){e.exports=function(e){var n,s="api.js: ",i=this,a=r(0),o=r(24),l=new(r(20)),c=new(r(19)),h=r(5).converter;if(this.sabnf,this.chars,this.lines,this.rules,this.udts,this.errors=[],t.isBuffer(e))this.chars=h.decode("BINARY",e);else if(Array.isArray(e))this.chars=e.slice();else{if("string"!=typeof e)throw new TypeError(s+"input source is not a string, byte Buffer or character array");this.chars=h.decode("STRING",e)}this.sabnf=h.encode("STRING",this.chars),this.scan=function(e,t){this.lines=o(this.chars,this.errors,e,t)},this.parse=function(e,t){l.syntax(this.chars,this.lines,this.errors,e,t)},this.translate=function(){var e=l.semantic(this.chars,this.lines,this.errors);0===this.errors.length&&(this.rules=e.rules,this.udts=e.udts,n=e.lineMap)},this.attributes=function(){c.getAttributes(this.rules,this.udts,n,this.errors)},this.generate=function(e){if(this.lines=o(this.chars,this.errors,e),!this.errors.length&&(l.syntax(this.chars,this.lines,this.errors,e),!this.errors.length)){var t=l.semantic(this.chars,this.lines,this.errors);this.errors.length||(this.rules=t.rules,this.udts=t.udts,n=t.lineMap,c.getAttributes(this.rules,this.udts,n,this.errors))}},this.toSource=function(e){return l.generateSource(this.chars,this.lines,this.rules,this.udts,e)},this.toObject=function(){return l.generateObject(this.sabnf,this.rules,this.udts)},this.errorsToAscii=function(){return f(this.errors,this.lines,this.chars)},this.errorsToHtml=function(e){return d(this.errors,this.lines,this.chars,e)},this.linesToAscii=function(){return u(this.lines)},this.linesToHtml=function(){return p(this.lines)},this.getAttributesObject=function(){return c};var u=function(e){var t="";return t+="Annotated Input Grammar",e.forEach(function(e,r){t+="\n",t+="line no: "+e.lineNo,t+=" : char index: "+e.beginChar,t+=" : length: "+e.length,t+=" : abnf: "+m(i.chars,e.beginChar,e.length)}),t+="\n"},p=function(e){var t="";t+='<table class="'+a.style.CLASS_GRAMMAR+'">\n';var r="Annotated Input Grammar";return t+="<caption>"+r+"</caption>\n",t+="<tr>",t+="<th>line<br>no.</th><th>first<br>char</th><th><br>length</th><th><br>text</th>",t+="</tr>\n",e.forEach(function(e,r){t+="<tr>",t+="<td>"+e.lineNo,t+="</td><td>"+e.beginChar,t+="</td><td>"+e.length,t+="</td><td>"+g(i.chars,e.beginChar,e.length),t+="</td>",t+="</tr>\n"}),t+="</table>\n"},d=function(e,t,r,n){var s=a.style,i="",o='<span class="'+s.CLASS_NOMATCH+'">»</span>';return i+='<p><table class="'+s.CLASS_GRAMMAR+'">\n',n&&"string"==typeof n&&(i+="<caption>"+n+"</caption>\n"),i+="<tr><th>line<br>no.</th><th>line<br>offset</th><th>error<br>offset</th><th><br>text</th></tr>\n",e.forEach(function(e){var n,s,l,c,h,u="",p="";0===t.length?(h=o,s=0):(n=t[e.line],l=n.beginChar,e.char>l&&(u=g(r,l,e.char-l)),l=e.char,c=n.beginChar+n.length,l<c&&(p=g(r,l,c-l)),h=u+o+p,s=e.char-n.beginChar,i+="<tr>",i+="<td>"+e.line+"</td><td>"+n.beginChar+"</td><td>"+s+"</td><td>"+h+"</td>",i+="</tr>\n",i+="<tr>",i+='<td colspan="3"></td><td>↑: '+a.utils.stringToAsciiHtml(e.msg)+"</td>",i+="</tr>\n")}),i+="</table></p>\n"},f=function(e,t,r){var n,s,i,a;return n="",e.forEach(function(e){s=t[e.line],n+=s.lineNo+": ",n+=s.beginChar+": ",n+=e.char-s.beginChar+": ",i=s.beginChar,a=e.char-s.beginChar,n+=m(r,i,a),n+=" >> ",i=e.char,a=s.beginChar+s.length-e.char,n+=m(r,i,a),n+="\n",n+=s.lineNo+": ",n+=s.beginChar+": ",n+=e.char-s.beginChar+": ",n+="error: ",n+=e.msg,n+="\n"}),n},g=function(e,t,r){for(var n,s=0,i=1,o=2,l='<span class="'+a.style.CLASS_CTRLCHAR+'">',c="</span>",h='<span class="'+a.style.CLASS_NOMATCH+'">',u="</span>",p="";;){if(!Array.isArray(e)||0===e.length)break;if("number"!=typeof t&&(t=0),t>=e.length)break;n="number"!=typeof r||t+r>=e.length?e.length:t+r;for(var d=s,f=t;f<n;f+=1){var g=e[f];if(g>=32&&g<=126)switch(d===i?(p+=c,d=s):d===o&&(p+=u,d=s),g){case 32:p+=" ";break;case 60:p+="<";break;case 62:p+=">";break;case 38:p+="&";break;case 34:p+=""";break;case 39:p+="'";break;case 92:p+="\";break;default:p+=String.fromCharCode(g)}else 9===g||10===g||13===g?(d===s?(p+=l,d=i):d===o&&(p+=u+l,d=i),9===g&&(p+="TAB"),10===g&&(p+="LF"),13===g&&(p+="CR")):(d===s?(p+=h,d=o):d===i&&(p+=c+h,d=o),p+="\\x"+a.utils.charToHex(g))}d===o&&(p+=u),d===i&&(p+=c);break}return p},m=function(e,t,r){for(var n="",s=t;s<t+r;s+=1){var i=e[s];if(i>=32&&i<=126)n+=String.fromCharCode(i);else switch(i){case 9:n+="\\t";break;case 10:n+="\\n";break;case 13:n+="\\r";break;default:n+="\\unknown"}}return n}}}).call(t,r(4).Buffer)},function(e,t,r){e.exports=function(e){"use strict";var t=r(0).ids,n=function(r,s){r.ctrl.isScanned[s]+=1,e[s].opcodes.forEach(function(e){e.type===t.RNM&&(r.ctrl.refCount[e.index]+=1,0===r.ctrl.isScanned[e.index]&&n(r,e.index)),e.type===t.UDT&&(r.ctrl.udtRefCount[e.index]+=1)})};e.forEach(function(e){n(e,e.index)});for(var s=0;s<e.length;s+=1)e[s].ctrl.refCount[s]>0&&(e[s].ctrl.type=t.ATTR_R);e.mrGroups=[];for(var s=0;s<e.length;s+=1){var i=e[s].ctrl;if(i.type===t.ATTR_R){for(var a=[],o=0;o<e.length;o+=1)if(s!==o){var l=e[o].ctrl;l.type===t.ATTR_R&&i.refCount[o]>0&&l.refCount[s]&&(0==a.length&&(a.push(s),i.type=t.ATTR_MR,i.mrGroupId=e.mrGroups.length),a.push(o),l.type=t.ATTR_MR,l.mrGroupId=e.mrGroups.length)}a.length>0&&e.mrGroups.push(a)}}for(var s=0;s<e.length;s+=1)for(var i=e[s].ctrl,o=0;o<e.length;o+=1){var l=e[o].ctrl;i.refCount[o]>0&&l.type===t.ATTR_MR&&(i.type===t.ATTR_N?i.type=t.ATTR_NMR:i.type===t.ATTR_R&&(i.type=t.ATTR_RMR))}}},function(e,t,r){e.exports=function(e,t,n){"use strict";var s=r(0).ids,i=function(e,t){for(;;){if(e.ctrl.isOpen===!0||e.ctrl.isComplete===!0){t.finite=e.attr.finite,t.empty=e.attr.empty,t.notEmpty=e.attr.notEmpty;break}e.ctrl.isOpen=!0,h(e,0,t),e.ctrl.isOpen=!1,e.ctrl.isComplete=!0,e.attr.finite=t.finite,e.attr.empty=t.empty,e.attr.notEmpty=t.notEmpty;break}},a=function(e,t){for(;;){var r=u[u.length-1]+e.lower;if(e.ctrl.isOpen===!0||e.ctrl.isComplete===!0){t.finite=e.attr.finite,t.empty=e.attr.empty,t.notEmpty=e.attr.notEmpty;break}var n=p.find(r);if(n!==-1){t.finite=n.finite,t.empty=n.empty,t.notEmpty=n.notEmpty;break}u.push(r),e.ctrl.isOpen=!0,h(e,0,t),e.ctrl.isOpen=!1,e.attr.finite=t.finite,e.attr.empty=t.empty,e.attr.notEmpty=t.notEmpty,p.add(r,t),u.pop();break}},o=function(e,r,n){for(var s=e.opcodes[r],i=[],a=0;a<s.children.length;a+=1){var o=new t;i.push(o),h(e,s.children[a],o)}n.finite=!1,n.empty=!1,n.notEmpty=!1;for(var a=0;a<i.length;a+=1){var l=i[a];l.finite===!0&&(n.finite=!0),l.empty===!0?n.empty=!0:n.notEmpty=!0}},l=function(e,r,n){for(var s=e.opcodes[r],i=[],a=0;a<s.children.length;a+=1){var o=new t;i.push(o),h(e,s.children[a],o)}n.finite=!0,n.empty=!0,n.notEmpty=!1;for(var a=0;a<i.length;a+=1){var l=i[a];l.finite===!1&&(n.finite=!1),l.empty===!1&&(n.empty=!1,n.notEmpty=!0)}},c=function(e,t,r){var n=e.opcodes[t];h(e,t+1,r),0===n.min&&(r.finite=!0,r.empty=!0)},h=function(t,r,n){var i=t.opcodes[r];switch(i.type){case s.ALT:o(t,r,n);break;case s.CAT:l(t,r,n);break;case s.REP:c(t,r,n);break;case s.RNM:d(e[i.index],n);break;case s.UDT:n.finite=!0,n.empty=i.empty,n.notEmpty=!0;break;case s.AND:case s.NOT:case s.BKA:case s.BKN:case s.ABG:case s.AEN:n.finite=!0,n.empty=!0,n.notEmpty=!1;break;case s.TLS:n.finite=!0,n.empty=!(i.string.length>0),n.notEmpty=!n.empty;break;case s.TBS:n.finite=!0,n.empty=!1,n.notEmpty=!0;break;case s.BKR:n.finite=!0,n.empty=!0,n.notEmpty=!0;break;case s.TRG:n.finite=!0,n.empty=!1,n.notEmpty=!0}},u=[],p=new n,d=i,f=new t;e.forEach(function(e){e.ctrl.isOpen=!1,e.ctrl.isComplete=!1}),e.forEach(function(e){e.ctrl.type!==s.ATTR_N&&e.ctrl.type!==s.ATTR_R||e.ctrl.isComplete===!1&&d(e,f)}),d=a,e.mrGroups.forEach(function(t){t.forEach(function(t){var r=e[t];p.clear(),u.length=0,u.push(""),d(r,f),r.ctrl.isComplete=!0})}),d=i;var f=new t;e.forEach(function(e){e.ctrl.type!==s.ATTR_NMR&&e.ctrl.type!==s.ATTR_RMR||e.ctrl.isComplete===!1&&d(e,f)})}},function(e,t,r){e.exports=function(e,t,n){"use strict";var s=r(0).ids,i=function(e,t,r){for(;;){if(t.index===e&&t.ctrl.isOpen===!0){r.left=t.attr.left,r.nested=t.attr.nested,r.right=t.attr.right,r.cyclic=t.attr.cyclic,r.finite=t.attr.finite,r.empty=t.attr.empty,r.notEmpty=t.attr.notEmpty;break}if(0===t.ctrl.refCount[e]){r.left=!1,r.nested=!1,r.right=!1,r.cyclic=!1,r.finite=t.attr.finite,r.empty=t.attr.empty,r.notEmpty=t.attr.notEmpty;break}if(t.ctrl.isOpen===!0){r.left=!1,r.nested=!1,r.right=!1,r.cyclic=!1,r.finite=t.attr.finite,r.empty=t.attr.empty,r.notEmpty=t.attr.notEmpty;break}var n=f[f.length-1]+t.lower,s=g.find(n);if(s!==-1){r.left=s.left,r.nested=s.nested,r.right=s.right,r.cyclic=s.cyclic,r.finite=s.finite,r.empty=s.empty,r.notEmpty=s.notEmpty;break}f.push(n),t.ctrl.isOpen=!0,d(e,t,0,r),t.ctrl.isOpen=!1,g.add(n,r),f.pop();break}},a=function(e,r,n,s){for(var i=r.opcodes[n],a=[],o=0;o<i.children.length;o+=1){var l=new t;a.push(l),d(e,r,i.children[o],l)}s.left=!1,s.nested=!1,s.right=!1,s.cyclic=!1,s.finite=!1,s.empty=!1,s.notEmpty=!1;for(var o=0;o<a.length;o+=1){var c=a[o];c.left===!0&&(s.left=!0),c.nested===!0&&(s.nested=!0),c.right===!0&&(s.right=!0),c.cyclic===!0&&(s.cyclic=!0),c.finite===!0&&(s.finite=!0),c.empty===!0?s.empty=!0:s.notEmpty=!0}},o=function(e){for(var t,r,n,s,i=0;i<e.length;i+=1){var t=e[i];if(t.nested===!0)return!0}s=!1;for(var i=0;i<e.length;i+=1){var t=e[i];if(s){if(t.notEmpty===!0)return!0}else t.right===!0&&t.left===!1&&t.notEmpty===!0&&(s=!0)}s=!1;for(var i=e.length-1;i>=0;i-=1){var t=e[i];if(s){if(t.notEmpty===!0)return!0}else t.left===!0&&t.right===!1&&t.notEmpty===!0&&(s=!0)}n=!1,s=!1,r=!1;for(var i=0;i<e.length;i+=1){var t=e[i];if(n===!1)t.notEmpty===!0&&(n=!0);else if(s===!1)t.left!==!0&&t.right!==!0&&t.cyclic!==!0||(s=!0);else if(t.notEmpty===!0)return!0}return!1},l=function(e){for(var t=!1,r=0;r<e.length;r+=1){if(e[r].left===!0){t=!0;break}if(e[r].empty===!1){t=!1;break}}return t},c=function(e){for(var t=!1,r=e.length-1;r>=0;r-=1){if(e[r].right===!0){t=!0;break}if(e[r].empty===!1){t=!1;break}}return t},h=function(e){for(var t=!0,r=0;r<e.length;r+=1)if(e[r].cyclic===!1){t=!1;break}return t},u=function(e,r,n,s){for(var i=r.opcodes[n],a=[],u=0;u<i.children.length;u+=1){var p=new t;a.push(p),d(e,r,i.children[u],p)}s.finite=!0,s.empty=!0,s.notEmpty=!1;for(var u=0;u<a.length;u+=1){var f=a[u];f.finite===!1&&(s.finite=!1),f.empty===!1&&(s.empty=!1,s.notEmpty=!0)}s.left=l(a),s.nested=o(a),s.right=c(a),s.cyclic=h(a)},p=function(e,t,r,n){d(e,t,r+1,n)},d=function(t,r,n,o){var l=r.opcodes[n];switch(o.left=!1,o.nested=!1,o.right=!1,o.cyclic=!1,l.type){case s.ALT:a(t,r,n,o);break;case s.CAT:u(t,r,n,o);break;case s.REP:p(t,r,n,o);break;case s.RNM:i(t,e[l.index],o);break;case s.UDT:o.finite=!0,o.empty=l.empty,o.notEmpty=!0;break;case s.AND:case s.NOT:case s.BKA:case s.BKN:case s.ABG:case s.AEN:o.finite=!0,o.empty=!0,o.notEmpty=!1;break;case s.TLS:o.finite=!0,o.empty=!(l.string.length>0),o.notEmpty=!o.empty;break;case s.TBS:o.finite=!0,o.empty=!1,o.notEmpty=!0;break;case s.BKR:o.finite=!0,o.empty=!0,o.notEmpty=!0;break;case s.TRG:o.finite=!0,o.empty=!1,o.notEmpty=!0}},f=[],g=new n,m=new t;e.forEach(function(e){e.ctrl.isOpen=!1,e.ctrl.isComplete=!1});for(var b=0;b<e.length;b+=1)if(e[b].ctrl.type===s.ATTR_R||e[b].ctrl.type===s.ATTR_MR||e[b].ctrl.type===s.ATTR_RMR){var y=e[b];g.clear(),f.length=0,f.push(""),i(b,e[b],m),y.attr.left=m.left,y.attr.nested=m.nested,y.attr.right=m.right,y.attr.cyclic=m.cyclic}}},function(e,t,r){e.exports=function(){"use strict";var e=r(0),t=e.ids,n=r(16),s=r(17),i=r(18),a=null,o=null,l=0,c=function(e){var r="unknown";switch(e.type){case t.ATTR_N:r="N";break;case t.ATTR_R:r="R";break;case t.ATTR_MR:r="MR("+e.mrGroupId+")";break;case t.ATTR_NMR:r="NMR";break;case t.ATTR_RMR:r="RMR"}return r},h=function(e,t){var r=e.attr.left===!0||e.attr.cyclic===!0||e.attr.finite===!1,n=t.attr.left===!0||t.attr.cyclic===!0||t.attr.finite===!1;return r===!1&&n===!0?1:r===!0&&n===!1?-1:0},u=function(e,t){return e.index<t.index?-1:e.index>t.index?1:0},p=function(e){var t,r,n="",s=!1;n+='<script type="text/javascript">\n',n+='var attrSortCol = "index"\n',n+="var attrSortErrors = true\n",n+="var attrSortDir = 0\n",n+="var attrDirs = {index: 0, rule: 0, type: 0, left: 0, nested: 0, right: 0, cyclic: 0, finite: 0, empty: 0, notempty: 0}\n",n+="var attrRows = [\n";var i=0;return e.forEach(function(e){0===i?i+=1:n+=",\n",r=e.attr,t=!1,r.left!==!0&&r.cyclic!==!0&&r.finite!==!1||(t=!0,s=!0),n+="{error: "+t+", index: "+e.index+', rule: "'+e.name+'", lower: "'+e.lower+'"',n+=", type: "+e.ctrl.type+', typename: "'+c(e.ctrl)+'"',n+=", left: "+r.left+", nested: "+r.nested+", right: "+r.right+", cyclic: "+r.cyclic,n+=", finite: "+r.finite+", empty: "+r.empty+", notempty: "+r.notEmpty,n+="}"}),n+="\n]\n",n+="var attrHasErrors = "+s+"\n",n+="</script>\n",n+='<div id="sort-links" >\n',n+="</div>\n"},d=function(e){var t,r,n=[];return e.forEach(function(e){r=e.attr,t=!1,r.left!==!0&&r.cyclic!==!0&&r.finite!==!1||(t=!0);var s={};s.error=t,s.index=e.index,s.name=e.name,s.lower=e.lower,s.type=e.ctrl.type,s.typename=c(e.ctrl),s.left=r.left,s.nested=r.nested,s.right=r.right,s.cyclic=r.cyclic,s.finite=r.finite,s.empty=r.empty,s.notempty=r.notEmpty,n.push(s)}),n},f=function(e,r){this.isOpen=!1,this.isComplete=!1,this.type=t.ATTR_N,this.mrGroupId=-1,this.refCount=e.slice(0),this.udtRefCount=r.slice(0),this.isScanned=e.slice(0)},g=function(e){e===!0?(this.left=!0,this.nested=!1,this.right=!0,this.cyclic=!0):(this.left=!1,this.nested=!1,this.right=!1,this.cyclic=!1),this.finite=!1,this.empty=!0,this.notEmpty=!1,this.error=!1,this.copy=function(e){e.left=this.left,e.nested=this.nested,e.right=this.right,e.cyclic=this.cyclic,e.finite=this.finite,e.empty=this.empty,e.notEmpty=this.notEmpty,e.error=this.error},this.copyNR=function(e){e.finite=this.finite,e.empty=this.empty},this.copyR=function(e){e.left=this.left,e.nested=this.nested,e.right=this.right,e.cyclic=this.cyclic}},m=function(){var e=[];this.add=function(t,r){var n=-1,s=this.find(t);return s===-1&&(n={name:t,left:r.left,nested:r.nested,right:r.right,cyclic:r.cyclic,finite:r.finite,empty:r.empty,notEmpty:r.notEmpty},e.push(n)),n},this.find=function(t){for(var r=-1,n=0;n<e.length;n+=1)if(e[n].name===t){r=e[n];break}return r},this.clear=function(){e.length=0}};this.ruleDependenciesToString=function(){var e="";return a.forEach(function(t){e+="\n",e+="\nRULE: "+t.name;for(var r=0;r<a.length;r+=1)t.attr.refCount[r]>0&&(e+="\n "+a[r].name)}),e},this.rulesWithReferencesToHtml=function(){var e="";e+='<script type="text/javascript">\n',e+='var tableData= {indexSort: "up", nameSort: "up", rows: [\n';var t=0;return a.forEach(function(r){0===t?t+=1:e+=",",e+='{name: "'+r.name+'", lower: "'+r.lower+'", index: '+r.index,e+=', indexSort: "up", nameSort: "up", visible: true, dependents: [';for(var n=0,s=0;s<a.length;s+=1)r.ctrl.refCount[s]>0&&(0===n?(e+='{name: "'+a[s].name+'", index: '+s+"}",n+=1):(e+=",",e+='{name: "'+a[s].name+'", index: '+s+"}"));e+="]}\n"}),e+="]};\n",e+="</script>\n",e+='<div id="sort-links" >\n',e+="</div>\n"},this.rulesWithReferencesData=function(){var e={indexSort:"up",nameSort:"none",rows:[]};return a.forEach(function(t){var r={};r.name=t.name,r.lower=t.lower,r.index=t.index,r.show=!0,r.dependents=[];for(var n=0;n<a.length;n+=1)if(t.ctrl.refCount[n]>0){var s={};s.name=a[n].name,s.index=n,r.dependents.push(s)}for(var n=0;n<o.length;n+=1)if(t.ctrl.udtRefCount[n]>0){var s={};s.name=o[n].name,s.index=o[n].index,r.dependents.push(s)}e.rows.push(r)}),e},this.ruleAttrsToHtml=function(){var e="";return a.sort(u),l>0&&a.sort(h),e+=p(a,"Attributes by Rule Index"),a.sort(u),e},this.ruleAttrsData=function(){a.sort(u),l>0&&a.sort(h);var e=d(a);return a.sort(u),e},this.udtAttrsData=function(){return d(o)},this.getAttributes=function(e,r,c,h){a=e,o=r;var u=[],p=[];return a.forEach(function(){u.push(0)}),o.forEach(function(e){p.push(0)}),a.forEach(function(e){e.ctrl=new f(u,p)}),n(a),a.forEach(function(e){e.ctrl.type===t.ATTR_R||e.ctrl.type===t.ATTR_MR||e.ctrl.type===t.ATTR_RMR?e.attr=new g(!0):e.attr=new g}),o.forEach(function(e){e.ctrl={type:t.ATTR_N},e.attr={left:!1,nested:!1,right:!1,cyclic:!1,finite:!0,empty:e.empty,notEmpty:!0,error:!1}}),s(a,g,m),i(a,g,m),l=0,a.forEach(function(e){e.error=!1,e.attr.left===!0&&(e.error=!0,l+=1,h.push({line:c[e.index].line,char:c[e.index].char,msg:"left recursive"})),e.attr.finite===!1&&(e.error=!0,l+=1,h.push({line:c[e.index].line,char:c[e.index].char,msg:"infinite"})),e.attr.cyclic===!0&&(e.error=!0,l+=1,h.push({line:c[e.index].line,char:c[e.index].char,msg:"cyclic"}))}),h}}},function(e,t,r){e.exports=function(){"use strict";var e="parser.js: ",t=r(0),n=t.ids,s=new(r(26)),i=new(r(25)),a=new(r(21)),o=new t.parser;o.ast=new t.ast,o.callbacks=s.callbacks,o.ast.callbacks=i.callbacks;var l=function(e,t,r){if(t<0||t>=r)return-1;for(var n=0;n<e.length;n+=1)if(t>=e[n].beginChar&&t<e[n].beginChar+e[n].length)return n;return-1},c=function(e,t){var r=-1;if(t<e.length)for(var n=t;n<e.length;n+=1)if(null!==e[n]){r=e[n];break}return r},h=function(e){e.forEach(function(e,t){var r=[],s=[],i=0;e.opcodes.forEach(function(e,t){e.type===n.ALT&&1===e.children.length?s.push(null):e.type===n.CAT&&1===e.children.length?s.push(null):e.type===n.REP&&1===e.min&&1===e.max?s.push(null):(s.push(i),r.push(e),i+=1)}),s.push(i),r.forEach(function(e,t){if(e.type===n.ALT||e.type===n.CAT)for(var r=0;r<e.children.length;r+=1)e.children[r]=c(s,e.children[r])}),e.opcodes=r})};this.syntax=function(t,r,n,s,i){if(i){if("traceObject"!==i.traceObject)throw new TypError(e+"trace argument is not a trace object");o.trace=i}var c={};c.errors=n,c.strict=!!s,c.lines=r,c.findLine=l,c.charsLength=t.length,c.ruleCount=0;var h=o.parse(a,"file",t,c);h.success||n.push({line:0,char:0,msg:"syntax analysis of input grammar failed"})},this.semantic=function(e,t,r){var n={};return n.errors=r,n.lines=t,n.findLine=l,n.charsLength=e.length,o.ast.translate(n),r.length?null:(h(n.rules),{rules:n.rules,udts:n.udts,lineMap:n.rulesLineMap})},this.generateSource=function(e,t,r,s,i){var a,o,l,c="",h=0,u=1/0,p=0,d=[],f=[],g=0,m=0,b=0,y=0,x=0,T=0,E=0,k=0,A=0,v=0,w=0,S=0,C=0,M=0,O=0;r.forEach(function(e){d.push(e.lower),h+=e.opcodes.length,e.opcodes.forEach(function(e,t){switch(e.type){case n.ALT:g+=1;break;case n.CAT:m+=1;break;case n.RNM:b+=1;break;case n.UDT:y+=1;break;case n.REP:x+=1;break;case n.AND:T+=1;break;case n.NOT:E+=1;break;case n.BKA:S+=1;break;case n.BKN:C+=1;break;case n.BKR:w+=1;break;case n.ABG:M+=1;break;case n.AEN:O+=1;break;case n.TLS:for(k+=1,a=0;a<e.string.length;a+=1)e.string[a]<u&&(u=e.string[a]),e.string[a]>p&&(p=e.string[a]);break;case n.TBS:for(A+=1,a=0;a<e.string.length;a+=1)e.string[a]<u&&(u=e.string[a]),e.string[a]>p&&(p=e.string[a]);break;case n.TRG:v+=1,e.min<u&&(u=e.min),e.max>p&&(p=e.max)}})}),d.sort(),s.length>0&&(s.forEach(function(e){f.push(e.lower)}),f.sort());var R="module.exports";i&&"string"==typeof i&&(R="var "+i),c+="// Generated by JavaScript APG, Version [`apg-js2`](https://github.com/ldthomas/apg-js2)\n",c+=R+" = function(){\n",c+='"use strict";\n',c+=" //```\n",c+=" // SUMMARY\n",c+=" // rules = "+r.length+"\n",c+=" // udts = "+s.length+"\n",c+=" // opcodes = "+h+"\n",c+=" // --- ABNF original opcodes\n",c+=" // ALT = "+g+"\n",c+=" // CAT = "+m+"\n",c+=" // REP = "+x+"\n",c+=" // RNM = "+b+"\n",c+=" // TLS = "+k+"\n",c+=" // TBS = "+A+"\n",c+=" // TRG = "+v+"\n",c+=" // --- SABNF superset opcodes\n",c+=" // UDT = "+y+"\n",c+=" // AND = "+T+"\n",c+=" // NOT = "+E+"\n",c+=" // BKA = "+S+"\n",c+=" // BKN = "+C+"\n",c+=" // BKR = "+w+"\n",c+=" // ABG = "+M+"\n",c+=" // AEN = "+O+"\n",c+=" // characters = [",c+=k+A+v===0?" none defined ]":u+" - "+p+"]",y>0&&(c+=" + user defined"),c+="\n",c+=" //```\n",c+=" /* OBJECT IDENTIFIER (for internal parser use) */\n",c+=" this.grammarObject = 'grammarObject';\n",c+="\n",c+=" /* RULES */\n",c+=" this.rules = [];\n",r.forEach(function(e,t){var r=" this.rules[";r+=t,r+="] = {name: '",r+=e.name,r+="', lower: '",r+=e.lower,r+="', index: ",r+=e.index,r+=", isBkr: ",r+=e.isBkr,r+="};\n",c+=r}),c+="\n",c+=" /* UDTS */\n",c+=" this.udts = [];\n",s.length>0&&s.forEach(function(e,t){var r=" this.udts[";r+=t,r+="] = {name: '",r+=e.name,r+="', lower: '",r+=e.lower,r+="', index: ",r+=e.index,r+=", empty: ",r+=e.empty,r+=", isBkr: ",r+=e.isBkr,r+="};\n",c+=r}),c+="\n",c+=" /* OPCODES */\n",r.forEach(function(e,t){t>0&&(c+="\n"),c+=" /* "+e.name+" */\n",c+=" this.rules["+t+"].opcodes = [];\n",e.opcodes.forEach(function(e,i){switch(e.type){case n.ALT:c+=" this.rules["+t+"].opcodes["+i+"] = {type: "+e.type+", children: ["+e.children.toString()+"]};// ALT\n";break;case n.CAT:c+=" this.rules["+t+"].opcodes["+i+"] = {type: "+e.type+", children: ["+e.children.toString()+"]};// CAT\n";break;case n.RNM:c+=" this.rules["+t+"].opcodes["+i+"] = {type: "+e.type+", index: "+e.index+"};// RNM("+r[e.index].name+")\n";break;case n.BKR:e.index>=r.length?(o=s[e.index-r.length].name,l=s[e.index-r.length].lower):(o=r[e.index].name,l=r[e.index].lower);var a="%i";e.bkrCase===n.BKR_MODE_CS&&(a="%s"),a+=e.bkrMode===n.BKR_MODE_UM?"%u":"%p",o=a+o,c+=" this.rules["+t+"].opcodes["+i+"] = {type: "+e.type+", index: "+e.index+", lower: '"+l+"', bkrCase: "+e.bkrCase+", bkrMode: "+e.bkrMode+"};// BKR(\\"+o+")\n";break;case n.UDT:c+=" this.rules["+t+"].opcodes["+i+"] = {type: "+e.type+", empty: "+e.empty+", index: "+e.index+"};// UDT("+s[e.index].name+")\n";break;case n.REP:c+=" this.rules["+t+"].opcodes["+i+"] = {type: "+e.type+", min: "+e.min+", max: "+e.max+"};// REP\n";break;case n.AND:c+=" this.rules["+t+"].opcodes["+i+"] = {type: "+e.type+"};// AND\n";break;case n.NOT:c+=" this.rules["+t+"].opcodes["+i+"] = {type: "+e.type+"};// NOT\n";break;case n.ABG:c+=" this.rules["+t+"].opcodes["+i+"] = {type: "+e.type+"};// ABG(%^)\n";break;case n.AEN:c+=" this.rules["+t+"].opcodes["+i+"] = {type: "+e.type+"};// AEN(%$)\n";break;case n.BKA:c+=" this.rules["+t+"].opcodes["+i+"] = {type: "+e.type+"};// BKA\n";break;case n.BKN:c+=" this.rules["+t+"].opcodes["+i+"] = {type: "+e.type+"};// BKN\n";break;case n.TLS:c+=" this.rules["+t+"].opcodes["+i+"] = {type: "+e.type+", string: ["+e.string.toString()+"]};// TLS\n";break;case n.TBS:c+=" this.rules["+t+"].opcodes["+i+"] = {type: "+e.type+", string: ["+e.string.toString()+"]};// TBS\n";break;case n.TRG:c+=" this.rules["+t+"].opcodes["+i+"] = {type: "+e.type+", min: "+e.min+", max: "+e.max+"};// TRG\n"}})}),c+="\n",c+=" // The `toString()` function will display the original grammar file(s) that produced these opcodes.\n",c+=" this.toString = function(){\n",c+=' var str = "";\n';var L;return t.forEach(function(t,r){var n=t.beginChar+t.length;L="",c+=' str += "';for(var s=t.beginChar;s<n;s+=1){switch(e[s]){case 9:L=" ";break;case 10:L="\\n";break;case 13:L="\\r";break;case 34:L='\\"';break;case 92:L="\\\\";break;default:L=String.fromCharCode(e[s])}c+=L}c+='";\n'}),c+=" return str;\n",c+=" }\n",c+="}\n"},this.generateObject=function(e,t,r){var n={},s=[],i=[],e=e.slice(0);return n.grammarObject="grammarObject",t.forEach(function(e){s.push(e.lower)}),s.sort(),r.length>0&&(r.forEach(function(e){i.push(e.lower)}),i.sort()),n.callbacks=[],s.forEach(function(e){n.callbacks[e]=!1}),r.length>0&&i.forEach(function(e){n.callbacks[e]=!1}),n.rules=t,n.udts=r,n.toString=function(){return e},n}}},function(e,t){e.exports=function(){"use strict";this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"File",lower:"file",index:0,isBkr:!1},this.rules[1]={name:"BlankLine",lower:"blankline",index:1,isBkr:!1},this.rules[2]={name:"Rule",lower:"rule",index:2,isBkr:!1},this.rules[3]={name:"RuleLookup",lower:"rulelookup",index:3,isBkr:!1},this.rules[4]={name:"RuleNameTest",lower:"rulenametest",index:4,isBkr:!1},this.rules[5]={name:"RuleName",lower:"rulename",index:5,isBkr:!1},this.rules[6]={name:"RuleNameError",lower:"rulenameerror",index:6,isBkr:!1},this.rules[7]={name:"DefinedAsTest",lower:"definedastest",index:7,isBkr:!1},this.rules[8]={name:"DefinedAsError",lower:"definedaserror",index:8,isBkr:!1},this.rules[9]={name:"DefinedAs",lower:"definedas",index:9,isBkr:!1},this.rules[10]={name:"Defined",lower:"defined",index:10,isBkr:!1},this.rules[11]={name:"IncAlt",lower:"incalt",index:11,isBkr:!1},this.rules[12]={name:"RuleError",lower:"ruleerror",index:12,isBkr:!1},this.rules[13]={name:"LineEndError",lower:"lineenderror",index:13,isBkr:!1},this.rules[14]={name:"Alternation",lower:"alternation",index:14,isBkr:!1},this.rules[15]={name:"Concatenation",lower:"concatenation",index:15,isBkr:!1},this.rules[16]={name:"Repetition",lower:"repetition",index:16,isBkr:!1},this.rules[17]={name:"Modifier",lower:"modifier",index:17,isBkr:!1},this.rules[18]={name:"Predicate",lower:"predicate",index:18,isBkr:!1},this.rules[19]={name:"BasicElement",lower:"basicelement",index:19,isBkr:!1},this.rules[20]={name:"BasicElementErr",lower:"basicelementerr",index:20,isBkr:!1},this.rules[21]={name:"Group",lower:"group",index:21,isBkr:!1},this.rules[22]={name:"GroupError",lower:"grouperror",index:22,isBkr:!1},this.rules[23]={name:"GroupOpen",lower:"groupopen",index:23,isBkr:!1},this.rules[24]={name:"GroupClose",lower:"groupclose",index:24,isBkr:!1},this.rules[25]={name:"Option",lower:"option",index:25,isBkr:!1},this.rules[26]={name:"OptionError",lower:"optionerror",index:26,isBkr:!1},this.rules[27]={name:"OptionOpen",lower:"optionopen",index:27,isBkr:!1},this.rules[28]={name:"OptionClose",lower:"optionclose",index:28,isBkr:!1},this.rules[29]={name:"RnmOp",lower:"rnmop",index:29,isBkr:!1},this.rules[30]={name:"BkrOp",lower:"bkrop",index:30,isBkr:!1},this.rules[31]={name:"bkrModifier",lower:"bkrmodifier",index:31,isBkr:!1},this.rules[32]={name:"cs",lower:"cs",index:32,isBkr:!1},this.rules[33]={name:"ci",lower:"ci",index:33,isBkr:!1},this.rules[34]={name:"um",lower:"um",index:34,isBkr:!1},this.rules[35]={name:"pm",lower:"pm",index:35,isBkr:!1},this.rules[36]={name:"bkr-name",lower:"bkr-name",index:36,isBkr:!1},this.rules[37]={name:"rname",lower:"rname",index:37,isBkr:!1},this.rules[38]={name:"uname",lower:"uname",index:38,isBkr:!1},this.rules[39]={name:"ename",lower:"ename",index:39,isBkr:!1},this.rules[40]={name:"UdtOp",lower:"udtop",index:40,isBkr:!1},this.rules[41]={name:"udt-non-empty",lower:"udt-non-empty",index:41,isBkr:!1},this.rules[42]={name:"udt-empty",lower:"udt-empty",index:42,isBkr:!1},this.rules[43]={name:"RepOp",lower:"repop",index:43,isBkr:!1},this.rules[44]={name:"AltOp",lower:"altop",index:44,isBkr:!1},this.rules[45]={name:"CatOp",lower:"catop",index:45,isBkr:!1},this.rules[46]={name:"StarOp",lower:"starop",index:46,isBkr:!1},this.rules[47]={name:"AndOp",lower:"andop",index:47,isBkr:!1},this.rules[48]={name:"NotOp",lower:"notop",index:48,isBkr:!1},this.rules[49]={name:"BkaOp",lower:"bkaop",index:49,isBkr:!1},this.rules[50]={name:"BknOp",lower:"bknop",index:50,isBkr:!1},this.rules[51]={name:"AbgOp",lower:"abgop",index:51,isBkr:!1},this.rules[52]={name:"AenOp",lower:"aenop",index:52,isBkr:!1},this.rules[53]={name:"TrgOp",lower:"trgop",index:53,isBkr:!1},this.rules[54]={name:"TbsOp",lower:"tbsop",index:54,isBkr:!1},this.rules[55]={name:"TlsOp",lower:"tlsop",index:55,isBkr:!1},this.rules[56]={name:"TlsCase",lower:"tlscase",index:56,isBkr:!1},this.rules[57]={name:"TlsOpen",lower:"tlsopen",index:57,isBkr:!1},this.rules[58]={name:"TlsClose",lower:"tlsclose",index:58,isBkr:!1},this.rules[59]={name:"TlsString",lower:"tlsstring",index:59,isBkr:!1},this.rules[60]={name:"StringTab",lower:"stringtab",index:60,isBkr:!1},this.rules[61]={name:"ClsOp",lower:"clsop",index:61,isBkr:!1},this.rules[62]={name:"ClsOpen",lower:"clsopen",index:62,isBkr:!1},this.rules[63]={name:"ClsClose",lower:"clsclose",index:63,isBkr:!1},this.rules[64]={name:"ClsString",lower:"clsstring",index:64,isBkr:!1},this.rules[65]={name:"ProsVal",lower:"prosval",index:65,isBkr:!1},this.rules[66]={name:"ProsValOpen",lower:"prosvalopen",index:66,isBkr:!1},this.rules[67]={name:"ProsValString",lower:"prosvalstring",index:67,isBkr:!1},this.rules[68]={name:"ProsValClose",lower:"prosvalclose",index:68,isBkr:!1},this.rules[69]={name:"rep-min",lower:"rep-min",index:69,isBkr:!1},this.rules[70]={name:"rep-min-max",lower:"rep-min-max",index:70,isBkr:!1},this.rules[71]={name:"rep-max",lower:"rep-max",index:71,isBkr:!1},this.rules[72]={name:"rep-num",lower:"rep-num",index:72,isBkr:!1},this.rules[73]={name:"dString",lower:"dstring",index:73,isBkr:!1},this.rules[74]={name:"xString",lower:"xstring",index:74,isBkr:!1},this.rules[75]={name:"bString",lower:"bstring",index:75,isBkr:!1},this.rules[76]={name:"Dec",lower:"dec",index:76,isBkr:!1},this.rules[77]={name:"Hex",lower:"hex",index:77,isBkr:!1},this.rules[78]={name:"Bin",lower:"bin",index:78,isBkr:!1},this.rules[79]={name:"dmin",lower:"dmin",index:79,isBkr:!1},this.rules[80]={name:"dmax",lower:"dmax",index:80,isBkr:!1},this.rules[81]={name:"bmin",lower:"bmin",index:81,isBkr:!1},this.rules[82]={name:"bmax",lower:"bmax",index:82,isBkr:!1},this.rules[83]={name:"xmin",lower:"xmin",index:83,isBkr:!1},this.rules[84]={name:"xmax",lower:"xmax",index:84,isBkr:!1},this.rules[85]={name:"dnum",lower:"dnum",index:85,isBkr:!1},this.rules[86]={name:"bnum",lower:"bnum",index:86,isBkr:!1},this.rules[87]={name:"xnum",lower:"xnum",index:87,isBkr:!1},this.rules[88]={name:"alphanum",lower:"alphanum",index:88,isBkr:!1},this.rules[89]={name:"owsp",lower:"owsp",index:89,isBkr:!1},this.rules[90]={name:"wsp",lower:"wsp",index:90,isBkr:!1},this.rules[91]={name:"space",lower:"space",index:91,isBkr:!1},this.rules[92]={name:"comment",lower:"comment",index:92,isBkr:!1},this.rules[93]={name:"LineEnd",lower:"lineend",index:93,isBkr:!1},this.rules[94]={name:"LineContinue",lower:"linecontinue",index:94,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:3,min:0,max:1/0},this.rules[0].opcodes[1]={type:1,children:[2,3,4]},this.rules[0].opcodes[2]={type:4,index:1},this.rules[0].opcodes[3]={type:4,index:2},this.rules[0].opcodes[4]={type:4,index:12},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:2,children:[1,5,7]},this.rules[1].opcodes[1]={type:3,min:0,max:1/0},this.rules[1].opcodes[2]={type:1,children:[3,4]},this.rules[1].opcodes[3]={type:6,string:[32]},this.rules[1].opcodes[4]={type:6,string:[9]},this.rules[1].opcodes[5]={type:3,min:0,max:1},this.rules[1].opcodes[6]={type:4,index:92},this.rules[1].opcodes[7]={type:4,index:93},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:2,children:[1,2,3,4]},this.rules[2].opcodes[1]={type:4,index:3},this.rules[2].opcodes[2]={type:4,index:89},this.rules[2].opcodes[3]={type:4,index:14},this.rules[2].opcodes[4]={type:1,children:[5,8]},this.rules[2].opcodes[5]={type:2,children:[6,7]},this.rules[2].opcodes[6]={type:4,index:89},this.rules[2].opcodes[7]={type:4,index:93},this.rules[2].opcodes[8]={type:2,children:[9,10]},this.rules[2].opcodes[9]={type:4,index:13},this.rules[2].opcodes[10]={
type:4,index:93},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:2,children:[1,2,3]},this.rules[3].opcodes[1]={type:4,index:4},this.rules[3].opcodes[2]={type:4,index:89},this.rules[3].opcodes[3]={type:4,index:7},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:1,children:[1,2]},this.rules[4].opcodes[1]={type:4,index:5},this.rules[4].opcodes[2]={type:4,index:6},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:4,index:88},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:3,min:1,max:1/0},this.rules[6].opcodes[1]={type:1,children:[2,3]},this.rules[6].opcodes[2]={type:5,min:33,max:60},this.rules[6].opcodes[3]={type:5,min:62,max:126},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:1,children:[1,2]},this.rules[7].opcodes[1]={type:4,index:9},this.rules[7].opcodes[2]={type:4,index:8},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:3,min:1,max:2},this.rules[8].opcodes[1]={type:5,min:33,max:126},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:1,children:[1,2]},this.rules[9].opcodes[1]={type:4,index:11},this.rules[9].opcodes[2]={type:4,index:10},this.rules[10].opcodes=[],this.rules[10].opcodes[0]={type:6,string:[61]},this.rules[11].opcodes=[],this.rules[11].opcodes[0]={type:6,string:[61,47]},this.rules[12].opcodes=[],this.rules[12].opcodes[0]={type:2,children:[1,6]},this.rules[12].opcodes[1]={type:3,min:1,max:1/0},this.rules[12].opcodes[2]={type:1,children:[3,4,5]},this.rules[12].opcodes[3]={type:5,min:32,max:126},this.rules[12].opcodes[4]={type:6,string:[9]},this.rules[12].opcodes[5]={type:4,index:94},this.rules[12].opcodes[6]={type:4,index:93},this.rules[13].opcodes=[],this.rules[13].opcodes[0]={type:3,min:1,max:1/0},this.rules[13].opcodes[1]={type:1,children:[2,3,4]},this.rules[13].opcodes[2]={type:5,min:32,max:126},this.rules[13].opcodes[3]={type:6,string:[9]},this.rules[13].opcodes[4]={type:4,index:94},this.rules[14].opcodes=[],this.rules[14].opcodes[0]={type:2,children:[1,2]},this.rules[14].opcodes[1]={type:4,index:15},this.rules[14].opcodes[2]={type:3,min:0,max:1/0},this.rules[14].opcodes[3]={type:2,children:[4,5,6]},this.rules[14].opcodes[4]={type:4,index:89},this.rules[14].opcodes[5]={type:4,index:44},this.rules[14].opcodes[6]={type:4,index:15},this.rules[15].opcodes=[],this.rules[15].opcodes[0]={type:2,children:[1,2]},this.rules[15].opcodes[1]={type:4,index:16},this.rules[15].opcodes[2]={type:3,min:0,max:1/0},this.rules[15].opcodes[3]={type:2,children:[4,5]},this.rules[15].opcodes[4]={type:4,index:45},this.rules[15].opcodes[5]={type:4,index:16},this.rules[16].opcodes=[],this.rules[16].opcodes[0]={type:2,children:[1,3]},this.rules[16].opcodes[1]={type:3,min:0,max:1},this.rules[16].opcodes[2]={type:4,index:17},this.rules[16].opcodes[3]={type:1,children:[4,5,6,7]},this.rules[16].opcodes[4]={type:4,index:21},this.rules[16].opcodes[5]={type:4,index:25},this.rules[16].opcodes[6]={type:4,index:19},this.rules[16].opcodes[7]={type:4,index:20},this.rules[17].opcodes=[],this.rules[17].opcodes[0]={type:1,children:[1,5]},this.rules[17].opcodes[1]={type:2,children:[2,3]},this.rules[17].opcodes[2]={type:4,index:18},this.rules[17].opcodes[3]={type:3,min:0,max:1},this.rules[17].opcodes[4]={type:4,index:43};this.rules[17].opcodes[5]={type:4,index:43};this.rules[18].opcodes=[],this.rules[18].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[18].opcodes[1]={type:4,index:49},this.rules[18].opcodes[2]={type:4,index:50},this.rules[18].opcodes[3]={type:4,index:47},this.rules[18].opcodes[4]={type:4,index:48},this.rules[19].opcodes=[],this.rules[19].opcodes[0]={type:1,children:[1,2,3,4,5,6,7,8,9,10]},this.rules[19].opcodes[1]={type:4,index:40},this.rules[19].opcodes[2]={type:4,index:29},this.rules[19].opcodes[3]={type:4,index:53},this.rules[19].opcodes[4]={type:4,index:54},this.rules[19].opcodes[5]={type:4,index:55},this.rules[19].opcodes[6]={type:4,index:61},this.rules[19].opcodes[7]={type:4,index:30},this.rules[19].opcodes[8]={type:4,index:51},this.rules[19].opcodes[9]={type:4,index:52},this.rules[19].opcodes[10]={type:4,index:65},this.rules[20].opcodes=[],this.rules[20].opcodes[0]={type:3,min:1,max:1/0},this.rules[20].opcodes[1]={type:1,children:[2,3,4,5]},this.rules[20].opcodes[2]={type:5,min:33,max:40},this.rules[20].opcodes[3]={type:5,min:42,max:46},this.rules[20].opcodes[4]={type:5,min:48,max:92},this.rules[20].opcodes[5]={type:5,min:94,max:126},this.rules[21].opcodes=[],this.rules[21].opcodes[0]={type:2,children:[1,2,3]},this.rules[21].opcodes[1]={type:4,index:23},this.rules[21].opcodes[2]={type:4,index:14},this.rules[21].opcodes[3]={type:1,children:[4,5]},this.rules[21].opcodes[4]={type:4,index:24},this.rules[21].opcodes[5]={type:4,index:22},this.rules[22].opcodes=[],this.rules[22].opcodes[0]={type:3,min:1,max:1/0},this.rules[22].opcodes[1]={type:1,children:[2,3,4,5]},this.rules[22].opcodes[2]={type:5,min:33,max:40},this.rules[22].opcodes[3]={type:5,min:42,max:46},this.rules[22].opcodes[4]={type:5,min:48,max:92},this.rules[22].opcodes[5]={type:5,min:94,max:126},this.rules[23].opcodes=[],this.rules[23].opcodes[0]={type:2,children:[1,2]},this.rules[23].opcodes[1]={type:6,string:[40]},this.rules[23].opcodes[2]={type:4,index:89},this.rules[24].opcodes=[],this.rules[24].opcodes[0]={type:2,children:[1,2]},this.rules[24].opcodes[1]={type:4,index:89},this.rules[24].opcodes[2]={type:6,string:[41]},this.rules[25].opcodes=[],this.rules[25].opcodes[0]={type:2,children:[1,2,3]},this.rules[25].opcodes[1]={type:4,index:27},this.rules[25].opcodes[2]={type:4,index:14},this.rules[25].opcodes[3]={type:1,children:[4,5]},this.rules[25].opcodes[4]={type:4,index:28},this.rules[25].opcodes[5]={type:4,index:26},this.rules[26].opcodes=[],this.rules[26].opcodes[0]={type:3,min:1,max:1/0},this.rules[26].opcodes[1]={type:1,children:[2,3,4,5]},this.rules[26].opcodes[2]={type:5,min:33,max:40},this.rules[26].opcodes[3]={type:5,min:42,max:46},this.rules[26].opcodes[4]={type:5,min:48,max:92},this.rules[26].opcodes[5]={type:5,min:94,max:126},this.rules[27].opcodes=[],this.rules[27].opcodes[0]={type:2,children:[1,2]},this.rules[27].opcodes[1]={type:6,string:[91]},this.rules[27].opcodes[2]={type:4,index:89},this.rules[28].opcodes=[],this.rules[28].opcodes[0]={type:2,children:[1,2]},this.rules[28].opcodes[1]={type:4,index:89},this.rules[28].opcodes[2]={type:6,string:[93]},this.rules[29].opcodes=[],this.rules[29].opcodes[0]={type:4,index:88},this.rules[30].opcodes=[],this.rules[30].opcodes[0]={type:2,children:[1,2,4]},this.rules[30].opcodes[1]={type:6,string:[92]},this.rules[30].opcodes[2]={type:3,min:0,max:1},this.rules[30].opcodes[3]={type:4,index:31},this.rules[30].opcodes[4]={type:4,index:36},this.rules[31].opcodes=[],this.rules[31].opcodes[0]={type:1,children:[1,7,13,19]},this.rules[31].opcodes[1]={type:2,children:[2,3]},this.rules[31].opcodes[2]={type:4,index:32},this.rules[31].opcodes[3]={type:3,min:0,max:1},this.rules[31].opcodes[4]={type:1,children:[5,6]},this.rules[31].opcodes[5]={type:4,index:34},this.rules[31].opcodes[6]={type:4,index:35},this.rules[31].opcodes[7]={type:2,children:[8,9]},this.rules[31].opcodes[8]={type:4,index:33},this.rules[31].opcodes[9]={type:3,min:0,max:1},this.rules[31].opcodes[10]={type:1,children:[11,12]},this.rules[31].opcodes[11]={type:4,index:34},this.rules[31].opcodes[12]={type:4,index:35},this.rules[31].opcodes[13]={type:2,children:[14,15]},this.rules[31].opcodes[14]={type:4,index:34},this.rules[31].opcodes[15]={type:3,min:0,max:1},this.rules[31].opcodes[16]={type:1,children:[17,18]},this.rules[31].opcodes[17]={type:4,index:32},this.rules[31].opcodes[18]={type:4,index:33},this.rules[31].opcodes[19]={type:2,children:[20,21]},this.rules[31].opcodes[20]={type:4,index:35},this.rules[31].opcodes[21]={type:3,min:0,max:1},this.rules[31].opcodes[22]={type:1,children:[23,24]},this.rules[31].opcodes[23]={type:4,index:32},this.rules[31].opcodes[24]={type:4,index:33},this.rules[32].opcodes=[],this.rules[32].opcodes[0]={type:6,string:[37,115]},this.rules[33].opcodes=[],this.rules[33].opcodes[0]={type:6,string:[37,105]},this.rules[34].opcodes=[],this.rules[34].opcodes[0]={type:6,string:[37,117]},this.rules[35].opcodes=[],this.rules[35].opcodes[0]={type:6,string:[37,112]},this.rules[36].opcodes=[],this.rules[36].opcodes[0]={type:1,children:[1,2,3]},this.rules[36].opcodes[1]={type:4,index:38},this.rules[36].opcodes[2]={type:4,index:39},this.rules[36].opcodes[3]={type:4,index:37},this.rules[37].opcodes=[],this.rules[37].opcodes[0]={type:4,index:88},this.rules[38].opcodes=[],this.rules[38].opcodes[0]={type:2,children:[1,2]},this.rules[38].opcodes[1]={type:6,string:[117,95]},this.rules[38].opcodes[2]={type:4,index:88},this.rules[39].opcodes=[],this.rules[39].opcodes[0]={type:2,children:[1,2]},this.rules[39].opcodes[1]={type:6,string:[101,95]},this.rules[39].opcodes[2]={type:4,index:88},this.rules[40].opcodes=[],this.rules[40].opcodes[0]={type:1,children:[1,2]},this.rules[40].opcodes[1]={type:4,index:42},this.rules[40].opcodes[2]={type:4,index:41},this.rules[41].opcodes=[],this.rules[41].opcodes[0]={type:2,children:[1,2]},this.rules[41].opcodes[1]={type:6,string:[117,95]},this.rules[41].opcodes[2]={type:4,index:88},this.rules[42].opcodes=[],this.rules[42].opcodes[0]={type:2,children:[1,2]},this.rules[42].opcodes[1]={type:6,string:[101,95]},this.rules[42].opcodes[2]={type:4,index:88},this.rules[43].opcodes=[],this.rules[43].opcodes[0]={type:1,children:[1,5,8,11,12]},this.rules[43].opcodes[1]={type:2,children:[2,3,4]},this.rules[43].opcodes[2]={type:4,index:69},this.rules[43].opcodes[3]={type:4,index:46},this.rules[43].opcodes[4]={type:4,index:71},this.rules[43].opcodes[5]={type:2,children:[6,7]},this.rules[43].opcodes[6]={type:4,index:69},this.rules[43].opcodes[7]={type:4,index:46},this.rules[43].opcodes[8]={type:2,children:[9,10]},this.rules[43].opcodes[9]={type:4,index:46},this.rules[43].opcodes[10]={type:4,index:71},this.rules[43].opcodes[11]={type:4,index:46},this.rules[43].opcodes[12]={type:4,index:70},this.rules[44].opcodes=[],this.rules[44].opcodes[0]={type:2,children:[1,2]},this.rules[44].opcodes[1]={type:6,string:[47]},this.rules[44].opcodes[2]={type:4,index:89},this.rules[45].opcodes=[],this.rules[45].opcodes[0]={type:4,index:90},this.rules[46].opcodes=[],this.rules[46].opcodes[0]={type:6,string:[42]},this.rules[47].opcodes=[],this.rules[47].opcodes[0]={type:6,string:[38]},this.rules[48].opcodes=[],this.rules[48].opcodes[0]={type:6,string:[33]},this.rules[49].opcodes=[],this.rules[49].opcodes[0]={type:6,string:[38,38]},this.rules[50].opcodes=[],this.rules[50].opcodes[0]={type:6,string:[33,33]},this.rules[51].opcodes=[],this.rules[51].opcodes[0]={type:6,string:[37,94]},this.rules[52].opcodes=[],this.rules[52].opcodes[0]={type:6,string:[37,36]},this.rules[53].opcodes=[],this.rules[53].opcodes[0]={type:2,children:[1,2]},this.rules[53].opcodes[1]={type:6,string:[37]},this.rules[53].opcodes[2]={type:1,children:[3,8,13]},this.rules[53].opcodes[3]={type:2,children:[4,5,6,7]},this.rules[53].opcodes[4]={type:4,index:76},this.rules[53].opcodes[5]={type:4,index:79},this.rules[53].opcodes[6]={type:6,string:[45]},this.rules[53].opcodes[7]={type:4,index:80},this.rules[53].opcodes[8]={type:2,children:[9,10,11,12]},this.rules[53].opcodes[9]={type:4,index:77},this.rules[53].opcodes[10]={type:4,index:83},this.rules[53].opcodes[11]={type:6,string:[45]},this.rules[53].opcodes[12]={type:4,index:84},this.rules[53].opcodes[13]={type:2,children:[14,15,16,17]},this.rules[53].opcodes[14]={type:4,index:78},this.rules[53].opcodes[15]={type:4,index:81},this.rules[53].opcodes[16]={type:6,string:[45]},this.rules[53].opcodes[17]={type:4,index:82},this.rules[54].opcodes=[],this.rules[54].opcodes[0]={type:2,children:[1,2]},this.rules[54].opcodes[1]={type:6,string:[37]},this.rules[54].opcodes[2]={type:1,children:[3,10,17]},this.rules[54].opcodes[3]={type:2,children:[4,5,6]},this.rules[54].opcodes[4]={type:4,index:76},this.rules[54].opcodes[5]={type:4,index:73},this.rules[54].opcodes[6]={type:3,min:0,max:1/0},this.rules[54].opcodes[7]={type:2,children:[8,9]};this.rules[54].opcodes[8]={type:6,string:[46]};this.rules[54].opcodes[9]={type:4,index:73},this.rules[54].opcodes[10]={type:2,children:[11,12,13]},this.rules[54].opcodes[11]={type:4,index:77},this.rules[54].opcodes[12]={type:4,index:74},this.rules[54].opcodes[13]={type:3,min:0,max:1/0},this.rules[54].opcodes[14]={type:2,children:[15,16]},this.rules[54].opcodes[15]={type:6,string:[46]},this.rules[54].opcodes[16]={type:4,index:74},this.rules[54].opcodes[17]={type:2,children:[18,19,20]},this.rules[54].opcodes[18]={type:4,index:78},this.rules[54].opcodes[19]={type:4,index:75},this.rules[54].opcodes[20]={type:3,min:0,max:1/0},this.rules[54].opcodes[21]={type:2,children:[22,23]},this.rules[54].opcodes[22]={type:6,string:[46]},this.rules[54].opcodes[23]={type:4,index:75},this.rules[55].opcodes=[],this.rules[55].opcodes[0]={type:2,children:[1,2,3,4]},this.rules[55].opcodes[1]={type:4,index:56},this.rules[55].opcodes[2]={type:4,index:57},this.rules[55].opcodes[3]={type:4,index:59},this.rules[55].opcodes[4]={type:4,index:58},this.rules[56].opcodes=[],this.rules[56].opcodes[0]={type:3,min:0,max:1},this.rules[56].opcodes[1]={type:1,children:[2,3]},this.rules[56].opcodes[2]={type:7,string:[37,105]},this.rules[56].opcodes[3]={type:7,string:[37,115]},this.rules[57].opcodes=[],this.rules[57].opcodes[0]={type:6,string:[34]},this.rules[58].opcodes=[],this.rules[58].opcodes[0]={type:6,string:[34]},this.rules[59].opcodes=[],this.rules[59].opcodes[0]={type:3,min:0,max:1/0},this.rules[59].opcodes[1]={type:1,children:[2,3,4]},this.rules[59].opcodes[2]={type:5,min:32,max:33},this.rules[59].opcodes[3]={type:5,min:35,max:126},this.rules[59].opcodes[4]={type:4,index:60},this.rules[60].opcodes=[],this.rules[60].opcodes[0]={type:6,string:[9]},this.rules[61].opcodes=[],this.rules[61].opcodes[0]={type:2,children:[1,2,3]},this.rules[61].opcodes[1]={type:4,index:62},this.rules[61].opcodes[2]={type:4,index:64},this.rules[61].opcodes[3]={type:4,index:63},this.rules[62].opcodes=[],this.rules[62].opcodes[0]={type:6,string:[39]},this.rules[63].opcodes=[],this.rules[63].opcodes[0]={type:6,string:[39]},this.rules[64].opcodes=[],this.rules[64].opcodes[0]={type:3,min:0,max:1/0},this.rules[64].opcodes[1]={type:1,children:[2,3,4]},this.rules[64].opcodes[2]={type:5,min:32,max:38},this.rules[64].opcodes[3]={type:5,min:40,max:126},this.rules[64].opcodes[4]={type:4,index:60},this.rules[65].opcodes=[],this.rules[65].opcodes[0]={type:2,children:[1,2,3]},this.rules[65].opcodes[1]={type:4,index:66},this.rules[65].opcodes[2]={type:4,index:67},this.rules[65].opcodes[3]={type:4,index:68},this.rules[66].opcodes=[],this.rules[66].opcodes[0]={type:6,string:[60]},this.rules[67].opcodes=[],this.rules[67].opcodes[0]={type:3,min:0,max:1/0},this.rules[67].opcodes[1]={type:1,children:[2,3,4]},this.rules[67].opcodes[2]={type:5,min:32,max:61},this.rules[67].opcodes[3]={type:5,min:63,max:126},this.rules[67].opcodes[4]={type:4,index:60},this.rules[68].opcodes=[],this.rules[68].opcodes[0]={type:6,string:[62]},this.rules[69].opcodes=[],this.rules[69].opcodes[0]={type:4,index:72},this.rules[70].opcodes=[],this.rules[70].opcodes[0]={type:4,index:72},this.rules[71].opcodes=[],this.rules[71].opcodes[0]={type:4,index:72},this.rules[72].opcodes=[],this.rules[72].opcodes[0]={type:3,min:1,max:1/0},this.rules[72].opcodes[1]={type:5,min:48,max:57},this.rules[73].opcodes=[],this.rules[73].opcodes[0]={type:4,index:85},this.rules[74].opcodes=[],this.rules[74].opcodes[0]={type:4,index:87},this.rules[75].opcodes=[],this.rules[75].opcodes[0]={type:4,index:86},this.rules[76].opcodes=[],this.rules[76].opcodes[0]={type:1,children:[1,2]},this.rules[76].opcodes[1]={type:6,string:[68]},this.rules[76].opcodes[2]={type:6,string:[100]},this.rules[77].opcodes=[],this.rules[77].opcodes[0]={type:1,children:[1,2]},this.rules[77].opcodes[1]={type:6,string:[88]},this.rules[77].opcodes[2]={type:6,string:[120]},this.rules[78].opcodes=[],this.rules[78].opcodes[0]={type:1,children:[1,2]},this.rules[78].opcodes[1]={type:6,string:[66]},this.rules[78].opcodes[2]={type:6,string:[98]},this.rules[79].opcodes=[],this.rules[79].opcodes[0]={type:4,index:85},this.rules[80].opcodes=[],this.rules[80].opcodes[0]={type:4,index:85},this.rules[81].opcodes=[],this.rules[81].opcodes[0]={type:4,index:86},this.rules[82].opcodes=[],this.rules[82].opcodes[0]={type:4,index:86},this.rules[83].opcodes=[],this.rules[83].opcodes[0]={type:4,index:87},this.rules[84].opcodes=[],this.rules[84].opcodes[0]={type:4,index:87},this.rules[85].opcodes=[],this.rules[85].opcodes[0]={type:3,min:1,max:1/0},this.rules[85].opcodes[1]={type:5,min:48,max:57},this.rules[86].opcodes=[],this.rules[86].opcodes[0]={type:3,min:1,max:1/0},this.rules[86].opcodes[1]={type:5,min:48,max:49},this.rules[87].opcodes=[],this.rules[87].opcodes[0]={type:3,min:1,max:1/0},this.rules[87].opcodes[1]={type:1,children:[2,3,4]},this.rules[87].opcodes[2]={type:5,min:48,max:57},this.rules[87].opcodes[3]={type:5,min:65,max:70},this.rules[87].opcodes[4]={type:5,min:97,max:102},this.rules[88].opcodes=[],this.rules[88].opcodes[0]={type:2,children:[1,4]},this.rules[88].opcodes[1]={type:1,children:[2,3]},this.rules[88].opcodes[2]={type:5,min:97,max:122},this.rules[88].opcodes[3]={type:5,min:65,max:90},this.rules[88].opcodes[4]={type:3,min:0,max:1/0},this.rules[88].opcodes[5]={type:1,children:[6,7,8,9]},this.rules[88].opcodes[6]={type:5,min:97,max:122},this.rules[88].opcodes[7]={type:5,min:65,max:90},this.rules[88].opcodes[8]={type:5,min:48,max:57},this.rules[88].opcodes[9]={type:6,string:[45]},this.rules[89].opcodes=[],this.rules[89].opcodes[0]={type:3,min:0,max:1/0},this.rules[89].opcodes[1]={type:4,index:91},this.rules[90].opcodes=[],this.rules[90].opcodes[0]={type:3,min:1,max:1/0},this.rules[90].opcodes[1]={type:4,index:91},this.rules[91].opcodes=[],this.rules[91].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[91].opcodes[1]={type:6,string:[32]},this.rules[91].opcodes[2]={type:6,string:[9]},this.rules[91].opcodes[3]={type:4,index:92},this.rules[91].opcodes[4]={type:4,index:94},this.rules[92].opcodes=[],this.rules[92].opcodes[0]={type:2,children:[1,2]},this.rules[92].opcodes[1]={type:6,string:[59]},this.rules[92].opcodes[2]={type:3,min:0,max:1/0},this.rules[92].opcodes[3]={type:1,children:[4,5]},this.rules[92].opcodes[4]={type:5,min:32,max:126},this.rules[92].opcodes[5]={type:6,string:[9]},this.rules[93].opcodes=[],this.rules[93].opcodes[0]={type:1,children:[1,2,3]},this.rules[93].opcodes[1]={type:6,string:[13,10]},this.rules[93].opcodes[2]={type:6,string:[10]},this.rules[93].opcodes[3]={type:6,string:[13]},this.rules[94].opcodes=[],this.rules[94].opcodes[0]={type:2,children:[1,5]},this.rules[94].opcodes[1]={type:1,children:[2,3,4]},this.rules[94].opcodes[2]={type:6,string:[13,10]},this.rules[94].opcodes[3]={type:6,string:[10]},this.rules[94].opcodes[4]={type:6,string:[13]},this.rules[94].opcodes[5]={type:1,children:[6,7]},this.rules[94].opcodes[6]={type:6,string:[32]},this.rules[94].opcodes[7]={type:6,string:[9]},this.toString=function(){var e="";return e+=";\n",e+="; ABNF for JavaScript APG 2.0 SABNF\n",e+="; RFC 5234 with some restrictions and additions.\n",e+="; Updated 11/24/2015 for RFC 7405 case-sensitive literal string notation\n",e+='; - accepts %s"string" as a case-sensitive string\n',e+='; - accepts %i"string" as a case-insensitive string\n',e+='; - accepts "string" as a case-insensitive string\n',e+=";\n",e+="; Some restrictions:\n",e+="; 1. Rules must begin at first character of each line.\n",e+="; Indentations on first rule and rules thereafter are not allowed.\n",e+="; 2. Relaxed line endings. CRLF, LF or CR are accepted as valid line ending.\n",e+="; 3. Prose values, i.e. <prose value>, are accepted as valid grammar syntax.\n",e+="; However, a working parser cannot be generated from them.\n",e+=";\n",e+="; Super set (SABNF) additions:\n",e+="; 1. Look-ahead (syntactic predicate) operators are accepted as element prefixes.\n",e+="; & is the positive look-ahead operator, succeeds and backtracks if the look-ahead phrase is found\n",e+="; ! is the negative look-ahead operator, succeeds and backtracks if the look-ahead phrase is NOT found\n",e+="; e.g. &%d13 or &rule or !(A / B)\n",e+="; 2. User-Defined Terminals (UDT) of the form, u_name and e_name are accepted.\n",e+="; 'name' is alpha followed by alpha/num/hyphen just like a rule name.\n",e+="; u_name may be used as an element but no rule definition is given.\n",e+="; e.g. rule = A / u_myUdt\n",e+='; A = "a"\n',e+="; would be a valid grammar.\n",e+="; 3. Case-sensitive, single-quoted strings are accepted.\n",e+="; e.g. 'abc' would be equivalent to %d97.98.99\n",e+='; (kept for backward compatibility, but superseded by %s"abc") \n',e+="; New 12/26/2015\n",e+="; 4. Look-behind operators are accepted as element prefixes.\n",e+="; && is the positive look-behind operator, succeeds and backtracks if the look-behind phrase is found\n",e+="; !! is the negative look-behind operator, succeeds and backtracks if the look-behind phrase is NOT found\n",e+="; e.g. &&%d13 or &&rule or !!(A / B)\n",e+="; 5. Back reference operators, i.e. \\rulename, are accepted.\n",e+="; A back reference operator acts like a TLS or TBS terminal except that the phrase it attempts\n",e+="; to match is a phrase previously matched by the rule 'rulename'.\n",e+="; There are two modes of previous phrase matching - the parent-frame mode and the universal mode.\n",e+="; In universal mode, \\rulename matches the last match to 'rulename' regardless of where it was found.\n",e+="; In parent-frame mode, \\rulename matches only the last match found on the parent's frame or parse tree level.\n",e+="; Back reference modifiers can be used to specify case and mode.\n",e+="; \\A defaults to case-insensitive and universal mode, e.g. \\A === \\%i%uA\n",e+="; Modifiers %i and %s determine case-insensitive and case-sensitive mode, respectively.\n",e+="; Modifiers %u and %p determine universal mode and parent frame mode, respectively.\n",e+="; Case and mode modifiers can appear in any order, e.g. \\%s%pA === \\%p%sA. \n",e+="; 7. String begin anchor, ABG(%^) matches the beginning of the input string location.\n",e+="; Returns EMPTY or NOMATCH. Never consumes any characters.\n",e+="; 8. String end anchor, AEN(%$) matches the end of the input string location.\n",e+="; Returns EMPTY or NOMATCH. Never consumes any characters.\n",e+=";\n",e+="File = *(BlankLine / Rule / RuleError)\n",e+="BlankLine = *(%d32/%d9) [comment] LineEnd\n",e+="Rule = RuleLookup owsp Alternation ((owsp LineEnd)\n",e+=" / (LineEndError LineEnd))\n",e+="RuleLookup = RuleNameTest owsp DefinedAsTest\n",e+="RuleNameTest = RuleName/RuleNameError\n",e+="RuleName = alphanum\n",e+="RuleNameError = 1*(%d33-60/%d62-126)\n",e+="DefinedAsTest = DefinedAs / DefinedAsError\n",e+="DefinedAsError = 1*2%d33-126\n",e+="DefinedAs = IncAlt / Defined\n",e+="Defined = %d61\n",e+="IncAlt = %d61.47\n",e+="RuleError = 1*(%d32-126 / %d9 / LineContinue) LineEnd\n",e+="LineEndError = 1*(%d32-126 / %d9 / LineContinue)\n",e+="Alternation = Concatenation *(owsp AltOp Concatenation)\n",e+="Concatenation = Repetition *(CatOp Repetition)\n",e+="Repetition = [Modifier] (Group / Option / BasicElement / BasicElementErr)\n",e+="Modifier = (Predicate [RepOp])\n",e+=" / RepOp\n",e+="Predicate = BkaOp\n",e+=" / BknOp\n",e+=" / AndOp\n",e+=" / NotOp\n",e+="BasicElement = UdtOp\n",e+=" / RnmOp\n",e+=" / TrgOp\n",e+=" / TbsOp\n",e+=" / TlsOp\n",e+=" / ClsOp\n",e+=" / BkrOp\n",e+=" / AbgOp\n",e+=" / AenOp\n",e+=" / ProsVal\n",e+="BasicElementErr = 1*(%d33-40/%d42-46/%d48-92/%d94-126)\n",e+="Group = GroupOpen Alternation (GroupClose / GroupError)\n",e+="GroupError = 1*(%d33-40/%d42-46/%d48-92/%d94-126) ; same as BasicElementErr\n",e+="GroupOpen = %d40 owsp\n",e+="GroupClose = owsp %d41\n",e+="Option = OptionOpen Alternation (OptionClose / OptionError)\n",e+="OptionError = 1*(%d33-40/%d42-46/%d48-92/%d94-126) ; same as BasicElementErr\n",e+="OptionOpen = %d91 owsp\n",e+="OptionClose = owsp %d93\n",e+="RnmOp = alphanum\n",e+="BkrOp = %d92 [bkrModifier] bkr-name\n",e+="bkrModifier = (cs [um / pm]) / (ci [um / pm]) / (um [cs /ci]) / (pm [cs / ci])\n",e+="cs = '%s'\n",e+="ci = '%i'\n",e+="um = '%u'\n",e+="pm = '%p'\n",e+="bkr-name = uname / ename / rname\n",e+="rname = alphanum\n",e+="uname = %d117.95 alphanum\n",e+="ename = %d101.95 alphanum\n",e+="UdtOp = udt-empty\n",e+=" / udt-non-empty\n",e+="udt-non-empty = %d117.95 alphanum\n",e+="udt-empty = %d101.95 alphanum\n",e+="RepOp = (rep-min StarOp rep-max)\n",e+=" / (rep-min StarOp)\n",e+=" / (StarOp rep-max)\n",e+=" / StarOp\n",e+=" / rep-min-max\n",e+="AltOp = %d47 owsp\n",e+="CatOp = wsp\n",e+="StarOp = %d42\n",e+="AndOp = %d38\n",e+="NotOp = %d33\n",e+="BkaOp = %d38.38\n",e+="BknOp = %d33.33\n",e+="AbgOp = %d37.94\n",e+="AenOp = %d37.36\n",e+="TrgOp = %d37 ((Dec dmin %d45 dmax) / (Hex xmin %d45 xmax) / (Bin bmin %d45 bmax))\n",e+="TbsOp = %d37 ((Dec dString *(%d46 dString)) / (Hex xString *(%d46 xString)) / (Bin bString *(%d46 bString)))\n",e+="TlsOp = TlsCase TlsOpen TlsString TlsClose\n",e+='TlsCase = ["%i" / "%s"]\n',e+="TlsOpen = %d34\n",e+="TlsClose = %d34\n",e+="TlsString = *(%d32-33/%d35-126/StringTab)\n",e+="StringTab = %d9\n",e+="ClsOp = ClsOpen ClsString ClsClose\n",e+="ClsOpen = %d39\n",e+="ClsClose = %d39\n",e+="ClsString = *(%d32-38/%d40-126/StringTab)\n",e+="ProsVal = ProsValOpen ProsValString ProsValClose\n",e+="ProsValOpen = %d60\n",e+="ProsValString = *(%d32-61/%d63-126/StringTab)\n",e+="ProsValClose = %d62\n",e+="rep-min = rep-num\n",e+="rep-min-max = rep-num\n",e+="rep-max = rep-num\n",e+="rep-num = 1*(%d48-57)\n",e+="dString = dnum\n",e+="xString = xnum\n",e+="bString = bnum\n",e+="Dec = (%d68/%d100)\n",e+="Hex = (%d88/%d120)\n",e+="Bin = (%d66/%d98)\n",e+="dmin = dnum\n",e+="dmax = dnum\n",e+="bmin = bnum\n",e+="bmax = bnum\n",e+="xmin = xnum\n",e+="xmax = xnum\n",e+="dnum = 1*(%d48-57)\n",e+="bnum = 1*%d48-49\n",e+="xnum = 1*(%d48-57 / %d65-70 / %d97-102)\n",e+=";\n",e+="; Basics\n",e+="alphanum = (%d97-122/%d65-90) *(%d97-122/%d65-90/%d48-57/%d45)\n",e+="owsp = *space\n",e+="wsp = 1*space\n",e+="space = %d32\n",e+=" / %d9\n",e+=" / comment\n",e+=" / LineContinue\n",e+="comment = %d59 *(%d32-126 / %d9)\n",e+="LineEnd = %d13.10\n",e+=" / %d10\n",e+=" / %d13\n",e+="LineContinue = (%d13.10 / %d10 / %d13) (%d32 / %d9)\n"}}},function(e,t,r){function n(e,t,r,n,s){return e==p.SEM_PRE?(s.endLength=0,s.textLength=0,s.invalidCount=0):s.lines.push({lineNo:s.lines.length,beginChar:r,length:n,textLength:s.textLength,endType:s.endType,invalidChars:s.invalidCount}),p.SEM_OK}function s(e,t,r,n,s){return e==p.SEM_PRE&&(s.textLength=n),p.SEM_OK}function i(e,t,r,n,s){return e==p.SEM_PRE?(s.endLength=0,s.textLength=0,s.invalidCount=0):s.strict?(s.lines.push({lineNo:s.lines.length,beginChar:r,length:n,textLength:n,endType:"none",invalidChars:s.invalidCount}),s.errors.push({line:s.lineNo,char:r+n,msg:"no line end on last line - strict ABNF specifies CRLF(\\r\\n, \\x0D\\x0A)"})):(t.push(10),s.lines.push({lineNo:s.lines.length,beginChar:r,length:n+1,textLength:n,endType:"LF",invalidChars:s.invalidCount})),p.SEM_OK}function a(e,t,r,n,s){return e==p.SEM_PRE&&s.errors.push({line:s.lineNo,char:r,msg:"invalid character found '\\x"+u.utils.charToHex(t[r])+"'"}),p.SEM_OK}function o(e,t,r,n,s){return e==p.SEM_POST&&(s.lineNo+=1),p.SEM_OK}function l(e,t,r,n,s){return e==p.SEM_PRE&&(s.endType="LF",s.strict&&s.errors.push({line:s.lineNo,char:r,msg:"line end character LF(\\n, \\x0A) - strict ABNF specifies CRLF(\\r\\n, \\x0D\\x0A)"})),p.SEM_OK}function c(e,t,r,n,s){return e==p.SEM_PRE&&(s.endType="CR",s.strict&&s.errors.push({line:s.lineNo,char:r,msg:"line end character CR(\\r, \\x0D) - strict ABNF specifies CRLF(\\r\\n, \\x0D\\x0A)"})),p.SEM_OK}function h(e,t,r,n,s){return e==p.SEM_PRE&&(s.endType="CRLF"),p.SEM_OK}var u=r(0),p=u.ids,d=[];d.line=n,d["line-text"]=s,d["last-line"]=i,d.invalid=a,d.end=o,d.lf=l,d.cr=c,d.crlf=h,t.callbacks=d},function(e,t){e.exports=function(){"use strict";this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"file",lower:"file",index:0,isBkr:!1},this.rules[1]={name:"line",lower:"line",index:1,isBkr:!1},this.rules[2]={name:"line-text",lower:"line-text",index:2,isBkr:!1},this.rules[3]={name:"last-line",lower:"last-line",index:3,isBkr:!1},this.rules[4]={name:"valid",lower:"valid",index:4,isBkr:!1},this.rules[5]={name:"invalid",lower:"invalid",index:5,isBkr:!1},this.rules[6]={name:"end",lower:"end",index:6,isBkr:!1},this.rules[7]={name:"CRLF",lower:"crlf",index:7,isBkr:!1},this.rules[8]={name:"LF",lower:"lf",index:8,isBkr:!1},this.rules[9]={name:"CR",lower:"cr",index:9,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:2,children:[1,3]},this.rules[0].opcodes[1]={type:3,min:0,max:1/0},this.rules[0].opcodes[2]={type:4,index:1},this.rules[0].opcodes[3]={type:3,min:0,max:1},this.rules[0].opcodes[4]={type:4,index:3},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:2,children:[1,2]},this.rules[1].opcodes[1]={type:4,index:2},this.rules[1].opcodes[2]={type:4,index:6},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:3,min:0,max:1/0},this.rules[2].opcodes[1]={type:1,children:[2,3]},this.rules[2].opcodes[2]={type:4,index:4},this.rules[2].opcodes[3]={type:4,index:5},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:3,min:1,max:1/0},this.rules[3].opcodes[1]={type:1,children:[2,3]},this.rules[3].opcodes[2]={type:4,index:4},this.rules[3].opcodes[3]={type:4,index:5},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:1,children:[1,2]},this.rules[4].opcodes[1]={type:5,min:32,max:126},this.rules[4].opcodes[2]={type:6,string:[9]},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:1,children:[1,2,3,4]},this.rules[5].opcodes[1]={type:5,min:0,max:8},this.rules[5].opcodes[2]={type:5,min:11,max:12},this.rules[5].opcodes[3]={type:5,min:14,max:31},this.rules[5].opcodes[4]={type:5,min:127,max:4294967295},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:1,children:[1,2,3]},this.rules[6].opcodes[1]={type:4,index:7},this.rules[6].opcodes[2]={type:4,index:8},this.rules[6].opcodes[3]={type:4,index:9},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:6,string:[13,10]},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:6,string:[10]},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:6,string:[13]},this.toString=function(){var e="";return e+="file = *line [last-line]\n",e+="line = line-text end\n",e+="line-text = *(valid/invalid)\n",e+="last-line = 1*(valid/invalid)\n",e+="valid = %d32-126 / %d9\n",e+="invalid = %d0-8 / %d11-12 /%d14-31 / %x7f-ffffffff\n",e+="end = CRLF / LF / CR\n",e+="CRLF = %d13.10\n",e+="LF = %d10\n",e+="CR = %d13\n"}}},function(e,t,r){e.exports=function(e,t,n,s){"use strict";var i="scanner.js: ",a=r(0),o=new(r(23)),l=r(22).callbacks,c=[],h=new a.parser;
if(h.ast=new a.ast,h.ast.callbacks=l,s){if("traceObject"!==s.traceObject)throw new TypError(i+"trace argument is not a trace object");h.trace=s}var u=h.parse(o,"file",e);if(u.success!==!0)return void t.push({line:0,char:0,msg:"syntax analysis error analyzing input SABNF grammar"});var p={lines:c,lineNo:0,errors:t,strict:!!n};return h.ast.translate(p),c}},function(e,t,r){e.exports=function(e){"use strict";function t(e,t,r,n,s){var i=z.SEM_OK;if(e==z.SEM_PRE)s.ruleNames=new q,s.udtNames=new q,s.rules=[],s.udts=[],s.rulesLineMap=[],s.opcodes=[],s.altStack=[],s.topStack=null,s.topRule=null;else if(e==z.SEM_POST){var a;s.rules.forEach(function(e,t){e.isBkr=!1,e.opcodes.forEach(function(e,t){e.type===z.RNM&&(a=s.ruleNames.get(e.index.name),a===-1?(s.errors.push({line:s.findLine(s.lines,e.index.phraseIndex,s.charsLength),char:e.index.phraseIndex,msg:"Rule name '"+e.index.name+"' used but not defined."}),e.index=-1):e.index=a.index)})}),s.udts.forEach(function(e){e.isBkr=!1}),s.rules.forEach(function(e,t){e.opcodes.forEach(function(t,r){t.type===z.BKR&&(e.hasBkr=!0,a=s.ruleNames.get(t.index.name),a!==-1?(s.rules[a.index].isBkr=!0,t.index=a.index):(a=s.udtNames.get(t.index.name),a!==-1?(s.udts[a.index].isBkr=!0,t.index=s.rules.length+a.index):(s.errors.push({line:s.findLine(s.lines,t.index.phraseIndex,s.charsLength),char:t.index.phraseIndex,msg:"Back reference name '"+t.index.name+"' refers to undefined rule or unamed UDT."}),t.index=-1)))})})}return i}function n(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE?(s.altStack.length=0,s.topStack=null,s.rulesLineMap.push({line:s.findLine(s.lines,r,s.charsLength),char:r})):e==z.SEM_POST,i}function s(e,t,r,n,s){var i=z.SEM_OK;if(e==z.SEM_PRE)s.ruleName="",s.definedas="";else if(e==z.SEM_POST){var a;"="===s.definedas?(a=s.ruleNames.add(s.ruleName),a===-1?(s.definedas=null,s.errors.push({line:s.findLine(s.lines,r,s.charsLength),char:r,msg:"Rule name '"+s.ruleName+"' previously defined."})):(s.topRule={name:a.name,lower:a.lower,opcodes:[],index:a.index},s.rules.push(s.topRule),s.opcodes=s.topRule.opcodes)):(a=s.ruleNames.get(s.ruleName),a===-1?(s.definedas=null,s.errors.push({line:s.findLine(s.lines,r,s.charsLength),char:r,msg:"Rule name '"+s.ruleName+"' for incremental alternate not previously defined."})):(s.topRule=s.rules[a.index],s.opcodes=s.topRule.opcodes))}return i}function i(e,t,r,n,s){var i=z.SEM_OK;if(e==z.SEM_PRE)for(;;){if(null===s.definedas){i=z.SEM_SKIP;break}if(null===s.topStack){if("="===s.definedas){s.topStack={alt:{type:z.ALT,children:[]},cat:null},s.altStack.push(s.topStack),s.opcodes.push(s.topStack.alt);break}s.topStack={alt:s.opcodes[0],cat:null},s.altStack.push(s.topStack);break}s.topStack={alt:{type:z.ALT,children:[]},cat:null},s.altStack.push(s.topStack),s.opcodes.push(s.topStack.alt);break}else e==z.SEM_POST&&(s.altStack.pop(),s.altStack.length>0?s.topStack=s.altStack[s.altStack.length-1]:s.topStack=null);return i}function a(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE?(s.topStack.alt.children.push(s.opcodes.length),s.topStack.cat={type:z.CAT,children:[]},s.opcodes.push(s.topStack.cat)):e==z.SEM_POST&&(s.topStack.cat=null),i}function o(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE?s.topStack.cat.children.push(s.opcodes.length):e==z.SEM_POST,i}function l(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE||e==z.SEM_POST&&s.opcodes.push({type:z.REP,min:0,max:1,char:r}),i}function c(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE?s.ruleName=$.utils.charsToString(t,r,n):e==z.SEM_POST,i}function h(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE||e==z.SEM_POST&&(s.definedas="="),i}function u(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE||e==z.SEM_POST&&(s.definedas="=/"),i}function p(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE?(s.min=0,s.max=1/0,s.topRep={type:z.REP,min:0,max:1/0},s.opcodes.push(s.topRep)):e==z.SEM_POST&&(s.min>s.max&&s.errors.push({line:s.findLine(s.lines,r,s.charsLength),char:r,msg:"repetition min cannot be greater than max: min: "+s.min+": max: "+s.max}),s.topRep.min=s.min,s.topRep.max=s.max),i}function d(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE||e==z.SEM_POST&&(s.min=J(t,r,n)),i}function f(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE||e==z.SEM_POST&&(s.max=J(t,r,n)),i}function g(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE||e==z.SEM_POST&&(s.max=J(t,r,n),s.min=s.max),i}function m(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE||e==z.SEM_POST&&s.opcodes.push({type:z.AND}),i}function b(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE||e==z.SEM_POST&&s.opcodes.push({type:z.NOT}),i}function y(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE||e==z.SEM_POST&&s.opcodes.push({type:z.RNM,index:{phraseIndex:r,name:$.utils.charsToString(t,r,n)}}),i}function x(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE||e==z.SEM_POST&&s.opcodes.push({type:z.ABG}),i}function T(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE||e==z.SEM_POST&&s.opcodes.push({type:z.AEN}),i}function E(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE||e==z.SEM_POST&&s.opcodes.push({type:z.BKA}),i}function k(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE||e==z.SEM_POST&&s.opcodes.push({type:z.BKN}),i}function A(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE?(s.ci=!0,s.cs=!1,s.um=!0,s.pm=!1):e==z.SEM_POST&&s.opcodes.push({type:z.BKR,bkrCase:s.cs===!0?z.BKR_MODE_CS:z.BKR_MODE_CI,bkrMode:s.pm===!0?z.BKR_MODE_PM:z.BKR_MODE_UM,index:{phraseIndex:s.bkrname.phraseIndex,name:$.utils.charsToString(t,s.bkrname.phraseIndex,s.bkrname.phraseLength)}}),i}function v(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE||e==z.SEM_POST&&(s.ci=!0),i}function w(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE||e==z.SEM_POST&&(s.cs=!0),i}function S(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE||e==z.SEM_POST&&(s.um=!0),i}function C(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE||e==z.SEM_POST&&(s.pm=!0),i}function M(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE||e==z.SEM_POST&&(s.bkrname={phraseIndex:r,phraseLength:n}),i}function O(e,t,r,n,s){var i=z.SEM_OK;if(e==z.SEM_PRE);else if(e==z.SEM_POST){var a=$.utils.charsToString(t,r,n),o=s.udtNames.add(a);if(o===-1){if(o=s.udtNames.get(a),o===-1)throw new Error("semUdtEmpty: name look up error")}else s.udts.push({name:o.name,lower:o.lower,index:o.index,empty:!0});s.opcodes.push({type:z.UDT,empty:!0,index:o.index})}return i}function R(e,t,r,n,s){var i=z.SEM_OK;if(e==z.SEM_PRE);else if(e==z.SEM_POST){var a=$.utils.charsToString(t,r,n),o=s.udtNames.add(a);if(o===-1){if(o=s.udtNames.get(a),o===-1)throw new Error("semUdtNonEmpty: name look up error")}else s.udts.push({name:o.name,lower:o.lower,index:o.index,empty:!1});s.opcodes.push({type:z.UDT,empty:!1,index:o.index,syntax:null,semantic:null})}return i}function L(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE?s.tlscase=!0:e==z.SEM_POST,i}function _(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE||e==z.SEM_POST&&n>0&&(83===t[r+1]||115===t[r+1])&&(s.tlscase=!1),i}function B(e,t,r,n,s){var i=z.SEM_OK;if(e==z.SEM_PRE);else if(e==z.SEM_POST)if(s.tlscase){for(var a=t.slice(r,r+n),o=0;o<a.length;o+=1)a[o]>=65&&a[o]<=90&&(a[o]+=32);s.opcodes.push({type:z.TLS,string:a})}else s.opcodes.push({type:z.TBS,string:t.slice(r,r+n)});return i}function N(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE||e==z.SEM_POST&&(n<=2?s.opcodes.push({type:z.TLS,string:[]}):s.opcodes.push({type:z.TBS,string:t.slice(r+1,r+n-1)})),i}function P(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE?s.tbsstr=[]:e==z.SEM_POST&&s.opcodes.push({type:z.TBS,string:s.tbsstr}),i}function H(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE?(s.min=0,s.max=0):e==z.SEM_POST&&(s.min>s.max&&s.errors.push({line:s.findLine(s.lines,r,s.charsLength),char:r,msg:"TRG, (%dmin-max), min cannot be greater than max: min: "+s.min+": max: "+s.max}),s.opcodes.push({type:z.TRG,min:s.min,max:s.max})),i}function I(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE||e==z.SEM_POST&&(s.min=J(t,r,n)),i}function D(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE||e==z.SEM_POST&&(s.max=J(t,r,n)),i}function U(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE||e==z.SEM_POST&&(s.min=X(t,r,n)),i}function F(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE||e==z.SEM_POST&&(s.max=X(t,r,n)),i}function K(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE||e==z.SEM_POST&&(s.min=W(t,r,n)),i}function Y(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE||e==z.SEM_POST&&(s.max=W(t,r,n)),i}function j(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE||e==z.SEM_POST&&s.tbsstr.push(J(t,r,n)),i}function V(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE||e==z.SEM_POST&&s.tbsstr.push(X(t,r,n)),i}function G(e,t,r,n,s){var i=z.SEM_OK;return e==z.SEM_PRE||e==z.SEM_POST&&s.tbsstr.push(W(t,r,n)),i}var $=r(0),z=$.ids,q=function(){this.names=[],this.add=function(e){var t=-1,r=this.get(e);return r===-1&&(t={name:e,lower:e.toLowerCase(),index:this.names.length},this.names.push(t)),t},this.get=function(e){for(var t=-1,r=e.toLowerCase(),n=0;n<this.names.length;n+=1)if(this.names[n].lower===r){t=this.names[n];break}return t}},J=function(e,t,r){for(var n=0,s=t;s<t+r;s+=1)n=10*n+e[s]-48;return n},X=function(e,t,r){for(var n=0,s=t;s<t+r;s+=1)n=2*n+e[s]-48;return n},W=function(e,t,r){for(var n=0,s=t;s<t+r;s+=1){var i=e[s];if(i>=48&&i<=57)i-=48;else if(i>=65&&i<=70)i-=55;else{if(!(i>=97&&i<=102))throw"hexnum out of range";i-=87}n=16*n+i}return n};this.callbacks=[],this.callbacks.abgop=x,this.callbacks.aenop=T,this.callbacks.alternation=i,this.callbacks.andop=m,this.callbacks.bmax=F,this.callbacks.bmin=U,this.callbacks.bkaop=E,this.callbacks.bknop=k,this.callbacks.bkrop=A,this.callbacks["bkr-name"]=M,this.callbacks.bstring=V,this.callbacks.clsop=N,this.callbacks.ci=v,this.callbacks.cs=w,this.callbacks.um=S,this.callbacks.pm=C,this.callbacks.concatenation=a,this.callbacks.defined=h,this.callbacks.dmax=D,this.callbacks.dmin=I,this.callbacks.dstring=j,this.callbacks.file=t,this.callbacks.incalt=u,this.callbacks.notop=b,this.callbacks.optionopen=l,this.callbacks["rep-max"]=f,this.callbacks["rep-min"]=d,this.callbacks["rep-min-max"]=g,this.callbacks.repetition=o,this.callbacks.repop=p,this.callbacks.rnmop=y,this.callbacks.rule=n,this.callbacks.rulelookup=s,this.callbacks.rulename=c,this.callbacks.tbsop=P,this.callbacks.tlscase=_,this.callbacks.tlsstring=B,this.callbacks.tlsop=L,this.callbacks.trgop=H,this.callbacks["udt-empty"]=O,this.callbacks["udt-non-empty"]=R,this.callbacks.xmax=Y,this.callbacks.xmin=K,this.callbacks.xstring=G}},function(e,t,r){e.exports=function(){"use strict";var e,t="syntax-callbacks.js: ",n=r(0),s=n.ids,i=function(e,r,n,i){switch(e.state){case s.ACTIVE:i.altStack=[],i.repCount=0;break;case s.EMPTY:i.errors.push({line:0,char:0,msg:"grammar file is empty"});break;case s.MATCH:0===i.ruleCount&&i.errors.push({line:0,char:0,msg:"no rules defined"});break;case s.NOMATCH:throw new Error(t+"synFile: grammar file NOMATCH: design error: should never happen.")}},a=function(r,n,i,a){switch(r.state){case s.ACTIVE:a.altStack.length=0,e={groupOpen:null,groupError:!1,optionOpen:null,optionError:!1,tlsOpen:null,clsOpen:null,prosValOpen:null,basicError:!1},a.altStack.push(e);break;case s.EMPTY:throw new Error(t+"synRule: EMPTY: rule cannot be empty");case s.NOMATCH:break;case s.MATCH:a.ruleCount+=1}},o=function(e,t,r,n){switch(e.state){case s.ACTIVE:break;case s.EMPTY:break;case s.NOMATCH:break;case s.MATCH:n.errors.push({line:n.findLine(n.lines,r,n.charsLength),char:r,msg:"Unrecognized SABNF line. Invalid rule, comment or blank line."})}},l=function(e,t,r,n){switch(e.state){case s.ACTIVE:break;case s.EMPTY:break;case s.NOMATCH:break;case s.MATCH:n.errors.push({line:n.findLine(n.lines,r,n.charsLength),char:r,msg:"Rule names must be alphanum and begin with alphabetic character."})}},c=function(e,t,r,n){switch(e.state){case s.ACTIVE:break;case s.EMPTY:break;case s.NOMATCH:break;case s.MATCH:n.errors.push({line:n.findLine(n.lines,r,n.charsLength),char:r,msg:"Expected '=' or '=/'. Not found."})}},h=function(e,t,r,n){switch(e.state){case s.ACTIVE:break;case s.EMPTY:break;case s.NOMATCH:break;case s.MATCH:n.strict&&n.errors.push({line:n.findLine(n.lines,r,n.charsLength),char:r,msg:"AND operator(&) found - strict ABNF specified."})}},u=function(e,t,r,n){switch(e.state){case s.ACTIVE:break;case s.EMPTY:break;case s.NOMATCH:break;case s.MATCH:n.strict&&n.errors.push({line:n.findLine(n.lines,r,n.charsLength),char:r,msg:"NOT operator(!) found - strict ABNF specified."})}},p=function(e,t,r,n){switch(e.state){case s.ACTIVE:break;case s.EMPTY:break;case s.NOMATCH:break;case s.MATCH:n.strict&&n.errors.push({line:n.findLine(n.lines,r,n.charsLength),char:r,msg:"Positive look-behind operator(&&) found - strict ABNF specified."})}},d=function(e,t,r,n){switch(e.state){case s.ACTIVE:break;case s.EMPTY:break;case s.NOMATCH:break;case s.MATCH:n.strict&&n.errors.push({line:n.findLine(n.lines,r,n.charsLength),char:r,msg:"Negative look-behind operator(!!) found - strict ABNF specified."})}},f=function(e,t,r,n){switch(e.state){case s.ACTIVE:break;case s.EMPTY:break;case s.NOMATCH:break;case s.MATCH:n.strict&&n.errors.push({line:n.findLine(n.lines,r,n.charsLength),char:r,msg:"Beginning of string anchor(%^) found - strict ABNF specified."})}},g=function(e,t,r,n){switch(e.state){case s.ACTIVE:break;case s.EMPTY:break;case s.NOMATCH:break;case s.MATCH:n.strict&&n.errors.push({line:n.findLine(n.lines,r,n.charsLength),char:r,msg:"End of string anchor(%$) found - strict ABNF specified."})}},m=function(e,t,r,i){switch(e.state){case s.ACTIVE:break;case s.EMPTY:break;case s.NOMATCH:break;case s.MATCH:if(i.strict){var a=n.utils.charsToString(t,r,e.phraseLength);i.errors.push({line:i.findLine(i.lines,r,i.charsLength),char:r,msg:"Back reference operator("+a+") found - strict ABNF specified."})}}},b=function(e,t,r,i){switch(e.state){case s.ACTIVE:break;case s.EMPTY:break;case s.NOMATCH:break;case s.MATCH:if(i.strict){var a=n.utils.charsToString(t,r,e.phraseLength);i.errors.push({line:i.findLine(i.lines,r,i.charsLength),char:r,msg:"UDT operator found("+a+") - strict ABNF specified."})}}},y=function(t,r,n,i){switch(t.state){case s.ACTIVE:break;case s.EMPTY:break;case s.NOMATCH:break;case s.MATCH:e.tlsOpen=n}},x=function(e,t,r,n){switch(e.state){case s.ACTIVE:n.stringTabChar=!1;break;case s.EMPTY:break;case s.NOMATCH:break;case s.MATCH:n.stringTabChar!==!1&&n.errors.push({line:n.findLine(n.lines,n.stringTabChar),char:n.stringTabChar,msg:"Tab character (\\t, x09) not allowed in literal string (see 'quoted-string' definition, RFC 7405.)"})}},T=function(e,t,r,n){switch(e.state){case s.ACTIVE:break;case s.EMPTY:break;case s.NOMATCH:break;case s.MATCH:n.stringTabChar=r}},E=function(t,r,n,i){switch(t.state){case s.ACTIVE:break;case s.EMPTY:break;case s.NOMATCH:i.errors.push({line:i.findLine(i.lines,e.tlsOpen),char:e.tlsOpen,msg:'Case-insensitive literal string("...") opened but not closed.'}),e.basicError=!0,e.tlsOpen=null;break;case s.MATCH:e.tlsOpen=null}},k=function(t,r,n,i){switch(t.state){case s.ACTIVE:break;case s.EMPTY:break;case s.NOMATCH:break;case s.MATCH:e.clsOpen=n}},A=function(e,t,r,n){switch(e.state){case s.ACTIVE:n.stringTabChar=!1;break;case s.EMPTY:break;case s.NOMATCH:break;case s.MATCH:n.stringTabChar!==!1&&n.errors.push({line:n.findLine(n.lines,n.stringTabChar),char:n.stringTabChar,msg:"Tab character (\\t, x09) not allowed in literal string."})}},v=function(t,r,n,i){switch(t.state){case s.ACTIVE:break;case s.EMPTY:break;case s.NOMATCH:i.errors.push({line:i.findLine(i.lines,e.clsOpen),char:e.clsOpen,msg:"Case-sensitive literal string('...') opened but not closed."}),e.clsOpen=null,e.basicError=!0;break;case s.MATCH:i.strict&&i.errors.push({line:i.findLine(i.lines,e.clsOpen),char:e.clsOpen,msg:"Case-sensitive string operator('...') found - strict ABNF specified."}),e.clsOpen=null}},w=function(t,r,n,i){switch(t.state){case s.ACTIVE:break;case s.EMPTY:break;case s.NOMATCH:break;case s.MATCH:e.prosValOpen=n}},S=function(e,t,r,n){switch(e.state){case s.ACTIVE:n.stringTabChar=!1;break;case s.EMPTY:break;case s.NOMATCH:break;case s.MATCH:n.stringTabChar!==!1&&n.errors.push({line:n.findLine(n.lines,n.stringTabChar),char:n.stringTabChar,msg:"Tab character (\\t, x09) not allowed in prose value string."})}},C=function(t,r,n,i){switch(t.state){case s.ACTIVE:break;case s.EMPTY:break;case s.NOMATCH:i.errors.push({line:i.findLine(i.lines,e.prosValOpen),char:e.prosValOpen,msg:"Prose value operator(<...>) opened but not closed."}),e.basicError=!0,e.prosValOpen=null;break;case s.MATCH:i.errors.push({line:i.findLine(i.lines,e.prosValOpen),char:e.prosValOpen,msg:"Prose value operator(<...>) found. The ABNF syntax is valid, but a parser cannot be generated from this grammar."}),e.prosValOpen=null}},M=function(t,r,n,i){switch(t.state){case s.ACTIVE:break;case s.EMPTY:break;case s.NOMATCH:break;case s.MATCH:e={groupOpen:n,groupError:!1,optionOpen:null,optionError:!1,tlsOpen:null,clsOpen:null,prosValOpen:null,basicError:!1},i.altStack.push(e)}},O=function(t,r,n,i){switch(t.state){case s.ACTIVE:break;case s.EMPTY:break;case s.NOMATCH:i.errors.push({line:i.findLine(i.lines,e.groupOpen),char:e.groupOpen,msg:'Group "(...)" opened but not closed.'}),e=i.altStack.pop(),e.groupError=!0;break;case s.MATCH:e=i.altStack.pop()}},R=function(t,r,n,i){switch(t.state){case s.ACTIVE:break;case s.EMPTY:break;case s.NOMATCH:break;case s.MATCH:e={groupOpen:null,groupError:!1,optionOpen:n,optionError:!1,tlsOpen:null,clsOpen:null,prosValOpen:null,basicError:!1},i.altStack.push(e)}},L=function(t,r,n,i){switch(t.state){case s.ACTIVE:break;case s.EMPTY:break;case s.NOMATCH:i.errors.push({line:i.findLine(i.lines,e.optionOpen),char:e.optionOpen,msg:'Option "[...]" opened but not closed.'}),e=i.altStack.pop(),e.optionError=!0;break;case s.MATCH:e=i.altStack.pop()}},_=function(t,r,n,i){switch(t.state){case s.ACTIVE:break;case s.EMPTY:break;case s.NOMATCH:break;case s.MATCH:e.basicError===!1&&i.errors.push({line:i.findLine(i.lines,n,i.charsLength),char:n,msg:"Unrecognized SABNF element."})}},B=function(e,t,r,n){switch(e.state){case s.ACTIVE:break;case s.EMPTY:break;case s.NOMATCH:break;case s.MATCH:if(1===e.phraseLength&&n.strict){var i=13===t[r]?"CR":"LF";n.errors.push({line:n.findLine(n.lines,r,n.charsLength),char:r,msg:"Line end '"+i+"' found - strict ABNF specified, only CRLF allowed."})}}},N=function(e,t,r,n){switch(e.state){case s.ACTIVE:break;case s.EMPTY:break;case s.NOMATCH:break;case s.MATCH:n.errors.push({line:n.findLine(n.lines,r,n.charsLength),char:r,msg:"Unrecognized grammar element or characters."})}},P=function(e,t,r,n){switch(e.state){case s.ACTIVE:break;case s.EMPTY:break;case s.NOMATCH:n.repCount+=1;break;case s.MATCH:n.repCount+=1}};this.callbacks=[],this.callbacks.andop=h,this.callbacks.basicelementerr=_,this.callbacks.clsclose=v,this.callbacks.clsopen=k,this.callbacks.clsstring=A,this.callbacks.definedaserror=c,this.callbacks.file=i,this.callbacks.groupclose=O,this.callbacks.groupopen=M,this.callbacks.lineenderror=N,this.callbacks.lineend=B,this.callbacks.notop=u,this.callbacks.optionclose=L,this.callbacks.optionopen=R,this.callbacks.prosvalclose=C,this.callbacks.prosvalopen=w,this.callbacks.prosvalstring=S,this.callbacks.repetition=P,this.callbacks.rule=a,this.callbacks.ruleerror=o,this.callbacks.rulenameerror=l,this.callbacks.stringtab=T,this.callbacks.tlsclose=E,this.callbacks.tlsopen=y,this.callbacks.tlsstring=x,this.callbacks.udtop=b,this.callbacks.bkaop=p,this.callbacks.bknop=d,this.callbacks.bkrop=m,this.callbacks.abgop=f,this.callbacks.aenop=g}},function(e,t,r){(function(e){"use strict;";var n=this,s=r(6),i="UTF8",a="UTF16",o="UTF16BE",l="UTF16LE",c="UTF32",h="UTF32BE",u="UTF32LE",p="UINT7",d="ASCII",f="BINARY",g="UINT8",m="UINT16",b="UINT16LE",y="UINT16BE",x="UINT32",T="UINT32LE",E="UINT32BE",k="ESCAPED",A="STRING",v=function(e){e.type=i;var t=e.data;e.bom=0,t.length>=3&&239===t[0]&&187===t[1]&&191===t[2]&&(e.bom=3)},w=function(e){var t=e.data;switch(e.bom=0,e.type){case a:e.type=o,t.length>=2&&(254===t[0]&&255===t[1]?e.bom=2:255===t[0]&&254===t[1]&&(e.type=l,e.bom=2));break;case o:if(e.type=o,t.length>=2)if(254===t[0]&&255===t[1])e.bom=2;else if(255===t[0]&&254===t[1])throw new TypeError('src type: "'+o+'" specified but BOM is for "'+l+'"');break;case l:if(e.type=l,t.length>=0){if(254===t[0]&&255===t[1])throw new TypeError('src type: "'+l+'" specified but BOM is for "'+o+'"');255===t[0]&&254===t[1]&&(e.bom=2)}break;default:throw new TypeError('UTF16 BOM: src type "'+e.type+'" unrecognized')}},S=function(e){var t=e.data;switch(e.bom=0,e.type){case c:e.type=h,t.length>=4&&(0===t[0]&&0===t[1]&&254===t[2]&&255===t[3]&&(e.bom=4),255===t[0]&&254===t[1]&&0===t[2]&&0===t[3]&&(e.type=u,e.bom=4));break;case h:if(e.type=h,t.length>=4&&(0===t[0]&&0===t[1]&&254===t[2]&&255===t[3]&&(e.bom=4),255===t[0]&&254===t[1]&&0===t[2]&&0===t[3]))throw new TypeError("src type: "+h+" specified but BOM is for "+u+'"');break;case u:if(e.type=u,t.length>=4){if(0===t[0]&&0===t[1]&&254===t[2]&&255===t[3])throw new TypeError('src type: "'+u+'" specified but BOM is for "'+h+'"');255===t[0]&&254===t[1]&&0===t[2]&&0===t[3]&&(e.bom=4)}break;default:throw new TypeError('UTF32 BOM: src type "'+e.type+'" unrecognized')}},C=function(t,r){function n(e){var t={type:"",base64:!1},r=/^(base64:)?([a-zA-Z0-9]+)$/i,n=r.exec(e);return n&&(n[2]&&(t.type=n[2].toUpperCase()),n[1]&&(t.base64=!0)),t}if("string"!=typeof t||""===t)throw new TypeError('type: "'+t+'" not recognized');var C=n(t.toUpperCase());if(C.base64){if(C.type===A)throw new TypeError('type: "'+t+' "BASE64:" prefix not allowed with type '+A);if(e.isBuffer(r))C.data=s.base64.decode(r);else{if("string"!=typeof r)throw new TypeError('type: "'+t+" unrecognized data type: typeof(data): "+typeof r);var M=e.from(r,"ascii");C.data=s.base64.decode(M)}}else C.data=r;switch(C.type){case i:v(C);break;case a:case o:case l:w(C);break;case c:case h:case u:S(C);break;case m:C.type=y;break;case x:C.type=E;break;case d:C.type=p;break;case f:C.type=g;break;case p:case g:case b:case y:case T:case E:case A:case k:break;default:throw new TypeError('type: "'+t+'" not recognized')}if(C.type===A){if("string"!=typeof C.data)throw new TypeError('type: "'+t+'" but data is not a string')}else if(!e.isBuffer(C.data))throw new TypeError('type: "'+t+'" but data is not a Buffer');return C},M=function(e,t){function r(e){for(var t,r,n={crlf:!1,lf:!1,base64:!1,type:""};;){if(r=e,t=e.slice(0,5),"CRLF:"===t){n.crlf=!0,r=e.slice(5);break}if(t=e.slice(0,3),"LF:"===t){n.lf=!0,r=e.slice(3);break}break}return t=r.split(":"),1===t.length?n.type=t[0]:2===t.length&&"BASE64"===t[1]&&(n.base64=!0,n.type=t[0]),n}if(!Array.isArray(t))throw new TypeError('dst chars: not array: "'+typeof t);if("string"!=typeof e)throw new TypeError('dst type: not string: "'+typeof e);switch(ret=r(e.toUpperCase()),ret.type){case i:case o:case l:case h:case u:case p:case g:case b:case y:case T:case E:case k:break;case A:if(ret.base64)throw new TypeError('":BASE64" suffix not allowed with type '+A);break;case d:ret.type=p;break;case f:ret.type=g;break;case a:ret.type=o;break;case c:ret.type=h;break;case m:ret.type=y;break;case x:ret.type=E;break;default:throw new TypeError('dst type unrecognized: "'+e+'" : must have form [crlf:|lf:]type[:base64]')}return ret},O=function(e,t){switch(e){case i:return s.utf8.encode(t);case o:return s.utf16be.encode(t);case l:return s.utf16le.encode(t);case h:return s.utf32be.encode(t);case u:return s.utf32le.encode(t);case p:return s.uint7.encode(t);case g:return s.uint8.encode(t);case y:return s.uint16be.encode(t);case b:return s.uint16le.encode(t);case E:return s.uint32be.encode(t);case T:return s.uint32le.encode(t);case A:return s.string.encode(t);case k:return s.escaped.encode(t);default:throw new TypeError('encode type "'+e+'" not recognized')}},R=function(e){switch(e.type){case i:return s.utf8.decode(e.data,e.bom);case l:return s.utf16le.decode(e.data,e.bom);case o:return s.utf16be.decode(e.data,e.bom);case h:return s.utf32be.decode(e.data,e.bom);case u:return s.utf32le.decode(e.data,e.bom);case p:return s.uint7.decode(e.data);case g:return s.uint8.decode(e.data);case y:return s.uint16be.decode(e.data);case b:return s.uint16le.decode(e.data);case E:return s.uint32be.decode(e.data);case T:return s.uint32le.decode(e.data);case A:return s.string.decode(e.data);case k:return s.escaped.decode(e.data);default:throw new TypeError('decode type "'+e.type+'" not recognized')}};t.decode=function(e,t){var r=C(e,t);return R(r)},t.encode=function(e,t){var r,n,i=M(e,t);return i.crlf?(r=s.lineEnds.crlf(t),n=O(i.type,r)):i.lf?(r=s.lineEnds.lf(t),n=O(i.type,r)):n=O(i.type,t),i.base64&&(n=s.base64.encode(n)),n},t.convert=function(e,t,r){return n.encode(r,n.decode(e,t))}}).call(t,r(4).Buffer)},function(e,t,r){"use strict;";var n=r(7),s=function(e,t){t=t===!0;var r=e._this,n={writable:t,enumerable:!1,configurable:!0};Object.defineProperty(r,"input",n),Object.defineProperty(r,"leftContext",n),Object.defineProperty(r,"lastMatch",n),Object.defineProperty(r,"rightContext",n),Object.defineProperty(r,"$_",n),Object.defineProperty(r,"$`",n),Object.defineProperty(r,"$&",n),Object.defineProperty(r,"$'",n),n.enumerable=!0,Object.defineProperty(r,"rules",n),r.rules||(r.rules=[]);for(var s in r.rules){var i="${"+s+"}";Object.defineProperty(r,i,n),Object.defineProperty(r.rules,s,n)}},i=function(e){var t=e.chars,r=e.result,s={index:r.index,length:r.length,input:e.charsToString(t,0),treeDepth:r.treeDepth,nodeHits:r.nodeHits,rules:[],toText:function(){return n.s.resultToText(this)},toHtml:function(){return n.s.resultToHtml(this)},toHtmlPage:function(){return n.s.resultToHtmlPage(this)}};s[0]=e.charsToString(e.chars,r.index,r.length);for(var i in r.rules){var a=r.rules[i];if(a){s.rules[i]=[];for(var o=0;o<a.length;o+=1)s.rules[i][o]={index:a[o].index,phrase:e.charsToString(t,a[o].index,a[o].length)}}else s.rules[i]=void 0}return s},a=function(e){var t,r,s=e.chars,i=e.result,a={index:i.index,length:i.length,input:s.slice(0),treeDepth:i.treeDepth,nodeHits:i.nodeHits,rules:[],toText:function(e){return n.u.resultToText(this,e)},toHtml:function(e){return n.u.resultToHtml(this,e)},toHtmlPage:function(e){return n.u.resultToHtmlPage(this,e)}};t=i.index,r=t+i.length,a[0]=s.slice(t,r);for(var o in i.rules){var l=i.rules[o];if(l){a.rules[o]=[];for(var c=0;c<l.length;c+=1)t=l[c].index,r=t+l[c].length,a.rules[o][c]={index:t,phrase:s.slice(t,r)}}else a.rules[o]=void 0}return a},o=function(e,t){var r,n=e._this;n.lastMatch=t[0],r=e.chars.slice(0,e.result.index),n.leftContext=e.charsToString(r,0),r=e.chars.slice(t.index+t.length),n.rightContext=e.charsToString(r,0),n.input=t.input.slice(0),n.$_=n.input,n["$&"]=n.lastMatch,n["$`"]=n.leftContext,n["$'"]=n.rightContext,n.rules={};for(var s in t.rules){var i=t.rules[s];i?n.rules[s]=i[i.length-1].phrase:n.rules[s]=void 0,n["${"+s+"}"]=n.rules[s]}},l=function(e,t){var r,n,s=e._this,i=e.chars;r=0,n=r+t.index,s.leftContext=i.slice(r,n),s.lastMatch=t[0].slice(0),r=t.index+t.length,s.rightContext=i.slice(r),s.input=t.input.slice(0),s.$_=s.input,s["$&"]=s.lastMatch,s["$`"]=s.leftContext,s["$'"]=s.rightContext,s.rules={};for(var a in t.rules){var o=t.rules[a];o?s.rules[a]=o[o.length-1].phrase:s.rules[a]=void 0,s["${"+a+"}"]=s.rules[a]}},c=function(e,t){var r;e.result={index:t.index,length:t.length,treeDepth:t.treeDepth,nodeHits:t.nodeHits,rules:[]};var n=e.parser.ast.phrases();for(var c in e._this.ast.callbacks){var h=e.ruleNames[c];if(e._this.ast.callbacks[c]){var h=e.ruleNames[c];Array.isArray(n[h])?e.result.rules[h]=n[h]:e.result.rules[h]=void 0}}return s(e,!0),e._this.unicode?(r=a(e),l(e,r)):(r=i(e),o(e,r)),s(e,!1),r},h=function(){return{success:!1}},u=function(e,t){return{success:!0,index:e,length:t.matched,treeDepth:t.maxTreeDepth,nodeHits:t.nodeHits}},p=function(e){for(var t=h(),r=e._this.lastIndex;r<e.chars.length;r+=1){var n=e.parser.parseSubstring(e.grammarObject,0,e.chars,r,e.chars.length-r);if(e.match(n.state)){t=u(r,n);break}}return t},d=function(e,t,r){if(t){if(r.success){var n=r.index;return n+=r.length>0?r.length:1}return 0}return e},f=function(e){var t=h();if(e._this.lastIndex<e.chars.length){var r=e.parser.parseSubstring(e.grammarObject,0,e.chars,e._this.lastIndex,e.chars.length-e._this.lastIndex);e.match(r.state)&&(t=u(e._this.lastIndex,r))}return t};t.execForward=function(e){var t=p(e),r=null;return t.success&&(r=c(e,t)),e._this.lastIndex=d(e._this.lastIndex,e._this.global,t),r},t.execAnchor=function(e){var t=f(e),r=null;return t.success&&(r=c(e,t)),e._this.lastIndex=d(e._this.lastIndex,e._this.sticky,t),r},t.testForward=function(e){var t=p(e);return e._this.lastIndex=d(e._this.lastIndex,e._this.global,t),t.success},t.testAnchor=function(e){var t=f(e);return e._this.lastIndex=d(e._this.lastIndex,e._this.sticky,t),t.success}},function(e,t){"use strict;";e.exports=function(e,t){var r="apg-exp: constructor: flags: ",n=null,s={writable:!1,enumerable:!1,configurable:!0};for(e.flags="",e.global=!1,e.sticky=!1,e.unicode=!1,e.debug=!1;;){if("undefined"==typeof t||null===t)break;if("string"!=typeof t){n=r+"Invalid flags supplied to constructor: must be null, undefined or string: '"+typeof t+"'";break}if(""===t)break;for(var i=t.toLowerCase().split(""),a=0;a<i.length;a+=1)switch(i[a]){case"d":e.debug=!0;break;case"g":e.global=!0;break;case"u":e.unicode=!0;break;case"y":e.sticky=!0;break;default:return n=r+"Invalid flags supplied to constructor: '"+t+"'"}e.debug&&(e.flags+="d"),e.global&&(e.flags+="g"),e.unicode&&(e.flags+="u"),e.sticky&&(e.flags+="y");break}return Object.defineProperty(e,"flags",s),Object.defineProperty(e,"global",s),Object.defineProperty(e,"debug",s),Object.defineProperty(e,"unicode",s),Object.defineProperty(e,"sticky",s),n}},function(e,t,r){"use strict;";var n="apgex: replace(): ",s=function(e,t,r,n){if(n.isMatch(e.state)){var s=n.charsToString(t,r,e.phraseLength);n.items.push({type:"error",index:r,length:e.phraseLength,error:s}),n.errors+=1,n.count+=1}},i=function(e,t,r,n){n.isMatch(e.state)&&(n.items.push({type:"escape",index:r,length:e.phraseLength}),n.escapes+=1,n.count+=1)},a=function(e,t,r,n){n.isMatch(e.state)&&(n.items.push({type:"match",index:r,length:e.phraseLength}),n.matches+=1,n.count+=1)},o=function(e,t,r,n){n.isMatch(e.state)&&(n.items.push({type:"prefix",index:r,length:e.phraseLength}),n.prefixes+=1,n.count+=1)},l=function(e,t,r,n){n.isMatch(e.state)&&(n.items.push({type:"suffix",index:r,length:e.phraseLength}),n.suffixes+=1,n.count+=1)},c=function(e,t,r,n){n.isMatch(e.state)&&(n.items.push({type:"name",index:r,length:e.phraseLength,name:n.name}),n.names+=1,n.count+=1)},h=function(e,t,r,n){if(n.isMatch(e.state)){var s=n.charsToString(t,r,e.phraseLength),i=t.slice(r,r+e.phraseLength);n.name={nameString:s,nameChars:i}}};e.exports=function(e,t){var u=new(r(31)),p=r(0),d=new p.parser,f={name:"",count:0,errors:0,escapes:0,prefixes:0,matches:0,suffixes:0,names:0,isMatch:e.match,charsToString:p.utils.charsToString,items:[]};d.callbacks.error=s,d.callbacks.escape=i,d.callbacks.prefix=o,d.callbacks.match=a,d.callbacks.suffix=l,d.callbacks.xname=c,d.callbacks.name=h;var g=p.utils.stringToChars(t),m=d.parse(u,0,g,f);if(!m.success)throw new Error(n+"unexpected error parsing replacement string");var b=f.items;if(f.errors>0){for(var y="[",x=0,T=0;x<f.items.length;x+=1){var E=f.items[x];"error"===E.type&&(y+=T>0?", "+E.error:E.error,T+=1)}throw y+="]",new Error(n+"special character sequences ($...) errors: "+y)}if(f.names>0){for(var k=[],x=0;x<f.items.length;x+=1){var E=f.items[x];if("name"===E.type){var A=E.name.nameString,v=A.toLowerCase();e.parser.ast.callbacks[v]||k.push(A),E.name.nameString=v}}if(k.length>0){for(var y="[",x=0;x<k.length;x+=1)y+=x>0?", "+k[x]:k[x];throw y+="]",new Error(n+"special character sequences ${name}: names not found: "+y)}}return b}},function(e,t){e.exports=function(){"use strict";this.grammarObject="grammarObject",this.rules=[],this.rules[0]={name:"rule",lower:"rule",index:0,isBkr:!1},this.rules[1]={name:"error",lower:"error",index:1,isBkr:!1},this.rules[2]={name:"escape",lower:"escape",index:2,isBkr:!1},this.rules[3]={name:"match",lower:"match",index:3,isBkr:!1},this.rules[4]={name:"prefix",lower:"prefix",
index:4,isBkr:!1},this.rules[5]={name:"suffix",lower:"suffix",index:5,isBkr:!1},this.rules[6]={name:"xname",lower:"xname",index:6,isBkr:!1},this.rules[7]={name:"name",lower:"name",index:7,isBkr:!1},this.rules[8]={name:"alpha",lower:"alpha",index:8,isBkr:!1},this.rules[9]={name:"digit",lower:"digit",index:9,isBkr:!1},this.rules[10]={name:"any-other",lower:"any-other",index:10,isBkr:!1},this.udts=[],this.rules[0].opcodes=[],this.rules[0].opcodes[0]={type:3,min:0,max:1/0},this.rules[0].opcodes[1]={type:2,children:[2,4]},this.rules[0].opcodes[2]={type:3,min:0,max:1/0},this.rules[0].opcodes[3]={type:4,index:10},this.rules[0].opcodes[4]={type:3,min:0,max:1},this.rules[0].opcodes[5]={type:1,children:[6,7,8,9,10,11]},this.rules[0].opcodes[6]={type:4,index:2},this.rules[0].opcodes[7]={type:4,index:3},this.rules[0].opcodes[8]={type:4,index:4},this.rules[0].opcodes[9]={type:4,index:5},this.rules[0].opcodes[10]={type:4,index:6},this.rules[0].opcodes[11]={type:4,index:1},this.rules[1].opcodes=[],this.rules[1].opcodes[0]={type:2,children:[1,2]},this.rules[1].opcodes[1]={type:7,string:[36]},this.rules[1].opcodes[2]={type:4,index:10},this.rules[2].opcodes=[],this.rules[2].opcodes[0]={type:7,string:[36,36]},this.rules[3].opcodes=[],this.rules[3].opcodes[0]={type:7,string:[36,38]},this.rules[4].opcodes=[],this.rules[4].opcodes[0]={type:7,string:[36,96]},this.rules[5].opcodes=[],this.rules[5].opcodes[0]={type:7,string:[36,39]},this.rules[6].opcodes=[],this.rules[6].opcodes[0]={type:2,children:[1,2,3]},this.rules[6].opcodes[1]={type:7,string:[36,123]},this.rules[6].opcodes[2]={type:4,index:7},this.rules[6].opcodes[3]={type:7,string:[125]},this.rules[7].opcodes=[],this.rules[7].opcodes[0]={type:2,children:[1,2]},this.rules[7].opcodes[1]={type:4,index:8},this.rules[7].opcodes[2]={type:3,min:0,max:1/0},this.rules[7].opcodes[3]={type:1,children:[4,5,6,7]},this.rules[7].opcodes[4]={type:4,index:8},this.rules[7].opcodes[5]={type:4,index:9},this.rules[7].opcodes[6]={type:6,string:[45]},this.rules[7].opcodes[7]={type:6,string:[95]},this.rules[8].opcodes=[],this.rules[8].opcodes[0]={type:1,children:[1,2]},this.rules[8].opcodes[1]={type:5,min:97,max:122},this.rules[8].opcodes[2]={type:5,min:65,max:90},this.rules[9].opcodes=[],this.rules[9].opcodes[0]={type:5,min:48,max:57},this.rules[10].opcodes=[],this.rules[10].opcodes[0]={type:1,children:[1,2,3]},this.rules[10].opcodes[1]={type:5,min:32,max:35},this.rules[10].opcodes[2]={type:5,min:37,max:65535},this.rules[10].opcodes[3]={type:5,min:10,max:13},this.toString=function(){var e="";return e+=";\n",e+="; SABNF grammar for parsing out the replacement string parameters\n",e+=";\n",e+="rule = *(*any-other [(escape / match / prefix/ suffix/ xname / error)])\n",e+='error = "$" any-other\n',e+='escape = "$$"\n',e+='match = "$&"\n',e+='prefix = "$`"\n',e+='suffix = "$\'"\n',e+='xname = "${" name "}"\n',e+="name = alpha *(alpha/digit/%d45/%d95)\n",e+="alpha = %d97-122 / %d65-90\n",e+="digit = %d48-57\n",e+="any-other = %x20-23 / %x25-FFFF / %xA-D\n"}}},function(e,t,r){"use strict;";var n="apg-exp: replace(): ",s=r(30),i=function(e,t,r){var s=e._this;if(0===r.length)return t;var i,a,o=t.slice(0);return r.reverse(),r.forEach(function(t){switch(i=o.slice(0,t.index),a=o.slice(t.index+t.length),t.type){case"escape":o=i.concat("$",a);break;case"prefix":o=i.concat(s.leftContext,a);break;case"match":o=i.concat(s.lastMatch,a);break;case"suffix":o=i.concat(s.rightContext,a);break;case"name":var r=e.ruleNames[t.name.nameString];o=i.concat(s.rules[r],a);break;default:throw new Error(n+"generateREplacementString(): unrecognized item type: "+t.type)}}),o},a=function(e){var t={};t.ast=e.ast,t.input=e.input,t.leftContext=e.leftContext,t.lastMatch=e.lastMatch,t.rightContext=e.rightContext,t.$_=e.input,t["$`"]=e.leftContext,t["$&"]=e.lastMatch,t["$'"]=e.rightContext,t.rules=[];for(name in e.rules){var r="${"+name+"}";t[r]=e[r],t.rules[name]=e.rules[name]}return t},o=function(e,t,r){var n=e._this.exec(t);if(null===n)return t;rstr=r(n,a(e._this));var s=e._this.leftContext.concat(rstr,e._this.rightContext);return s},l=function(e,t,r){for(var n=e._this,s=t.slice(0);;){var i=n.exec(s);if(null===i)break;var o=r(i,a(n));s=n.leftContext.concat(o,n.rightContext),n.lastIndex=n.leftContext.length+o.length,0===i[0].length&&(n.lastIndex+=1)}return s},c=function(e,t,r){var n=e._this,a=n.exec(t);if(null===a)return t;var o=s(e,r);r=i(e,r,o);var l=n.leftContext.concat(r,n.rightContext);return l},h=function(e,t,r){for(var n=e._this,a=t.slice(0),o=null;;){var l=n.exec(a);if(null==l)break;null===o&&(o=s(e,r));var c=i(e,r,o);a=n.leftContext.concat(c,n.rightContext),n.lastIndex=n.leftContext.length+c.length,0===l[0].length&&(n.lastIndex+=1)}return a};t.replaceString=function(e,t,r){return e._this.global||e._this.sticky?h(e,t,r):c(e,t,r)},t.replaceFunction=function(e,t,r){return e._this.global||e._this.sticky?l(e,t,r):o(e,t,r)}},function(e,t,r){"use strict;";e.exports=function(e){function t(e,t,r){t.error=r,t.text=a,t.text+=e.linesToAscii(),t.text+=o,t.text+=e.errorsToAscii(),t.html=e.linesToHtml(),t.html+=e.errorsToHtml()}for(var n="apg-exp: generator: ",s=r(15),i={obj:null,error:null,text:null,html:null},a="annotated grammar:\n",o="annotated grammar errors:\n";;){try{s=new s(e),s.scan()}catch(e){i.error=n+e.msg;break}if(s.errors.length){t(s,i,"grammar has validation errors");break}if(s.parse(),s.errors.length){t(s,i,"grammar has syntax errors");break}if(s.translate(),s.errors.length){t(s,i,"grammar has semantic errors");break}if(s.attributes(),s.errors.length){t(s,i,"grammar has attribute errors");break}i.obj=s.toObject();break}return i}},function(e,t){"use strict;";t.split=function(e,t,r){var n,s,i,a,o,l=e._this,c=[],h=[],u=0;for(l.lastIndex=0;;){if(o=l.lastIndex,n=l.exec(t),null===n)break;if(c.push({phrase:n[0],index:n.index}),0===n[0].length?l.lastIndex=o+1:l.lastIndex=n.index+n[0].length,u+=1,u>r)break}if(0===c.length)return[t.slice(0)];if(1===c.length||c[0].phrase.length===t.length)return[""];c[0].index>0&&(i=0,a=c[0].index,h.push(t.slice(i,a))),s=c.length-1;for(var p=0;p<s;p++)i=c[p].index+c[p].phrase.length,a=c[p+1].index,h.push(t.slice(i,a));return o=c[c.length-1],i=o.index+o.phrase.length,i<t.length&&(a=t.length,h.push(t.slice(i,a))),h}},function(e,t,r){!function(){this.ApgExp=r(10),this.apglib=r(0)}()},function(e,t,r){e.exports=function(){"use strict";function e(e){for(var t="",r=0;r<e;r+=1)t+=" ";return t}var t="ast.js: ",n=r(1),s=r(2),i=this,a=null,o=null,l=null,c=0,h=[],u=[],p=[],d=[];this.callbacks=[],this.astObject="astObject",this.init=function(e,r,n){p.length=0,d.length=0,h.length=0,c=0,a=e,o=r,l=n;var s,f=[];for(s=0;s<a.length;s+=1)f.push(a[s].lower);for(s=0;s<o.length;s+=1)f.push(o[s].lower);for(c=a.length+o.length,s=0;s<c;s+=1)h[s]=!1,u[s]=null;for(var g in i.callbacks){var m=g.toLowerCase();if(s=f.indexOf(m),s<0)throw new Error(t+"init: node '"+g+"' not a rule or udt name");"function"==typeof i.callbacks[g]&&(h[s]=!0,u[s]=i.callbacks[g]),i.callbacks[g]===!0&&(h[s]=!0)}},this.ruleDefined=function(e){return h[e]!==!1},this.udtDefined=function(e){return h[a.length+e]!==!1},this.down=function(e,t){var r=d.length;return p.push(r),d.push({name:t,thisIndex:r,thatIndex:null,state:n.SEM_PRE,callbackIndex:e,phraseIndex:null,phraseLength:null,stack:p.length}),r},this.up=function(e,t,r,s){var i=d.length,a=p.pop();return d.push({name:t,thisIndex:i,thatIndex:a,state:n.SEM_POST,callbackIndex:e,phraseIndex:r,phraseLength:s,stack:p.length}),d[a].thatIndex=i,d[a].phraseIndex=r,d[a].phraseLength=s,i},this.translate=function(e){for(var t,r,s,i=0;i<d.length;i+=1)s=d[i],r=u[s.callbackIndex],s.state===n.SEM_PRE?null!==r&&(t=r(n.SEM_PRE,l,s.phraseIndex,s.phraseLength,e),t===n.SEM_SKIP&&(i=s.thatIndex)):null!==r&&r(n.SEM_POST,l,s.phraseIndex,s.phraseLength,e)},this.setLength=function(e){d.length=e,e>0?p.length=d[e-1].stack:p.length=0},this.getLength=function(){return d.length},this.toXml=function(t){var r=s.charsToDec,i="decimal integer character codes";"string"==typeof t&&t.length>=3&&(t=t.slice(0,3).toLowerCase(),"asc"===t?(r=s.charsToAscii,i="ASCII for printing characters, hex for non-printing"):"hex"===t?(r=s.charsToHex,i="hexidecimal integer character codes"):"uni"===t&&(r=s.charsToUnicode,i="Unicode UTF-32 integer character codes"));var a="",o=0;return a+='<?xml version="1.0" encoding="utf-8"?>\n',a+='<root nodes="'+d.length/2+'" characters="'+l.length+'">\n',a+="<!-- input string, "+i+" -->\n",a+=e(o+2),a+=r(l),a+="\n",d.forEach(function(t,s){t.state===n.SEM_PRE?(o+=1,a+=e(o),a+='<node name="'+t.name+'" index="'+t.phraseIndex+'" length="'+t.phraseLength+'">\n',a+=e(o+2),a+=r(l,t.phraseIndex,t.phraseLength),a+="\n"):(a+=e(o),a+='</node><!-- name="'+t.name+'" -->\n',o-=1)}),a+="</root>\n"},this.phrases=function(){var e,t,r={};for(e=0;e<d.length;e+=1)t=d[e],t.state===n.SEM_PRE&&(Array.isArray(r[t.name])||(r[t.name]=[]),r[t.name].push({index:t.phraseIndex,length:t.phraseLength}));return r}}},function(e,t,r){e.exports=function(){"use strict";var e="parser.js: ",t=this,n=r(1),s=r(2);this.ast=null,this.stats=null,this.trace=null,this.callbacks=[];var i,a,o,l,c=0,h=null,u=null,p=0,d=0,f=0,g=null,m=null,b=null,y=null,x=null,T=0,E=1/0,k=1/0,A=function(t,r,s){var i,a=e+"evaluateRule(): ";if(t>=b.length)throw new Error(a+"rule index: "+t+" out of range");if(r>=o)throw new Error(a+"phrase index: "+r+" out of range");i=h.length,h.push({type:n.RNM,index:t}),le(i,r,s),h.pop()},v=function(t,r,s){var i,a=e+"evaluateUdt(): ";if(t>=y.length)throw new Error(a+"udt index: "+t+" out of range");if(r>=o)throw new Error(a+"phrase index: "+r+" out of range");i=h.length,h.push({type:n.UDT,empty:y[t].empty,index:t}),le(i,r,s),h.pop()},w=function(){c=0,p=0,d=0,f=0,T=0,l=[{lookAround:n.LOOKAROUND_NONE,anchor:0,charsEnd:0,charsLength:0}],b=null,y=null,u=null,i=0,a=0,o=0,g=null,m=null,x=null,h=null},S=function(){var t=[],r=function(){var e={};b.forEach(function(t){t.isBkr&&(e[t.lower]=null)}),y.length>0&&y.forEach(function(t){t.isBkr&&(e[t.lower]=null)}),t.push(e)},n=function(){var e=t[t.length-1],r={};for(var n in e)r[n]=e[n];return r};this.push=function(){t.push(n())},this.pop=function(r){if(r||(r=t.length-1),r<1||r>t.length)throw new Error(e+"backRef.pop(): bad length: "+r);return t.length=r,t[t.length-1]},this.length=function(){return t.length},this.savePhrase=function(e,r,n){t[t.length-1][e]={phraseIndex:r,phraseLength:n}},this.getPhrase=function(e){return t[t.length-1][e]},r()},C=function(){var e=this;this.state=n.ACTIVE,this.phraseLength=0,this.lookAround=l[l.length-1],this.uFrame=new S,this.pFrame=new S,this.evaluateRule=A,this.evaluateUdt=v,this.refresh=function(){e.state=n.ACTIVE,e.phraseLength=0,e.lookAround=l[l.length-1]}},M=function(){return l[l.length-1]},O=function(){return l.length>1},R=function(){return l[l.length-1].lookAround===n.LOOKAROUND_BEHIND},L=function(){for(var r=e+"initializeAst(): ";;){if(void 0===t.ast){t.ast=null;break}if(null===t.ast)break;if("astObject"!==t.ast.astObject)throw new Error(r+"ast object not recognized");break}null!==t.ast&&t.ast.init(b,y,u)},_=function(){for(var r=e+"initializeTrace(): ";;){if(void 0===t.trace){t.trace=null;break}if(null===t.trace)break;if("traceObject"!==t.trace.traceObject)throw new Error(r+"trace object not recognized");break}null!==t.trace&&t.trace.init(b,y,u)},B=function(){for(var r=e+"initializeStats(): ";;){if(void 0===t.stats){t.stats=null;break}if(null===t.stats)break;if("statsObject"!==t.stats.statsObject)throw new Error(r+"stats object not recognized");break}null!==t.stats&&t.stats.init(b,y)},N=function(t){var r=e+"initializeGrammar(): ";if(!t)throw new Error(r+"grammar object undefined");if("grammarObject"!==t.grammarObject)throw new Error(r+"bad grammar object");b=t.rules,y=t.udts},P=function(t){var r=e+"initializeStartRule(): ",n=null;if("number"==typeof t){if(t>=b.length)throw new Error(r+"start rule index too large: max: "+b.length+": index: "+t);n=t}else{if("string"!=typeof t)throw new Error(r+"type of start rule '"+typeof t+"' not recognized");for(var s=t.toLowerCase(),i=0;i<b.length;i+=1)if(s===b[i].lower){n=b[i].index;break}if(null===n)throw new Error(r+"start rule name '"+t+"' not recognized")}return n},H=function(t,r,n){var l=e+"initializeInputChars(): ";if(void 0===t)throw new Error(l+"input string is undefined");if(null===t)throw new Error(l+"input string is null");if("string"==typeof t)t=s.stringToChars(t);else if(!Array.isArray(t))throw new Error(l+"input string is not a string or array");if(t.length>0&&"number"!=typeof t[0])throw new Error(l+"input string not an array of integers");if("number"!=typeof r)r=0;else if(r=Math.floor(r),r<0||r>t.length)throw new Error(l+"input beginning index out of range: "+r);if("number"!=typeof n)n=t.length-r;else if(n=Math.floor(n),n<0||n>t.length-r)throw new Error(l+"input length out of range: "+n);u=t,i=r,a=n,o=i+a},I=function(){var r,n=e+"initializeCallbacks(): ";for(g=[],m=[],r=0;r<b.length;r+=1)g[r]=null;for(r=0;r<y.length;r+=1)m[r]=null;var s,i=[];for(r=0;r<b.length;r+=1)i.push(b[r].lower);for(r=0;r<y.length;r+=1)i.push(y[r].lower);for(var a in t.callbacks){if(r=i.indexOf(a.toLowerCase()),r<0)throw new Error(n+"syntax callback '"+a+"' not a rule or udt name");if(s=t.callbacks[a],s||(s=null),"function"!=typeof s&&null!==s)throw new Error(n+"syntax callback["+a+"] must be function reference or 'false' (false/null/undefined/etc.)");r<b.length?g[r]=s:m[r-b.length]=s}for(r=0;r<y.length;r+=1)if(null===m[r])throw new Error(n+"all UDT callbacks must be defined. UDT callback["+y[r].lower+"] not a function reference")};this.setMaxTreeDepth=function(e){if("number"!=typeof e)throw new Error("parser: max tree depth must be integer > 0: "+e);if(E=Math.floor(e),E<=0)throw new Error("parser: max tree depth must be integer > 0: "+e)},this.setMaxNodeHits=function(e){if("number"!=typeof e)throw new Error("parser: max node hits must be integer > 0: "+e);if(k=Math.floor(e),k<=0)throw new Error("parser: max node hits must be integer > 0: "+e)},this.parse=function(e,t,r,n){return w(),H(r,0,r.length),D(e,t,n)},this.parseSubstring=function(e,t,r,n,s,i){return w(),H(r,n,s),D(e,t,i)};var D=function(t,r,s){var l,c,p;switch(l=e+"parse(): ",N(t),r=P(r),I(),_(),B(),L(),c=new C,void 0!==s&&null!==s&&(x=s),h=[{type:n.RNM,index:r}],le(0,i,c),h=null,c.state){case n.ACTIVE:throw new Error(l+"final state should never be 'ACTIVE'");case n.NOMATCH:p=!1;break;case n.EMPTY:case n.MATCH:p=c.phraseLength===a}return{success:p,state:c.state,length:a,matched:c.phraseLength,maxMatched:T,maxTreeDepth:d,nodeHits:f,inputLength:u.length,subBegin:i,subEnd:o,subLength:a}},U=function(e,t,r){for(var s=h[e],i=0;i<s.children.length&&(le(s.children[i],t,r),r.state===n.NOMATCH);i+=1);},F=function(e,r,s){var i,a,o,l,c;i=h[e];var u=s.uFrame.length(),p=s.pFrame.length();t.ast&&(o=t.ast.getLength()),a=!0,l=r,c=0;for(var d=0;d<i.children.length;d+=1){if(le(i.children[d],l,s),s.state===n.NOMATCH){a=!1;break}l+=s.phraseLength,c+=s.phraseLength}a?(s.state=0===c?n.EMPTY:n.MATCH,s.phraseLength=c):(s.state=n.NOMATCH,s.phraseLength=0,s.uFrame.pop(u),s.pFrame.pop(p),t.ast&&t.ast.setLength(o))},K=function(e,r,s){var i,a,l,c,u;i=h[e],l=r,c=0,u=0;var p=s.uFrame.length(),d=s.pFrame.length();for(t.ast&&(a=t.ast.getLength());;){if(l>=o)break;if(le(e+1,l,s),s.state===n.NOMATCH)break;if(s.state===n.EMPTY)break;if(u+=1,c+=s.phraseLength,l+=s.phraseLength,u===i.max)break}s.state===n.EMPTY?(s.state=0===c?n.EMPTY:n.MATCH,s.phraseLength=c):u>=i.min?(s.state=0===c?n.EMPTY:n.MATCH,s.phraseLength=c):(s.state=n.NOMATCH,s.phraseLength=0,s.uFrame.pop(p),s.pFrame.pop(d),t.ast&&t.ast.setLength(a))},Y=function(t,r,s,i){if(r.phraseLength>s){var a=e+"opRNM("+t.name+"): callback function error: ";throw a+="sysData.phraseLength: "+r.phraseLength,a+=" must be <= remaining chars: "+s,new Error(a)}switch(r.state){case n.ACTIVE:if(i!==!0)throw new Error(e+"opRNM("+t.name+"): callback function return error. ACTIVE state not allowed.");break;case n.EMPTY:r.phraseLength=0;break;case n.MATCH:0===r.phraseLength&&(r.state=n.EMPTY);break;case n.NOMATCH:r.phraseLength=0;break;default:throw new Error(e+"opRNM("+t.name+"): callback function return error. Unrecognized return state: "+r.state)}},j=function(e,r,s){var i,a,l,c,p,d,f,m,y,T;i=h[e],a=b[i.index],l=g[i.index];var E=!O();if(E&&(p=t.ast&&t.ast.ruleDefined(i.index),p&&(c=t.ast.getLength(),d=t.ast.down(i.index,b[i.index].name)),m=s.uFrame.length(),y=s.pFrame.length(),s.uFrame.push(),s.pFrame.push(),T=s.pFrame,s.pFrame=new S),null===l)f=h,h=a.opcodes,le(0,r,s),h=f;else{var k=o-r;l(s,u,r,x),Y(a,s,k,!0),s.state===n.ACTIVE&&(f=h,h=a.opcodes,le(0,r,s),h=f,l(s,u,r,x),Y(a,s,k,!1))}E&&(p&&(s.state===n.NOMATCH?t.ast.setLength(c):t.ast.up(i.index,b[i.index].name,r,s.phraseLength)),s.pFrame=T,s.state===n.NOMATCH?(s.uFrame.pop(m),s.pFrame.pop(y)):b[i.index].isBkr&&(s.pFrame.savePhrase(b[i.index].lower,r,s.phraseLength),s.uFrame.savePhrase(b[i.index].lower,r,s.phraseLength)))},V=function(t,r,s){if(r.phraseLength>s){var i=e+"opUDT("+t.name+"): callback function error: ";throw i+="sysData.phraseLength: "+r.phraseLength,i+=" must be <= remaining chars: "+s,new Error(i)}switch(r.state){case n.ACTIVE:throw new Error(e+"opUDT("+t.name+"): callback function return error. ACTIVE state not allowed.");case n.EMPTY:if(t.empty===!1)throw new Error(e+"opUDT("+t.name+"): callback function return error. May not return EMPTY.");r.phraseLength=0;break;case n.MATCH:if(0===r.phraseLength){if(t.empty===!1)throw new Error(e+"opUDT("+t.name+"): callback function return error. May not return EMPTY.");r.state=n.EMPTY}break;case n.NOMATCH:r.phraseLength=0;break;default:throw new Error(e+"opUDT("+t.name+"): callback function return error. Unrecognized return state: "+r.state)}},G=function(e,r,s){var i,a,l,c,p,d,f,g,T;c=h[e];var E=!O();E&&(d=t.ast&&t.ast.udtDefined(c.index),d&&(l=b.length+c.index,a=t.ast.getLength(),i=t.ast.down(l,y[c.index].name)),f=s.uFrame.length(),g=s.pFrame.length(),s.uFrame.push(),s.pFrame.push(),T=s.pFrame,s.pFrame=new S);var k=o-r;m[c.index](s,u,r,x),V(y[c.index],s,k),E&&(d&&(s.state===n.NOMATCH?t.ast.setLength(a):t.ast.up(l,y[c.index].name,r,s.phraseLength)),s.pFrame=T,s.state===n.NOMATCH?(s.uFrame.pop(f),s.pFrame.pop(g)):y[c.index].isBkr&&(s.pFrame.savePhrase(p[c.index].lower,r,s.phraseLength),s.uFrame.savePhrase(p[c.index].lower,r,s.phraseLength)))},$=function(e,t,r){l.push({lookAround:n.LOOKAROUND_AHEAD,anchor:t,charsEnd:o,charsLength:a}),o=u.length,a=u.length-i,le(e+1,t,r);var s=l.pop();switch(o=s.charsEnd,a=s.charsLength,r.phraseLength=0,r.state){case n.EMPTY:r.state=n.EMPTY;break;case n.MATCH:r.state=n.EMPTY;break;case n.NOMATCH:r.state=n.NOMATCH;break;default:throw new Error("opAND: invalid state "+r.state)}},z=function(e,t,r){l.push({lookAround:n.LOOKAROUND_AHEAD,anchor:t,charsEnd:o,charsLength:a}),o=u.length,a=u.length-i,le(e+1,t,r);var s=l.pop();switch(o=s.charsEnd,a=s.charsLength,r.phraseLength=0,r.state){case n.EMPTY:case n.MATCH:r.state=n.NOMATCH;break;case n.NOMATCH:r.state=n.EMPTY;break;default:throw new Error("opNOT: invalid state "+r.state)}},q=function(e,t,r){var s=h[e];r.state=n.NOMATCH,t<o&&s.min<=u[t]&&u[t]<=s.max&&(r.state=n.MATCH,r.phraseLength=1)},J=function(e,t,r){var s,i,a;if(i=h[e],a=i.string.length,r.state=n.NOMATCH,t+a<=o){for(s=0;s<a;s+=1)if(u[t+s]!==i.string[s])return;r.state=n.MATCH,r.phraseLength=a}},X=function(e,t,r){var s,i,a,l;if(l=h[e],r.state=n.NOMATCH,a=l.string.length,0===a)return void(r.state=n.EMPTY);if(t+a<=o){for(s=0;s<a;s+=1)if(i=u[t+s],i>=65&&i<=90&&(i+=32),i!==l.string[s])return;r.state=n.MATCH,r.phraseLength=a}},W=function(e,t,r){r.state=n.NOMATCH,r.phraseLength=0,r.state=0===t?n.EMPTY:n.NOMATCH},Z=function(e,t,r){r.state=n.NOMATCH,r.phraseLength=0,r.state=t===u.length?n.EMPTY:n.NOMATCH},Q=function(e,t,r){var s,i,a,l,c,p,d,f,g;if(l=h[e],r.state=n.NOMATCH,d=l.index<b.length?b[l.index].lower:y[l.index-b.length].lower,f=l.bkrMode===n.BKR_MODE_PM?r.pFrame.getPhrase(d):r.uFrame.getPhrase(d),g=l.bkrCase===n.BKR_MODE_CI,null!==f){if(c=f.phraseIndex,a=f.phraseLength,0===a)return void(r.state=n.EMPTY);if(t+a<=o){if(g){for(s=0;s<a;s+=1)if(i=u[t+s],p=u[c+s],i>=65&&i<=90&&(i+=32),p>=65&&p<=90&&(p+=32),i!==p)return;r.state=n.MATCH,r.phraseLength=a}else for(s=0;s<a;s+=1)if(i=u[t+s],p=u[c+s],i!==p)return;r.state=n.MATCH,r.phraseLength=a}}},ee=function(e,t,r){var s;switch(s=h[e],l.push({lookAround:n.LOOKAROUND_BEHIND,anchor:t}),le(e+1,t,r),l.pop(),r.phraseLength=0,r.state){case n.EMPTY:r.state=n.EMPTY;break;case n.MATCH:r.state=n.EMPTY;break;case n.NOMATCH:r.state=n.NOMATCH;break;default:throw new Error("opBKA: invalid state "+r.state)}},te=function(e,t,r){var s;switch(s=h[e],l.push({lookAround:n.LOOKAROUND_BEHIND,anchor:t}),le(e+1,t,r),l.pop(),r.phraseLength=0,r.state){case n.EMPTY:case n.MATCH:r.state=n.NOMATCH;break;case n.NOMATCH:r.state=n.EMPTY;break;default:throw new Error("opBKN: invalid state "+r.state)}},re=function(e,r,s){var i,a,o,l,c,u,p,d;i=h[e],p=s.uFrame.length(),d=s.pFrame.length(),t.ast&&(o=t.ast.getLength()),a=!0,l=r,u=0,c=0;for(var f=i.children.length-1;f>=0;f-=1)if(le(i.children[f],l,s),l-=s.phraseLength,u+=s.phraseLength,c+=s.phraseLength,s.state===n.NOMATCH){a=!1;break}a?(s.state=0===u?n.EMPTY:n.MATCH,s.phraseLength=u):(s.state=n.NOMATCH,s.phraseLength=0,s.uFrame.pop(p),s.pFrame.pop(d),t.ast&&t.ast.setLength(o))},ne=function(e,r,s){var i,a,o,l,c,u,p;for(i=h[e],o=r,l=0,c=0,u=s.uFrame.length(),p=s.pFrame.length(),t.ast&&(a=t.ast.getLength());;){if(o<=0)break;if(le(e+1,o,s),s.state===n.NOMATCH)break;if(s.state===n.EMPTY)break;if(c+=1,l+=s.phraseLength,o-=s.phraseLength,c===i.max)break}s.state===n.EMPTY?(s.state=0===l?n.EMPTY:n.MATCH,s.phraseLength=l):c>=i.min?(s.state=0===l?n.EMPTY:n.MATCH,s.phraseLength=l):(s.state=n.NOMATCH,s.phraseLength=0,s.uFrame.pop(u),s.pFrame.pop(p),t.ast&&t.ast.setLength(a))},se=function(e,t,r){var s=h[e];if(r.state=n.NOMATCH,r.phraseLength=0,t>0){var i=u[t-1];s.min<=i&&i<=s.max&&(r.state=n.MATCH,r.phraseLength=1)}},ie=function(e,t,r){var s,i,a,o;if(i=h[e],r.state=n.NOMATCH,a=i.string.length,o=t-a,o>=0){for(s=0;s<a;s+=1)if(u[o+s]!==i.string[s])return;r.state=n.MATCH,r.phraseLength=a}},ae=function(e,t,r){var s,i,a,o;if(s=h[e],r.state=n.NOMATCH,o=s.string.length,0===o)return void(r.state=n.EMPTY);if(a=t-o,a>=0){for(var l=0;l<o;l+=1)if(i=u[a+l],i>=65&&i<=90&&(i+=32),i!==s.string[l])return;r.state=n.MATCH,r.phraseLength=o}},oe=function(e,t,r){var s,i,a,o,l,c,p,d,f,g;if(o=h[e],r.state=n.NOMATCH,r.phraseLength=0,p=o.index<b.length?b[o.index].lower:y[o.index-b.length].lower,f=o.bkrMode===n.BKR_MODE_PM?r.pFrame.getPhrase(p):r.uFrame.getPhrase(p),g=o.bkrCase===n.BKR_MODE_CI,null!==f){if(l=f.phraseIndex,a=f.phraseLength,0===a)return r.state=n.EMPTY,void(r.phraseLength=0);if(d=t-a,d>=0){if(g){for(s=0;s<a;s+=1)if(i=u[d+s],c=u[l+s],i>=65&&i<=90&&(i+=32),c>=65&&c<=90&&(c+=32),i!==c)return;r.state=n.MATCH,r.phraseLength=a}else for(s=0;s<a;s+=1)if(i=u[d+s],c=u[l+s],i!==c)return;r.state=n.MATCH,r.phraseLength=a}}},le=function(e,r,s){var i,a=!0;if(i=h[e],f+=1,f>k)throw new Error("parser: maximum number of node hits exceeded: "+k);if(p+=1,p>d&&(d=p,d>E))throw new Error("parser: maximum parse tree depth exceeded: "+E);if(s.refresh(),null!==t.trace){var o=M();t.trace.down(i,s.state,r,s.phraseLength,o.anchor,o.lookAround)}if(R())switch(i.type){case n.ALT:U(e,r,s);break;case n.CAT:re(e,r,s);break;case n.REP:ne(e,r,s);break;case n.RNM:j(e,r,s);break;case n.UDT:G(e,r,s);break;case n.AND:$(e,r,s);break;case n.NOT:z(e,r,s);break;case n.TRG:se(e,r,s);break;case n.TBS:ie(e,r,s);break;case n.TLS:ae(e,r,s);break;case n.BKR:oe(e,r,s);break;case n.BKA:ee(e,r,s);break;case n.BKN:te(e,r,s);break;case n.ABG:W(e,r,s);break;case n.AEN:Z(e,r,s);break;default:a=!1}else switch(i.type){case n.ALT:U(e,r,s);break;case n.CAT:F(e,r,s);break;case n.REP:K(e,r,s);break;case n.RNM:j(e,r,s);break;case n.UDT:G(e,r,s);break;case n.AND:$(e,r,s);break;case n.NOT:z(e,r,s);break;case n.TRG:q(e,r,s);break;case n.TBS:J(e,r,s);break;case n.TLS:X(e,r,s);break;case n.BKR:Q(e,r,s);break;case n.BKA:ee(e,r,s);break;case n.BKN:te(e,r,s);break;case n.ABG:W(e,r,s);break;case n.AEN:Z(e,r,s);break;default:a=!1}if(!O()&&r+s.phraseLength>T&&(T=r+s.phraseLength),null!==t.stats&&t.stats.collect(i,s),null!==t.trace){var o=M();t.trace.up(i,s.state,r,s.phraseLength,o.anchor,o.lookAround)}return p-=1,a}}},function(e,t,r){e.exports=function(){"use strict";var e,t="stats.js: ",n=r(1),s=r(2),i=r(3),a=[],o=[],l=[],c=[],h=[];this.statsObject="statsObject";var u="stats",p=function(e,t){return e.lower<t.lower?-1:e.lower>t.lower?1:0},d=function(e,t){return e.total<t.total?1:e.total>t.total?-1:p(e,t)},f=function(e,t){return e.index<t.index?-1:e.index>t.index?1:0},g=function(){this.empty=0,this.match=0,this.nomatch=0,this.total=0},m=function(){l.length=0,e=new g,l[n.ALT]=new g,l[n.CAT]=new g,l[n.REP]=new g,l[n.RNM]=new g,l[n.TRG]=new g,l[n.TBS]=new g,l[n.TLS]=new g,l[n.UDT]=new g,l[n.AND]=new g,l[n.NOT]=new g,l[n.BKR]=new g,l[n.BKA]=new g,l[n.BKN]=new g,l[n.ABG]=new g,l[n.AEN]=new g,c.length=0;for(var t=0;t<a.length;t+=1)c.push({empty:0,match:0,nomatch:0,total:0,name:a[t].name,lower:a[t].lower,index:a[t].index});if(o.length>0){h.length=0;for(var t=0;t<o.length;t+=1)h.push({empty:0,match:0,nomatch:0,total:0,name:o[t].name,lower:o[t].lower,index:o[t].index})}},b=function(e,r,s){switch(e.total+=1,r){case n.EMPTY:e.empty+=1;break;case n.MATCH:e.match+=1;break;case n.NOMATCH:e.nomatch+=1;break;default:throw t+"collect(): incStat(): unrecognized state: "+r}},y=function(e,t){var r="";return r+="<tr>",r+='<td class="'+i.CLASS_ACTIVE+'">'+e+"</td>",r+='<td class="'+i.CLASS_EMPTY+'">'+t.empty+"</td>",r+='<td class="'+i.CLASS_MATCH+'">'+t.match+"</td>",r+='<td class="'+i.CLASS_NOMATCH+'">'+t.nomatch+"</td>",r+='<td class="'+i.CLASS_ACTIVE+'">'+t.total+"</td>",r+="</tr>\n"},x=function(){var t="";return t+=y("ALT",l[n.ALT]),t+=y("CAT",l[n.CAT]),t+=y("REP",l[n.REP]),t+=y("RNM",l[n.RNM]),t+=y("TRG",l[n.TRG]),t+=y("TBS",l[n.TBS]),t+=y("TLS",l[n.TLS]),t+=y("UDT",l[n.UDT]),t+=y("AND",l[n.AND]),t+=y("NOT",l[n.NOT]),t+=y("BKR",l[n.BKR]),t+=y("BKA",l[n.BKA]),t+=y("BKN",l[n.BKN]),t+=y("ABG",l[n.ABG]),t+=y("AEN",l[n.AEN]),t+=y("totals",e)},T=function(){var e="";e+="<tr><th></th><th></th><th></th><th></th><th></th></tr>\n",e+="<tr><th>rules</th><th></th><th></th><th></th><th></th></tr>\n";for(var t=0;t<a.length;t+=1)c[t].total>0&&(e+="<tr>",e+='<td class="'+i.CLASS_ACTIVE+'">'+c[t].name+"</td>",e+='<td class="'+i.CLASS_EMPTY+'">'+c[t].empty+"</td>",e+='<td class="'+i.CLASS_MATCH+'">'+c[t].match+"</td>",e+='<td class="'+i.CLASS_NOMATCH+'">'+c[t].nomatch+"</td>",e+='<td class="'+i.CLASS_ACTIVE+'">'+c[t].total+"</td>",e+="</tr>\n");if(o.length>0){e+="<tr><th></th><th></th><th></th><th></th><th></th></tr>\n",e+="<tr><th>udts</th><th></th><th></th><th></th><th></th></tr>\n";for(var t=0;t<o.length;t+=1)h[t].total>0&&(e+="<tr>",e+='<td class="'+i.CLASS_ACTIVE+'">'+h[t].name+"</td>",e+='<td class="'+i.CLASS_EMPTY+'">'+h[t].empty+"</td>",e+='<td class="'+i.CLASS_MATCH+'">'+h[t].match+"</td>",e+='<td class="'+i.CLASS_NOMATCH+'">'+h[t].nomatch+"</td>",e+='<td class="'+i.CLASS_ACTIVE+'">'+h[t].total+"</td>",e+="</tr>\n")}return e};this.validate=function(e){var t=!1;return"string"==typeof e&&u===e&&(t=!0),t},this.init=function(e,t){a=e,o=t,m()},this.collect=function(t,r){b(e,r.state,r.phraseLength),b(l[t.type],r.state,r.phraseLength),t.type===n.RNM&&b(c[t.index],r.state,r.phraseLength),t.type===n.UDT&&b(h[t.index],r.state,r.phraseLength)},this.toHtml=function(e,t){var r="";for(r+='<table class="'+i.CLASS_STATS+'">\n',"string"==typeof t&&(r+="<caption>"+t+"</caption>\n"),r+='<tr><th class="'+i.CLASS_ACTIVE+'">ops</th>\n',r+='<th class="'+i.CLASS_EMPTY+'">EMPTY</th>\n',r+='<th class="'+i.CLASS_MATCH+'">MATCH</th>\n',r+='<th class="'+i.CLASS_NOMATCH+'">NOMATCH</th>\n',r+='<th class="'+i.CLASS_ACTIVE+'">totals</th></tr>\n';;){if(void 0===e){r+=x();break}if(null===e){r+=x();break}if("ops"===e){r+=x();break}if("index"===e){c.sort(f),h.length>0&&h.sort(f),r+=x(),r+=T();break}if("hits"===e){c.sort(d),h.length>0&&h.sort(f),r+=x(),r+=T();break}if("alpha"===e){c.sort(p),h.length>0&&h.sort(p),r+=x(),r+=T();break}break}return r+="</table>\n"},this.toHtmlPage=function(e,t,r){return s.htmlToPage(this.toHtml(e,t),r)}}},function(e,t,r){e.exports=function(){"use strict";var e="trace.js: ",t=this,n=16,s=10,i=8,a=32,o=80,l=5,c=r(2),h=r(3),u=new(r(8)),p=r(1),d=[],f=5e3,g=-1,m=0,b=0,y=[],x=null,T=null,E=null,k=[],A=[],v='<span class="'+h.CLASS_LINEEND+'">•</span>',w='<span class="'+h.CLASS_LINEEND+'">…</span>',S='<span class="'+h.CLASS_EMPTY+'">𝜺</span>',C=function(){var r=function(e){k[p.ALT]=e,k[p.CAT]=e,k[p.REP]=e,k[p.TLS]=e,k[p.TBS]=e,k[p.TRG]=e,k[p.AND]=e,k[p.NOT]=e,k[p.BKR]=e,k[p.BKA]=e,k[p.BKN]=e,k[p.ABG]=e,k[p.AEN]=e},n=0;for(var s in t.filter.operators)n+=1;if(0===n)return void r(!1);for(var s in t.filter.operators){var i=s.toUpperCase();if("<ALL>"===i)return void r(!0);if("<NONE>"===i)return void r(!1)}r(!1);for(var s in t.filter.operators){var i=s.toUpperCase();if("ALT"===i)k[p.ALT]=t.filter.operators[s]===!0;else if("CAT"===i)k[p.CAT]=t.filter.operators[s]===!0;else if("REP"===i)k[p.REP]=t.filter.operators[s]===!0;else if("AND"===i)k[p.AND]=t.filter.operators[s]===!0;else if("NOT"===i)k[p.NOT]=t.filter.operators[s]===!0;else if("TLS"===i)k[p.TLS]=t.filter.operators[s]===!0;else if("TBS"===i)k[p.TBS]=t.filter.operators[s]===!0;else if("TRG"===i)k[p.TRG]=t.filter.operators[s]===!0;else if("BKR"===i)k[p.BKR]=t.filter.operators[s]===!0;else if("BKA"===i)k[p.BKA]=t.filter.operators[s]===!0;else if("BKN"===i)k[p.BKN]=t.filter.operators[s]===!0;else if("ABG"===i)k[p.ABG]=t.filter.operators[s]===!0;else{if("AEN"!==i)throw new Error(e+"initOpratorFilter: '"+s+"' not a valid operator name. Must be <all>, <none>, alt, cat, rep, tls, tbs, trg, and, not, bkr, bka or bkn");k[p.AEN]=t.filter.operators[s]===!0}}},M=function(){var r,n,s=function(e){k[p.RNM]=e,k[p.UDT]=e;var t=T.length+E.length;A.length=0;for(var r=0;r<t;r+=1)A.push(e)},i=[];for(n=0;n<T.length;n+=1)i.push(T[n].lower);for(n=0;n<E.length;n+=1)i.push(E[n].lower);A.length=0,r=0;for(var a in t.filter.rules)r+=1;if(0===r)return void s(!0);for(var a in t.filter.rules){var o=a.toLowerCase();if("<all>"===o)return void s(!0);if("<none>"===o)return void s(!1)}s(!1),k[p.RNM]=!0,k[p.UDT]=!0;for(var a in t.filter.rules){var o=a.toLowerCase();if(n=i.indexOf(o),n<0)throw new Error(e+"initRuleFilter: '"+a+"' not a valid rule or udt name");A[n]=t.filter.rules[a]===!0}};this.traceObject="traceObject",this.filter={operators:[],rules:[]},this.setMaxRecords=function(e,t){"number"==typeof e&&e>0&&(f=Math.ceil(e)),"number"==typeof t&&(g=Math.floor(t),g<0?g=-1:g<f&&(g=f))},this.getMaxRecords=function(){return f},this.init=function(e,t,r){d.length=0,y.length=0,m=0,b=0,x=r,T=e,E=t,C(),M(),u.init(f)};var O=function(e){var t=!1;return t=e.type===p.RNM?!(!k[e.type]||!A[e.index]):e.type===p.UDT?!(!k[e.type]||!A[T.length+e.index]):k[e.type]},R=function(e){return g===-1||e<=g};this.down=function(e,t,r,n,s,i){R(m)&&O(e)&&(y.push(m),d[u.increment()]={dirUp:!1,depth:b,thisLine:m,thatLine:void 0,opcode:e,state:t,phraseIndex:r,phraseLength:n,lookAnchor:s,lookAround:i},m+=1,b+=1)},this.up=function(e,t,r,n,s,i){if(R(m)&&O(e)){var a=m,o=y.pop(),l=u.getListIndex(o);l!==-1&&(d[l].thatLine=a),b-=1,d[u.increment()]={dirUp:!0,depth:b,thisLine:a,thatLine:o,opcode:e,state:t,phraseIndex:r,phraseLength:n,lookAnchor:s,lookAround:i},m+=1}},this.toHtml=function(e,t){var r=i;if("string"==typeof e&&e.length>=3){var o=e.toLowerCase().slice(0,3);"hex"===o?r=n:"dec"===o?r=s:"uni"===o&&(r=a)}var l="";return l+=L(r,t),l+=B(r),l+=_()},this.toHtmlPage=function(e,t,r){return c.htmlToPage(this.toHtml(e,t),r)};var L=function(t,r){var o;switch(t){case n:o="hexidecimal";break;case s:o="decimal";break;case i:o="ASCII";break;case a:o="UNICODE";break;default:throw new Error(e+"htmlHeader: unrecognized mode: "+t)}var l="";return l+="<p>display mode: "+o+"</p>\n",l+='<table class="'+h.CLASS_TRACE+'">\n',"string"==typeof r&&(l+="<caption>"+r+"</caption>"),
l},_=function(){var e="";return e+="</table>\n",e+='<p class="'+h.CLASS_MONOSPACE+'">legend:<br>\n',e+="(a) - line number<br>\n",e+="(b) - matching line number<br>\n",e+="(c) - phrase offset<br>\n",e+="(d) - phrase length<br>\n",e+="(e) - tree depth<br>\n",e+="(f) - operator state<br>\n",e+=' - <span class="'+h.CLASS_ACTIVE+'">↓</span> phrase opened<br>\n',e+=' - <span class="'+h.CLASS_MATCH+'">↑M</span> phrase matched<br>\n',e+=' - <span class="'+h.CLASS_EMPTY+'">↑E</span> empty phrase matched<br>\n',e+=' - <span class="'+h.CLASS_NOMATCH+'">↑N</span> phrase not matched<br>\n',e+="operator - ALT, CAT, REP, RNM, TRG, TLS, TBS<sup>†</sup>, UDT, AND, NOT, BKA, BKN, BKR, ABG, AEN<sup>‡</sup><br>\n",e+="phrase - up to "+o+" characters of the phrase being matched<br>\n",e+=' - <span class="'+h.CLASS_MATCH+'">matched characters</span><br>\n',e+=' - <span class="'+h.CLASS_LOOKAHEAD+'">matched characters in look ahead mode</span><br>\n',e+=' - <span class="'+h.CLASS_LOOKBEHIND+'">matched characters in look behind mode</span><br>\n',e+=' - <span class="'+h.CLASS_REMAINDER+'">remainder characters(not yet examined by parser)</span><br>\n',e+=' - <span class="'+h.CLASS_CTRLCHAR+'">control characters, TAB, LF, CR, etc. (ASCII mode only)</span><br>\n',e+=" - "+S+" empty string<br>\n",e+=" - "+v+" end of input string<br>\n",e+=" - "+w+" input string display truncated<br>\n",e+="</p>\n",e+='<p class="'+h.CLASS_MONOSPACE+'">\n',e+="<sup>†</sup>original ABNF operators:<br>\n",e+="ALT - alternation<br>\n",e+="CAT - concatenation<br>\n",e+="REP - repetition<br>\n",e+="RNM - rule name<br>\n",e+="TRG - terminal range<br>\n",e+="TLS - terminal literal string (case insensitive)<br>\n",e+="TBS - terminal binary string (case sensitive)<br>\n",e+="<br>\n",e+="<sup>‡</sup>super set SABNF operators:<br>\n",e+="UDT - user-defined terminal<br>\n",e+="AND - positive look ahead<br>\n",e+="NOT - negative look ahead<br>\n",e+="BKA - positive look behind<br>\n",e+="BKN - negative look behind<br>\n",e+="BKR - back reference<br>\n",e+="ABG - anchor - begin of input string<br>\n",e+="AEN - anchor - end of input string<br>\n",e+="</p>\n"},B=function(e){if(null===T)return"";var r,n,s,i,a,o,l="";return l+="<tr><th>(a)</th><th>(b)</th><th>(c)</th><th>(d)</th><th>(e)</th><th>(f)</th>",l+="<th>operator</th><th>phrase</th></tr>\n",u.forEach(function(u,f){var g=d[u];switch(r=g.thisLine,n=void 0!==g.thatLine?g.thatLine:"--",s=!1,i=!1,a=!1,g.lookAround===p.LOOKAROUND_AHEAD&&(s=!0,a=!0,o=g.lookAnchor),g.opcode.type!==p.AND&&g.opcode.type!==p.NOT||(s=!0,a=!0,o=g.phraseIndex),g.lookAround===p.LOOKAROUND_BEHIND&&(i=!0,a=!0,o=g.lookAnchor),g.opcode.type!==p.BKA&&g.opcode.type!==p.BKN||(i=!0,a=!0,o=g.phraseIndex),l+="<tr>",l+="<td>"+r+"</td><td>"+n+"</td>",l+="<td>"+g.phraseIndex+"</td>",l+="<td>"+g.phraseLength+"</td>",l+="<td>"+g.depth+"</td>",l+="<td>",g.state){case p.ACTIVE:l+='<span class="'+h.CLASS_ACTIVE+'">↓ </span>';break;case p.MATCH:l+='<span class="'+h.CLASS_MATCH+'">↑M</span>';break;case p.NOMATCH:l+='<span class="'+h.CLASS_NOMATCH+'">↑N</span>';break;case p.EMPTY:l+='<span class="'+h.CLASS_EMPTY+'">↑E</span>';break;default:l+='<span class="'+h.CLASS_ACTIVE+'">--</span>'}if(l+="</td>",l+="<td>",l+=t.indent(g.depth),s?l+='<span class="'+h.CLASS_LOOKAHEAD+'">':i&&(l+='<span class="'+h.CLASS_LOOKBEHIND+'">'),l+=c.opcodeToString(g.opcode.type),g.opcode.type===p.RNM&&(l+="("+T[g.opcode.index].name+") "),g.opcode.type===p.BKR){var m=g.opcode.bkrCase===p.BKR_MODE_CI?"%i":"%s",b=g.opcode.bkrMode===p.BKR_MODE_UM?"%u":"%p";l+="(\\"+m+b+T[g.opcode.index].name+") "}g.opcode.type===p.UDT&&(l+="("+E[g.opcode.index].name+") "),g.opcode.type===p.TRG&&(l+="("+N(e,g.opcode)+") "),g.opcode.type===p.TBS&&(l+="("+H(e,g.opcode)+") "),g.opcode.type===p.TLS&&(l+="("+I(e,g.opcode)+") "),g.opcode.type===p.REP&&(l+="("+P(e,g.opcode)+") "),a&&(l+="</span>"),l+="</td>",l+="<td>",l+=i?D(e,x,g.state,g.phraseIndex,g.phraseLength,o):s?U(e,x,g.state,g.phraseIndex,g.phraseLength):F(e,x,g.state,g.phraseIndex,g.phraseLength),l+="</td></tr>\n"}),l+="<tr><th>(a)</th><th>(b)</th><th>(c)</th><th>(d)</th><th>(e)</th><th>(f)</th>",l+="<th>operator</th><th>phrase</th></tr>\n",l+="</table>\n"};this.indent=function(e){for(var t="",r=0;r<e;r+=1)t+=".";return t};var N=function(e,t){var r="";if(t.type===p.TRG)if(e===n||e===a){var s=t.min.toString(16).toUpperCase();s.length%2!==0&&(s="0"+s),r+=e===n?"%x":"U+",r+=s,s=t.max.toString(16).toUpperCase(),s.length%2!==0&&(s="0"+s),r+="–"+s}else r="%d"+t.min.toString(10)+"–"+t.max.toString(10);return r},P=function(e,t){var r="";if(t.type===p.REP)if(e===n){var s=t.min.toString(16).toUpperCase();s.length%2!==0&&(s="0"+s),r="x"+s,t.max<1/0?(s=t.max.toString(16).toUpperCase(),s.length%2!==0&&(s="0"+s)):s="inf",r+="–"+s}else r=t.max<1/0?t.min.toString(10)+"–"+t.max.toString(10):t.min.toString(10)+"–inf";return r},H=function(e,t){var r="";if(t.type===p.TBS){var s=Math.min(t.string.length,2*l);if(e===n||e===a){r+=e===n?"%x":"U+";for(var i=0;i<s;i+=1){var o;i>0&&(r+="."),o=t.string[i].toString(16).toUpperCase(),o.length%2!==0&&(o="0"+o),r+=o}}else{r="%d";for(var i=0;i<s;i+=1)i>0&&(r+="."),r+=t.string[i].toString(10)}s<t.string.length&&(r+=w)}return r},I=function(e,t){var r="";if(t.type===p.TLS){var i=Math.min(t.string.length,l);if(e===n||e===s){var a,o,h;e===n?(r="%x",h=16):(r="%d",h=10);for(var u=0;u<i;u+=1)u>0&&(r+="."),o=t.string[u],o>=97&&o<=122?(a=o-32,r+=(a.toString(h)+"/"+o.toString(h)).toUpperCase()):o>=65&&o<=90?(a=o,o+=32,r+=(a.toString(h)+"/"+o.toString(h)).toUpperCase()):r+=o.toString(h).toUpperCase();i<t.string.length&&(r+=w)}else{r='"';for(var u=0;u<i;u+=1)r+=c.asciiChars[t.string[u]];i<t.string.length&&(r+=w),r+='"'}}return r},D=function(e,t,r,n,s,i){var a,l,c,u,d="",f=v,g='<span class="'+h.CLASS_LOOKBEHIND+'">',m='<span class="'+h.CLASS_REMAINDER+'">',b="</span>",y=!1;switch(r){case p.EMPTY:d+=S;case p.NOMATCH:case p.MATCH:case p.ACTIVE:a=n-s,l=i-a,c=i,u=t.length-c}return f=v,l>o?(l=o,f=w,u=0):l+u>o&&(f=w,u=o-l),l>0&&(d+=g,d+=Y(e,t,a,l,y),d+=b,y=!0),u>0&&(d+=m,d+=Y(e,t,c,u,y),d+=b),d+f},U=function(e,t,r,n,s){var i='<span class="'+h.CLASS_LOOKAHEAD+'">';return K(e,t,r,n,s,i)},F=function(e,t,r,n,s){var i='<span class="'+h.CLASS_MATCH+'">';return K(e,t,r,n,s,i)},K=function(e,t,r,n,s,i){var a,l,c,u,d="",f=v,g='<span class="'+h.CLASS_REMAINDER+'">',m="</span>",b=!1;switch(r){case p.EMPTY:d+=S;case p.NOMATCH:case p.ACTIVE:a=n,l=0,c=n,u=t.length-c;break;case p.MATCH:a=n,l=s,c=n+l,u=t.length-c}return f=v,l>o?(l=o,f=w,u=0):l+u>o&&(f=w,u=o-l),l>0&&(d+=i,d+=Y(e,t,a,l,b),d+=m,b=!0),u>0&&(d+=g,d+=Y(e,t,c,u,b),d+=m),d+f},Y=function(e,t,r,o,l){if(0===o)return"";var h="",u=l?",":"";switch(e){case n:h=u+c.charsToHex(t,r,o);break;case s:if(l)return","+c.charsToDec(t,r,o);h=u+c.charsToDec(t,r,o);break;case a:h=u+c.charsToUnicode(t,r,o);break;case i:default:h=c.charsToAsciiHtml(t,r,o)}return h}}}]);