php-parser
Version:
Parse PHP code from JS and returns its AST
2 lines • 114 kB
JavaScript
/*! For license information please see php-parser.min.js.LICENSE.txt */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.PhpParser=e():t.PhpParser=e()}(self,(function(){return(()=>{"use strict";var t={555:(t,e,i)=>{var s=i(1907),n=i(7724),r=function(t,e){this.withPositions=t,this.withSource=e};r.prototype.position=function(t){return new n(t.lexer.yylloc.first_line,t.lexer.yylloc.first_column,t.lexer.yylloc.first_offset)},r.precedence={},[["or"],["xor"],["and"],["="],["?"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","!=","===","!==","<=>"],["<","<=",">",">="],["<<",">>"],["+","-","."],["*","/","%"],["!"],["instanceof"],["cast","silent"],["**"]].forEach((function(t,e){t.forEach((function(t){r.precedence[t]=e+1}))})),r.prototype.isRightAssociative=function(t){return"**"===t||"??"===t},r.prototype.swapLocations=function(t,e,i,s){this.withPositions&&(t.loc.start=e.loc.start,t.loc.end=i.loc.end,this.withSource&&(t.loc.source=s.lexer._input.substring(t.loc.start.offset,t.loc.end.offset)))},r.prototype.resolveLocations=function(t,e,i,s){this.withPositions&&(t.loc.start.offset>e.loc.start.offset&&(t.loc.start=e.loc.start),t.loc.end.offset<i.loc.end.offset&&(t.loc.end=i.loc.end),this.withSource&&(t.loc.source=s.lexer._input.substring(t.loc.start.offset,t.loc.end.offset)))},r.prototype.resolvePrecedence=function(t,e){var i,s,n;return"call"===t.kind?this.resolveLocations(t,t.what,t,e):"propertylookup"===t.kind||"staticlookup"===t.kind||"offsetlookup"===t.kind&&t.offset?this.resolveLocations(t,t.what,t.offset,e):"bin"===t.kind?t.right&&!t.right.parenthesizedExpression&&("bin"===t.right.kind?(s=r.precedence[t.type],n=r.precedence[t.right.type],s&&n&&n<=s&&(t.type!==t.right.type||!this.isRightAssociative(t.type))&&(i=t.right,t.right=t.right.left,this.swapLocations(t,t.left,t.right,e),i.left=this.resolvePrecedence(t,e),this.swapLocations(i,i.left,i.right,e),t=i)):"retif"===t.right.kind&&(s=r.precedence[t.type],n=r.precedence["?"],s&&n&&n<=s&&(i=t.right,t.right=t.right.test,this.swapLocations(t,t.left,t.right,e),i.test=this.resolvePrecedence(t,e),this.swapLocations(i,i.test,i.falseExpr,e),t=i))):"silent"!==t.kind&&"cast"!==t.kind||!t.expr||t.expr.parenthesizedExpression?"unary"===t.kind?t.what&&!t.what.parenthesizedExpression&&("bin"===t.what.kind?(i=t.what,t.what=t.what.left,this.swapLocations(t,t,t.what,e),i.left=this.resolvePrecedence(t,e),this.swapLocations(i,i.left,i.right,e),t=i):"retif"===t.what.kind&&(i=t.what,t.what=t.what.test,this.swapLocations(t,t,t.what,e),i.test=this.resolvePrecedence(t,e),this.swapLocations(i,i.test,i.falseExpr,e),t=i)):"retif"===t.kind?t.falseExpr&&"retif"===t.falseExpr.kind&&!t.falseExpr.parenthesizedExpression&&(i=t.falseExpr,t.falseExpr=i.test,this.swapLocations(t,t.test,t.falseExpr,e),i.test=this.resolvePrecedence(t,e),this.swapLocations(i,i.test,i.falseExpr,e),t=i):"assign"===t.kind?t.right&&"bin"===t.right.kind&&!t.right.parenthesizedExpression&&(s=r.precedence["="],n=r.precedence[t.right.type],s&&n&&n<s&&(i=t.right,t.right=t.right.left,i.left=t,this.swapLocations(i,i.left,t.right,e),t=i)):"expressionstatement"===t.kind&&this.swapLocations(t,t.expression,t,e):"bin"===t.expr.kind?(i=t.expr,t.expr=t.expr.left,this.swapLocations(t,t,t.expr,e),i.left=this.resolvePrecedence(t,e),this.swapLocations(i,i.left,i.right,e),t=i):"retif"===t.expr.kind&&(i=t.expr,t.expr=t.expr.test,this.swapLocations(t,t,t.expr,e),i.test=this.resolvePrecedence(t,e),this.swapLocations(i,i.test,i.falseExpr,e),t=i),t},r.prototype.prepare=function(t,e,i){var h=null;(this.withPositions||this.withSource)&&(h=this.position(i));var o=this,_=function _(){var a=null,l=Array.prototype.slice.call(arguments);if(l.push(e),o.withPositions||o.withSource){var c=null;o.withSource&&(c=i.lexer._input.substring(h.offset,i.prev[2])),a=new s(c,h,new n(i.prev[0],i.prev[1],i.prev[2])),l.push(a)}t||(t=l.shift());var T=o[t];if("function"!=typeof T)throw new Error('Undefined node "'+t+'"');var u=Object.create(T.prototype);return T.apply(u,l),_.instance=u,_.trailingComments&&(u.trailingComments=_.trailingComments),"function"==typeof _.postBuild&&_.postBuild(u),i.debug&&delete r.stack[_.stackUid],o.resolvePrecedence(u,i)};return i.debug&&(r.stack||(r.stack={},r.stackUid=1),r.stack[++r.stackUid]={position:h,stack:(new Error).stack.split("\n").slice(3,5)},_.stackUid=r.stackUid),_.setTrailingComments=function(t){_.instance?_.instance.setTrailingComments(t):_.trailingComments=t},_.destroy=function(t){e&&(t?t.leadingComments?t.leadingComments=e.concat(t.leadingComments):t.leadingComments=e:i._docIndex=i._docs.length-e.length),i.debug&&delete r.stack[_.stackUid]},_},r.prototype.checkNodes=function(){var t=[];for(var e in r.stack)r.stack.hasOwnProperty(e)&&t.push(r.stack[e]);return r.stack={},t},[i(1538),i(4253),i(1997),i(1889),i(4230),i(2325),i(504),i(2271),i(5871),i(1578),i(7521),i(8212),i(1119),i(5178),i(4027),i(5436),i(5411),i(2001),i(6659),i(387),i(408),i(7224),i(6560),i(9036),i(4067),i(2514),i(8014),i(4395),i(4514),i(6129),i(3321),i(3689),i(4042),i(5886),i(6389),i(1530),i(9317),i(4607),i(358),i(1057),i(7887),i(7752),i(6547),i(6403),i(5851),i(8454),i(7133),i(7298),i(9132),i(9522),i(298),i(6602),i(7592),i(679),i(3110),i(3174),i(8356),i(3725),i(2730),i(2450),i(1358),i(8588),i(1480),i(368),i(6210),i(9281),i(1771),i(8377),i(5003),i(6340),i(1558),i(3429),i(6966),i(2037),i(1211),i(4847),i(619),i(5182),i(7228),i(2898),i(5037),i(9732),i(8409),i(2941),i(7129),i(2589),i(5228),i(2523),i(8084),i(4398),i(3181),i(8466),i(8062),i(6178),i(2379),i(3693),i(7880),i(6520),i(3656),i(41),i(288),i(8789)].forEach((function(t){r.prototype[t.kind]=t})),t.exports=r},1538:(t,e,i)=>{var s=i(1530),n="array";t.exports=s.extends(n,(function(t,e,i,r){s.apply(this,[n,i,r]),this.items=e,this.shortForm=t}))},4253:(t,e,i)=>{var s=i(1530),n="arrowfunc";t.exports=s.extends(n,(function(t,e,i,r,h,o,_,a){s.apply(this,[n,_,a]),this.arguments=t,this.byref=e,this.body=i,this.type=r,this.nullable=h,this.isStatic=o||!1}))},1997:(t,e,i)=>{var s=i(1530),n="assign";t.exports=s.extends(n,(function(t,e,i,r,h){s.apply(this,[n,r,h]),this.left=t,this.right=e,this.operator=i}))},1889:(t,e,i)=>{var s=i(1530),n="assignref";t.exports=s.extends(n,(function(t,e,i,r){s.apply(this,[n,i,r]),this.left=t,this.right=e}))},4230:(t,e,i)=>{var s=i(6210);t.exports=s.extends("bin",(function(t,e,i,n,r){s.apply(this,["bin",n,r]),this.type=t,this.left=e,this.right=i}))},2325:(t,e,i)=>{var s=i(2898),n="block";t.exports=s.extends(n,(function(t,e,i,r){s.apply(this,[t||n,i,r]),this.children=e.filter(Boolean)}))},504:(t,e,i)=>{var s=i(6602),n="boolean";t.exports=s.extends(n,(function(t,e,i,r){s.apply(this,[n,t,e,i,r])}))},2271:(t,e,i)=>{var s=i(2898),n="break";t.exports=s.extends(n,(function(t,e,i){s.apply(this,[n,e,i]),this.level=t}))},5871:(t,e,i)=>{var s=i(1530),n="byref";t.exports=s.extends(n,(function(t,e,i){s.apply(this,[n,e,i]),this.what=t}))},1578:(t,e,i)=>{var s=i(1530),n="call";t.exports=s.extends(n,(function(t,e,i,r){s.apply(this,[n,i,r]),this.what=t,this.arguments=e}))},7521:(t,e,i)=>{var s=i(2898),n="case";t.exports=s.extends(n,(function(t,e,i,r){s.apply(this,[n,i,r]),this.test=t,this.body=e}))},8212:(t,e,i)=>{var s=i(6210),n="cast";t.exports=s.extends(n,(function(t,e,i,r,h){s.apply(this,[n,r,h]),this.type=t,this.raw=e,this.expr=i}))},1119:(t,e,i)=>{var s=i(2898),n="catch";t.exports=s.extends(n,(function(t,e,i,r,h){s.apply(this,[n,r,h]),this.body=t,this.what=e,this.variable=i}))},5178:(t,e,i)=>{var s=i(9036),n="class";t.exports=s.extends(n,(function(t,e,i,r,h,o,_){s.apply(this,[n,t,o,_]),this.isAnonymous=!t,this.extends=e,this.implements=i,this.body=r,this.parseFlags(h)}))},4027:(t,e,i)=>{var s=i(7224),n="classconstant",r=s.extends(n,(function(t,e,i,r,h){s.apply(this,[t||n,e,r,h]),this.parseFlags(i)}));r.prototype.parseFlags=function(t){-1===t[0]?this.visibility="":null===t[0]?this.visibility=null:0===t[0]?this.visibility="public":1===t[0]?this.visibility="protected":2===t[0]&&(this.visibility="private")},t.exports=r},5436:(t,e,i)=>{var s=i(1530),n="clone";t.exports=s.extends(n,(function(t,e,i){s.apply(this,[n,e,i]),this.what=t}))},5411:(t,e,i)=>{var s=i(1530),n="closure";t.exports=s.extends(n,(function(t,e,i,r,h,o,_,a){s.apply(this,[n,_,a]),this.uses=i,this.arguments=t,this.byref=e,this.type=r,this.nullable=h,this.isStatic=o||!1,this.body=null}))},2001:(t,e,i)=>{var s=i(2730);t.exports=s.extends("comment",(function(t,e,i,n){s.apply(this,[t,i,n]),this.value=e}))},6659:(t,e,i)=>{var s=i(2001),n="commentblock";t.exports=s.extends(n,(function(t,e,i){s.apply(this,[n,t,e,i])}))},387:(t,e,i)=>{var s=i(2001),n="commentline";t.exports=s.extends(n,(function(t,e,i){s.apply(this,[n,t,e,i])}))},408:(t,e,i)=>{var s=i(2730),n="constant";t.exports=s.extends(n,(function(t,e,i,r){s.apply(this,[n,i,r]),this.name=t,this.value=e}))},7224:(t,e,i)=>{var s=i(2898),n="constantstatement";t.exports=s.extends(n,(function(t,e,i,r){s.apply(this,[t||n,i,r]),this.constants=e}))},6560:(t,e,i)=>{var s=i(2898),n="continue";t.exports=s.extends(n,(function(t,e,i){s.apply(this,[n,e,i]),this.level=t}))},9036:(t,e,i)=>{var s=i(2898),n="declaration",r=s.extends(n,(function(t,e,i,r){s.apply(this,[t||n,i,r]),this.name=e}));r.prototype.parseFlags=function(t){this.isAbstract=1===t[2],this.isFinal=2===t[2],"class"!==this.kind&&(-1===t[0]?this.visibility="":null===t[0]?this.visibility=null:0===t[0]?this.visibility="public":1===t[0]?this.visibility="protected":2===t[0]&&(this.visibility="private"),this.isStatic=1===t[1])},t.exports=r},4067:(t,e,i)=>{var s=i(2325),n="declare",r=s.extends(n,(function(t,e,i,r,h){s.apply(this,[n,e,r,h]),this.directives=t,this.mode=i}));r.MODE_SHORT="short",r.MODE_BLOCK="block",r.MODE_NONE="none",t.exports=r},2514:(t,e,i)=>{var s=i(2730),n="declaredirective";t.exports=s.extends(n,(function(t,e,i,r){s.apply(this,[n,i,r]),this.key=t,this.value=e}))},8014:(t,e,i)=>{var s=i(2898);t.exports=s.extends("do",(function(t,e,i,n){s.apply(this,["do",i,n]),this.test=t,this.body=e}))},4395:(t,e,i)=>{var s=i(2898),n="echo";t.exports=s.extends(n,(function(t,e,i,r){s.apply(this,[n,i,r]),this.shortForm=e,this.expressions=t}))},4514:(t,e,i)=>{var s=i(1530),n="empty";t.exports=s.extends(n,(function(t,e,i){s.apply(this,[n,e,i]),this.expression=t}))},6129:(t,e,i)=>{var s=i(6602),n="encapsed",r=s.extends(n,(function(t,e,i,r,h){s.apply(this,[n,t,e,r,h]),this.type=i}));r.TYPE_STRING="string",r.TYPE_SHELL="shell",r.TYPE_HEREDOC="heredoc",r.TYPE_OFFSET="offset",t.exports=r},3321:(t,e,i)=>{var s=i(1530),n="encapsedpart";t.exports=s.extends(n,(function(t,e,i,r,h){s.apply(this,[n,r,h]),this.expression=t,this.syntax=e,this.curly=i}))},3689:(t,e,i)=>{var s=i(1530),n="entry";t.exports=s.extends(n,(function(t,e,i,r,h,o){s.apply(this,[n,h,o]),this.key=t,this.value=e,this.byRef=i,this.unpack=r}))},4042:(t,e,i)=>{var s=i(2730),n="error";t.exports=s.extends(n,(function(t,e,i,r,h,o){s.apply(this,[n,h,o]),this.message=t,this.token=e,this.line=i,this.expected=r}))},5886:(t,e,i)=>{var s=i(1530),n="eval";t.exports=s.extends(n,(function(t,e,i){s.apply(this,[n,e,i]),this.source=t}))},6389:(t,e,i)=>{var s=i(1530),n="exit";t.exports=s.extends(n,(function(t,e,i,r){s.apply(this,[n,i,r]),this.expression=t,this.useDie=e}))},1530:(t,e,i)=>{var s=i(2730),n="expression";t.exports=s.extends(n,(function(t,e,i){s.apply(this,[t||n,e,i])}))},9317:(t,e,i)=>{var s=i(2898),n="expressionstatement";t.exports=s.extends(n,(function(t,e,i){s.apply(this,[n,e,i]),this.expression=t}))},4607:(t,e,i)=>{var s=i(2898);t.exports=s.extends("for",(function(t,e,i,n,r,h,o){s.apply(this,["for",h,o]),this.init=t,this.test=e,this.increment=i,this.shortForm=r,this.body=n}))},358:(t,e,i)=>{var s=i(2898),n="foreach";t.exports=s.extends(n,(function(t,e,i,r,h,o,_){s.apply(this,[n,o,_]),this.source=t,this.key=e,this.value=i,this.shortForm=h,this.body=r}))},1057:(t,e,i)=>{var s=i(9036),n="function";t.exports=s.extends(n,(function(t,e,i,r,h,o,_){s.apply(this,[n,t,o,_]),this.arguments=e,this.byref=i,this.type=r,this.nullable=h,this.body=null}))},7887:(t,e,i)=>{var s=i(2898),n="global";t.exports=s.extends(n,(function(t,e,i){s.apply(this,[n,e,i]),this.items=t}))},7752:(t,e,i)=>{var s=i(2898),n="goto";t.exports=s.extends(n,(function(t,e,i){s.apply(this,[n,e,i]),this.label=t}))},6547:(t,e,i)=>{var s=i(2898),n="halt";t.exports=s.extends(n,(function(t,e,i){s.apply(this,[n,e,i]),this.after=t}))},6403:(t,e,i)=>{var s=i(2730),n="identifier",r=s.extends(n,(function(t,e,i){s.apply(this,[n,e,i]),this.name=t}));t.exports=r},5851:(t,e,i)=>{var s=i(2898);t.exports=s.extends("if",(function(t,e,i,n,r,h){s.apply(this,["if",r,h]),this.test=t,this.body=e,this.alternate=i,this.shortForm=n}))},8454:(t,e,i)=>{var s=i(1530),n="include";t.exports=s.extends(n,(function(t,e,i,r,h){s.apply(this,[n,r,h]),this.once=t,this.require=e,this.target=i}))},7133:(t,e,i)=>{var s=i(6602),n="inline";t.exports=s.extends(n,(function(t,e,i,r){s.apply(this,[n,t,e,i,r])}))},7298:(t,e,i)=>{var s=i(9036),n="interface";t.exports=s.extends(n,(function(t,e,i,r,h){s.apply(this,[n,t,r,h]),this.extends=e,this.body=i}))},9132:(t,e,i)=>{var s=i(1530),n="isset";t.exports=s.extends(n,(function(t,e,i){s.apply(this,[n,e,i]),this.variables=t}))},9522:(t,e,i)=>{var s=i(2898),n="label";t.exports=s.extends(n,(function(t,e,i){s.apply(this,[n,e,i]),this.name=t}))},298:(t,e,i)=>{var s=i(1530),n="list";t.exports=s.extends(n,(function(t,e,i,r){s.apply(this,[n,i,r]),this.items=t,this.shortForm=e}))},6602:(t,e,i)=>{var s=i(1530),n="literal";t.exports=s.extends(n,(function(t,e,i,r,h){s.apply(this,[t||n,r,h]),this.value=e,i&&(this.raw=i)}))},1907:t=>{t.exports=function(t,e,i){this.source=t,this.start=e,this.end=i}},7592:(t,e,i)=>{var s=i(1530),n="lookup";t.exports=s.extends(n,(function(t,e,i,r,h){s.apply(this,[t||n,r,h]),this.what=e,this.offset=i}))},679:(t,e,i)=>{var s=i(6602),n="magic";t.exports=s.extends(n,(function(t,e,i,r){s.apply(this,[n,t,e,i,r])}))},3110:(t,e,i)=>{var s=i(1057),n="method";t.exports=s.extends(n,(function(){s.apply(this,arguments),this.kind=n}))},3174:(t,e,i)=>{var s=i(1211),n="name",r=s.extends(n,(function t(e,i,r,h){s.apply(this,[n,r,h]),i?this.resolution=t.RELATIVE_NAME:1===e.length?this.resolution=t.UNQUALIFIED_NAME:e[0]?this.resolution=t.QUALIFIED_NAME:this.resolution=t.FULL_QUALIFIED_NAME,this.name=e.join("\\")}));r.UNQUALIFIED_NAME="uqn",r.QUALIFIED_NAME="qn",r.FULL_QUALIFIED_NAME="fqn",r.RELATIVE_NAME="rn",t.exports=r},8356:(t,e,i)=>{var s=i(2325),n="namespace";t.exports=s.extends(n,(function(t,e,i,r,h){s.apply(this,[n,e,r,h]),this.name=t,this.withBrackets=i||!1}))},3725:(t,e,i)=>{var s=i(1530);t.exports=s.extends("new",(function(t,e,i,n){s.apply(this,["new",i,n]),this.what=t,this.arguments=e}))},2730:t=>{var e=function(t,e,i){this.kind=t,e&&(this.leadingComments=e),i&&(this.loc=i)};e.prototype.setTrailingComments=function(t){this.trailingComments=t},e.prototype.destroy=function(t){if(!t)throw new Error("Node already initialized, you must swap with another node");return this.leadingComments&&(t.leadingComments?t.leadingComments=Array.concat(this.leadingComments,t.leadingComments):t.leadingComments=this.leadingComments),this.trailingComments&&(t.trailingComments?t.trailingComments=Array.concat(this.trailingComments,t.trailingComments):t.trailingComments=this.trailingComments),t},e.prototype.includeToken=function(t){return this.loc&&(this.loc.end&&(this.loc.end.line=t.lexer.yylloc.last_line,this.loc.end.column=t.lexer.yylloc.last_column,this.loc.end.offset=t.lexer.offset),t.ast.withSource&&(this.loc.source=t.lexer._input.substring(this.loc.start.offset,t.lexer.offset))),this},e.extends=function(t,e){return e.prototype=Object.create(this.prototype),e.extends=this.extends,e.prototype.constructor=e,e.kind=t,e},t.exports=e},2450:(t,e,i)=>{var s=i(2730),n="noop";t.exports=s.extends(n,(function(t,e){s.apply(this,[n,t,e])}))},1358:(t,e,i)=>{var s=i(6602),n="nowdoc";t.exports=s.extends(n,(function(t,e,i,r,h){s.apply(this,[n,t,e,r,h]),this.label=i}))},8588:(t,e,i)=>{var s=i(2730),n="nullkeyword";t.exports=s.extends(n,(function(t,e,i){s.apply(this,[n,e,i]),this.raw=t}))},1480:(t,e,i)=>{var s=i(6602),n="number";t.exports=s.extends(n,(function(t,e,i,r){s.apply(this,[n,t,e,i,r])}))},368:(t,e,i)=>{var s=i(7592),n="offsetlookup";t.exports=s.extends(n,(function(t,e,i,r){s.apply(this,[n,t,e,i,r])}))},6210:(t,e,i)=>{var s=i(1530),n="operation";t.exports=s.extends(n,(function(t,e,i){s.apply(this,[t||n,e,i])}))},9281:(t,e,i)=>{var s=i(9036),n="parameter";t.exports=s.extends(n,(function(t,e,i,r,h,o,_,a){s.apply(this,[n,t,_,a]),this.value=i,this.type=e,this.byref=r,this.variadic=h,this.nullable=o}))},1771:(t,e,i)=>{var s=i(1211),n="parentreference",r=s.extends(n,(function(t,e,i){s.apply(this,[n,e,i]),this.raw=t}));t.exports=r},7724:t=>{t.exports=function(t,e,i){this.line=t,this.column=e,this.offset=i}},8377:(t,e,i)=>{var s=i(6210),n="post";t.exports=s.extends(n,(function(t,e,i,r){s.apply(this,[n,i,r]),this.type=t,this.what=e}))},5003:(t,e,i)=>{var s=i(6210);t.exports=s.extends("pre",(function(t,e,i,n){s.apply(this,["pre",i,n]),this.type=t,this.what=e}))},6340:(t,e,i)=>{var s=i(1530),n="print";t.exports=s.extends(n,(function(t,e,i){s.apply(this,[n,e,i]),this.expression=t}))},1558:(t,e,i)=>{var s=i(2325),n="program";t.exports=s.extends(n,(function(t,e,i,r,h,o){s.apply(this,[n,t,h,o]),this.errors=e,i&&(this.comments=i),r&&(this.tokens=r)}))},3429:(t,e,i)=>{var s=i(2898),n="property";t.exports=s.extends(n,(function(t,e,i,r,h,o){s.apply(this,[n,h,o]),this.name=t,this.value=e,this.nullable=i,this.type=r}))},6966:(t,e,i)=>{var s=i(7592),n="propertylookup";t.exports=s.extends(n,(function(t,e,i,r){s.apply(this,[n,t,e,i,r])}))},2037:(t,e,i)=>{var s=i(2898),n="propertystatement",r=s.extends(n,(function(t,e,i,r,h){s.apply(this,[n,r,h]),this.properties=e,this.parseFlags(i)}));r.prototype.parseFlags=function(t){-1===t[0]?this.visibility="":null===t[0]?this.visibility=null:0===t[0]?this.visibility="public":1===t[0]?this.visibility="protected":2===t[0]&&(this.visibility="private"),this.isStatic=1===t[1]},t.exports=r},1211:(t,e,i)=>{var s=i(2730),n="reference",r=s.extends(n,(function(t,e,i){s.apply(this,[t||n,e,i])}));t.exports=r},4847:(t,e,i)=>{var s=i(1530),n="retif";t.exports=s.extends(n,(function(t,e,i,r,h){s.apply(this,[n,r,h]),this.test=t,this.trueExpr=e,this.falseExpr=i}))},619:(t,e,i)=>{var s=i(2898),n="return";t.exports=s.extends(n,(function(t,e,i){s.apply(this,[n,e,i]),this.expr=t}))},5182:(t,e,i)=>{var s=i(1211),n="selfreference",r=s.extends(n,(function(t,e,i){s.apply(this,[n,e,i]),this.raw=t}));t.exports=r},7228:(t,e,i)=>{var s=i(1530),n="silent";t.exports=s.extends(n,(function(t,e,i){s.apply(this,[n,e,i]),this.expr=t}))},2898:(t,e,i)=>{var s=i(2730),n="statement";t.exports=s.extends(n,(function(t,e,i){s.apply(this,[t||n,e,i])}))},5037:(t,e,i)=>{var s=i(2898),n="static";t.exports=s.extends(n,(function(t,e,i){s.apply(this,[n,e,i]),this.variables=t}))},8409:(t,e,i)=>{var s=i(7592),n="staticlookup";t.exports=s.extends(n,(function(t,e,i,r){s.apply(this,[n,t,e,i,r])}))},2941:(t,e,i)=>{var s=i(1211),n="staticreference",r=s.extends(n,(function(t,e,i){s.apply(this,[n,e,i]),this.raw=t}));t.exports=r},9732:(t,e,i)=>{var s=i(2730),n="staticvariable";t.exports=s.extends(n,(function(t,e,i,r){s.apply(this,[n,i,r]),this.variable=t,this.defaultValue=e}))},7129:(t,e,i)=>{var s=i(6602),n="string";t.exports=s.extends(n,(function(t,e,i,r,h,o){s.apply(this,[n,e,r,h,o]),this.unicode=i,this.isDoubleQuote=t}))},2589:(t,e,i)=>{var s=i(2898),n="switch";t.exports=s.extends(n,(function(t,e,i,r,h){s.apply(this,[n,r,h]),this.test=t,this.body=e,this.shortForm=i}))},5228:(t,e,i)=>{var s=i(2898),n="throw";t.exports=s.extends(n,(function(t,e,i){s.apply(this,[n,e,i]),this.what=t}))},2523:(t,e,i)=>{var s=i(9036),n="trait";t.exports=s.extends(n,(function(t,e,i,r){s.apply(this,[n,t,i,r]),this.body=e}))},8084:(t,e,i)=>{var s=i(2730),n="traitalias";t.exports=s.extends(n,(function(t,e,i,r,h,o){s.apply(this,[n,h,o]),this.trait=t,this.method=e,this.as=i,this.visibility="",r&&(0===r[0]?this.visibility="public":1===r[0]?this.visibility="protected":2===r[0]&&(this.visibility="private"))}))},4398:(t,e,i)=>{var s=i(2730),n="traitprecedence";t.exports=s.extends(n,(function(t,e,i,r,h){s.apply(this,[n,r,h]),this.trait=t,this.method=e,this.instead=i}))},3181:(t,e,i)=>{var s=i(2730),n="traituse";t.exports=s.extends(n,(function(t,e,i,r){s.apply(this,[n,i,r]),this.traits=t,this.adaptations=e}))},8466:(t,e,i)=>{var s=i(2898);t.exports=s.extends("try",(function(t,e,i,n,r){s.apply(this,["try",n,r]),this.body=t,this.catches=e,this.always=i}))},8062:(t,e,i)=>{var s=i(1211),n="typereference",r=s.extends(n,(function(t,e,i,r){s.apply(this,[n,i,r]),this.name=t,this.raw=e}));r.types=["int","float","string","bool","object","array","callable","iterable","void"],t.exports=r},6178:(t,e,i)=>{var s=i(6210),n="unary";t.exports=s.extends(n,(function(t,e,i,r){s.apply(this,[n,i,r]),this.type=t,this.what=e}))},2379:(t,e,i)=>{var s=i(2898),n="unset";t.exports=s.extends(n,(function(t,e,i){s.apply(this,[n,e,i]),this.variables=t}))},3693:(t,e,i)=>{var s=i(2898),n="usegroup";t.exports=s.extends(n,(function(t,e,i,r,h){s.apply(this,[n,r,h]),this.name=t,this.type=e,this.items=i}))},7880:(t,e,i)=>{var s=i(2898),n="useitem",r=s.extends(n,(function(t,e,i,r,h){s.apply(this,[n,r,h]),this.name=t,this.alias=e,this.type=i}));r.TYPE_CONST="const",r.TYPE_FUNCTION="function",t.exports=r},6520:(t,e,i)=>{var s=i(1530),n="variable";t.exports=s.extends(n,(function(t,e,i,r){s.apply(this,[n,i,r]),this.name=t,this.curly=e||!1}))},3656:(t,e,i)=>{var s=i(1530),n="variadic";t.exports=s.extends(n,(function(t,e,i){s.apply(this,[n,e,i]),this.what=t}))},41:(t,e,i)=>{var s=i(2898),n="while";t.exports=s.extends(n,(function(t,e,i,r,h){s.apply(this,[n,r,h]),this.test=t,this.body=e,this.shortForm=i}))},288:(t,e,i)=>{var s=i(1530),n="yield";t.exports=s.extends(n,(function(t,e,i,r){s.apply(this,[n,i,r]),this.value=t,this.key=e}))},8789:(t,e,i)=>{var s=i(1530),n="yieldfrom";t.exports=s.extends(n,(function(t,e,i){s.apply(this,[n,e,i]),this.value=t}))},1427:(t,e,i)=>{function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var n=i(8720),r=i(8410),h=i(6455),o=i(555);function _(t,e){for(var i=Object.keys(t),n=i.length;n--;){var r=i[n],h=t[r];null===h?delete e[r]:"function"==typeof h?e[r]=h.bind(e):Array.isArray(h)?e[r]=Array.isArray(e[r])?e[r].concat(h):h:"object"===s(h)?e[r]="object"===s(e[r])?_(h,e[r]):h:e[r]=h}return e}var a=function(t){if("function"==typeof this)return new this(t);if(this.tokens=h,this.lexer=new n(this),this.ast=new o,this.parser=new r(this.lexer,this.ast),t&&"object"===s(t)){if(t.parser&&(t.lexer||(t.lexer={}),t.parser.version)){if("string"==typeof t.parser.version){var e=t.parser.version.split(".");if(e=100*parseInt(e[0])+parseInt(e[1]),isNaN(e))throw new Error("Bad version number : "+t.parser.version);t.parser.version=e}else if("number"!=typeof t.parser.version)throw new Error("Expecting a number for version");if(t.parser.version<500||t.parser.version>704)throw new Error("Can only handle versions between 5.x to 7.x")}_(t,this),this.lexer.version=this.parser.version}},l=function(t){return"function"==typeof t.write?t.toString():t};a.create=function(t){return new a(t)},a.parseEval=function(t,e){return new a(e).parseEval(t)},a.prototype.parseEval=function(t){return this.lexer.mode_eval=!0,this.lexer.all_tokens=!1,t=l(t),this.parser.parse(t,"eval")},a.parseCode=function(t,e,i){return"object"!==s(e)||i||(i=e,e="unknown"),new a(i).parseCode(t,e)},a.prototype.parseCode=function(t,e){return this.lexer.mode_eval=!1,this.lexer.all_tokens=!1,t=l(t),this.parser.parse(t,e)},a.tokenGetAll=function(t,e){return new a(e).tokenGetAll(t)},a.prototype.tokenGetAll=function(t){this.lexer.mode_eval=!1,this.lexer.all_tokens=!0,t=l(t);var e=this.lexer.EOF,i=this.tokens.values;this.lexer.setInput(t);for(var s=this.lexer.lex()||e,n=[];s!=e;){var r=this.lexer.yytext;i.hasOwnProperty(s)&&(r=[i[s],r,this.lexer.yylloc.first_line]),n.push(r),s=this.lexer.lex()||e}return n},t.exports=a,t.exports.tokens=h,t.exports.lexer=n,t.exports.AST=o,t.exports.parser=r,t.exports.combine=_,t.exports.Engine=a,t.exports.default=a},8720:(t,e,i)=>{function s(t){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var n=function(t){this.engine=t,this.tok=this.engine.tokens.names,this.EOF=1,this.debug=!1,this.all_tokens=!0,this.comment_tokens=!1,this.mode_eval=!1,this.asp_tags=!1,this.short_tags=!1,this.version=704,this.yyprevcol=0,this.keywords={__class__:this.tok.T_CLASS_C,__trait__:this.tok.T_TRAIT_C,__function__:this.tok.T_FUNC_C,__method__:this.tok.T_METHOD_C,__line__:this.tok.T_LINE,__file__:this.tok.T_FILE,__dir__:this.tok.T_DIR,__namespace__:this.tok.T_NS_C,exit:this.tok.T_EXIT,die:this.tok.T_EXIT,function:this.tok.T_FUNCTION,const:this.tok.T_CONST,return:this.tok.T_RETURN,try:this.tok.T_TRY,catch:this.tok.T_CATCH,finally:this.tok.T_FINALLY,throw:this.tok.T_THROW,if:this.tok.T_IF,elseif:this.tok.T_ELSEIF,endif:this.tok.T_ENDIF,else:this.tok.T_ELSE,while:this.tok.T_WHILE,endwhile:this.tok.T_ENDWHILE,do:this.tok.T_DO,for:this.tok.T_FOR,endfor:this.tok.T_ENDFOR,foreach:this.tok.T_FOREACH,endforeach:this.tok.T_ENDFOREACH,declare:this.tok.T_DECLARE,enddeclare:this.tok.T_ENDDECLARE,instanceof:this.tok.T_INSTANCEOF,as:this.tok.T_AS,switch:this.tok.T_SWITCH,endswitch:this.tok.T_ENDSWITCH,case:this.tok.T_CASE,default:this.tok.T_DEFAULT,break:this.tok.T_BREAK,continue:this.tok.T_CONTINUE,goto:this.tok.T_GOTO,echo:this.tok.T_ECHO,print:this.tok.T_PRINT,class:this.tok.T_CLASS,interface:this.tok.T_INTERFACE,trait:this.tok.T_TRAIT,extends:this.tok.T_EXTENDS,implements:this.tok.T_IMPLEMENTS,new:this.tok.T_NEW,clone:this.tok.T_CLONE,var:this.tok.T_VAR,eval:this.tok.T_EVAL,include:this.tok.T_INCLUDE,include_once:this.tok.T_INCLUDE_ONCE,require:this.tok.T_REQUIRE,require_once:this.tok.T_REQUIRE_ONCE,namespace:this.tok.T_NAMESPACE,use:this.tok.T_USE,insteadof:this.tok.T_INSTEADOF,global:this.tok.T_GLOBAL,isset:this.tok.T_ISSET,empty:this.tok.T_EMPTY,__halt_compiler:this.tok.T_HALT_COMPILER,static:this.tok.T_STATIC,abstract:this.tok.T_ABSTRACT,final:this.tok.T_FINAL,private:this.tok.T_PRIVATE,protected:this.tok.T_PROTECTED,public:this.tok.T_PUBLIC,unset:this.tok.T_UNSET,list:this.tok.T_LIST,array:this.tok.T_ARRAY,callable:this.tok.T_CALLABLE,or:this.tok.T_LOGICAL_OR,and:this.tok.T_LOGICAL_AND,xor:this.tok.T_LOGICAL_XOR},this.castKeywords={int:this.tok.T_INT_CAST,integer:this.tok.T_INT_CAST,real:this.tok.T_DOUBLE_CAST,double:this.tok.T_DOUBLE_CAST,float:this.tok.T_DOUBLE_CAST,string:this.tok.T_STRING_CAST,binary:this.tok.T_STRING_CAST,array:this.tok.T_ARRAY_CAST,object:this.tok.T_OBJECT_CAST,bool:this.tok.T_BOOL_CAST,boolean:this.tok.T_BOOL_CAST,unset:this.tok.T_UNSET_CAST}};n.prototype.setInput=function(t){return this._input=t,this.size=t.length,this.yylineno=1,this.offset=0,this.yyprevcol=0,this.yytext="",this.yylloc={first_offset:0,first_line:1,first_column:0,prev_offset:0,prev_line:1,prev_column:0,last_line:1,last_column:0},this.tokens=[],this.version>703?this.keywords.fn=this.tok.T_FN:delete this.keywords.fn,this.done=this.offset>=this.size,!this.all_tokens&&this.mode_eval?(this.conditionStack=["INITIAL"],this.begin("ST_IN_SCRIPTING")):(this.conditionStack=[],this.begin("INITIAL")),this.heredoc_label={label:"",length:0,indentation:0,indentation_uses_spaces:!1,finished:!1,first_encaps_node:!1,toString:function(){this.label}},this},n.prototype.input=function(){var t=this._input[this.offset];return t?(this.yytext+=t,this.offset++,"\r"===t&&"\n"===this._input[this.offset]&&(this.yytext+="\n",this.offset++),"\n"===t||"\r"===t?(this.yylloc.last_line=++this.yylineno,this.yyprevcol=this.yylloc.last_column,this.yylloc.last_column=0):this.yylloc.last_column++,t):""},n.prototype.unput=function(t){if(1===t)this.offset--,"\n"===this._input[this.offset]&&"\r"===this._input[this.offset-1]&&(this.offset--,t++),"\r"===this._input[this.offset]||"\n"===this._input[this.offset]?(this.yylloc.last_line--,this.yylineno--,this.yylloc.last_column=this.yyprevcol):this.yylloc.last_column--,this.yytext=this.yytext.substring(0,this.yytext.length-t);else if(t>0)if(this.offset-=t,t<this.yytext.length){this.yytext=this.yytext.substring(0,this.yytext.length-t),this.yylloc.last_line=this.yylloc.first_line,this.yylloc.last_column=this.yyprevcol=this.yylloc.first_column;for(var e=0;e<this.yytext.length;e++){var i=this.yytext[e];"\r"===i?(i=this.yytext[++e],this.yyprevcol=this.yylloc.last_column,this.yylloc.last_line++,this.yylloc.last_column=0,"\n"!==i&&("\r"===i?this.yylloc.last_line++:this.yylloc.last_column++)):"\n"===i?(this.yyprevcol=this.yylloc.last_column,this.yylloc.last_line++,this.yylloc.last_column=0):this.yylloc.last_column++}this.yylineno=this.yylloc.last_line}else this.yytext="",this.yylloc.last_line=this.yylineno=this.yylloc.first_line,this.yylloc.last_column=this.yylloc.first_column;return this},n.prototype.tryMatch=function(t){return t===this.ahead(t.length)},n.prototype.tryMatchCaseless=function(t){return t===this.ahead(t.length).toLowerCase()},n.prototype.ahead=function(t){var e=this._input.substring(this.offset,this.offset+t);return"\r"===e[e.length-1]&&"\n"===this._input[this.offset+t+1]&&(e+="\n"),e},n.prototype.consume=function(t){for(var e=0;e<t;e++){var i=this._input[this.offset];if(!i)break;this.yytext+=i,this.offset++,"\r"===i&&"\n"===this._input[this.offset]&&(this.yytext+="\n",this.offset++,e++),"\n"===i||"\r"===i?(this.yylloc.last_line=++this.yylineno,this.yyprevcol=this.yylloc.last_column,this.yylloc.last_column=0):this.yylloc.last_column++}return this},n.prototype.getState=function(){return{yytext:this.yytext,offset:this.offset,yylineno:this.yylineno,yyprevcol:this.yyprevcol,yylloc:{first_offset:this.yylloc.first_offset,first_line:this.yylloc.first_line,first_column:this.yylloc.first_column,last_line:this.yylloc.last_line,last_column:this.yylloc.last_column},heredoc_label:this.heredoc_label}},n.prototype.setState=function(t){return this.yytext=t.yytext,this.offset=t.offset,this.yylineno=t.yylineno,this.yyprevcol=t.yyprevcol,this.yylloc=t.yylloc,t.heredoc_label&&(this.heredoc_label=t.heredoc_label),this},n.prototype.appendToken=function(t,e){return this.tokens.push([t,e]),this},n.prototype.lex=function(){this.yylloc.prev_offset=this.offset,this.yylloc.prev_line=this.yylloc.last_line,this.yylloc.prev_column=this.yylloc.last_column;var t=this.next()||this.lex();if(!this.all_tokens){for(;t===this.tok.T_WHITESPACE||!this.comment_tokens&&(t===this.tok.T_COMMENT||t===this.tok.T_DOC_COMMENT)||t===this.tok.T_OPEN_TAG;)t=this.next()||this.lex();if(t==this.tok.T_OPEN_TAG_WITH_ECHO)return this.tok.T_ECHO;if(t===this.tok.T_CLOSE_TAG)return";"}return this.yylloc.prev_offset||(this.yylloc.prev_offset=this.yylloc.first_offset,this.yylloc.prev_line=this.yylloc.first_line,this.yylloc.prev_column=this.yylloc.first_column),t},n.prototype.begin=function(t){if(this.conditionStack.push(t),this.curCondition=t,this.stateCb=this["match"+t],"function"!=typeof this.stateCb)throw new Error('Undefined condition state "'+t+'"');return this},n.prototype.popState=function(){var t=this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0];if(this.curCondition=this.conditionStack[this.conditionStack.length-1],this.stateCb=this["match"+this.curCondition],"function"!=typeof this.stateCb)throw new Error('Undefined condition state "'+this.curCondition+'"');return t},n.prototype.next=function(){var t;if(this._input||(this.done=!0),this.yylloc.first_offset=this.offset,this.yylloc.first_line=this.yylloc.last_line,this.yylloc.first_column=this.yylloc.last_column,this.yytext="",this.done)return this.yylloc.prev_offset=this.yylloc.first_offset,this.yylloc.prev_line=this.yylloc.first_line,this.yylloc.prev_column=this.yylloc.first_column,this.EOF;if(this.tokens.length>0?("object"===s((t=this.tokens.shift())[1])?this.setState(t[1]):this.consume(t[1]),t=t[0]):t=this.stateCb.apply(this,[]),this.offset>=this.size&&0===this.tokens.length&&(this.done=!0),this.debug){var e=t;e="number"==typeof e?this.engine.tokens.values[e]:'"'+e+'"';var i=new Error(e+"\tfrom "+this.yylloc.first_line+","+this.yylloc.first_column+"\t - to "+this.yylloc.last_line+","+this.yylloc.last_column+'\t"'+this.yytext+'"');console.error(i.stack)}return t},[i(438),i(3607),i(7405),i(465),i(5135),i(4437),i(1298),i(5609)].forEach((function(t){for(var e in t)n.prototype[e]=t[e]})),t.exports=n},438:t=>{t.exports={T_COMMENT:function(){for(;this.offset<this.size;){var t=this.input();if("\n"===t||"\r"===t)return this.tok.T_COMMENT;if("?"===t&&!this.aspTagMode&&">"===this._input[this.offset])return this.unput(1),this.tok.T_COMMENT;if("%"===t&&this.aspTagMode&&">"===this._input[this.offset])return this.unput(1),this.tok.T_COMMENT}return this.tok.T_COMMENT},T_DOC_COMMENT:function(){var t=this.input(),e=this.tok.T_COMMENT;if("*"===t){if(t=this.input(),this.is_WHITESPACE()&&(e=this.tok.T_DOC_COMMENT),"/"===t)return e;this.unput(1)}for(;this.offset<this.size;)if("*"===(t=this.input())&&"/"===this._input[this.offset]){this.input();break}return e}}},3607:t=>{t.exports={nextINITIAL:function(){return this.conditionStack.length>1&&"INITIAL"===this.conditionStack[this.conditionStack.length-1]?this.popState():this.begin("ST_IN_SCRIPTING"),this},matchINITIAL:function(){for(;this.offset<this.size;){var t=this.input();if("<"==t)if("?"==(t=this.ahead(1))){if(this.tryMatch("?=")){this.unput(1).appendToken(this.tok.T_OPEN_TAG_WITH_ECHO,3).nextINITIAL();break}if(this.tryMatchCaseless("?php")&&(" "===(t=this._input[this.offset+4])||"\t"===t||"\n"===t||"\r"===t)){this.unput(1).appendToken(this.tok.T_OPEN_TAG,6).nextINITIAL();break}if(this.short_tags){this.unput(1).appendToken(this.tok.T_OPEN_TAG,2).nextINITIAL();break}}else if(this.asp_tags&&"%"==t){if(this.tryMatch("%=")){this.aspTagMode=!0,this.unput(1).appendToken(this.tok.T_OPEN_TAG_WITH_ECHO,3).nextINITIAL();break}this.aspTagMode=!0,this.unput(1).appendToken(this.tok.T_OPEN_TAG,2).nextINITIAL();break}}return this.yytext.length>0&&this.tok.T_INLINE_HTML}}},7405:t=>{var e=10,i="2147483648";"x64"==process.arch&&(e=19,i="9223372036854775808"),t.exports={consume_NUM:function(){var t=this.yytext[0],s="."===t;if("0"===t)if("x"===(t=this.input())||"X"===t){if("_"!==(t=this.input())&&this.is_HEX())return this.consume_HNUM();this.unput(t?2:1)}else if("b"===t||"B"===t){if("_"!==(t=this.input())&&"0"===t||"1"===t)return this.consume_BNUM();this.unput(t?2:1)}else this.is_NUM()||t&&this.unput(1);for(;this.offset<this.size;){var n=t;if("_"===(t=this.input())){if("_"===n){this.unput(2);break}if("."===n){this.unput(1);break}if("e"===n||"E"===n){this.unput(2);break}}else{if("."===t){if(s){this.unput(1);break}if("_"===n){this.unput(2);break}s=!0;continue}if("e"===t||"E"===t){if("_"===n){this.unput(1);break}var r=2;if("+"!==(t=this.input())&&"-"!==t||(r=3,t=this.input()),this.is_NUM_START())return this.consume_LNUM(),this.tok.T_DNUMBER;this.unput(t?r:r-1);break}}if(!this.is_NUM()){t&&this.unput(1);break}}return s?this.tok.T_DNUMBER:this.yytext.length<e-1||this.yytext.length<e||this.yytext.length==e&&this.yytext<i?this.tok.T_LNUMBER:this.tok.T_DNUMBER},consume_HNUM:function(){for(;this.offset<this.size;){var t=this.input();if(!this.is_HEX()){t&&this.unput(1);break}}return this.tok.T_LNUMBER},consume_LNUM:function(){for(;this.offset<this.size;){var t=this.input();if(!this.is_NUM()){t&&this.unput(1);break}}return this.tok.T_LNUMBER},consume_BNUM:function(){for(var t;this.offset<this.size;)if("0"!==(t=this.input())&&"1"!==t&&"_"!==t){t&&this.unput(1);break}return this.tok.T_LNUMBER}}},465:t=>{t.exports={matchST_LOOKING_FOR_PROPERTY:function(){var t=this.input();if("-"===t){if(">"===(t=this.input()))return this.tok.T_OBJECT_OPERATOR;t&&this.unput(1)}else{if(this.is_WHITESPACE())return this.tok.T_WHITESPACE;if(this.is_LABEL_START())return this.consume_LABEL(),this.popState(),this.tok.T_STRING}return this.popState(),t&&this.unput(1),!1},matchST_LOOKING_FOR_VARNAME:function(){var t=this.input();if(this.popState(),this.begin("ST_IN_SCRIPTING"),this.is_LABEL_START()){if(this.consume_LABEL(),"["===(t=this.input())||"}"===t)return this.unput(1),this.tok.T_STRING_VARNAME;this.unput(this.yytext.length)}else t&&this.unput(1);return!1},matchST_VAR_OFFSET:function(){var t=this.input();if(this.is_NUM_START())return this.consume_NUM(),this.tok.T_NUM_STRING;if("]"===t)return this.popState(),"]";if("$"===t){if(this.input(),this.is_LABEL_START())return this.consume_LABEL(),this.tok.T_VARIABLE;throw new Error("Unexpected terminal")}if(this.is_LABEL_START())return this.consume_LABEL(),this.tok.T_STRING;if(this.is_WHITESPACE()||"\\"===t||"'"===t||"#"===t)return this.tok.T_ENCAPSED_AND_WHITESPACE;if("["===t||"{"===t||"}"===t||'"'===t||"`"===t||this.is_TOKEN())return t;throw new Error("Unexpected terminal")}}},5135:t=>{t.exports={matchST_IN_SCRIPTING:function(){var t=this.input();switch(t){case" ":case"\t":case"\n":case"\r":case"\r\n":return this.T_WHITESPACE();case"#":return this.T_COMMENT();case"/":return"/"===this._input[this.offset]?this.T_COMMENT():"*"===this._input[this.offset]?(this.input(),this.T_DOC_COMMENT()):this.consume_TOKEN();case"'":return this.T_CONSTANT_ENCAPSED_STRING();case'"':return this.ST_DOUBLE_QUOTES();case"`":return this.begin("ST_BACKQUOTE"),"`";case"?":if(!this.aspTagMode&&this.tryMatch(">")){this.input();var e=this._input[this.offset];return"\n"!==e&&"\r"!==e||this.input(),this.conditionStack.length>1&&this.begin("INITIAL"),this.tok.T_CLOSE_TAG}return this.consume_TOKEN();case"%":return this.aspTagMode&&">"===this._input[this.offset]?(this.input(),"\n"!==(t=this._input[this.offset])&&"\r"!==t||this.input(),this.aspTagMode=!1,this.conditionStack.length>1&&this.begin("INITIAL"),this.tok.T_CLOSE_TAG):this.consume_TOKEN();case"{":return this.begin("ST_IN_SCRIPTING"),"{";case"}":return this.conditionStack.length>2&&this.popState(),"}";default:if("."===t){if(t=this.input(),this.is_NUM_START())return this.consume_NUM();t&&this.unput(1)}if(this.is_NUM_START())return this.consume_NUM();if(this.is_LABEL_START())return this.consume_LABEL().T_STRING();if(this.is_TOKEN())return this.consume_TOKEN()}throw new Error('Bad terminal sequence "'+t+'" at line '+this.yylineno+" (offset "+this.offset+")")},T_WHITESPACE:function(){for(;this.offset<this.size;){var t=this.input();if(" "!==t&&"\t"!==t&&"\n"!==t&&"\r"!==t){t&&this.unput(1);break}}return this.tok.T_WHITESPACE}}},4437:t=>{var e=["\n","\r"],i=["\n","\r",";"],s=i.concat(["\t"," ",",","]",")","/","=","!"]);t.exports={T_CONSTANT_ENCAPSED_STRING:function(){for(var t;this.offset<this.size;)if("\\"==(t=this.input()))this.input();else if("'"==t)break;return this.tok.T_CONSTANT_ENCAPSED_STRING},is_HEREDOC:function(){var t=this.offset;if("<"===this._input[this.offset-1]&&"<"===this._input[this.offset]&&"<"===this._input[this.offset+1]){if(this.offset+=3,this.is_TABSPACE())for(;this.offset<this.size&&(this.offset++,this.is_TABSPACE()););var i=this._input[this.offset-1];if("'"===i||'"'===i?this.offset++:i=null,this.is_LABEL_START()){for(var s=this.offset-1;this.offset<this.size&&(this.offset++,this.is_LABEL()););var n=this._input.substring(s,this.offset-1);if((!i||i===this._input[this.offset-1])&&(i&&this.offset++,e.includes(this._input[this.offset-1])))return this.heredoc_label.label=n,this.heredoc_label.length=n.length,this.heredoc_label.finished=!1,s=this.offset-t,this.offset=t,this.consume(s),"'"===i?this.begin("ST_NOWDOC"):this.begin("ST_HEREDOC"),this.prematch_ENDOFDOC(),this.tok.T_START_HEREDOC}}return this.offset=t,!1},ST_DOUBLE_QUOTES:function(){for(var t;this.offset<this.size;)if("\\"==(t=this.input()))this.input();else{if('"'==t)break;if("$"==t){if("{"==(t=this.input())||this.is_LABEL_START()){this.unput(2);break}t&&this.unput(1)}else if("{"==t){if("$"==(t=this.input())){this.unput(2);break}t&&this.unput(1)}}if('"'==t)return this.tok.T_CONSTANT_ENCAPSED_STRING;var e=1;return"b"!==this.yytext[0]&&"B"!==this.yytext[0]||(e=2),this.yytext.length>2&&this.appendToken(this.tok.T_ENCAPSED_AND_WHITESPACE,this.yytext.length-e),this.unput(this.yytext.length-e),this.begin("ST_DOUBLE_QUOTES"),this.yytext},isDOC_MATCH:function(t,n){var r=this._input[t-2];if(!e.includes(r))return!1;var h=!1,o=!1,_=0,a=this._input[t-1];if(this.version>=703){for(;"\t"===a||" "===a;)" "===a?h=!0:"\t"===a&&(o=!0),a=this._input[t+_],_++;if(t+=_,e.includes(this._input[t-1]))return!1}if(this._input.substring(t-1,t-1+this.heredoc_label.length)===this.heredoc_label.label){var l=this._input[t-1+this.heredoc_label.length];if((this.version>=703?s:i).includes(l)){if(n){if(this.consume(_),h&&o)throw new Error("Parse error: mixing spaces and tabs in ending marker at line "+this.yylineno+" (offset "+this.offset+")")}else this.heredoc_label.indentation=_,this.heredoc_label.indentation_uses_spaces=h,this.heredoc_label.first_encaps_node=!0;return!0}}return!1},prematch_ENDOFDOC:function(){this.heredoc_label.indentation_uses_spaces=!1,this.heredoc_label.indentation=0,this.heredoc_label.first_encaps_node=!0;for(var t=this.offset+1;t<this._input.length;){if(this.isDOC_MATCH(t,!1))return;if(!e.includes(this._input[t-1]))for(;!e.includes(this._input[t++])&&t<this._input.length;);t++}},matchST_NOWDOC:function(){if(this.isDOC_MATCH(this.offset,!0))return this.consume(this.heredoc_label.length),this.popState(),this.tok.T_END_HEREDOC;for(var t=this._input[this.offset-1];this.offset<this.size;)if(e.includes(t)){if(t=this.input(),this.isDOC_MATCH(this.offset,!0))return this.unput(1).popState(),this.appendToken(this.tok.T_END_HEREDOC,this.heredoc_label.length),this.tok.T_ENCAPSED_AND_WHITESPACE}else t=this.input();return this.tok.T_ENCAPSED_AND_WHITESPACE},matchST_HEREDOC:function(){var t=this.input();if(this.isDOC_MATCH(this.offset,!0))return this.consume(this.heredoc_label.length-1),this.popState(),this.tok.T_END_HEREDOC;for(;this.offset<this.size;)if("\\"===t&&(t=this.input(),e.includes(t)||(t=this.input())),e.includes(t)){if(t=this.input(),this.isDOC_MATCH(this.offset,!0))return this.unput(1).popState(),this.appendToken(this.tok.T_END_HEREDOC,this.heredoc_label.length),this.tok.T_ENCAPSED_AND_WHITESPACE}else if("$"===t){if("{"===(t=this.input()))return this.begin("ST_LOOKING_FOR_VARNAME"),this.yytext.length>2?(this.appendToken(this.tok.T_DOLLAR_OPEN_CURLY_BRACES,2),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):this.tok.T_DOLLAR_OPEN_CURLY_BRACES;if(this.is_LABEL_START()){var i=this.offset,s=this.consume_VARIABLE();return this.yytext.length>this.offset-i+2?(this.appendToken(s,this.offset-i+2),this.unput(this.offset-i+2),this.tok.T_ENCAPSED_AND_WHITESPACE):s}}else if("{"===t){if("$"===(t=this.input()))return this.begin("ST_IN_SCRIPTING"),this.yytext.length>2?(this.appendToken(this.tok.T_CURLY_OPEN,1),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):(this.unput(1),this.tok.T_CURLY_OPEN)}else t=this.input();return this.tok.T_ENCAPSED_AND_WHITESPACE},consume_VARIABLE:function(){this.consume_LABEL();var t=this.input();if("["==t)return this.unput(1),this.begin("ST_VAR_OFFSET"),this.tok.T_VARIABLE;if("-"===t){if(">"===this.input())return this.input(),this.is_LABEL_START()&&this.begin("ST_LOOKING_FOR_PROPERTY"),this.unput(3),this.tok.T_VARIABLE;this.unput(2)}else t&&this.unput(1);return this.tok.T_VARIABLE},matchST_BACKQUOTE:function(){var t=this.input();if("$"===t){if("{"===(t=this.input()))return this.begin("ST_LOOKING_FOR_VARNAME"),this.tok.T_DOLLAR_OPEN_CURLY_BRACES;if(this.is_LABEL_START())return this.consume_VARIABLE()}else if("{"===t){if("$"===this._input[this.offset])return this.begin("ST_IN_SCRIPTING"),this.tok.T_CURLY_OPEN}else if("`"===t)return this.popState(),"`";for(;this.offset<this.size;){if("\\"===t)this.input();else{if("`"===t){this.unput(1),this.popState(),this.appendToken("`",1);break}if("$"===t){if("{"===(t=this.input()))return this.begin("ST_LOOKING_FOR_VARNAME"),this.yytext.length>2?(this.appendToken(this.tok.T_DOLLAR_OPEN_CURLY_BRACES,2),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):this.tok.T_DOLLAR_OPEN_CURLY_BRACES;if(this.is_LABEL_START()){var e=this.offset,i=this.consume_VARIABLE();return this.yytext.length>this.offset-e+2?(this.appendToken(i,this.offset-e+2),this.unput(this.offset-e+2),this.tok.T_ENCAPSED_AND_WHITESPACE):i}continue}if("{"===t){if("$"===(t=this.input()))return this.begin("ST_IN_SCRIPTING"),this.yytext.length>2?(this.appendToken(this.tok.T_CURLY_OPEN,1),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):(this.unput(1),this.tok.T_CURLY_OPEN);continue}}t=this.input()}return this.tok.T_ENCAPSED_AND_WHITESPACE},matchST_DOUBLE_QUOTES:function(){var t=this.input();if("$"===t){if("{"===(t=this.input()))return this.begin("ST_LOOKING_FOR_VARNAME"),this.tok.T_DOLLAR_OPEN_CURLY_BRACES;if(this.is_LABEL_START())return this.consume_VARIABLE()}else if("{"===t){if("$"===this._input[this.offset])return this.begin("ST_IN_SCRIPTING"),this.tok.T_CURLY_OPEN}else if('"'===t)return this.popState(),'"';for(;this.offset<this.size;){if("\\"===t)this.input();else{if('"'===t){this.unput(1),this.popState(),this.appendToken('"',1);break}if("$"===t){if("{"===(t=this.input()))return this.begin("ST_LOOKING_FOR_VARNAME"),this.yytext.length>2?(this.appendToken(this.tok.T_DOLLAR_OPEN_CURLY_BRACES,2),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):this.tok.T_DOLLAR_OPEN_CURLY_BRACES;if(this.is_LABEL_START()){var e=this.offset,i=this.consume_VARIABLE();return this.yytext.length>this.offset-e+2?(this.appendToken(i,this.offset-e+2),this.unput(this.offset-e+2),this.tok.T_ENCAPSED_AND_WHITESPACE):i}t&&this.unput(1)}else if("{"===t){if("$"===(t=this.input()))return this.begin("ST_IN_SCRIPTING"),this.yytext.length>2?(this.appendToken(this.tok.T_CURLY_OPEN,1),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):(this.unput(1),this.tok.T_CURLY_OPEN);t&&this.unput(1)}}t=this.input()}return this.tok.T_ENCAPSED_AND_WHITESPACE}}},1298:t=>{t.exports={T_STRING:function(){var t=this.yytext.toLowerCase(),e=this.keywords[t];if("number"!=typeof e)if("yield"===t)this.version>=700&&this.tryMatch(" from")?(this.consume(5),e=this.tok.T_YIELD_FROM):e=this.tok.T_YIELD;else if(e=this.tok.T_STRING,"b"===t||"B"===t){var i=this.input(1);if('"'===i)return this.ST_DOUBLE_QUOTES();if("'"===i)return this.T_CONSTANT_ENCAPSED_STRING();i&&this.unput(1)}return e},consume_TOKEN:function(){var t=this._input[this.offset-1],e=this.tokenTerminals[t];return e?e.apply(this,[]):this.yytext},tokenTerminals:{$:function(){return this.offset++,this.is_LABEL_START()?(this.offset--,this.consume_LABEL(),this.tok.T_VARIABLE):(this.offset--,"$")},"-":function(){var t=this._input[this.offset];return">"===t?(this.begin("ST_LOOKING_FOR_PROPERTY").input(),this.tok.T_OBJECT_OPERATOR):"-"===t?(this.input(),this.tok.T_DEC):"="===t?(this.input(),this.tok.T_MINUS_EQUAL):"-"},"\\":function(){return this.tok.T_NS_SEPARATOR},"/":function(){return"="===this._input[this.offset]?(this.input(),this.tok.T_DIV_EQUAL):"/"},":":function(){return":"===this._input[this.offset]?(this.input(),this.tok.T_DOUBLE_COLON):":"},"(":function(){var t=this.offset;if(this.input(),this.is_TABSPACE()&&this.consume_TABSPACE().input(),this.is_LABEL_START()){var e=this.yytext.length;this.consume_LABEL();var i=this.yytext.substring(e-1).toLowerCase(),s=this.castKeywords[i];if("number"==typeof s&&(this.input(),this.is_TABSPACE()&&this.consume_TABSPACE().input(),")"===this._input[this.offset-1]))return s}return this.unput(this.offset-t),"("},"=":function(){var t=this._input[this.offset];return">"===t?(this.input(),this.tok.T_DOUBLE_ARROW):"="===t?"="===this._input[this.offset+1]?(this.consume(2),this.tok.T_IS_IDENTICAL):(this.input(),this.tok.T_IS_EQUAL):"="},"+":function(){var t=this._input[this.offset];return"+"===t?(this.input(),this.tok.T_INC):"="===t?(this.input(),this.tok.T_PLUS_EQUAL):"+"},"!":function(){return"="===this._input[this.offset]?"="===this._input[this.offset+1]?(this.consume(2),this.tok.T_IS_NOT_IDENTICAL):(this.input(),this.tok.T_IS_NOT_EQUAL):"!"},"?":function(){return this.version>=700&&"?"===this._input[this.offset]?this.version>=704&&"="===this._input[this.offset+1]?(this.consume(2),this.tok.T_COALESCE_EQUAL):(this.input(),this.tok.T_COALESCE):"?"},"<":function(){var t=this._input[this.offset];return"<"===t?"="===(t=this._input[this.offset+1])?(this.consume(2),this.tok.T_SL_EQUAL):"<"===t&&this.is_HEREDOC()?this.tok.T_START_HEREDOC:(this.input(),this.tok.T_SL):"="===t?(this.input(),this.version>=700&&">"===this._input[this.offset]?(this.input(),this.tok.T_SPACESHIP):this.tok.T_IS_SMALLER_OR_EQUAL):">"===t?(this.input(),this.tok.T_IS_NOT_EQUAL):"<"},">":function(){var t=this._input[this.offset];return"="===t?(this.input(),this.tok.T_IS_GREATER_OR_EQUAL):">"===t?"="===(t=this._input[this.offset+1])?(this.consume(2),this.tok.T_SR_EQUAL):(this.input(),this.tok.T_SR):">"},"*":function(){var t=this._input[this.offset];return"="===t?(this.input(),this.tok.T_MUL_EQUAL):"*"===t?(this.input(),"="===this._input[this.offset]?(this.input(),this.tok.T_POW_EQUAL):this.tok.T_POW):"*"},".":function(){var t=this._input[this.offset];return"="===t?(this.input(),this.tok.T_CONCAT_EQUAL):"."===t&&"."===this._input[this.offset+1]?(this.consume(2),this.tok.T_ELLIPSIS):"."},"%":function(){return"="===this._input[this.offset]?(this.input(),this.tok.T_MOD_EQUAL):"%"},"&":function(){var t=this._input[this.offset];return"="===t?(this.input(),this.tok.T_AND_EQUAL):"&"===t?(this.input(),this.tok.T_BOOLEAN_AND):"&"},"|":function(){var t=this._input[this.offset];return"="===t?(this.input(),this.tok.T_OR_EQUAL):"|"===t?(this.input(),this.tok.T_BOOLEAN_OR):"|"},"^":function(){return"="===this._input[this.offset]?(this.input(),this.tok.T_XOR_EQUAL):"^"}}}},5609:t=>{t.exports={is_NUM:function(){var