@prettier/plugin-php 0.18.6 → 0.18.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prettier/plugin-php",
3
- "version": "0.18.6",
3
+ "version": "0.18.7",
4
4
  "description": "Prettier PHP Plugin",
5
5
  "repository": "prettier/prettier-php",
6
6
  "author": "Lucas Azzola <@azz>",
@@ -13,7 +13,7 @@
13
13
  "dependencies": {
14
14
  "linguist-languages": "^7.5.1",
15
15
  "mem": "^8.0.0",
16
- "php-parser": "3.1.0-beta.8"
16
+ "php-parser": "3.1.0-beta.9"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@babel/preset-env": "^7.18.0",
package/src/printer.js CHANGED
@@ -3047,8 +3047,8 @@ function printNode(path, options, print) {
3047
3047
  const body = armPath.call(print, "body");
3048
3048
  return concat(
3049
3049
  armIdx > 0
3050
- ? [", ", line, conds, " => ", body]
3051
- : [line, conds, " => ", body]
3050
+ ? [", ", hardline, conds, " => ", body]
3051
+ : [hardline, conds, " => ", body]
3052
3052
  );
3053
3053
  }, "arms");
3054
3054
  return group(
package/standalone.js CHANGED
@@ -1,4 +1,4 @@
1
1
  !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("prettier/standalone")):"function"==typeof define&&define.amd?define(["exports","prettier/standalone"],e):e(((t="undefined"!=typeof globalThis?globalThis:t||self).prettierPlugins=t.prettierPlugins||{},t.prettierPlugins.php={}),t.prettier)}(this,(function(t,e){"use strict";function i(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var n=i(e);function s(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function r(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?s(Object(i),!0).forEach((function(e){h(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):s(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function o(){
2
2
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
3
3
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
4
- o=function(){return t};var t={},e=Object.prototype,i=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},s=n.iterator||"@@iterator",r=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function h(t,e,i){return Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,i){return t[e]=i}}function l(t,e,i,n){var s=e&&e.prototype instanceof _?e:_,r=Object.create(s.prototype),o=new g(n||[]);return r._invoke=function(t,e,i){var n="suspendedStart";return function(s,r){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===s)throw r;return L()}for(i.method=s,i.arg=r;;){var o=i.delegate;if(o){var a=y(o,i);if(a){if(a===u)continue;return a}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===n)throw n="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);n="executing";var h=c(t,e,i);if("normal"===h.type){if(n=i.done?"completed":"suspendedYield",h.arg===u)continue;return{value:h.arg,done:i.done}}"throw"===h.type&&(n="completed",i.method="throw",i.arg=h.arg)}}}(t,i,o),r}function c(t,e,i){try{return{type:"normal",arg:t.call(e,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var u={};function _(){}function d(){}function p(){}var f={};h(f,s,(function(){return this}));var T=Object.getPrototypeOf,k=T&&T(T(N([])));k&&k!==e&&i.call(k,s)&&(f=k);var E=p.prototype=_.prototype=Object.create(f);function m(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(s,r,o,a){var h=c(t[s],t,r);if("throw"!==h.type){var l=h.arg,u=l.value;return u&&"object"==typeof u&&i.call(u,"__await")?e.resolve(u.__await).then((function(t){n("next",t,o,a)}),(function(t){n("throw",t,o,a)})):e.resolve(u).then((function(t){l.value=t,o(l)}),(function(t){return n("throw",t,o,a)}))}a(h.arg)}var s;this._invoke=function(t,i){function r(){return new e((function(e,s){n(t,i,e,s)}))}return s=s?s.then(r,r):r()}}function y(t,e){var i=t.iterator[e.method];if(void 0===i){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,y(t,e),"throw"===e.method))return u;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=c(i,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,u;var s=n.arg;return s?s.done?(e[t.resultName]=s.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,u):s:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,u)}function v(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function g(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(v,this),this.reset(!0)}function N(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n<t.length;)if(i.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:L}}function L(){return{value:void 0,done:!0}}return d.prototype=p,h(E,"constructor",p),h(p,"constructor",d),d.displayName=h(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,h(t,a,"GeneratorFunction")),t.prototype=Object.create(E),t},t.awrap=function(t){return{__await:t}},m(x.prototype),h(x.prototype,r,(function(){return this})),t.AsyncIterator=x,t.async=function(e,i,n,s,r){void 0===r&&(r=Promise);var o=new x(l(e,i,n,s),r);return t.isGeneratorFunction(i)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},m(E),h(E,a,"Generator"),h(E,s,(function(){return this})),h(E,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var i in t)e.push(i);return e.reverse(),function i(){for(;e.length;){var n=e.pop();if(n in t)return i.value=n,i.done=!1,i}return i.done=!0,i}},t.values=N,g.prototype={constructor:g,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(i,n){return o.type="throw",o.arg=t,e.next=i,n&&(e.method="next",e.arg=void 0),!!n}for(var s=this.tryEntries.length-1;s>=0;--s){var r=this.tryEntries[s],o=r.completion;if("root"===r.tryLoc)return n("end");if(r.tryLoc<=this.prev){var a=i.call(r,"catchLoc"),h=i.call(r,"finallyLoc");if(a&&h){if(this.prev<r.catchLoc)return n(r.catchLoc,!0);if(this.prev<r.finallyLoc)return n(r.finallyLoc)}else if(a){if(this.prev<r.catchLoc)return n(r.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return n(r.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var s=this.tryEntries[n];if(s.tryLoc<=this.prev&&i.call(s,"finallyLoc")&&this.prev<s.finallyLoc){var r=s;break}}r&&("break"===t||"continue"===t)&&r.tryLoc<=e&&e<=r.finallyLoc&&(r=null);var o=r?r.completion:{};return o.type=t,o.arg=e,r?(this.method="next",this.next=r.finallyLoc,u):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),u},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),A(i),u}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var n=i.completion;if("throw"===n.type){var s=n.arg;A(i)}return s}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,i){return this.delegate={iterator:N(t),resultName:e,nextLoc:i},"next"===this.method&&(this.arg=void 0),u}},t}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function h(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==i)return;var n,s,r=[],o=!0,a=!1;try{for(i=i.call(t);!(o=(n=i.next()).done)&&(r.push(n.value),!e||r.length!==e);o=!0);}catch(t){a=!0,s=t}finally{try{o||null==i.return||i.return()}finally{if(a)throw s}}return r}(t,e)||u(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t){return function(t){if(Array.isArray(t))return _(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||u(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){if(t){if("string"==typeof t)return _(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_(t,e):void 0}}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function d(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=u(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,s=function(){};return{s:s,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return o=t.done,t},e:function(t){a=!0,r=t},f:function(){try{o||null==i.return||i.return()}finally{if(a)throw r}}}}var p={attributeIndex:0,attributeListDepth:{},matchST_ATTRIBUTE:function(){var t=this.input();if(this.is_WHITESPACE()){do{t=this.input()}while(this.is_WHITESPACE());return this.unput(1),null}switch(t){case"]":return 0===this.attributeListDepth[this.attributeIndex]?(delete this.attributeListDepth[this.attributeIndex],this.attributeIndex--,this.popState()):this.attributeListDepth[this.attributeIndex]--,"]";case"(":case")":case":":case"=":case"|":case"&":case"^":case"-":case"+":case"*":case"%":case"~":case"<":case">":case"!":return this.consume_TOKEN();case"[":return this.attributeListDepth[this.attributeIndex]++,"[";case",":return",";case'"':return this.ST_DOUBLE_QUOTES();case"'":return this.T_CONSTANT_ENCAPSED_STRING();case"/":return"/"===this._input[this.offset]?this.T_COMMENT():"*"===this._input[this.offset]?(this.input(),this.T_DOC_COMMENT()):this.consume_TOKEN()}if(this.is_LABEL_START()||"\\"===t){for(;this.offset<this.size;){var e=this.input();if(!this.is_LABEL()&&"\\"!==e){e&&this.unput(1);break}}return this.T_STRING()}if(this.is_NUM())return this.consume_NUM();throw new Error('Bad terminal sequence "'.concat(t,'" at line ').concat(this.yylineno," (offset ").concat(this.offset,")"))}};p.attributeIndex,p.attributeListDepth,p.matchST_ATTRIBUTE;var f={T_COMMENT:function(){for(;this.offset<this.size;){var t=this.input();if("\n"===t||"\r"===t)return this.tok.T_COMMENT;if("?"===t&&!this.aspTagMode&&">"===this._input[this.offset])return this.unput(1),this.tok.T_COMMENT;if("%"===t&&this.aspTagMode&&">"===this._input[this.offset])return this.unput(1),this.tok.T_COMMENT}return this.tok.T_COMMENT},T_DOC_COMMENT:function(){var t=this.input(),e=this.tok.T_COMMENT;if("*"===t){if(t=this.input(),this.is_WHITESPACE()&&(e=this.tok.T_DOC_COMMENT),"/"===t)return e;this.unput(1)}for(;this.offset<this.size;)if("*"===(t=this.input())&&"/"===this._input[this.offset]){this.input();break}return e}};f.T_COMMENT,f.T_DOC_COMMENT;var T={nextINITIAL:function(){return this.conditionStack.length>1&&"INITIAL"===this.conditionStack[this.conditionStack.length-1]?this.popState():this.begin("ST_IN_SCRIPTING"),this},matchINITIAL:function(){for(;this.offset<this.size;){var t=this.input();if("<"==t)if("?"==(t=this.ahead(1))){if(this.tryMatch("?=")){this.unput(1).appendToken(this.tok.T_OPEN_TAG_WITH_ECHO,3).nextINITIAL();break}if(this.tryMatchCaseless("?php")&&(" "===(t=this._input[this.offset+4])||"\t"===t||"\n"===t||"\r"===t)){this.unput(1).appendToken(this.tok.T_OPEN_TAG,6).nextINITIAL();break}if(this.short_tags){this.unput(1).appendToken(this.tok.T_OPEN_TAG,2).nextINITIAL();break}}else if(this.asp_tags&&"%"==t){if(this.tryMatch("%=")){this.aspTagMode=!0,this.unput(1).appendToken(this.tok.T_OPEN_TAG_WITH_ECHO,3).nextINITIAL();break}this.aspTagMode=!0,this.unput(1).appendToken(this.tok.T_OPEN_TAG,2).nextINITIAL();break}}return this.yytext.length>0&&this.tok.T_INLINE_HTML}};T.nextINITIAL,T.matchINITIAL;var k={consume_NUM:function(){var t=this.yytext[0],e="."===t;if("0"===t)if("x"===(t=this.input())||"X"===t){if("_"!==(t=this.input())&&this.is_HEX())return this.consume_HNUM();this.unput(t?2:1)}else if("b"===t||"B"===t){if("_"!==(t=this.input())&&"0"===t||"1"===t)return this.consume_BNUM();this.unput(t?2:1)}else this.is_NUM()||t&&this.unput(1);for(;this.offset<this.size;){var i=t;if("_"===(t=this.input())){if("_"===i){this.unput(2);break}if("."===i){this.unput(1);break}if("e"===i||"E"===i){this.unput(2);break}}else{if("."===t){if(e){this.unput(1);break}if("_"===i){this.unput(2);break}e=!0;continue}if("e"===t||"E"===t){if("_"===i){this.unput(1);break}var n=2;if("+"!==(t=this.input())&&"-"!==t||(n=3,t=this.input()),this.is_NUM_START())return this.consume_LNUM(),this.tok.T_DNUMBER;this.unput(t?n:n-1);break}}if(!this.is_NUM()){t&&this.unput(1);break}}return e?this.tok.T_DNUMBER:this.yytext.length<9||this.yytext.length<10||10==this.yytext.length&&this.yytext<"2147483648"?this.tok.T_LNUMBER:this.tok.T_DNUMBER},consume_HNUM:function(){for(;this.offset<this.size;){var t=this.input();if(!this.is_HEX()){t&&this.unput(1);break}}return this.tok.T_LNUMBER},consume_LNUM:function(){for(;this.offset<this.size;){var t=this.input();if(!this.is_NUM()){t&&this.unput(1);break}}return this.tok.T_LNUMBER},consume_BNUM:function(){for(var t;this.offset<this.size;)if("0"!==(t=this.input())&&"1"!==t&&"_"!==t){t&&this.unput(1);break}return this.tok.T_LNUMBER}};k.consume_NUM,k.consume_HNUM,k.consume_LNUM,k.consume_BNUM;var E={matchST_LOOKING_FOR_PROPERTY:function(){var t=this.input();if("-"===t){if(">"===(t=this.input()))return this.tok.T_OBJECT_OPERATOR;t&&this.unput(1)}else{if(this.is_WHITESPACE())return this.tok.T_WHITESPACE;if(this.is_LABEL_START())return this.consume_LABEL(),this.popState(),this.tok.T_STRING}return this.popState(),t&&this.unput(1),!1},matchST_LOOKING_FOR_VARNAME:function(){var t=this.input();if(this.popState(),this.begin("ST_IN_SCRIPTING"),this.is_LABEL_START()){if(this.consume_LABEL(),"["===(t=this.input())||"}"===t)return this.unput(1),this.tok.T_STRING_VARNAME;this.unput(this.yytext.length)}else t&&this.unput(1);return!1},matchST_VAR_OFFSET:function(){var t=this.input();if(this.is_NUM_START())return this.consume_NUM(),this.tok.T_NUM_STRING;if("]"===t)return this.popState(),"]";if("$"===t){if(this.input(),this.is_LABEL_START())return this.consume_LABEL(),this.tok.T_VARIABLE;throw new Error("Unexpected terminal")}if(this.is_LABEL_START())return this.consume_LABEL(),this.tok.T_STRING;if(this.is_WHITESPACE()||"\\"===t||"'"===t||"#"===t)return this.tok.T_ENCAPSED_AND_WHITESPACE;if("["===t||"{"===t||"}"===t||'"'===t||"`"===t||this.is_TOKEN())return t;throw new Error("Unexpected terminal")}};E.matchST_LOOKING_FOR_PROPERTY,E.matchST_LOOKING_FOR_VARNAME,E.matchST_VAR_OFFSET;var m={matchST_IN_SCRIPTING:function(){var t=this.input();switch(t){case" ":case"\t":case"\n":case"\r":case"\r\n":return this.T_WHITESPACE();case"#":return this.version>=800&&"["===this._input[this.offset]?(this.input(),this.attributeListDepth[++this.attributeIndex]=0,this.begin("ST_ATTRIBUTE"),this.tok.T_ATTRIBUTE):this.T_COMMENT();case"/":return"/"===this._input[this.offset]?this.T_COMMENT():"*"===this._input[this.offset]?(this.input(),this.T_DOC_COMMENT()):this.consume_TOKEN();case"'":return this.T_CONSTANT_ENCAPSED_STRING();case'"':return this.ST_DOUBLE_QUOTES();case"`":return this.begin("ST_BACKQUOTE"),"`";case"?":if(!this.aspTagMode&&this.tryMatch(">")){this.input();var e=this._input[this.offset];return"\n"!==e&&"\r"!==e||this.input(),this.conditionStack.length>1&&this.begin("INITIAL"),this.tok.T_CLOSE_TAG}return this.consume_TOKEN();case"%":return this.aspTagMode&&">"===this._input[this.offset]?(this.input(),"\n"!==(t=this._input[this.offset])&&"\r"!==t||this.input(),this.aspTagMode=!1,this.conditionStack.length>1&&this.begin("INITIAL"),this.tok.T_CLOSE_TAG):this.consume_TOKEN();case"{":return this.begin("ST_IN_SCRIPTING"),"{";case"}":return this.conditionStack.length>2&&this.popState(),"}";default:if("."===t){if(t=this.input(),this.is_NUM_START())return this.consume_NUM();t&&this.unput(1)}if(this.is_NUM_START())return this.consume_NUM();if(this.is_LABEL_START())return this.consume_LABEL().T_STRING();if(this.is_TOKEN())return this.consume_TOKEN()}throw new Error('Bad terminal sequence "'+t+'" at line '+this.yylineno+" (offset "+this.offset+")")},T_WHITESPACE:function(){for(;this.offset<this.size;){var t=this.input();if(" "!==t&&"\t"!==t&&"\n"!==t&&"\r"!==t){t&&this.unput(1);break}}return this.tok.T_WHITESPACE}};m.matchST_IN_SCRIPTING,m.T_WHITESPACE;var x=["\n","\r"],y=["\n","\r",";"],v=y.concat(["\t"," ",",","]",")","/","=","!"]),A={T_CONSTANT_ENCAPSED_STRING:function(){for(var t;this.offset<this.size;)if("\\"==(t=this.input()))this.input();else if("'"==t)break;return this.tok.T_CONSTANT_ENCAPSED_STRING},is_HEREDOC:function(){var t=this.offset;if("<"===this._input[this.offset-1]&&"<"===this._input[this.offset]&&"<"===this._input[this.offset+1]){if(this.offset+=3,this.is_TABSPACE())for(;this.offset<this.size&&(this.offset++,this.is_TABSPACE()););var e=this._input[this.offset-1];if("'"===e||'"'===e?this.offset++:e=null,this.is_LABEL_START()){for(var i=this.offset-1;this.offset<this.size&&(this.offset++,this.is_LABEL()););var n=this._input.substring(i,this.offset-1);if((!e||e===this._input[this.offset-1])&&(e&&this.offset++,x.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),"'"===e?this.begin("ST_NOWDOC"):this.begin("ST_HEREDOC"),this.prematch_ENDOFDOC(),this.tok.T_START_HEREDOC}}return this.offset=t,!1},ST_DOUBLE_QUOTES:function(){for(var t;this.offset<this.size;)if("\\"==(t=this.input()))this.input();else{if('"'==t)break;if("$"==t){if("{"==(t=this.input())||this.is_LABEL_START()){this.unput(2);break}t&&this.unput(1)}else if("{"==t){if("$"==(t=this.input())){this.unput(2);break}t&&this.unput(1)}}if('"'==t)return this.tok.T_CONSTANT_ENCAPSED_STRING;var e=1;return"b"!==this.yytext[0]&&"B"!==this.yytext[0]||(e=2),this.yytext.length>2&&this.appendToken(this.tok.T_ENCAPSED_AND_WHITESPACE,this.yytext.length-e),this.unput(this.yytext.length-e),this.begin("ST_DOUBLE_QUOTES"),this.yytext},isDOC_MATCH:function(t,e){var i=this._input[t-2];if(!x.includes(i))return!1;var n=!1,s=!1,r=0,o=this._input[t-1];if(this.version>=703){for(;"\t"===o||" "===o;)" "===o?n=!0:"\t"===o&&(s=!0),o=this._input[t+r],r++;if(t+=r,x.includes(this._input[t-1]))return!1}if(this._input.substring(t-1,t-1+this.heredoc_label.length)===this.heredoc_label.label){var a=this._input[t-1+this.heredoc_label.length];if((this.version>=703?v:y).includes(a)){if(e){if(this.consume(r),n&&s)throw new Error("Parse error: mixing spaces and tabs in ending marker at line "+this.yylineno+" (offset "+this.offset+")")}else this.heredoc_label.indentation=r,this.heredoc_label.indentation_uses_spaces=n,this.heredoc_label.first_encaps_node=!0;return!0}}return!1},prematch_ENDOFDOC:function(){this.heredoc_label.indentation_uses_spaces=!1,this.heredoc_label.indentation=0,this.heredoc_label.first_encaps_node=!0;for(var t=this.offset+1;t<this._input.length;){if(this.isDOC_MATCH(t,!1))return;if(!x.includes(this._input[t-1]))for(;!x.includes(this._input[t++])&&t<this._input.length;);t++}},matchST_NOWDOC:function(){if(this.isDOC_MATCH(this.offset,!0))return this.consume(this.heredoc_label.length),this.popState(),this.tok.T_END_HEREDOC;for(var t=this._input[this.offset-1];this.offset<this.size;)if(x.includes(t)){if(t=this.input(),this.isDOC_MATCH(this.offset,!0))return this.unput(1).popState(),this.appendToken(this.tok.T_END_HEREDOC,this.heredoc_label.length),this.tok.T_ENCAPSED_AND_WHITESPACE}else t=this.input();return this.tok.T_ENCAPSED_AND_WHITESPACE},matchST_HEREDOC:function(){var t=this.input();if(this.isDOC_MATCH(this.offset,!0))return this.consume(this.heredoc_label.length-1),this.popState(),this.tok.T_END_HEREDOC;for(;this.offset<this.size;)if("\\"===t&&(t=this.input(),x.includes(t)||(t=this.input())),x.includes(t)){if(t=this.input(),this.isDOC_MATCH(this.offset,!0))return this.unput(1).popState(),this.appendToken(this.tok.T_END_HEREDOC,this.heredoc_label.length),this.tok.T_ENCAPSED_AND_WHITESPACE}else if("$"===t){if("{"===(t=this.input()))return this.begin("ST_LOOKING_FOR_VARNAME"),this.yytext.length>2?(this.appendToken(this.tok.T_DOLLAR_OPEN_CURLY_BRACES,2),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):this.tok.T_DOLLAR_OPEN_CURLY_BRACES;if(this.is_LABEL_START()){var e=this.offset,i=this.consume_VARIABLE();return this.yytext.length>this.offset-e+2?(this.appendToken(i,this.offset-e+2),this.unput(this.offset-e+2),this.tok.T_ENCAPSED_AND_WHITESPACE):i}}else if("{"===t){if("$"===(t=this.input()))return this.begin("ST_IN_SCRIPTING"),this.yytext.length>2?(this.appendToken(this.tok.T_CURLY_OPEN,1),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):(this.unput(1),this.tok.T_CURLY_OPEN)}else t=this.input();return this.tok.T_ENCAPSED_AND_WHITESPACE},consume_VARIABLE:function(){this.consume_LABEL();var t=this.input();if("["==t)return this.unput(1),this.begin("ST_VAR_OFFSET"),this.tok.T_VARIABLE;if("-"===t){if(">"===this.input())return this.input(),this.is_LABEL_START()&&this.begin("ST_LOOKING_FOR_PROPERTY"),this.unput(3),this.tok.T_VARIABLE;this.unput(2)}else t&&this.unput(1);return this.tok.T_VARIABLE},matchST_BACKQUOTE:function(){var t=this.input();if("$"===t){if("{"===(t=this.input()))return this.begin("ST_LOOKING_FOR_VARNAME"),this.tok.T_DOLLAR_OPEN_CURLY_BRACES;if(this.is_LABEL_START())return this.consume_VARIABLE()}else if("{"===t){if("$"===this._input[this.offset])return this.begin("ST_IN_SCRIPTING"),this.tok.T_CURLY_OPEN}else if("`"===t)return this.popState(),"`";for(;this.offset<this.size;){if("\\"===t)this.input();else{if("`"===t){this.unput(1),this.popState(),this.appendToken("`",1);break}if("$"===t){if("{"===(t=this.input()))return this.begin("ST_LOOKING_FOR_VARNAME"),this.yytext.length>2?(this.appendToken(this.tok.T_DOLLAR_OPEN_CURLY_BRACES,2),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):this.tok.T_DOLLAR_OPEN_CURLY_BRACES;if(this.is_LABEL_START()){var e=this.offset,i=this.consume_VARIABLE();return this.yytext.length>this.offset-e+2?(this.appendToken(i,this.offset-e+2),this.unput(this.offset-e+2),this.tok.T_ENCAPSED_AND_WHITESPACE):i}continue}if("{"===t){if("$"===(t=this.input()))return this.begin("ST_IN_SCRIPTING"),this.yytext.length>2?(this.appendToken(this.tok.T_CURLY_OPEN,1),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):(this.unput(1),this.tok.T_CURLY_OPEN);continue}}t=this.input()}return this.tok.T_ENCAPSED_AND_WHITESPACE},matchST_DOUBLE_QUOTES:function(){var t=this.input();if("$"===t){if("{"===(t=this.input()))return this.begin("ST_LOOKING_FOR_VARNAME"),this.tok.T_DOLLAR_OPEN_CURLY_BRACES;if(this.is_LABEL_START())return this.consume_VARIABLE()}else if("{"===t){if("$"===this._input[this.offset])return this.begin("ST_IN_SCRIPTING"),this.tok.T_CURLY_OPEN}else if('"'===t)return this.popState(),'"';for(;this.offset<this.size;){if("\\"===t)this.input();else{if('"'===t){this.unput(1),this.popState(),this.appendToken('"',1);break}if("$"===t){if("{"===(t=this.input()))return this.begin("ST_LOOKING_FOR_VARNAME"),this.yytext.length>2?(this.appendToken(this.tok.T_DOLLAR_OPEN_CURLY_BRACES,2),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):this.tok.T_DOLLAR_OPEN_CURLY_BRACES;if(this.is_LABEL_START()){var e=this.offset,i=this.consume_VARIABLE();return this.yytext.length>this.offset-e+2?(this.appendToken(i,this.offset-e+2),this.unput(this.offset-e+2),this.tok.T_ENCAPSED_AND_WHITESPACE):i}t&&this.unput(1)}else if("{"===t){if("$"===(t=this.input()))return this.begin("ST_IN_SCRIPTING"),this.yytext.length>2?(this.appendToken(this.tok.T_CURLY_OPEN,1),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):(this.unput(1),this.tok.T_CURLY_OPEN);t&&this.unput(1)}}t=this.input()}return this.tok.T_ENCAPSED_AND_WHITESPACE}};A.T_CONSTANT_ENCAPSED_STRING,A.is_HEREDOC,A.ST_DOUBLE_QUOTES,A.isDOC_MATCH,A.prematch_ENDOFDOC,A.matchST_NOWDOC,A.matchST_HEREDOC,A.consume_VARIABLE,A.matchST_BACKQUOTE,A.matchST_DOUBLE_QUOTES;var g={T_STRING:function(){var t=this.yytext.toLowerCase(),e=this.keywords[t];if("number"!=typeof e)if("yield"===t)this.version>=700&&this.tryMatch(" from")?(this.consume(5),e=this.tok.T_YIELD_FROM):e=this.tok.T_YIELD;else if(e=this.tok.T_STRING,"b"===t||"B"===t){var i=this.input();if('"'===i)return this.ST_DOUBLE_QUOTES();if("'"===i)return this.T_CONSTANT_ENCAPSED_STRING();i&&this.unput(1)}if(this.offset<this.size&&e!==this.tok.T_YIELD_FROM){var n=this.input();if("\\"===n){e="namespace"===t?this.tok.T_NAME_RELATIVE:this.tok.T_NAME_QUALIFIED;do{if("{"===this._input[this.offset]){this.input();break}this.consume_LABEL(),n=this.input()}while("\\"===n)}n&&this.unput(1)}return e},consume_TOKEN:function(){var t=this._input[this.offset-1],e=this.tokenTerminals[t];return e?e.apply(this,[]):this.yytext},tokenTerminals:{$:function(){return this.offset++,this.is_LABEL_START()?(this.offset--,this.consume_LABEL(),this.tok.T_VARIABLE):(this.offset--,"$")},"-":function(){var t=this._input[this.offset];return">"===t?(this.begin("ST_LOOKING_FOR_PROPERTY").input(),this.tok.T_OBJECT_OPERATOR):"-"===t?(this.input(),this.tok.T_DEC):"="===t?(this.input(),this.tok.T_MINUS_EQUAL):"-"},"\\":function(){if(this.offset<this.size){if(this.input(),this.is_LABEL_START()){var t;do{if("{"===this._input[this.offset]){this.input();break}this.consume_LABEL(),t=this.input()}while("\\"===t);return this.unput(1),this.tok.T_NAME_FULLY_QUALIFIED}this.unput(1)}return this.tok.T_NS_SEPARATOR},"/":function(){return"="===this._input[this.offset]?(this.input(),this.tok.T_DIV_EQUAL):"/"},":":function(){return":"===this._input[this.offset]?(this.input(),this.tok.T_DOUBLE_COLON):":"},"(":function(){var t=this.offset;if(this.input(),this.is_TABSPACE()&&this.consume_TABSPACE().input(),this.is_LABEL_START()){var e=this.yytext.length;this.consume_LABEL();var i=this.yytext.substring(e-1).toLowerCase(),n=this.castKeywords[i];if("number"==typeof n&&(this.input(),this.is_TABSPACE()&&this.consume_TABSPACE().input(),")"===this._input[this.offset-1]))return n}return this.unput(this.offset-t),"("},"=":function(){var t=this._input[this.offset];return">"===t?(this.input(),this.tok.T_DOUBLE_ARROW):"="===t?"="===this._input[this.offset+1]?(this.consume(2),this.tok.T_IS_IDENTICAL):(this.input(),this.tok.T_IS_EQUAL):"="},"+":function(){var t=this._input[this.offset];return"+"===t?(this.input(),this.tok.T_INC):"="===t?(this.input(),this.tok.T_PLUS_EQUAL):"+"},"!":function(){return"="===this._input[this.offset]?"="===this._input[this.offset+1]?(this.consume(2),this.tok.T_IS_NOT_IDENTICAL):(this.input(),this.tok.T_IS_NOT_EQUAL):"!"},"?":function(){return this.version>=700&&"?"===this._input[this.offset]?this.version>=704&&"="===this._input[this.offset+1]?(this.consume(2),this.tok.T_COALESCE_EQUAL):(this.input(),this.tok.T_COALESCE):this.version>=800&&"-"===this._input[this.offset]&&">"===this._input[this.offset+1]?(this.consume(2),this.tok.T_NULLSAFE_OBJECT_OPERATOR):"?"},"<":function(){var t=this._input[this.offset];return"<"===t?"="===(t=this._input[this.offset+1])?(this.consume(2),this.tok.T_SL_EQUAL):"<"===t&&this.is_HEREDOC()?this.tok.T_START_HEREDOC:(this.input(),this.tok.T_SL):"="===t?(this.input(),this.version>=700&&">"===this._input[this.offset]?(this.input(),this.tok.T_SPACESHIP):this.tok.T_IS_SMALLER_OR_EQUAL):">"===t?(this.input(),this.tok.T_IS_NOT_EQUAL):"<"},">":function(){var t=this._input[this.offset];return"="===t?(this.input(),this.tok.T_IS_GREATER_OR_EQUAL):">"===t?"="===(t=this._input[this.offset+1])?(this.consume(2),this.tok.T_SR_EQUAL):(this.input(),this.tok.T_SR):">"},"*":function(){var t=this._input[this.offset];return"="===t?(this.input(),this.tok.T_MUL_EQUAL):"*"===t?(this.input(),"="===this._input[this.offset]?(this.input(),this.tok.T_POW_EQUAL):this.tok.T_POW):"*"},".":function(){var t=this._input[this.offset];return"="===t?(this.input(),this.tok.T_CONCAT_EQUAL):"."===t&&"."===this._input[this.offset+1]?(this.consume(2),this.tok.T_ELLIPSIS):"."},"%":function(){return"="===this._input[this.offset]?(this.input(),this.tok.T_MOD_EQUAL):"%"},"&":function(){var t=this._input[this.offset];return"="===t?(this.input(),this.tok.T_AND_EQUAL):"&"===t?(this.input(),this.tok.T_BOOLEAN_AND):"&"},"|":function(){var t=this._input[this.offset];return"="===t?(this.input(),this.tok.T_OR_EQUAL):"|"===t?(this.input(),this.tok.T_BOOLEAN_OR):"|"},"^":function(){return"="===this._input[this.offset]?(this.input(),this.tok.T_XOR_EQUAL):"^"}}};g.T_STRING,g.consume_TOKEN,g.tokenTerminals;var N={is_NUM:function(){var t=this._input.charCodeAt(this.offset-1);return t>47&&t<58||95===t},is_NUM_START:function(){var t=this._input.charCodeAt(this.offset-1);return t>47&&t<58},is_LABEL:function(){var 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(){var 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;){var t=this.input();if(!this.is_LABEL()){t&&this.unput(1);break}}return this},is_TOKEN:function(){var t=this._input[this.offset-1];return-1!==";:,.\\[]()|^&+-/*=%!~$<>?@".indexOf(t)},is_WHITESPACE:function(){var t=this._input[this.offset-1];return" "===t||"\t"===t||"\n"===t||"\r"===t},is_TABSPACE:function(){var t=this._input[this.offset-1];return" "===t||"\t"===t},consume_TABSPACE:function(){for(;this.offset<this.size;){var t=this.input();if(!this.is_TABSPACE()){t&&this.unput(1);break}}return this},is_HEX:function(){var t=this._input.charCodeAt(this.offset-1);return t>47&&t<58||(t>64&&t<71||(t>96&&t<103||95===t))}};N.is_NUM,N.is_NUM_START,N.is_LABEL,N.is_LABEL_START,N.consume_LABEL,N.is_TOKEN,N.is_WHITESPACE,N.is_TABSPACE,N.consume_TABSPACE,N.is_HEX;var L=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=801,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,enum:this.tok.T_ENUM,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,match:this.tok.T_MATCH,readonly:this.tok.T_READ_ONLY},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}};L.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},L.prototype.input=function(){var t=this._input[this.offset];return t?(this.yytext+=t,this.offset++,"\r"===t&&"\n"===this._input[this.offset]&&(this.yytext+="\n",this.offset++),"\n"===t||"\r"===t?(this.yylloc.last_line=++this.yylineno,this.yyprevcol=this.yylloc.last_column,this.yylloc.last_column=0):this.yylloc.last_column++,t):""},L.prototype.unput=function(t){if(1===t)this.offset--,"\n"===this._input[this.offset]&&"\r"===this._input[this.offset-1]&&(this.offset--,t++),"\r"===this._input[this.offset]||"\n"===this._input[this.offset]?(this.yylloc.last_line--,this.yylineno--,this.yylloc.last_column=this.yyprevcol):this.yylloc.last_column--,this.yytext=this.yytext.substring(0,this.yytext.length-t);else if(t>0)if(this.offset-=t,t<this.yytext.length){this.yytext=this.yytext.substring(0,this.yytext.length-t),this.yylloc.last_line=this.yylloc.first_line,this.yylloc.last_column=this.yyprevcol=this.yylloc.first_column;for(var e=0;e<this.yytext.length;e++){var i=this.yytext[e];"\r"===i?(i=this.yytext[++e],this.yyprevcol=this.yylloc.last_column,this.yylloc.last_line++,this.yylloc.last_column=0,"\n"!==i&&("\r"===i?this.yylloc.last_line++:this.yylloc.last_column++)):"\n"===i?(this.yyprevcol=this.yylloc.last_column,this.yylloc.last_line++,this.yylloc.last_column=0):this.yylloc.last_column++}this.yylineno=this.yylloc.last_line}else this.yytext="",this.yylloc.last_line=this.yylineno=this.yylloc.first_line,this.yylloc.last_column=this.yylloc.first_column;return this},L.prototype.tryMatch=function(t){return t===this.ahead(t.length)},L.prototype.tryMatchCaseless=function(t){return t===this.ahead(t.length).toLowerCase()},L.prototype.ahead=function(t){var e=this._input.substring(this.offset,this.offset+t);return"\r"===e[e.length-1]&&"\n"===this._input[this.offset+t+1]&&(e+="\n"),e},L.prototype.consume=function(t){for(var e=0;e<t;e++){var i=this._input[this.offset];if(!i)break;this.yytext+=i,this.offset++,"\r"===i&&"\n"===this._input[this.offset]&&(this.yytext+="\n",this.offset++,e++),"\n"===i||"\r"===i?(this.yylloc.last_line=++this.yylineno,this.yyprevcol=this.yylloc.last_column,this.yylloc.last_column=0):this.yylloc.last_column++}return this},L.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}},L.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},L.prototype.appendToken=function(t,e){return this.tokens.push([t,e]),this},L.prototype.lex=function(){this.yylloc.prev_offset=this.offset,this.yylloc.prev_line=this.yylloc.last_line,this.yylloc.prev_column=this.yylloc.last_column;var t=this.next()||this.lex();if(!this.all_tokens){for(;t===this.tok.T_WHITESPACE||!this.comment_tokens&&(t===this.tok.T_COMMENT||t===this.tok.T_DOC_COMMENT)||t===this.tok.T_OPEN_TAG;)t=this.next()||this.lex();if(t==this.tok.T_OPEN_TAG_WITH_ECHO)return this.tok.T_ECHO;if(t===this.tok.T_CLOSE_TAG)return";"}return this.yylloc.prev_offset||(this.yylloc.prev_offset=this.yylloc.first_offset,this.yylloc.prev_line=this.yylloc.first_line,this.yylloc.prev_column=this.yylloc.first_column),t},L.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},L.prototype.popState=function(){var t=this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0];if(this.curCondition=this.conditionStack[this.conditionStack.length-1],this.stateCb=this["match"+this.curCondition],"function"!=typeof this.stateCb)throw new Error('Undefined condition state "'+this.curCondition+'"');return t},L.prototype.next=function(){var t;if(this._input||(this.done=!0),this.yylloc.first_offset=this.offset,this.yylloc.first_line=this.yylloc.last_line,this.yylloc.first_column=this.yylloc.last_column,this.yytext="",this.done)return this.yylloc.prev_offset=this.yylloc.first_offset,this.yylloc.prev_line=this.yylloc.first_line,this.yylloc.prev_column=this.yylloc.first_column,this.EOF;if(this.tokens.length>0?("object"===a((t=this.tokens.shift())[1])?this.setState(t[1]):this.consume(t[1]),t=t[0]):t=this.stateCb.apply(this,[]),this.offset>=this.size&&0===this.tokens.length&&(this.done=!0),this.debug){var e=t;e="number"==typeof e?this.engine.tokens.values[e]:'"'+e+'"';var i=new Error(e+"\tfrom "+this.yylloc.first_line+","+this.yylloc.first_column+"\t - to "+this.yylloc.last_line+","+this.yylloc.last_column+'\t"'+this.yytext+'"');console.error(i.stack)}return t},[p,f,T,k,E,m,A,g,N].forEach((function(t){for(var e in t)L.prototype[e]=t[e]}));var C=L,b=function(t,e,i){this.line=t,this.column=e,this.offset=i},S={read_array:function(){var t=null,e=!1,i=this.node("array");this.token===this.tok.T_ARRAY?(this.next().expect("("),t=")"):(e=!0,t="]");var n=[];return this.next().token!==t&&(n=this.read_array_pair_list(e)),this.expect(t),this.next(),i(e,n)},read_array_pair_list:function(t){var 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)){if(","===this.token)return this.node("noop")();var e=this.node("entry"),i=null,n=null,s=!1,r=!1;if("&"===this.token)this.next(),s=!0,n=this.read_variable(!0,!1);else if(this.token===this.tok.T_ELLIPSIS&&this.version>=704)this.next(),"&"===this.token&&this.error(),r=!0,n=this.read_expr();else{var o=this.read_expr();this.token===this.tok.T_DOUBLE_ARROW?(this.next(),i=o,"&"===this.token?(this.next(),s=!0,n=this.read_variable(!0,!1)):n=this.read_expr()):n=o}return e(i,n,s,r)}}};S.read_array,S.read_array_pair_list,S.read_array_pair;var I={read_class_declaration_statement:function(t){var e=this.node("class"),i=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);var n=this.node("identifier"),s=this.text();this.next(),n=n(s);var r=this.read_extends_from(),o=this.read_implements_list();this.expect("{");var a=e(n,r,o,this.next().read_class_body(!0,!1),i);return t&&(a.attrGroups=t),a},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(t,e){for(var i=[],n=[];this.token!==this.EOF&&"}"!==this.token;)if(this.token!==this.tok.T_COMMENT)if(this.token!==this.tok.T_DOC_COMMENT)if(this.token!==this.tok.T_USE)if(e&&this.token===this.tok.T_CASE){var s=this.read_enum_case();this.expect(";")&&this.next(),i=i.concat(s)}else{this.token===this.tok.T_ATTRIBUTE&&(n=this.read_attr_list());var r=this.position(),o=this.read_member_flags(!1);if(this.token!==this.tok.T_CONST)if(t&&this.token===this.tok.T_VAR&&(this.next().expect(this.tok.T_VARIABLE),o[0]=null,o[1]=0),this.token===this.tok.T_FUNCTION)i.push(this.read_function(!1,o,n,r)),n=[];else if(t&&(this.token===this.tok.T_VARIABLE||this.version>=801&&this.token===this.tok.T_READ_ONLY||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))){var a=this.read_variable_list(o,n);n=[],this.expect(";"),this.next(),i=i.concat(a)}else this.error([this.tok.T_CONST].concat(c(t?[this.tok.T_VARIABLE]:[]),c(e?[this.tok.T_CASE]:[]),[this.tok.T_FUNCTION])),this.next();else{var h=this.read_constant_list(o,n);this.expect(";")&&this.next(),i=i.concat(h)}}else i=i.concat(this.read_trait_use_statement());else i.push(this.read_doc_comment());else i.push(this.read_comment());return this.expect("}"),this.next(),i},read_variable_list:function(t,e){var i=this.node("propertystatement"),n=this.read_list((function(){var t=this.node("property"),i=!1;this.token===this.tok.T_READ_ONLY&&(i=!0,this.next());var n=l(this.read_optional_type(),2),s=n[0],r=n[1];this.expect(this.tok.T_VARIABLE);var o=this.node("identifier"),a=this.text().substring(1);return this.next(),o=o(a),";"===this.token||","===this.token?t(o,null,i,s,r,e||[]):"="===this.token?t(o,this.next().read_expr(),i,s,r,e||[]):(this.expect([",",";","="]),t(o,null,s,r,e||[]))}),",");return i(null,n,t)},read_constant_list:function(t,e){this.expect(this.tok.T_CONST)&&this.next();var i=this.node("classconstant"),n=this.read_list((function(){var t=this.node("constant"),e=null,i=null;if(this.token===this.tok.T_STRING||this.version>=700&&this.is("IDENTIFIER")){e=this.node("identifier");var n=this.text();this.next(),e=e(n)}else this.expect("IDENTIFIER");return this.expect("=")&&(i=this.next().read_expr()),t(e,i)}),",");return i(null,n,t,e||[])},read_member_flags:function(t){var e=[-1,-1,-1];if(this.is("T_MEMBER_FLAGS")){var i=0,n=0;do{switch(this.token){case this.tok.T_PUBLIC:i=0,n=0;break;case this.tok.T_PROTECTED:i=0,n=1;break;case this.tok.T_PRIVATE:i=0,n=2;break;case this.tok.T_STATIC:i=1,n=1;break;case this.tok.T_ABSTRACT:i=2,n=1;break;case this.tok.T_FINAL:i=2,n=2}t&&(0==i&&2==n?(this.expect([this.tok.T_PUBLIC,this.tok.T_PROTECTED]),n=-1):2==i&&1==n&&(this.error(),n=-1)),-1!==e[i]?this.error():-1!==n&&(e[i]=n)}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(){var t=!1;"?"===this.token&&(t=!0,this.next());var e=this.read_types();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();var i=this.read_type();if(!i){this.raiseError("Expecting a type definition");break}e.push(i)}while("|"===this.token)}return[t,e]},read_interface_declaration_statement:function(t){var e=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);var i=this.node("identifier"),n=this.text();this.next(),i=i(n);var s=this.read_interface_extends_list();return this.expect("{"),e(i,s,this.next().read_interface_body(),t||[])},read_interface_body:function(){for(var t=[],e=[];this.token!==this.EOF&&"}"!==this.token;)if(this.token!==this.tok.T_COMMENT)if(this.token!==this.tok.T_DOC_COMMENT){var i=this.position();e=this.read_attr_list();var n=this.read_member_flags(!0);if(this.token==this.tok.T_CONST){var s=this.read_constant_list(n,e);this.expect(";")&&this.next(),t=t.concat(s),e=[]}else if(this.token===this.tok.T_FUNCTION){var r=this.read_function_declaration(2,n,e,i);r.parseFlags(n),t.push(r),this.expect(";")&&this.next(),e=[]}else this.error([this.tok.T_CONST,this.tok.T_FUNCTION]),this.next()}else t.push(this.read_doc_comment());else t.push(this.read_comment());return this.expect("}")&&this.next(),t},read_trait_declaration_statement:function(){var 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);var e=this.node("identifier"),i=this.text();return this.next(),e=e(i),this.expect("{"),t(e,this.next().read_class_body(!0,!1))},read_trait_use_statement:function(){var t=this.node("traituse");this.expect(this.tok.T_USE)&&this.next();for(var e=[this.read_namespace_name()],i=null;","===this.token;)e.push(this.next().read_namespace_name());if("{"===this.token){for(i=[];this.next().token!==this.EOF&&"}"!==this.token;)i.push(this.read_trait_use_alias()),this.expect(";");this.expect("}")&&this.next()}else this.expect(";")&&this.next();return t(e,i)},read_trait_use_alias:function(){var t,e=this.node(),i=null;if(this.is("IDENTIFIER")){t=this.node("identifier");var n=this.text();this.next(),t=t(n)}else if(t=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")){i=t,t=this.node("identifier");var s=this.text();this.next(),t=t(s)}else this.expect(this.tok.T_STRING);else t=t.name;if(this.token===this.tok.T_INSTEADOF)return e("traitprecedence",i,t,this.next().read_name_list());if(this.token===this.tok.T_AS){var r=null,o=null;if(this.next().is("T_MEMBER_FLAGS")&&(r=this.read_member_flags()),this.token===this.tok.T_STRING||this.version>=700&&this.is("IDENTIFIER")){o=this.node("identifier");var a=this.text();this.next(),o=o(a)}else!1===r&&this.expect(this.tok.T_STRING);return e("traitalias",i,t,o,r)}return this.expect([this.tok.T_AS,this.tok.T_INSTEADOF]),e("traitalias",i,t,null,null)}};I.read_class_declaration_statement,I.read_class_modifiers,I.read_class_modifier,I.read_class_body,I.read_variable_list,I.read_constant_list,I.read_member_flags,I.read_optional_type,I.read_interface_declaration_statement,I.read_interface_body,I.read_trait_declaration_statement,I.read_trait_use_statement,I.read_trait_use_alias;var O={read_comment:function(){var t=this.text(),e=this.ast.prepare("/*"===t.substring(0,2)?"commentblock":"commentline",null,this),i=this.lexer.yylloc.first_offset,n=this.prev;return this.prev=[this.lexer.yylloc.last_line,this.lexer.yylloc.last_column,this.lexer.offset],this.lex(),(e=e(t)).offset=i,this.prev=n,e},read_doc_comment:function(){var t=this.ast.prepare("commentblock",null,this),e=this.lexer.yylloc.first_offset,i=this.text(),n=this.prev;return this.prev=[this.lexer.yylloc.last_line,this.lexer.yylloc.last_column,this.lexer.offset],this.lex(),(t=t(i)).offset=e,this.prev=n,t}};O.read_comment,O.read_doc_comment;var R={read_expr:function(t){var 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){var i=null;return":"!==this.next().token&&(i=this.read_expr()),this.expect(":")&&this.next(),e("retif",t,i,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(){var t=null;switch(this.token){case this.tok.T_ISSET:t=this.node("isset"),this.next().expect("(")&&this.next();var 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();var i=this.read_expr();this.expect(")")&&this.next(),t=t(i);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();var n=this.read_expr();this.expect(")")&&this.next(),t=t(n);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(){var t=null;return"("===this.token&&(this.next(),t=this.read_optional_expr(")"),this.expect(")")&&this.next()),t},read_expr_item:function(){var t,e,i=[];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()).parenthesizedExpression=!0,this.expect(")")&&this.next(),this.handleDereferencable(e);if("`"===this.token)return this.read_encapsed_string("`");if(this.token===this.tok.T_LIST){var n=null,s=this.innerList;t=this.node("list"),s||(n=this.node("assign")),this.next().expect("(")&&this.next(),this.innerList||(this.innerList=!0);var r=this.read_array_pair_list(!1);this.expect(")")&&this.next();for(var o=!1,a=0;a<r.length;a++)if(null!==r[a]&&"noop"!==r[a].kind){o=!0;break}return o||this.raiseError("Fatal Error : Cannot use empty list on line "+this.lexer.yylloc.first_line),s?t(r,!1):(this.innerList=!1,this.expect("=")?n(t(r,!1),this.next().read_expr(),"="):t(r,!1))}if(this.token===this.tok.T_ATTRIBUTE&&(i=this.read_attr_list()),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_MATCH:return this.read_match_expression();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_THROW:return this.version<800&&this.raiseError("PHP 8+ is required to use throw as an expression"),this.node("throw")(this.next().read_expr());case this.tok.T_EXIT:var h="die"===this.lexer.yytext.toLowerCase();return t=this.node("exit"),this.next(),t(this.read_exit_expr(),h);case this.tok.T_PRINT:return this.node("print")(this.next().read_expr());case this.tok.T_YIELD:var l=null,c=null;return t=this.node("yield"),this.next().is("EXPR")&&(l=this.read_expr(),this.token===this.tok.T_DOUBLE_ARROW&&(c=l,l=this.next().read_expr())),t(l,c);case this.tok.T_YIELD_FROM:return(t=this.node("yieldfrom"))(e=this.next().read_expr());case this.tok.T_FN:case this.tok.T_FUNCTION:return this.read_inline_function(void 0,i);case this.tok.T_STATIC:var u=[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],i);this.lexer.tokens.push(u),this.next()}if(this.is("VARIABLE")){t=this.node();var _="identifier"===(e=this.read_variable(!1,!1)).kind||"staticlookup"===e.kind&&"identifier"===e.offset.kind;switch(this.token){case"=":return _&&this.error("VARIABLE"),"&"==this.next().token?this.read_assignref(t,e):t("assign",e,this.read_expr(),"=");case this.tok.T_PLUS_EQUAL:return _&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"+=");case this.tok.T_MINUS_EQUAL:return _&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"-=");case this.tok.T_MUL_EQUAL:return _&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"*=");case this.tok.T_POW_EQUAL:return _&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"**=");case this.tok.T_DIV_EQUAL:return _&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"/=");case this.tok.T_CONCAT_EQUAL:return _&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),".=");case this.tok.T_MOD_EQUAL:return _&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"%=");case this.tok.T_AND_EQUAL:return _&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"&=");case this.tok.T_OR_EQUAL:return _&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"|=");case this.tok.T_XOR_EQUAL:return _&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"^=");case this.tok.T_SL_EQUAL:return _&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"<<=");case this.tok.T_SR_EQUAL:return _&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),">>=");case this.tok.T_COALESCE_EQUAL:return _&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"??=");case this.tok.T_INC:return _&&this.error("VARIABLE"),this.next(),t("post","+",e);case this.tok.T_DEC:return _&&this.error("VARIABLE"),this.next(),t("post","-",e);default:t.destroy(e)}}else{if(this.is("SCALAR")){if(t=this.node(),"array"===(e=this.read_scalar()).kind&&e.shortForm&&"="===this.token){var d=this.convertToList(e);return e.loc&&(d.loc=e.loc),t("assign",d,this.next().read_expr(),"=")}return t.destroy(e),this.handleDereferencable(e)}this.error("EXPR"),this.next()}return e},convertToList:function(t){var e=this,i=t.items.map((function(t){return t.value&&"array"===t.value.kind&&t.value.shortForm&&(t.value=e.convertToList(t.value)),t})),n=this.node("list")(i,!0);return t.loc&&(n.loc=t.loc),t.leadingComments&&(n.leadingComments=t.leadingComments),t.trailingComments&&(n.trailingComments=t.trailingComments),n},read_assignref:function(t,e){var i;return this.next(),this.token===this.tok.T_NEW?(this.version>=700&&this.error(),i=this.read_new_expr()):i=this.read_variable(!1,!1),t("assignref",e,i)},read_inline_function:function(t,e){if(this.token===this.tok.T_FUNCTION){var i=this.read_function(!0,t,e);return i.attrGroups=e,i}!this.version>=704&&this.raiseError("Arrow Functions are not allowed");var n=this.node("arrowfunc");this.expect(this.tok.T_FN)&&this.next();var s=this.is_reference();this.expect("(")&&this.next();var r=this.read_parameter_list();this.expect(")")&&this.next();var o=!1,a=null;":"===this.token&&("?"===this.next().token&&(o=!0,this.next()),a=this.read_types()),this.expect(this.tok.T_DOUBLE_ARROW)&&this.next();var h=n(r,s,this.read_expr(),a,o,!!t);return h.attrGroups=e,h},read_match_expression:function(){var t=this.node("match");this.expect(this.tok.T_MATCH)&&this.next(),this.version<800&&this.raiseError("Match statements are not allowed before PHP 8");var e,i;return this.expect("(")&&this.next(),e=this.read_expr(),this.expect(")")&&this.next(),this.expect("{")&&this.next(),i=this.read_match_arms(),this.expect("}")&&this.next(),t(e,i)},read_match_arms:function(){var t=this;return this.read_list((function(){return t.read_match_arm()}),",",!0)},read_match_arm:function(){if("}"!==this.token)return this.node("matcharm")(this.read_match_arm_conds(),this.read_expr())},read_match_arm_conds:function(){var t=[];if(this.token===this.tok.T_DEFAULT)t=null,this.next();else for(t.push(this.read_expr());","===this.token;){if(this.next(),this.token===this.tok.T_DOUBLE_ARROW)return this.next(),t;t.push(this.read_expr())}return this.expect(this.tok.T_DOUBLE_ARROW)&&this.next(),t},read_attribute:function(){var t=this.text(),e=[];return this.next(),"("===this.token&&(e=this.read_argument_list()),this.node("attribute")(t,e)},read_attr_list:function(){var t=[];if(this.token===this.tok.T_ATTRIBUTE)do{var e=this.node("attrgroup")([]);for(this.next(),e.attrs.push(this.read_attribute());","===this.token;)this.next(),"]"!==this.token&&e.attrs.push(this.read_attribute());t.push(e),this.expect("]"),this.next()}while(this.token===this.tok.T_ATTRIBUTE);return t},read_new_expr:function(){var t=this.node("new");this.expect(this.tok.T_NEW)&&this.next();var e=[],i=this.read_attr_list();if(this.token===this.tok.T_CLASS){var n=this.node("class");"("===this.next().token&&(e=this.read_argument_list());var s=this.read_extends_from(),r=this.read_implements_list(),o=null;this.expect("{")&&(o=this.next().read_class_body(!0,!1));var a=n(null,s,r,o,[0,0,0]);return a.attrGroups=i,t(a,e)}for(var h=this.read_new_class_name();"["===this.token;){var l=this.node("offsetlookup"),c=this.next().read_encaps_var_offset();this.expect("]")&&this.next(),h=l(h,c)}return"("===this.token&&(e=this.read_argument_list()),t(h,e)},read_new_class_name:function(){if(this.token===this.tok.T_NS_SEPARATOR||this.token===this.tok.T_NAME_RELATIVE||this.token===this.tok.T_NAME_QUALIFIED||this.token===this.tok.T_NAME_FULLY_QUALIFIED||this.token===this.tok.T_STRING||this.token===this.tok.T_NAMESPACE){var 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}};R.read_expr,R.read_expr_cast,R.read_isset_variable,R.read_isset_variables,R.read_internal_functions_in_yacc,R.read_optional_expr,R.read_exit_expr,R.read_expr_item,R.convertToList,R.read_assignref,R.read_inline_function,R.read_match_expression,R.read_match_arms,R.read_match_arm,R.read_match_arm_conds,R.read_attribute,R.read_attr_list,R.read_new_expr,R.read_new_class_name,R.handleDereferencable;var w={read_enum_declaration_statement:function(t){var e=this.node("enum");if(!this.expect(this.tok.T_ENUM))return null;this.next().expect(this.tok.T_STRING);var i=this.node("identifier"),n=this.text();this.next(),i=i(n);var s=this.read_enum_value_type(),r=this.read_implements_list();this.expect("{");var o=e(i,s,r,this.next().read_class_body(!1,!0));return t&&(o.attrGroups=t),o},read_enum_value_type:function(){return":"===this.token?this.next().read_namespace_name():null},read_enum_case:function(){this.expect(this.tok.T_CASE);var t=this.node("enumcase"),e=this.node("identifier"),i=this.next().text();this.next(),e=e(i);var n="="===this.token?this.next().read_expr():null;return this.expect(";"),t(e,n)}};w.read_enum_declaration_statement,w.read_enum_value_type,w.read_enum_case;var D={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,i,n){var s=this.read_function_declaration(t?1:e?2:0,e&&1===e[1],i||[],n);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,i,n){var s=this,r="function";1===t?r="closure":2===t&&(r="method");var o=this.node(r);this.expect(this.tok.T_FUNCTION)&&this.next();var a=this.is_reference(),h=!1,l=[],c=null,u=!1;if(1!==t){var _=this.node("identifier");2===t?this.version>=700?this.token===this.tok.T_STRING||this.is("IDENTIFIER")?(h=this.text(),this.next()):this.version<704&&this.error("IDENTIFIER"):this.token===this.tok.T_STRING?(h=this.text(),this.next()):this.error("IDENTIFIER"):this.version>=700?this.token===this.tok.T_STRING?(h=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)&&(h=this.text()),this.next()),h=_(h)}this.expect("(")&&this.next();var d=this.read_parameter_list("__construct"===h.name);this.expect(")")&&this.next(),1===t&&(l=this.read_lexical_vars()),":"===this.token&&("?"===this.next().token&&(u=!0,this.next()),c=this.read_types());var p=function(t){return t.attrGroups=i||[],n&&t.loc&&(t.loc.start=n,t.loc.source&&(t.loc.source=s.lexer._input.substr(t.loc.start.offset,t.loc.end.offset-t.loc.start.offset))),t};return p(1===t?o(d,a,l,c,u,e):o(h,d,a,c,u))},read_lexical_vars:function(){var 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_list_with_dangling_comma:function(t){for(var e=[];this.token!=this.EOF;){if(e.push(t()),","!=this.token){if(")"==this.token)break;this.error([",",")"]);break}if(this.next(),this.version>=800&&")"===this.token)return e}return e},read_lexical_var_list:function(){return this.read_list_with_dangling_comma(this.read_lexical_var.bind(this))},read_lexical_var:function(){if("&"===this.token)return this.read_byref(this.read_lexical_var.bind(this));var t=this.node("variable");this.expect(this.tok.T_VARIABLE);var e=this.text().substring(1);return this.next(),t(e,!1)},read_parameter_list:function(t){return")"!=this.token?this.read_list_with_dangling_comma(this.read_parameter.bind(this,t)):[]},read_parameter:function(t){var e,i=this.node("parameter"),n=null,s=null,r=!1,o=!1,a=[];this.token===this.tok.T_ATTRIBUTE&&(a=this.read_attr_list());var h=this.read_promoted();this.version>=801&&this.token===this.tok.T_READ_ONLY&&(t?(this.next(),o=!0):this.raiseError("readonly properties can be used only on class constructor")),"?"===this.token&&(this.next(),r=!0),e=this.read_types(),r&&!e&&this.raiseError("Expecting a type definition combined with nullable operator");var l=this.is_reference(),c=this.is_variadic();if(this.expect(this.tok.T_VARIABLE)){n=this.node("identifier");var u=this.text().substring(1);this.next(),n=n(u)}"="==this.token&&(s=this.next().read_expr());var _=i(n,e,s,l,c,o,r,h);return a&&(_.attrGroups=a),_},read_types:function(){var t="unset",e="union",i="intersection",n=[],s=t,r=this.read_type();if(!r)return null;for(n.push(r);"|"===this.token||this.version>=801&&"&"===this.token;){var o=this.peek();if(o===this.tok.T_ELLIPSIS||o===this.tok.T_VARIABLE)break;s===t?s="|"===this.token?e:i:(s===e&&"|"!==this.token||s===i&&"&"!==this.token)&&this.raiseError('Unexpect token "'+this.token+'", "|" and "&" can not be mixed'),this.next(),n.push(this.read_type())}return 1===n.length?n[0]:s===i?this.node("intersectiontype")(n):this.node("uniontype")(n)},read_promoted:function(){return this.token===this.tok.T_PUBLIC?(this.next(),1):this.token===this.tok.T_PROTECTED?(this.next(),2):this.token===this.tok.T_PRIVATE?(this.next(),4):0},read_argument_list:function(){var t=[];return this.expect("(")&&this.next(),this.version>=801&&this.token===this.tok.T_ELLIPSIS&&")"===this.peek()?(t.push(this.node("variadicplaceholder")()),this.next()):")"!==this.token&&(t=this.read_non_empty_argument_list()),this.expect(")")&&this.next(),t},read_non_empty_argument_list:function(){var t=!1;return this.read_function_list(function(){var 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(){if(this.token===this.tok.T_ELLIPSIS)return this.node("variadic")(this.next().read_expr());if((this.token===this.tok.T_STRING||Object.values(this.lexer.keywords).includes(this.token))&&":"===this.peek())return this.version<800&&this.raiseError("PHP 8+ is required to use named arguments"),this.node("namedargument")(this.text(),this.next().next().read_expr());return this.read_expr()},read_type:function(){var t=this.node();if(this.token===this.tok.T_ARRAY||this.token===this.tok.T_CALLABLE){var e=this.text();return this.next(),t("typereference",e.toLowerCase(),e)}if(this.token===this.tok.T_NAME_RELATIVE||this.token===this.tok.T_NAME_QUALIFIED||this.token===this.tok.T_NAME_FULLY_QUALIFIED||this.token===this.tok.T_STRING||this.token===this.tok.T_STATIC){var i=this.text(),n=[this.token,this.lexer.getState()];return this.next(),this.token!==this.tok.T_NS_SEPARATOR&&this.ast.typereference.types.indexOf(i.toLowerCase())>-1?t("typereference",i.toLowerCase(),i):(this.lexer.tokens.push(n),this.next(),t.destroy(),this.read_namespace_name())}return t.destroy(),null}};D.is_reference,D.is_variadic,D.read_function,D.read_function_declaration,D.read_lexical_vars,D.read_list_with_dangling_comma,D.read_lexical_var_list,D.read_lexical_var,D.read_parameter_list,D.read_parameter,D.read_types,D.read_promoted,D.read_argument_list,D.read_non_empty_argument_list,D.read_argument,D.read_type;var P={read_if:function(){var t=this.node("if"),e=this.next().read_if_expr(),i=null,n=null,s=!1;if(":"===this.token){s=!0,this.next(),i=this.node("block");for(var r=[];this.token!==this.EOF&&this.token!==this.tok.T_ENDIF;){if(this.token===this.tok.T_ELSEIF){n=this.read_elseif_short();break}if(this.token===this.tok.T_ELSE){n=this.read_else_short();break}r.push(this.read_inner_statement())}i=i(null,r),this.expect(this.tok.T_ENDIF)&&this.next(),this.expectEndOfStatement()}else i=this.read_statement(),this.token===this.tok.T_ELSEIF?n=this.read_if():this.token===this.tok.T_ELSE&&(n=this.next().read_statement());return t(e,i,n,s)},read_if_expr:function(){this.expect("(")&&this.next();var t=this.read_expr();return this.expect(")")&&this.next(),t},read_elseif_short:function(){var t=null,e=this.node("if"),i=this.next().read_if_expr();this.expect(":")&&this.next();for(var n=this.node("block"),s=[];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}s.push(this.read_inner_statement())}return e(i,n(null,s),t,!0)},read_else_short:function(){this.next().expect(":")&&this.next();for(var t=this.node("block"),e=[];this.token!=this.EOF&&this.token!==this.tok.T_ENDIF;)e.push(this.read_inner_statement());return t(null,e)}};P.read_if,P.read_if_expr,P.read_elseif_short,P.read_else_short;var U={read_while:function(){var t=this.node("while");this.expect(this.tok.T_WHILE)&&this.next();var e,i=null,n=!1;return this.expect("(")&&this.next(),e=this.read_expr(),this.expect(")")&&this.next(),":"===this.token?(n=!0,i=this.read_short_form(this.tok.T_ENDWHILE)):i=this.read_statement(),t(e,i,n)},read_do:function(){var t=this.node("do");this.expect(this.tok.T_DO)&&this.next();var e,i=null;return e=this.read_statement(),this.expect(this.tok.T_WHILE)&&(this.next().expect("(")&&this.next(),i=this.read_expr(),this.expect(")")&&this.next(),this.expect(";")&&this.next()),t(i,e)},read_for:function(){var t=this.node("for");this.expect(this.tok.T_FOR)&&this.next();var e=[],i=[],n=[],s=null,r=!1;return this.expect("(")&&this.next(),";"!==this.token?(e=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?(n=this.read_list(this.read_expr,","),this.expect(")")&&this.next()):this.next(),":"===this.token?(r=!0,s=this.read_short_form(this.tok.T_ENDFOR)):s=this.read_statement(),t(e,i,n,s,r)},read_foreach:function(){var t=this.node("foreach");this.expect(this.tok.T_FOREACH)&&this.next();var e,i=null,n=null,s=null,r=!1;return this.expect("(")&&this.next(),e=this.read_expr(),this.expect(this.tok.T_AS)&&(this.next(),n=this.read_foreach_variable(),this.token===this.tok.T_DOUBLE_ARROW&&(i=n,n=this.next().read_foreach_variable())),i&&"list"===i.kind&&this.raiseError("Fatal Error : Cannot use list as key element"),this.expect(")")&&this.next(),":"===this.token?(r=!0,s=this.read_short_form(this.tok.T_ENDFOREACH)):s=this.read_statement(),t(e,i,n,s,r)},read_foreach_variable:function(){if(this.token===this.tok.T_LIST||"["===this.token){var t="["===this.token,e=this.node("list");this.next(),!t&&this.expect("(")&&this.next();var i=this.read_array_pair_list(t);return this.expect(t?"]":")")&&this.next(),e(i,t)}return this.read_variable(!1,!1)}};U.read_while,U.read_do,U.read_for,U.read_foreach,U.read_foreach_variable;var M={read_start:function(){return this.token==this.tok.T_NAMESPACE?this.read_namespace():this.read_top_statement()}};M.read_start;var F={read_namespace:function(){var t,e,i=this.node("namespace");return this.expect(this.tok.T_NAMESPACE)&&this.next(),e="{"===this.token?{name:[""]}:this.read_namespace_name(),this.currentNamespace=e,";"===this.token?(this.currentNamespace=e,t=this.next().read_top_statements(),this.expect(this.EOF),i(e.name,t,!1)):"{"===this.token?(this.currentNamespace=e,t=this.next().read_top_statements(),this.expect("}")&&this.next(),0===t.length&&this.extractDoc&&this._docs.length>this._docIndex&&t.push(this.node("noop")()),i(e.name,t,!0)):(this.error(["{",";"]),this.currentNamespace=e,t=this.read_top_statements(),this.expect(this.EOF),i(e,t,!1))},read_namespace_name:function(t){var e,i=this.node(),n=this.text();switch(this.token){case this.tok.T_NAME_RELATIVE:e=this.ast.name.RELATIVE_NAME,n=n.replace(/^namespace\\/,"");break;case this.tok.T_NAME_QUALIFIED:e=this.ast.name.QUALIFIED_NAME;break;case this.tok.T_NAME_FULLY_QUALIFIED:e=this.ast.name.FULL_QUALIFIED_NAME;break;default:if(e=this.ast.name.UNQUALIFIED_NAME,!this.expect(this.tok.T_STRING))return i("name","",this.ast.name.FULL_QUALIFIED_NAME)}if(this.next(),t||"("!==this.token){if("parent"===n.toLowerCase())return i("parentreference",n);if("self"===n.toLowerCase())return i("selfreference",n)}return i("name",n,e)},read_use_statement:function(){var t=this.node("usegroup"),e=[],i=null;this.expect(this.tok.T_USE)&&this.next();var n=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&&(i=e[0].name,e=this.next().read_use_declarations(null===n),this.expect("}")&&this.next()),t=t(i,n,e),this.expect(";")&&this.next(),t},read_class_name_reference:function(){return this.read_variable(!0,!1)},read_use_declaration:function(t){var e=this.node("useitem"),i=null;t&&(i=this.read_use_type());var n=this.read_namespace_name(),s=this.read_use_alias();return e(n.name,s,i)},read_use_declarations:function(t){for(var e=[this.read_use_declaration(t)];","===this.token;){if(this.next(),t){if(this.token!==this.tok.T_NAME_RELATIVE&&this.token!==this.tok.T_NAME_QUALIFIED&&this.token!==this.tok.T_NAME_FULLY_QUALIFIED&&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_NAME_RELATIVE&&this.token!==this.tok.T_NAME_QUALIFIED&&this.token!==this.tok.T_NAME_FULLY_QUALIFIED&&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(){var t=null;if(this.token===this.tok.T_AS&&this.next().expect(this.tok.T_STRING)){var e=this.node("identifier"),i=this.text();this.next(),t=e(i)}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}};F.read_namespace,F.read_namespace_name,F.read_use_statement,F.read_class_name_reference,F.read_use_declaration,F.read_use_declarations,F.read_use_alias,F.read_use_type;var B={"\\":"\\",$:"$",n:"\n",r:"\r",t:"\t",f:String.fromCharCode(12),v:String.fromCharCode(11),e:String.fromCharCode(27)},H={resolve_special_chars:function(t,e){return e?t.replace(/\\"/,'"').replace(/\\([\\$nrtfve]|[xX][0-9a-fA-F]{1,2}|[0-7]{1,3}|u{([0-9a-fA-F]+)})/g,(function(t,e,i){return B[e]?B[e]:"x"===e[0]||"X"===e[0]?String.fromCodePoint(parseInt(e.substr(1),16)):"u"===e[0]?String.fromCodePoint(parseInt(i,16)):String.fromCodePoint(parseInt(e,8))})):t.replace(/\\\\/g,"\\").replace(/\\'/g,"'")},remove_heredoc_leading_whitespace_chars:function(t,e,i,n){if(0===e)return t;this.check_heredoc_indentation_level(t,e,i,n);var s=i?" ":"\t",r=new RegExp("\\n".concat(s,"{").concat(e,"}"),"g"),o=new RegExp("^".concat(s,"{").concat(e,"}"));return n&&(t=t.replace(o,"")),t.replace(r,"\n")},check_heredoc_indentation_level:function(t,e,i,n){var s=t.length,r=0,o=0,a=!0,h=i?" ":"\t",l=!1;if(!n){if(-1===(r=t.indexOf("\n")))return;r++}for(;r<s;)a?t[r]===h?o++:l=!0:a=!1,"\n"!==t[r]&&l&&o<e?this.raiseError("Invalid body indentation level (expecting an indentation at least ".concat(e,")")):l=!1,"\n"===t[r]&&(a=!0,o=0),r++},read_dereferencable_scalar:function(){var t=null;switch(this.token){case this.tok.T_CONSTANT_ENCAPSED_STRING:var e=this.node("string"),i=this.text(),n=0;"b"!==i[0]&&"B"!==i[0]||(n=1);var s='"'===i[n];this.next(),e=e(s,this.resolve_special_chars(i.substring(n+1,i.length-1),s),1===n,i),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();var t,e;switch(this.token){case this.tok.T_LNUMBER:case this.tok.T_DNUMBER:var i=this.node("number");return t=this.text(),this.next(),i(t,null);case this.tok.T_START_HEREDOC:if("ST_NOWDOC"===this.lexer.curCondition){var n=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));var s=t[t.length-1];"\n"===s?t="\r"===t[t.length-2]?t.substring(0,t.length-2):t.substring(0,t.length-1):"\r"===s&&(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();var r=this.lexer._input.substring(n,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),r,this.lexer.heredoc_label.label),this.lexer.heredoc_label.finished=!0,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:var o=this.error("SCALAR");return this.next(),o}},read_dereferencable:function(t){var e,i,n=this.node("offsetlookup");return"["===this.token?(i=this.next().read_expr(),this.expect("]")&&this.next(),e=n(t,i)):this.token===this.tok.T_DOLLAR_OPEN_CURLY_BRACES&&(e=n(t,i=this.read_encapsed_string_item(!1))),e},read_encapsed_string_item:function(t){var e,i,n,s=this.node("encapsedpart"),r=null,o=!1,a=this.node();if(this.token===this.tok.T_ENCAPSED_AND_WHITESPACE){var h=this.text();this.next(),a=a("string",!1,this.version>=703&&!this.lexer.heredoc_label.finished?this.remove_heredoc_leading_whitespace_chars(this.resolve_special_chars(h,t),this.lexer.heredoc_label.indentation,this.lexer.heredoc_label.indentation_uses_spaces,this.lexer.heredoc_label.first_encaps_node):h,!1,h)}else if(this.token===this.tok.T_DOLLAR_OPEN_CURLY_BRACES){if(r="simple",o=!0,n=null,this.next().token===this.tok.T_STRING_VARNAME){n=this.node("variable");var l=this.text();this.next(),a.destroy(),"["===this.token?(n=n(l,!1),i=this.node("offsetlookup"),e=this.next().read_expr(),this.expect("]")&&this.next(),a=i(n,e)):a=n(l,!1)}else a=a("variable",this.read_expr(),!1);this.expect("}")&&this.next()}else if(this.token===this.tok.T_CURLY_OPEN)r="complex",a.destroy(),a=this.next().read_variable(!1,!1),this.expect("}")&&this.next();else if(this.token===this.tok.T_VARIABLE){if(r="simple",a.destroy(),a=this.read_simple_variable(),"["===this.token&&(i=this.node("offsetlookup"),e=this.next().read_encaps_var_offset(),this.expect("]")&&this.next(),a=i(a,e)),this.token===this.tok.T_OBJECT_OPERATOR){i=this.node("propertylookup"),this.next().expect(this.tok.T_STRING);var c=this.node("identifier");n=this.text(),this.next(),a=i(a,c(n))}}else{this.expect(this.tok.T_ENCAPSED_AND_WHITESPACE);var u=this.text();this.next(),a.destroy(),a=a("string",!1,u,!1,u)}return this.lexer.heredoc_label.first_encaps_node=!1,s(a,r,o)},read_encapsed_string:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.lexer.yylloc.first_offset,n=this.node("encapsed");this.next();var s=this.lexer.yylloc.prev_offset-(e?1:0),r=[],o=null;for(o="`"===t?this.ast.encapsed.TYPE_SHELL:'"'===t?this.ast.encapsed.TYPE_STRING:this.ast.encapsed.TYPE_HEREDOC;this.token!==t&&this.token!==this.EOF;)r.push(this.read_encapsed_string_item(!0));if(r.length>0&&"encapsedpart"===r[r.length-1].kind&&"string"===r[r.length-1].expression.kind){var a=r[r.length-1].expression,h=a.value[a.value.length-1];"\n"===h?"\r"===a.value[a.value.length-2]?a.value=a.value.substring(0,a.value.length-2):a.value=a.value.substring(0,a.value.length-1):"\r"===h&&(a.value=a.value.substring(0,a.value.length-1))}this.expect(t)&&this.next();var l=this.lexer._input.substring("heredoc"===o?i:s-1,this.lexer.yylloc.first_offset);return n=n(r,l,o),t===this.tok.T_END_HEREDOC&&(n.label=this.lexer.heredoc_label.label,this.lexer.heredoc_label.finished=!0),n},get_magic_constant:function(){var t=this.node("magic"),e=this.text();return this.next(),t(e.toUpperCase(),e)}};H.resolve_special_chars,H.remove_heredoc_leading_whitespace_chars,H.check_heredoc_indentation_level,H.read_dereferencable_scalar,H.read_scalar,H.read_dereferencable,H.read_encapsed_string_item,H.read_encapsed_string,H.get_magic_constant;var G={read_top_statements:function(){for(var t=[];this.token!==this.EOF&&"}"!==this.token;){var e=this.read_top_statement();e&&(Array.isArray(e)?t=t.concat(e):t.push(e))}return t},read_top_statement:function(){var t=[];switch(this.token===this.tok.T_ATTRIBUTE&&(t=this.read_attr_list()),this.token){case this.tok.T_FUNCTION:return this.read_function(!1,!1,t);case this.tok.T_ABSTRACT:case this.tok.T_FINAL:case this.tok.T_CLASS:return this.read_class_declaration_statement(t);case this.tok.T_INTERFACE:return this.read_interface_declaration_statement(t);case this.tok.T_TRAIT:return this.read_trait_declaration_statement();case this.tok.T_ENUM:return this.read_enum_declaration_statement(t);case this.tok.T_USE:return this.read_use_statement();case this.tok.T_CONST:var e=this.node("constantstatement"),i=this.next().read_const_list();return this.expectEndOfStatement(),e(null,i);case this.tok.T_NAMESPACE:return this.read_namespace();case this.tok.T_HALT_COMPILER:var n=this.node("halt");return this.next().expect("(")&&this.next(),this.expect(")")&&this.next(),this.expect(";"),this.lexer.done=!0,n(this.lexer._input.substring(this.lexer.offset));default:return this.read_statement()}},read_inner_statements:function(){for(var t=[];this.token!=this.EOF&&"}"!==this.token;){var 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);var t=this.node("constant"),e=this.node("identifier"),i=this.text();return this.next(),e=e(i),this.expect("=")?t(e,this.next().read_expr()):t(e,null)}),",",!1)},read_declare_list:function(){for(var t=[];this.token!=this.EOF&&")"!==this.token;){this.expect(this.tok.T_STRING);var e=this.node("declaredirective"),i=this.node("identifier"),n=this.text();this.next(),i=i(n);var s=null;if(this.expect("=")&&(s=this.next().read_expr()),t.push(e(i,s)),","!==this.token)break;this.next()}return t},read_inner_statement:function(){var t=[];switch(this.token===this.tok.T_ATTRIBUTE&&(t=this.read_attr_list()),this.token){case this.tok.T_FUNCTION:var e=this.read_function(!1,!1);return e.attrGroups=t,e;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_ENUM:return this.read_enum_declaration_statement();case this.tok.T_HALT_COMPILER:this.raiseError("__HALT_COMPILER() can only be used from the outermost scope");var i=this.node("halt");return this.next().expect("(")&&this.next(),this.expect(")")&&this.next(),i=i(this.lexer._input.substring(this.lexer.offset)),this.expect(";")&&this.next(),i;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:var t=this.node("return");this.next();var e=this.read_optional_expr(";");return this.expectEndOfStatement(),t(e);case this.tok.T_BREAK:case this.tok.T_CONTINUE:var i=this.node(this.token===this.tok.T_CONTINUE?"continue":"break");this.next();var n=this.read_optional_expr(";");return this.expectEndOfStatement(),i(n);case this.tok.T_GLOBAL:var s=this.node("global"),r=this.next().read_list(this.read_simple_variable,",");return this.expectEndOfStatement(),s(r);case this.tok.T_STATIC:var o=[this.token,this.lexer.getState()],a=this.node();if(this.next().token===this.tok.T_DOUBLE_COLON){this.lexer.tokens.push(o);var h=this.next().read_expr();return this.expectEndOfStatement(h),a("expressionstatement",h)}if(this.token===this.tok.T_FUNCTION)return this.read_function(!0,[0,1,0]);var l=this.read_variable_declarations();return this.expectEndOfStatement(),a("static",l);case this.tok.T_ECHO:var c=this.node("echo"),u=this.text(),_="<?="===u||"<%="===u,d=this.next().read_function_list(this.read_expr,",");return this.expectEndOfStatement(),c(d,_);case this.tok.T_INLINE_HTML:var p=this.text(),f=this.lexer.yylloc.first_offset>0?this.lexer._input[this.lexer.yylloc.first_offset-1]:null,T="\r"===f||"\n"===f;T&&"\n"===f&&this.lexer.yylloc.first_offset>1&&"\r"===this.lexer._input[this.lexer.yylloc.first_offset-2]&&(f="\r\n");var k=this.node("inline");return this.next(),k(p,T?f+p:p);case this.tok.T_UNSET:var E=this.node("unset");this.next().expect("(")&&this.next();var m=this.read_function_list(this.read_variable,",");return this.expect(")")&&this.next(),this.expect(";")&&this.next(),E(m);case this.tok.T_DECLARE:var x,y=this.node("declare"),v=[];this.next().expect("(")&&this.next();var A=this.read_declare_list();if(this.expect(")")&&this.next(),":"===this.token){for(this.next();this.token!=this.EOF&&this.token!==this.tok.T_ENDDECLARE;)v.push(this.read_top_statement());0===v.length&&this.extractDoc&&this._docs.length>this._docIndex&&v.push(this.node("noop")()),this.expect(this.tok.T_ENDDECLARE)&&this.next(),this.expectEndOfStatement(),x=this.ast.declare.MODE_SHORT}else if("{"===this.token){for(this.next();this.token!=this.EOF&&"}"!==this.token;)v.push(this.read_top_statement());0===v.length&&this.extractDoc&&this._docs.length>this._docIndex&&v.push(this.node("noop")()),this.expect("}")&&this.next(),x=this.ast.declare.MODE_BLOCK}else this.expect(";")&&this.next(),x=this.ast.declare.MODE_NONE;return y(A,v,x);case this.tok.T_TRY:return this.read_try();case this.tok.T_THROW:var g=this.node("throw"),N=this.next().read_expr();return this.expectEndOfStatement(),g(N);case";":return this.next(),null;case this.tok.T_STRING:var L=this.node(),C=[this.token,this.lexer.getState()],b=this.text(),S=this.node("identifier");if(":"===this.next().token)return S=S(b),this.next(),L("label",S);S.destroy(),L.destroy(),this.lexer.tokens.push(C);var I=this.node("expressionstatement"),O=this.next().read_expr();return this.expectEndOfStatement(O),I(O);case this.tok.T_GOTO:var R=this.node("goto"),w=null;if(this.next().expect(this.tok.T_STRING)){w=this.node("identifier");var D=this.text();this.next(),w=w(D),this.expectEndOfStatement()}return R(w);default:var P=this.node("expressionstatement"),U=this.read_expr();return this.expectEndOfStatement(U),P(U)}},read_code_block:function(t){var e=this.node("block");this.expect("{")&&this.next();var i=t?this.read_top_statements():this.read_inner_statements();return 0===i.length&&this.extractDoc&&this._docs.length>this._docIndex&&i.push(this.node("noop")()),this.expect("}")&&this.next(),e(null,i)}};G.read_top_statements,G.read_top_statement,G.read_inner_statements,G.read_const_list,G.read_declare_list,G.read_inner_statement,G.read_statement,G.read_code_block;var V={read_switch:function(){var t=this.node("switch");this.expect(this.tok.T_SWITCH)&&this.next(),this.expect("(")&&this.next();var e=this.read_expr();this.expect(")")&&this.next();var i=":"===this.token;return t(e,this.read_switch_case_list(),i)},read_switch_case_list:function(){var t=null,e=this.node("block"),i=[];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;)i.push(this.read_case_list(t));return 0===i.length&&this.extractDoc&&this._docs.length>this._docIndex&&i.push(this.node("noop")()),this.expect(t)&&this.next(),t===this.tok.T_ENDSWITCH&&this.expectEndOfStatement(),e(null,i)},read_case_list:function(t){var e=this.node("case"),i=null;this.token===this.tok.T_CASE?i=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();for(var n=this.node("block"),s=[];this.token!==this.EOF&&this.token!==t&&this.token!==this.tok.T_CASE&&this.token!==this.tok.T_DEFAULT;)s.push(this.read_inner_statement());return e(i,n(null,s))}};V.read_switch,V.read_switch_case_list,V.read_case_list;var Q={read_try:function(){this.expect(this.tok.T_TRY);for(var t=this.node("try"),e=null,i=[],n=this.next().read_statement();this.token===this.tok.T_CATCH;){var s=this.node("catch");this.next().expect("(")&&this.next();var r=this.read_list(this.read_namespace_name,"|",!1),o=null;(this.version<800||this.token===this.tok.T_VARIABLE)&&(o=this.read_variable(!0,!1)),this.expect(")"),i.push(s(this.next().read_statement(),r,o))}return this.token===this.tok.T_FINALLY&&(e=this.next().read_statement()),t(n,i,e)}};Q.read_try;var W={read_short_form:function(t){var e=this.node("block"),i=[];for(this.expect(":")&&this.next();this.token!=this.EOF&&this.token!==t;)i.push(this.read_inner_statement());return 0===i.length&&this.extractDoc&&this._docs.length>this._docIndex&&i.push(this.node("noop")()),this.expect(t)&&this.next(),this.expectEndOfStatement(),e(null,i)},read_function_list:function(t,e){var i=[];do{if(this.token==e&&this.version>=703&&i.length>0){i.push(this.node("noop")());break}if(i.push(t.apply(this,[])),this.token!=e)break;if(")"==this.next().token&&this.version>=703)break}while(this.token!=this.EOF);return i},read_list:function(t,e,i){var n=[];if(this.token==e&&(i&&n.push("function"==typeof t?this.node("noop")():null),this.next()),"function"==typeof t)do{var s=t.apply(this,[]);if(s&&n.push(s),this.token!=e)break}while(this.next().token!=this.EOF);else{if(!this.expect(t))return[];for(n.push(this.text());this.next().token!=this.EOF&&this.token==e&&this.next().token==t;)n.push(this.text())}return n},read_name_list:function(){return this.read_list(this.read_namespace_name,",",!1)},read_byref:function(t){var e=this.node("byref");this.next(),e=e(null);var i=t();return i&&(this.ast.swapLocations(i,e,i,this),i.byref=!0),i},read_variable_declarations:function(){return this.read_list((function(){var t=this.node("staticvariable"),e=this.node("variable");if(this.expect(this.tok.T_VARIABLE)){var i=this.text().substring(1);this.next(),e=e(i,!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}};W.read_short_form,W.read_function_list,W.read_list,W.read_name_list,W.read_byref,W.read_variable_declarations,W.read_extends_from,W.read_interface_extends_list,W.read_implements_list;var Y={read_variable:function(t,e){var i;if("&"===this.token)return this.read_byref(this.read_variable.bind(this,t,e));if(this.is([this.tok.T_VARIABLE,"$"]))i=this.read_reference_variable(e);else if(this.is([this.tok.T_NS_SEPARATOR,this.tok.T_STRING,this.tok.T_NAME_RELATIVE,this.tok.T_NAME_QUALIFIED,this.tok.T_NAME_FULLY_QUALIFIED,this.tok.T_NAMESPACE])){i=this.node();var n=this.read_namespace_name();if(this.token!=this.tok.T_DOUBLE_COLON&&"("!=this.token&&-1===["parentreference","selfreference"].indexOf(n.kind)){var s=n.name.toLowerCase();"true"===s?i=n.destroy(i("boolean",!0,n.name)):"false"===s?i=n.destroy(i("boolean",!1,n.name)):"null"===s?i=n.destroy(i("nullkeyword",n.name)):(i.destroy(n),i=n)}else i.destroy(n),i=n}else if(this.token===this.tok.T_STATIC){i=this.node("staticreference");var r=this.text();this.next(),i=i(r)}else this.expect("VARIABLE");return this.token===this.tok.T_DOUBLE_COLON&&(i=this.read_static_getter(i,e)),this.recursive_variable_chain_scan(i,t,e)},read_static_getter:function(t,e){var i,n,s=this.node("staticlookup");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(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=null,i=null;switch(this.next().token){case this.tok.T_STRING:e=this.node("identifier"),i=this.text(),this.next(),e=e(i),t&&this.token===this.tok.T_OBJECT_OPERATOR&&this.error();break;case this.tok.T_VARIABLE:e=this.node("variable"),i=this.text().substring(1),this.next(),e=e(i,!1);break;case"$":e=this.node(),this.next().expect(["$","{",this.tok.T_VARIABLE]),"{"===this.token?(i=this.next().read_expr(),this.expect("}")&&this.next(),e=e("variable",i,!0)):e=e("variable",i=this.read_expr(),!1);break;case"{":e=this.node("encapsedpart"),i=this.next().read_expr(),this.expect("}")&&this.next(),e=e(i,"complex",!1);break;default:this.error([this.tok.T_STRING,this.tok.T_VARIABLE,"$","{"]),e=this.node("identifier"),i=this.text(),this.next(),e=e(i)}return e},recursive_variable_chain_scan:function(t,e,i){var n,s;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"{":var r="["===this.token;if(n=this.node("offsetlookup"),this.next(),s=!1,i)s=this.read_encaps_var_offset(),this.expect(r?"]":"}")&&this.next();else(r?"]"!==this.token:"}"!==this.token)?(s=this.read_expr(),this.expect(r?"]":"}")&&this.next()):this.next();t=n(t,s);break;case this.tok.T_DOUBLE_COLON:"staticlookup"===t.kind&&"identifier"===t.offset.kind&&this.error(),t=(n=this.node("staticlookup"))(t,this.read_what(!0));break;case this.tok.T_OBJECT_OPERATOR:t=(n=this.node("propertylookup"))(t,this.read_what());break;case this.tok.T_NULLSAFE_OBJECT_OPERATOR:t=(n=this.node("nullsafepropertylookup"))(t,this.read_what());break;default:break t}return t},read_encaps_var_offset:function(){var t=this.node();if(this.token===this.tok.T_STRING){var e=this.text();this.next(),t=t("identifier",e)}else if(this.token===this.tok.T_NUM_STRING){var i=this.text();this.next(),t=t("number",i,null)}else if("-"===this.token){this.next();var n=-1*this.text();this.expect(this.tok.T_NUM_STRING)&&this.next(),t=t("number",n,null)}else if(this.token===this.tok.T_VARIABLE){var s=this.text().substring(1);this.next(),t=t("variable",s,!1)}else{this.expect([this.tok.T_STRING,this.tok.T_NUM_STRING,"-",this.tok.T_VARIABLE]);var r=this.text();this.next(),t=t("identifier",r)}return t},read_reference_variable:function(t){for(var e,i=this.read_simple_variable();this.token!=this.EOF;){var n=this.node();if("{"!=this.token||t){n.destroy();break}e=this.next().read_expr(),this.expect("}")&&this.next(),i=n("offsetlookup",i,e)}return i},read_simple_variable:function(){var 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"{":var i=this.next().read_expr();this.expect("}")&&this.next(),e=e(i,!0);break;case"$":e=e(this.read_simple_variable(),!1);break;case this.tok.T_VARIABLE:t=this.text().substring(1);var n=this.node("variable");this.next(),e=e(n(t,!1),!1);break;default:this.error(["{","$",this.tok.T_VARIABLE]),t=this.text(),this.next(),e=e(t,!1)}return e}};function j(t){return"."!=t&&","!=t&&!isNaN(parseFloat(t))&&isFinite(t)}Y.read_variable,Y.read_static_getter,Y.read_what,Y.recursive_variable_chain_scan,Y.read_encaps_var_offset,Y.read_reference_variable,Y.read_simple_variable;var $=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=801,this.extractDoc=!1,this.extractTokens=!1,this.suppressErrors=!1;var i=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_ENUM,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_MATCH,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_READ_ONLY,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(i)),VARIABLE:new Map([this.tok.T_VARIABLE,"$","&",this.tok.T_STRING,this.tok.T_NAME_RELATIVE,this.tok.T_NAME_QUALIFIED,this.tok.T_NAME_FULLY_QUALIFIED,this.tok.T_NAMESPACE,this.tok.T_STATIC].map(i)),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(i)),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(i)),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(i)),EOS:new Map([";",this.EOF,this.tok.T_INLINE_HTML].map(i)),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_MATCH,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_NAME_RELATIVE,this.tok.T_NAME_QUALIFIED,this.tok.T_NAME_FULLY_QUALIFIED,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(i))}};$.prototype.getTokenName=function(t){return j(t)?t==this.EOF?"the end of file (EOF)":this.lexer.engine.tokens.values[t]:"'"+t+"'"},$.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;var i=this.node("program"),n=[];for(this.next();this.token!=this.EOF;)n.push(this.read_start());0===n.length&&this.extractDoc&&this._docs.length>this._docIndex&&n.push(this.node("noop")()),this.prev=[this.lexer.yylloc.last_line,this.lexer.yylloc.last_column,this.lexer.offset];var s=i(n,this._errors,this._docs,this._tokens);if(this.debug){var r=this.ast.checkNodes();if(r.length>0)throw r.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 s},$.prototype.raiseError=function(t,e,i,n){if(t+=" on line "+this.lexer.yylloc.first_line,!this.suppressErrors){var s=new SyntaxError(t,this.filename,this.lexer.yylloc.first_line);throw s.lineNumber=this.lexer.yylloc.first_line,s.fileName=this.filename,s.columnNumber=this.lexer.yylloc.first_column,s}var r=this.ast.prepare("error",null,this)(t,n,this.lexer.yylloc.first_line,i);return this._errors.push(r),r},$.prototype.error=function(t){var e="Parse Error : syntax error",i=this.getTokenName(this.token),n="";if(this.token!==this.EOF){if(j(this.token)){var s=this.text();s.length>10&&(s=s.substring(0,7)+"..."),i="'"+s+"' ("+i+")"}e+=", unexpected "+i}return t&&!Array.isArray(t)&&((j(t)||1===t.length)&&(n=", expecting "+this.getTokenName(t)),e+=n),this.raiseError(e,n,t,i)},$.prototype.position=function(){return new b(this.lexer.yylloc.first_line,this.lexer.yylloc.first_column,this.lexer.yylloc.first_offset)},$.prototype.node=function(t){if(this.extractDoc){var 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)));var i=this.ast.prepare(t,e,this);return i.postBuild=function(t){if(this._docIndex<this._docs.length)if(this._lastNode){for(var e=this.prev[2],i=this._docIndex;i<this._docs.length&&!(this._docs[i].offset>e);i++);i>this._docIndex&&(this._lastNode.setTrailingComments(this._docs.slice(this._docIndex,i)),this._docIndex=i)}else this.token===this.EOF&&(t.setTrailingComments(this._docs.slice(this._docIndex)),this._docIndex=this._docs.length);this._lastNode=t}.bind(this),i}return this.ast.prepare(t,null,this)},$.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};var z=["parser.next","parser.node","parser.showlog"];$.prototype.showlog=function(){for(var t,e=(new Error).stack.split("\n"),i=2;i<e.length;i++){t=e[i].trim();for(var n=!1,s=0;s<z.length;s++)if(t.substring(3,3+z[s].length)===z[s]){n=!0;break}if(!n)break}return console.log("Line "+this.lexer.yylloc.first_line+" : "+this.getTokenName(this.token)+">"+this.lexer.yytext+"< @--\x3e"+t),this},$.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},$.prototype.text=function(){return this.lexer.yytext},$.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},$.prototype.peek=function(){var t=this.lexer.getState(),e=this.lexer.lex();return this.lexer.setState(t),e},$.prototype.lex=function(){if(this.extractTokens)do{if(this.token=this.lexer.lex()||this.EOF,this.token===this.EOF)return this;var t=this.lexer.yytext;if(t=Object.prototype.hasOwnProperty.call(this.lexer.engine.tokens.values,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},$.prototype.is=function(t){return Array.isArray(t)?-1!==t.indexOf(this.token):this.entries[t].has(this.token)},[S,I,O,R,w,D,P,U,M,F,H,G,V,Q,W,Y].forEach((function(t){for(var e in t){if(Object.prototype.hasOwnProperty.call($.prototype,e))throw new Error("Function "+e+" is already defined - collision");$.prototype[e]=t[e]}}));var K=$,X=Object.freeze({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",236:"T_NULLSAFE_OBJECT_OPERATOR",237:"T_MATCH",238:"T_ATTRIBUTE",239:"T_ENUM",240:"T_READ_ONLY",241:"T_NAME_RELATIVE",242:"T_NAME_QUALIFIED",243:"T_NAME_FULLY_QUALIFIED"},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,T_NULLSAFE_OBJECT_OPERATOR:236,T_MATCH:237,T_ATTRIBUTE:238,T_ENUM:239,T_READ_ONLY:240,T_NAME_RELATIVE:241,T_NAME_QUALIFIED:242,T_NAME_FULLY_QUALIFIED:243}}),J=function(t,e,i){this.source=t,this.start=e,this.end=i},q=function(t,e,i){this.kind=t,e&&(this.leadingComments=e),i&&(this.loc=i)};q.prototype.setTrailingComments=function(t){this.trailingComments=t},q.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},q.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},q.extends=function(t,e){return e.prototype=Object.create(this.prototype),e.extends=this.extends,e.prototype.constructor=e,e.kind=t,e};var Z=q,tt="expression",et=Z.extends(tt,(function(t,e,i){Z.apply(this,[t||tt,e,i])})),it="array",nt=et.extends(it,(function(t,e,i,n){et.apply(this,[it,i,n]),this.items=e,this.shortForm=t})),st="arrowfunc",rt=et.extends(st,(function(t,e,i,n,s,r,o,a){et.apply(this,[st,o,a]),this.arguments=t,this.byref=e,this.body=i,this.type=n,this.nullable=s,this.isStatic=r||!1})),ot="assign",at=et.extends(ot,(function(t,e,i,n,s){et.apply(this,[ot,n,s]),this.left=t,this.right=e,this.operator=i})),ht="assignref",lt=et.extends(ht,(function(t,e,i,n){et.apply(this,[ht,i,n]),this.left=t,this.right=e})),ct="attribute",ut=Z.extends(ct,(function(t,e,i,n){Z.apply(this,[ct,i,n]),this.name=t,this.args=e})),_t="attrgroup",dt=Z.extends(_t,(function(t,e,i){Z.apply(this,[_t,e,i]),this.attrs=t||[]})),pt="operation",ft=et.extends(pt,(function(t,e,i){et.apply(this,[t||pt,e,i])})),Tt=ft.extends("bin",(function(t,e,i,n,s){ft.apply(this,["bin",n,s]),this.type=t,this.left=e,this.right=i})),kt="statement",Et=Z.extends(kt,(function(t,e,i){Z.apply(this,[t||kt,e,i])})),mt="block",xt=Et.extends(mt,(function(t,e,i,n){Et.apply(this,[t||mt,i,n]),this.children=e.filter(Boolean)})),yt="literal",vt=et.extends(yt,(function(t,e,i,n,s){et.apply(this,[t||yt,n,s]),this.value=e,i&&(this.raw=i)})),At="boolean",gt=vt.extends(At,(function(t,e,i,n){vt.apply(this,[At,t,e,i,n])})),Nt="break",Lt=Et.extends(Nt,(function(t,e,i){Et.apply(this,[Nt,e,i]),this.level=t})),Ct="byref",bt=et.extends(Ct,(function(t,e,i){et.apply(this,[Ct,e,i]),this.what=t})),St="call",It=et.extends(St,(function(t,e,i,n){et.apply(this,[St,i,n]),this.what=t,this.arguments=e})),Ot="case",Rt=Et.extends(Ot,(function(t,e,i,n){Et.apply(this,[Ot,i,n]),this.test=t,this.body=e})),wt="cast",Dt=ft.extends(wt,(function(t,e,i,n,s){ft.apply(this,[wt,n,s]),this.type=t,this.raw=e,this.expr=i})),Pt="catch",Ut=Et.extends(Pt,(function(t,e,i,n,s){Et.apply(this,[Pt,n,s]),this.body=t,this.what=e,this.variable=i})),Mt="declaration",Ft=Et.extends(Mt,(function(t,e,i,n){Et.apply(this,[t||Mt,i,n]),this.name=e}));Ft.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])};var Bt=Ft,Ht="class",Gt=Bt.extends(Ht,(function(t,e,i,n,s,r,o){Bt.apply(this,[Ht,t,r,o]),this.isAnonymous=!t,this.extends=e,this.implements=i,this.body=n,this.attrGroups=[],this.parseFlags(s)})),Vt="constantstatement",Qt=Et.extends(Vt,(function(t,e,i,n){Et.apply(this,[t||Vt,i,n]),this.constants=e})),Wt="classconstant",Yt=Qt.extends(Wt,(function(t,e,i,n,s,r){Qt.apply(this,[t||Wt,e,s,r]),this.parseFlags(i),this.attrGroups=n}));Yt.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")};var jt=Yt,$t="clone",zt=et.extends($t,(function(t,e,i){et.apply(this,[$t,e,i]),this.what=t})),Kt="closure",Xt=et.extends(Kt,(function(t,e,i,n,s,r,o,a){et.apply(this,[Kt,o,a]),this.uses=i,this.arguments=t,this.byref=e,this.type=n,this.nullable=s,this.isStatic=r||!1,this.body=null,this.attrGroups=[]})),Jt=Z.extends("comment",(function(t,e,i,n){Z.apply(this,[t,i,n]),this.value=e})),qt="commentblock",Zt=Jt.extends(qt,(function(t,e,i){Jt.apply(this,[qt,t,e,i])})),te="commentline",ee=Jt.extends(te,(function(t,e,i){Jt.apply(this,[te,t,e,i])})),ie="constant",ne=Z.extends(ie,(function(t,e,i,n){Z.apply(this,[ie,i,n]),this.name=t,this.value=e})),se="continue",re=Et.extends(se,(function(t,e,i){Et.apply(this,[se,e,i]),this.level=t})),oe="declare",ae=xt.extends(oe,(function(t,e,i,n,s){xt.apply(this,[oe,e,n,s]),this.directives=t,this.mode=i}));ae.MODE_SHORT="short",ae.MODE_BLOCK="block",ae.MODE_NONE="none";var he=ae,le="declaredirective",ce=Z.extends(le,(function(t,e,i,n){Z.apply(this,[le,i,n]),this.key=t,this.value=e})),ue=Et.extends("do",(function(t,e,i,n){Et.apply(this,["do",i,n]),this.test=t,this.body=e})),_e="echo",de=Et.extends(_e,(function(t,e,i,n){Et.apply(this,[_e,i,n]),this.shortForm=e,this.expressions=t})),pe="empty",fe=et.extends(pe,(function(t,e,i){et.apply(this,[pe,e,i]),this.expression=t})),Te="encapsed",ke=vt.extends(Te,(function(t,e,i,n,s){vt.apply(this,[Te,t,e,n,s]),this.type=i}));ke.TYPE_STRING="string",ke.TYPE_SHELL="shell",ke.TYPE_HEREDOC="heredoc",ke.TYPE_OFFSET="offset";var Ee=ke,me="encapsedpart",xe=et.extends(me,(function(t,e,i,n,s){et.apply(this,[me,n,s]),this.expression=t,this.syntax=e,this.curly=i})),ye="entry",ve=et.extends(ye,(function(t,e,i,n,s,r){et.apply(this,[ye,s,r]),this.key=t,this.value=e,this.byRef=i,this.unpack=n})),Ae="enum",ge=Bt.extends(Ae,(function(t,e,i,n,s,r){Bt.apply(this,[Ae,t,s,r]),this.valueType=e,this.implements=i,this.body=n,this.attrGroups=[]})),Ne="enumcase",Le=Z.extends(Ne,(function(t,e,i,n){Z.apply(this,[Ne,i,n]),this.name=t,this.value=e})),Ce="error",be=Z.extends(Ce,(function(t,e,i,n,s,r){Z.apply(this,[Ce,s,r]),this.message=t,this.token=e,this.line=i,this.expected=n})),Se="eval",Ie=et.extends(Se,(function(t,e,i){et.apply(this,[Se,e,i]),this.source=t})),Oe="exit",Re=et.extends(Oe,(function(t,e,i,n){et.apply(this,[Oe,i,n]),this.expression=t,this.useDie=e})),we="expressionstatement",De=Et.extends(we,(function(t,e,i){Et.apply(this,[we,e,i]),this.expression=t})),Pe=Et.extends("for",(function(t,e,i,n,s,r,o){Et.apply(this,["for",r,o]),this.init=t,this.test=e,this.increment=i,this.shortForm=s,this.body=n})),Ue="foreach",Me=Et.extends(Ue,(function(t,e,i,n,s,r,o){Et.apply(this,[Ue,r,o]),this.source=t,this.key=e,this.value=i,this.shortForm=s,this.body=n})),Fe="function",Be=Bt.extends(Fe,(function(t,e,i,n,s,r,o){Bt.apply(this,[Fe,t,r,o]),this.arguments=e,this.byref=i,this.type=n,this.nullable=s,this.body=null,this.attrGroups=[]})),He="global",Ge=Et.extends(He,(function(t,e,i){Et.apply(this,[He,e,i]),this.items=t})),Ve="goto",Qe=Et.extends(Ve,(function(t,e,i){Et.apply(this,[Ve,e,i]),this.label=t})),We="halt",Ye=Et.extends(We,(function(t,e,i){Et.apply(this,[We,e,i]),this.after=t})),je="identifier",$e=Z.extends(je,(function(t,e,i){Z.apply(this,[je,e,i]),this.name=t})),ze=$e,Ke=Et.extends("if",(function(t,e,i,n,s,r){Et.apply(this,["if",s,r]),this.test=t,this.body=e,this.alternate=i,this.shortForm=n})),Xe="include",Je=et.extends(Xe,(function(t,e,i,n,s){et.apply(this,[Xe,n,s]),this.once=t,this.require=e,this.target=i})),qe="inline",Ze=vt.extends(qe,(function(t,e,i,n){vt.apply(this,[qe,t,e,i,n])})),ti="interface",ei=Bt.extends(ti,(function(t,e,i,n,s,r){Bt.apply(this,[ti,t,s,r]),this.extends=e,this.body=i,this.attrGroups=n})),ii="intersectiontype",ni=Bt.extends(ii,(function(t,e,i){Bt.apply(this,[ii,null,e,i]),this.types=t})),si="isset",ri=et.extends(si,(function(t,e,i){et.apply(this,[si,e,i]),this.variables=t})),oi="label",ai=Et.extends(oi,(function(t,e,i){Et.apply(this,[oi,e,i]),this.name=t})),hi="list",li=et.extends(hi,(function(t,e,i,n){et.apply(this,[hi,i,n]),this.items=t,this.shortForm=e})),ci="lookup",ui=et.extends(ci,(function(t,e,i,n,s){et.apply(this,[t||ci,n,s]),this.what=e,this.offset=i})),_i="magic",di=vt.extends(_i,(function(t,e,i,n){vt.apply(this,[_i,t,e,i,n])})),pi="match",fi=et.extends(pi,(function(t,e,i,n){et.apply(this,[pi,i,n]),this.cond=t,this.arms=e})),Ti="matcharm",ki=et.extends(Ti,(function(t,e,i,n){et.apply(this,[Ti,i,n]),this.conds=t,this.body=e})),Ei="method",mi=Be.extends(Ei,(function(){Be.apply(this,arguments),this.kind=Ei})),xi="reference",yi=Z.extends(xi,(function(t,e,i){Z.apply(this,[t||xi,e,i])})),vi="name",Ai=yi.extends(vi,(function(t,e,i,n){yi.apply(this,[vi,i,n]),this.name=t.replace(/\\$/,""),this.resolution=e}));Ai.UNQUALIFIED_NAME="uqn",Ai.QUALIFIED_NAME="qn",Ai.FULL_QUALIFIED_NAME="fqn",Ai.RELATIVE_NAME="rn";var gi=Ai,Ni="namespace",Li=xt.extends(Ni,(function(t,e,i,n,s){xt.apply(this,[Ni,e,n,s]),this.name=t,this.withBrackets=i||!1})),Ci="namedargument",bi=et.extends(Ci,(function(t,e,i,n){et.apply(this,[Ci,i,n]),this.name=t,this.value=e})),Si=et.extends("new",(function(t,e,i,n){et.apply(this,["new",i,n]),this.what=t,this.arguments=e})),Ii="noop",Oi=Z.extends(Ii,(function(t,e){Z.apply(this,[Ii,t,e])})),Ri="nowdoc",wi=vt.extends(Ri,(function(t,e,i,n,s){vt.apply(this,[Ri,t,e,n,s]),this.label=i})),Di="nullkeyword",Pi=Z.extends(Di,(function(t,e,i){Z.apply(this,[Di,e,i]),this.raw=t})),Ui="nullsafepropertylookup",Mi=ui.extends(Ui,(function(t,e,i,n){ui.apply(this,[Ui,t,e,i,n])})),Fi="number",Bi=vt.extends(Fi,(function(t,e,i,n){vt.apply(this,[Fi,t,e,i,n])})),Hi="offsetlookup",Gi=ui.extends(Hi,(function(t,e,i,n){ui.apply(this,[Hi,t,e,i,n])})),Vi="parameter",Qi=Bt.extends(Vi,(function(t,e,i,n,s,r,o,a,h,l){Bt.apply(this,[Vi,t,h,l]),this.value=i,this.type=e,this.byref=n,this.variadic=s,this.readonly=r,this.nullable=o,this.flags=a||0,this.attrGroups=[]})),Wi="parentreference",Yi=yi.extends(Wi,(function(t,e,i){yi.apply(this,[Wi,e,i]),this.raw=t})),ji="post",$i=ft.extends(ji,(function(t,e,i,n){ft.apply(this,[ji,i,n]),this.type=t,this.what=e})),zi=ft.extends("pre",(function(t,e,i,n){ft.apply(this,["pre",i,n]),this.type=t,this.what=e})),Ki="print",Xi=et.extends(Ki,(function(t,e,i){et.apply(this,[Ki,e,i]),this.expression=t})),Ji="program",qi=xt.extends(Ji,(function(t,e,i,n,s,r){xt.apply(this,[Ji,t,s,r]),this.errors=e,i&&(this.comments=i),n&&(this.tokens=n)})),Zi="property",tn=Et.extends(Zi,(function(t,e,i,n,s,r,o,a){Et.apply(this,[Zi,o,a]),this.name=t,this.value=e,this.readonly=i,this.nullable=n,this.type=s,this.attrGroups=r})),en="propertylookup",nn=ui.extends(en,(function(t,e,i,n){ui.apply(this,[en,t,e,i,n])})),sn="propertystatement",rn=Et.extends(sn,(function(t,e,i,n,s){Et.apply(this,[sn,n,s]),this.properties=e,this.parseFlags(i)}));rn.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]};var on=rn,an="retif",hn=et.extends(an,(function(t,e,i,n,s){et.apply(this,[an,n,s]),this.test=t,this.trueExpr=e,this.falseExpr=i})),ln="return",cn=Et.extends(ln,(function(t,e,i){Et.apply(this,[ln,e,i]),this.expr=t})),un="selfreference",_n=yi.extends(un,(function(t,e,i){yi.apply(this,[un,e,i]),this.raw=t})),dn="silent",pn=et.extends(dn,(function(t,e,i){et.apply(this,[dn,e,i]),this.expr=t})),fn="static",Tn=Et.extends(fn,(function(t,e,i){Et.apply(this,[fn,e,i]),this.variables=t})),kn="staticvariable",En=Z.extends(kn,(function(t,e,i,n){Z.apply(this,[kn,i,n]),this.variable=t,this.defaultValue=e})),mn="staticlookup",xn=ui.extends(mn,(function(t,e,i,n){ui.apply(this,[mn,t,e,i,n])})),yn="staticreference",vn=yi.extends(yn,(function(t,e,i){yi.apply(this,[yn,e,i]),this.raw=t})),An="string",gn=vt.extends(An,(function(t,e,i,n,s,r){vt.apply(this,[An,e,n,s,r]),this.unicode=i,this.isDoubleQuote=t})),Nn="switch",Ln=Et.extends(Nn,(function(t,e,i,n,s){Et.apply(this,[Nn,n,s]),this.test=t,this.body=e,this.shortForm=i})),Cn="throw",bn=Et.extends(Cn,(function(t,e,i){Et.apply(this,[Cn,e,i]),this.what=t})),Sn="trait",In=Bt.extends(Sn,(function(t,e,i,n){Bt.apply(this,[Sn,t,i,n]),this.body=e})),On="traitalias",Rn=Z.extends(On,(function(t,e,i,n,s,r){Z.apply(this,[On,s,r]),this.trait=t,this.method=e,this.as=i,this.visibility="",n&&(0===n[0]?this.visibility="public":1===n[0]?this.visibility="protected":2===n[0]&&(this.visibility="private"))})),wn="traitprecedence",Dn=Z.extends(wn,(function(t,e,i,n,s){Z.apply(this,[wn,n,s]),this.trait=t,this.method=e,this.instead=i})),Pn="traituse",Un=Z.extends(Pn,(function(t,e,i,n){Z.apply(this,[Pn,i,n]),this.traits=t,this.adaptations=e})),Mn=Et.extends("try",(function(t,e,i,n,s){Et.apply(this,["try",n,s]),this.body=t,this.catches=e,this.always=i})),Fn="typereference",Bn=yi.extends(Fn,(function(t,e,i,n){yi.apply(this,[Fn,i,n]),this.name=t,this.raw=e}));Bn.types=["int","float","string","bool","object","array","callable","iterable","void","static"];var Hn=Bn,Gn="unary",Vn=ft.extends(Gn,(function(t,e,i,n){ft.apply(this,[Gn,i,n]),this.type=t,this.what=e})),Qn="uniontype",Wn=Bt.extends(Qn,(function(t,e,i){Bt.apply(this,[Qn,null,e,i]),this.types=t})),Yn="unset",jn=Et.extends(Yn,(function(t,e,i){Et.apply(this,[Yn,e,i]),this.variables=t})),$n="usegroup",zn=Et.extends($n,(function(t,e,i,n,s){Et.apply(this,[$n,n,s]),this.name=t,this.type=e,this.items=i})),Kn="useitem",Xn=Et.extends(Kn,(function(t,e,i,n,s){Et.apply(this,[Kn,n,s]),this.name=t,this.alias=e,this.type=i}));Xn.TYPE_CONST="const",Xn.TYPE_FUNCTION="function";var Jn=Xn,qn="variable",Zn=et.extends(qn,(function(t,e,i,n){et.apply(this,[qn,i,n]),this.name=t,this.curly=e||!1})),ts="variadic",es=et.extends(ts,(function(t,e,i){et.apply(this,[ts,e,i]),this.what=t})),is="variadicplaceholder",ns=Z.extends(is,(function(t,e){Z.apply(this,[is,t,e])})),ss="while",rs=Et.extends(ss,(function(t,e,i,n,s){Et.apply(this,[ss,n,s]),this.test=t,this.body=e,this.shortForm=i})),os="yield",as=et.extends(os,(function(t,e,i,n){et.apply(this,[os,i,n]),this.value=t,this.key=e})),hs="yieldfrom",ls=et.extends(hs,(function(t,e,i){et.apply(this,[hs,e,i]),this.value=t})),cs=function(t,e){this.withPositions=t,this.withSource=e};cs.precedence={},[["or"],["xor"],["and"],["="],["?"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","!=","===","!==","<=>"],["<","<=",">",">="],["<<",">>"],["+","-","."],["*","/","%"],["!"],["instanceof"],["cast","silent"],["**"]].forEach((function(t,e){t.forEach((function(t){cs.precedence[t]=e+1}))})),cs.prototype.isRightAssociative=function(t){return"**"===t||"??"===t},cs.prototype.swapLocations=function(t,e,i,n){this.withPositions&&(t.loc.start=e.loc.start,t.loc.end=i.loc.end,this.withSource&&(t.loc.source=n.lexer._input.substring(t.loc.start.offset,t.loc.end.offset)))},cs.prototype.resolveLocations=function(t,e,i,n){this.withPositions&&(t.loc.start.offset>e.loc.start.offset&&(t.loc.start=e.loc.start),t.loc.end.offset<i.loc.end.offset&&(t.loc.end=i.loc.end),this.withSource&&(t.loc.source=n.lexer._input.substring(t.loc.start.offset,t.loc.end.offset)))},cs.prototype.resolvePrecedence=function(t,e){var i,n,s;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?(n=cs.precedence[t.type],s=cs.precedence[t.right.type],n&&s&&s<=n&&(t.type!==t.right.type||!this.isRightAssociative(t.type))&&(i=t.right,t.right=t.right.left,this.swapLocations(t,t.left,t.right,e),i.left=this.resolvePrecedence(t,e),this.swapLocations(i,i.left,i.right,e),t=i)):"retif"===t.right.kind&&(n=cs.precedence[t.type],s=cs.precedence["?"],n&&s&&s<=n&&(i=t.right,t.right=t.right.test,this.swapLocations(t,t.left,t.right,e),i.test=this.resolvePrecedence(t,e),this.swapLocations(i,i.test,i.falseExpr,e),t=i))):"silent"!==t.kind&&"cast"!==t.kind||!t.expr||t.expr.parenthesizedExpression?"unary"===t.kind?t.what&&!t.what.parenthesizedExpression&&("bin"===t.what.kind?(i=t.what,t.what=t.what.left,this.swapLocations(t,t,t.what,e),i.left=this.resolvePrecedence(t,e),this.swapLocations(i,i.left,i.right,e),t=i):"retif"===t.what.kind&&(i=t.what,t.what=t.what.test,this.swapLocations(t,t,t.what,e),i.test=this.resolvePrecedence(t,e),this.swapLocations(i,i.test,i.falseExpr,e),t=i)):"retif"===t.kind?t.falseExpr&&"retif"===t.falseExpr.kind&&!t.falseExpr.parenthesizedExpression&&(i=t.falseExpr,t.falseExpr=i.test,this.swapLocations(t,t.test,t.falseExpr,e),i.test=this.resolvePrecedence(t,e),this.swapLocations(i,i.test,i.falseExpr,e),t=i):"assign"===t.kind?t.right&&"bin"===t.right.kind&&!t.right.parenthesizedExpression&&(n=cs.precedence["="],s=cs.precedence[t.right.type],n&&s&&s<n&&(i=t.right,t.right=t.right.left,i.left=t,this.swapLocations(i,i.left,t.right,e),t=i)):"expressionstatement"===t.kind&&this.swapLocations(t,t.expression,t,e):"bin"===t.expr.kind?(i=t.expr,t.expr=t.expr.left,this.swapLocations(t,t,t.expr,e),i.left=this.resolvePrecedence(t,e),this.swapLocations(i,i.left,i.right,e),t=i):"retif"===t.expr.kind&&(i=t.expr,t.expr=t.expr.test,this.swapLocations(t,t,t.expr,e),i.test=this.resolvePrecedence(t,e),this.swapLocations(i,i.test,i.falseExpr,e),t=i),t},cs.prototype.prepare=function(t,e,i){var n=null;(this.withPositions||this.withSource)&&(n=i.position());var s=this,r=function r(){var o=null,a=Array.prototype.slice.call(arguments);if(a.push(e),s.withPositions||s.withSource){var h=null;s.withSource&&(h=i.lexer._input.substring(n.offset,i.prev[2])),o=new J(h,n,new b(i.prev[0],i.prev[1],i.prev[2])),a.push(o)}t||(t=a.shift());var l=s[t];if("function"!=typeof l)throw new Error('Undefined node "'+t+'"');var c=Object.create(l.prototype);return l.apply(c,a),r.instance=c,r.trailingComments&&(c.trailingComments=r.trailingComments),"function"==typeof r.postBuild&&r.postBuild(c),i.debug&&delete s.stack[r.stackUid],s.resolvePrecedence(c,i)};return i.debug&&(this.stack||(this.stack={},this.stackUid=1),this.stack[++this.stackUid]={position:n,stack:(new Error).stack.split("\n").slice(3,5)},r.stackUid=this.stackUid),r.setTrailingComments=function(t){r.instance?r.instance.setTrailingComments(t):r.trailingComments=t},r.destroy=function(t){e&&(t?t.leadingComments?t.leadingComments=e.concat(t.leadingComments):t.leadingComments=e:i._docIndex=i._docs.length-e.length),i.debug&&delete s.stack[r.stackUid]},r},cs.prototype.checkNodes=function(){var t=[];for(var e in this.stack)Object.prototype.hasOwnProperty.call(this.stack,e)&&(this.stack[e].key=e,t.push(this.stack[e]));return this.stack={},t},[nt,rt,at,lt,ut,dt,Tt,xt,gt,Lt,bt,It,Rt,Dt,Ut,Gt,jt,zt,Xt,Jt,Zt,ee,ne,Qt,re,Bt,he,ce,ue,de,fe,Ee,xe,ve,ge,Le,be,Ie,Re,et,De,Pe,Me,Be,Ge,Qe,Ye,ze,Ke,Je,Ze,ei,ni,ri,ai,li,vt,ui,di,fi,ki,mi,gi,Li,bi,Si,Z,Oi,wi,Pi,Mi,Bi,Gi,ft,Qi,Yi,$i,zi,Xi,qi,tn,nn,on,yi,hn,cn,_n,pn,Et,Tn,En,xn,vn,gn,Ln,bn,In,Rn,Dn,Un,Mn,Hn,Vn,Wn,jn,zn,Jn,Zn,es,ns,rs,as,ls].forEach((function(t){cs.prototype[t.kind]=t}));var us=cs;function _s(t,e){for(var i=Object.keys(t),n=i.length;n--;){var s=i[n],r=t[s];null===r?delete e[s]:"function"==typeof r?e[s]=r.bind(e):Array.isArray(r)?e[s]=Array.isArray(e[s])?e[s].concat(r):r:"object"===a(r)?e[s]="object"===a(e[s])?_s(r,e[s]):r:e[s]=r}return e}var ds=function(t){if("function"==typeof this)return new this(t);if(this.tokens=X,this.lexer=new C(this),this.ast=new us,this.parser=new K(this.lexer,this.ast),t&&"object"===a(t)){if(t.parser&&(t.lexer||(t.lexer={}),t.parser.version)){if("string"==typeof t.parser.version){var e=t.parser.version.split(".");if(e=100*parseInt(e[0])+parseInt(e[1]),isNaN(e))throw new Error("Bad version number : "+t.parser.version);t.parser.version=e}else if("number"!=typeof t.parser.version)throw new Error("Expecting a number for version");if(t.parser.version<500||t.parser.version>900)throw new Error("Can only handle versions between 5.x to 8.x")}_s(t,this),this.lexer.version=this.parser.version}},ps=function(t){return"function"==typeof t.write?t.toString():t};ds.create=function(t){return new ds(t)},ds.parseEval=function(t,e){return new ds(e).parseEval(t)},ds.prototype.parseEval=function(t){return this.lexer.mode_eval=!0,this.lexer.all_tokens=!1,t=ps(t),this.parser.parse(t,"eval")},ds.parseCode=function(t,e,i){return"object"!==a(e)||i||(i=e,e="unknown"),new ds(i).parseCode(t,e)},ds.prototype.parseCode=function(t,e){return this.lexer.mode_eval=!1,this.lexer.all_tokens=!1,t=ps(t),this.parser.parse(t,e)},ds.tokenGetAll=function(t,e){return new ds(e).tokenGetAll(t)},ds.prototype.tokenGetAll=function(t){this.lexer.mode_eval=!1,this.lexer.all_tokens=!0,t=ps(t);var e=this.lexer.EOF,i=this.tokens.values;this.lexer.setInput(t);for(var n=this.lexer.lex()||e,s=[];n!=e;){var r=this.lexer.yytext;Object.prototype.hasOwnProperty.call(i,n)&&(r=[i[n],r,this.lexer.yylloc.first_line]),s.push(r),n=this.lexer.lex()||e}return s};var fs=ds,Ts=X,ks=C,Es=us,ms=K,xs=_s,ys=ds,vs=ds;fs.tokens=Ts,fs.lexer=ks,fs.AST=Es,fs.parser=ms,fs.combine=xs,fs.Engine=ys,fs.default=vs;var As=function(t,e,i){var n=i&&"markdown"===i.parentParser;if(!t&&n)return"";t=t.replace(/\?>\r?\n<\?/g,"?>\n___PSEUDO_INLINE_PLACEHOLDER___<?");var s,r=new fs({parser:{extractDoc:!0},ast:{withPositions:!0,withSource:!0}}),o=-1!==t.indexOf("<?php"),a=n&&!o;try{s=a?r.parseEval(t):r.parseCode(t)}catch(t){throw t instanceof SyntaxError&&"lineNumber"in t&&(t.loc={start:{line:t.lineNumber,column:t.columnNumber}},delete t.lineNumber,delete t.columnNumber),t}return s.extra={parseAsEval:a},s.comments.forEach((function(t){"\r"===t.value[t.value.length-1]&&(t.value=t.value.slice(0,-1),t.loc.end.offset=t.loc.end.offset-1),"\n"===t.value[t.value.length-1]&&(t.value=t.value.slice(0,-1),t.loc.end.offset=t.loc.end.offset-1)})),s},gs=n.default.util,Ns=gs.hasNewline,Ls=gs.skipEverythingButNewLine,Cs=gs.skipNewline,bs=gs.isNextLineEmpty,Ss=gs.isPreviousLineEmpty,Is=gs.getNextNonSpaceNonCommentCharacterIndex,Os=n.default.version;function Rs(t,e){return parseInt(Os[0])>1?t[e]:t}var ws={};function Ds(t){return ws[t]}[["or"],["xor"],["and"],["=","+=","-=","*=","**=","/=",".=","%=","&=","|=","^=","<<=",">>="],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!==","<>","<=>"],["<",">","<=",">="],[">>","<<"],["+","-","."],["*","/","%"],["!"],["instanceof"],["++","--","~"],["**"]].forEach((function(t,e){t.forEach((function(t){ws[t]=e}))}));var Ps=["==","!=","===","!==","<>","<=>"],Us=["*","/","%"],Ms=[">>","<<"];function Fs(t){return["block","program","namespace","class","enum","interface","trait","traituse","declare"].includes(t.kind)}function Bs(t){var e=t.body;return e?("block"===e.kind&&(e=e.children),e[0]):null}function Hs(t){var e=t.children||t.body||t.adaptations;return Array.isArray(e)?e:null}function Gs(t){var e=t.getParentNode();return e?Hs(e):null}function Vs(t){return t.length>0?t[t.length-1]:null}function Qs(t){var e=t.getValue();if("program"===e.kind){var i=Hs(e);return!(!i||0===i.length)&&"inline"===i[0].kind}if("switch"===e.kind){if(!e.body)return!1;var n=Hs(e.body);if(0===n.length)return!1;var s=l(n,1)[0];if(!s.body)return!1;var r=Hs(s.body);return 0!==r.length&&"inline"===r[0].kind}var o=Bs(e);return!!o&&"inline"===o.kind}var Ws=["__construct","__destruct","__call","__callStatic","__get","__set","__isset","__unset","__sleep","__wakeup","__toString","__invoke","__set_state","__clone","__debugInfo"].reduce((function(t,e){return t[e.toLowerCase()]=e,t}),{});var Ys={printNumber:function(t){return t.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(\d)/,"$1$2$3").replace(/^([+-]?[\d.]+)e[+-]?0+$/,"$1").replace(/^([+-])?\./,"$10.").replace(/(\.\d+?)0+(?=e|$)/,"$1").replace(/\.(?=e)/,"")},getPrecedence:Ds,isBitwiseOperator:function(t){return!!Ms[t]||"|"===t||"^"===t||"&"===t},shouldFlatten:function(t,e){return Ds(e)===Ds(t)&&("**"!==t&&((!Ps.includes(t)||!Ps.includes(e))&&(!("%"===e&&Us.includes(t)||"%"===t&&Us.includes(e))&&((e===t||!Us.includes(e)||!Us.includes(t))&&(!Ms.includes(t)||!Ms.includes(e))))))},nodeHasStatement:Fs,getNodeListProperty:Hs,getParentNodeListProperty:Gs,getLast:Vs,getPenultimate:function(t){return t.length>1?t[t.length-2]:null},isLastStatement:function(t){var e=Gs(t);if(!e)return!0;var i=t.getValue();return e[e.length-1]===i},getBodyFirstChild:Bs,lineShouldEndWithSemicolon:function(t){var e=t.getValue(),i=t.getParentNode();if(!i)return!1;if(["for","foreach","while","do","if","switch"].includes(i.kind)&&"block"!==e.kind&&"if"!==e.kind&&(i.body===e||i.alternate===e))return!0;if(!Fs(i))return!1;if("echo"===e.kind&&e.shortForm)return!1;if("traituse"===e.kind)return!e.adaptations;if("method"===e.kind&&e.isAbstract)return!0;if("method"===e.kind){var n=t.getParentNode();if(n&&"interface"===n.kind)return!0}return["expressionstatement","do","usegroup","classconstant","propertystatement","traitprecedence","traitalias","goto","constantstatement","enumcase","global","static","echo","unset","return","break","continue","throw"].includes(e.kind)},fileShouldEndWithHardline:function(t){var e=t.getValue(),i="program"===e.kind,n=e.children&&Vs(e.children);if(!i)return!1;if(n&&["halt","inline"].includes(n.kind))return!1;if(n&&("declare"===n.kind||"namespace"===n.kind)){var s=n.children.length>0&&Vs(n.children);if(s&&["halt","inline"].includes(s.kind))return!1}return!0},maybeStripLeadingSlashFromUse:function(t){var e=t.replace(/^\\/,"");return-1!==e.indexOf("\\")?e:t},hasDanglingComments:function(t){return t.comments&&t.comments.some((function(t){return!t.leading&&!t.trailing}))},hasLeadingComment:function(t){return t.comments&&t.comments.some((function(t){return t.leading}))},hasTrailingComment:function(t){return t.comments&&t.comments.some((function(t){return t.trailing}))},docShouldHaveTrailingNewline:function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e.getNode(i),s=e.getNode(i+1),r=e.getNode(i+2);if(!s)return!1;if(r&&["call","new","echo"].includes(r.kind)&&!["call","array"].includes(s.kind)||"parameter"===s.kind){var o=r.arguments.length-1,a=r.arguments.indexOf(s);return a!==o}if(r&&"for"===r.kind){var h=r.init.indexOf(s);if(-1!==h)return h!==r.init.length-1;var l=r.test.indexOf(s);if(-1!==l)return l!==r.test.length-1;var c=r.increment.indexOf(s);if(-1!==c)return c!==r.increment.length-1}if("bin"===s.kind)return s.left===n||t(e,i+1);if("case"===s.kind&&s.test===n)return!0;if("staticvariable"===s.kind){var u=r.variables.length-1,_=r.variables.indexOf(s);return _!==u}if("entry"===s.kind){if(s.key===n)return!0;var d=r.items.length-1,p=r.items.indexOf(s);return p!==d}if(["call","new"].includes(s.kind)){var f=s.arguments.length-1,T=s.arguments.indexOf(n);return T!==f}if("echo"===s.kind){var k=s.expressions.length-1,E=s.expressions.indexOf(n);return E!==k}if("array"===s.kind){var m=s.items.length-1,x=s.items.indexOf(n);return x!==m}return"retif"===s.kind&&t(e,i+1)},isLookupNode:function(t){return"propertylookup"===t.kind||"nullsafepropertylookup"===t.kind||"staticlookup"===t.kind||"offsetlookup"===t.kind},isFirstChildrenInlineNode:Qs,shouldPrintHardLineAfterStartInControlStructure:function(t){var e=t.getValue();return!["try","catch"].includes(e.kind)&&Qs(t)},shouldPrintHardLineBeforeEndInControlStructure:function(t){var e=t.getValue();if(["try","catch"].includes(e.kind))return!0;if("switch"===e.kind){var i=Hs(e.body);if(0===i.length)return!0;var n=Vs(i);if(!n.body)return!0;var s=Hs(n.body);return 0===s.length||"inline"!==s[0].kind}return!Qs(t)},getAlignment:function(t){var e=t.split("\n").pop();return e.length-e.trimLeft().length+1},isProgramLikeNode:function(t){return["program","declare","namespace"].includes(t.kind)},isReferenceLikeNode:function(t){return["name","parentreference","selfreference","staticreference"].includes(t.kind)},getNodeKindIncludingLogical:function(t){return"bin"===t.kind&&["||","&&"].includes(t.type)?"logical":t.kind},useDoubleQuote:function(t,e){if(t.isDoubleQuote===e.singleQuote){var i=t.raw.slice("b"===t.raw[0]?2:1,-1).match(/\\([$nrtfve]|[xX][0-9a-fA-F]{1,2}|[0-7]{1,3}|u{([0-9a-fA-F]+)})|\r?\n|'|"|\$/);return t.isDoubleQuote?i:!i}return t.isDoubleQuote},hasEmptyBody:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"body",i=t.getValue();return i[e]&&i[e].children&&0===i[e].children.length&&(!i[e].comments||0===i[e].comments.length)},isNextLineEmptyAfterNamespace:function(t,e,i){var n=i(e);return n=Ls(t,n),n=Cs(t,n),Ns(t,n)},shouldPrintHardlineBeforeTrailingComma:function(t){return"nowdoc"===t.kind||"encapsed"===t.kind&&"heredoc"===t.type||"entry"===t.kind&&("nowdoc"===t.value.kind||"encapsed"===t.value.kind&&"heredoc"===t.value.type)},isDocNode:function(t){return"nowdoc"===t.kind||"encapsed"===t.kind&&"heredoc"===t.type},getAncestorNode:function(t,e){var i=function(t,e){for(var i,n=[].concat(e),s=-1;i=t.getParentNode(++s);)if(-1!==n.indexOf(i.kind))return s;return-1}(t,e);return-1===i?null:t.getParentNode(i)},getNextNode:function(t,e){var i=t.getParentNode(),n=Hs(i);if(!n)return null;var s=n.indexOf(e);return-1===s?null:i.children[s+1]},normalizeMagicMethodName:function(t){var e=t.toLowerCase();return Ws[e]?Ws[e]:t},isPreviousLineEmpty:function(t,e,i){return Ss(t,e,Rs(i,"locStart"))},isNextLineEmpty:function(t,e,i){return bs(t,e,Rs(i,"locEnd"))},getNextNonSpaceNonCommentCharacterIndex:function(t,e,i){return Is(t,e,Rs(i,"locEnd"))}},js=n.default.util,$s=js.addLeadingComment,zs=js.addDanglingComment,Ks=js.addTrailingComment,Xs=js.skipNewline,Js=js.hasNewline,qs=js.hasNewlineInRange,Zs=n.default.doc.builders,tr=Zs.concat,er=Zs.join,ir=Zs.indent,nr=Zs.hardline,sr=Zs.cursor,rr=Zs.lineSuffix,or=Zs.breakParent,ar=Ys.getNextNonSpaceNonCommentCharacterIndex,hr=Ys.isNextLineEmpty,lr=Ys.isPreviousLineEmpty,cr=Ys.isLookupNode;function ur(t,e){var i=t.children;0===i.length?zs(t,e):$s(i[0],e)}function _r(t,e){"block"===t.kind?ur(t,e):$s(t,e)}function dr(t,e,i,n,s,r){var o=ar(t,s,r),a=t.charAt(o);return e&&"identifier"===e.kind&&i&&("function"===i.kind||"method"===i.kind)&&")"===a?(Ks(i,s),!0):!(!i||"function"!==i.kind&&"method"!==i.kind||!n||"block"!==n.kind)&&(ur(n,s),!0)}function pr(t,e,i,n,s,r){if(!i||"if"!==i.kind||!n)return!1;var o=ar(t,s,r);return")"===t.charAt(o)?(Ks(e,s),!0):e===i.body&&n===i.alternate?(zs(i,s),!0):"if"===n.kind?(_r(n.body,s),!0):i.body===n&&($s(n,s),!0)}function fr(t,e,i){if(t&&["class","interface","trait"].includes(t.kind)){if(e&&t.extends)if(Array.isArray(t.extends)){if(t.extends.some((function(t){if(e&&e===t)return zs(e,i),!0})))return!0}else if(e===t.extends)return zs(e,i),!0;if(e&&t.implements&&t.implements.some((function(t){if(e&&e===t)return zs(e,i),!0})))return!0;if(!(t.body&&t.body.length>0))return zs(t,i),!0}return!!(e&&"class"===e.kind&&e.isAnonymous&&e.leadingComments&&"commentblock"===i.kind)}function Tr(t,e,i,n,s){if(e&&("function"===e.kind||"method"===e.kind)){for(var r=0,o=0;o<e.arguments.length;o++)r=s.locEnd(e.arguments[o])>r?s.locEnd(e.arguments[o]):r;var a=e.body&&s.locStart(n)>r&&s.locEnd(n)<s.locStart(e.body),h=ar(t,n,s);if(e.type&&a&&")"!==t.charAt(h))return s.locEnd(n)<s.locStart(e.type)?(zs(e.type,n),!0):(Ks(e.type,n),!0)}return!1}function kr(t,e,i,n,s){return!(!i||!["function","method","parameter"].includes(i.kind))&&("typereference"===e.kind&&"identifier"===n.kind&&(Ks(e,s),!0))}function Er(t,e){return!(!t||!["label","goto"].includes(t.kind))&&(Ks(t,e),!0)}function mr(t,e,i,n){return i&&"inline"===i.kind?(i.leadingComments||(i.leadingComments=[]),i.leadingComments.includes(n)||i.leadingComments.push(n),!0):!(t||i||!e||"inline"!==e.kind)&&(zs(e,n),!0)}function xr(t,e,i){return!(!t||"try"!==t.kind||!e)&&("block"===e.kind?(ur(e,i),!0):"try"===e.kind?(_r(e.always,i),!0):"catch"===e.kind&&(_r(e.body,i),!0))}function yr(t,e,i,n){return i||e||!t||"namespace"!==t.kind||t.withBrackets?!(e||!t||"namespace"!==t.kind||t.withBrackets)&&(zs(t,n),!0):(Ks(t,n),!0)}function vr(t,e,i,n){return!(!t||"declare"!==t.kind)&&((!e||"noop"!==e.kind)&&(i&&t.directives[0]!==i?!(!i||!e)&&($s(i,n),!0):("none"===t.mode?Ks(t,n):zs(t,n),!0)))}function Ar(t,e,i,n,s,r){if(!i||"while"!==i.kind||!n)return!1;var o=ar(t,s,r);return")"===t.charAt(o)?(Ks(e,s),!0):"block"===n.kind&&(ur(n,s),!0)}function gr(t,e){return t.getValue().printed=!0,e.printer.printComment(t,e)}function Nr(t,e,i){return t.getNode()===e.cursorNode&&t.getValue()?tr([sr,i,sr]):i}var Lr={handleOwnLineComment:function(t,e,i){var n=t.precedingNode,s=t.enclosingNode,r=t.followingNode;return dr(e,n,s,r,t,i)||function(t,e,i){if(t&&cr(t)&&e&&["identifier","variable","encapsed"].includes(e.kind))return $s(t,i),!0;return!1}(s,r,t)||pr(e,n,s,r,t,i)||Ar(e,n,s,r,t,i)||xr(s,r,t)||fr(s,r,t)||kr(e,n,s,r,t)||Tr(e,s,r,t,i)||function(t,e,i,n){if(!i&&t&&("for"===t.kind||"foreach"===t.kind))return t.body&&"block"!==t.body.kind?$s(i,n):$s(t,n),!0;return!1}(s,0,r,t)||mr(s,n,r,t)||vr(s,n,r,t)},handleEndOfLineComment:function(t,e,i){var n=t.precedingNode,s=t.enclosingNode,r=t.followingNode;return function(t,e,i,n,s){if(!e&&!n&&i&&"array"===i.kind)return Ks(i,s),!0;return!1}(0,n,s,r,t)||function(t,e,i,n,s){if(i&&"return"===i.kind&&!i.expr)return Ks(i,s),!0;return!1}(0,0,s,0,t)||dr(e,n,s,r,t,i)||function(t,e,i,n,s,r){var o=e&&!qs(s,r.locEnd(e),r.locStart(n));if((!e||!o)&&t&&"retif"===t.kind&&i)return $s(i,n),!0;return!1}(s,n,r,t,e,i)||pr(e,n,s,r,t,i)||Ar(e,n,s,r,t,i)||xr(s,r,t)||fr(s,r,t)||kr(e,n,s,r,t)||Tr(e,s,r,t,i)||function(t,e){if(t&&"entry"===t.kind)return $s(t,e),!0;return!1}(s,t)||function(t,e,i){if(e&&"call"===e.kind&&t&&e.what===t&&e.arguments.length>0)return $s(e.arguments[0],i),!0;return!1}(n,s,t)||function(t,e,i){if(t&&"assign"===t.kind&&e){var n=t.loc.start.offset+t.loc.source.indexOf("=");if(i.loc.start.offset>n)return $s(e,i),!0}return!1}(s,r,t)||mr(s,n,r,t)||yr(s,n,r,t)||vr(s,n,r,t)||Er(s,t)},handleRemainingComment:function(t,e,i){var n=t.precedingNode,s=t.enclosingNode,r=t.followingNode;return pr(e,n,s,r,t,i)||Ar(e,n,s,r,t,i)||function(t,e,i,n){var s=ar(t,i,n);if(")"!==t.charAt(s))return!1;if(e&&("function"===e.kind||"closure"===e.kind||"method"===e.kind||"call"===e.kind||"new"===e.kind)&&0===e.arguments.length)return zs(e,i),!0;return!1}(e,s,t,i)||fr(s,r,t)||function(t,e,i){if(t&&"traituse"===t.kind&&t.adaptations&&!t.adaptations.length)return zs(t,i),!0;return!1}(s,0,t)||kr(e,n,s,r,t)||Tr(e,s,r,t,i)||Er(s,t)||function(t,e,i,n){if(e&&"halt"===e.kind)return zs(e,n),!0;if(t&&"halt"===t.kind)return zs(t,n),!0;return!1}(n,s,0,t)||function(t,e){if(t&&("continue"===t.kind||"break"===t.kind)&&!t.label)return Ks(t,e),!0;return!1}(s,t)||mr(s,n,r,t)||yr(s,n,r,t)},getCommentChildNodes:function(t){return"object"!==a(t)?[]:function(t){return Object.keys(t).filter((function(t){return"kind"!==t&&"loc"!==t&&"errors"!==t&&"extra"!==t&&"comments"!==t&&"leadingComments"!==t&&"enclosingNode"!==t&&"precedingNode"!==t&&"followingNode"!==t})).map((function(e){return t[e]}))}(t)},canAttachComment:function(t){return t.kind&&"commentblock"!==t.kind&&"commentline"!==t.kind},isBlockComment:function(t){return"commentblock"===t.kind},printDanglingComments:function(t,e,i,n){var s=[],r=t.getValue();return r&&r.comments?(t.each((function(t){var i=t.getValue();!i||i.leading||i.trailing||n&&!n(i)||s.push(gr(t,e))}),"comments"),0===s.length?"":i?er(nr,s):ir(tr([nr,er(nr,s)]))):""},hasLeadingComment:function(t){return t.comments&&t.comments.some((function(t){return t.leading}))},hasTrailingComment:function(t){return t.comments&&t.comments.some((function(t){return t.trailing}))},hasLeadingOwnLineComment:function(t,e,i){return e.comments&&e.comments.some((function(e){return e.leading&&Js(t,i.locEnd(e))}))},printComments:function(t,e){var i=[];return t.forEach((function(t,n,s){t.printed=!0;var r=s.length===n+1;i.push(t.value),r||i.push(nr),hr(e.originalText,t,e)&&!r&&i.push(nr)})),tr(i)},printAllComments:function(t,e,i,n){var s=t.getValue(),r=e(t),o=s&&s.comments;if(!o||0===o.length)return Nr(t,i,r);var a=[],h=[n?";":"",r];return t.each((function(t){var e=t.getValue(),n=e.leading,s=e.trailing;if(n){var r=function(t,e,i){var n=t.getValue(),s=gr(t,i);if(!s)return"";var r=i.printer.isBlockComment&&i.printer.isBlockComment(n);return tr(r?[s,Js(i.originalText,i.locEnd(n))?nr:" "]:[s,nr])}(t,0,i);if(!r)return;a.push(r);var o=i.originalText;Js(o,Xs(o,i.locEnd(e)))&&a.push(nr)}else s&&h.push(function(t,e,i){var n=t.getValue(),s=gr(t,i);if(!s)return"";var r=i.printer.isBlockComment&&i.printer.isBlockComment(n);if(Js(i.originalText,i.locStart(n),{backwards:!0})){var o=lr(i.originalText,n,i);return rr(tr([nr,o?nr:"",s]))}return tr(r?[" ",s]:[rr(tr([" ",s])),r?"":or])}(t,0,i))}),"comments"),Nr(t,i,tr(a.concat(h)))}};function Cr(){}Cr.strictEqual=function(){};var br=Cr,Sr=Ys.getPrecedence,Ir=Ys.shouldFlatten,Or=Ys.isBitwiseOperator;var Rr=function(t){var e=t.getParentNode();if(!e)return!1;var i=t.getName(),n=t.getNode();if(["program","expressionstatement","namespace","declare","block","include","print","return","echo"].includes(e.kind))return!1;switch(n.kind){case"pre":case"post":if("unary"===e.kind)return"pre"===n.kind&&("+"===n.type&&"+"===e.type||"-"===n.type&&"-"===e.type);case"unary":switch(e.kind){case"unary":return n.type===e.type&&("+"===n.type||"-"===n.type);case"propertylookup":case"nullsafepropertylookup":case"staticlookup":case"offsetlookup":case"call":return"what"===i&&e.what===n;case"bin":return"**"===e.type&&"left"===i;default:return!1}case"bin":switch(e.kind){case"assign":case"retif":return["and","xor","or"].includes(n.type);case"silent":case"cast":return n.parenthesizedExpression;case"pre":case"post":case"unary":return!0;case"call":case"propertylookup":case"nullsafepropertylookup":case"staticlookup":case"offsetlookup":return"what"===i&&e.what===n;case"bin":var s=e.type,r=Sr(s),o=n.type,a=Sr(o);return r>a||("||"===s&&"&&"===o||(r===a&&"right"===i?(br.strictEqual(e.right,n),!0):r===a&&!Ir(s,o)||(r<a&&"%"===o?"+"===s||"-"===s:!!Or(s))));default:return!1}case"propertylookup":case"nullsafepropertylookup":case"staticlookup":return"call"===e.kind&&("what"===i&&e.what===n&&n.parenthesizedExpression);case"clone":case"new":switch(e.kind){case"propertylookup":case"nullsafepropertylookup":case"staticlookup":case"offsetlookup":case"call":return"what"===i&&e.what===n;default:return!1}case"yield":switch(e.kind){case"propertylookup":case"nullsafepropertylookup":case"staticlookup":case"offsetlookup":case"call":return"what"===i&&e.what===n;case"retif":return e.test===n;default:return!(!n.key&&!n.value)}case"assign":return("for"!==e.kind||!e.init.includes(n)&&!e.increment.includes(n))&&("assign"!==e.kind&&("static"!==e.kind&&(!["if","do","while","foreach","switch"].includes(e.kind)&&("silent"!==e.kind&&"call"!==e.kind))));case"retif":switch(e.kind){case"cast":return!0;case"unary":case"bin":case"retif":return!("test"===i&&!e.trueExpr);case"propertylookup":case"nullsafepropertylookup":case"staticlookup":case"offsetlookup":case"call":return"what"===i&&e.what===n;default:return!1}case"closure":switch(e.kind){case"call":return"what"===i&&e.what===n;case"propertylookup":case"nullsafepropertylookup":return!0;default:return!1}case"silence":case"cast":return n.parenthesizedExpression;case"string":case"array":switch(e.kind){case"propertylookup":case"nullsafepropertylookup":case"staticlookup":case"offsetlookup":case"call":return(!["string","array"].includes(n.kind)||"offsetlookup"!==e.kind)&&("what"===i&&e.what===n);default:return!1}case"print":case"include":return"bin"===e.kind}return!1},wr=n.default.doc.builders,Dr=wr.breakParent,Pr=wr.concat,Ur=wr.join,Mr=wr.line,Fr=wr.lineSuffix,Br=wr.group,Hr=wr.conditionalGroup,Gr=wr.indent,Vr=wr.dedent,Qr=wr.ifBreak,Wr=wr.hardline,Yr=wr.softline,jr=wr.literalline,$r=wr.align,zr=wr.dedentToRoot,Kr=n.default.doc.utils.willBreak,Xr=n.default.util,Jr=Xr.isNextLineEmptyAfterIndex,qr=Xr.hasNewline,Zr=Xr.hasNewlineInRange,to=Ys.getLast,eo=Ys.getPenultimate,io=Ys.isLastStatement,no=Ys.lineShouldEndWithSemicolon,so=Ys.printNumber,ro=Ys.shouldFlatten,oo=Ys.maybeStripLeadingSlashFromUse,ao=Ys.fileShouldEndWithHardline,ho=Ys.hasDanglingComments,lo=Ys.hasLeadingComment,co=Ys.hasTrailingComment,uo=Ys.docShouldHaveTrailingNewline,_o=Ys.isLookupNode,po=Ys.isFirstChildrenInlineNode,fo=Ys.shouldPrintHardLineAfterStartInControlStructure,To=Ys.shouldPrintHardLineBeforeEndInControlStructure,ko=Ys.getAlignment,Eo=Ys.isProgramLikeNode,mo=Ys.getNodeKindIncludingLogical,xo=Ys.useDoubleQuote,yo=Ys.hasEmptyBody,vo=Ys.isNextLineEmptyAfterNamespace,Ao=Ys.shouldPrintHardlineBeforeTrailingComma,go=Ys.isDocNode,No=Ys.getAncestorNode,Lo=Ys.isReferenceLikeNode,Co=Ys.getNextNode,bo=Ys.normalizeMagicMethodName,So=Ys.getNextNonSpaceNonCommentCharacterIndex,Io=Ys.isNextLineEmpty;function Oo(t,e){return parseFloat(t)>=parseFloat(e)}function Ro(t,e){return!!t.trailingCommaPHP&&Oo(t.phpVersion,e)}function wo(t){return"1tbs"!==t.braceStyle}function Do(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return Pr([n?"?":"","->",t.call(i,"offset")])}function Po(t,e,i){return Do(t,e,i,!0)}function Uo(t,e,i){var n=t.getValue(),s=!["variable","identifier"].includes(n.offset.kind);return Pr(["::",s?"{":"",t.call(i,"offset"),s?"}":""])}function Mo(t,e,i){var n=t.getValue(),s=n.offset&&"number"===n.offset.kind||No(t,"encapsed");return Pr(["[",n.offset?Br(Pr([Gr(Pr([s?"":Yr,t.call(i,"offset")])),s?"":Yr])):"","]"])}function Fo(t){return"array"===t.kind&&(t.items.length>0||t.comments)||"function"===t.kind||"method"===t.kind||"closure"===t.kind}function Bo(t){var e=to(t),i=eo(t);return!lo(e)&&!co(e)&&Fo(e)&&(!i||i.kind!==e.kind)}function Ho(t){if(2!==t.length)return!1;var e=l(t,2),i=e[0],n=e[1];return!(i.comments&&i.comments.length||"function"!==i.kind&&"method"!==i.kind&&"closure"!==i.kind||"retif"===n.kind||Fo(n))}function Go(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"arguments",s=t.getValue()[n];if(0===s.length)return Pr(["(",Lr.printDanglingComments(t,e,!0),")"]);var r=!1,o=!1,a=s.length-1,h=t.map((function(t,n){var s=t.getNode(),h=[i(t)];return n===a||(Io(e.originalText,s,e)?(0===n&&(o=!0),r=!0,h.push(",",Wr,Wr)):h.push(",",Mr)),Pr(h)}),n),l=t.getValue(),c=to(s),u=Ro(e,"7.3")&&["call","new","unset","isset"].includes(l.kind)||Ro(e,"8.0")&&["function","closure","method","arrowfunc","attribute"].includes(l.kind)?Gr(Pr([c&&Ao(c)?Wr:"",","])):"";function _(){return Br(Pr(["(",Gr(Pr([Mr,Pr(h)])),u,Mr,")"]),{shouldBreak:!0})}var d=Ho(s),p=Bo(s);if(d||p){var f,T=(d?h.slice(1).some(Kr):h.slice(0,-1).some(Kr))||r,k=0;t.each((function(t){d&&0===k&&(f=[Pr([t.call((function(t){return i(t,{expandFirstArg:!0})})),h.length>1?",":"",o?Wr:Mr,o?Wr:""])].concat(h.slice(1))),p&&k===s.length-1&&(f=h.slice(0,-1).concat(t.call((function(t){return i(t,{expandLastArg:!0})})))),k++}),n);var E=h.some(Kr),m=Pr(["(",Pr(f),")"]);return Pr([E?Dr:"",Hr([E?Qr(_(),m):m,Pr(d?["(",Br(f[0],{shouldBreak:!0}),Pr(f.slice(1)),")"]:["(",Pr(h.slice(0,-1)),Br(to(f),{shouldBreak:!0}),")"]),Br(Pr(["(",Gr(Pr([Mr,Pr(h)])),Qr(u),Mr,")"]),{shouldBreak:!0})],{shouldBreak:T})])}return Br(Pr(["(",Gr(Pr([Yr,Pr(h)])),Qr(u),Yr,")"]),{shouldBreak:h.some(Kr)||r})}function Vo(t){return"array"===t.kind&&0!==t.items.length}function Qo(t){return"array"===t.right.kind&&0!==t.right.items.length}function Wo(t,e,i,n,s){var r=[],o=t.getValue();if("bin"===o.kind){ro(o.type,o.left.type)?r=r.concat(t.call((function(t){return Wo(t,e,i,!0,s)}),"left")):r.push(t.call(e,"left"));var a=Qo(o),h=Pr(a?[o.type," ",t.call(e,"right")]:[o.type,Mr,t.call(e,"right")]),l=t.getParentNode(),c=!(s&&["||","&&"].includes(o.type))&&mo(l)!==mo(o)&&mo(o.left)!==mo(o)&&mo(o.right)!==mo(o),u=go(o.left)||"bin"===o.left.kind&&go(o.left.right);r.push(u?"":" ",c?Br(h):h),n&&o.comments&&(r=Lr.printAllComments(t,(function(){return Pr(r)}),i))}else r.push(t.call(e));return r}function Yo(t,e,i){var n=t.getValue();switch(n.kind){case"propertylookup":return Do(t,e,i);case"nullsafepropertylookup":return Po(t,e,i);case"staticlookup":return Uo(t,0,i);case"offsetlookup":return Mo(t,0,i);default:return"Have not implemented lookup kind ".concat(n.kind," yet.")}}function jo(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.opening,n=void 0===i||i;if("heredoc"===t.type)return n?"<<<".concat(t.label):t.label;var s={string:'"',shell:"`"};return s[t.type]?s[t.type]:"Unimplemented encapsed type ".concat(t.type)}function $o(t,e,i){var n=[],s=[];return t.each((function(t){n.push(Pr(s)),n.push(Br(i(t))),s=[",",Mr],t.getValue()&&Io(e.originalText,t.getValue(),e)&&s.push(Yr)}),"items"),Pr(n)}function zo(t,e){if(0===e.length)return t;var i=0;return e.reduce((function(e,n){var s=n.start,r=n.end,o=n.alignment,a=n.before,h=n.after,l=Pr([a||"",Pr(t.slice(s,r)),h||""]),c=e.concat(t.slice(i,s),o?zr(Br(Pr([$r(new Array(o).join(" "),l)]))):Br(l),r===t.length-1?t.slice(r):"");return i=r,c}),[])}function Ko(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"children",s=t.getValue(),r=t.getParentNode(),o=-1,a=[],h=[];t.map((function(l,c){var u=l.getValue(),_="inline"===u.kind,d=i(l),p=s[n],f=p[c+1],T=!io(l)&&!_&&(f&&"case"===f.kind?!po(t):f&&"inline"!==f.kind),k=Pr([d,T?Wr:"",T&&Io(e.originalText,u,e)?Wr:""]),E=0===c,m=p.length-1===c,x="block"===s.kind&&r&&["function","closure","method","try","catch"].includes(r.kind),y=x&&E?"":" ";if(_||!_&&m&&o>=0){var v=o;if(_&&(o=c),_&&!E||!_&&m){var A=(_?v:o)+1,g=m&&!_?c+1:c,N=p[_?v:o],L=N?ko(N.raw):"",C=g-A>1,b=C?x&&!N||Eo(s)&&0===A?"":Wr:"",S=C&&"halt"!==u.kind?x&&m?"":Wr:"";C&&(y=""),h.push({start:A,end:g,alignment:L,before:b,after:S})}}if(_){var I=f&&"echo"===f.kind&&f.shortForm?"<?=":"<?php",O=u.leadingComments&&u.leadingComments.length?Pr([E&&"namespace"!==s.kind&&!x?"<?php":"","namespace"!==s.kind&&x?"":Wr,Lr.printComments(u.leadingComments,e),Wr,"?>"]):Eo(s)&&E&&"namespace"!==s.kind?"":Pr([y,"?>"]),R=t.getNode(c+1),w=R&&R.children&&R.children.length,D=u.comments&&u.comments.length?Pr([I,Wr,w?Lr.printComments(u.comments,e):"",Wr,w?"?>":""]):Eo(s)&&m?"":Pr([I," "]);k=Pr([O,k,D])}a.push(k)}),n);var c=zo(a,h);if("program"===s.kind&&!s.extra.parseAsEval){var u=[],_=l(s.children,1),d=_[0],p=!d||"inline"!==d.kind;if(p){var f=e.originalText.trim().match(/^<\?(php|=)(\s+)?\S/),T=Pr([f&&f[2]&&f[2].includes("\n")?Pr([Wr,f[2].split("\n").length>2?Wr:""]):" ",s.comments?Lr.printComments(s.comments,e):""]),k=d&&"echo"===d.kind&&d.shortForm;u.push(Pr([k?"<?=":"<?php",T]))}u.push(Pr(c));var E=e.originalText.trim().endsWith("?>");if(E){var m=to(s.children),x=m?Pr([Zr(e.originalText.trimEnd(),e.locEnd(m),e.locEnd(s))?Wr:" ",Io(e.originalText,m,e)?Wr:""]):s.comments?Wr:"";u.push(Fr(Pr([x,"?>"])))}return Pr(u)}return Pr(c)}function Xo(t,e,i,n){return Pr(t.map((function(t){var n=[];return n.push(i(t)),io(t)||(n.push(Wr),Io(e.originalText,t.getValue(),e)&&n.push(Wr)),Pr(n)}),n))}function Jo(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"extends",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:" ",r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:" ",o=t.getValue(),a=ho(o[n])?Pr([Wr,t.call((function(t){return Lr.printDanglingComments(t,e,!0)}),n),Wr]):s,h=Array.isArray(o[n])?Br(Pr([Ur(",",t.map((function(t){var n=i(t);return ho(t.getValue())?Pr([Wr,Lr.printDanglingComments(t,e,!0),Wr,n]):Pr([r,n])}),n))])):Pr([r,t.call(i,n)]);return Gr(Pr([a,n,Kr(a)?Gr(h):h]))}function qo(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=n.inline,r=void 0!==s&&s,o=[];return t.getValue().attrGroups?(t.each((function(t){var n=["#["];!r&&o.length>0&&o.push(Wr),n.push(Yr),t.each((function(t){var s=t.getValue();n.length>2&&n.push(",",Mr);var r=[s.name];s.args.length>0&&r.push(Go(t,e,i,"args")),n.push(Br(Pr(r)))}),"attrs"),o.push(Br(Pr([Gr(Pr(n)),Qr(Ro(e,"8.0")?",":""),Yr,"]",r?Qr(Yr," "):""])))}),"attrGroups"),0===o.length?[]:[Pr([].concat(o,[r?"":Wr]))]):[]}function Zo(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"body",s=t.getValue();if(!s[n])return";";var r=t.call(i,n);return Pr([s.shortForm?":":" {",Gr(Pr(["block"!==s[n].kind||s[n].children&&s[n].children.length>0||s[n].comments&&s[n].comments.length>0?Pr([fo(t)?"switch"===s.kind?" ":"":Wr,r]):""])),"if"===s.kind&&"body"===n?"":Pr([To(t)?Wr:"",s.shortForm?Pr(["end",s.kind,";"]):"}"])])}function ta(t,e,i,n,s,r,o){if(!n)return e;var a=ia(t,n,s,r,o);return Br(Pr([e,i,a]))}function ea(t){return!!_o(t)&&(!("variable"!==t.what.kind&&!Lo(t.what))||ea(t.what))}function ia(t,e,i,n,s){var r=n?"&":"";if(Lr.hasLeadingOwnLineComment(s.originalText,e,s))return Gr(Pr([Wr,r,i]));var o="cast"===e.kind?e.expr:e;return"bin"===o.kind&&!Qo(o)||"retif"===o.kind&&(!o.trueExpr&&!Vo(o.falseExpr)||"bin"===o.test.kind&&!Qo(o.test))||("variable"===t.kind||"string"===t.kind||_o(t))&&("string"===o.kind&&!na(o)||ea(o))?Br(Gr(Pr([Mr,r,i]))):Pr([" ",r,i])}function na(t){return t.raw.includes("\n")}function sa(t,e,i){return("string"===t.kind||"encapsed"===t.kind&&("string"===t.type||"shell"===t.type))&&na(t)&&!qr(e,i.locStart(t),{backwards:!0})}function ra(t,e,i){return Br(Pr(t.map((function(n,s){return Pr(0===s?[t.call(e)]:[i,t.call(e)])}),"types")))}var oa=function(t,e,i){var n=t.getValue();if(!n)return"";if("string"==typeof n)return n;var s=function(t,e,i){var n=t.getValue();switch(n.kind){case"program":return Br(Pr([Ko(t,e,i),Lr.printDanglingComments(t,e,!0,(function(t){return!t.printed}))]));case"expressionstatement":return t.call(i,"expression");case"block":return Pr([Ko(t,e,i),Lr.printDanglingComments(t,e,!0)]);case"declare":var s=function(t){return Ur(", ",t.map((function(t){return Pr([i(t)])}),"directives"))};if(["block","short"].includes(n.mode))return Pr(["declare(",s(t),")","block"===n.mode?" {":":",n.children.length>0?Gr(Pr([Wr,Ko(t,e,i)])):"",Lr.printDanglingComments(t,e),Wr,"block"===n.mode?"}":"enddeclare;"]);var r=Co(t,n);return Pr(["declare(",s(t),")",r&&"inline"===r.kind?"":";"]);case"declaredirective":return Pr([t.call(i,"key"),"=",t.call(i,"value")]);case"namespace":return Pr(["namespace ",n.name&&"string"==typeof n.name?Pr([n.name,n.withBrackets?" ":""]):"",n.withBrackets?"{":";",ho(n)?Pr([" ",Lr.printDanglingComments(t,e,!0)]):"",n.children.length>0?n.withBrackets?Gr(Pr([Wr,Ko(t,e,i)])):Pr(["inline"===n.children[0].kind?"":Pr([Wr,vo(e.originalText,n,e.locStart)?Wr:""]),Ko(t,e,i)]):"",n.withBrackets?Pr([Wr,"}"]):""]);case"usegroup":return Br(Pr(["use ",n.type?Pr([n.type," "]):"",Gr(Pr([n.name?Pr([oo(n.name),"\\{",Yr]):"",Ur(Pr([",",Mr]),t.map((function(t){return Pr([i(t)])}),"items"))])),n.name?Pr([Qr(Ro(e,"7.2")?",":""),Yr,"}"]):""]));case"useitem":return Pr([n.type?Pr([n.type," "]):"",oo(n.name),ho(n)?Pr([" ",Lr.printDanglingComments(t,e,!0)]):"",n.alias?Pr([" as ",t.call(i,"alias")]):""]);case"class":case"enum":case"interface":case"trait":return function(t,e,i){var n=t.getValue(),s="class"===n.kind&&n.isAnonymous,r=qo(t,e,i,{inline:s}),o=s?[]:c(r);n.isFinal&&o.push("final ");n.isAbstract&&o.push("abstract ");o.push(s?"":n.kind),n.name&&o.push(" ",t.call(i,"name"));"enum"===n.kind&&n.valueType&&o.push(": ",t.call(i,"valueType"));n.extends&&n.implements?o.push(Hr([Pr([Jo(t,e,i,"extends"),Jo(t,e,i,"implements")]),Pr([Jo(t,e,i,"extends"),Jo(t,e,i,"implements"," ",Wr)]),Pr([Jo(t,e,i,"extends",Wr," "),Jo(t,e,i,"implements",Wr,n.implements.length>1?Wr:" ")])],{shouldBreak:ho(n.extends)})):(n.extends&&o.push(Hr([Jo(t,e,i,"extends"),Jo(t,e,i,"extends"," ",Wr),Jo(t,e,i,"extends",Wr,n.extends.length>1?Wr:" ")])),n.implements&&o.push(Hr([Jo(t,e,i,"implements"),Jo(t,e,i,"implements"," ",Wr),Jo(t,e,i,"implements",Wr,n.implements.length>1?Wr:" ")])));var a=Br(Pr([Br(Pr(o)),wo(e)?s?Mr:Wr:" "])),h=n.body&&0===n.body.length&&!ho(n),l=Pr(["{",Gr(Pr([h?"":Wr,Xo(t,e,i,"body")])),Lr.printDanglingComments(t,e,!0),s&&h?Yr:Wr,"}"]);return Pr([a,l])}(t,e,i);case"traitprecedence":return Pr([t.call(i,"trait"),"::",t.call(i,"method")," insteadof ",Ur(", ",t.map(i,"instead"))]);case"traitalias":return Pr([n.trait?Pr([t.call(i,"trait"),"::"]):"",n.method?t.call(i,"method"):""," as ",Ur(" ",[].concat(c(n.visibility?[n.visibility]:[]),c(n.as?[t.call(i,"as")]:[])))]);case"traituse":return Br(Pr(["use ",Gr(Br(Ur(Pr([",",Mr]),t.map(i,"traits")))),n.adaptations?Pr([" {",n.adaptations.length>0?Pr([Gr(Pr([Wr,Xo(t,e,i,"adaptations")])),Wr]):ho(n)?Pr([Mr,Lr.printDanglingComments(t,e,!0),Mr]):"","}"]):""]));case"function":case"closure":case"method":return function(t,e,i){var n=t.getValue(),s=c(qo(t,e,i,{inline:"closure"===n.kind}));n.isFinal&&s.push("final ");n.isAbstract&&s.push("abstract ");n.visibility&&s.push(n.visibility," ");n.isStatic&&s.push("static ");s.push("function "),n.byref&&s.push("&");n.name&&s.push(t.call(i,"name"));s.push(Go(t,e,i)),n.uses&&n.uses.length>0&&s.push(Br(Pr([" use ",Go(t,e,i,"uses")])));n.type&&s.push(Pr([": ",ho(n.type)?Pr([t.call((function(t){return Lr.printDanglingComments(t,e,!0)}),"type")," "]):"",n.nullable?"?":"",t.call(i,"type")]));var r=Pr(s);if(!n.body)return r;var o="closure"===n.kind,a=Pr(["{",Gr(Pr([yo(t)?"":Wr,t.call(i,"body")])),o&&yo(t)?"":Wr,"}"]);if(o)return Pr([r," ",a]);if(0===n.arguments.length)return Pr([r,wo(e)?Wr:" ",a]);if(s.some(Kr))return Pr([r," ",a]);return Hr([Pr([r,wo(e)?Wr:" ",a]),Pr([r," ",a])])}(t,e,i);case"arrowfunc":return Pr([].concat(c(qo(t,e,i,{inline:!0})),[n.isStatic?"static ":"","fn",Go(t,e,i),n.type?Pr([": ",n.nullable?"?":"",t.call(i,"type")]):""," => ",t.call(i,"body")]));case"parameter":var o="";1===n.flags?o="public ":2===n.flags?o="protected ":4===n.flags&&(o="private ");var a=Pr([].concat(c(qo(t,e,i,{inline:!0})),[o,n.readonly?"readonly ":"",n.nullable?"?":"",n.type?Pr([t.call(i,"type")," "]):"",n.byref?"&":"",n.variadic?"...":"","$",t.call(i,"name")]));return n.value?Br(Pr([a,ho(n)?" ":"",Lr.printDanglingComments(t,e,!0),Pr([" =",ia(n.name,n.value,t.call(i,"value"),!1,e)])])):a;case"variadic":return Pr(["...",t.call(i,"what")]);case"property":return Br(Pr([n.readonly?"readonly ":"",n.type?Pr([n.nullable?"?":"",t.call(i,"type")," "]):"","$",t.call(i,"name"),n.value?Pr([" =",ia(n.name,n.value,t.call(i,"value"),!1,e)]):""]));case"propertystatement":var h=[];t.map((function(t){return h.push.apply(h,c(qo(t,e,i)))}),"properties");var u,_=t.map((function(t){return i(t)}),"properties"),d=n.properties.some((function(t){return t.value}));if(1!==_.length||n.properties[0].comments)_.length>0&&(u=Gr(_[0]));else u=l(_,1)[0];var p=n.visibility||null===n.visibility;return Br(Pr([].concat(h,[p?Pr([null===n.visibility?"var":n.visibility,""]):"",n.isStatic?Pr([p?" ":"","static"]):"",u?Pr([" ",u]):"",Gr(Pr(_.slice(1).map((function(t){return Pr([",",d?Wr:Mr,t])}))))])));case"if":var f=[],T=Zo(t,e,i,"body"),k=Br(Pr(["if (",Br(Pr([Gr(Pr([Yr,t.call(i,"test")])),Yr])),")",T]));if(f.push(k,po(t)||!n.body?"":Wr),n.alternate){f.push(n.shortForm?"":"} ");var E=co(n.body)&&n.body.comments.some((function(t){return t.trailing&&!Lr.isBlockComment(t)}))||function(t){if(!t.comments)return!1;var e=to(t.comments.filter((function(t){return!t.leading&&!t.trailing})));return e&&!Lr.isBlockComment(e)}(n),m=!E;f.push(m?"":Wr),ho(n)&&f.push(Io(e.originalText,n.body,e)?Wr:"",Lr.printDanglingComments(t,e,!0),E?Wr:" "),f.push("else",Br("if"===n.alternate.kind?t.call(i,"alternate"):Zo(t,e,i,"alternate")))}else f.push(n.body?n.shortForm?"endif;":"}":"");return Pr(f);case"do":return Pr(["do",Zo(t,e,i,"body")," while (",Br(Pr([Gr(Pr([Yr,t.call(i,"test")])),Yr])),")"]);case"while":case"switch":return Br(Pr([n.kind," (",Br(Pr([Gr(Pr([Yr,t.call(i,"test")])),Yr])),")",Zo(t,e,i,"body")]));case"for":var x=Zo(t,e,i,"body"),y=Lr.printDanglingComments(t,e,!0),v=y?Pr([y,Yr]):"";return n.init.length||n.test.length||n.increment.length?Pr([v,Br(Pr(["for (",Br(Pr([Gr(Pr([Yr,Br(Pr([Ur(Pr([",",Mr]),t.map(i,"init"))])),";",Mr,Br(Pr([Ur(Pr([",",Mr]),t.map(i,"test"))])),";",Mr,Br(Ur(Pr([",",Mr]),t.map(i,"increment")))])),Yr])),")",x]))]):Pr([v,Br(Pr(["for (;;)",x]))]);case"foreach":var A=Zo(t,e,i,"body"),g=Lr.printDanglingComments(t,e,!0),N=g?Pr([g,Yr]):"";return Pr([N,Br(Pr(["foreach (",Br(Pr([Gr(Pr([Yr,t.call(i,"source"),Mr,"as ",Br(n.key?Gr(Ur(Pr([" =>",Mr]),[t.call(i,"key"),t.call(i,"value")])):t.call(i,"value"))])),Yr])),")",A]))]);case"try":var L=[];return L.push("try",Zo(t,e,i,"body")),n.catches&&L.push(Pr(t.map(i,"catches"))),n.always&&L.push(" finally",Zo(t,e,i,"always")),Pr(L);case"catch":return Pr([" catch",n.what?Pr([" (",Ur(" | ",t.map(i,"what")),n.variable?Pr([" ",t.call(i,"variable")]):"",")"]):"",Zo(t,e,i,"body")]);case"case":return Pr([n.test?Pr(["case ",n.test.comments?Gr(t.call(i,"test")):t.call(i,"test"),":"]):"default:",n.body&&n.body.children&&n.body.children.length?Gr(Pr([po(t)?"":Wr,t.call(i,"body")])):""]);case"break":case"continue":return n.level&&("number"===n.level.kind&&"1"!==n.level.value)?Pr(["".concat(n.kind," "),t.call(i,"level")]):n.kind;case"call":return 1===n.arguments.length&&sa(n.arguments[0],e.originalText,e)?Pr([t.call(i,"what"),Pr(["(",Ur(", ",t.map(i,"arguments")),")"])]):_o(n.what)?function(t,e,i){var n=[];function s(t){var i=e.originalText,n=So(i,t,e);return")"===i.charAt(n)?Jr(i,n+1,e):Io(i,t,e)}function r(t){var o=t.getValue();if("call"!==o.kind||!_o(o.what)&&"call"!==o.what.kind)if(_o(o)){var a=null;a="propertylookup"===o.kind?Do(t,e,i):"nullsafepropertylookup"===o.kind?Po(t,e,i):"staticlookup"===o.kind?Uo(t,e,i):Mo(t,e,i),n.unshift({node:o,needsParens:Rr(t),printed:Lr.printAllComments(t,(function(){return a}),e)}),t.call((function(t){return r(t)}),"what")}else n.unshift({node:o,printed:t.call(i)});else n.unshift({node:o,printed:Pr([Lr.printAllComments(t,(function(){return Pr([Go(t,e,i)])}),e),s(o)?Wr:""])}),t.call((function(t){return r(t)}),"what")}var o=t.getValue();n.unshift({node:o,printed:Go(t,e,i)}),t.call((function(t){return r(t)}),"what");for(var a=0;a<n.length;++a)"call"===n[a].node.kind&&n[a-1]&&["propertylookup","nullsafepropertylookup","staticlookup"].includes(n[a-1].node.kind)&&n[a-1].needsParens&&(n[0].printed=Pr(["(",n[0].printed]),n[a-1].printed=Pr([n[a-1].printed,")"]));for(var h=[],l=[n[0]],c=1;c<n.length&&("call"===n[c].node.kind||_o(n[c].node)&&n[c].node.offset&&"number"===n[c].node.offset.kind);++c)l.push(n[c]);if("call"!==n[0].node.kind)for(;c+1<n.length&&(_o(n[c].node)&&_o(n[c+1].node));++c)l.push(n[c]);h.push(l),l=[];for(var u=!1;c<n.length;++c){if(u&&_o(n[c].node)){if("offsetlookup"===n[c].node.kind&&n[c].node.offset&&"number"===n[c].node.offset.kind){l.push(n[c]);continue}h.push(l),l=[],u=!1}"call"===n[c].node.kind&&(u=!0),l.push(n[c]),n[c].node.comments&&Lr.hasTrailingComment(n[c].node)&&(h.push(l),l=[],u=!1)}l.length>0&&h.push(l);function _(t){var i=t[1].length&&"offsetlookup"===t[1][0].node.kind;if(1===t[0].length){var n=t[0][0].node;return"variable"===n.kind&&("this"===n.name||d&&s(n.name))||Lo(n)}function s(t){return t.length<e.tabWidth}var r=to(t[0]).node;return _o(r)&&("identifier"===r.offset.kind||"variable"===r.offset.kind)&&i}var d="expressionstatement"===t.getParentNode().kind,p=h.length>=2&&!h[1][0].node.comments&&_(h);function f(t){for(var e=[],i=0;i<t.length;i++)t[i+1]&&t[i+1].needsParens?(e.push("(",t[i].printed,t[i+1].printed,")"),i++):e.push(t[i].printed);return Pr(e)}function T(t){return 0===t.length?"":Gr(Br(Pr([Wr,Ur(Wr,t.map(f))])))}var k=h.map(f),E=Pr(k),m=p?3:2,x=h.slice(0,m).reduce((function(t,e){return t.concat(e)}),[]),y=x.slice(1,-1).some((function(t){return Lr.hasLeadingComment(t.node)}))||x.slice(0,-1).some((function(t){return Lr.hasTrailingComment(t.node)}))||h[m]&&Lr.hasLeadingComment(h[m][0].node),v=No(t,"encapsed");if(h.length<=m&&!y||v)return Br(E);var A=to(p?h.slice(1,2)[0]:h[0]).node,g="call"!==A.kind&&s(A),N=Pr([f(h[0]),p?Pr(h.slice(1,2).map(f)):"",g?Wr:"",T(h.slice(p?2:1))]),L=n.filter((function(t){return"call"===t.node.kind})).length;if(y||L>=3||k.slice(0,-1).some(Kr))return Br(N);return Pr([Kr(E)||g?Dr:"",Hr([E,N])])}(t,e,i):Pr([t.call(i,"what"),Go(t,e,i)]);case"new":var C=n.what&&"class"===n.what.kind&&n.what.isAnonymous;if(!C&&1===n.arguments.length&&sa(n.arguments[0],e.originalText,e))return Pr(["new "].concat(c(t.call(qo,"what")),[t.call(i,"what"),"(",Ur(", ",t.map(i,"arguments")),")"]));var b=[];if(b.push("new "),C)b.push.apply(b,[n.what.leadingComments&&"commentblock"===n.what.leadingComments[0].kind?Pr([Lr.printComments(n.what.leadingComments,e)," "]):""].concat(c(t.call((function(t){return qo(t,e,i,{inline:!0})}),"what")),["class",n.arguments.length>0?Pr([" ",Go(t,e,i)]):"",Br(t.call(i,"what"))]));else{var S=Pr([t.call(i,"what"),Go(t,e,i)]);b.push(lo(n.what)?Gr(S):S)}return Pr(b);case"clone":return Pr(["clone ",n.what.comments?Gr(t.call(i,"what")):t.call(i,"what")]);case"propertylookup":case"nullsafepropertylookup":case"staticlookup":case"offsetlookup":var I,O=t.getParentNode(),R=0;do{I=t.getParentNode(R),R++}while(I&&_o(I));var w=No(t,"encapsed")||I&&("new"===I.kind||"assign"===I.kind&&"variable"!==I.left.kind)||"offsetlookup"===n.kind||(Lo(n.what)||"variable"===n.what.kind)&&["identifier","variable","encapsedpart"].includes(n.offset.kind)&&O&&!_o(O);return Pr([t.call(i,"what"),w?Yo(t,e,i):Br(Gr(Pr([Yr,Yo(t,e,i)])))]);case"exit":return Br(Pr([n.useDie?"die":"exit","(",n.expression?sa(n.expression,e.originalText,e)?t.call(i,"expression"):Pr([Gr(Pr([Yr,t.call(i,"expression")])),Yr]):Lr.printDanglingComments(t,e),")"]));case"global":return Br(Pr(["global ",Gr(Pr([Ur(Pr([",",Mr]),t.map(i,"items"))]))]));case"include":return Pr([n.require?"require":"include",n.once?"_once":""," ",n.target.comments?Gr(t.call(i,"target")):t.call(i,"target")]);case"label":return Pr([t.call(i,"name"),":"]);case"goto":return Pr(["goto ",t.call(i,"label")]);case"throw":return Pr(["throw ",n.what.comments?Gr(t.call(i,"what")):t.call(i,"what")]);case"silent":return Pr(["@",t.call(i,"expr")]);case"halt":return Pr([ho(n)?Pr([Lr.printDanglingComments(t,e,!0),Wr]):"","__halt_compiler();",n.after]);case"eval":return Br(Pr(["eval(",sa(n.source,e.originalText,e)?t.call(i,"source"):Pr([Gr(Pr([Yr,t.call(i,"source")])),Yr]),")"]));case"echo":var D,P=t.map((function(t){return i(t)}),"expressions");if(1!==P.length||n.expressions[0].comments)P.length>0&&(D=go(n.expressions[0])||n.expressions[0].comments?Gr(P[0]):Vr(P[0]));else D=l(P,1)[0];return Br(Pr([n.shortForm?"":"echo ",D||"",Gr(Pr(P.slice(1).map((function(t){return Pr([",",Mr,t])}))))]));case"print":return Pr(["print ",n.expression.comments?Gr(t.call(i,"expression")):t.call(i,"expression")]);case"return":var U=[];if(U.push("return"),n.expr){var M=t.call(i,"expr");U.push(" ",n.expr.comments?Gr(M):M)}return ho(n)&&U.push(" ",Lr.printDanglingComments(t,e,!0)),Pr(U);case"isset":case"unset":return Br(Pr([n.kind,Go(t,e,i,"variables")]));case"empty":return Br(Pr(["empty(",Gr(Pr([Yr,t.call(i,"expression")])),Yr,")"]));case"variable":var F=t.getParentNode(),B=t.getParentNode(1),H="assign"===F.kind?"":n.byref?"&":"",G="encapsedpart"===F.kind&&"simple"===F.syntax&&F.curly||B&&"offsetlookup"===F.kind&&"encapsedpart"===B.kind&&"simple"===B.syntax&&B.curly?"":"$",V=n.curly?"{":"",Q=n.curly?"}":"";return Pr([H,G,V,t.call(i,"name"),Q]);case"constantstatement":case"classconstant":var W,Y=qo(t,e,i),j=t.map((function(t){return i(t)}),"constants");if(1!==j.length||n.constants[0].comments)j.length>0&&(W=Gr(j[0]));else W=l(j,1)[0];return Br(Pr([].concat(c(Y),[n.visibility?Pr([n.visibility," "]):"","const",W?Pr([" ",W]):"",Gr(Pr(j.slice(1).map((function(t){return Pr([",",Wr,t])}))))])));case"constant":return ta(n.name,t.call(i,"name")," =",n.value,t.call(i,"value"),!1,e);case"static":var $,z=t.map((function(t){return i(t)}),"variables"),K=n.variables.some((function(t){return t.defaultValue}));if(1!==z.length||n.variables[0].comments)z.length>0&&($=Gr(z[0]));else $=l(z,1)[0];return Br(Pr(["static",$?Pr([" ",$]):"",Gr(Pr(z.slice(1).map((function(t){return Pr([",",K?Wr:Mr,t])}))))]));case"staticvariable":return ta(n.variable,t.call(i,"variable")," =",n.defaultValue,t.call(i,"defaultValue"),!1,e);case"list":case"array":var X="array"===n.kind&&Oo(e.phpVersion,"5.4")||"list"===n.kind&&(n.shortForm||Oo(e.phpVersion,"7.1")),J=X?"[":Pr([n.kind,"("]),q=X?"]":")";if(0===n.items.length)return ho(n)?Br(Pr([J,Lr.printDanglingComments(t,e),Yr,q])):Pr([J,q]);var Z=to(n.items),tt=Z&&"noop"===Z.kind,et=l(n.items.filter((function(t){return"noop"!==t.kind})).sort((function(t,i){return e.locStart(t)-e.locStart(i)})),1)[0],it=!(!et||!et.key)&&et&&Zr(e.originalText,e.locStart(n),e.locStart(et));return Br(Pr([J,Gr(Pr([Yr,$o(t,e,i)])),tt?",":"",Qr(!tt&&Ro(e,"5.0")?Pr([Z&&Ao(Z)?Wr:"",","]):""),Lr.printDanglingComments(t,e,!0),Yr,q]),{shouldBreak:it});case"entry":var nt=n.byRef?"&":"",st=n.unpack?"...":"";return n.key?ta(n.key,t.call(i,"key")," =>",n.value,t.call(i,"value"),nt,e):Pr([nt,st,t.call(i,"value")]);case"yield":var rt=Pr([n.key?Pr([t.call(i,"key")," => "]):"",t.call(i,"value")]);return Pr(["yield",n.key||n.value?" ":"",n.value&&n.value.comments?Gr(rt):rt]);case"yieldfrom":return Pr(["yield from ",n.value.comments?Gr(t.call(i,"value")):t.call(i,"value")]);case"unary":return Pr([n.type,t.call(i,"what")]);case"pre":return Pr([n.type+n.type,t.call(i,"what")]);case"post":return Pr([t.call(i,"what"),n.type+n.type]);case"cast":return Pr(["(",n.type,") ",n.expr.comments?Gr(t.call(i,"expr")):t.call(i,"expr")]);case"assignref":case"assign":var ot="assignref"===n.kind;return ta(n.left,t.call(i,"left"),Pr([" ",ot?"=":n.operator]),n.right,t.call(i,"right"),ot,e);case"bin":var at=t.getParentNode(),ht=t.getParentNode(1),lt=n!==at.body&&("if"===at.kind||"while"===at.kind||"switch"===at.kind||"do"===at.kind),ct=Wo(t,i,e,!1,lt);if(lt)return Pr(ct);if("unary"===at.kind||_o(at)&&"offsetlookup"!==at.kind)return Br(Pr([Gr(Pr([Yr,Pr(ct)])),Yr]));var ut=n!==at.body&&"for"===at.kind||"retif"===at.kind&&ht&&"return"!==ht.kind,_t=["assign","property","constant","staticvariable","entry"].includes(at.kind),dt="bin"===n.left.kind&&ro(n.type,n.left.type);if(ut||Qo(n)&&!dt||!Qo(n)&&_t)return Br(Pr(ct));var pt=Pr(ct.slice(1));return Br(Pr([ct.length>0?ct[0]:"",Gr(pt)]));case"retif":var ft,Tt=[],kt=t.getParentNode(),Et=0;do{ft=t.getParentNode(Et),Et++}while(ft&&"retif"===ft.kind);var mt=ft||kt,xt="bin"===n.falseExpr.kind?Gr(t.call(i,"falseExpr")):t.call(i,"falseExpr"),yt=Pr([n.trueExpr?Mr:" ","?",n.trueExpr?Pr([" ","bin"===n.trueExpr.kind?Gr(t.call(i,"trueExpr")):t.call(i,"trueExpr"),Mr]):"",":",n.trueExpr?Pr([" ",xt]):Pr([Vo(n.falseExpr)?" ":Mr,xt])]);Tt.push(yt);var vt=function(t){return kt===mt?Br(t):t},At=t.getParentNode(1),gt="cast"===kt.kind&&At?At:kt,Nt=["propertylookup","nullsafepropertylookup","staticlookup"].includes(gt.kind),Lt=t.call(i,"test");if(!n.trueExpr){var Ct=Pr([Lt,"bin"===gt.kind||["print","echo","return","include"].includes(mt.kind)?Gr(Pr(Tt)):Pr(Tt)]);return"call"===gt.kind&&gt.what===n||"unary"===gt.kind||_o(gt)&&"offsetlookup"!==gt.kind?Br(Pr([Gr(Pr([Yr,Ct])),Yr])):vt(Ct)}return vt(Pr(["retif"===n.test.kind?Gr(Lt):Lt,Gr(Pr(Tt)),Nt?Yr:""]));case"boolean":return n.value?"true":"false";case"number":return so(n.value);case"string":if("encapsedpart"===t.getParentNode().kind){var bt=t.getParentNode(1),St=0,It=Oo(e.phpVersion,"7.3"),Ot=jr;if("heredoc"===bt.type){Ot=It?Wr:jr;var Rt=bt.raw.split(/\r?\n/g);-1===(St=Rt[Rt.length-1].search(/\S/))&&(St=Rt[Rt.length-2].search(/\S/))}return Ur(Ot,n.raw.split(/\r?\n/g).map((function(t,e){return e>0||0===n.loc.start.column?t.substring(St):t})))}var wt=xo(n,e)?'"':"'",Dt=n.raw;return"b"===n.raw[0]&&(Dt=Dt.slice(1)),['"',"'"].includes(Dt[0])&&(Dt=Dt.substr(1)),['"',"'"].includes(Dt[Dt.length-1])&&(Dt=Dt.substr(0,Dt.length-1)),Pr(["b"===n.raw[0]?"b":"",wt,Ur(jr,Dt.split(/\r?\n/g)),wt]);case"intersectiontype":return ra(t,i,"&");case"uniontype":return ra(t,i,"|");case"encapsedpart":var Pt="simple"===n.syntax&&n.curly||"complex"===n.syntax?Pr([n.curly?"$":"","{"]):"",Ut="simple"===n.syntax&&n.curly||"complex"===n.syntax?"}":"";return Pr([Pt,t.call(i,"expression"),Ut]);case"encapsed":switch(n.type){case"string":case"shell":case"heredoc":var Mt=Oo(e.phpVersion,"7.3")?Wr:jr;return Pr([jo(n),"heredoc"===n.type?Mt:"",Pr(t.map(i,"value")),jo(n,{opening:!1}),"heredoc"===n.type&&uo(t)?Wr:""]);default:return"Have not implemented kind ".concat(n.type," yet.")}case"inline":return Ur(jr,n.raw.replace("___PSEUDO_INLINE_PLACEHOLDER___","").split(/\r?\n/g));case"magic":return n.value;case"nowdoc":var Ft=Oo(e.phpVersion,"7.3")?Wr:jr;return Pr(["<<<'",n.label,"'",Ft,Ur(Ft,n.value.split(/\r?\n/g)),Ft,n.label,uo(t)?Wr:""]);case"name":return Pr(["rn"===n.resolution?"namespace\\":"",n.name]);case"literal":return t.call(i,"value");case"parentreference":return"parent";case"selfreference":return"self";case"staticreference":return"static";case"typereference":return n.name;case"nullkeyword":return"null";case"identifier":return"method"===t.getParentNode().kind&&(n.name=bo(n.name)),t.call(i,"name");case"match":var Bt=t.map((function(t,e){var n=null===t.getValue().conds?"default":Pr(t.map((function(t,e){return Br(Pr(e>0?[",",Mr,i(t)]:[i(t)]))}),"conds")),s=t.call(i,"body");return Pr(e>0?[", ",Mr,n," => ",s]:[Mr,n," => ",s])}),"arms");return Br(Pr(["match (",Br(Pr([Yr,Gr(Pr([t.call(i,"cond")])),Yr])),") {",Br(Gr(Pr([].concat(c(Bt),[e.trailingCommaPHP?Qr(","):""]))))," ",Yr,"}"]));case"noop":return n.comments?Lr.printComments(t.getValue().comments,e):"";case"namedargument":return Pr([n.name,": ",t.call(i,"value")]);case"enumcase":return Br(Pr(["case ",t.call(i,"name"),n.value?Pr([" =",ia(n.name,n.value,t.call(i,"value"),!1,e)]):""]));case"variadicplaceholder":return"...";default:return"Have not implemented kind ".concat(n.kind," yet.")}}(t,e,i),r=[],o=Rr(t);return o&&r.unshift("("),r.push(s),o&&r.push(")"),no(t)&&r.push(";"),ao(t)&&r.push(Wr),Pr(r)};var aa=function(t,e){if(["loc","range","raw","comments","leadingComments","trailingComments","parenthesizedExpression","parent","prev","start","end","tokens","errors","extra"].forEach((function(t){delete e[t]})),"string"===t.kind&&delete e.isDoubleQuote,["array","list"].includes(t.kind)&&delete e.shortForm,"inline"===t.kind){if(t.value.includes("___PSEUDO_INLINE_PLACEHOLDER___"))return null;e.value=e.value.replace(/\r\n?|\n/g,"")}if(("continue"===t.kind||"break"===t.kind)&&t.level){var i=e.level;"number"===i.kind&&(e.level="1"===i.value?null:i)}if("block"===t.kind&&1===t.children.length&&"block"===t.children[0].kind)for(;"block"===e.children[0].kind;)e.children=e.children[0].children;if("number"===t.kind&&(e.value=Ys.printNumber(t.value)),["foreach","for","if","while","do"].includes(t.kind)&&(t.body&&"block"!==t.body.kind?e.body={kind:"block",children:[e.body]}:e.body=e.body?e.body:null,t.alternate&&"block"!==t.alternate.kind?e.alternate={kind:"block",children:[e.alternate]}:e.alternate=e.alternate?e.alternate:null),"usegroup"===t.kind&&"string"==typeof t.name&&(e.name=e.name.replace(/^\\/,"")),"useitem"===t.kind&&(e.name=e.name.replace(/^\\/,"")),"method"===t.kind&&"identifier"===t.name.kind&&(e.name.name=Ys.normalizeMagicMethodName(e.name.name)),"noop"===t.kind)return null},ha="PHP",la={phpVersion:{since:"0.13.0",category:ha,type:"choice",default:"7.0",description:"Minimum target PHP version.",choices:[{value:"5.0"},{value:"5.1"},{value:"5.2"},{value:"5.3"},{value:"5.4"},{value:"5.5"},{value:"5.6"},{value:"7.0"},{value:"7.1"},{value:"7.2"},{value:"7.3"},{value:"7.4"},{value:"8.0"},{value:"8.1"}]},trailingCommaPHP:{since:"0.0.0",category:ha,type:"boolean",default:!0,description:"Print trailing commas wherever possible when multi-line."},braceStyle:{since:"0.10.0",category:ha,type:"choice",default:"psr-2",description:"Print one space or newline for code blocks (classes and functions).",choices:[{value:"psr-2",description:"Use PSR-2 brace style."},{value:"1tbs",description:"Use 1tbs brace style."}]}},ca=function(t,e,i,n){if("length"!==i&&"prototype"!==i&&"arguments"!==i&&"caller"!==i){var s=Object.getOwnPropertyDescriptor(t,i),r=Object.getOwnPropertyDescriptor(e,i);!ua(s,r)&&n||Object.defineProperty(t,i,r)}},ua=function(t,e){return void 0===t||t.configurable||t.writable===e.writable&&t.enumerable===e.enumerable&&t.configurable===e.configurable&&(t.writable||t.value===e.value)},_a=function(t,e){var i=Object.getPrototypeOf(e);i!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,i)},da=function(t,e){return"/* Wrapped ".concat(t,"*/\n").concat(e)},pa=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),fa=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),Ta=function(t,e,i){var n=""===i?"":"with ".concat(i.trim(),"() "),s=da.bind(null,n,e.toString());Object.defineProperty(s,"name",fa),Object.defineProperty(t,"toString",r(r({},pa),{},{value:s}))},ka=function(t,e){var i,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=n.ignoreNonConfigurable,r=void 0!==s&&s,o=t.name,a=d(Reflect.ownKeys(e));try{for(a.s();!(i=a.n()).done;){var h=i.value;ca(t,e,h,r)}}catch(t){a.e(t)}finally{a.f()}return _a(t,e),Ta(t,e,o),t},Ea="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ma(t){return t&&t.default||t}var xa,ya=function(){var t={};return t.promise=new Promise((function(e,i){t.resolve=e,t.reject=i})),t},va=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t,e){var i=Ea&&Ea.__awaiter||function(t,e,i,n){return new(i||(i=Promise))((function(s,r){function o(t){try{h(n.next(t))}catch(t){r(t)}}function a(t){try{h(n.throw(t))}catch(t){r(t)}}function h(t){t.done?s(t.value):new i((function(e){e(t.value)})).then(o,a)}h((n=n.apply(t,e||[])).next())}))},n=Ea&&Ea.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(ya);function r(t){var e,n,r,a=this,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"maxAge",l=function(){return i(a,void 0,void 0,o().mark((function a(){var l,c,u,_,p=this;return o().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(void 0===e){a.next=2;break}return a.abrupt("return");case 2:l=function(a){return i(p,void 0,void 0,o().mark((function i(){var l;return o().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(r=s.default(),!((l=a[1][h]-Date.now())<=0)){i.next=6;break}return t.delete(a[0]),r.resolve(),i.abrupt("return");case 6:return e=a[0],"function"==typeof(n=setTimeout((function(){t.delete(a[0]),r&&r.resolve()}),l)).unref&&n.unref(),i.abrupt("return",r.promise);case 10:case"end":return i.stop()}}),i)})))},a.prev=3,c=d(t),a.prev=5,c.s();case 7:if((u=c.n()).done){a.next=13;break}return _=u.value,a.next=11,l(_);case 11:a.next=7;break;case 13:a.next=18;break;case 15:a.prev=15,a.t0=a.catch(5),c.e(a.t0);case 18:return a.prev=18,c.f(),a.finish(18);case 21:a.next=25;break;case 23:a.prev=23,a.t1=a.catch(3);case 25:e=void 0;case 26:case"end":return a.stop()}}),a,null,[[3,23],[5,15,18,21]])})))},c=function(){e=void 0,void 0!==n&&(clearTimeout(n),n=void 0),void 0!==r&&(r.reject(void 0),r=void 0)},u=t.set.bind(t);return t.set=function(i,n){t.has(i)&&t.delete(i);var s=u(i,n);return e&&e===i&&c(),l(),s},l(),t}e.default=r,t.exports=r,t.exports.default=r}));(xa=va)&&xa.__esModule&&Object.prototype.hasOwnProperty.call(xa,"default")&&xa.default;var Aa=va,ga=new WeakMap,Na=new WeakMap,La=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.cacheKey,n=e.cache,s=void 0===n?new Map:n,r=e.maxAge;"number"==typeof r&&Aa(s);var o=function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];var a=i?i(n):n[0],h=s.get(a);if(h)return h.data;var l=t.apply(this,n);return s.set(a,{data:l,maxAge:r?Date.now()+r:Number.POSITIVE_INFINITY}),l};return ka(o,t,{ignoreNonConfigurable:!0}),Na.set(o,s),o};La.decorator=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e,i,n){var s=e[i];if("function"!=typeof s)throw new TypeError("The decorated value must be a function");delete n.value,delete n.writable,n.get=function(){if(!ga.has(this)){var e=La(s,t);return ga.set(this,e),e}return ga.get(this)}}},La.clear=function(t){var e=Na.get(t);if(!e)throw new TypeError("Can't clear a function that was not memoized!");if("function"!=typeof e.clear)throw new TypeError("The cache Map can't be cleared!");e.clear()};var Ca=/@prettier|@format/,ba=La((function(t){var e=As(t),i=l(e.children,1)[0],n=l(e.comments.filter((function(t){return"commentblock"===t.kind})),1)[0];if(i&&n&&n.loc.start.line<i.loc.start.line)return n}));var Sa=function(t){if(!Ca.test(t))return!1;var e=ba(t);if(e){var i=e.value;return Ca.test(i)}return!1},Ia=function(t){var e=ba(t);if(e){var i=e.loc,n=i.start.offset,s=i.end.offset,r=t.substring(0,n),o=t.substring(s);return"".concat(r).concat(function(t,e){var i=t.split(/\r?\n/g);if(1===i.length){var n=l(/\/*\*\*(.*)\*\//.exec(i[0]),2)[1];i=["/**"," * ".concat(n.trim())," */"]}var s=i.findIndex((function(t){return/@\S/.test(t)}))||1;return i.splice(s,0," * @format"),i.join(function(t){var e=t.indexOf("\n");return e>=0&&"\r"===t.charAt(e-1)?"\r\n":"\n"}(e))}(e.value,t)).concat(o)}var a="<?php";if(!t.startsWith(a))return t;var h=a.length,c=t.substring(0,h),u=t.substring(h);return"".concat(c,"\n/** \n * @format \n */\n").concat(u)},Oa="programming",Ra="text.html.php",wa="application/x-httpd-php",Da="#4F5D95",Pa=[".php",".aw",".ctp",".fcgi",".inc",".php3",".php4",".php5",".phps",".phpt"],Ua=[".php",".php_cs",".php_cs.dist","Phakefile"],Ma=["php"],Fa=["inc"],Ba={name:"PHP",type:Oa,tmScope:Ra,aceMode:"php",codemirrorMode:"php",codemirrorMimeType:wa,color:Da,extensions:Pa,filenames:Ua,interpreters:Ma,aliases:Fa,languageId:272},Ha=Object.freeze({__proto__:null,name:"PHP",type:Oa,tmScope:Ra,aceMode:"php",codemirrorMode:"php",codemirrorMimeType:wa,color:Da,extensions:Pa,filenames:Ua,interpreters:Ma,aliases:Fa,languageId:272,default:Ba}),Ga="HTML+PHP",Va="markup",Qa="text.html.php",Wa="HTML",Ya=[".phtml"],ja="application/x-httpd-php",$a={name:Ga,type:Va,tmScope:Qa,group:Wa,extensions:Ya,aceMode:"php",codemirrorMode:"php",codemirrorMimeType:ja,languageId:151},za=Object.freeze({__proto__:null,name:Ga,type:Va,tmScope:Qa,group:Wa,extensions:Ya,aceMode:"php",codemirrorMode:"php",codemirrorMimeType:ja,languageId:151,default:$a}),Ka=ma(Ha),Xa=ma(za),Ja=n.default.doc.builders,qa=Ja.join,Za=Ja.hardline,th=Sa,eh=Ia;function ih(t,e){var i=e.extend,n=e.override,s={};for(var r in t){s["languageId"===r?"linguistLanguageId":r]=t[r]}if(i)for(var o in i)s[o]=(s[o]||[]).concat(i[o]);for(var a in n)s[a]=n[a];return s}var nh=[ih(Ka,{override:{parsers:["php"],vscodeLanguageIds:["php"]}}),ih(Xa,{override:{parsers:["php"],vscodeLanguageIds:["php"]}})],sh=function(t){return function(e){return e.loc&&e.loc[t]&&e.loc[t].offset}},rh={php:{parse:As,astFormat:"php",locStart:sh("start"),locEnd:sh("end"),hasPragma:th}},oh={php:{print:oa,insertPragma:eh,massageAstNode:aa,getCommentChildNodes:Lr.getCommentChildNodes,canAttachComment:Lr.canAttachComment,isBlockComment:Lr.isBlockComment,handleComments:{ownLine:Lr.handleOwnLineComment,endOfLine:Lr.handleEndOfLineComment,remaining:Lr.handleRemainingComment},willPrintOwnComments:function(t){var e=t.getValue();return e&&"noop"===e.kind},printComment:function(t){var e=t.getValue();switch(e.kind){case"commentblock":if(!e.value.includes("\n"))return e.value;var i=e.value.split(/\r?\n/g);return i.slice(1,i.length-1).every((function(t){return"*"===t.trim()[0]}))?qa(Za,i.map((function(t,e){return(e>0?" ":"")+(e<i.length-1?t.trim():t.trimLeft())}))):e.value;case"commentline":return e.value.trimRight();default:throw new Error("Not a comment: ".concat(JSON.stringify(e)))}},hasPrettierIgnore:function(t){var e=function(t){return t.value.includes("prettier-ignore")&&!t.value.includes("prettier-ignore-start")&&!t.value.includes("prettier-ignore-end")},i=t.getParentNode(),n=t.getNode();return n&&"classconstant"!==n.kind&&n.comments&&n.comments.length>0&&n.comments.some(e)||n&&"constant"===n.kind&&i&&"classconstant"===i.kind&&i.comments&&i.comments.length>0&&i.comments.some(e)}}},ah={languages:nh,printers:oh,parsers:rh,options:la,defaultOptions:{tabWidth:4}},hh=ah.languages,lh=ah.printers,ch=ah.parsers,uh=ah.options,_h=ah.defaultOptions;t.default=ah,t.defaultOptions=_h,t.languages=hh,t.options=uh,t.parsers=ch,t.printers=lh,Object.defineProperty(t,"__esModule",{value:!0})}));
4
+ o=function(){return t};var t={},e=Object.prototype,i=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},s=n.iterator||"@@iterator",r=n.asyncIterator||"@@asyncIterator",a=n.toStringTag||"@@toStringTag";function h(t,e,i){return Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{h({},"")}catch(t){h=function(t,e,i){return t[e]=i}}function l(t,e,i,n){var s=e&&e.prototype instanceof _?e:_,r=Object.create(s.prototype),o=new g(n||[]);return r._invoke=function(t,e,i){var n="suspendedStart";return function(s,r){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===s)throw r;return L()}for(i.method=s,i.arg=r;;){var o=i.delegate;if(o){var a=y(o,i);if(a){if(a===u)continue;return a}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===n)throw n="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);n="executing";var h=c(t,e,i);if("normal"===h.type){if(n=i.done?"completed":"suspendedYield",h.arg===u)continue;return{value:h.arg,done:i.done}}"throw"===h.type&&(n="completed",i.method="throw",i.arg=h.arg)}}}(t,i,o),r}function c(t,e,i){try{return{type:"normal",arg:t.call(e,i)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var u={};function _(){}function d(){}function p(){}var f={};h(f,s,(function(){return this}));var T=Object.getPrototypeOf,k=T&&T(T(N([])));k&&k!==e&&i.call(k,s)&&(f=k);var E=p.prototype=_.prototype=Object.create(f);function m(t){["next","throw","return"].forEach((function(e){h(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(s,r,o,a){var h=c(t[s],t,r);if("throw"!==h.type){var l=h.arg,u=l.value;return u&&"object"==typeof u&&i.call(u,"__await")?e.resolve(u.__await).then((function(t){n("next",t,o,a)}),(function(t){n("throw",t,o,a)})):e.resolve(u).then((function(t){l.value=t,o(l)}),(function(t){return n("throw",t,o,a)}))}a(h.arg)}var s;this._invoke=function(t,i){function r(){return new e((function(e,s){n(t,i,e,s)}))}return s=s?s.then(r,r):r()}}function y(t,e){var i=t.iterator[e.method];if(void 0===i){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,y(t,e),"throw"===e.method))return u;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var n=c(i,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,u;var s=n.arg;return s?s.done?(e[t.resultName]=s.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,u):s:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,u)}function v(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function g(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(v,this),this.reset(!0)}function N(t){if(t){var e=t[s];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,r=function e(){for(;++n<t.length;)if(i.call(t,n))return e.value=t[n],e.done=!1,e;return e.value=void 0,e.done=!0,e};return r.next=r}}return{next:L}}function L(){return{value:void 0,done:!0}}return d.prototype=p,h(E,"constructor",p),h(p,"constructor",d),d.displayName=h(p,a,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,p):(t.__proto__=p,h(t,a,"GeneratorFunction")),t.prototype=Object.create(E),t},t.awrap=function(t){return{__await:t}},m(x.prototype),h(x.prototype,r,(function(){return this})),t.AsyncIterator=x,t.async=function(e,i,n,s,r){void 0===r&&(r=Promise);var o=new x(l(e,i,n,s),r);return t.isGeneratorFunction(i)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},m(E),h(E,a,"Generator"),h(E,s,(function(){return this})),h(E,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var i in t)e.push(i);return e.reverse(),function i(){for(;e.length;){var n=e.pop();if(n in t)return i.value=n,i.done=!1,i}return i.done=!0,i}},t.values=N,g.prototype={constructor:g,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(A),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(i,n){return o.type="throw",o.arg=t,e.next=i,n&&(e.method="next",e.arg=void 0),!!n}for(var s=this.tryEntries.length-1;s>=0;--s){var r=this.tryEntries[s],o=r.completion;if("root"===r.tryLoc)return n("end");if(r.tryLoc<=this.prev){var a=i.call(r,"catchLoc"),h=i.call(r,"finallyLoc");if(a&&h){if(this.prev<r.catchLoc)return n(r.catchLoc,!0);if(this.prev<r.finallyLoc)return n(r.finallyLoc)}else if(a){if(this.prev<r.catchLoc)return n(r.catchLoc,!0)}else{if(!h)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return n(r.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var s=this.tryEntries[n];if(s.tryLoc<=this.prev&&i.call(s,"finallyLoc")&&this.prev<s.finallyLoc){var r=s;break}}r&&("break"===t||"continue"===t)&&r.tryLoc<=e&&e<=r.finallyLoc&&(r=null);var o=r?r.completion:{};return o.type=t,o.arg=e,r?(this.method="next",this.next=r.finallyLoc,u):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),u},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),A(i),u}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var n=i.completion;if("throw"===n.type){var s=n.arg;A(i)}return s}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,i){return this.delegate={iterator:N(t),resultName:e,nextLoc:i},"next"===this.method&&(this.arg=void 0),u}},t}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function h(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==i)return;var n,s,r=[],o=!0,a=!1;try{for(i=i.call(t);!(o=(n=i.next()).done)&&(r.push(n.value),!e||r.length!==e);o=!0);}catch(t){a=!0,s=t}finally{try{o||null==i.return||i.return()}finally{if(a)throw s}}return r}(t,e)||u(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t){return function(t){if(Array.isArray(t))return _(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||u(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(t,e){if(t){if("string"==typeof t)return _(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_(t,e):void 0}}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function d(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=u(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,s=function(){};return{s:s,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,a=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return o=t.done,t},e:function(t){a=!0,r=t},f:function(){try{o||null==i.return||i.return()}finally{if(a)throw r}}}}var p={attributeIndex:0,attributeListDepth:{},matchST_ATTRIBUTE:function(){var t=this.input();if(this.is_WHITESPACE()){do{t=this.input()}while(this.is_WHITESPACE());return this.unput(1),null}switch(t){case"]":return 0===this.attributeListDepth[this.attributeIndex]?(delete this.attributeListDepth[this.attributeIndex],this.attributeIndex--,this.popState()):this.attributeListDepth[this.attributeIndex]--,"]";case"(":case")":case":":case"=":case"|":case"&":case"^":case"-":case"+":case"*":case"%":case"~":case"<":case">":case"!":return this.consume_TOKEN();case"[":return this.attributeListDepth[this.attributeIndex]++,"[";case",":return",";case'"':return this.ST_DOUBLE_QUOTES();case"'":return this.T_CONSTANT_ENCAPSED_STRING();case"/":return"/"===this._input[this.offset]?this.T_COMMENT():"*"===this._input[this.offset]?(this.input(),this.T_DOC_COMMENT()):this.consume_TOKEN()}if(this.is_LABEL_START()||"\\"===t){for(;this.offset<this.size;){var e=this.input();if(!this.is_LABEL()&&"\\"!==e){e&&this.unput(1);break}}return this.T_STRING()}if(this.is_NUM())return this.consume_NUM();throw new Error('Bad terminal sequence "'.concat(t,'" at line ').concat(this.yylineno," (offset ").concat(this.offset,")"))}};p.attributeIndex,p.attributeListDepth,p.matchST_ATTRIBUTE;var f={T_COMMENT:function(){for(;this.offset<this.size;){var t=this.input();if("\n"===t||"\r"===t)return this.tok.T_COMMENT;if("?"===t&&!this.aspTagMode&&">"===this._input[this.offset])return this.unput(1),this.tok.T_COMMENT;if("%"===t&&this.aspTagMode&&">"===this._input[this.offset])return this.unput(1),this.tok.T_COMMENT}return this.tok.T_COMMENT},T_DOC_COMMENT:function(){var t=this.input(),e=this.tok.T_COMMENT;if("*"===t){if(t=this.input(),this.is_WHITESPACE()&&(e=this.tok.T_DOC_COMMENT),"/"===t)return e;this.unput(1)}for(;this.offset<this.size;)if("*"===(t=this.input())&&"/"===this._input[this.offset]){this.input();break}return e}};f.T_COMMENT,f.T_DOC_COMMENT;var T={nextINITIAL:function(){return this.conditionStack.length>1&&"INITIAL"===this.conditionStack[this.conditionStack.length-1]?this.popState():this.begin("ST_IN_SCRIPTING"),this},matchINITIAL:function(){for(;this.offset<this.size;){var t=this.input();if("<"==t)if("?"==(t=this.ahead(1))){if(this.tryMatch("?=")){this.unput(1).appendToken(this.tok.T_OPEN_TAG_WITH_ECHO,3).nextINITIAL();break}if(this.tryMatchCaseless("?php")&&(" "===(t=this._input[this.offset+4])||"\t"===t||"\n"===t||"\r"===t)){this.unput(1).appendToken(this.tok.T_OPEN_TAG,6).nextINITIAL();break}if(this.short_tags){this.unput(1).appendToken(this.tok.T_OPEN_TAG,2).nextINITIAL();break}}else if(this.asp_tags&&"%"==t){if(this.tryMatch("%=")){this.aspTagMode=!0,this.unput(1).appendToken(this.tok.T_OPEN_TAG_WITH_ECHO,3).nextINITIAL();break}this.aspTagMode=!0,this.unput(1).appendToken(this.tok.T_OPEN_TAG,2).nextINITIAL();break}}return this.yytext.length>0&&this.tok.T_INLINE_HTML}};T.nextINITIAL,T.matchINITIAL;var k={consume_NUM:function(){var t=this.yytext[0],e="."===t;if("0"===t)if("x"===(t=this.input())||"X"===t){if("_"!==(t=this.input())&&this.is_HEX())return this.consume_HNUM();this.unput(t?2:1)}else if("b"===t||"B"===t){if("_"!==(t=this.input())&&"0"===t||"1"===t)return this.consume_BNUM();this.unput(t?2:1)}else this.is_NUM()||t&&this.unput(1);for(;this.offset<this.size;){var i=t;if("_"===(t=this.input())){if("_"===i){this.unput(2);break}if("."===i){this.unput(1);break}if("e"===i||"E"===i){this.unput(2);break}}else{if("."===t){if(e){this.unput(1);break}if("_"===i){this.unput(2);break}e=!0;continue}if("e"===t||"E"===t){if("_"===i){this.unput(1);break}var n=2;if("+"!==(t=this.input())&&"-"!==t||(n=3,t=this.input()),this.is_NUM_START())return this.consume_LNUM(),this.tok.T_DNUMBER;this.unput(t?n:n-1);break}}if(!this.is_NUM()){t&&this.unput(1);break}}return e?this.tok.T_DNUMBER:this.yytext.length<9||this.yytext.length<10||10==this.yytext.length&&this.yytext<"2147483648"?this.tok.T_LNUMBER:this.tok.T_DNUMBER},consume_HNUM:function(){for(;this.offset<this.size;){var t=this.input();if(!this.is_HEX()){t&&this.unput(1);break}}return this.tok.T_LNUMBER},consume_LNUM:function(){for(;this.offset<this.size;){var t=this.input();if(!this.is_NUM()){t&&this.unput(1);break}}return this.tok.T_LNUMBER},consume_BNUM:function(){for(var t;this.offset<this.size;)if("0"!==(t=this.input())&&"1"!==t&&"_"!==t){t&&this.unput(1);break}return this.tok.T_LNUMBER}};k.consume_NUM,k.consume_HNUM,k.consume_LNUM,k.consume_BNUM;var E={matchST_LOOKING_FOR_PROPERTY:function(){var t=this.input();if("-"===t){if(">"===(t=this.input()))return this.tok.T_OBJECT_OPERATOR;t&&this.unput(1)}else{if(this.is_WHITESPACE())return this.tok.T_WHITESPACE;if(this.is_LABEL_START())return this.consume_LABEL(),this.popState(),this.tok.T_STRING}return this.popState(),t&&this.unput(1),!1},matchST_LOOKING_FOR_VARNAME:function(){var t=this.input();if(this.popState(),this.begin("ST_IN_SCRIPTING"),this.is_LABEL_START()){if(this.consume_LABEL(),"["===(t=this.input())||"}"===t)return this.unput(1),this.tok.T_STRING_VARNAME;this.unput(this.yytext.length)}else t&&this.unput(1);return!1},matchST_VAR_OFFSET:function(){var t=this.input();if(this.is_NUM_START())return this.consume_NUM(),this.tok.T_NUM_STRING;if("]"===t)return this.popState(),"]";if("$"===t){if(this.input(),this.is_LABEL_START())return this.consume_LABEL(),this.tok.T_VARIABLE;throw new Error("Unexpected terminal")}if(this.is_LABEL_START())return this.consume_LABEL(),this.tok.T_STRING;if(this.is_WHITESPACE()||"\\"===t||"'"===t||"#"===t)return this.tok.T_ENCAPSED_AND_WHITESPACE;if("["===t||"{"===t||"}"===t||'"'===t||"`"===t||this.is_TOKEN())return t;throw new Error("Unexpected terminal")}};E.matchST_LOOKING_FOR_PROPERTY,E.matchST_LOOKING_FOR_VARNAME,E.matchST_VAR_OFFSET;var m={matchST_IN_SCRIPTING:function(){var t=this.input();switch(t){case" ":case"\t":case"\n":case"\r":case"\r\n":return this.T_WHITESPACE();case"#":return this.version>=800&&"["===this._input[this.offset]?(this.input(),this.attributeListDepth[++this.attributeIndex]=0,this.begin("ST_ATTRIBUTE"),this.tok.T_ATTRIBUTE):this.T_COMMENT();case"/":return"/"===this._input[this.offset]?this.T_COMMENT():"*"===this._input[this.offset]?(this.input(),this.T_DOC_COMMENT()):this.consume_TOKEN();case"'":return this.T_CONSTANT_ENCAPSED_STRING();case'"':return this.ST_DOUBLE_QUOTES();case"`":return this.begin("ST_BACKQUOTE"),"`";case"?":if(!this.aspTagMode&&this.tryMatch(">")){this.input();var e=this._input[this.offset];return"\n"!==e&&"\r"!==e||this.input(),this.conditionStack.length>1&&this.begin("INITIAL"),this.tok.T_CLOSE_TAG}return this.consume_TOKEN();case"%":return this.aspTagMode&&">"===this._input[this.offset]?(this.input(),"\n"!==(t=this._input[this.offset])&&"\r"!==t||this.input(),this.aspTagMode=!1,this.conditionStack.length>1&&this.begin("INITIAL"),this.tok.T_CLOSE_TAG):this.consume_TOKEN();case"{":return this.begin("ST_IN_SCRIPTING"),"{";case"}":return this.conditionStack.length>2&&this.popState(),"}";default:if("."===t){if(t=this.input(),this.is_NUM_START())return this.consume_NUM();t&&this.unput(1)}if(this.is_NUM_START())return this.consume_NUM();if(this.is_LABEL_START())return this.consume_LABEL().T_STRING();if(this.is_TOKEN())return this.consume_TOKEN()}throw new Error('Bad terminal sequence "'+t+'" at line '+this.yylineno+" (offset "+this.offset+")")},T_WHITESPACE:function(){for(;this.offset<this.size;){var t=this.input();if(" "!==t&&"\t"!==t&&"\n"!==t&&"\r"!==t){t&&this.unput(1);break}}return this.tok.T_WHITESPACE}};m.matchST_IN_SCRIPTING,m.T_WHITESPACE;var x=["\n","\r"],y=["\n","\r",";"],v=y.concat(["\t"," ",",","]",")","/","=","!"]),A={T_CONSTANT_ENCAPSED_STRING:function(){for(var t;this.offset<this.size;)if("\\"==(t=this.input()))this.input();else if("'"==t)break;return this.tok.T_CONSTANT_ENCAPSED_STRING},is_HEREDOC:function(){var t=this.offset;if("<"===this._input[this.offset-1]&&"<"===this._input[this.offset]&&"<"===this._input[this.offset+1]){if(this.offset+=3,this.is_TABSPACE())for(;this.offset<this.size&&(this.offset++,this.is_TABSPACE()););var e=this._input[this.offset-1];if("'"===e||'"'===e?this.offset++:e=null,this.is_LABEL_START()){for(var i=this.offset-1;this.offset<this.size&&(this.offset++,this.is_LABEL()););var n=this._input.substring(i,this.offset-1);if((!e||e===this._input[this.offset-1])&&(e&&this.offset++,x.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),"'"===e?this.begin("ST_NOWDOC"):this.begin("ST_HEREDOC"),this.prematch_ENDOFDOC(),this.tok.T_START_HEREDOC}}return this.offset=t,!1},ST_DOUBLE_QUOTES:function(){for(var t;this.offset<this.size;)if("\\"==(t=this.input()))this.input();else{if('"'==t)break;if("$"==t){if("{"==(t=this.input())||this.is_LABEL_START()){this.unput(2);break}t&&this.unput(1)}else if("{"==t){if("$"==(t=this.input())){this.unput(2);break}t&&this.unput(1)}}if('"'==t)return this.tok.T_CONSTANT_ENCAPSED_STRING;var e=1;return"b"!==this.yytext[0]&&"B"!==this.yytext[0]||(e=2),this.yytext.length>2&&this.appendToken(this.tok.T_ENCAPSED_AND_WHITESPACE,this.yytext.length-e),this.unput(this.yytext.length-e),this.begin("ST_DOUBLE_QUOTES"),this.yytext},isDOC_MATCH:function(t,e){var i=this._input[t-2];if(!x.includes(i))return!1;var n=!1,s=!1,r=0,o=this._input[t-1];if(this.version>=703){for(;"\t"===o||" "===o;)" "===o?n=!0:"\t"===o&&(s=!0),o=this._input[t+r],r++;if(t+=r,x.includes(this._input[t-1]))return!1}if(this._input.substring(t-1,t-1+this.heredoc_label.length)===this.heredoc_label.label){var a=this._input[t-1+this.heredoc_label.length];if((this.version>=703?v:y).includes(a)){if(e){if(this.consume(r),n&&s)throw new Error("Parse error: mixing spaces and tabs in ending marker at line "+this.yylineno+" (offset "+this.offset+")")}else this.heredoc_label.indentation=r,this.heredoc_label.indentation_uses_spaces=n,this.heredoc_label.first_encaps_node=!0;return!0}}return!1},prematch_ENDOFDOC:function(){this.heredoc_label.indentation_uses_spaces=!1,this.heredoc_label.indentation=0,this.heredoc_label.first_encaps_node=!0;for(var t=this.offset+1;t<this._input.length;){if(this.isDOC_MATCH(t,!1))return;if(!x.includes(this._input[t-1]))for(;!x.includes(this._input[t++])&&t<this._input.length;);t++}},matchST_NOWDOC:function(){if(this.isDOC_MATCH(this.offset,!0))return this.consume(this.heredoc_label.length),this.popState(),this.tok.T_END_HEREDOC;for(var t=this._input[this.offset-1];this.offset<this.size;)if(x.includes(t)){if(t=this.input(),this.isDOC_MATCH(this.offset,!0))return this.unput(1).popState(),this.appendToken(this.tok.T_END_HEREDOC,this.heredoc_label.length),this.tok.T_ENCAPSED_AND_WHITESPACE}else t=this.input();return this.tok.T_ENCAPSED_AND_WHITESPACE},matchST_HEREDOC:function(){var t=this.input();if(this.isDOC_MATCH(this.offset,!0))return this.consume(this.heredoc_label.length-1),this.popState(),this.tok.T_END_HEREDOC;for(;this.offset<this.size;)if("\\"===t&&(t=this.input(),x.includes(t)||(t=this.input())),x.includes(t)){if(t=this.input(),this.isDOC_MATCH(this.offset,!0))return this.unput(1).popState(),this.appendToken(this.tok.T_END_HEREDOC,this.heredoc_label.length),this.tok.T_ENCAPSED_AND_WHITESPACE}else if("$"===t){if("{"===(t=this.input()))return this.begin("ST_LOOKING_FOR_VARNAME"),this.yytext.length>2?(this.appendToken(this.tok.T_DOLLAR_OPEN_CURLY_BRACES,2),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):this.tok.T_DOLLAR_OPEN_CURLY_BRACES;if(this.is_LABEL_START()){var e=this.offset,i=this.consume_VARIABLE();return this.yytext.length>this.offset-e+2?(this.appendToken(i,this.offset-e+2),this.unput(this.offset-e+2),this.tok.T_ENCAPSED_AND_WHITESPACE):i}}else if("{"===t){if("$"===(t=this.input()))return this.begin("ST_IN_SCRIPTING"),this.yytext.length>2?(this.appendToken(this.tok.T_CURLY_OPEN,1),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):(this.unput(1),this.tok.T_CURLY_OPEN)}else t=this.input();return this.tok.T_ENCAPSED_AND_WHITESPACE},consume_VARIABLE:function(){this.consume_LABEL();var t=this.input();if("["==t)return this.unput(1),this.begin("ST_VAR_OFFSET"),this.tok.T_VARIABLE;if("-"===t){if(">"===this.input())return this.input(),this.is_LABEL_START()&&this.begin("ST_LOOKING_FOR_PROPERTY"),this.unput(3),this.tok.T_VARIABLE;this.unput(2)}else t&&this.unput(1);return this.tok.T_VARIABLE},matchST_BACKQUOTE:function(){var t=this.input();if("$"===t){if("{"===(t=this.input()))return this.begin("ST_LOOKING_FOR_VARNAME"),this.tok.T_DOLLAR_OPEN_CURLY_BRACES;if(this.is_LABEL_START())return this.consume_VARIABLE()}else if("{"===t){if("$"===this._input[this.offset])return this.begin("ST_IN_SCRIPTING"),this.tok.T_CURLY_OPEN}else if("`"===t)return this.popState(),"`";for(;this.offset<this.size;){if("\\"===t)this.input();else{if("`"===t){this.unput(1),this.popState(),this.appendToken("`",1);break}if("$"===t){if("{"===(t=this.input()))return this.begin("ST_LOOKING_FOR_VARNAME"),this.yytext.length>2?(this.appendToken(this.tok.T_DOLLAR_OPEN_CURLY_BRACES,2),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):this.tok.T_DOLLAR_OPEN_CURLY_BRACES;if(this.is_LABEL_START()){var e=this.offset,i=this.consume_VARIABLE();return this.yytext.length>this.offset-e+2?(this.appendToken(i,this.offset-e+2),this.unput(this.offset-e+2),this.tok.T_ENCAPSED_AND_WHITESPACE):i}continue}if("{"===t){if("$"===(t=this.input()))return this.begin("ST_IN_SCRIPTING"),this.yytext.length>2?(this.appendToken(this.tok.T_CURLY_OPEN,1),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):(this.unput(1),this.tok.T_CURLY_OPEN);continue}}t=this.input()}return this.tok.T_ENCAPSED_AND_WHITESPACE},matchST_DOUBLE_QUOTES:function(){var t=this.input();if("$"===t){if("{"===(t=this.input()))return this.begin("ST_LOOKING_FOR_VARNAME"),this.tok.T_DOLLAR_OPEN_CURLY_BRACES;if(this.is_LABEL_START())return this.consume_VARIABLE()}else if("{"===t){if("$"===this._input[this.offset])return this.begin("ST_IN_SCRIPTING"),this.tok.T_CURLY_OPEN}else if('"'===t)return this.popState(),'"';for(;this.offset<this.size;){if("\\"===t)this.input();else{if('"'===t){this.unput(1),this.popState(),this.appendToken('"',1);break}if("$"===t){if("{"===(t=this.input()))return this.begin("ST_LOOKING_FOR_VARNAME"),this.yytext.length>2?(this.appendToken(this.tok.T_DOLLAR_OPEN_CURLY_BRACES,2),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):this.tok.T_DOLLAR_OPEN_CURLY_BRACES;if(this.is_LABEL_START()){var e=this.offset,i=this.consume_VARIABLE();return this.yytext.length>this.offset-e+2?(this.appendToken(i,this.offset-e+2),this.unput(this.offset-e+2),this.tok.T_ENCAPSED_AND_WHITESPACE):i}t&&this.unput(1)}else if("{"===t){if("$"===(t=this.input()))return this.begin("ST_IN_SCRIPTING"),this.yytext.length>2?(this.appendToken(this.tok.T_CURLY_OPEN,1),this.unput(2),this.tok.T_ENCAPSED_AND_WHITESPACE):(this.unput(1),this.tok.T_CURLY_OPEN);t&&this.unput(1)}}t=this.input()}return this.tok.T_ENCAPSED_AND_WHITESPACE}};A.T_CONSTANT_ENCAPSED_STRING,A.is_HEREDOC,A.ST_DOUBLE_QUOTES,A.isDOC_MATCH,A.prematch_ENDOFDOC,A.matchST_NOWDOC,A.matchST_HEREDOC,A.consume_VARIABLE,A.matchST_BACKQUOTE,A.matchST_DOUBLE_QUOTES;var g={T_STRING:function(){var t=this.yytext.toLowerCase(),e=this.keywords[t];if("number"!=typeof e)if("yield"===t)this.version>=700&&this.tryMatch(" from")?(this.consume(5),e=this.tok.T_YIELD_FROM):e=this.tok.T_YIELD;else if(e=this.tok.T_STRING,"b"===t||"B"===t){var i=this.input();if('"'===i)return this.ST_DOUBLE_QUOTES();if("'"===i)return this.T_CONSTANT_ENCAPSED_STRING();i&&this.unput(1)}if(e===this.tok.T_ENUM){if(this.version<801)return this.tok.T_STRING;for(var n=this.offset,s=this.input();" "==s;)s=this.input();var r=!1;if(this.is_LABEL_START()){for(;this.is_LABEL();)s+=this.input();var o=s.slice(0,-1).toLowerCase();r="extends"!==o&&"implements"!==o}return this.unput(this.offset-n),r?this.tok.T_ENUM:this.tok.T_STRING}if(this.offset<this.size&&e!==this.tok.T_YIELD_FROM){var a=this.input();if("\\"===a){e="namespace"===t?this.tok.T_NAME_RELATIVE:this.tok.T_NAME_QUALIFIED;do{if("{"===this._input[this.offset]){this.input();break}this.consume_LABEL(),a=this.input()}while("\\"===a)}a&&this.unput(1)}return e},consume_TOKEN:function(){var t=this._input[this.offset-1],e=this.tokenTerminals[t];return e?e.apply(this,[]):this.yytext},tokenTerminals:{$:function(){return this.offset++,this.is_LABEL_START()?(this.offset--,this.consume_LABEL(),this.tok.T_VARIABLE):(this.offset--,"$")},"-":function(){var t=this._input[this.offset];return">"===t?(this.begin("ST_LOOKING_FOR_PROPERTY").input(),this.tok.T_OBJECT_OPERATOR):"-"===t?(this.input(),this.tok.T_DEC):"="===t?(this.input(),this.tok.T_MINUS_EQUAL):"-"},"\\":function(){if(this.offset<this.size){if(this.input(),this.is_LABEL_START()){var t;do{if("{"===this._input[this.offset]){this.input();break}this.consume_LABEL(),t=this.input()}while("\\"===t);return this.unput(1),this.tok.T_NAME_FULLY_QUALIFIED}this.unput(1)}return this.tok.T_NS_SEPARATOR},"/":function(){return"="===this._input[this.offset]?(this.input(),this.tok.T_DIV_EQUAL):"/"},":":function(){return":"===this._input[this.offset]?(this.input(),this.tok.T_DOUBLE_COLON):":"},"(":function(){var t=this.offset;if(this.input(),this.is_TABSPACE()&&this.consume_TABSPACE().input(),this.is_LABEL_START()){var e=this.yytext.length;this.consume_LABEL();var i=this.yytext.substring(e-1).toLowerCase(),n=this.castKeywords[i];if("number"==typeof n&&(this.input(),this.is_TABSPACE()&&this.consume_TABSPACE().input(),")"===this._input[this.offset-1]))return n}return this.unput(this.offset-t),"("},"=":function(){var t=this._input[this.offset];return">"===t?(this.input(),this.tok.T_DOUBLE_ARROW):"="===t?"="===this._input[this.offset+1]?(this.consume(2),this.tok.T_IS_IDENTICAL):(this.input(),this.tok.T_IS_EQUAL):"="},"+":function(){var t=this._input[this.offset];return"+"===t?(this.input(),this.tok.T_INC):"="===t?(this.input(),this.tok.T_PLUS_EQUAL):"+"},"!":function(){return"="===this._input[this.offset]?"="===this._input[this.offset+1]?(this.consume(2),this.tok.T_IS_NOT_IDENTICAL):(this.input(),this.tok.T_IS_NOT_EQUAL):"!"},"?":function(){return this.version>=700&&"?"===this._input[this.offset]?this.version>=704&&"="===this._input[this.offset+1]?(this.consume(2),this.tok.T_COALESCE_EQUAL):(this.input(),this.tok.T_COALESCE):this.version>=800&&"-"===this._input[this.offset]&&">"===this._input[this.offset+1]?(this.consume(2),this.tok.T_NULLSAFE_OBJECT_OPERATOR):"?"},"<":function(){var t=this._input[this.offset];return"<"===t?"="===(t=this._input[this.offset+1])?(this.consume(2),this.tok.T_SL_EQUAL):"<"===t&&this.is_HEREDOC()?this.tok.T_START_HEREDOC:(this.input(),this.tok.T_SL):"="===t?(this.input(),this.version>=700&&">"===this._input[this.offset]?(this.input(),this.tok.T_SPACESHIP):this.tok.T_IS_SMALLER_OR_EQUAL):">"===t?(this.input(),this.tok.T_IS_NOT_EQUAL):"<"},">":function(){var t=this._input[this.offset];return"="===t?(this.input(),this.tok.T_IS_GREATER_OR_EQUAL):">"===t?"="===(t=this._input[this.offset+1])?(this.consume(2),this.tok.T_SR_EQUAL):(this.input(),this.tok.T_SR):">"},"*":function(){var t=this._input[this.offset];return"="===t?(this.input(),this.tok.T_MUL_EQUAL):"*"===t?(this.input(),"="===this._input[this.offset]?(this.input(),this.tok.T_POW_EQUAL):this.tok.T_POW):"*"},".":function(){var t=this._input[this.offset];return"="===t?(this.input(),this.tok.T_CONCAT_EQUAL):"."===t&&"."===this._input[this.offset+1]?(this.consume(2),this.tok.T_ELLIPSIS):"."},"%":function(){return"="===this._input[this.offset]?(this.input(),this.tok.T_MOD_EQUAL):"%"},"&":function(){var t=this._input[this.offset];return"="===t?(this.input(),this.tok.T_AND_EQUAL):"&"===t?(this.input(),this.tok.T_BOOLEAN_AND):"&"},"|":function(){var t=this._input[this.offset];return"="===t?(this.input(),this.tok.T_OR_EQUAL):"|"===t?(this.input(),this.tok.T_BOOLEAN_OR):"|"},"^":function(){return"="===this._input[this.offset]?(this.input(),this.tok.T_XOR_EQUAL):"^"}}};g.T_STRING,g.consume_TOKEN,g.tokenTerminals;var N={is_NUM:function(){var t=this._input.charCodeAt(this.offset-1);return t>47&&t<58||95===t},is_NUM_START:function(){var t=this._input.charCodeAt(this.offset-1);return t>47&&t<58},is_LABEL:function(){var 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(){var 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;){var t=this.input();if(!this.is_LABEL()){t&&this.unput(1);break}}return this},is_TOKEN:function(){var t=this._input[this.offset-1];return-1!==";:,.\\[]()|^&+-/*=%!~$<>?@".indexOf(t)},is_WHITESPACE:function(){var t=this._input[this.offset-1];return" "===t||"\t"===t||"\n"===t||"\r"===t},is_TABSPACE:function(){var t=this._input[this.offset-1];return" "===t||"\t"===t},consume_TABSPACE:function(){for(;this.offset<this.size;){var t=this.input();if(!this.is_TABSPACE()){t&&this.unput(1);break}}return this},is_HEX:function(){var t=this._input.charCodeAt(this.offset-1);return t>47&&t<58||(t>64&&t<71||(t>96&&t<103||95===t))}};N.is_NUM,N.is_NUM_START,N.is_LABEL,N.is_LABEL_START,N.consume_LABEL,N.is_TOKEN,N.is_WHITESPACE,N.is_TABSPACE,N.consume_TABSPACE,N.is_HEX;var L=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=801,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,enum:this.tok.T_ENUM,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,match:this.tok.T_MATCH,readonly:this.tok.T_READ_ONLY},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}};L.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},L.prototype.input=function(){var t=this._input[this.offset];return t?(this.yytext+=t,this.offset++,"\r"===t&&"\n"===this._input[this.offset]&&(this.yytext+="\n",this.offset++),"\n"===t||"\r"===t?(this.yylloc.last_line=++this.yylineno,this.yyprevcol=this.yylloc.last_column,this.yylloc.last_column=0):this.yylloc.last_column++,t):""},L.prototype.unput=function(t){if(1===t)this.offset--,"\n"===this._input[this.offset]&&"\r"===this._input[this.offset-1]&&(this.offset--,t++),"\r"===this._input[this.offset]||"\n"===this._input[this.offset]?(this.yylloc.last_line--,this.yylineno--,this.yylloc.last_column=this.yyprevcol):this.yylloc.last_column--,this.yytext=this.yytext.substring(0,this.yytext.length-t);else if(t>0)if(this.offset-=t,t<this.yytext.length){this.yytext=this.yytext.substring(0,this.yytext.length-t),this.yylloc.last_line=this.yylloc.first_line,this.yylloc.last_column=this.yyprevcol=this.yylloc.first_column;for(var e=0;e<this.yytext.length;e++){var i=this.yytext[e];"\r"===i?(i=this.yytext[++e],this.yyprevcol=this.yylloc.last_column,this.yylloc.last_line++,this.yylloc.last_column=0,"\n"!==i&&("\r"===i?this.yylloc.last_line++:this.yylloc.last_column++)):"\n"===i?(this.yyprevcol=this.yylloc.last_column,this.yylloc.last_line++,this.yylloc.last_column=0):this.yylloc.last_column++}this.yylineno=this.yylloc.last_line}else this.yytext="",this.yylloc.last_line=this.yylineno=this.yylloc.first_line,this.yylloc.last_column=this.yylloc.first_column;return this},L.prototype.tryMatch=function(t){return t===this.ahead(t.length)},L.prototype.tryMatchCaseless=function(t){return t===this.ahead(t.length).toLowerCase()},L.prototype.ahead=function(t){var e=this._input.substring(this.offset,this.offset+t);return"\r"===e[e.length-1]&&"\n"===this._input[this.offset+t+1]&&(e+="\n"),e},L.prototype.consume=function(t){for(var e=0;e<t;e++){var i=this._input[this.offset];if(!i)break;this.yytext+=i,this.offset++,"\r"===i&&"\n"===this._input[this.offset]&&(this.yytext+="\n",this.offset++,e++),"\n"===i||"\r"===i?(this.yylloc.last_line=++this.yylineno,this.yyprevcol=this.yylloc.last_column,this.yylloc.last_column=0):this.yylloc.last_column++}return this},L.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}},L.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},L.prototype.appendToken=function(t,e){return this.tokens.push([t,e]),this},L.prototype.lex=function(){this.yylloc.prev_offset=this.offset,this.yylloc.prev_line=this.yylloc.last_line,this.yylloc.prev_column=this.yylloc.last_column;var t=this.next()||this.lex();if(!this.all_tokens){for(;t===this.tok.T_WHITESPACE||!this.comment_tokens&&(t===this.tok.T_COMMENT||t===this.tok.T_DOC_COMMENT)||t===this.tok.T_OPEN_TAG;)t=this.next()||this.lex();if(t==this.tok.T_OPEN_TAG_WITH_ECHO)return this.tok.T_ECHO;if(t===this.tok.T_CLOSE_TAG)return";"}return this.yylloc.prev_offset||(this.yylloc.prev_offset=this.yylloc.first_offset,this.yylloc.prev_line=this.yylloc.first_line,this.yylloc.prev_column=this.yylloc.first_column),t},L.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},L.prototype.popState=function(){var t=this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0];if(this.curCondition=this.conditionStack[this.conditionStack.length-1],this.stateCb=this["match"+this.curCondition],"function"!=typeof this.stateCb)throw new Error('Undefined condition state "'+this.curCondition+'"');return t},L.prototype.next=function(){var t;if(this._input||(this.done=!0),this.yylloc.first_offset=this.offset,this.yylloc.first_line=this.yylloc.last_line,this.yylloc.first_column=this.yylloc.last_column,this.yytext="",this.done)return this.yylloc.prev_offset=this.yylloc.first_offset,this.yylloc.prev_line=this.yylloc.first_line,this.yylloc.prev_column=this.yylloc.first_column,this.EOF;if(this.tokens.length>0?("object"===a((t=this.tokens.shift())[1])?this.setState(t[1]):this.consume(t[1]),t=t[0]):t=this.stateCb.apply(this,[]),this.offset>=this.size&&0===this.tokens.length&&(this.done=!0),this.debug){var e=t;e="number"==typeof e?this.engine.tokens.values[e]:'"'+e+'"';var i=new Error(e+"\tfrom "+this.yylloc.first_line+","+this.yylloc.first_column+"\t - to "+this.yylloc.last_line+","+this.yylloc.last_column+'\t"'+this.yytext+'"');console.error(i.stack)}return t},[p,f,T,k,E,m,A,g,N].forEach((function(t){for(var e in t)L.prototype[e]=t[e]}));var C=L,b=function(t,e,i){this.line=t,this.column=e,this.offset=i},S={read_array:function(){var t=null,e=!1,i=this.node("array");this.token===this.tok.T_ARRAY?(this.next().expect("("),t=")"):(e=!0,t="]");var n=[];return this.next().token!==t&&(n=this.read_array_pair_list(e)),this.expect(t),this.next(),i(e,n)},read_array_pair_list:function(t){var 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)){if(","===this.token)return this.node("noop")();var e=this.node("entry"),i=null,n=null,s=!1,r=!1;if("&"===this.token)this.next(),s=!0,n=this.read_variable(!0,!1);else if(this.token===this.tok.T_ELLIPSIS&&this.version>=704)this.next(),"&"===this.token&&this.error(),r=!0,n=this.read_expr();else{var o=this.read_expr();this.token===this.tok.T_DOUBLE_ARROW?(this.next(),i=o,"&"===this.token?(this.next(),s=!0,n=this.read_variable(!0,!1)):n=this.read_expr()):n=o}return e(i,n,s,r)}}};S.read_array,S.read_array_pair_list,S.read_array_pair;var I={read_class_declaration_statement:function(t){var e=this.node("class"),i=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);var n=this.node("identifier"),s=this.text();this.next(),n=n(s);var r=this.read_extends_from(),o=this.read_implements_list();this.expect("{");var a=e(n,r,o,this.next().read_class_body(!0,!1),i);return t&&(a.attrGroups=t),a},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(t,e){for(var i=[],n=[];this.token!==this.EOF&&"}"!==this.token;)if(this.token!==this.tok.T_COMMENT)if(this.token!==this.tok.T_DOC_COMMENT)if(this.token!==this.tok.T_USE)if(e&&this.token===this.tok.T_CASE){var s=this.read_enum_case();this.expect(";")&&this.next(),i=i.concat(s)}else{this.token===this.tok.T_ATTRIBUTE&&(n=this.read_attr_list());var r=this.position(),o=this.read_member_flags(!1);if(this.token!==this.tok.T_CONST)if(t&&this.token===this.tok.T_VAR&&(this.next().expect(this.tok.T_VARIABLE),o[0]=null,o[1]=0),this.token===this.tok.T_FUNCTION)i.push(this.read_function(!1,o,n,r)),n=[];else if(t&&(this.token===this.tok.T_VARIABLE||this.version>=801&&this.token===this.tok.T_READ_ONLY||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))){var a=this.read_variable_list(o,n);n=[],this.expect(";"),this.next(),i=i.concat(a)}else this.error([this.tok.T_CONST].concat(c(t?[this.tok.T_VARIABLE]:[]),c(e?[this.tok.T_CASE]:[]),[this.tok.T_FUNCTION])),this.next();else{var h=this.read_constant_list(o,n);this.expect(";")&&this.next(),i=i.concat(h)}}else i=i.concat(this.read_trait_use_statement());else i.push(this.read_doc_comment());else i.push(this.read_comment());return this.expect("}"),this.next(),i},read_variable_list:function(t,e){var i=this.node("propertystatement"),n=this.read_list((function(){var t=this.node("property"),i=!1;this.token===this.tok.T_READ_ONLY&&(i=!0,this.next());var n=l(this.read_optional_type(),2),s=n[0],r=n[1];this.expect(this.tok.T_VARIABLE);var o=this.node("identifier"),a=this.text().substring(1);return this.next(),o=o(a),";"===this.token||","===this.token?t(o,null,i,s,r,e||[]):"="===this.token?t(o,this.next().read_expr(),i,s,r,e||[]):(this.expect([",",";","="]),t(o,null,s,r,e||[]))}),",");return i(null,n,t)},read_constant_list:function(t,e){this.expect(this.tok.T_CONST)&&this.next();var i=this.node("classconstant"),n=this.read_list((function(){var t=this.node("constant"),e=null,i=null;if(this.token===this.tok.T_STRING||this.version>=700&&this.is("IDENTIFIER")){e=this.node("identifier");var n=this.text();this.next(),e=e(n)}else this.expect("IDENTIFIER");return this.expect("=")&&(i=this.next().read_expr()),t(e,i)}),",");return i(null,n,t,e||[])},read_member_flags:function(t){var e=[-1,-1,-1];if(this.is("T_MEMBER_FLAGS")){var i=0,n=0;do{switch(this.token){case this.tok.T_PUBLIC:i=0,n=0;break;case this.tok.T_PROTECTED:i=0,n=1;break;case this.tok.T_PRIVATE:i=0,n=2;break;case this.tok.T_STATIC:i=1,n=1;break;case this.tok.T_ABSTRACT:i=2,n=1;break;case this.tok.T_FINAL:i=2,n=2}t&&(0==i&&2==n?(this.expect([this.tok.T_PUBLIC,this.tok.T_PROTECTED]),n=-1):2==i&&1==n&&(this.error(),n=-1)),-1!==e[i]?this.error():-1!==n&&(e[i]=n)}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(){var t=!1;"?"===this.token&&(t=!0,this.next());var e=this.read_types();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();var i=this.read_type();if(!i){this.raiseError("Expecting a type definition");break}e.push(i)}while("|"===this.token)}return[t,e]},read_interface_declaration_statement:function(t){var e=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);var i=this.node("identifier"),n=this.text();this.next(),i=i(n);var s=this.read_interface_extends_list();return this.expect("{"),e(i,s,this.next().read_interface_body(),t||[])},read_interface_body:function(){for(var t=[],e=[];this.token!==this.EOF&&"}"!==this.token;)if(this.token!==this.tok.T_COMMENT)if(this.token!==this.tok.T_DOC_COMMENT){var i=this.position();e=this.read_attr_list();var n=this.read_member_flags(!0);if(this.token==this.tok.T_CONST){var s=this.read_constant_list(n,e);this.expect(";")&&this.next(),t=t.concat(s),e=[]}else if(this.token===this.tok.T_FUNCTION){var r=this.read_function_declaration(2,n,e,i);r.parseFlags(n),t.push(r),this.expect(";")&&this.next(),e=[]}else this.error([this.tok.T_CONST,this.tok.T_FUNCTION]),this.next()}else t.push(this.read_doc_comment());else t.push(this.read_comment());return this.expect("}")&&this.next(),t},read_trait_declaration_statement:function(){var 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);var e=this.node("identifier"),i=this.text();return this.next(),e=e(i),this.expect("{"),t(e,this.next().read_class_body(!0,!1))},read_trait_use_statement:function(){var t=this.node("traituse");this.expect(this.tok.T_USE)&&this.next();for(var e=[this.read_namespace_name()],i=null;","===this.token;)e.push(this.next().read_namespace_name());if("{"===this.token){for(i=[];this.next().token!==this.EOF&&"}"!==this.token;)i.push(this.read_trait_use_alias()),this.expect(";");this.expect("}")&&this.next()}else this.expect(";")&&this.next();return t(e,i)},read_trait_use_alias:function(){var t,e=this.node(),i=null;if(this.is("IDENTIFIER")){t=this.node("identifier");var n=this.text();this.next(),t=t(n)}else if(t=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")){i=t,t=this.node("identifier");var s=this.text();this.next(),t=t(s)}else this.expect(this.tok.T_STRING);else t=t.name;if(this.token===this.tok.T_INSTEADOF)return e("traitprecedence",i,t,this.next().read_name_list());if(this.token===this.tok.T_AS){var r=null,o=null;if(this.next().is("T_MEMBER_FLAGS")&&(r=this.read_member_flags()),this.token===this.tok.T_STRING||this.version>=700&&this.is("IDENTIFIER")){o=this.node("identifier");var a=this.text();this.next(),o=o(a)}else!1===r&&this.expect(this.tok.T_STRING);return e("traitalias",i,t,o,r)}return this.expect([this.tok.T_AS,this.tok.T_INSTEADOF]),e("traitalias",i,t,null,null)}};I.read_class_declaration_statement,I.read_class_modifiers,I.read_class_modifier,I.read_class_body,I.read_variable_list,I.read_constant_list,I.read_member_flags,I.read_optional_type,I.read_interface_declaration_statement,I.read_interface_body,I.read_trait_declaration_statement,I.read_trait_use_statement,I.read_trait_use_alias;var O={read_comment:function(){var t=this.text(),e=this.ast.prepare("/*"===t.substring(0,2)?"commentblock":"commentline",null,this),i=this.lexer.yylloc.first_offset,n=this.prev;return this.prev=[this.lexer.yylloc.last_line,this.lexer.yylloc.last_column,this.lexer.offset],this.lex(),(e=e(t)).offset=i,this.prev=n,e},read_doc_comment:function(){var t=this.ast.prepare("commentblock",null,this),e=this.lexer.yylloc.first_offset,i=this.text(),n=this.prev;return this.prev=[this.lexer.yylloc.last_line,this.lexer.yylloc.last_column,this.lexer.offset],this.lex(),(t=t(i)).offset=e,this.prev=n,t}};O.read_comment,O.read_doc_comment;var R={read_expr:function(t){var 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){var i=null;return":"!==this.next().token&&(i=this.read_expr()),this.expect(":")&&this.next(),e("retif",t,i,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(){var t=null;switch(this.token){case this.tok.T_ISSET:t=this.node("isset"),this.next().expect("(")&&this.next();var 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();var i=this.read_expr();this.expect(")")&&this.next(),t=t(i);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();var n=this.read_expr();this.expect(")")&&this.next(),t=t(n);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(){var t=null;return"("===this.token&&(this.next(),t=this.read_optional_expr(")"),this.expect(")")&&this.next()),t},read_expr_item:function(){var t,e,i=[];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()).parenthesizedExpression=!0,this.expect(")")&&this.next(),this.handleDereferencable(e);if("`"===this.token)return this.read_encapsed_string("`");if(this.token===this.tok.T_LIST){var n=null,s=this.innerList;t=this.node("list"),s||(n=this.node("assign")),this.next().expect("(")&&this.next(),this.innerList||(this.innerList=!0);var r=this.read_array_pair_list(!1);this.expect(")")&&this.next();for(var o=!1,a=0;a<r.length;a++)if(null!==r[a]&&"noop"!==r[a].kind){o=!0;break}return o||this.raiseError("Fatal Error : Cannot use empty list on line "+this.lexer.yylloc.first_line),s?t(r,!1):(this.innerList=!1,this.expect("=")?n(t(r,!1),this.next().read_expr(),"="):t(r,!1))}if(this.token===this.tok.T_ATTRIBUTE&&(i=this.read_attr_list()),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_MATCH:return this.read_match_expression();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_THROW:return this.version<800&&this.raiseError("PHP 8+ is required to use throw as an expression"),this.node("throw")(this.next().read_expr());case this.tok.T_EXIT:var h="die"===this.lexer.yytext.toLowerCase();return t=this.node("exit"),this.next(),t(this.read_exit_expr(),h);case this.tok.T_PRINT:return this.node("print")(this.next().read_expr());case this.tok.T_YIELD:var l=null,c=null;return t=this.node("yield"),this.next().is("EXPR")&&(l=this.read_expr(),this.token===this.tok.T_DOUBLE_ARROW&&(c=l,l=this.next().read_expr())),t(l,c);case this.tok.T_YIELD_FROM:return(t=this.node("yieldfrom"))(e=this.next().read_expr());case this.tok.T_FN:case this.tok.T_FUNCTION:return this.read_inline_function(void 0,i);case this.tok.T_STATIC:var u=[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],i);this.lexer.tokens.push(u),this.next()}if(this.is("VARIABLE")){t=this.node();var _="identifier"===(e=this.read_variable(!1,!1)).kind||"staticlookup"===e.kind&&"identifier"===e.offset.kind;switch(this.token){case"=":return _&&this.error("VARIABLE"),"&"==this.next().token?this.read_assignref(t,e):t("assign",e,this.read_expr(),"=");case this.tok.T_PLUS_EQUAL:return _&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"+=");case this.tok.T_MINUS_EQUAL:return _&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"-=");case this.tok.T_MUL_EQUAL:return _&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"*=");case this.tok.T_POW_EQUAL:return _&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"**=");case this.tok.T_DIV_EQUAL:return _&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"/=");case this.tok.T_CONCAT_EQUAL:return _&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),".=");case this.tok.T_MOD_EQUAL:return _&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"%=");case this.tok.T_AND_EQUAL:return _&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"&=");case this.tok.T_OR_EQUAL:return _&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"|=");case this.tok.T_XOR_EQUAL:return _&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"^=");case this.tok.T_SL_EQUAL:return _&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"<<=");case this.tok.T_SR_EQUAL:return _&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),">>=");case this.tok.T_COALESCE_EQUAL:return _&&this.error("VARIABLE"),t("assign",e,this.next().read_expr(),"??=");case this.tok.T_INC:return _&&this.error("VARIABLE"),this.next(),t("post","+",e);case this.tok.T_DEC:return _&&this.error("VARIABLE"),this.next(),t("post","-",e);default:t.destroy(e)}}else{if(this.is("SCALAR")){if(t=this.node(),"array"===(e=this.read_scalar()).kind&&e.shortForm&&"="===this.token){var d=this.convertToList(e);return e.loc&&(d.loc=e.loc),t("assign",d,this.next().read_expr(),"=")}return t.destroy(e),this.handleDereferencable(e)}this.error("EXPR"),this.next()}return e},convertToList:function(t){var e=this,i=t.items.map((function(t){return t.value&&"array"===t.value.kind&&t.value.shortForm&&(t.value=e.convertToList(t.value)),t})),n=this.node("list")(i,!0);return t.loc&&(n.loc=t.loc),t.leadingComments&&(n.leadingComments=t.leadingComments),t.trailingComments&&(n.trailingComments=t.trailingComments),n},read_assignref:function(t,e){var i;return this.next(),this.token===this.tok.T_NEW?(this.version>=700&&this.error(),i=this.read_new_expr()):i=this.read_variable(!1,!1),t("assignref",e,i)},read_inline_function:function(t,e){if(this.token===this.tok.T_FUNCTION){var i=this.read_function(!0,t,e);return i.attrGroups=e,i}!this.version>=704&&this.raiseError("Arrow Functions are not allowed");var n=this.node("arrowfunc");this.expect(this.tok.T_FN)&&this.next();var s=this.is_reference();this.expect("(")&&this.next();var r=this.read_parameter_list();this.expect(")")&&this.next();var o=!1,a=null;":"===this.token&&("?"===this.next().token&&(o=!0,this.next()),a=this.read_types()),this.expect(this.tok.T_DOUBLE_ARROW)&&this.next();var h=n(r,s,this.read_expr(),a,o,!!t);return h.attrGroups=e,h},read_match_expression:function(){var t=this.node("match");this.expect(this.tok.T_MATCH)&&this.next(),this.version<800&&this.raiseError("Match statements are not allowed before PHP 8");var e,i;return this.expect("(")&&this.next(),e=this.read_expr(),this.expect(")")&&this.next(),this.expect("{")&&this.next(),i=this.read_match_arms(),this.expect("}")&&this.next(),t(e,i)},read_match_arms:function(){var t=this;return this.read_list((function(){return t.read_match_arm()}),",",!0)},read_match_arm:function(){if("}"!==this.token)return this.node("matcharm")(this.read_match_arm_conds(),this.read_expr())},read_match_arm_conds:function(){var t=[];if(this.token===this.tok.T_DEFAULT)t=null,this.next();else for(t.push(this.read_expr());","===this.token;){if(this.next(),this.token===this.tok.T_DOUBLE_ARROW)return this.next(),t;t.push(this.read_expr())}return this.expect(this.tok.T_DOUBLE_ARROW)&&this.next(),t},read_attribute:function(){var t=this.text(),e=[];return this.next(),"("===this.token&&(e=this.read_argument_list()),this.node("attribute")(t,e)},read_attr_list:function(){var t=[];if(this.token===this.tok.T_ATTRIBUTE)do{var e=this.node("attrgroup")([]);for(this.next(),e.attrs.push(this.read_attribute());","===this.token;)this.next(),"]"!==this.token&&e.attrs.push(this.read_attribute());t.push(e),this.expect("]"),this.next()}while(this.token===this.tok.T_ATTRIBUTE);return t},read_new_expr:function(){var t=this.node("new");this.expect(this.tok.T_NEW)&&this.next();var e=[],i=this.read_attr_list();if(this.token===this.tok.T_CLASS){var n=this.node("class");"("===this.next().token&&(e=this.read_argument_list());var s=this.read_extends_from(),r=this.read_implements_list(),o=null;this.expect("{")&&(o=this.next().read_class_body(!0,!1));var a=n(null,s,r,o,[0,0,0]);return a.attrGroups=i,t(a,e)}for(var h=this.read_new_class_name();"["===this.token;){var l=this.node("offsetlookup"),c=this.next().read_encaps_var_offset();this.expect("]")&&this.next(),h=l(h,c)}return"("===this.token&&(e=this.read_argument_list()),t(h,e)},read_new_class_name:function(){if(this.token===this.tok.T_NS_SEPARATOR||this.token===this.tok.T_NAME_RELATIVE||this.token===this.tok.T_NAME_QUALIFIED||this.token===this.tok.T_NAME_FULLY_QUALIFIED||this.token===this.tok.T_STRING||this.token===this.tok.T_NAMESPACE){var 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}};R.read_expr,R.read_expr_cast,R.read_isset_variable,R.read_isset_variables,R.read_internal_functions_in_yacc,R.read_optional_expr,R.read_exit_expr,R.read_expr_item,R.convertToList,R.read_assignref,R.read_inline_function,R.read_match_expression,R.read_match_arms,R.read_match_arm,R.read_match_arm_conds,R.read_attribute,R.read_attr_list,R.read_new_expr,R.read_new_class_name,R.handleDereferencable;var w={read_enum_declaration_statement:function(t){var e=this.node("enum");if(!this.expect(this.tok.T_ENUM))return null;this.next().expect(this.tok.T_STRING);var i=this.node("identifier"),n=this.text();this.next(),i=i(n);var s=this.read_enum_value_type(),r=this.read_implements_list();this.expect("{");var o=e(i,s,r,this.next().read_class_body(!1,!0));return t&&(o.attrGroups=t),o},read_enum_value_type:function(){return":"===this.token?this.next().read_namespace_name():null},read_enum_case:function(){this.expect(this.tok.T_CASE);var t=this.node("enumcase"),e=this.node("identifier"),i=this.next().text();this.next(),e=e(i);var n="="===this.token?this.next().read_expr():null;return this.expect(";"),t(e,n)}};w.read_enum_declaration_statement,w.read_enum_value_type,w.read_enum_case;var D={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,i,n){var s=this.read_function_declaration(t?1:e?2:0,e&&1===e[1],i||[],n);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,i,n){var s=this,r="function";1===t?r="closure":2===t&&(r="method");var o=this.node(r);this.expect(this.tok.T_FUNCTION)&&this.next();var a=this.is_reference(),h=!1,l=[],c=null,u=!1;if(1!==t){var _=this.node("identifier");2===t?this.version>=700?this.token===this.tok.T_STRING||this.is("IDENTIFIER")?(h=this.text(),this.next()):this.version<704&&this.error("IDENTIFIER"):this.token===this.tok.T_STRING?(h=this.text(),this.next()):this.error("IDENTIFIER"):this.version>=700?this.token===this.tok.T_STRING?(h=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)&&(h=this.text()),this.next()),h=_(h)}this.expect("(")&&this.next();var d=this.read_parameter_list("__construct"===h.name);this.expect(")")&&this.next(),1===t&&(l=this.read_lexical_vars()),":"===this.token&&("?"===this.next().token&&(u=!0,this.next()),c=this.read_types());var p=function(t){return t.attrGroups=i||[],n&&t.loc&&(t.loc.start=n,t.loc.source&&(t.loc.source=s.lexer._input.substr(t.loc.start.offset,t.loc.end.offset-t.loc.start.offset))),t};return p(1===t?o(d,a,l,c,u,e):o(h,d,a,c,u))},read_lexical_vars:function(){var 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_list_with_dangling_comma:function(t){for(var e=[];this.token!=this.EOF;){if(e.push(t()),","!=this.token){if(")"==this.token)break;this.error([",",")"]);break}if(this.next(),this.version>=800&&")"===this.token)return e}return e},read_lexical_var_list:function(){return this.read_list_with_dangling_comma(this.read_lexical_var.bind(this))},read_lexical_var:function(){if("&"===this.token)return this.read_byref(this.read_lexical_var.bind(this));var t=this.node("variable");this.expect(this.tok.T_VARIABLE);var e=this.text().substring(1);return this.next(),t(e,!1)},read_parameter_list:function(t){return")"!=this.token?this.read_list_with_dangling_comma(this.read_parameter.bind(this,t)):[]},read_parameter:function(t){var e,i=this.node("parameter"),n=null,s=null,r=!1,o=!1,a=[];this.token===this.tok.T_ATTRIBUTE&&(a=this.read_attr_list());var h=this.read_promoted();this.version>=801&&this.token===this.tok.T_READ_ONLY&&(t?(this.next(),o=!0):this.raiseError("readonly properties can be used only on class constructor")),"?"===this.token&&(this.next(),r=!0),e=this.read_types(),r&&!e&&this.raiseError("Expecting a type definition combined with nullable operator");var l=this.is_reference(),c=this.is_variadic();if(this.expect(this.tok.T_VARIABLE)){n=this.node("identifier");var u=this.text().substring(1);this.next(),n=n(u)}"="==this.token&&(s=this.next().read_expr());var _=i(n,e,s,l,c,o,r,h);return a&&(_.attrGroups=a),_},read_types:function(){var t="unset",e="union",i="intersection",n=[],s=t,r=this.read_type();if(!r)return null;for(n.push(r);"|"===this.token||this.version>=801&&"&"===this.token;){var o=this.peek();if(o===this.tok.T_ELLIPSIS||o===this.tok.T_VARIABLE)break;s===t?s="|"===this.token?e:i:(s===e&&"|"!==this.token||s===i&&"&"!==this.token)&&this.raiseError('Unexpect token "'+this.token+'", "|" and "&" can not be mixed'),this.next(),n.push(this.read_type())}return 1===n.length?n[0]:s===i?this.node("intersectiontype")(n):this.node("uniontype")(n)},read_promoted:function(){return this.token===this.tok.T_PUBLIC?(this.next(),1):this.token===this.tok.T_PROTECTED?(this.next(),2):this.token===this.tok.T_PRIVATE?(this.next(),4):0},read_argument_list:function(){var t=[];return this.expect("(")&&this.next(),this.version>=801&&this.token===this.tok.T_ELLIPSIS&&")"===this.peek()?(t.push(this.node("variadicplaceholder")()),this.next()):")"!==this.token&&(t=this.read_non_empty_argument_list()),this.expect(")")&&this.next(),t},read_non_empty_argument_list:function(){var t=!1;return this.read_function_list(function(){var 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(){if(this.token===this.tok.T_ELLIPSIS)return this.node("variadic")(this.next().read_expr());if((this.token===this.tok.T_STRING||Object.values(this.lexer.keywords).includes(this.token))&&":"===this.peek())return this.version<800&&this.raiseError("PHP 8+ is required to use named arguments"),this.node("namedargument")(this.text(),this.next().next().read_expr());return this.read_expr()},read_type:function(){var t=this.node();if(this.token===this.tok.T_ARRAY||this.token===this.tok.T_CALLABLE){var e=this.text();return this.next(),t("typereference",e.toLowerCase(),e)}if(this.token===this.tok.T_NAME_RELATIVE||this.token===this.tok.T_NAME_QUALIFIED||this.token===this.tok.T_NAME_FULLY_QUALIFIED||this.token===this.tok.T_STRING||this.token===this.tok.T_STATIC){var i=this.text(),n=[this.token,this.lexer.getState()];return this.next(),this.token!==this.tok.T_NS_SEPARATOR&&this.ast.typereference.types.indexOf(i.toLowerCase())>-1?t("typereference",i.toLowerCase(),i):(this.lexer.tokens.push(n),this.next(),t.destroy(),this.read_namespace_name())}return t.destroy(),null}};D.is_reference,D.is_variadic,D.read_function,D.read_function_declaration,D.read_lexical_vars,D.read_list_with_dangling_comma,D.read_lexical_var_list,D.read_lexical_var,D.read_parameter_list,D.read_parameter,D.read_types,D.read_promoted,D.read_argument_list,D.read_non_empty_argument_list,D.read_argument,D.read_type;var P={read_if:function(){var t=this.node("if"),e=this.next().read_if_expr(),i=null,n=null,s=!1;if(":"===this.token){s=!0,this.next(),i=this.node("block");for(var r=[];this.token!==this.EOF&&this.token!==this.tok.T_ENDIF;){if(this.token===this.tok.T_ELSEIF){n=this.read_elseif_short();break}if(this.token===this.tok.T_ELSE){n=this.read_else_short();break}r.push(this.read_inner_statement())}i=i(null,r),this.expect(this.tok.T_ENDIF)&&this.next(),this.expectEndOfStatement()}else i=this.read_statement(),this.token===this.tok.T_ELSEIF?n=this.read_if():this.token===this.tok.T_ELSE&&(n=this.next().read_statement());return t(e,i,n,s)},read_if_expr:function(){this.expect("(")&&this.next();var t=this.read_expr();return this.expect(")")&&this.next(),t},read_elseif_short:function(){var t=null,e=this.node("if"),i=this.next().read_if_expr();this.expect(":")&&this.next();for(var n=this.node("block"),s=[];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}s.push(this.read_inner_statement())}return e(i,n(null,s),t,!0)},read_else_short:function(){this.next().expect(":")&&this.next();for(var t=this.node("block"),e=[];this.token!=this.EOF&&this.token!==this.tok.T_ENDIF;)e.push(this.read_inner_statement());return t(null,e)}};P.read_if,P.read_if_expr,P.read_elseif_short,P.read_else_short;var U={read_while:function(){var t=this.node("while");this.expect(this.tok.T_WHILE)&&this.next();var e,i=null,n=!1;return this.expect("(")&&this.next(),e=this.read_expr(),this.expect(")")&&this.next(),":"===this.token?(n=!0,i=this.read_short_form(this.tok.T_ENDWHILE)):i=this.read_statement(),t(e,i,n)},read_do:function(){var t=this.node("do");this.expect(this.tok.T_DO)&&this.next();var e,i=null;return e=this.read_statement(),this.expect(this.tok.T_WHILE)&&(this.next().expect("(")&&this.next(),i=this.read_expr(),this.expect(")")&&this.next(),this.expect(";")&&this.next()),t(i,e)},read_for:function(){var t=this.node("for");this.expect(this.tok.T_FOR)&&this.next();var e=[],i=[],n=[],s=null,r=!1;return this.expect("(")&&this.next(),";"!==this.token?(e=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?(n=this.read_list(this.read_expr,","),this.expect(")")&&this.next()):this.next(),":"===this.token?(r=!0,s=this.read_short_form(this.tok.T_ENDFOR)):s=this.read_statement(),t(e,i,n,s,r)},read_foreach:function(){var t=this.node("foreach");this.expect(this.tok.T_FOREACH)&&this.next();var e,i=null,n=null,s=null,r=!1;return this.expect("(")&&this.next(),e=this.read_expr(),this.expect(this.tok.T_AS)&&(this.next(),n=this.read_foreach_variable(),this.token===this.tok.T_DOUBLE_ARROW&&(i=n,n=this.next().read_foreach_variable())),i&&"list"===i.kind&&this.raiseError("Fatal Error : Cannot use list as key element"),this.expect(")")&&this.next(),":"===this.token?(r=!0,s=this.read_short_form(this.tok.T_ENDFOREACH)):s=this.read_statement(),t(e,i,n,s,r)},read_foreach_variable:function(){if(this.token===this.tok.T_LIST||"["===this.token){var t="["===this.token,e=this.node("list");this.next(),!t&&this.expect("(")&&this.next();var i=this.read_array_pair_list(t);return this.expect(t?"]":")")&&this.next(),e(i,t)}return this.read_variable(!1,!1)}};U.read_while,U.read_do,U.read_for,U.read_foreach,U.read_foreach_variable;var M={read_start:function(){return this.token==this.tok.T_NAMESPACE?this.read_namespace():this.read_top_statement()}};M.read_start;var F={read_namespace:function(){var t,e,i=this.node("namespace");return this.expect(this.tok.T_NAMESPACE)&&this.next(),e="{"===this.token?{name:[""]}:this.read_namespace_name(),this.currentNamespace=e,";"===this.token?(this.currentNamespace=e,t=this.next().read_top_statements(),this.expect(this.EOF),i(e.name,t,!1)):"{"===this.token?(this.currentNamespace=e,t=this.next().read_top_statements(),this.expect("}")&&this.next(),0===t.length&&this.extractDoc&&this._docs.length>this._docIndex&&t.push(this.node("noop")()),i(e.name,t,!0)):(this.error(["{",";"]),this.currentNamespace=e,t=this.read_top_statements(),this.expect(this.EOF),i(e,t,!1))},read_namespace_name:function(t){var e,i=this.node(),n=this.text();switch(this.token){case this.tok.T_NAME_RELATIVE:e=this.ast.name.RELATIVE_NAME,n=n.replace(/^namespace\\/,"");break;case this.tok.T_NAME_QUALIFIED:e=this.ast.name.QUALIFIED_NAME;break;case this.tok.T_NAME_FULLY_QUALIFIED:e=this.ast.name.FULL_QUALIFIED_NAME;break;default:if(e=this.ast.name.UNQUALIFIED_NAME,!this.expect(this.tok.T_STRING))return i("name","",this.ast.name.FULL_QUALIFIED_NAME)}if(this.next(),t||"("!==this.token){if("parent"===n.toLowerCase())return i("parentreference",n);if("self"===n.toLowerCase())return i("selfreference",n)}return i("name",n,e)},read_use_statement:function(){var t=this.node("usegroup"),e=[],i=null;this.expect(this.tok.T_USE)&&this.next();var n=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&&(i=e[0].name,e=this.next().read_use_declarations(null===n),this.expect("}")&&this.next()),t=t(i,n,e),this.expect(";")&&this.next(),t},read_class_name_reference:function(){return this.read_variable(!0,!1)},read_use_declaration:function(t){var e=this.node("useitem"),i=null;t&&(i=this.read_use_type());var n=this.read_namespace_name(),s=this.read_use_alias();return e(n.name,s,i)},read_use_declarations:function(t){for(var e=[this.read_use_declaration(t)];","===this.token;){if(this.next(),t){if(this.token!==this.tok.T_NAME_RELATIVE&&this.token!==this.tok.T_NAME_QUALIFIED&&this.token!==this.tok.T_NAME_FULLY_QUALIFIED&&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_NAME_RELATIVE&&this.token!==this.tok.T_NAME_QUALIFIED&&this.token!==this.tok.T_NAME_FULLY_QUALIFIED&&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(){var t=null;if(this.token===this.tok.T_AS&&this.next().expect(this.tok.T_STRING)){var e=this.node("identifier"),i=this.text();this.next(),t=e(i)}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}};F.read_namespace,F.read_namespace_name,F.read_use_statement,F.read_class_name_reference,F.read_use_declaration,F.read_use_declarations,F.read_use_alias,F.read_use_type;var B={"\\":"\\",$:"$",n:"\n",r:"\r",t:"\t",f:String.fromCharCode(12),v:String.fromCharCode(11),e:String.fromCharCode(27)},H={resolve_special_chars:function(t,e){return e?t.replace(/\\"/,'"').replace(/\\([\\$nrtfve]|[xX][0-9a-fA-F]{1,2}|[0-7]{1,3}|u{([0-9a-fA-F]+)})/g,(function(t,e,i){return B[e]?B[e]:"x"===e[0]||"X"===e[0]?String.fromCodePoint(parseInt(e.substr(1),16)):"u"===e[0]?String.fromCodePoint(parseInt(i,16)):String.fromCodePoint(parseInt(e,8))})):t.replace(/\\\\/g,"\\").replace(/\\'/g,"'")},remove_heredoc_leading_whitespace_chars:function(t,e,i,n){if(0===e)return t;this.check_heredoc_indentation_level(t,e,i,n);var s=i?" ":"\t",r=new RegExp("\\n".concat(s,"{").concat(e,"}"),"g"),o=new RegExp("^".concat(s,"{").concat(e,"}"));return n&&(t=t.replace(o,"")),t.replace(r,"\n")},check_heredoc_indentation_level:function(t,e,i,n){var s=t.length,r=0,o=0,a=!0,h=i?" ":"\t",l=!1;if(!n){if(-1===(r=t.indexOf("\n")))return;r++}for(;r<s;)a?t[r]===h?o++:l=!0:a=!1,"\n"!==t[r]&&l&&o<e?this.raiseError("Invalid body indentation level (expecting an indentation at least ".concat(e,")")):l=!1,"\n"===t[r]&&(a=!0,o=0),r++},read_dereferencable_scalar:function(){var t=null;switch(this.token){case this.tok.T_CONSTANT_ENCAPSED_STRING:var e=this.node("string"),i=this.text(),n=0;"b"!==i[0]&&"B"!==i[0]||(n=1);var s='"'===i[n];this.next(),e=e(s,this.resolve_special_chars(i.substring(n+1,i.length-1),s),1===n,i),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();var t,e;switch(this.token){case this.tok.T_LNUMBER:case this.tok.T_DNUMBER:var i=this.node("number");return t=this.text(),this.next(),i(t,null);case this.tok.T_START_HEREDOC:if("ST_NOWDOC"===this.lexer.curCondition){var n=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));var s=t[t.length-1];"\n"===s?t="\r"===t[t.length-2]?t.substring(0,t.length-2):t.substring(0,t.length-1):"\r"===s&&(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();var r=this.lexer._input.substring(n,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),r,this.lexer.heredoc_label.label),this.lexer.heredoc_label.finished=!0,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:var o=this.error("SCALAR");return this.next(),o}},read_dereferencable:function(t){var e,i,n=this.node("offsetlookup");return"["===this.token?(i=this.next().read_expr(),this.expect("]")&&this.next(),e=n(t,i)):this.token===this.tok.T_DOLLAR_OPEN_CURLY_BRACES&&(e=n(t,i=this.read_encapsed_string_item(!1))),e},read_encapsed_string_item:function(t){var e,i,n,s=this.node("encapsedpart"),r=null,o=!1,a=this.node();if(this.token===this.tok.T_ENCAPSED_AND_WHITESPACE){var h=this.text();this.next(),a=a("string",!1,this.version>=703&&!this.lexer.heredoc_label.finished?this.remove_heredoc_leading_whitespace_chars(this.resolve_special_chars(h,t),this.lexer.heredoc_label.indentation,this.lexer.heredoc_label.indentation_uses_spaces,this.lexer.heredoc_label.first_encaps_node):h,!1,h)}else if(this.token===this.tok.T_DOLLAR_OPEN_CURLY_BRACES){if(r="simple",o=!0,n=null,this.next().token===this.tok.T_STRING_VARNAME){n=this.node("variable");var l=this.text();this.next(),a.destroy(),"["===this.token?(n=n(l,!1),i=this.node("offsetlookup"),e=this.next().read_expr(),this.expect("]")&&this.next(),a=i(n,e)):a=n(l,!1)}else a=a("variable",this.read_expr(),!1);this.expect("}")&&this.next()}else if(this.token===this.tok.T_CURLY_OPEN)r="complex",a.destroy(),a=this.next().read_variable(!1,!1),this.expect("}")&&this.next();else if(this.token===this.tok.T_VARIABLE){if(r="simple",a.destroy(),a=this.read_simple_variable(),"["===this.token&&(i=this.node("offsetlookup"),e=this.next().read_encaps_var_offset(),this.expect("]")&&this.next(),a=i(a,e)),this.token===this.tok.T_OBJECT_OPERATOR){i=this.node("propertylookup"),this.next().expect(this.tok.T_STRING);var c=this.node("identifier");n=this.text(),this.next(),a=i(a,c(n))}}else{this.expect(this.tok.T_ENCAPSED_AND_WHITESPACE);var u=this.text();this.next(),a.destroy(),a=a("string",!1,u,!1,u)}return this.lexer.heredoc_label.first_encaps_node=!1,s(a,r,o)},read_encapsed_string:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=this.lexer.yylloc.first_offset,n=this.node("encapsed");this.next();var s=this.lexer.yylloc.prev_offset-(e?1:0),r=[],o=null;for(o="`"===t?this.ast.encapsed.TYPE_SHELL:'"'===t?this.ast.encapsed.TYPE_STRING:this.ast.encapsed.TYPE_HEREDOC;this.token!==t&&this.token!==this.EOF;)r.push(this.read_encapsed_string_item(!0));if(r.length>0&&"encapsedpart"===r[r.length-1].kind&&"string"===r[r.length-1].expression.kind){var a=r[r.length-1].expression,h=a.value[a.value.length-1];"\n"===h?"\r"===a.value[a.value.length-2]?a.value=a.value.substring(0,a.value.length-2):a.value=a.value.substring(0,a.value.length-1):"\r"===h&&(a.value=a.value.substring(0,a.value.length-1))}this.expect(t)&&this.next();var l=this.lexer._input.substring("heredoc"===o?i:s-1,this.lexer.yylloc.first_offset);return n=n(r,l,o),t===this.tok.T_END_HEREDOC&&(n.label=this.lexer.heredoc_label.label,this.lexer.heredoc_label.finished=!0),n},get_magic_constant:function(){var t=this.node("magic"),e=this.text();return this.next(),t(e.toUpperCase(),e)}};H.resolve_special_chars,H.remove_heredoc_leading_whitespace_chars,H.check_heredoc_indentation_level,H.read_dereferencable_scalar,H.read_scalar,H.read_dereferencable,H.read_encapsed_string_item,H.read_encapsed_string,H.get_magic_constant;var G={read_top_statements:function(){for(var t=[];this.token!==this.EOF&&"}"!==this.token;){var e=this.read_top_statement();e&&(Array.isArray(e)?t=t.concat(e):t.push(e))}return t},read_top_statement:function(){var t=[];switch(this.token===this.tok.T_ATTRIBUTE&&(t=this.read_attr_list()),this.token){case this.tok.T_FUNCTION:return this.read_function(!1,!1,t);case this.tok.T_ABSTRACT:case this.tok.T_FINAL:case this.tok.T_CLASS:return this.read_class_declaration_statement(t);case this.tok.T_INTERFACE:return this.read_interface_declaration_statement(t);case this.tok.T_TRAIT:return this.read_trait_declaration_statement();case this.tok.T_ENUM:return this.read_enum_declaration_statement(t);case this.tok.T_USE:return this.read_use_statement();case this.tok.T_CONST:var e=this.node("constantstatement"),i=this.next().read_const_list();return this.expectEndOfStatement(),e(null,i);case this.tok.T_NAMESPACE:return this.read_namespace();case this.tok.T_HALT_COMPILER:var n=this.node("halt");return this.next().expect("(")&&this.next(),this.expect(")")&&this.next(),this.expect(";"),this.lexer.done=!0,n(this.lexer._input.substring(this.lexer.offset));default:return this.read_statement()}},read_inner_statements:function(){for(var t=[];this.token!=this.EOF&&"}"!==this.token;){var 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);var t=this.node("constant"),e=this.node("identifier"),i=this.text();return this.next(),e=e(i),this.expect("=")?t(e,this.next().read_expr()):t(e,null)}),",",!1)},read_declare_list:function(){for(var t=[];this.token!=this.EOF&&")"!==this.token;){this.expect(this.tok.T_STRING);var e=this.node("declaredirective"),i=this.node("identifier"),n=this.text();this.next(),i=i(n);var s=null;if(this.expect("=")&&(s=this.next().read_expr()),t.push(e(i,s)),","!==this.token)break;this.next()}return t},read_inner_statement:function(){var t=[];switch(this.token===this.tok.T_ATTRIBUTE&&(t=this.read_attr_list()),this.token){case this.tok.T_FUNCTION:var e=this.read_function(!1,!1);return e.attrGroups=t,e;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_ENUM:return this.read_enum_declaration_statement();case this.tok.T_HALT_COMPILER:this.raiseError("__HALT_COMPILER() can only be used from the outermost scope");var i=this.node("halt");return this.next().expect("(")&&this.next(),this.expect(")")&&this.next(),i=i(this.lexer._input.substring(this.lexer.offset)),this.expect(";")&&this.next(),i;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:var t=this.node("return");this.next();var e=this.read_optional_expr(";");return this.expectEndOfStatement(),t(e);case this.tok.T_BREAK:case this.tok.T_CONTINUE:var i=this.node(this.token===this.tok.T_CONTINUE?"continue":"break");this.next();var n=this.read_optional_expr(";");return this.expectEndOfStatement(),i(n);case this.tok.T_GLOBAL:var s=this.node("global"),r=this.next().read_list(this.read_simple_variable,",");return this.expectEndOfStatement(),s(r);case this.tok.T_STATIC:var o=[this.token,this.lexer.getState()],a=this.node();if(this.next().token===this.tok.T_DOUBLE_COLON){this.lexer.tokens.push(o);var h=this.next().read_expr();return this.expectEndOfStatement(h),a("expressionstatement",h)}if(this.token===this.tok.T_FUNCTION)return this.read_function(!0,[0,1,0]);var l=this.read_variable_declarations();return this.expectEndOfStatement(),a("static",l);case this.tok.T_ECHO:var c=this.node("echo"),u=this.text(),_="<?="===u||"<%="===u,d=this.next().read_function_list(this.read_expr,",");return this.expectEndOfStatement(),c(d,_);case this.tok.T_INLINE_HTML:var p=this.text(),f=this.lexer.yylloc.first_offset>0?this.lexer._input[this.lexer.yylloc.first_offset-1]:null,T="\r"===f||"\n"===f;T&&"\n"===f&&this.lexer.yylloc.first_offset>1&&"\r"===this.lexer._input[this.lexer.yylloc.first_offset-2]&&(f="\r\n");var k=this.node("inline");return this.next(),k(p,T?f+p:p);case this.tok.T_UNSET:var E=this.node("unset");this.next().expect("(")&&this.next();var m=this.read_function_list(this.read_variable,",");return this.expect(")")&&this.next(),this.expect(";")&&this.next(),E(m);case this.tok.T_DECLARE:var x,y=this.node("declare"),v=[];this.next().expect("(")&&this.next();var A=this.read_declare_list();if(this.expect(")")&&this.next(),":"===this.token){for(this.next();this.token!=this.EOF&&this.token!==this.tok.T_ENDDECLARE;)v.push(this.read_top_statement());0===v.length&&this.extractDoc&&this._docs.length>this._docIndex&&v.push(this.node("noop")()),this.expect(this.tok.T_ENDDECLARE)&&this.next(),this.expectEndOfStatement(),x=this.ast.declare.MODE_SHORT}else if("{"===this.token){for(this.next();this.token!=this.EOF&&"}"!==this.token;)v.push(this.read_top_statement());0===v.length&&this.extractDoc&&this._docs.length>this._docIndex&&v.push(this.node("noop")()),this.expect("}")&&this.next(),x=this.ast.declare.MODE_BLOCK}else this.expect(";")&&this.next(),x=this.ast.declare.MODE_NONE;return y(A,v,x);case this.tok.T_TRY:return this.read_try();case this.tok.T_THROW:var g=this.node("throw"),N=this.next().read_expr();return this.expectEndOfStatement(),g(N);case";":return this.next(),null;case this.tok.T_STRING:var L=this.node(),C=[this.token,this.lexer.getState()],b=this.text(),S=this.node("identifier");if(":"===this.next().token)return S=S(b),this.next(),L("label",S);S.destroy(),L.destroy(),this.lexer.tokens.push(C);var I=this.node("expressionstatement"),O=this.next().read_expr();return this.expectEndOfStatement(O),I(O);case this.tok.T_GOTO:var R=this.node("goto"),w=null;if(this.next().expect(this.tok.T_STRING)){w=this.node("identifier");var D=this.text();this.next(),w=w(D),this.expectEndOfStatement()}return R(w);default:var P=this.node("expressionstatement"),U=this.read_expr();return this.expectEndOfStatement(U),P(U)}},read_code_block:function(t){var e=this.node("block");this.expect("{")&&this.next();var i=t?this.read_top_statements():this.read_inner_statements();return 0===i.length&&this.extractDoc&&this._docs.length>this._docIndex&&i.push(this.node("noop")()),this.expect("}")&&this.next(),e(null,i)}};G.read_top_statements,G.read_top_statement,G.read_inner_statements,G.read_const_list,G.read_declare_list,G.read_inner_statement,G.read_statement,G.read_code_block;var V={read_switch:function(){var t=this.node("switch");this.expect(this.tok.T_SWITCH)&&this.next(),this.expect("(")&&this.next();var e=this.read_expr();this.expect(")")&&this.next();var i=":"===this.token;return t(e,this.read_switch_case_list(),i)},read_switch_case_list:function(){var t=null,e=this.node("block"),i=[];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;)i.push(this.read_case_list(t));return 0===i.length&&this.extractDoc&&this._docs.length>this._docIndex&&i.push(this.node("noop")()),this.expect(t)&&this.next(),t===this.tok.T_ENDSWITCH&&this.expectEndOfStatement(),e(null,i)},read_case_list:function(t){var e=this.node("case"),i=null;this.token===this.tok.T_CASE?i=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();for(var n=this.node("block"),s=[];this.token!==this.EOF&&this.token!==t&&this.token!==this.tok.T_CASE&&this.token!==this.tok.T_DEFAULT;)s.push(this.read_inner_statement());return e(i,n(null,s))}};V.read_switch,V.read_switch_case_list,V.read_case_list;var Q={read_try:function(){this.expect(this.tok.T_TRY);for(var t=this.node("try"),e=null,i=[],n=this.next().read_statement();this.token===this.tok.T_CATCH;){var s=this.node("catch");this.next().expect("(")&&this.next();var r=this.read_list(this.read_namespace_name,"|",!1),o=null;(this.version<800||this.token===this.tok.T_VARIABLE)&&(o=this.read_variable(!0,!1)),this.expect(")"),i.push(s(this.next().read_statement(),r,o))}return this.token===this.tok.T_FINALLY&&(e=this.next().read_statement()),t(n,i,e)}};Q.read_try;var W={read_short_form:function(t){var e=this.node("block"),i=[];for(this.expect(":")&&this.next();this.token!=this.EOF&&this.token!==t;)i.push(this.read_inner_statement());return 0===i.length&&this.extractDoc&&this._docs.length>this._docIndex&&i.push(this.node("noop")()),this.expect(t)&&this.next(),this.expectEndOfStatement(),e(null,i)},read_function_list:function(t,e){var i=[];do{if(this.token==e&&this.version>=703&&i.length>0){i.push(this.node("noop")());break}if(i.push(t.apply(this,[])),this.token!=e)break;if(")"==this.next().token&&this.version>=703)break}while(this.token!=this.EOF);return i},read_list:function(t,e,i){var n=[];if(this.token==e&&(i&&n.push("function"==typeof t?this.node("noop")():null),this.next()),"function"==typeof t)do{var s=t.apply(this,[]);if(s&&n.push(s),this.token!=e)break}while(this.next().token!=this.EOF);else{if(!this.expect(t))return[];for(n.push(this.text());this.next().token!=this.EOF&&this.token==e&&this.next().token==t;)n.push(this.text())}return n},read_name_list:function(){return this.read_list(this.read_namespace_name,",",!1)},read_byref:function(t){var e=this.node("byref");this.next(),e=e(null);var i=t();return i&&(this.ast.swapLocations(i,e,i,this),i.byref=!0),i},read_variable_declarations:function(){return this.read_list((function(){var t=this.node("staticvariable"),e=this.node("variable");if(this.expect(this.tok.T_VARIABLE)){var i=this.text().substring(1);this.next(),e=e(i,!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}};W.read_short_form,W.read_function_list,W.read_list,W.read_name_list,W.read_byref,W.read_variable_declarations,W.read_extends_from,W.read_interface_extends_list,W.read_implements_list;var Y={read_variable:function(t,e){var i;if("&"===this.token)return this.read_byref(this.read_variable.bind(this,t,e));if(this.is([this.tok.T_VARIABLE,"$"]))i=this.read_reference_variable(e);else if(this.is([this.tok.T_NS_SEPARATOR,this.tok.T_STRING,this.tok.T_NAME_RELATIVE,this.tok.T_NAME_QUALIFIED,this.tok.T_NAME_FULLY_QUALIFIED,this.tok.T_NAMESPACE])){i=this.node();var n=this.read_namespace_name();if(this.token!=this.tok.T_DOUBLE_COLON&&"("!=this.token&&-1===["parentreference","selfreference"].indexOf(n.kind)){var s=n.name.toLowerCase();"true"===s?i=n.destroy(i("boolean",!0,n.name)):"false"===s?i=n.destroy(i("boolean",!1,n.name)):"null"===s?i=n.destroy(i("nullkeyword",n.name)):(i.destroy(n),i=n)}else i.destroy(n),i=n}else if(this.token===this.tok.T_STATIC){i=this.node("staticreference");var r=this.text();this.next(),i=i(r)}else this.expect("VARIABLE");return this.token===this.tok.T_DOUBLE_COLON&&(i=this.read_static_getter(i,e)),this.recursive_variable_chain_scan(i,t,e)},read_static_getter:function(t,e){var i,n,s=this.node("staticlookup");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(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=null,i=null;switch(this.next().token){case this.tok.T_STRING:e=this.node("identifier"),i=this.text(),this.next(),e=e(i),t&&this.token===this.tok.T_OBJECT_OPERATOR&&this.error();break;case this.tok.T_VARIABLE:e=this.node("variable"),i=this.text().substring(1),this.next(),e=e(i,!1);break;case"$":e=this.node(),this.next().expect(["$","{",this.tok.T_VARIABLE]),"{"===this.token?(i=this.next().read_expr(),this.expect("}")&&this.next(),e=e("variable",i,!0)):e=e("variable",i=this.read_expr(),!1);break;case"{":e=this.node("encapsedpart"),i=this.next().read_expr(),this.expect("}")&&this.next(),e=e(i,"complex",!1);break;default:this.error([this.tok.T_STRING,this.tok.T_VARIABLE,"$","{"]),e=this.node("identifier"),i=this.text(),this.next(),e=e(i)}return e},recursive_variable_chain_scan:function(t,e,i){var n,s;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"{":var r="["===this.token;if(n=this.node("offsetlookup"),this.next(),s=!1,i)s=this.read_encaps_var_offset(),this.expect(r?"]":"}")&&this.next();else(r?"]"!==this.token:"}"!==this.token)?(s=this.read_expr(),this.expect(r?"]":"}")&&this.next()):this.next();t=n(t,s);break;case this.tok.T_DOUBLE_COLON:"staticlookup"===t.kind&&"identifier"===t.offset.kind&&this.error(),t=(n=this.node("staticlookup"))(t,this.read_what(!0));break;case this.tok.T_OBJECT_OPERATOR:t=(n=this.node("propertylookup"))(t,this.read_what());break;case this.tok.T_NULLSAFE_OBJECT_OPERATOR:t=(n=this.node("nullsafepropertylookup"))(t,this.read_what());break;default:break t}return t},read_encaps_var_offset:function(){var t=this.node();if(this.token===this.tok.T_STRING){var e=this.text();this.next(),t=t("identifier",e)}else if(this.token===this.tok.T_NUM_STRING){var i=this.text();this.next(),t=t("number",i,null)}else if("-"===this.token){this.next();var n=-1*this.text();this.expect(this.tok.T_NUM_STRING)&&this.next(),t=t("number",n,null)}else if(this.token===this.tok.T_VARIABLE){var s=this.text().substring(1);this.next(),t=t("variable",s,!1)}else{this.expect([this.tok.T_STRING,this.tok.T_NUM_STRING,"-",this.tok.T_VARIABLE]);var r=this.text();this.next(),t=t("identifier",r)}return t},read_reference_variable:function(t){for(var e,i=this.read_simple_variable();this.token!=this.EOF;){var n=this.node();if("{"!=this.token||t){n.destroy();break}e=this.next().read_expr(),this.expect("}")&&this.next(),i=n("offsetlookup",i,e)}return i},read_simple_variable:function(){var 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"{":var i=this.next().read_expr();this.expect("}")&&this.next(),e=e(i,!0);break;case"$":e=e(this.read_simple_variable(),!1);break;case this.tok.T_VARIABLE:t=this.text().substring(1);var n=this.node("variable");this.next(),e=e(n(t,!1),!1);break;default:this.error(["{","$",this.tok.T_VARIABLE]),t=this.text(),this.next(),e=e(t,!1)}return e}};function j(t){return"."!=t&&","!=t&&!isNaN(parseFloat(t))&&isFinite(t)}Y.read_variable,Y.read_static_getter,Y.read_what,Y.recursive_variable_chain_scan,Y.read_encaps_var_offset,Y.read_reference_variable,Y.read_simple_variable;var $=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=801,this.extractDoc=!1,this.extractTokens=!1,this.suppressErrors=!1;var i=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_ENUM,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_MATCH,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_READ_ONLY,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(i)),VARIABLE:new Map([this.tok.T_VARIABLE,"$","&",this.tok.T_STRING,this.tok.T_NAME_RELATIVE,this.tok.T_NAME_QUALIFIED,this.tok.T_NAME_FULLY_QUALIFIED,this.tok.T_NAMESPACE,this.tok.T_STATIC].map(i)),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(i)),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(i)),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(i)),EOS:new Map([";",this.EOF,this.tok.T_INLINE_HTML].map(i)),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_MATCH,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_NAME_RELATIVE,this.tok.T_NAME_QUALIFIED,this.tok.T_NAME_FULLY_QUALIFIED,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(i))}};$.prototype.getTokenName=function(t){return j(t)?t==this.EOF?"the end of file (EOF)":this.lexer.engine.tokens.values[t]:"'"+t+"'"},$.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;var i=this.node("program"),n=[];for(this.next();this.token!=this.EOF;)n.push(this.read_start());0===n.length&&this.extractDoc&&this._docs.length>this._docIndex&&n.push(this.node("noop")()),this.prev=[this.lexer.yylloc.last_line,this.lexer.yylloc.last_column,this.lexer.offset];var s=i(n,this._errors,this._docs,this._tokens);if(this.debug){var r=this.ast.checkNodes();if(r.length>0)throw r.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 s},$.prototype.raiseError=function(t,e,i,n){if(t+=" on line "+this.lexer.yylloc.first_line,!this.suppressErrors){var s=new SyntaxError(t,this.filename,this.lexer.yylloc.first_line);throw s.lineNumber=this.lexer.yylloc.first_line,s.fileName=this.filename,s.columnNumber=this.lexer.yylloc.first_column,s}var r=this.ast.prepare("error",null,this)(t,n,this.lexer.yylloc.first_line,i);return this._errors.push(r),r},$.prototype.error=function(t){var e="Parse Error : syntax error",i=this.getTokenName(this.token),n="";if(this.token!==this.EOF){if(j(this.token)){var s=this.text();s.length>10&&(s=s.substring(0,7)+"..."),i="'"+s+"' ("+i+")"}e+=", unexpected "+i}return t&&!Array.isArray(t)&&((j(t)||1===t.length)&&(n=", expecting "+this.getTokenName(t)),e+=n),this.raiseError(e,n,t,i)},$.prototype.position=function(){return new b(this.lexer.yylloc.first_line,this.lexer.yylloc.first_column,this.lexer.yylloc.first_offset)},$.prototype.node=function(t){if(this.extractDoc){var 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)));var i=this.ast.prepare(t,e,this);return i.postBuild=function(t){if(this._docIndex<this._docs.length)if(this._lastNode){for(var e=this.prev[2],i=this._docIndex;i<this._docs.length&&!(this._docs[i].offset>e);i++);i>this._docIndex&&(this._lastNode.setTrailingComments(this._docs.slice(this._docIndex,i)),this._docIndex=i)}else this.token===this.EOF&&(t.setTrailingComments(this._docs.slice(this._docIndex)),this._docIndex=this._docs.length);this._lastNode=t}.bind(this),i}return this.ast.prepare(t,null,this)},$.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};var z=["parser.next","parser.node","parser.showlog"];$.prototype.showlog=function(){for(var t,e=(new Error).stack.split("\n"),i=2;i<e.length;i++){t=e[i].trim();for(var n=!1,s=0;s<z.length;s++)if(t.substring(3,3+z[s].length)===z[s]){n=!0;break}if(!n)break}return console.log("Line "+this.lexer.yylloc.first_line+" : "+this.getTokenName(this.token)+">"+this.lexer.yytext+"< @--\x3e"+t),this},$.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},$.prototype.text=function(){return this.lexer.yytext},$.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},$.prototype.peek=function(){var t=this.lexer.getState(),e=this.lexer.lex();return this.lexer.setState(t),e},$.prototype.lex=function(){if(this.extractTokens)do{if(this.token=this.lexer.lex()||this.EOF,this.token===this.EOF)return this;var t=this.lexer.yytext;if(t=Object.prototype.hasOwnProperty.call(this.lexer.engine.tokens.values,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},$.prototype.is=function(t){return Array.isArray(t)?-1!==t.indexOf(this.token):this.entries[t].has(this.token)},[S,I,O,R,w,D,P,U,M,F,H,G,V,Q,W,Y].forEach((function(t){for(var e in t){if(Object.prototype.hasOwnProperty.call($.prototype,e))throw new Error("Function "+e+" is already defined - collision");$.prototype[e]=t[e]}}));var K=$,X=Object.freeze({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",236:"T_NULLSAFE_OBJECT_OPERATOR",237:"T_MATCH",238:"T_ATTRIBUTE",239:"T_ENUM",240:"T_READ_ONLY",241:"T_NAME_RELATIVE",242:"T_NAME_QUALIFIED",243:"T_NAME_FULLY_QUALIFIED"},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,T_NULLSAFE_OBJECT_OPERATOR:236,T_MATCH:237,T_ATTRIBUTE:238,T_ENUM:239,T_READ_ONLY:240,T_NAME_RELATIVE:241,T_NAME_QUALIFIED:242,T_NAME_FULLY_QUALIFIED:243}}),J=function(t,e,i){this.source=t,this.start=e,this.end=i},q=function(t,e,i){this.kind=t,e&&(this.leadingComments=e),i&&(this.loc=i)};q.prototype.setTrailingComments=function(t){this.trailingComments=t},q.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},q.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},q.extends=function(t,e){return e.prototype=Object.create(this.prototype),e.extends=this.extends,e.prototype.constructor=e,e.kind=t,e};var Z=q,tt="expression",et=Z.extends(tt,(function(t,e,i){Z.apply(this,[t||tt,e,i])})),it="array",nt=et.extends(it,(function(t,e,i,n){et.apply(this,[it,i,n]),this.items=e,this.shortForm=t})),st="arrowfunc",rt=et.extends(st,(function(t,e,i,n,s,r,o,a){et.apply(this,[st,o,a]),this.arguments=t,this.byref=e,this.body=i,this.type=n,this.nullable=s,this.isStatic=r||!1})),ot="assign",at=et.extends(ot,(function(t,e,i,n,s){et.apply(this,[ot,n,s]),this.left=t,this.right=e,this.operator=i})),ht="assignref",lt=et.extends(ht,(function(t,e,i,n){et.apply(this,[ht,i,n]),this.left=t,this.right=e})),ct="attribute",ut=Z.extends(ct,(function(t,e,i,n){Z.apply(this,[ct,i,n]),this.name=t,this.args=e})),_t="attrgroup",dt=Z.extends(_t,(function(t,e,i){Z.apply(this,[_t,e,i]),this.attrs=t||[]})),pt="operation",ft=et.extends(pt,(function(t,e,i){et.apply(this,[t||pt,e,i])})),Tt=ft.extends("bin",(function(t,e,i,n,s){ft.apply(this,["bin",n,s]),this.type=t,this.left=e,this.right=i})),kt="statement",Et=Z.extends(kt,(function(t,e,i){Z.apply(this,[t||kt,e,i])})),mt="block",xt=Et.extends(mt,(function(t,e,i,n){Et.apply(this,[t||mt,i,n]),this.children=e.filter(Boolean)})),yt="literal",vt=et.extends(yt,(function(t,e,i,n,s){et.apply(this,[t||yt,n,s]),this.value=e,i&&(this.raw=i)})),At="boolean",gt=vt.extends(At,(function(t,e,i,n){vt.apply(this,[At,t,e,i,n])})),Nt="break",Lt=Et.extends(Nt,(function(t,e,i){Et.apply(this,[Nt,e,i]),this.level=t})),Ct="byref",bt=et.extends(Ct,(function(t,e,i){et.apply(this,[Ct,e,i]),this.what=t})),St="call",It=et.extends(St,(function(t,e,i,n){et.apply(this,[St,i,n]),this.what=t,this.arguments=e})),Ot="case",Rt=Et.extends(Ot,(function(t,e,i,n){Et.apply(this,[Ot,i,n]),this.test=t,this.body=e})),wt="cast",Dt=ft.extends(wt,(function(t,e,i,n,s){ft.apply(this,[wt,n,s]),this.type=t,this.raw=e,this.expr=i})),Pt="catch",Ut=Et.extends(Pt,(function(t,e,i,n,s){Et.apply(this,[Pt,n,s]),this.body=t,this.what=e,this.variable=i})),Mt="declaration",Ft=Et.extends(Mt,(function(t,e,i,n){Et.apply(this,[t||Mt,i,n]),this.name=e}));Ft.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])};var Bt=Ft,Ht="class",Gt=Bt.extends(Ht,(function(t,e,i,n,s,r,o){Bt.apply(this,[Ht,t,r,o]),this.isAnonymous=!t,this.extends=e,this.implements=i,this.body=n,this.attrGroups=[],this.parseFlags(s)})),Vt="constantstatement",Qt=Et.extends(Vt,(function(t,e,i,n){Et.apply(this,[t||Vt,i,n]),this.constants=e})),Wt="classconstant",Yt=Qt.extends(Wt,(function(t,e,i,n,s,r){Qt.apply(this,[t||Wt,e,s,r]),this.parseFlags(i),this.attrGroups=n}));Yt.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")};var jt=Yt,$t="clone",zt=et.extends($t,(function(t,e,i){et.apply(this,[$t,e,i]),this.what=t})),Kt="closure",Xt=et.extends(Kt,(function(t,e,i,n,s,r,o,a){et.apply(this,[Kt,o,a]),this.uses=i,this.arguments=t,this.byref=e,this.type=n,this.nullable=s,this.isStatic=r||!1,this.body=null,this.attrGroups=[]})),Jt=Z.extends("comment",(function(t,e,i,n){Z.apply(this,[t,i,n]),this.value=e})),qt="commentblock",Zt=Jt.extends(qt,(function(t,e,i){Jt.apply(this,[qt,t,e,i])})),te="commentline",ee=Jt.extends(te,(function(t,e,i){Jt.apply(this,[te,t,e,i])})),ie="constant",ne=Z.extends(ie,(function(t,e,i,n){Z.apply(this,[ie,i,n]),this.name=t,this.value=e})),se="continue",re=Et.extends(se,(function(t,e,i){Et.apply(this,[se,e,i]),this.level=t})),oe="declare",ae=xt.extends(oe,(function(t,e,i,n,s){xt.apply(this,[oe,e,n,s]),this.directives=t,this.mode=i}));ae.MODE_SHORT="short",ae.MODE_BLOCK="block",ae.MODE_NONE="none";var he=ae,le="declaredirective",ce=Z.extends(le,(function(t,e,i,n){Z.apply(this,[le,i,n]),this.key=t,this.value=e})),ue=Et.extends("do",(function(t,e,i,n){Et.apply(this,["do",i,n]),this.test=t,this.body=e})),_e="echo",de=Et.extends(_e,(function(t,e,i,n){Et.apply(this,[_e,i,n]),this.shortForm=e,this.expressions=t})),pe="empty",fe=et.extends(pe,(function(t,e,i){et.apply(this,[pe,e,i]),this.expression=t})),Te="encapsed",ke=vt.extends(Te,(function(t,e,i,n,s){vt.apply(this,[Te,t,e,n,s]),this.type=i}));ke.TYPE_STRING="string",ke.TYPE_SHELL="shell",ke.TYPE_HEREDOC="heredoc",ke.TYPE_OFFSET="offset";var Ee=ke,me="encapsedpart",xe=et.extends(me,(function(t,e,i,n,s){et.apply(this,[me,n,s]),this.expression=t,this.syntax=e,this.curly=i})),ye="entry",ve=et.extends(ye,(function(t,e,i,n,s,r){et.apply(this,[ye,s,r]),this.key=t,this.value=e,this.byRef=i,this.unpack=n})),Ae="enum",ge=Bt.extends(Ae,(function(t,e,i,n,s,r){Bt.apply(this,[Ae,t,s,r]),this.valueType=e,this.implements=i,this.body=n,this.attrGroups=[]})),Ne="enumcase",Le=Z.extends(Ne,(function(t,e,i,n){Z.apply(this,[Ne,i,n]),this.name=t,this.value=e})),Ce="error",be=Z.extends(Ce,(function(t,e,i,n,s,r){Z.apply(this,[Ce,s,r]),this.message=t,this.token=e,this.line=i,this.expected=n})),Se="eval",Ie=et.extends(Se,(function(t,e,i){et.apply(this,[Se,e,i]),this.source=t})),Oe="exit",Re=et.extends(Oe,(function(t,e,i,n){et.apply(this,[Oe,i,n]),this.expression=t,this.useDie=e})),we="expressionstatement",De=Et.extends(we,(function(t,e,i){Et.apply(this,[we,e,i]),this.expression=t})),Pe=Et.extends("for",(function(t,e,i,n,s,r,o){Et.apply(this,["for",r,o]),this.init=t,this.test=e,this.increment=i,this.shortForm=s,this.body=n})),Ue="foreach",Me=Et.extends(Ue,(function(t,e,i,n,s,r,o){Et.apply(this,[Ue,r,o]),this.source=t,this.key=e,this.value=i,this.shortForm=s,this.body=n})),Fe="function",Be=Bt.extends(Fe,(function(t,e,i,n,s,r,o){Bt.apply(this,[Fe,t,r,o]),this.arguments=e,this.byref=i,this.type=n,this.nullable=s,this.body=null,this.attrGroups=[]})),He="global",Ge=Et.extends(He,(function(t,e,i){Et.apply(this,[He,e,i]),this.items=t})),Ve="goto",Qe=Et.extends(Ve,(function(t,e,i){Et.apply(this,[Ve,e,i]),this.label=t})),We="halt",Ye=Et.extends(We,(function(t,e,i){Et.apply(this,[We,e,i]),this.after=t})),je="identifier",$e=Z.extends(je,(function(t,e,i){Z.apply(this,[je,e,i]),this.name=t})),ze=$e,Ke=Et.extends("if",(function(t,e,i,n,s,r){Et.apply(this,["if",s,r]),this.test=t,this.body=e,this.alternate=i,this.shortForm=n})),Xe="include",Je=et.extends(Xe,(function(t,e,i,n,s){et.apply(this,[Xe,n,s]),this.once=t,this.require=e,this.target=i})),qe="inline",Ze=vt.extends(qe,(function(t,e,i,n){vt.apply(this,[qe,t,e,i,n])})),ti="interface",ei=Bt.extends(ti,(function(t,e,i,n,s,r){Bt.apply(this,[ti,t,s,r]),this.extends=e,this.body=i,this.attrGroups=n})),ii="intersectiontype",ni=Bt.extends(ii,(function(t,e,i){Bt.apply(this,[ii,null,e,i]),this.types=t})),si="isset",ri=et.extends(si,(function(t,e,i){et.apply(this,[si,e,i]),this.variables=t})),oi="label",ai=Et.extends(oi,(function(t,e,i){Et.apply(this,[oi,e,i]),this.name=t})),hi="list",li=et.extends(hi,(function(t,e,i,n){et.apply(this,[hi,i,n]),this.items=t,this.shortForm=e})),ci="lookup",ui=et.extends(ci,(function(t,e,i,n,s){et.apply(this,[t||ci,n,s]),this.what=e,this.offset=i})),_i="magic",di=vt.extends(_i,(function(t,e,i,n){vt.apply(this,[_i,t,e,i,n])})),pi="match",fi=et.extends(pi,(function(t,e,i,n){et.apply(this,[pi,i,n]),this.cond=t,this.arms=e})),Ti="matcharm",ki=et.extends(Ti,(function(t,e,i,n){et.apply(this,[Ti,i,n]),this.conds=t,this.body=e})),Ei="method",mi=Be.extends(Ei,(function(){Be.apply(this,arguments),this.kind=Ei})),xi="reference",yi=Z.extends(xi,(function(t,e,i){Z.apply(this,[t||xi,e,i])})),vi="name",Ai=yi.extends(vi,(function(t,e,i,n){yi.apply(this,[vi,i,n]),this.name=t.replace(/\\$/,""),this.resolution=e}));Ai.UNQUALIFIED_NAME="uqn",Ai.QUALIFIED_NAME="qn",Ai.FULL_QUALIFIED_NAME="fqn",Ai.RELATIVE_NAME="rn";var gi=Ai,Ni="namespace",Li=xt.extends(Ni,(function(t,e,i,n,s){xt.apply(this,[Ni,e,n,s]),this.name=t,this.withBrackets=i||!1})),Ci="namedargument",bi=et.extends(Ci,(function(t,e,i,n){et.apply(this,[Ci,i,n]),this.name=t,this.value=e})),Si=et.extends("new",(function(t,e,i,n){et.apply(this,["new",i,n]),this.what=t,this.arguments=e})),Ii="noop",Oi=Z.extends(Ii,(function(t,e){Z.apply(this,[Ii,t,e])})),Ri="nowdoc",wi=vt.extends(Ri,(function(t,e,i,n,s){vt.apply(this,[Ri,t,e,n,s]),this.label=i})),Di="nullkeyword",Pi=Z.extends(Di,(function(t,e,i){Z.apply(this,[Di,e,i]),this.raw=t})),Ui="nullsafepropertylookup",Mi=ui.extends(Ui,(function(t,e,i,n){ui.apply(this,[Ui,t,e,i,n])})),Fi="number",Bi=vt.extends(Fi,(function(t,e,i,n){vt.apply(this,[Fi,t,e,i,n])})),Hi="offsetlookup",Gi=ui.extends(Hi,(function(t,e,i,n){ui.apply(this,[Hi,t,e,i,n])})),Vi="parameter",Qi=Bt.extends(Vi,(function(t,e,i,n,s,r,o,a,h,l){Bt.apply(this,[Vi,t,h,l]),this.value=i,this.type=e,this.byref=n,this.variadic=s,this.readonly=r,this.nullable=o,this.flags=a||0,this.attrGroups=[]})),Wi="parentreference",Yi=yi.extends(Wi,(function(t,e,i){yi.apply(this,[Wi,e,i]),this.raw=t})),ji="post",$i=ft.extends(ji,(function(t,e,i,n){ft.apply(this,[ji,i,n]),this.type=t,this.what=e})),zi=ft.extends("pre",(function(t,e,i,n){ft.apply(this,["pre",i,n]),this.type=t,this.what=e})),Ki="print",Xi=et.extends(Ki,(function(t,e,i){et.apply(this,[Ki,e,i]),this.expression=t})),Ji="program",qi=xt.extends(Ji,(function(t,e,i,n,s,r){xt.apply(this,[Ji,t,s,r]),this.errors=e,i&&(this.comments=i),n&&(this.tokens=n)})),Zi="property",tn=Et.extends(Zi,(function(t,e,i,n,s,r,o,a){Et.apply(this,[Zi,o,a]),this.name=t,this.value=e,this.readonly=i,this.nullable=n,this.type=s,this.attrGroups=r})),en="propertylookup",nn=ui.extends(en,(function(t,e,i,n){ui.apply(this,[en,t,e,i,n])})),sn="propertystatement",rn=Et.extends(sn,(function(t,e,i,n,s){Et.apply(this,[sn,n,s]),this.properties=e,this.parseFlags(i)}));rn.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]};var on=rn,an="retif",hn=et.extends(an,(function(t,e,i,n,s){et.apply(this,[an,n,s]),this.test=t,this.trueExpr=e,this.falseExpr=i})),ln="return",cn=Et.extends(ln,(function(t,e,i){Et.apply(this,[ln,e,i]),this.expr=t})),un="selfreference",_n=yi.extends(un,(function(t,e,i){yi.apply(this,[un,e,i]),this.raw=t})),dn="silent",pn=et.extends(dn,(function(t,e,i){et.apply(this,[dn,e,i]),this.expr=t})),fn="static",Tn=Et.extends(fn,(function(t,e,i){Et.apply(this,[fn,e,i]),this.variables=t})),kn="staticvariable",En=Z.extends(kn,(function(t,e,i,n){Z.apply(this,[kn,i,n]),this.variable=t,this.defaultValue=e})),mn="staticlookup",xn=ui.extends(mn,(function(t,e,i,n){ui.apply(this,[mn,t,e,i,n])})),yn="staticreference",vn=yi.extends(yn,(function(t,e,i){yi.apply(this,[yn,e,i]),this.raw=t})),An="string",gn=vt.extends(An,(function(t,e,i,n,s,r){vt.apply(this,[An,e,n,s,r]),this.unicode=i,this.isDoubleQuote=t})),Nn="switch",Ln=Et.extends(Nn,(function(t,e,i,n,s){Et.apply(this,[Nn,n,s]),this.test=t,this.body=e,this.shortForm=i})),Cn="throw",bn=Et.extends(Cn,(function(t,e,i){Et.apply(this,[Cn,e,i]),this.what=t})),Sn="trait",In=Bt.extends(Sn,(function(t,e,i,n){Bt.apply(this,[Sn,t,i,n]),this.body=e})),On="traitalias",Rn=Z.extends(On,(function(t,e,i,n,s,r){Z.apply(this,[On,s,r]),this.trait=t,this.method=e,this.as=i,this.visibility="",n&&(0===n[0]?this.visibility="public":1===n[0]?this.visibility="protected":2===n[0]&&(this.visibility="private"))})),wn="traitprecedence",Dn=Z.extends(wn,(function(t,e,i,n,s){Z.apply(this,[wn,n,s]),this.trait=t,this.method=e,this.instead=i})),Pn="traituse",Un=Z.extends(Pn,(function(t,e,i,n){Z.apply(this,[Pn,i,n]),this.traits=t,this.adaptations=e})),Mn=Et.extends("try",(function(t,e,i,n,s){Et.apply(this,["try",n,s]),this.body=t,this.catches=e,this.always=i})),Fn="typereference",Bn=yi.extends(Fn,(function(t,e,i,n){yi.apply(this,[Fn,i,n]),this.name=t,this.raw=e}));Bn.types=["int","float","string","bool","object","array","callable","iterable","void","static"];var Hn=Bn,Gn="unary",Vn=ft.extends(Gn,(function(t,e,i,n){ft.apply(this,[Gn,i,n]),this.type=t,this.what=e})),Qn="uniontype",Wn=Bt.extends(Qn,(function(t,e,i){Bt.apply(this,[Qn,null,e,i]),this.types=t})),Yn="unset",jn=Et.extends(Yn,(function(t,e,i){Et.apply(this,[Yn,e,i]),this.variables=t})),$n="usegroup",zn=Et.extends($n,(function(t,e,i,n,s){Et.apply(this,[$n,n,s]),this.name=t,this.type=e,this.items=i})),Kn="useitem",Xn=Et.extends(Kn,(function(t,e,i,n,s){Et.apply(this,[Kn,n,s]),this.name=t,this.alias=e,this.type=i}));Xn.TYPE_CONST="const",Xn.TYPE_FUNCTION="function";var Jn=Xn,qn="variable",Zn=et.extends(qn,(function(t,e,i,n){et.apply(this,[qn,i,n]),this.name=t,this.curly=e||!1})),ts="variadic",es=et.extends(ts,(function(t,e,i){et.apply(this,[ts,e,i]),this.what=t})),is="variadicplaceholder",ns=Z.extends(is,(function(t,e){Z.apply(this,[is,t,e])})),ss="while",rs=Et.extends(ss,(function(t,e,i,n,s){Et.apply(this,[ss,n,s]),this.test=t,this.body=e,this.shortForm=i})),os="yield",as=et.extends(os,(function(t,e,i,n){et.apply(this,[os,i,n]),this.value=t,this.key=e})),hs="yieldfrom",ls=et.extends(hs,(function(t,e,i){et.apply(this,[hs,e,i]),this.value=t})),cs=function(t,e){this.withPositions=t,this.withSource=e};cs.precedence={},[["or"],["xor"],["and"],["="],["?"],["??"],["||"],["&&"],["|"],["^"],["&"],["==","!=","===","!==","<=>"],["<","<=",">",">="],["<<",">>"],["+","-","."],["*","/","%"],["!"],["instanceof"],["cast","silent"],["**"]].forEach((function(t,e){t.forEach((function(t){cs.precedence[t]=e+1}))})),cs.prototype.isRightAssociative=function(t){return"**"===t||"??"===t},cs.prototype.swapLocations=function(t,e,i,n){this.withPositions&&(t.loc.start=e.loc.start,t.loc.end=i.loc.end,this.withSource&&(t.loc.source=n.lexer._input.substring(t.loc.start.offset,t.loc.end.offset)))},cs.prototype.resolveLocations=function(t,e,i,n){this.withPositions&&(t.loc.start.offset>e.loc.start.offset&&(t.loc.start=e.loc.start),t.loc.end.offset<i.loc.end.offset&&(t.loc.end=i.loc.end),this.withSource&&(t.loc.source=n.lexer._input.substring(t.loc.start.offset,t.loc.end.offset)))},cs.prototype.resolvePrecedence=function(t,e){var i,n,s;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?(n=cs.precedence[t.type],s=cs.precedence[t.right.type],n&&s&&s<=n&&(t.type!==t.right.type||!this.isRightAssociative(t.type))&&(i=t.right,t.right=t.right.left,this.swapLocations(t,t.left,t.right,e),i.left=this.resolvePrecedence(t,e),this.swapLocations(i,i.left,i.right,e),t=i)):"retif"===t.right.kind&&(n=cs.precedence[t.type],s=cs.precedence["?"],n&&s&&s<=n&&(i=t.right,t.right=t.right.test,this.swapLocations(t,t.left,t.right,e),i.test=this.resolvePrecedence(t,e),this.swapLocations(i,i.test,i.falseExpr,e),t=i))):"silent"!==t.kind&&"cast"!==t.kind||!t.expr||t.expr.parenthesizedExpression?"unary"===t.kind?t.what&&!t.what.parenthesizedExpression&&("bin"===t.what.kind?(i=t.what,t.what=t.what.left,this.swapLocations(t,t,t.what,e),i.left=this.resolvePrecedence(t,e),this.swapLocations(i,i.left,i.right,e),t=i):"retif"===t.what.kind&&(i=t.what,t.what=t.what.test,this.swapLocations(t,t,t.what,e),i.test=this.resolvePrecedence(t,e),this.swapLocations(i,i.test,i.falseExpr,e),t=i)):"retif"===t.kind?t.falseExpr&&"retif"===t.falseExpr.kind&&!t.falseExpr.parenthesizedExpression&&(i=t.falseExpr,t.falseExpr=i.test,this.swapLocations(t,t.test,t.falseExpr,e),i.test=this.resolvePrecedence(t,e),this.swapLocations(i,i.test,i.falseExpr,e),t=i):"assign"===t.kind?t.right&&"bin"===t.right.kind&&!t.right.parenthesizedExpression&&(n=cs.precedence["="],s=cs.precedence[t.right.type],n&&s&&s<n&&(i=t.right,t.right=t.right.left,i.left=t,this.swapLocations(i,i.left,t.right,e),t=i)):"expressionstatement"===t.kind&&this.swapLocations(t,t.expression,t,e):"bin"===t.expr.kind?(i=t.expr,t.expr=t.expr.left,this.swapLocations(t,t,t.expr,e),i.left=this.resolvePrecedence(t,e),this.swapLocations(i,i.left,i.right,e),t=i):"retif"===t.expr.kind&&(i=t.expr,t.expr=t.expr.test,this.swapLocations(t,t,t.expr,e),i.test=this.resolvePrecedence(t,e),this.swapLocations(i,i.test,i.falseExpr,e),t=i),t},cs.prototype.prepare=function(t,e,i){var n=null;(this.withPositions||this.withSource)&&(n=i.position());var s=this,r=function r(){var o=null,a=Array.prototype.slice.call(arguments);if(a.push(e),s.withPositions||s.withSource){var h=null;s.withSource&&(h=i.lexer._input.substring(n.offset,i.prev[2])),o=new J(h,n,new b(i.prev[0],i.prev[1],i.prev[2])),a.push(o)}t||(t=a.shift());var l=s[t];if("function"!=typeof l)throw new Error('Undefined node "'+t+'"');var c=Object.create(l.prototype);return l.apply(c,a),r.instance=c,r.trailingComments&&(c.trailingComments=r.trailingComments),"function"==typeof r.postBuild&&r.postBuild(c),i.debug&&delete s.stack[r.stackUid],s.resolvePrecedence(c,i)};return i.debug&&(this.stack||(this.stack={},this.stackUid=1),this.stack[++this.stackUid]={position:n,stack:(new Error).stack.split("\n").slice(3,5)},r.stackUid=this.stackUid),r.setTrailingComments=function(t){r.instance?r.instance.setTrailingComments(t):r.trailingComments=t},r.destroy=function(t){e&&(t?t.leadingComments?t.leadingComments=e.concat(t.leadingComments):t.leadingComments=e:i._docIndex=i._docs.length-e.length),i.debug&&delete s.stack[r.stackUid]},r},cs.prototype.checkNodes=function(){var t=[];for(var e in this.stack)Object.prototype.hasOwnProperty.call(this.stack,e)&&(this.stack[e].key=e,t.push(this.stack[e]));return this.stack={},t},[nt,rt,at,lt,ut,dt,Tt,xt,gt,Lt,bt,It,Rt,Dt,Ut,Gt,jt,zt,Xt,Jt,Zt,ee,ne,Qt,re,Bt,he,ce,ue,de,fe,Ee,xe,ve,ge,Le,be,Ie,Re,et,De,Pe,Me,Be,Ge,Qe,Ye,ze,Ke,Je,Ze,ei,ni,ri,ai,li,vt,ui,di,fi,ki,mi,gi,Li,bi,Si,Z,Oi,wi,Pi,Mi,Bi,Gi,ft,Qi,Yi,$i,zi,Xi,qi,tn,nn,on,yi,hn,cn,_n,pn,Et,Tn,En,xn,vn,gn,Ln,bn,In,Rn,Dn,Un,Mn,Hn,Vn,Wn,jn,zn,Jn,Zn,es,ns,rs,as,ls].forEach((function(t){cs.prototype[t.kind]=t}));var us=cs;function _s(t,e){for(var i=Object.keys(t),n=i.length;n--;){var s=i[n],r=t[s];null===r?delete e[s]:"function"==typeof r?e[s]=r.bind(e):Array.isArray(r)?e[s]=Array.isArray(e[s])?e[s].concat(r):r:"object"===a(r)?e[s]="object"===a(e[s])?_s(r,e[s]):r:e[s]=r}return e}var ds=function(t){if("function"==typeof this)return new this(t);if(this.tokens=X,this.lexer=new C(this),this.ast=new us,this.parser=new K(this.lexer,this.ast),t&&"object"===a(t)){if(t.parser&&(t.lexer||(t.lexer={}),t.parser.version)){if("string"==typeof t.parser.version){var e=t.parser.version.split(".");if(e=100*parseInt(e[0])+parseInt(e[1]),isNaN(e))throw new Error("Bad version number : "+t.parser.version);t.parser.version=e}else if("number"!=typeof t.parser.version)throw new Error("Expecting a number for version");if(t.parser.version<500||t.parser.version>900)throw new Error("Can only handle versions between 5.x to 8.x")}_s(t,this),this.lexer.version=this.parser.version}},ps=function(t){return"function"==typeof t.write?t.toString():t};ds.create=function(t){return new ds(t)},ds.parseEval=function(t,e){return new ds(e).parseEval(t)},ds.prototype.parseEval=function(t){return this.lexer.mode_eval=!0,this.lexer.all_tokens=!1,t=ps(t),this.parser.parse(t,"eval")},ds.parseCode=function(t,e,i){return"object"!==a(e)||i||(i=e,e="unknown"),new ds(i).parseCode(t,e)},ds.prototype.parseCode=function(t,e){return this.lexer.mode_eval=!1,this.lexer.all_tokens=!1,t=ps(t),this.parser.parse(t,e)},ds.tokenGetAll=function(t,e){return new ds(e).tokenGetAll(t)},ds.prototype.tokenGetAll=function(t){this.lexer.mode_eval=!1,this.lexer.all_tokens=!0,t=ps(t);var e=this.lexer.EOF,i=this.tokens.values;this.lexer.setInput(t);for(var n=this.lexer.lex()||e,s=[];n!=e;){var r=this.lexer.yytext;Object.prototype.hasOwnProperty.call(i,n)&&(r=[i[n],r,this.lexer.yylloc.first_line]),s.push(r),n=this.lexer.lex()||e}return s};var fs=ds,Ts=X,ks=C,Es=us,ms=K,xs=_s,ys=ds,vs=ds;fs.tokens=Ts,fs.lexer=ks,fs.AST=Es,fs.parser=ms,fs.combine=xs,fs.Engine=ys,fs.default=vs;var As=function(t,e,i){var n=i&&"markdown"===i.parentParser;if(!t&&n)return"";t=t.replace(/\?>\r?\n<\?/g,"?>\n___PSEUDO_INLINE_PLACEHOLDER___<?");var s,r=new fs({parser:{extractDoc:!0},ast:{withPositions:!0,withSource:!0}}),o=-1!==t.indexOf("<?php"),a=n&&!o;try{s=a?r.parseEval(t):r.parseCode(t)}catch(t){throw t instanceof SyntaxError&&"lineNumber"in t&&(t.loc={start:{line:t.lineNumber,column:t.columnNumber}},delete t.lineNumber,delete t.columnNumber),t}return s.extra={parseAsEval:a},s.comments.forEach((function(t){"\r"===t.value[t.value.length-1]&&(t.value=t.value.slice(0,-1),t.loc.end.offset=t.loc.end.offset-1),"\n"===t.value[t.value.length-1]&&(t.value=t.value.slice(0,-1),t.loc.end.offset=t.loc.end.offset-1)})),s},gs=n.default.util,Ns=gs.hasNewline,Ls=gs.skipEverythingButNewLine,Cs=gs.skipNewline,bs=gs.isNextLineEmpty,Ss=gs.isPreviousLineEmpty,Is=gs.getNextNonSpaceNonCommentCharacterIndex,Os=n.default.version;function Rs(t,e){return parseInt(Os[0])>1?t[e]:t}var ws={};function Ds(t){return ws[t]}[["or"],["xor"],["and"],["=","+=","-=","*=","**=","/=",".=","%=","&=","|=","^=","<<=",">>="],["??"],["||"],["&&"],["|"],["^"],["&"],["==","===","!=","!==","<>","<=>"],["<",">","<=",">="],[">>","<<"],["+","-","."],["*","/","%"],["!"],["instanceof"],["++","--","~"],["**"]].forEach((function(t,e){t.forEach((function(t){ws[t]=e}))}));var Ps=["==","!=","===","!==","<>","<=>"],Us=["*","/","%"],Ms=[">>","<<"];function Fs(t){return["block","program","namespace","class","enum","interface","trait","traituse","declare"].includes(t.kind)}function Bs(t){var e=t.body;return e?("block"===e.kind&&(e=e.children),e[0]):null}function Hs(t){var e=t.children||t.body||t.adaptations;return Array.isArray(e)?e:null}function Gs(t){var e=t.getParentNode();return e?Hs(e):null}function Vs(t){return t.length>0?t[t.length-1]:null}function Qs(t){var e=t.getValue();if("program"===e.kind){var i=Hs(e);return!(!i||0===i.length)&&"inline"===i[0].kind}if("switch"===e.kind){if(!e.body)return!1;var n=Hs(e.body);if(0===n.length)return!1;var s=l(n,1)[0];if(!s.body)return!1;var r=Hs(s.body);return 0!==r.length&&"inline"===r[0].kind}var o=Bs(e);return!!o&&"inline"===o.kind}var Ws=["__construct","__destruct","__call","__callStatic","__get","__set","__isset","__unset","__sleep","__wakeup","__toString","__invoke","__set_state","__clone","__debugInfo"].reduce((function(t,e){return t[e.toLowerCase()]=e,t}),{});var Ys={printNumber:function(t){return t.toLowerCase().replace(/^([+-]?[\d.]+e)(?:\+|(-))?0*(\d)/,"$1$2$3").replace(/^([+-]?[\d.]+)e[+-]?0+$/,"$1").replace(/^([+-])?\./,"$10.").replace(/(\.\d+?)0+(?=e|$)/,"$1").replace(/\.(?=e)/,"")},getPrecedence:Ds,isBitwiseOperator:function(t){return!!Ms[t]||"|"===t||"^"===t||"&"===t},shouldFlatten:function(t,e){return Ds(e)===Ds(t)&&("**"!==t&&((!Ps.includes(t)||!Ps.includes(e))&&(!("%"===e&&Us.includes(t)||"%"===t&&Us.includes(e))&&((e===t||!Us.includes(e)||!Us.includes(t))&&(!Ms.includes(t)||!Ms.includes(e))))))},nodeHasStatement:Fs,getNodeListProperty:Hs,getParentNodeListProperty:Gs,getLast:Vs,getPenultimate:function(t){return t.length>1?t[t.length-2]:null},isLastStatement:function(t){var e=Gs(t);if(!e)return!0;var i=t.getValue();return e[e.length-1]===i},getBodyFirstChild:Bs,lineShouldEndWithSemicolon:function(t){var e=t.getValue(),i=t.getParentNode();if(!i)return!1;if(["for","foreach","while","do","if","switch"].includes(i.kind)&&"block"!==e.kind&&"if"!==e.kind&&(i.body===e||i.alternate===e))return!0;if(!Fs(i))return!1;if("echo"===e.kind&&e.shortForm)return!1;if("traituse"===e.kind)return!e.adaptations;if("method"===e.kind&&e.isAbstract)return!0;if("method"===e.kind){var n=t.getParentNode();if(n&&"interface"===n.kind)return!0}return["expressionstatement","do","usegroup","classconstant","propertystatement","traitprecedence","traitalias","goto","constantstatement","enumcase","global","static","echo","unset","return","break","continue","throw"].includes(e.kind)},fileShouldEndWithHardline:function(t){var e=t.getValue(),i="program"===e.kind,n=e.children&&Vs(e.children);if(!i)return!1;if(n&&["halt","inline"].includes(n.kind))return!1;if(n&&("declare"===n.kind||"namespace"===n.kind)){var s=n.children.length>0&&Vs(n.children);if(s&&["halt","inline"].includes(s.kind))return!1}return!0},maybeStripLeadingSlashFromUse:function(t){var e=t.replace(/^\\/,"");return-1!==e.indexOf("\\")?e:t},hasDanglingComments:function(t){return t.comments&&t.comments.some((function(t){return!t.leading&&!t.trailing}))},hasLeadingComment:function(t){return t.comments&&t.comments.some((function(t){return t.leading}))},hasTrailingComment:function(t){return t.comments&&t.comments.some((function(t){return t.trailing}))},docShouldHaveTrailingNewline:function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e.getNode(i),s=e.getNode(i+1),r=e.getNode(i+2);if(!s)return!1;if(r&&["call","new","echo"].includes(r.kind)&&!["call","array"].includes(s.kind)||"parameter"===s.kind){var o=r.arguments.length-1,a=r.arguments.indexOf(s);return a!==o}if(r&&"for"===r.kind){var h=r.init.indexOf(s);if(-1!==h)return h!==r.init.length-1;var l=r.test.indexOf(s);if(-1!==l)return l!==r.test.length-1;var c=r.increment.indexOf(s);if(-1!==c)return c!==r.increment.length-1}if("bin"===s.kind)return s.left===n||t(e,i+1);if("case"===s.kind&&s.test===n)return!0;if("staticvariable"===s.kind){var u=r.variables.length-1,_=r.variables.indexOf(s);return _!==u}if("entry"===s.kind){if(s.key===n)return!0;var d=r.items.length-1,p=r.items.indexOf(s);return p!==d}if(["call","new"].includes(s.kind)){var f=s.arguments.length-1,T=s.arguments.indexOf(n);return T!==f}if("echo"===s.kind){var k=s.expressions.length-1,E=s.expressions.indexOf(n);return E!==k}if("array"===s.kind){var m=s.items.length-1,x=s.items.indexOf(n);return x!==m}return"retif"===s.kind&&t(e,i+1)},isLookupNode:function(t){return"propertylookup"===t.kind||"nullsafepropertylookup"===t.kind||"staticlookup"===t.kind||"offsetlookup"===t.kind},isFirstChildrenInlineNode:Qs,shouldPrintHardLineAfterStartInControlStructure:function(t){var e=t.getValue();return!["try","catch"].includes(e.kind)&&Qs(t)},shouldPrintHardLineBeforeEndInControlStructure:function(t){var e=t.getValue();if(["try","catch"].includes(e.kind))return!0;if("switch"===e.kind){var i=Hs(e.body);if(0===i.length)return!0;var n=Vs(i);if(!n.body)return!0;var s=Hs(n.body);return 0===s.length||"inline"!==s[0].kind}return!Qs(t)},getAlignment:function(t){var e=t.split("\n").pop();return e.length-e.trimLeft().length+1},isProgramLikeNode:function(t){return["program","declare","namespace"].includes(t.kind)},isReferenceLikeNode:function(t){return["name","parentreference","selfreference","staticreference"].includes(t.kind)},getNodeKindIncludingLogical:function(t){return"bin"===t.kind&&["||","&&"].includes(t.type)?"logical":t.kind},useDoubleQuote:function(t,e){if(t.isDoubleQuote===e.singleQuote){var i=t.raw.slice("b"===t.raw[0]?2:1,-1).match(/\\([$nrtfve]|[xX][0-9a-fA-F]{1,2}|[0-7]{1,3}|u{([0-9a-fA-F]+)})|\r?\n|'|"|\$/);return t.isDoubleQuote?i:!i}return t.isDoubleQuote},hasEmptyBody:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"body",i=t.getValue();return i[e]&&i[e].children&&0===i[e].children.length&&(!i[e].comments||0===i[e].comments.length)},isNextLineEmptyAfterNamespace:function(t,e,i){var n=i(e);return n=Ls(t,n),n=Cs(t,n),Ns(t,n)},shouldPrintHardlineBeforeTrailingComma:function(t){return"nowdoc"===t.kind||"encapsed"===t.kind&&"heredoc"===t.type||"entry"===t.kind&&("nowdoc"===t.value.kind||"encapsed"===t.value.kind&&"heredoc"===t.value.type)},isDocNode:function(t){return"nowdoc"===t.kind||"encapsed"===t.kind&&"heredoc"===t.type},getAncestorNode:function(t,e){var i=function(t,e){for(var i,n=[].concat(e),s=-1;i=t.getParentNode(++s);)if(-1!==n.indexOf(i.kind))return s;return-1}(t,e);return-1===i?null:t.getParentNode(i)},getNextNode:function(t,e){var i=t.getParentNode(),n=Hs(i);if(!n)return null;var s=n.indexOf(e);return-1===s?null:i.children[s+1]},normalizeMagicMethodName:function(t){var e=t.toLowerCase();return Ws[e]?Ws[e]:t},isPreviousLineEmpty:function(t,e,i){return Ss(t,e,Rs(i,"locStart"))},isNextLineEmpty:function(t,e,i){return bs(t,e,Rs(i,"locEnd"))},getNextNonSpaceNonCommentCharacterIndex:function(t,e,i){return Is(t,e,Rs(i,"locEnd"))}},js=n.default.util,$s=js.addLeadingComment,zs=js.addDanglingComment,Ks=js.addTrailingComment,Xs=js.skipNewline,Js=js.hasNewline,qs=js.hasNewlineInRange,Zs=n.default.doc.builders,tr=Zs.concat,er=Zs.join,ir=Zs.indent,nr=Zs.hardline,sr=Zs.cursor,rr=Zs.lineSuffix,or=Zs.breakParent,ar=Ys.getNextNonSpaceNonCommentCharacterIndex,hr=Ys.isNextLineEmpty,lr=Ys.isPreviousLineEmpty,cr=Ys.isLookupNode;function ur(t,e){var i=t.children;0===i.length?zs(t,e):$s(i[0],e)}function _r(t,e){"block"===t.kind?ur(t,e):$s(t,e)}function dr(t,e,i,n,s,r){var o=ar(t,s,r),a=t.charAt(o);return e&&"identifier"===e.kind&&i&&("function"===i.kind||"method"===i.kind)&&")"===a?(Ks(i,s),!0):!(!i||"function"!==i.kind&&"method"!==i.kind||!n||"block"!==n.kind)&&(ur(n,s),!0)}function pr(t,e,i,n,s,r){if(!i||"if"!==i.kind||!n)return!1;var o=ar(t,s,r);return")"===t.charAt(o)?(Ks(e,s),!0):e===i.body&&n===i.alternate?(zs(i,s),!0):"if"===n.kind?(_r(n.body,s),!0):i.body===n&&($s(n,s),!0)}function fr(t,e,i){if(t&&["class","interface","trait"].includes(t.kind)){if(e&&t.extends)if(Array.isArray(t.extends)){if(t.extends.some((function(t){if(e&&e===t)return zs(e,i),!0})))return!0}else if(e===t.extends)return zs(e,i),!0;if(e&&t.implements&&t.implements.some((function(t){if(e&&e===t)return zs(e,i),!0})))return!0;if(!(t.body&&t.body.length>0))return zs(t,i),!0}return!!(e&&"class"===e.kind&&e.isAnonymous&&e.leadingComments&&"commentblock"===i.kind)}function Tr(t,e,i,n,s){if(e&&("function"===e.kind||"method"===e.kind)){for(var r=0,o=0;o<e.arguments.length;o++)r=s.locEnd(e.arguments[o])>r?s.locEnd(e.arguments[o]):r;var a=e.body&&s.locStart(n)>r&&s.locEnd(n)<s.locStart(e.body),h=ar(t,n,s);if(e.type&&a&&")"!==t.charAt(h))return s.locEnd(n)<s.locStart(e.type)?(zs(e.type,n),!0):(Ks(e.type,n),!0)}return!1}function kr(t,e,i,n,s){return!(!i||!["function","method","parameter"].includes(i.kind))&&("typereference"===e.kind&&"identifier"===n.kind&&(Ks(e,s),!0))}function Er(t,e){return!(!t||!["label","goto"].includes(t.kind))&&(Ks(t,e),!0)}function mr(t,e,i,n){return i&&"inline"===i.kind?(i.leadingComments||(i.leadingComments=[]),i.leadingComments.includes(n)||i.leadingComments.push(n),!0):!(t||i||!e||"inline"!==e.kind)&&(zs(e,n),!0)}function xr(t,e,i){return!(!t||"try"!==t.kind||!e)&&("block"===e.kind?(ur(e,i),!0):"try"===e.kind?(_r(e.always,i),!0):"catch"===e.kind&&(_r(e.body,i),!0))}function yr(t,e,i,n){return i||e||!t||"namespace"!==t.kind||t.withBrackets?!(e||!t||"namespace"!==t.kind||t.withBrackets)&&(zs(t,n),!0):(Ks(t,n),!0)}function vr(t,e,i,n){return!(!t||"declare"!==t.kind)&&((!e||"noop"!==e.kind)&&(i&&t.directives[0]!==i?!(!i||!e)&&($s(i,n),!0):("none"===t.mode?Ks(t,n):zs(t,n),!0)))}function Ar(t,e,i,n,s,r){if(!i||"while"!==i.kind||!n)return!1;var o=ar(t,s,r);return")"===t.charAt(o)?(Ks(e,s),!0):"block"===n.kind&&(ur(n,s),!0)}function gr(t,e){return t.getValue().printed=!0,e.printer.printComment(t,e)}function Nr(t,e,i){return t.getNode()===e.cursorNode&&t.getValue()?tr([sr,i,sr]):i}var Lr={handleOwnLineComment:function(t,e,i){var n=t.precedingNode,s=t.enclosingNode,r=t.followingNode;return dr(e,n,s,r,t,i)||function(t,e,i){if(t&&cr(t)&&e&&["identifier","variable","encapsed"].includes(e.kind))return $s(t,i),!0;return!1}(s,r,t)||pr(e,n,s,r,t,i)||Ar(e,n,s,r,t,i)||xr(s,r,t)||fr(s,r,t)||kr(e,n,s,r,t)||Tr(e,s,r,t,i)||function(t,e,i,n){if(!i&&t&&("for"===t.kind||"foreach"===t.kind))return t.body&&"block"!==t.body.kind?$s(i,n):$s(t,n),!0;return!1}(s,0,r,t)||mr(s,n,r,t)||vr(s,n,r,t)},handleEndOfLineComment:function(t,e,i){var n=t.precedingNode,s=t.enclosingNode,r=t.followingNode;return function(t,e,i,n,s){if(!e&&!n&&i&&"array"===i.kind)return Ks(i,s),!0;return!1}(0,n,s,r,t)||function(t,e,i,n,s){if(i&&"return"===i.kind&&!i.expr)return Ks(i,s),!0;return!1}(0,0,s,0,t)||dr(e,n,s,r,t,i)||function(t,e,i,n,s,r){var o=e&&!qs(s,r.locEnd(e),r.locStart(n));if((!e||!o)&&t&&"retif"===t.kind&&i)return $s(i,n),!0;return!1}(s,n,r,t,e,i)||pr(e,n,s,r,t,i)||Ar(e,n,s,r,t,i)||xr(s,r,t)||fr(s,r,t)||kr(e,n,s,r,t)||Tr(e,s,r,t,i)||function(t,e){if(t&&"entry"===t.kind)return $s(t,e),!0;return!1}(s,t)||function(t,e,i){if(e&&"call"===e.kind&&t&&e.what===t&&e.arguments.length>0)return $s(e.arguments[0],i),!0;return!1}(n,s,t)||function(t,e,i){if(t&&"assign"===t.kind&&e){var n=t.loc.start.offset+t.loc.source.indexOf("=");if(i.loc.start.offset>n)return $s(e,i),!0}return!1}(s,r,t)||mr(s,n,r,t)||yr(s,n,r,t)||vr(s,n,r,t)||Er(s,t)},handleRemainingComment:function(t,e,i){var n=t.precedingNode,s=t.enclosingNode,r=t.followingNode;return pr(e,n,s,r,t,i)||Ar(e,n,s,r,t,i)||function(t,e,i,n){var s=ar(t,i,n);if(")"!==t.charAt(s))return!1;if(e&&("function"===e.kind||"closure"===e.kind||"method"===e.kind||"call"===e.kind||"new"===e.kind)&&0===e.arguments.length)return zs(e,i),!0;return!1}(e,s,t,i)||fr(s,r,t)||function(t,e,i){if(t&&"traituse"===t.kind&&t.adaptations&&!t.adaptations.length)return zs(t,i),!0;return!1}(s,0,t)||kr(e,n,s,r,t)||Tr(e,s,r,t,i)||Er(s,t)||function(t,e,i,n){if(e&&"halt"===e.kind)return zs(e,n),!0;if(t&&"halt"===t.kind)return zs(t,n),!0;return!1}(n,s,0,t)||function(t,e){if(t&&("continue"===t.kind||"break"===t.kind)&&!t.label)return Ks(t,e),!0;return!1}(s,t)||mr(s,n,r,t)||yr(s,n,r,t)},getCommentChildNodes:function(t){return"object"!==a(t)?[]:function(t){return Object.keys(t).filter((function(t){return"kind"!==t&&"loc"!==t&&"errors"!==t&&"extra"!==t&&"comments"!==t&&"leadingComments"!==t&&"enclosingNode"!==t&&"precedingNode"!==t&&"followingNode"!==t})).map((function(e){return t[e]}))}(t)},canAttachComment:function(t){return t.kind&&"commentblock"!==t.kind&&"commentline"!==t.kind},isBlockComment:function(t){return"commentblock"===t.kind},printDanglingComments:function(t,e,i,n){var s=[],r=t.getValue();return r&&r.comments?(t.each((function(t){var i=t.getValue();!i||i.leading||i.trailing||n&&!n(i)||s.push(gr(t,e))}),"comments"),0===s.length?"":i?er(nr,s):ir(tr([nr,er(nr,s)]))):""},hasLeadingComment:function(t){return t.comments&&t.comments.some((function(t){return t.leading}))},hasTrailingComment:function(t){return t.comments&&t.comments.some((function(t){return t.trailing}))},hasLeadingOwnLineComment:function(t,e,i){return e.comments&&e.comments.some((function(e){return e.leading&&Js(t,i.locEnd(e))}))},printComments:function(t,e){var i=[];return t.forEach((function(t,n,s){t.printed=!0;var r=s.length===n+1;i.push(t.value),r||i.push(nr),hr(e.originalText,t,e)&&!r&&i.push(nr)})),tr(i)},printAllComments:function(t,e,i,n){var s=t.getValue(),r=e(t),o=s&&s.comments;if(!o||0===o.length)return Nr(t,i,r);var a=[],h=[n?";":"",r];return t.each((function(t){var e=t.getValue(),n=e.leading,s=e.trailing;if(n){var r=function(t,e,i){var n=t.getValue(),s=gr(t,i);if(!s)return"";var r=i.printer.isBlockComment&&i.printer.isBlockComment(n);return tr(r?[s,Js(i.originalText,i.locEnd(n))?nr:" "]:[s,nr])}(t,0,i);if(!r)return;a.push(r);var o=i.originalText;Js(o,Xs(o,i.locEnd(e)))&&a.push(nr)}else s&&h.push(function(t,e,i){var n=t.getValue(),s=gr(t,i);if(!s)return"";var r=i.printer.isBlockComment&&i.printer.isBlockComment(n);if(Js(i.originalText,i.locStart(n),{backwards:!0})){var o=lr(i.originalText,n,i);return rr(tr([nr,o?nr:"",s]))}return tr(r?[" ",s]:[rr(tr([" ",s])),r?"":or])}(t,0,i))}),"comments"),Nr(t,i,tr(a.concat(h)))}};function Cr(){}Cr.strictEqual=function(){};var br=Cr,Sr=Ys.getPrecedence,Ir=Ys.shouldFlatten,Or=Ys.isBitwiseOperator;var Rr=function(t){var e=t.getParentNode();if(!e)return!1;var i=t.getName(),n=t.getNode();if(["program","expressionstatement","namespace","declare","block","include","print","return","echo"].includes(e.kind))return!1;switch(n.kind){case"pre":case"post":if("unary"===e.kind)return"pre"===n.kind&&("+"===n.type&&"+"===e.type||"-"===n.type&&"-"===e.type);case"unary":switch(e.kind){case"unary":return n.type===e.type&&("+"===n.type||"-"===n.type);case"propertylookup":case"nullsafepropertylookup":case"staticlookup":case"offsetlookup":case"call":return"what"===i&&e.what===n;case"bin":return"**"===e.type&&"left"===i;default:return!1}case"bin":switch(e.kind){case"assign":case"retif":return["and","xor","or"].includes(n.type);case"silent":case"cast":return n.parenthesizedExpression;case"pre":case"post":case"unary":return!0;case"call":case"propertylookup":case"nullsafepropertylookup":case"staticlookup":case"offsetlookup":return"what"===i&&e.what===n;case"bin":var s=e.type,r=Sr(s),o=n.type,a=Sr(o);return r>a||("||"===s&&"&&"===o||(r===a&&"right"===i?(br.strictEqual(e.right,n),!0):r===a&&!Ir(s,o)||(r<a&&"%"===o?"+"===s||"-"===s:!!Or(s))));default:return!1}case"propertylookup":case"nullsafepropertylookup":case"staticlookup":return"call"===e.kind&&("what"===i&&e.what===n&&n.parenthesizedExpression);case"clone":case"new":switch(e.kind){case"propertylookup":case"nullsafepropertylookup":case"staticlookup":case"offsetlookup":case"call":return"what"===i&&e.what===n;default:return!1}case"yield":switch(e.kind){case"propertylookup":case"nullsafepropertylookup":case"staticlookup":case"offsetlookup":case"call":return"what"===i&&e.what===n;case"retif":return e.test===n;default:return!(!n.key&&!n.value)}case"assign":return("for"!==e.kind||!e.init.includes(n)&&!e.increment.includes(n))&&("assign"!==e.kind&&("static"!==e.kind&&(!["if","do","while","foreach","switch"].includes(e.kind)&&("silent"!==e.kind&&"call"!==e.kind))));case"retif":switch(e.kind){case"cast":return!0;case"unary":case"bin":case"retif":return!("test"===i&&!e.trueExpr);case"propertylookup":case"nullsafepropertylookup":case"staticlookup":case"offsetlookup":case"call":return"what"===i&&e.what===n;default:return!1}case"closure":switch(e.kind){case"call":return"what"===i&&e.what===n;case"propertylookup":case"nullsafepropertylookup":return!0;default:return!1}case"silence":case"cast":return n.parenthesizedExpression;case"string":case"array":switch(e.kind){case"propertylookup":case"nullsafepropertylookup":case"staticlookup":case"offsetlookup":case"call":return(!["string","array"].includes(n.kind)||"offsetlookup"!==e.kind)&&("what"===i&&e.what===n);default:return!1}case"print":case"include":return"bin"===e.kind}return!1},wr=n.default.doc.builders,Dr=wr.breakParent,Pr=wr.concat,Ur=wr.join,Mr=wr.line,Fr=wr.lineSuffix,Br=wr.group,Hr=wr.conditionalGroup,Gr=wr.indent,Vr=wr.dedent,Qr=wr.ifBreak,Wr=wr.hardline,Yr=wr.softline,jr=wr.literalline,$r=wr.align,zr=wr.dedentToRoot,Kr=n.default.doc.utils.willBreak,Xr=n.default.util,Jr=Xr.isNextLineEmptyAfterIndex,qr=Xr.hasNewline,Zr=Xr.hasNewlineInRange,to=Ys.getLast,eo=Ys.getPenultimate,io=Ys.isLastStatement,no=Ys.lineShouldEndWithSemicolon,so=Ys.printNumber,ro=Ys.shouldFlatten,oo=Ys.maybeStripLeadingSlashFromUse,ao=Ys.fileShouldEndWithHardline,ho=Ys.hasDanglingComments,lo=Ys.hasLeadingComment,co=Ys.hasTrailingComment,uo=Ys.docShouldHaveTrailingNewline,_o=Ys.isLookupNode,po=Ys.isFirstChildrenInlineNode,fo=Ys.shouldPrintHardLineAfterStartInControlStructure,To=Ys.shouldPrintHardLineBeforeEndInControlStructure,ko=Ys.getAlignment,Eo=Ys.isProgramLikeNode,mo=Ys.getNodeKindIncludingLogical,xo=Ys.useDoubleQuote,yo=Ys.hasEmptyBody,vo=Ys.isNextLineEmptyAfterNamespace,Ao=Ys.shouldPrintHardlineBeforeTrailingComma,go=Ys.isDocNode,No=Ys.getAncestorNode,Lo=Ys.isReferenceLikeNode,Co=Ys.getNextNode,bo=Ys.normalizeMagicMethodName,So=Ys.getNextNonSpaceNonCommentCharacterIndex,Io=Ys.isNextLineEmpty;function Oo(t,e){return parseFloat(t)>=parseFloat(e)}function Ro(t,e){return!!t.trailingCommaPHP&&Oo(t.phpVersion,e)}function wo(t){return"1tbs"!==t.braceStyle}function Do(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return Pr([n?"?":"","->",t.call(i,"offset")])}function Po(t,e,i){return Do(t,e,i,!0)}function Uo(t,e,i){var n=t.getValue(),s=!["variable","identifier"].includes(n.offset.kind);return Pr(["::",s?"{":"",t.call(i,"offset"),s?"}":""])}function Mo(t,e,i){var n=t.getValue(),s=n.offset&&"number"===n.offset.kind||No(t,"encapsed");return Pr(["[",n.offset?Br(Pr([Gr(Pr([s?"":Yr,t.call(i,"offset")])),s?"":Yr])):"","]"])}function Fo(t){return"array"===t.kind&&(t.items.length>0||t.comments)||"function"===t.kind||"method"===t.kind||"closure"===t.kind}function Bo(t){var e=to(t),i=eo(t);return!lo(e)&&!co(e)&&Fo(e)&&(!i||i.kind!==e.kind)}function Ho(t){if(2!==t.length)return!1;var e=l(t,2),i=e[0],n=e[1];return!(i.comments&&i.comments.length||"function"!==i.kind&&"method"!==i.kind&&"closure"!==i.kind||"retif"===n.kind||Fo(n))}function Go(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"arguments",s=t.getValue()[n];if(0===s.length)return Pr(["(",Lr.printDanglingComments(t,e,!0),")"]);var r=!1,o=!1,a=s.length-1,h=t.map((function(t,n){var s=t.getNode(),h=[i(t)];return n===a||(Io(e.originalText,s,e)?(0===n&&(o=!0),r=!0,h.push(",",Wr,Wr)):h.push(",",Mr)),Pr(h)}),n),l=t.getValue(),c=to(s),u=Ro(e,"7.3")&&["call","new","unset","isset"].includes(l.kind)||Ro(e,"8.0")&&["function","closure","method","arrowfunc","attribute"].includes(l.kind)?Gr(Pr([c&&Ao(c)?Wr:"",","])):"";function _(){return Br(Pr(["(",Gr(Pr([Mr,Pr(h)])),u,Mr,")"]),{shouldBreak:!0})}var d=Ho(s),p=Bo(s);if(d||p){var f,T=(d?h.slice(1).some(Kr):h.slice(0,-1).some(Kr))||r,k=0;t.each((function(t){d&&0===k&&(f=[Pr([t.call((function(t){return i(t,{expandFirstArg:!0})})),h.length>1?",":"",o?Wr:Mr,o?Wr:""])].concat(h.slice(1))),p&&k===s.length-1&&(f=h.slice(0,-1).concat(t.call((function(t){return i(t,{expandLastArg:!0})})))),k++}),n);var E=h.some(Kr),m=Pr(["(",Pr(f),")"]);return Pr([E?Dr:"",Hr([E?Qr(_(),m):m,Pr(d?["(",Br(f[0],{shouldBreak:!0}),Pr(f.slice(1)),")"]:["(",Pr(h.slice(0,-1)),Br(to(f),{shouldBreak:!0}),")"]),Br(Pr(["(",Gr(Pr([Mr,Pr(h)])),Qr(u),Mr,")"]),{shouldBreak:!0})],{shouldBreak:T})])}return Br(Pr(["(",Gr(Pr([Yr,Pr(h)])),Qr(u),Yr,")"]),{shouldBreak:h.some(Kr)||r})}function Vo(t){return"array"===t.kind&&0!==t.items.length}function Qo(t){return"array"===t.right.kind&&0!==t.right.items.length}function Wo(t,e,i,n,s){var r=[],o=t.getValue();if("bin"===o.kind){ro(o.type,o.left.type)?r=r.concat(t.call((function(t){return Wo(t,e,i,!0,s)}),"left")):r.push(t.call(e,"left"));var a=Qo(o),h=Pr(a?[o.type," ",t.call(e,"right")]:[o.type,Mr,t.call(e,"right")]),l=t.getParentNode(),c=!(s&&["||","&&"].includes(o.type))&&mo(l)!==mo(o)&&mo(o.left)!==mo(o)&&mo(o.right)!==mo(o),u=go(o.left)||"bin"===o.left.kind&&go(o.left.right);r.push(u?"":" ",c?Br(h):h),n&&o.comments&&(r=Lr.printAllComments(t,(function(){return Pr(r)}),i))}else r.push(t.call(e));return r}function Yo(t,e,i){var n=t.getValue();switch(n.kind){case"propertylookup":return Do(t,e,i);case"nullsafepropertylookup":return Po(t,e,i);case"staticlookup":return Uo(t,0,i);case"offsetlookup":return Mo(t,0,i);default:return"Have not implemented lookup kind ".concat(n.kind," yet.")}}function jo(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.opening,n=void 0===i||i;if("heredoc"===t.type)return n?"<<<".concat(t.label):t.label;var s={string:'"',shell:"`"};return s[t.type]?s[t.type]:"Unimplemented encapsed type ".concat(t.type)}function $o(t,e,i){var n=[],s=[];return t.each((function(t){n.push(Pr(s)),n.push(Br(i(t))),s=[",",Mr],t.getValue()&&Io(e.originalText,t.getValue(),e)&&s.push(Yr)}),"items"),Pr(n)}function zo(t,e){if(0===e.length)return t;var i=0;return e.reduce((function(e,n){var s=n.start,r=n.end,o=n.alignment,a=n.before,h=n.after,l=Pr([a||"",Pr(t.slice(s,r)),h||""]),c=e.concat(t.slice(i,s),o?zr(Br(Pr([$r(new Array(o).join(" "),l)]))):Br(l),r===t.length-1?t.slice(r):"");return i=r,c}),[])}function Ko(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"children",s=t.getValue(),r=t.getParentNode(),o=-1,a=[],h=[];t.map((function(l,c){var u=l.getValue(),_="inline"===u.kind,d=i(l),p=s[n],f=p[c+1],T=!io(l)&&!_&&(f&&"case"===f.kind?!po(t):f&&"inline"!==f.kind),k=Pr([d,T?Wr:"",T&&Io(e.originalText,u,e)?Wr:""]),E=0===c,m=p.length-1===c,x="block"===s.kind&&r&&["function","closure","method","try","catch"].includes(r.kind),y=x&&E?"":" ";if(_||!_&&m&&o>=0){var v=o;if(_&&(o=c),_&&!E||!_&&m){var A=(_?v:o)+1,g=m&&!_?c+1:c,N=p[_?v:o],L=N?ko(N.raw):"",C=g-A>1,b=C?x&&!N||Eo(s)&&0===A?"":Wr:"",S=C&&"halt"!==u.kind?x&&m?"":Wr:"";C&&(y=""),h.push({start:A,end:g,alignment:L,before:b,after:S})}}if(_){var I=f&&"echo"===f.kind&&f.shortForm?"<?=":"<?php",O=u.leadingComments&&u.leadingComments.length?Pr([E&&"namespace"!==s.kind&&!x?"<?php":"","namespace"!==s.kind&&x?"":Wr,Lr.printComments(u.leadingComments,e),Wr,"?>"]):Eo(s)&&E&&"namespace"!==s.kind?"":Pr([y,"?>"]),R=t.getNode(c+1),w=R&&R.children&&R.children.length,D=u.comments&&u.comments.length?Pr([I,Wr,w?Lr.printComments(u.comments,e):"",Wr,w?"?>":""]):Eo(s)&&m?"":Pr([I," "]);k=Pr([O,k,D])}a.push(k)}),n);var c=zo(a,h);if("program"===s.kind&&!s.extra.parseAsEval){var u=[],_=l(s.children,1),d=_[0],p=!d||"inline"!==d.kind;if(p){var f=e.originalText.trim().match(/^<\?(php|=)(\s+)?\S/),T=Pr([f&&f[2]&&f[2].includes("\n")?Pr([Wr,f[2].split("\n").length>2?Wr:""]):" ",s.comments?Lr.printComments(s.comments,e):""]),k=d&&"echo"===d.kind&&d.shortForm;u.push(Pr([k?"<?=":"<?php",T]))}u.push(Pr(c));var E=e.originalText.trim().endsWith("?>");if(E){var m=to(s.children),x=m?Pr([Zr(e.originalText.trimEnd(),e.locEnd(m),e.locEnd(s))?Wr:" ",Io(e.originalText,m,e)?Wr:""]):s.comments?Wr:"";u.push(Fr(Pr([x,"?>"])))}return Pr(u)}return Pr(c)}function Xo(t,e,i,n){return Pr(t.map((function(t){var n=[];return n.push(i(t)),io(t)||(n.push(Wr),Io(e.originalText,t.getValue(),e)&&n.push(Wr)),Pr(n)}),n))}function Jo(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"extends",s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:" ",r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:" ",o=t.getValue(),a=ho(o[n])?Pr([Wr,t.call((function(t){return Lr.printDanglingComments(t,e,!0)}),n),Wr]):s,h=Array.isArray(o[n])?Br(Pr([Ur(",",t.map((function(t){var n=i(t);return ho(t.getValue())?Pr([Wr,Lr.printDanglingComments(t,e,!0),Wr,n]):Pr([r,n])}),n))])):Pr([r,t.call(i,n)]);return Gr(Pr([a,n,Kr(a)?Gr(h):h]))}function qo(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=n.inline,r=void 0!==s&&s,o=[];return t.getValue().attrGroups?(t.each((function(t){var n=["#["];!r&&o.length>0&&o.push(Wr),n.push(Yr),t.each((function(t){var s=t.getValue();n.length>2&&n.push(",",Mr);var r=[s.name];s.args.length>0&&r.push(Go(t,e,i,"args")),n.push(Br(Pr(r)))}),"attrs"),o.push(Br(Pr([Gr(Pr(n)),Qr(Ro(e,"8.0")?",":""),Yr,"]",r?Qr(Yr," "):""])))}),"attrGroups"),0===o.length?[]:[Pr([].concat(o,[r?"":Wr]))]):[]}function Zo(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"body",s=t.getValue();if(!s[n])return";";var r=t.call(i,n);return Pr([s.shortForm?":":" {",Gr(Pr(["block"!==s[n].kind||s[n].children&&s[n].children.length>0||s[n].comments&&s[n].comments.length>0?Pr([fo(t)?"switch"===s.kind?" ":"":Wr,r]):""])),"if"===s.kind&&"body"===n?"":Pr([To(t)?Wr:"",s.shortForm?Pr(["end",s.kind,";"]):"}"])])}function ta(t,e,i,n,s,r,o){if(!n)return e;var a=ia(t,n,s,r,o);return Br(Pr([e,i,a]))}function ea(t){return!!_o(t)&&(!("variable"!==t.what.kind&&!Lo(t.what))||ea(t.what))}function ia(t,e,i,n,s){var r=n?"&":"";if(Lr.hasLeadingOwnLineComment(s.originalText,e,s))return Gr(Pr([Wr,r,i]));var o="cast"===e.kind?e.expr:e;return"bin"===o.kind&&!Qo(o)||"retif"===o.kind&&(!o.trueExpr&&!Vo(o.falseExpr)||"bin"===o.test.kind&&!Qo(o.test))||("variable"===t.kind||"string"===t.kind||_o(t))&&("string"===o.kind&&!na(o)||ea(o))?Br(Gr(Pr([Mr,r,i]))):Pr([" ",r,i])}function na(t){return t.raw.includes("\n")}function sa(t,e,i){return("string"===t.kind||"encapsed"===t.kind&&("string"===t.type||"shell"===t.type))&&na(t)&&!qr(e,i.locStart(t),{backwards:!0})}function ra(t,e,i){return Br(Pr(t.map((function(n,s){return Pr(0===s?[t.call(e)]:[i,t.call(e)])}),"types")))}var oa=function(t,e,i){var n=t.getValue();if(!n)return"";if("string"==typeof n)return n;var s=function(t,e,i){var n=t.getValue();switch(n.kind){case"program":return Br(Pr([Ko(t,e,i),Lr.printDanglingComments(t,e,!0,(function(t){return!t.printed}))]));case"expressionstatement":return t.call(i,"expression");case"block":return Pr([Ko(t,e,i),Lr.printDanglingComments(t,e,!0)]);case"declare":var s=function(t){return Ur(", ",t.map((function(t){return Pr([i(t)])}),"directives"))};if(["block","short"].includes(n.mode))return Pr(["declare(",s(t),")","block"===n.mode?" {":":",n.children.length>0?Gr(Pr([Wr,Ko(t,e,i)])):"",Lr.printDanglingComments(t,e),Wr,"block"===n.mode?"}":"enddeclare;"]);var r=Co(t,n);return Pr(["declare(",s(t),")",r&&"inline"===r.kind?"":";"]);case"declaredirective":return Pr([t.call(i,"key"),"=",t.call(i,"value")]);case"namespace":return Pr(["namespace ",n.name&&"string"==typeof n.name?Pr([n.name,n.withBrackets?" ":""]):"",n.withBrackets?"{":";",ho(n)?Pr([" ",Lr.printDanglingComments(t,e,!0)]):"",n.children.length>0?n.withBrackets?Gr(Pr([Wr,Ko(t,e,i)])):Pr(["inline"===n.children[0].kind?"":Pr([Wr,vo(e.originalText,n,e.locStart)?Wr:""]),Ko(t,e,i)]):"",n.withBrackets?Pr([Wr,"}"]):""]);case"usegroup":return Br(Pr(["use ",n.type?Pr([n.type," "]):"",Gr(Pr([n.name?Pr([oo(n.name),"\\{",Yr]):"",Ur(Pr([",",Mr]),t.map((function(t){return Pr([i(t)])}),"items"))])),n.name?Pr([Qr(Ro(e,"7.2")?",":""),Yr,"}"]):""]));case"useitem":return Pr([n.type?Pr([n.type," "]):"",oo(n.name),ho(n)?Pr([" ",Lr.printDanglingComments(t,e,!0)]):"",n.alias?Pr([" as ",t.call(i,"alias")]):""]);case"class":case"enum":case"interface":case"trait":return function(t,e,i){var n=t.getValue(),s="class"===n.kind&&n.isAnonymous,r=qo(t,e,i,{inline:s}),o=s?[]:c(r);n.isFinal&&o.push("final ");n.isAbstract&&o.push("abstract ");o.push(s?"":n.kind),n.name&&o.push(" ",t.call(i,"name"));"enum"===n.kind&&n.valueType&&o.push(": ",t.call(i,"valueType"));n.extends&&n.implements?o.push(Hr([Pr([Jo(t,e,i,"extends"),Jo(t,e,i,"implements")]),Pr([Jo(t,e,i,"extends"),Jo(t,e,i,"implements"," ",Wr)]),Pr([Jo(t,e,i,"extends",Wr," "),Jo(t,e,i,"implements",Wr,n.implements.length>1?Wr:" ")])],{shouldBreak:ho(n.extends)})):(n.extends&&o.push(Hr([Jo(t,e,i,"extends"),Jo(t,e,i,"extends"," ",Wr),Jo(t,e,i,"extends",Wr,n.extends.length>1?Wr:" ")])),n.implements&&o.push(Hr([Jo(t,e,i,"implements"),Jo(t,e,i,"implements"," ",Wr),Jo(t,e,i,"implements",Wr,n.implements.length>1?Wr:" ")])));var a=Br(Pr([Br(Pr(o)),wo(e)?s?Mr:Wr:" "])),h=n.body&&0===n.body.length&&!ho(n),l=Pr(["{",Gr(Pr([h?"":Wr,Xo(t,e,i,"body")])),Lr.printDanglingComments(t,e,!0),s&&h?Yr:Wr,"}"]);return Pr([a,l])}(t,e,i);case"traitprecedence":return Pr([t.call(i,"trait"),"::",t.call(i,"method")," insteadof ",Ur(", ",t.map(i,"instead"))]);case"traitalias":return Pr([n.trait?Pr([t.call(i,"trait"),"::"]):"",n.method?t.call(i,"method"):""," as ",Ur(" ",[].concat(c(n.visibility?[n.visibility]:[]),c(n.as?[t.call(i,"as")]:[])))]);case"traituse":return Br(Pr(["use ",Gr(Br(Ur(Pr([",",Mr]),t.map(i,"traits")))),n.adaptations?Pr([" {",n.adaptations.length>0?Pr([Gr(Pr([Wr,Xo(t,e,i,"adaptations")])),Wr]):ho(n)?Pr([Mr,Lr.printDanglingComments(t,e,!0),Mr]):"","}"]):""]));case"function":case"closure":case"method":return function(t,e,i){var n=t.getValue(),s=c(qo(t,e,i,{inline:"closure"===n.kind}));n.isFinal&&s.push("final ");n.isAbstract&&s.push("abstract ");n.visibility&&s.push(n.visibility," ");n.isStatic&&s.push("static ");s.push("function "),n.byref&&s.push("&");n.name&&s.push(t.call(i,"name"));s.push(Go(t,e,i)),n.uses&&n.uses.length>0&&s.push(Br(Pr([" use ",Go(t,e,i,"uses")])));n.type&&s.push(Pr([": ",ho(n.type)?Pr([t.call((function(t){return Lr.printDanglingComments(t,e,!0)}),"type")," "]):"",n.nullable?"?":"",t.call(i,"type")]));var r=Pr(s);if(!n.body)return r;var o="closure"===n.kind,a=Pr(["{",Gr(Pr([yo(t)?"":Wr,t.call(i,"body")])),o&&yo(t)?"":Wr,"}"]);if(o)return Pr([r," ",a]);if(0===n.arguments.length)return Pr([r,wo(e)?Wr:" ",a]);if(s.some(Kr))return Pr([r," ",a]);return Hr([Pr([r,wo(e)?Wr:" ",a]),Pr([r," ",a])])}(t,e,i);case"arrowfunc":return Pr([].concat(c(qo(t,e,i,{inline:!0})),[n.isStatic?"static ":"","fn",Go(t,e,i),n.type?Pr([": ",n.nullable?"?":"",t.call(i,"type")]):""," => ",t.call(i,"body")]));case"parameter":var o="";1===n.flags?o="public ":2===n.flags?o="protected ":4===n.flags&&(o="private ");var a=Pr([].concat(c(qo(t,e,i,{inline:!0})),[o,n.readonly?"readonly ":"",n.nullable?"?":"",n.type?Pr([t.call(i,"type")," "]):"",n.byref?"&":"",n.variadic?"...":"","$",t.call(i,"name")]));return n.value?Br(Pr([a,ho(n)?" ":"",Lr.printDanglingComments(t,e,!0),Pr([" =",ia(n.name,n.value,t.call(i,"value"),!1,e)])])):a;case"variadic":return Pr(["...",t.call(i,"what")]);case"property":return Br(Pr([n.readonly?"readonly ":"",n.type?Pr([n.nullable?"?":"",t.call(i,"type")," "]):"","$",t.call(i,"name"),n.value?Pr([" =",ia(n.name,n.value,t.call(i,"value"),!1,e)]):""]));case"propertystatement":var h=[];t.map((function(t){return h.push.apply(h,c(qo(t,e,i)))}),"properties");var u,_=t.map((function(t){return i(t)}),"properties"),d=n.properties.some((function(t){return t.value}));if(1!==_.length||n.properties[0].comments)_.length>0&&(u=Gr(_[0]));else u=l(_,1)[0];var p=n.visibility||null===n.visibility;return Br(Pr([].concat(h,[p?Pr([null===n.visibility?"var":n.visibility,""]):"",n.isStatic?Pr([p?" ":"","static"]):"",u?Pr([" ",u]):"",Gr(Pr(_.slice(1).map((function(t){return Pr([",",d?Wr:Mr,t])}))))])));case"if":var f=[],T=Zo(t,e,i,"body"),k=Br(Pr(["if (",Br(Pr([Gr(Pr([Yr,t.call(i,"test")])),Yr])),")",T]));if(f.push(k,po(t)||!n.body?"":Wr),n.alternate){f.push(n.shortForm?"":"} ");var E=co(n.body)&&n.body.comments.some((function(t){return t.trailing&&!Lr.isBlockComment(t)}))||function(t){if(!t.comments)return!1;var e=to(t.comments.filter((function(t){return!t.leading&&!t.trailing})));return e&&!Lr.isBlockComment(e)}(n),m=!E;f.push(m?"":Wr),ho(n)&&f.push(Io(e.originalText,n.body,e)?Wr:"",Lr.printDanglingComments(t,e,!0),E?Wr:" "),f.push("else",Br("if"===n.alternate.kind?t.call(i,"alternate"):Zo(t,e,i,"alternate")))}else f.push(n.body?n.shortForm?"endif;":"}":"");return Pr(f);case"do":return Pr(["do",Zo(t,e,i,"body")," while (",Br(Pr([Gr(Pr([Yr,t.call(i,"test")])),Yr])),")"]);case"while":case"switch":return Br(Pr([n.kind," (",Br(Pr([Gr(Pr([Yr,t.call(i,"test")])),Yr])),")",Zo(t,e,i,"body")]));case"for":var x=Zo(t,e,i,"body"),y=Lr.printDanglingComments(t,e,!0),v=y?Pr([y,Yr]):"";return n.init.length||n.test.length||n.increment.length?Pr([v,Br(Pr(["for (",Br(Pr([Gr(Pr([Yr,Br(Pr([Ur(Pr([",",Mr]),t.map(i,"init"))])),";",Mr,Br(Pr([Ur(Pr([",",Mr]),t.map(i,"test"))])),";",Mr,Br(Ur(Pr([",",Mr]),t.map(i,"increment")))])),Yr])),")",x]))]):Pr([v,Br(Pr(["for (;;)",x]))]);case"foreach":var A=Zo(t,e,i,"body"),g=Lr.printDanglingComments(t,e,!0),N=g?Pr([g,Yr]):"";return Pr([N,Br(Pr(["foreach (",Br(Pr([Gr(Pr([Yr,t.call(i,"source"),Mr,"as ",Br(n.key?Gr(Ur(Pr([" =>",Mr]),[t.call(i,"key"),t.call(i,"value")])):t.call(i,"value"))])),Yr])),")",A]))]);case"try":var L=[];return L.push("try",Zo(t,e,i,"body")),n.catches&&L.push(Pr(t.map(i,"catches"))),n.always&&L.push(" finally",Zo(t,e,i,"always")),Pr(L);case"catch":return Pr([" catch",n.what?Pr([" (",Ur(" | ",t.map(i,"what")),n.variable?Pr([" ",t.call(i,"variable")]):"",")"]):"",Zo(t,e,i,"body")]);case"case":return Pr([n.test?Pr(["case ",n.test.comments?Gr(t.call(i,"test")):t.call(i,"test"),":"]):"default:",n.body&&n.body.children&&n.body.children.length?Gr(Pr([po(t)?"":Wr,t.call(i,"body")])):""]);case"break":case"continue":return n.level&&("number"===n.level.kind&&"1"!==n.level.value)?Pr(["".concat(n.kind," "),t.call(i,"level")]):n.kind;case"call":return 1===n.arguments.length&&sa(n.arguments[0],e.originalText,e)?Pr([t.call(i,"what"),Pr(["(",Ur(", ",t.map(i,"arguments")),")"])]):_o(n.what)?function(t,e,i){var n=[];function s(t){var i=e.originalText,n=So(i,t,e);return")"===i.charAt(n)?Jr(i,n+1,e):Io(i,t,e)}function r(t){var o=t.getValue();if("call"!==o.kind||!_o(o.what)&&"call"!==o.what.kind)if(_o(o)){var a=null;a="propertylookup"===o.kind?Do(t,e,i):"nullsafepropertylookup"===o.kind?Po(t,e,i):"staticlookup"===o.kind?Uo(t,e,i):Mo(t,e,i),n.unshift({node:o,needsParens:Rr(t),printed:Lr.printAllComments(t,(function(){return a}),e)}),t.call((function(t){return r(t)}),"what")}else n.unshift({node:o,printed:t.call(i)});else n.unshift({node:o,printed:Pr([Lr.printAllComments(t,(function(){return Pr([Go(t,e,i)])}),e),s(o)?Wr:""])}),t.call((function(t){return r(t)}),"what")}var o=t.getValue();n.unshift({node:o,printed:Go(t,e,i)}),t.call((function(t){return r(t)}),"what");for(var a=0;a<n.length;++a)"call"===n[a].node.kind&&n[a-1]&&["propertylookup","nullsafepropertylookup","staticlookup"].includes(n[a-1].node.kind)&&n[a-1].needsParens&&(n[0].printed=Pr(["(",n[0].printed]),n[a-1].printed=Pr([n[a-1].printed,")"]));for(var h=[],l=[n[0]],c=1;c<n.length&&("call"===n[c].node.kind||_o(n[c].node)&&n[c].node.offset&&"number"===n[c].node.offset.kind);++c)l.push(n[c]);if("call"!==n[0].node.kind)for(;c+1<n.length&&(_o(n[c].node)&&_o(n[c+1].node));++c)l.push(n[c]);h.push(l),l=[];for(var u=!1;c<n.length;++c){if(u&&_o(n[c].node)){if("offsetlookup"===n[c].node.kind&&n[c].node.offset&&"number"===n[c].node.offset.kind){l.push(n[c]);continue}h.push(l),l=[],u=!1}"call"===n[c].node.kind&&(u=!0),l.push(n[c]),n[c].node.comments&&Lr.hasTrailingComment(n[c].node)&&(h.push(l),l=[],u=!1)}l.length>0&&h.push(l);function _(t){var i=t[1].length&&"offsetlookup"===t[1][0].node.kind;if(1===t[0].length){var n=t[0][0].node;return"variable"===n.kind&&("this"===n.name||d&&s(n.name))||Lo(n)}function s(t){return t.length<e.tabWidth}var r=to(t[0]).node;return _o(r)&&("identifier"===r.offset.kind||"variable"===r.offset.kind)&&i}var d="expressionstatement"===t.getParentNode().kind,p=h.length>=2&&!h[1][0].node.comments&&_(h);function f(t){for(var e=[],i=0;i<t.length;i++)t[i+1]&&t[i+1].needsParens?(e.push("(",t[i].printed,t[i+1].printed,")"),i++):e.push(t[i].printed);return Pr(e)}function T(t){return 0===t.length?"":Gr(Br(Pr([Wr,Ur(Wr,t.map(f))])))}var k=h.map(f),E=Pr(k),m=p?3:2,x=h.slice(0,m).reduce((function(t,e){return t.concat(e)}),[]),y=x.slice(1,-1).some((function(t){return Lr.hasLeadingComment(t.node)}))||x.slice(0,-1).some((function(t){return Lr.hasTrailingComment(t.node)}))||h[m]&&Lr.hasLeadingComment(h[m][0].node),v=No(t,"encapsed");if(h.length<=m&&!y||v)return Br(E);var A=to(p?h.slice(1,2)[0]:h[0]).node,g="call"!==A.kind&&s(A),N=Pr([f(h[0]),p?Pr(h.slice(1,2).map(f)):"",g?Wr:"",T(h.slice(p?2:1))]),L=n.filter((function(t){return"call"===t.node.kind})).length;if(y||L>=3||k.slice(0,-1).some(Kr))return Br(N);return Pr([Kr(E)||g?Dr:"",Hr([E,N])])}(t,e,i):Pr([t.call(i,"what"),Go(t,e,i)]);case"new":var C=n.what&&"class"===n.what.kind&&n.what.isAnonymous;if(!C&&1===n.arguments.length&&sa(n.arguments[0],e.originalText,e))return Pr(["new "].concat(c(t.call(qo,"what")),[t.call(i,"what"),"(",Ur(", ",t.map(i,"arguments")),")"]));var b=[];if(b.push("new "),C)b.push.apply(b,[n.what.leadingComments&&"commentblock"===n.what.leadingComments[0].kind?Pr([Lr.printComments(n.what.leadingComments,e)," "]):""].concat(c(t.call((function(t){return qo(t,e,i,{inline:!0})}),"what")),["class",n.arguments.length>0?Pr([" ",Go(t,e,i)]):"",Br(t.call(i,"what"))]));else{var S=Pr([t.call(i,"what"),Go(t,e,i)]);b.push(lo(n.what)?Gr(S):S)}return Pr(b);case"clone":return Pr(["clone ",n.what.comments?Gr(t.call(i,"what")):t.call(i,"what")]);case"propertylookup":case"nullsafepropertylookup":case"staticlookup":case"offsetlookup":var I,O=t.getParentNode(),R=0;do{I=t.getParentNode(R),R++}while(I&&_o(I));var w=No(t,"encapsed")||I&&("new"===I.kind||"assign"===I.kind&&"variable"!==I.left.kind)||"offsetlookup"===n.kind||(Lo(n.what)||"variable"===n.what.kind)&&["identifier","variable","encapsedpart"].includes(n.offset.kind)&&O&&!_o(O);return Pr([t.call(i,"what"),w?Yo(t,e,i):Br(Gr(Pr([Yr,Yo(t,e,i)])))]);case"exit":return Br(Pr([n.useDie?"die":"exit","(",n.expression?sa(n.expression,e.originalText,e)?t.call(i,"expression"):Pr([Gr(Pr([Yr,t.call(i,"expression")])),Yr]):Lr.printDanglingComments(t,e),")"]));case"global":return Br(Pr(["global ",Gr(Pr([Ur(Pr([",",Mr]),t.map(i,"items"))]))]));case"include":return Pr([n.require?"require":"include",n.once?"_once":""," ",n.target.comments?Gr(t.call(i,"target")):t.call(i,"target")]);case"label":return Pr([t.call(i,"name"),":"]);case"goto":return Pr(["goto ",t.call(i,"label")]);case"throw":return Pr(["throw ",n.what.comments?Gr(t.call(i,"what")):t.call(i,"what")]);case"silent":return Pr(["@",t.call(i,"expr")]);case"halt":return Pr([ho(n)?Pr([Lr.printDanglingComments(t,e,!0),Wr]):"","__halt_compiler();",n.after]);case"eval":return Br(Pr(["eval(",sa(n.source,e.originalText,e)?t.call(i,"source"):Pr([Gr(Pr([Yr,t.call(i,"source")])),Yr]),")"]));case"echo":var D,P=t.map((function(t){return i(t)}),"expressions");if(1!==P.length||n.expressions[0].comments)P.length>0&&(D=go(n.expressions[0])||n.expressions[0].comments?Gr(P[0]):Vr(P[0]));else D=l(P,1)[0];return Br(Pr([n.shortForm?"":"echo ",D||"",Gr(Pr(P.slice(1).map((function(t){return Pr([",",Mr,t])}))))]));case"print":return Pr(["print ",n.expression.comments?Gr(t.call(i,"expression")):t.call(i,"expression")]);case"return":var U=[];if(U.push("return"),n.expr){var M=t.call(i,"expr");U.push(" ",n.expr.comments?Gr(M):M)}return ho(n)&&U.push(" ",Lr.printDanglingComments(t,e,!0)),Pr(U);case"isset":case"unset":return Br(Pr([n.kind,Go(t,e,i,"variables")]));case"empty":return Br(Pr(["empty(",Gr(Pr([Yr,t.call(i,"expression")])),Yr,")"]));case"variable":var F=t.getParentNode(),B=t.getParentNode(1),H="assign"===F.kind?"":n.byref?"&":"",G="encapsedpart"===F.kind&&"simple"===F.syntax&&F.curly||B&&"offsetlookup"===F.kind&&"encapsedpart"===B.kind&&"simple"===B.syntax&&B.curly?"":"$",V=n.curly?"{":"",Q=n.curly?"}":"";return Pr([H,G,V,t.call(i,"name"),Q]);case"constantstatement":case"classconstant":var W,Y=qo(t,e,i),j=t.map((function(t){return i(t)}),"constants");if(1!==j.length||n.constants[0].comments)j.length>0&&(W=Gr(j[0]));else W=l(j,1)[0];return Br(Pr([].concat(c(Y),[n.visibility?Pr([n.visibility," "]):"","const",W?Pr([" ",W]):"",Gr(Pr(j.slice(1).map((function(t){return Pr([",",Wr,t])}))))])));case"constant":return ta(n.name,t.call(i,"name")," =",n.value,t.call(i,"value"),!1,e);case"static":var $,z=t.map((function(t){return i(t)}),"variables"),K=n.variables.some((function(t){return t.defaultValue}));if(1!==z.length||n.variables[0].comments)z.length>0&&($=Gr(z[0]));else $=l(z,1)[0];return Br(Pr(["static",$?Pr([" ",$]):"",Gr(Pr(z.slice(1).map((function(t){return Pr([",",K?Wr:Mr,t])}))))]));case"staticvariable":return ta(n.variable,t.call(i,"variable")," =",n.defaultValue,t.call(i,"defaultValue"),!1,e);case"list":case"array":var X="array"===n.kind&&Oo(e.phpVersion,"5.4")||"list"===n.kind&&(n.shortForm||Oo(e.phpVersion,"7.1")),J=X?"[":Pr([n.kind,"("]),q=X?"]":")";if(0===n.items.length)return ho(n)?Br(Pr([J,Lr.printDanglingComments(t,e),Yr,q])):Pr([J,q]);var Z=to(n.items),tt=Z&&"noop"===Z.kind,et=l(n.items.filter((function(t){return"noop"!==t.kind})).sort((function(t,i){return e.locStart(t)-e.locStart(i)})),1)[0],it=!(!et||!et.key)&&et&&Zr(e.originalText,e.locStart(n),e.locStart(et));return Br(Pr([J,Gr(Pr([Yr,$o(t,e,i)])),tt?",":"",Qr(!tt&&Ro(e,"5.0")?Pr([Z&&Ao(Z)?Wr:"",","]):""),Lr.printDanglingComments(t,e,!0),Yr,q]),{shouldBreak:it});case"entry":var nt=n.byRef?"&":"",st=n.unpack?"...":"";return n.key?ta(n.key,t.call(i,"key")," =>",n.value,t.call(i,"value"),nt,e):Pr([nt,st,t.call(i,"value")]);case"yield":var rt=Pr([n.key?Pr([t.call(i,"key")," => "]):"",t.call(i,"value")]);return Pr(["yield",n.key||n.value?" ":"",n.value&&n.value.comments?Gr(rt):rt]);case"yieldfrom":return Pr(["yield from ",n.value.comments?Gr(t.call(i,"value")):t.call(i,"value")]);case"unary":return Pr([n.type,t.call(i,"what")]);case"pre":return Pr([n.type+n.type,t.call(i,"what")]);case"post":return Pr([t.call(i,"what"),n.type+n.type]);case"cast":return Pr(["(",n.type,") ",n.expr.comments?Gr(t.call(i,"expr")):t.call(i,"expr")]);case"assignref":case"assign":var ot="assignref"===n.kind;return ta(n.left,t.call(i,"left"),Pr([" ",ot?"=":n.operator]),n.right,t.call(i,"right"),ot,e);case"bin":var at=t.getParentNode(),ht=t.getParentNode(1),lt=n!==at.body&&("if"===at.kind||"while"===at.kind||"switch"===at.kind||"do"===at.kind),ct=Wo(t,i,e,!1,lt);if(lt)return Pr(ct);if("unary"===at.kind||_o(at)&&"offsetlookup"!==at.kind)return Br(Pr([Gr(Pr([Yr,Pr(ct)])),Yr]));var ut=n!==at.body&&"for"===at.kind||"retif"===at.kind&&ht&&"return"!==ht.kind,_t=["assign","property","constant","staticvariable","entry"].includes(at.kind),dt="bin"===n.left.kind&&ro(n.type,n.left.type);if(ut||Qo(n)&&!dt||!Qo(n)&&_t)return Br(Pr(ct));var pt=Pr(ct.slice(1));return Br(Pr([ct.length>0?ct[0]:"",Gr(pt)]));case"retif":var ft,Tt=[],kt=t.getParentNode(),Et=0;do{ft=t.getParentNode(Et),Et++}while(ft&&"retif"===ft.kind);var mt=ft||kt,xt="bin"===n.falseExpr.kind?Gr(t.call(i,"falseExpr")):t.call(i,"falseExpr"),yt=Pr([n.trueExpr?Mr:" ","?",n.trueExpr?Pr([" ","bin"===n.trueExpr.kind?Gr(t.call(i,"trueExpr")):t.call(i,"trueExpr"),Mr]):"",":",n.trueExpr?Pr([" ",xt]):Pr([Vo(n.falseExpr)?" ":Mr,xt])]);Tt.push(yt);var vt=function(t){return kt===mt?Br(t):t},At=t.getParentNode(1),gt="cast"===kt.kind&&At?At:kt,Nt=["propertylookup","nullsafepropertylookup","staticlookup"].includes(gt.kind),Lt=t.call(i,"test");if(!n.trueExpr){var Ct=Pr([Lt,"bin"===gt.kind||["print","echo","return","include"].includes(mt.kind)?Gr(Pr(Tt)):Pr(Tt)]);return"call"===gt.kind&&gt.what===n||"unary"===gt.kind||_o(gt)&&"offsetlookup"!==gt.kind?Br(Pr([Gr(Pr([Yr,Ct])),Yr])):vt(Ct)}return vt(Pr(["retif"===n.test.kind?Gr(Lt):Lt,Gr(Pr(Tt)),Nt?Yr:""]));case"boolean":return n.value?"true":"false";case"number":return so(n.value);case"string":if("encapsedpart"===t.getParentNode().kind){var bt=t.getParentNode(1),St=0,It=Oo(e.phpVersion,"7.3"),Ot=jr;if("heredoc"===bt.type){Ot=It?Wr:jr;var Rt=bt.raw.split(/\r?\n/g);-1===(St=Rt[Rt.length-1].search(/\S/))&&(St=Rt[Rt.length-2].search(/\S/))}return Ur(Ot,n.raw.split(/\r?\n/g).map((function(t,e){return e>0||0===n.loc.start.column?t.substring(St):t})))}var wt=xo(n,e)?'"':"'",Dt=n.raw;return"b"===n.raw[0]&&(Dt=Dt.slice(1)),['"',"'"].includes(Dt[0])&&(Dt=Dt.substr(1)),['"',"'"].includes(Dt[Dt.length-1])&&(Dt=Dt.substr(0,Dt.length-1)),Pr(["b"===n.raw[0]?"b":"",wt,Ur(jr,Dt.split(/\r?\n/g)),wt]);case"intersectiontype":return ra(t,i,"&");case"uniontype":return ra(t,i,"|");case"encapsedpart":var Pt="simple"===n.syntax&&n.curly||"complex"===n.syntax?Pr([n.curly?"$":"","{"]):"",Ut="simple"===n.syntax&&n.curly||"complex"===n.syntax?"}":"";return Pr([Pt,t.call(i,"expression"),Ut]);case"encapsed":switch(n.type){case"string":case"shell":case"heredoc":var Mt=Oo(e.phpVersion,"7.3")?Wr:jr;return Pr([jo(n),"heredoc"===n.type?Mt:"",Pr(t.map(i,"value")),jo(n,{opening:!1}),"heredoc"===n.type&&uo(t)?Wr:""]);default:return"Have not implemented kind ".concat(n.type," yet.")}case"inline":return Ur(jr,n.raw.replace("___PSEUDO_INLINE_PLACEHOLDER___","").split(/\r?\n/g));case"magic":return n.value;case"nowdoc":var Ft=Oo(e.phpVersion,"7.3")?Wr:jr;return Pr(["<<<'",n.label,"'",Ft,Ur(Ft,n.value.split(/\r?\n/g)),Ft,n.label,uo(t)?Wr:""]);case"name":return Pr(["rn"===n.resolution?"namespace\\":"",n.name]);case"literal":return t.call(i,"value");case"parentreference":return"parent";case"selfreference":return"self";case"staticreference":return"static";case"typereference":return n.name;case"nullkeyword":return"null";case"identifier":return"method"===t.getParentNode().kind&&(n.name=bo(n.name)),t.call(i,"name");case"match":var Bt=t.map((function(t,e){var n=null===t.getValue().conds?"default":Pr(t.map((function(t,e){return Br(Pr(e>0?[",",Mr,i(t)]:[i(t)]))}),"conds")),s=t.call(i,"body");return Pr(e>0?[", ",Wr,n," => ",s]:[Wr,n," => ",s])}),"arms");return Br(Pr(["match (",Br(Pr([Yr,Gr(Pr([t.call(i,"cond")])),Yr])),") {",Br(Gr(Pr([].concat(c(Bt),[e.trailingCommaPHP?Qr(","):""]))))," ",Yr,"}"]));case"noop":return n.comments?Lr.printComments(t.getValue().comments,e):"";case"namedargument":return Pr([n.name,": ",t.call(i,"value")]);case"enumcase":return Br(Pr(["case ",t.call(i,"name"),n.value?Pr([" =",ia(n.name,n.value,t.call(i,"value"),!1,e)]):""]));case"variadicplaceholder":return"...";default:return"Have not implemented kind ".concat(n.kind," yet.")}}(t,e,i),r=[],o=Rr(t);return o&&r.unshift("("),r.push(s),o&&r.push(")"),no(t)&&r.push(";"),ao(t)&&r.push(Wr),Pr(r)};var aa=function(t,e){if(["loc","range","raw","comments","leadingComments","trailingComments","parenthesizedExpression","parent","prev","start","end","tokens","errors","extra"].forEach((function(t){delete e[t]})),"string"===t.kind&&delete e.isDoubleQuote,["array","list"].includes(t.kind)&&delete e.shortForm,"inline"===t.kind){if(t.value.includes("___PSEUDO_INLINE_PLACEHOLDER___"))return null;e.value=e.value.replace(/\r\n?|\n/g,"")}if(("continue"===t.kind||"break"===t.kind)&&t.level){var i=e.level;"number"===i.kind&&(e.level="1"===i.value?null:i)}if("block"===t.kind&&1===t.children.length&&"block"===t.children[0].kind)for(;"block"===e.children[0].kind;)e.children=e.children[0].children;if("number"===t.kind&&(e.value=Ys.printNumber(t.value)),["foreach","for","if","while","do"].includes(t.kind)&&(t.body&&"block"!==t.body.kind?e.body={kind:"block",children:[e.body]}:e.body=e.body?e.body:null,t.alternate&&"block"!==t.alternate.kind?e.alternate={kind:"block",children:[e.alternate]}:e.alternate=e.alternate?e.alternate:null),"usegroup"===t.kind&&"string"==typeof t.name&&(e.name=e.name.replace(/^\\/,"")),"useitem"===t.kind&&(e.name=e.name.replace(/^\\/,"")),"method"===t.kind&&"identifier"===t.name.kind&&(e.name.name=Ys.normalizeMagicMethodName(e.name.name)),"noop"===t.kind)return null},ha="PHP",la={phpVersion:{since:"0.13.0",category:ha,type:"choice",default:"7.0",description:"Minimum target PHP version.",choices:[{value:"5.0"},{value:"5.1"},{value:"5.2"},{value:"5.3"},{value:"5.4"},{value:"5.5"},{value:"5.6"},{value:"7.0"},{value:"7.1"},{value:"7.2"},{value:"7.3"},{value:"7.4"},{value:"8.0"},{value:"8.1"}]},trailingCommaPHP:{since:"0.0.0",category:ha,type:"boolean",default:!0,description:"Print trailing commas wherever possible when multi-line."},braceStyle:{since:"0.10.0",category:ha,type:"choice",default:"psr-2",description:"Print one space or newline for code blocks (classes and functions).",choices:[{value:"psr-2",description:"Use PSR-2 brace style."},{value:"1tbs",description:"Use 1tbs brace style."}]}},ca=function(t,e,i,n){if("length"!==i&&"prototype"!==i&&"arguments"!==i&&"caller"!==i){var s=Object.getOwnPropertyDescriptor(t,i),r=Object.getOwnPropertyDescriptor(e,i);!ua(s,r)&&n||Object.defineProperty(t,i,r)}},ua=function(t,e){return void 0===t||t.configurable||t.writable===e.writable&&t.enumerable===e.enumerable&&t.configurable===e.configurable&&(t.writable||t.value===e.value)},_a=function(t,e){var i=Object.getPrototypeOf(e);i!==Object.getPrototypeOf(t)&&Object.setPrototypeOf(t,i)},da=function(t,e){return"/* Wrapped ".concat(t,"*/\n").concat(e)},pa=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),fa=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name"),Ta=function(t,e,i){var n=""===i?"":"with ".concat(i.trim(),"() "),s=da.bind(null,n,e.toString());Object.defineProperty(s,"name",fa),Object.defineProperty(t,"toString",r(r({},pa),{},{value:s}))},ka=function(t,e){var i,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=n.ignoreNonConfigurable,r=void 0!==s&&s,o=t.name,a=d(Reflect.ownKeys(e));try{for(a.s();!(i=a.n()).done;){var h=i.value;ca(t,e,h,r)}}catch(t){a.e(t)}finally{a.f()}return _a(t,e),Ta(t,e,o),t},Ea="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ma(t){return t&&t.default||t}var xa,ya=function(){var t={};return t.promise=new Promise((function(e,i){t.resolve=e,t.reject=i})),t},va=function(t,e){return t(e={exports:{}},e.exports),e.exports}((function(t,e){var i=Ea&&Ea.__awaiter||function(t,e,i,n){return new(i||(i=Promise))((function(s,r){function o(t){try{h(n.next(t))}catch(t){r(t)}}function a(t){try{h(n.throw(t))}catch(t){r(t)}}function h(t){t.done?s(t.value):new i((function(e){e(t.value)})).then(o,a)}h((n=n.apply(t,e||[])).next())}))},n=Ea&&Ea.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var s=n(ya);function r(t){var e,n,r,a=this,h=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"maxAge",l=function(){return i(a,void 0,void 0,o().mark((function a(){var l,c,u,_,p=this;return o().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:if(void 0===e){a.next=2;break}return a.abrupt("return");case 2:l=function(a){return i(p,void 0,void 0,o().mark((function i(){var l;return o().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(r=s.default(),!((l=a[1][h]-Date.now())<=0)){i.next=6;break}return t.delete(a[0]),r.resolve(),i.abrupt("return");case 6:return e=a[0],"function"==typeof(n=setTimeout((function(){t.delete(a[0]),r&&r.resolve()}),l)).unref&&n.unref(),i.abrupt("return",r.promise);case 10:case"end":return i.stop()}}),i)})))},a.prev=3,c=d(t),a.prev=5,c.s();case 7:if((u=c.n()).done){a.next=13;break}return _=u.value,a.next=11,l(_);case 11:a.next=7;break;case 13:a.next=18;break;case 15:a.prev=15,a.t0=a.catch(5),c.e(a.t0);case 18:return a.prev=18,c.f(),a.finish(18);case 21:a.next=25;break;case 23:a.prev=23,a.t1=a.catch(3);case 25:e=void 0;case 26:case"end":return a.stop()}}),a,null,[[3,23],[5,15,18,21]])})))},c=function(){e=void 0,void 0!==n&&(clearTimeout(n),n=void 0),void 0!==r&&(r.reject(void 0),r=void 0)},u=t.set.bind(t);return t.set=function(i,n){t.has(i)&&t.delete(i);var s=u(i,n);return e&&e===i&&c(),l(),s},l(),t}e.default=r,t.exports=r,t.exports.default=r}));(xa=va)&&xa.__esModule&&Object.prototype.hasOwnProperty.call(xa,"default")&&xa.default;var Aa=va,ga=new WeakMap,Na=new WeakMap,La=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=e.cacheKey,n=e.cache,s=void 0===n?new Map:n,r=e.maxAge;"number"==typeof r&&Aa(s);var o=function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];var a=i?i(n):n[0],h=s.get(a);if(h)return h.data;var l=t.apply(this,n);return s.set(a,{data:l,maxAge:r?Date.now()+r:Number.POSITIVE_INFINITY}),l};return ka(o,t,{ignoreNonConfigurable:!0}),Na.set(o,s),o};La.decorator=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e,i,n){var s=e[i];if("function"!=typeof s)throw new TypeError("The decorated value must be a function");delete n.value,delete n.writable,n.get=function(){if(!ga.has(this)){var e=La(s,t);return ga.set(this,e),e}return ga.get(this)}}},La.clear=function(t){var e=Na.get(t);if(!e)throw new TypeError("Can't clear a function that was not memoized!");if("function"!=typeof e.clear)throw new TypeError("The cache Map can't be cleared!");e.clear()};var Ca=/@prettier|@format/,ba=La((function(t){var e=As(t),i=l(e.children,1)[0],n=l(e.comments.filter((function(t){return"commentblock"===t.kind})),1)[0];if(i&&n&&n.loc.start.line<i.loc.start.line)return n}));var Sa=function(t){if(!Ca.test(t))return!1;var e=ba(t);if(e){var i=e.value;return Ca.test(i)}return!1},Ia=function(t){var e=ba(t);if(e){var i=e.loc,n=i.start.offset,s=i.end.offset,r=t.substring(0,n),o=t.substring(s);return"".concat(r).concat(function(t,e){var i=t.split(/\r?\n/g);if(1===i.length){var n=l(/\/*\*\*(.*)\*\//.exec(i[0]),2)[1];i=["/**"," * ".concat(n.trim())," */"]}var s=i.findIndex((function(t){return/@\S/.test(t)}))||1;return i.splice(s,0," * @format"),i.join(function(t){var e=t.indexOf("\n");return e>=0&&"\r"===t.charAt(e-1)?"\r\n":"\n"}(e))}(e.value,t)).concat(o)}var a="<?php";if(!t.startsWith(a))return t;var h=a.length,c=t.substring(0,h),u=t.substring(h);return"".concat(c,"\n/** \n * @format \n */\n").concat(u)},Oa="programming",Ra="text.html.php",wa="application/x-httpd-php",Da="#4F5D95",Pa=[".php",".aw",".ctp",".fcgi",".inc",".php3",".php4",".php5",".phps",".phpt"],Ua=[".php",".php_cs",".php_cs.dist","Phakefile"],Ma=["php"],Fa=["inc"],Ba={name:"PHP",type:Oa,tmScope:Ra,aceMode:"php",codemirrorMode:"php",codemirrorMimeType:wa,color:Da,extensions:Pa,filenames:Ua,interpreters:Ma,aliases:Fa,languageId:272},Ha=Object.freeze({__proto__:null,name:"PHP",type:Oa,tmScope:Ra,aceMode:"php",codemirrorMode:"php",codemirrorMimeType:wa,color:Da,extensions:Pa,filenames:Ua,interpreters:Ma,aliases:Fa,languageId:272,default:Ba}),Ga="HTML+PHP",Va="markup",Qa="text.html.php",Wa="HTML",Ya=[".phtml"],ja="application/x-httpd-php",$a={name:Ga,type:Va,tmScope:Qa,group:Wa,extensions:Ya,aceMode:"php",codemirrorMode:"php",codemirrorMimeType:ja,languageId:151},za=Object.freeze({__proto__:null,name:Ga,type:Va,tmScope:Qa,group:Wa,extensions:Ya,aceMode:"php",codemirrorMode:"php",codemirrorMimeType:ja,languageId:151,default:$a}),Ka=ma(Ha),Xa=ma(za),Ja=n.default.doc.builders,qa=Ja.join,Za=Ja.hardline,th=Sa,eh=Ia;function ih(t,e){var i=e.extend,n=e.override,s={};for(var r in t){s["languageId"===r?"linguistLanguageId":r]=t[r]}if(i)for(var o in i)s[o]=(s[o]||[]).concat(i[o]);for(var a in n)s[a]=n[a];return s}var nh=[ih(Ka,{override:{parsers:["php"],vscodeLanguageIds:["php"]}}),ih(Xa,{override:{parsers:["php"],vscodeLanguageIds:["php"]}})],sh=function(t){return function(e){return e.loc&&e.loc[t]&&e.loc[t].offset}},rh={php:{parse:As,astFormat:"php",locStart:sh("start"),locEnd:sh("end"),hasPragma:th}},oh={php:{print:oa,insertPragma:eh,massageAstNode:aa,getCommentChildNodes:Lr.getCommentChildNodes,canAttachComment:Lr.canAttachComment,isBlockComment:Lr.isBlockComment,handleComments:{ownLine:Lr.handleOwnLineComment,endOfLine:Lr.handleEndOfLineComment,remaining:Lr.handleRemainingComment},willPrintOwnComments:function(t){var e=t.getValue();return e&&"noop"===e.kind},printComment:function(t){var e=t.getValue();switch(e.kind){case"commentblock":if(!e.value.includes("\n"))return e.value;var i=e.value.split(/\r?\n/g);return i.slice(1,i.length-1).every((function(t){return"*"===t.trim()[0]}))?qa(Za,i.map((function(t,e){return(e>0?" ":"")+(e<i.length-1?t.trim():t.trimLeft())}))):e.value;case"commentline":return e.value.trimRight();default:throw new Error("Not a comment: ".concat(JSON.stringify(e)))}},hasPrettierIgnore:function(t){var e=function(t){return t.value.includes("prettier-ignore")&&!t.value.includes("prettier-ignore-start")&&!t.value.includes("prettier-ignore-end")},i=t.getParentNode(),n=t.getNode();return n&&"classconstant"!==n.kind&&n.comments&&n.comments.length>0&&n.comments.some(e)||n&&"constant"===n.kind&&i&&"classconstant"===i.kind&&i.comments&&i.comments.length>0&&i.comments.some(e)}}},ah={languages:nh,printers:oh,parsers:rh,options:la,defaultOptions:{tabWidth:4}},hh=ah.languages,lh=ah.printers,ch=ah.parsers,uh=ah.options,_h=ah.defaultOptions;t.default=ah,t.defaultOptions=_h,t.languages=hh,t.options=uh,t.parsers=ch,t.printers=lh,Object.defineProperty(t,"__esModule",{value:!0})}));