{"size": 155955, "ext": "js", "max_stars_repo_path": "data/extensions/amiralizadeh9480.laravel-extra-intellisense-0.6.1/dist/extension.js", "max_stars_repo_name": "thalesbarbosab/portable-vscode", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "data/extensions/amiralizadeh9480.laravel-extra-intellisense-0.6.1/dist/extension.js", "max_issues_repo_name": "thalesbarbosab/portable-vscode", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "data/extensions/amiralizadeh9480.laravel-extra-intellisense-0.6.1/dist/extension.js", "max_forks_repo_name": "thalesbarbosab/portable-vscode", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 77977.5, "max_line_length": 155917, "alphanum_fraction": 0.7057484531}
(()=>{"use strict";var t={7446:(t,e,s)=>{const i=s(1703),n=s(1143),o=function(t,e){this.withPositions=t,this.withSource=e};o.prototype.position=function(t){return new n(t.lexer.yylloc.first_line,t.lexer.yylloc.first_column,t.lexer.yylloc.first_offset)},o.precedence={},[["or"],["xor"],["and"],["="],["?"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","!=","===","!==","<=>"],["<","<=",">",">="],["<<",">>"],["+","-","."],["*","/","%"],["!"],["instanceof"],["cast","silent"],["**"]].forEach((function(t,e){t.forEach((function(t){o.precedence[t]=e+1}))})),o.prototype.isRightAssociative=function(t){return"**"===t||"??"===t},o.prototype.swapLocations=function(t,e,s,i){this.withPositions&&(t.loc.start=e.loc.start,t.loc.end=s.loc.end,this.withSource&&(t.loc.source=i.lexer._input.substring(t.loc.start.offset,t.loc.end.offset)))},o.prototype.resolveLocations=function(t,e,s,i){this.withPositions&&(t.loc.start.offset>e.loc.start.offset&&(t.loc.start=e.loc.start),t.loc.end.offset<s.loc.end.offset&&(t.loc.end=s.loc.end),this.withSource&&(t.loc.source=i.lexer._input.substring(t.loc.start.offset,t.loc.end.offset)))},o.prototype.resolvePrecedence=function(t,e){let s,i,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?(i=o.precedence[t.type],n=o.precedence[t.right.type],i&&n&&n<=i&&(t.type!==t.right.type||!this.isRightAssociative(t.type))&&(s=t.right,t.right=t.right.left,this.swapLocations(t,t.left,t.right,e),s.left=this.resolvePrecedence(t,e),this.swapLocations(s,s.left,s.right,e),t=s)):"retif"===t.right.kind&&(i=o.precedence[t.type],n=o.precedence["?"],i&&n&&n<=i&&(s=t.right,t.right=t.right.test,this.swapLocations(t,t.left,t.right,e),s.test=this.resolvePrecedence(t,e),this.swapLocations(s,s.test,s.falseExpr,e),t=s))):"silent"!==t.kind&&"cast"!==t.kind||!t.expr||t.expr.parenthesizedExpression?"unary"===t.kind?t.what&&!t.what.parenthesizedExpression&&("bin"===t.what.kind?(s=t.what,t.what=t.what.left,this.swapLocations(t,t,t.what,e),s.left=this.resolvePrecedence(t,e),this.swapLocations(s,s.left,s.right,e),t=s):"retif"===t.what.kind&&(s=t.what,t.what=t.what.test,this.swapLocations(t,t,t.what,e),s.test=this.resolvePrecedence(t,e),this.swapLocations(s,s.test,s.falseExpr,e),t=s)):"retif"===t.kind?t.falseExpr&&"retif"===t.falseExpr.kind&&!t.falseExpr.parenthesizedExpression&&(s=t.falseExpr,t.falseExpr=s.test,this.swapLocations(t,t.test,t.falseExpr,e),s.test=this.resolvePrecedence(t,e),this.swapLocations(s,s.test,s.falseExpr,e),t=s):"assign"===t.kind?t.right&&"bin"===t.right.kind&&!t.right.parenthesizedExpression&&(i=o.precedence["="],n=o.precedence[t.right.type],i&&n&&n<i&&(s=t.right,t.right=t.right.left,s.left=t,this.swapLocations(s,s.left,t.right,e),t=s)):"expressionstatement"===t.kind&&this.swapLocations(t,t.expression,t,e):"bin"===t.expr.kind?(s=t.expr,t.expr=t.expr.left,this.swapLocations(t,t,t.expr,e),s.left=this.resolvePrecedence(t,e),this.swapLocations(s,s.left,s.right,e),t=s):"retif"===t.expr.kind&&(s=t.expr,t.expr=t.expr.test,this.swapLocations(t,t,t.expr,e),s.test=this.resolvePrecedence(t,e),this.swapLocations(s,s.test,s.falseExpr,e),t=s),t},o.prototype.prepare=function(t,e,s){let r=null;(this.withPositions||this.withSource)&&(r=this.position(s));const h=this,a=function(){let l=null;const c=Array.prototype.slice.call(arguments);if(c.push(e),h.withPositions||h.withSource){let t=null;h.withSource&&(t=s.lexer._input.substring(r.offset,s.prev[2])),l=new i(t,r,new n(s.prev[0],s.prev[1],s.prev[2])),c.push(l)}t||(t=c.shift());const _=h[t];if("function"!=typeof _)throw new Error('Undefined node "'+t+'"');const p=Object.create(_.prototype);return _.apply(p,c),a.instance=p,a.trailingComments&&(p.trailingComments=a.trailingComments),"function"==typeof a.postBuild&&a.postBuild(p),s.debug&&delete o.stack[a.stackUid],h.resolvePrecedence(p,s)};return s.debug&&(o.stack||(o.stack={},o.stackUid=1),o.stack[++o.stackUid]={position:r,stack:(new Error).stack.split("\n").slice(3,5)},a.stackUid=o.stackUid),a.setTrailingComments=function(t){a.instance?a.instance.setTrailingComments(t):a.trailingComments=t},a.destroy=function(t){e&&(t?t.leadingComments?t.leadingComments=e.concat(t.leadingComments):t.leadingComments=e:s._docIndex=s._docs.length-e.length),s.debug&&delete o.stack[a.stackUid]},a},o.prototype.checkNodes=function(){const t=[];for(const e in o.stack)o.stack.hasOwnProperty(e)&&t.push(o.stack[e]);return o.stack={},t},[s(8965),s(8731),s(691),s(3094),s(9590),s(5600),s(3096),s(5798),s(9259),s(5077),s(9386),s(3527),s(9510),s(2555),s(8593),s(687),s(3224),s(8423),s(3233),s(2266),s(370),s(1847),s(7895),s(8714),s(9315),s(5521),s(6712),s(2682),s(522),s(3444),s(8446),s(2826),s(9979),s(6792),s(3896),s(6846),s(1433),s(7352),s(2693),s(7740),s(1911),s(2872),s(535),s(3034),s(3982),s(7386),s(3765),s(7718),s(9483),s(2324),s(8261),s(1632),s(1920),s(1695),s(120),s(2743),s(8126),s(7614),s(814),s(9238),s(7769),s(7461),s(6038),s(9570),s(2210),s(3565),s(7366),s(7692),s(8117),s(2795),s(202),s(69),s(6909),s(8871),s(882),s(2238),s(1777),s(1095),s(9324),s(6291),s(4755),s(7788),s(669),s(7577),s(8653),s(206),s(330),s(9279),s(3832),s(8401),s(3590),s(2460),s(838),s(4960),s(85),s(6442),s(1685),s(4954),s(2288),s(6001),s(7406),s(6062)].forEach((function(t){o.prototype[t.kind]=t})),t.exports=o},8965:(t,e,s)=>{const i=s(6846),n="array";t.exports=i.extends(n,(function(t,e,s,o){i.apply(this,[n,s,o]),this.items=e,this.shortForm=t}))},8731:(t,e,s)=>{const i=s(6846),n="arrowfunc";t.exports=i.extends(n,(function(t,e,s,o,r,h,a,l){i.apply(this,[n,a,l]),this.arguments=t,this.byref=e,this.body=s,this.type=o,this.nullable=r,this.isStatic=h||!1}))},691:(t,e,s)=>{const i=s(6846),n="assign";t.exports=i.extends(n,(function(t,e,s,o,r){i.apply(this,[n,o,r]),this.left=t,this.right=e,this.operator=s}))},3094:(t,e,s)=>{const i=s(6846),n="assignref";t.exports=i.extends(n,(function(t,e,s,o){i.apply(this,[n,s,o]),this.left=t,this.right=e}))},9590:(t,e,s)=>{const i=s(2210);t.exports=i.extends("bin",(function(t,e,s,n,o){i.apply(this,["bin",n,o]),this.type=t,this.left=e,this.right=s}))},5600:(t,e,s)=>{const i=s(6291),n="block";t.exports=i.extends(n,(function(t,e,s,o){i.apply(this,[t||n,s,o]),this.children=e.filter(Boolean)}))},3096:(t,e,s)=>{const i=s(1632),n="boolean";t.exports=i.extends(n,(function(t,e,s,o){i.apply(this,[n,t,e,s,o])}))},5798:(t,e,s)=>{const i=s(6291),n="break";t.exports=i.extends(n,(function(t,e,s){i.apply(this,[n,e,s]),this.level=t}))},9259:(t,e,s)=>{const i=s(6846),n="byref";t.exports=i.extends(n,(function(t,e,s){i.apply(this,[n,e,s]),this.what=t}))},5077:(t,e,s)=>{const i=s(6846),n="call";t.exports=i.extends(n,(function(t,e,s,o){i.apply(this,[n,s,o]),this.what=t,this.arguments=e}))},9386:(t,e,s)=>{const i=s(6291),n="case";t.exports=i.extends(n,(function(t,e,s,o){i.apply(this,[n,s,o]),this.test=t,this.body=e}))},3527:(t,e,s)=>{const i=s(2210),n="cast";t.exports=i.extends(n,(function(t,e,s,o,r){i.apply(this,[n,o,r]),this.type=t,this.raw=e,this.expr=s}))},9510:(t,e,s)=>{const i=s(6291),n="catch";t.exports=i.extends(n,(function(t,e,s,o,r){i.apply(this,[n,o,r]),this.body=t,this.what=e,this.variable=s}))},2555:(t,e,s)=>{const i=s(8714),n="class";t.exports=i.extends(n,(function(t,e,s,o,r,h,a){i.apply(this,[n,t,h,a]),this.isAnonymous=!t,this.extends=e,this.implements=s,this.body=o,this.parseFlags(r)}))},8593:(t,e,s)=>{const i=s(1847),n="classconstant",o=i.extends(n,(function(t,e,s,o,r){i.apply(this,[t||n,e,o,r]),this.parseFlags(s)}));o.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=o},687:(t,e,s)=>{const i=s(6846),n="clone";t.exports=i.extends(n,(function(t,e,s){i.apply(this,[n,e,s]),this.what=t}))},3224:(t,e,s)=>{const i=s(6846),n="closure";t.exports=i.extends(n,(function(t,e,s,o,r,h,a,l){i.apply(this,[n,a,l]),this.uses=s,this.arguments=t,this.byref=e,this.type=o,this.nullable=r,this.isStatic=h||!1,this.body=null}))},8423:(t,e,s)=>{const i=s(814);t.exports=i.extends("comment",(function(t,e,s,n){i.apply(this,[t,s,n]),this.value=e}))},3233:(t,e,s)=>{const i=s(8423),n="commentblock";t.exports=i.extends(n,(function(t,e,s){i.apply(this,[n,t,e,s])}))},2266:(t,e,s)=>{const i=s(8423),n="commentline";t.exports=i.extends(n,(function(t,e,s){i.apply(this,[n,t,e,s])}))},370:(t,e,s)=>{const i=s(814),n="constant";t.exports=i.extends(n,(function(t,e,s,o){i.apply(this,[n,s,o]),this.name=t,this.value=e}))},1847:(t,e,s)=>{const i=s(6291),n="constantstatement";t.exports=i.extends(n,(function(t,e,s,o){i.apply(this,[t||n,s,o]),this.constants=e}))},7895:(t,e,s)=>{const i=s(6291),n="continue";t.exports=i.extends(n,(function(t,e,s){i.apply(this,[n,e,s]),this.level=t}))},8714:(t,e,s)=>{const i=s(6291),n="declaration",o=i.extends(n,(function(t,e,s,o){i.apply(this,[t||n,s,o]),this.name=e}));o.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=o},9315:(t,e,s)=>{const i=s(5600),n="declare",o=i.extends(n,(function(t,e,s,o,r){i.apply(this,[n,e,o,r]),this.directives=t,this.mode=s}));o.MODE_SHORT="short",o.MODE_BLOCK="block",o.MODE_NONE="none",t.exports=o},5521:(t,e,s)=>{const i=s(814),n="declaredirective";t.exports=i.extends(n,(function(t,e,s,o){i.apply(this,[n,s,o]),this.key=t,this.value=e}))},6712:(t,e,s)=>{const i=s(6291);t.exports=i.extends("do",(function(t,e,s,n){i.apply(this,["do",s,n]),this.test=t,this.body=e}))},2682:(t,e,s)=>{const i=s(6291),n="echo";t.exports=i.extends(n,(function(t,e,s,o){i.apply(this,[n,s,o]),this.shortForm=e,this.expressions=t}))},522:(t,e,s)=>{const i=s(6846),n="empty";t.exports=i.extends(n,(function(t,e,s){i.apply(this,[n,e,s]),this.expression=t}))},3444:(t,e,s)=>{const i=s(1632),n="encapsed",o=i.extends(n,(function(t,e,s,o,r){i.apply(this,[n,t,e,o,r]),this.type=s}));o.TYPE_STRING="string",o.TYPE_SHELL="shell",o.TYPE_HEREDOC="heredoc",o.TYPE_OFFSET="offset",t.exports=o},8446:(t,e,s)=>{const i=s(6846),n="encapsedpart";t.exports=i.extends(n,(function(t,e,s,o,r){i.apply(this,[n,o,r]),this.expression=t,this.syntax=e,this.curly=s}))},2826:(t,e,s)=>{const i=s(6846),n="entry";t.exports=i.extends(n,(function(t,e,s,o,r,h){i.apply(this,[n,r,h]),this.key=t,this.value=e,this.byRef=s,this.unpack=o}))},9979:(t,e,s)=>{const i=s(814),n="error";t.exports=i.extends(n,(function(t,e,s,o,r,h){i.apply(this,[n,r,h]),this.message=t,this.token=e,this.line=s,this.expected=o}))},6792:(t,e,s)=>{const i=s(6846),n="eval";t.exports=i.extends(n,(function(t,e,s){i.apply(this,[n,e,s]),this.source=t}))},3896:(t,e,s)=>{const i=s(6846),n="exit";t.exports=i.extends(n,(function(t,e,s,o){i.apply(this,[n,s,o]),this.expression=t,this.useDie=e}))},6846:(t,e,s)=>{const i=s(814),n="expression";t.exports=i.extends(n,(function(t,e,s){i.apply(this,[t||n,e,s])}))},1433:(t,e,s)=>{const i=s(6291),n="expressionstatement";t.exports=i.extends(n,(function(t,e,s){i.apply(this,[n,e,s]),this.expression=t}))},7352:(t,e,s)=>{const i=s(6291);t.exports=i.extends("for",(function(t,e,s,n,o,r,h){i.apply(this,["for",r,h]),this.init=t,this.test=e,this.increment=s,this.shortForm=o,this.body=n}))},2693:(t,e,s)=>{const i=s(6291),n="foreach";t.exports=i.extends(n,(function(t,e,s,o,r,h,a){i.apply(this,[n,h,a]),this.source=t,this.key=e,this.value=s,this.shortForm=r,this.body=o}))},7740:(t,e,s)=>{const i=s(8714),n="function";t.exports=i.extends(n,(function(t,e,s,o,r,h,a){i.apply(this,[n,t,h,a]),this.arguments=e,this.byref=s,this.type=o,this.nullable=r,this.body=null}))},1911:(t,e,s)=>{const i=s(6291),n="global";t.exports=i.extends(n,(function(t,e,s){i.apply(this,[n,e,s]),this.items=t}))},2872:(t,e,s)=>{const i=s(6291),n="goto";t.exports=i.extends(n,(function(t,e,s){i.apply(this,[n,e,s]),this.label=t}))},535:(t,e,s)=>{const i=s(6291),n="halt";t.exports=i.extends(n,(function(t,e,s){i.apply(this,[n,e,s]),this.after=t}))},3034:(t,e,s)=>{const i=s(814),n="identifier",o=i.extends(n,(function(t,e,s){i.apply(this,[n,e,s]),this.name=t}));t.exports=o},3982:(t,e,s)=>{const i=s(6291);t.exports=i.extends("if",(function(t,e,s,n,o,r){i.apply(this,["if",o,r]),this.test=t,this.body=e,this.alternate=s,this.shortForm=n}))},7386:(t,e,s)=>{const i=s(6846),n="include";t.exports=i.extends(n,(function(t,e,s,o,r){i.apply(this,[n,o,r]),this.once=t,this.require=e,this.target=s}))},3765:(t,e,s)=>{const i=s(1632),n="inline";t.exports=i.extends(n,(function(t,e,s,o){i.apply(this,[n,t,e,s,o])}))},7718:(t,e,s)=>{const i=s(8714),n="interface";t.exports=i.extends(n,(function(t,e,s,o,r){i.apply(this,[n,t,o,r]),this.extends=e,this.body=s}))},9483:(t,e,s)=>{const i=s(6846),n="isset";t.exports=i.extends(n,(function(t,e,s){i.apply(this,[n,e,s]),this.variables=t}))},2324:(t,e,s)=>{const i=s(6291),n="label";t.exports=i.extends(n,(function(t,e,s){i.apply(this,[n,e,s]),this.name=t}))},8261:(t,e,s)=>{const i=s(6846),n="list";t.exports=i.extends(n,(function(t,e,s,o){i.apply(this,[n,s,o]),this.items=t,this.shortForm=e}))},1632:(t,e,s)=>{const i=s(6846),n="literal";t.exports=i.extends(n,(function(t,e,s,o,r){i.apply(this,[t||n,o,r]),this.value=e,s&&(this.raw=s)}))},1703:t=>{t.exports=function(t,e,s){this.source=t,this.start=e,this.end=s}},1920:(t,e,s)=>{const i=s(6846),n="lookup";t.exports=i.extends(n,(function(t,e,s,o,r){i.apply(this,[t||n,o,r]),this.what=e,this.offset=s}))},1695:(t,e,s)=>{const i=s(1632),n="magic";t.exports=i.extends(n,(function(t,e,s,o){i.apply(this,[n,t,e,s,o])}))},120:(t,e,s)=>{const i=s(7740),n="method";t.exports=i.extends(n,(function(){i.apply(this,arguments),this.kind=n}))},2743:(t,e,s)=>{const i=s(882),n="name",o=i.extends(n,(function t(e,s,o,r){i.apply(this,[n,o,r]),s?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("\\")}));o.UNQUALIFIED_NAME="uqn",o.QUALIFIED_NAME="qn",o.FULL_QUALIFIED_NAME="fqn",o.RELATIVE_NAME="rn",t.exports=o},8126:(t,e,s)=>{const i=s(5600),n="namespace";t.exports=i.extends(n,(function(t,e,s,o,r){i.apply(this,[n,e,o,r]),this.name=t,this.withBrackets=s||!1}))},7614:(t,e,s)=>{const i=s(6846);t.exports=i.extends("new",(function(t,e,s,n){i.apply(this,["new",s,n]),this.what=t,this.arguments=e}))},814:t=>{const e=function(t,e,s){this.kind=t,e&&(this.leadingComments=e),s&&(this.loc=s)};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},9238:(t,e,s)=>{const i=s(814),n="noop";t.exports=i.extends(n,(function(t,e){i.apply(this,[n,t,e])}))},7769:(t,e,s)=>{const i=s(1632),n="nowdoc";t.exports=i.extends(n,(function(t,e,s,o,r){i.apply(this,[n,t,e,o,r]),this.label=s}))},7461:(t,e,s)=>{const i=s(814),n="nullkeyword";t.exports=i.extends(n,(function(t,e,s){i.apply(this,[n,e,s]),this.raw=t}))},6038:(t,e,s)=>{const i=s(1632),n="number";t.exports=i.extends(n,(function(t,e,s,o){i.apply(this,[n,t,e,s,o])}))},9570:(t,e,s)=>{const i=s(1920),n="offsetlookup";t.exports=i.extends(n,(function(t,e,s,o){i.apply(this,[n,t,e,s,o])}))},2210:(t,e,s)=>{const i=s(6846),n="operation";t.exports=i.extends(n,(function(t,e,s){i.apply(this,[t||n,e,s])}))},3565:(t,e,s)=>{const i=s(8714),n="parameter";t.exports=i.extends(n,(function(t,e,s,o,r,h,a,l){i.apply(this,[n,t,a,l]),this.value=s,this.type=e,this.byref=o,this.variadic=r,this.nullable=h}))},7366:(t,e,s)=>{const i=s(882),n="parentreference",o=i.extends(n,(function(t,e,s){i.apply(this,[n,e,s]),this.raw=t}));t.exports=o},1143:t=>{t.exports=function(t,e,s){this.line=t,this.column=e,this.offset=s}},7692:(t,e,s)=>{const i=s(2210),n="post";t.exports=i.extends(n,(function(t,e,s,o){i.apply(this,[n,s,o]),this.type=t,this.what=e}))},8117:(t,e,s)=>{const i=s(2210);t.exports=i.extends("pre",(function(t,e,s,n){i.apply(this,["pre",s,n]),this.type=t,this.what=e}))},2795:(t,e,s)=>{const i=s(6846),n="print";t.exports=i.extends(n,(function(t,e,s){i.apply(this,[n,e,s]),this.expression=t}))},202:(t,e,s)=>{const i=s(5600),n="program";t.exports=i.extends(n,(function(t,e,s,o,r,h){i.apply(this,[n,t,r,h]),this.errors=e,s&&(this.comments=s),o&&(this.tokens=o)}))},69:(t,e,s)=>{const i=s(6291),n="property";t.exports=i.extends(n,(function(t,e,s,o,r,h){i.apply(this,[n,r,h]),this.name=t,this.value=e,this.nullable=s,this.type=o}))},6909:(t,e,s)=>{const i=s(1920),n="propertylookup";t.exports=i.extends(n,(function(t,e,s,o){i.apply(this,[n,t,e,s,o])}))},8871:(t,e,s)=>{const i=s(6291),n="propertystatement",o=i.extends(n,(function(t,e,s,o,r){i.apply(this,[n,o,r]),this.properties=e,this.parseFlags(s)}));o.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=o},882:(t,e,s)=>{const i=s(814),n="reference",o=i.extends(n,(function(t,e,s){i.apply(this,[t||n,e,s])}));t.exports=o},2238:(t,e,s)=>{const i=s(6846),n="retif";t.exports=i.extends(n,(function(t,e,s,o,r){i.apply(this,[n,o,r]),this.test=t,this.trueExpr=e,this.falseExpr=s}))},1777:(t,e,s)=>{const i=s(6291),n="return";t.exports=i.extends(n,(function(t,e,s){i.apply(this,[n,e,s]),this.expr=t}))},1095:(t,e,s)=>{const i=s(882),n="selfreference",o=i.extends(n,(function(t,e,s){i.apply(this,[n,e,s]),this.raw=t}));t.exports=o},9324:(t,e,s)=>{const i=s(6846),n="silent";t.exports=i.extends(n,(function(t,e,s){i.apply(this,[n,e,s]),this.expr=t}))},6291:(t,e,s)=>{const i=s(814),n="statement";t.exports=i.extends(n,(function(t,e,s){i.apply(this,[t||n,e,s])}))},4755:(t,e,s)=>{const i=s(6291),n="static";t.exports=i.extends(n,(function(t,e,s){i.apply(this,[n,e,s]),this.variables=t}))},669:(t,e,s)=>{const i=s(1920),n="staticlookup";t.exports=i.extends(n,(function(t,e,s,o){i.apply(this,[n,t,e,s,o])}))},7577:(t,e,s)=>{const i=s(882),n="staticreference",o=i.extends(n,(function(t,e,s){i.apply(this,[n,e,s]),this.raw=t}));t.exports=o},7788:(t,e,s)=>{const i=s(814),n="staticvariable";t.exports=i.extends(n,(function(t,e,s,o){i.apply(this,[n,s,o]),this.variable=t,this.defaultValue=e}))},8653:(t,e,s)=>{const i=s(1632),n="string";t.exports=i.extends(n,(function(t,e,s,o,r,h){i.apply(this,[n,e,o,r,h]),this.unicode=s,this.isDoubleQuote=t}))},206:(t,e,s)=>{const i=s(6291),n="switch";t.exports=i.extends(n,(function(t,e,s,o,r){i.apply(this,[n,o,r]),this.test=t,this.body=e,this.shortForm=s}))},330:(t,e,s)=>{const i=s(6291),n="throw";t.exports=i.extends(n,(function(t,e,s){i.apply(this,[n,e,s]),this.what=t}))},9279:(t,e,s)=>{const i=s(8714),n="trait";t.exports=i.extends(n,(function(t,e,s,o){i.apply(this,[n,t,s,o]),this.body=e}))},3832:(t,e,s)=>{const i=s(814),n="traitalias";t.exports=i.extends(n,(function(t,e,s,o,r,h){i.apply(this,[n,r,h]),this.trait=t,this.method=e,this.as=s,this.visibility="",o&&(0===o[0]?this.visibility="public":1===o[0]?this.visibility="protected":2===o[0]&&(this.visibility="private"))}))},8401:(t,e,s)=>{const i=s(814),n="traitprecedence";t.exports=i.extends(n,(function(t,e,s,o,r){i.apply(this,[n,o,r]),this.trait=t,this.method=e,this.instead=s}))},3590:(t,e,s)=>{const i=s(814),n="traituse";t.exports=i.extends(n,(function(t,e,s,o){i.apply(this,[n,s,o]),this.traits=t,this.adaptations=e}))},2460:(t,e,s)=>{const i=s(6291);t.exports=i.extends("try",(function(t,e,s,n,o){i.apply(this,["try",n,o]),this.body=t,this.catches=e,this.always=s}))},838:(t,e,s)=>{const i=s(882),n="typereference",o=i.extends(n,(function(t,e,s,o){i.apply(this,[n,s,o]),this.name=t,this.raw=e}));o.types=["int","float","string","bool","object","array","callable","iterable","void"],t.exports=o},4960:(t,e,s)=>{const i=s(2210),n="unary";t.exports=i.extends(n,(function(t,e,s,o){i.apply(this,[n,s,o]),this.type=t,this.what=e}))},85:(t,e,s)=>{const i=s(6291),n="unset";t.exports=i.extends(n,(function(t,e,s){i.apply(this,[n,e,s]),this.variables=t}))},6442:(t,e,s)=>{const i=s(6291),n="usegroup";t.exports=i.extends(n,(function(t,e,s,o,r){i.apply(this,[n,o,r]),this.name=t,this.type=e,this.items=s}))},1685:(t,e,s)=>{const i=s(6291),n="useitem",o=i.extends(n,(function(t,e,s,o,r){i.apply(this,[n,o,r]),this.name=t,this.alias=e,this.type=s}));o.TYPE_CONST="const",o.TYPE_FUNCTION="function",t.exports=o},4954:(t,e,s)=>{const i=s(6846),n="variable";t.exports=i.extends(n,(function(t,e,s,o){i.apply(this,[n,s,o]),this.name=t,this.curly=e||!1}))},2288:(t,e,s)=>{const i=s(6846),n="variadic";t.exports=i.extends(n,(function(t,e,s){i.apply(this,[n,e,s]),this.what=t}))},6001:(t,e,s)=>{const i=s(6291),n="while";t.exports=i.extends(n,(function(t,e,s,o,r){i.apply(this,[n,o,r]),this.test=t,this.body=e,this.shortForm=s}))},7406:(t,e,s)=>{const i=s(6846),n="yield";t.exports=i.extends(n,(function(t,e,s,o){i.apply(this,[n,s,o]),this.value=t,this.key=e}))},6062:(t,e,s)=>{const i=s(6846),n="yieldfrom";t.exports=i.extends(n,(function(t,e,s){i.apply(this,[n,e,s]),this.value=t}))},3638:(t,e,s)=>{const i=s(6122),n=s(5079),o=s(3155),r=s(7446);function h(t,e){const s=Object.keys(t);let i=s.length;for(;i--;){const n=s[i],o=t[n];null===o?delete e[n]:"function"==typeof o?e[n]=o.bind(e):Array.isArray(o)?e[n]=Array.isArray(e[n])?e[n].concat(o):o:e[n]="object"==typeof o&&"object"==typeof e[n]?h(o,e[n]):o}return e}const a=function(t){if("function"==typeof this)return new this(t);if(this.tokens=o,this.lexer=new i(this),this.ast=new r,this.parser=new n(this.lexer,this.ast),t&&"object"==typeof t){if(t.parser&&(t.lexer||(t.lexer={}),t.parser.version)){if("string"==typeof t.parser.version){let 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")}h(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,s){return"object"!=typeof e||s||(s=e,e="unknown"),new a(s).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);const e=this.lexer.EOF,s=this.tokens.values;this.lexer.setInput(t);let i=this.lexer.lex()||e;const n=[];for(;i!=e;){let t=this.lexer.yytext;s.hasOwnProperty(i)&&(t=[s[i],t,this.lexer.yylloc.first_line]),n.push(t),i=this.lexer.lex()||e}return n},t.exports=a,t.exports.tokens=o,t.exports.lexer=i,t.exports.AST=r,t.exports.parser=n,t.exports.combine=h,t.exports.default=a},6122:(t,e,s)=>{const i=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}};i.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},i.prototype.input=function(){const 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):""},i.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(let t=0;t<this.yytext.length;t++){let e=this.yytext[t];"\r"===e?(e=this.yytext[++t],this.yyprevcol=this.yylloc.last_column,this.yylloc.last_line++,this.yylloc.last_column=0,"\n"!==e&&("\r"===e?this.yylloc.last_line++:this.yylloc.last_column++)):"\n"===e?(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},i.prototype.tryMatch=function(t){return t===this.ahead(t.length)},i.prototype.tryMatchCaseless=function(t){return t===this.ahead(t.length).toLowerCase()},i.prototype.ahead=function(t){let 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},i.prototype.consume=function(t){for(let e=0;e<t;e++){const t=this._input[this.offset];if(!t)break;this.yytext+=t,this.offset++,"\r"===t&&"\n"===this._input[this.offset]&&(this.yytext+="\n",this.offset++,e++),"\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++}return this},i.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}},i.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},i.prototype.appendToken=function(t,e){return this.tokens.push([t,e]),this},i.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;let 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},i.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},i.prototype.popState=function(){const 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},i.prototype.next=function(){let 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?(t=this.tokens.shift(),"object"==typeof t[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){let e=t;e="number"==typeof e?this.engine.tokens.values[e]:'"'+e+'"';const s=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(s.stack)}return t},[s(990),s(4775),s(8851),s(7497),s(5446),s(3021),s(8860),s(7599)].forEach((function(t){for(const e in t)i.prototype[e]=t[e]})),t.exports=i},990:t=>{t.exports={T_COMMENT:function(){for(;this.offset<this.size;){const 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(){let 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(),"*"===t&&"/"===this._input[this.offset]){this.input();break}return e}}},4775: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;){let t=this.input();if("<"==t)if(t=this.ahead(1),"?"==t){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"===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}}},8851:t=>{let e=10,s="2147483648";"x64"==process.arch&&(e=19,s="9223372036854775808"),t.exports={consume_NUM:function(){let t=this.yytext[0],i="."===t;if("0"===t)if(t=this.input(),"x"===t||"X"===t){if(t=this.input(),"_"!==t&&this.is_HEX())return this.consume_HNUM();this.unput(t?2:1)}else if("b"===t||"B"===t){if(t=this.input(),"_"!==t&&"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;){const e=t;if(t=this.input(),"_"===t){if("_"===e){this.unput(2);break}if("."===e){this.unput(1);break}if("e"===e||"E"===e){this.unput(2);break}}else{if("."===t){if(i){this.unput(1);break}if("_"===e){this.unput(2);break}i=!0;continue}if("e"===t||"E"===t){if("_"===e){this.unput(1);break}let s=2;if(t=this.input(),"+"!==t&&"-"!==t||(s=3,t=this.input()),this.is_NUM_START())return this.consume_LNUM(),this.tok.T_DNUMBER;this.unput(t?s:s-1);break}}if(!this.is_NUM()){t&&this.unput(1);break}}return i?this.tok.T_DNUMBER:this.yytext.length<e-1||this.yytext.length<e||this.yytext.length==e&&this.yytext<s?this.tok.T_LNUMBER:this.tok.T_DNUMBER},consume_HNUM:function(){for(;this.offset<this.size;){const 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;){const t=this.input();if(!this.is_NUM()){t&&this.unput(1);break}}return this.tok.T_LNUMBER},consume_BNUM:function(){let t;for(;this.offset<this.size;)if(t=this.input(),"0"!==t&&"1"!==t&&"_"!==t){t&&this.unput(1);break}return this.tok.T_LNUMBER}}},7497:t=>{t.exports={matchST_LOOKING_FOR_PROPERTY:function(){let t=this.input();if("-"===t){if(t=this.input(),">"===t)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(){let t=this.input();if(this.popState(),this.begin("ST_IN_SCRIPTING"),this.is_LABEL_START()){if(this.consume_LABEL(),t=this.input(),"["===t||"}"===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(){const 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")}}},5446:t=>{t.exports={matchST_IN_SCRIPTING:function(){let 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();const t=this._input[this.offset];return"\n"!==t&&"\r"!==t||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(),t=this._input[this.offset],"\n"!==t&&"\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;){const t=this.input();if(" "!==t&&"\t"!==t&&"\n"!==t&&"\r"!==t){t&&this.unput(1);break}}return this.tok.T_WHITESPACE}}},3021:t=>{const e=["\n","\r"],s=["\n","\r",";"],i=s.concat(["\t"," ",",","]",")","/","=","!"]);t.exports={T_CONSTANT_ENCAPSED_STRING:function(){let t;for(;this.offset<this.size;)if(t=this.input(),"\\"==t)this.input();else if("'"==t)break;return this.tok.T_CONSTANT_ENCAPSED_STRING},is_HEREDOC:function(){const 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()););let s=this._input[this.offset-1];if("'"===s||'"'===s?this.offset++:s=null,this.is_LABEL_START()){let i=this.offset-1;for(;this.offset<this.size&&(this.offset++,this.is_LABEL()););const n=this._input.substring(i,this.offset-1);if((!s||s===this._input[this.offset-1])&&(s&&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,i=this.offset-t,this.offset=t,this.consume(i),"'"===s?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(){let t;for(;this.offset<this.size;)if(t=this.input(),"\\"==t)this.input();else{if('"'==t)break;if("$"==t){if(t=this.input(),"{"==t||this.is_LABEL_START()){this.unput(2);break}t&&this.unput(1)}else if("{"==t){if(t=this.input(),"$"==t){this.unput(2);break}t&&this.unput(1)}}if('"'==t)return this.tok.T_CONSTANT_ENCAPSED_STRING;{let t=1;return"b"!==this.yytext[0]&&"B"!==this.yytext[0]||(t=2),this.yytext.length>2&&this.appendToken(this.tok.T_ENCAPSED_AND_WHITESPACE,this.yytext.length-t),this.unput(this.yytext.length-t),this.begin("ST_DOUBLE_QUOTES"),this.yytext}},isDOC_MATCH:function(t,n){const o=this._input[t-2];if(!e.includes(o))return!1;let r=!1,h=!1,a=0,l=this._input[t-1];if(this.version>=703){for(;"\t"===l||" "===l;)" "===l?r=!0:"\t"===l&&(h=!0),l=this._input[t+a],a++;if(t+=a,e.includes(this._input[t-1]))return!1}if(this._input.substring(t-1,t-1+this.heredoc_label.length)===this.heredoc_label.label){const e=this._input[t-1+this.heredoc_label.length];if((this.version>=703?i:s).includes(e)){if(n){if(this.consume(a),r&&h)throw new Error("Parse error:  mixing spaces and tabs in ending marker at line "+this.yylineno+" (offset "+this.offset+")")}else this.heredoc_label.indentation=a,this.heredoc_label.indentation_uses_spaces=r,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;let t=this.offset+1;for(;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;let t=this._input[this.offset-1];for(;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(){let 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(),"{"===t)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()){const t=this.offset,e=this.consume_VARIABLE();return this.yytext.length>this.offset-t+2?(this.appendToken(e,this.offset-t+2),this.unput(this.offset-t+2),this.tok.T_ENCAPSED_AND_WHITESPACE):e}}else if("{"===t){if(t=this.input(),"$"===t)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();const 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(){let t=this.input();if("$"===t){if(t=this.input(),"{"===t)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(),"{"===t)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()){const t=this.offset,e=this.consume_VARIABLE();return this.yytext.length>this.offset-t+2?(this.appendToken(e,this.offset-t+2),this.unput(this.offset-t+2),this.tok.T_ENCAPSED_AND_WHITESPACE):e}continue}if("{"===t){if(t=this.input(),"$"===t)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(){let t=this.input();if("$"===t){if(t=this.input(),"{"===t)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(),"{"===t)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()){const t=this.offset,e=this.consume_VARIABLE();return this.yytext.length>this.offset-t+2?(this.appendToken(e,this.offset-t+2),this.unput(this.offset-t+2),this.tok.T_ENCAPSED_AND_WHITESPACE):e}t&&this.unput(1)}else if("{"===t){if(t=this.input(),"$"===t)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}}},8860:t=>{t.exports={T_STRING:function(){const t=this.yytext.toLowerCase();let 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){const t=this.input(1);if('"'===t)return this.ST_DOUBLE_QUOTES();if("'"===t)return this.T_CONSTANT_ENCAPSED_STRING();t&&this.unput(1)}return e},consume_TOKEN:function(){const 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(){const 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(){const t=this.offset;if(this.input(),this.is_TABSPACE()&&this.consume_TABSPACE().input(),this.is_LABEL_START()){const t=this.yytext.length;this.consume_LABEL();const e=this.yytext.substring(t-1).toLowerCase(),s=this.castKeywords[e];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(){const 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(){const 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(){let t=this._input[this.offset];return"<"===t?(t=this._input[this.offset+1],"="===t?(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(){let t=this._input[this.offset];return"="===t?(this.input(),this.tok.T_IS_GREATER_OR_EQUAL):">"===t?(t=this._input[this.offset+1],"="===t?(this.consume(2),this.tok.T_SR_EQUAL):(this.input(),this.tok.T_SR)):">"},"*":function(){const 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(){const 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(){const t=this._input[this.offset];return"="===t?(this.input(),this.tok.T_AND_EQUAL):"&"===t?(this.input(),this.tok.T_BOOLEAN_AND):"&"},"|":function(){const 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):"^"}}}},7599:t=>{t.exports={is_NUM:function(){const t=this._input.charCodeAt(this.offset-1);return t>47&&t<58||95===t},is_NUM_START:function(){const t=this._input.charCodeAt(this.offset-1);return t>47&&t<58},is_LABEL:function(){const t=this._input.charCodeAt(this.offset-1);return t>96&&t<123||t>64&&t<91||95===t||t>47&&t<58||t>126},is_LABEL_START:function(){const t=this._input.charCodeAt(this.offset-1);return t>64&&t<91||t>96&&t<123||95===t||t>126},consume_LABEL:function(){for(;this.offset<this.size;){const t=this.input();if(!this.is_LABEL()){t&&this.unput(1);break}}return this},is_TOKEN:function(){const t=this._input[this.offset-1];return-1!==";:,.\\[]()|^&+-/*=%!~$<>?@".indexOf(t)},is_WHITESPACE:function(){const t=this._input[this.offset-1];return" "===t||"\t"===t||"\n"===t||"\r"===t},is_TABSPACE:function(){const t=this._input[this.offset-1];return" "===t||"\t"===t},consume_TABSPACE:function(){for(;this.offset<this.size;){const t=this.input();if(!this.is_TABSPACE()){t&&this.unput(1);break}}return this},is_HEX:function(){const t=this._input.charCodeAt(this.offset-1);return t>47&&t<58||t>64&&t<71||t>96&&t<103||95===t}}},5079:(t,e,s)=>{function i(t){return"."!=t&&","!=t&&!isNaN(parseFloat(t))&&isFinite(t)}const n=function(t,e){this.lexer=t,this.ast=e,this.tok=t.tok,this.EOF=t.EOF,this.token=null,this.prev=null,this.debug=!1,this.version=704,this.extractDoc=!1,this.extractTokens=!1,this.suppressErrors=!1;const s=function(t){return[t,null]};this.entries={IDENTIFIER:new Map([this.tok.T_ABSTRACT,this.tok.T_ARRAY,this.tok.T_AS,this.tok.T_BREAK,this.tok.T_CALLABLE,this.tok.T_CASE,this.tok.T_CATCH,this.tok.T_CLASS,this.tok.T_CLASS_C,this.tok.T_CLONE,this.tok.T_CONST,this.tok.T_CONTINUE,this.tok.T_DECLARE,this.tok.T_DEFAULT,this.tok.T_DIR,this.tok.T_DO,this.tok.T_ECHO,this.tok.T_ELSE,this.tok.T_ELSEIF,this.tok.T_EMPTY,this.tok.T_ENDDECLARE,this.tok.T_ENDFOR,this.tok.T_ENDFOREACH,this.tok.T_ENDIF,this.tok.T_ENDSWITCH,this.tok.T_ENDWHILE,this.tok.T_EVAL,this.tok.T_EXIT,this.tok.T_EXTENDS,this.tok.T_FILE,this.tok.T_FINAL,this.tok.T_FINALLY,this.tok.T_FN,this.tok.T_FOR,this.tok.T_FOREACH,this.tok.T_FUNC_C,this.tok.T_FUNCTION,this.tok.T_GLOBAL,this.tok.T_GOTO,this.tok.T_IF,this.tok.T_IMPLEMENTS,this.tok.T_INCLUDE,this.tok.T_INCLUDE_ONCE,this.tok.T_INSTANCEOF,this.tok.T_INSTEADOF,this.tok.T_INTERFACE,this.tok.T_ISSET,this.tok.T_LINE,this.tok.T_LIST,this.tok.T_LOGICAL_AND,this.tok.T_LOGICAL_OR,this.tok.T_LOGICAL_XOR,this.tok.T_METHOD_C,this.tok.T_NAMESPACE,this.tok.T_NEW,this.tok.T_NS_C,this.tok.T_PRINT,this.tok.T_PRIVATE,this.tok.T_PROTECTED,this.tok.T_PUBLIC,this.tok.T_REQUIRE,this.tok.T_REQUIRE_ONCE,this.tok.T_RETURN,this.tok.T_STATIC,this.tok.T_SWITCH,this.tok.T_THROW,this.tok.T_TRAIT,this.tok.T_TRY,this.tok.T_UNSET,this.tok.T_USE,this.tok.T_VAR,this.tok.T_WHILE,this.tok.T_YIELD].map(s)),VARIABLE:new Map([this.tok.T_VARIABLE,"$","&",this.tok.T_NS_SEPARATOR,this.tok.T_STRING,this.tok.T_NAMESPACE,this.tok.T_STATIC].map(s)),SCALAR:new Map([this.tok.T_CONSTANT_ENCAPSED_STRING,this.tok.T_START_HEREDOC,this.tok.T_LNUMBER,this.tok.T_DNUMBER,this.tok.T_ARRAY,"[",this.tok.T_CLASS_C,this.tok.T_TRAIT_C,this.tok.T_FUNC_C,this.tok.T_METHOD_C,this.tok.T_LINE,this.tok.T_FILE,this.tok.T_DIR,this.tok.T_NS_C,'"','b"','B"',"-",this.tok.T_NS_SEPARATOR].map(s)),T_MAGIC_CONST:new Map([this.tok.T_CLASS_C,this.tok.T_TRAIT_C,this.tok.T_FUNC_C,this.tok.T_METHOD_C,this.tok.T_LINE,this.tok.T_FILE,this.tok.T_DIR,this.tok.T_NS_C].map(s)),T_MEMBER_FLAGS:new Map([this.tok.T_PUBLIC,this.tok.T_PRIVATE,this.tok.T_PROTECTED,this.tok.T_STATIC,this.tok.T_ABSTRACT,this.tok.T_FINAL].map(s)),EOS:new Map([";",this.EOF,this.tok.T_INLINE_HTML].map(s)),EXPR:new Map(["@","-","+","!","~","(","`",this.tok.T_LIST,this.tok.T_CLONE,this.tok.T_INC,this.tok.T_DEC,this.tok.T_NEW,this.tok.T_ISSET,this.tok.T_EMPTY,this.tok.T_INCLUDE,this.tok.T_INCLUDE_ONCE,this.tok.T_REQUIRE,this.tok.T_REQUIRE_ONCE,this.tok.T_EVAL,this.tok.T_INT_CAST,this.tok.T_DOUBLE_CAST,this.tok.T_STRING_CAST,this.tok.T_ARRAY_CAST,this.tok.T_OBJECT_CAST,this.tok.T_BOOL_CAST,this.tok.T_UNSET_CAST,this.tok.T_EXIT,this.tok.T_PRINT,this.tok.T_YIELD,this.tok.T_STATIC,this.tok.T_FUNCTION,this.tok.T_FN,this.tok.T_VARIABLE,"$",this.tok.T_NS_SEPARATOR,this.tok.T_STRING,this.tok.T_STRING,this.tok.T_CONSTANT_ENCAPSED_STRING,this.tok.T_START_HEREDOC,this.tok.T_LNUMBER,this.tok.T_DNUMBER,this.tok.T_ARRAY,"[",this.tok.T_CLASS_C,this.tok.T_TRAIT_C,this.tok.T_FUNC_C,this.tok.T_METHOD_C,this.tok.T_LINE,this.tok.T_FILE,this.tok.T_DIR,this.tok.T_NS_C,'"','b"','B"',"-",this.tok.T_NS_SEPARATOR].map(s))}};n.prototype.getTokenName=function(t){return i(t)?t==this.EOF?"the end of file (EOF)":this.lexer.engine.tokens.values[t]:"'"+t+"'"},n.prototype.parse=function(t,e){this._errors=[],this.filename=e||"eval",this.currentNamespace=[""],this.extractDoc?this._docs=[]:this._docs=null,this.extractTokens?this._tokens=[]:this._tokens=null,this._docIndex=0,this._lastNode=null,this.lexer.setInput(t),this.lexer.all_tokens=this.extractTokens,this.lexer.comment_tokens=this.extractDoc,this.length=this.lexer._input.length,this.innerList=!1,this.innerListForm=!1;const s=this.node("program"),i=[];for(this.next();this.token!=this.EOF;)i.push(this.read_start());0===i.length&&this.extractDoc&&this._docs.length>this._docIndex&&i.push(this.node("noop")()),this.prev=[this.lexer.yylloc.last_line,this.lexer.yylloc.last_column,this.lexer.offset];const n=s(i,this._errors,this._docs,this._tokens);if(this.debug){const t=this.ast.checkNodes();if(t.length>0)throw t.forEach((function(t){t.position&&console.log("Node at line "+t.position.line+", column "+t.position.column),console.log(t.stack.join("\n"))})),new Error("Some nodes are not closed")}return n},n.prototype.raiseError=function(t,e,s,i){if(t+=" on line "+this.lexer.yylloc.first_line,!this.suppressErrors){const e=new SyntaxError(t,this.filename,this.lexer.yylloc.first_line);throw e.lineNumber=this.lexer.yylloc.first_line,e.fileName=this.filename,e.columnNumber=this.lexer.yylloc.first_column,e}const n=this.ast.prepare("error",null,this)(t,i,this.lexer.yylloc.first_line,s);return this._errors.push(n),n},n.prototype.error=function(t){let e="Parse Error : syntax error",s=this.getTokenName(this.token),n="";if(this.token!==this.EOF){if(i(this.token)){let t=this.text();t.length>10&&(t=t.substring(0,7)+"..."),s="'"+t+"' ("+s+")"}e+=", unexpected "+s}return t&&!Array.isArray(t)&&((i(t)||1===t.length)&&(n=", expecting "+this.getTokenName(t)),e+=n),this.raiseError(e,n,t,s)},n.prototype.node=function(t){if(this.extractDoc){let e=null;this._docIndex<this._docs.length&&(e=this._docs.slice(this._docIndex),this._docIndex=this._docs.length,this.debug&&(console.log(new Error("Append docs on "+t)),console.log(e)));const s=this.ast.prepare(t,e,this);return s.postBuild=function(t){if(this._docIndex<this._docs.length)if(this._lastNode){const t=this.prev[2];let e=this._docIndex;for(;e<this._docs.length&&!(this._docs[e].offset>t);e++);e>this._docIndex&&(this._lastNode.setTrailingComments(this._docs.slice(this._docIndex,e)),this._docIndex=e)}else this.token===this.EOF&&(t.setTrailingComments(this._docs.slice(this._docIndex)),this._docIndex=this._docs.length);this._lastNode=t}.bind(this),s}return this.ast.prepare(t,null,this)},n.prototype.expectEndOfStatement=function(t){if(";"===this.token)t&&";"===this.lexer.yytext&&t.includeToken(this);else if(this.token!==this.tok.T_INLINE_HTML&&this.token!==this.EOF)return this.error(";"),!1;return this.next(),!0};const o=["parser.next","parser.node","parser.showlog"];n.prototype.showlog=function(){const t=(new Error).stack.split("\n");let e;for(let s=2;s<t.length;s++){e=t[s].trim();let i=!1;for(let t=0;t<o.length;t++)if(e.substring(3,3+o[t].length)===o[t]){i=!0;break}if(!i)break}return console.log("Line "+this.lexer.yylloc.first_line+" : "+this.getTokenName(this.token)+">"+this.lexer.yytext+"< @--\x3e"+e),this},n.prototype.expect=function(t){if(Array.isArray(t)){if(-1===t.indexOf(this.token))return this.error(t),!1}else if(this.token!=t)return this.error(t),!1;return!0},n.prototype.text=function(){return this.lexer.yytext},n.prototype.next=function(){if(";"===this.token&&";"!==this.lexer.yytext||(this.prev=[this.lexer.yylloc.last_line,this.lexer.yylloc.last_column,this.lexer.offset]),this.lex(),this.debug&&this.showlog(),this.extractDoc)for(;this.token===this.tok.T_COMMENT||this.token===this.tok.T_DOC_COMMENT;)this.token===this.tok.T_COMMENT?this._docs.push(this.read_comment()):this._docs.push(this.read_doc_comment());return this},n.prototype.lex=function(){if(this.extractTokens)do{if(this.token=this.lexer.lex()||this.EOF,this.token===this.EOF)return this;let t=this.lexer.yytext;if(t=this.lexer.engine.tokens.values.hasOwnProperty(this.token)?[this.lexer.engine.tokens.values[this.token],t,this.lexer.yylloc.first_line,this.lexer.yylloc.first_offset,this.lexer.offset]:[null,t,this.lexer.yylloc.first_line,this.lexer.yylloc.first_offset,this.lexer.offset],this._tokens.push(t),this.token===this.tok.T_CLOSE_TAG)return this.token=";",this;if(this.token===this.tok.T_OPEN_TAG_WITH_ECHO)return this.token=this.tok.T_ECHO,this}while(this.token===this.tok.T_WHITESPACE||!this.extractDoc&&(this.token===this.tok.T_COMMENT||this.token===this.tok.T_DOC_COMMENT)||this.token===this.tok.T_OPEN_TAG);else this.token=this.lexer.lex()||this.EOF;return this},n.prototype.is=function(t){return Array.isArray(t)?-1!==t.indexOf(this.token):this.entries[t].has(this.token)},[s(3489),s(1395),s(1482),s(8356),s(8658),s(8573),s(3897),s(660),s(7616),s(2932),s(3912),s(510),s(5289),s(4394),s(8414)].forEach((function(t){for(const e in t){if(n.prototype.hasOwnProperty(e))throw new Error("Function "+e+" is already defined - collision");n.prototype[e]=t[e]}})),t.exports=n},3489:t=>{t.exports={read_array:function(){let t=null,e=!1;const s=this.node("array");this.token===this.tok.T_ARRAY?(this.next().expect("("),t=")"):(e=!0,t="]");let i=[];return this.next().token!==t&&(i=this.read_array_pair_list(e)),this.expect(t),this.next(),s(e,i)},read_array_pair_list:function(t){const e=this;return this.read_list((function(){return e.read_array_pair(t)}),",",!0)},read_array_pair:function(t){if(!t&&")"===this.token||t&&"]"===this.token)return;if(","===this.token)return this.node("noop")();const e=this.node("entry");let s=null,i=null,n=!1,o=!1;if("&"===this.token)this.next(),n=!0,i=this.read_variable(!0,!1);else if(this.token===this.tok.T_ELLIPSIS&&this.version>=704)this.next(),"&"===this.token&&this.error(),o=!0,i=this.read_expr();else{const t=this.read_expr();this.token===this.tok.T_DOUBLE_ARROW?(this.next(),s=t,"&"===this.token?(this.next(),n=!0,i=this.read_variable(!0,!1)):i=this.read_expr()):i=t}return e(s,i,n,o)}}},1395:t=>{t.exports={read_class_declaration_statement:function(){const t=this.node("class"),e=this.read_class_modifiers();if(this.token!==this.tok.T_CLASS)return this.error(this.tok.T_CLASS),this.next(),null;this.next().expect(this.tok.T_STRING);let s=this.node("identifier");const i=this.text();this.next(),s=s(i);const n=this.read_extends_from(),o=this.read_implements_list();return this.expect("{"),t(s,n,o,this.next().read_class_body(),e)},read_class_modifiers:function(){return[0,0,this.read_class_modifier()]},read_class_modifier:function(){return this.token===this.tok.T_ABSTRACT?(this.next(),1):this.token===this.tok.T_FINAL?(this.next(),2):0},read_class_body:function(){let t=[];for(;this.token!==this.EOF&&"}"!==this.token;){if(this.token===this.tok.T_COMMENT){t.push(this.read_comment());continue}if(this.token===this.tok.T_DOC_COMMENT){t.push(this.read_doc_comment());continue}if(this.token===this.tok.T_USE){t=t.concat(this.read_trait_use_statement());continue}const e=this.read_member_flags(!1);if(this.token!==this.tok.T_CONST)if(this.token===this.tok.T_VAR&&(this.next().expect(this.tok.T_VARIABLE),e[0]=null,e[1]=0),this.token===this.tok.T_FUNCTION)t.push(this.read_function(!1,e));else if(this.token===this.tok.T_VARIABLE||this.version>=704&&("?"===this.token||this.token===this.tok.T_CALLABLE||this.token===this.tok.T_ARRAY||this.token===this.tok.T_NS_SEPARATOR||this.token===this.tok.T_STRING||this.token===this.tok.T_NAMESPACE)){const s=this.read_variable_list(e);this.expect(";"),this.next(),t=t.concat(s)}else this.error([this.tok.T_CONST,this.tok.T_VARIABLE,this.tok.T_FUNCTION]),this.next();else{const s=this.read_constant_list(e);this.expect(";")&&this.next(),t=t.concat(s)}}return this.expect("}"),this.next(),t},read_variable_list:function(t){const e=this.node("propertystatement"),s=this.read_list((function(){const t=this.node("property"),[e,s]=this.read_optional_type();this.expect(this.tok.T_VARIABLE);let i=this.node("identifier");const n=this.text().substring(1);return this.next(),i=i(n),";"===this.token||","===this.token?t(i,null,e,s):"="===this.token?t(i,this.next().read_expr(),e,s):(this.expect([",",";","="]),t(i,null,e,s))}),",");return e(null,s,t)},read_constant_list:function(t){this.expect(this.tok.T_CONST)&&this.next();const e=this.node("classconstant"),s=this.read_list((function(){const t=this.node("constant");let e=null,s=null;if(this.token===this.tok.T_STRING||this.version>=700&&this.is("IDENTIFIER")){e=this.node("identifier");const t=this.text();this.next(),e=e(t)}else this.expect("IDENTIFIER");return this.expect("=")&&(s=this.next().read_expr()),t(e,s)}),",");return e(null,s,t)},read_member_flags:function(t){const e=[-1,-1,-1];if(this.is("T_MEMBER_FLAGS")){let s=0,i=0;do{switch(this.token){case this.tok.T_PUBLIC:s=0,i=0;break;case this.tok.T_PROTECTED:s=0,i=1;break;case this.tok.T_PRIVATE:s=0,i=2;break;case this.tok.T_STATIC:s=1,i=1;break;case this.tok.T_ABSTRACT:s=2,i=1;break;case this.tok.T_FINAL:s=2,i=2}t&&(0==s&&2==i?(this.expect([this.tok.T_PUBLIC,this.tok.T_PROTECTED]),i=-1):2==s&&1==i&&(this.error(),i=-1)),-1!==e[s]?this.error():-1!==i&&(e[s]=i)}while(this.next().is("T_MEMBER_FLAGS"))}return-1==e[1]&&(e[1]=0),-1==e[2]&&(e[2]=0),e},read_optional_type:function(){let t=!1;"?"===this.token&&(t=!0,this.next());let e=this.read_type();if(t&&!e&&this.raiseError("Expecting a type definition combined with nullable operator"),!t&&!e)return[!1,null];if("|"===this.token){e=[e];do{this.next();const t=this.read_type();if(!t){this.raiseError("Expecting a type definition");break}e.push(t)}while("|"===this.token)}return[t,e]},read_interface_declaration_statement:function(){const t=this.node("interface");if(this.token!==this.tok.T_INTERFACE)return this.error(this.tok.T_INTERFACE),this.next(),null;this.next().expect(this.tok.T_STRING);let e=this.node("identifier");const s=this.text();this.next(),e=e(s);const i=this.read_interface_extends_list();return this.expect("{"),t(e,i,this.next().read_interface_body())},read_interface_body:function(){let t=[];for(;this.token!==this.EOF&&"}"!==this.token;){if(this.token===this.tok.T_COMMENT){t.push(this.read_comment());continue}if(this.token===this.tok.T_DOC_COMMENT){t.push(this.read_doc_comment());continue}const e=this.read_member_flags(!0);if(this.token==this.tok.T_CONST){const s=this.read_constant_list(e);this.expect(";")&&this.next(),t=t.concat(s)}else if(this.token===this.tok.T_FUNCTION){const s=this.read_function_declaration(2,e);s.parseFlags(e),t.push(s),this.expect(";")&&this.next()}else this.error([this.tok.T_CONST,this.tok.T_FUNCTION]),this.next()}return this.expect("}")&&this.next(),t},read_trait_declaration_statement:function(){const t=this.node("trait");if(this.token!==this.tok.T_TRAIT)return this.error(this.tok.T_TRAIT),this.next(),null;this.next().expect(this.tok.T_STRING);let e=this.node("identifier");const s=this.text();return this.next(),e=e(s),this.expect("{"),t(e,this.next().read_class_body())},read_trait_use_statement:function(){const t=this.node("traituse");this.expect(this.tok.T_USE)&&this.next();const e=[this.read_namespace_name()];let s=null;for(;","===this.token;)e.push(this.next().read_namespace_name());if("{"===this.token){for(s=[];this.next().token!==this.EOF&&"}"!==this.token;)s.push(this.read_trait_use_alias()),this.expect(";");this.expect("}")&&this.next()}else this.expect(";")&&this.next();return t(e,s)},read_trait_use_alias:function(){const t=this.node();let e,s=null;if(this.is("IDENTIFIER")){e=this.node("identifier");const t=this.text();this.next(),e=e(t)}else if(e=this.read_namespace_name(),this.token===this.tok.T_DOUBLE_COLON)if(this.next(),this.token===this.tok.T_STRING||this.version>=700&&this.is("IDENTIFIER")){s=e,e=this.node("identifier");const t=this.text();this.next(),e=e(t)}else this.expect(this.tok.T_STRING);else e=e.name;if(this.token===this.tok.T_INSTEADOF)return t("traitprecedence",s,e,this.next().read_name_list());if(this.token===this.tok.T_AS){let i=null,n=null;if(this.next().is("T_MEMBER_FLAGS")&&(i=this.read_member_flags()),this.token===this.tok.T_STRING||this.version>=700&&this.is("IDENTIFIER")){n=this.node("identifier");const t=this.text();this.next(),n=n(t)}else!1===i&&this.expect(this.tok.T_STRING);return t("traitalias",s,e,n,i)}return this.expect([this.tok.T_AS,this.tok.T_INSTEADOF]),t("traitalias",s,e,null,null)}}},1482:t=>{t.exports={read_comment:function(){const t=this.text();let e=this.ast.prepare("/*"===t.substring(0,2)?"commentblock":"commentline",null,this);const s=this.lexer.yylloc.first_offset,i=this.prev;return this.prev=[this.lexer.yylloc.last_line,this.lexer.yylloc.last_column,this.lexer.offset],this.lex(),e=e(t),e.offset=s,this.prev=i,e},read_doc_comment:function(){let t=this.ast.prepare("commentblock",null,this);const e=this.lexer.yylloc.first_offset,s=this.text(),i=this.prev;return this.prev=[this.lexer.yylloc.last_line,this.lexer.yylloc.last_column,this.lexer.offset],this.lex(),t=t(s),t.offset=e,this.prev=i,t}}},8356:t=>{t.exports={read_expr:function(t){const e=this.node();if("@"===this.token)return t||(t=this.next().read_expr()),e("silent",t);if(t||(t=this.read_expr_item()),"|"===this.token)return e("bin","|",t,this.next().read_expr());if("&"===this.token)return e("bin","&",t,this.next().read_expr());if("^"===this.token)return e("bin","^",t,this.next().read_expr());if("."===this.token)return e("bin",".",t,this.next().read_expr());if("+"===this.token)return e("bin","+",t,this.next().read_expr());if("-"===this.token)return e("bin","-",t,this.next().read_expr());if("*"===this.token)return e("bin","*",t,this.next().read_expr());if("/"===this.token)return e("bin","/",t,this.next().read_expr());if("%"===this.token)return e("bin","%",t,this.next().read_expr());if(this.token===this.tok.T_POW)return e("bin","**",t,this.next().read_expr());if(this.token===this.tok.T_SL)return e("bin","<<",t,this.next().read_expr());if(this.token===this.tok.T_SR)return e("bin",">>",t,this.next().read_expr());if(this.token===this.tok.T_BOOLEAN_OR)return e("bin","||",t,this.next().read_expr());if(this.token===this.tok.T_LOGICAL_OR)return e("bin","or",t,this.next().read_expr());if(this.token===this.tok.T_BOOLEAN_AND)return e("bin","&&",t,this.next().read_expr());if(this.token===this.tok.T_LOGICAL_AND)return e("bin","and",t,this.next().read_expr());if(this.token===this.tok.T_LOGICAL_XOR)return e("bin","xor",t,this.next().read_expr());if(this.token===this.tok.T_IS_IDENTICAL)return e("bin","===",t,this.next().read_expr());if(this.token===this.tok.T_IS_NOT_IDENTICAL)return e("bin","!==",t,this.next().read_expr());if(this.token===this.tok.T_IS_EQUAL)return e("bin","==",t,this.next().read_expr());if(this.token===this.tok.T_IS_NOT_EQUAL)return e("bin","!=",t,this.next().read_expr());if("<"===this.token)return e("bin","<",t,this.next().read_expr());if(">"===this.token)return e("bin",">",t,this.next().read_expr());if(this.token===this.tok.T_IS_SMALLER_OR_EQUAL)return e("bin","<=",t,this.next().read_expr());if(this.token===this.tok.T_IS_GREATER_OR_EQUAL)return e("bin",">=",t,this.next().read_expr());if(this.token===this.tok.T_SPACESHIP)return e("bin","<=>",t,this.next().read_expr());if(this.token===this.tok.T_INSTANCEOF&&(t=e("bin","instanceof",t,this.next().read_class_name_reference()),";"!==this.token&&this.token!==this.tok.T_INLINE_HTML&&this.token!==this.EOF&&(t=this.read_expr(t))),this.token===this.tok.T_COALESCE)return e("bin","??",t,this.next().read_expr());if("?"===this.token){let s=null;return":"!==this.next().token&&(s=this.read_expr()),this.expect(":")&&this.next(),e("retif",t,s,this.read_expr())}return e.destroy(t),t},read_expr_cast:function(t){return this.node("cast")(t,this.text(),this.next().read_expr())},read_isset_variable:function(){return this.read_expr()},read_isset_variables:function(){return this.read_function_list(this.read_isset_variable,",")},read_internal_functions_in_yacc:function(){let t=null;switch(this.token){case this.tok.T_ISSET:{t=this.node("isset"),this.next().expect("(")&&this.next();const e=this.read_isset_variables();this.expect(")")&&this.next(),t=t(e)}break;case this.tok.T_EMPTY:{t=this.node("empty"),this.next().expect("(")&&this.next();const e=this.read_expr();this.expect(")")&&this.next(),t=t(e)}break;case this.tok.T_INCLUDE:t=this.node("include")(!1,!1,this.next().read_expr());break;case this.tok.T_INCLUDE_ONCE:t=this.node("include")(!0,!1,this.next().read_expr());break;case this.tok.T_EVAL:{t=this.node("eval"),this.next().expect("(")&&this.next();const e=this.read_expr();this.expect(")")&&this.next(),t=t(e)}break;case this.tok.T_REQUIRE:t=this.node("include")(!1,!0,this.next().read_expr());break;case this.tok.T_REQUIRE_ONCE:t=this.node("include")(!0,!0,this.next().read_expr())}return t},read_optional_expr:function(t){return this.token!==t?this.read_expr():null},read_exit_expr:function(){let t=null;return"("===this.token&&(this.next(),t=this.read_optional_expr(")"),this.expect(")")&&this.next()),t},read_expr_item:function(){let t,e;if("+"===this.token)return this.node("unary")("+",this.next().read_expr());if("-"===this.token)return this.node("unary")("-",this.next().read_expr());if("!"===this.token)return this.node("unary")("!",this.next().read_expr());if("~"===this.token)return this.node("unary")("~",this.next().read_expr());if("("===this.token)return e=this.next().read_expr(),e.parenthesizedExpression=!0,this.expect(")")&&this.next(),this.handleDereferencable(e);if("`"===this.token)return this.read_encapsed_string("`");if(this.token===this.tok.T_LIST){let e=null;const s=this.innerList;t=this.node("list"),s||(e=this.node("assign")),this.next().expect("(")&&this.next(),this.innerList||(this.innerList=!0);const i=this.read_array_pair_list(!1);this.expect(")")&&this.next();let n=!1;for(let t=0;t<i.length;t++)if(null!==i[t]&&"noop"!==i[t].kind){n=!0;break}return n||this.raiseError("Fatal Error :  Cannot use empty list on line "+this.lexer.yylloc.first_line),s?t(i,!1):(this.innerList=!1,this.expect("=")?e(t(i,!1),this.next().read_expr(),"="):t(i,!1))}if(this.token===this.tok.T_CLONE)return this.node("clone")(this.next().read_expr());switch(this.token){case this.tok.T_INC:return this.node("pre")("+",this.next().read_variable(!1,!1));case this.tok.T_DEC:return this.node("pre")("-",this.next().read_variable(!1,!1));case this.tok.T_NEW:return this.read_new_expr();case this.tok.T_ISSET:case this.tok.T_EMPTY:case this.tok.T_INCLUDE:case this.tok.T_INCLUDE_ONCE:case this.tok.T_EVAL:case this.tok.T_REQUIRE:case this.tok.T_REQUIRE_ONCE:return this.read_internal_functions_in_yacc();case this.tok.T_INT_CAST:return this.read_expr_cast("int");case this.tok.T_DOUBLE_CAST:return this.read_expr_cast("float");case this.tok.T_STRING_CAST:return this.read_expr_cast(-1!==this.text().indexOf("binary")?"binary":"string");case this.tok.T_ARRAY_CAST:return this.read_expr_cast("array");case this.tok.T_OBJECT_CAST:return this.read_expr_cast("object");case this.tok.T_BOOL_CAST:return this.read_expr_cast("bool");case this.tok.T_UNSET_CAST:return this.read_expr_cast("unset");case this.tok.T_EXIT:{const e="die"===this.lexer.yytext.toLowerCase();return t=this.node("exit"),this.next(),t(this.read_exit_expr(),e)}case this.tok.T_PRINT:return this.node("print")(this.next().read_expr());case this.tok.T_YIELD:{let e=null,s=null;return t=this.node("yield"),this.next().is("EXPR")&&(e=this.read_expr(),this.token===this.tok.T_DOUBLE_ARROW&&(s=e,e=this.next().read_expr())),t(e,s)}case this.tok.T_YIELD_FROM:return t=this.node("yieldfrom"),e=this.next().read_expr(),t(e);case this.tok.T_FN:case this.tok.T_FUNCTION:return this.read_inline_function();case this.tok.T_STATIC:{const t=[this.token,this.lexer.getState()];if(this.next(),this.token===this.tok.T_FUNCTION||this.version>=704&&this.token===this.tok.T_FN)return this.read_inline_function([0,1,0]);this.lexer.tokens.push(t),this.next()}}if(this.is("VARIABLE")){t=this.node(),e=this.read_variable(!1,!1);const s="identifier"===e.kind||"staticlookup"===e.kind&&"identifier"===e.offset.kind;switch(this.token){case"=":return s&&this.error("VARIABLE"),"&"==this.next().token?this.read_assignref(t,e):t("assign",e,this.read_expr(),"=");case this.tok.T_PLUS_EQUAL:return s&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"+=");case this.tok.T_MINUS_EQUAL:return s&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"-=");case this.tok.T_MUL_EQUAL:return s&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"*=");case this.tok.T_POW_EQUAL:return s&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"**=");case this.tok.T_DIV_EQUAL:return s&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"/=");case this.tok.T_CONCAT_EQUAL:return s&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),".=");case this.tok.T_MOD_EQUAL:return s&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"%=");case this.tok.T_AND_EQUAL:return s&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"&=");case this.tok.T_OR_EQUAL:return s&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"|=");case this.tok.T_XOR_EQUAL:return s&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"^=");case this.tok.T_SL_EQUAL:return s&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"<<=");case this.tok.T_SR_EQUAL:return s&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),">>=");case this.tok.T_COALESCE_EQUAL:return s&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"??=");case this.tok.T_INC:return s&&this.error("VARIABLE"),this.next(),t("post","+",e);case this.tok.T_DEC:return s&&this.error("VARIABLE"),this.next(),t("post","-",e);default:t.destroy(e)}}else{if(this.is("SCALAR")){if(t=this.node(),e=this.read_scalar(),"array"===e.kind&&e.shortForm&&"="===this.token){const s=this.convertToList(e);return e.loc&&(s.loc=e.loc),t("assign",s,this.next().read_expr(),"=")}return t.destroy(e),this.handleDereferencable(e)}this.error("EXPR"),this.next()}return e},convertToList:function(t){const e=t.items.map((t=>(t.value&&"array"===t.value.kind&&t.value.shortForm&&(t.value=this.convertToList(t.value)),t))),s=this.node("list")(e,!0);return t.loc&&(s.loc=t.loc),t.leadingComments&&(s.leadingComments=t.leadingComments),t.trailingComments&&(s.trailingComments=t.trailingComments),s},read_assignref:function(t,e){let s;return this.next(),this.token===this.tok.T_NEW?(this.version>=700&&this.error(),s=this.read_new_expr()):s=this.read_variable(!1,!1),t("assignref",e,s)},read_inline_function:function(t){if(this.token===this.tok.T_FUNCTION)return this.read_function(!0,t);!this.version>=704&&this.raiseError("Arrow Functions are not allowed");const e=this.node("arrowfunc");this.expect(this.tok.T_FN)&&this.next();const s=this.is_reference();this.expect("(")&&this.next();const i=this.read_parameter_list();this.expect(")")&&this.next();let n=!1,o=null;return":"===this.token&&("?"===this.next().token&&(n=!0,this.next()),o=this.read_type()),this.expect(this.tok.T_DOUBLE_ARROW)&&this.next(),e(i,s,this.read_expr(),o,n,!!t)},read_new_expr:function(){const t=this.node("new");this.expect(this.tok.T_NEW)&&this.next();let e=[];if(this.token===this.tok.T_CLASS){const s=this.node("class");"("===this.next().token&&(e=this.read_argument_list());const i=this.read_extends_from(),n=this.read_implements_list();let o=null;return this.expect("{")&&(o=this.next().read_class_body()),t(s(null,i,n,o,[0,0,0]),e)}const s=this.read_new_class_name();return"("===this.token&&(e=this.read_argument_list()),t(s,e)},read_new_class_name:function(){if(this.token===this.tok.T_NS_SEPARATOR||this.token===this.tok.T_STRING||this.token===this.tok.T_NAMESPACE){let t=this.read_namespace_name(!0);return this.token===this.tok.T_DOUBLE_COLON&&(t=this.read_static_getter(t)),t}if(this.is("VARIABLE"))return this.read_variable(!0,!1);this.expect([this.tok.T_STRING,"VARIABLE"])},handleDereferencable:function(t){for(;this.token!==this.EOF;)if(this.token===this.tok.T_OBJECT_OPERATOR||this.token===this.tok.T_DOUBLE_COLON)t=this.recursive_variable_chain_scan(t,!1,!1,!0);else if(this.token===this.tok.T_CURLY_OPEN||"["===this.token)t=this.read_dereferencable(t);else{if("("!==this.token)return t;t=this.node("call")(t,this.read_argument_list())}return t}}},8658:t=>{t.exports={is_reference:function(){return"&"==this.token&&(this.next(),!0)},is_variadic:function(){return this.token===this.tok.T_ELLIPSIS&&(this.next(),!0)},read_function:function(t,e){const s=this.read_function_declaration(t?1:e?2:0,e&&1===e[1]);return e&&1==e[2]?(s.parseFlags(e),this.expect(";")&&this.next()):(this.expect("{")&&(s.body=this.read_code_block(!1),s.loc&&s.body.loc&&(s.loc.end=s.body.loc.end)),!t&&e&&s.parseFlags(e)),s},read_function_declaration:function(t,e){let s="function";1===t?s="closure":2===t&&(s="method");const i=this.node(s);this.expect(this.tok.T_FUNCTION)&&this.next();const n=this.is_reference();let o=!1,r=[],h=null,a=!1;if(1!==t){const e=this.node("identifier");2===t?this.version>=700?this.token===this.tok.T_STRING||this.is("IDENTIFIER")?(o=this.text(),this.next()):this.version<704&&this.error("IDENTIFIER"):this.token===this.tok.T_STRING?(o=this.text(),this.next()):this.error("IDENTIFIER"):this.version>=700?this.token===this.tok.T_STRING?(o=this.text(),this.next()):this.version>=704?this.expect("(")||this.next():(this.error(this.tok.T_STRING),this.next()):(this.expect(this.tok.T_STRING)&&(o=this.text()),this.next()),o=e(o)}this.expect("(")&&this.next();const l=this.read_parameter_list();return this.expect(")")&&this.next(),1===t&&(r=this.read_lexical_vars()),":"===this.token&&("?"===this.next().token&&(a=!0,this.next()),h=this.read_type()),1===t?i(l,n,r,h,a,e):i(o,l,n,h,a)},read_lexical_vars:function(){let t=[];return this.token===this.tok.T_USE&&(this.next(),this.expect("(")&&this.next(),t=this.read_lexical_var_list(),this.expect(")")&&this.next()),t},read_lexical_var_list:function(){return this.read_list(this.read_lexical_var,",")},read_lexical_var:function(){if("&"===this.token)return this.read_byref(this.read_lexical_var.bind(this));const t=this.node("variable");this.expect(this.tok.T_VARIABLE);const e=this.text().substring(1);return this.next(),t(e,!1)},read_parameter_list:function(){const t=[];if(")"!=this.token)for(;this.token!=this.EOF;){if(t.push(this.read_parameter()),","!=this.token){if(")"==this.token)break;this.error([",",")"]);break}this.next()}return t},read_parameter:function(){const t=this.node("parameter");let e=null,s=null,i=null,n=!1;"?"===this.token&&(this.next(),n=!0),i=this.read_type(),n&&!i&&this.raiseError("Expecting a type definition combined with nullable operator");const o=this.is_reference(),r=this.is_variadic();if(this.expect(this.tok.T_VARIABLE)){e=this.node("identifier");const t=this.text().substring(1);this.next(),e=e(t)}return"="==this.token&&(s=this.next().read_expr()),t(e,i,s,o,r,n)},read_argument_list:function(){let t=[];return this.expect("(")&&this.next(),")"!==this.token&&(t=this.read_non_empty_argument_list()),this.expect(")")&&this.next(),t},read_non_empty_argument_list:function(){let t=!1;return this.read_function_list(function(){const e=this.read_argument();return e&&(t&&this.raiseError("Unexpected argument after a variadic argument"),"variadic"===e.kind&&(t=!0)),e}.bind(this),",")},read_argument:function(){return this.token===this.tok.T_ELLIPSIS?this.node("variadic")(this.next().read_expr()):this.read_expr()},read_type:function(){const t=this.node();if(this.token===this.tok.T_ARRAY||this.token===this.tok.T_CALLABLE){const e=this.text();return this.next(),t("typereference",e.toLowerCase(),e)}if(this.token===this.tok.T_STRING){const e=this.text(),s=[this.token,this.lexer.getState()];return this.next(),this.token!==this.tok.T_NS_SEPARATOR&&this.ast.typereference.types.indexOf(e.toLowerCase())>-1?t("typereference",e.toLowerCase(),e):(this.lexer.tokens.push(s),this.next(),t.destroy(),this.read_namespace_name())}return this.token===this.tok.T_NAMESPACE||this.token===this.tok.T_NS_SEPARATOR?(t.destroy(),this.read_namespace_name()):(t.destroy(),null)}}},8573:t=>{t.exports={read_if:function(){const t=this.node("if"),e=this.next().read_if_expr();let s=null,i=null,n=!1;if(":"===this.token){n=!0,this.next(),s=this.node("block");const t=[];for(;this.token!==this.EOF&&this.token!==this.tok.T_ENDIF;){if(this.token===this.tok.T_ELSEIF){i=this.read_elseif_short();break}if(this.token===this.tok.T_ELSE){i=this.read_else_short();break}t.push(this.read_inner_statement())}s=s(null,t),this.expect(this.tok.T_ENDIF)&&this.next(),this.expectEndOfStatement()}else s=this.read_statement(),this.token===this.tok.T_ELSEIF?i=this.read_if():this.token===this.tok.T_ELSE&&(i=this.next().read_statement());return t(e,s,i,n)},read_if_expr:function(){this.expect("(")&&this.next();const t=this.read_expr();return this.expect(")")&&this.next(),t},read_elseif_short:function(){let t=null;const e=this.node("if"),s=this.next().read_if_expr();this.expect(":")&&this.next();const i=this.node("block"),n=[];for(;this.token!=this.EOF&&this.token!==this.tok.T_ENDIF;){if(this.token===this.tok.T_ELSEIF){t=this.read_elseif_short();break}if(this.token===this.tok.T_ELSE){t=this.read_else_short();break}n.push(this.read_inner_statement())}return e(s,i(null,n),t,!0)},read_else_short:function(){this.next().expect(":")&&this.next();const t=this.node("block"),e=[];for(;this.token!=this.EOF&&this.token!==this.tok.T_ENDIF;)e.push(this.read_inner_statement());return t(null,e)}}},3897:t=>{t.exports={read_while:function(){const t=this.node("while");this.expect(this.tok.T_WHILE)&&this.next();let e=null,s=null,i=!1;return this.expect("(")&&this.next(),e=this.read_expr(),this.expect(")")&&this.next(),":"===this.token?(i=!0,s=this.read_short_form(this.tok.T_ENDWHILE)):s=this.read_statement(),t(e,s,i)},read_do:function(){const t=this.node("do");this.expect(this.tok.T_DO)&&this.next();let e=null,s=null;return s=this.read_statement(),this.expect(this.tok.T_WHILE)&&(this.next().expect("(")&&this.next(),e=this.read_expr(),this.expect(")")&&this.next(),this.expect(";")&&this.next()),t(e,s)},read_for:function(){const t=this.node("for");this.expect(this.tok.T_FOR)&&this.next();let e=[],s=[],i=[],n=null,o=!1;return this.expect("(")&&this.next(),";"!==this.token?(e=this.read_list(this.read_expr,","),this.expect(";")&&this.next()):this.next(),";"!==this.token?(s=this.read_list(this.read_expr,","),this.expect(";")&&this.next()):this.next(),")"!==this.token?(i=this.read_list(this.read_expr,","),this.expect(")")&&this.next()):this.next(),":"===this.token?(o=!0,n=this.read_short_form(this.tok.T_ENDFOR)):n=this.read_statement(),t(e,s,i,n,o)},read_foreach:function(){const t=this.node("foreach");this.expect(this.tok.T_FOREACH)&&this.next();let e=null,s=null,i=null,n=null,o=!1;return this.expect("(")&&this.next(),e=this.read_expr(),this.expect(this.tok.T_AS)&&(this.next(),i=this.read_foreach_variable(),this.token===this.tok.T_DOUBLE_ARROW&&(s=i,i=this.next().read_foreach_variable())),s&&"list"===s.kind&&this.raiseError("Fatal Error : Cannot use list as key element"),this.expect(")")&&this.next(),":"===this.token?(o=!0,n=this.read_short_form(this.tok.T_ENDFOREACH)):n=this.read_statement(),t(e,s,i,n,o)},read_foreach_variable:function(){if(this.token===this.tok.T_LIST||"["===this.token){const t="["===this.token,e=this.node("list");this.next(),!t&&this.expect("(")&&this.next();const s=this.read_array_pair_list(t);return this.expect(t?"]":")")&&this.next(),e(s,t)}return this.read_variable(!1,!1)}}},660:t=>{t.exports={read_start:function(){return this.token==this.tok.T_NAMESPACE?this.read_namespace():this.read_top_statement()}}},7616:t=>{t.exports={read_namespace:function(){const t=this.node("namespace");let e,s;return this.expect(this.tok.T_NAMESPACE)&&this.next(),s="{"==this.token?{name:[""]}:this.read_namespace_name(),this.currentNamespace=s,";"==this.token?(this.currentNamespace=s,e=this.next().read_top_statements(),this.expect(this.EOF),t(s.name,e,!1)):"{"==this.token?(this.currentNamespace=s,e=this.next().read_top_statements(),this.expect("}")&&this.next(),0===e.length&&this.extractDoc&&this._docs.length>this._docIndex&&e.push(this.node("noop")()),t(s.name,e,!0)):"("===this.token?(s.resolution=this.ast.reference.RELATIVE_NAME,s.name=s.name.substring(1),t.destroy(),this.node("call")(s,this.read_argument_list())):(this.error(["{",";"]),this.currentNamespace=s,e=this.read_top_statements(),this.expect(this.EOF),t(s,e,!1))},read_namespace_name:function(t){const e=this.node();let s=!1;this.token===this.tok.T_NAMESPACE&&(this.next().expect(this.tok.T_NS_SEPARATOR)&&this.next(),s=!0);const i=this.read_list(this.tok.T_STRING,this.tok.T_NS_SEPARATOR,!0);if(!s&&1===i.length&&(t||"("!==this.token)){if("parent"===i[0].toLowerCase())return e("parentreference",i[0]);if("self"===i[0].toLowerCase())return e("selfreference",i[0])}return e("name",i,s)},read_use_statement:function(){let t=this.node("usegroup"),e=[],s=null;this.expect(this.tok.T_USE)&&this.next();const i=this.read_use_type();return e.push(this.read_use_declaration(!1)),","===this.token?e=e.concat(this.next().read_use_declarations(!1)):"{"===this.token&&(s=e[0].name,e=this.next().read_use_declarations(null===i),this.expect("}")&&this.next()),t=t(s,i,e),this.expect(";")&&this.next(),t},read_class_name_reference:function(){return this.read_variable(!0,!1)},read_use_declaration:function(t){const e=this.node("useitem");let s=null;t&&(s=this.read_use_type());const i=this.read_namespace_name(),n=this.read_use_alias();return e(i.name,n,s)},read_use_declarations:function(t){const e=[this.read_use_declaration(t)];for(;","===this.token;){if(this.next(),t){if(this.token!==this.tok.T_FUNCTION&&this.token!==this.tok.T_CONST&&this.token!==this.tok.T_STRING)break}else if(this.token!==this.tok.T_STRING&&this.token!==this.tok.T_NS_SEPARATOR)break;e.push(this.read_use_declaration(t))}return e},read_use_alias:function(){let t=null;if(this.token===this.tok.T_AS&&this.next().expect(this.tok.T_STRING)){const e=this.node("identifier"),s=this.text();this.next(),t=e(s)}return t},read_use_type:function(){return this.token===this.tok.T_FUNCTION?(this.next(),this.ast.useitem.TYPE_FUNCTION):this.token===this.tok.T_CONST?(this.next(),this.ast.useitem.TYPE_CONST):null}}},2932:t=>{const e={"\\":"\\",$:"$",n:"\n",r:"\r",t:"\t",f:String.fromCharCode(12),v:String.fromCharCode(11),e:String.fromCharCode(27)};t.exports={resolve_special_chars:function(t,s){return s?t.replace(/\\"/,'"').replace(/\\([\\$nrtfve]|[xX][0-9a-fA-F]{1,2}|[0-7]{1,3}|u{([0-9a-fA-F]+)})/g,((t,s,i)=>e[s]?e[s]:"x"===s[0]||"X"===s[0]?String.fromCodePoint(parseInt(s.substr(1),16)):"u"===s[0]?String.fromCodePoint(parseInt(i,16)):String.fromCodePoint(parseInt(s,8)))):t.replace(/\\\\/g,"\\").replace(/\\'/g,"'")},remove_heredoc_leading_whitespace_chars:function(t,e,s,i){if(0===e)return t;this.check_heredoc_indentation_level(t,e,s,i);const n=s?" ":"\t",o=new RegExp(`\\n${n}{${e}}`,"g"),r=new RegExp(`^${n}{${e}}`);return i&&(t=t.replace(r,"")),t.replace(o,"\n")},check_heredoc_indentation_level:function(t,e,s,i){const n=t.length;let o=0,r=0,h=!0;const a=s?" ":"\t";let l=!1;if(!i){if(o=t.indexOf("\n"),-1===o)return;o++}for(;o<n;)h?t[o]===a?r++:l=!0:h=!1,"\n"!==t[o]&&l&&r<e?this.raiseError(`Invalid body indentation level (expecting an indentation at least ${e})`):l=!1,"\n"===t[o]&&(h=!0,r=0),o++},read_dereferencable_scalar:function(){let t=null;switch(this.token){case this.tok.T_CONSTANT_ENCAPSED_STRING:{let e=this.node("string");const s=this.text();let i=0;"b"!==s[0]&&"B"!==s[0]||(i=1);const n='"'===s[i];this.next(),e=e(n,this.resolve_special_chars(s.substring(i+1,s.length-1),n),1===i,s),t=this.token===this.tok.T_DOUBLE_COLON?this.read_static_getter(e):e}break;case this.tok.T_ARRAY:case"[":t=this.read_array()}return t},read_scalar:function(){if(this.is("T_MAGIC_CONST"))return this.get_magic_constant();{let t,e;switch(this.token){case this.tok.T_LNUMBER:case this.tok.T_DNUMBER:{const e=this.node("number");return t=this.text(),this.next(),e(t,null)}case this.tok.T_START_HEREDOC:if("ST_NOWDOC"===this.lexer.curCondition){const s=this.lexer.yylloc.first_offset;e=this.node("nowdoc"),t=this.next().text(),this.lexer.heredoc_label.indentation>0&&(t=t.substring(0,t.length-this.lexer.heredoc_label.indentation));const i=t[t.length-1];"\n"===i?t="\r"===t[t.length-2]?t.substring(0,t.length-2):t.substring(0,t.length-1):"\r"===i&&(t=t.substring(0,t.length-1)),this.expect(this.tok.T_ENCAPSED_AND_WHITESPACE)&&this.next(),this.expect(this.tok.T_END_HEREDOC)&&this.next();const n=this.lexer._input.substring(s,this.lexer.yylloc.first_offset);return e=e(this.remove_heredoc_leading_whitespace_chars(t,this.lexer.heredoc_label.indentation,this.lexer.heredoc_label.indentation_uses_spaces,this.lexer.heredoc_label.first_encaps_node),n,this.lexer.heredoc_label.label),e}return this.read_encapsed_string(this.tok.T_END_HEREDOC);case'"':return this.read_encapsed_string('"');case'b"':case'B"':return this.read_encapsed_string('"',!0);case this.tok.T_CONSTANT_ENCAPSED_STRING:case this.tok.T_ARRAY:case"[":return this.read_dereferencable_scalar();default:{const t=this.error("SCALAR");return this.next(),t}}}},read_dereferencable:function(t){let e,s;const i=this.node("offsetlookup");return"["===this.token?(s=this.next().read_expr(),this.expect("]")&&this.next(),e=i(t,s)):this.token===this.tok.T_DOLLAR_OPEN_CURLY_BRACES&&(s=this.read_encapsed_string_item(!1),e=i(t,s)),e},read_encapsed_string_item:function(t){const e=this.node("encapsedpart");let s,i,n,o=null,r=!1,h=this.node();if(this.token===this.tok.T_ENCAPSED_AND_WHITESPACE){const e=this.text();this.next(),h=h("string",!1,this.version>=703&&!this.lexer.heredoc_label.finished?this.remove_heredoc_leading_whitespace_chars(this.resolve_special_chars(e,t),this.lexer.heredoc_label.indentation,this.lexer.heredoc_label.indentation_uses_spaces,this.lexer.heredoc_label.first_encaps_node):e,!1,e)}else if(this.token===this.tok.T_DOLLAR_OPEN_CURLY_BRACES){if(o="simple",r=!0,n=null,this.next().token===this.tok.T_STRING_VARNAME){n=this.node("variable");const t=this.text();this.next(),"["===this.token?(n=n(t,!1),i=this.node("offsetlookup"),s=this.next().read_expr(),this.expect("]")&&this.next(),h=i(n,s)):h=n(t,!1)}else h=h("variable",this.read_expr(),!1);this.expect("}")&&this.next()}else if(this.token===this.tok.T_CURLY_OPEN)o="complex",h.destroy(),h=this.next().read_variable(!1,!1),this.expect("}")&&this.next();else if(this.token===this.tok.T_VARIABLE){if(o="simple",h.destroy(),h=this.read_simple_variable(),"["===this.token&&(i=this.node("offsetlookup"),s=this.next().read_encaps_var_offset(),this.expect("]")&&this.next(),h=i(h,s)),this.token===this.tok.T_OBJECT_OPERATOR){i=this.node("propertylookup"),this.next().expect(this.tok.T_STRING);const t=this.node("identifier");n=this.text(),this.next(),h=i(h,t(n))}}else{this.expect(this.tok.T_ENCAPSED_AND_WHITESPACE);const t=this.text();this.next(),h.destroy(),h=h("string",!1,t,!1,t)}return this.lexer.heredoc_label.first_encaps_node=!1,e(h,o,r)},read_encapsed_string:function(t,e=!1){const s=this.lexer.yylloc.first_offset;let i=this.node("encapsed");this.next();const n=this.lexer.yylloc.prev_offset-(e?1:0),o=[];let r=null;for(r="`"===t?this.ast.encapsed.TYPE_SHELL:'"'===t?this.ast.encapsed.TYPE_STRING:this.ast.encapsed.TYPE_HEREDOC;this.token!==t&&this.token!==this.EOF;)o.push(this.read_encapsed_string_item(!0));if(o.length>0&&"encapsedpart"===o[o.length-1].kind&&"string"===o[o.length-1].expression.kind){const t=o[o.length-1].expression,e=t.value[t.value.length-1];"\n"===e?"\r"===t.value[t.value.length-2]?t.value=t.value.substring(0,t.value.length-2):t.value=t.value.substring(0,t.value.length-1):"\r"===e&&(t.value=t.value.substring(0,t.value.length-1))}return this.expect(t)&&this.next(),i=i(o,this.lexer._input.substring("heredoc"===r?s:n-1,this.lexer.yylloc.first_offset),r),t===this.tok.T_END_HEREDOC&&(i.label=this.lexer.heredoc_label.label,this.lexer.heredoc_label.finished=!0),i},get_magic_constant:function(){const t=this.node("magic"),e=this.text();return this.next(),t(e.toUpperCase(),e)}}},3912:t=>{t.exports={read_top_statements:function(){let t=[];for(;this.token!==this.EOF&&"}"!==this.token;){const e=this.read_top_statement();e&&(Array.isArray(e)?t=t.concat(e):t.push(e))}return t},read_top_statement:function(){switch(this.token){case this.tok.T_FUNCTION:return this.read_function(!1,!1);case this.tok.T_ABSTRACT:case this.tok.T_FINAL:case this.tok.T_CLASS:return this.read_class_declaration_statement();case this.tok.T_INTERFACE:return this.read_interface_declaration_statement();case this.tok.T_TRAIT:return this.read_trait_declaration_statement();case this.tok.T_USE:return this.read_use_statement();case this.tok.T_CONST:{const t=this.node("constantstatement"),e=this.next().read_const_list();return this.expectEndOfStatement(),t(null,e)}case this.tok.T_NAMESPACE:return this.read_namespace();case this.tok.T_HALT_COMPILER:{const t=this.node("halt");return this.next().expect("(")&&this.next(),this.expect(")")&&this.next(),this.expect(";"),this.lexer.done=!0,t(this.lexer._input.substring(this.lexer.offset))}default:return this.read_statement()}},read_inner_statements:function(){let t=[];for(;this.token!=this.EOF&&"}"!==this.token;){const e=this.read_inner_statement();e&&(Array.isArray(e)?t=t.concat(e):t.push(e))}return t},read_const_list:function(){return this.read_list((function(){this.expect(this.tok.T_STRING);const t=this.node("constant");let e=this.node("identifier");const s=this.text();return this.next(),e=e(s),this.expect("=")?t(e,this.next().read_expr()):t(e,null)}),",",!1)},read_declare_list:function(){const t=[];for(;this.token!=this.EOF&&")"!==this.token;){this.expect(this.tok.T_STRING);const e=this.node("declaredirective");let s=this.node("identifier");const i=this.text();this.next(),s=s(i);let n=null;if(this.expect("=")&&(n=this.next().read_expr()),t.push(e(s,n)),","!==this.token)break;this.next()}return t},read_inner_statement:function(){switch(this.token){case this.tok.T_FUNCTION:return this.read_function(!1,!1);case this.tok.T_ABSTRACT:case this.tok.T_FINAL:case this.tok.T_CLASS:return this.read_class_declaration_statement();case this.tok.T_INTERFACE:return this.read_interface_declaration_statement();case this.tok.T_TRAIT:return this.read_trait_declaration_statement();case this.tok.T_HALT_COMPILER:{this.raiseError("__HALT_COMPILER() can only be used from the outermost scope");let t=this.node("halt");return this.next().expect("(")&&this.next(),this.expect(")")&&this.next(),t=t(this.lexer._input.substring(this.lexer.offset)),this.expect(";")&&this.next(),t}default:return this.read_statement()}},read_statement:function(){switch(this.token){case"{":return this.read_code_block(!1);case this.tok.T_IF:return this.read_if();case this.tok.T_SWITCH:return this.read_switch();case this.tok.T_FOR:return this.read_for();case this.tok.T_FOREACH:return this.read_foreach();case this.tok.T_WHILE:return this.read_while();case this.tok.T_DO:return this.read_do();case this.tok.T_COMMENT:return this.read_comment();case this.tok.T_DOC_COMMENT:return this.read_doc_comment();case this.tok.T_RETURN:{const t=this.node("return");this.next();const e=this.read_optional_expr(";");return this.expectEndOfStatement(),t(e)}case this.tok.T_BREAK:case this.tok.T_CONTINUE:{const t=this.node(this.token===this.tok.T_CONTINUE?"continue":"break");this.next();const e=this.read_optional_expr(";");return this.expectEndOfStatement(),t(e)}case this.tok.T_GLOBAL:{const t=this.node("global"),e=this.next().read_list(this.read_simple_variable,",");return this.expectEndOfStatement(),t(e)}case this.tok.T_STATIC:{const t=[this.token,this.lexer.getState()],e=this.node();if(this.next().token===this.tok.T_DOUBLE_COLON){this.lexer.tokens.push(t);const s=this.next().read_expr();return this.expectEndOfStatement(s),e("expressionstatement",s)}if(this.token===this.tok.T_FUNCTION)return this.read_function(!0,[0,1,0]);const s=this.read_variable_declarations();return this.expectEndOfStatement(),e("static",s)}case this.tok.T_ECHO:{const t=this.node("echo"),e=this.text(),s="<?="===e||"<%="===e,i=this.next().read_function_list(this.read_expr,",");return this.expectEndOfStatement(),t(i,s)}case this.tok.T_INLINE_HTML:{const t=this.text();let e=this.lexer.yylloc.first_offset>0?this.lexer._input[this.lexer.yylloc.first_offset-1]:null;const s="\r"===e||"\n"===e;s&&"\n"===e&&this.lexer.yylloc.first_offset>1&&"\r"===this.lexer._input[this.lexer.yylloc.first_offset-2]&&(e="\r\n");const i=this.node("inline");return this.next(),i(t,s?e+t:t)}case this.tok.T_UNSET:{const t=this.node("unset");this.next().expect("(")&&this.next();const e=this.read_function_list(this.read_variable,",");return this.expect(")")&&this.next(),this.expect(";")&&this.next(),t(e)}case this.tok.T_DECLARE:{const t=this.node("declare"),e=[];let s;this.next().expect("(")&&this.next();const i=this.read_declare_list();if(this.expect(")")&&this.next(),":"===this.token){for(this.next();this.token!=this.EOF&&this.token!==this.tok.T_ENDDECLARE;)e.push(this.read_top_statement());0===e.length&&this.extractDoc&&this._docs.length>this._docIndex&&e.push(this.node("noop")()),this.expect(this.tok.T_ENDDECLARE)&&this.next(),this.expectEndOfStatement(),s=this.ast.declare.MODE_SHORT}else if("{"===this.token){for(this.next();this.token!=this.EOF&&"}"!==this.token;)e.push(this.read_top_statement());0===e.length&&this.extractDoc&&this._docs.length>this._docIndex&&e.push(this.node("noop")()),this.expect("}")&&this.next(),s=this.ast.declare.MODE_BLOCK}else this.expect(";")&&this.next(),s=this.ast.declare.MODE_NONE;return t(i,e,s)}case this.tok.T_TRY:return this.read_try();case this.tok.T_THROW:{const t=this.node("throw"),e=this.next().read_expr();return this.expectEndOfStatement(),t(e)}case";":return this.next(),null;case this.tok.T_STRING:{const t=this.node(),e=[this.token,this.lexer.getState()],s=this.text();let i=this.node("identifier");if(":"===this.next().token)return i=i(s),this.next(),t("label",i);i.destroy(),t.destroy(),this.lexer.tokens.push(e);const n=this.node("expressionstatement"),o=this.next().read_expr();return this.expectEndOfStatement(o),n(o)}case this.tok.T_GOTO:{const t=this.node("goto");let e=null;if(this.next().expect(this.tok.T_STRING)){e=this.node("identifier");const t=this.text();this.next(),e=e(t),this.expectEndOfStatement()}return t(e)}default:{const t=this.node("expressionstatement"),e=this.read_expr();return this.expectEndOfStatement(e),t(e)}}},read_code_block:function(t){const e=this.node("block");this.expect("{")&&this.next();const s=t?this.read_top_statements():this.read_inner_statements();return 0===s.length&&this.extractDoc&&this._docs.length>this._docIndex&&s.push(this.node("noop")()),this.expect("}")&&this.next(),e(null,s)}}},510:t=>{t.exports={read_switch:function(){const t=this.node("switch");this.expect(this.tok.T_SWITCH)&&this.next(),this.expect("(")&&this.next();const e=this.read_expr();this.expect(")")&&this.next();const s=":"===this.token;return t(e,this.read_switch_case_list(),s)},read_switch_case_list:function(){let t=null;const e=this.node("block"),s=[];for("{"===this.token?t="}":":"===this.token?t=this.tok.T_ENDSWITCH:this.expect(["{",":"]),this.next(),";"===this.token&&this.next();this.token!==this.EOF&&this.token!==t;)s.push(this.read_case_list(t));return 0===s.length&&this.extractDoc&&this._docs.length>this._docIndex&&s.push(this.node("noop")()),this.expect(t)&&this.next(),t===this.tok.T_ENDSWITCH&&this.expectEndOfStatement(),e(null,s)},read_case_list:function(t){const e=this.node("case");let s=null;this.token===this.tok.T_CASE?s=this.next().read_expr():this.token===this.tok.T_DEFAULT?this.next():this.expect([this.tok.T_CASE,this.tok.T_DEFAULT]),this.expect([":",";"])&&this.next();const i=this.node("block"),n=[];for(;this.token!==this.EOF&&this.token!==t&&this.token!==this.tok.T_CASE&&this.token!==this.tok.T_DEFAULT;)n.push(this.read_inner_statement());return e(s,i(null,n))}}},5289:t=>{t.exports={read_try:function(){this.expect(this.tok.T_TRY);const t=this.node("try");let e=null;const s=[],i=this.next().read_statement();for(;this.token===this.tok.T_CATCH;){const t=this.node("catch");this.next().expect("(")&&this.next();const e=this.read_list(this.read_namespace_name,"|",!1),i=this.read_variable(!0,!1);this.expect(")"),s.push(t(this.next().read_statement(),e,i))}return this.token===this.tok.T_FINALLY&&(e=this.next().read_statement()),t(i,s,e)}}},4394:t=>{t.exports={read_short_form:function(t){const e=this.node("block"),s=[];for(this.expect(":")&&this.next();this.token!=this.EOF&&this.token!==t;)s.push(this.read_inner_statement());return 0===s.length&&this.extractDoc&&this._docs.length>this._docIndex&&s.push(this.node("noop")()),this.expect(t)&&this.next(),this.expectEndOfStatement(),e(null,s)},read_function_list:function(t,e){const s=[];do{if(this.token==e&&this.version>=703&&s.length>0){s.push(this.node("noop")());break}if(s.push(t.apply(this,[])),this.token!=e)break;if(")"==this.next().token&&this.version>=703)break}while(this.token!=this.EOF);return s},read_list:function(t,e,s){const i=[];if(this.token==e&&(s&&i.push("function"==typeof t?this.node("noop")():null),this.next()),"function"==typeof t)do{const s=t.apply(this,[]);if(s&&i.push(s),this.token!=e)break}while(this.next().token!=this.EOF);else{if(!this.expect(t))return[];for(i.push(this.text());this.next().token!=this.EOF&&this.token==e&&this.next().token==t;)i.push(this.text())}return i},read_name_list:function(){return this.read_list(this.read_namespace_name,",",!1)},read_byref:function(t){let e=this.node("byref");this.next(),e=e(null);const s=t();return s&&(this.ast.swapLocations(s,e,s,this),s.byref=!0),s},read_variable_declarations:function(){return this.read_list((function(){const t=this.node("staticvariable");let e=this.node("variable");if(this.expect(this.tok.T_VARIABLE)){const t=this.text().substring(1);this.next(),e=e(t,!1)}else e=e("#ERR",!1);return"="===this.token?t(e,this.next().read_expr()):e}),",")},read_extends_from:function(){return this.token===this.tok.T_EXTENDS?this.next().read_namespace_name():null},read_interface_extends_list:function(){return this.token===this.tok.T_EXTENDS?this.next().read_name_list():null},read_implements_list:function(){return this.token===this.tok.T_IMPLEMENTS?this.next().read_name_list():null}}},8414:t=>{t.exports={read_variable:function(t,e){let s;if("&"===this.token)return this.read_byref(this.read_variable.bind(this,t,e));if(this.is([this.tok.T_VARIABLE,"$"]))s=this.read_reference_variable(e);else if(this.is([this.tok.T_NS_SEPARATOR,this.tok.T_STRING,this.tok.T_NAMESPACE])){s=this.node();const t=this.read_namespace_name();if(this.token!=this.tok.T_DOUBLE_COLON&&"("!=this.token&&-1===["parentreference","selfreference"].indexOf(t.kind)){const e=t.name.toLowerCase();"true"===e?s=t.destroy(s("boolean",!0,t.name)):"false"===e?s=t.destroy(s("boolean",!1,t.name)):"null"===e?s=t.destroy(s("nullkeyword",t.name)):(s.destroy(t),s=t)}else s.destroy(t),s=t}else if(this.token===this.tok.T_STATIC){s=this.node("staticreference");const t=this.text();this.next(),s=s(t)}else this.expect("VARIABLE");return this.token===this.tok.T_DOUBLE_COLON&&(s=this.read_static_getter(s,e)),this.recursive_variable_chain_scan(s,t,e)},read_static_getter:function(t,e){const s=this.node("staticlookup");let i,n;return this.next().is([this.tok.T_VARIABLE,"$"])?i=this.read_reference_variable(e):this.token===this.tok.T_STRING||this.token===this.tok.T_CLASS||this.version>=700&&this.is("IDENTIFIER")?(i=this.node("identifier"),n=this.text(),this.next(),i=i(n)):"{"===this.token?(i=this.node("literal"),n=this.next().read_expr(),this.expect("}")&&this.next(),i=i("literal",n,null),this.expect("(")):(this.error([this.tok.T_VARIABLE,this.tok.T_STRING]),i=this.node("identifier"),n=this.text(),this.next(),i=i(n)),s(t,i)},read_what:function(t=!1){let e=null,s=null;switch(this.next().token){case this.tok.T_STRING:e=this.node("identifier"),s=this.text(),this.next(),e=e(s),t&&this.token===this.tok.T_OBJECT_OPERATOR&&this.error();break;case this.tok.T_VARIABLE:e=this.node("variable"),s=this.text().substring(1),this.next(),e=e(s,!1);break;case"$":e=this.node(),this.next().expect(["$","{",this.tok.T_VARIABLE]),"{"===this.token?(s=this.next().read_expr(),this.expect("}")&&this.next(),e=e("variable",s,!0)):(s=this.read_expr(),e=e("variable",s,!1));break;case"{":e=this.node("encapsedpart"),s=this.next().read_expr(),this.expect("}")&&this.next(),e=e(s,"complex",!1);break;default:this.error([this.tok.T_STRING,this.tok.T_VARIABLE,"$","{"]),e=this.node("identifier"),s=this.text(),this.next(),e=e(s)}return e},recursive_variable_chain_scan:function(t,e,s){let i,n;t:for(;this.token!=this.EOF;)switch(this.token){case"(":if(e)return t;t=this.node("call")(t,this.read_argument_list());break;case"[":case"{":{const e="["===this.token;i=this.node("offsetlookup"),this.next(),n=!1,s?(n=this.read_encaps_var_offset(),this.expect(e?"]":"}")&&this.next()):(e?"]"!==this.token:"}"!==this.token)?(n=this.read_expr(),this.expect(e?"]":"}")&&this.next()):this.next(),t=i(t,n);break}case this.tok.T_DOUBLE_COLON:"staticlookup"===t.kind&&"identifier"===t.offset.kind&&this.error(),i=this.node("staticlookup"),t=i(t,this.read_what(!0));break;case this.tok.T_OBJECT_OPERATOR:i=this.node("propertylookup"),t=i(t,this.read_what());break;default:break t}return t},read_encaps_var_offset:function(){let t=this.node();if(this.token===this.tok.T_STRING){const e=this.text();this.next(),t=t("identifier",e)}else if(this.token===this.tok.T_NUM_STRING){const e=this.text();this.next(),t=t("number",e,null)}else if("-"===this.token){this.next();const e=-1*this.text();this.expect(this.tok.T_NUM_STRING)&&this.next(),t=t("number",e,null)}else if(this.token===this.tok.T_VARIABLE){const e=this.text().substring(1);this.next(),t=t("variable",e,!1)}else{this.expect([this.tok.T_STRING,this.tok.T_NUM_STRING,"-",this.tok.T_VARIABLE]);const e=this.text();this.next(),t=t("identifier",e)}return t},read_reference_variable:function(t){let e,s=this.read_simple_variable();for(;this.token!=this.EOF;){const i=this.node();if("{"!=this.token||t){i.destroy();break}e=this.next().read_expr(),this.expect("}")&&this.next(),s=i("offsetlookup",s,e)}return s},read_simple_variable:function(){let t,e=this.node("variable");if(this.expect([this.tok.T_VARIABLE,"$"])&&this.token===this.tok.T_VARIABLE)t=this.text().substring(1),this.next(),e=e(t,!1);else switch("$"===this.token&&this.next(),this.token){case"{":{const t=this.next().read_expr();this.expect("}")&&this.next(),e=e(t,!0);break}case"$":e=e(this.read_simple_variable(),!1);break;case this.tok.T_VARIABLE:{t=this.text().substring(1);const s=this.node("variable");this.next(),e=e(s(t,!1),!1);break}default:this.error(["{","$",this.tok.T_VARIABLE]),t=this.text(),this.next(),e=e(t,!1)}return e}}},3155:t=>{t.exports={values:{101:"T_HALT_COMPILER",102:"T_USE",103:"T_ENCAPSED_AND_WHITESPACE",104:"T_OBJECT_OPERATOR",105:"T_STRING",106:"T_DOLLAR_OPEN_CURLY_BRACES",107:"T_STRING_VARNAME",108:"T_CURLY_OPEN",109:"T_NUM_STRING",110:"T_ISSET",111:"T_EMPTY",112:"T_INCLUDE",113:"T_INCLUDE_ONCE",114:"T_EVAL",115:"T_REQUIRE",116:"T_REQUIRE_ONCE",117:"T_NAMESPACE",118:"T_NS_SEPARATOR",119:"T_AS",120:"T_IF",121:"T_ENDIF",122:"T_WHILE",123:"T_DO",124:"T_FOR",125:"T_SWITCH",126:"T_BREAK",127:"T_CONTINUE",128:"T_RETURN",129:"T_GLOBAL",130:"T_STATIC",131:"T_ECHO",132:"T_INLINE_HTML",133:"T_UNSET",134:"T_FOREACH",135:"T_DECLARE",136:"T_TRY",137:"T_THROW",138:"T_GOTO",139:"T_FINALLY",140:"T_CATCH",141:"T_ENDDECLARE",142:"T_LIST",143:"T_CLONE",144:"T_PLUS_EQUAL",145:"T_MINUS_EQUAL",146:"T_MUL_EQUAL",147:"T_DIV_EQUAL",148:"T_CONCAT_EQUAL",149:"T_MOD_EQUAL",150:"T_AND_EQUAL",151:"T_OR_EQUAL",152:"T_XOR_EQUAL",153:"T_SL_EQUAL",154:"T_SR_EQUAL",155:"T_INC",156:"T_DEC",157:"T_BOOLEAN_OR",158:"T_BOOLEAN_AND",159:"T_LOGICAL_OR",160:"T_LOGICAL_AND",161:"T_LOGICAL_XOR",162:"T_SL",163:"T_SR",164:"T_IS_IDENTICAL",165:"T_IS_NOT_IDENTICAL",166:"T_IS_EQUAL",167:"T_IS_NOT_EQUAL",168:"T_IS_SMALLER_OR_EQUAL",169:"T_IS_GREATER_OR_EQUAL",170:"T_INSTANCEOF",171:"T_INT_CAST",172:"T_DOUBLE_CAST",173:"T_STRING_CAST",174:"T_ARRAY_CAST",175:"T_OBJECT_CAST",176:"T_BOOL_CAST",177:"T_UNSET_CAST",178:"T_EXIT",179:"T_PRINT",180:"T_YIELD",181:"T_YIELD_FROM",182:"T_FUNCTION",183:"T_DOUBLE_ARROW",184:"T_DOUBLE_COLON",185:"T_ARRAY",186:"T_CALLABLE",187:"T_CLASS",188:"T_ABSTRACT",189:"T_TRAIT",190:"T_FINAL",191:"T_EXTENDS",192:"T_INTERFACE",193:"T_IMPLEMENTS",194:"T_VAR",195:"T_PUBLIC",196:"T_PROTECTED",197:"T_PRIVATE",198:"T_CONST",199:"T_NEW",200:"T_INSTEADOF",201:"T_ELSEIF",202:"T_ELSE",203:"T_ENDSWITCH",204:"T_CASE",205:"T_DEFAULT",206:"T_ENDFOR",207:"T_ENDFOREACH",208:"T_ENDWHILE",209:"T_CONSTANT_ENCAPSED_STRING",210:"T_LNUMBER",211:"T_DNUMBER",212:"T_LINE",213:"T_FILE",214:"T_DIR",215:"T_TRAIT_C",216:"T_METHOD_C",217:"T_FUNC_C",218:"T_NS_C",219:"T_START_HEREDOC",220:"T_END_HEREDOC",221:"T_CLASS_C",222:"T_VARIABLE",223:"T_OPEN_TAG",224:"T_OPEN_TAG_WITH_ECHO",225:"T_CLOSE_TAG",226:"T_WHITESPACE",227:"T_COMMENT",228:"T_DOC_COMMENT",229:"T_ELLIPSIS",230:"T_COALESCE",231:"T_POW",232:"T_POW_EQUAL",233:"T_SPACESHIP",234:"T_COALESCE_EQUAL",235:"T_FN"},names:{T_HALT_COMPILER:101,T_USE:102,T_ENCAPSED_AND_WHITESPACE:103,T_OBJECT_OPERATOR:104,T_STRING:105,T_DOLLAR_OPEN_CURLY_BRACES:106,T_STRING_VARNAME:107,T_CURLY_OPEN:108,T_NUM_STRING:109,T_ISSET:110,T_EMPTY:111,T_INCLUDE:112,T_INCLUDE_ONCE:113,T_EVAL:114,T_REQUIRE:115,T_REQUIRE_ONCE:116,T_NAMESPACE:117,T_NS_SEPARATOR:118,T_AS:119,T_IF:120,T_ENDIF:121,T_WHILE:122,T_DO:123,T_FOR:124,T_SWITCH:125,T_BREAK:126,T_CONTINUE:127,T_RETURN:128,T_GLOBAL:129,T_STATIC:130,T_ECHO:131,T_INLINE_HTML:132,T_UNSET:133,T_FOREACH:134,T_DECLARE:135,T_TRY:136,T_THROW:137,T_GOTO:138,T_FINALLY:139,T_CATCH:140,T_ENDDECLARE:141,T_LIST:142,T_CLONE:143,T_PLUS_EQUAL:144,T_MINUS_EQUAL:145,T_MUL_EQUAL:146,T_DIV_EQUAL:147,T_CONCAT_EQUAL:148,T_MOD_EQUAL:149,T_AND_EQUAL:150,T_OR_EQUAL:151,T_XOR_EQUAL:152,T_SL_EQUAL:153,T_SR_EQUAL:154,T_INC:155,T_DEC:156,T_BOOLEAN_OR:157,T_BOOLEAN_AND:158,T_LOGICAL_OR:159,T_LOGICAL_AND:160,T_LOGICAL_XOR:161,T_SL:162,T_SR:163,T_IS_IDENTICAL:164,T_IS_NOT_IDENTICAL:165,T_IS_EQUAL:166,T_IS_NOT_EQUAL:167,T_IS_SMALLER_OR_EQUAL:168,T_IS_GREATER_OR_EQUAL:169,T_INSTANCEOF:170,T_INT_CAST:171,T_DOUBLE_CAST:172,T_STRING_CAST:173,T_ARRAY_CAST:174,T_OBJECT_CAST:175,T_BOOL_CAST:176,T_UNSET_CAST:177,T_EXIT:178,T_PRINT:179,T_YIELD:180,T_YIELD_FROM:181,T_FUNCTION:182,T_DOUBLE_ARROW:183,T_DOUBLE_COLON:184,T_ARRAY:185,T_CALLABLE:186,T_CLASS:187,T_ABSTRACT:188,T_TRAIT:189,T_FINAL:190,T_EXTENDS:191,T_INTERFACE:192,T_IMPLEMENTS:193,T_VAR:194,T_PUBLIC:195,T_PROTECTED:196,T_PRIVATE:197,T_CONST:198,T_NEW:199,T_INSTEADOF:200,T_ELSEIF:201,T_ELSE:202,T_ENDSWITCH:203,T_CASE:204,T_DEFAULT:205,T_ENDFOR:206,T_ENDFOREACH:207,T_ENDWHILE:208,T_CONSTANT_ENCAPSED_STRING:209,T_LNUMBER:210,T_DNUMBER:211,T_LINE:212,T_FILE:213,T_DIR:214,T_TRAIT_C:215,T_METHOD_C:216,T_FUNC_C:217,T_NS_C:218,T_START_HEREDOC:219,T_END_HEREDOC:220,T_CLASS_C:221,T_VARIABLE:222,T_OPEN_TAG:223,T_OPEN_TAG_WITH_ECHO:224,T_CLOSE_TAG:225,T_WHITESPACE:226,T_COMMENT:227,T_DOC_COMMENT:228,T_ELLIPSIS:229,T_COALESCE:230,T_POW:231,T_POW_EQUAL:232,T_SPACESHIP:233,T_COALESCE_EQUAL:234,T_FN:235}}}},e={};function s(i){if(e[i])return e[i].exports;var n=e[i]={exports:{}};return t[i](n,n.exports,s),n.exports}s.d=(t,e)=>{for(var i in e)s.o(e,i)&&!s.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),s.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};(()=>{s.r(i),s.d(i,{activate:()=>E,deactivate:()=>m});const t=require("vscode"),e=require("fs"),n=require("child_process"),o=require("os");class r{static projectPath(e,s=!1){"/"!==e[0]&&(e="/"+e);let i=t.workspace.getConfiguration("LaravelExtraIntellisense").get("basePath");if(!1===s&&i&&i.length>0)return i=i.replace(/[\/\\]$/,""),i+e;let n=t.workspace.getConfiguration("LaravelExtraIntellisense").get("basePathForCode");return s&&n&&n.length>0?(n=n.replace(/[\/\\]$/,""),n+e):t.workspace.workspaceFolders instanceof Array&&t.workspace.workspaceFolders.length>0?t.workspace.workspaceFolders[0].uri.fsPath+e:""}static arrayUnique(t,e,s){return s.indexOf(t)===e}static runLaravel(t){if(t=t.replace(/(?:\r\n|\r|\n)/g," "),e.existsSync(r.projectPath("vendor/autoload.php"))&&e.existsSync(r.projectPath("bootstrap/app.php"))){var s="define('LARAVEL_START', microtime(true));require_once '"+r.projectPath("vendor/autoload.php",!0)+"';$app = require_once '"+r.projectPath("bootstrap/app.php",!0)+"';class VscodeLaravelExtraIntellisenseProvider extends \\Illuminate\\Support\\ServiceProvider{   public function register() {}\tpublic function boot()\t{       if (method_exists($this->app['log'], 'setHandlers')) {\t\t\t$this->app['log']->setHandlers([new \\Monolog\\Handler\\NullHandler()]);\t\t}\t}}$app->register(new VscodeLaravelExtraIntellisenseProvider($app));$kernel = $app->make(Illuminate\\Contracts\\Console\\Kernel::class);$status = $kernel->handle($input = new Symfony\\Component\\Console\\Input\\ArgvInput,new Symfony\\Component\\Console\\Output\\ConsoleOutput);echo '___VSCODE_LARAVEL_EXTRA_INSTELLISENSE_OUTPUT___';"+t+"echo '___VSCODE_LARAVEL_EXTRA_INSTELLISENSE_END_OUTPUT___';",i=this;return new Promise((function(t,e){i.runPhp(s).then((function(s){var i=s;(i=/___VSCODE_LARAVEL_EXTRA_INSTELLISENSE_OUTPUT___(.*)___VSCODE_LARAVEL_EXTRA_INSTELLISENSE_END_OUTPUT___/g.exec(i))?t(i[1]):e("PARSE ERROR: "+s)})).catch((function(t){e(t)}))}))}return new Promise(((t,e)=>t("")))}static async runPhp(e){var s;e=e.replace(/\"/g,'\\"'),["linux","openbsd","sunos","darwin"].some((t=>o.platform().includes(t)))&&(e=(e=(e=e.replace(/\$/g,"\\$")).replace(/\\\\'/g,"\\\\\\\\'")).replace(/\\\\"/g,'\\\\\\\\"'));let i=null!==(s=t.workspace.getConfiguration("LaravelExtraIntellisense").get("phpCommand"))&&void 0!==s?s:'php -r "{code}"';return i=i.replace("{code}",e),new Promise((function(t,e){n.exec(i,(function(s,i,n){i.length>0?t(i):e(n)}))}))}static parsePhp(t){if(!r.phpParser){var e=s(3638);r.phpParser=new e({parser:{extractDoc:!0,php7:!0},ast:{withPositions:!0}})}try{return r.phpParser.parseCode(t)}catch(t){return null}}static evalPhp(t){var e=r.parsePhp("<?php "+t+";");if(e&&void 0!==e.children[0])return e.children[0].expression.value}static parseFunction(t,e,s=0){var i=null,n=[];for(let t in r.tags)for(let e in r.tags[t].classes)n.push(r.tags[t].classes[e]);var o="((("+n.join("|")+")::)?([@A-Za-z0-9_]+))((\\()((?:[^)(]|\\((?:[^)(]|\\([^)(]*\\))*\\))*)(\\)|$))",h=new RegExp(o,"g"),a=/((\s*\,\s*)?)(\[[\s\S]*(\]|$)|array\[\s\S]*(\)|$)|(\"((\\\")|[^\"])*(\"|$))|(\'((\\\')|[^\'])*(\'|$)))/g,l=/\((([\s\S]*\,)?\s*function\s*\(.*\)\s*\{)([\S\s]*)\}/g;t=t.substr(Math.max(0,e-200),400),e-=Math.max(0,e-200);var c=null,_=null;if(null!==r.cachedParseFunction&&r.cachedParseFunction.text===t&&e===r.cachedParseFunction.position)i=r.cachedParseFunction.out;else if(s<6)for(;null!==(c=h.exec(t));)if(e>=c.index&&e<c.index+c[0].length){if(null!==(_=l.exec(c[0])))i=this.parseFunction(_[3],e-(c.index+c[1].length+c[6].length+_[1].length),s+1);else{var p,u=[],d=null,f=0,T=e-(c.index+c[1].length+c[6].length);if(c[7].length>=4&&(p=this.parseFunction(c[7],T)))return p;for(;null!==(_=a.exec(c[7]));)u.push(_[3]),T>=_.index&&T<=_.index+_[0].length&&(d=f),f++;var x=[];for(let t in u)x.push(this.evalPhp(u[t]));i={class:c[3],function:c[4],paramIndex:d,parameters:x,textParameters:u}}0===s&&(r.cachedParseFunction={text:t,position:e,out:i})}return i}static parseDocumentFunction(t,e){var s=t.offsetAt(e);return r.parseFunction(t.getText(),s)}static getModels(){var t=this;return new Promise((function(e,s){if(Math.floor(Date.now()/1e3)-t.modelsCacheTime<60)return e(t.modelsCache);r.runLaravel("\n\t\t\t\t\techo json_encode(array_values(array_filter(array_map(function ($name) {return app()->getNamespace().str_replace([app_path().'/', app_path().'\\\\', '.php', '/'], ['', '', '', '\\\\'], $name);}, array_merge(glob(app_path('*')), glob(app_path('Models/*')))), function ($class) {\n\t\t\t\t\t\treturn class_exists($class) && is_subclass_of($class, 'Illuminate\\\\Database\\\\Eloquent\\\\Model');\n\t\t\t\t\t})));\n\t\t\t\t").then((function(s){var i=JSON.parse(s);t.modelsCache=i,e(i)})).catch((function(t){console.error(t),e([])}))}))}static getSpacer(){const e=t.window.activeTextEditor;return e&&e.options.insertSpaces?" ".repeat(e.options.tabSize):"\t"}}r.wordMatchRegex=/[\w\d\-_\.\:\\\/@]+/g,r.phpParser=null,r.cachedParseFunction=null,r.modelsCacheTime=0,r.tags={config:{classes:["Config"],functions:["config"]},mix:{classes:[],functions:["mix"]},route:{classes:["Route"],functions:["route"]},trans:{classes:["Lang"],functions:["__","trans","@lang"]},validation:{classes:["Validator"],functions:["validate","sometimes","rules"]},view:{classes:["View"],functions:["view","markdown","links","@extends","@component","@include","@each"]},env:{classes:[],functions:["env"]},auth:{classes:["Gate"],functions:["can","@can","@cannot","@canany"]},asset:{classes:[],functions:["asset"]},model:{classes:[],functions:[]}},r.functionRegex=null,r.relationMethods=["has","orHas","whereHas","orWhereHas","whereDoesntHave","orWhereDoesntHave","doesntHave","orDoesntHave","hasMorph","orHasMorph","doesntHaveMorph","orDoesntHaveMorph","whereHasMorph","orWhereHasMorph","whereDoesntHaveMorph","orWhereDoesntHaveMorph","withAggregate","withCount","withMax","withMin","withSum","withAvg"];class h{constructor(){this.timer=null,this.routes=[],this.controllers=[],this.watcher=null,this.loadRoutes(),this.loadControllers(),void 0!==t.workspace.workspaceFolders&&(this.watcher=t.workspace.createFileSystemWatcher(new t.RelativePattern(t.workspace.workspaceFolders[0],"{,**/}{Controllers,[Rr]oute}{,s}{.php,/*.php,/**/*.php}")),this.watcher.onDidChange((t=>this.onChange())),this.watcher.onDidCreate((t=>this.onChange())),this.watcher.onDidDelete((t=>this.onChange())))}provideCompletionItems(e,s,i,n){var o=[],h=r.parseDocumentFunction(e,s);if(null===h)return o;if(h&&(h.class&&r.tags.route.classes.some((t=>h.class.includes(t)))||r.tags.route.functions.some((t=>h.function.includes(t)))))if("Route"===h.class&&["get","post","put","patch","delete","options","any","match"].some((t=>h.function.includes(t)))){if("match"===h.function&&2===h.paramIndex||"match"!==h.function&&1===h.paramIndex)for(let i in this.controllers)if("string"==typeof this.controllers[i]&&this.controllers[i].length>0){var a=new t.CompletionItem(this.controllers[i],t.CompletionItemKind.Enum);a.range=e.getWordRangeAtPosition(s,r.wordMatchRegex),o.push(a)}}else if(!1===h.function.includes("middleware")){if(1===h.paramIndex)for(let i in this.routes)if(this.routes[i].name===h.parameters[0]){for(var l in this.routes[i].parameters){var c=new t.CompletionItem(this.routes[i].parameters[l],t.CompletionItemKind.Variable);c.range=e.getWordRangeAtPosition(s,r.wordMatchRegex),o.push(c)}return o}for(let i in this.routes)if("string"==typeof this.routes[i].name&&this.routes[i].name.length>0){var _=new t.CompletionItem(this.routes[i].name,t.CompletionItemKind.Enum);_.range=e.getWordRangeAtPosition(s,r.wordMatchRegex),_.detail=this.routes[i].action+"\n\n"+this.routes[i].method+":"+this.routes[i].uri,o.push(_)}}return o}onChange(){var t=this;null!==t.timer&&clearTimeout(t.timer),t.timer=setTimeout((function(){t.loadRoutes(),t.loadControllers(),t.timer=null}),5e3)}loadRoutes(){if(t.workspace.workspaceFolders instanceof Array&&t.workspace.workspaceFolders.length>0)try{var e=this;r.runLaravel("echo json_encode(array_map(function ($route) {return ['method' => implode('|', array_filter($route->methods(), function ($method) {return $method != 'HEAD';})), 'uri' => $route->uri(), 'name' => $route->getName(), 'action' => str_replace('App\\\\Http\\\\Controllers\\\\', '', $route->getActionName()), 'parameters' => $route->parameterNames()];}, app('router')->getRoutes()->getRoutes()));").then((function(t){var s=JSON.parse(t);s=s.filter((t=>"null"!==t)),e.routes=s}))}catch(t){console.error(t)}}loadControllers(){try{this.controllers=this.getControllers(r.projectPath("app/Http/Controllers")).map((t=>t.replace(/@__invoke/,""))),this.controllers=this.controllers.filter(((t,e,s)=>s.indexOf(t)===e))}catch(t){console.error(t)}}getControllers(t){var s=this,i=[];return"/"!==t.substr(-1)&&"\\"!==t.substr(-1)&&(t+="/"),e.existsSync(t)&&e.lstatSync(t).isDirectory()&&e.readdirSync(t).forEach((function(n){if(e.lstatSync(t+n).isDirectory())i=i.concat(s.getControllers(t+n+"/"));else if(n.includes(".php")){var o=e.readFileSync(t+n,"utf8");if(o.length<5e4){var r=/class\s+([A-Za-z0-9_]+)\s+extends\s+.+/g.exec(o),h=/namespace .+\\Http\\Controllers\\?([A-Za-z0-9_]*)/g.exec(o),a=/public\s+function\s+([A-Za-z0-9_]+)\(.*\)/g;if(null!==r&&h)for(var l=r[1],c=h[1];null!==(r=a.exec(o))&&"__construct"!==r[1];)c.length>0&&i.push(c+"\\"+l+"@"+r[1]),i.push(l+"@"+r[1])}}})),i}}class a{constructor(){this.timer=null,this.views={},this.watcher=null,this.loadViews(),void 0!==t.workspace.workspaceFolders&&(this.watcher=t.workspace.createFileSystemWatcher(new t.RelativePattern(t.workspace.workspaceFolders[0],"{,**/}{view,views}/{*,**/*}")),this.watcher.onDidCreate((t=>this.onChange())),this.watcher.onDidDelete((t=>this.onChange())))}provideCompletionItems(s,i,n,o){var h=[],a=r.parseDocumentFunction(s,i);if(null===a)return h;if(a&&(a.class&&r.tags.view.classes.some((t=>a.class.includes(t)))||r.tags.view.functions.some((t=>a.function.includes(t))))){if(0===a.paramIndex)for(let e in this.views){var l=new t.CompletionItem(e,t.CompletionItemKind.Constant);l.range=s.getWordRangeAtPosition(i,r.wordMatchRegex),h.push(l)}else if(void 0!==this.views[a.parameters[0]]){for(var c=e.readFileSync(this.views[a.parameters[0]],"utf8"),_=/\$([A-Za-z_][A-Za-z0-9_]*)/g,p=[],u=[];p=_.exec(c);)u.push(p[1]);u=u.filter(((t,e,s)=>s.indexOf(t)===e));for(let e in u){var d=new t.CompletionItem(u[e],t.CompletionItemKind.Constant);d.range=s.getWordRangeAtPosition(i,r.wordMatchRegex),h.push(d)}}}else!a||"@section"!==a.function&&"@push"!==a.function||(h=this.getYields(a.function,s.getText()));return h}getYields(s,i){var n=[],o=[];if((o=/@extends\s*\([\'\"](.+)[\'\"]\)/g.exec(i))&&void 0!==this.views[o[1]]){var r=e.readFileSync(this.views[o[1]],"utf8"),h=/@yield\s*\([\'\"]([A-Za-z0-9_\-\.]+)[\'\"](,.*)?\)/g;"@push"===s&&(h=/@stack\s*\([\'\"]([A-Za-z0-9_\-\.]+)[\'\"](,.*)?\)/g);for(var a=[];o=h.exec(r);)a.push(o[1]);for(var l in a=a.filter(((t,e,s)=>s.indexOf(t)===e))){var c=new t.CompletionItem(a[l],t.CompletionItemKind.Constant);n.push(c)}n=n.concat(this.getYields(s,r))}return n}onChange(){var t=this;t.timer&&clearTimeout(t.timer),t.timer=setTimeout((function(){t.loadViews(),t.timer=null}),5e3)}loadViews(){try{var t=this,e="echo json_encode(app('view')->getFinder()->getHints());";r.runLaravel(e.replace("getHints","getPaths")).then((function(s){var i=JSON.parse(s);r.runLaravel(e).then((function(e){var s=JSON.parse(e);for(let t in i)i[t]=i[t].replace(r.projectPath("/",!0),r.projectPath("/"));for(let t in s)for(let e in s[t])s[t][e]=s[t][e].replace(r.projectPath("/",!0),r.projectPath("/"));let n={};for(let e in i)n=Object.assign(n,t.getViews(i[e]));for(let e in s)for(var o in s[e]){var h=t.getViews(s[e][o]);for(var a in h)n[e+"::"+a]=s[a]}t.views=n}))}))}catch(t){console.error(t)}}getViews(s){"/"!==s.substr(-1)&&"\\"!==s.substr(-1)&&(s+="/");var i={},n=this;return e.existsSync(s)&&e.lstatSync(s).isDirectory()&&e.readdirSync(s).forEach((function(o){if(e.lstatSync(s+o).isDirectory()){var r=n.getViews(s+o+"/");for(var h in r)i[o+t.workspace.getConfiguration("LaravelExtraIntellisense").get("viewDirectorySeparator")+h]=r[h]}else o.includes("blade.php")&&(i[o.replace(".blade.php","")]=s+o)})),i}}class l{constructor(){this.timer=null,this.configs=[],this.watcher=null,this.loadConfigs(),void 0!==t.workspace.workspaceFolders&&(this.watcher=t.workspace.createFileSystemWatcher(new t.RelativePattern(t.workspace.workspaceFolders[0],"config/{,*,**/*}.php")),this.watcher.onDidChange((t=>this.onChange())),this.watcher.onDidCreate((t=>this.onChange())),this.watcher.onDidDelete((t=>this.onChange())))}provideCompletionItems(e,s,i,n){var o=[],h=r.parseDocumentFunction(e,s);if(null===h)return o;if(h&&(h.class&&r.tags.config.classes.some((t=>h.class.includes(t)))||r.tags.config.functions.some((t=>h.function.includes(t)))))for(var a in this.configs){var l=new t.CompletionItem(this.configs[a].name,t.CompletionItemKind.Value);l.range=e.getWordRangeAtPosition(s,r.wordMatchRegex),this.configs[a].value&&(l.detail=this.configs[a].value.toString()),o.push(l)}return o}onChange(){var t=this;null!==t.timer&&clearTimeout(t.timer),t.timer=setTimeout((function(){t.loadConfigs(),t.timer=null}),5e3)}loadConfigs(){try{var t=this;r.runLaravel("echo json_encode(config()->all());").then((function(e){var s=JSON.parse(e);t.configs=t.getConfigs(s)}))}catch(t){console.error(t)}}getConfigs(t){var e=[];for(var s in t)t[s]instanceof Array?e.push({name:s,value:"array(...)"}):t[s]instanceof Object?(e.push({name:s,value:"array(...)"}),e=e.concat(this.getConfigs(t[s]).map((function(t){return t.name=s+"."+t.name,t})))):e.push({name:s,value:t[s]});return e}}class c{constructor(){this.timer=null,this.translations=[],this.watcher=null,this.loadTranslations(),void 0!==t.workspace.workspaceFolders&&(this.watcher=t.workspace.createFileSystemWatcher(new t.RelativePattern(t.workspace.workspaceFolders[0],"{,**/}{lang,localization,localizations,trans,translation,translations}/{*,**/*}")),this.watcher.onDidChange((t=>this.onChange())),this.watcher.onDidCreate((t=>this.onChange())),this.watcher.onDidDelete((t=>this.onChange())))}provideCompletionItems(e,s,i,n){var o=[],h=r.parseDocumentFunction(e,s);if(null===h)return o;if(h&&(h.class&&r.tags.trans.classes.some((t=>h.class.includes(t)))||r.tags.trans.functions.some((t=>h.function.includes(t))))){if(1===h.paramIndex){var a=/\:([A-Za-z0-9_]+)/g,l=null;for(let i in this.translations)if(this.translations[i].name===h.parameters[0]){for(;null!==(l=a.exec(this.translations[i].value));){var c=new t.CompletionItem(l[1],t.CompletionItemKind.Variable);c.range=e.getWordRangeAtPosition(s,r.wordMatchRegex),o.push(c)}return o}return o}for(let i in this.translations){var _=new t.CompletionItem(this.translations[i].name,t.CompletionItemKind.Value);_.range=e.getWordRangeAtPosition(s,r.wordMatchRegex),this.translations[i].value&&(_.detail=this.translations[i].value.toString()),o.push(_)}}return o}onChange(){var t=this;t.timer&&clearTimeout(t.timer),t.timer=setTimeout((function(){t.loadTranslations(),t.timer=null}),5e3)}loadTranslations(){var t=[];try{var s=this;r.runLaravel("echo json_encode(app('translator')->getLoader()->namespaces());").then((function(i){var n=JSON.parse(i);for(let t in n)n[t+"::"]=n[t],delete n[t];n[""]=r.projectPath("resources/lang");var o=[];for(let t in n)e.existsSync(n[t])&&e.lstatSync(n[t]).isDirectory()&&e.readdirSync(n[t]).forEach((function(s){var i=n[t]+"/"+s;e.existsSync(i)&&e.lstatSync(i).isDirectory()&&e.readdirSync(i).forEach((function(s){e.lstatSync(i+"/"+s).isFile()&&o.push(t+s.replace(/\.php/,""))}))}));o=o.filter((function(t,e,s){return s.indexOf(t)===e})),r.runLaravel("echo json_encode(["+o.map((t=>"'"+t+"' => __('"+t+"')")).join(",")+"]);").then((function(e){for(var i in o=JSON.parse(e))t=t.concat(s.getTranslations(o[i],i));s.translations=t,r.runLaravel("echo json_encode(__('*'));").then((function(e){t=t.concat(s.getTranslations(JSON.parse(e),"").map((function(t){return t.name=t.name.replace(/^\./,""),t}))),s.translations=t}))}))}))}catch(t){console.error(t)}}getTranslations(t,e){var s=[];for(var i in t)t[i]instanceof Object?(s.push({name:e+"."+i,value:"array(...)"}),s=s.concat(this.getTranslations(t[i],e+"."+i))):s.push({name:e+"."+i,value:t[i]});return s}}class _{constructor(){this.mixes=[],this.loadMix(),setInterval((()=>this.loadMix()),6e4)}provideCompletionItems(e,s,i,n){var o=[],h=r.parseDocumentFunction(e,s);if(null===h)return o;if(h&&r.tags.mix.functions.some((t=>h.function.includes(t))))for(var a in this.mixes){var l=new t.CompletionItem(this.mixes[a],t.CompletionItemKind.Value);l.range=e.getWordRangeAtPosition(s,r.wordMatchRegex),o.push(l)}return o}loadMix(){try{if(e.existsSync(r.projectPath("public/mix-manifest.json"))){var t=JSON.parse(e.readFileSync(r.projectPath("public/mix-manifest.json"),"utf8"));this.mixes=Object.keys(t).map((t=>t.replace(/^\//g,"")))}}catch(t){console.error(t)}}}class p{constructor(){this.rules={accepted:"accepted",active_url:"active_url",after:"after:date",after_or_equal:"after_or_equal:${0:date}",alpha:"alpha",alpha_dash:"alpha_dash",alpha_num:"alpha_num",array:"array",bail:"bail",before:"before:${1:date}",before_or_equal:"before_or_equal:${1:date}",between:"between:${1:min},${2:max}",boolean:"boolean",confirmed:"confirmed",date:"date",date_equals:"date_equals:${1:date}",date_format:"date_format:${1:format}",different:"different:${1:field}",digits:"digits:${1:value}",digits_between:"digits_between:${1:min},${2:max}",dimensions:"dimensions",distinct:"distinct",email:"email",ends_with:"ends_with:${1}",exists:"exists:${2:table},${3:column}",file:"file",filled:"filled",gt:"gt:${1:field}",gte:"gte:${1:field}",image:"image",in:"in:${1:something},${2:something else}",in_array:"in_array:${1:anotherfield.*}",integer:"integer",ip:"ip",ipv4:"ipv4",ipv6:"ipv6",json:"json",lt:"lt:${1:field}",lte:"lte:${1:field}",max:"max:${1:value}",mimetypes:"mimetypes:${1:text/plain}",mimes:"mimes:${1:png,jpg}",min:"min:${1:value}",not_in:"not_in:${1:something},${2:something else}",not_regex:"not_regex:${1:pattern}",nullable:"nullable",numeric:"numeric",present:"present",regex:"regex:${1:pattern}",required:"required",required_if:"required_if:${1:anotherfield},${2:value}",required_unless:"required_unless:${1:anotherfield},${2:value}",required_with:"required_with:${1:anotherfield}",required_with_all:"required_with_all:${1:anotherfield},${2:anotherfield}",required_without:"required_without:${1:anotherfield}",required_without_all:"required_without_all:${1:anotherfield},${2:anotherfield}",same:"same:${1:field}",size:"size:${1:value}",sometimes:"sometimes",starts_with:"starts_with:${1:foo},${2:bar}",string:"string",timezone:"timezone",unique:"unique:${1:table},${2:column},${3:except},${4:id}",url:"url",uuid:"uuid"}}provideCompletionItems(e,s,i,n){var o=[],h=r.parseDocumentFunction(e,s);if(h&&null!==h.paramIndex&&h.function&&r.tags.validation.functions.some((t=>h.function.includes(t)))||h&&null!==h.paramIndex&&h.class&&r.tags.validation.classes.some((t=>h.class.includes(t)))||e.getText().match(/class .* extends FormRequest/g)&&e.getText().match(/use Illuminate\\Foundation\\Http\\FormRequest;/g)){var a=this.rules;for(var l in Object.assign(a,t.workspace.getConfiguration("LaravelExtraIntellisense.customValidationRules")),a){var c=new t.CompletionItem(l,t.CompletionItemKind.Enum);c.range=e.getWordRangeAtPosition(s,r.wordMatchRegex),c.insertText=new t.SnippetString(this.rules[l]),o.push(c)}}return o}}class u{constructor(){this.enviroments={},this.timer=null,this.watcher=null,this.loadEnv(),void 0!==t.workspace.workspaceFolders&&(this.watcher=t.workspace.createFileSystemWatcher(new t.RelativePattern(t.workspace.workspaceFolders[0],".env")),this.watcher.onDidChange((t=>this.onChange())),this.watcher.onDidCreate((t=>this.onChange())),this.watcher.onDidDelete((t=>this.onChange())))}provideCompletionItems(e,s,i,n){var o=[],h=r.parseDocumentFunction(e,s);if(null===h)return o;if(h&&r.tags.env.functions.some((t=>h.function.includes(t))))for(var a in this.enviroments){var l=new t.CompletionItem(a,t.CompletionItemKind.Constant);l.range=e.getWordRangeAtPosition(s,r.wordMatchRegex),l.detail=this.enviroments[a],o.push(l)}return o}onChange(){var t=this;null!==t.timer&&clearTimeout(t.timer),t.timer=setTimeout((function(){t.loadEnv(),t.timer=null}),5e3)}loadEnv(){try{if(e.existsSync(r.projectPath(".env"))){let t={},s=e.readFileSync(r.projectPath(".env"),"utf8").split("\n");for(let e in s){let i=s[e].split("=");2==i.length&&(t[i[0]]=i[1])}this.enviroments=t}}catch(t){console.error(t)}}}class d{constructor(){this.timer=null,this.middlewares=[],this.watcher=null,this.loadMiddlewares(),void 0!==t.workspace.workspaceFolders&&(this.watcher=t.workspace.createFileSystemWatcher(new t.RelativePattern(t.workspace.workspaceFolders[0],"app/Http/Kernel.php")),this.watcher.onDidChange((t=>this.onChange())))}provideCompletionItems(e,s,i,n){var o=[],h=r.parseDocumentFunction(e,s);if(null===h)return o;if(h.function.includes("middleware"))for(let i in this.middlewares){var a=new t.CompletionItem(i,t.CompletionItemKind.Enum);a.detail=this.middlewares[i],a.range=e.getWordRangeAtPosition(s,r.wordMatchRegex),o.push(a)}return o}onChange(){var t=this;null!==t.timer&&clearTimeout(t.timer),t.timer=setTimeout((function(){t.loadMiddlewares(),t.timer=null}),5e3)}loadMiddlewares(){if(t.workspace.workspaceFolders instanceof Array&&t.workspace.workspaceFolders.length>0)try{var e=this;r.runLaravel("$middlewares = array_merge(app('Illuminate\\Contracts\\Http\\Kernel')->getMiddlewareGroups(), app('Illuminate\\Contracts\\Http\\Kernel')->getRouteMiddleware());foreach($middlewares as $key => &$value) {if (is_array($value)){$value = null;}else{$parameters = array_filter((new ReflectionMethod($value, 'handle'))->getParameters(), function ($rc) {return $rc->getName() != 'request' && $rc->getName() != 'next';});$value=implode(',', array_map(function ($rh) {return $rh->getName().($rh->isVariadic()?'...':'');}, $parameters));if(empty($value)){$value=null;}};}echo json_encode($middlewares);").then((function(t){let s=JSON.parse(t);e.middlewares=s}))}catch(t){console.error(t)}}}class f{constructor(){this.abilities=[],this.models=[];var t=this;t.loadAbilities(),setInterval((function(){t.loadAbilities()}),6e4)}provideCompletionItems(e,s,i,n){var o=[],h=r.parseDocumentFunction(e,s);if(null===h)return o;if(h&&(h.class&&r.tags.auth.classes.some((t=>h.class.includes(t)))||r.tags.auth.functions.some((t=>h.function.includes(t)))))if(1===h.paramIndex)for(let i in this.models){let n=new t.CompletionItem(this.models[i].replace(/\\/,"\\\\"),t.CompletionItemKind.Value);n.range=e.getWordRangeAtPosition(s,r.wordMatchRegex),o.push(n)}else for(let i in this.abilities){let n=new t.CompletionItem(this.abilities[i],t.CompletionItemKind.Value);n.range=e.getWordRangeAtPosition(s,r.wordMatchRegex),o.push(n)}return o}loadAbilities(){try{var t=this;r.getModels().then((e=>t.models=e)),r.runLaravel("\n                echo json_encode(\n                    array_merge(\n                        array_keys(Illuminate\\Support\\Facades\\Gate::abilities()),\n                        array_values(\n                            array_filter(\n                                array_unique(\n                                    Illuminate\\Support\\Arr::flatten(\n                                        array_map(\n                                            function ($val, $key) {\n                                                return array_map(\n                                                    function ($rm) {\n                                                        return $rm->getName();\n                                                    },\n                                                    (new ReflectionClass($val))->getMethods()\n                                                );\n                                            },\n                                            Illuminate\\Support\\Facades\\Gate::policies(),\n                                            array_keys(Illuminate\\Support\\Facades\\Gate::policies())\n                                        )\n                                    )\n                                ),\n                                function ($an) {return !in_array($an, ['allow', 'deny']);}\n                            )\n                        )\n                    )\n                );\n               ").then((function(e){var s=JSON.parse(e);t.abilities=s}))}catch(t){console.error(t)}}}class T{constructor(){this.publicFiles=[],this.timer=null,this.watcher=null,this.loadFiles(),void 0!==t.workspace.workspaceFolders&&(this.watcher=t.workspace.createFileSystemWatcher(new t.RelativePattern(t.workspace.workspaceFolders[0],"public/**/*")),this.watcher.onDidChange((t=>this.onChange())),this.watcher.onDidCreate((t=>this.onChange())),this.watcher.onDidDelete((t=>this.onChange())))}provideCompletionItems(e,s,i,n){var o=[],h=r.parseDocumentFunction(e,s);if(null===h)return o;if(h&&r.tags.asset.functions.some((t=>h.function.includes(t))))for(var a in this.publicFiles){var l=new t.CompletionItem(this.publicFiles[a],t.CompletionItemKind.Constant);l.range=e.getWordRangeAtPosition(s,r.wordMatchRegex),o.push(l)}return o}onChange(){var t=this;null!==t.timer&&clearTimeout(t.timer),t.timer=setTimeout((function(){t.loadFiles(),t.timer=null}),2e3)}loadFiles(){this.publicFiles=this.getFiles().map((t=>t.replace(/\/?public\/?/g,"")))}getFiles(t="public",s=0){let i=[];try{let n=r.projectPath(t);if(s<=10&&e.existsSync(n))for(let o of e.readdirSync(n)){let r=n+"/"+o;e.lstatSync(r).isDirectory()?i=i.concat(this.getFiles(t+"/"+o,s+1)):e.lstatSync(r).isFile()&&"."!=o[0]&&0==o.endsWith(".php")&&i.push(t+"/"+o)}}catch(t){console.error(t)}return i}}class x{constructor(){this.timer=null,this.models={},this.watchers=[];var e=this;if(void 0!==t.workspace.workspaceFolders)for(let s of t.workspace.getConfiguration("LaravelExtraIntellisense").get("modelsPaths",["app","app/Models"]).concat(["database/migrations"])){let i=t.workspace.createFileSystemWatcher(new t.RelativePattern(t.workspace.workspaceFolders[0],s+"/*.php"));i.onDidChange((t=>e.onChange())),i.onDidCreate((t=>e.onChange())),i.onDidDelete((t=>e.onChange())),this.watchers.push(i)}e.loadModels()}provideCompletionItems(e,s,i,n){var o=[],h=r.parseDocumentFunction(e,s);let a=e.getText().substr(0,e.offsetAt(s));var l=a.includes("extends Factory")||a.includes("$factory->define("),c=null,_="",p="",u="";if(null!=h||l){if(h){let t=/([A-z0-9_\\]+)::[^:;]+$/g;for(;null!==(c=t.exec(a));)p=c[1];if(0===p.length){let e=/(\$([A-z0-9_\\]+))->[^;]+$/g;for(;null!==(c=e.exec(a));)_=c[2];if(_.length>0)for(t=new RegExp("\\$"+_+"\\s*=\\s*([A-z0-9_\\\\]+)::[^:]","g");null!==(c=t.exec(a));)p=c[1]}null!==(c=/namespace\s+(.+);/g.exec(a))&&c[1],u=this.getModelClass(p,a)}else null!==(c=/(protected \$model = ([A-Za-z0-9_\\]+)::class;)|(\$factory->define\(\s*([A-Za-z0-9_\\]+)::class)/g.exec(a))&&(p=void 0!==c[4]?c[4]:c[2]),u=this.getModelClass(p,a);void 0!==this.models[u]&&(o=h&&r.relationMethods.some((t=>h.function.includes(t)))?o.concat(this.getCompletionItems(e,s,this.models[u].relations)):o.concat(this.getCompletionItems(e,s,this.models[u].attributes)))}else{let i=!1,n=/(\$?([A-z0-9_\[\]]+)|(Auth::user\(\)))\-\>[A-z0-9_]*$/g;for(;null!==(c=n.exec(a));)_=void 0!==c[2]?c[2]:c[3];if(_.match(/\$?[A-z0-9_]+\[.+\].*$/g)&&(i=!0,_=_.replace(/\[.+\].*$/g,"")),_.length>0&&"Auth::user()"!=_){let t=new RegExp("\\$"+_+"\\s*=\\s*([A-z0-9_\\\\]+)::[^:;]","g");for(;null!==(c=t.exec(a));)p=c[1];u=this.getModelClass(p,a)}"Auth"!=u&&"Auth::user()"!=_||(void 0!==this.models["App\\User"]?o=o.concat(this.getModelAttributesCompletionItems(e,s,"App\\User")):void 0!==this.models["App\\Models\\User"]&&(o=o.concat(this.getModelAttributesCompletionItems(e,s,"App\\Models\\User"))));let r=t.workspace.getConfiguration("LaravelExtraIntellisense").get("modelVariables",{});for(let t in r)t===_&&void 0!==this.models[r[t]]&&(o=o.concat(this.getModelAttributesCompletionItems(e,s,r[t])));for(let t in this.models)t!=u&&this.models[t].camelCase!=_&&this.models[t].snakeCase!=_&&(1!=i||this.models[t].pluralCamelCase!=_&&this.models[t].pluralSnakeCase!=_)||(o=o.concat(this.getModelAttributesCompletionItems(e,s,t)))}return o.filter(((t,e,s)=>s.map((t=>t.label)).indexOf(t.label)===e))}getModelClass(t,e){let s=null,i="";if(0===t.length)return"";var n=new RegExp("use (.+)"+t+";","g");return i="\\"===t.substr(0,1)?t.substr(1):null!==(s=n.exec(e))?s[1]+t:t,i}getModelAttributesCompletionItems(e,s,i){let n=[];return void 0!==this.models[i]&&(n=n.concat(this.getCompletionItems(e,s,this.models[i].attributes.map((e=>e[t.workspace.getConfiguration("LaravelExtraIntellisense").get("modelAttributeCase","default")])))),n=n.concat(this.getCompletionItems(e,s,this.models[i].accessors.map((e=>e[t.workspace.getConfiguration("LaravelExtraIntellisense").get("modelAccessorCase","snake")])),t.CompletionItemKind.Constant)),n=n.concat(this.getCompletionItems(e,s,this.models[i].relations,t.CompletionItemKind.Value))),n}getCompletionItems(e,s,i,n=t.CompletionItemKind.Property){let o=[];for(let a of i){var h=new t.CompletionItem(a,n);h.range=e.getWordRangeAtPosition(s,r.wordMatchRegex),o.push(h)}return o}onChange(){var t=this;null!==t.timer&&clearTimeout(t.timer),t.timer=setTimeout((function(){t.loadModels(),t.timer=null}),5e3)}loadModels(){var e=this;try{r.runLaravel("foreach (['"+t.workspace.getConfiguration("LaravelExtraIntellisense").get("modelsPaths",["app","app/Models"]).join("', '")+"'] as $modelPath) {   if (is_dir(base_path($modelPath))) {      foreach (scandir(base_path($modelPath)) as $sourceFile) {         if (substr($sourceFile, -4) == '.php' && is_file(base_path(\"$modelPath/$sourceFile\"))) {             include_once base_path(\"$modelPath/$sourceFile\");         }      }   }}$modelClasses = array_values(array_filter(get_declared_classes(), function ($declaredClass) {   return is_subclass_of($declaredClass, 'Illuminate\\Database\\Eloquent\\Model') && $declaredClass != 'Illuminate\\Database\\Eloquent\\Relations\\Pivot' && $declaredClass != 'Illuminate\\Foundation\\Auth\\User';}));$output = [];foreach ($modelClasses as $modelClass) {   $classReflection = new \\ReflectionClass($modelClass);   $output[$modelClass] = [       'name' => $classReflection->getShortName(),       'camelCase' => Illuminate\\Support\\Str::camel($classReflection->getShortName()),       'snakeCase' => Illuminate\\Support\\Str::snake($classReflection->getShortName()),       'pluralCamelCase' => Illuminate\\Support\\Str::camel(Illuminate\\Support\\Str::plural($classReflection->getShortName())),       'pluralSnakeCase' => Illuminate\\Support\\Str::snake(Illuminate\\Support\\Str::plural($classReflection->getShortName())),       'attributes' => [],       'accessors' => [],       'relations' => []   ];   try {       $modelInstance = $modelClass::first();       $attributes = array_values(array_unique(array_merge(app($modelClass)->getFillable(), array_keys($modelInstance ? $modelInstance->getAttributes() : []))));       $output[$modelClass]['attributes'] = array_map(function ($attribute) {           return ['default' => $attribute, 'snake' => Illuminate\\Support\\Str::snake($attribute), 'camel' => Illuminate\\Support\\Str::camel($attribute)];       }, $attributes);   } catch (\\Throwable $e) {}   foreach ($classReflection->getMethods() as $classMethod) {       try {           if (                $classMethod->isStatic() == false &&                $classMethod->isPublic() == true &&                substr($classMethod->getName(), 0, 3) != 'get' &&                substr($classMethod->getName(), 0, 3) != 'set' &&                count($classMethod->getParameters()) == 0 &&                preg_match('/belongsTo|hasMany|hasOne|morphOne|morphMany|morphTo/', implode('', array_slice(file($classMethod->getFileName()), $classMethod->getStartLine(), $classMethod->getEndLine() - $classMethod->getStartLine() - 1)))           ) {               $output[$modelClass]['relations'][] = $classMethod->getName();           } elseif (                substr($classMethod->getName(), 0, 3) == 'get' &&                 substr($classMethod->getName(), -9) == 'Attribute' &&                !empty(substr($classMethod->getName(), 3, -9))           ) {               $attributeName = substr($classMethod->getName(), 3, -9);               $output[$modelClass]['accessors'][] = ['default' => $attributeName, 'snake' => Illuminate\\Support\\Str::snake($attributeName), 'camel' => Illuminate\\Support\\Str::camel($attributeName)];           }       } catch (\\Throwable $e) {}   }   sort($output[$modelClass]['attributes']);   sort($output[$modelClass]['relations']);}echo json_encode($output);").then((function(t){let s=JSON.parse(t);e.models=s})).catch((function(t){console.error(t)}))}catch(t){console.error(t)}}}class k{constructor(){this.customDirectives=[];var t=this;t.loadCustomDirectives(),setInterval((()=>t.loadCustomDirectives()),6e5)}provideCompletionItems(e,s,i,n){let o="blade"==e.languageId||"laravel-blade"==e.languageId||e.fileName.endsWith(".blade.php");if(t.workspace.getConfiguration("LaravelExtraIntellisense").get("disableBlade",!1)||!1===o)return[];var h=this.getDefaultDirectives(e,s);for(var a in this.customDirectives){var l=new t.CompletionItem("@"+this.customDirectives[a].name+(this.customDirectives[a].hasParams?"(...)":""),t.CompletionItemKind.Keyword);l.insertText=new t.SnippetString("@"+this.customDirectives[a].name+(this.customDirectives[a].hasParams?"(${1})":"")),l.range=e.getWordRangeAtPosition(s,r.wordMatchRegex),h.push(l)}return h}loadCustomDirectives(){try{var t=this;r.runLaravel("$out = [];foreach (app(Illuminate\\View\\Compilers\\BladeCompiler::class)->getCustomDirectives() as $name => $customDirective) {    if ($customDirective instanceof \\Closure) {        $out[] = ['name' => $name, 'hasParams' => (new ReflectionFunction($customDirective))->getNumberOfParameters() >= 1];    } elseif (is_array($customDirective)) {        $out[] = ['name' => $name, 'hasParams' => (new ReflectionMethod($customDirective[0], $customDirective[1]))->getNumberOfParameters() >= 1];    }}echo json_encode($out);").then((function(e){var s=JSON.parse(e);t.customDirectives=s}))}catch(t){console.error(t)}}getDefaultDirectives(e,s){var i={"@if(...)":new t.SnippetString("@if (${1})\n"+r.getSpacer()+"${2}\n@endif"),"@error(...)":new t.SnippetString("@error(${1})\n"+r.getSpacer()+"${2}\n@enderror"),"@if(...) ... @else ... @endif":new t.SnippetString("@if (${1})\n"+r.getSpacer()+"${2}\n@else\n"+r.getSpacer()+"${3}\n@endif"),"@foreach(...)":new t.SnippetString("@foreach (${1} as ${2})\n"+r.getSpacer()+"${3}\n@endforeach"),"@forelse(...)":new t.SnippetString("@forelse (${1} as ${2})\n"+r.getSpacer()+"${3}\n@empty\n"+r.getSpacer()+"${4}\n@endforelse"),"@for(...)":new t.SnippetString("@for (${1})\n"+r.getSpacer()+"${2}\n@endfor"),"@while(...)":new t.SnippetString("@while (${1})\n"+r.getSpacer()+"${2}\n@endwhile"),"@switch(...)":new t.SnippetString("@switch(${1})\n"+r.getSpacer()+"@case(${2})\n"+r.getSpacer().repeat(2)+"${3}\n"+r.getSpacer().repeat(2)+"@break\n\n"+r.getSpacer()+"@default\n"+r.getSpacer().repeat(2)+"${4}\n@endswitch"),"@case(...)":new t.SnippetString("@case(${1})\n"+r.getSpacer()+"${2}\n@break"),"@break":new t.SnippetString("@break"),"@continue":new t.SnippetString("@continue"),"@break(...)":new t.SnippetString("@break(${1})"),"@continue(...)":new t.SnippetString("@continue(${1})"),"@default":new t.SnippetString("@default"),"@extends(...)":new t.SnippetString("@extends(${1})"),"@empty":new t.SnippetString("@empty"),"@verbatim ...":new t.SnippetString("@verbatim\n"+r.getSpacer()+"${2}\n@endverbatim"),"@json(...)":new t.SnippetString("@json(${1})"),"@elseif (...)":new t.SnippetString("@elseif (${1})"),"@else":new t.SnippetString("@else"),"@unless(...)":new t.SnippetString("@unless (${1})\n"+r.getSpacer()+"${2}\n@endunless"),"@isset(...)":new t.SnippetString("@isset(${1})\n"+r.getSpacer()+"${2}\n@endisset"),"@empty(...)":new t.SnippetString("@empty(${1})\n"+r.getSpacer()+"${2}\n@endempty"),"@auth":new t.SnippetString("@auth\n"+r.getSpacer()+"${1}\n@endauth"),"@guest":new t.SnippetString("@guest\n"+r.getSpacer()+"${1}\n@endguest"),"@auth(...)":new t.SnippetString("@auth(${1})\n"+r.getSpacer()+"${2}\n@endauth"),"@guest(...)":new t.SnippetString("@guest(${1})\n"+r.getSpacer()+"${2}\n@endguest"),"@can(...)":new t.SnippetString("@can(${1})\n"+r.getSpacer()+"${2}\n@endcan"),"@cannot(...)":new t.SnippetString("@cannot(${1})\n"+r.getSpacer()+"${2}\n@endcannot"),"@elsecan(...)":new t.SnippetString("@elsecan(${1})"),"@elsecannot(...)":new t.SnippetString("@elsecannot(${1})"),"@production":new t.SnippetString("@production\n"+r.getSpacer()+"${1}\n@endproduction"),"@env(...)":new t.SnippetString("@env(${1})\n"+r.getSpacer()+"${2}\n@endenv"),"@hasSection(...)":new t.SnippetString("@hasSection(${1})\n"+r.getSpacer()+"${2}\n@endif"),"@sectionMissing(...)":new t.SnippetString("@sectionMissing(${1})\n"+r.getSpacer()+"${2}\n@endif"),"@include(...)":new t.SnippetString("@include(${1})"),"@includeIf(...)":new t.SnippetString("@includeIf(${1})"),"@includeWhen(...)":new t.SnippetString("@includeWhen(${1}, ${2})"),"@includeUnless(...)":new t.SnippetString("@includeUnless(${1}, ${2})"),"@includeFirst(...)":new t.SnippetString("@includeFirst(${1})"),"@each(...)":new t.SnippetString("@each(${1}, ${2}, ${3})"),"@once":new t.SnippetString("@production\n"+r.getSpacer()+"${1}\n@endonce"),"@yield(...)":new t.SnippetString("@yield(${1})"),"@slot(...)":new t.SnippetString("@slot(${1})"),"@stack(...)":new t.SnippetString("@method(${1})"),"@push(...)":new t.SnippetString("@push(${1})\n"+r.getSpacer()+"${2}\n@endpush"),"@prepend(...)":new t.SnippetString("@prepend(${1})\n"+r.getSpacer()+"${2}\n@endprepend"),"@php":new t.SnippetString("@php\n"+r.getSpacer()+"${1}\n@endphp"),"@component(...)":new t.SnippetString("@component(${1})\n"+r.getSpacer()+"${2}\n@endcomponent"),"@section(...) ... @endsection":new t.SnippetString("@section(${1})\n"+r.getSpacer()+"${2}\n@endsection"),"@section(...)":new t.SnippetString("@section(${1})"),"@props(...)":new t.SnippetString("@props(${1})"),"@show":new t.SnippetString("@show"),"@stop":new t.SnippetString("@stop"),"@parent":new t.SnippetString("@parent"),"@csrf":new t.SnippetString("@csrf"),"@method(...)":new t.SnippetString("@method(${1})"),"@inject(...)":new t.SnippetString("@inject(${1}, ${2})"),"@dump(...)":new t.SnippetString("@dump(${1})"),"@dd(...)":new t.SnippetString("@dd(${1})"),"@lang(...)":new t.SnippetString("@lang(${1})"),"@endif":new t.SnippetString("@endif"),"@enderror":new t.SnippetString("@enderror"),"@endforeach":new t.SnippetString("@endforeach"),"@endforelse":new t.SnippetString("@endforelse"),"@endfor":new t.SnippetString("@endfor"),"@endwhile":new t.SnippetString("@endwhile"),"@endswitch":new t.SnippetString("@endswitch"),"@endverbatim":new t.SnippetString("@endverbatim"),"@endunless":new t.SnippetString("@endunless"),"@endisset":new t.SnippetString("@endisset"),"@endempty":new t.SnippetString("@endempty"),"@endauth":new t.SnippetString("@endauth"),"@endguest":new t.SnippetString("@endguest"),"@endproduction":new t.SnippetString("@endproduction"),"@endenv":new t.SnippetString("@endenv"),"@endonce":new t.SnippetString("@endonce"),"@endpush":new t.SnippetString("@endpush"),"@endprepend":new t.SnippetString("@endprepend"),"@endphp":new t.SnippetString("@endphp"),"@endcomponent":new t.SnippetString("@endcomponent"),"@endsection":new t.SnippetString("@endsection"),"@endslot":new t.SnippetString("@endslot"),"@endcan":new t.SnippetString("@endcan"),"@endcannot":new t.SnippetString("@endcannot")},n=[];for(let h in i){var o=new t.CompletionItem(h,t.CompletionItemKind.Keyword);i[h]instanceof t.SnippetString&&(o.insertText=i[h]),o.range=e.getWordRangeAtPosition(s,r.wordMatchRegex),n.push(o)}return n}}function E(s){if(function(e){var s,i;let n=e.globalState.get("laravel-extra-intellisense-version"),o=null===(i=null===(s=t.extensions.getExtension("amiralizadeh9480.laravel-extra-intellisense"))||void 0===s?void 0:s.packageJSON)||void 0===i?void 0:i.version,r=null,h=n?n.split(".").map((t=>Number(t))):[0,0,0],a=o.split(".").map((t=>Number(t)));void 0===n||0===n.length?r="Thanks for using Laravel Extra Intellisense.":o!==n&&(h[0]===a[0]&&h[1]<a[1]||h[0]<a[0])&&(r="Laravel Extra Intellisense updated to "+o+" - New feature: Add blade directives autocomplete."),r&&(t.window.showInformationMessage(r,"⭐️ Star on Github","🐞 Report Bug").then((function(e){"⭐️ Rate"===e?t.env.openExternal(t.Uri.parse("https://marketplace.visualstudio.com/items?itemName=amiralizadeh9480.laravel-extra-intellisense")):"🐞 Report Bug"===e?t.env.openExternal(t.Uri.parse("https://github.com/amir9480/vscode-laravel-extra-intellisense/issues")):"⭐️ Star on Github"===e&&t.env.openExternal(t.Uri.parse("https://github.com/amir9480/vscode-laravel-extra-intellisense"))})),e.globalState.update("laravel-extra-intellisense-version",o))}(s),t.workspace.workspaceFolders instanceof Array&&t.workspace.workspaceFolders.length>0&&e.existsSync(r.projectPath("artisan"))){const e=[{scheme:"file",language:"php"},{scheme:"file",language:"blade"},{scheme:"file",language:"laravel-blade"}],i="\"'".split("");s.subscriptions.push(t.languages.registerCompletionItemProvider(e,new h,...i)),s.subscriptions.push(t.languages.registerCompletionItemProvider(e,new a,...i)),s.subscriptions.push(t.languages.registerCompletionItemProvider(e,new l,...i)),s.subscriptions.push(t.languages.registerCompletionItemProvider(e,new c,...i)),s.subscriptions.push(t.languages.registerCompletionItemProvider(e,new _,...i)),s.subscriptions.push(t.languages.registerCompletionItemProvider(e,new p,...i.concat(["|"]))),s.subscriptions.push(t.languages.registerCompletionItemProvider(e,new u,...i)),s.subscriptions.push(t.languages.registerCompletionItemProvider(e,new d,...i)),s.subscriptions.push(t.languages.registerCompletionItemProvider(e,new f,...i)),s.subscriptions.push(t.languages.registerCompletionItemProvider(e,new T,...i)),s.subscriptions.push(t.languages.registerCompletionItemProvider(e,new x,...i.concat([">"]))),s.subscriptions.push(t.languages.registerCompletionItemProvider(e,new k,"@"))}}function m(){}})(),module.exports=i})();
//# sourceMappingURL=extension.js.map