Files
Foundry-VTT-Docker/resources/app/node_modules/peggy/browser/peggy.min.js
2025-01-04 00:34:03 +01:00

8 lines
117 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// peggy 4.0.2
//
// https://peggyjs.org/
//
// Copyright (c) 2024- the Peggy authors
// Licensed under the MIT License.
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).peggy=t()}(this,(function(){"use strict";var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var GrammarLocation$4=function(){function GrammarLocation(e,t){this.source=e,this.start=t}return GrammarLocation.prototype.toString=function(){return String(this.source)},GrammarLocation.prototype.offset=function(e){return{line:e.line+this.start.line-1,column:1===e.line?e.column+this.start.column-1:e.column,offset:e.offset+this.start.offset}},GrammarLocation.offsetStart=function(e){return e.source&&"function"==typeof e.source.offset?e.source.offset(e.start):e.start},GrammarLocation.offsetEnd=function(e){return e.source&&"function"==typeof e.source.offset?e.source.offset(e.end):e.end},GrammarLocation}(),grammarLocation=GrammarLocation$4,__extends=commonjsGlobal&&commonjsGlobal.__extends||(extendStatics=function(e,t){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},extendStatics(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),extendStatics,GrammarLocation$3=grammarLocation,setProtoOf=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},GrammarError$3=function(e){function t(r,n,o){var u=e.call(this,r)||this;return setProtoOf(u,t.prototype),u.name="GrammarError",u.location=n,void 0===o&&(o=[]),u.diagnostics=o,u.stage=null,u.problems=[["error",r,n,o]],u}return __extends(t,e),t.prototype.toString=function(){var t=e.prototype.toString.call(this);this.location&&(t+="\n at ",void 0!==this.location.source&&null!==this.location.source&&(t+="".concat(this.location.source,":")),t+="".concat(this.location.start.line,":").concat(this.location.start.column));for(var r=0,n=this.diagnostics;r<n.length;r++){var o=n[r];t+="\n from ",void 0!==o.location.source&&null!==o.location.source&&(t+="".concat(o.location.source,":")),t+="".concat(o.location.start.line,":").concat(o.location.start.column,": ").concat(o.message)}return t},t.prototype.format=function(e){var t=e.map((function(e){var t=e.source,r=e.text;return{source:t,text:null!=r?String(r).split(/\r\n|\n|\r/g):[]}}));function r(e,r,n){void 0===n&&(n="");var o="",u=t.find((function(t){return t.source===e.source})),a=e.start,i=GrammarLocation$3.offsetStart(e);if(u){var s=e.end,c=u.text[a.line-1],l=(a.line===s.line?s.column:c.length+1)-a.column||1;n&&(o+="\nnote: ".concat(n)),o+="\n --\x3e ".concat(e.source,":").concat(i.line,":").concat(i.column,"\n").concat("".padEnd(r)," |\n").concat(i.line.toString().padStart(r)," | ").concat(c,"\n").concat("".padEnd(r)," | ").concat("".padEnd(a.column-1)).concat("".padEnd(l,"^"))}else o+="\n at ".concat(e.source,":").concat(i.line,":").concat(i.column),n&&(o+=": ".concat(n));return o}function n(e,t,n,o){void 0===o&&(o=[]);var u=-1/0;u=n?o.reduce((function(e,t){var r=t.location;return Math.max(e,GrammarLocation$3.offsetStart(r).line)}),n.start.line):Math.max.apply(null,o.map((function(e){return e.location.start.line}))),u=u.toString().length;var a="".concat(e,": ").concat(t);n&&(a+=r(n,u));for(var i=0,s=o;i<s.length;i++){var c=s[i];a+=r(c.location,u,c.message)}return a}return this.problems.filter((function(e){return"info"!==e[0]})).map((function(e){return n.apply(void 0,e)})).join("\n\n")},t}(Error),grammarError=GrammarError$3,__spreadArray$4=commonjsGlobal&&commonjsGlobal.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,u=t.length;o<u;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},visitor$d={build:function(e){function t(t){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return e[t.type].apply(e,__spreadArray$4([t],r,!1))}function r(){}function n(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return t.apply(void 0,__spreadArray$4([e.expression],r,!1))}function o(e){return function(r){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];r[e].forEach((function(e){return t.apply(void 0,__spreadArray$4([e],n,!1))}))}}var u={grammar:function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];for(var o=0,u=e.imports;o<u.length;o++){var a=u[o];t.apply(void 0,__spreadArray$4([a],r,!1))}if(e.topLevelInitializer)if(Array.isArray(e.topLevelInitializer))for(var i=0,s=e.topLevelInitializer;i<s.length;i++){var c=s[i];t.apply(void 0,__spreadArray$4([c],r,!1))}else t.apply(void 0,__spreadArray$4([e.topLevelInitializer],r,!1));if(e.initializer)if(Array.isArray(e.initializer))for(var l=0,p=e.initializer;l<p.length;l++){var f=p[l];t.apply(void 0,__spreadArray$4([f],r,!1))}else t.apply(void 0,__spreadArray$4([e.initializer],r,!1));e.rules.forEach((function(e){return t.apply(void 0,__spreadArray$4([e],r,!1))}))},grammar_import:r,top_level_initializer:r,initializer:r,rule:n,named:n,choice:o("alternatives"),action:n,sequence:o("elements"),labeled:n,text:n,simple_and:n,simple_not:n,optional:n,zero_or_more:n,one_or_more:n,repeated:function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];return e.delimiter&&t.apply(void 0,__spreadArray$4([e.delimiter],r,!1)),t.apply(void 0,__spreadArray$4([e.expression],r,!1))},group:n,semantic_and:r,semantic_not:r,rule_ref:r,library_ref:r,literal:r,class:r,any:r};return Object.keys(u).forEach((function(t){Object.prototype.hasOwnProperty.call(e,t)||(e[t]=u[t])})),t}},visitor_1=visitor$d,visitor$c=visitor_1;function combinePossibleArrays(e,t){if(!e||!t)return e||t;var r=Array.isArray(e)?e:[e];return r.push(t),r}var asts$8={findRule:function(e,t){for(var r=0;r<e.rules.length;r++)if(e.rules[r].name===t)return e.rules[r]},indexOfRule:function(e,t){for(var r=0;r<e.rules.length;r++)if(e.rules[r].name===t)return r;return-1},alwaysConsumesOnSuccess:function(e,t){function r(){return!0}function n(){return!1}var o=visitor$c.build({choice:function(e){return e.alternatives.every(o)},sequence:function(e){return e.elements.some(o)},simple_and:n,simple_not:n,optional:n,zero_or_more:n,repeated:function(e){var t=e.min?e.min:e.max;return!("constant"!==t.type||0===t.value||!o(e.expression)&&!(t.value>1&&e.delimiter&&o(e.delimiter)))},semantic_and:n,semantic_not:n,rule_ref:function(t){var r=asts$8.findRule(e,t.name);return r?o(r):void 0},library_ref:function(){return!1},literal:function(e){return""!==e.value},class:r,any:r});return o(t)},combine:function(e){return e.reduce((function(e,t){return e.topLevelInitializer=combinePossibleArrays(e.topLevelInitializer,t.topLevelInitializer),e.initializer=combinePossibleArrays(e.initializer,t.initializer),e.rules=e.rules.concat(t.rules),e}))}},asts_1=asts$8;function addImportedRules$1(e){for(var t=0,r=0,n=e.imports;r<n.length;r++){for(var o=n[r],u=0,a=o.what;u<a.length;u++){var i=a[u],s=void 0;switch(i.type){case"import_binding_all":continue;case"import_binding_default":break;case"import_binding":s=i.binding;break;case"import_binding_rename":s=i.rename;break;default:throw new TypeError("Unknown binding type")}e.rules.push({type:"rule",name:i.binding,nameLocation:i.location,expression:{type:"library_ref",name:s,library:o.from.module,libraryNumber:t,location:i.location},location:o.from.location})}t++}}var addImportedRules_1=addImportedRules$1,visitor$b=visitor_1;function findLibraryNumber(e,t){for(var r=0,n=0,o=e.imports;n<o.length;n++){for(var u=0,a=o[n].what;u<a.length;u++){var i=a[u];if("import_binding_all"===i.type&&i.binding===t)return r}r++}return-1}function fixLibraryNumbers$1(e,t,r){visitor$b.build({library_ref:function(t){-1===t.libraryNumber&&(t.libraryNumber=findLibraryNumber(e,t.library),-1===t.libraryNumber&&r.error('Unknown module "'.concat(t.library,'"'),t.location))}})(e)}var fixLibraryNumbers_1=fixLibraryNumbers$1,opcodes={PUSH:0,PUSH_EMPTY_STRING:35,PUSH_UNDEFINED:1,PUSH_NULL:2,PUSH_FAILED:3,PUSH_EMPTY_ARRAY:4,PUSH_CURR_POS:5,POP:6,POP_CURR_POS:7,POP_N:8,NIP:9,APPEND:10,WRAP:11,TEXT:12,PLUCK:36,IF:13,IF_ERROR:14,IF_NOT_ERROR:15,IF_LT:30,IF_GE:31,IF_LT_DYNAMIC:32,IF_GE_DYNAMIC:33,WHILE_NOT_ERROR:16,MATCH_ANY:17,MATCH_STRING:18,MATCH_STRING_IC:19,MATCH_CHAR_CLASS:20,MATCH_REGEXP:20,ACCEPT_N:21,ACCEPT_STRING:22,FAIL:23,LOAD_SAVED_POS:24,UPDATE_SAVED_POS:25,CALL:26,RULE:27,LIBRARY_RULE:41,SILENT_FAILS_ON:28,SILENT_FAILS_OFF:29,SOURCE_MAP_PUSH:37,SOURCE_MAP_POP:38,SOURCE_MAP_LABEL_PUSH:39,SOURCE_MAP_LABEL_POP:40},opcodes_1=opcodes,__assign$1=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign$1=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},__assign$1.apply(this,arguments)},Intern$1=function(){function e(e){this.options=__assign$1({stringify:String,convert:function(e){return e}},e),this.items=[],this.offsets={}}return e.prototype.add=function(e){var t=this.options.convert(e);if(!t)return-1;var r=this.options.stringify(t),n=this.offsets[r];return void 0===n&&(n=this.items.push(t)-1,this.offsets[r]=n),n},e.prototype.get=function(e){return this.items[e]},e.prototype.map=function(e){return this.items.map(e)},e}(),intern=Intern$1,visitor$a=visitor_1,asts$7=asts_1,GrammarError$2=grammarError,ALWAYS_MATCH$1=1,SOMETIMES_MATCH$1=0,NEVER_MATCH$1=-1;function inferenceMatchResult$1(e){function t(e){return e.match=SOMETIMES_MATCH$1}function r(e){return u(e.expression),e.match=ALWAYS_MATCH$1}function n(e){return e.match=u(e.expression)}function o(e,t){for(var r=e.length,n=0,o=0,a=0;a<r;++a){var i=u(e[a]);i===ALWAYS_MATCH$1&&++n,i===NEVER_MATCH$1&&++o}return n===r?ALWAYS_MATCH$1:t?o===r?NEVER_MATCH$1:SOMETIMES_MATCH$1:o>0?NEVER_MATCH$1:SOMETIMES_MATCH$1}var u=visitor$a.build({rule:function(e){var t=void 0,r=0;if(void 0===e.match){e.match=SOMETIMES_MATCH$1;do{if(t=e.match,e.match=u(e.expression),++r>6)throw new GrammarError$2("Infinity cycle detected when trying to evaluate node match result",e.location)}while(t!==e.match)}return e.match},named:n,choice:function(e){return e.match=o(e.alternatives,!0)},action:n,sequence:function(e){return e.match=o(e.elements,!1)},labeled:n,text:n,simple_and:n,simple_not:function(e){return e.match=-u(e.expression)},optional:r,zero_or_more:r,one_or_more:n,repeated:function(e){var t=u(e.expression),r=e.delimiter?u(e.delimiter):NEVER_MATCH$1,n=e.min?e.min:e.max;return"constant"!==n.type||"constant"!==e.max.type?e.match=SOMETIMES_MATCH$1:0===e.max.value||null!==e.max.value&&n.value>e.max.value?e.match=NEVER_MATCH$1:t===NEVER_MATCH$1?e.match=0===n.value?ALWAYS_MATCH$1:NEVER_MATCH$1:t===ALWAYS_MATCH$1?e.delimiter&&n.value>=2?e.match=r:e.match=ALWAYS_MATCH$1:e.delimiter&&n.value>=2?e.match=r===NEVER_MATCH$1?NEVER_MATCH$1:SOMETIMES_MATCH$1:e.match=0===n.value?ALWAYS_MATCH$1:SOMETIMES_MATCH$1},group:n,semantic_and:t,semantic_not:t,rule_ref:function(t){var r=asts$7.findRule(e,t.name);return r?t.match=u(r):SOMETIMES_MATCH$1},library_ref:function(){return 0},literal:function(e){var t=0===e.value.length?ALWAYS_MATCH$1:SOMETIMES_MATCH$1;return e.match=t},class:function(e){var t=0===e.parts.length?NEVER_MATCH$1:SOMETIMES_MATCH$1;return e.match=t},any:t});u(e)}inferenceMatchResult$1.ALWAYS_MATCH=ALWAYS_MATCH$1,inferenceMatchResult$1.SOMETIMES_MATCH=SOMETIMES_MATCH$1,inferenceMatchResult$1.NEVER_MATCH=NEVER_MATCH$1;var inferenceMatchResult_1=inferenceMatchResult$1,__spreadArray$3=commonjsGlobal&&commonjsGlobal.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,u=t.length;o<u;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},asts$6=asts_1,op$1=opcodes_1,visitor$9=visitor_1,Intern=intern,_a$1=inferenceMatchResult_1,ALWAYS_MATCH=_a$1.ALWAYS_MATCH,SOMETIMES_MATCH=_a$1.SOMETIMES_MATCH,NEVER_MATCH=_a$1.NEVER_MATCH;function generateBytecode$1(e,t){var r=new Intern,n=new Intern({stringify:JSON.stringify,convert:function(e){return{value:e.parts,inverted:e.inverted,ignoreCase:e.ignoreCase}}}),o=new Intern({stringify:JSON.stringify}),u=new Intern,a=[],i=[];function s(e,t,r){var n={predicate:e,params:t,body:r.code,location:r.codeLocation},o=JSON.stringify(n),u=a.findIndex((function(e){return JSON.stringify(e)===o}));return-1===u?a.push(n)-1:u}function c(e){return i.push(e)-1}function l(e){var t={};return Object.keys(e).forEach((function(r){t[r]=e[r]})),t}function p(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return e.concat.apply(e,t)}function f(e,t,r,n){return e===ALWAYS_MATCH?r:e===NEVER_MATCH?n:t.concat([r.length,n.length],r,n)}function h(e,t,r,n){var o=Object.keys(r).map((function(e){return n-r[e]}));return[op$1.CALL,e,t,o.length].concat(o)}function d(e,t,r){var n=e.match||0;return p([op$1.PUSH_CURR_POS],[op$1.SILENT_FAILS_ON],v(e,{sp:r.sp+1,env:l(r.env),action:null}),[op$1.SILENT_FAILS_OFF],f(t?-n:n,[t?op$1.IF_ERROR:op$1.IF_NOT_ERROR],p([op$1.POP],[t?op$1.POP:op$1.POP_CURR_POS],[op$1.PUSH_UNDEFINED]),p([op$1.POP],[t?op$1.POP_CURR_POS:op$1.POP],[op$1.PUSH_FAILED])))}function g(e,t,r){var n=s(!0,Object.keys(r.env),e);return p([op$1.UPDATE_SAVED_POS],h(n,0,r.env,r.sp),f(e.match||0,[op$1.IF],p([op$1.POP],t?[op$1.PUSH_FAILED]:[op$1.PUSH_UNDEFINED]),p([op$1.POP],t?[op$1.PUSH_UNDEFINED]:[op$1.PUSH_FAILED])))}function A(e){return t=[op$1.WHILE_NOT_ERROR],r=p([op$1.APPEND],e),t.concat([r.length],r);var t,r}function m(e,t,r,n){switch(e.type){case"constant":return{pre:[],post:[],sp:r};case"variable":return e.sp=n+r-t[e.value],{pre:[],post:[],sp:r};case"function":return e.sp=n,{pre:h(s(!0,Object.keys(t),{code:e.value,codeLocation:e.codeLocation}),0,t,r),post:[op$1.NIP],sp:r+1};default:throw function(e){return new Error('Unknown boundary type "'.concat(e.type,'" for the "repeated" node'))}(e)}}function _(e,t){if(null!==t.value){var r="constant"===t.type?[op$1.IF_GE,t.value]:[op$1.IF_GE_DYNAMIC,t.sp||0];return f(SOMETIMES_MATCH,r,[op$1.PUSH_FAILED],e)}return e}var E,v=(E={grammar:function(e){e.rules.forEach(v),e.literals=r.items,e.classes=n.items,e.expectations=o.items,e.importedNames=u.items,e.functions=a,e.locations=i},rule:function(e){e.bytecode=v(e.expression,{sp:-1,env:{},pluck:[],action:null})},named:function(e,t){var r=e.match||0,n=r===NEVER_MATCH?-1:o.add({type:"rule",value:e.name});return p([op$1.SILENT_FAILS_ON],v(e.expression,t),[op$1.SILENT_FAILS_OFF],f(r,[op$1.IF_ERROR],[op$1.FAIL,n],[]))},choice:function(e,t){return function e(t,r){var n=t[0].match||0,o=v(t[0],{sp:r.sp,env:l(r.env),action:null});return n===ALWAYS_MATCH?o:p(o,t.length>1?f(SOMETIMES_MATCH,[op$1.IF_ERROR],p([op$1.POP],e(t.slice(1),r)),[]):[])}(e.alternatives,t)},action:function(e,t){var r=l(t.env),n="sequence"!==e.expression.type||0===e.expression.elements.length,o=v(e.expression,{sp:t.sp+(n?1:0),env:r,action:e}),u=e.expression.match||0,a=n&&u!==NEVER_MATCH?s(!1,Object.keys(r),e):-1;return n?p([op$1.PUSH_CURR_POS],o,f(u,[op$1.IF_NOT_ERROR],p([op$1.LOAD_SAVED_POS,1],h(a,1,r,t.sp+2)),[]),[op$1.NIP]):o},sequence:function(e,t){return p([op$1.PUSH_CURR_POS],function t(r,n){if(r.length>0){var o=e.elements.length-r.length+1;return p(v(r[0],{sp:n.sp,env:n.env,pluck:n.pluck,action:null}),f(r[0].match||0,[op$1.IF_NOT_ERROR],t(r.slice(1),{sp:n.sp+1,env:n.env,pluck:n.pluck,action:n.action}),p(o>1?[op$1.POP_N,o]:[op$1.POP],[op$1.POP_CURR_POS],[op$1.PUSH_FAILED])))}if(n.pluck&&n.pluck.length>0)return p([op$1.PLUCK,e.elements.length+1,n.pluck.length],n.pluck.map((function(e){return n.sp-e})));if(n.action){var u=s(!1,Object.keys(n.env),n.action);return p([op$1.LOAD_SAVED_POS,e.elements.length],h(u,e.elements.length+1,n.env,n.sp))}return p([op$1.WRAP,e.elements.length],[op$1.NIP])}(e.elements,{sp:t.sp+1,env:t.env,pluck:[],action:t.action}))},labeled:function(e,n){var o=n.env,u=e.label,a=n.sp+1;u&&(o=l(n.env),n.env[u]=a),e.pick&&n.pluck.push(a);var i=v(e.expression,{sp:n.sp,env:o,action:null});return u&&e.labelLocation&&t&&"source-and-map"===t.output?p([op$1.SOURCE_MAP_LABEL_PUSH,a,r.add(u),c(e.labelLocation)],i,[op$1.SOURCE_MAP_LABEL_POP,a]):i},text:function(e,t){return p([op$1.PUSH_CURR_POS],v(e.expression,{sp:t.sp+1,env:l(t.env),action:null}),f(e.match||0,[op$1.IF_NOT_ERROR],p([op$1.POP],[op$1.TEXT]),[op$1.NIP]))},simple_and:function(e,t){return d(e.expression,!1,t)},simple_not:function(e,t){return d(e.expression,!0,t)},optional:function(e,t){return p(v(e.expression,{sp:t.sp,env:l(t.env),action:null}),f(-(e.expression.match||0),[op$1.IF_ERROR],p([op$1.POP],[op$1.PUSH_NULL]),[]))},zero_or_more:function(e,t){var r=v(e.expression,{sp:t.sp+1,env:l(t.env),action:null});return p([op$1.PUSH_EMPTY_ARRAY],r,A(r),[op$1.POP])},one_or_more:function(e,t){var r=v(e.expression,{sp:t.sp+1,env:l(t.env),action:null});return p([op$1.PUSH_EMPTY_ARRAY],r,f(e.expression.match||0,[op$1.IF_NOT_ERROR],p(A(r),[op$1.POP]),p([op$1.POP],[op$1.POP],[op$1.PUSH_FAILED])))},repeated:function(e,t){var r=e.min?e.min:e.max,n="constant"!==r.type||r.value>0,o="constant"!==e.max.type&&null!==e.max.value,u=n?2:1,a=e.min?m(e.min,t.env,t.sp,2+("function"===e.max.type?1:0)):{pre:[],post:[],sp:t.sp},i=m(e.max,t.env,a.sp,u),s=v(e.expression,{sp:i.sp+u,env:l(t.env),action:null}),c=null!==e.delimiter?v(e.expression,{sp:i.sp+u+1,env:l(t.env),action:null}):s,h=function(e,t,r,n,o){return e?p([op$1.PUSH_CURR_POS],v(e,{sp:n.sp+o+1,env:l(n.env),action:null}),f(e.match||0,[op$1.IF_NOT_ERROR],p([op$1.POP],r,f(-t,[op$1.IF_ERROR],[op$1.POP,op$1.POP_CURR_POS,op$1.PUSH_FAILED],[op$1.NIP])),[op$1.NIP])):r}(e.delimiter,e.expression.match||0,c,t,u),d=_(h,e.max),g=o?_(s,e.max):s,E=p(n?[op$1.PUSH_CURR_POS]:[],[op$1.PUSH_EMPTY_ARRAY],g,A(d),[op$1.POP]);return p(a.pre,i.pre,n?function(e,t){var r="constant"===t.type?[op$1.IF_LT,t.value]:[op$1.IF_LT_DYNAMIC,t.sp||0];return p(e,f(SOMETIMES_MATCH,r,[op$1.POP,op$1.POP_CURR_POS,op$1.PUSH_FAILED],[op$1.NIP]))}(E,r):E,i.post,a.post)},group:function(e,t){return v(e.expression,{sp:t.sp,env:l(t.env),action:null})},semantic_and:function(e,t){return g(e,!1,t)},semantic_not:function(e,t){return g(e,!0,t)},rule_ref:function(t){return[op$1.RULE,asts$6.indexOfRule(e,t.name)]},library_ref:function(e){return[op$1.LIBRARY_RULE,e.libraryNumber,u.add(e.name)]},literal:function(e){if(e.value.length>0){var t=e.match||0,n=t===SOMETIMES_MATCH||t===ALWAYS_MATCH&&!e.ignoreCase?r.add(e.ignoreCase?e.value.toLowerCase():e.value):-1,u=t!==ALWAYS_MATCH?o.add({type:"literal",value:e.value,ignoreCase:e.ignoreCase}):-1;return f(t,e.ignoreCase?[op$1.MATCH_STRING_IC,n]:[op$1.MATCH_STRING,n],e.ignoreCase?[op$1.ACCEPT_N,e.value.length]:[op$1.ACCEPT_STRING,n],[op$1.FAIL,u])}return[op$1.PUSH_EMPTY_STRING]},class:function(e){var t=e.match||0,r=t===SOMETIMES_MATCH?n.add(e):-1,u=t!==ALWAYS_MATCH?o.add({type:"class",value:e.parts,inverted:e.inverted,ignoreCase:e.ignoreCase}):-1;return f(t,[op$1.MATCH_CHAR_CLASS,r],[op$1.ACCEPT_N,1],[op$1.FAIL,u])},any:function(e){var t=e.match||0,r=t!==ALWAYS_MATCH?o.add({type:"any"}):-1;return f(t,[op$1.MATCH_ANY],[op$1.ACCEPT_N,1],[op$1.FAIL,r])}},t&&"source-and-map"===t.output&&Object.keys(E).forEach((function(e){var t=E[e];E[e]=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var o=t.apply(void 0,__spreadArray$3([e],r,!1));return void 0!==o&&e.location?p([op$1.SOURCE_MAP_PUSH,c(e.location)],o,[op$1.SOURCE_MAP_POP]):o}})),visitor$9.build(E));v(e)}var generateBytecode_1=generateBytecode$1,sourceMap={},sourceMapGenerator={},base64Vlq={},base64$3={};const intToCharMap="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("");base64$3.encode=function(e){if(0<=e&&e<intToCharMap.length)return intToCharMap[e];throw new TypeError("Must be between 0 and 63: "+e)};const base64$2=base64$3,VLQ_BASE_SHIFT=5,VLQ_BASE=1<<VLQ_BASE_SHIFT,VLQ_BASE_MASK=VLQ_BASE-1,VLQ_CONTINUATION_BIT=VLQ_BASE;function toVLQSigned(e){return e<0?1+(-e<<1):0+(e<<1)}base64Vlq.encode=function(e){let t,r="",n=toVLQSigned(e);do{t=n&VLQ_BASE_MASK,n>>>=VLQ_BASE_SHIFT,n>0&&(t|=VLQ_CONTINUATION_BIT),r+=base64$2.encode(t)}while(n>0);return r};var util$3={};function getArg(e,t,r){if(t in e)return e[t];if(3===arguments.length)return r;throw new Error('"'+t+'" is a required argument.')}util$3.getArg=getArg;const supportsNullProto=!("__proto__"in Object.create(null));function identity(e){return e}function toSetString(e){return isProtoString(e)?"$"+e:e}function fromSetString(e){return isProtoString(e)?e.slice(1):e}function isProtoString(e){if(!e)return!1;const t=e.length;if(t<9)return!1;if(95!==e.charCodeAt(t-1)||95!==e.charCodeAt(t-2)||111!==e.charCodeAt(t-3)||116!==e.charCodeAt(t-4)||111!==e.charCodeAt(t-5)||114!==e.charCodeAt(t-6)||112!==e.charCodeAt(t-7)||95!==e.charCodeAt(t-8)||95!==e.charCodeAt(t-9))return!1;for(let r=t-10;r>=0;r--)if(36!==e.charCodeAt(r))return!1;return!0}function strcmp(e,t){return e===t?0:null===e?1:null===t?-1:e>t?1:-1}function compareByGeneratedPositionsInflated(e,t){let r=e.generatedLine-t.generatedLine;return 0!==r?r:(r=e.generatedColumn-t.generatedColumn,0!==r?r:(r=strcmp(e.source,t.source),0!==r?r:(r=e.originalLine-t.originalLine,0!==r?r:(r=e.originalColumn-t.originalColumn,0!==r?r:strcmp(e.name,t.name)))))}util$3.toSetString=supportsNullProto?identity:toSetString,util$3.fromSetString=supportsNullProto?identity:fromSetString,util$3.compareByGeneratedPositionsInflated=compareByGeneratedPositionsInflated;const PROTOCOL="http:",PROTOCOL_AND_HOST=`${PROTOCOL}//host`;function createSafeHandler(e){return t=>{const r=getURLType(t),n=buildSafeBase(t),o=new URL(t,n);e(o);const u=o.toString();return"absolute"===r?u:"scheme-relative"===r?u.slice(PROTOCOL.length):"path-absolute"===r?u.slice(PROTOCOL_AND_HOST.length):computeRelativeURL(n,u)}}function withBase(e,t){return new URL(e,t).toString()}function buildUniqueSegment(e,t){let r=0;for(;;){const n=e+r++;if(-1===t.indexOf(n))return n}}function buildSafeBase(e){const t=e.split("..").length-1,r=buildUniqueSegment("p",e);let n=`${PROTOCOL_AND_HOST}/`;for(let e=0;e<t;e++)n+=`${r}/`;return n}const ABSOLUTE_SCHEME=/^[A-Za-z0-9\+\-\.]+:/;function getURLType(e){return"/"===e[0]?"/"===e[1]?"scheme-relative":"path-absolute":ABSOLUTE_SCHEME.test(e)?"absolute":"path-relative"}function computeRelativeURL(e,t){"string"==typeof e&&(e=new URL(e)),"string"==typeof t&&(t=new URL(t));const r=t.pathname.split("/"),n=e.pathname.split("/");for(n.length>0&&!n[n.length-1]&&n.pop();r.length>0&&n.length>0&&r[0]===n[0];)r.shift(),n.shift();return n.map((()=>"..")).concat(r).join("/")+t.search+t.hash}const ensureDirectory=createSafeHandler((e=>{e.pathname=e.pathname.replace(/\/?$/,"/")})),normalize=createSafeHandler((e=>{}));function join(e,t){const r=getURLType(t),n=getURLType(e);if(e=ensureDirectory(e),"absolute"===r)return withBase(t,void 0);if("absolute"===n)return withBase(t,e);if("scheme-relative"===r)return normalize(t);if("scheme-relative"===n)return withBase(t,withBase(e,PROTOCOL_AND_HOST)).slice(PROTOCOL.length);if("path-absolute"===r)return normalize(t);if("path-absolute"===n)return withBase(t,withBase(e,PROTOCOL_AND_HOST)).slice(PROTOCOL_AND_HOST.length);const o=buildSafeBase(t+e);return computeRelativeURL(o,withBase(t,withBase(e,o)))}function relative(e,t){const r=relativeIfPossible(e,t);return"string"==typeof r?r:normalize(t)}function relativeIfPossible(e,t){if(getURLType(e)!==getURLType(t))return null;const r=buildSafeBase(e+t),n=new URL(e,r),o=new URL(t,r);try{new URL("",o.toString())}catch(e){return null}return o.protocol!==n.protocol||o.user!==n.user||o.password!==n.password||o.hostname!==n.hostname||o.port!==n.port?null:computeRelativeURL(n,o)}util$3.normalize=normalize,util$3.join=join,util$3.relative=relative;var arraySet={};let ArraySet$1=class e{constructor(){this._array=[],this._set=new Map}static fromArray(t,r){const n=new e;for(let e=0,o=t.length;e<o;e++)n.add(t[e],r);return n}size(){return this._set.size}add(e,t){const r=this.has(e),n=this._array.length;r&&!t||this._array.push(e),r||this._set.set(e,n)}has(e){return this._set.has(e)}indexOf(e){const t=this._set.get(e);if(t>=0)return t;throw new Error('"'+e+'" is not in the set.')}at(e){if(e>=0&&e<this._array.length)return this._array[e];throw new Error("No element indexed by "+e)}toArray(){return this._array.slice()}};arraySet.ArraySet=ArraySet$1;var mappingList={};const util$2=util$3;function generatedPositionAfter(e,t){const r=e.generatedLine,n=t.generatedLine,o=e.generatedColumn,u=t.generatedColumn;return n>r||n==r&&u>=o||util$2.compareByGeneratedPositionsInflated(e,t)<=0}let MappingList$1=class{constructor(){this._array=[],this._sorted=!0,this._last={generatedLine:-1,generatedColumn:0}}unsortedForEach(e,t){this._array.forEach(e,t)}add(e){generatedPositionAfter(this._last,e)?(this._last=e,this._array.push(e)):(this._sorted=!1,this._array.push(e))}toArray(){return this._sorted||(this._array.sort(util$2.compareByGeneratedPositionsInflated),this._sorted=!0),this._array}};mappingList.MappingList=MappingList$1;const base64VLQ=base64Vlq,util$1=util$3,ArraySet=arraySet.ArraySet,MappingList=mappingList.MappingList;let SourceMapGenerator$1=class e{constructor(e){e||(e={}),this._file=util$1.getArg(e,"file",null),this._sourceRoot=util$1.getArg(e,"sourceRoot",null),this._skipValidation=util$1.getArg(e,"skipValidation",!1),this._sources=new ArraySet,this._names=new ArraySet,this._mappings=new MappingList,this._sourcesContents=null}static fromSourceMap(t){const r=t.sourceRoot,n=new e({file:t.file,sourceRoot:r});return t.eachMapping((function(e){const t={generated:{line:e.generatedLine,column:e.generatedColumn}};null!=e.source&&(t.source=e.source,null!=r&&(t.source=util$1.relative(r,t.source)),t.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(t.name=e.name)),n.addMapping(t)})),t.sources.forEach((function(e){let o=e;null!=r&&(o=util$1.relative(r,e)),n._sources.has(o)||n._sources.add(o);const u=t.sourceContentFor(e);null!=u&&n.setSourceContent(e,u)})),n}addMapping(e){const t=util$1.getArg(e,"generated"),r=util$1.getArg(e,"original",null);let n=util$1.getArg(e,"source",null),o=util$1.getArg(e,"name",null);this._skipValidation||this._validateMapping(t,r,n,o),null!=n&&(n=String(n),this._sources.has(n)||this._sources.add(n)),null!=o&&(o=String(o),this._names.has(o)||this._names.add(o)),this._mappings.add({generatedLine:t.line,generatedColumn:t.column,originalLine:r&&r.line,originalColumn:r&&r.column,source:n,name:o})}setSourceContent(e,t){let r=e;null!=this._sourceRoot&&(r=util$1.relative(this._sourceRoot,r)),null!=t?(this._sourcesContents||(this._sourcesContents=Object.create(null)),this._sourcesContents[util$1.toSetString(r)]=t):this._sourcesContents&&(delete this._sourcesContents[util$1.toSetString(r)],0===Object.keys(this._sourcesContents).length&&(this._sourcesContents=null))}applySourceMap(e,t,r){let n=t;if(null==t){if(null==e.file)throw new Error('SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.');n=e.file}const o=this._sourceRoot;null!=o&&(n=util$1.relative(o,n));const u=this._mappings.toArray().length>0?new ArraySet:this._sources,a=new ArraySet;this._mappings.unsortedForEach((function(t){if(t.source===n&&null!=t.originalLine){const n=e.originalPositionFor({line:t.originalLine,column:t.originalColumn});null!=n.source&&(t.source=n.source,null!=r&&(t.source=util$1.join(r,t.source)),null!=o&&(t.source=util$1.relative(o,t.source)),t.originalLine=n.line,t.originalColumn=n.column,null!=n.name&&(t.name=n.name))}const i=t.source;null==i||u.has(i)||u.add(i);const s=t.name;null==s||a.has(s)||a.add(s)}),this),this._sources=u,this._names=a,e.sources.forEach((function(t){const n=e.sourceContentFor(t);null!=n&&(null!=r&&(t=util$1.join(r,t)),null!=o&&(t=util$1.relative(o,t)),this.setSourceContent(t,n))}),this)}_validateMapping(e,t,r,n){if(t&&"number"!=typeof t.line&&"number"!=typeof t.column)throw new Error("original.line and original.column are not numbers -- you probably meant to omit the original mapping entirely and only map the generated position. If so, pass null for the original mapping instead of an object with empty or null values.");if(e&&"line"in e&&"column"in e&&e.line>0&&e.column>=0&&!t&&!r&&!n);else if(!(e&&"line"in e&&"column"in e&&t&&"line"in t&&"column"in t&&e.line>0&&e.column>=0&&t.line>0&&t.column>=0&&r))throw new Error("Invalid mapping: "+JSON.stringify({generated:e,source:r,original:t,name:n}))}_serializeMappings(){let e,t,r,n,o=0,u=1,a=0,i=0,s=0,c=0,l="";const p=this._mappings.toArray();for(let f=0,h=p.length;f<h;f++){if(t=p[f],e="",t.generatedLine!==u)for(o=0;t.generatedLine!==u;)e+=";",u++;else if(f>0){if(!util$1.compareByGeneratedPositionsInflated(t,p[f-1]))continue;e+=","}e+=base64VLQ.encode(t.generatedColumn-o),o=t.generatedColumn,null!=t.source&&(n=this._sources.indexOf(t.source),e+=base64VLQ.encode(n-c),c=n,e+=base64VLQ.encode(t.originalLine-1-i),i=t.originalLine-1,e+=base64VLQ.encode(t.originalColumn-a),a=t.originalColumn,null!=t.name&&(r=this._names.indexOf(t.name),e+=base64VLQ.encode(r-s),s=r)),l+=e}return l}_generateSourcesContent(e,t){return e.map((function(e){if(!this._sourcesContents)return null;null!=t&&(e=util$1.relative(t,e));const r=util$1.toSetString(e);return Object.prototype.hasOwnProperty.call(this._sourcesContents,r)?this._sourcesContents[r]:null}),this)}toJSON(){const e={version:this._version,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return null!=this._file&&(e.file=this._file),null!=this._sourceRoot&&(e.sourceRoot=this._sourceRoot),this._sourcesContents&&(e.sourcesContent=this._generateSourcesContent(e.sources,e.sourceRoot)),e}toString(){return JSON.stringify(this.toJSON())}};SourceMapGenerator$1.prototype._version=3,sourceMapGenerator.SourceMapGenerator=SourceMapGenerator$1;var sourceNode={};const SourceMapGenerator=sourceMapGenerator.SourceMapGenerator,util=util$3,REGEX_NEWLINE=/(\r?\n)/,NEWLINE_CODE=10,isSourceNode="$$$isSourceNode$$$";let SourceNode$2=class e{constructor(e,t,r,n,o){this.children=[],this.sourceContents={},this.line=null==e?null:e,this.column=null==t?null:t,this.source=null==r?null:r,this.name=null==o?null:o,this[isSourceNode]=!0,null!=n&&this.add(n)}static fromStringWithSourceMap(t,r,n){const o=new e,u=t.split(REGEX_NEWLINE);let a=0;const i=function(){return e()+(e()||"");function e(){return a<u.length?u[a++]:void 0}};let s,c=1,l=0,p=null;return r.eachMapping((function(e){if(null!==p){if(!(c<e.generatedLine)){s=u[a]||"";const t=s.substr(0,e.generatedColumn-l);return u[a]=s.substr(e.generatedColumn-l),l=e.generatedColumn,f(p,t),void(p=e)}f(p,i()),c++,l=0}for(;c<e.generatedLine;)o.add(i()),c++;l<e.generatedColumn&&(s=u[a]||"",o.add(s.substr(0,e.generatedColumn)),u[a]=s.substr(e.generatedColumn),l=e.generatedColumn),p=e}),this),a<u.length&&(p&&f(p,i()),o.add(u.splice(a).join(""))),r.sources.forEach((function(e){const t=r.sourceContentFor(e);null!=t&&(null!=n&&(e=util.join(n,e)),o.setSourceContent(e,t))})),o;function f(t,r){if(null===t||void 0===t.source)o.add(r);else{const u=n?util.join(n,t.source):t.source;o.add(new e(t.originalLine,t.originalColumn,u,r,t.name))}}}add(e){if(Array.isArray(e))e.forEach((function(e){this.add(e)}),this);else{if(!e[isSourceNode]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);e&&this.children.push(e)}return this}prepend(e){if(Array.isArray(e))for(let t=e.length-1;t>=0;t--)this.prepend(e[t]);else{if(!e[isSourceNode]&&"string"!=typeof e)throw new TypeError("Expected a SourceNode, string, or an array of SourceNodes and strings. Got "+e);this.children.unshift(e)}return this}walk(e){let t;for(let r=0,n=this.children.length;r<n;r++)t=this.children[r],t[isSourceNode]?t.walk(e):""!==t&&e(t,{source:this.source,line:this.line,column:this.column,name:this.name})}join(e){let t,r;const n=this.children.length;if(n>0){for(t=[],r=0;r<n-1;r++)t.push(this.children[r]),t.push(e);t.push(this.children[r]),this.children=t}return this}replaceRight(e,t){const r=this.children[this.children.length-1];return r[isSourceNode]?r.replaceRight(e,t):"string"==typeof r?this.children[this.children.length-1]=r.replace(e,t):this.children.push("".replace(e,t)),this}setSourceContent(e,t){this.sourceContents[util.toSetString(e)]=t}walkSourceContents(e){for(let t=0,r=this.children.length;t<r;t++)this.children[t][isSourceNode]&&this.children[t].walkSourceContents(e);const t=Object.keys(this.sourceContents);for(let r=0,n=t.length;r<n;r++)e(util.fromSetString(t[r]),this.sourceContents[t[r]])}toString(){let e="";return this.walk((function(t){e+=t})),e}toStringWithSourceMap(e){const t={code:"",line:1,column:0},r=new SourceMapGenerator(e);let n=!1,o=null,u=null,a=null,i=null;return this.walk((function(e,s){t.code+=e,null!==s.source&&null!==s.line&&null!==s.column?(o===s.source&&u===s.line&&a===s.column&&i===s.name||r.addMapping({source:s.source,original:{line:s.line,column:s.column},generated:{line:t.line,column:t.column},name:s.name}),o=s.source,u=s.line,a=s.column,i=s.name,n=!0):n&&(r.addMapping({generated:{line:t.line,column:t.column}}),o=null,n=!1);for(let u=0,a=e.length;u<a;u++)e.charCodeAt(u)===NEWLINE_CODE?(t.line++,t.column=0,u+1===a?(o=null,n=!1):n&&r.addMapping({source:s.source,original:{line:s.line,column:s.column},generated:{line:t.line,column:t.column},name:s.name})):t.column++})),this.walkSourceContents((function(e,t){r.setSourceContent(e,t)})),{code:t.code,map:r}}};sourceNode.SourceNode=SourceNode$2,sourceMap.SourceMapGenerator=sourceMapGenerator.SourceMapGenerator,sourceMap.SourceNode=sourceNode.SourceNode;var SourceNode$1=sourceMap.SourceNode,GrammarLocation$2=grammarLocation,Stack$1=function(){function e(e,t,r,n){this.sp=-1,this.maxSp=-1,this.varName=t,this.ruleName=e,this.type=r,this.bytecode=n,this.labels={},this.sourceMapStack=[]}return e.prototype.name=function(e){if(e<0)throw new RangeError("Rule '".concat(this.ruleName,"': The variable stack underflow: attempt to use a variable '").concat(this.varName,"<x>' at an index ").concat(e,".\nBytecode: ").concat(this.bytecode));return this.varName+e},e.sourceNode=function(e,t,r){var n=GrammarLocation$2.offsetStart(e);return new SourceNode$1(n.line,n.column?n.column-1:null,String(e.source),t,r)},e.prototype.push=function(t){++this.sp>this.maxSp&&(this.maxSp=this.sp);var r=this.labels[this.sp],n=[this.name(this.sp)," = ",t,";"];if(r){if(this.sourceMapStack.length){var o=e.sourceNode(r.location,n.splice(0,2),r.label),u=this.sourceMapPopInternal(),a=u.parts,i=u.location,s=i.start.offset<r.location.end.offset?{start:r.location.end,end:i.end,source:i.source}:i,c=e.sourceNode(s,n.concat("\n"));return this.sourceMapStack.push([a,a.length+1,i]),new SourceNode$1(null,null,r.location.source,[o,c])}return e.sourceNode(r.location,n.concat("\n"))}return n.join("")},e.prototype.pop=function(e){var t=this;return void 0!==e?(this.sp-=e,Array.from({length:e},(function(e,r){return t.name(t.sp+1+r)}))):this.name(this.sp--)},e.prototype.top=function(){return this.name(this.sp)},e.prototype.index=function(e){if(e<0)throw new RangeError("Rule '".concat(this.ruleName,"': The variable stack overflow: attempt to get a variable at a negative index ").concat(e,".\nBytecode: ").concat(this.bytecode));return this.name(this.sp-e)},e.prototype.result=function(){if(this.maxSp<0)throw new RangeError("Rule '".concat(this.ruleName,"': The variable stack is empty, can't get the result.\nBytecode: ").concat(this.bytecode));return this.name(0)},e.prototype.defines=function(){var e=this;return this.maxSp<0?"":this.type+" "+Array.from({length:this.maxSp+1},(function(t,r){return e.name(r)})).join(", ")+";"},e.prototype.checkedIf=function(e,t,r){var n=this.sp,o=t();if(!r)return[o];var u=this.sp;this.sp=n;var a=r();if(u!==this.sp)throw new Error("Rule '"+this.ruleName+"', position "+e+": Branches of a condition can't move the stack pointer differently (before: "+n+", after then: "+u+", after else: "+this.sp+"). Bytecode: "+this.bytecode);return[o,a]},e.prototype.checkedLoop=function(e,t){var r=this.sp,n=t();if(r!==this.sp)throw new Error("Rule '"+this.ruleName+"', position "+e+": Body of a loop can't move the stack pointer (before: "+r+", after: "+this.sp+"). Bytecode: "+this.bytecode);return n},e.prototype.sourceMapPush=function(e,t){if(this.sourceMapStack.length){var r=this.sourceMapStack[this.sourceMapStack.length-1];r[2].start.offset===t.start.offset&&r[2].end.offset>t.end.offset&&(r[2]={start:t.end,end:r[2].end,source:r[2].source})}this.sourceMapStack.push([e,e.length,t])},e.prototype.sourceMapPopInternal=function(){var e=this.sourceMapStack.pop();if(!e)throw new RangeError("Rule '".concat(this.ruleName,"': Attempting to pop an empty source map stack.\nBytecode: ").concat(this.bytecode));var t=e[0],r=e[1],n=e[2],o=t.splice(r).map((function(e){return e instanceof SourceNode$1?e:e+"\n"}));if(o.length){var u=GrammarLocation$2.offsetStart(n);t.push(new SourceNode$1(u.line,u.column-1,String(n.source),o))}return{parts:t,location:n}},e.prototype.sourceMapPop=function(e){var t=this.sourceMapPopInternal().location;if(this.sourceMapStack.length&&t.end.offset<this.sourceMapStack[this.sourceMapStack.length-1][2].end.offset){var r=this.sourceMapPopInternal(),n=r.parts,o=r.location,u=o.start.offset<t.end.offset?{start:t.end,end:o.end,source:o.source}:o;this.sourceMapStack.push([n,n.length+(e||0),u])}},e}(),stack=Stack$1,version="4.0.2",utils={};function hex(e){return e.charCodeAt(0).toString(16).toUpperCase()}function stringEscape$1(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\v/g,"\\v").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+hex(e)})).replace(/[\x10-\x1F\x7F-\xFF]/g,(function(e){return"\\x"+hex(e)})).replace(/[\u0100-\u0FFF]/g,(function(e){return"\\u0"+hex(e)})).replace(/[\u1000-\uFFFF]/g,(function(e){return"\\u"+hex(e)}))}function regexpClassEscape$1(e){return e.replace(/\\/g,"\\\\").replace(/\//g,"\\/").replace(/]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\v/g,"\\v").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+hex(e)})).replace(/[\x10-\x1F\x7F-\xFF]/g,(function(e){return"\\x"+hex(e)})).replace(/[\u0100-\u0FFF]/g,(function(e){return"\\u0"+hex(e)})).replace(/[\u1000-\uFFFF]/g,(function(e){return"\\u"+hex(e)}))}function base64$1(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=e.length%3,n=e.length-r,o="",u=0;u<n;u+=3)o+=t[e[u]>>2],o+=t[(3&e[u])<<4|e[u+1]>>4],o+=t[(15&e[u+1])<<2|e[u+2]>>6],o+=t[63&e[u+2]];return 1===r?(o+=t[e[n]>>2],o+=t[(3&e[n])<<4],o+="=="):2===r&&(o+=t[e[n]>>2],o+=t[(3&e[n])<<4|e[n+1]>>4],o+=t[(15&e[n+1])<<2],o+="="),o}utils.hex=hex,utils.stringEscape=stringEscape$1,utils.regexpClassEscape=regexpClassEscape$1,utils.base64=base64$1;var OPS_TO_PREFIXED_TYPES={$:"text","&":"simple_and","!":"simple_not"},OPS_TO_SUFFIXED_TYPES={"?":"optional","*":"zero_or_more","+":"one_or_more"},OPS_TO_SEMANTIC_PREDICATE_TYPES={"&":"semantic_and","!":"semantic_not"};function peg$subclass(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}function peg$SyntaxError(e,t,r,n){var o=Error.call(this,e);return Object.setPrototypeOf&&Object.setPrototypeOf(o,peg$SyntaxError.prototype),o.expected=t,o.found=r,o.location=n,o.name="SyntaxError",o}function peg$padEnd(e,t,r){return r=r||" ",e.length>t?e:(t-=e.length,e+(r+=r.repeat(t)).slice(0,t))}function peg$parse(e,t){var r,n={},o=(t=void 0!==t?t:{}).grammarSource,u={Grammar:Ir,ImportsAndSource:function(){var t,r,o;return t=Cr,r=function(){var t,r;return t=Cr,r=Cr,Mr(),r=e.substring(r,Cr),yr=t,Ct(r)}(),o=function(){var t,r,o,u;for(t=Cr,r=Cr,o=[],e.length>Cr?(u=e.charAt(Cr),Cr++):(u=n,0===br&&wr(se));u!==n;)o.push(u),e.length>Cr?(u=e.charAt(Cr),Cr++):(u=n,0===br&&wr(se));return r=e.substring(r,Cr),yr=t,vt(r)}(),yr=t,Et(r,o)}},a=Ir,i="import",s=";",c=",",l="*",p="as",f="{",h="}",d="from",g="=",A="/",m="@",_=":",E="|",v="..",C="(",y=")",$=".",S="\n",F="\r\n",b="/*",P="*/",x="//",D="\\",R="i",B='"',O="'",L="[",w="^",I="]",M="-",T="0",N="b",k="f",H="n",U="r",j="t",G="v",V="x",Y="u",z=/^[!$&]/,W=/^[*-+?]/,J=/^[!&]/,q=/^[\t\v-\f \xA0\u1680\u2000-\u200A\u202F\u205F\u3000\uFEFF]/,Q=/^[\n\r\u2028\u2029]/,X=/^[\r\u2028-\u2029]/,K=/^[A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376-\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E-\u066F\u0671-\u06D3\u06D5\u06E5-\u06E6\u06EE-\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4-\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F-\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC-\u09DD\u09DF-\u09E1\u09F0-\u09F1\u0A05-\u0A0A\u0A0F-\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32-\u0A33\u0A35-\u0A36\u0A38-\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2-\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0-\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F-\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32-\u0B33\u0B35-\u0B39\u0B3D\u0B5C-\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99-\u0B9A\u0B9C\u0B9E-\u0B9F\u0BA3-\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60-\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0-\u0CE1\u0CF1-\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32-\u0E33\u0E40-\u0E46\u0E81-\u0E82\u0E84\u0E87-\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA-\u0EAB\u0EAD-\u0EB0\u0EB2-\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065-\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE-\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5-\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5-\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40-\uFB41\uFB43-\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,Z=/^[$0-9_\u0300-\u036F\u0483-\u0487\u0591-\u05BD\u05BF\u05C1-\u05C2\u05C4-\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7-\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7-\u09C8\u09CB-\u09CD\u09D7\u09E2-\u09E3\u09E6-\u09EF\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47-\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47-\u0B48\u0B4B-\u0B4D\u0B56-\u0B57\u0B62-\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55-\u0C56\u0C62-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5-\u0CD6\u0CE2-\u0CE3\u0CE6-\u0CEF\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62-\u0D63\u0D66-\u0D6F\u0D82-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2-\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EB9\u0EBB-\u0EBC\u0EC8-\u0ECD\u0ED0-\u0ED9\u0F18-\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F3F\u0F71-\u0F84\u0F86-\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19D9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8-\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u200C-\u200D\u203F-\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099-\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E-\uA69F\uA6F0-\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880-\uA881\uA8B4-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F1\uA900-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C-\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7-\uAAB8\uAABE-\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5-\uAAF6\uABE3-\uABEA\uABEC-\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33-\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F]/,ee=/^[\n\r"\\\u2028-\u2029]/,te=/^[\n\r'\\\u2028-\u2029]/,re=/^[\n\r\\-\]\u2028-\u2029]/,ne=/^["'\\]/,oe=/^[0-9ux]/,ue=/^[0-9]/,ae=/^[0-9a-f]/i,ie=/^[{}]/,se={type:"any"},ce=Dr("import",!1),le=Dr(";",!1),pe=Dr(",",!1),fe=Dr("*",!1),he=Dr("as",!1),de=Dr("{",!1),ge=Dr("}",!1),Ae=Dr("from",!1),me=Dr("=",!1),_e=Dr("/",!1),Ee=Dr("@",!1),ve=Dr(":",!1),Ce=Rr(["!","$","&"],!1,!1),ye=Rr([["*","+"],"?"],!1,!1),$e=Dr("|",!1),Se=Dr("..",!1),Fe=Dr("(",!1),be=Dr(")",!1),Pe=Dr(".",!1),xe=Rr(["!","&"],!1,!1),De=Br("whitespace"),Re=Rr(["\t",["\v","\f"]," "," ","",[" ",""],"",""," ","\ufeff"],!1,!1),Be=Rr(["\n","\r","\u2028","\u2029"],!1,!1),Oe=Br("end of line"),Le=Dr("\n",!1),we=Dr("\r\n",!1),Ie=Rr(["\r",["\u2028","\u2029"]],!1,!1),Me=Br("comment"),Te=Dr("/*",!1),Ne=Dr("*/",!1),ke=Dr("//",!1),He=Br("identifier"),Ue=Rr([["A","Z"],"_",["a","z"],"ª","µ","º",["À","Ö"],["Ø","ö"],["ø","ˁ"],["ˆ","ˑ"],["ˠ","ˤ"],"ˬ","ˮ",["Ͱ","ʹ"],["Ͷ","ͷ"],["ͺ","ͽ"],"Ϳ","Ά",["Έ","Ί"],"Ό",["Ύ","Ρ"],["Σ","ϵ"],["Ϸ","ҁ"],["Ҋ","ԯ"],["Ա","Ֆ"],"ՙ",["ա","և"],["א","ת"],["װ","ײ"],["ؠ","ي"],["ٮ","ٯ"],["ٱ","ۓ"],"ە",["ۥ","ۦ"],["ۮ","ۯ"],["ۺ","ۼ"],"ۿ","ܐ",["ܒ","ܯ"],["ݍ","ޥ"],"ޱ",["ߊ","ߪ"],["ߴ","ߵ"],"ߺ",["ࠀ","ࠕ"],"ࠚ","ࠤ","ࠨ",["ࡀ","ࡘ"],["ࢠ","ࢴ"],["ऄ","ह"],"ऽ","ॐ",["क़","ॡ"],["ॱ","ঀ"],["অ","ঌ"],["এ","ঐ"],["ও","ন"],["প","র"],"ল",["শ","হ"],"ঽ","ৎ",["ড়","ঢ়"],["য়","ৡ"],["ৰ","ৱ"],["ਅ","ਊ"],["ਏ","ਐ"],["ਓ","ਨ"],["ਪ","ਰ"],["ਲ","ਲ਼"],["ਵ","ਸ਼"],["ਸ","ਹ"],["ਖ਼","ੜ"],"ਫ਼",["ੲ","ੴ"],["અ","ઍ"],["એ","ઑ"],["ઓ","ન"],["પ","ર"],["લ","ળ"],["વ","હ"],"ઽ","ૐ",["ૠ","ૡ"],"ૹ",["ଅ","ଌ"],["ଏ","ଐ"],["ଓ","ନ"],["ପ","ର"],["ଲ","ଳ"],["ଵ","ହ"],"ଽ",["ଡ଼","ଢ଼"],["ୟ","ୡ"],"ୱ","ஃ",["அ","ஊ"],["எ","ஐ"],["ஒ","க"],["ங","ச"],"ஜ",["ஞ","ட"],["ண","த"],["ந","ப"],["ம","ஹ"],"ௐ",["అ","ఌ"],["ఎ","ఐ"],["ఒ","న"],["ప","హ"],"ఽ",["ౘ","ౚ"],["ౠ","ౡ"],["ಅ","ಌ"],["ಎ","ಐ"],["ಒ","ನ"],["ಪ","ಳ"],["ವ","ಹ"],"ಽ","ೞ",["ೠ","ೡ"],["ೱ","ೲ"],["അ","ഌ"],["എ","ഐ"],["ഒ","ഺ"],"ഽ","ൎ",["ൟ","ൡ"],["ൺ","ൿ"],["අ","ඖ"],["ක","න"],["ඳ","ර"],"ල",["ව","ෆ"],["ก","ะ"],["า","ำ"],["เ","ๆ"],["ກ","ຂ"],"ຄ",["ງ","ຈ"],"ຊ","ຍ",["ດ","ທ"],["ນ","ຟ"],["ມ","ຣ"],"ລ","ວ",["ສ","ຫ"],["ອ","ະ"],["າ","ຳ"],"ຽ",["ເ","ໄ"],"ໆ",["ໜ","ໟ"],"ༀ",["ཀ","ཇ"],["ཉ","ཬ"],["ྈ","ྌ"],["က","ဪ"],"ဿ",["ၐ","ၕ"],["ၚ","ၝ"],"ၡ",["ၥ","ၦ"],["ၮ","ၰ"],["ၵ","ႁ"],"ႎ",["Ⴀ","Ⴥ"],"Ⴧ","Ⴭ",["ა","ჺ"],["ჼ","ቈ"],["ቊ","ቍ"],["ቐ","ቖ"],"ቘ",["ቚ","ቝ"],["በ","ኈ"],["ኊ","ኍ"],["ነ","ኰ"],["ኲ","ኵ"],["ኸ","ኾ"],"ዀ",["ዂ","ዅ"],["ወ","ዖ"],["ዘ","ጐ"],["ጒ","ጕ"],["ጘ","ፚ"],["ᎀ","ᎏ"],["","Ᏽ"],["ᏸ","ᏽ"],["ᐁ","ᙬ"],["ᙯ","ᙿ"],["ᚁ","ᚚ"],["ᚠ","ᛪ"],["ᛮ","ᛸ"],["ᜀ","ᜌ"],["ᜎ","ᜑ"],["ᜠ","ᜱ"],["ᝀ","ᝑ"],["ᝠ","ᝬ"],["ᝮ","ᝰ"],["ក","ឳ"],"ៗ","ៜ",["ᠠ","ᡷ"],["ᢀ","ᢨ"],"ᢪ",["ᢰ","ᣵ"],["ᤀ","ᤞ"],["ᥐ","ᥭ"],["ᥰ","ᥴ"],["ᦀ","ᦫ"],["ᦰ","ᧉ"],["ᨀ","ᨖ"],["ᨠ","ᩔ"],"ᪧ",["ᬅ","ᬳ"],["ᭅ","ᭋ"],["ᮃ","ᮠ"],["ᮮ","ᮯ"],["ᮺ","ᯥ"],["ᰀ","ᰣ"],["ᱍ","ᱏ"],["ᱚ","ᱽ"],["ᳩ","ᳬ"],["ᳮ","ᳱ"],["ᳵ","ᳶ"],["ᴀ","ᶿ"],["Ḁ","ἕ"],["Ἐ","Ἕ"],["ἠ","ὅ"],["Ὀ","Ὅ"],["ὐ","ὗ"],"Ὑ","Ὓ","Ὕ",["Ὗ","ώ"],["ᾀ","ᾴ"],["ᾶ","ᾼ"],"",["ῂ","ῄ"],["ῆ","ῌ"],["ῐ","ΐ"],["ῖ","Ί"],["ῠ","Ῥ"],["ῲ","ῴ"],["ῶ","ῼ"],"ⁱ","ⁿ",["ₐ","ₜ"],"","ℇ",["",""],"",["",""],"","Ω","",["",""],["",""],["ℼ","ℿ"],["",""],"ⅎ",["","ↈ"],["Ⰰ","Ⱞ"],["ⰰ","ⱞ"],["Ⱡ","ⳤ"],["Ⳬ","ⳮ"],["Ⳳ","ⳳ"],["ⴀ","ⴥ"],"ⴧ","ⴭ",["ⴰ","ⵧ"],"ⵯ",["ⶀ","ⶖ"],["ⶠ","ⶦ"],["ⶨ","ⶮ"],["ⶰ","ⶶ"],["ⶸ","ⶾ"],["ⷀ","ⷆ"],["ⷈ","ⷎ"],["ⷐ","ⷖ"],["ⷘ","ⷞ"],"ⸯ",["々",""],["〡","〩"],["〱","〵"],["〸","〼"],["ぁ","ゖ"],["ゝ","ゟ"],["ァ","ヺ"],["ー","ヿ"],["ㄅ","ㄭ"],["ㄱ","ㆎ"],["ㆠ","ㆺ"],["ㇰ","ㇿ"],["㐀","䶵"],["一","鿕"],["ꀀ","ꒌ"],["",""],["ꔀ","ꘌ"],["ꘐ","ꘟ"],["ꘪ","ꘫ"],["Ꙁ","ꙮ"],["ꙿ","ꚝ"],["ꚠ",""],["ꜗ","ꜟ"],["Ꜣ","ꞈ"],["Ꞌ","Ɬ"],["Ʞ","ꞷ"],["ꟷ","ꠁ"],["ꠃ","ꠅ"],["ꠇ","ꠊ"],["ꠌ","ꠢ"],["ꡀ","ꡳ"],["ꢂ","ꢳ"],["ꣲ","ꣷ"],"ꣻ","ꣽ",["ꤊ","ꤥ"],["ꤰ","ꥆ"],["ꥠ","ꥼ"],["ꦄ","ꦲ"],"ꧏ",["ꧠ","ꧤ"],["ꧦ","ꧯ"],["ꧺ","ꧾ"],["ꨀ","ꨨ"],["ꩀ","ꩂ"],["ꩄ","ꩋ"],["ꩠ","ꩶ"],"ꩺ",["ꩾ","ꪯ"],"ꪱ",["ꪵ","ꪶ"],["ꪹ","ꪽ"],"ꫀ","ꫂ",["ꫛ","ꫝ"],["ꫠ","ꫪ"],["ꫲ","ꫴ"],["ꬁ","ꬆ"],["ꬉ","ꬎ"],["ꬑ","ꬖ"],["ꬠ","ꬦ"],["ꬨ","ꬮ"],["ꬰ",""],["ꭜ","ꭥ"],["ꭰ","ꯢ"],["가","힣"],["ힰ","ퟆ"],["ퟋ","ퟻ"],["豈","舘"],["並","龎"],["ff","st"],["ﬓ","ﬗ"],"יִ",["ײַ","ﬨ"],["שׁ","זּ"],["טּ","לּ"],"מּ",["נּ","סּ"],["ףּ","פּ"],["צּ","ﮱ"],["ﯓ","ﴽ"],["ﵐ","ﶏ"],["ﶒ","ﷇ"],["ﷰ","ﷻ"],["ﹰ","ﹴ"],["ﹶ","ﻼ"],["",""],["",""],["ヲ","ᄒ"],["ᅡ","ᅦ"],["ᅧ","ᅬ"],["ᅭ","ᅲ"],["ᅳ","ᅵ"]],!1,!1),je=Dr("\\",!1),Ge=Rr(["$",["0","9"],"_",["̀","ͯ"],["҃","҇"],["֑","ֽ"],"ֿ",["ׁ","ׂ"],["ׄ","ׅ"],"ׇ",["ؐ","ؚ"],["ً","٩"],"ٰ",["ۖ","ۜ"],["۟","ۤ"],["ۧ","ۨ"],["۪","ۭ"],["۰","۹"],"ܑ",["ܰ","݊"],["ަ","ް"],["߀","߉"],["߫","߳"],["ࠖ","࠙"],["ࠛ","ࠣ"],["ࠥ","ࠧ"],["ࠩ","࠭"],["࡙","࡛"],["ࣣ",""],["ऺ","़"],["ा","ॏ"],["॑","ॗ"],["ॢ","ॣ"],["","९"],["ঁ","ঃ"],"়",["া","ৄ"],["ে","ৈ"],["ো","্"],"ৗ",["ৢ","ৣ"],["","৯"],["ਁ","ਃ"],"਼",["ਾ","ੂ"],["ੇ","ੈ"],["ੋ","੍"],"ੑ",["","ੱ"],"ੵ",["ઁ",""],"઼",["ા","ૅ"],["ે","ૉ"],["ો","્"],["ૢ","ૣ"],["","૯"],["ଁ",""],"଼",["ା","ୄ"],["େ","ୈ"],["ୋ","୍"],["ୖ","ୗ"],["ୢ","ୣ"],["","୯"],"ஂ",["ா","ூ"],["ெ","ை"],["ொ","்"],"ௗ",["","௯"],["ఀ","ః"],["ా","ౄ"],["ె","ై"],["ొ","్"],["ౕ","ౖ"],["ౢ","ౣ"],["","౯"],["ಁ","ಃ"],"಼",["ಾ","ೄ"],["ೆ","ೈ"],["ೊ","್"],["ೕ","ೖ"],["ೢ","ೣ"],["","೯"],["ഁ","ഃ"],["ാ","ൄ"],["െ","ൈ"],["ൊ","്"],"ൗ",["ൢ","ൣ"],["","൯"],["","ඃ"],"්",["ා","ු"],"ූ",["ෘ","ෟ"],["෦","෯"],["ෲ","ෳ"],"ั",["ิ","ฺ"],["็","๎"],["","๙"],"ັ",["ິ","ູ"],["ົ","ຼ"],["່","ໍ"],["","໙"],["༘","༙"],["༠","༩"],"༵","༷","༹",["༾","༿"],["ཱ","྄"],["྆","྇"],["ྍ","ྗ"],["ྙ","ྼ"],"࿆",["ါ","ှ"],["","၉"],["ၖ","ၙ"],["ၞ","ၠ"],["ၢ","ၤ"],["ၧ","ၭ"],["ၱ","ၴ"],["ႂ","ႍ"],["ႏ","ႝ"],["፝","፟"],["ᜒ","᜔"],["ᜲ","᜴"],["ᝒ","ᝓ"],["ᝲ","ᝳ"],["","៓"],"៝",["០","៩"],["",""],["᠐","᠙"],"ᢩ",["ᤠ","ᤫ"],["ᤰ","᤻"],["᥆","᥏"],["᧐","᧙"],["ᨗ","ᨛ"],["ᩕ","ᩞ"],["᩠","᩼"],["᩿","᪉"],["᪐","᪙"],["᪰","᪽"],["ᬀ","ᬄ"],["᬴","᭄"],["᭐","᭙"],["᭫","᭳"],["ᮀ","ᮂ"],["ᮡ","ᮭ"],["᮰","᮹"],["᯦","᯳"],["ᰤ","᰷"],["᱀","᱉"],["᱐","᱙"],["᳐","᳒"],["᳔","᳨"],"᳭",["ᳲ","᳴"],["᳸","᳹"],["᷀","᷵"],["᷼","᷿"],["",""],["‿","⁀"],"⁔",["⃐","⃜"],"⃡",["⃥","⃰"],["⳯","⳱"],"⵿",["ⷠ","ⷿ"],["〪","〯"],["゙","゚"],["꘠","꘩"],"꙯",["ꙴ","꙽"],["ꚞ","ꚟ"],["꛰","꛱"],"ꠂ","꠆","ꠋ",["ꠣ","ꠧ"],["ꢀ","ꢁ"],["ꢴ","꣄"],["꣐","꣙"],["꣠","꣱"],["꤀","꤉"],["ꤦ","꤭"],["ꥇ","꥓"],["ꦀ","ꦃ"],["꦳","꧀"],["꧐","꧙"],"ꧥ",["꧰","꧹"],["ꨩ","ꨶ"],"ꩃ",["ꩌ","ꩍ"],["꩐","꩙"],["ꩻ","ꩽ"],"ꪰ",["ꪲ","ꪴ"],["ꪷ","ꪸ"],["ꪾ","꪿"],"꫁",["ꫫ","ꫯ"],["ꫵ","꫶"],["ꯣ","ꯪ"],["꯬","꯭"],["꯰","꯹"],"ﬞ",["",""],["︠","︯"],["︳","︴"],["",""],["",""],"_"],!1,!1),Ve=Br("literal"),Ye=Dr("i",!1),ze=Br("string"),We=Dr('"',!1),Je=Dr("'",!1),qe=Rr(["\n","\r",'"',"\\",["\u2028","\u2029"]],!1,!1),Qe=Rr(["\n","\r","'","\\",["\u2028","\u2029"]],!1,!1),Xe=Br("character class"),Ke=Dr("[",!1),Ze=Dr("^",!1),et=Dr("]",!1),tt=Dr("-",!1),rt=Rr(["\n","\r",["\\","]"],["\u2028","\u2029"]],!1,!1),nt=Dr("0",!1),ot=Rr(['"',"'","\\"],!1,!1),ut=Dr("b",!1),at=Dr("f",!1),it=Dr("n",!1),st=Dr("r",!1),ct=Dr("t",!1),lt=Dr("v",!1),pt=Rr([["0","9"],"u","x"],!1,!1),ft=Dr("x",!1),ht=Dr("u",!1),dt=Rr([["0","9"]],!1,!1),gt=Rr([["0","9"],["a","f"]],!1,!0),At=Br("code block"),mt=Rr(["{","}"],!1,!1),_t=function(e,t,r,n){return{type:"grammar",imports:e,topLevelInitializer:t,initializer:r,rules:n,location:Pr()}},Et=function(e,t){return[e,t]},vt=function(e){return{type:"top_level_initializer",code:e,codeLocation:Pr()}},Ct=function(e){return{type:"top_level_initializer",code:e,codeLocation:Pr()}},yt=function(e,t){return{type:"grammar_import",what:e,from:t,location:Pr()}},$t=function(e){return{type:"grammar_import",what:[],from:e,location:Pr()}},St=function(e,t){return t?Array.isArray(t)?(t.unshift(e),t):[e,t]:[e]},Ft=function(e){return{type:"import_binding_default",binding:e[0],location:e[1]}},bt=function(e){return[{type:"import_binding_all",binding:e[0],location:e[1]}]},Pt=function(){return[]},xt=function(e,t){return{type:"import_binding_rename",rename:e[0],renameLocation:e[1],binding:t[0],location:t[1]}},Dt=function(e){return{type:"import_binding",binding:e[0],location:e[1]}},Rt=function(e){return{type:"import_module_specifier",module:e,location:Pr()}},Bt=function(e){return[e,Pr()]},Ot=function(e){return[e,Pr()]},Lt=function(e){return Sn.indexOf(e[0])>=0&&xr("Binding identifier can't be a reserved word \"".concat(e[0],'"'),e[1]),e[0]},wt=function(e){return{type:"top_level_initializer",code:e[0],codeLocation:e[1],location:Pr()}},It=function(e){return{type:"initializer",code:e[0],codeLocation:e[1],location:Pr()}},Mt=function(e,t,r){return{type:"rule",name:e[0],nameLocation:e[1],expression:null!==t?{type:"named",name:t,expression:r,location:Pr()}:r,location:Pr()}},Tt=function(e,t){return t.length>0?{type:"choice",alternatives:[e].concat(t),location:Pr()}:e},Nt=function(e,t){return null!==t?{type:"action",expression:e,code:t[0],codeLocation:t[1],location:Pr()}:e},kt=function(e,t){return t.length>0||"labeled"===e.type&&e.pick?{type:"sequence",elements:[e].concat(t),location:Pr()}:e},Ht=function(e,t,r){return r.type.startsWith("semantic_")&&xr('"@" cannot be used on a semantic predicate',e),{type:"labeled",label:null!==t?t[0]:null,labelLocation:null!==t?t[1]:e,pick:!0,expression:r,location:Pr()}},Ut=function(e,t){return{type:"labeled",label:e[0],labelLocation:e[1],expression:t,location:Pr()}},jt=function(){return Pr()},Gt=function(e){return Sn.indexOf(e[0])>=0&&xr("Label can't be a reserved word \"".concat(e[0],'"'),e[1]),e},Vt=function(e,t){return{type:OPS_TO_PREFIXED_TYPES[e],expression:t,location:Pr()}},Yt=function(e,t){return{type:OPS_TO_SUFFIXED_TYPES[t],expression:e,location:Pr()}},zt=function(e,t,r){var n=t[0],o=t[1];return"constant"===o.type&&0===o.value&&xr("The maximum count of repetitions of the rule must be > 0",o.location),{type:"repeated",min:n,max:o,expression:e,delimiter:r,location:Pr()}},Wt=function(e,t){return[null!==e?e:{type:"constant",value:0},null!==t?t:{type:"constant",value:null}]},Jt=function(e){return[null,e]},qt=function(e){return{type:"constant",value:e,location:Pr()}},Qt=function(e){return{type:"variable",value:e[0],location:Pr()}},Xt=function(e){return{type:"function",value:e[0],codeLocation:e[1],location:Pr()}},Kt=function(e){return"labeled"===e.type||"sequence"===e.type?{type:"group",expression:e,location:Pr()}:e},Zt=function(e,t){return{type:"library_ref",name:t[0],library:e[0],libraryNumber:-1,location:Pr()}},er=function(e){return{type:"rule_ref",name:e[0],location:Pr()}},tr=function(e,t){return{type:OPS_TO_SEMANTIC_PREDICATE_TYPES[e],code:t[0],codeLocation:t[1],location:Pr()}},rr=function(e,t){return[e+t.join(""),Pr()]},nr=function(e,t){return{type:"literal",value:e,ignoreCase:null!==t,location:Pr()}},or=function(e){return e.join("")},ur=function(e){return e.join("")},ar=function(e,t,r){return{type:"class",parts:t.filter((function(e){return""!==e})),inverted:null!==e,ignoreCase:null!==r,location:Pr()}},ir=function(t,r){return t.charCodeAt(0)>r.charCodeAt(0)&&xr("Invalid character range: "+e.substring(yr,Cr)+"."),[t,r]},sr=function(){return""},cr=function(){return"\0"},lr=function(){return"\b"},pr=function(){return"\f"},fr=function(){return"\n"},hr=function(){return"\r"},dr=function(){return"\t"},gr=function(){return"\v"},Ar=function(e){return String.fromCharCode(parseInt(e,16))},mr=function(e){return String.fromCharCode(parseInt(e,16))},_r=function(){return{type:"any",location:Pr()}},Er=function(e){return[e,Pr()]},vr=function(e){return parseInt(e,10)},Cr=0|t.peg$currPos,yr=Cr,$r=[{line:1,column:1}],Sr=Cr,Fr=t.peg$maxFailExpected||[],br=0|t.peg$silentFails;if(t.startRule){if(!(t.startRule in u))throw new Error("Can't start parsing from rule \""+t.startRule+'".');a=u[t.startRule]}function Pr(){return Lr(yr,Cr)}function xr(e,t){throw function(e,t){return new peg$SyntaxError(e,null,null,t)}(e,t=void 0!==t?t:Lr(yr,Cr))}function Dr(e,t){return{type:"literal",text:e,ignoreCase:t}}function Rr(e,t,r){return{type:"class",parts:e,inverted:t,ignoreCase:r}}function Br(e){return{type:"other",description:e}}function Or(t){var r,n=$r[t];if(n)return n;if(t>=$r.length)r=$r.length-1;else for(r=t;!$r[--r];);for(n={line:(n=$r[r]).line,column:n.column};r<t;)10===e.charCodeAt(r)?(n.line++,n.column=1):n.column++,r++;return $r[t]=n,n}function Lr(e,t,r){var n=Or(e),u=Or(t),a={source:o,start:{offset:e,line:n.line,column:n.column},end:{offset:t,line:u.line,column:u.column}};return r&&o&&"function"==typeof o.offset&&(a.start=o.offset(a.start),a.end=o.offset(a.end)),a}function wr(e){Cr<Sr||(Cr>Sr&&(Sr=Cr,Fr=[]),Fr.push(e))}function Ir(){var t,r,o,u,a,i,s,c;if(t=Cr,r=Mr(),o=Cr,u=yn(),a=function(){var t,r,o,u;return t=Cr,123===e.charCodeAt(Cr)?(r=f,Cr++):(r=n,0===br&&wr(de)),r!==n&&(o=vn())!==n?(125===e.charCodeAt(Cr)?(u=h,Cr++):(u=n,0===br&&wr(ge)),u!==n&&$n()!==n?(yr=t,t=wt(o)):(Cr=t,t=n)):(Cr=t,t=n),t}(),a!==n?o=a:(Cr=o,o=n),o===n&&(o=null),u=Cr,a=yn(),i=function(){var e,t;return e=Cr,(t=vn())!==n&&$n()!==n?(yr=e,e=It(t)):(Cr=e,e=n),e}(),i!==n?u=i:(Cr=u,u=n),u===n&&(u=null),a=yn(),i=[],s=Cr,(c=Gr())!==n?(yn(),s=c):(Cr=s,s=n),s!==n)for(;s!==n;)i.push(s),s=Cr,(c=Gr())!==n?(yn(),s=c):(Cr=s,s=n);else i=n;return i!==n?(yr=t,t=_t(r,o,u,i)):(Cr=t,t=n),t}function Mr(){var e,t;for(e=[],t=Tr();t!==n;)e.push(t),t=Tr();return e}function Tr(){var t,r,o,u,a,l,p,f;return t=Cr,yn(),e.substr(Cr,6)===i?(r=i,Cr+=6):(r=n,0===br&&wr(ce)),r!==n?(yn(),o=function(){var t,r,o,u,a;return(t=Nr())===n&&(t=kr())===n&&(t=Cr,r=function(){var e,t;return e=Cr,(t=jr())!==n&&(yr=e,t=Ft(t)),e=t}(),r!==n?(o=Cr,yn(),44===e.charCodeAt(Cr)?(u=c,Cr++):(u=n,0===br&&wr(pe)),u!==n?(yn(),(a=Nr())===n&&(a=kr()),a!==n?o=a:(Cr=o,o=n)):(Cr=o,o=n),o===n&&(o=null),yr=t,t=St(r,o)):(Cr=t,t=n)),t}(),o!==n?(u=yn(),a=function(){var t,r,o;return t=Cr,e.substr(Cr,4)===d?(r=d,Cr+=4):(r=n,0===br&&wr(Ae)),r!==n?(yn(),(o=Ur())!==n?t=o:(Cr=t,t=n)):(Cr=t,t=n),t}(),a!==n?(l=Cr,p=yn(),59===e.charCodeAt(Cr)?(f=s,Cr++):(f=n,0===br&&wr(le)),f!==n?l=p=[p,f]:(Cr=l,l=n),l===n&&(l=null),yr=t,t=yt(o,a)):(Cr=t,t=n)):(Cr=t,t=n)):(Cr=t,t=n),t===n&&(t=Cr,yn(),e.substr(Cr,6)===i?(r=i,Cr+=6):(r=n,0===br&&wr(ce)),r!==n?(yn(),(o=Ur())!==n?(u=Cr,a=yn(),59===e.charCodeAt(Cr)?(l=s,Cr++):(l=n,0===br&&wr(le)),l!==n?u=a=[a,l]:(Cr=u,u=n),u===n&&(u=null),yr=t,t=$t(o)):(Cr=t,t=n)):(Cr=t,t=n)),t}function Nr(){var t,r,o,u;return t=Cr,42===e.charCodeAt(Cr)?(r=l,Cr++):(r=n,0===br&&wr(fe)),r!==n?(yn(),e.substr(Cr,2)===p?(o=p,Cr+=2):(o=n,0===br&&wr(he)),o!==n?(yn(),(u=jr())!==n?(yr=t,t=bt(u)):(Cr=t,t=n)):(Cr=t,t=n)):(Cr=t,t=n),t}function kr(){var t,r,o,u,a;return t=Cr,123===e.charCodeAt(Cr)?(r=f,Cr++):(r=n,0===br&&wr(de)),r!==n?(yn(),125===e.charCodeAt(Cr)?(o=h,Cr++):(o=n,0===br&&wr(ge)),o!==n?(yr=t,t=Pt()):(Cr=t,t=n)):(Cr=t,t=n),t===n&&(t=Cr,123===e.charCodeAt(Cr)?(r=f,Cr++):(r=n,0===br&&wr(de)),r!==n?(yn(),o=function(){var t,r,o,u,a,i;for(t=Cr,r=[],o=Hr();o!==n;)r.push(o),o=Cr,u=Cr,a=yn(),44===e.charCodeAt(Cr)?(i=c,Cr++):(i=n,0===br&&wr(pe)),i!==n?u=a=[a,i,yn()]:(Cr=u,u=n),u!==n&&(u=Hr())===n?(Cr=o,o=n):o=u;return r.length<1?(Cr=t,t=n):t=r,t}(),o!==n?(yn(),u=Cr,44===e.charCodeAt(Cr)?(a=c,Cr++):(a=n,0===br&&wr(pe)),a!==n?u=a=[a,yn()]:(Cr=u,u=n),u===n&&(u=null),125===e.charCodeAt(Cr)?(a=h,Cr++):(a=n,0===br&&wr(ge)),a!==n?t=o:(Cr=t,t=n)):(Cr=t,t=n)):(Cr=t,t=n)),t}function Hr(){var t,r,o,u;return t=Cr,r=function(){var e,t;return(e=un())===n&&(e=Cr,(t=cn())!==n&&(yr=e,t=Ot(t)),e=t),e}(),r!==n?(yn(),e.substr(Cr,2)===p?(o=p,Cr+=2):(o=n,0===br&&wr(he)),o!==n?(yn(),(u=jr())!==n?(yr=t,t=xt(r,u)):(Cr=t,t=n)):(Cr=t,t=n)):(Cr=t,t=n),t===n&&(t=Cr,(r=jr())!==n&&(yr=t,r=Dt(r)),t=r),t}function Ur(){var e,t;return e=Cr,(t=cn())!==n&&(yr=e,t=Rt(t)),t}function jr(){var e,t;return e=Cr,t=function(){var e,t;return e=Cr,(t=un())!==n&&(yr=e,t=Lt(t)),e=t}(),t!==n&&(yr=e,t=Bt(t)),t}function Gr(){var t,r,o,u,a;return t=Cr,(r=un())!==n?(yn(),o=Cr,(u=cn())!==n?(yn(),o=u):(Cr=o,o=n),o===n&&(o=null),61===e.charCodeAt(Cr)?(u=g,Cr++):(u=n,0===br&&wr(me)),u!==n?(yn(),(a=Vr())!==n&&$n()!==n?(yr=t,t=Mt(r,o,a)):(Cr=t,t=n)):(Cr=t,t=n)):(Cr=t,t=n),t}function Vr(){var t,r,o,u,a,i;if(t=Cr,(r=Yr())!==n){for(o=[],u=Cr,yn(),47===e.charCodeAt(Cr)?(a=A,Cr++):(a=n,0===br&&wr(_e)),a!==n?(yn(),(i=Yr())!==n?u=i:(Cr=u,u=n)):(Cr=u,u=n);u!==n;)o.push(u),u=Cr,yn(),47===e.charCodeAt(Cr)?(a=A,Cr++):(a=n,0===br&&wr(_e)),a!==n?(yn(),(i=Yr())!==n?u=i:(Cr=u,u=n)):(Cr=u,u=n);yr=t,t=Tt(r,o)}else Cr=t,t=n;return t}function Yr(){var e,t,r,o;return e=Cr,t=function(){var e,t,r,o,u;if(e=Cr,(t=zr())!==n){for(r=[],o=Cr,yn(),(u=zr())!==n?o=u:(Cr=o,o=n);o!==n;)r.push(o),o=Cr,yn(),(u=zr())!==n?o=u:(Cr=o,o=n);yr=e,e=kt(t,r)}else Cr=e,e=n;return e}(),t!==n?(r=Cr,yn(),(o=vn())!==n?r=o:(Cr=r,r=n),r===n&&(r=null),yr=e,e=Nt(t,r)):(Cr=e,e=n),e}function zr(){var t,r,o,u;return t=Cr,r=function(){var t,r;return t=Cr,64===e.charCodeAt(Cr)?(r=m,Cr++):(r=n,0===br&&wr(Ee)),r!==n&&(yr=t,r=jt()),t=r}(),r!==n?((o=Wr())===n&&(o=null),(u=Jr())!==n?(yr=t,t=Ht(r,o,u)):(Cr=t,t=n)):(Cr=t,t=n),t===n&&(t=Cr,(r=Wr())!==n?(o=yn(),(u=Jr())!==n?(yr=t,t=Ut(r,u)):(Cr=t,t=n)):(Cr=t,t=n),t===n&&(t=Jr())),t}function Wr(){var t,r,o;return t=Cr,(r=un())!==n?(yn(),58===e.charCodeAt(Cr)?(o=_,Cr++):(o=n,0===br&&wr(ve)),o!==n?(yr=t,t=Gt(r)):(Cr=t,t=n)):(Cr=t,t=n),t}function Jr(){var t,r,o;return t=Cr,r=function(){var t;return t=e.charAt(Cr),z.test(t)?Cr++:(t=n,0===br&&wr(Ce)),t}(),r!==n?(yn(),(o=qr())!==n?(yr=t,t=Vt(r,o)):(Cr=t,t=n)):(Cr=t,t=n),t===n&&(t=qr()),t}function qr(){var t,r,o;return t=Cr,(r=Xr())!==n?(yn(),o=function(){var t;return t=e.charAt(Cr),W.test(t)?Cr++:(t=n,0===br&&wr(ye)),t}(),o!==n?(yr=t,t=Yt(r,o)):(Cr=t,t=n)):(Cr=t,t=n),t===n&&(t=function(){var t,r,o,u,a,i,s;return t=Cr,(r=Xr())!==n?(yn(),124===e.charCodeAt(Cr)?(o=E,Cr++):(o=n,0===br&&wr($e)),o!==n?(yn(),u=function(){var t,r,o,u;return t=Cr,(r=Qr())===n&&(r=null),yn(),e.substr(Cr,2)===v?(o=v,Cr+=2):(o=n,0===br&&wr(Se)),o!==n?(yn(),(u=Qr())===n&&(u=null),yr=t,t=Wt(r,u)):(Cr=t,t=n),t===n&&(t=Cr,(r=Qr())!==n&&(yr=t,r=Jt(r)),t=r),t}(),u!==n?(yn(),a=Cr,44===e.charCodeAt(Cr)?(i=c,Cr++):(i=n,0===br&&wr(pe)),i!==n?(yn(),(s=Vr())!==n?(yn(),a=s):(Cr=a,a=n)):(Cr=a,a=n),a===n&&(a=null),124===e.charCodeAt(Cr)?(i=E,Cr++):(i=n,0===br&&wr($e)),i!==n?(yr=t,t=zt(r,u,a)):(Cr=t,t=n)):(Cr=t,t=n)):(Cr=t,t=n)):(Cr=t,t=n),t}(),t===n&&(t=Xr())),t}function Qr(){var t,r;return t=Cr,r=function(){var t,r,o,u;if(t=Cr,r=Cr,o=[],(u=_n())!==n)for(;u!==n;)o.push(u),u=_n();else o=n;return(r=o!==n?e.substring(r,Cr):o)!==n&&(yr=t,r=vr(r)),t=r}(),r!==n&&(yr=t,r=qt(r)),(t=r)===n&&(t=Cr,(r=un())!==n&&(yr=t,r=Qt(r)),(t=r)===n&&(t=Cr,(r=vn())!==n&&(yr=t,r=Xt(r)),t=r)),t}function Xr(){var t,r,o,u;return t=function(){var t,r,o;return br++,t=Cr,(r=cn())!==n?(105===e.charCodeAt(Cr)?(o=R,Cr++):(o=n,0===br&&wr(Ye)),o===n&&(o=null),yr=t,t=nr(r,o)):(Cr=t,t=n),br--,t===n&&(r=n,0===br&&wr(Ve)),t}(),t===n&&(t=function(){var t,r,o,u,a,i;if(br++,t=Cr,91===e.charCodeAt(Cr)?(r=L,Cr++):(r=n,0===br&&wr(Ke)),r!==n){for(94===e.charCodeAt(Cr)?(o=w,Cr++):(o=n,0===br&&wr(Ze)),o===n&&(o=null),u=[],(a=fn())===n&&(a=hn());a!==n;)u.push(a),(a=fn())===n&&(a=hn());93===e.charCodeAt(Cr)?(a=I,Cr++):(a=n,0===br&&wr(et)),a!==n?(105===e.charCodeAt(Cr)?(i=R,Cr++):(i=n,0===br&&wr(Ye)),i===n&&(i=null),yr=t,t=ar(o,u,i)):(Cr=t,t=n)}else Cr=t,t=n;return br--,t===n&&(r=n,0===br&&wr(Xe)),t}(),t===n&&(t=function(){var t,r;return t=Cr,46===e.charCodeAt(Cr)?(r=$,Cr++):(r=n,0===br&&wr(Pe)),r!==n&&(yr=t,r=_r()),t=r}(),t===n&&(t=function(){var t,r,o,u,a,i,s;return t=Cr,(r=un())!==n?(46===e.charCodeAt(Cr)?(o=$,Cr++):(o=n,0===br&&wr(Pe)),o!==n&&(u=un())!==n?(yr=t,t=Zt(r,u)):(Cr=t,t=n)):(Cr=t,t=n),t===n&&(t=Cr,(r=un())!==n?(o=Cr,br++,u=Cr,a=yn(),i=Cr,(s=cn())!==n?i=s=[s,yn()]:(Cr=i,i=n),i===n&&(i=null),61===e.charCodeAt(Cr)?(s=g,Cr++):(s=n,0===br&&wr(me)),s!==n?u=a=[a,i,s]:(Cr=u,u=n),br--,u===n?o=void 0:(Cr=o,o=n),o!==n?(yr=t,t=er(r)):(Cr=t,t=n)):(Cr=t,t=n)),t}(),t===n&&(t=function(){var t,r,o;return t=Cr,r=function(){var t;return t=e.charAt(Cr),J.test(t)?Cr++:(t=n,0===br&&wr(xe)),t}(),r!==n?(yn(),(o=vn())!==n?(yr=t,t=tr(r,o)):(Cr=t,t=n)):(Cr=t,t=n),t}(),t===n&&(t=Cr,40===e.charCodeAt(Cr)?(r=C,Cr++):(r=n,0===br&&wr(Fe)),r!==n?(yn(),(o=Vr())!==n?(yn(),41===e.charCodeAt(Cr)?(u=y,Cr++):(u=n,0===br&&wr(be)),u!==n?(yr=t,t=Kt(o)):(Cr=t,t=n)):(Cr=t,t=n)):(Cr=t,t=n)))))),t}function Kr(){var t;return e.length>Cr?(t=e.charAt(Cr),Cr++):(t=n,0===br&&wr(se)),t}function Zr(){var t;return br++,t=e.charAt(Cr),q.test(t)?Cr++:(t=n,0===br&&wr(Re)),br--,t===n&&0===br&&wr(De),t}function en(){var t;return t=e.charAt(Cr),Q.test(t)?Cr++:(t=n,0===br&&wr(Be)),t}function tn(){var t;return br++,10===e.charCodeAt(Cr)?(t=S,Cr++):(t=n,0===br&&wr(Le)),t===n&&(e.substr(Cr,2)===F?(t=F,Cr+=2):(t=n,0===br&&wr(we)),t===n&&(t=e.charAt(Cr),X.test(t)?Cr++:(t=n,0===br&&wr(Ie)))),br--,t===n&&0===br&&wr(Oe),t}function rn(){var t;return br++,(t=function(){var t,r,o,u,a,i;if(t=Cr,e.substr(Cr,2)===b?(r=b,Cr+=2):(r=n,0===br&&wr(Te)),r!==n){for(o=[],u=Cr,a=Cr,br++,e.substr(Cr,2)===P?(i=P,Cr+=2):(i=n,0===br&&wr(Ne)),br--,i===n?a=void 0:(Cr=a,a=n),a!==n&&(i=Kr())!==n?u=a=[a,i]:(Cr=u,u=n);u!==n;)o.push(u),u=Cr,a=Cr,br++,e.substr(Cr,2)===P?(i=P,Cr+=2):(i=n,0===br&&wr(Ne)),br--,i===n?a=void 0:(Cr=a,a=n),a!==n&&(i=Kr())!==n?u=a=[a,i]:(Cr=u,u=n);e.substr(Cr,2)===P?(u=P,Cr+=2):(u=n,0===br&&wr(Ne)),u!==n?t=r=[r,o,u]:(Cr=t,t=n)}else Cr=t,t=n;return t}())===n&&(t=on()),br--,t===n&&0===br&&wr(Me),t}function nn(){var t,r,o,u,a,i;if(t=Cr,e.substr(Cr,2)===b?(r=b,Cr+=2):(r=n,0===br&&wr(Te)),r!==n){for(o=[],u=Cr,a=Cr,br++,e.substr(Cr,2)===P?(i=P,Cr+=2):(i=n,0===br&&wr(Ne)),i===n&&(i=en()),br--,i===n?a=void 0:(Cr=a,a=n),a!==n&&(i=Kr())!==n?u=a=[a,i]:(Cr=u,u=n);u!==n;)o.push(u),u=Cr,a=Cr,br++,e.substr(Cr,2)===P?(i=P,Cr+=2):(i=n,0===br&&wr(Ne)),i===n&&(i=en()),br--,i===n?a=void 0:(Cr=a,a=n),a!==n&&(i=Kr())!==n?u=a=[a,i]:(Cr=u,u=n);e.substr(Cr,2)===P?(u=P,Cr+=2):(u=n,0===br&&wr(Ne)),u!==n?t=r=[r,o,u]:(Cr=t,t=n)}else Cr=t,t=n;return t}function on(){var t,r,o,u,a,i;if(t=Cr,e.substr(Cr,2)===x?(r=x,Cr+=2):(r=n,0===br&&wr(ke)),r!==n){for(o=[],u=Cr,a=Cr,br++,i=en(),br--,i===n?a=void 0:(Cr=a,a=n),a!==n&&(i=Kr())!==n?u=a=[a,i]:(Cr=u,u=n);u!==n;)o.push(u),u=Cr,a=Cr,br++,i=en(),br--,i===n?a=void 0:(Cr=a,a=n),a!==n&&(i=Kr())!==n?u=a=[a,i]:(Cr=u,u=n);t=r=[r,o]}else Cr=t,t=n;return t}function un(){var e,t,r,o;if(br++,e=Cr,(t=an())!==n){for(r=[],o=sn();o!==n;)r.push(o),o=sn();yr=e,e=rr(t,r)}else Cr=e,e=n;return br--,e===n&&(t=n,0===br&&wr(He)),e}function an(){var t,r,o;return t=e.charAt(Cr),K.test(t)?Cr++:(t=n,0===br&&wr(Ue)),t===n&&(t=Cr,92===e.charCodeAt(Cr)?(r=D,Cr++):(r=n,0===br&&wr(je)),r!==n&&(o=mn())!==n?t=o:(Cr=t,t=n)),t}function sn(){var t;return(t=an())===n&&(t=e.charAt(Cr),Z.test(t)?Cr++:(t=n,0===br&&wr(Ge))),t}function cn(){var t,r,o,u;if(br++,t=Cr,34===e.charCodeAt(Cr)?(r=B,Cr++):(r=n,0===br&&wr(We)),r!==n){for(o=[],u=ln();u!==n;)o.push(u),u=ln();34===e.charCodeAt(Cr)?(u=B,Cr++):(u=n,0===br&&wr(We)),u!==n?(yr=t,t=or(o)):(Cr=t,t=n)}else Cr=t,t=n;if(t===n)if(t=Cr,39===e.charCodeAt(Cr)?(r=O,Cr++):(r=n,0===br&&wr(Je)),r!==n){for(o=[],u=pn();u!==n;)o.push(u),u=pn();39===e.charCodeAt(Cr)?(u=O,Cr++):(u=n,0===br&&wr(Je)),u!==n?(yr=t,t=ur(o)):(Cr=t,t=n)}else Cr=t,t=n;return br--,t===n&&(r=n,0===br&&wr(ze)),t}function ln(){var t,r,o,u;return t=Cr,r=Cr,o=Cr,br++,u=e.charAt(Cr),ee.test(u)?Cr++:(u=n,0===br&&wr(qe)),br--,u===n?o=void 0:(Cr=o,o=n),o!==n&&(u=Kr())!==n?r=o=[o,u]:(Cr=r,r=n),(t=r!==n?e.substring(t,Cr):r)===n&&(t=Cr,92===e.charCodeAt(Cr)?(r=D,Cr++):(r=n,0===br&&wr(je)),r!==n&&(o=gn())!==n?t=o:(Cr=t,t=n),t===n&&(t=dn())),t}function pn(){var t,r,o,u;return t=Cr,r=Cr,o=Cr,br++,u=e.charAt(Cr),te.test(u)?Cr++:(u=n,0===br&&wr(Qe)),br--,u===n?o=void 0:(Cr=o,o=n),o!==n&&(u=Kr())!==n?r=o=[o,u]:(Cr=r,r=n),(t=r!==n?e.substring(t,Cr):r)===n&&(t=Cr,92===e.charCodeAt(Cr)?(r=D,Cr++):(r=n,0===br&&wr(je)),r!==n&&(o=gn())!==n?t=o:(Cr=t,t=n),t===n&&(t=dn())),t}function fn(){var t,r,o,u;return t=Cr,(r=hn())!==n?(45===e.charCodeAt(Cr)?(o=M,Cr++):(o=n,0===br&&wr(tt)),o!==n&&(u=hn())!==n?(yr=t,t=ir(r,u)):(Cr=t,t=n)):(Cr=t,t=n),t}function hn(){var t,r,o,u;return t=Cr,r=Cr,o=Cr,br++,u=e.charAt(Cr),re.test(u)?Cr++:(u=n,0===br&&wr(rt)),br--,u===n?o=void 0:(Cr=o,o=n),o!==n&&(u=Kr())!==n?r=o=[o,u]:(Cr=r,r=n),(t=r!==n?e.substring(t,Cr):r)===n&&(t=Cr,92===e.charCodeAt(Cr)?(r=D,Cr++):(r=n,0===br&&wr(je)),r!==n&&(o=gn())!==n?t=o:(Cr=t,t=n),t===n&&(t=dn())),t}function dn(){var t,r;return t=Cr,92===e.charCodeAt(Cr)?(r=D,Cr++):(r=n,0===br&&wr(je)),r!==n&&tn()!==n?(yr=t,t=sr()):(Cr=t,t=n),t}function gn(){var t,r,o,u;return t=function(){var t;return(t=An())===n&&(t=function(){var t,r,o,u;return t=Cr,r=Cr,o=Cr,br++,u=function(){var t;return(t=An())===n&&(t=e.charAt(Cr),oe.test(t)?Cr++:(t=n,0===br&&wr(pt))),t}(),u===n&&(u=en()),br--,u===n?o=void 0:(Cr=o,o=n),o!==n&&(u=Kr())!==n?r=o=[o,u]:(Cr=r,r=n),t=r!==n?e.substring(t,Cr):r}()),t}(),t===n&&(t=Cr,48===e.charCodeAt(Cr)?(r=T,Cr++):(r=n,0===br&&wr(nt)),r!==n?(o=Cr,br++,u=_n(),br--,u===n?o=void 0:(Cr=o,o=n),o!==n?(yr=t,t=cr()):(Cr=t,t=n)):(Cr=t,t=n),t===n&&(t=function(){var t,r,o,u,a,i;return t=Cr,120===e.charCodeAt(Cr)?(r=V,Cr++):(r=n,0===br&&wr(ft)),r!==n?(o=Cr,u=Cr,(a=En())!==n&&(i=En())!==n?u=a=[a,i]:(Cr=u,u=n),(o=u!==n?e.substring(o,Cr):u)!==n?(yr=t,t=Ar(o)):(Cr=t,t=n)):(Cr=t,t=n),t}(),t===n&&(t=mn()))),t}function An(){var t,r;return t=e.charAt(Cr),ne.test(t)?Cr++:(t=n,0===br&&wr(ot)),t===n&&(t=Cr,98===e.charCodeAt(Cr)?(r=N,Cr++):(r=n,0===br&&wr(ut)),r!==n&&(yr=t,r=lr()),(t=r)===n&&(t=Cr,102===e.charCodeAt(Cr)?(r=k,Cr++):(r=n,0===br&&wr(at)),r!==n&&(yr=t,r=pr()),(t=r)===n&&(t=Cr,110===e.charCodeAt(Cr)?(r=H,Cr++):(r=n,0===br&&wr(it)),r!==n&&(yr=t,r=fr()),(t=r)===n&&(t=Cr,114===e.charCodeAt(Cr)?(r=U,Cr++):(r=n,0===br&&wr(st)),r!==n&&(yr=t,r=hr()),(t=r)===n&&(t=Cr,116===e.charCodeAt(Cr)?(r=j,Cr++):(r=n,0===br&&wr(ct)),r!==n&&(yr=t,r=dr()),(t=r)===n&&(t=Cr,118===e.charCodeAt(Cr)?(r=G,Cr++):(r=n,0===br&&wr(lt)),r!==n&&(yr=t,r=gr()),t=r)))))),t}function mn(){var t,r,o,u,a,i,s,c;return t=Cr,117===e.charCodeAt(Cr)?(r=Y,Cr++):(r=n,0===br&&wr(ht)),r!==n?(o=Cr,u=Cr,(a=En())!==n&&(i=En())!==n&&(s=En())!==n&&(c=En())!==n?u=a=[a,i,s,c]:(Cr=u,u=n),(o=u!==n?e.substring(o,Cr):u)!==n?(yr=t,t=mr(o)):(Cr=t,t=n)):(Cr=t,t=n),t}function _n(){var t;return t=e.charAt(Cr),ue.test(t)?Cr++:(t=n,0===br&&wr(dt)),t}function En(){var t;return t=e.charAt(Cr),ae.test(t)?Cr++:(t=n,0===br&&wr(gt)),t}function vn(){var t,r,o,u;return br++,t=Cr,123===e.charCodeAt(Cr)?(r=f,Cr++):(r=n,0===br&&wr(de)),r!==n?(o=function(){var e,t;return e=Cr,t=Cn(),yr=e,e=t=Er(t)}(),125===e.charCodeAt(Cr)?(u=h,Cr++):(u=n,0===br&&wr(ge)),u!==n?t=o:(Cr=t,t=n)):(Cr=t,t=n),br--,t===n&&(r=n,0===br&&wr(At)),t}function Cn(){var t,r,o,u,a,i;if(t=Cr,r=[],o=[],u=Cr,a=Cr,br++,i=e.charAt(Cr),ie.test(i)?Cr++:(i=n,0===br&&wr(mt)),br--,i===n?a=void 0:(Cr=a,a=n),a!==n&&(i=Kr())!==n?u=a=[a,i]:(Cr=u,u=n),u!==n)for(;u!==n;)o.push(u),u=Cr,a=Cr,br++,i=e.charAt(Cr),ie.test(i)?Cr++:(i=n,0===br&&wr(mt)),br--,i===n?a=void 0:(Cr=a,a=n),a!==n&&(i=Kr())!==n?u=a=[a,i]:(Cr=u,u=n);else o=n;for(o===n&&(o=Cr,123===e.charCodeAt(Cr)?(u=f,Cr++):(u=n,0===br&&wr(de)),u!==n?(a=Cn(),125===e.charCodeAt(Cr)?(i=h,Cr++):(i=n,0===br&&wr(ge)),i!==n?o=u=[u,a,i]:(Cr=o,o=n)):(Cr=o,o=n));o!==n;){if(r.push(o),o=[],u=Cr,a=Cr,br++,i=e.charAt(Cr),ie.test(i)?Cr++:(i=n,0===br&&wr(mt)),br--,i===n?a=void 0:(Cr=a,a=n),a!==n&&(i=Kr())!==n?u=a=[a,i]:(Cr=u,u=n),u!==n)for(;u!==n;)o.push(u),u=Cr,a=Cr,br++,i=e.charAt(Cr),ie.test(i)?Cr++:(i=n,0===br&&wr(mt)),br--,i===n?a=void 0:(Cr=a,a=n),a!==n&&(i=Kr())!==n?u=a=[a,i]:(Cr=u,u=n);else o=n;o===n&&(o=Cr,123===e.charCodeAt(Cr)?(u=f,Cr++):(u=n,0===br&&wr(de)),u!==n?(a=Cn(),125===e.charCodeAt(Cr)?(i=h,Cr++):(i=n,0===br&&wr(ge)),i!==n?o=u=[u,a,i]:(Cr=o,o=n)):(Cr=o,o=n))}return e.substring(t,Cr)}function yn(){var e,t;for(e=[],(t=Zr())===n&&(t=tn())===n&&(t=rn());t!==n;)e.push(t),(t=Zr())===n&&(t=tn())===n&&(t=rn());return e}function $n(){var t,r,o,u;if(t=[],r=Cr,o=yn(),59===e.charCodeAt(Cr)?(u=s,Cr++):(u=n,0===br&&wr(le)),u!==n?r=o=[o,u]:(Cr=r,r=n),r!==n)for(;r!==n;)t.push(r),r=Cr,o=yn(),59===e.charCodeAt(Cr)?(u=s,Cr++):(u=n,0===br&&wr(le)),u!==n?r=o=[o,u]:(Cr=r,r=n);else t=n;return t===n&&(t=Cr,r=function(){var e,t;for(e=[],(t=Zr())===n&&(t=nn());t!==n;)e.push(t),(t=Zr())===n&&(t=nn());return e}(),(o=on())===n&&(o=null),(u=tn())!==n?t=r=[r,o,u]:(Cr=t,t=n),t===n&&(t=Cr,r=yn(),o=function(){var t,r;return t=Cr,br++,e.length>Cr?(r=e.charAt(Cr),Cr++):(r=n,0===br&&wr(se)),br--,r===n?t=void 0:(Cr=t,t=n),t}(),o!==n?t=r=[r,o]:(Cr=t,t=n))),t}var Sn=t.reservedWords||[];if(r=a(),t.peg$library)return{peg$result:r,peg$currPos:Cr,peg$FAILED:n,peg$maxFailExpected:Fr,peg$maxFailPos:Sr};if(r!==n&&Cr===e.length)return r;throw r!==n&&Cr<e.length&&wr({type:"end"}),function(e,t,r){return new peg$SyntaxError(peg$SyntaxError.buildMessage(e,t),e,t,r)}(Fr,Sr<e.length?e.charAt(Sr):null,Sr<e.length?Lr(Sr,Sr+1):Lr(Sr,Sr))}peg$subclass(peg$SyntaxError,Error),peg$SyntaxError.prototype.format=function(e){var t="Error: "+this.message;if(this.location){var r,n=null;for(r=0;r<e.length;r++)if(e[r].source===this.location.source){n=e[r].text.split(/\r\n|\n|\r/g);break}var o=this.location.start,u=this.location.source&&"function"==typeof this.location.source.offset?this.location.source.offset(o):o,a=this.location.source+":"+u.line+":"+u.column;if(n){var i=this.location.end,s=peg$padEnd("",u.line.toString().length," "),c=n[o.line-1],l=(o.line===i.line?i.column:c.length+1)-o.column||1;t+="\n --\x3e "+a+"\n"+s+" |\n"+u.line+" | "+c+"\n"+s+" | "+peg$padEnd("",o.column-1," ")+peg$padEnd("",l,"^")}else t+="\n at "+a}return t},peg$SyntaxError.buildMessage=function(e,t){var r={literal:function(e){return'"'+o(e.text)+'"'},class:function(e){var t=e.parts.map((function(e){return Array.isArray(e)?u(e[0])+"-"+u(e[1]):u(e)}));return"["+(e.inverted?"^":"")+t.join("")+"]"},any:function(){return"any character"},end:function(){return"end of input"},other:function(e){return e.description}};function n(e){return e.charCodeAt(0).toString(16).toUpperCase()}function o(e){return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+n(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+n(e)}))}function u(e){return e.replace(/\\/g,"\\\\").replace(/\]/g,"\\]").replace(/\^/g,"\\^").replace(/-/g,"\\-").replace(/\0/g,"\\0").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/[\x00-\x0F]/g,(function(e){return"\\x0"+n(e)})).replace(/[\x10-\x1F\x7F-\x9F]/g,(function(e){return"\\x"+n(e)}))}function a(e){return r[e.type](e)}return"Expected "+function(e){var t,r,n=e.map(a);if(n.sort(),n.length>0){for(t=1,r=1;t<n.length;t++)n[t-1]!==n[t]&&(n[r]=n[t],r++);n.length=r}switch(n.length){case 1:return n[0];case 2:return n[0]+" or "+n[1];default:return n.slice(0,-1).join(", ")+", or "+n[n.length-1]}}(e)+" but "+function(e){return e?'"'+o(e)+'"':"end of input"}(t)+" found."};var parser$1={StartRules:["Grammar","ImportsAndSource"],SyntaxError:peg$SyntaxError,parse:peg$parse},__spreadArray$2=commonjsGlobal&&commonjsGlobal.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,u=t.length;o<u;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},asts$5=asts_1,op=opcodes_1,Stack=stack,VERSION$1=version,_a=utils,stringEscape=_a.stringEscape,regexpClassEscape=_a.regexpClassEscape,SourceNode=sourceMap.SourceNode,GrammarLocation$1=grammarLocation,parse=parser$1.parse;function toSourceNode(e,t,r){var n=GrammarLocation$1.offsetStart(t),o=n.line,u=n.column-1,a=e.split("\n");return 1===a.length?new SourceNode(o,u,String(t.source),e,r):new SourceNode(null,null,String(t.source),a.map((function(e,n){return new SourceNode(o+n,0===n?u:0,String(t.source),n===a.length-1?e:[e,"\n"],r)})))}function wrapInSourceNode(e,t,r,n,o){if(r){var u=GrammarLocation$1.offsetEnd(r);return new SourceNode(null,null,String(r.source),[e,toSourceNode(t,r,o),new SourceNode(u.line,u.column-1,String(r.source),n)])}return new SourceNode(null,null,null,[e,t,n])}function generateJS$1(e,t){if(!(e.literals&&e.locations&&e.classes&&e.expectations&&e.functions&&e.importedNames))throw new Error("generateJS: generate bytecode was not called.");var r=e.literals,n=e.locations,o=e.classes,u=e.expectations,a=e.functions,i=e.importedNames;if(!t.allowedStartRules)throw new Error("generateJS: options.allowedStartRules was not set.");var s=t.allowedStartRules,c=t.dependencies||{};function l(e){var t=!0,r=0;return function e(n){return Array.isArray(n)?n.map((function(t){return e(t)})):n instanceof SourceNode?(r++,n.children=e(n.children),r--,n):(n=t?n.replace(/^(.+)$/gm," $1"):n.replace(/\n(\s*\S)/g,"\n $1"),t=!r||n.endsWith("\n"),n)}(e)}function p(e){return"peg$c"+e}function f(e){return"peg$r"+e}function h(e){return"peg$e"+e}function d(e){return"peg$f"+e}function g(e){return"peg$import"+e}function A(e){return"peg$parse"+e}function m(e){return e.codeLocation?toSourceNode(e.code,e.codeLocation,"$"+e.type):e.code}e.code=function(r){function n(){return["// @generated by Peggy ".concat(VERSION$1,"."),"//","// https://peggyjs.org/"]}function o(){var e=["{"];return t.trace&&e.push(" DefaultTracer: peg$DefaultTracer,"),t.allowedStartRules&&e.push(" StartRules: ["+t.allowedStartRules.map((function(e){return'"'+e+'"'})).join(", ")+"],"),e.push(" SyntaxError: peg$SyntaxError,"," parse: peg$parse"),e.push("}"),e.join("\n")}var u={bare:function(){if(Object.keys(c).length>0||e.imports.length>0)throw new Error("Dependencies not supported in format 'bare'.");return __spreadArray$2(__spreadArray$2([],n(),!0),["(function() {",' "use strict";',"",r,"",l("return "+o()+";"),"})()"],!1)},commonjs:function(){var t=Object.keys(c),u=n();u.push("",'"use strict";',""),t.length>0&&(t.forEach((function(e){u.push("var "+e+' = require("'+stringEscape(c[e])+'");')})),u.push(""));for(var a=e.imports.length,i=0;i<a;i++)u.push("var "+g(i)+' = require("'+stringEscape(e.imports[i].from.module)+'");');return u.push("",r,"","module.exports = "+o()+";"),u},es:function(){var o=Object.keys(c),u=n();u.push(""),o.length>0&&(o.forEach((function(e){u.push("import "+e+' from "'+stringEscape(c[e])+'";')})),u.push(""));for(var a=0;a<e.imports.length;a++)u.push("import * as "+g(a)+' from "'+stringEscape(e.imports[a].from.module)+'";');return u.push("",r,""),u.push("const peg$allowedStartRules = ["," "+(t.allowedStartRules?t.allowedStartRules.map((function(e){return'"'+e+'"'})).join(",\n "):""),"];",""),u.push("export {"),t.trace&&u.push(" peg$DefaultTracer as DefaultTracer,"),u.push(" peg$allowedStartRules as StartRules,"," peg$SyntaxError as SyntaxError,"," peg$parse as parse","};"),u},amd:function(){if(e.imports.length>0)throw new Error("Imports are not supported in format 'amd'.");var t=Object.keys(c),u="["+t.map((function(e){return c[e]})).map((function(e){return'"'+stringEscape(e)+'"'})).join(", ")+"]",a=t.join(", ");return __spreadArray$2(__spreadArray$2([],n(),!0),["define("+u+", function("+a+") {",' "use strict";',"",r,"",l("return "+o()+";"),"});"],!1)},globals:function(){if(Object.keys(c).length>0||e.imports.length>0)throw new Error("Dependencies not supported in format 'globals'.");if(!t.exportVar)throw new Error("No export variable defined");return __spreadArray$2(__spreadArray$2([],n(),!0),["(function(root) {",' "use strict";',"",r,"",l("root."+t.exportVar+" = "+o()+";"),"})(this);"],!1)},umd:function(){if(e.imports.length>0)throw new Error("Imports are not supported in format 'umd'.");var u=Object.keys(c),a=u.map((function(e){return c[e]})),i="["+a.map((function(e){return'"'+stringEscape(e)+'"'})).join(", ")+"]",s=a.map((function(e){return'require("'+stringEscape(e)+'")'})).join(", "),p=u.join(", "),f=n();return f.push("(function(root, factory) {",' if (typeof define === "function" && define.amd) {'," define("+i+", factory);",' } else if (typeof module === "object" && module.exports) {'," module.exports = factory("+s+");"),t.exportVar&&f.push(" } else {"," root."+t.exportVar+" = factory();"),f.push(" }","})(this, function("+p+") {",' "use strict";',"",r,"",l("return "+o()+";"),"});"),f}},a=u[t.format||"bare"]();return new SourceNode(null,null,t.grammarSource,a.map((function(e){return e instanceof SourceNode?e:e+"\n"})))}(function(){var c=[],_=e.topLevelInitializer;if(_)if(Array.isArray(_)){if("es"===t.format){for(var E=[],v=[],C=0,y=_;C<y.length;C++){var $=y[C],S=parse($.code,{startRule:"ImportsAndSource",grammarSource:new GrammarLocation$1($.codeLocation.source,$.codeLocation.start)}),F=S[0],b=S[1];F.code?(E.push(F),v.push(b)):v.push($)}_=v.concat(E)}for(var P=0,x=_.slice(0).reverse();P<x.length;P++)$=x[P],c.push(m($)),c.push("")}else c.push(m(_)),c.push("");c.push("function peg$subclass(child, parent) {"," function C() { this.constructor = child; }"," C.prototype = parent.prototype;"," child.prototype = new C();","}","","function peg$SyntaxError(message, expected, found, location) {"," var self = Error.call(this, message);"," // istanbul ignore next Check is a necessary evil to support older environments"," if (Object.setPrototypeOf) {"," Object.setPrototypeOf(self, peg$SyntaxError.prototype);"," }"," self.expected = expected;"," self.found = found;"," self.location = location;",' self.name = "SyntaxError";'," return self;","}","","peg$subclass(peg$SyntaxError, Error);","","function peg$padEnd(str, targetLength, padString) {",' padString = padString || " ";'," if (str.length > targetLength) { return str; }"," targetLength -= str.length;"," padString += padString.repeat(targetLength);"," return str + padString.slice(0, targetLength);","}","","peg$SyntaxError.prototype.format = function(sources) {",' var str = "Error: " + this.message;'," if (this.location) {"," var src = null;"," var k;"," for (k = 0; k < sources.length; k++) {"," if (sources[k].source === this.location.source) {"," src = sources[k].text.split(/\\r\\n|\\n|\\r/g);"," break;"," }"," }"," var s = this.location.start;",' var offset_s = (this.location.source && (typeof this.location.source.offset === "function"))'," ? this.location.source.offset(s)"," : s;",' var loc = this.location.source + ":" + offset_s.line + ":" + offset_s.column;'," if (src) {"," var e = this.location.end;"," var filler = peg$padEnd(\"\", offset_s.line.toString().length, ' ');"," var line = src[s.line - 1];"," var last = s.line === e.line ? e.column : line.length + 1;"," var hatLen = (last - s.column) || 1;",' str += "\\n --\x3e " + loc + "\\n"',' + filler + " |\\n"',' + offset_s.line + " | " + line + "\\n"',' + filler + " | " + peg$padEnd("", s.column - 1, \' \')',' + peg$padEnd("", hatLen, "^");'," } else {",' str += "\\n at " + loc;'," }"," }"," return str;","};","","peg$SyntaxError.buildMessage = function(expected, found) {"," var DESCRIBE_EXPECTATION_FNS = {"," literal: function(expectation) {",' return "\\"" + literalEscape(expectation.text) + "\\"";'," },",""," class: function(expectation) {"," var escapedParts = expectation.parts.map(function(part) {"," return Array.isArray(part)",' ? classEscape(part[0]) + "-" + classEscape(part[1])'," : classEscape(part);"," });","",' return "[" + (expectation.inverted ? "^" : "") + escapedParts.join("") + "]";'," },",""," any: function() {",' return "any character";'," },",""," end: function() {",' return "end of input";'," },",""," other: function(expectation) {"," return expectation.description;"," }"," };",""," function hex(ch) {"," return ch.charCodeAt(0).toString(16).toUpperCase();"," }",""," function literalEscape(s) {"," return s",' .replace(/\\\\/g, "\\\\\\\\")',' .replace(/"/g, "\\\\\\"")',' .replace(/\\0/g, "\\\\0")',' .replace(/\\t/g, "\\\\t")',' .replace(/\\n/g, "\\\\n")',' .replace(/\\r/g, "\\\\r")',' .replace(/[\\x00-\\x0F]/g, function(ch) { return "\\\\x0" + hex(ch); })',' .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return "\\\\x" + hex(ch); });'," }",""," function classEscape(s) {"," return s",' .replace(/\\\\/g, "\\\\\\\\")',' .replace(/\\]/g, "\\\\]")',' .replace(/\\^/g, "\\\\^")',' .replace(/-/g, "\\\\-")',' .replace(/\\0/g, "\\\\0")',' .replace(/\\t/g, "\\\\t")',' .replace(/\\n/g, "\\\\n")',' .replace(/\\r/g, "\\\\r")',' .replace(/[\\x00-\\x0F]/g, function(ch) { return "\\\\x0" + hex(ch); })',' .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return "\\\\x" + hex(ch); });'," }",""," function describeExpectation(expectation) {"," return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);"," }",""," function describeExpected(expected) {"," var descriptions = expected.map(describeExpectation);"," var i, j;",""," descriptions.sort();",""," if (descriptions.length > 0) {"," for (i = 1, j = 1; i < descriptions.length; i++) {"," if (descriptions[i - 1] !== descriptions[i]) {"," descriptions[j] = descriptions[i];"," j++;"," }"," }"," descriptions.length = j;"," }",""," switch (descriptions.length) {"," case 1:"," return descriptions[0];",""," case 2:",' return descriptions[0] + " or " + descriptions[1];',""," default:",' return descriptions.slice(0, -1).join(", ")',' + ", or "'," + descriptions[descriptions.length - 1];"," }"," }",""," function describeFound(found) {",' return found ? "\\"" + literalEscape(found) + "\\"" : "end of input";'," }","",' return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found.";',"};",""),t.trace&&c.push("function peg$DefaultTracer() {"," this.indentLevel = 0;","}","","peg$DefaultTracer.prototype.trace = function(event) {"," var that = this;",""," function log(event) {"," function repeat(string, n) {",' var result = "", i;',""," for (i = 0; i < n; i++) {"," result += string;"," }",""," return result;"," }",""," function pad(string, length) {",' return string + repeat(" ", length - string.length);'," }","",' if (typeof console === "object") {'," console.log(",' event.location.start.line + ":" + event.location.start.column + "-"',' + event.location.end.line + ":" + event.location.end.column + " "',' + pad(event.type, 10) + " "',' + repeat(" ", that.indentLevel) + event.rule'," );"," }"," }",""," switch (event.type) {",' case "rule.enter":'," log(event);"," this.indentLevel++;"," break;","",' case "rule.match":'," this.indentLevel--;"," log(event);"," break;","",' case "rule.fail":'," this.indentLevel--;"," log(event);"," break;",""," default:",' throw new Error("Invalid event type: " + event.type + ".");'," }","};","");var D="{ "+s.map((function(e){return e+": "+A(e)})).join(", ")+" }",R=A(s[0]);if(c.push("function peg$parse(input, options) {"," options = options !== undefined ? options : {};",""," var peg$FAILED = {};"," var peg$source = options.grammarSource;",""," var peg$startRuleFunctions = "+D+";"," var peg$startRuleFunction = "+R+";","",new SourceNode(null,null,t.grammarSource,__spreadArray$2([r.map((function(e,t){return" var "+p(t)+' = "'+stringEscape(e)+'";'})).concat("",o.map((function(e,t){return" var "+f(t)+" = /^["+((r=e).inverted?"^":"")+r.value.map((function(e){return Array.isArray(e)?regexpClassEscape(e[0])+"-"+regexpClassEscape(e[1]):regexpClassEscape(e)})).join("")+"]/"+(r.ignoreCase?"i":"")+";";var r}))).concat("",u.map((function(e,t){return" var "+h(t)+" = "+function(e){switch(e.type){case"rule":return'peg$otherExpectation("'+stringEscape(e.value)+'")';case"literal":return'peg$literalExpectation("'+stringEscape(e.value)+'", '+e.ignoreCase+")";case"class":return"peg$classExpectation(["+e.value.map((function(e){return Array.isArray(e)?'["'+stringEscape(e[0])+'", "'+stringEscape(e[1])+'"]':'"'+stringEscape(e)+'"'})).join(", ")+"], "+e.inverted+", "+e.ignoreCase+")";case"any":return"peg$anyExpectation()";default:throw new Error("Unknown expectation type ("+JSON.stringify(e)+")")}}(e)+";"}))).concat("").join("\n")],a.map((function(e,t){return wrapInSourceNode("\n var ".concat(d(t)," = function(").concat(e.params.join(", "),") {"),e.body,e.location,"};")})),!0)),""," var peg$currPos = options.peg$currPos | 0;"," var peg$savedPos = peg$currPos;"," var peg$posDetailsCache = [{ line: 1, column: 1 }];"," var peg$maxFailPos = peg$currPos;"," var peg$maxFailExpected = options.peg$maxFailExpected || [];"," var peg$silentFails = options.peg$silentFails | 0;",""),t.cache&&c.push(" var peg$resultsCache = {};",""),t.trace&&c.push(' var peg$tracer = "tracer" in options ? options.tracer : new peg$DefaultTracer();',""),c.push(" var peg$result;",""," if (options.startRule) {"," if (!(options.startRule in peg$startRuleFunctions)) {",' throw new Error("Can\'t start parsing from rule \\"" + options.startRule + "\\".");'," }",""," peg$startRuleFunction = peg$startRuleFunctions[options.startRule];"," }",""," function text() {"," return input.substring(peg$savedPos, peg$currPos);"," }",""," function offset() {"," return peg$savedPos;"," }",""," function range() {"," return {"," source: peg$source,"," start: peg$savedPos,"," end: peg$currPos"," };"," }",""," function location() {"," return peg$computeLocation(peg$savedPos, peg$currPos);"," }",""," function expected(description, location) {"," location = location !== undefined"," ? location"," : peg$computeLocation(peg$savedPos, peg$currPos);",""," throw peg$buildStructuredError("," [peg$otherExpectation(description)],"," input.substring(peg$savedPos, peg$currPos),"," location"," );"," }",""," function error(message, location) {"," location = location !== undefined"," ? location"," : peg$computeLocation(peg$savedPos, peg$currPos);",""," throw peg$buildSimpleError(message, location);"," }",""," function peg$literalExpectation(text, ignoreCase) {",' return { type: "literal", text: text, ignoreCase: ignoreCase };'," }",""," function peg$classExpectation(parts, inverted, ignoreCase) {",' return { type: "class", parts: parts, inverted: inverted, ignoreCase: ignoreCase };'," }",""," function peg$anyExpectation() {",' return { type: "any" };'," }",""," function peg$endExpectation() {",' return { type: "end" };'," }",""," function peg$otherExpectation(description) {",' return { type: "other", description: description };'," }",""," function peg$computePosDetails(pos) {"," var details = peg$posDetailsCache[pos];"," var p;",""," if (details) {"," return details;"," } else {"," if (pos >= peg$posDetailsCache.length) {"," p = peg$posDetailsCache.length - 1;"," } else {"," p = pos;"," while (!peg$posDetailsCache[--p]) {}"," }",""," details = peg$posDetailsCache[p];"," details = {"," line: details.line,"," column: details.column"," };",""," while (p < pos) {"," if (input.charCodeAt(p) === 10) {"," details.line++;"," details.column = 1;"," } else {"," details.column++;"," }",""," p++;"," }",""," peg$posDetailsCache[pos] = details;",""," return details;"," }"," }",""," function peg$computeLocation(startPos, endPos, offset) {"," var startPosDetails = peg$computePosDetails(startPos);"," var endPosDetails = peg$computePosDetails(endPos);",""," var res = {"," source: peg$source,"," start: {"," offset: startPos,"," line: startPosDetails.line,"," column: startPosDetails.column"," },"," end: {"," offset: endPos,"," line: endPosDetails.line,"," column: endPosDetails.column"," }"," };",' if (offset && peg$source && (typeof peg$source.offset === "function")) {'," res.start = peg$source.offset(res.start);"," res.end = peg$source.offset(res.end);"," }"," return res;"," }",""," function peg$fail(expected) {"," if (peg$currPos < peg$maxFailPos) { return; }",""," if (peg$currPos > peg$maxFailPos) {"," peg$maxFailPos = peg$currPos;"," peg$maxFailExpected = [];"," }",""," peg$maxFailExpected.push(expected);"," }",""," function peg$buildSimpleError(message, location) {"," return new peg$SyntaxError(message, null, null, location);"," }",""," function peg$buildStructuredError(expected, found, location) {"," return new peg$SyntaxError("," peg$SyntaxError.buildMessage(expected, found),"," expected,"," found,"," location"," );"," }",""),e.imports.length>0&&c.push(" var peg$assign = Object.assign || function(t) {"," var i, s;"," for (i = 1; i < arguments.length; i++) {"," s = arguments[i];"," for (var p in s) {"," if (Object.prototype.hasOwnProperty.call(s, p)) {"," t[p] = s[p];"," }"," }"," }"," return t;"," };",""," function peg$callLibrary(lib, startRule) {"," const opts = peg$assign({}, options, {"," startRule: startRule,"," peg$currPos: peg$currPos,"," peg$silentFails: peg$silentFails,"," peg$library: true,"," peg$maxFailExpected: peg$maxFailExpected"," });"," const res = lib.parse(input, opts);"," peg$currPos = res.peg$currPos;"," peg$maxFailPos = res.peg$maxFailPos;"," peg$maxFailExpected = res.peg$maxFailExpected;"," return (res.peg$result === res.peg$FAILED) ? peg$FAILED : res.peg$result;"," }",""),e.rules.forEach((function(o){c.push.apply(c,l(function(o){var u=[],a=o.bytecode,s=new Stack(o.name,"s","var",a),c=function t(o){var u=0,a=o.length,c=[],m=void 0;function _(e,r,n){var a=r+3,i=o[u+a-2],p=o[u+a-1],f=s.checkedIf(u,(function(){return u+=a+i,(n||t)(o.slice(u-i,u))}),p>0?function(){return u+=p,t(o.slice(u-p,u))}:null),h=f[0],d=f[1];c.push("if ("+e+") {"),c.push.apply(c,l(h)),p>0&&(c.push("} else {"),c.push.apply(c,l(d))),c.push("}")}function E(e,r,n){var a=r+3,i=1===n?"input.charAt(peg$currPos)":"input.substr(peg$currPos, "+n+")",l=null;o[u+a]===op.ACCEPT_N&&o[u+a+1]===n&&(c.push(s.push(i)),i=s.pop(),l=function(e){s.sp++;var r=t(e.slice(2));return r.unshift(1===n?"peg$currPos++;":"peg$currPos += "+n+";"),r}),_(e(i,null!==l),r,l)}for(var v=function(){switch(o[u]){case op.PUSH_EMPTY_STRING:c.push(s.push("''")),u++;break;case op.PUSH_CURR_POS:c.push(s.push("peg$currPos")),u++;break;case op.PUSH_UNDEFINED:c.push(s.push("undefined")),u++;break;case op.PUSH_NULL:c.push(s.push("null")),u++;break;case op.PUSH_FAILED:c.push(s.push("peg$FAILED")),u++;break;case op.PUSH_EMPTY_ARRAY:c.push(s.push("[]")),u++;break;case op.POP:s.pop(),u++;break;case op.POP_CURR_POS:c.push("peg$currPos = "+s.pop()+";"),u++;break;case op.POP_N:s.pop(o[u+1]),u+=2;break;case op.NIP:m=s.pop(),s.pop(),c.push(s.push(m)),u++;break;case op.APPEND:m=s.pop(),c.push(s.top()+".push("+m+");"),u++;break;case op.WRAP:c.push(s.push("["+s.pop(o[u+1]).join(", ")+"]")),u+=2;break;case op.TEXT:c.push(s.push("input.substring("+s.pop()+", peg$currPos)")),u++;break;case op.PLUCK:var a=o[u+3-1],v=3+a;m=o.slice(u+3,u+v),m=1===a?s.index(m[0]):"[ ".concat(m.map((function(e){return s.index(e)})).join(", ")," ]"),s.pop(o[u+1]),c.push(s.push(m)),u+=v;break;case op.IF:_(s.top(),0);break;case op.IF_ERROR:_(s.top()+" === peg$FAILED",0);break;case op.IF_NOT_ERROR:_(s.top()+" !== peg$FAILED",0);break;case op.IF_LT:_(s.top()+".length < "+o[u+1],1);break;case op.IF_GE:_(s.top()+".length >= "+o[u+1],1);break;case op.IF_LT_DYNAMIC:_(s.top()+".length < ("+s.index(o[u+1])+"|0)",1);break;case op.IF_GE_DYNAMIC:_(s.top()+".length >= ("+s.index(o[u+1])+"|0)",1);break;case op.WHILE_NOT_ERROR:P=s.top()+" !== peg$FAILED",x=o[u+2-1],D=s.checkedLoop(u,(function(){return u+=2+x,t(o.slice(u-x,u))})),c.push("while ("+P+") {"),c.push.apply(c,l(D)),c.push("}");break;case op.MATCH_ANY:_("input.length > peg$currPos",0);break;case op.MATCH_STRING:var C=o[u+1],y=r[C];E((function(e,t){return y.length>1?"".concat(e," === ").concat(p(C)):(e=t?"".concat(e,".charCodeAt(0)"):"input.charCodeAt(peg$currPos)","".concat(e," === ").concat(y.charCodeAt(0)))}),1,y.length);break;case op.MATCH_STRING_IC:var $=o[u+1];E((function(e){return"".concat(e,".toLowerCase() === ").concat(p($))}),1,r[$].length);break;case op.MATCH_CHAR_CLASS:var S=o[u+1];E((function(e){return"".concat(f(S),".test(").concat(e,")")}),1,1);break;case op.ACCEPT_N:c.push(s.push(o[u+1]>1?"input.substr(peg$currPos, "+o[u+1]+")":"input.charAt(peg$currPos)")),c.push(o[u+1]>1?"peg$currPos += "+o[u+1]+";":"peg$currPos++;"),u+=2;break;case op.ACCEPT_STRING:c.push(s.push(p(o[u+1]))),c.push(r[o[u+1]].length>1?"peg$currPos += "+r[o[u+1]].length+";":"peg$currPos++;"),u+=2;break;case op.FAIL:c.push(s.push("peg$FAILED")),c.push("if (peg$silentFails === 0) { peg$fail("+h(o[u+1])+"); }"),u+=2;break;case op.LOAD_SAVED_POS:c.push("peg$savedPos = "+s.index(o[u+1])+";"),u+=2;break;case op.UPDATE_SAVED_POS:c.push("peg$savedPos = peg$currPos;"),u++;break;case op.CALL:m=function(e){var t=o[u+4-1];return d(o[u+1])+"("+o.slice(u+4,u+4+t).map((function(e){return s.index(e)})).join(", ")+")"}(),s.pop(o[u+2]),c.push(s.push(m)),u+=4+o[u+3];break;case op.RULE:c.push(s.push(A(e.rules[o[u+1]].name)+"()")),u+=2;break;case op.LIBRARY_RULE:var F=o[u+2],b=-1===F?"":', "'+i[F]+'"';c.push(s.push("peg$callLibrary("+g(o[u+1])+b+")")),u+=3;break;case op.SILENT_FAILS_ON:c.push("peg$silentFails++;"),u++;break;case op.SILENT_FAILS_OFF:c.push("peg$silentFails--;"),u++;break;case op.SOURCE_MAP_PUSH:s.sourceMapPush(c,n[o[u+1]]),u+=2;break;case op.SOURCE_MAP_POP:s.sourceMapPop(),u++;break;case op.SOURCE_MAP_LABEL_PUSH:s.labels[o[u+1]]={label:r[o[u+2]],location:n[o[u+3]]},u+=4;break;case op.SOURCE_MAP_LABEL_POP:delete s.labels[o[u+1]],u+=2;break;default:throw new Error("Invalid opcode: "+o[u]+".")}var P,x,D};u<a;)v();return c}(a);return u.push(wrapInSourceNode("function ",A(o.name),o.nameLocation,"() {\n",o.name)),t.trace&&u.push(" var startPos = peg$currPos;"),u.push(l(s.defines())),u.push.apply(u,l(function(r,n){var o=[];return o.push(""),t.trace&&o.push("peg$tracer.trace({",' type: "rule.enter",'," rule: "+r+","," location: peg$computeLocation(startPos, startPos, true)","});",""),t.cache&&(o.push("var key = peg$currPos * "+e.rules.length+" + "+n+";","var cached = peg$resultsCache[key];","","if (cached) {"," peg$currPos = cached.nextPos;",""),t.trace&&o.push("if (cached.result !== peg$FAILED) {"," peg$tracer.trace({",' type: "rule.match",'," rule: "+r+","," result: cached.result,"," location: peg$computeLocation(startPos, peg$currPos, true)"," });","} else {"," peg$tracer.trace({",' type: "rule.fail",'," rule: "+r+","," location: peg$computeLocation(startPos, startPos, true)"," });","}",""),o.push(" return cached.result;","}","")),o}('"'+stringEscape(o.name)+'"',asts$5.indexOfRule(e,o.name)))),u.push.apply(u,l(c)),u.push.apply(u,l(function(e,r){var n=[];return t.cache&&n.push("","peg$resultsCache[key] = { nextPos: peg$currPos, result: "+r+" };"),t.trace&&n.push("","if ("+r+" !== peg$FAILED) {"," peg$tracer.trace({",' type: "rule.match",'," rule: "+e+","," result: "+r+","," location: peg$computeLocation(startPos, peg$currPos, true)"," });","} else {"," peg$tracer.trace({",' type: "rule.fail",'," rule: "+e+","," location: peg$computeLocation(startPos, startPos, true)"," });","}"),n.push("","return "+r+";"),n}('"'+stringEscape(o.name)+'"',s.result()))),u.push("}"),u}(o))),c.push("")})),e.initializer)if(Array.isArray(e.initializer))for(var B=0,O=e.initializer;B<O.length;B++){var L=O[B];c.push(m(L)),c.push("")}else c.push(m(e.initializer)),c.push("");return c.push(" peg$result = peg$startRuleFunction();",""," if (options.peg$library) {"," return /** @type {any} */ ({"," peg$result,"," peg$currPos,"," peg$FAILED,"," peg$maxFailExpected,"," peg$maxFailPos"," });"," }"," if (peg$result !== peg$FAILED && peg$currPos === input.length) {"," return peg$result;"," } else {"," if (peg$result !== peg$FAILED && peg$currPos < input.length) {"," peg$fail(peg$endExpectation());"," }",""," throw peg$buildStructuredError("," peg$maxFailExpected,"," peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,"," peg$maxFailPos < input.length"," ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)"," : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)"," );"," }","}"),new SourceNode(null,null,t.grammarSource,c.map((function(e){return e instanceof SourceNode?e:e+"\n"})))}())}var generateJs=generateJS$1,asts$4=asts_1,visitor$8=visitor_1;function removeProxyRules$1(e,t,r){var n=[];e.rules.forEach((function(o,u){var a;"rule"===(a=o).type&&"rule_ref"===a.expression.type&&(function(e,t,n){visitor$8.build({rule_ref:function(o){o.name===t&&(o.name=n,r.info('Proxy rule "'.concat(t,'" replaced by the rule "').concat(n,'"'),o.location,[{message:"This rule will be used",location:asts$4.findRule(e,n).nameLocation}]))}})(e)}(e,o.name,o.expression.name),-1===t.allowedStartRules.indexOf(o.name)&&n.push(u))})),n.reverse(),n.forEach((function(t){e.rules.splice(t,1)}))}var removeProxyRules_1=removeProxyRules$1,__assign=commonjsGlobal&&commonjsGlobal.__assign||function(){return __assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},__assign.apply(this,arguments)},__spreadArray$1=commonjsGlobal&&commonjsGlobal.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,u=t.length;o<u;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},visitor$7=visitor_1;function cloneOver(e,t){var r=e,n=t;Object.keys(r).forEach((function(e){return delete r[e]})),Object.keys(n).forEach((function(e){r[e]=n[e]}))}function cleanParts(e){e.sort((function(e,t){var r=Array.isArray(e)?e:[e,e],n=r[0],o=r[1],u=Array.isArray(t)?t:[t,t],a=u[0],i=u[1];return n!==a?n<a?-1:1:o!==i?o>i?-1:1:0}));for(var t="",r="",n=0;n<e.length;n++){var o=e[n],u=Array.isArray(o)?o:[o,o],a=u[0],i=u[1];i<=r?e.splice(n--,1):r.charCodeAt(0)+1>=a.charCodeAt(0)?(e.splice(n--,1),e[n]=[t,r=i]):(t=a,r=i)}return e}function mergeCharacterClasses$1(e){var t=Object.create(null);e.rules.forEach((function(e){return t[e.name]=e.expression}));var r=Object.create(null),n=[function(e,n){if("class"===e.type&&!e.inverted)return n&&((e=__assign({},e)).parts=__spreadArray$1([],e.parts,!0)),e;if("literal"===e.type&&1===e.value.length)return{type:"class",parts:[e.value],inverted:!1,ignoreCase:e.ignoreCase,location:e.location};if("rule_ref"===e.type){var a=t[e.name];if(a){r[e.name]||(r[e.name]=!0,u(a));var i=o(a,!0);return i&&(i.location=e.location),i}}return null},visitor$7.build({choice:function(e){var t=null,r=!1;e.alternatives.forEach((function(n,a){var i;u(n);var s=o(n);s?t&&t.ignoreCase===s.ignoreCase?((i=t.parts).push.apply(i,s.parts),e.alternatives[a-1]=t,e.alternatives[a]=t,t.location={source:t.location.source,start:t.location.start,end:s.location.end},r=!0):t=s:t=null})),r&&(e.alternatives=e.alternatives.filter((function(e,t,r){return!t||e!==r[t-1]})),e.alternatives.forEach((function(t,r){"class"===t.type&&(t.parts=cleanParts(t.parts),1!==t.parts.length||Array.isArray(t.parts[0])||t.inverted||(e.alternatives[r]={type:"literal",value:t.parts[0],ignoreCase:t.ignoreCase,location:t.location}))})),1===e.alternatives.length&&cloneOver(e,e.alternatives[0]))},text:function(e){if(u(e.expression),"class"===e.expression.type||"literal"===e.expression.type){var t=e.location;cloneOver(e,e.expression),e.location=t}}})],o=n[0],u=n[1];e.rules.forEach((function(e){r[e.name]=!0,u(e.expression)}))}var mergeCharacterClasses_1=mergeCharacterClasses$1;function reportDuplicateImports$1(e,t,r){for(var n={},o=0,u=e.imports;o<u.length;o++)for(var a=0,i=u[o].what;a<i.length;a++){var s=i[a];"import_binding_all"===s.type&&(Object.prototype.hasOwnProperty.call(n,s.binding)&&r.error('Module "'.concat(s.binding,'" is already imported'),s.location,[{message:"Original module location",location:n[s.binding]}]),n[s.binding]=s.location)}}var reportDuplicateImports_1=reportDuplicateImports$1,visitor$6=visitor_1;function reportDuplicateLabels$1(e,t,r){function n(e){var t={};return Object.keys(e).forEach((function(r){t[r]=e[r]})),t}function o(e,t){u(e.expression,n(t))}var u=visitor$6.build({rule:function(e){u(e.expression,{})},choice:function(e,t){e.alternatives.forEach((function(e){u(e,n(t))}))},action:o,labeled:function(e,t){var n=e.label;n&&Object.prototype.hasOwnProperty.call(t,n)&&r.error('Label "'.concat(e.label,'" is already defined'),e.labelLocation,[{message:"Original label location",location:t[n]}]),u(e.expression,t),t[e.label]=e.labelLocation},text:o,simple_and:o,simple_not:o,optional:o,zero_or_more:o,one_or_more:o,repeated:function(e,t){e.delimiter&&u(e.delimiter,n(t)),u(e.expression,n(t))},group:o});u(e)}var reportDuplicateLabels_1=reportDuplicateLabels$1,visitor$5=visitor_1;function reportDuplicateRules$1(e,t,r){var n={};visitor$5.build({rule:function(e){Object.prototype.hasOwnProperty.call(n,e.name)?r.error('Rule "'.concat(e.name,'" is already defined'),e.nameLocation,[{message:"Original rule location",location:n[e.name]}]):n[e.name]=e.nameLocation}})(e)}var reportDuplicateRules_1=reportDuplicateRules$1,asts$3=asts_1,visitor$4=visitor_1;function reportInfiniteRecursion$1(e,t,r){var n=[],o=[],u=visitor$4.build({rule:function(e){r.errors>0||(n.push(e.name),u(e.expression),n.pop())},sequence:function(t){r.errors>0||t.elements.every((function(t){return u(t),!(r.errors>0||asts$3.alwaysConsumesOnSuccess(e,t))}))},repeated:function(t){r.errors>0||(u(t.expression),t.delimiter&&!asts$3.alwaysConsumesOnSuccess(e,t.expression)&&u(t.delimiter))},rule_ref:function(t){if(!(r.errors>0)){o.push(t);var a=asts$3.findRule(e,t.name);if(-1!==n.indexOf(t.name))return n.push(t.name),void r.error("Possible infinite loop when parsing (left recursion: "+n.join(" -> ")+")",a.nameLocation,o.map((function(e,t,r){return{message:t+1!==r.length?"Step ".concat(t+1,': call of the rule "').concat(e.name,'" without input consumption'):"Step ".concat(t+1,": call itself without input consumption - left recursion"),location:e.location}})));a&&u(a),o.pop()}}});u(e)}var reportInfiniteRecursion_1=reportInfiniteRecursion$1,asts$2=asts_1,visitor$3=visitor_1;function reportInfiniteRepetition$1(e,t,r){var n=visitor$3.build({zero_or_more:function(t){asts$2.alwaysConsumesOnSuccess(e,t.expression)||r.error("Possible infinite loop when parsing (repetition used with an expression that may not consume any input)",t.location)},one_or_more:function(t){asts$2.alwaysConsumesOnSuccess(e,t.expression)||r.error("Possible infinite loop when parsing (repetition used with an expression that may not consume any input)",t.location)},repeated:function(t){if(t.delimiter&&n(t.delimiter),!(asts$2.alwaysConsumesOnSuccess(e,t.expression)||t.delimiter&&asts$2.alwaysConsumesOnSuccess(e,t.delimiter)))if(null===t.max.value)r.error("Possible infinite loop when parsing (unbounded range repetition used with an expression that may not consume any input)",t.location);else{var o=t.min?t.min:t.max;r.warning("constant"===o.type&&"constant"===t.max.type?"An expression may not consume any input and may always match ".concat(t.max.value," times"):"An expression may not consume any input and may always match with a maximum repetition count",t.location)}}});n(e)}var reportInfiniteRepetition_1=reportInfiniteRepetition$1,asts$1=asts_1,visitor$2=visitor_1;function reportUndefinedRules$1(e,t,r){visitor$2.build({rule_ref:function(t){asts$1.findRule(e,t.name)||r.error('Rule "'.concat(t.name,'" is not defined'),t.location)}})(e)}var reportUndefinedRules_1=reportUndefinedRules$1,visitor$1=visitor_1;function reportIncorrectPlucking$1(e,t,r){var n=visitor$1.build({action:function(e){n(e.expression,e)},labeled:function(e,t){e.pick&&t&&r.error('"@" cannot be used with an action block',e.labelLocation,[{message:"Action block location",location:t.codeLocation}]),n(e.expression)}});n(e)}var reportIncorrectPlucking_1=reportIncorrectPlucking$1,__spreadArray=commonjsGlobal&&commonjsGlobal.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,o=0,u=t.length;o<u;o++)!n&&o in t||(n||(n=Array.prototype.slice.call(t,0,o)),n[o]=t[o]);return e.concat(n||Array.prototype.slice.call(t))},GrammarError$1=grammarError,Defaults=function(){function e(e){"function"==typeof(e=void 0!==e?e:{}).error&&(this.error=e.error),"function"==typeof e.warning&&(this.warning=e.warning),"function"==typeof e.info&&(this.info=e.info)}return e.prototype.error=function(){},e.prototype.warning=function(){},e.prototype.info=function(){},e}(),Session$1=function(){function e(e){this._callbacks=new Defaults(e),this._firstError=null,this.errors=0,this.problems=[],this.stage=null}return e.prototype.error=function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];++this.errors,null===this._firstError&&(this._firstError=new(GrammarError$1.bind.apply(GrammarError$1,__spreadArray([void 0],t,!1))),this._firstError.stage=this.stage,this._firstError.problems=this.problems),this.problems.push(__spreadArray(["error"],t,!0)),(e=this._callbacks).error.apply(e,__spreadArray([this.stage],t,!1))},e.prototype.warning=function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.problems.push(__spreadArray(["warning"],t,!0)),(e=this._callbacks).warning.apply(e,__spreadArray([this.stage],t,!1))},e.prototype.info=function(){for(var e,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this.problems.push(__spreadArray(["info"],t,!0)),(e=this._callbacks).info.apply(e,__spreadArray([this.stage],t,!1))},e.prototype.checkErrors=function(){if(0!==this.errors)throw this._firstError},e}(),session=Session$1,addImportedRules=addImportedRules_1,fixLibraryNumbers=fixLibraryNumbers_1,generateBytecode=generateBytecode_1,generateJS=generateJs,inferenceMatchResult=inferenceMatchResult_1,removeProxyRules=removeProxyRules_1,mergeCharacterClasses=mergeCharacterClasses_1,reportDuplicateImports=reportDuplicateImports_1,reportDuplicateLabels=reportDuplicateLabels_1,reportDuplicateRules=reportDuplicateRules_1,reportInfiniteRecursion=reportInfiniteRecursion_1,reportInfiniteRepetition=reportInfiniteRepetition_1,reportUndefinedRules=reportUndefinedRules_1,reportIncorrectPlucking=reportIncorrectPlucking_1,Session=session,visitor=visitor_1,base64=utils.base64;function processOptions(e,t){var r={};return Object.keys(e).forEach((function(t){r[t]=e[t]})),Object.keys(t).forEach((function(e){Object.prototype.hasOwnProperty.call(r,e)||(r[e]=t[e])})),r}function isSourceMapCapable(e){return"string"==typeof e?e.length>0:e&&"function"==typeof e.offset}var compiler$1={visitor:visitor,passes:{prepare:[addImportedRules,reportInfiniteRecursion],check:[reportUndefinedRules,reportDuplicateRules,reportDuplicateLabels,reportInfiniteRepetition,reportIncorrectPlucking,reportDuplicateImports],transform:[fixLibraryNumbers,removeProxyRules,mergeCharacterClasses,inferenceMatchResult],generate:[generateBytecode,generateJS]},compile:function(ast,passes,options){if(options=void 0!==options?options:{},options=processOptions(options,{allowedStartRules:[ast.rules[0].name],cache:!1,dependencies:{},exportVar:null,format:"bare",output:"parser",trace:!1}),!Array.isArray(options.allowedStartRules))throw new Error("allowedStartRules must be an array");if(0===options.allowedStartRules.length)throw new Error("Must have at least one start rule");var allRules=ast.rules.map((function(e){return e.name}));if(options.allowedStartRules.some((function(e){return"*"===e})))options.allowedStartRules=allRules;else for(var _i=0,_a=options.allowedStartRules;_i<_a.length;_i++){var rule=_a[_i];if(-1===allRules.indexOf(rule))throw new Error('Unknown start rule "'.concat(rule,'"'))}if(("source-and-map"===options.output||"source-with-inline-map"===options.output)&&!isSourceMapCapable(options.grammarSource))throw new Error("Must provide grammarSource (as a string or GrammarLocation) in order to generate source maps");var session=new Session(options);switch(Object.keys(passes).forEach((function(e){session.stage=e,session.info("Process stage ".concat(e)),passes[e].forEach((function(t){session.info("Process pass ".concat(e,".").concat(t.name)),t(ast,options,session)})),session.checkErrors()})),options.output){case"parser":return eval(ast.code.toString());case"source":return ast.code.toString();case"source-and-map":return ast.code;case"source-with-inline-map":if("undefined"==typeof TextEncoder)throw new Error("TextEncoder is not supported by this platform");var sourceMap=ast.code.toStringWithSourceMap(),encoder=new TextEncoder,b64=base64(encoder.encode(JSON.stringify(sourceMap.map.toJSON())));return sourceMap.code+"//# sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(b64,"\n");case"ast":return ast;default:throw new Error("Invalid output format: "+options.output+".")}}},compiler_1=compiler$1,GrammarError=grammarError,GrammarLocation=grammarLocation,asts=asts_1,compiler=compiler_1,parser=parser$1,VERSION=version,RESERVED_WORDS=["break","case","catch","class","const","continue","debugger","default","delete","do","else","export","extends","finally","for","function","if","import","in","instanceof","new","return","super","switch","this","throw","try","typeof","var","void","while","with","null","true","false","enum","implements","interface","let","package","private","protected","public","static","yield","await","arguments","eval"],peg={VERSION:VERSION,RESERVED_WORDS:RESERVED_WORDS,GrammarError:GrammarError,GrammarLocation:GrammarLocation,parser:parser,compiler:compiler,generate:function(e,t){var r,n,o="plugins"in(t=void 0!==t?t:{})?t.plugins:[],u={parser:peg.parser,passes:(r=peg.compiler.passes,n={},Object.keys(r).forEach((function(e){n[e]=r[e].slice()})),n),reservedWords:peg.RESERVED_WORDS.slice()};o.forEach((function(e){e.use(u,t)})),Array.isArray(e)||(e=[{source:t.grammarSource,text:e}]);var a=asts.combine(e.map((function(e){var t=e.source,r=e.text;return u.parser.parse(r,{grammarSource:t,reservedWords:u.reservedWords})})));return peg.compiler.compile(a,u.passes,t)}},peg_1=peg,peg$1=getDefaultExportFromCjs(peg_1);return peg$1}));