/<=/>=",7),bitShift:p("<>>/>>>",8),plusMin:new d("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:p("%",10),star:p("*",10),slash:p("/",10),starstar:new d("**",{beforeExpr:!0}),_break:C("break"),_case:C("case",f),_catch:C("catch"),_continue:C("continue"),_debugger:C("debugger"),_default:C("default",f),_do:C("do",{isLoop:!0,beforeExpr:!0}),_else:C("else",f),_finally:C("finally"),_for:C("for",{isLoop:!0}),_function:C("function",m),_if:C("if"),_return:C("return",f),_switch:C("switch"),_throw:C("throw",f),_try:C("try"),_var:C("var"),_const:C("const"),_while:C("while",{isLoop:!0}),_with:C("with"),_new:C("new",{beforeExpr:!0,startsExpr:!0}),_this:C("this",m),_super:C("super",m),_class:C("class",m),_extends:C("extends",f),_export:C("export"),_import:C("import"),_null:C("null",m),_true:C("true",m),_false:C("false",m),_in:C("in",{beforeExpr:!0,binop:7}),_instanceof:C("instanceof",{beforeExpr:!0,binop:7}),_typeof:C("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:C("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:C("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},D=/\r\n?|\n|\u2028|\u2029/,y=new RegExp(D.source,"g");function b(t,e){return 10===t||13===t||!e&&(8232===t||8233===t)}var E=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,T=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,Q=Object.prototype,I=Q.hasOwnProperty,x=Q.toString;function L(t,e){return I.call(t,e)}var z=Array.isArray||function(t){return"[object Array]"===x.call(t)};function M(t){return new RegExp("^(?:"+t.replace(/ /g,"|")+")$")}var j=function(t,e){this.line=t,this.column=e};j.prototype.offset=function(t){return new j(this.line,this.column+t)};var k=function(t,e,i){this.start=e,this.end=i,null!==t.sourceFile&&(this.source=t.sourceFile)};function S(t,e){for(var i=1,n=0;;){y.lastIndex=n;var r=y.exec(t);if(!(r&&r.index=2015&&(e.ecmaVersion-=2009),null==e.allowReserved&&(e.allowReserved=e.ecmaVersion<5),z(e.onToken)){var n=e.onToken;e.onToken=function(t){return n.push(t)}}return z(e.onComment)&&(e.onComment=function(t,e){return function(i,n,r,s,a,o){var A={type:i?"Block":"Line",value:n,start:r,end:s};t.locations&&(A.loc=new k(this,a,o)),t.ranges&&(A.range=[r,s]),e.push(A)}}(e,e.onComment)),e}var F=2,_=1|F,O=4,Y=8;function R(t,e){return F|(t?O:0)|(e?Y:0)}var N=function(t,e,i){this.options=t=G(t),this.sourceFile=t.sourceFile,this.keywords=M(s[t.ecmaVersion>=6?6:5]);var r="";if(!t.allowReserved){for(var a=t.ecmaVersion;!(r=n[a]);a--);"module"===t.sourceType&&(r+=" await")}this.reservedWords=M(r);var o=(r?r+" ":"")+n.strict;this.reservedWordsStrict=M(o),this.reservedWordsStrictBind=M(o+" "+n.strictBind),this.input=String(e),this.containsEsc=!1,i?(this.pos=i,this.lineStart=this.input.lastIndexOf("\n",i-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(D).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=B.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===t.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports={},0===this.pos&&t.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null},H={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0}};N.prototype.parse=function(){var t=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(t)},H.inFunction.get=function(){return(this.currentVarScope().flags&F)>0},H.inGenerator.get=function(){return(this.currentVarScope().flags&Y)>0},H.inAsync.get=function(){return(this.currentVarScope().flags&O)>0},H.allowSuper.get=function(){return(64&this.currentThisScope().flags)>0},H.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},H.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},N.prototype.inNonArrowFunction=function(){return(this.currentThisScope().flags&F)>0},N.extend=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];for(var i=this,n=0;n-1&&this.raiseRecoverable(t.trailingComma,"Comma is not permitted after the rest element");var i=e?t.parenthesizedAssign:t.parenthesizedBind;i>-1&&this.raiseRecoverable(i,"Parenthesized pattern")}},J.checkExpressionErrors=function(t,e){if(!t)return!1;var i=t.shorthandAssign,n=t.doubleProto;if(!e)return i>=0||n>=0;i>=0&&this.raise(i,"Shorthand property assignments are valid only in destructuring patterns"),n>=0&&this.raiseRecoverable(n,"Redefinition of __proto__ property")},J.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos=6&&(t.sourceType=this.options.sourceType),this.finishNode(t,"Program")};var q={kind:"loop"},X={kind:"switch"};V.isLet=function(t){if(this.options.ecmaVersion<6||!this.isContextual("let"))return!1;T.lastIndex=this.pos;var e=T.exec(this.input),i=this.pos+e[0].length,n=this.input.charCodeAt(i);if(91===n)return!0;if(t)return!1;if(123===n)return!0;if(P(n,!0)){for(var r=i+1;g(this.input.charCodeAt(r),!0);)++r;var s=this.input.slice(i,r);if(!a.test(s))return!0}return!1},V.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;T.lastIndex=this.pos;var t=T.exec(this.input),e=this.pos+t[0].length;return!(D.test(this.input.slice(this.pos,e))||"function"!==this.input.slice(e,e+8)||e+8!==this.input.length&&g(this.input.charAt(e+8)))},V.parseStatement=function(t,e,i){var n,r=this.type,s=this.startNode();switch(this.isLet(t)&&(r=B._var,n="let"),r){case B._break:case B._continue:return this.parseBreakContinueStatement(s,r.keyword);case B._debugger:return this.parseDebuggerStatement(s);case B._do:return this.parseDoStatement(s);case B._for:return this.parseForStatement(s);case B._function:return t&&(this.strict||"if"!==t&&"label"!==t)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(s,!1,!t);case B._class:return t&&this.unexpected(),this.parseClass(s,!0);case B._if:return this.parseIfStatement(s);case B._return:return this.parseReturnStatement(s);case B._switch:return this.parseSwitchStatement(s);case B._throw:return this.parseThrowStatement(s);case B._try:return this.parseTryStatement(s);case B._const:case B._var:return n=n||this.value,t&&"var"!==n&&this.unexpected(),this.parseVarStatement(s,n);case B._while:return this.parseWhileStatement(s);case B._with:return this.parseWithStatement(s);case B.braceL:return this.parseBlock(!0,s);case B.semi:return this.parseEmptyStatement(s);case B._export:case B._import:return this.options.allowImportExportEverywhere||(e||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),r===B._import?this.parseImport(s):this.parseExport(s,i);default:if(this.isAsyncFunction())return t&&this.unexpected(),this.next(),this.parseFunctionStatement(s,!0,!t);var a=this.value,o=this.parseExpression();return r===B.name&&"Identifier"===o.type&&this.eat(B.colon)?this.parseLabeledStatement(s,a,o,t):this.parseExpressionStatement(s,o)}},V.parseBreakContinueStatement=function(t,e){var i="break"===e;this.next(),this.eat(B.semi)||this.insertSemicolon()?t.label=null:this.type!==B.name?this.unexpected():(t.label=this.parseIdent(),this.semicolon());for(var n=0;n=6?this.eat(B.semi):this.semicolon(),this.finishNode(t,"DoWhileStatement")},V.parseForStatement=function(t){this.next();var e=this.options.ecmaVersion>=9&&(this.inAsync||!this.inFunction&&this.options.allowAwaitOutsideFunction)&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(q),this.enterScope(0),this.expect(B.parenL),this.type===B.semi)return e>-1&&this.unexpected(e),this.parseFor(t,null);var i=this.isLet();if(this.type===B._var||this.type===B._const||i){var n=this.startNode(),r=i?"let":this.value;return this.next(),this.parseVar(n,!0,r),this.finishNode(n,"VariableDeclaration"),!(this.type===B._in||this.options.ecmaVersion>=6&&this.isContextual("of"))||1!==n.declarations.length||"var"!==r&&n.declarations[0].init?(e>-1&&this.unexpected(e),this.parseFor(t,n)):(this.options.ecmaVersion>=9&&(this.type===B._in?e>-1&&this.unexpected(e):t.await=e>-1),this.parseForIn(t,n))}var s=new W,a=this.parseExpression(!0,s);return this.type===B._in||this.options.ecmaVersion>=6&&this.isContextual("of")?(this.options.ecmaVersion>=9&&(this.type===B._in?e>-1&&this.unexpected(e):t.await=e>-1),this.toAssignable(a,!1,s),this.checkLVal(a),this.parseForIn(t,a)):(this.checkExpressionErrors(s,!0),e>-1&&this.unexpected(e),this.parseFor(t,a))},V.parseFunctionStatement=function(t,e,i){return this.next(),this.parseFunction(t,$|(i?0:tt),!1,e)},V.parseIfStatement=function(t){return this.next(),t.test=this.parseParenExpression(),t.consequent=this.parseStatement("if"),t.alternate=this.eat(B._else)?this.parseStatement("if"):null,this.finishNode(t,"IfStatement")},V.parseReturnStatement=function(t){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(B.semi)||this.insertSemicolon()?t.argument=null:(t.argument=this.parseExpression(),this.semicolon()),this.finishNode(t,"ReturnStatement")},V.parseSwitchStatement=function(t){var e;this.next(),t.discriminant=this.parseParenExpression(),t.cases=[],this.expect(B.braceL),this.labels.push(X),this.enterScope(0);for(var i=!1;this.type!==B.braceR;)if(this.type===B._case||this.type===B._default){var n=this.type===B._case;e&&this.finishNode(e,"SwitchCase"),t.cases.push(e=this.startNode()),e.consequent=[],this.next(),n?e.test=this.parseExpression():(i&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),i=!0,e.test=null),this.expect(B.colon)}else e||this.unexpected(),e.consequent.push(this.parseStatement(null));return this.exitScope(),e&&this.finishNode(e,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(t,"SwitchStatement")},V.parseThrowStatement=function(t){return this.next(),D.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),t.argument=this.parseExpression(),this.semicolon(),this.finishNode(t,"ThrowStatement")};var Z=[];V.parseTryStatement=function(t){if(this.next(),t.block=this.parseBlock(),t.handler=null,this.type===B._catch){var e=this.startNode();if(this.next(),this.eat(B.parenL)){e.param=this.parseBindingAtom();var i="Identifier"===e.param.type;this.enterScope(i?32:0),this.checkLVal(e.param,i?4:2),this.expect(B.parenR)}else this.options.ecmaVersion<10&&this.unexpected(),e.param=null,this.enterScope(0);e.body=this.parseBlock(!1),this.exitScope(),t.handler=this.finishNode(e,"CatchClause")}return t.finalizer=this.eat(B._finally)?this.parseBlock():null,t.handler||t.finalizer||this.raise(t.start,"Missing catch or finally clause"),this.finishNode(t,"TryStatement")},V.parseVarStatement=function(t,e){return this.next(),this.parseVar(t,!1,e),this.semicolon(),this.finishNode(t,"VariableDeclaration")},V.parseWhileStatement=function(t){return this.next(),t.test=this.parseParenExpression(),this.labels.push(q),t.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(t,"WhileStatement")},V.parseWithStatement=function(t){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),t.object=this.parseParenExpression(),t.body=this.parseStatement("with"),this.finishNode(t,"WithStatement")},V.parseEmptyStatement=function(t){return this.next(),this.finishNode(t,"EmptyStatement")},V.parseLabeledStatement=function(t,e,i,n){for(var r=0,s=this.labels;r=0;o--){var A=this.labels[o];if(A.statementStart!==t.start)break;A.statementStart=this.start,A.kind=a}return this.labels.push({name:e,kind:a,statementStart:this.start}),t.body=this.parseStatement(n?-1===n.indexOf("label")?n+"label":n:"label"),this.labels.pop(),t.label=i,this.finishNode(t,"LabeledStatement")},V.parseExpressionStatement=function(t,e){return t.expression=e,this.semicolon(),this.finishNode(t,"ExpressionStatement")},V.parseBlock=function(t,e){for(void 0===t&&(t=!0),void 0===e&&(e=this.startNode()),e.body=[],this.expect(B.braceL),t&&this.enterScope(0);!this.eat(B.braceR);){var i=this.parseStatement(null);e.body.push(i)}return t&&this.exitScope(),this.finishNode(e,"BlockStatement")},V.parseFor=function(t,e){return t.init=e,this.expect(B.semi),t.test=this.type===B.semi?null:this.parseExpression(),this.expect(B.semi),t.update=this.type===B.parenR?null:this.parseExpression(),this.expect(B.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,"ForStatement")},V.parseForIn=function(t,e){var i=this.type===B._in?"ForInStatement":"ForOfStatement";return this.next(),"ForInStatement"===i&&("AssignmentPattern"===e.type||"VariableDeclaration"===e.type&&null!=e.declarations[0].init&&(this.strict||"Identifier"!==e.declarations[0].id.type))&&this.raise(e.start,"Invalid assignment in for-in loop head"),t.left=e,t.right="ForInStatement"===i?this.parseExpression():this.parseMaybeAssign(),this.expect(B.parenR),t.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(t,i)},V.parseVar=function(t,e,i){for(t.declarations=[],t.kind=i;;){var n=this.startNode();if(this.parseVarId(n,i),this.eat(B.eq)?n.init=this.parseMaybeAssign(e):"const"!==i||this.type===B._in||this.options.ecmaVersion>=6&&this.isContextual("of")?"Identifier"===n.id.type||e&&(this.type===B._in||this.isContextual("of"))?n.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),t.declarations.push(this.finishNode(n,"VariableDeclarator")),!this.eat(B.comma))break}return t},V.parseVarId=function(t,e){"const"!==e&&"let"!==e||!this.isContextual("let")||this.raiseRecoverable(this.start,"let is disallowed as a lexically bound name"),t.id=this.parseBindingAtom(),this.checkLVal(t.id,"var"===e?1:2,!1)};var $=1,tt=2;V.parseFunction=function(t,e,i,n){this.initFunction(t),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!n)&&(this.type===B.star&&e&tt&&this.unexpected(),t.generator=this.eat(B.star)),this.options.ecmaVersion>=8&&(t.async=!!n),e&eval("$")&&(t.id=4&e&&this.type!==B.name?null:this.parseIdent(),!t.id||e&tt||this.checkLVal(t.id,this.strict||t.generator||t.async?this.treatFunctionsAsVar?1:2:3));var r=this.yieldPos,s=this.awaitPos,a=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(R(t.async,t.generator)),e&$||(t.id=this.type===B.name?this.parseIdent():null),this.parseFunctionParams(t),this.parseFunctionBody(t,i,!1),this.yieldPos=r,this.awaitPos=s,this.awaitIdentPos=a,this.finishNode(t,e&$?"FunctionDeclaration":"FunctionExpression")},V.parseFunctionParams=function(t){this.expect(B.parenL),t.params=this.parseBindingList(B.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},V.parseClass=function(t,e){this.next();var i=this.strict;this.strict=!0,this.parseClassId(t,e),this.parseClassSuper(t);var n=this.startNode(),r=!1;for(n.body=[],this.expect(B.braceL);!this.eat(B.braceR);){var s=this.parseClassElement(null!==t.superClass);s&&(n.body.push(s),"MethodDefinition"===s.type&&"constructor"===s.kind&&(r&&this.raise(s.start,"Duplicate constructor in the same class"),r=!0))}return t.body=this.finishNode(n,"ClassBody"),this.strict=i,this.finishNode(t,e?"ClassDeclaration":"ClassExpression")},V.parseClassElement=function(t){var e=this;if(this.eat(B.semi))return null;var i=this.startNode(),n=function(t,n){void 0===n&&(n=!1);var r=e.start,s=e.startLoc;return!!e.eatContextual(t)&&(!(e.type===B.parenL||n&&e.canInsertSemicolon())||(i.key&&e.unexpected(),i.computed=!1,i.key=e.startNodeAt(r,s),i.key.name=t,e.finishNode(i.key,"Identifier"),!1))};i.kind="method",i.static=n("static");var r=this.eat(B.star),s=!1;r||(this.options.ecmaVersion>=8&&n("async",!0)?(s=!0,r=this.options.ecmaVersion>=9&&this.eat(B.star)):n("get")?i.kind="get":n("set")&&(i.kind="set")),i.key||this.parsePropertyName(i);var a=i.key,o=!1;return i.computed||i.static||!("Identifier"===a.type&&"constructor"===a.name||"Literal"===a.type&&"constructor"===a.value)?i.static&&"Identifier"===a.type&&"prototype"===a.name&&this.raise(a.start,"Classes may not have a static property named prototype"):("method"!==i.kind&&this.raise(a.start,"Constructor can't have get/set modifier"),r&&this.raise(a.start,"Constructor can't be a generator"),s&&this.raise(a.start,"Constructor can't be an async method"),i.kind="constructor",o=t),this.parseClassMethod(i,r,s,o),"get"===i.kind&&0!==i.value.params.length&&this.raiseRecoverable(i.value.start,"getter should have no params"),"set"===i.kind&&1!==i.value.params.length&&this.raiseRecoverable(i.value.start,"setter should have exactly one param"),"set"===i.kind&&"RestElement"===i.value.params[0].type&&this.raiseRecoverable(i.value.params[0].start,"Setter cannot use rest params"),i},V.parseClassMethod=function(t,e,i,n){return t.value=this.parseMethod(e,i,n),this.finishNode(t,"MethodDefinition")},V.parseClassId=function(t,e){this.type===B.name?(t.id=this.parseIdent(),e&&this.checkLVal(t.id,2,!1)):(!0===e&&this.unexpected(),t.id=null)},V.parseClassSuper=function(t){t.superClass=this.eat(B._extends)?this.parseExprSubscripts():null},V.parseExport=function(t,e){if(this.next(),this.eat(B.star))return this.expectContextual("from"),this.type!==B.string&&this.unexpected(),t.source=this.parseExprAtom(),this.semicolon(),this.finishNode(t,"ExportAllDeclaration");if(this.eat(B._default)){var i;if(this.checkExport(e,"default",this.lastTokStart),this.type===B._function||(i=this.isAsyncFunction())){var n=this.startNode();this.next(),i&&this.next(),t.declaration=this.parseFunction(n,4|$,!1,i)}else if(this.type===B._class){var r=this.startNode();t.declaration=this.parseClass(r,"nullableID")}else t.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(t,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())t.declaration=this.parseStatement(null),"VariableDeclaration"===t.declaration.type?this.checkVariableExport(e,t.declaration.declarations):this.checkExport(e,t.declaration.id.name,t.declaration.id.start),t.specifiers=[],t.source=null;else{if(t.declaration=null,t.specifiers=this.parseExportSpecifiers(e),this.eatContextual("from"))this.type!==B.string&&this.unexpected(),t.source=this.parseExprAtom();else{for(var s=0,a=t.specifiers;s=6&&t)switch(t.type){case"Identifier":this.inAsync&&"await"===t.name&&this.raise(t.start,"Cannot use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":case"RestElement":break;case"ObjectExpression":t.type="ObjectPattern",i&&this.checkPatternErrors(i,!0);for(var n=0,r=t.properties;n=6)switch(this.type){case B.bracketL:var t=this.startNode();return this.next(),t.elements=this.parseBindingList(B.bracketR,!0,!0),this.finishNode(t,"ArrayPattern");case B.braceL:return this.parseObj(!0)}return this.parseIdent()},et.parseBindingList=function(t,e,i){for(var n=[],r=!0;!this.eat(t);)if(r?r=!1:this.expect(B.comma),e&&this.type===B.comma)n.push(null);else{if(i&&this.afterTrailingComma(t))break;if(this.type===B.ellipsis){var s=this.parseRestBinding();this.parseBindingListItem(s),n.push(s),this.type===B.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.expect(t);break}var a=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(a),n.push(a)}return n},et.parseBindingListItem=function(t){return t},et.parseMaybeDefault=function(t,e,i){if(i=i||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(B.eq))return i;var n=this.startNodeAt(t,e);return n.left=i,n.right=this.parseMaybeAssign(),this.finishNode(n,"AssignmentPattern")},et.checkLVal=function(t,e,i){switch(void 0===e&&(e=0),t.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(t.name)&&this.raiseRecoverable(t.start,(e?"Binding ":"Assigning to ")+t.name+" in strict mode"),i&&(L(i,t.name)&&this.raiseRecoverable(t.start,"Argument name clash"),i[t.name]=!0),0!==e&&5!==e&&this.declareName(t.name,e,t.start);break;case"MemberExpression":e&&this.raiseRecoverable(t.start,"Binding member expression");break;case"ObjectPattern":for(var n=0,r=t.properties;n=9&&"SpreadElement"===t.type||this.options.ecmaVersion>=6&&(t.computed||t.method||t.shorthand))){var n,r=t.key;switch(r.type){case"Identifier":n=r.name;break;case"Literal":n=String(r.value);break;default:return}var s=t.kind;if(this.options.ecmaVersion>=6)"__proto__"===n&&"init"===s&&(e.proto&&(i&&i.doubleProto<0?i.doubleProto=r.start:this.raiseRecoverable(r.start,"Redefinition of __proto__ property")),e.proto=!0);else{var a=e[n="$"+n];if(a)("init"===s?this.strict&&a.init||a.get||a.set:a.init||a[s])&&this.raiseRecoverable(r.start,"Redefinition of property");else a=e[n]={init:!1,get:!1,set:!1};a[s]=!0}}},it.parseExpression=function(t,e){var i=this.start,n=this.startLoc,r=this.parseMaybeAssign(t,e);if(this.type===B.comma){var s=this.startNodeAt(i,n);for(s.expressions=[r];this.eat(B.comma);)s.expressions.push(this.parseMaybeAssign(t,e));return this.finishNode(s,"SequenceExpression")}return r},it.parseMaybeAssign=function(t,e,i){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(t);this.exprAllowed=!1}var n=!1,r=-1,s=-1,a=-1;e?(r=e.parenthesizedAssign,s=e.trailingComma,a=e.shorthandAssign,e.parenthesizedAssign=e.trailingComma=e.shorthandAssign=-1):(e=new W,n=!0);var o=this.start,A=this.startLoc;this.type!==B.parenL&&this.type!==B.name||(this.potentialArrowAt=this.start);var c=this.parseMaybeConditional(t,e);if(i&&(c=i.call(this,c,o,A)),this.type.isAssign){var h=this.startNodeAt(o,A);return h.operator=this.value,h.left=this.type===B.eq?this.toAssignable(c,!1,e):c,n||W.call(e),e.shorthandAssign=-1,this.checkLVal(c),this.next(),h.right=this.parseMaybeAssign(t),this.finishNode(h,"AssignmentExpression")}return n&&this.checkExpressionErrors(e,!0),r>-1&&(e.parenthesizedAssign=r),s>-1&&(e.trailingComma=s),a>-1&&(e.shorthandAssign=a),c},it.parseMaybeConditional=function(t,e){var i=this.start,n=this.startLoc,r=this.parseExprOps(t,e);if(this.checkExpressionErrors(e))return r;if(this.eat(B.question)){var s=this.startNodeAt(i,n);return s.test=r,s.consequent=this.parseMaybeAssign(),this.expect(B.colon),s.alternate=this.parseMaybeAssign(t),this.finishNode(s,"ConditionalExpression")}return r},it.parseExprOps=function(t,e){var i=this.start,n=this.startLoc,r=this.parseMaybeUnary(e,!1);return this.checkExpressionErrors(e)?r:r.start===i&&"ArrowFunctionExpression"===r.type?r:this.parseExprOp(r,i,n,-1,t)},it.parseExprOp=function(t,e,i,n,r){var s=this.type.binop;if(null!=s&&(!r||this.type!==B._in)&&s>n){var a=this.type===B.logicalOR||this.type===B.logicalAND,o=this.value;this.next();var A=this.start,c=this.startLoc,h=this.parseExprOp(this.parseMaybeUnary(null,!1),A,c,s,r),l=this.buildBinary(e,i,t,h,o,a);return this.parseExprOp(l,e,i,n,r)}return t},it.buildBinary=function(t,e,i,n,r,s){var a=this.startNodeAt(t,e);return a.left=i,a.operator=r,a.right=n,this.finishNode(a,s?"LogicalExpression":"BinaryExpression")},it.parseMaybeUnary=function(t,e){var i,n=this.start,r=this.startLoc;if(this.isContextual("await")&&(this.inAsync||!this.inFunction&&this.options.allowAwaitOutsideFunction))i=this.parseAwait(),e=!0;else if(this.type.prefix){var s=this.startNode(),a=this.type===B.incDec;s.operator=this.value,s.prefix=!0,this.next(),s.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(t,!0),a?this.checkLVal(s.argument):this.strict&&"delete"===s.operator&&"Identifier"===s.argument.type?this.raiseRecoverable(s.start,"Deleting local variable in strict mode"):e=!0,i=this.finishNode(s,a?"UpdateExpression":"UnaryExpression")}else{if(i=this.parseExprSubscripts(t),this.checkExpressionErrors(t))return i;for(;this.type.postfix&&!this.canInsertSemicolon();){var o=this.startNodeAt(n,r);o.operator=this.value,o.prefix=!1,o.argument=i,this.checkLVal(i),this.next(),i=this.finishNode(o,"UpdateExpression")}}return!e&&this.eat(B.starstar)?this.buildBinary(n,r,i,this.parseMaybeUnary(null,!1),"**",!1):i},it.parseExprSubscripts=function(t){var e=this.start,i=this.startLoc,n=this.parseExprAtom(t),r="ArrowFunctionExpression"===n.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd);if(this.checkExpressionErrors(t)||r)return n;var s=this.parseSubscripts(n,e,i);return t&&"MemberExpression"===s.type&&(t.parenthesizedAssign>=s.start&&(t.parenthesizedAssign=-1),t.parenthesizedBind>=s.start&&(t.parenthesizedBind=-1)),s},it.parseSubscripts=function(t,e,i,n){for(var r=this.options.ecmaVersion>=8&&"Identifier"===t.type&&"async"===t.name&&this.lastTokEnd===t.end&&!this.canInsertSemicolon()&&"async"===this.input.slice(t.start,t.end);;){var s=this.parseSubscript(t,e,i,n,r);if(s===t||"ArrowFunctionExpression"===s.type)return s;t=s}},it.parseSubscript=function(t,e,i,n,r){var s=this.eat(B.bracketL);if(s||this.eat(B.dot)){var a=this.startNodeAt(e,i);a.object=t,a.property=s?this.parseExpression():this.parseIdent(!0),a.computed=!!s,s&&this.expect(B.bracketR),t=this.finishNode(a,"MemberExpression")}else if(!n&&this.eat(B.parenL)){var o=new W,A=this.yieldPos,c=this.awaitPos,h=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var l=this.parseExprList(B.parenR,this.options.ecmaVersion>=8,!1,o);if(r&&!this.canInsertSemicolon()&&this.eat(B.arrow))return this.checkPatternErrors(o,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=A,this.awaitPos=c,this.awaitIdentPos=h,this.parseArrowExpression(this.startNodeAt(e,i),l,!0);this.checkExpressionErrors(o,!0),this.yieldPos=A||this.yieldPos,this.awaitPos=c||this.awaitPos,this.awaitIdentPos=h||this.awaitIdentPos;var u=this.startNodeAt(e,i);u.callee=t,u.arguments=l,t=this.finishNode(u,"CallExpression")}else if(this.type===B.backQuote){var v=this.startNodeAt(e,i);v.tag=t,v.quasi=this.parseTemplate({isTagged:!0}),t=this.finishNode(v,"TaggedTemplateExpression")}return t},it.parseExprAtom=function(t){this.type===B.slash&&this.readRegexp();var e,i=this.potentialArrowAt===this.start;switch(this.type){case B._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),e=this.startNode(),this.next(),this.type!==B.parenL||this.allowDirectSuper||this.raise(e.start,"super() call outside constructor of a subclass"),this.type!==B.dot&&this.type!==B.bracketL&&this.type!==B.parenL&&this.unexpected(),this.finishNode(e,"Super");case B._this:return e=this.startNode(),this.next(),this.finishNode(e,"ThisExpression");case B.name:var n=this.start,r=this.startLoc,s=this.containsEsc,a=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!s&&"async"===a.name&&!this.canInsertSemicolon()&&this.eat(B._function))return this.parseFunction(this.startNodeAt(n,r),0,!1,!0);if(i&&!this.canInsertSemicolon()){if(this.eat(B.arrow))return this.parseArrowExpression(this.startNodeAt(n,r),[a],!1);if(this.options.ecmaVersion>=8&&"async"===a.name&&this.type===B.name&&!s)return a=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(B.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(n,r),[a],!0)}return a;case B.regexp:var o=this.value;return(e=this.parseLiteral(o.value)).regex={pattern:o.pattern,flags:o.flags},e;case B.num:case B.string:return this.parseLiteral(this.value);case B._null:case B._true:case B._false:return(e=this.startNode()).value=this.type===B._null?null:this.type===B._true,e.raw=this.type.keyword,this.next(),this.finishNode(e,"Literal");case B.parenL:var A=this.start,c=this.parseParenAndDistinguishExpression(i);return t&&(t.parenthesizedAssign<0&&!this.isSimpleAssignTarget(c)&&(t.parenthesizedAssign=A),t.parenthesizedBind<0&&(t.parenthesizedBind=A)),c;case B.bracketL:return e=this.startNode(),this.next(),e.elements=this.parseExprList(B.bracketR,!0,!0,t),this.finishNode(e,"ArrayExpression");case B.braceL:return this.parseObj(!1,t);case B._function:return e=this.startNode(),this.next(),this.parseFunction(e,0);case B._class:return this.parseClass(this.startNode(),!1);case B._new:return this.parseNew();case B.backQuote:return this.parseTemplate();default:this.unexpected()}},it.parseLiteral=function(t){var e=this.startNode();return e.value=t,e.raw=this.input.slice(this.start,this.end),this.next(),this.finishNode(e,"Literal")},it.parseParenExpression=function(){this.expect(B.parenL);var t=this.parseExpression();return this.expect(B.parenR),t},it.parseParenAndDistinguishExpression=function(t){var e,i=this.start,n=this.startLoc,r=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var s,a=this.start,o=this.startLoc,A=[],c=!0,h=!1,l=new W,u=this.yieldPos,v=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==B.parenR;){if(c?c=!1:this.expect(B.comma),r&&this.afterTrailingComma(B.parenR,!0)){h=!0;break}if(this.type===B.ellipsis){s=this.start,A.push(this.parseParenItem(this.parseRestBinding())),this.type===B.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}A.push(this.parseMaybeAssign(!1,l,this.parseParenItem))}var P=this.start,g=this.startLoc;if(this.expect(B.parenR),t&&!this.canInsertSemicolon()&&this.eat(B.arrow))return this.checkPatternErrors(l,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=u,this.awaitPos=v,this.parseParenArrowList(i,n,A);A.length&&!h||this.unexpected(this.lastTokStart),s&&this.unexpected(s),this.checkExpressionErrors(l,!0),this.yieldPos=u||this.yieldPos,this.awaitPos=v||this.awaitPos,A.length>1?((e=this.startNodeAt(a,o)).expressions=A,this.finishNodeAt(e,"SequenceExpression",P,g)):e=A[0]}else e=this.parseParenExpression();if(this.options.preserveParens){var d=this.startNodeAt(i,n);return d.expression=e,this.finishNode(d,"ParenthesizedExpression")}return e},it.parseParenItem=function(t){return t},it.parseParenArrowList=function(t,e,i){return this.parseArrowExpression(this.startNodeAt(t,e),i)};var nt=[];it.parseNew=function(){var t=this.startNode(),e=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(B.dot)){t.meta=e;var i=this.containsEsc;return t.property=this.parseIdent(!0),("target"!==t.property.name||i)&&this.raiseRecoverable(t.property.start,"The only valid meta property for new is new.target"),this.inNonArrowFunction()||this.raiseRecoverable(t.start,"new.target can only be used in functions"),this.finishNode(t,"MetaProperty")}var n=this.start,r=this.startLoc;return t.callee=this.parseSubscripts(this.parseExprAtom(),n,r,!0),this.eat(B.parenL)?t.arguments=this.parseExprList(B.parenR,this.options.ecmaVersion>=8,!1):t.arguments=nt,this.finishNode(t,"NewExpression")},it.parseTemplateElement=function(t){var e=t.isTagged,i=this.startNode();return this.type===B.invalidTemplate?(e||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),i.value={raw:this.value,cooked:null}):i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),i.tail=this.type===B.backQuote,this.finishNode(i,"TemplateElement")},it.parseTemplate=function(t){void 0===t&&(t={});var e=t.isTagged;void 0===e&&(e=!1);var i=this.startNode();this.next(),i.expressions=[];var n=this.parseTemplateElement({isTagged:e});for(i.quasis=[n];!n.tail;)this.type===B.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(B.dollarBraceL),i.expressions.push(this.parseExpression()),this.expect(B.braceR),i.quasis.push(n=this.parseTemplateElement({isTagged:e}));return this.next(),this.finishNode(i,"TemplateLiteral")},it.isAsyncProp=function(t){return!t.computed&&"Identifier"===t.key.type&&"async"===t.key.name&&(this.type===B.name||this.type===B.num||this.type===B.string||this.type===B.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===B.star)&&!D.test(this.input.slice(this.lastTokEnd,this.start))},it.parseObj=function(t,e){var i=this.startNode(),n=!0,r={};for(i.properties=[],this.next();!this.eat(B.braceR);){if(n)n=!1;else if(this.expect(B.comma),this.afterTrailingComma(B.braceR))break;var s=this.parseProperty(t,e);t||this.checkPropClash(s,r,e),i.properties.push(s)}return this.finishNode(i,t?"ObjectPattern":"ObjectExpression")},it.parseProperty=function(t,e){var i,n,r,s,a=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(B.ellipsis))return t?(a.argument=this.parseIdent(!1),this.type===B.comma&&this.raise(this.start,"Comma is not permitted after the rest element"),this.finishNode(a,"RestElement")):(this.type===B.parenL&&e&&(e.parenthesizedAssign<0&&(e.parenthesizedAssign=this.start),e.parenthesizedBind<0&&(e.parenthesizedBind=this.start)),a.argument=this.parseMaybeAssign(!1,e),this.type===B.comma&&e&&e.trailingComma<0&&(e.trailingComma=this.start),this.finishNode(a,"SpreadElement"));this.options.ecmaVersion>=6&&(a.method=!1,a.shorthand=!1,(t||e)&&(r=this.start,s=this.startLoc),t||(i=this.eat(B.star)));var o=this.containsEsc;return this.parsePropertyName(a),!t&&!o&&this.options.ecmaVersion>=8&&!i&&this.isAsyncProp(a)?(n=!0,i=this.options.ecmaVersion>=9&&this.eat(B.star),this.parsePropertyName(a,e)):n=!1,this.parsePropertyValue(a,t,i,n,r,s,e,o),this.finishNode(a,"Property")},it.parsePropertyValue=function(t,e,i,n,r,s,a,o){if((i||n)&&this.type===B.colon&&this.unexpected(),this.eat(B.colon))t.value=e?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,a),t.kind="init";else if(this.options.ecmaVersion>=6&&this.type===B.parenL)e&&this.unexpected(),t.kind="init",t.method=!0,t.value=this.parseMethod(i,n);else if(e||o||!(this.options.ecmaVersion>=5)||t.computed||"Identifier"!==t.key.type||"get"!==t.key.name&&"set"!==t.key.name||this.type===B.comma||this.type===B.braceR)this.options.ecmaVersion>=6&&!t.computed&&"Identifier"===t.key.type?((i||n)&&this.unexpected(),this.checkUnreserved(t.key),"await"!==t.key.name||this.awaitIdentPos||(this.awaitIdentPos=r),t.kind="init",e?t.value=this.parseMaybeDefault(r,s,t.key):this.type===B.eq&&a?(a.shorthandAssign<0&&(a.shorthandAssign=this.start),t.value=this.parseMaybeDefault(r,s,t.key)):t.value=t.key,t.shorthand=!0):this.unexpected();else{(i||n)&&this.unexpected(),t.kind=t.key.name,this.parsePropertyName(t),t.value=this.parseMethod(!1);var A="get"===t.kind?0:1;if(t.value.params.length!==A){var c=t.value.start;"get"===t.kind?this.raiseRecoverable(c,"getter should have no params"):this.raiseRecoverable(c,"setter should have exactly one param")}else"set"===t.kind&&"RestElement"===t.value.params[0].type&&this.raiseRecoverable(t.value.params[0].start,"Setter cannot use rest params")}},it.parsePropertyName=function(t){if(this.options.ecmaVersion>=6){if(this.eat(B.bracketL))return t.computed=!0,t.key=this.parseMaybeAssign(),this.expect(B.bracketR),t.key;t.computed=!1}return t.key=this.type===B.num||this.type===B.string?this.parseExprAtom():this.parseIdent(!0)},it.initFunction=function(t){t.id=null,this.options.ecmaVersion>=6&&(t.generator=t.expression=!1),this.options.ecmaVersion>=8&&(t.async=!1)},it.parseMethod=function(t,e,i){var n=this.startNode(),r=this.yieldPos,s=this.awaitPos,a=this.awaitIdentPos;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=t),this.options.ecmaVersion>=8&&(n.async=!!e),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|R(e,n.generator)|(i?128:0)),this.expect(B.parenL),n.params=this.parseBindingList(B.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(n,!1,!0),this.yieldPos=r,this.awaitPos=s,this.awaitIdentPos=a,this.finishNode(n,"FunctionExpression")},it.parseArrowExpression=function(t,e,i){var n=this.yieldPos,r=this.awaitPos,s=this.awaitIdentPos;return this.enterScope(16|R(i,!1)),this.initFunction(t),this.options.ecmaVersion>=8&&(t.async=!!i),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,t.params=this.toAssignableList(e,!0),this.parseFunctionBody(t,!0,!1),this.yieldPos=n,this.awaitPos=r,this.awaitIdentPos=s,this.finishNode(t,"ArrowFunctionExpression")},it.parseFunctionBody=function(t,e,i){var n=e&&this.type!==B.braceL,r=this.strict,s=!1;if(n)t.body=this.parseMaybeAssign(),t.expression=!0,this.checkParams(t,!1);else{var a=this.options.ecmaVersion>=7&&!this.isSimpleParamList(t.params);r&&!a||(s=this.strictDirective(this.end))&&a&&this.raiseRecoverable(t.start,"Illegal 'use strict' directive in function with non-simple parameter list");var o=this.labels;this.labels=[],s&&(this.strict=!0),this.checkParams(t,!r&&!s&&!e&&!i&&this.isSimpleParamList(t.params)),t.body=this.parseBlock(!1),t.expression=!1,this.adaptDirectivePrologue(t.body.body),this.labels=o}this.exitScope(),this.strict&&t.id&&this.checkLVal(t.id,5),this.strict=r},it.isSimpleParamList=function(t){for(var e=0,i=t;e-1||r.functions.indexOf(t)>-1||r.var.indexOf(t)>-1,r.lexical.push(t),this.inModule&&1&r.flags&&delete this.undefinedExports[t]}else if(4===e){this.currentScope().lexical.push(t)}else if(3===e){var s=this.currentScope();n=this.treatFunctionsAsVar?s.lexical.indexOf(t)>-1:s.lexical.indexOf(t)>-1||s.var.indexOf(t)>-1,s.functions.push(t)}else for(var a=this.scopeStack.length-1;a>=0;--a){var o=this.scopeStack[a];if(o.lexical.indexOf(t)>-1&&!(32&o.flags&&o.lexical[0]===t)||!this.treatFunctionsAsVarInScope(o)&&o.functions.indexOf(t)>-1){n=!0;break}if(o.var.push(t),this.inModule&&1&o.flags&&delete this.undefinedExports[t],o.flags&_)break}n&&this.raiseRecoverable(i,"Identifier '"+t+"' has already been declared")},st.checkLocalExport=function(t){-1===this.scopeStack[0].lexical.indexOf(t.name)&&-1===this.scopeStack[0].var.indexOf(t.name)&&(this.undefinedExports[t.name]=t)},st.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},st.currentVarScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(e.flags&_)return e}},st.currentThisScope=function(){for(var t=this.scopeStack.length-1;;t--){var e=this.scopeStack[t];if(e.flags&_&&!(16&e.flags))return e}};var ot=function(t,e,i){this.type="",this.start=e,this.end=0,t.options.locations&&(this.loc=new k(t,i)),t.options.directSourceFile&&(this.sourceFile=t.options.directSourceFile),t.options.ranges&&(this.range=[e,0])},At=N.prototype;function ct(t,e,i,n){return t.type=e,t.end=i,this.options.locations&&(t.loc.end=n),this.options.ranges&&(t.range[1]=i),t}At.startNode=function(){return new ot(this,this.start,this.startLoc)},At.startNodeAt=function(t,e){return new ot(this,t,e)},At.finishNode=function(t,e){return ct.call(this,t,e,this.lastTokEnd,this.lastTokEndLoc)},At.finishNodeAt=function(t,e,i,n){return ct.call(this,t,e,i,n)};var ht=function(t,e,i,n,r){this.token=t,this.isExpr=!!e,this.preserveSpace=!!i,this.override=n,this.generator=!!r},lt={b_stat:new ht("{",!1),b_expr:new ht("{",!0),b_tmpl:new ht("${",!1),p_stat:new ht("(",!1),p_expr:new ht("(",!0),q_tmpl:new ht("`",!0,!0,function(t){return t.tryReadTemplateToken()}),f_stat:new ht("function",!1),f_expr:new ht("function",!0),f_expr_gen:new ht("function",!0,!1,null,!0),f_gen:new ht("function",!1,!1,null,!0)},ut=N.prototype;ut.initialContext=function(){return[lt.b_stat]},ut.braceIsBlock=function(t){var e=this.curContext();return e===lt.f_expr||e===lt.f_stat||(t!==B.colon||e!==lt.b_stat&&e!==lt.b_expr?t===B._return||t===B.name&&this.exprAllowed?D.test(this.input.slice(this.lastTokEnd,this.start)):t===B._else||t===B.semi||t===B.eof||t===B.parenR||t===B.arrow||(t===B.braceL?e===lt.b_stat:t!==B._var&&t!==B._const&&t!==B.name&&!this.exprAllowed):!e.isExpr)},ut.inGeneratorContext=function(){for(var t=this.context.length-1;t>=1;t--){var e=this.context[t];if("function"===e.token)return e.generator}return!1},ut.updateContext=function(t){var e,i=this.type;i.keyword&&t===B.dot?this.exprAllowed=!1:(e=i.updateContext)?e.call(this,t):this.exprAllowed=i.beforeExpr},B.parenR.updateContext=B.braceR.updateContext=function(){if(1!==this.context.length){var t=this.context.pop();t===lt.b_stat&&"function"===this.curContext().token&&(t=this.context.pop()),this.exprAllowed=!t.isExpr}else this.exprAllowed=!0},B.braceL.updateContext=function(t){this.context.push(this.braceIsBlock(t)?lt.b_stat:lt.b_expr),this.exprAllowed=!0},B.dollarBraceL.updateContext=function(){this.context.push(lt.b_tmpl),this.exprAllowed=!0},B.parenL.updateContext=function(t){var e=t===B._if||t===B._for||t===B._with||t===B._while;this.context.push(e?lt.p_stat:lt.p_expr),this.exprAllowed=!0},B.incDec.updateContext=function(){},B._function.updateContext=B._class.updateContext=function(t){!t.beforeExpr||t===B.semi||t===B._else||t===B._return&&D.test(this.input.slice(this.lastTokEnd,this.start))||(t===B.colon||t===B.braceL)&&this.curContext()===lt.b_stat?this.context.push(lt.f_stat):this.context.push(lt.f_expr),this.exprAllowed=!1},B.backQuote.updateContext=function(){this.curContext()===lt.q_tmpl?this.context.pop():this.context.push(lt.q_tmpl),this.exprAllowed=!1},B.star.updateContext=function(t){if(t===B._function){var e=this.context.length-1;this.context[e]===lt.f_expr?this.context[e]=lt.f_expr_gen:this.context[e]=lt.f_gen}this.exprAllowed=!0},B.name.updateContext=function(t){var e=!1;this.options.ecmaVersion>=6&&t!==B.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(e=!0),this.exprAllowed=e};var vt="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS",Pt={9:vt,10:vt+" Extended_Pictographic"},gt="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu",dt="Adlam Adlm Ahom Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb",pt={9:dt,10:dt+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd"},ft={};function mt(t){var e=ft[t]={binary:M(Pt[t]+" "+gt),nonBinary:{General_Category:M(gt),Script:M(pt[t])}};e.nonBinary.Script_Extensions=e.nonBinary.Script,e.nonBinary.gc=e.nonBinary.General_Category,e.nonBinary.sc=e.nonBinary.Script,e.nonBinary.scx=e.nonBinary.Script_Extensions}mt(9),mt(10);var wt=N.prototype,Ct=function(t){this.parser=t,this.validFlags="gim"+(t.options.ecmaVersion>=6?"uy":"")+(t.options.ecmaVersion>=9?"s":""),this.unicodeProperties=ft[t.options.ecmaVersion>=10?10:t.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};function Bt(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function Dt(t){return 36===t||t>=40&&t<=43||46===t||63===t||t>=91&&t<=94||t>=123&&t<=125}function yt(t){return t>=65&&t<=90||t>=97&&t<=122}function bt(t){return yt(t)||95===t}function Et(t){return bt(t)||Tt(t)}function Tt(t){return t>=48&&t<=57}function Qt(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function It(t){return t>=65&&t<=70?t-65+10:t>=97&&t<=102?t-97+10:t-48}function xt(t){return t>=48&&t<=55}Ct.prototype.reset=function(t,e,i){var n=-1!==i.indexOf("u");this.start=0|t,this.source=e+"",this.flags=i,this.switchU=n&&this.parser.options.ecmaVersion>=6,this.switchN=n&&this.parser.options.ecmaVersion>=9},Ct.prototype.raise=function(t){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+t)},Ct.prototype.at=function(t){var e=this.source,i=e.length;if(t>=i)return-1;var n=e.charCodeAt(t);return!this.switchU||n<=55295||n>=57344||t+1>=i?n:(n<<10)+e.charCodeAt(t+1)-56613888},Ct.prototype.nextIndex=function(t){var e=this.source,i=e.length;if(t>=i)return i;var n=e.charCodeAt(t);return!this.switchU||n<=55295||n>=57344||t+1>=i?t+1:t+2},Ct.prototype.current=function(){return this.at(this.pos)},Ct.prototype.lookahead=function(){return this.at(this.nextIndex(this.pos))},Ct.prototype.advance=function(){this.pos=this.nextIndex(this.pos)},Ct.prototype.eat=function(t){return this.current()===t&&(this.advance(),!0)},wt.validateRegExpFlags=function(t){for(var e=t.validFlags,i=t.flags,n=0;n-1&&this.raise(t.start,"Duplicate regular expression flag")}},wt.validateRegExpPattern=function(t){this.regexp_pattern(t),!t.switchN&&this.options.ecmaVersion>=9&&t.groupNames.length>0&&(t.switchN=!0,this.regexp_pattern(t))},wt.regexp_pattern=function(t){t.pos=0,t.lastIntValue=0,t.lastStringValue="",t.lastAssertionIsQuantifiable=!1,t.numCapturingParens=0,t.maxBackReference=0,t.groupNames.length=0,t.backReferenceNames.length=0,this.regexp_disjunction(t),t.pos!==t.source.length&&(t.eat(41)&&t.raise("Unmatched ')'"),(t.eat(93)||t.eat(125))&&t.raise("Lone quantifier brackets")),t.maxBackReference>t.numCapturingParens&&t.raise("Invalid escape");for(var e=0,i=t.backReferenceNames;e=9&&(i=t.eat(60)),t.eat(61)||t.eat(33))return this.regexp_disjunction(t),t.eat(41)||t.raise("Unterminated group"),t.lastAssertionIsQuantifiable=!i,!0}return t.pos=e,!1},wt.regexp_eatQuantifier=function(t,e){return void 0===e&&(e=!1),!!this.regexp_eatQuantifierPrefix(t,e)&&(t.eat(63),!0)},wt.regexp_eatQuantifierPrefix=function(t,e){return t.eat(42)||t.eat(43)||t.eat(63)||this.regexp_eatBracedQuantifier(t,e)},wt.regexp_eatBracedQuantifier=function(t,e){var i=t.pos;if(t.eat(123)){var n=0,r=-1;if(this.regexp_eatDecimalDigits(t)&&(n=t.lastIntValue,t.eat(44)&&this.regexp_eatDecimalDigits(t)&&(r=t.lastIntValue),t.eat(125)))return-1!==r&&r=9?this.regexp_groupSpecifier(t):63===t.current()&&t.raise("Invalid group"),this.regexp_disjunction(t),t.eat(41))return t.numCapturingParens+=1,!0;t.raise("Unterminated group")}return!1},wt.regexp_eatExtendedAtom=function(t){return t.eat(46)||this.regexp_eatReverseSolidusAtomEscape(t)||this.regexp_eatCharacterClass(t)||this.regexp_eatUncapturingGroup(t)||this.regexp_eatCapturingGroup(t)||this.regexp_eatInvalidBracedQuantifier(t)||this.regexp_eatExtendedPatternCharacter(t)},wt.regexp_eatInvalidBracedQuantifier=function(t){return this.regexp_eatBracedQuantifier(t,!0)&&t.raise("Nothing to repeat"),!1},wt.regexp_eatSyntaxCharacter=function(t){var e=t.current();return!!Dt(e)&&(t.lastIntValue=e,t.advance(),!0)},wt.regexp_eatPatternCharacters=function(t){for(var e=t.pos,i=0;-1!==(i=t.current())&&!Dt(i);)t.advance();return t.pos!==e},wt.regexp_eatExtendedPatternCharacter=function(t){var e=t.current();return!(-1===e||36===e||e>=40&&e<=43||46===e||63===e||91===e||94===e||124===e)&&(t.advance(),!0)},wt.regexp_groupSpecifier=function(t){if(t.eat(63)){if(this.regexp_eatGroupName(t))return-1!==t.groupNames.indexOf(t.lastStringValue)&&t.raise("Duplicate capture group name"),void t.groupNames.push(t.lastStringValue);t.raise("Invalid group")}},wt.regexp_eatGroupName=function(t){if(t.lastStringValue="",t.eat(60)){if(this.regexp_eatRegExpIdentifierName(t)&&t.eat(62))return!0;t.raise("Invalid capture group name")}return!1},wt.regexp_eatRegExpIdentifierName=function(t){if(t.lastStringValue="",this.regexp_eatRegExpIdentifierStart(t)){for(t.lastStringValue+=Bt(t.lastIntValue);this.regexp_eatRegExpIdentifierPart(t);)t.lastStringValue+=Bt(t.lastIntValue);return!0}return!1},wt.regexp_eatRegExpIdentifierStart=function(t){var e=t.pos,i=t.current();return t.advance(),92===i&&this.regexp_eatRegExpUnicodeEscapeSequence(t)&&(i=t.lastIntValue),function(t){return P(t,!0)||36===t||95===t}(i)?(t.lastIntValue=i,!0):(t.pos=e,!1)},wt.regexp_eatRegExpIdentifierPart=function(t){var e=t.pos,i=t.current();return t.advance(),92===i&&this.regexp_eatRegExpUnicodeEscapeSequence(t)&&(i=t.lastIntValue),function(t){return g(t,!0)||36===t||95===t||8204===t||8205===t}(i)?(t.lastIntValue=i,!0):(t.pos=e,!1)},wt.regexp_eatAtomEscape=function(t){return!!(this.regexp_eatBackReference(t)||this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)||t.switchN&&this.regexp_eatKGroupName(t))||(t.switchU&&(99===t.current()&&t.raise("Invalid unicode escape"),t.raise("Invalid escape")),!1)},wt.regexp_eatBackReference=function(t){var e=t.pos;if(this.regexp_eatDecimalEscape(t)){var i=t.lastIntValue;if(t.switchU)return i>t.maxBackReference&&(t.maxBackReference=i),!0;if(i<=t.numCapturingParens)return!0;t.pos=e}return!1},wt.regexp_eatKGroupName=function(t){if(t.eat(107)){if(this.regexp_eatGroupName(t))return t.backReferenceNames.push(t.lastStringValue),!0;t.raise("Invalid named reference")}return!1},wt.regexp_eatCharacterEscape=function(t){return this.regexp_eatControlEscape(t)||this.regexp_eatCControlLetter(t)||this.regexp_eatZero(t)||this.regexp_eatHexEscapeSequence(t)||this.regexp_eatRegExpUnicodeEscapeSequence(t)||!t.switchU&&this.regexp_eatLegacyOctalEscapeSequence(t)||this.regexp_eatIdentityEscape(t)},wt.regexp_eatCControlLetter=function(t){var e=t.pos;if(t.eat(99)){if(this.regexp_eatControlLetter(t))return!0;t.pos=e}return!1},wt.regexp_eatZero=function(t){return 48===t.current()&&!Tt(t.lookahead())&&(t.lastIntValue=0,t.advance(),!0)},wt.regexp_eatControlEscape=function(t){var e=t.current();return 116===e?(t.lastIntValue=9,t.advance(),!0):110===e?(t.lastIntValue=10,t.advance(),!0):118===e?(t.lastIntValue=11,t.advance(),!0):102===e?(t.lastIntValue=12,t.advance(),!0):114===e&&(t.lastIntValue=13,t.advance(),!0)},wt.regexp_eatControlLetter=function(t){var e=t.current();return!!yt(e)&&(t.lastIntValue=e%32,t.advance(),!0)},wt.regexp_eatRegExpUnicodeEscapeSequence=function(t){var e,i=t.pos;if(t.eat(117)){if(this.regexp_eatFixedHexDigits(t,4)){var n=t.lastIntValue;if(t.switchU&&n>=55296&&n<=56319){var r=t.pos;if(t.eat(92)&&t.eat(117)&&this.regexp_eatFixedHexDigits(t,4)){var s=t.lastIntValue;if(s>=56320&&s<=57343)return t.lastIntValue=1024*(n-55296)+(s-56320)+65536,!0}t.pos=r,t.lastIntValue=n}return!0}if(t.switchU&&t.eat(123)&&this.regexp_eatHexDigits(t)&&t.eat(125)&&((e=t.lastIntValue)>=0&&e<=1114111))return!0;t.switchU&&t.raise("Invalid unicode escape"),t.pos=i}return!1},wt.regexp_eatIdentityEscape=function(t){if(t.switchU)return!!this.regexp_eatSyntaxCharacter(t)||!!t.eat(47)&&(t.lastIntValue=47,!0);var e=t.current();return!(99===e||t.switchN&&107===e)&&(t.lastIntValue=e,t.advance(),!0)},wt.regexp_eatDecimalEscape=function(t){t.lastIntValue=0;var e=t.current();if(e>=49&&e<=57){do{t.lastIntValue=10*t.lastIntValue+(e-48),t.advance()}while((e=t.current())>=48&&e<=57);return!0}return!1},wt.regexp_eatCharacterClassEscape=function(t){var e=t.current();if(function(t){return 100===t||68===t||115===t||83===t||119===t||87===t}(e))return t.lastIntValue=-1,t.advance(),!0;if(t.switchU&&this.options.ecmaVersion>=9&&(80===e||112===e)){if(t.lastIntValue=-1,t.advance(),t.eat(123)&&this.regexp_eatUnicodePropertyValueExpression(t)&&t.eat(125))return!0;t.raise("Invalid property name")}return!1},wt.regexp_eatUnicodePropertyValueExpression=function(t){var e=t.pos;if(this.regexp_eatUnicodePropertyName(t)&&t.eat(61)){var i=t.lastStringValue;if(this.regexp_eatUnicodePropertyValue(t)){var n=t.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(t,i,n),!0}}if(t.pos=e,this.regexp_eatLoneUnicodePropertyNameOrValue(t)){var r=t.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(t,r),!0}return!1},wt.regexp_validateUnicodePropertyNameAndValue=function(t,e,i){L(t.unicodeProperties.nonBinary,e)||t.raise("Invalid property name"),t.unicodeProperties.nonBinary[e].test(i)||t.raise("Invalid property value")},wt.regexp_validateUnicodePropertyNameOrValue=function(t,e){t.unicodeProperties.binary.test(e)||t.raise("Invalid property name")},wt.regexp_eatUnicodePropertyName=function(t){var e=0;for(t.lastStringValue="";bt(e=t.current());)t.lastStringValue+=Bt(e),t.advance();return""!==t.lastStringValue},wt.regexp_eatUnicodePropertyValue=function(t){var e=0;for(t.lastStringValue="";Et(e=t.current());)t.lastStringValue+=Bt(e),t.advance();return""!==t.lastStringValue},wt.regexp_eatLoneUnicodePropertyNameOrValue=function(t){return this.regexp_eatUnicodePropertyValue(t)},wt.regexp_eatCharacterClass=function(t){if(t.eat(91)){if(t.eat(94),this.regexp_classRanges(t),t.eat(93))return!0;t.raise("Unterminated character class")}return!1},wt.regexp_classRanges=function(t){for(;this.regexp_eatClassAtom(t);){var e=t.lastIntValue;if(t.eat(45)&&this.regexp_eatClassAtom(t)){var i=t.lastIntValue;!t.switchU||-1!==e&&-1!==i||t.raise("Invalid character class"),-1!==e&&-1!==i&&e>i&&t.raise("Range out of order in character class")}}},wt.regexp_eatClassAtom=function(t){var e=t.pos;if(t.eat(92)){if(this.regexp_eatClassEscape(t))return!0;if(t.switchU){var i=t.current();(99===i||xt(i))&&t.raise("Invalid class escape"),t.raise("Invalid escape")}t.pos=e}var n=t.current();return 93!==n&&(t.lastIntValue=n,t.advance(),!0)},wt.regexp_eatClassEscape=function(t){var e=t.pos;if(t.eat(98))return t.lastIntValue=8,!0;if(t.switchU&&t.eat(45))return t.lastIntValue=45,!0;if(!t.switchU&&t.eat(99)){if(this.regexp_eatClassControlLetter(t))return!0;t.pos=e}return this.regexp_eatCharacterClassEscape(t)||this.regexp_eatCharacterEscape(t)},wt.regexp_eatClassControlLetter=function(t){var e=t.current();return!(!Tt(e)&&95!==e)&&(t.lastIntValue=e%32,t.advance(),!0)},wt.regexp_eatHexEscapeSequence=function(t){var e=t.pos;if(t.eat(120)){if(this.regexp_eatFixedHexDigits(t,2))return!0;t.switchU&&t.raise("Invalid escape"),t.pos=e}return!1},wt.regexp_eatDecimalDigits=function(t){var e=t.pos,i=0;for(t.lastIntValue=0;Tt(i=t.current());)t.lastIntValue=10*t.lastIntValue+(i-48),t.advance();return t.pos!==e},wt.regexp_eatHexDigits=function(t){var e=t.pos,i=0;for(t.lastIntValue=0;Qt(i=t.current());)t.lastIntValue=16*t.lastIntValue+It(i),t.advance();return t.pos!==e},wt.regexp_eatLegacyOctalEscapeSequence=function(t){if(this.regexp_eatOctalDigit(t)){var e=t.lastIntValue;if(this.regexp_eatOctalDigit(t)){var i=t.lastIntValue;e<=3&&this.regexp_eatOctalDigit(t)?t.lastIntValue=64*e+8*i+t.lastIntValue:t.lastIntValue=8*e+i}else t.lastIntValue=e;return!0}return!1},wt.regexp_eatOctalDigit=function(t){var e=t.current();return xt(e)?(t.lastIntValue=e-48,t.advance(),!0):(t.lastIntValue=0,!1)},wt.regexp_eatFixedHexDigits=function(t,e){var i=t.pos;t.lastIntValue=0;for(var n=0;n>10),56320+(1023&t)))}zt.next=function(){this.options.onToken&&this.options.onToken(new Lt(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},zt.getToken=function(){return this.next(),new Lt(this)},"undefined"!=typeof Symbol&&(zt[Symbol.iterator]=function(){var t=this;return{next:function(){var e=t.getToken();return{done:e.type===B.eof,value:e}}}}),zt.curContext=function(){return this.context[this.context.length-1]},zt.nextToken=function(){var t=this.curContext();return t&&t.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(B.eof):t.override?t.override(this):void this.readToken(this.fullCharCodeAtPos())},zt.readToken=function(t){return P(t,this.options.ecmaVersion>=6)||92===t?this.readWord():this.getTokenFromCode(t)},zt.fullCharCodeAtPos=function(){var t=this.input.charCodeAt(this.pos);return t<=55295||t>=57344?t:(t<<10)+this.input.charCodeAt(this.pos+1)-56613888},zt.skipBlockComment=function(){var t,e=this.options.onComment&&this.curPosition(),i=this.pos,n=this.input.indexOf("*/",this.pos+=2);if(-1===n&&this.raise(this.pos-2,"Unterminated comment"),this.pos=n+2,this.options.locations)for(y.lastIndex=i;(t=y.exec(this.input))&&t.index8&&t<14||t>=5760&&E.test(String.fromCharCode(t))))break t;++this.pos}}},zt.finishToken=function(t,e){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var i=this.type;this.type=t,this.value=e,this.updateContext(i)},zt.readToken_dot=function(){var t=this.input.charCodeAt(this.pos+1);if(t>=48&&t<=57)return this.readNumber(!0);var e=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===t&&46===e?(this.pos+=3,this.finishToken(B.ellipsis)):(++this.pos,this.finishToken(B.dot))},zt.readToken_slash=function(){var t=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===t?this.finishOp(B.assign,2):this.finishOp(B.slash,1)},zt.readToken_mult_modulo_exp=function(t){var e=this.input.charCodeAt(this.pos+1),i=1,n=42===t?B.star:B.modulo;return this.options.ecmaVersion>=7&&42===t&&42===e&&(++i,n=B.starstar,e=this.input.charCodeAt(this.pos+2)),61===e?this.finishOp(B.assign,i+1):this.finishOp(n,i)},zt.readToken_pipe_amp=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?this.finishOp(124===t?B.logicalOR:B.logicalAND,2):61===e?this.finishOp(B.assign,2):this.finishOp(124===t?B.bitwiseOR:B.bitwiseAND,1)},zt.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(B.assign,2):this.finishOp(B.bitwiseXOR,1)},zt.readToken_plus_min=function(t){var e=this.input.charCodeAt(this.pos+1);return e===t?45!==e||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!D.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(B.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===e?this.finishOp(B.assign,2):this.finishOp(B.plusMin,1)},zt.readToken_lt_gt=function(t){var e=this.input.charCodeAt(this.pos+1),i=1;return e===t?(i=62===t&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+i)?this.finishOp(B.assign,i+1):this.finishOp(B.bitShift,i)):33!==e||60!==t||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===e&&(i=2),this.finishOp(B.relational,i)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},zt.readToken_eq_excl=function(t){var e=this.input.charCodeAt(this.pos+1);return 61===e?this.finishOp(B.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===t&&62===e&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(B.arrow)):this.finishOp(61===t?B.eq:B.prefix,1)},zt.getTokenFromCode=function(t){switch(t){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(B.parenL);case 41:return++this.pos,this.finishToken(B.parenR);case 59:return++this.pos,this.finishToken(B.semi);case 44:return++this.pos,this.finishToken(B.comma);case 91:return++this.pos,this.finishToken(B.bracketL);case 93:return++this.pos,this.finishToken(B.bracketR);case 123:return++this.pos,this.finishToken(B.braceL);case 125:return++this.pos,this.finishToken(B.braceR);case 58:return++this.pos,this.finishToken(B.colon);case 63:return++this.pos,this.finishToken(B.question);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(B.backQuote);case 48:var e=this.input.charCodeAt(this.pos+1);if(120===e||88===e)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===e||79===e)return this.readRadixNumber(8);if(98===e||66===e)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(t);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(t);case 124:case 38:return this.readToken_pipe_amp(t);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(t);case 60:case 62:return this.readToken_lt_gt(t);case 61:case 33:return this.readToken_eq_excl(t);case 126:return this.finishOp(B.prefix,1)}this.raise(this.pos,"Unexpected character '"+Mt(t)+"'")},zt.finishOp=function(t,e){var i=this.input.slice(this.pos,this.pos+e);return this.pos+=e,this.finishToken(t,i)},zt.readRegexp=function(){for(var t,e,i=this.pos;;){this.pos>=this.input.length&&this.raise(i,"Unterminated regular expression");var n=this.input.charAt(this.pos);if(D.test(n)&&this.raise(i,"Unterminated regular expression"),t)t=!1;else{if("["===n)e=!0;else if("]"===n&&e)e=!1;else if("/"===n&&!e)break;t="\\"===n}++this.pos}var r=this.input.slice(i,this.pos);++this.pos;var s=this.pos,a=this.readWord1();this.containsEsc&&this.unexpected(s);var o=this.regexpState||(this.regexpState=new Ct(this));o.reset(i,r,a),this.validateRegExpFlags(o),this.validateRegExpPattern(o);var A=null;try{A=new RegExp(r,a)}catch(t){}return this.finishToken(B.regexp,{pattern:r,flags:a,value:A})},zt.readInt=function(t,e){for(var i=this.pos,n=0,r=0,s=null==e?1/0:e;r=97?a-97+10:a>=65?a-65+10:a>=48&&a<=57?a-48:1/0)>=t)break;++this.pos,n=n*t+o}return this.pos===i||null!=e&&this.pos-i!==e?null:n},zt.readRadixNumber=function(t){this.pos+=2;var e=this.readInt(t);return null==e&&this.raise(this.start+2,"Expected number in radix "+t),P(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(B.num,e)},zt.readNumber=function(t){var e=this.pos;t||null!==this.readInt(10)||this.raise(e,"Invalid number");var i=this.pos-e>=2&&48===this.input.charCodeAt(e);i&&this.strict&&this.raise(e,"Invalid number"),i&&/[89]/.test(this.input.slice(e,this.pos))&&(i=!1);var n=this.input.charCodeAt(this.pos);46!==n||i||(++this.pos,this.readInt(10),n=this.input.charCodeAt(this.pos)),69!==n&&101!==n||i||(43!==(n=this.input.charCodeAt(++this.pos))&&45!==n||++this.pos,null===this.readInt(10)&&this.raise(e,"Invalid number")),P(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var r=this.input.slice(e,this.pos),s=i?parseInt(r,8):parseFloat(r);return this.finishToken(B.num,s)},zt.readCodePoint=function(){var t;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var e=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(e,"Code point out of bounds")}else t=this.readHexChar(4);return t},zt.readString=function(t){for(var e="",i=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var n=this.input.charCodeAt(this.pos);if(n===t)break;92===n?(e+=this.input.slice(i,this.pos),e+=this.readEscapedChar(!1),i=this.pos):(b(n,this.options.ecmaVersion>=10)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return e+=this.input.slice(i,this.pos++),this.finishToken(B.string,e)};var jt={};zt.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(t){if(t!==jt)throw t;this.readInvalidTemplateToken()}this.inTemplateElement=!1},zt.invalidStringToken=function(t,e){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw jt;this.raise(t,e)},zt.readTmplToken=function(){for(var t="",e=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var i=this.input.charCodeAt(this.pos);if(96===i||36===i&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==B.template&&this.type!==B.invalidTemplate?(t+=this.input.slice(e,this.pos),this.finishToken(B.template,t)):36===i?(this.pos+=2,this.finishToken(B.dollarBraceL)):(++this.pos,this.finishToken(B.backQuote));if(92===i)t+=this.input.slice(e,this.pos),t+=this.readEscapedChar(!0),e=this.pos;else if(b(i)){switch(t+=this.input.slice(e,this.pos),++this.pos,i){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:t+="\n";break;default:t+=String.fromCharCode(i)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),e=this.pos}else++this.pos}},zt.readInvalidTemplateToken=function(){for(;this.pos=48&&e<=55){var i=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],n=parseInt(i,8);return n>255&&(i=i.slice(0,-1),n=parseInt(i,8)),this.pos+=i.length-1,e=this.input.charCodeAt(this.pos),"0"===i&&56!==e&&57!==e||!this.strict&&!t||this.invalidStringToken(this.pos-1-i.length,t?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(n)}return b(e)?"":String.fromCharCode(e)}},zt.readHexChar=function(t){var e=this.pos,i=this.readInt(16,t);return null===i&&this.invalidStringToken(e,"Bad character escape sequence"),i},zt.readWord1=function(){this.containsEsc=!1;for(var t="",e=!0,i=this.pos,n=this.options.ecmaVersion>=6;this.post?0:t)<=(i=0>i?0:i)?0===i?(e+n)/2:e+t/(t+i)*(n-e):n+i/(t+i)*(e-n)}function P(t){var e=m(t.b);return C(e,t.c),C(e.b,t.c),B(e,t.a),e}function g(t,e){var i=!1,n=!1;t!==e&&(e.a!==t.a&&(n=!0,y(e.a,t.a)),e.d!==t.d&&(i=!0,b(e.d,t.d)),w(e,t),n||(C(e,t.a),t.a.c=t),i||(B(e,t.d),t.d.a=t))}function d(t){var e=t.b,i=!1;t.d!==t.b.d&&(i=!0,b(t.d,t.b.d)),t.c===t?y(t.a,null):(t.b.d.a=et(t),t.a.c=t.c,w(t,et(t)),i||B(t,t.d)),e.c===e?(y(e.a,null),b(e.d,null)):(t.d.a=et(e),e.a.c=e.c,w(e,et(e))),D(t)}function p(t){var e=m(t),i=e.b;return w(e,t.e),e.a=t.b.a,C(i,e.a),e.d=i.d=t.d,e=e.b,w(t.b,et(t.b)),w(t.b,e),t.b.a=e.a,e.b.a.c=e.b,e.b.d=t.b.d,e.f=t.f,e.b.f=t.b.f,e}function f(t,e){var i=!1,n=m(t),r=n.b;return e.d!==t.d&&(i=!0,b(e.d,t.d)),w(n,t.e),w(r,e),n.a=t.b.a,r.a=e.a,n.d=r.d=t.d,t.d.a=r,i||B(n,t.d),n}function m(t){var e=new tt,i=new tt,n=t.b.h;return i.h=n,n.b.h=e,e.h=t,t.b.h=i,e.b=i,e.c=e,e.e=i,i.b=e,i.c=i,i.e=e}function w(t,e){var i=t.c,n=e.c;i.b.e=e,n.b.e=t,t.c=n,e.c=i}function C(t,e){var i=e.f,n=new nt(e,i);i.e=n,e.f=n,i=n.c=t;do{i.a=n,i=i.c}while(i!==t)}function B(t,e){var i=e.d,n=new $(e,i);i.b=n,e.d=n,n.a=t,n.c=e.c,i=t;do{i.d=n,i=i.e}while(i!==t)}function D(t){var e=t.h;t=t.b.h,e.b.h=t,t.b.h=e}function y(t,e){var i=t.c,n=i;do{n.a=e,n=n.c}while(n!==i);i=t.f,(n=t.e).f=i,i.e=n}function b(t,e){var i=t.a,n=i;do{n.d=e,n=n.e}while(n!==i);i=t.d,(n=t.b).d=i,i.b=n}function E(t){var e=0;return Math.abs(t[1])>Math.abs(t[0])&&(e=1),Math.abs(t[2])>Math.abs(t[e])&&(e=2),e}var T=4e150;function Q(t,e){t.f+=e.f,t.b.f+=e.b.f}function I(t,e,i){return t=t.a,e=e.a,i=i.a,e.b.a===t?i.b.a===t?s(e.a,i.a)?0>=o(i.b.a,e.a,i.a):0<=o(e.b.a,i.a,e.a):0>=o(i.b.a,t,i.a):i.b.a===t?0<=o(e.b.a,t,e.a):(e=a(e.b.a,t,e.a))>=(t=a(i.b.a,t,i.a))}function x(t){t.a.i=null;var e=t.e;e.a.c=e.c,e.c.a=e.a,t.e=null}function L(t,e){d(t.a),t.c=!1,t.a=e,e.i=t}function z(t){var e=t.a.a;do{t=gt(t)}while(t.a.a===e);return t.c&&(L(t,e=f(Pt(t).a.b,t.a.e)),t=gt(t)),t}function M(t,e,i){var n=new vt;return n.a=i,n.e=K(t.f,e.e,n),i.i=n}function j(t,e){switch(t.s){case 100130:return 0!=(1&e);case 100131:return 0!==e;case 100132:return 0e;case 100134:return 2<=e||-2>=e}return!1}function k(t){var e=t.a,i=e.d;i.c=t.d,i.a=e,x(t)}function S(t,e,i){for(t=e,e=e.a;t!==i;){t.c=!1;var n=Pt(t),r=n.a;if(r.a!==e.a){if(!n.c){k(t);break}L(n,r=f(e.c.b,r.b))}e.c!==r&&(g(et(r),r),g(e,r)),k(t),e=n.a,t=n}return e}function U(t,e,i,n,r,s){var a=!0;do{M(t,e,i.b),i=i.c}while(i!==n);for(null===r&&(r=Pt(e).a.b.c);(i=(n=Pt(e)).a.b).a===r.a;)i.c!==r&&(g(et(i),i),g(et(r),i)),n.f=e.f-i.f,n.d=j(t,n.f),e.b=!0,!a&&O(t,e)&&(Q(i,r),x(e),d(r)),a=!1,e=n,r=i;e.b=!0,s&&R(t,e)}function G(t,e,i,n,r){var s=[e.g[0],e.g[1],e.g[2]];e.d=null,e.d=t.o&&t.o(s,i,n,t.c)||null,null===e.d&&(r?t.n||(Z(t,100156),t.n=!0):e.d=i[0])}function F(t,e,i){var n=[null,null,null,null];n[0]=e.a.d,n[1]=i.a.d,G(t,e.a,n,[.5,.5,0,0],!1),g(e,i)}function _(t,e,i,n,r){var s=Math.abs(e.b-t.b)+Math.abs(e.a-t.a),a=Math.abs(i.b-t.b)+Math.abs(i.a-t.a),o=r+1;n[r]=.5*a/(s+a),n[o]=.5*s/(s+a),t.g[0]+=n[r]*e.g[0]+n[o]*i.g[0],t.g[1]+=n[r]*e.g[1]+n[o]*i.g[1],t.g[2]+=n[r]*e.g[2]+n[o]*i.g[2]}function O(t,e){var i=Pt(e),n=e.a,a=i.a;if(s(n.a,a.a)){if(0=u?lt(i,u):s(h[c[u>>1]],h[c[u]])?lt(i,u):ut(i,u)),h[A]=null,l[A]=i.b,i.b=A}else for(i.c[-(A+1)]=null;0o(n.b.a,a.a,n.a))return!1;gt(e).b=e.b=!0,p(n.b),g(et(a),n)}return!0}function Y(t,e){var i=Pt(e),n=e.a,l=i.a,u=n.a,P=l.a,d=n.b.a,f=l.b.a,m=new nt;if(o(d,t.a,u),o(f,t.a,P),u===P||Math.min(u.a,d.a)>Math.max(P.a,f.a))return!1;if(s(u,P)){if(0o(d,P,u))return!1;var w,C,B=d,D=u,y=f,b=P;if(s(B,D)||(w=B,B=D,D=w),s(y,b)||(w=y,y=b,b=w),s(B,y)||(w=B,B=y,y=w,w=D,D=b,b=w),s(y,D)?s(D,b)?(0>(w=a(B,y,D))+(C=a(y,D,b))&&(w=-w,C=-C),m.b=v(w,y.b,C,D.b)):(0>(w=o(B,y,D))+(C=-o(B,b,D))&&(w=-w,C=-C),m.b=v(w,y.b,C,b.b)):m.b=(y.b+D.b)/2,A(B,D)||(w=B,B=D,D=w),A(y,b)||(w=y,y=b,b=w),A(B,y)||(w=B,B=y,y=w,w=D,D=b,b=w),A(y,D)?A(D,b)?(0>(w=c(B,y,D))+(C=c(y,D,b))&&(w=-w,C=-C),m.a=v(w,y.a,C,D.a)):(0>(w=h(B,y,D))+(C=-h(B,b,D))&&(w=-w,C=-C),m.a=v(w,y.a,C,b.a)):m.a=(y.a+D.a)/2,s(m,t.a)&&(m.b=t.a.b,m.a=t.a.a),B=s(u,P)?u:P,s(B,m)&&(m.b=B.b,m.a=B.a),r(m,u)||r(m,P))return O(t,e),!1;if(!r(d,t.a)&&0<=o(d,t.a,m)||!r(f,t.a)&&0>=o(f,t.a,m)){if(f===t.a)return p(n.b),g(l.b,n),n=Pt(e=z(e)).a,S(t,Pt(e),i),U(t,e,et(n),n,n,!0),!0;if(d===t.a){p(l.b),g(n.e,et(l)),P=(u=i=e).a.b.a;do{u=gt(u)}while(u.a.b.a===P);return u=Pt(e=u).a.b.c,i.a=et(l),U(t,e,(l=S(t,i,null)).c,n.b.c,u,!0),!0}return 0<=o(d,t.a,m)&&(gt(e).b=e.b=!0,p(n.b),n.a.b=t.a.b,n.a.a=t.a.a),0>=o(f,t.a,m)&&(e.b=i.b=!0,p(l.b),l.a.b=t.a.b,l.a.a=t.a.a),!1}return p(n.b),p(l.b),g(et(l),n),n.a.b=m.b,n.a.a=m.a,n.a.h=st(t.e,n.a),n=n.a,l=[0,0,0,0],m=[u.d,d.d,P.d,f.d],n.g[0]=n.g[1]=n.g[2]=0,_(n,u,d,l,0),_(n,P,f,l,2),G(t,n,m,l,!0),gt(e).b=e.b=i.b=!0,!1}function R(t,e){for(var i=Pt(e);;){for(;i.b;)e=i,i=Pt(i);if(!e.b&&(i=e,null===(e=gt(e))||!e.b))break;e.b=!1;var n,r=e.a,a=i.a;if(n=r.b.a!==a.b.a)t:{var A=Pt(n=e),c=n.a,h=A.a,l=void 0;if(s(c.b.a,h.b.a)){if(0>o(c.b.a,h.b.a,c.a)){n=!1;break t}gt(n).b=n.b=!0,l=p(c),g(h.b,l),l.d.c=n.d}else{if(0n.f&&(n.f*=2,n.c=At(n.c,n.f+1)),0===n.b?i=r:(i=n.b,n.b=n.c[n.b]),n.e[i]=e,n.c[i]=r,n.d[r]=i,n.h&&ut(n,r),i}return n=t.a++,t.c[n]=e,-(n+1)}function at(t){if(0===t.a)return ht(t.b);var e=t.c[t.d[t.a-1]];if(0!==t.b.a&&s(ct(t.b),e))return ht(t.b);do{--t.a}while(0t.a||s(n[o],n[c])){i[a]=o,r[o]=a;break}i[a]=c,r[c]=a,a=A}}function ut(t,e){for(var i=t.d,n=t.e,r=t.c,a=e,o=i[a];;){var A=a>>1,c=i[A];if(0===A||s(n[c],n[o])){i[a]=o,r[o]=a;break}i[a]=c,r[c]=a,a=A}}function vt(){this.e=this.a=null,this.f=0,this.c=this.b=this.h=this.d=!1}function Pt(t){return t.e.c.b}function gt(t){return t.e.a.b}(n=V.prototype).x=function(){X(this,q)},n.B=function(t,e){switch(t){case 100142:return;case 100140:switch(e){case 100130:case 100131:case 100132:case 100133:case 100134:return void(this.s=e)}break;case 100141:return void(this.m=!!e);default:return void Z(this,100900)}Z(this,100901)},n.y=function(t){switch(t){case 100142:return 0;case 100140:return this.s;case 100141:return this.m;default:Z(this,100900)}return!1},n.A=function(t,e,i){this.j[0]=t,this.j[1]=e,this.j[2]=i},n.z=function(t,e){var i=e||null;switch(t){case 100100:case 100106:this.h=i;break;case 100104:case 100110:this.l=i;break;case 100101:case 100107:this.k=i;break;case 100102:case 100108:this.i=i;break;case 100103:case 100109:this.p=i;break;case 100105:case 100111:this.o=i;break;case 100112:this.r=i;break;default:Z(this,100900)}},n.C=function(t,e){var i=!1,n=[0,0,0];X(this,2);for(var r=0;3>r;++r){var s=t[r];-1e150>s&&(s=-1e150,i=!0),1e150h;++h){var v=c.g[h];vi[h]&&(i[h]=v,a[h]=c)}if(c=0,i[1]-n[1]>i[0]-n[0]&&(c=1),i[2]-n[2]>i[c]-n[c]&&(c=2),n[c]>=i[c])e[0]=0,e[1]=0,e[2]=1;else{for(i=0,n=A[c],a=a[c],A=[0,0,0],n=[n.g[0]-a.g[0],n.g[1]-a.g[1],n.g[2]-a.g[2]],h=[0,0,0],c=t.e;c!==t;c=c.e)h[0]=c.g[0]-a.g[0],h[1]=c.g[1]-a.g[1],h[2]=c.g[2]-a.g[2],A[0]=n[1]*h[2]-n[2]*h[1],A[1]=n[2]*h[0]-n[0]*h[2],A[2]=n[0]*h[1]-n[1]*h[0],(v=A[0]*A[0]+A[1]*A[1]+A[2]*A[2])>i&&(i=v,e[0]=A[0],e[1]=A[1],e[2]=A[2]);0>=i&&(e[0]=e[1]=e[2]=0,e[E(n)]=1)}t=!0}for(A=E(e),c=this.b.c,i=(A+1)%3,a=(A+2)%3,A=0=(i=c.a).f))do{e+=(i.a.b-i.b.a.b)*(i.a.a+i.b.a.a),i=i.e}while(i!==c.a);if(0>e)for(t=(e=this.b.c).e;t!==e;t=t.e)t.a=-t.a}for(this.n=!1,c=(e=this.b.b).h;c!==e;c=t)t=c.h,i=c.e,r(c.a,c.b.a)&&c.e.e!==c&&(F(this,i,c),d(c),i=(c=i).e),i.e===c&&(i!==c&&(i!==t&&i!==t.b||(t=t.h),d(i)),c!==t&&c!==t.b||(t=t.h),d(c));for(this.e=e=new rt,c=(t=this.b.c).e;c!==t;c=c.e)c.h=st(e,c);for(function(t){t.d=[];for(var e=0;e=o(i.a,i.b.a,i.e.b.a));)i=(a=f(i.e,i)).b;i=i.c.b}else{for(;i.e!==c&&(u(c.c.b)||0<=o(c.b.a,c.a,c.c.b.a));)c=(a=f(c,c.c.b)).b;c=c.e}for(;i.e.e!==c;)i=(a=f(i.e,i)).b}if(this.h||this.i||this.k||this.l)if(this.m){for(t=(e=this.b).a.b;t!==e.a;t=t.b)if(t.c){this.h&&this.h(2,this.c),c=t.a;do{this.k&&this.k(c.a.d,this.c),c=c.e}while(c!==t.a);this.i&&this.i(this.c)}}else{for(e=this.b,t=!!this.l,c=!1,i=-1,a=e.a.d;a!==e.a;a=a.d)if(a.c){c||(this.h&&this.h(4,this.c),c=!0),A=a.a;do{t&&(i!==(n=A.b.d.c?0:1)&&(i=n,this.l&&this.l(!!i,this.c))),this.k&&this.k(A.a.d,this.c),A=A.e}while(A!==a.a)}c&&this.i&&this.i(this.c)}if(this.r){for(c=(e=this.b).a.b;c!==e.a;c=t)if(t=c.b,!c.c){a=(i=c.a).e,A=void 0;do{a=(A=a).e,A.d=null,null===A.b.d&&(A.c===A?y(A.a,null):(A.a.c=A.c,w(A,et(A))),(n=A.b).c===n?y(n.a,null):(n.a.c=n.c,w(n,et(n))),D(A))}while(A!==i);i=c.d,(c=c.b).d=i,i.b=c}return this.r(this.b),void(this.c=this.b=null)}}this.b=this.c=null},this.libtess={GluTesselator:V,windingRule:{GLU_TESS_WINDING_ODD:100130,GLU_TESS_WINDING_NONZERO:100131,GLU_TESS_WINDING_POSITIVE:100132,GLU_TESS_WINDING_NEGATIVE:100133,GLU_TESS_WINDING_ABS_GEQ_TWO:100134},primitiveType:{GL_LINE_LOOP:2,GL_TRIANGLES:4,GL_TRIANGLE_STRIP:5,GL_TRIANGLE_FAN:6},errorType:{GLU_TESS_MISSING_BEGIN_POLYGON:100151,GLU_TESS_MISSING_END_POLYGON:100153,GLU_TESS_MISSING_BEGIN_CONTOUR:100152,GLU_TESS_MISSING_END_CONTOUR:100154,GLU_TESS_COORD_TOO_LARGE:100155,GLU_TESS_NEED_COMBINE_CALLBACK:100156},gluEnum:{GLU_TESS_MESH:100112,GLU_TESS_TOLERANCE:100142,GLU_TESS_WINDING_RULE:100140,GLU_TESS_BOUNDARY_ONLY:100141,GLU_INVALID_ENUM:100900,GLU_INVALID_VALUE:100901,GLU_TESS_BEGIN:100100,GLU_TESS_VERTEX:100101,GLU_TESS_END:100102,GLU_TESS_ERROR:100103,GLU_TESS_EDGE_FLAG:100104,GLU_TESS_COMBINE:100105,GLU_TESS_BEGIN_DATA:100106,GLU_TESS_VERTEX_DATA:100107,GLU_TESS_END_DATA:100108,GLU_TESS_ERROR_DATA:100109,GLU_TESS_EDGE_FLAG_DATA:100110,GLU_TESS_COMBINE_DATA:100111}},V.prototype.gluDeleteTess=V.prototype.x,V.prototype.gluTessProperty=V.prototype.B,V.prototype.gluGetTessProperty=V.prototype.y,V.prototype.gluTessNormal=V.prototype.A,V.prototype.gluTessCallback=V.prototype.z,V.prototype.gluTessVertex=V.prototype.C,V.prototype.gluTessBeginPolygon=V.prototype.u,V.prototype.gluTessBeginContour=V.prototype.t,V.prototype.gluTessEndContour=V.prototype.v,V.prototype.gluTessEndPolygon=V.prototype.w,t.exports=this.libtess},function(t,e,i){"use strict";function n(t){return Math.sqrt(t.slice(0,3).reduce(function(t,e,i){return t+e*e},0))}function r(t,e){return t.slice(0,3).map(function(t,i){return t-e[i]})}Object.defineProperty(e,"__esModule",{value:!0}),e.cross=function(t,e){return t=2===t.length?[t[0],t[1],0]:t,e=2===e.length?[e[0],e[1],0]:e,[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]},e.length=n,e.dot=function(t,e){return t.reduce(function(t,i,n){return t+i*e[n]},0)},e.normalize=function(t){var e=n(t);return t.slice(0,3).map(function(t){return t/e})},e.add=function(t,e){return t.slice(0,3).map(function(t,i){return t+e[i]})},e.subtract=r;e.sub=r},function(t,e,i){"use strict";i.d(e,"a",function(){return s});var n=i(3),r=new n.a;function s(t,e){this.min=void 0!==t?t:new n.a(1/0,1/0),this.max=void 0!==e?e:new n.a(-1/0,-1/0)}Object.assign(s.prototype,{set:function(t,e){return this.min.copy(t),this.max.copy(e),this},setFromPoints:function(t){this.makeEmpty();for(var e=0,i=t.length;ethis.max.x||t.ythis.max.y)},containsBox:function(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y},getParameter:function(t,e){return void 0===e&&(e=new n.a),e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))},intersectsBox:function(t){return!(t.max.xthis.max.x||t.max.ythis.max.y)},clampPoint:function(t,e){return void 0===e&&(e=new n.a),e.copy(t).clamp(this.min,this.max)},distanceToPoint:function(t){return r.copy(t).clamp(this.min,this.max).sub(t).length()},intersect:function(t){return this.min.max(t.min),this.max.min(t.max),this},union:function(t){return this.min.min(t.min),this.max.max(t.max),this},translate:function(t){return this.min.add(t),this.max.add(t),this},equals:function(t){return t.min.equals(this.min)&&t.max.equals(this.max)}})},function(t,e,i){"use strict";i.d(e,"a",function(){return r});var n=i(15);function r(){n.a.call(this),this.type="InstancedBufferGeometry",this.maxInstancedCount=void 0}r.prototype=Object.assign(Object.create(n.a.prototype),{constructor:r,isInstancedBufferGeometry:!0,copy:function(t){return n.a.prototype.copy.call(this,t),this.maxInstancedCount=t.maxInstancedCount,this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var t=n.a.prototype.toJSON.call(this);return t.maxInstancedCount=this.maxInstancedCount,t.isInstancedBufferGeometry=!0,t}})},function(t,e,i){"use strict";i.d(e,"a",function(){return r});var n=i(28);function r(t,e){n.a.call(this,t,e),this.type="AmbientLight",this.castShadow=void 0}r.prototype=Object.assign(Object.create(n.a.prototype),{constructor:r,isAmbientLight:!0})},function(t,e,i){"use strict";i.d(e,"a",function(){return a});var n=i(28),r=i(9),s=i(5);function a(t,e,i){n.a.call(this,t,i),this.type="HemisphereLight",this.castShadow=void 0,this.position.copy(s.a.DefaultUp),this.updateMatrix(),this.groundColor=new r.a(e)}a.prototype=Object.assign(Object.create(n.a.prototype),{constructor:a,isHemisphereLight:!0,copy:function(t){return n.a.prototype.copy.call(this,t),this.groundColor.copy(t.groundColor),this}})},function(t,e,i){"use strict";i.d(e,"a",function(){return l});var n=i(31),r=i(22),s=i(38),a=i(42),o=i(6),A=i(15),c=i(5),h=i(0);function l(t,e,i){this.type="PlaneHelper",this.plane=t,this.size=void 0===e?1:e;var c=void 0!==i?i:16776960,h=new A.a;h.addAttribute("position",new o.b([1,-1,1,-1,1,1,-1,-1,1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,1,0,0,1,0,0,0],3)),h.computeBoundingSphere(),n.a.call(this,h,new s.a({color:c}));var l=new A.a;l.addAttribute("position",new o.b([1,1,1,-1,1,1,-1,-1,1,1,1,1,-1,-1,1,1,-1,1],3)),l.computeBoundingSphere(),this.add(new r.a(l,new a.a({color:c,opacity:.2,transparent:!0,depthWrite:!1})))}l.prototype=Object.create(n.a.prototype),l.prototype.constructor=l,l.prototype.updateMatrixWorld=function(t){var e=-this.plane.constant;Math.abs(e)<1e-8&&(e=1e-8),this.scale.set(.5*this.size,.5*this.size,e),this.children[0].material.side=e<0?h.h:h.E,this.lookAt(this.plane.normal),c.a.prototype.updateMatrixWorld.call(this,t)}},function(t,e,i){"use strict";i.d(e,"a",function(){return A});var n=i(36),r=i(15),s=i(6),a=i(1);function o(t,e,i,r,s,a,o){n.a.call(this),this.type="SphereGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:i,phiStart:r,phiLength:s,thetaStart:a,thetaLength:o},this.fromBufferGeometry(new A(t,e,i,r,s,a,o)),this.mergeVertices()}function A(t,e,i,n,o,A,c){r.a.call(this),this.type="SphereBufferGeometry",this.parameters={radius:t,widthSegments:e,heightSegments:i,phiStart:n,phiLength:o,thetaStart:A,thetaLength:c},t=t||1,e=Math.max(3,Math.floor(e)||8),i=Math.max(2,Math.floor(i)||6),n=void 0!==n?n:0,o=void 0!==o?o:2*Math.PI,A=void 0!==A?A:0,c=void 0!==c?c:Math.PI;var h,l,u=Math.min(A+c,Math.PI),v=0,P=[],g=new a.a,d=new a.a,p=[],f=[],m=[],w=[];for(l=0;l<=i;l++){var C=[],B=l/i,D=0;for(0==l&&0==A?D=.5/e:l==i&&u==Math.PI&&(D=-.5/e),h=0;h<=e;h++){var y=h/e;g.x=-t*Math.cos(n+y*o)*Math.sin(A+B*c),g.y=t*Math.cos(A+B*c),g.z=t*Math.sin(n+y*o)*Math.sin(A+B*c),f.push(g.x,g.y,g.z),d.copy(g).normalize(),m.push(d.x,d.y,d.z),w.push(y+D,1-B),C.push(v++)}P.push(C)}for(l=0;l0)&&p.push(b,E,Q),(l!==i-1||u0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}var s="undefined"!=typeof WebGL2RenderingContext&&t instanceof WebGL2RenderingContext,a=void 0!==i.precision?i.precision:"highp",o=r(a);o!==a&&(a=o);var A=!0===i.logarithmicDepthBuffer,c=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),h=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS),l=t.getParameter(t.MAX_TEXTURE_SIZE),u=t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),v=t.getParameter(t.MAX_VERTEX_ATTRIBS),P=t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),g=t.getParameter(t.MAX_VARYING_VECTORS),d=t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),p=h>0,f=s||!!e.get("OES_texture_float");return{isWebGL2:s,getMaxAnisotropy:function(){if(void 0!==n)return n;var i=e.get("EXT_texture_filter_anisotropic");return n=null!==i?t.getParameter(i.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0},getMaxPrecision:r,precision:a,logarithmicDepthBuffer:A,maxTextures:c,maxVertexTextures:h,maxTextureSize:l,maxCubemapSize:u,maxAttributes:v,maxVertexUniforms:P,maxVaryings:g,maxFragmentUniforms:d,vertexTextures:p,floatFragmentTextures:f,floatVertexTextures:p&&f,maxSamples:s?t.getParameter(t.MAX_SAMPLES):0}}var b=i(20),E=i(33);function T(){var t=this,e=null,i=0,n=!1,r=!1,s=new E.a,a=new b.a,o={value:null,needsUpdate:!1};function A(){o.value!==e&&(o.value=e,o.needsUpdate=i>0),t.numPlanes=i,t.numIntersection=0}function c(e,i,n,r){var A=null!==e?e.length:0,c=null;if(0!==A){if(c=o.value,!0!==r||null===c){var h=n+4*A,l=i.matrixWorldInverse;a.getNormalMatrix(l),(null===c||c.length65535?I.d:I.c)(n,1);P.version=o,e.update(P,t.ELEMENT_ARRAY_BUFFER);var g=r.get(i);g&&e.remove(g),r.set(i,P)}return{get:function(t,e){var r=n.get(e);return r||(e.addEventListener("dispose",s),e.isBufferGeometry?r=e:e.isGeometry&&(void 0===e._bufferGeometry&&(e._bufferGeometry=(new x.a).setFromObject(t)),r=e._bufferGeometry),n.set(e,r),i.memory.geometries++,r)},update:function(i){var n=i.index,r=i.attributes;for(var s in null!==n&&e.update(n,t.ELEMENT_ARRAY_BUFFER),r)e.update(r[s],t.ARRAY_BUFFER);var a=i.morphAttributes;for(var s in a)for(var o=a[s],A=0,c=o.length;A0)return t;var r=e*i,s=H[r];if(void 0===s&&(s=new Float32Array(r),H[r]=s),0!==e){n.toArray(s,0);for(var a=1,o=0;a!==e;++a)o+=i,t[a].toArray(s,o)}return s}function X(t,e){if(t.length!==e.length)return!1;for(var i=0,n=t.length;i/gm;function Jt(t){return t.replace(Ht,Kt)}function Kt(t,e){var i=St.a[e];if(void 0===i)throw new Error("Can not resolve #include <"+e+">");return Jt(i)}var Wt=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g;function Vt(t){return t.replace(Wt,qt)}function qt(t,e,i,n){for(var r="",s=parseInt(e);s0?t.gammaFactor:1,C=a.isWebGL2?"":function(t,e,i){return[(t=t||{}).derivatives||e.envMapCubeUV||e.bumpMap||e.tangentSpaceNormalMap||e.clearcoatNormalMap||e.flatShading?"#extension GL_OES_standard_derivatives : enable":"",(t.fragDepth||e.logarithmicDepthBuffer)&&i.get("EXT_frag_depth")?"#extension GL_EXT_frag_depth : enable":"",t.drawBuffers&&i.get("WEBGL_draw_buffers")?"#extension GL_EXT_draw_buffers : require":"",(t.shaderTextureLOD||e.envMap)&&i.get("EXT_shader_texture_lod")?"#extension GL_EXT_shader_texture_lod : enable":""].filter(Yt).join("\n")}(r.extensions,a,e),B=function(t){var e=[];for(var i in t){var n=t[i];!1!==n&&e.push("#define "+i+" "+n)}return e.join("\n")}(v),D=u.createProgram(),y=t.getRenderTarget(),b=y&&y.isWebGLMultiviewRenderTarget?y.numViews:0;if(r.isRawShaderMaterial?((o=[B].filter(Yt).join("\n")).length>0&&(o+="\n"),(A=[C,B].filter(Yt).join("\n")).length>0&&(A+="\n")):(o=[Xt(a),"#define SHADER_NAME "+s.name,B,a.instancing?"#define USE_INSTANCING":"",a.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+w,"#define MAX_BONES "+a.maxBones,a.useFog&&a.fog?"#define USE_FOG":"",a.useFog&&a.fogExp2?"#define FOG_EXP2":"",a.map?"#define USE_MAP":"",a.envMap?"#define USE_ENVMAP":"",a.envMap?"#define "+f:"",a.lightMap?"#define USE_LIGHTMAP":"",a.aoMap?"#define USE_AOMAP":"",a.emissiveMap?"#define USE_EMISSIVEMAP":"",a.bumpMap?"#define USE_BUMPMAP":"",a.normalMap?"#define USE_NORMALMAP":"",a.normalMap&&a.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",a.normalMap&&a.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",a.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",a.displacementMap&&a.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",a.specularMap?"#define USE_SPECULARMAP":"",a.roughnessMap?"#define USE_ROUGHNESSMAP":"",a.metalnessMap?"#define USE_METALNESSMAP":"",a.alphaMap?"#define USE_ALPHAMAP":"",a.vertexTangents?"#define USE_TANGENT":"",a.vertexColors?"#define USE_COLOR":"",a.vertexUvs?"#define USE_UV":"",a.flatShading?"#define FLAT_SHADED":"",a.skinning?"#define USE_SKINNING":"",a.useVertexTexture?"#define BONE_TEXTURE":"",a.morphTargets?"#define USE_MORPHTARGETS":"",a.morphNormals&&!1===a.flatShading?"#define USE_MORPHNORMALS":"",a.doubleSided?"#define DOUBLE_SIDED":"",a.flipSided?"#define FLIP_SIDED":"",a.shadowMapEnabled?"#define USE_SHADOWMAP":"",a.shadowMapEnabled?"#define "+d:"",a.sizeAttenuation?"#define USE_SIZEATTENUATION":"",a.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",a.logarithmicDepthBuffer&&(a.isWebGL2||e.get("EXT_frag_depth"))?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#ifdef USE_COLOR","\tattribute vec3 color;","#endif","#ifdef USE_MORPHTARGETS","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Yt).join("\n"),A=[C,Xt(a),"#define SHADER_NAME "+s.name,B,a.alphaTest?"#define ALPHATEST "+a.alphaTest+(a.alphaTest%1?"":".0"):"","#define GAMMA_FACTOR "+w,a.useFog&&a.fog?"#define USE_FOG":"",a.useFog&&a.fogExp2?"#define FOG_EXP2":"",a.map?"#define USE_MAP":"",a.matcap?"#define USE_MATCAP":"",a.envMap?"#define USE_ENVMAP":"",a.envMap?"#define "+p:"",a.envMap?"#define "+f:"",a.envMap?"#define "+m:"",a.lightMap?"#define USE_LIGHTMAP":"",a.aoMap?"#define USE_AOMAP":"",a.emissiveMap?"#define USE_EMISSIVEMAP":"",a.bumpMap?"#define USE_BUMPMAP":"",a.normalMap?"#define USE_NORMALMAP":"",a.normalMap&&a.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",a.normalMap&&a.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",a.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",a.specularMap?"#define USE_SPECULARMAP":"",a.roughnessMap?"#define USE_ROUGHNESSMAP":"",a.metalnessMap?"#define USE_METALNESSMAP":"",a.alphaMap?"#define USE_ALPHAMAP":"",a.sheen?"#define USE_SHEEN":"",a.vertexTangents?"#define USE_TANGENT":"",a.vertexColors?"#define USE_COLOR":"",a.vertexUvs?"#define USE_UV":"",a.gradientMap?"#define USE_GRADIENTMAP":"",a.flatShading?"#define FLAT_SHADED":"",a.doubleSided?"#define DOUBLE_SIDED":"",a.flipSided?"#define FLIP_SIDED":"",a.shadowMapEnabled?"#define USE_SHADOWMAP":"",a.shadowMapEnabled?"#define "+d:"",a.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",a.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",a.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",a.logarithmicDepthBuffer&&(a.isWebGL2||e.get("EXT_frag_depth"))?"#define USE_LOGDEPTHBUF_EXT":"",(r.extensions&&r.extensions.shaderTextureLOD||a.envMap)&&(a.isWebGL2||e.get("EXT_shader_texture_lod"))?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;",a.toneMapping!==n.ob?"#define TONE_MAPPING":"",a.toneMapping!==n.ob?St.a.tonemapping_pars_fragment:"",a.toneMapping!==n.ob?Ot("toneMapping",a.toneMapping):"",a.dithering?"#define DITHERING":"",a.outputEncoding||a.mapEncoding||a.matcapEncoding||a.envMapEncoding||a.emissiveMapEncoding?St.a.encodings_pars_fragment:"",a.mapEncoding?_t("mapTexelToLinear",a.mapEncoding):"",a.matcapEncoding?_t("matcapTexelToLinear",a.matcapEncoding):"",a.envMapEncoding?_t("envMapTexelToLinear",a.envMapEncoding):"",a.emissiveMapEncoding?_t("emissiveMapTexelToLinear",a.emissiveMapEncoding):"",a.outputEncoding?(c="linearToOutputTexel",h=a.outputEncoding,l=Gt(h),"vec4 "+c+"( vec4 value ) { return LinearTo"+l[0]+l[1]+"; }"):"",a.depthPacking?"#define DEPTH_PACKING "+r.depthPacking:"","\n"].filter(Yt).join("\n")),P=Nt(P=Rt(P=Jt(P),a),a),g=Nt(g=Rt(g=Jt(g),a),a),P=Vt(P),g=Vt(g),a.isWebGL2&&!r.isRawShaderMaterial){var E=!1,T=/^\s*#version\s+300\s+es\s*\n/;r.isShaderMaterial&&null!==P.match(T)&&null!==g.match(T)&&(E=!0,P=P.replace(T,""),g=g.replace(T,"")),o=["#version 300 es\n","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+o,A=["#version 300 es\n","#define varying in",E?"":"out highp vec4 pc_fragColor;",E?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+A,b>0&&(o=(o=o.replace("#version 300 es\n",["#version 300 es\n","#extension GL_OVR_multiview2 : require","layout(num_views = "+b+") in;","#define VIEW_ID gl_ViewID_OVR"].join("\n"))).replace(["uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;"].join("\n"),["uniform mat4 modelViewMatrices["+b+"];","uniform mat4 projectionMatrices["+b+"];","uniform mat4 viewMatrices["+b+"];","uniform mat3 normalMatrices["+b+"];","#define modelViewMatrix modelViewMatrices[VIEW_ID]","#define projectionMatrix projectionMatrices[VIEW_ID]","#define viewMatrix viewMatrices[VIEW_ID]","#define normalMatrix normalMatrices[VIEW_ID]"].join("\n")),A=(A=A.replace("#version 300 es\n",["#version 300 es\n","#extension GL_OVR_multiview2 : require","#define VIEW_ID gl_ViewID_OVR"].join("\n"))).replace("uniform mat4 viewMatrix;",["uniform mat4 viewMatrices["+b+"];","#define viewMatrix viewMatrices[VIEW_ID]"].join("\n")))}var Q,I,x=o+P,L=A+g,z=kt(u,u.VERTEX_SHADER,x),M=kt(u,u.FRAGMENT_SHADER,L);if(u.attachShader(D,z),u.attachShader(D,M),void 0!==r.index0AttributeName?u.bindAttribLocation(D,0,r.index0AttributeName):!0===a.morphTargets&&u.bindAttribLocation(D,0,"position"),u.linkProgram(D),t.debug.checkShaderErrors){var j=u.getProgramInfoLog(D).trim(),k=u.getShaderInfoLog(z).trim(),S=u.getShaderInfoLog(M).trim(),U=!0,G=!0;if(!1===u.getProgramParameter(D,u.LINK_STATUS)){U=!1;Ft(u,z,"vertex"),Ft(u,M,"fragment")}else""!==j||""!==k&&""!==S||(G=!1);G&&(this.diagnostics={runnable:U,material:r,programLog:j,vertexShader:{log:k,prefix:o},fragmentShader:{log:S,prefix:A}})}return u.deleteShader(z),u.deleteShader(M),this.getUniforms=function(){return void 0===Q&&(Q=new jt(u,D)),Q},this.getAttributes=function(){return void 0===I&&(I=function(t,e){for(var i={},n=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES),r=0;r0,maxBones:v,useVertexTexture:i.floatVertexTextures,morphTargets:e.morphTargets,morphNormals:e.morphNormals,maxMorphTargets:t.maxMorphTargets,maxMorphNormals:t.maxMorphNormals,numDirLights:r.directional.length,numPointLights:r.point.length,numSpotLights:r.spot.length,numRectAreaLights:r.rectArea.length,numHemiLights:r.hemi.length,numDirLightShadows:r.directionalShadowMap.length,numPointLightShadows:r.pointShadowMap.length,numSpotLightShadows:r.spotShadowMap.length,numClippingPlanes:c,numClipIntersection:h,dithering:e.dithering,shadowMapEnabled:t.shadowMap.enabled&&a.length>0,shadowMapType:t.shadowMap.type,toneMapping:e.toneMapped?t.toneMapping:n.ob,physicallyCorrectLights:t.physicallyCorrectLights,premultipliedAlpha:e.premultipliedAlpha,alphaTest:e.alphaTest,doubleSided:e.side===n.w,flipSided:e.side===n.h,depthPacking:void 0!==e.depthPacking&&e.depthPacking}},this.getProgramCode=function(e,i){var n=[];if(i.shaderID?n.push(i.shaderID):(n.push(e.fragmentShader),n.push(e.vertexShader)),void 0!==e.defines)for(var r in e.defines)n.push(r),n.push(e.defines[r]);for(var s=0;s1&&i.sort(ee),n.length>1&&n.sort(ie)}}}function re(){var t=new WeakMap;function e(i){var n=i.target;n.removeEventListener("dispose",e),t.delete(n)}return{get:function(i,n){var r,s=t.get(i);return void 0===s?(r=new ne,t.set(i,new WeakMap),t.get(i).set(n,r),i.addEventListener("dispose",e)):void 0===(r=s.get(n))&&(r=new ne,s.set(n,r)),r},dispose:function(){t=new WeakMap}}}function se(){var t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];var i;switch(e.type){case"DirectionalLight":i={direction:new v.a,color:new w.a,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new u.a};break;case"SpotLight":i={position:new v.a,direction:new v.a,color:new w.a,distance:0,coneCos:0,penumbraCos:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new u.a};break;case"PointLight":i={position:new v.a,color:new w.a,distance:0,decay:0,shadow:!1,shadowBias:0,shadowRadius:1,shadowMapSize:new u.a,shadowCameraNear:1,shadowCameraFar:1e3};break;case"HemisphereLight":i={direction:new v.a,skyColor:new w.a,groundColor:new w.a};break;case"RectAreaLight":i={color:new w.a,position:new v.a,halfWidth:new v.a,halfHeight:new v.a}}return t[e.id]=i,i}}}var ae=0;function oe(t,e){return(e.castShadow?1:0)-(t.castShadow?1:0)}function Ae(){for(var t=new se,e={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],point:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},i=0;i<9;i++)e.probe.push(new v.a);var n=new v.a,r=new A.a,s=new A.a;return{setup:function(i,a,o){for(var A=0,c=0,h=0,l=0;l<9;l++)e.probe[l].set(0,0,0);var u=0,v=0,P=0,g=0,d=0,p=0,f=0,m=0,w=o.matrixWorldInverse;i.sort(oe),l=0;for(var C=i.length;l0:A&&A.isGeometry&&(f=A.morphTargets&&A.morphTargets.length>0)),e.isSkinnedMesh&&i.skinning;var m=e.isSkinnedMesh&&i.skinning,w=0;f&&(w|=c),m&&(w|=h),l=u[w]}if(t.localClippingEnabled&&!0===i.clipShadows&&0!==i.clippingPlanes.length){var C=l.uuid,B=i.uuid,D=d[C];void 0===D&&(D={},d[C]=D);var y=D[B];void 0===y&&(y=l.clone(),D[B]=y),l=y}return l.visible=i.visible,l.wireframe=i.wireframe,o===n.Bc?l.side=null!=i.shadowSide?i.shadowSide:i.side:l.side=null!=i.shadowSide?i.shadowSide:p[i.side],l.clipShadows=i.clipShadows,l.clippingPlanes=i.clippingPlanes,l.clipIntersection=i.clipIntersection,l.wireframeLinewidth=i.wireframeLinewidth,l.linewidth=i.linewidth,r.isPointLight&&l.isMeshDistanceMaterial&&(l.referencePosition.setFromMatrixPosition(r.matrixWorld),l.nearDistance=s,l.farDistance=a),l}function j(i,s,a,o,A){if(!1!==i.visible){if(i.layers.test(s.layers)&&(i.isMesh||i.isLine||i.isPoints)&&(i.castShadow||i.receiveShadow&&A===n.Bc)&&(!i.frustumCulled||r.intersectsObject(i))){i.modelViewMatrix.multiplyMatrices(a.matrixWorldInverse,i.matrixWorld);var c=e.update(i),h=i.material;if(Array.isArray(h))for(var l=c.groups,u=0,v=l.length;ui||s.y>i)&&(s.x>i&&(a.x=Math.floor(i/f.x),s.x=a.x*f.x,p.mapSize.x=a.x),s.y>i&&(a.y=Math.floor(i/f.y),s.y=a.y*f.y,p.mapSize.y=a.y)),null===p.map&&!p.isPointLightShadow&&this.type===n.Bc){var m={minFilter:n.R,magFilter:n.R,format:n.Ab};p.map=new le.a(s.x,s.y,m),p.map.texture.name=d.name+".shadowMap",p.mapPass=new le.a(s.x,s.y,m),p.camera.updateProjectionMatrix()}if(null===p.map){m={minFilter:n.gb,magFilter:n.gb,format:n.Ab};p.map=new le.a(s.x,s.y,m),p.map.texture.name=d.name+".shadowMap",p.camera.updateProjectionMatrix()}t.setRenderTarget(p.map),t.clear();for(var w=p.getViewportCount(),C=0;C=1):-1!==M.indexOf("OpenGL ES")&&(z=parseFloat(/^OpenGL\ ES\ ([0-9])/.exec(M)[1]),L=z>=2);var j=null,k={},S=new P.a,U=new P.a;function G(e,i,n){var r=new Uint8Array(4),s=t.createTexture();t.bindTexture(e,s),t.texParameteri(e,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(e,t.TEXTURE_MAG_FILTER,t.NEAREST);for(var a=0;an||t.height>n)&&(s=n/Math.max(t.width,t.height)),s<1||!0===e){if("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap){var a=e?r.a.floorPowerOfTwo:Math.floor,o=a(s*t.width),A=a(s*t.height);void 0===c&&(c=u(o,A));var h=i?u(o,A):c;return h.width=o,h.height=A,h.getContext("2d").drawImage(t,0,0,o,A),h}return t}return t}function P(t){return r.a.isPowerOfTwo(t.width)&&r.a.isPowerOfTwo(t.height)}function g(t,e){return t.generateMipmaps&&e&&t.minFilter!==n.gb&&t.minFilter!==n.R}function d(e,i,n,r){t.generateMipmap(e),s.get(i).__maxMipLevel=Math.log(Math.max(n,r))*Math.LOG2E}function p(i,n){if(!a.isWebGL2)return i;var r=i;return i===t.RED&&(n===t.FLOAT&&(r=t.R32F),n===t.HALF_FLOAT&&(r=t.R16F),n===t.UNSIGNED_BYTE&&(r=t.R8)),i===t.RGB&&(n===t.FLOAT&&(r=t.RGB32F),n===t.HALF_FLOAT&&(r=t.RGB16F),n===t.UNSIGNED_BYTE&&(r=t.RGB8)),i===t.RGBA&&(n===t.FLOAT&&(r=t.RGBA32F),n===t.HALF_FLOAT&&(r=t.RGBA16F),n===t.UNSIGNED_BYTE&&(r=t.RGBA8)),r===t.R16F||r===t.R32F||r===t.RGBA16F||r===t.RGBA32F?e.get("EXT_color_buffer_float"):r===t.RGB16F||t.RGB32F,r}function f(e){return e===n.gb||e===n.kb||e===n.jb?t.NEAREST:t.LINEAR}function m(e){var i=e.target;i.removeEventListener("dispose",m),function(e){var i=s.get(e);if(void 0===i.__webglInit)return;t.deleteTexture(i.__webglTexture),s.remove(e)}(i),i.isVideoTexture&&h.delete(i),A.memory.textures--}function w(e){var i=e.target;i.removeEventListener("dispose",w),function(e){var i=s.get(e),n=s.get(e.texture);if(!e)return;void 0!==n.__webglTexture&&t.deleteTexture(n.__webglTexture);e.depthTexture&&e.depthTexture.dispose();if(e.isWebGLRenderTargetCube)for(var r=0;r<6;r++)t.deleteFramebuffer(i.__webglFramebuffer[r]),i.__webglDepthbuffer&&t.deleteRenderbuffer(i.__webglDepthbuffer[r]);else t.deleteFramebuffer(i.__webglFramebuffer),i.__webglDepthbuffer&&t.deleteRenderbuffer(i.__webglDepthbuffer);if(e.isWebGLMultiviewRenderTarget){t.deleteTexture(i.__webglColorTexture),t.deleteTexture(i.__webglDepthStencilTexture),A.memory.textures-=2;for(var r=0,a=i.__webglViewFramebuffers.length;r0&&r.__version!==e.version){var a=e.image;if(void 0===a);else if(!1!==a.complete)return void T(r,e,n)}i.activeTexture(t.TEXTURE0+n),i.bindTexture(t.TEXTURE_2D,r.__webglTexture)}function D(e,r){if(6===e.image.length){var A=s.get(e);if(e.version>0&&A.__version!==e.version){E(A,e),i.activeTexture(t.TEXTURE0+r),i.bindTexture(t.TEXTURE_CUBE_MAP,A.__webglTexture),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e.flipY);for(var c=e&&e.isCompressedTexture,h=e.image[0]&&e.image[0].isDataTexture,l=[],u=0;u<6;u++)l[u]=c||h?h?e.image[u].image:e.image[u]:v(e.image[u],!1,!0,a.maxCubemapSize);var f,m=l[0],w=P(m)||a.isWebGL2,C=o.convert(e.format),B=o.convert(e.type),D=p(C,B);if(b(t.TEXTURE_CUBE_MAP,e,w),c){for(u=0;u<6;u++){f=l[u].mipmaps;for(var y=0;y-1&&i.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+u,y,D,T.width,T.height,0,T.data):i.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+u,y,D,T.width,T.height,0,C,B,T.data)}}A.__maxMipLevel=f.length-1}else{f=e.mipmaps;for(u=0;u<6;u++)if(h){i.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+u,0,D,l[u].width,l[u].height,0,C,B,l[u].data);for(y=0;y1||s.get(r).__currentAnisotropy)&&(t.texParameterf(i,c.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(r.anisotropy,a.getMaxAnisotropy())),s.get(r).__currentAnisotropy=r.anisotropy)}}function E(e,i){void 0===e.__webglInit&&(e.__webglInit=!0,i.addEventListener("dispose",m),e.__webglTexture=t.createTexture(),A.memory.textures++)}function T(e,r,s){var A=t.TEXTURE_2D;r.isDataTexture2DArray&&(A=t.TEXTURE_2D_ARRAY),r.isDataTexture3D&&(A=t.TEXTURE_3D),E(e,r),i.activeTexture(t.TEXTURE0+s),i.bindTexture(A,e.__webglTexture),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,r.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,r.unpackAlignment);var c=function(t){return!a.isWebGL2&&(t.wrapS!==n.l||t.wrapT!==n.l||t.minFilter!==n.gb&&t.minFilter!==n.R)}(r)&&!1===P(r.image),h=v(r.image,c,!1,a.maxTextureSize),l=P(h)||a.isWebGL2,u=o.convert(r.format),f=o.convert(r.type),m=p(u,f);b(A,r,l);var w,C=r.mipmaps;if(r.isDepthTexture){if(m=t.DEPTH_COMPONENT,r.type===n.D){if(!a.isWebGL2)throw new Error("Float Depth Texture only supported in WebGL2.0");m=t.DEPTH_COMPONENT32F}else a.isWebGL2&&(m=t.DEPTH_COMPONENT16);r.format===n.u&&m===t.DEPTH_COMPONENT&&r.type!==n.Ac&&r.type!==n.wc&&(r.type=n.Ac,f=o.convert(r.type)),r.format===n.v&&(m=t.DEPTH_STENCIL,r.type!==n.vc&&(r.type=n.vc,f=o.convert(r.type))),i.texImage2D(t.TEXTURE_2D,0,m,h.width,h.height,0,u,f,null)}else if(r.isDataTexture)if(C.length>0&&l){for(var B=0,D=C.length;B-1&&i.compressedTexImage2D(t.TEXTURE_2D,B,m,w.width,w.height,0,w.data):i.texImage2D(t.TEXTURE_2D,B,m,w.width,w.height,0,u,f,w.data);e.__maxMipLevel=C.length-1}else if(r.isDataTexture2DArray)i.texImage3D(t.TEXTURE_2D_ARRAY,0,m,h.width,h.height,h.depth,0,u,f,h.data),e.__maxMipLevel=0;else if(r.isDataTexture3D)i.texImage3D(t.TEXTURE_3D,0,m,h.width,h.height,h.depth,0,u,f,h.data),e.__maxMipLevel=0;else if(C.length>0&&l){for(B=0,D=C.length;B0&&r.__version!==e.version?T(r,e,n):(i.activeTexture(t.TEXTURE0+n),i.bindTexture(t.TEXTURE_2D_ARRAY,r.__webglTexture))},this.setTexture3D=function(e,n){var r=s.get(e);e.version>0&&r.__version!==e.version?T(r,e,n):(i.activeTexture(t.TEXTURE0+n),i.bindTexture(t.TEXTURE_3D,r.__webglTexture))},this.setTextureCube=D,this.setTextureCubeDynamic=y,this.setupRenderTarget=function(n){var r=s.get(n),c=s.get(n.texture);n.addEventListener("dispose",w),c.__webglTexture=t.createTexture(),A.memory.textures++;var h=!0===n.isWebGLRenderTargetCube,l=!0===n.isWebGLMultisampleRenderTarget,u=!0===n.isWebGLMultiviewRenderTarget,v=P(n)||a.isWebGL2;if(h){r.__webglFramebuffer=[];for(var f=0;f<6;f++)r.__webglFramebuffer[f]=t.createFramebuffer()}else if(r.__webglFramebuffer=t.createFramebuffer(),l){if(a.isWebGL2){r.__webglMultisampledFramebuffer=t.createFramebuffer(),r.__webglColorRenderbuffer=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,r.__webglColorRenderbuffer);var m=p(o.convert(n.texture.format),o.convert(n.texture.type)),C=L(n);t.renderbufferStorageMultisample(t.RENDERBUFFER,C,m,n.width,n.height),t.bindFramebuffer(t.FRAMEBUFFER,r.__webglMultisampledFramebuffer),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.RENDERBUFFER,r.__webglColorRenderbuffer),t.bindRenderbuffer(t.RENDERBUFFER,null),n.depthBuffer&&(r.__webglDepthRenderbuffer=t.createRenderbuffer(),I(r.__webglDepthRenderbuffer,n,!0)),t.bindFramebuffer(t.FRAMEBUFFER,null)}}else if(u){var B=n.width,D=n.height,y=n.numViews;t.bindFramebuffer(t.FRAMEBUFFER,r.__webglFramebuffer);var E=e.get("OVR_multiview2");A.memory.textures+=2;var T=t.createTexture();t.bindTexture(t.TEXTURE_2D_ARRAY,T),t.texParameteri(t.TEXTURE_2D_ARRAY,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D_ARRAY,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texImage3D(t.TEXTURE_2D_ARRAY,0,t.RGBA8,B,D,y,0,t.RGBA,t.UNSIGNED_BYTE,null),E.framebufferTextureMultiviewOVR(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,T,0,0,y);var z=t.createTexture();t.bindTexture(t.TEXTURE_2D_ARRAY,z),t.texParameteri(t.TEXTURE_2D_ARRAY,t.TEXTURE_MAG_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D_ARRAY,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texImage3D(t.TEXTURE_2D_ARRAY,0,t.DEPTH24_STENCIL8,B,D,y,0,t.DEPTH_STENCIL,t.UNSIGNED_INT_24_8,null),E.framebufferTextureMultiviewOVR(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,z,0,0,y);var M=new Array(y);for(f=0;fP)return!1;for(var i=1,n=e.length;i=0){var c=r[o];if(void 0!==c){var h=c.normalized,l=c.itemSize,u=R.get(c);if(void 0===u)continue;var v=u.buffer,P=u.type,g=u.bytesPerElement;if(c.isInterleavedBufferAttribute){var d=c.data,p=d.stride,f=c.offset;d&&d.isInstancedInterleavedBuffer?(F.enableAttributeAndDivisor(A,d.meshPerAttribute),void 0===e.maxInstancedCount&&(e.maxInstancedCount=d.meshPerAttribute*d.count)):F.enableAttribute(A),L.bindBuffer(L.ARRAY_BUFFER,v),L.vertexAttribPointer(A,l,P,h,p*g,f*g)}else c.isInstancedBufferAttribute?(F.enableAttributeAndDivisor(A,c.meshPerAttribute),void 0===e.maxInstancedCount&&(e.maxInstancedCount=c.meshPerAttribute*c.count)):F.enableAttribute(A),L.bindBuffer(L.ARRAY_BUFFER,v),L.vertexAttribPointer(A,l,P,h,0,0)}else if("instanceMatrix"===o){var u=R.get(t.instanceMatrix);if(void 0===u)continue;var v=u.buffer,P=u.type;F.enableAttributeAndDivisor(A+0,1),F.enableAttributeAndDivisor(A+1,1),F.enableAttributeAndDivisor(A+2,1),F.enableAttributeAndDivisor(A+3,1),L.bindBuffer(L.ARRAY_BUFFER,v),L.vertexAttribPointer(A+0,4,P,!1,64,0),L.vertexAttribPointer(A+1,4,P,!1,64,16),L.vertexAttribPointer(A+2,4,P,!1,64,32),L.vertexAttribPointer(A+3,4,P,!1,64,48)}else if(void 0!==a){var m=a[o];if(void 0!==m)switch(m.length){case 2:L.vertexAttrib2fv(A,m);break;case 3:L.vertexAttrib3fv(A,m);break;case 4:L.vertexAttrib4fv(A,m);break;default:L.vertexAttrib1fv(A,m)}}}}F.disableUnusedAttributes()}(s,i,r,A),null!==l&&L.bindBuffer(L.ELEMENT_ARRAY_BUFFER,h.buffer));var g=1/0;null!==l?g=l.count:void 0!==u&&(g=u.count);var d=i.drawRange.start*v,p=i.drawRange.count*v,f=null!==a?a.start*v:0,m=null!==a?a.count*v:1/0,w=Math.max(d,f),C=Math.min(g,d+p,f+m)-1,B=Math.max(0,C-w+1);if(0!==B){if(s.isMesh)if(!0===r.wireframe)F.setLineWidth(r.wireframeLinewidth*Et()),P.setMode(L.LINES);else switch(s.drawMode){case n.rc:P.setMode(L.TRIANGLES);break;case n.qc:P.setMode(L.TRIANGLE_STRIP);break;case n.pc:P.setMode(L.TRIANGLE_FAN)}else if(s.isLine){var D=r.linewidth;void 0===D&&(D=1),F.setLineWidth(D*Et()),s.isLineSegments?P.setMode(L.LINES):s.isLineLoop?P.setMode(L.LINE_LOOP):P.setMode(L.LINE_STRIP)}else s.isPoints?P.setMode(L.POINTS):s.isSprite&&P.setMode(L.TRIANGLES);s.isInstancedMesh?P.renderInstances(i,w,B,s.count):i.isInstancedBufferGeometry?P.renderInstances(i,w,B,i.maxInstancedCount):P.render(w,B)}},this.compile=function(t,e){(x=W.get(t,e)).init(),t.traverse(function(t){t.isLight&&(x.pushLight(t),t.castShadow&&x.pushShadow(t))}),x.setupLights(e),t.traverse(function(e){if(e.material)if(Array.isArray(e.material))for(var i=0;i=0&&t.numSupportedMorphTargets++}if(t.morphNormals){t.numSupportedMorphNormals=0;for(g=0;g=0&&t.numSupportedMorphNormals++}var d=n.shader.uniforms;(t.isShaderMaterial||t.isRawShaderMaterial)&&!0!==t.clipping||(n.numClippingPlanes=Ct.numPlanes,n.numIntersection=Ct.numIntersection,d.clippingPlanes=Ct.uniform),n.fog=e,n.needsLights=function(t){return t.isMeshLambertMaterial||t.isMeshPhongMaterial||t.isMeshStandardMaterial||t.isShadowMaterial||t.isShaderMaterial&&!0===t.lights}(t),n.lightsStateVersion=a,n.needsLights&&(d.ambientLightColor.value=r.state.ambient,d.lightProbe.value=r.state.probe,d.directionalLights.value=r.state.directional,d.spotLights.value=r.state.spot,d.rectAreaLights.value=r.state.rectArea,d.pointLights.value=r.state.point,d.hemisphereLights.value=r.state.hemi,d.directionalShadowMap.value=r.state.directionalShadowMap,d.directionalShadowMatrix.value=r.state.directionalShadowMatrix,d.spotShadowMap.value=r.state.spotShadowMap,d.spotShadowMatrix.value=r.state.spotShadowMatrix,d.pointShadowMap.value=r.state.pointShadowMap,d.pointShadowMatrix.value=r.state.pointShadowMatrix);var p=n.program.getUniforms(),f=jt.seqWithValue(p.seq,d);n.uniformsList=f}function Yt(t,e,i,s){Y.resetTextureUnits();var o=O.get(i),A=x.state.lights;if(Bt&&(Dt||t!==ct)){var c=t===ct&&i.id===ot;Ct.setState(i.clippingPlanes,i.clipIntersection,i.clipShadows,t,o,c)}!1===i.needsUpdate&&(void 0===o.program?i.needsUpdate=!0:i.fog&&o.fog!==e?i.needsUpdate=!0:o.needsLights&&o.lightsStateVersion!==A.state.version?i.needsUpdate=!0:void 0===o.numClippingPlanes||o.numClippingPlanes===Ct.numPlanes&&o.numIntersection===Ct.numIntersection||(i.needsUpdate=!0)),i.needsUpdate&&(Ot(i,e,s),i.needsUpdate=!1);var l,u,v=!1,P=!1,g=!1,d=o.program,p=d.getUniforms(),f=o.shader.uniforms;if(F.useProgram(d.program)&&(v=!0,P=!0,g=!0),i.id!==ot&&(ot=i.id,P=!0),v||ct!==t){if(d.numMultiviewViews>0?xt.updateCameraProjectionMatricesUniform(t,p):p.setValue(L,"projectionMatrix",t.projectionMatrix),G.logarithmicDepthBuffer&&p.setValue(L,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),ct!==t&&(ct=t,P=!0,g=!0),i.isShaderMaterial||i.isMeshPhongMaterial||i.isMeshStandardMaterial||i.envMap){var m=p.map.cameraPosition;void 0!==m&&m.setValue(L,bt.setFromMatrixPosition(t.matrixWorld))}(i.isMeshPhongMaterial||i.isMeshLambertMaterial||i.isMeshBasicMaterial||i.isMeshStandardMaterial||i.isShaderMaterial||i.skinning)&&(d.numMultiviewViews>0?xt.updateCameraViewMatricesUniform(t,p):p.setValue(L,"viewMatrix",t.matrixWorldInverse))}if(i.skinning){p.setOptional(L,s,"bindMatrix"),p.setOptional(L,s,"bindMatrixInverse");var w=s.skeleton;if(w){var C=w.bones;if(G.floatVertexTextures){if(void 0===w.boneTexture){var B=Math.sqrt(4*C.length);B=r.a.ceilPowerOfTwo(B),B=Math.max(B,4);var D=new Float32Array(B*B*4);D.set(w.boneMatrices);var y=new a(D,B,B,n.Ab,n.D);w.boneMatrices=D,w.boneTexture=y,w.boneTextureSize=B}p.setValue(L,"boneTexture",w.boneTexture,Y),p.setValue(L,"boneTextureSize",w.boneTextureSize)}else p.setOptional(L,w,"boneMatrices")}}return(P||o.receiveShadow!==s.receiveShadow)&&(o.receiveShadow=s.receiveShadow,p.setValue(L,"receiveShadow",s.receiveShadow)),P&&(p.setValue(L,"toneMappingExposure",tt.toneMappingExposure),p.setValue(L,"toneMappingWhitePoint",tt.toneMappingWhitePoint),o.needsLights&&(u=g,(l=f).ambientLightColor.needsUpdate=u,l.lightProbe.needsUpdate=u,l.directionalLights.needsUpdate=u,l.pointLights.needsUpdate=u,l.spotLights.needsUpdate=u,l.rectAreaLights.needsUpdate=u,l.hemisphereLights.needsUpdate=u),e&&i.fog&&function(t,e){t.fogColor.value.copy(e.color),e.isFog?(t.fogNear.value=e.near,t.fogFar.value=e.far):e.isFogExp2&&(t.fogDensity.value=e.density)}(f,e),i.isMeshBasicMaterial?Rt(f,i):i.isMeshLambertMaterial?(Rt(f,i),function(t,e){e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap)}(f,i)):i.isMeshPhongMaterial?(Rt(f,i),i.isMeshToonMaterial?function(t,e){Nt(t,e),e.gradientMap&&(t.gradientMap.value=e.gradientMap)}(f,i):Nt(f,i)):i.isMeshStandardMaterial?(Rt(f,i),i.isMeshPhysicalMaterial?function(t,e){Ht(t,e),t.reflectivity.value=e.reflectivity,t.clearcoat.value=e.clearcoat,t.clearcoatRoughness.value=e.clearcoatRoughness,e.sheen&&t.sheen.value.copy(e.sheen);e.clearcoatNormalMap&&(t.clearcoatNormalScale.value.copy(e.clearcoatNormalScale),t.clearcoatNormalMap.value=e.clearcoatNormalMap,e.side===n.h&&t.clearcoatNormalScale.value.negate());t.transparency.value=e.transparency}(f,i):Ht(f,i)):i.isMeshMatcapMaterial?(Rt(f,i),function(t,e){e.matcap&&(t.matcap.value=e.matcap);e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,e.side===n.h&&(t.bumpScale.value*=-1));e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),e.side===n.h&&t.normalScale.value.negate());e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(f,i)):i.isMeshDepthMaterial?(Rt(f,i),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(f,i)):i.isMeshDistanceMaterial?(Rt(f,i),function(t,e){e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias);t.referencePosition.value.copy(e.referencePosition),t.nearDistance.value=e.nearDistance,t.farDistance.value=e.farDistance}(f,i)):i.isMeshNormalMaterial?(Rt(f,i),function(t,e){e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,e.side===n.h&&(t.bumpScale.value*=-1));e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),e.side===n.h&&t.normalScale.value.negate());e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}(f,i)):i.isLineBasicMaterial?(function(t,e){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity}(f,i),i.isLineDashedMaterial&&function(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}(f,i)):i.isPointsMaterial?function(t,e){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,t.size.value=e.size*dt,t.scale.value=.5*gt,t.map.value=e.map,null!==e.map&&(!0===e.map.matrixAutoUpdate&&e.map.updateMatrix(),t.uvTransform.value.copy(e.map.matrix))}(f,i):i.isSpriteMaterial?function(t,e){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,t.rotation.value=e.rotation,t.map.value=e.map,null!==e.map&&(!0===e.map.matrixAutoUpdate&&e.map.updateMatrix(),t.uvTransform.value.copy(e.map.matrix))}(f,i):i.isShadowMaterial&&(f.color.value.copy(i.color),f.opacity.value=i.opacity),void 0!==f.ltc_1&&(f.ltc_1.value=h.a.LTC_1),void 0!==f.ltc_2&&(f.ltc_2.value=h.a.LTC_2),jt.upload(L,o.uniformsList,f,Y)),i.isShaderMaterial&&!0===i.uniformsNeedUpdate&&(jt.upload(L,o.uniformsList,f,Y),i.uniformsNeedUpdate=!1),i.isSpriteMaterial&&p.setValue(L,"center",s.center),d.numMultiviewViews>0?xt.updateObjectMatricesUniforms(s,t,p):(p.setValue(L,"modelViewMatrix",s.modelViewMatrix),p.setValue(L,"normalMatrix",s.normalMatrix)),p.setValue(L,"modelMatrix",s.matrixWorld),d}function Rt(t,e){var i;t.opacity.value=e.opacity,e.color&&t.diffuse.value.copy(e.color),e.emissive&&t.emissive.value.copy(e.emissive).multiplyScalar(e.emissiveIntensity),e.map&&(t.map.value=e.map),e.alphaMap&&(t.alphaMap.value=e.alphaMap),e.specularMap&&(t.specularMap.value=e.specularMap),e.envMap&&(t.envMap.value=e.envMap,t.flipEnvMap.value=e.envMap.isCubeTexture?-1:1,t.reflectivity.value=e.reflectivity,t.refractionRatio.value=e.refractionRatio,t.maxMipLevel.value=O.get(e.envMap).__maxMipLevel),e.lightMap&&(t.lightMap.value=e.lightMap,t.lightMapIntensity.value=e.lightMapIntensity),e.aoMap&&(t.aoMap.value=e.aoMap,t.aoMapIntensity.value=e.aoMapIntensity),e.map?i=e.map:e.specularMap?i=e.specularMap:e.displacementMap?i=e.displacementMap:e.normalMap?i=e.normalMap:e.bumpMap?i=e.bumpMap:e.roughnessMap?i=e.roughnessMap:e.metalnessMap?i=e.metalnessMap:e.alphaMap?i=e.alphaMap:e.emissiveMap&&(i=e.emissiveMap),void 0!==i&&(i.isWebGLRenderTarget&&(i=i.texture),!0===i.matrixAutoUpdate&&i.updateMatrix(),t.uvTransform.value.copy(i.matrix))}function Nt(t,e){t.specular.value.copy(e.specular),t.shininess.value=Math.max(e.shininess,1e-4),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,e.side===n.h&&(t.bumpScale.value*=-1)),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),e.side===n.h&&t.normalScale.value.negate()),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias)}function Ht(t,e){t.roughness.value=e.roughness,t.metalness.value=e.metalness,e.roughnessMap&&(t.roughnessMap.value=e.roughnessMap),e.metalnessMap&&(t.metalnessMap.value=e.metalnessMap),e.emissiveMap&&(t.emissiveMap.value=e.emissiveMap),e.bumpMap&&(t.bumpMap.value=e.bumpMap,t.bumpScale.value=e.bumpScale,e.side===n.h&&(t.bumpScale.value*=-1)),e.normalMap&&(t.normalMap.value=e.normalMap,t.normalScale.value.copy(e.normalScale),e.side===n.h&&t.normalScale.value.negate()),e.displacementMap&&(t.displacementMap.value=e.displacementMap,t.displacementScale.value=e.displacementScale,t.displacementBias.value=e.displacementBias),e.envMap&&(t.envMapIntensity.value=e.envMapIntensity)}Gt.setAnimationLoop(function(t){It.isPresenting()||Ut&&Ut(t)}),"undefined"!=typeof window&&Gt.setContext(window),this.setAnimationLoop=function(t){Ut=t,It.setAnimationLoop(t),Gt.start()},this.render=function(t,e){var i,n;if(void 0!==arguments[2]&&(i=arguments[2]),void 0!==arguments[3]&&(n=arguments[3]),e&&e.isCamera&&!et){At.geometry=null,At.program=null,At.wireframe=!1,ot=-1,ct=null,!0===t.autoUpdate&&t.updateMatrixWorld(),null===e.parent&&e.updateMatrixWorld(),It.enabled&&(e=It.getCamera(e)),(x=W.get(t,e)).init(),t.onBeforeRender(tt,t,e,i||st),yt.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),wt.setFromMatrix(yt),Dt=this.localClippingEnabled,Bt=Ct.init(this.clippingPlanes,Dt,e),(I=K.get(t,e)).init(),function t(e,i,n,r){if(!1===e.visible)return;var s=e.layers.test(i.layers);if(s)if(e.isGroup)n=e.renderOrder;else if(e.isLOD)!0===e.autoUpdate&&e.update(i);else if(e.isLight)x.pushLight(e),e.castShadow&&x.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||wt.intersectsSprite(e)){r&&bt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(yt);var a=H.update(e),o=e.material;o.visible&&I.push(e,a,o,n,bt.z,null)}}else if(e.isImmediateRenderObject)r&&bt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(yt),I.push(e,null,e.material,n,bt.z,null);else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.frame!==_.render.frame&&(e.skeleton.update(),e.skeleton.frame=_.render.frame),!e.frustumCulled||wt.intersectsObject(e))){r&&bt.setFromMatrixPosition(e.matrixWorld).applyMatrix4(yt);var a=H.update(e),o=e.material;if(Array.isArray(o))for(var A=a.groups,c=0,h=A.length;c=0&&e<=t.width-r&&i>=0&&i<=t.height-s&&L.readPixels(e,i,r,s,$.convert(l),$.convert(u),a)}finally{c&&L.bindFramebuffer(L.FRAMEBUFFER,at)}}}},this.copyFramebufferToTexture=function(t,e,i){var n=e.image.width,r=e.image.height,s=$.convert(e.format);Y.setTexture2D(e,0),L.copyTexImage2D(L.TEXTURE_2D,i||0,s,t.x,t.y,n,r,0)},this.copyTextureToTexture=function(t,e,i,n){var r=e.image.width,s=e.image.height,a=$.convert(i.format),o=$.convert(i.type);Y.setTexture2D(i,0),e.isDataTexture?L.texSubImage2D(L.TEXTURE_2D,n||0,t.x,t.y,r,s,a,o,e.image.data):L.texSubImage2D(L.TEXTURE_2D,n||0,t.x,t.y,a,o,e.image)},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}Object.assign(Le.prototype,De.a.prototype),Object.assign(ze.prototype,De.a.prototype),i.d(e,"a",function(){return Me})},function(t,e,i){"use strict";var n=i(28),r=i(7),s=i(3),a=i(1),o=i(16),A=i(40);function c(t){this.camera=t,this.bias=0,this.radius=1,this.mapSize=new s.a(512,512),this.map=null,this.mapPass=null,this.matrix=new r.a,this._frustum=new A.a,this._frameExtents=new s.a(1,1),this._viewportCount=1,this._viewports=[new o.a(0,0,1,1)]}Object.assign(c.prototype,{_projScreenMatrix:new r.a,_lightPositionWorld:new a.a,_lookTarget:new a.a,getViewportCount:function(){return this._viewportCount},getFrustum:function(){return this._frustum},updateMatrices:function(t){var e=this.camera,i=this.matrix,n=this._projScreenMatrix,r=this._lookTarget,s=this._lightPositionWorld;s.setFromMatrixPosition(t.matrixWorld),e.position.copy(s),r.setFromMatrixPosition(t.target.matrixWorld),e.lookAt(r),e.updateMatrixWorld(),n.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),this._frustum.setFromMatrix(n),i.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),i.multiply(e.projectionMatrix),i.multiply(e.matrixWorldInverse)},getViewport:function(t){return this._viewports[t]},getFrameExtents:function(){return this._frameExtents},copy:function(t){return this.camera=t.camera.clone(),this.bias=t.bias,this.radius=t.radius,this.mapSize.copy(t.mapSize),this},clone:function(){return(new this.constructor).copy(this)},toJSON:function(){var t={};return 0!==this.bias&&(t.bias=this.bias),1!==this.radius&&(t.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(t.mapSize=this.mapSize.toArray()),t.camera=this.camera.toJSON(!1).object,delete t.camera.matrix,t}});var h=i(53);function l(){c.call(this,new h.a(-5,5,5,-5,.5,500))}l.prototype=Object.assign(Object.create(c.prototype),{constructor:l,isDirectionalLightShadow:!0,updateMatrices:function(t,e,i){c.prototype.updateMatrices.call(this,t,e,i)}});var u=i(5);function v(t,e){n.a.call(this,t,e),this.type="DirectionalLight",this.position.copy(u.a.DefaultUp),this.updateMatrix(),this.target=new u.a,this.shadow=new l}i.d(e,"a",function(){return v}),v.prototype=Object.assign(Object.create(n.a.prototype),{constructor:v,isDirectionalLight:!0,copy:function(t){return n.a.prototype.copy.call(this,t),this.target=t.target.clone(),this.shadow=t.shadow.clone(),this}})},function(t,e,i){"use strict";var n=i(1),r=i(8),s=i(7);function a(){this.type="Curve",this.arcLengthDivisions=200}function o(){var t=0,e=0,i=0,n=0;function r(r,s,a,o){t=r,e=a,i=-3*r+3*s-2*a-o,n=2*r-2*s+a+o}return{initCatmullRom:function(t,e,i,n,s){r(e,i,s*(i-t),s*(n-e))},initNonuniformCatmullRom:function(t,e,i,n,s,a,o){var A=(e-t)/s-(i-t)/(s+a)+(i-e)/a,c=(i-e)/a-(n-e)/(a+o)+(n-i)/o;r(e,i,A*=a,c*=a)},calc:function(r){var s=r*r;return t+e*r+i*s+n*(s*r)}}}Object.assign(a.prototype,{getPoint:function(){return null},getPointAt:function(t,e){var i=this.getUtoTmapping(t);return this.getPoint(i,e)},getPoints:function(t){void 0===t&&(t=5);for(var e=[],i=0;i<=t;i++)e.push(this.getPoint(i/t));return e},getSpacedPoints:function(t){void 0===t&&(t=5);for(var e=[],i=0;i<=t;i++)e.push(this.getPointAt(i/t));return e},getLength:function(){var t=this.getLengths();return t[t.length-1]},getLengths:function(t){if(void 0===t&&(t=this.arcLengthDivisions),this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;var e,i,n=[],r=this.getPoint(0),s=0;for(n.push(0),i=1;i<=t;i++)s+=(e=this.getPoint(i/t)).distanceTo(r),n.push(s),r=e;return this.cacheArcLengths=n,n},updateArcLengths:function(){this.needsUpdate=!0,this.getLengths()},getUtoTmapping:function(t,e){var i,n=this.getLengths(),r=0,s=n.length;i=e||t*n[s-1];for(var a,o=0,A=s-1;o<=A;)if((a=n[r=Math.floor(o+(A-o)/2)]-i)<0)o=r+1;else{if(!(a>0)){A=r;break}A=r-1}if(n[r=A]===i)return r/(s-1);var c=n[r];return(r+(i-c)/(n[r+1]-c))/(s-1)},getTangent:function(t){var e=t-1e-4,i=t+1e-4;e<0&&(e=0),i>1&&(i=1);var n=this.getPoint(e);return this.getPoint(i).clone().sub(n).normalize()},getTangentAt:function(t){var e=this.getUtoTmapping(t);return this.getTangent(e)},computeFrenetFrames:function(t,e){var i,a,o,A=new n.a,c=[],h=[],l=[],u=new n.a,v=new s.a;for(i=0;i<=t;i++)a=i/t,c[i]=this.getTangentAt(a),c[i].normalize();h[0]=new n.a,l[0]=new n.a;var P=Number.MAX_VALUE,g=Math.abs(c[0].x),d=Math.abs(c[0].y),p=Math.abs(c[0].z);for(g<=P&&(P=g,A.set(1,0,0)),d<=P&&(P=d,A.set(0,1,0)),p<=P&&A.set(0,0,1),u.crossVectors(c[0],A).normalize(),h[0].crossVectors(c[0],u),l[0].crossVectors(c[0],h[0]),i=1;i<=t;i++)h[i]=h[i-1].clone(),l[i]=l[i-1].clone(),u.crossVectors(c[i-1],c[i]),u.length()>Number.EPSILON&&(u.normalize(),o=Math.acos(r.a.clamp(c[i-1].dot(c[i]),-1,1)),h[i].applyMatrix4(v.makeRotationAxis(u,o))),l[i].crossVectors(c[i],h[i]);if(!0===e)for(o=Math.acos(r.a.clamp(h[0].dot(h[t]),-1,1)),o/=t,c[0].dot(u.crossVectors(h[0],h[t]))>0&&(o=-o),i=1;i<=t;i++)h[i].applyMatrix4(v.makeRotationAxis(c[i],o*i)),l[i].crossVectors(c[i],h[i]);return{tangents:c,normals:h,binormals:l}},clone:function(){return(new this.constructor).copy(this)},copy:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this},toJSON:function(){var t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t},fromJSON:function(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}),i.d(e,"a",function(){return u});var A=new n.a,c=new o,h=new o,l=new o;function u(t,e,i,n){a.call(this),this.type="CatmullRomCurve3",this.points=t||[],this.closed=e||!1,this.curveType=i||"centripetal",this.tension=n||.5}u.prototype=Object.create(a.prototype),u.prototype.constructor=u,u.prototype.isCatmullRomCurve3=!0,u.prototype.getPoint=function(t,e){var i,r,s,a,o=e||new n.a,u=this.points,v=u.length,P=(v-(this.closed?0:1))*t,g=Math.floor(P),d=P-g;if(this.closed?g+=g>0?0:(Math.floor(Math.abs(g)/v)+1)*v:0===d&&g===v-1&&(g=v-2,d=1),this.closed||g>0?i=u[(g-1)%v]:(A.subVectors(u[0],u[1]).add(u[0]),i=A),r=u[g%v],s=u[(g+1)%v],this.closed||g+2