diff --git a/console/ui/dist/index.html b/console/ui/dist/index.html index 23f45392f..8561e4293 100644 --- a/console/ui/dist/index.html +++ b/console/ui/dist/index.html @@ -10,5 +10,5 @@ - + diff --git a/console/ui/dist/static/main.8ba0af2f5b7c1546f25b.js b/console/ui/dist/static/main.695001f2f04b0d8e5c57.js similarity index 99% rename from console/ui/dist/static/main.8ba0af2f5b7c1546f25b.js rename to console/ui/dist/static/main.695001f2f04b0d8e5c57.js index 6161b68c5..0f4e9c551 100644 --- a/console/ui/dist/static/main.8ba0af2f5b7c1546f25b.js +++ b/console/ui/dist/static/main.695001f2f04b0d8e5c57.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{"+U4B":function(t,e,n){var i;i=function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}return n.m=t,n.c=e,n.p="",n(0)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(3),s=n(8),o=n(15);function a(t,e,n){var o=null,a=function(t,e){n&&n(t,e),o&&o.visit(t,e)},l="function"==typeof n?a:null,c=!1;if(e){var u="boolean"==typeof e.attachComment&&e.attachComment;((c="boolean"==typeof e.comment&&e.comment)||u)&&((o=new i.CommentHandler).attach=u,e.comment=!0,l=a)}var h,d=!1;e&&"string"==typeof e.sourceType&&(d="module"===e.sourceType),h=e&&"boolean"==typeof e.jsx&&e.jsx?new r.JSXParser(t,e,l):new s.Parser(t,e,l);var f=d?h.parseModule():h.parseScript();return c&&o&&(f.comments=o.comments),h.config.tokens&&(f.tokens=h.tokens),h.config.tolerant&&(f.errors=h.errorHandler.errors),f}e.parse=a,e.parseModule=function(t,e,n){var i=e||{};return i.sourceType="module",a(t,i,n)},e.parseScript=function(t,e,n){var i=e||{};return i.sourceType="script",a(t,i,n)},e.tokenize=function(t,e,n){var i,r=new o.Tokenizer(t,e);i=[];try{for(;;){var s=r.getNextToken();if(!s)break;n&&(s=n(s)),i.push(s)}}catch(a){r.errorHandler.tolerate(a)}return r.errorHandler.tolerant&&(i.errors=r.errors()),i};var l=n(2);e.Syntax=l.Syntax,e.version="4.0.1"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),r=function(){function t(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return t.prototype.insertInnerComments=function(t,e){if(t.type===i.Syntax.BlockStatement&&0===t.body.length){for(var n=[],r=this.leading.length-1;r>=0;--r){var s=this.leading[r];e.end.offset>=s.start&&(n.unshift(s.comment),this.leading.splice(r,1),this.trailing.splice(r,1))}n.length&&(t.innerComments=n)}},t.prototype.findTrailingComments=function(t){var e=[];if(this.trailing.length>0){for(var n=this.trailing.length-1;n>=0;--n){var i=this.trailing[n];i.start>=t.end.offset&&e.unshift(i.comment)}return this.trailing.length=0,e}var r=this.stack[this.stack.length-1];if(r&&r.node.trailingComments){var s=r.node.trailingComments[0];s&&s.range[0]>=t.end.offset&&(e=r.node.trailingComments,delete r.node.trailingComments)}return e},t.prototype.findLeadingComments=function(t){for(var e,n=[];this.stack.length>0&&(s=this.stack[this.stack.length-1])&&s.start>=t.start.offset;)e=s.node,this.stack.pop();if(e){for(var i=(e.leadingComments?e.leadingComments.length:0)-1;i>=0;--i){var r=e.leadingComments[i];r.range[1]<=t.start.offset&&(n.unshift(r),e.leadingComments.splice(i,1))}return e.leadingComments&&0===e.leadingComments.length&&delete e.leadingComments,n}for(i=this.leading.length-1;i>=0;--i){var s;(s=this.leading[i]).start<=t.start.offset&&(n.unshift(s.comment),this.leading.splice(i,1))}return n},t.prototype.visitNode=function(t,e){if(!(t.type===i.Syntax.Program&&t.body.length>0)){this.insertInnerComments(t,e);var n=this.findTrailingComments(e),r=this.findLeadingComments(e);r.length>0&&(t.leadingComments=r),n.length>0&&(t.trailingComments=n),this.stack.push({node:t,start:e.start.offset})}},t.prototype.visitComment=function(t,e){var n="L"===t.type[0]?"Line":"Block",i={type:n,value:t.value};if(t.range&&(i.range=t.range),t.loc&&(i.loc=t.loc),this.comments.push(i),this.attach){var r={comment:{type:n,value:t.value,range:[e.start.offset,e.end.offset]},start:e.start.offset};t.loc&&(r.comment.loc=t.loc),t.type=n,this.leading.push(r),this.trailing.push(r)}},t.prototype.visit=function(t,e){"LineComment"===t.type||"BlockComment"===t.type?this.visitComment(t,e):this.attach&&this.visitNode(t,e)},t}();e.CommentHandler=r},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var s=n(4),o=n(5),a=n(6),l=n(7),c=n(8),u=n(13),h=n(14);function d(t){var e;switch(t.type){case a.JSXSyntax.JSXIdentifier:e=t.name;break;case a.JSXSyntax.JSXNamespacedName:var n=t;e=d(n.namespace)+":"+d(n.name);break;case a.JSXSyntax.JSXMemberExpression:var i=t;e=d(i.object)+"."+d(i.property)}return e}u.TokenName[100]="JSXIdentifier",u.TokenName[101]="JSXText";var f=function(t){function e(e,n,i){return t.call(this,e,n,i)||this}return r(e,t),e.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():t.prototype.parsePrimaryExpression.call(this)},e.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},e.prototype.finishJSX=function(){this.nextToken()},e.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},e.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},e.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},e.prototype.scanXHTMLEntity=function(t){for(var e="&",n=!0,i=!1,r=!1,o=!1;!this.scanner.eof()&&n&&!i;){var a=this.scanner.source[this.scanner.index];if(a===t)break;if(i=";"===a,e+=a,++this.scanner.index,!i)switch(e.length){case 2:r="#"===a;break;case 3:r&&(n=(o="x"===a)||s.Character.isDecimalDigit(a.charCodeAt(0)),r=r&&!o);break;default:n=(n=n&&!(r&&!s.Character.isDecimalDigit(a.charCodeAt(0))))&&!(o&&!s.Character.isHexDigit(a.charCodeAt(0)))}}if(n&&i&&e.length>2){var l=e.substr(1,e.length-2);r&&l.length>1?e=String.fromCharCode(parseInt(l.substr(1),10)):o&&l.length>2?e=String.fromCharCode(parseInt("0"+l.substr(1),16)):r||o||!h.XHTMLEntities[l]||(e=h.XHTMLEntities[l])}return e},e.prototype.lexJSX=function(){var t=this.scanner.source.charCodeAt(this.scanner.index);if(60===t||62===t||47===t||58===t||61===t||123===t||125===t)return{type:7,value:r=this.scanner.source[this.scanner.index++],lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index};if(34===t||39===t){for(var e=this.scanner.index,n=this.scanner.source[this.scanner.index++],i="";!this.scanner.eof()&&(l=this.scanner.source[this.scanner.index++])!==n;)i+="&"===l?this.scanXHTMLEntity(n):l;return{type:8,value:i,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index}}if(46===t){var r,o=this.scanner.source.charCodeAt(this.scanner.index+1),a=this.scanner.source.charCodeAt(this.scanner.index+2);return e=this.scanner.index,this.scanner.index+=(r=46===o&&46===a?"...":".").length,{type:7,value:r,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index}}if(96===t)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(s.Character.isIdentifierStart(t)&&92!==t){for(e=this.scanner.index,++this.scanner.index;!this.scanner.eof();){var l=this.scanner.source.charCodeAt(this.scanner.index);if(s.Character.isIdentifierPart(l)&&92!==l)++this.scanner.index;else{if(45!==l)break;++this.scanner.index}}return{type:100,value:this.scanner.source.slice(e,this.scanner.index),lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index}}return this.scanner.lex()},e.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var t=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(t)),t},e.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var t=this.scanner.index,e="";!this.scanner.eof();){var n=this.scanner.source[this.scanner.index];if("{"===n||"<"===n)break;++this.scanner.index,e+=n,s.Character.isLineTerminator(n.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===n&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var i={type:101,value:e,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index};return e.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(i)),i},e.prototype.peekJSXToken=function(){var t=this.scanner.saveState();this.scanner.scanComments();var e=this.lexJSX();return this.scanner.restoreState(t),e},e.prototype.expectJSX=function(t){var e=this.nextJSXToken();7===e.type&&e.value===t||this.throwUnexpectedToken(e)},e.prototype.matchJSX=function(t){var e=this.peekJSXToken();return 7===e.type&&e.value===t},e.prototype.parseJSXIdentifier=function(){var t=this.createJSXNode(),e=this.nextJSXToken();return 100!==e.type&&this.throwUnexpectedToken(e),this.finalize(t,new o.JSXIdentifier(e.value))},e.prototype.parseJSXElementName=function(){var t=this.createJSXNode(),e=this.parseJSXIdentifier();if(this.matchJSX(":")){var n=e;this.expectJSX(":");var i=this.parseJSXIdentifier();e=this.finalize(t,new o.JSXNamespacedName(n,i))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var r=e;this.expectJSX(".");var s=this.parseJSXIdentifier();e=this.finalize(t,new o.JSXMemberExpression(r,s))}return e},e.prototype.parseJSXAttributeName=function(){var t,e=this.createJSXNode(),n=this.parseJSXIdentifier();if(this.matchJSX(":")){var i=n;this.expectJSX(":");var r=this.parseJSXIdentifier();t=this.finalize(e,new o.JSXNamespacedName(i,r))}else t=n;return t},e.prototype.parseJSXStringLiteralAttribute=function(){var t=this.createJSXNode(),e=this.nextJSXToken();8!==e.type&&this.throwUnexpectedToken(e);var n=this.getTokenRaw(e);return this.finalize(t,new l.Literal(e.value,n))},e.prototype.parseJSXExpressionAttribute=function(){var t=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var e=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(t,new o.JSXExpressionContainer(e))},e.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},e.prototype.parseJSXNameValueAttribute=function(){var t=this.createJSXNode(),e=this.parseJSXAttributeName(),n=null;return this.matchJSX("=")&&(this.expectJSX("="),n=this.parseJSXAttributeValue()),this.finalize(t,new o.JSXAttribute(e,n))},e.prototype.parseJSXSpreadAttribute=function(){var t=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var e=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(t,new o.JSXSpreadAttribute(e))},e.prototype.parseJSXAttributes=function(){for(var t=[];!this.matchJSX("/")&&!this.matchJSX(">");){var e=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();t.push(e)}return t},e.prototype.parseJSXOpeningElement=function(){var t=this.createJSXNode();this.expectJSX("<");var e=this.parseJSXElementName(),n=this.parseJSXAttributes(),i=this.matchJSX("/");return i&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(t,new o.JSXOpeningElement(e,i,n))},e.prototype.parseJSXBoundaryElement=function(){var t=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var e=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(t,new o.JSXClosingElement(e))}var n=this.parseJSXElementName(),i=this.parseJSXAttributes(),r=this.matchJSX("/");return r&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(t,new o.JSXOpeningElement(n,r,i))},e.prototype.parseJSXEmptyExpression=function(){var t=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(t,new o.JSXEmptyExpression)},e.prototype.parseJSXExpressionContainer=function(){var t,e=this.createJSXNode();return this.expectJSX("{"),this.matchJSX("}")?(t=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),t=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(e,new o.JSXExpressionContainer(t))},e.prototype.parseJSXChildren=function(){for(var t=[];!this.scanner.eof();){var e=this.createJSXChildNode(),n=this.nextJSXText();if(n.start0))break;s=this.finalize(t.node,new o.JSXElement(t.opening,t.children,t.closing)),(t=e[e.length-1]).children.push(s),e.pop()}}return t},e.prototype.parseJSXElement=function(){var t=this.createJSXNode(),e=this.parseJSXOpeningElement(),n=[],i=null;if(!e.selfClosing){var r=this.parseComplexJSXElement({node:t,opening:e,closing:i,children:n});n=r.children,i=r.closing}return this.finalize(t,new o.JSXElement(e,n,i))},e.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var t=this.parseJSXElement();return this.finishJSX(),t},e.prototype.isStartOfExpression=function(){return t.prototype.isStartOfExpression.call(this)||this.match("<")},e}(c.Parser);e.JSXParser=f},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};e.Character={fromCodePoint:function(t){return t<65536?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10))+String.fromCharCode(56320+(t-65536&1023))},isWhiteSpace:function(t){return 32===t||9===t||11===t||12===t||160===t||t>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(t)>=0},isLineTerminator:function(t){return 10===t||13===t||8232===t||8233===t},isIdentifierStart:function(t){return 36===t||95===t||t>=65&&t<=90||t>=97&&t<=122||92===t||t>=128&&n.NonAsciiIdentifierStart.test(e.Character.fromCodePoint(t))},isIdentifierPart:function(t){return 36===t||95===t||t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||92===t||t>=128&&n.NonAsciiIdentifierPart.test(e.Character.fromCodePoint(t))},isDecimalDigit:function(t){return t>=48&&t<=57},isHexDigit:function(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102},isOctalDigit:function(t){return t>=48&&t<=55}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(6);e.JSXClosingElement=function(t){this.type=i.JSXSyntax.JSXClosingElement,this.name=t},e.JSXElement=function(t,e,n){this.type=i.JSXSyntax.JSXElement,this.openingElement=t,this.children=e,this.closingElement=n},e.JSXEmptyExpression=function(){this.type=i.JSXSyntax.JSXEmptyExpression},e.JSXExpressionContainer=function(t){this.type=i.JSXSyntax.JSXExpressionContainer,this.expression=t},e.JSXIdentifier=function(t){this.type=i.JSXSyntax.JSXIdentifier,this.name=t},e.JSXMemberExpression=function(t,e){this.type=i.JSXSyntax.JSXMemberExpression,this.object=t,this.property=e},e.JSXAttribute=function(t,e){this.type=i.JSXSyntax.JSXAttribute,this.name=t,this.value=e},e.JSXNamespacedName=function(t,e){this.type=i.JSXSyntax.JSXNamespacedName,this.namespace=t,this.name=e},e.JSXOpeningElement=function(t,e,n){this.type=i.JSXSyntax.JSXOpeningElement,this.name=t,this.selfClosing=e,this.attributes=n},e.JSXSpreadAttribute=function(t){this.type=i.JSXSyntax.JSXSpreadAttribute,this.argument=t},e.JSXText=function(t,e){this.type=i.JSXSyntax.JSXText,this.value=t,this.raw=e}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(2);e.ArrayExpression=function(t){this.type=i.Syntax.ArrayExpression,this.elements=t},e.ArrayPattern=function(t){this.type=i.Syntax.ArrayPattern,this.elements=t},e.ArrowFunctionExpression=function(t,e,n){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=t,this.body=e,this.generator=!1,this.expression=n,this.async=!1},e.AssignmentExpression=function(t,e,n){this.type=i.Syntax.AssignmentExpression,this.operator=t,this.left=e,this.right=n},e.AssignmentPattern=function(t,e){this.type=i.Syntax.AssignmentPattern,this.left=t,this.right=e},e.AsyncArrowFunctionExpression=function(t,e,n){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=t,this.body=e,this.generator=!1,this.expression=n,this.async=!0},e.AsyncFunctionDeclaration=function(t,e,n){this.type=i.Syntax.FunctionDeclaration,this.id=t,this.params=e,this.body=n,this.generator=!1,this.expression=!1,this.async=!0},e.AsyncFunctionExpression=function(t,e,n){this.type=i.Syntax.FunctionExpression,this.id=t,this.params=e,this.body=n,this.generator=!1,this.expression=!1,this.async=!0},e.AwaitExpression=function(t){this.type=i.Syntax.AwaitExpression,this.argument=t},e.BinaryExpression=function(t,e,n){this.type="||"===t||"&&"===t?i.Syntax.LogicalExpression:i.Syntax.BinaryExpression,this.operator=t,this.left=e,this.right=n},e.BlockStatement=function(t){this.type=i.Syntax.BlockStatement,this.body=t},e.BreakStatement=function(t){this.type=i.Syntax.BreakStatement,this.label=t},e.CallExpression=function(t,e){this.type=i.Syntax.CallExpression,this.callee=t,this.arguments=e},e.CatchClause=function(t,e){this.type=i.Syntax.CatchClause,this.param=t,this.body=e},e.ClassBody=function(t){this.type=i.Syntax.ClassBody,this.body=t},e.ClassDeclaration=function(t,e,n){this.type=i.Syntax.ClassDeclaration,this.id=t,this.superClass=e,this.body=n},e.ClassExpression=function(t,e,n){this.type=i.Syntax.ClassExpression,this.id=t,this.superClass=e,this.body=n},e.ComputedMemberExpression=function(t,e){this.type=i.Syntax.MemberExpression,this.computed=!0,this.object=t,this.property=e},e.ConditionalExpression=function(t,e,n){this.type=i.Syntax.ConditionalExpression,this.test=t,this.consequent=e,this.alternate=n},e.ContinueStatement=function(t){this.type=i.Syntax.ContinueStatement,this.label=t},e.DebuggerStatement=function(){this.type=i.Syntax.DebuggerStatement},e.Directive=function(t,e){this.type=i.Syntax.ExpressionStatement,this.expression=t,this.directive=e},e.DoWhileStatement=function(t,e){this.type=i.Syntax.DoWhileStatement,this.body=t,this.test=e},e.EmptyStatement=function(){this.type=i.Syntax.EmptyStatement},e.ExportAllDeclaration=function(t){this.type=i.Syntax.ExportAllDeclaration,this.source=t},e.ExportDefaultDeclaration=function(t){this.type=i.Syntax.ExportDefaultDeclaration,this.declaration=t},e.ExportNamedDeclaration=function(t,e,n){this.type=i.Syntax.ExportNamedDeclaration,this.declaration=t,this.specifiers=e,this.source=n},e.ExportSpecifier=function(t,e){this.type=i.Syntax.ExportSpecifier,this.exported=e,this.local=t},e.ExpressionStatement=function(t){this.type=i.Syntax.ExpressionStatement,this.expression=t},e.ForInStatement=function(t,e,n){this.type=i.Syntax.ForInStatement,this.left=t,this.right=e,this.body=n,this.each=!1},e.ForOfStatement=function(t,e,n){this.type=i.Syntax.ForOfStatement,this.left=t,this.right=e,this.body=n},e.ForStatement=function(t,e,n,r){this.type=i.Syntax.ForStatement,this.init=t,this.test=e,this.update=n,this.body=r},e.FunctionDeclaration=function(t,e,n,r){this.type=i.Syntax.FunctionDeclaration,this.id=t,this.params=e,this.body=n,this.generator=r,this.expression=!1,this.async=!1},e.FunctionExpression=function(t,e,n,r){this.type=i.Syntax.FunctionExpression,this.id=t,this.params=e,this.body=n,this.generator=r,this.expression=!1,this.async=!1},e.Identifier=function(t){this.type=i.Syntax.Identifier,this.name=t},e.IfStatement=function(t,e,n){this.type=i.Syntax.IfStatement,this.test=t,this.consequent=e,this.alternate=n},e.ImportDeclaration=function(t,e){this.type=i.Syntax.ImportDeclaration,this.specifiers=t,this.source=e},e.ImportDefaultSpecifier=function(t){this.type=i.Syntax.ImportDefaultSpecifier,this.local=t},e.ImportNamespaceSpecifier=function(t){this.type=i.Syntax.ImportNamespaceSpecifier,this.local=t},e.ImportSpecifier=function(t,e){this.type=i.Syntax.ImportSpecifier,this.local=t,this.imported=e},e.LabeledStatement=function(t,e){this.type=i.Syntax.LabeledStatement,this.label=t,this.body=e},e.Literal=function(t,e){this.type=i.Syntax.Literal,this.value=t,this.raw=e},e.MetaProperty=function(t,e){this.type=i.Syntax.MetaProperty,this.meta=t,this.property=e},e.MethodDefinition=function(t,e,n,r,s){this.type=i.Syntax.MethodDefinition,this.key=t,this.computed=e,this.value=n,this.kind=r,this.static=s},e.Module=function(t){this.type=i.Syntax.Program,this.body=t,this.sourceType="module"},e.NewExpression=function(t,e){this.type=i.Syntax.NewExpression,this.callee=t,this.arguments=e},e.ObjectExpression=function(t){this.type=i.Syntax.ObjectExpression,this.properties=t},e.ObjectPattern=function(t){this.type=i.Syntax.ObjectPattern,this.properties=t},e.Property=function(t,e,n,r,s,o){this.type=i.Syntax.Property,this.key=e,this.computed=n,this.value=r,this.kind=t,this.method=s,this.shorthand=o},e.RegexLiteral=function(t,e,n,r){this.type=i.Syntax.Literal,this.value=t,this.raw=e,this.regex={pattern:n,flags:r}},e.RestElement=function(t){this.type=i.Syntax.RestElement,this.argument=t},e.ReturnStatement=function(t){this.type=i.Syntax.ReturnStatement,this.argument=t},e.Script=function(t){this.type=i.Syntax.Program,this.body=t,this.sourceType="script"},e.SequenceExpression=function(t){this.type=i.Syntax.SequenceExpression,this.expressions=t},e.SpreadElement=function(t){this.type=i.Syntax.SpreadElement,this.argument=t},e.StaticMemberExpression=function(t,e){this.type=i.Syntax.MemberExpression,this.computed=!1,this.object=t,this.property=e},e.Super=function(){this.type=i.Syntax.Super},e.SwitchCase=function(t,e){this.type=i.Syntax.SwitchCase,this.test=t,this.consequent=e},e.SwitchStatement=function(t,e){this.type=i.Syntax.SwitchStatement,this.discriminant=t,this.cases=e},e.TaggedTemplateExpression=function(t,e){this.type=i.Syntax.TaggedTemplateExpression,this.tag=t,this.quasi=e},e.TemplateElement=function(t,e){this.type=i.Syntax.TemplateElement,this.value=t,this.tail=e},e.TemplateLiteral=function(t,e){this.type=i.Syntax.TemplateLiteral,this.quasis=t,this.expressions=e},e.ThisExpression=function(){this.type=i.Syntax.ThisExpression},e.ThrowStatement=function(t){this.type=i.Syntax.ThrowStatement,this.argument=t},e.TryStatement=function(t,e,n){this.type=i.Syntax.TryStatement,this.block=t,this.handler=e,this.finalizer=n},e.UnaryExpression=function(t,e){this.type=i.Syntax.UnaryExpression,this.operator=t,this.argument=e,this.prefix=!0},e.UpdateExpression=function(t,e,n){this.type=i.Syntax.UpdateExpression,this.operator=t,this.argument=e,this.prefix=n},e.VariableDeclaration=function(t,e){this.type=i.Syntax.VariableDeclaration,this.declarations=t,this.kind=e},e.VariableDeclarator=function(t,e){this.type=i.Syntax.VariableDeclarator,this.id=t,this.init=e},e.WhileStatement=function(t,e){this.type=i.Syntax.WhileStatement,this.test=t,this.body=e},e.WithStatement=function(t,e){this.type=i.Syntax.WithStatement,this.object=t,this.body=e},e.YieldExpression=function(t,e){this.type=i.Syntax.YieldExpression,this.argument=t,this.delegate=e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(9),r=n(10),s=n(11),o=n(7),a=n(12),l=n(2),c=n(13),u="ArrowParameterPlaceHolder",h=function(){function t(t,e,n){void 0===e&&(e={}),this.config={range:"boolean"==typeof e.range&&e.range,loc:"boolean"==typeof e.loc&&e.loc,source:null,tokens:"boolean"==typeof e.tokens&&e.tokens,comment:"boolean"==typeof e.comment&&e.comment,tolerant:"boolean"==typeof e.tolerant&&e.tolerant},this.config.loc&&e.source&&null!==e.source&&(this.config.source=String(e.source)),this.delegate=n,this.errorHandler=new r.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new a.Scanner(t,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return t.prototype.throwError=function(t){for(var e=[],n=1;n0&&this.delegate)for(var e=0;e>="===t||">>>="===t||"&="===t||"^="===t||"|="===t},t.prototype.isolateCoverGrammar=function(t){var e=this.context.isBindingElement,n=this.context.isAssignmentTarget,i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var r=t.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=e,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=i,r},t.prototype.inheritCoverGrammar=function(t){var e=this.context.isBindingElement,n=this.context.isAssignmentTarget,i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var r=t.call(this);return this.context.isBindingElement=this.context.isBindingElement&&e,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=i||this.context.firstCoverInitializedNameError,r},t.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(2===this.lookahead.type||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},t.prototype.parsePrimaryExpression=function(){var t,e,n,i=this.createNode();switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),t=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(i,new o.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,s.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,e=this.nextToken(),n=this.getTokenRaw(e),t=this.finalize(i,new o.Literal(e.value,n));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,e=this.nextToken(),n=this.getTokenRaw(e),t=this.finalize(i,new o.Literal("true"===e.value,n));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,e=this.nextToken(),n=this.getTokenRaw(e),t=this.finalize(i,new o.Literal(null,n));break;case 10:t=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,t=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":t=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":t=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,e=this.nextRegexToken(),n=this.getTokenRaw(e),t=this.finalize(i,new o.RegexLiteral(e.regex,n,e.pattern,e.flags));break;default:t=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?t=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?t=this.finalize(i,new o.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?t=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),t=this.finalize(i,new o.ThisExpression)):t=this.matchKeyword("class")?this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:t=this.throwUnexpectedToken(this.nextToken())}return t},t.prototype.parseSpreadElement=function(){var t=this.createNode();this.expect("...");var e=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(t,new o.SpreadElement(e))},t.prototype.parseArrayInitializer=function(){var t=this.createNode(),e=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),e.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),e.push(n)}else e.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(t,new o.ArrayExpression(e))},t.prototype.parsePropertyMethod=function(t){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var e=this.context.strict,n=this.context.allowStrictDirective;this.context.allowStrictDirective=t.simple;var i=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&t.firstRestricted&&this.tolerateUnexpectedToken(t.firstRestricted,t.message),this.context.strict&&t.stricted&&this.tolerateUnexpectedToken(t.stricted,t.message),this.context.strict=e,this.context.allowStrictDirective=n,i},t.prototype.parsePropertyMethodFunction=function(){var t=this.createNode(),e=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters(),i=this.parsePropertyMethod(n);return this.context.allowYield=e,this.finalize(t,new o.FunctionExpression(null,n.params,i,!1))},t.prototype.parsePropertyMethodAsyncFunction=function(){var t=this.createNode(),e=this.context.allowYield,n=this.context.await;this.context.allowYield=!1,this.context.await=!0;var i=this.parseFormalParameters(),r=this.parsePropertyMethod(i);return this.context.allowYield=e,this.context.await=n,this.finalize(t,new o.AsyncFunctionExpression(null,i.params,r))},t.prototype.parseObjectPropertyKey=function(){var t,e=this.createNode(),n=this.nextToken();switch(n.type){case 8:case 6:this.context.strict&&n.octal&&this.tolerateUnexpectedToken(n,s.Messages.StrictOctalLiteral);var i=this.getTokenRaw(n);t=this.finalize(e,new o.Literal(n.value,i));break;case 3:case 1:case 5:case 4:t=this.finalize(e,new o.Identifier(n.value));break;case 7:"["===n.value?(t=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):t=this.throwUnexpectedToken(n);break;default:t=this.throwUnexpectedToken(n)}return t},t.prototype.isPropertyKey=function(t,e){return t.type===l.Syntax.Identifier&&t.name===e||t.type===l.Syntax.Literal&&t.value===e},t.prototype.parseObjectProperty=function(t){var e,n=this.createNode(),i=this.lookahead,r=null,a=null,l=!1,c=!1,u=!1,h=!1;if(3===i.type){var d=i.value;this.nextToken(),l=this.match("["),r=(h=!(this.hasLineTerminator||"async"!==d||this.match(":")||this.match("(")||this.match("*")||this.match(",")))?this.parseObjectPropertyKey():this.finalize(n,new o.Identifier(d))}else this.match("*")?this.nextToken():(l=this.match("["),r=this.parseObjectPropertyKey());var f=this.qualifiedPropertyName(this.lookahead);if(3===i.type&&!h&&"get"===i.value&&f)e="get",l=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,a=this.parseGetterMethod();else if(3===i.type&&!h&&"set"===i.value&&f)e="set",l=this.match("["),r=this.parseObjectPropertyKey(),a=this.parseSetterMethod();else if(7===i.type&&"*"===i.value&&f)e="init",l=this.match("["),r=this.parseObjectPropertyKey(),a=this.parseGeneratorMethod(),c=!0;else if(r||this.throwUnexpectedToken(this.lookahead),e="init",this.match(":")&&!h)!l&&this.isPropertyKey(r,"__proto__")&&(t.value&&this.tolerateError(s.Messages.DuplicateProtoProperty),t.value=!0),this.nextToken(),a=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))a=h?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),c=!0;else if(3===i.type)if(d=this.finalize(n,new o.Identifier(i.value)),this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),u=!0;var p=this.isolateCoverGrammar(this.parseAssignmentExpression);a=this.finalize(n,new o.AssignmentPattern(d,p))}else u=!0,a=d;else this.throwUnexpectedToken(this.nextToken());return this.finalize(n,new o.Property(e,r,l,a,c,u))},t.prototype.parseObjectInitializer=function(){var t=this.createNode();this.expect("{");for(var e=[],n={value:!1};!this.match("}");)e.push(this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(t,new o.ObjectExpression(e))},t.prototype.parseTemplateHead=function(){i.assert(this.lookahead.head,"Template literal must start with a template head");var t=this.createNode(),e=this.nextToken();return this.finalize(t,new o.TemplateElement({raw:e.value,cooked:e.cooked},e.tail))},t.prototype.parseTemplateElement=function(){10!==this.lookahead.type&&this.throwUnexpectedToken();var t=this.createNode(),e=this.nextToken();return this.finalize(t,new o.TemplateElement({raw:e.value,cooked:e.cooked},e.tail))},t.prototype.parseTemplateLiteral=function(){var t=this.createNode(),e=[],n=[],i=this.parseTemplateHead();for(n.push(i);!i.tail;)e.push(this.parseExpression()),i=this.parseTemplateElement(),n.push(i);return this.finalize(t,new o.TemplateLiteral(n,e))},t.prototype.reinterpretExpressionAsPattern=function(t){switch(t.type){case l.Syntax.Identifier:case l.Syntax.MemberExpression:case l.Syntax.RestElement:case l.Syntax.AssignmentPattern:break;case l.Syntax.SpreadElement:t.type=l.Syntax.RestElement,this.reinterpretExpressionAsPattern(t.argument);break;case l.Syntax.ArrayExpression:t.type=l.Syntax.ArrayPattern;for(var e=0;e")||this.expect("=>"),t={type:u,params:[],async:!1};else{var e=this.lookahead,n=[];if(this.match("..."))t=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),t={type:u,params:[t],async:!1};else{var i=!1;if(this.context.isBindingElement=!0,t=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var r=[];for(this.context.isAssignmentTarget=!1,r.push(t);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var s=0;s")||this.expect("=>"),this.context.isBindingElement=!1,s=0;s")&&(t.type===l.Syntax.Identifier&&"yield"===t.name&&(i=!0,t={type:u,params:[t],async:!1}),!i)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),t.type===l.Syntax.SequenceExpression)for(s=0;s")){for(var l=0;l0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var r=[t,this.lookahead],s=e,a=this.isolateCoverGrammar(this.parseExponentiationExpression),l=[s,n.value,a],c=[i];!((i=this.binaryPrecedence(this.lookahead))<=0);){for(;l.length>2&&i<=c[c.length-1];){a=l.pop();var u=l.pop();c.pop(),s=l.pop(),r.pop();var h=this.startNode(r[r.length-1]);l.push(this.finalize(h,new o.BinaryExpression(u,s,a)))}l.push(this.nextToken().value),c.push(i),r.push(this.lookahead),l.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var d=l.length-1;e=l[d];for(var f=r.pop();d>1;){var p=r.pop();h=this.startNode(p,f&&f.lineStart),e=this.finalize(h,new o.BinaryExpression(u=l[d-1],l[d-2],e)),d-=2,f=p}}return e},t.prototype.parseConditionalExpression=function(){var t=this.lookahead,e=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var n=this.context.allowIn;this.context.allowIn=!0;var i=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=n,this.expect(":");var r=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new o.ConditionalExpression(e,i,r)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return e},t.prototype.checkPatternParam=function(t,e){switch(e.type){case l.Syntax.Identifier:this.validateParam(t,e,e.name);break;case l.Syntax.RestElement:this.checkPatternParam(t,e.argument);break;case l.Syntax.AssignmentPattern:this.checkPatternParam(t,e.left);break;case l.Syntax.ArrayPattern:for(var n=0;n")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var r=t.async,a=this.reinterpretAsCoverFormalsList(t);if(a){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var c=this.context.strict,h=this.context.allowStrictDirective;this.context.allowStrictDirective=a.simple;var d=this.context.allowYield,f=this.context.await;this.context.allowYield=!0,this.context.await=r;var p=this.startNode(e);this.expect("=>");var g=void 0;if(this.match("{")){var m=this.context.allowIn;this.context.allowIn=!0,g=this.parseFunctionSourceElements(),this.context.allowIn=m}else g=this.isolateCoverGrammar(this.parseAssignmentExpression);var v=g.type!==l.Syntax.BlockStatement;this.context.strict&&a.firstRestricted&&this.throwUnexpectedToken(a.firstRestricted,a.message),this.context.strict&&a.stricted&&this.tolerateUnexpectedToken(a.stricted,a.message),t=this.finalize(p,r?new o.AsyncArrowFunctionExpression(a.params,g,v):new o.ArrowFunctionExpression(a.params,g,v)),this.context.strict=c,this.context.allowStrictDirective=h,this.context.allowYield=d,this.context.await=f}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(s.Messages.InvalidLHSInAssignment),this.context.strict&&t.type===l.Syntax.Identifier){var y=t;this.scanner.isRestrictedWord(y.name)&&this.tolerateUnexpectedToken(n,s.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(y.name)&&this.tolerateUnexpectedToken(n,s.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(t):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1);var b=(n=this.nextToken()).value,w=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new o.AssignmentExpression(b,t,w)),this.context.firstCoverInitializedNameError=null}}return t},t.prototype.parseExpression=function(){var t=this.lookahead,e=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];for(n.push(e);2!==this.lookahead.type&&this.match(",");)this.nextToken(),n.push(this.isolateCoverGrammar(this.parseAssignmentExpression));e=this.finalize(this.startNode(t),new o.SequenceExpression(n))}return e},t.prototype.parseStatementListItem=function(){var t;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,s.Messages.IllegalExportDeclaration),t=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,s.Messages.IllegalImportDeclaration),t=this.parseImportDeclaration();break;case"const":t=this.parseLexicalDeclaration({inFor:!1});break;case"function":t=this.parseFunctionDeclaration();break;case"class":t=this.parseClassDeclaration();break;case"let":t=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:t=this.parseStatement()}else t=this.parseStatement();return t},t.prototype.parseBlock=function(){var t=this.createNode();this.expect("{");for(var e=[];!this.match("}");)e.push(this.parseStatementListItem());return this.expect("}"),this.finalize(t,new o.BlockStatement(e))},t.prototype.parseLexicalBinding=function(t,e){var n=this.createNode(),i=this.parsePattern([],t);this.context.strict&&i.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(i.name)&&this.tolerateError(s.Messages.StrictVarName);var r=null;return"const"===t?this.matchKeyword("in")||this.matchContextualKeyword("of")||(this.match("=")?(this.nextToken(),r=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(s.Messages.DeclarationMissingInitializer,"const")):(!e.inFor&&i.type!==l.Syntax.Identifier||this.match("="))&&(this.expect("="),r=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(n,new o.VariableDeclarator(i,r))},t.prototype.parseBindingList=function(t,e){for(var n=[this.parseLexicalBinding(t,e)];this.match(",");)this.nextToken(),n.push(this.parseLexicalBinding(t,e));return n},t.prototype.isLexicalDeclaration=function(){var t=this.scanner.saveState();this.scanner.scanComments();var e=this.scanner.lex();return this.scanner.restoreState(t),3===e.type||7===e.type&&"["===e.value||7===e.type&&"{"===e.value||4===e.type&&"let"===e.value||4===e.type&&"yield"===e.value},t.prototype.parseLexicalDeclaration=function(t){var e=this.createNode(),n=this.nextToken().value;i.assert("let"===n||"const"===n,"Lexical declaration must be either let or const");var r=this.parseBindingList(n,t);return this.consumeSemicolon(),this.finalize(e,new o.VariableDeclaration(r,n))},t.prototype.parseBindingRestElement=function(t,e){var n=this.createNode();this.expect("...");var i=this.parsePattern(t,e);return this.finalize(n,new o.RestElement(i))},t.prototype.parseArrayPattern=function(t,e){var n=this.createNode();this.expect("[");for(var i=[];!this.match("]");)if(this.match(","))this.nextToken(),i.push(null);else{if(this.match("...")){i.push(this.parseBindingRestElement(t,e));break}i.push(this.parsePatternWithDefault(t,e)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(n,new o.ArrayPattern(i))},t.prototype.parsePropertyPattern=function(t,e){var n,i,r=this.createNode(),s=!1,a=!1;if(3===this.lookahead.type){var l=this.lookahead;n=this.parseVariableIdentifier();var c=this.finalize(r,new o.Identifier(l.value));if(this.match("=")){t.push(l),a=!0,this.nextToken();var u=this.parseAssignmentExpression();i=this.finalize(this.startNode(l),new o.AssignmentPattern(c,u))}else this.match(":")?(this.expect(":"),i=this.parsePatternWithDefault(t,e)):(t.push(l),a=!0,i=c)}else s=this.match("["),n=this.parseObjectPropertyKey(),this.expect(":"),i=this.parsePatternWithDefault(t,e);return this.finalize(r,new o.Property("init",n,s,i,!1,a))},t.prototype.parseObjectPattern=function(t,e){var n=this.createNode(),i=[];for(this.expect("{");!this.match("}");)i.push(this.parsePropertyPattern(t,e)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(n,new o.ObjectPattern(i))},t.prototype.parsePattern=function(t,e){var n;return this.match("[")?n=this.parseArrayPattern(t,e):this.match("{")?n=this.parseObjectPattern(t,e):(!this.matchKeyword("let")||"const"!==e&&"let"!==e||this.tolerateUnexpectedToken(this.lookahead,s.Messages.LetInLexicalBinding),t.push(this.lookahead),n=this.parseVariableIdentifier(e)),n},t.prototype.parsePatternWithDefault=function(t,e){var n=this.lookahead,i=this.parsePattern(t,e);if(this.match("=")){this.nextToken();var r=this.context.allowYield;this.context.allowYield=!0;var s=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=r,i=this.finalize(this.startNode(n),new o.AssignmentPattern(i,s))}return i},t.prototype.parseVariableIdentifier=function(t){var e=this.createNode(),n=this.nextToken();return 4===n.type&&"yield"===n.value?this.context.strict?this.tolerateUnexpectedToken(n,s.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(n):3!==n.type?this.context.strict&&4===n.type&&this.scanner.isStrictModeReservedWord(n.value)?this.tolerateUnexpectedToken(n,s.Messages.StrictReservedWord):(this.context.strict||"let"!==n.value||"var"!==t)&&this.throwUnexpectedToken(n):(this.context.isModule||this.context.await)&&3===n.type&&"await"===n.value&&this.tolerateUnexpectedToken(n),this.finalize(e,new o.Identifier(n.value))},t.prototype.parseVariableDeclaration=function(t){var e=this.createNode(),n=this.parsePattern([],"var");this.context.strict&&n.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(s.Messages.StrictVarName);var i=null;return this.match("=")?(this.nextToken(),i=this.isolateCoverGrammar(this.parseAssignmentExpression)):n.type===l.Syntax.Identifier||t.inFor||this.expect("="),this.finalize(e,new o.VariableDeclarator(n,i))},t.prototype.parseVariableDeclarationList=function(t){var e={inFor:t.inFor},n=[];for(n.push(this.parseVariableDeclaration(e));this.match(",");)this.nextToken(),n.push(this.parseVariableDeclaration(e));return n},t.prototype.parseVariableStatement=function(){var t=this.createNode();this.expectKeyword("var");var e=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(t,new o.VariableDeclaration(e,"var"))},t.prototype.parseEmptyStatement=function(){var t=this.createNode();return this.expect(";"),this.finalize(t,new o.EmptyStatement)},t.prototype.parseExpressionStatement=function(){var t=this.createNode(),e=this.parseExpression();return this.consumeSemicolon(),this.finalize(t,new o.ExpressionStatement(e))},t.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(s.Messages.StrictFunction),this.parseStatement()},t.prototype.parseIfStatement=function(){var t,e=this.createNode(),n=null;this.expectKeyword("if"),this.expect("(");var i=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new o.EmptyStatement)):(this.expect(")"),t=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),n=this.parseIfClause())),this.finalize(e,new o.IfStatement(i,t,n))},t.prototype.parseDoWhileStatement=function(){var t=this.createNode();this.expectKeyword("do");var e=this.context.inIteration;this.context.inIteration=!0;var n=this.parseStatement();this.context.inIteration=e,this.expectKeyword("while"),this.expect("(");var i=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(t,new o.DoWhileStatement(n,i))},t.prototype.parseWhileStatement=function(){var t,e=this.createNode();this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new o.EmptyStatement);else{this.expect(")");var i=this.context.inIteration;this.context.inIteration=!0,t=this.parseStatement(),this.context.inIteration=i}return this.finalize(e,new o.WhileStatement(n,t))},t.prototype.parseForStatement=function(){var t,e,n,i=null,r=null,a=null,c=!0,u=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){i=this.createNode(),this.nextToken();var h=this.context.allowIn;this.context.allowIn=!1;var d=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=h,1===d.length&&this.matchKeyword("in")){var f=d[0];f.init&&(f.id.type===l.Syntax.ArrayPattern||f.id.type===l.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(s.Messages.ForInOfLoopInitializer,"for-in"),i=this.finalize(i,new o.VariableDeclaration(d,"var")),this.nextToken(),t=i,e=this.parseExpression(),i=null}else 1===d.length&&null===d[0].init&&this.matchContextualKeyword("of")?(i=this.finalize(i,new o.VariableDeclaration(d,"var")),this.nextToken(),t=i,e=this.parseAssignmentExpression(),i=null,c=!1):(i=this.finalize(i,new o.VariableDeclaration(d,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){i=this.createNode();var p=this.nextToken().value;this.context.strict||"in"!==this.lookahead.value?(h=this.context.allowIn,this.context.allowIn=!1,d=this.parseBindingList(p,{inFor:!0}),this.context.allowIn=h,1===d.length&&null===d[0].init&&this.matchKeyword("in")?(i=this.finalize(i,new o.VariableDeclaration(d,p)),this.nextToken(),t=i,e=this.parseExpression(),i=null):1===d.length&&null===d[0].init&&this.matchContextualKeyword("of")?(i=this.finalize(i,new o.VariableDeclaration(d,p)),this.nextToken(),t=i,e=this.parseAssignmentExpression(),i=null,c=!1):(this.consumeSemicolon(),i=this.finalize(i,new o.VariableDeclaration(d,p)))):(i=this.finalize(i,new o.Identifier(p)),this.nextToken(),t=i,e=this.parseExpression(),i=null)}else{var g=this.lookahead;if(h=this.context.allowIn,this.context.allowIn=!1,i=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=h,this.matchKeyword("in"))this.context.isAssignmentTarget&&i.type!==l.Syntax.AssignmentExpression||this.tolerateError(s.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(i),t=i,e=this.parseExpression(),i=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&i.type!==l.Syntax.AssignmentExpression||this.tolerateError(s.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(i),t=i,e=this.parseAssignmentExpression(),i=null,c=!1;else{if(this.match(",")){for(var m=[i];this.match(",");)this.nextToken(),m.push(this.isolateCoverGrammar(this.parseAssignmentExpression));i=this.finalize(this.startNode(g),new o.SequenceExpression(m))}this.expect(";")}}if(void 0===t&&(this.match(";")||(r=this.parseExpression()),this.expect(";"),this.match(")")||(a=this.parseExpression())),!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),n=this.finalize(this.createNode(),new o.EmptyStatement);else{this.expect(")");var v=this.context.inIteration;this.context.inIteration=!0,n=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=v}return this.finalize(u,void 0===t?new o.ForStatement(i,r,a,n):c?new o.ForInStatement(t,e,n):new o.ForOfStatement(t,e,n))},t.prototype.parseContinueStatement=function(){var t=this.createNode();this.expectKeyword("continue");var e=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier();e=n,Object.prototype.hasOwnProperty.call(this.context.labelSet,"$"+n.name)||this.throwError(s.Messages.UnknownLabel,n.name)}return this.consumeSemicolon(),null!==e||this.context.inIteration||this.throwError(s.Messages.IllegalContinue),this.finalize(t,new o.ContinueStatement(e))},t.prototype.parseBreakStatement=function(){var t=this.createNode();this.expectKeyword("break");var e=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier();Object.prototype.hasOwnProperty.call(this.context.labelSet,"$"+n.name)||this.throwError(s.Messages.UnknownLabel,n.name),e=n}return this.consumeSemicolon(),null!==e||this.context.inIteration||this.context.inSwitch||this.throwError(s.Messages.IllegalBreak),this.finalize(t,new o.BreakStatement(e))},t.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(s.Messages.IllegalReturn);var t=this.createNode();this.expectKeyword("return");var e=(this.match(";")||this.match("}")||this.hasLineTerminator||2===this.lookahead.type)&&8!==this.lookahead.type&&10!==this.lookahead.type?null:this.parseExpression();return this.consumeSemicolon(),this.finalize(t,new o.ReturnStatement(e))},t.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(s.Messages.StrictModeWith);var t,e=this.createNode();this.expectKeyword("with"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new o.EmptyStatement)):(this.expect(")"),t=this.parseStatement()),this.finalize(e,new o.WithStatement(n,t))},t.prototype.parseSwitchCase=function(){var t,e=this.createNode();this.matchKeyword("default")?(this.nextToken(),t=null):(this.expectKeyword("case"),t=this.parseExpression()),this.expect(":");for(var n=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)n.push(this.parseStatementListItem());return this.finalize(e,new o.SwitchCase(t,n))},t.prototype.parseSwitchStatement=function(){var t=this.createNode();this.expectKeyword("switch"),this.expect("(");var e=this.parseExpression();this.expect(")");var n=this.context.inSwitch;this.context.inSwitch=!0;var i=[],r=!1;for(this.expect("{");!this.match("}");){var a=this.parseSwitchCase();null===a.test&&(r&&this.throwError(s.Messages.MultipleDefaultsInSwitch),r=!0),i.push(a)}return this.expect("}"),this.context.inSwitch=n,this.finalize(t,new o.SwitchStatement(e,i))},t.prototype.parseLabelledStatement=function(){var t,e=this.createNode(),n=this.parseExpression();if(n.type===l.Syntax.Identifier&&this.match(":")){this.nextToken();var i=n,r="$"+i.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)&&this.throwError(s.Messages.Redeclaration,"Label",i.name),this.context.labelSet[r]=!0;var a=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),a=this.parseClassDeclaration();else if(this.matchKeyword("function")){var c=this.lookahead,u=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(c,s.Messages.StrictFunction):u.generator&&this.tolerateUnexpectedToken(c,s.Messages.GeneratorInLegacyContext),a=u}else a=this.parseStatement();delete this.context.labelSet[r],t=new o.LabeledStatement(i,a)}else this.consumeSemicolon(),t=new o.ExpressionStatement(n);return this.finalize(e,t)},t.prototype.parseThrowStatement=function(){var t=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(s.Messages.NewlineAfterThrow);var e=this.parseExpression();return this.consumeSemicolon(),this.finalize(t,new o.ThrowStatement(e))},t.prototype.parseCatchClause=function(){var t=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var e=[],n=this.parsePattern(e),i={},r=0;r0&&this.tolerateError(s.Messages.BadGetterArity);var i=this.parsePropertyMethod(n);return this.context.allowYield=e,this.finalize(t,new o.FunctionExpression(null,n.params,i,!1))},t.prototype.parseSetterMethod=function(){var t=this.createNode(),e=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();1!==n.params.length?this.tolerateError(s.Messages.BadSetterArity):n.params[0]instanceof o.RestElement&&this.tolerateError(s.Messages.BadSetterRestParameter);var i=this.parsePropertyMethod(n);return this.context.allowYield=e,this.finalize(t,new o.FunctionExpression(null,n.params,i,!1))},t.prototype.parseGeneratorMethod=function(){var t=this.createNode(),e=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();this.context.allowYield=!1;var i=this.parsePropertyMethod(n);return this.context.allowYield=e,this.finalize(t,new o.FunctionExpression(null,n.params,i,!0))},t.prototype.isStartOfExpression=function(){var t=!0,e=this.lookahead.value;switch(this.lookahead.type){case 7:t="["===e||"("===e||"{"===e||"+"===e||"-"===e||"!"===e||"~"===e||"++"===e||"--"===e||"/"===e||"/="===e;break;case 4:t="class"===e||"delete"===e||"function"===e||"let"===e||"new"===e||"super"===e||"this"===e||"typeof"===e||"void"===e||"yield"===e}return t},t.prototype.parseYieldExpression=function(){var t=this.createNode();this.expectKeyword("yield");var e=null,n=!1;if(!this.hasLineTerminator){var i=this.context.allowYield;this.context.allowYield=!1,(n=this.match("*"))?(this.nextToken(),e=this.parseAssignmentExpression()):this.isStartOfExpression()&&(e=this.parseAssignmentExpression()),this.context.allowYield=i}return this.finalize(t,new o.YieldExpression(e,n))},t.prototype.parseClassElement=function(t){var e=this.lookahead,n=this.createNode(),i="",r=null,a=null,l=!1,c=!1,u=!1,h=!1;if(this.match("*"))this.nextToken();else if(l=this.match("["),"static"===(r=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(e=this.lookahead,u=!0,l=this.match("["),this.match("*")?this.nextToken():r=this.parseObjectPropertyKey()),3===e.type&&!this.hasLineTerminator&&"async"===e.value){var d=this.lookahead.value;":"!==d&&"("!==d&&"*"!==d&&(h=!0,e=this.lookahead,r=this.parseObjectPropertyKey(),3===e.type&&"constructor"===e.value&&this.tolerateUnexpectedToken(e,s.Messages.ConstructorIsAsync))}var f=this.qualifiedPropertyName(this.lookahead);return 3===e.type?"get"===e.value&&f?(i="get",l=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,a=this.parseGetterMethod()):"set"===e.value&&f&&(i="set",l=this.match("["),r=this.parseObjectPropertyKey(),a=this.parseSetterMethod()):7===e.type&&"*"===e.value&&f&&(i="init",l=this.match("["),r=this.parseObjectPropertyKey(),a=this.parseGeneratorMethod(),c=!0),!i&&r&&this.match("(")&&(i="init",a=h?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),c=!0),i||this.throwUnexpectedToken(this.lookahead),"init"===i&&(i="method"),l||(u&&this.isPropertyKey(r,"prototype")&&this.throwUnexpectedToken(e,s.Messages.StaticPrototype),!u&&this.isPropertyKey(r,"constructor")&&(("method"!==i||!c||a&&a.generator)&&this.throwUnexpectedToken(e,s.Messages.ConstructorSpecialMethod),t.value?this.throwUnexpectedToken(e,s.Messages.DuplicateConstructor):t.value=!0,i="constructor")),this.finalize(n,new o.MethodDefinition(r,l,a,i,u))},t.prototype.parseClassElementList=function(){var t=[],e={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():t.push(this.parseClassElement(e));return this.expect("}"),t},t.prototype.parseClassBody=function(){var t=this.createNode(),e=this.parseClassElementList();return this.finalize(t,new o.ClassBody(e))},t.prototype.parseClassDeclaration=function(t){var e=this.createNode(),n=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var i=t&&3!==this.lookahead.type?null:this.parseVariableIdentifier(),r=null;this.matchKeyword("extends")&&(this.nextToken(),r=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var s=this.parseClassBody();return this.context.strict=n,this.finalize(e,new o.ClassDeclaration(i,r,s))},t.prototype.parseClassExpression=function(){var t=this.createNode(),e=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=3===this.lookahead.type?this.parseVariableIdentifier():null,i=null;this.matchKeyword("extends")&&(this.nextToken(),i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var r=this.parseClassBody();return this.context.strict=e,this.finalize(t,new o.ClassExpression(n,i,r))},t.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var t=this.createNode(),e=this.parseDirectivePrologues();2!==this.lookahead.type;)e.push(this.parseStatementListItem());return this.finalize(t,new o.Module(e))},t.prototype.parseScript=function(){for(var t=this.createNode(),e=this.parseDirectivePrologues();2!==this.lookahead.type;)e.push(this.parseStatementListItem());return this.finalize(t,new o.Script(e))},t.prototype.parseModuleSpecifier=function(){var t=this.createNode();8!==this.lookahead.type&&this.throwError(s.Messages.InvalidModuleSpecifier);var e=this.nextToken(),n=this.getTokenRaw(e);return this.finalize(t,new o.Literal(e.value,n))},t.prototype.parseImportSpecifier=function(){var t,e,n=this.createNode();return 3===this.lookahead.type?(e=t=this.parseVariableIdentifier(),this.matchContextualKeyword("as")&&(this.nextToken(),e=this.parseVariableIdentifier())):(e=t=this.parseIdentifierName(),this.matchContextualKeyword("as")?(this.nextToken(),e=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(n,new o.ImportSpecifier(e,t))},t.prototype.parseNamedImports=function(){this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),t},t.prototype.parseImportDefaultSpecifier=function(){var t=this.createNode(),e=this.parseIdentifierName();return this.finalize(t,new o.ImportDefaultSpecifier(e))},t.prototype.parseImportNamespaceSpecifier=function(){var t=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(s.Messages.NoAsAfterImportNamespace),this.nextToken();var e=this.parseIdentifierName();return this.finalize(t,new o.ImportNamespaceSpecifier(e))},t.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(s.Messages.IllegalImportDeclaration);var t,e=this.createNode();this.expectKeyword("import");var n=[];return 8===this.lookahead.type||(this.match("{")?n=n.concat(this.parseNamedImports()):this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(n.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.match("{")?n=n.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),this.matchContextualKeyword("from")||this.throwError(this.lookahead.value?s.Messages.UnexpectedToken:s.Messages.MissingFromClause,this.lookahead.value),this.nextToken()),t=this.parseModuleSpecifier(),this.consumeSemicolon(),this.finalize(e,new o.ImportDeclaration(n,t))},t.prototype.parseExportSpecifier=function(){var t=this.createNode(),e=this.parseIdentifierName(),n=e;return this.matchContextualKeyword("as")&&(this.nextToken(),n=this.parseIdentifierName()),this.finalize(t,new o.ExportSpecifier(e,n))},t.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(s.Messages.IllegalExportDeclaration);var t,e=this.createNode();if(this.expectKeyword("export"),this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var n=this.parseFunctionDeclaration(!0);t=this.finalize(e,new o.ExportDefaultDeclaration(n))}else this.matchKeyword("class")?(n=this.parseClassDeclaration(!0),t=this.finalize(e,new o.ExportDefaultDeclaration(n))):this.matchContextualKeyword("async")?(n=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression(),t=this.finalize(e,new o.ExportDefaultDeclaration(n))):(this.matchContextualKeyword("from")&&this.throwError(s.Messages.UnexpectedToken,this.lookahead.value),n=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression(),this.consumeSemicolon(),t=this.finalize(e,new o.ExportDefaultDeclaration(n)));else if(this.match("*")){this.nextToken(),this.matchContextualKeyword("from")||this.throwError(this.lookahead.value?s.Messages.UnexpectedToken:s.Messages.MissingFromClause,this.lookahead.value),this.nextToken();var i=this.parseModuleSpecifier();this.consumeSemicolon(),t=this.finalize(e,new o.ExportAllDeclaration(i))}else if(4===this.lookahead.type){switch(n=void 0,this.lookahead.value){case"let":case"const":n=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":n=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}t=this.finalize(e,new o.ExportNamedDeclaration(n,[],null))}else if(this.matchAsyncFunction())n=this.parseFunctionDeclaration(),t=this.finalize(e,new o.ExportNamedDeclaration(n,[],null));else{var r=[],a=null,l=!1;for(this.expect("{");!this.match("}");)l=l||this.matchKeyword("default"),r.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");this.expect("}"),this.matchContextualKeyword("from")?(this.nextToken(),a=this.parseModuleSpecifier(),this.consumeSemicolon()):l?this.throwError(this.lookahead.value?s.Messages.UnexpectedToken:s.Messages.MissingFromClause,this.lookahead.value):this.consumeSemicolon(),t=this.finalize(e,new o.ExportNamedDeclaration(null,r,a))}return t},t}();e.Parser=h},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assert=function(t,e){if(!t)throw new Error("ASSERT: "+e)}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){this.errors=[],this.tolerant=!1}return t.prototype.recordError=function(t){this.errors.push(t)},t.prototype.tolerate=function(t){if(!this.tolerant)throw t;this.recordError(t)},t.prototype.constructError=function(t,e){var n=new Error(t);try{throw n}catch(i){Object.create&&Object.defineProperty&&(n=Object.create(i),Object.defineProperty(n,"column",{value:e}))}return n},t.prototype.createError=function(t,e,n,i){var r=this.constructError("Line "+e+": "+i,n);return r.index=t,r.lineNumber=e,r.description=i,r},t.prototype.throwError=function(t,e,n,i){throw this.createError(t,e,n,i)},t.prototype.tolerateError=function(t,e,n,i){var r=this.createError(t,e,n,i);if(!this.tolerant)throw r;this.recordError(r)},t}();e.ErrorHandler=n},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(9),r=n(4),s=n(11);function o(t){return"0123456789abcdef".indexOf(t.toLowerCase())}function a(t){return"01234567".indexOf(t)}var l=function(){function t(t,e){this.source=t,this.errorHandler=e,this.trackComment=!1,this.isModule=!1,this.length=t.length,this.index=0,this.lineNumber=t.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return t.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},t.prototype.restoreState=function(t){this.index=t.index,this.lineNumber=t.lineNumber,this.lineStart=t.lineStart},t.prototype.eof=function(){return this.index>=this.length},t.prototype.throwUnexpectedToken=function(t){return void 0===t&&(t=s.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,t)},t.prototype.tolerateUnexpectedToken=function(t){void 0===t&&(t=s.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,t)},t.prototype.skipSingleLineComment=function(t){var e,n,i=[];for(this.trackComment&&(i=[],e=this.index-t,n={start:{line:this.lineNumber,column:this.index-this.lineStart-t},end:{}});!this.eof();){var s=this.source.charCodeAt(this.index);if(++this.index,r.Character.isLineTerminator(s))return this.trackComment&&(n.end={line:this.lineNumber,column:this.index-this.lineStart-1},i.push({multiLine:!1,slice:[e+t,this.index-1],range:[e,this.index-1],loc:n})),13===s&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,i}return this.trackComment&&(n.end={line:this.lineNumber,column:this.index-this.lineStart},i.push({multiLine:!1,slice:[e+t,this.index],range:[e,this.index],loc:n})),i},t.prototype.skipMultiLineComment=function(){var t,e,n=[];for(this.trackComment&&(n=[],t=this.index-2,e={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var i=this.source.charCodeAt(this.index);if(r.Character.isLineTerminator(i))13===i&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===i){if(47===this.source.charCodeAt(this.index+1))return this.index+=2,this.trackComment&&(e.end={line:this.lineNumber,column:this.index-this.lineStart},n.push({multiLine:!0,slice:[t+2,this.index-2],range:[t,this.index],loc:e})),n;++this.index}else++this.index}return this.trackComment&&(e.end={line:this.lineNumber,column:this.index-this.lineStart},n.push({multiLine:!0,slice:[t+2,this.index],range:[t,this.index],loc:e})),this.tolerateUnexpectedToken(),n},t.prototype.scanComments=function(){var t;this.trackComment&&(t=[]);for(var e=0===this.index;!this.eof();){var n=this.source.charCodeAt(this.index);if(r.Character.isWhiteSpace(n))++this.index;else if(r.Character.isLineTerminator(n))++this.index,13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,e=!0;else if(47===n)if(47===(n=this.source.charCodeAt(this.index+1))){this.index+=2;var i=this.skipSingleLineComment(2);this.trackComment&&(t=t.concat(i)),e=!0}else{if(42!==n)break;this.index+=2,i=this.skipMultiLineComment(),this.trackComment&&(t=t.concat(i))}else if(e&&45===n){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3,i=this.skipSingleLineComment(3),this.trackComment&&(t=t.concat(i))}else{if(60!==n||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4,i=this.skipSingleLineComment(4),this.trackComment&&(t=t.concat(i))}}return t},t.prototype.isFutureReservedWord=function(t){switch(t){case"enum":case"export":case"import":case"super":return!0;default:return!1}},t.prototype.isStrictModeReservedWord=function(t){switch(t){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},t.prototype.isRestrictedWord=function(t){return"eval"===t||"arguments"===t},t.prototype.isKeyword=function(t){switch(t.length){case 2:return"if"===t||"in"===t||"do"===t;case 3:return"var"===t||"for"===t||"new"===t||"try"===t||"let"===t;case 4:return"this"===t||"else"===t||"case"===t||"void"===t||"with"===t||"enum"===t;case 5:return"while"===t||"break"===t||"catch"===t||"throw"===t||"const"===t||"yield"===t||"class"===t||"super"===t;case 6:return"return"===t||"typeof"===t||"delete"===t||"switch"===t||"export"===t||"import"===t;case 7:return"default"===t||"finally"===t||"extends"===t;case 8:return"function"===t||"continue"===t||"debugger"===t;case 10:return"instanceof"===t;default:return!1}},t.prototype.codePointAt=function(t){var e=this.source.charCodeAt(t);if(e>=55296&&e<=56319){var n=this.source.charCodeAt(t+1);n>=56320&&n<=57343&&(e=1024*(e-55296)+n-56320+65536)}return e},t.prototype.scanHexEscape=function(t){for(var e="u"===t?4:2,n=0,i=0;i1114111||"}"!==t)&&this.throwUnexpectedToken(),r.Character.fromCodePoint(e)},t.prototype.getIdentifier=function(){for(var t=this.index++;!this.eof();){var e=this.source.charCodeAt(this.index);if(92===e)return this.index=t,this.getComplexIdentifier();if(e>=55296&&e<57343)return this.index=t,this.getComplexIdentifier();if(!r.Character.isIdentifierPart(e))break;++this.index}return this.source.slice(t,this.index)},t.prototype.getComplexIdentifier=function(){var t,e=this.codePointAt(this.index),n=r.Character.fromCodePoint(e);for(this.index+=n.length,92===e&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,t=this.scanUnicodeCodePointEscape()):null!==(t=this.scanHexEscape("u"))&&"\\"!==t&&r.Character.isIdentifierStart(t.charCodeAt(0))||this.throwUnexpectedToken(),n=t);!this.eof()&&(e=this.codePointAt(this.index),r.Character.isIdentifierPart(e));)n+=t=r.Character.fromCodePoint(e),this.index+=t.length,92===e&&(n=n.substr(0,n.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,t=this.scanUnicodeCodePointEscape()):null!==(t=this.scanHexEscape("u"))&&"\\"!==t&&r.Character.isIdentifierPart(t.charCodeAt(0))||this.throwUnexpectedToken(),n+=t);return n},t.prototype.octalToDecimal=function(t){var e="0"!==t,n=a(t);return!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(e=!0,n=8*n+a(this.source[this.index++]),"0123".indexOf(t)>=0&&!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(n=8*n+a(this.source[this.index++]))),{code:n,octal:e}},t.prototype.scanIdentifier=function(){var t,e=this.index,n=92===this.source.charCodeAt(e)?this.getComplexIdentifier():this.getIdentifier();if(3!=(t=1===n.length?3:this.isKeyword(n)?4:"null"===n?5:"true"===n||"false"===n?1:3)&&e+n.length!==this.index){var i=this.index;this.index=e,this.tolerateUnexpectedToken(s.Messages.InvalidEscapedReservedWord),this.index=i}return{type:t,value:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},t.prototype.scanPunctuator=function(){var t=this.index,e=this.source[this.index];switch(e){case"(":case"{":"{"===e&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,e="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:">>>="===(e=this.source.substr(this.index,4))?this.index+=4:"==="===(e=e.substr(0,3))||"!=="===e||">>>"===e||"<<="===e||">>="===e||"**="===e?this.index+=3:"&&"===(e=e.substr(0,2))||"||"===e||"=="===e||"!="===e||"+="===e||"-="===e||"*="===e||"/="===e||"++"===e||"--"===e||"<<"===e||">>"===e||"&="===e||"|="===e||"^="===e||"%="===e||"<="===e||">="===e||"=>"===e||"**"===e?this.index+=2:"<>=!+-*%&|^/".indexOf(e=this.source[this.index])>=0&&++this.index}return this.index===t&&this.throwUnexpectedToken(),{type:7,value:e,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},t.prototype.scanHexLiteral=function(t){for(var e="";!this.eof()&&r.Character.isHexDigit(this.source.charCodeAt(this.index));)e+=this.source[this.index++];return 0===e.length&&this.throwUnexpectedToken(),r.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+e,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},t.prototype.scanBinaryLiteral=function(t){for(var e,n="";!this.eof()&&("0"===(e=this.source[this.index])||"1"===e);)n+=this.source[this.index++];return 0===n.length&&this.throwUnexpectedToken(),this.eof()||(e=this.source.charCodeAt(this.index),(r.Character.isIdentifierStart(e)||r.Character.isDecimalDigit(e))&&this.throwUnexpectedToken()),{type:6,value:parseInt(n,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},t.prototype.scanOctalLiteral=function(t,e){var n="",i=!1;for(r.Character.isOctalDigit(t.charCodeAt(0))?(i=!0,n="0"+this.source[this.index++]):++this.index;!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];return i||0!==n.length||this.throwUnexpectedToken(),(r.Character.isIdentifierStart(this.source.charCodeAt(this.index))||r.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(n,8),octal:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},t.prototype.isImplicitOctalLiteral=function(){for(var t=this.index+1;t=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(t,e,n){var r=parseInt(e||n,16);return r>1114111&&i.throwUnexpectedToken(s.Messages.InvalidRegExp),r<=65535?String.fromCharCode(r):"\uffff"}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"\uffff"));try{RegExp(n)}catch(r){this.throwUnexpectedToken(s.Messages.InvalidRegExp)}try{return new RegExp(t,e)}catch(o){return null}},t.prototype.scanRegExpBody=function(){var t=this.source[this.index];i.assert("/"===t,"Regular expression literal must start with a slash");for(var e=this.source[this.index++],n=!1,o=!1;!this.eof();)if(e+=t=this.source[this.index++],"\\"===t)t=this.source[this.index++],r.Character.isLineTerminator(t.charCodeAt(0))&&this.throwUnexpectedToken(s.Messages.UnterminatedRegExp),e+=t;else if(r.Character.isLineTerminator(t.charCodeAt(0)))this.throwUnexpectedToken(s.Messages.UnterminatedRegExp);else if(n)"]"===t&&(n=!1);else{if("/"===t){o=!0;break}"["===t&&(n=!0)}return o||this.throwUnexpectedToken(s.Messages.UnterminatedRegExp),e.substr(1,e.length-2)},t.prototype.scanRegExpFlags=function(){for(var t="";!this.eof();){var e=this.source[this.index];if(!r.Character.isIdentifierPart(e.charCodeAt(0)))break;if(++this.index,"\\"!==e||this.eof())t+=e;else if("u"===(e=this.source[this.index])){++this.index;var n=this.index,i=this.scanHexEscape("u");if(null!==i)for(t+=i;n=55296&&t<57343&&r.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},t}();e.Scanner=l},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenName={},e.TokenName[1]="Boolean",e.TokenName[2]="",e.TokenName[3]="Identifier",e.TokenName[4]="Keyword",e.TokenName[5]="Null",e.TokenName[6]="Numeric",e.TokenName[7]="Punctuator",e.TokenName[8]="String",e.TokenName[9]="RegularExpression",e.TokenName[10]="Template"},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:"\xa0",iexcl:"\xa1",cent:"\xa2",pound:"\xa3",curren:"\xa4",yen:"\xa5",brvbar:"\xa6",sect:"\xa7",uml:"\xa8",copy:"\xa9",ordf:"\xaa",laquo:"\xab",not:"\xac",shy:"\xad",reg:"\xae",macr:"\xaf",deg:"\xb0",plusmn:"\xb1",sup2:"\xb2",sup3:"\xb3",acute:"\xb4",micro:"\xb5",para:"\xb6",middot:"\xb7",cedil:"\xb8",sup1:"\xb9",ordm:"\xba",raquo:"\xbb",frac14:"\xbc",frac12:"\xbd",frac34:"\xbe",iquest:"\xbf",Agrave:"\xc0",Aacute:"\xc1",Acirc:"\xc2",Atilde:"\xc3",Auml:"\xc4",Aring:"\xc5",AElig:"\xc6",Ccedil:"\xc7",Egrave:"\xc8",Eacute:"\xc9",Ecirc:"\xca",Euml:"\xcb",Igrave:"\xcc",Iacute:"\xcd",Icirc:"\xce",Iuml:"\xcf",ETH:"\xd0",Ntilde:"\xd1",Ograve:"\xd2",Oacute:"\xd3",Ocirc:"\xd4",Otilde:"\xd5",Ouml:"\xd6",times:"\xd7",Oslash:"\xd8",Ugrave:"\xd9",Uacute:"\xda",Ucirc:"\xdb",Uuml:"\xdc",Yacute:"\xdd",THORN:"\xde",szlig:"\xdf",agrave:"\xe0",aacute:"\xe1",acirc:"\xe2",atilde:"\xe3",auml:"\xe4",aring:"\xe5",aelig:"\xe6",ccedil:"\xe7",egrave:"\xe8",eacute:"\xe9",ecirc:"\xea",euml:"\xeb",igrave:"\xec",iacute:"\xed",icirc:"\xee",iuml:"\xef",eth:"\xf0",ntilde:"\xf1",ograve:"\xf2",oacute:"\xf3",ocirc:"\xf4",otilde:"\xf5",ouml:"\xf6",divide:"\xf7",oslash:"\xf8",ugrave:"\xf9",uacute:"\xfa",ucirc:"\xfb",uuml:"\xfc",yacute:"\xfd",thorn:"\xfe",yuml:"\xff",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02c6",tilde:"\u02dc",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039a",Lambda:"\u039b",Mu:"\u039c",Nu:"\u039d",Xi:"\u039e",Omicron:"\u039f",Pi:"\u03a0",Rho:"\u03a1",Sigma:"\u03a3",Tau:"\u03a4",Upsilon:"\u03a5",Phi:"\u03a6",Chi:"\u03a7",Psi:"\u03a8",Omega:"\u03a9",alpha:"\u03b1",beta:"\u03b2",gamma:"\u03b3",delta:"\u03b4",epsilon:"\u03b5",zeta:"\u03b6",eta:"\u03b7",theta:"\u03b8",iota:"\u03b9",kappa:"\u03ba",lambda:"\u03bb",mu:"\u03bc",nu:"\u03bd",xi:"\u03be",omicron:"\u03bf",pi:"\u03c0",rho:"\u03c1",sigmaf:"\u03c2",sigma:"\u03c3",tau:"\u03c4",upsilon:"\u03c5",phi:"\u03c6",chi:"\u03c7",psi:"\u03c8",omega:"\u03c9",thetasym:"\u03d1",upsih:"\u03d2",piv:"\u03d6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200c",zwj:"\u200d",lrm:"\u200e",rlm:"\u200f",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201a",ldquo:"\u201c",rdquo:"\u201d",bdquo:"\u201e",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203a",oline:"\u203e",frasl:"\u2044",euro:"\u20ac",image:"\u2111",weierp:"\u2118",real:"\u211c",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21b5",lArr:"\u21d0",uArr:"\u21d1",rArr:"\u21d2",dArr:"\u21d3",hArr:"\u21d4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220b",prod:"\u220f",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221a",prop:"\u221d",infin:"\u221e",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222a",int:"\u222b",there4:"\u2234",sim:"\u223c",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22a5",sdot:"\u22c5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230a",rfloor:"\u230b",loz:"\u25ca",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",lang:"\u27e8",rang:"\u27e9"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(10),r=n(12),s=n(13),o=function(){function t(){this.values=[],this.curly=this.paren=-1}return t.prototype.beforeFunctionExpression=function(t){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(t)>=0},t.prototype.isRegexStart=function(){var t=this.values[this.values.length-1],e=null!==t;switch(t){case"this":case"]":e=!1;break;case")":var n=this.values[this.paren-1];e="if"===n||"while"===n||"for"===n||"with"===n;break;case"}":if(e=!1,"function"===this.values[this.curly-3])e=!!(i=this.values[this.curly-4])&&!this.beforeFunctionExpression(i);else if("function"===this.values[this.curly-4]){var i;e=!(i=this.values[this.curly-5])||!this.beforeFunctionExpression(i)}}return e},t.prototype.push=function(t){7===t.type||4===t.type?("{"===t.value?this.curly=this.values.length:"("===t.value&&(this.paren=this.values.length),this.values.push(t.value)):this.values.push(null)},t}(),a=function(){function t(t,e){this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=!!e&&"boolean"==typeof e.tolerant&&e.tolerant,this.scanner=new r.Scanner(t,this.errorHandler),this.scanner.trackComment=!!e&&"boolean"==typeof e.comment&&e.comment,this.trackRange=!!e&&"boolean"==typeof e.range&&e.range,this.trackLoc=!!e&&"boolean"==typeof e.loc&&e.loc,this.buffer=[],this.reader=new o}return t.prototype.errors=function(){return this.errorHandler.errors},t.prototype.getNextToken=function(){if(0===this.buffer.length){var t=this.scanner.scanComments();if(this.scanner.trackComment)for(var e=0;e>10),56320+(t-65536&1023))}for(var _=new Array(256),C=new Array(256),S=0;S<256;S++)_[S]=w(S)?1:0,C[S]=w(S);function k(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||a,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function E(t,e){return new r(e,new s(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function A(t,e){throw E(t,e)}function D(t,e){t.onWarning&&t.onWarning.call(null,E(t,e))}var T={YAML:function(t,e,n){var i,r,s;null!==t.version&&A(t,"duplication of %YAML directive"),1!==n.length&&A(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&A(t,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),s=parseInt(i[2],10),1!==r&&A(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=s<2,1!==s&&2!==s&&D(t,"unsupported YAML version of the document")},TAG:function(t,e,n){var i,r;2!==n.length&&A(t,"TAG directive accepts exactly two arguments"),r=n[1],d.test(i=n[0])||A(t,"ill-formed tag handle (first argument) of the TAG directive"),l.call(t.tagMap,i)&&A(t,'there is a previously declared suffix for "'+i+'" tag handle'),f.test(r)||A(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[i]=r}};function R(t,e,n,i){var r,s,o,a;if(e1&&(t.result+=i.repeat("\n",e-1))}function N(t,e){var n,i,r=t.tag,s=t.anchor,o=[],a=!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=o),i=t.input.charCodeAt(t.position);0!==i&&45===i&&v(t.input.charCodeAt(t.position+1));)if(a=!0,t.position++,$(t,!0,-1)&&t.lineIndent<=e)o.push(null),i=t.input.charCodeAt(t.position);else if(n=t.line,U(t,e,3,!1,!0),o.push(t.result),$(t,!0,-1),i=t.input.charCodeAt(t.position),(t.line===n||t.lineIndent>e)&&0!==i)A(t,"bad indentation of a sequence entry");else if(t.lineIndente?w=1:t.lineIndent===e?w=0:t.lineIndente?w=1:t.lineIndent===e?w=0:t.lineIndente)&&(U(t,e,4,!0,r)&&(g?f=t.result:p=t.result),g||(M(t,u,h,d,f,p,s,o),d=f=p=null),$(t,!0,-1),a=t.input.charCodeAt(t.position)),t.lineIndent>e&&0!==a)A(t,"bad indentation of a mapping entry");else if(t.lineIndent=0))break;0===s?A(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?A(t,"repeat of an indentation width identifier"):(h=e+s-1,u=!0)}if(m(o)){do{o=t.input.charCodeAt(++t.position)}while(m(o));if(35===o)do{o=t.input.charCodeAt(++t.position)}while(!g(o)&&0!==o)}for(;0!==o;){for(L(t),t.lineIndent=0,o=t.input.charCodeAt(t.position);(!u||t.lineIndenth&&(h=t.lineIndent),g(o))d++;else{if(t.lineIndent0){for(r=o,s=0;r>0;r--)(o=b(a=t.input.charCodeAt(++t.position)))>=0?s=(s<<4)+o:A(t,"expected hexadecimal character");t.result+=x(s),t.position++}else A(t,"unknown escape sequence");n=i=t.position}else g(a)?(R(t,n,i,!0),I(t,$(t,!1,e)),n=i=t.position):t.position===t.lineStart&&O(t)?A(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}A(t,"unexpected end of the stream within a double quoted scalar")}(t,f)?k=!0:function(t){var e,n,i;if(42!==(i=t.input.charCodeAt(t.position)))return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!v(i)&&!y(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&A(t,"name of an alias node must contain at least one character"),n=t.input.slice(e,t.position),t.anchorMap.hasOwnProperty(n)||A(t,'unidentified alias "'+n+'"'),t.result=t.anchorMap[n],$(t,!0,-1),!0}(t)?(k=!0,null===t.tag&&null===t.anchor||A(t,"alias node should not have any properties")):function(t,e,n){var i,r,s,o,a,l,c,u,h=t.kind,d=t.result;if(v(u=t.input.charCodeAt(t.position))||y(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(v(i=t.input.charCodeAt(t.position+1))||n&&y(i)))return!1;for(t.kind="scalar",t.result="",r=s=t.position,o=!1;0!==u;){if(58===u){if(v(i=t.input.charCodeAt(t.position+1))||n&&y(i))break}else if(35===u){if(v(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&O(t)||n&&y(u))break;if(g(u)){if(a=t.line,l=t.lineStart,c=t.lineIndent,$(t,!1,-1),t.lineIndent>=e){o=!0,u=t.input.charCodeAt(t.position);continue}t.position=s,t.line=a,t.lineStart=l,t.lineIndent=c;break}}o&&(R(t,r,s,!1),I(t,t.line-a),r=s=t.position,o=!1),m(u)||(s=t.position+1),u=t.input.charCodeAt(++t.position)}return R(t,r,s,!1),!!t.result||(t.kind=h,t.result=d,!1)}(t,f,1===n)&&(k=!0,null===t.tag&&(t.tag="?")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===w&&(k=c&&N(t,p))),null!==t.tag&&"!"!==t.tag)if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&A(t,'unacceptable node kind for ! tag; it should be "scalar", not "'+t.kind+'"'),u=0,h=t.implicitTypes.length;u tag; it should be "'+d.kind+'", not "'+t.kind+'"'),d.resolve(t.result)?(t.result=d.construct(t.result),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):A(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")):A(t,"unknown tag !<"+t.tag+">");return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||k}function V(t){var e,n,i,r,s=t.position,o=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap={},t.anchorMap={};0!==(r=t.input.charCodeAt(t.position))&&($(t,!0,-1),r=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==r));){for(o=!0,r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!v(r);)r=t.input.charCodeAt(++t.position);for(i=[],(n=t.input.slice(e,t.position)).length<1&&A(t,"directive name must not be less than one character in length");0!==r;){for(;m(r);)r=t.input.charCodeAt(++t.position);if(35===r){do{r=t.input.charCodeAt(++t.position)}while(0!==r&&!g(r));break}if(g(r))break;for(e=t.position;0!==r&&!v(r);)r=t.input.charCodeAt(++t.position);i.push(t.input.slice(e,t.position))}0!==r&&L(t),l.call(T,n)?T[n](t,n,i):D(t,'unknown document directive "'+n+'"')}$(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,$(t,!0,-1)):o&&A(t,"directives end mark is expected"),U(t,t.lineIndent-1,4,!1,!0),$(t,!0,-1),t.checkLineBreaks&&u.test(t.input.slice(s,t.position))&&D(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&O(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,$(t,!0,-1)):t.position0?o-4:o;for(n=0;n>16&255,l[u++]=e>>8&255,l[u++]=255&e;return 2===a&&(e=r[t.charCodeAt(n)]<<2|r[t.charCodeAt(n+1)]>>4,l[u++]=255&e),1===a&&(e=r[t.charCodeAt(n)]<<10|r[t.charCodeAt(n+1)]<<4|r[t.charCodeAt(n+2)]>>2,l[u++]=e>>8&255,l[u++]=255&e),l},e.fromByteArray=function(t){for(var e,n=t.length,r=n%3,s=[],o=16383,a=0,l=n-r;al?l:a+o));return 1===r?s.push(i[(e=t[n-1])>>2]+i[e<<4&63]+"=="):2===r&&s.push(i[(e=(t[n-2]<<8)+t[n-1])>>10]+i[e>>4&63]+i[e<<2&63]+"="),s.join("")};for(var i=[],r=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,l=o.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function u(t,e,n){for(var r,s=[],o=e;o>18&63]+i[r>>12&63]+i[r>>6&63]+i[63&r]);return s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},HUeH:function(t,e,n){"use strict";var i=n("ClZL"),r=n("XP29");function s(t){return function(){throw new Error("Function "+t+" is deprecated and cannot be used.")}}t.exports.Type=n("hyoZ"),t.exports.Schema=n("3lC6"),t.exports.FAILSAFE_SCHEMA=n("2YgE"),t.exports.JSON_SCHEMA=n("+VNs"),t.exports.CORE_SCHEMA=n("RSjF"),t.exports.DEFAULT_SAFE_SCHEMA=n("Z3Ei"),t.exports.DEFAULT_FULL_SCHEMA=n("VtPO"),t.exports.load=i.load,t.exports.loadAll=i.loadAll,t.exports.safeLoad=i.safeLoad,t.exports.safeLoadAll=i.safeLoadAll,t.exports.dump=r.dump,t.exports.safeDump=r.safeDump,t.exports.YAMLException=n("w+qe"),t.exports.MINIMAL_SCHEMA=n("2YgE"),t.exports.SAFE_SCHEMA=n("Z3Ei"),t.exports.DEFAULT_SCHEMA=n("VtPO"),t.exports.scan=s("scan"),t.exports.parse=s("parse"),t.exports.compose=s("compose"),t.exports.addConstructor=s("addConstructor")},Iab2:function(t,e,n){var i,r;void 0===(r="function"==typeof(i=function(){"use strict";function e(t,e,n){var i=new XMLHttpRequest;i.open("GET",t),i.responseType="blob",i.onload=function(){o(i.response,e,n)},i.onerror=function(){console.error("could not download file")},i.send()}function n(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return 200<=e.status&&299>=e.status}function i(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(e){var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(n)}}var r="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,s=r.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),o=r.saveAs||("object"!=typeof window||window!==r?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(t,s,o){var a=r.URL||r.webkitURL,l=document.createElement("a");l.download=s=s||t.name||"download",l.rel="noopener","string"==typeof t?(l.href=t,l.origin===location.origin?i(l):n(l.href)?e(t,s,o):i(l,l.target="_blank")):(l.href=a.createObjectURL(t),setTimeout(function(){a.revokeObjectURL(l.href)},4e4),setTimeout(function(){i(l)},0))}:"msSaveOrOpenBlob"in navigator?function(t,r,s){if(r=r||t.name||"download","string"!=typeof t)navigator.msSaveOrOpenBlob(function(t,e){return void 0===e?e={autoBom:!1}:"object"!=typeof e&&(console.warn("Deprecated: Expected third argument to be a object"),e={autoBom:!e}),e.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob(["\ufeff",t],{type:t.type}):t}(t,s),r);else if(n(t))e(t,r,s);else{var o=document.createElement("a");o.href=t,o.target="_blank",setTimeout(function(){i(o)})}}:function(t,n,i,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof t)return e(t,n,i);var a="application/octet-stream"===t.type,l=/constructor/i.test(r.HTMLElement)||r.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||a&&l||s)&&"undefined"!=typeof FileReader){var u=new FileReader;u.onloadend=function(){var t=u.result;t=c?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=t:location=t,o=null},u.readAsDataURL(t)}else{var h=r.URL||r.webkitURL,d=h.createObjectURL(t);o?o.location=d:location.href=d,o=null,setTimeout(function(){h.revokeObjectURL(d)},4e4)}});r.saveAs=o.saveAs=o,t.exports=o})?i.apply(e,[]):i)||(t.exports=r)},LFvy:function(t,e,n){"use strict";var i=n("hyoZ");t.exports=new i("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return null!==t?t:""}})},Ljib:function(t,e,n){"use strict";var i=n("hyoZ");t.exports=new i("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return null!==t?t:{}}})},MERt:function(t,e,n){"use strict";var i=n("hyoZ");t.exports=new i("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:function(){return!0},construct:function(){},predicate:function(t){return void 0===t},represent:function(){return""}})},Njqi:function(t,e,n){"use strict";var i;try{i=n("+U4B")}catch(s){"undefined"!=typeof window&&(i=window.esprima)}var r=n("hyoZ");t.exports=new r("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function(t){if(null===t)return!1;try{var e=i.parse("("+t+")",{range:!0});return"Program"===e.type&&1===e.body.length&&"ExpressionStatement"===e.body[0].type&&("ArrowFunctionExpression"===e.body[0].expression.type||"FunctionExpression"===e.body[0].expression.type)}catch(n){return!1}},construct:function(t){var e,n="("+t+")",r=i.parse(n,{range:!0}),s=[];if("Program"!==r.type||1!==r.body.length||"ExpressionStatement"!==r.body[0].type||"ArrowFunctionExpression"!==r.body[0].expression.type&&"FunctionExpression"!==r.body[0].expression.type)throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach(function(t){s.push(t.name)}),e=r.body[0].expression.body.range,new Function(s,"BlockStatement"===r.body[0].expression.body.type?n.slice(e[0]+1,e[1]-1):"return "+n.slice(e[0],e[1]))},predicate:function(t){return"[object Function]"===Object.prototype.toString.call(t)},represent:function(t){return t.toString()}})},Pe6h:function(t,e,n){"use strict";var i=n("Y2Yi"),r=n("hyoZ"),s=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),o=/^[-+]?[0-9]+e/;t.exports=new r("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(t){return null!==t&&!(!s.test(t)||"_"===t[t.length-1])},construct:function(t){var e,n,i,r;return n="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,r=[],"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:e.indexOf(":")>=0?(e.split(":").forEach(function(t){r.unshift(parseFloat(t,10))}),e=0,i=1,r.forEach(function(t){e+=t*i,i*=60}),n*e):n*parseFloat(e,10)},predicate:function(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||i.isNegativeZero(t))},represent:function(t,e){var n;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(i.isNegativeZero(t))return"-0.0";return n=t.toString(10),o.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"})},RSjF:function(t,e,n){"use strict";var i=n("3lC6");t.exports=new i({include:[n("+VNs")]})},UQ3f:function(t,e,n){"use strict";var i=n("hyoZ");t.exports=new i("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:function(t){if(null===t)return!1;if(0===t.length)return!1;var e=t,n=/\/([gim]*)$/.exec(t),i="";if("/"===e[0]){if(n&&(i=n[1]),i.length>3)return!1;if("/"!==e[e.length-i.length-1])return!1}return!0},construct:function(t){var e=t,n=/\/([gim]*)$/.exec(t),i="";return"/"===e[0]&&(n&&(i=n[1]),e=e.slice(1,e.length-i.length-1)),new RegExp(e,i)},predicate:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},represent:function(t){var e="/"+t.source+"/";return t.global&&(e+="g"),t.multiline&&(e+="m"),t.ignoreCase&&(e+="i"),e}})},VtPO:function(t,e,n){"use strict";var i=n("3lC6");t.exports=i.DEFAULT=new i({include:[n("Z3Ei")],explicit:[n("MERt"),n("UQ3f"),n("Njqi")]})},XP29:function(t,e,n){"use strict";var i=n("Y2Yi"),r=n("w+qe"),s=n("VtPO"),o=n("Z3Ei"),a=Object.prototype.toString,l=Object.prototype.hasOwnProperty,c={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},u=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function h(t){var e,n,s;if(e=t.toString(16).toUpperCase(),t<=255)n="x",s=2;else if(t<=65535)n="u",s=4;else{if(!(t<=4294967295))throw new r("code point within a string may not be greater than 0xFFFFFFFF");n="U",s=8}return"\\"+n+i.repeat("0",s-e.length)+e}function d(t){this.schema=t.schema||s,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=i.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=function(t,e){var n,i,r,s,o,a,c;if(null===e)return{};for(n={},r=0,s=(i=Object.keys(e)).length;r0?e.charCodeAt(o-1):null,p=p&&v(a,l)}else{for(o=0;or&&" "!==e[f+1],f=o);else if(!m(a))return 5;l=o>0?e.charCodeAt(o-1):null,p=p&&v(a,l)}h=h||d&&o-f-1>r&&" "!==e[f+1]}return u||h?i>9&&y(e)?5:h?4:3:p&&!function(e){return function(t,e){var n,i;for(n=0,i=t.implicitTypes.length;n-1&&n>=t.flowLevel,t.indent,o)){case 1:return e;case 2:return"'"+e.replace(/'/g,"''")+"'";case 3:return"|"+w(e,t.indent)+x(f(e,s));case 4:return">"+w(e,t.indent)+x(f(function(t,e){for(var n,i,r,s=/(\n+)([^\n]*)/g,o=(r=t.indexOf("\n"),s.lastIndex=r=-1!==r?r:t.length,_(t.slice(0,r),e)),a="\n"===t[0]||" "===t[0];i=s.exec(t);){var l=i[2];n=" "===l[0],o+=i[1]+(a||n||""===l?"":"\n")+_(l,e),a=n}return o}(e,o),s));case 5:return'"'+function(t){for(var e,n,i,r="",s=0;s=55296&&e<=56319&&(n=t.charCodeAt(s+1))>=56320&&n<=57343?(r+=h(1024*(e-55296)+n-56320+65536),s++):r+=!(i=c[e])&&m(e)?t[s]:i||h(e);return r}(e)+'"';default:throw new r("impossible error: invalid scalar style")}}()}function w(t,e){var n=y(t)?String(e):"",i="\n"===t[t.length-1];return n+(!i||"\n"!==t[t.length-2]&&"\n"!==t?i?"":"-":"+")+"\n"}function x(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function _(t,e){if(""===t||" "===t[0])return t;for(var n,i,r=/ [^ ]/g,s=0,o=0,a=0,l="";n=r.exec(t);)(a=n.index)-s>e&&(l+="\n"+t.slice(s,i=o>s?o:a),s=i+1),o=a;return l+="\n",(l+=t.length-s>e&&o>s?t.slice(s,o)+"\n"+t.slice(o+1):t.slice(s)).slice(1)}function C(t,e,n){var i,s,o,c,u,h;for(o=0,c=(s=n?t.explicitTypes:t.implicitTypes).length;o tag resolver accepts not "'+h+'" style');i=u.represent[h](e,h)}t.dump=i}return!0}return!1}function S(t,e,n,i,s,o){t.tag=null,t.dump=n,C(t,n,!1)||C(t,n,!0);var l=a.call(t.dump);i&&(i=t.flowLevel<0||t.flowLevel>e);var c,u,h="[object Object]"===l||"[object Array]"===l;if(h&&(u=-1!==(c=t.duplicates.indexOf(n))),(null!==t.tag&&"?"!==t.tag||u||2!==t.indent&&e>0)&&(s=!1),u&&t.usedDuplicates[c])t.dump="*ref_"+c;else{if(h&&u&&!t.usedDuplicates[c]&&(t.usedDuplicates[c]=!0),"[object Object]"===l)i&&0!==Object.keys(t.dump).length?(function(t,e,n,i){var s,o,a,l,c,u,h="",d=t.tag,f=Object.keys(n);if(!0===t.sortKeys)f.sort();else if("function"==typeof t.sortKeys)f.sort(t.sortKeys);else if(t.sortKeys)throw new r("sortKeys must be a boolean or a function");for(s=0,o=f.length;s1024)&&(t.dump&&10===t.dump.charCodeAt(0)?u+="?":u+="? "),u+=t.dump,c&&(u+=p(t,e)),S(t,e+1,l,!0,c)&&(t.dump&&10===t.dump.charCodeAt(0)?u+=":":u+=": ",h+=u+=t.dump));t.tag=d,t.dump=h||"{}"}(t,e,t.dump,s),u&&(t.dump="&ref_"+c+t.dump)):(function(t,e,n){var i,r,s,o,a,l="",c=t.tag,u=Object.keys(n);for(i=0,r=u.length;i1024&&(a+="? "),a+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),S(t,e,o,!1,!1)&&(l+=a+=t.dump));t.tag=c,t.dump="{"+l+"}"}(t,e,t.dump),u&&(t.dump="&ref_"+c+" "+t.dump));else if("[object Array]"===l){var d=t.noArrayIndent&&e>0?e-1:e;i&&0!==t.dump.length?(function(t,e,n,i){var r,s,o="",a=t.tag;for(r=0,s=n.length;r "+t.dump)}return!0}function k(t,e){var n,i,r=[],s=[];for(E(t,r,s),n=0,i=s.length;n=0?parseFloat((s.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((s.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),e.isOldIE=e.isIE&&e.isIE<9,e.isGecko=e.isMozilla=s.match(/ Gecko\/\d+/),e.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),e.isWebKit=parseFloat(s.split("WebKit/")[1])||void 0,e.isChrome=parseFloat(s.split(" Chrome/")[1])||void 0,e.isEdge=parseFloat(s.split(" Edge/")[1])||void 0,e.isAIR=s.indexOf("AdobeAIR")>=0,e.isAndroid=s.indexOf("Android")>=0,e.isChromeOS=s.indexOf(" CrOS ")>=0,e.isIOS=/iPad|iPhone|iPod/.test(s)&&!window.MSStream,e.isIOS&&(e.isMac=!0),e.isMobile=e.isIOS||e.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(t,e,n){"use strict";var i=t("./useragent");if(e.buildDom=function t(e,n,i){if("string"==typeof e&&e){var r=document.createTextNode(e);return n&&n.appendChild(r),r}if(!Array.isArray(e))return e&&e.appendChild&&n&&n.appendChild(e),e;if("string"!=typeof e[0]||!e[0]){for(var s=[],o=0;o=1.5,"undefined"!=typeof document){var r=document.createElement("div");e.HI_DPI&&void 0!==r.style.transform&&(e.HAS_CSS_TRANSFORMS=!0),i.isEdge||void 0===r.style.animationName||(e.HAS_CSS_ANIMATION=!0),r=null}e.translate=e.HAS_CSS_TRANSFORMS?function(t,e,n){t.style.transform="translate("+Math.round(e)+"px, "+Math.round(n)+"px)"}:function(t,e,n){t.style.top=Math.round(n)+"px",t.style.left=Math.round(e)+"px"}}),ace.define("ace/lib/oop",["require","exports","module"],function(t,e,n){"use strict";e.inherits=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})},e.mixin=function(t,e){for(var n in e)t[n]=e[n];return t},e.implement=function(t,n){e.mixin(t,n)}}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(t,e,n){"use strict";var i=t("./oop"),r=function(){var t,e,n={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(e in n.FUNCTION_KEYS)t=n.FUNCTION_KEYS[e].toLowerCase(),n[t]=parseInt(e,10);for(e in n.PRINTABLE_KEYS)t=n.PRINTABLE_KEYS[e].toLowerCase(),n[t]=parseInt(e,10);return i.mixin(n,n.MODIFIER_KEYS),i.mixin(n,n.PRINTABLE_KEYS),i.mixin(n,n.FUNCTION_KEYS),n.enter=n.return,n.escape=n.esc,n.del=n.delete,n[173]="-",function(){for(var t=["cmd","ctrl","alt","shift"],e=Math.pow(2,t.length);e--;)n.KEY_MODS[e]=t.filter(function(t){return e&n.KEY_MODS[t]}).join("-")+"-"}(),n.KEY_MODS[0]="",n.KEY_MODS[-1]="input-",n}();i.mixin(e,r),e.keyCodeToString=function(t){var e=r[t];return"string"!=typeof e&&(e=String.fromCharCode(t)),e.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(t,e,n){"use strict";var i,r=t("./keys"),s=t("./useragent"),o=null,a=0;function l(){return null==i&&function(){i=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){i={passive:!1}}})}catch(t){}}(),i}function c(t,e,n){this.elem=t,this.type=e,this.callback=n}c.prototype.destroy=function(){h(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var u=e.addListener=function(t,e,n,i){t.addEventListener(e,n,l()),i&&i.$toDestroy.push(new c(t,e,n))},h=e.removeListener=function(t,e,n){t.removeEventListener(e,n,l())};e.stopEvent=function(t){return e.stopPropagation(t),e.preventDefault(t),!1},e.stopPropagation=function(t){t.stopPropagation&&t.stopPropagation()},e.preventDefault=function(t){t.preventDefault&&t.preventDefault()},e.getButton=function(t){return"dblclick"==t.type?0:"contextmenu"==t.type||s.isMac&&t.ctrlKey&&!t.altKey&&!t.shiftKey?2:t.button},e.capture=function(t,e,n){var i=t&&t.ownerDocument||document;function r(t){e&&e(t),n&&n(t),h(i,"mousemove",e),h(i,"mouseup",r),h(i,"dragstart",r)}return u(i,"mousemove",e),u(i,"mouseup",r),u(i,"dragstart",r),r},e.addMouseWheelListener=function(t,e,n){"onmousewheel"in t?u(t,"mousewheel",function(t){void 0!==t.wheelDeltaX?(t.wheelX=-t.wheelDeltaX/8,t.wheelY=-t.wheelDeltaY/8):(t.wheelX=0,t.wheelY=-t.wheelDelta/8),e(t)},n):"onwheel"in t?u(t,"wheel",function(t){switch(t.deltaMode){case t.DOM_DELTA_PIXEL:t.wheelX=.35*t.deltaX||0,t.wheelY=.35*t.deltaY||0;break;case t.DOM_DELTA_LINE:case t.DOM_DELTA_PAGE:t.wheelX=5*(t.deltaX||0),t.wheelY=5*(t.deltaY||0)}e(t)},n):u(t,"DOMMouseScroll",function(t){t.axis&&t.axis==t.HORIZONTAL_AXIS?(t.wheelX=5*(t.detail||0),t.wheelY=0):(t.wheelX=0,t.wheelY=5*(t.detail||0)),e(t)},n)},e.addMultiMouseDownListener=function(t,n,i,r,o){var a,l,c,h=0,d={2:"dblclick",3:"tripleclick",4:"quadclick"};function f(t){if(0!==e.getButton(t)?h=0:t.detail>1?++h>4&&(h=1):h=1,s.isIE){var o=Math.abs(t.clientX-a)>5||Math.abs(t.clientY-l)>5;c&&!o||(h=1),c&&clearTimeout(c),c=setTimeout(function(){c=null},n[h-1]||600),1==h&&(a=t.clientX,l=t.clientY)}if(t._clicks=h,i[r]("mousedown",t),h>4)h=0;else if(h>1)return i[r](d[h],t)}Array.isArray(t)||(t=[t]),t.forEach(function(t){u(t,"mousedown",f,o)})};var d=function(t){return 0|(t.ctrlKey?1:0)|(t.altKey?2:0)|(t.shiftKey?4:0)|(t.metaKey?8:0)};function f(t,e,n){var i=d(e);if(!s.isMac&&o){if(e.getModifierState&&(e.getModifierState("OS")||e.getModifierState("Win"))&&(i|=8),o.altGr){if(3==(3&i))return;o.altGr=0}if(18===n||17===n){var l="location"in e?e.location:e.keyLocation;17===n&&1===l?1==o[n]&&(a=e.timeStamp):18===n&&3===i&&2===l&&e.timeStamp-a<50&&(o.altGr=!0)}}if(n in r.MODIFIER_KEYS&&(n=-1),i||13!==n||3!==(l="location"in e?e.location:e.keyLocation)||(t(e,i,-n),!e.defaultPrevented)){if(s.isChromeOS&&8&i){if(t(e,i,n),e.defaultPrevented)return;i&=-9}return!!(i||n in r.FUNCTION_KEYS||n in r.PRINTABLE_KEYS)&&t(e,i,n)}}function p(){o=Object.create(null)}if(e.getModifierString=function(t){return r.KEY_MODS[d(t)]},e.addCommandKeyListener=function(t,n,i){if(s.isOldGecko||s.isOpera&&!("KeyboardEvent"in window)){var r=null;u(t,"keydown",function(t){r=t.keyCode},i),u(t,"keypress",function(t){return f(n,t,r)},i)}else{var a=null;u(t,"keydown",function(t){o[t.keyCode]=(o[t.keyCode]||0)+1;var e=f(n,t,t.keyCode);return a=t.defaultPrevented,e},i),u(t,"keypress",function(t){a&&(t.ctrlKey||t.altKey||t.shiftKey||t.metaKey)&&(e.stopEvent(t),a=null)},i),u(t,"keyup",function(t){o[t.keyCode]=null},i),o||(p(),u(window,"focus",p))}},"object"==typeof window&&window.postMessage&&!s.isOldIE){var g=1;e.nextTick=function(t,n){n=n||window;var i="zero-timeout-message-"+g++,r=function(s){s.data==i&&(e.stopPropagation(s),h(n,"message",r),t())};u(n,"message",r),n.postMessage(i,"*")}}e.$idleBlocked=!1,e.onIdle=function(t,n){return setTimeout(function n(){e.$idleBlocked?setTimeout(n,100):t()},n)},e.$idleBlockId=null,e.blockIdle=function(t){e.$idleBlockId&&clearTimeout(e.$idleBlockId),e.$idleBlocked=!0,e.$idleBlockId=setTimeout(function(){e.$idleBlocked=!1},t||100)},e.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),e.nextFrame=e.nextFrame?e.nextFrame.bind(window):function(t){setTimeout(t,17)}}),ace.define("ace/range",["require","exports","module"],function(t,e,n){"use strict";var i=function(t,e,n,i){this.start={row:t,column:e},this.end={row:n,column:i}};(function(){this.isEqual=function(t){return this.start.row===t.start.row&&this.end.row===t.end.row&&this.start.column===t.start.column&&this.end.column===t.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(t,e){return 0==this.compare(t,e)},this.compareRange=function(t){var e,n=t.end,i=t.start;return 1==(e=this.compare(n.row,n.column))?1==(e=this.compare(i.row,i.column))?2:0==e?1:0:-1==e?-2:-1==(e=this.compare(i.row,i.column))?-1:1==e?42:0},this.comparePoint=function(t){return this.compare(t.row,t.column)},this.containsRange=function(t){return 0==this.comparePoint(t.start)&&0==this.comparePoint(t.end)},this.intersects=function(t){var e=this.compareRange(t);return-1==e||0==e||1==e},this.isEnd=function(t,e){return this.end.row==t&&this.end.column==e},this.isStart=function(t,e){return this.start.row==t&&this.start.column==e},this.setStart=function(t,e){"object"==typeof t?(this.start.column=t.column,this.start.row=t.row):(this.start.row=t,this.start.column=e)},this.setEnd=function(t,e){"object"==typeof t?(this.end.column=t.column,this.end.row=t.row):(this.end.row=t,this.end.column=e)},this.inside=function(t,e){return 0==this.compare(t,e)&&!this.isEnd(t,e)&&!this.isStart(t,e)},this.insideStart=function(t,e){return 0==this.compare(t,e)&&!this.isEnd(t,e)},this.insideEnd=function(t,e){return 0==this.compare(t,e)&&!this.isStart(t,e)},this.compare=function(t,e){return this.isMultiLine()||t!==this.start.row?tthis.end.row?1:this.start.row===t?e>=this.start.column?0:-1:this.end.row===t?e<=this.end.column?0:1:0:ethis.end.column?1:0},this.compareStart=function(t,e){return this.start.row==t&&this.start.column==e?-1:this.compare(t,e)},this.compareEnd=function(t,e){return this.end.row==t&&this.end.column==e?1:this.compare(t,e)},this.compareInside=function(t,e){return this.end.row==t&&this.end.column==e?1:this.start.row==t&&this.start.column==e?-1:this.compare(t,e)},this.clipRows=function(t,e){if(this.end.row>e)var n={row:e+1,column:0};else this.end.rowe)var r={row:e+1,column:0};else this.start.row0;)1&e&&(n+=t),(e>>=1)&&(t+=t);return n};var i=/^\s\s*/,r=/\s\s*$/;e.stringTrimLeft=function(t){return t.replace(i,"")},e.stringTrimRight=function(t){return t.replace(r,"")},e.copyObject=function(t){var e={};for(var n in t)e[n]=t[n];return e},e.copyArray=function(t){for(var e=[],n=0,i=t.length;nDate.now()-50)||(i=!1)},cancel:function(){i=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(t,e,n){"use strict";var i=t("../lib/event"),r=t("../lib/useragent"),s=t("../lib/dom"),o=t("../lib/lang"),a=t("../clipboard"),l=r.isChrome<18,c=r.isIE,u=r.isChrome>63,h=400,d=t("../lib/keys"),f=d.KEY_MODS,p=r.isIOS,g=p?/\s/:/\n/,m=r.isMobile;e.TextInput=function(t,e){var n=s.createElement("textarea");n.className="ace_text-input",n.setAttribute("wrap","off"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck",!1),n.style.opacity="0",t.insertBefore(n,t.firstChild);var v=!1,y=!1,b=!1,w=!1,x="";m||(n.style.fontSize="1px");var _=!1,C=!1,S="",k=0,E=0,A=0;try{var D=document.activeElement===n}catch(G){}i.addListener(n,"blur",function(t){C||(e.onBlur(t),D=!1)},e),i.addListener(n,"focus",function(t){if(!C){if(D=!0,r.isEdge)try{if(!document.hasFocus())return}catch(t){}e.onFocus(t),r.isEdge?setTimeout(T):T()}},e),this.$focusScroll=!1,this.focus=function(){if(x||u||"browser"==this.$focusScroll)return n.focus({preventScroll:!0});var t=n.style.top;n.style.position="fixed",n.style.top="0px";try{var e=0!=n.getBoundingClientRect().top}catch(G){return}var i=[];if(e)for(var r=n.parentElement;r&&1==r.nodeType;)i.push(r),r.setAttribute("ace_nocontext",!0),r=!r.parentElement&&r.getRootNode?r.getRootNode().host:r.parentElement;n.focus({preventScroll:!0}),e&&i.forEach(function(t){t.removeAttribute("ace_nocontext")}),setTimeout(function(){n.style.position="","0px"==n.style.top&&(n.style.top=t)},0)},this.blur=function(){n.blur()},this.isFocused=function(){return D},e.on("beforeEndOperation",function(){var t=e.curOp,i=t&&t.command&&t.command.name;"insertstring"!=i&&(b&&i&&(t.docChanged||t.selectionChanged)&&(S=n.value="",U()),T())});var T=p?function(t){if(D&&(!v||t)&&!w){t||(t="");var i="\n ab"+t+"cde fg\n";i!=n.value&&(n.value=S=i);var r=4+(t.length||(e.selection.isEmpty()?0:1));4==k&&E==r||n.setSelectionRange(4,r),k=4,E=r}}:function(){if(!b&&!w&&(D||F)){b=!0;var t=0,i=0,r="";if(e.session){var s=e.selection,o=s.getRange(),a=s.cursor.row;if(t=o.start.column,i=o.end.column,r=e.session.getLine(a),o.start.row!=a){var l=e.session.getLine(a-1);t=o.start.rowa+1?c.length:i,i+=r.length+1,r=r+"\n"+c}else m&&a>0&&(r="\n"+r,i+=1,t+=1);r.length>h&&(t0&&S[d]==t[d];)d++,a--;for(c=c.slice(d),d=1;l>0&&S.length-d>k-1&&S[S.length-d]==t[t.length-d];)d++,l--;u-=d-1,h-=d-1;var f=c.length-d+1;if(f<0&&(a=-f,f=0),c=c.slice(0,f),!(i||c||u||a||l||h))return"";w=!0;var p=!1;return r.isAndroid&&". "==c&&(c=" ",p=!0),c&&!a&&!l&&!u&&!h||_?e.onTextInput(c):e.onTextInput(c,{extendLeft:a,extendRight:l,restoreStart:u,restoreEnd:h}),w=!1,S=t,k=s,E=o,A=h,p?"\n":c},L=function(t){if(b)return B();if(t&&t.inputType){if("historyUndo"==t.inputType)return e.execCommand("undo");if("historyRedo"==t.inputType)return e.execCommand("redo")}var i=n.value,r=M(i,!0);(i.length>500||g.test(r)||m&&k<1&&k==E)&&T()},$=function(t,e,n){var i=t.clipboardData||window.clipboardData;if(i&&!l){var r=c||n?"Text":"text/plain";try{return e?!1!==i.setData(r,e):i.getData(r)}catch(t){if(!n)return $(t,e,!0)}}},O=function(t,r){var s=e.getCopyText();if(!s)return i.preventDefault(t);$(t,s)?(p&&(T(s),v=s,setTimeout(function(){v=!1},10)),r?e.onCut():e.onCopy(),i.preventDefault(t)):(v=!0,n.value=s,n.select(),setTimeout(function(){v=!1,T(),r?e.onCut():e.onCopy()}))},I=function(t){O(t,!0)},N=function(t){O(t,!1)},P=function(t){var s=$(t);a.pasteCancelled()||("string"==typeof s?(s&&e.onPaste(s,t),r.isIE&&setTimeout(T),i.preventDefault(t)):(n.value="",y=!0))};i.addCommandKeyListener(n,e.onCommandKey.bind(e),e),i.addListener(n,"select",function(t){b||(v?v=!1:function(t){return 0===t.selectionStart&&t.selectionEnd>=S.length&&t.value===S&&S&&t.selectionEnd!==E}(n)?(e.selectAll(),T()):m&&n.selectionStart!=k&&T())},e),i.addListener(n,"input",L,e),i.addListener(n,"cut",I,e),i.addListener(n,"copy",N,e),i.addListener(n,"paste",P,e),"oncut"in n&&"oncopy"in n&&"onpaste"in n||i.addListener(t,"keydown",function(t){if((!r.isMac||t.metaKey)&&t.ctrlKey)switch(t.keyCode){case 67:N(t);break;case 86:P(t);break;case 88:I(t)}},e);var B=function(){if(b&&e.onCompositionUpdate&&!e.$readOnly){if(_)return V();b.useTextareaForIME?e.onCompositionUpdate(n.value):(M(n.value),b.markerRange&&(b.context&&(b.markerRange.start.column=b.selectionStart=b.context.compositionStartOffset),b.markerRange.end.column=b.markerRange.start.column+E-b.selectionStart+A))}},U=function(t){e.onCompositionEnd&&!e.$readOnly&&(b=!1,e.onCompositionEnd(),e.off("mousedown",V),t&&L())};function V(){C=!0,n.blur(),n.focus(),C=!1}var H,j=o.delayedCall(B,50).schedule.bind(null,null);function z(){clearTimeout(H),H=setTimeout(function(){x&&(n.style.cssText=x,x=""),e.renderer.$isMousePressed=!1,e.renderer.$keepTextAreaAtCursor&&e.renderer.$moveTextAreaToCursor()},0)}i.addListener(n,"compositionstart",function(t){if(!b&&e.onCompositionStart&&!e.$readOnly&&(b={},!_)){t.data&&(b.useTextareaForIME=!1),setTimeout(B,0),e._signal("compositionStart"),e.on("mousedown",V);var i=e.getSelectionRange();i.end.row=i.start.row,i.end.column=i.start.column,b.markerRange=i,b.selectionStart=k,e.onCompositionStart(b),b.useTextareaForIME?(S=n.value="",k=0,E=0):(n.msGetInputContext&&(b.context=n.msGetInputContext()),n.getInputContext&&(b.context=n.getInputContext()))}},e),i.addListener(n,"compositionupdate",B,e),i.addListener(n,"keyup",function(t){27==t.keyCode&&n.value.lengthE&&"\n"==S[s]?o=d.end:iE&&S.slice(0,s).split("\n").length>2?o=d.down:s>E&&" "==S[s-1]?(o=d.right,a=f.option):(s>E||s==E&&E!=k&&i==s)&&(o=d.right),i!==s&&(a|=f.shift),o){if(!e.onCommandKey({},a,o)&&e.commands){o=d.keyCodeToString(o);var l=e.commands.findKeyCommand(a,o);l&&e.execCommand(l)}k=i,E=s,T("")}}};document.addEventListener("selectionchange",s),e.on("destroy",function(){document.removeEventListener("selectionchange",s)})}(0,e,n)},e.$setUserAgentForTests=function(t,e){m=t,p=e}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(t,e,n){"use strict";var i=t("../lib/useragent");function r(t){t.$clickSelection=null;var e=t.editor;e.setDefaultHandler("mousedown",this.onMouseDown.bind(t)),e.setDefaultHandler("dblclick",this.onDoubleClick.bind(t)),e.setDefaultHandler("tripleclick",this.onTripleClick.bind(t)),e.setDefaultHandler("quadclick",this.onQuadClick.bind(t)),e.setDefaultHandler("mousewheel",this.onMouseWheel.bind(t)),["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach(function(e){t[e]=this[e]},this),t.selectByLines=this.extendSelectionBy.bind(t,"getLineRange"),t.selectByWords=this.extendSelectionBy.bind(t,"getWordRange")}function s(t,e){if(t.start.row==t.end.row)var n=2*e.column-t.start.column-t.end.column;else n=t.start.row!=t.end.row-1||t.start.column||t.end.column?2*e.row-t.start.row-t.end.row:e.column-4;return n<0?{cursor:t.start,anchor:t.end}:{cursor:t.end,anchor:t.start}}(function(){this.onMouseDown=function(t){var e=t.inSelection(),n=t.getDocumentPosition();this.mousedownEvent=t;var r=this.editor,s=t.getButton();return 0!==s?((r.getSelectionRange().isEmpty()||1==s)&&r.selection.moveToPosition(n),void(2==s&&(r.textInput.onContextMenu(t.domEvent),i.isMozilla||t.preventDefault()))):(this.mousedownEvent.time=Date.now(),!e||r.isFocused()||(r.focus(),!this.$focusTimeout||this.$clickSelection||r.inMultiSelectMode)?(this.captureMouse(t),this.startSelect(n,t.domEvent._clicks>1),t.preventDefault()):(this.setState("focusWait"),void this.captureMouse(t)))},this.startSelect=function(t,e){t=t||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(t):e||n.selection.moveToPosition(t),e||this.select(),n.renderer.scroller.setCapture&&n.renderer.scroller.setCapture(),n.setStyle("ace_selecting"),this.setState("select"))},this.select=function(){var t,e=this.editor,n=e.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var i=this.$clickSelection.comparePoint(n);if(-1==i)t=this.$clickSelection.end;else if(1==i)t=this.$clickSelection.start;else{var r=s(this.$clickSelection,n);n=r.cursor,t=r.anchor}e.selection.setSelectionAnchor(t.row,t.column)}e.selection.selectToPosition(n),e.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(t){var e,n=this.editor,i=n.renderer.screenToTextCoordinates(this.x,this.y),r=n.selection[t](i.row,i.column);if(this.$clickSelection){var o=this.$clickSelection.comparePoint(r.start),a=this.$clickSelection.comparePoint(r.end);if(-1==o&&a<=0)e=this.$clickSelection.end,r.end.row==i.row&&r.end.column==i.column||(i=r.start);else if(1==a&&o>=0)e=this.$clickSelection.start,r.start.row==i.row&&r.start.column==i.column||(i=r.end);else if(-1==o&&1==a)i=r.end,e=r.start;else{var l=s(this.$clickSelection,i);i=l.cursor,e=l.anchor}n.selection.setSelectionAnchor(e.row,e.column)}n.selection.selectToPosition(i),n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var t,e,n=(t=this.mousedownEvent.y,e=this.y,Math.sqrt(Math.pow(this.x-this.mousedownEvent.x,2)+Math.pow(e-t,2))),i=Date.now();(n>0||i-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(t){var e=t.getDocumentPosition(),n=this.editor,i=n.session.getBracketRange(e);i?(i.isEmpty()&&(i.start.column--,i.end.column++),this.setState("select")):(i=n.selection.getWordRange(e.row,e.column),this.setState("selectByWords")),this.$clickSelection=i,this.select()},this.onTripleClick=function(t){var e=t.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var i=n.getSelectionRange();i.isMultiLine()&&i.contains(e.row,e.column)?(this.$clickSelection=n.selection.getLineRange(i.start.row),this.$clickSelection.end=n.selection.getLineRange(i.end.row).end):this.$clickSelection=n.selection.getLineRange(e.row),this.select()},this.onQuadClick=function(t){var e=this.editor;e.selectAll(),this.$clickSelection=e.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(t){if(!t.getAccelKey()){t.getShiftKey()&&t.wheelY&&!t.wheelX&&(t.wheelX=t.wheelY,t.wheelY=0);var e=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,i=t.domEvent.timeStamp,r=i-n.t,s=r?t.wheelX/r:n.vx,o=r?t.wheelY/r:n.vy;r<550&&(s=(s+n.vx)/2,o=(o+n.vy)/2);var a=Math.abs(s/o),l=!1;return a>=1&&e.renderer.isScrollableBy(t.wheelX*t.speed,0)&&(l=!0),a<=1&&e.renderer.isScrollableBy(0,t.wheelY*t.speed)&&(l=!0),l?n.allowed=i:i-n.allowed<550&&(Math.abs(s)<=1.5*Math.abs(n.vx)&&Math.abs(o)<=1.5*Math.abs(n.vy)?(l=!0,n.allowed=i):n.allowed=0),n.t=i,n.vx=s,n.vy=o,l?(e.renderer.scrollBy(t.wheelX*t.speed,t.wheelY*t.speed),t.stop()):void 0}}}).call(r.prototype),e.DefaultHandlers=r}),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(t,e,n){"use strict";t("./lib/oop");var i=t("./lib/dom");function r(t){this.isOpen=!1,this.$element=null,this.$parentNode=t}(function(){this.$init=function(){return this.$element=i.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(t){this.getElement().textContent=t},this.setHtml=function(t){this.getElement().innerHTML=t},this.setPosition=function(t,e){this.getElement().style.left=t+"px",this.getElement().style.top=e+"px"},this.setClassName=function(t){i.addCssClass(this.getElement(),t)},this.show=function(t,e,n){null!=t&&this.setText(t),null!=e&&null!=n&&this.setPosition(e,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(r.prototype),e.Tooltip=r}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],function(t,e,n){"use strict";var i=t("../lib/dom"),r=t("../lib/oop"),s=t("../lib/event"),o=t("../tooltip").Tooltip;function a(t){o.call(this,t)}r.inherits(a,o),(function(){this.setPosition=function(t,e){var n=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,r=this.getWidth(),s=this.getHeight();(t+=15)+r>n&&(t-=t+r-n),(e+=15)+s>i&&(e-=20+s),o.prototype.setPosition.call(this,t,e)}}).call(a.prototype),e.GutterHandler=function(t){var e,n,r,o=t.editor,l=o.renderer.$gutterLayer,c=new a(o.container);function u(){e&&(e=clearTimeout(e)),r&&(c.hide(),r=null,o._signal("hideGutterTooltip",c),o.off("mousewheel",u))}function h(t){c.setPosition(t.x,t.y)}t.editor.setDefaultHandler("guttermousedown",function(e){if(o.isFocused()&&0==e.getButton()&&"foldWidgets"!=l.getRegion(e)){var n=e.getDocumentPosition().row,i=o.session.selection;if(e.getShiftKey())i.selectTo(n,0);else{if(2==e.domEvent.detail)return o.selectAll(),e.preventDefault();t.$clickSelection=o.selection.getLineRange(n)}return t.setState("selectByLines"),t.captureMouse(e),e.preventDefault()}}),t.editor.setDefaultHandler("guttermousemove",function(s){if(i.hasCssClass(s.domEvent.target||s.domEvent.srcElement,"ace_fold-widget"))return u();r&&t.$tooltipFollowsMouse&&h(s),n=s,e||(e=setTimeout(function(){e=null,n&&!t.isMousePressed?function(){var e=n.getDocumentPosition().row,i=l.$annotations[e];if(!i)return u();if(e==o.session.getLength()){var s=o.renderer.pixelToScreenCoordinates(0,n.y).row,a=n.$pos;if(s>o.session.documentToScreenRow(a.row,a.column))return u()}if(r!=i)if(r=i.text.join("
"),c.setHtml(r),c.show(),o._signal("showGutterTooltip",c),o.on("mousewheel",u),t.$tooltipFollowsMouse)h(n);else{var d=n.domEvent.target.getBoundingClientRect(),f=c.getElement().style;f.left=d.right+"px",f.top=d.bottom+"px"}}():u()},50))}),s.addListener(o.renderer.$gutter,"mouseout",function(t){n=null,r&&!e&&(e=setTimeout(function(){e=null,u()},50))},o),o.on("changeSession",u)}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(t,e,n){"use strict";var i=t("../lib/event"),r=t("../lib/useragent"),s=e.MouseEvent=function(t,e){this.domEvent=t,this.editor=e,this.x=this.clientX=t.clientX,this.y=this.clientY=t.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){i.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){i.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var t=this.editor.getSelectionRange();if(t.isEmpty())this.$inSelection=!1;else{var e=this.getDocumentPosition();this.$inSelection=t.contains(e.row,e.column)}return this.$inSelection},this.getButton=function(){return i.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=r.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(s.prototype)}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(t,e,n){"use strict";var i=t("../lib/dom"),r=t("../lib/event"),s=t("../lib/useragent");function o(t){var e=t.editor,n=i.createElement("img");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",s.isOpera&&(n.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;"),["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach(function(e){t[e]=this[e]},this),e.on("mousedown",this.onMouseDown.bind(t));var o,l,c,u,h,d,f,p,g,m,v,y=e.container,b=0;function w(){var t=d;(function(t,n){var i=Date.now();m&&n&&t.row==n.row&&n&&t.column==n.column?a(v.x,v.y,l,c)>5?m=null:i-m>=200&&(e.renderer.scrollCursorIntoView(),m=null):(e.moveCursorToPosition(t),m=i,v={x:l,y:c})})(d=e.renderer.screenToTextCoordinates(l,c),t),function(t,n){var i=Date.now(),r=e.renderer.layerConfig.lineHeight,s=e.renderer.layerConfig.characterWidth,o=e.renderer.scroller.getBoundingClientRect(),a={x:{left:l-o.left,right:o.right-l},y:{top:c-o.top,bottom:o.bottom-c}},u=Math.min(a.x.left,a.x.right),h=Math.min(a.y.top,a.y.bottom),d={row:t.row,column:t.column};u/s<=2&&(d.column+=a.x.left=200&&e.renderer.scrollCursorIntoView(d):g=i:g=null}(d,t)}function x(){h=e.selection.toOrientedRange(),o=e.session.addMarker(h,"ace_selection",e.getSelectionStyle()),e.clearSelection(),e.isFocused()&&e.renderer.$cursorLayer.setBlinking(!1),clearInterval(u),w(),u=setInterval(w,20),b=0,r.addListener(document,"mousemove",S)}function _(){clearInterval(u),e.session.removeMarker(o),o=null,e.selection.fromOrientedRange(h),e.isFocused()&&!p&&e.$resetCursorStyle(),h=null,d=null,b=0,g=null,m=null,r.removeListener(document,"mousemove",S)}this.onDragStart=function(t){if(this.cancelDrag||!y.draggable){var i=this;return setTimeout(function(){i.startSelect(),i.captureMouse(t)},0),t.preventDefault()}h=e.getSelectionRange();var r=t.dataTransfer;r.effectAllowed=e.getReadOnly()?"copy":"copyMove",s.isOpera&&(e.container.appendChild(n),n.scrollTop=0),r.setDragImage&&r.setDragImage(n,0,0),s.isOpera&&e.container.removeChild(n),r.clearData(),r.setData("Text",e.session.getTextRange()),p=!0,this.setState("drag")},this.onDragEnd=function(t){y.draggable=!1,p=!1,this.setState(null),e.getReadOnly()||(f||"move"!=t.dataTransfer.dropEffect||e.session.remove(e.getSelectionRange()),e.$resetCursorStyle()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(t){if(!e.getReadOnly()&&k(t.dataTransfer))return l=t.clientX,c=t.clientY,o||x(),b++,t.dataTransfer.dropEffect=f=E(t),r.preventDefault(t)},this.onDragOver=function(t){if(!e.getReadOnly()&&k(t.dataTransfer))return l=t.clientX,c=t.clientY,o||(x(),b++),null!==C&&(C=null),t.dataTransfer.dropEffect=f=E(t),r.preventDefault(t)},this.onDragLeave=function(t){if(--b<=0&&o)return _(),f=null,r.preventDefault(t)},this.onDrop=function(t){if(d){var n=t.dataTransfer;if(p)switch(f){case"move":h=h.contains(d.row,d.column)?{start:d,end:d}:e.moveText(h,d);break;case"copy":h=e.moveText(h,d,!0)}else{var i=n.getData("Text");h={start:d,end:e.session.insert(d,i)},e.focus(),f=null}return _(),r.preventDefault(t)}},r.addListener(y,"dragstart",this.onDragStart.bind(t),e),r.addListener(y,"dragend",this.onDragEnd.bind(t),e),r.addListener(y,"dragenter",this.onDragEnter.bind(t),e),r.addListener(y,"dragover",this.onDragOver.bind(t),e),r.addListener(y,"dragleave",this.onDragLeave.bind(t),e),r.addListener(y,"drop",this.onDrop.bind(t),e);var C=null;function S(){null==C&&(C=setTimeout(function(){null!=C&&o&&_()},20))}function k(t){var e=t.types;return!e||Array.prototype.some.call(e,function(t){return"text/plain"==t||"Text"==t})}function E(t){var e=["copy","copymove","all","uninitialized"],n=s.isMac?t.altKey:t.ctrlKey,i="uninitialized";try{i=t.dataTransfer.effectAllowed.toLowerCase()}catch(t){}var r="none";return n&&e.indexOf(i)>=0?r="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(i)>=0?r="move":e.indexOf(i)>=0&&(r="copy"),r}}function a(t,e,n,i){return Math.sqrt(Math.pow(n-t,2)+Math.pow(i-e,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(t){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var t=this.editor;t.container.draggable=!0,t.renderer.$cursorLayer.setBlinking(!1),t.setStyle("ace_dragging"),t.renderer.setCursorStyle(s.isWin?"default":"move"),this.setState("dragReady")},this.onMouseDrag=function(t){var e=this.editor.container;s.isIE&&"dragReady"==this.state&&a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&e.dragDrop(),"dragWait"===this.state&&a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))},this.onMouseDown=function(t){if(this.$dragEnabled){this.mousedownEvent=t;var e=this.editor,n=t.inSelection(),i=t.getButton();if(1===(t.domEvent.detail||1)&&0===i&&n){if(t.editor.inMultiSelectMode&&(t.getAccelKey()||t.getShiftKey()))return;this.mousedownEvent.time=Date.now();var r=t.domEvent.target||t.domEvent.srcElement;"unselectable"in r&&(r.unselectable="on"),e.getDragDelay()?(s.isWebKit&&(this.cancelDrag=!0,e.container.draggable=!0),this.setState("dragWait")):this.startDrag(),this.captureMouse(t,this.onMouseDrag.bind(this)),t.defaultPrevented=!0}}}}).call(o.prototype),e.DragdropHandler=o}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(t,e,n){"use strict";var i=t("./mouse_event").MouseEvent,r=t("../lib/event"),s=t("../lib/dom");e.addTouchListeners=function(t,e){var n,o,a,l,c,u,h,d,f,p="scroll",g=0,m=0,v=0,y=0;function b(){var t,n,i;f||(t=window.navigator&&window.navigator.clipboard,n=!1,i=function(i){var r,o,a=i.target.getAttribute("action");if("more"==a||!n)return n=!n,r=e.getCopyText(),o=e.session.getUndoManager().hasUndo(),void f.replaceChild(s.buildDom(n?["span",!r&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],r&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],r&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],t&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],o&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Pallete"]]:["span"]),f.firstChild);"paste"==a?t.readText().then(function(t){e.execCommand(a,t)}):a&&("cut"!=a&&"copy"!=a||(t?t.writeText(e.getCopyText()):document.execCommand("copy")),e.execCommand(a)),f.firstChild.style.display="none",n=!1,"openCommandPallete"!=a&&e.focus()},f=s.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(t){p="menu",t.stopPropagation(),t.preventDefault(),e.textInput.focus()},ontouchend:function(t){t.stopPropagation(),t.preventDefault(),i(t)},onclick:i},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],e.container));var r=e.selection.cursor,o=e.renderer.textToScreenCoordinates(r.row,r.column),a=e.renderer.textToScreenCoordinates(0,0).pageX,l=e.renderer.scrollLeft,c=e.container.getBoundingClientRect();f.style.top=o.pageY-c.top-3+"px",o.pageX-c.left1)return clearTimeout(c),c=null,a=-1,void(p="zoom");d=e.$mouseHandler.isMousePressed=!0;var s=e.renderer.layerConfig.lineHeight,u=e.renderer.layerConfig.lineHeight,f=t.timeStamp;l=f;var b=r[0],w=b.clientX,_=b.clientY;Math.abs(n-w)+Math.abs(o-_)>s&&(a=-1),n=t.clientX=w,o=t.clientY=_,v=y=0;var C=new i(t,e);if(h=C.getDocumentPosition(),f-a<500&&1==r.length&&!g)m++,t.preventDefault(),t.button=0,function(){c=null,clearTimeout(c),e.selection.moveToPosition(h);var t=m>=2?e.selection.getLineRange(h.row):e.session.getBracketRange(h);t&&!t.isEmpty()?e.selection.setRange(t):e.selection.selectWord(),p="wait"}();else{m=0;var S=e.selection.cursor,k=e.selection.isEmpty()?S:e.selection.anchor,E=e.renderer.$cursorLayer.getPixelPosition(S,!0),A=e.renderer.$cursorLayer.getPixelPosition(k,!0),D=e.renderer.scroller.getBoundingClientRect(),T=e.renderer.layerConfig.offset,R=e.renderer.scrollLeft,F=function(t,e){return(t/=u)*t+(e=e/s-.75)*e};if(t.clientXL?"cursor":"anchor"),p=L<3.5?"anchor":M<3.5?"cursor":"scroll",c=setTimeout(x,450)}a=f},e),r.addListener(t,"touchend",function(t){d=e.$mouseHandler.isMousePressed=!1,u&&clearInterval(u),"zoom"==p?(p="",g=0):c?(e.selection.moveToPosition(h),g=0,b()):"scroll"==p?(g+=60,u=setInterval(function(){g--<=0&&(clearInterval(u),u=null),Math.abs(v)<.01&&(v=0),Math.abs(y)<.01&&(y=0),g<20&&(v*=.9),g<20&&(y*=.9);var t=e.session.getScrollTop();e.renderer.scrollBy(10*v,10*y),t==e.session.getScrollTop()&&(g=0)},10),w()):b(),clearTimeout(c),c=null},e),r.addListener(t,"touchmove",function(t){c&&(clearTimeout(c),c=null);var r=t.touches;if(!(r.length>1||"zoom"==p)){var s=r[0],a=n-s.clientX,u=o-s.clientY;if("wait"==p){if(!(a*a+u*u>4))return t.preventDefault();p="cursor"}n=s.clientX,o=s.clientY,t.clientX=s.clientX,t.clientY=s.clientY;var h=t.timeStamp,d=h-l;if(l=h,"scroll"==p){var f=new i(t,e);f.speed=1,f.wheelX=a,f.wheelY=u,10*Math.abs(a)1&&(r=n[n.length-2]);var o=l[e+"Path"];return null==o?o=l.basePath:"/"==i&&(e=i=""),o&&"/"!=o.slice(-1)&&(o+="/"),o+e+i+r+this.get("suffix")},e.setModuleUrl=function(t,e){return l.$moduleUrls[t]=e},e.$loading={},e.loadModule=function(n,i){var r,o;Array.isArray(n)&&(o=n[0],n=n[1]);try{r=t(n)}catch(l){}if(r&&!e.$loading[n])return i&&i(r);if(e.$loading[n]||(e.$loading[n]=[]),e.$loading[n].push(i),!(e.$loading[n].length>1)){var a=function(){t([n],function(t){e._emit("load.module",{name:n,module:t});var i=e.$loading[n];e.$loading[n]=null,i.forEach(function(e){e&&e(t)})})};if(!e.get("packaged"))return a();s.loadScript(e.moduleUrl(n,o),a),c()}};var c=function(){l.basePath||l.workerPath||l.modePath||l.themePath||Object.keys(l.$moduleUrls).length||(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),c=function(){})};function u(r){if(a&&a.document){l.packaged=r||t.packaged||i.packaged||a.define&&n("B9Yq").packaged;for(var s,o={},c="",u=document.currentScript||document._currentScript,h=(u&&u.ownerDocument||document).getElementsByTagName("script"),d=0;d=t){for(s=h+1;s=t;)s++;for(a=h,l=s-1;a=e.length||2!=(l=n[r-1])&&3!=l||2!=(c=e[r+1])&&3!=c?4:(s&&(c=3),c==l?c:4);case 10:return 2==(l=r>0?n[r-1]:5)&&r+10&&2==n[r-1])return 2;if(s)return 4;for(f=r+1,d=e.length;f=1425&&g<=2303||64286==g)&&(1==l||7==l))return 1}return r<1||5==(l=e[r-1])?4:n[r-1];case 5:return s=!1,o=!0,i;case 6:return a=!0,4;case 13:case 14:case 16:case 17:case 15:s=!1;case h:return 4}}function m(t){var e=t.charCodeAt(0),n=e>>8;return 0==n?e>191?0:d[e]:5==n?/[\u0591-\u05f4]/.test(t)?1:0:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(t)?12:/[\u0660-\u0669\u066b-\u066c]/.test(t)?3:1642==e?u:/[\u06f0-\u06f9]/.test(t)?2:7:32==n&&e<=8287?f[255&e]:254==n&&e>=65136?7:4}e.L=0,e.R=1,e.EN=2,e.ON_R=3,e.AN=4,e.R_H=5,e.B=6,e.RLE=7,e.DOT="\xb7",e.doBidiReorder=function(t,n,u){if(t.length<2)return{};var d=t.split(""),f=new Array(d.length),v=new Array(d.length),y=[];i=u?1:0,function(t,e,n,u){var h=i?c:l,d=null,f=null,p=null,v=0,y=null,b=-1,w=null,x=null,_=[];if(!u)for(w=0,u=[];w0)if(16==y){for(w=b;w-1){for(w=b;w=0&&8==u[C];C--)e[C]=i}}(d,y,d.length,n);for(var b=0;b7&&n[b]<13||4===n[b]||n[b]===h)?y[b]=e.ON_R:b>0&&"\u0644"===d[b-1]&&/\u0622|\u0623|\u0625|\u0627/.test(d[b])&&(y[b-1]=y[b]=e.R_H,b++);for(d[d.length-1]===e.DOT&&(y[d.length-1]=e.B),"\u202b"===d[0]&&(y[0]=e.RLE),b=0;b=0&&(t=this.session.$docRowCache[n])}return t},this.getSplitIndex=function(){var t=0,e=this.session.$screenRowCache;if(e.length)for(var n,i=this.session.$getRowCacheIndex(e,this.currentRow);this.currentRow-t>0&&(n=this.session.$getRowCacheIndex(e,this.currentRow-t-1))===i;)i=n,t++;else t=this.currentRow;return t},this.updateRowLine=function(t,e){void 0===t&&(t=this.getDocumentRow());var n=t===this.session.getLength()-1?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(t),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var s=this.session.$wrapData[t];s&&(void 0===e&&(e=this.getSplitIndex()),e>0&&s.length?(this.wrapIndent=s.indent,this.wrapOffset=this.wrapIndent*this.charWidths[i.L],this.line=ee?this.session.getOverwrite()?t:t-1:e,r=i.getVisualFromLogicalIdx(n,this.bidiMap),s=this.bidiMap.bidiLevels,o=0;!this.session.getOverwrite()&&t<=e&&s[r]%2!=0&&r++;for(var a=0;ae&&s[r]%2==0&&(o+=this.charWidths[s[r]]),this.wrapIndent&&(o+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(o+=this.rtlLineOffset),o},this.getSelections=function(t,e){var n,i=this.bidiMap,r=i.bidiLevels,s=[],o=0,a=Math.min(t,e)-this.wrapIndent,l=Math.max(t,e)-this.wrapIndent,c=!1,u=!1,h=0;this.wrapIndent&&(o+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var d,f=0;f=a&&dn+s/2;){if(n+=s,i===r.length-1){s=0;break}s=this.charWidths[r[++i]]}return i>0&&r[i-1]%2!=0&&r[i]%2==0?(t0&&r[i-1]%2==0&&r[i]%2!=0?e=1+(t>n?this.bidiMap.logicalFromVisual[i]:this.bidiMap.logicalFromVisual[i-1]):this.isRtlDir&&i===r.length-1&&0===s&&r[i-1]%2==0||!this.isRtlDir&&0===i&&r[i]%2!=0?e=1+this.bidiMap.logicalFromVisual[i]:(i>0&&r[i-1]%2!=0&&0!==s&&i--,e=this.bidiMap.logicalFromVisual[i]),0===e&&this.isRtlDir&&e++,e+this.wrapIndent}}).call(o.prototype),e.BidiHandler=o}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(t,e,n){"use strict";var i=t("./lib/oop"),r=t("./lib/lang"),s=t("./lib/event_emitter").EventEmitter,o=t("./range").Range,a=function(t){this.session=t,this.doc=t.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var e=this;this.cursor.on("change",function(t){e.$cursorChanged=!0,e.$silent||e._emit("changeCursor"),e.$isEmpty||e.$silent||e._emit("changeSelection"),e.$keepDesiredColumnOnChange||t.old.column==t.value.column||(e.$desiredColumn=null)}),this.anchor.on("change",function(){e.$anchorChanged=!0,e.$isEmpty||e.$silent||e._emit("changeSelection")})};(function(){i.implement(this,s),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(t,e){this.$isEmpty=!1,this.anchor.setPosition(t,e)},this.getAnchor=this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var t=this.anchor,e=this.lead;return t.row>e.row||t.row==e.row&&t.column>e.column},this.getRange=function(){var t=this.anchor,e=this.lead;return this.$isEmpty?o.fromPoints(e,e):this.isBackwards()?o.fromPoints(e,t):o.fromPoints(t,e)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(t,e){var n=e?t.end:t.start,i=e?t.start:t.end;this.$setSelection(n.row,n.column,i.row,i.column)},this.$setSelection=function(t,e,n,i){if(!this.$silent){var r=this.$isEmpty,s=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(t,e),this.cursor.setPosition(n,i),this.$isEmpty=!o.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||r!=this.$isEmpty||s)&&this._emit("changeSelection")}},this.$moveSelection=function(t){var e=this.lead;this.$isEmpty&&this.setSelectionAnchor(e.row,e.column),t.call(this)},this.selectTo=function(t,e){this.$moveSelection(function(){this.moveCursorTo(t,e)})},this.selectToPosition=function(t){this.$moveSelection(function(){this.moveCursorToPosition(t)})},this.moveTo=function(t,e){this.clearSelection(),this.moveCursorTo(t,e)},this.moveToPosition=function(t){this.clearSelection(),this.moveCursorToPosition(t)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(t,e){if(void 0===e){var n=t||this.lead;t=n.row,e=n.column}return this.session.getWordRange(t,e)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var t=this.getCursor(),e=this.session.getAWordRange(t.row,t.column);this.setSelectionRange(e)},this.getLineRange=function(t,e){var n,i="number"==typeof t?t:this.lead.row,r=this.session.getFoldLine(i);return r?(i=r.start.row,n=r.end.row):n=i,!0===e?new o(i,0,n,this.session.getLine(n).length):new o(i,0,n+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(t,e,n){var i=t.column,r=t.column+e;return n<0&&(i=t.column-e,r=t.column),this.session.isTabStop(t)&&this.doc.getLine(t.row).slice(i,r).split(" ").length-1==e},this.moveCursorLeft=function(){var t,e=this.lead.getPosition();if(t=this.session.getFoldAt(e.row,e.column,-1))this.moveCursorTo(t.start.row,t.start.column);else if(0===e.column)e.row>0&&this.moveCursorTo(e.row-1,this.doc.getLine(e.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(e,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var t,e=this.lead.getPosition();if(t=this.session.getFoldAt(e.row,e.column,1))this.moveCursorTo(t.end.row,t.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(e.column=i)}}this.moveCursorTo(e.row,e.column)},this.moveCursorFileEnd=function(){var t=this.doc.getLength()-1,e=this.doc.getLine(t).length;this.moveCursorTo(t,e)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var t=this.lead.row,e=this.lead.column,n=this.doc.getLine(t),i=n.substring(e);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var r=this.session.getFoldAt(t,e,1);if(r)this.moveCursorTo(r.end.row,r.end.column);else{if(this.session.nonTokenRe.exec(i)&&(e+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=n.substring(e)),e>=n.length)return this.moveCursorTo(t,n.length),this.moveCursorRight(),void(t0&&this.moveCursorWordLeft());this.session.tokenRe.exec(s)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,n)}},this.$shortWordEndIndex=function(t){var e,n=0,i=/\s/,r=this.session.tokenRe;if(r.lastIndex=0,this.session.tokenRe.exec(t))n=this.session.tokenRe.lastIndex;else{for(;(e=t[n])&&i.test(e);)n++;if(n<1)for(r.lastIndex=0;(e=t[n])&&!r.test(e);)if(r.lastIndex=0,n++,i.test(e)){if(n>2){n--;break}for(;(e=t[n])&&i.test(e);)n++;if(n>2)break}}return r.lastIndex=0,n},this.moveCursorShortWordRight=function(){var t=this.lead.row,e=this.lead.column,n=this.doc.getLine(t),i=n.substring(e),r=this.session.getFoldAt(t,e,1);if(r)return this.moveCursorTo(r.end.row,r.end.column);if(e==n.length){var s=this.doc.getLength();do{t++,i=this.doc.getLine(t)}while(t0&&/^\s*$/.test(i));n=i.length,/\s+$/.test(i)||(i="")}var s=r.stringReverse(i),o=this.$shortWordEndIndex(s);return this.moveCursorTo(e,n-o)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(t,e){var n,i=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===e&&(0!==t&&(this.session.$bidiHandler.isBidiRow(i.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(i.column),i.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=i.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column),0!=t&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var r=this.session.lineWidgets[this.lead.row];t<0?t-=r.rowsAbove||0:t>0&&(t+=r.rowCount-(r.rowsAbove||0))}var s=this.session.screenToDocumentPosition(i.row+t,i.column,n);this.moveCursorTo(s.row,s.column+e,0===e)},this.moveCursorToPosition=function(t){this.moveCursorTo(t.row,t.column)},this.moveCursorTo=function(t,e,n){var i=this.session.getFoldAt(t,e,1);i&&(t=i.start.row,e=i.start.column),this.$keepDesiredColumnOnChange=!0;var r=this.session.getLine(t);/[\uDC00-\uDFFF]/.test(r.charAt(e))&&r.charAt(e-1)&&(this.lead.row==t&&this.lead.column==e+1?e-=1:e+=1),this.lead.setPosition(t,e),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(t,e,n){var i=this.session.screenToDocumentPosition(t,e);this.moveCursorTo(i.row,i.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(t){this.setSelectionRange(t,t.cursor==t.start),this.$desiredColumn=t.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(t){var e=this.getRange();return t?(t.start.column=e.start.column,t.start.row=e.start.row,t.end.column=e.end.column,t.end.row=e.end.row):t=e,t.cursor=this.isBackwards()?t.start:t.end,t.desiredColumn=this.$desiredColumn,t},this.getRangeOfMovements=function(t){var e=this.getCursor();try{t(this);var n=this.getCursor();return o.fromPoints(e,n)}catch(i){return o.fromPoints(e,e)}finally{this.moveCursorToPosition(e)}},this.toJSON=function(){if(this.rangeCount)var t=this.ranges.map(function(t){var e=t.clone();return e.isBackwards=t.cursor==t.start,e});else(t=this.getRange()).isBackwards=this.isBackwards();return t},this.fromJSON=function(t){if(null==t.start){if(this.rangeList&&t.length>1){this.toSingleRange(t[0]);for(var e=t.length;e--;){var n=o.fromPoints(t[e].start,t[e].end);t[e].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}t=t[0]}this.rangeList&&this.toSingleRange(t),this.setSelectionRange(t,t.isBackwards)},this.isEqual=function(t){if((t.length||this.rangeCount)&&t.length!=this.rangeCount)return!1;if(!t.length||!this.ranges)return this.getRange().isEqual(t);for(var e=this.ranges.length;e--;)if(!this.ranges[e].isEqual(t[e]))return!1;return!0}}).call(a.prototype),e.Selection=a}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(t,e,n){"use strict";var i=t("./config"),r=2e3,s=function(t){for(var e in this.states=t,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[e],i=[],r=0,s=this.matchMappings[e]={defaultToken:"text"},o="g",a=[],l=0;l1?this.$applyToken:c.token),h>1&&(/\\\d/.test(c.regex)?u=c.regex.replace(/\\([0-9]+)/g,function(t,e){return"\\"+(parseInt(e,10)+r+1)}):(h=1,u=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||a.push(c)),s[r]=l,r+=h,i.push(u),c.onMatch||(c.onMatch=null)}}i.length||(s[0]=0,i.push("$")),a.forEach(function(t){t.splitRegex=this.createSplitterRegexp(t.regex,o)},this),this.regExps[e]=new RegExp("("+i.join(")|(")+")|($)",o)}};(function(){this.$setMaxTokenCount=function(t){r=0|t},this.$applyToken=function(t){var e=this.splitRegex.exec(t).slice(1),n=this.token.apply(this,e);if("string"==typeof n)return[{type:n,value:t}];for(var i=[],r=0,s=n.length;ru){var v=t.substring(u,m-g.length);d.type==f?d.value+=v:(d.type&&c.push(d),d={type:f,value:v})}for(var y=0;yr){for(h>2*t.length&&this.reportError("infinite loop with in ace tokenizer",{startState:e,line:t});u1&&n[0]!==i&&n.unshift("#tmp",i),{tokens:c,state:n.length?n:i}},this.reportError=i.reportError}).call(s.prototype),e.Tokenizer=s}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(t,e,n){"use strict";var i=t("../lib/lang"),r=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(t,e){if(e)for(var n in t){for(var i=t[n],r=0;r=this.$rowTokens.length;){if(this.$row+=1,t||(t=this.$session.getLength()),this.$row>=t)return this.$row=t-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var t=this.$rowTokens,e=this.$tokenIndex,n=t[e].start;if(void 0!==n)return n;for(n=0;e>0;)n+=t[e-=1].value.length;return n},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var t=this.$rowTokens[this.$tokenIndex],e=this.getCurrentTokenColumn();return new i(this.$row,e,this.$row,e+t.value.length)}}).call(r.prototype),e.TokenIterator=r}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(t,e,n){"use strict";var i,r=t("../../lib/oop"),s=t("../behaviour").Behaviour,o=t("../../token_iterator").TokenIterator,a=t("../../lib/lang"),l=["text","paren.rparen","rparen","paren","punctuation.operator"],c=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],u={},h={'"':'"',"'":"'"},d=function(t){var e=-1;if(t.multiSelect&&(e=t.selection.index,u.rangeCount!=t.multiSelect.rangeCount&&(u={rangeCount:t.multiSelect.rangeCount})),u[e])return i=u[e];i=u[e]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},f=function(t,e,n,i){var r=t.end.row-t.start.row;return{text:n+e+i,selection:[0,t.start.column+1,r,t.end.column+(r?0:1)]}},p=function(t){this.add("braces","insertion",function(e,n,r,s,o){var l=r.getCursorPosition(),c=s.doc.getLine(l.row);if("{"==o){d(r);var u=r.getSelectionRange(),h=s.doc.getTextRange(u);if(""!==h&&"{"!==h&&r.getWrapBehavioursEnabled())return f(u,h,"{","}");if(p.isSaneInsertion(r,s))return/[\]\}\)]/.test(c[l.column])||r.inMultiSelectMode||t&&t.braces?(p.recordAutoInsert(r,s,"}"),{text:"{}",selection:[1,1]}):(p.recordMaybeInsert(r,s,"{"),{text:"{",selection:[1,1]})}else if("}"==o){if(d(r),"}"==c.substring(l.column,l.column+1)&&null!==s.$findOpeningBracket("}",{column:l.column+1,row:l.row})&&p.isAutoInsertedClosing(l,c,o))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==o||"\r\n"==o){d(r);var g="";if(p.isMaybeInsertedClosing(l,c)&&(g=a.stringRepeat("}",i.maybeInsertedBrackets),p.clearMaybeInsertedClosing()),"}"===c.substring(l.column,l.column+1)){var m=s.findMatchingBracket({row:l.row,column:l.column+1},"}");if(!m)return null;var v=this.$getIndent(s.getLine(m.row))}else{if(!g)return void p.clearMaybeInsertedClosing();v=this.$getIndent(c)}var y=v+s.getTabString();return{text:"\n"+y+"\n"+v+g,selection:[1,y.length,1,y.length]}}p.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(t,e,n,r,s){var o=r.doc.getTextRange(s);if(!s.isMultiLine()&&"{"==o){if(d(n),"}"==r.doc.getLine(s.start.row).substring(s.end.column,s.end.column+1))return s.end.column++,s;i.maybeInsertedBrackets--}}),this.add("parens","insertion",function(t,e,n,i,r){if("("==r){d(n);var s=n.getSelectionRange(),o=i.doc.getTextRange(s);if(""!==o&&n.getWrapBehavioursEnabled())return f(s,o,"(",")");if(p.isSaneInsertion(n,i))return p.recordAutoInsert(n,i,")"),{text:"()",selection:[1,1]}}else if(")"==r){d(n);var a=n.getCursorPosition(),l=i.doc.getLine(a.row);if(")"==l.substring(a.column,a.column+1)&&null!==i.$findOpeningBracket(")",{column:a.column+1,row:a.row})&&p.isAutoInsertedClosing(a,l,r))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("parens","deletion",function(t,e,n,i,r){var s=i.doc.getTextRange(r);if(!r.isMultiLine()&&"("==s&&(d(n),")"==i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r}),this.add("brackets","insertion",function(t,e,n,i,r){if("["==r){d(n);var s=n.getSelectionRange(),o=i.doc.getTextRange(s);if(""!==o&&n.getWrapBehavioursEnabled())return f(s,o,"[","]");if(p.isSaneInsertion(n,i))return p.recordAutoInsert(n,i,"]"),{text:"[]",selection:[1,1]}}else if("]"==r){d(n);var a=n.getCursorPosition(),l=i.doc.getLine(a.row);if("]"==l.substring(a.column,a.column+1)&&null!==i.$findOpeningBracket("]",{column:a.column+1,row:a.row})&&p.isAutoInsertedClosing(a,l,r))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("brackets","deletion",function(t,e,n,i,r){var s=i.doc.getTextRange(r);if(!r.isMultiLine()&&"["==s&&(d(n),"]"==i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r}),this.add("string_dquotes","insertion",function(t,e,n,i,r){var s=i.$mode.$quotes||h;if(1==r.length&&s[r]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(r))return;d(n);var o=r,a=n.getSelectionRange(),l=i.doc.getTextRange(a);if(!(""===l||1==l.length&&s[l])&&n.getWrapBehavioursEnabled())return f(a,l,o,o);if(!l){var c=n.getCursorPosition(),u=i.doc.getLine(c.row),p=u.substring(c.column-1,c.column),g=u.substring(c.column,c.column+1),m=i.getTokenAt(c.row,c.column),v=i.getTokenAt(c.row,c.column+1);if("\\"==p&&m&&/escape/.test(m.type))return null;var y,b=m&&/string|escape/.test(m.type),w=!v||/string|escape/.test(v.type);if(g==o)(y=b!==w)&&/string\.end/.test(v.type)&&(y=!1);else{if(b&&!w)return null;if(b&&w)return null;var x=i.$mode.tokenRe;x.lastIndex=0;var _=x.test(p);x.lastIndex=0;var C=x.test(p);if(_||C)return null;if(g&&!/[\s;,.})\]\\]/.test(g))return null;var S=u[c.column-2];if(p==o&&(S==o||x.test(S)))return null;y=!0}return{text:y?o+o:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(t,e,n,i,r){var s=i.$mode.$quotes||h,o=i.doc.getTextRange(r);if(!r.isMultiLine()&&s.hasOwnProperty(o)&&(d(n),i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)==o))return r.end.column++,r})};p.isSaneInsertion=function(t,e){var n=t.getCursorPosition(),i=new o(e,n.row,n.column);if(!this.$matchTokenType(i.getCurrentToken()||"text",l)){if(/[)}\]]/.test(t.session.getLine(n.row)[n.column]))return!0;var r=new o(e,n.row,n.column+1);if(!this.$matchTokenType(r.getCurrentToken()||"text",l))return!1}return i.stepForward(),i.getCurrentTokenRow()!==n.row||this.$matchTokenType(i.getCurrentToken()||"text",c)},p.$matchTokenType=function(t,e){return e.indexOf(t.type||t)>-1},p.recordAutoInsert=function(t,e,n){var r=t.getCursorPosition(),s=e.doc.getLine(r.row);this.isAutoInsertedClosing(r,s,i.autoInsertedLineEnd[0])||(i.autoInsertedBrackets=0),i.autoInsertedRow=r.row,i.autoInsertedLineEnd=n+s.substr(r.column),i.autoInsertedBrackets++},p.recordMaybeInsert=function(t,e,n){var r=t.getCursorPosition(),s=e.doc.getLine(r.row);this.isMaybeInsertedClosing(r,s)||(i.maybeInsertedBrackets=0),i.maybeInsertedRow=r.row,i.maybeInsertedLineStart=s.substr(0,r.column)+n,i.maybeInsertedLineEnd=s.substr(r.column),i.maybeInsertedBrackets++},p.isAutoInsertedClosing=function(t,e,n){return i.autoInsertedBrackets>0&&t.row===i.autoInsertedRow&&n===i.autoInsertedLineEnd[0]&&e.substr(t.column)===i.autoInsertedLineEnd},p.isMaybeInsertedClosing=function(t,e){return i.maybeInsertedBrackets>0&&t.row===i.maybeInsertedRow&&e.substr(t.column)===i.maybeInsertedLineEnd&&e.substr(0,t.column)==i.maybeInsertedLineStart},p.popAutoInsertedClosing=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1),i.autoInsertedBrackets--},p.clearMaybeInsertedClosing=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)},r.inherits(p,s),e.CstyleBehaviour=p}),ace.define("ace/unicode",["require","exports","module"],function(t,e,n){"use strict";for(var i=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],r=0,s=[],o=0;o2?i%c!=c-1:i%c==0})}else{if(!this.blockComment)return!1;var f=this.blockComment.start,p=this.blockComment.end,g=new RegExp("^(\\s*)(?:"+l.escapeRegExp(f)+")"),m=new RegExp("(?:"+l.escapeRegExp(p)+")\\s*$"),v=function(t,e){b(t,e)||s&&!/\S/.test(t)||(r.insertInLine({row:e,column:t.length},p),r.insertInLine({row:e,column:a},f))},y=function(t,e){var n;(n=t.match(m))&&r.removeInLine(e,t.length-n[0].length,t.length),(n=t.match(g))&&r.removeInLine(e,n[1].length,n[0].length)},b=function(t,n){if(g.test(t))return!0;for(var i=e.getTokens(n),r=0;rt.length&&(x=t.length)}),a==1/0&&(a=x,s=!1,o=!1),u&&a%c!=0&&(a=Math.floor(a/c)*c),w(o?y:v)},this.toggleBlockComment=function(t,e,n,i){var r=this.blockComment;if(r){!r.start&&r[0]&&(r=r[0]);var s,o,a=(g=new c(e,i.row,i.column)).getCurrentToken(),l=e.selection.toOrientedRange();if(a&&/comment/.test(a.type)){for(var h,d;a&&/comment/.test(a.type);){if(-1!=(m=a.value.indexOf(r.start))){var f=g.getCurrentTokenRow(),p=g.getCurrentTokenColumn()+m;h=new u(f,p,f,p+r.start.length);break}a=g.stepBackward()}var g;for(a=(g=new c(e,i.row,i.column)).getCurrentToken();a&&/comment/.test(a.type);){var m;if(-1!=(m=a.value.indexOf(r.end))){f=g.getCurrentTokenRow(),p=g.getCurrentTokenColumn()+m,d=new u(f,p,f,p+r.end.length);break}a=g.stepForward()}d&&e.remove(d),h&&(e.remove(h),s=h.start.row,o=-r.start.length)}else o=r.start.length,s=n.start.row,e.insert(n.end,r.end),e.insert(n.start,r.start);l.start.row==s&&(l.start.column+=o),l.end.row==s&&(l.end.column+=o),e.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(t,e,n){return this.$getIndent(e)},this.checkOutdent=function(t,e,n){return!1},this.autoOutdent=function(t,e,n){},this.$getIndent=function(t){return t.match(/^\s*/)[0]},this.createWorker=function(t){return null},this.createModeDelegates=function(t){for(var e in this.$embeds=[],this.$modes={},t)if(t[e]){var n=t[e],r=n.prototype.$id,s=i.$modes[r];s||(i.$modes[r]=s=new n),i.$modes[e]||(i.$modes[e]=s),this.$embeds.push(e),this.$modes[e]=s}var o=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(e=0;ethis.row)){var n=function(e,n,i){var r="insert"==e.action,s=(r?1:-1)*(e.end.row-e.start.row),o=(r?1:-1)*(e.end.column-e.start.column),a=e.start,l=r?a:e.end;return t(n,a,i)?{row:n.row,column:n.column}:t(l,n,!i)?{row:n.row+s,column:n.column+(n.row==l.row?o:0)}:{row:a.row,column:a.column}}(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},this.setPosition=function(t,e,n){var i;if(i=n?{row:t,column:e}:this.$clipPositionToDocument(t,e),this.row!=i.row||this.column!=i.column){var r={row:this.row,column:this.column};this.row=i.row,this.column=i.column,this._signal("change",{old:r,value:i})}},this.detach=function(){this.document.off("change",this.$onChange)},this.attach=function(t){this.document=t||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(t,e){var n={};return t>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):t<0?(n.row=0,n.column=0):(n.row=t,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,e))),e<0&&(n.column=0),n}}).call(s.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(t,e,n){"use strict";var i=t("./lib/oop"),r=t("./apply_delta").applyDelta,s=t("./lib/event_emitter").EventEmitter,o=t("./range").Range,a=t("./anchor").Anchor,l=function(t){this.$lines=[""],0===t.length?this.$lines=[""]:Array.isArray(t)?this.insertMergedLines({row:0,column:0},t):this.insert({row:0,column:0},t)};(function(){i.implement(this,s),this.setValue=function(t){var e=this.getLength()-1;this.remove(new o(0,0,e,this.getLine(e).length)),this.insert({row:0,column:0},t)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(t,e){return new a(this,t,e)},this.$split=0==="aaa".split(/a/).length?function(t){return t.replace(/\r\n|\r/g,"\n").split("\n")}:function(t){return t.split(/\r\n|\r|\n/)},this.$detectNewLine=function(t){var e=t.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=e?e[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(t){this.$newLineMode!==t&&(this.$newLineMode=t,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(t){return"\r\n"==t||"\r"==t||"\n"==t},this.getLine=function(t){return this.$lines[t]||""},this.getLines=function(t,e){return this.$lines.slice(t,e+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(t){return this.getLinesForRange(t).join(this.getNewLineCharacter())},this.getLinesForRange=function(t){var e;if(t.start.row===t.end.row)e=[this.getLine(t.start.row).substring(t.start.column,t.end.column)];else{(e=this.getLines(t.start.row,t.end.row))[0]=(e[0]||"").substring(t.start.column);var n=e.length-1;t.end.row-t.start.row==n&&(e[n]=e[n].substring(0,t.end.column))}return e},this.insertLines=function(t,e){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(t,e)},this.removeLines=function(t,e){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(t,e)},this.insertNewLine=function(t){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(t,["",""])},this.insert=function(t,e){return this.getLength()<=1&&this.$detectNewLine(e),this.insertMergedLines(t,this.$split(e))},this.insertInLine=function(t,e){var n=this.clippedPos(t.row,t.column),i=this.pos(t.row,t.column+e.length);return this.applyDelta({start:n,end:i,action:"insert",lines:[e]},!0),this.clonePos(i)},this.clippedPos=function(t,e){var n=this.getLength();void 0===t?t=n:t<0?t=0:t>=n&&(t=n-1,e=void 0);var i=this.getLine(t);return null==e&&(e=i.length),{row:t,column:e=Math.min(Math.max(e,0),i.length)}},this.clonePos=function(t){return{row:t.row,column:t.column}},this.pos=function(t,e){return{row:t,column:e}},this.$clipPosition=function(t){var e=this.getLength();return t.row>=e?(t.row=Math.max(0,e-1),t.column=this.getLine(e-1).length):(t.row=Math.max(0,t.row),t.column=Math.min(Math.max(t.column,0),this.getLine(t.row).length)),t},this.insertFullLines=function(t,e){var n=0;(t=Math.min(Math.max(t,0),this.getLength()))0,i=e=0&&this.applyDelta({start:this.pos(t,this.getLine(t).length),end:this.pos(t+1,0),action:"remove",lines:["",""]})},this.replace=function(t,e){return t instanceof o||(t=o.fromPoints(t.start,t.end)),0===e.length&&t.isEmpty()?t.start:e==this.getTextRange(t)?t.end:(this.remove(t),e?this.insert(t.start,e):t.start)},this.applyDeltas=function(t){for(var e=0;e=0;e--)this.revertDelta(t[e])},this.applyDelta=function(t,e){var n="insert"==t.action;(n?t.lines.length<=1&&!t.lines[0]:!o.comparePoints(t.start,t.end))||(n&&t.lines.length>2e4?this.$splitAndapplyLargeDelta(t,2e4):(r(this.$lines,t,e),this._signal("change",t)))},this.$safeApplyDelta=function(t){var e=this.$lines.length;("remove"==t.action&&t.start.row20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=e,-1==i&&(i=e),s<=i&&n.fireUpdateEvent(s,i)}}};(function(){i.implement(this,r),this.setTokenizer=function(t){this.tokenizer=t,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(t){this.doc=t,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(t,e){this._signal("update",{data:{first:t,last:e}})},this.start=function(t){this.currentLine=Math.min(t||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(t){var e=t.start.row,n=t.end.row-e;if(0===n)this.lines[e]=null;else if("remove"==t.action)this.lines.splice(e,n+1,null),this.states.splice(e,n+1,null);else{var i=Array(n+1);i.unshift(e,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}this.currentLine=Math.min(e,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(t){return this.lines[t]||this.$tokenizeRow(t)},this.getState=function(t){return this.currentLine==t&&this.$tokenizeRow(t),this.states[t]||"start"},this.$tokenizeRow=function(t){var e=this.doc.getLine(t),n=this.tokenizer.getLineTokens(e,this.states[t-1],t);return this.states[t]+""!=n.state+""?(this.states[t]=n.state,this.lines[t+1]=null,this.currentLine>t+1&&(this.currentLine=t+1)):this.currentLine==t&&(this.currentLine=t+1),this.lines[t]=n.tokens}}).call(s.prototype),e.BackgroundTokenizer=s}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(t,e,n){"use strict";var i=t("./lib/lang"),r=(t("./lib/oop"),t("./range").Range),s=function(t,e,n){this.setRegexp(t),this.clazz=e,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(t){this.regExp+""!=t+""&&(this.regExp=t,this.cache=[])},this.update=function(t,e,n,s){if(this.regExp)for(var o=s.lastRow,a=s.firstRow;a<=o;a++){var l=this.cache[a];null==l&&((l=i.getMatchOffsets(n.getLine(a),this.regExp)).length>this.MAX_RANGES&&(l=l.slice(0,this.MAX_RANGES)),l=l.map(function(t){return new r(a,t.offset,a,t.offset+t.length)}),this.cache[a]=l.length?l:"");for(var c=l.length;c--;)e.drawSingleLineMarker(t,l[c].toScreenRange(n),this.clazz,s)}}}).call(s.prototype),e.SearchHighlight=s}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(t,e,n){"use strict";var i=t("../range").Range;function r(t,e){this.foldData=t,Array.isArray(e)?this.folds=e:e=this.folds=[e];var n=e[e.length-1];this.range=new i(e[0].start.row,e[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(t){t.setFoldLine(this)},this)}(function(){this.shiftRow=function(t){this.start.row+=t,this.end.row+=t,this.folds.forEach(function(e){e.start.row+=t,e.end.row+=t})},this.addFold=function(t){if(t.sameRow){if(t.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(t),this.folds.sort(function(t,e){return-t.range.compareEnd(e.start.row,e.start.column)}),this.range.compareEnd(t.start.row,t.start.column)>0?(this.end.row=t.end.row,this.end.column=t.end.column):this.range.compareStart(t.end.row,t.end.column)<0&&(this.start.row=t.start.row,this.start.column=t.start.column)}else if(t.start.row==this.end.row)this.folds.push(t),this.end.row=t.end.row,this.end.column=t.end.column;else{if(t.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(t),this.start.row=t.start.row,this.start.column=t.start.column}t.foldLine=this},this.containsRow=function(t){return t>=this.start.row&&t<=this.end.row},this.walk=function(t,e,n){var i,r,s=0,o=this.folds,a=!0;null==e&&(e=this.end.row,n=this.end.column);for(var l=0;l0)){var l=i(t,o.start);return 0===a?e&&0!==l?-s-2:s:l>0||0===l&&!e?s:-s-1}}return-s-1},this.add=function(t){var e=!t.isEmpty(),n=this.pointIndex(t.start,e);n<0&&(n=-n-1);var i=this.pointIndex(t.end,e,n);return i<0?i=-i-1:i++,this.ranges.splice(n,i-n,t)},this.addList=function(t){for(var e=[],n=t.length;n--;)e.push.apply(e,this.add(t[n]));return e},this.substractPoint=function(t){var e=this.pointIndex(t);if(e>=0)return this.ranges.splice(e,1)},this.merge=function(){for(var t,e=[],n=this.ranges,r=(n=n.sort(function(t,e){return i(t.start,e.start)}))[0],s=1;s=0},this.containsPoint=function(t){return this.pointIndex(t)>=0},this.rangeAtPoint=function(t){var e=this.pointIndex(t);if(e>=0)return this.ranges[e]},this.clipRows=function(t,e){var n=this.ranges;if(n[0].start.row>e||n[n.length-1].start.row=i);o++);if("insert"==t.action){for(var l=r-i,c=-e.column+n.column;oi);o++)if(u.start.row==i&&u.start.column>=e.column&&(u.start.column==e.column&&this.$bias<=0||(u.start.column+=c,u.start.row+=l)),u.end.row==i&&u.end.column>=e.column){if(u.end.column==e.column&&this.$bias<0)continue;u.end.column==e.column&&c>0&&ou.start.column&&u.end.column==s[o+1].start.column&&(u.end.column-=c),u.end.column+=c,u.end.row+=l}}else for(l=i-r,c=e.column-n.column;or);o++)u.end.rowe.column)&&(u.end.column=e.column,u.end.row=e.row):(u.end.column+=c,u.end.row+=l):u.end.row>r&&(u.end.row+=l),u.start.rowe.column)&&(u.start.column=e.column,u.start.row=e.row):(u.start.column+=c,u.start.row+=l):u.start.row>r&&(u.start.row+=l);if(0!=l&&o=t)return r;if(r.end.row>t)return null}return null},this.getNextFoldLine=function(t,e){var n=this.$foldData,i=0;for(e&&(i=n.indexOf(e)),-1==i&&(i=0);i=t)return r}return null},this.getFoldedRowCount=function(t,e){for(var n=this.$foldData,i=e-t+1,r=0;r=e){a=t?i-=e-a:i=0);break}o>=t&&(i-=a>=t?o-a:o-t+1)}return i},this.$addFoldLine=function(t){return this.$foldData.push(t),this.$foldData.sort(function(t,e){return t.start.row-e.start.row}),t},this.addFold=function(t,e){var n,i=this.$foldData,o=!1;t instanceof s?n=t:(n=new s(e,t)).collapseChildren=e.collapseChildren,this.$clipRangeToDocument(n.range);var a=n.start.row,l=n.start.column,c=n.end.row,u=n.end.column,h=this.getFoldAt(a,l,1),d=this.getFoldAt(c,u,-1);if(h&&d==h)return h.addSubFold(n);h&&!h.range.isStart(a,l)&&this.removeFold(h),d&&!d.range.isEnd(c,u)&&this.removeFold(d);var f=this.getFoldsInRange(n.range);f.length>0&&(this.removeFolds(f),n.collapseChildren||f.forEach(function(t){n.addSubFold(t)}));for(var p=0;p0&&this.foldAll(t.start.row+1,t.end.row,t.collapseChildren-1),t.subFolds=[]},this.expandFolds=function(t){t.forEach(function(t){this.expandFold(t)},this)},this.unfold=function(t,e){var n,r;if(null==t?(n=new i(0,0,this.getLength(),0),null==e&&(e=!0)):n="number"==typeof t?new i(t,0,t,this.getLine(t).length):"row"in t?i.fromPoints(t,t):t,r=this.getFoldsInRangeList(n),0!=e?this.removeFolds(r):this.expandFolds(r),r.length)return r},this.isRowFolded=function(t,e){return!!this.getFoldLine(t,e)},this.getRowFoldEnd=function(t,e){var n=this.getFoldLine(t,e);return n?n.end.row:t},this.getRowFoldStart=function(t,e){var n=this.getFoldLine(t,e);return n?n.start.row:t},this.getFoldDisplayLine=function(t,e,n,i,r){null==i&&(i=t.start.row),null==r&&(r=0),null==e&&(e=t.end.row),null==n&&(n=this.getLine(e).length);var s=this.doc,o="";return t.walk(function(t,e,n,a){if(!(eu)break}while(s&&l.test(s.type));s=r.stepBackward()}else s=r.getCurrentToken();return c.end.row=r.getCurrentTokenRow(),c.end.column=r.getCurrentTokenColumn()+s.value.length-2,c}},this.foldAll=function(t,e,n,i){null==n&&(n=1e5);var r=this.foldWidgets;if(r){e=e||this.getLength();for(var s=t=t||0;s=t&&(s=o.end.row,o.collapseChildren=n,this.addFold("...",o))}}},this.foldToLevel=function(t){for(this.foldAll();t-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var t=this;this.foldAll(null,null,null,function(e){for(var n=t.getTokens(e),i=0;i=0;){var s=n[r];if(null==s&&(s=n[r]=this.getFoldWidget(r)),"start"==s){var o=this.getFoldWidgetRange(r);if(i||(i=o),o&&o.end.row>=t)break}r--}return{range:-1!==r&&o,firstRange:i}},this.onFoldWidgetClick=function(t,e){if(!this.$toggleFoldWidget(t,{children:(e=e.domEvent).shiftKey,all:e.ctrlKey||e.metaKey,siblings:e.altKey})){var n=e.target||e.srcElement;n&&/ace_fold-widget/.test(n.className)&&(n.className+=" ace_invalid")}},this.$toggleFoldWidget=function(t,e){if(this.getFoldWidget){var n=this.getFoldWidget(t),i=this.getLine(t),r="end"===n?-1:1,s=this.getFoldAt(t,-1===r?0:i.length,r);if(s)return e.children||e.all?this.removeFold(s):this.expandFold(s),s;var o=this.getFoldWidgetRange(t,!0);if(o&&!o.isMultiLine()&&(s=this.getFoldAt(o.start.row,o.start.column,1))&&o.isEqual(s.range))return this.removeFold(s),s;if(e.siblings){var a=this.getParentFoldRangeData(t);if(a.range)var l=a.range.start.row+1,c=a.range.end.row;this.foldAll(l,c,e.all?1e4:0)}else e.children?(c=o?o.end.row:this.getLength(),this.foldAll(t+1,c,e.all?1e4:0)):o&&(e.all&&(o.collapseChildren=1e4),this.addFold("...",o));return o}},this.toggleFoldWidget=function(t){var e=this.selection.getCursor().row;e=this.getRowFoldStart(e);var n=this.$toggleFoldWidget(e,{});if(!n){var i=this.getParentFoldRangeData(e,!0);if(n=i.range||i.firstRange){var r=this.getFoldAt(e=n.start.row,this.getLine(e).length,1);r?this.removeFold(r):this.addFold("...",n)}}},this.updateFoldWidgets=function(t){var e=t.start.row,n=t.end.row-e;if(0===n)this.foldWidgets[e]=null;else if("remove"==t.action)this.foldWidgets.splice(e,n+1,null);else{var i=Array(n+1);i.unshift(e,1),this.foldWidgets.splice.apply(this.foldWidgets,i)}},this.tokenizerUpdateFoldWidgets=function(t){var e=t.data;e.first!=e.last&&this.foldWidgets.length>e.first&&this.foldWidgets.splice(e.first,this.foldWidgets.length)}}}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(t,e,n){"use strict";var i=t("../token_iterator").TokenIterator,r=t("../range").Range;e.BracketMatch=function(){this.findMatchingBracket=function(t,e){if(0==t.column)return null;var n=e||this.getLine(t.row).charAt(t.column-1);if(""==n)return null;var i=n.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],t):this.$findOpeningBracket(i[2],t):null},this.getBracketRange=function(t){var e,n=this.getLine(t.row),i=!0,s=n.charAt(t.column-1),o=s&&s.match(/([\(\[\{])|([\)\]\}])/);if(o||(s=n.charAt(t.column),t={row:t.row,column:t.column+1},o=s&&s.match(/([\(\[\{])|([\)\]\}])/),i=!1),!o)return null;if(o[1]){if(!(a=this.$findClosingBracket(o[1],t)))return null;e=r.fromPoints(t,a),i||(e.end.column++,e.start.column--),e.cursor=e.end}else{var a;if(!(a=this.$findOpeningBracket(o[2],t)))return null;e=r.fromPoints(a,t),i||(e.start.column++,e.end.column--),e.cursor=e.start}return e},this.getMatchingBracketRanges=function(t){var e=this.getLine(t.row),n=e.charAt(t.column-1),i=n&&n.match(/([\(\[\{])|([\)\]\}])/);if(i||(n=e.charAt(t.column),t={row:t.row,column:t.column+1},i=n&&n.match(/([\(\[\{])|([\)\]\}])/)),!i)return null;var s=new r(t.row,t.column-1,t.row,t.column),o=i[1]?this.$findClosingBracket(i[1],t):this.$findOpeningBracket(i[2],t);return o?[s,new r(o.row,o.column,o.row,o.column+1)]:[s]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(t,e,n){var r=this.$brackets[t],s=1,o=new i(this,e.row,e.column),a=o.getCurrentToken();if(a||(a=o.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var l=e.column-o.getCurrentTokenColumn()-2,c=a.value;;){for(;l>=0;){var u=c.charAt(l);if(u==r){if(0==(s-=1))return{row:o.getCurrentTokenRow(),column:l+o.getCurrentTokenColumn()}}else u==t&&(s+=1);l-=1}do{a=o.stepBackward()}while(a&&!n.test(a.type));if(null==a)break;l=(c=a.value).length-1}return null}},this.$findClosingBracket=function(t,e,n){var r=this.$brackets[t],s=1,o=new i(this,e.row,e.column),a=o.getCurrentToken();if(a||(a=o.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var l=e.column-o.getCurrentTokenColumn();;){for(var c=a.value,u=c.length;ln&&(this.$docRowCache.splice(n,e),this.$screenRowCache.splice(n,e))},this.$getRowCacheIndex=function(t,e){for(var n=0,i=t.length-1;n<=i;){var r=n+i>>1,s=t[r];if(e>s)n=r+1;else{if(!(e=e);s++);return(n=i[s])?(n.index=s,n.start=r-n.value.length,n):null},this.setUndoManager=function(t){if(this.$undoManager=t,this.$informUndoManager&&this.$informUndoManager.cancel(),t){var e=this;t.addSession(this),this.$syncInformUndoManager=function(){e.$informUndoManager.cancel(),e.mergeUndoDeltas=!1},this.$informUndoManager=r.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?r.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(t){this.setOption("useSoftTabs",t)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(t){this.setOption("tabSize",t)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(t){return this.$useSoftTabs&&t.column%this.$tabSize==0},this.setNavigateWithinSoftTabs=function(t){this.setOption("navigateWithinSoftTabs",t)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(t){this.setOption("overwrite",t)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(t,e){this.$decorations[t]||(this.$decorations[t]=""),this.$decorations[t]+=" "+e,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(t,e){this.$decorations[t]=(this.$decorations[t]||"").replace(" "+e,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(t){this.$breakpoints=[];for(var e=0;e0&&(i=!!n.charAt(e-1).match(this.tokenRe)),i||(i=!!n.charAt(e).match(this.tokenRe)),i)var r=this.tokenRe;else r=/^\s+$/.test(n.slice(e-1,e+1))?/\s/:this.nonTokenRe;var s=e;if(s>0){do{s--}while(s>=0&&n.charAt(s).match(r));s++}for(var o=e;ot&&(t=e.screenWidth)}),this.lineWidgetWidth=t},this.$computeWidth=function(t){if(this.$modified||t){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var e=this.doc.getAllLines(),n=this.$rowLengthCache,i=0,r=0,s=this.$foldData[r],o=s?s.start.row:1/0,a=e.length,l=0;lo){if((l=s.end.row+1)>=a)break;o=(s=this.$foldData[r++])?s.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(e[l])[0]),n[l]>i&&(i=n[l])}this.screenWidth=i}},this.getLine=function(t){return this.doc.getLine(t)},this.getLines=function(t,e){return this.doc.getLines(t,e)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(t){return this.doc.getTextRange(t||this.selection.getRange())},this.insert=function(t,e){return this.doc.insert(t,e)},this.remove=function(t){return this.doc.remove(t)},this.removeFullLines=function(t,e){return this.doc.removeFullLines(t,e)},this.undoChanges=function(t,e){if(t.length){this.$fromUndo=!0;for(var n=t.length-1;-1!=n;n--){var i=t[n];"insert"==i.action||"remove"==i.action?this.doc.revertDelta(i):i.folds&&this.addFolds(i.folds)}!e&&this.$undoSelect&&(t.selectionBefore?this.selection.fromJSON(t.selectionBefore):this.selection.setRange(this.$getUndoSelection(t,!0))),this.$fromUndo=!1}},this.redoChanges=function(t,e){if(t.length){this.$fromUndo=!0;for(var n=0;nt.end.column&&(s.start.column+=c),s.end.row==t.end.row&&s.end.column>t.end.column&&(s.end.column+=c)),l&&s.start.row>=t.end.row&&(s.start.row+=l,s.end.row+=l)),s.end=this.insert(s.start,i),r.length){var o=t.start,a=s.start,l=a.row-o.row,c=a.column-o.column;this.addFolds(r.map(function(t){return(t=t.clone()).start.row==o.row&&(t.start.column+=c),t.end.row==o.row&&(t.end.column+=c),t.start.row+=l,t.end.row+=l,t}))}return s},this.indentRows=function(t,e,n){n=n.replace(/\t/g,this.getTabString());for(var i=t;i<=e;i++)this.doc.insertInLine({row:i,column:0},n)},this.outdentRows=function(t){for(var e=t.collapseRows(),n=new u(0,0,0,0),i=this.getTabSize(),r=e.start.row;r<=e.end.row;++r){var s=this.getLine(r);n.start.row=r,n.end.row=r;for(var o=0;o0){var r;if((r=this.getRowFoldEnd(e+n))>this.doc.getLength()-1)return 0;i=r-e}else t=this.$clipRowToDocument(t),i=(e=this.$clipRowToDocument(e))-t+1;var s=new u(t,0,e,Number.MAX_VALUE),o=this.getFoldsInRange(s).map(function(t){return(t=t.clone()).start.row+=i,t.end.row+=i,t}),a=0==n?this.doc.getLines(t,e):this.doc.removeFullLines(t,e);return this.doc.insertFullLines(t+i,a),o.length&&this.addFolds(o),i},this.moveLinesUp=function(t,e){return this.$moveLines(t,e,-1)},this.moveLinesDown=function(t,e){return this.$moveLines(t,e,1)},this.duplicateLines=function(t,e){return this.$moveLines(t,e,0)},this.$clipRowToDocument=function(t){return Math.max(0,Math.min(t,this.doc.getLength()-1))},this.$clipColumnToRow=function(t,e){return e<0?0:Math.min(this.doc.getLine(t).length,e)},this.$clipPositionToDocument=function(t,e){if(e=Math.max(0,e),t<0)t=0,e=0;else{var n=this.doc.getLength();t>=n?(t=n-1,e=this.doc.getLine(n-1).length):e=Math.min(this.doc.getLine(t).length,e)}return{row:t,column:e}},this.$clipRangeToDocument=function(t){t.start.row<0?(t.start.row=0,t.start.column=0):t.start.column=this.$clipColumnToRow(t.start.row,t.start.column);var e=this.doc.getLength()-1;return t.end.row>e?(t.end.row=e,t.end.column=this.doc.getLine(e).length):t.end.column=this.$clipColumnToRow(t.end.row,t.end.column),t},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(t){if(t!=this.$useWrapMode){if(this.$useWrapMode=t,this.$modified=!0,this.$resetRowCache(0),t){var e=this.getLength();this.$wrapData=Array(e),this.$updateWrapData(0,e-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(t,e){this.$wrapLimitRange.min===t&&this.$wrapLimitRange.max===e||(this.$wrapLimitRange={min:t,max:e},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(t,e){var n=this.$wrapLimitRange;n.max<0&&(n={min:e,max:e});var i=this.$constrainWrapLimit(t,n.min,n.max);return i!=this.$wrapLimit&&i>1&&(this.$wrapLimit=i,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(t,e,n){return e&&(t=Math.max(e,t)),n&&(t=Math.min(n,t)),t},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(t){this.setWrapLimitRange(t,t)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(t){var e=this.$useWrapMode,n=t.action,i=t.start,r=t.end,s=i.row,o=r.row,a=o-s,l=null;if(this.$updating=!0,0!=a)if("remove"===n){this[e?"$wrapData":"$rowLengthCache"].splice(s,a);var c=this.$foldData;l=this.getFoldsInRange(t),this.removeFolds(l);var u=0;if(g=this.getFoldLine(r.row)){g.addRemoveChars(r.row,r.column,i.column-r.column),g.shiftRow(-a);var h=this.getFoldLine(s);h&&h!==g&&(h.merge(g),g=h),u=c.indexOf(g)+1}for(;u=r.row&&g.shiftRow(-a);o=s}else{var d=Array(a);d.unshift(s,0);var f=e?this.$wrapData:this.$rowLengthCache;if(f.splice.apply(f,d),c=this.$foldData,u=0,g=this.getFoldLine(s)){var p=g.range.compareInside(i.row,i.column);0==p?(g=g.split(i.row,i.column))&&(g.shiftRow(a),g.addRemoveChars(o,0,r.column-i.column)):-1==p&&(g.addRemoveChars(s,0,r.column-i.column),g.shiftRow(a)),u=c.indexOf(g)+1}for(;u=s&&g.shiftRow(a)}}else a=Math.abs(t.start.column-t.end.column),"remove"===n&&(l=this.getFoldsInRange(t),this.removeFolds(l),a=-a),(g=this.getFoldLine(s))&&g.addRemoveChars(s,i.column,a);return e&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,e?this.$updateWrapData(s,o):this.$updateRowLengthCache(s,o),l},this.$updateRowLengthCache=function(t,e,n){this.$rowLengthCache[t]=null,this.$rowLengthCache[e]=null},this.$updateWrapData=function(n,i){var r,s,o=this.doc.getAllLines(),a=this.getTabSize(),l=this.$wrapData,c=this.$wrapLimit,u=n;for(i=Math.min(i,o.length-1);u<=i;)(s=this.getFoldLine(u,s))?(r=[],s.walk((function(n,i,s,a){var l;if(null!=n){(l=this.$getDisplayTokens(n,r.length))[0]=t;for(var c=1;c=4352&&t<=4447||t>=4515&&t<=4519||t>=4602&&t<=4607||t>=9001&&t<=9002||t>=11904&&t<=11929||t>=11931&&t<=12019||t>=12032&&t<=12245||t>=12272&&t<=12283||t>=12288&&t<=12350||t>=12353&&t<=12438||t>=12441&&t<=12543||t>=12549&&t<=12589||t>=12593&&t<=12686||t>=12688&&t<=12730||t>=12736&&t<=12771||t>=12784&&t<=12830||t>=12832&&t<=12871||t>=12880&&t<=13054||t>=13056&&t<=19903||t>=19968&&t<=42124||t>=42128&&t<=42182||t>=43360&&t<=43388||t>=44032&&t<=55203||t>=55216&&t<=55238||t>=55243&&t<=55291||t>=63744&&t<=64255||t>=65040&&t<=65049||t>=65072&&t<=65106||t>=65108&&t<=65126||t>=65128&&t<=65131||t>=65281&&t<=65376||t>=65504&&t<=65510)}this.$computeWrapSplits=function(n,i,r){if(0==n.length)return[];var s=[],o=n.length,a=0,l=0,c=this.$wrapAsCode,u=this.$indentedSoftWrap,h=i<=Math.max(2*r,8)||!1===u?0:Math.floor(i/2);function d(t){for(var e=t-a,i=a;ii-f;){var p=a+i-f;if(n[p-1]>=10&&n[p]>=10)d(p);else if(n[p]!=t&&n[p]!=e){for(var g=Math.max(p-(i-(i>>2)),a-1);p>g&&n[p]g&&n[p]g&&9==n[p];)p--}else for(;p>g&&n[p]<10;)p--;p>g?d(++p):(2==n[p=a+i]&&p--,d(p-f))}else{for(;p!=a-1&&n[p]!=t;p--);if(p>a){d(p);continue}for(p=a+i;p39&&o<48||o>57&&o<64?r.push(9):o>=4352&&n(o)?r.push(1,2):r.push(1)}return r},this.$getStringScreenWidth=function(t,e,i){if(0==e)return[0,0];var r,s;for(null==e&&(e=1/0),i=i||0,s=0;s=4352&&n(r)?i+=2:i+=1,!(i>e));s++);return[i,s]},this.lineWidgets=null,this.getRowLength=function(t){var e=1;return this.lineWidgets&&(e+=this.lineWidgets[t]&&this.lineWidgets[t].rowCount||0),this.$useWrapMode&&this.$wrapData[t]?this.$wrapData[t].length+e:e},this.getRowLineCount=function(t){return this.$useWrapMode&&this.$wrapData[t]?this.$wrapData[t].length+1:1},this.getRowWrapIndent=function(t){if(this.$useWrapMode){var e=this.screenToDocumentPosition(t,Number.MAX_VALUE),n=this.$wrapData[e.row];return n.length&&n[0]=0){a=c[u],s=this.$docRowCache[u];var d=t>c[h-1]}else d=!h;for(var f=this.getLength()-1,p=this.getNextFoldLine(s),g=p?p.start.row:1/0;a<=t&&!(a+(l=this.getRowLength(s))>t||s>=f);)a+=l,++s>g&&(g=(p=this.getNextFoldLine(s=p.end.row+1,p))?p.start.row:1/0),d&&(this.$docRowCache.push(s),this.$screenRowCache.push(a));if(p&&p.start.row<=s)i=this.getFoldDisplayLine(p),s=p.start.row;else{if(a+l<=t||s>f)return{row:f,column:this.getLine(f).length};i=this.getLine(s),p=null}var m=0,v=Math.floor(t-a);if(this.$useWrapMode){var y=this.$wrapData[s];y&&(r=y[v],v>0&&y.length&&(m=y.indent,i=i.substring(o=y[v-1]||y[y.length-1])))}return void 0!==n&&this.$bidiHandler.isBidiRow(a+v,s,v)&&(e=this.$bidiHandler.offsetToCol(n)),o+=this.$getStringScreenWidth(i,e-m)[1],this.$useWrapMode&&o>=r&&(o=r-1),p?p.idxToPosition(o):{row:s,column:o}},this.documentToScreenPosition=function(t,e){if(void 0===e)var n=this.$clipPositionToDocument(t.row,t.column);else n=this.$clipPositionToDocument(t,e);var i,r=0,s=null;(i=this.getFoldAt(t=n.row,e=n.column,1))&&(t=i.start.row,e=i.start.column);var o,a=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,t),u=l.length;if(u&&c>=0){a=l[c],r=this.$screenRowCache[c];var h=t>l[u-1]}else h=!u;for(var d=this.getNextFoldLine(a),f=d?d.start.row:1/0;a=f){if((o=d.end.row+1)>t)break;f=(d=this.getNextFoldLine(o,d))?d.start.row:1/0}else o=a+1;r+=this.getRowLength(a),a=o,h&&(this.$docRowCache.push(a),this.$screenRowCache.push(r))}var p="";d&&a>=f?(p=this.getFoldDisplayLine(d,t,e),s=d.start.row):(p=this.getLine(t).substring(0,e),s=t);var g=0;if(this.$useWrapMode){var m=this.$wrapData[s];if(m){for(var v=0;p.length>=m[v];)r++,v++;p=p.substring(m[v-1]||0,p.length),g=v>0?m.indent:0}}return this.lineWidgets&&this.lineWidgets[a]&&this.lineWidgets[a].rowsAbove&&(r+=this.lineWidgets[a].rowsAbove),{row:r,column:g+this.$getStringScreenWidth(p)[0]}},this.documentToScreenColumn=function(t,e){return this.documentToScreenPosition(t,e).column},this.documentToScreenRow=function(t,e){return this.documentToScreenPosition(t,e).row},this.getScreenLength=function(){var t=0,e=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,i=0,r=(a=0,(e=this.$foldData[a++])?e.start.row:1/0);ir&&(i=e.end.row+1,r=(e=this.$foldData[a++])?e.start.row:1/0)}else{t=this.getLength();for(var o=this.$foldData,a=0;an);s++);return[i,s]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker(),this.removeAllListeners(),this.selection.detach()},this.isFullWidth=n}).call(p.prototype),t("./edit_session/folding").Folding.call(p.prototype),t("./edit_session/bracket_match").BracketMatch.call(p.prototype),o.defineOptions(p.prototype,"session",{wrap:{set:function(t){if(t&&"off"!=t?"free"==t?t=!0:"printMargin"==t?t=-1:"string"==typeof t&&(t=parseInt(t,10)||!1):t=!1,this.$wrap!=t)if(this.$wrap=t,t){var e="number"==typeof t?t:null;this.setWrapLimitRange(e,e),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(t){(t="auto"==t?"text"!=this.$mode.type:"text"!=t)!=this.$wrapAsCode&&(this.$wrapAsCode=t,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(t){this.$useWorker=t,this.$stopWorker(),t&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(t){(t=parseInt(t))>0&&this.$tabSize!==t&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=t,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(t){this.setFoldStyle(t)},handlesSet:!0},overwrite:{set:function(t){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(t){this.doc.setNewLineMode(t)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(t){this.setMode(t)},get:function(){return this.$modeId},handlesSet:!0}}),e.EditSession=p}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(t,e,n){"use strict";var i=t("./lib/lang"),r=t("./lib/oop"),s=t("./range").Range,o=function(){this.$options={}};(function(){this.set=function(t){return r.mixin(this.$options,t),this},this.getOptions=function(){return i.copyObject(this.$options)},this.setOptions=function(t){this.$options=t},this.find=function(t){var e=this.$options,n=this.$matchIterator(t,e);if(!n)return!1;var i=null;return n.forEach(function(t,n,r,o){return i=new s(t,n,r,o),!(n==o&&e.start&&e.start.start&&0!=e.skipCurrent&&i.isEqual(e.start)&&(i=null,1))}),i},this.findAll=function(t){var e=this.$options;if(!e.needle)return[];this.$assembleRegExp(e);var n=e.range,r=n?t.getLines(n.start.row,n.end.row):t.doc.getAllLines(),o=[],a=e.re;if(e.$isMultiLine){var l,c=a.length,u=r.length-c;t:for(var h=a.offset||0;h<=u;h++){for(var d=0;dg||(o.push(l=new s(h,g,h+c-1,m)),c>2&&(h=h+c-2))}}else for(var v=0;vx&&o[d].end.row==n.end.row;)d--;for(o=o.slice(v,d+1),v=0,d=o.length;v=a;n--)if(h(n,Number.MAX_VALUE,t))return;if(0!=e.wrap)for(n=l,a=o.row;n>=a;n--)if(h(n,Number.MAX_VALUE,t))return}};else c=function(t){var n=o.row;if(!h(n,o.column,t)){for(n+=1;n<=l;n++)if(h(n,0,t))return;if(0!=e.wrap)for(n=a,l=o.row;n<=l;n++)if(h(n,0,t))return}};if(e.$isMultiLine)var u=n.length,h=function(e,r,s){var o=i?e-u+1:e;if(!(o<0)){var a=t.getLine(o),l=a.search(n[0]);if(!(!i&&lr))return!!s(o,l,o+u-1,h)||void 0}}};else h=i?function(e,i,r){var s,o=t.getLine(e),a=[],l=0;for(n.lastIndex=0;s=n.exec(o);){if(l=s.index,!(u=s[0].length)){if(l>=o.length)break;n.lastIndex=l+=1}if(s.index+u>i)break;a.push(s.index,u)}for(var c=a.length-1;c>=0;c-=2){var u,h=a[c-1];if(r(e,h,e,h+(u=a[c])))return!0}}:function(e,i,r){var s,o,a=t.getLine(e);for(n.lastIndex=i;o=n.exec(a);){var l=o[0].length;if(r(e,s=o.index,e,s+l))return!0;if(!l&&(n.lastIndex=s+=1,s>=a.length))return!1}};return{forEach:c}}}).call(o.prototype),e.Search=o}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(t,e,n){"use strict";var i=t("../lib/keys"),r=t("../lib/useragent"),s=i.KEY_MODS;function o(t,e){this.platform=e||(r.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(t),this.$singleCommand=!0}function a(t,e){o.call(this,t,e),this.$singleCommand=!1}a.prototype=o.prototype,(function(){function t(t){return"object"==typeof t&&t.bindKey&&t.bindKey.position||(t.isDefault?-100:0)}this.addCommand=function(t){this.commands[t.name]&&this.removeCommand(t),this.commands[t.name]=t,t.bindKey&&this._buildKeyHash(t)},this.removeCommand=function(t,e){var n=t&&("string"==typeof t?t:t.name);t=this.commands[n],e||delete this.commands[n];var i=this.commandKeyBinding;for(var r in i){var s=i[r];if(s==t)delete i[r];else if(Array.isArray(s)){var o=s.indexOf(t);-1!=o&&(s.splice(o,1),1==s.length&&(i[r]=s[0]))}}},this.bindKey=function(t,e,n){if("object"==typeof t&&t&&(null==n&&(n=t.position),t=t[this.platform]),t)return"function"==typeof e?this.addCommand({exec:e,bindKey:t,name:e.name||t}):void t.split("|").forEach(function(t){var i="";if(-1!=t.indexOf(" ")){var r=t.split(/\s+/);t=r.pop(),r.forEach(function(t){var e=this.parseKeys(t);this._addCommandToBinding(i+=(i?" ":"")+(s[e.hashId]+e.key),"chainKeys")},this),i+=" "}var o=this.parseKeys(t);this._addCommandToBinding(i+(s[o.hashId]+o.key),e,n)},this)},this._addCommandToBinding=function(e,n,i){var r,s=this.commandKeyBinding;if(n)if(!s[e]||this.$singleCommand)s[e]=n;else{Array.isArray(s[e])?-1!=(r=s[e].indexOf(n))&&s[e].splice(r,1):s[e]=[s[e]],"number"!=typeof i&&(i=t(n));var o=s[e];for(r=0;ri);r++);o.splice(r,0,n)}else delete s[e]},this.addCommands=function(t){t&&Object.keys(t).forEach(function(e){var n=t[e];if(n){if("string"==typeof n)return this.bindKey(n,e);"function"==typeof n&&(n={exec:n}),"object"==typeof n&&(n.name||(n.name=e),this.addCommand(n))}},this)},this.removeCommands=function(t){Object.keys(t).forEach(function(e){this.removeCommand(t[e])},this)},this.bindKeys=function(t){Object.keys(t).forEach(function(e){this.bindKey(e,t[e])},this)},this._buildKeyHash=function(t){this.bindKey(t.bindKey,t)},this.parseKeys=function(t){var e=t.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(t){return t}),n=e.pop(),r=i[n];if(i.FUNCTION_KEYS[r])n=i.FUNCTION_KEYS[r].toLowerCase();else{if(!e.length)return{key:n,hashId:-1};if(1==e.length&&"shift"==e[0])return{key:n.toUpperCase(),hashId:-1}}for(var s=0,o=e.length;o--;){var a=i.KEY_MODS[e[o]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+e[o]+" in "+t),!1;s|=a}return{key:n,hashId:s}},this.findKeyCommand=function(t,e){return this.commandKeyBinding[s[t]+e]},this.handleKeyboard=function(t,e,n,i){if(!(i<0)){var r=s[e]+n,o=this.commandKeyBinding[r];return t.$keyChain&&(t.$keyChain+=" "+r,o=this.commandKeyBinding[t.$keyChain]||o),!o||"chainKeys"!=o&&"chainKeys"!=o[o.length-1]?(t.$keyChain&&(e&&4!=e||1!=n.length?(-1==e||i>0)&&(t.$keyChain=""):t.$keyChain=t.$keyChain.slice(0,-r.length-1)),{command:o}):(t.$keyChain=t.$keyChain||r,{command:"null"})}},this.getStatusText=function(t,e){return e.$keyChain||""}}).call(o.prototype),e.HashHandler=o,e.MultiHashHandler=a}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(t,e,n){"use strict";var i=t("../lib/oop"),r=t("../keyboard/hash_handler").MultiHashHandler,s=t("../lib/event_emitter").EventEmitter,o=function(t,e){r.call(this,e,t),this.byName=this.commands,this.setDefaultHandler("exec",function(t){return t.command.exec(t.editor,t.args||{})})};i.inherits(o,r),(function(){i.implement(this,s),this.exec=function(t,e,n){if(Array.isArray(t)){for(var i=t.length;i--;)if(this.exec(t[i],e,n))return!0;return!1}if("string"==typeof t&&(t=this.commands[t]),!t)return!1;if(e&&e.$readOnly&&!t.readOnly)return!1;if(0!=this.$checkCommandState&&t.isAvailable&&!t.isAvailable(e))return!1;var r={editor:e,command:t,args:n};return r.returnValue=this._emit("exec",r),this._signal("afterExec",r),!1!==r.returnValue},this.toggleRecording=function(t){if(!this.$inReplay)return t&&t._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(t){this.macro.push([t.command,t.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(t){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(t);try{this.$inReplay=!0,this.macro.forEach(function(e){"string"==typeof e?this.exec(e,t):this.exec(e[0],t,e[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(t){return t.map(function(t){return"string"!=typeof t[0]&&(t[0]=t[0].name),t[1]||(t=t[0]),t})}}).call(o.prototype),e.CommandManager=o}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(t,e,n){"use strict";var i=t("../lib/lang"),r=t("../config"),s=t("../range").Range;function o(t,e){return{win:t,mac:e}}e.commands=[{name:"showSettingsMenu",bindKey:o("Ctrl-,","Command-,"),exec:function(t){r.loadModule("ace/ext/settings_menu",function(e){e.init(t),t.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:o("Alt-E","F4"),exec:function(t){r.loadModule("./ext/error_marker",function(e){e.showErrorMarker(t,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:o("Alt-Shift-E","Shift-F4"),exec:function(t){r.loadModule("./ext/error_marker",function(e){e.showErrorMarker(t,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:o("Ctrl-A","Command-A"),exec:function(t){t.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:o(null,"Ctrl-L"),exec:function(t){t.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:o("Ctrl-L","Command-L"),exec:function(t,e){"number"!=typeof e||isNaN(e)||t.gotoLine(e),t.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:o("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(t){t.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:o("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(t){t.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:o("F2","F2"),exec:function(t){t.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:o("Alt-F2","Alt-F2"),exec:function(t){t.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(t){t.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(t){t.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:o("Alt-0","Command-Option-0"),exec:function(t){t.session.foldAll(),t.session.unfold(t.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:o("Alt-Shift-0","Command-Option-Shift-0"),exec:function(t){t.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:o("Ctrl-K","Command-G"),exec:function(t){t.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:o("Ctrl-Shift-K","Command-Shift-G"),exec:function(t){t.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:o("Alt-K","Ctrl-G"),exec:function(t){t.selection.isEmpty()?t.selection.selectWord():t.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:o("Alt-Shift-K","Ctrl-Shift-G"),exec:function(t){t.selection.isEmpty()?t.selection.selectWord():t.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:o("Ctrl-F","Command-F"),exec:function(t){r.loadModule("ace/ext/searchbox",function(e){e.Search(t)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(t){t.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:o("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(t){t.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:o("Ctrl-Home","Command-Home|Command-Up"),exec:function(t){t.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:o("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(t){t.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:o("Up","Up|Ctrl-P"),exec:function(t,e){t.navigateUp(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:o("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(t){t.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:o("Ctrl-End","Command-End|Command-Down"),exec:function(t){t.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:o("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(t){t.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:o("Down","Down|Ctrl-N"),exec:function(t,e){t.navigateDown(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:o("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(t){t.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:o("Ctrl-Left","Option-Left"),exec:function(t){t.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:o("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(t){t.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:o("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(t){t.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:o("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(t){t.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:o("Left","Left|Ctrl-B"),exec:function(t,e){t.navigateLeft(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:o("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(t){t.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:o("Ctrl-Right","Option-Right"),exec:function(t){t.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:o("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(t){t.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:o("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(t){t.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:o("Shift-Right","Shift-Right"),exec:function(t){t.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:o("Right","Right|Ctrl-F"),exec:function(t,e){t.navigateRight(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(t){t.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:o(null,"Option-PageDown"),exec:function(t){t.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:o("PageDown","PageDown|Ctrl-V"),exec:function(t){t.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(t){t.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:o(null,"Option-PageUp"),exec:function(t){t.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(t){t.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:o("Ctrl-Up",null),exec:function(t){t.renderer.scrollBy(0,-2*t.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:o("Ctrl-Down",null),exec:function(t){t.renderer.scrollBy(0,2*t.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(t){t.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(t){t.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:o("Ctrl-Alt-E","Command-Option-E"),exec:function(t){t.commands.toggleRecording(t)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:o("Ctrl-Shift-E","Command-Shift-E"),exec:function(t){t.commands.replay(t)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:o("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(t){t.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:o("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(t){t.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:o("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(t){t.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:o(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(t){},readOnly:!0},{name:"cut",description:"Cut",exec:function(t){var e=t.$copyWithEmptySelection&&t.selection.isEmpty()?t.selection.getLineRange():t.selection.getRange();t._emit("cut",e),e.isEmpty()||t.session.remove(e),t.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(t,e){t.$handlePaste(e)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:o("Ctrl-D","Command-D"),exec:function(t){t.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:o("Ctrl-Shift-D","Command-Shift-D"),exec:function(t){t.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:o("Ctrl-Alt-S","Command-Alt-S"),exec:function(t){t.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:o("Ctrl-/","Command-/"),exec:function(t){t.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:o("Ctrl-Shift-/","Command-Shift-/"),exec:function(t){t.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:o("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(t){t.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:o("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(t){t.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:o("Ctrl-H","Command-Option-F"),exec:function(t){r.loadModule("ace/ext/searchbox",function(e){e.Search(t,!0)})}},{name:"undo",description:"Undo",bindKey:o("Ctrl-Z","Command-Z"),exec:function(t){t.undo()}},{name:"redo",description:"Redo",bindKey:o("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(t){t.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:o("Alt-Shift-Up","Command-Option-Up"),exec:function(t){t.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:o("Alt-Up","Option-Up"),exec:function(t){t.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:o("Alt-Shift-Down","Command-Option-Down"),exec:function(t){t.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:o("Alt-Down","Option-Down"),exec:function(t){t.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:o("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(t){t.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:o("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(t){t.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:o("Shift-Delete",null),exec:function(t){if(!t.selection.isEmpty())return!1;t.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:o("Alt-Backspace","Command-Backspace"),exec:function(t){t.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:o("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(t){t.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:o("Ctrl-Shift-Backspace",null),exec:function(t){var e=t.selection.getRange();e.start.column=0,t.session.remove(e)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:o("Ctrl-Shift-Delete",null),exec:function(t){var e=t.selection.getRange();e.end.column=Number.MAX_VALUE,t.session.remove(e)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:o("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(t){t.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:o("Ctrl-Delete","Alt-Delete"),exec:function(t){t.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:o("Shift-Tab","Shift-Tab"),exec:function(t){t.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:o("Tab","Tab"),exec:function(t){t.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:o("Ctrl-[","Ctrl-["),exec:function(t){t.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:o("Ctrl-]","Ctrl-]"),exec:function(t){t.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(t,e){t.insert(e)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(t,e){t.insert(i.stringRepeat(e.text||"",e.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:o(null,"Ctrl-O"),exec:function(t){t.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:o("Alt-Shift-X","Ctrl-T"),exec:function(t){t.transposeLetters()},multiSelectAction:function(t){t.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:o("Ctrl-U","Ctrl-U"),exec:function(t){t.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:o("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(t){t.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:o(null,null),exec:function(t){t.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:o("Ctrl-Shift-L","Command-Shift-L"),exec:function(t){var e=t.selection.getRange();e.start.column=e.end.column=0,e.end.row++,t.selection.setRange(e,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",description:"Join lines",bindKey:o(null,null),exec:function(t){for(var e=t.selection.isBackwards(),n=e?t.selection.getSelectionLead():t.selection.getSelectionAnchor(),r=e?t.selection.getSelectionAnchor():t.selection.getSelectionLead(),o=t.session.doc.getLine(n.row).length,a=t.session.doc.getTextRange(t.selection.getRange()).replace(/\n\s*/," ").length,l=t.session.doc.getLine(n.row),c=n.row+1;c<=r.row+1;c++){var u=i.stringTrimLeft(i.stringTrimRight(t.session.doc.getLine(c)));0!==u.length&&(u=" "+u),l+=u}r.row+10?(t.selection.moveCursorTo(n.row,n.column),t.selection.selectTo(n.row,n.column+a)):(o=t.session.doc.getLine(n.row).length>o?o+1:o,t.selection.moveCursorTo(n.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:o(null,null),exec:function(t){var e=t.session.doc.getLength()-1,n=t.session.doc.getLine(e).length,i=t.selection.rangeList.ranges,r=[];i.length<1&&(i=[t.selection.getRange()]);for(var o=0;o=r.lastRow||i.end.row<=r.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}var s=this.selection.toJSON();this.curOp.selectionAfter=s,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(s),this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(t){if(this.$mergeUndoDeltas){var e=this.prevOp,n=this.$mergeableCommands,i=e.command&&t.command.name==e.command.name;if("insertstring"==t.command.name){var r=t.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),i=i&&this.mergeNextCommand&&(!/\s/.test(r)||/\s/.test(e.args)),this.mergeNextCommand=!0}else i=i&&-1!==n.indexOf(t.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(i=!1),i?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(t.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(t,e){if(t&&"string"==typeof t&&"ace"!=t){this.$keybindingId=t;var n=this;v.loadModule(["keybinding",t],function(i){n.$keybindingId==t&&n.keyBinding.setKeyboardHandler(i&&i.handler),e&&e()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(t),e&&e()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(t){if(this.session!=t){this.curOp&&this.endOperation(),this.curOp={};var e=this.session;if(e){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=t,t?(this.$onDocumentChange=this.onDocumentChange.bind(this),t.on("change",this.$onDocumentChange),this.renderer.setSession(t),this.$onChangeMode=this.onChangeMode.bind(this),t.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),t.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),t.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),t.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),t.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),t.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=t.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(t)),this._signal("changeSession",{session:t,oldSession:e}),this.curOp=null,e&&e._signal("changeEditor",{oldEditor:this}),t&&t._signal("changeEditor",{editor:this}),t&&t.bgTokenizer&&t.bgTokenizer.scheduleStart()}},this.getSession=function(){return this.session},this.setValue=function(t,e){return this.session.doc.setValue(t),e?1==e?this.navigateFileEnd():-1==e&&this.navigateFileStart():this.selectAll(),t},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(t){this.renderer.onResize(t)},this.setTheme=function(t,e){this.renderer.setTheme(t,e)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(t){this.renderer.setStyle(t)},this.unsetStyle=function(t){this.renderer.unsetStyle(t)},this.getFontSize=function(){return this.getOption("fontSize")||r.computedStyle(this.container).fontSize},this.setFontSize=function(t){this.setOption("fontSize",t)},this.$highlightBrackets=function(){if(!this.$highlightPending){var t=this;this.$highlightPending=!0,setTimeout(function(){t.$highlightPending=!1;var e=t.session;if(e&&e.bgTokenizer){e.$bracketHighlight&&(e.$bracketHighlight.markerIds.forEach(function(t){e.removeMarker(t)}),e.$bracketHighlight=null);var n=e.getMatchingBracketRanges(t.getCursorPosition());if(!n&&e.$mode.getMatching&&(n=e.$mode.getMatching(t.session)),n){var i="ace_bracket";Array.isArray(n)?1==n.length&&(i="ace_error_bracket"):n=[n],2==n.length&&(0==f.comparePoints(n[0].end,n[1].start)?n=[f.fromPoints(n[0].start,n[1].end)]:0==f.comparePoints(n[0].start,n[1].end)&&(n=[f.fromPoints(n[1].start,n[0].end)])),e.$bracketHighlight={ranges:n,markerIds:n.map(function(t){return e.addMarker(t,i,"text")})}}}},50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var t=this;this.$highlightTagPending=!0,setTimeout(function(){t.$highlightTagPending=!1;var e=t.session;if(e&&e.bgTokenizer){var n=t.getCursorPosition(),i=new y(t.session,n.row,n.column),r=i.getCurrentToken();if(!r||!/\b(?:tag-open|tag-name)/.test(r.type))return e.removeMarker(e.$tagHighlight),void(e.$tagHighlight=null);if(-1===r.type.indexOf("tag-open")||(r=i.stepForward())){var s=r.value,o=r.value,a=0,l=i.stepBackward();if("<"===l.value)do{l=r,(r=i.stepForward())&&(-1!==r.type.indexOf("tag-name")?s===(o=r.value)&&("<"===l.value?a++:""===r.value&&a--)}while(r&&a>=0);else{do{if(r=l,l=i.stepBackward(),r)if(-1!==r.type.indexOf("tag-name"))s===r.value&&("<"===l.value?a++:""===r.value){for(var c=0,u=l;u;){if(-1!==u.type.indexOf("tag-name")&&u.value===s){a--;break}if("<"===u.value)break;u=i.stepBackward(),c++}for(var h=0;h1||(t=!1)),e.$highlightLineMarker&&!t)e.removeMarker(e.$highlightLineMarker.id),e.$highlightLineMarker=null;else if(!e.$highlightLineMarker&&t){var n=new f(t.row,t.column,t.row,1/0);n.id=e.addMarker(n,"ace_active-line","screenLine"),e.$highlightLineMarker=n}else t&&(e.$highlightLineMarker.start.row=t.row,e.$highlightLineMarker.end.row=t.row,e.$highlightLineMarker.start.column=t.column,e._signal("changeBackMarker"))},this.onSelectionChange=function(t){var e=this.session;if(e.$selectionMarker&&e.removeMarker(e.$selectionMarker),e.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),i=this.getSelectionStyle();e.$selectionMarker=e.addMarker(n,"ace_selection",i)}var r=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(r),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var t=this.session,e=this.getSelectionRange();if(!e.isEmpty()&&!e.isMultiLine()){var n=e.start.column,i=e.end.column,r=t.getLine(e.start.row),s=r.substring(n,i);if(!(s.length>5e3)&&/[\w\d]/.test(s)){var o=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:s}),a=r.substring(n-1,i+1);if(o.test(a))return o}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(t){this.renderer.updateText(),this._emit("changeMode",t)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var t=this.getSelectedText(),e=this.session.doc.getNewLineCharacter(),n=!1;if(!t&&this.$copyWithEmptySelection){n=!0;for(var i=this.selection.getAllRanges(),r=0;ra.search(/\S|$/)){var l=a.substr(r.column).search(/\S|$/);n.doc.removeInLine(r.row,r.column,r.column+l)}}this.clearSelection();var c=r.column,u=n.getState(r.row),h=(a=n.getLine(r.row),i.checkOutdent(u,a,t));if(n.insert(r,t),s&&s.selection&&this.selection.setSelectionRange(2==s.selection.length?new f(r.row,c+s.selection[0],r.row,c+s.selection[1]):new f(r.row+s.selection[0],s.selection[1],r.row+s.selection[2],s.selection[3])),this.$enableAutoIndent){if(n.getDocument().isNewLine(t)){var d=i.getNextLineIndent(u,a.slice(0,r.column),n.getTabString());n.insert({row:r.row+1,column:0},d)}h&&i.autoOutdent(u,n,r.row)}},this.autoIndent=function(){var t,e,n=this.session,i=n.getMode();if(this.selection.isEmpty())t=0,e=n.doc.getLength()-1;else{var r=this.getSelectionRange();t=r.start.row,e=r.end.row}for(var s,o,a,l="",c="",u="",h=n.getTabString(),d=t;d<=e;d++)d>0&&(l=n.getState(d-1),c=n.getLine(d-1),u=i.getNextLineIndent(l,c,h)),s=n.getLine(d),u!==(o=i.$getIndent(s))&&(o.length>0&&(a=new f(d,0,d,o.length),n.remove(a)),u.length>0&&n.insert({row:d,column:0},u)),i.autoOutdent(l,n,d)},this.onTextInput=function(t,e){if(!e)return this.keyBinding.onTextInput(t);this.startOperation({command:{name:"insertstring"}});var n=this.applyComposition.bind(this,t,e);this.selection.rangeCount?this.forEachSelection(n):n(),this.endOperation()},this.applyComposition=function(t,e){var n;(e.extendLeft||e.extendRight)&&((n=this.selection.getRange()).start.column-=e.extendLeft,n.end.column+=e.extendRight,n.start.column<0&&(n.start.row--,n.start.column+=this.session.getLine(n.start.row).length+1),this.selection.setRange(n),t||n.isEmpty()||this.remove()),!t&&this.selection.isEmpty()||this.insert(t,!0),(e.restoreStart||e.restoreEnd)&&((n=this.selection.getRange()).start.column-=e.restoreStart,n.end.column-=e.restoreEnd,this.selection.setRange(n))},this.onCommandKey=function(t,e,n){return this.keyBinding.onCommandKey(t,e,n)},this.setOverwrite=function(t){this.session.setOverwrite(t)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(t){this.setOption("scrollSpeed",t)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(t){this.setOption("dragDelay",t)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(t){this.setOption("selectionStyle",t)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(t){this.setOption("highlightActiveLine",t)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(t){this.setOption("highlightGutterLine",t)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(t){this.setOption("highlightSelectedWord",t)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(t){this.renderer.setAnimatedScroll(t)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(t){this.renderer.setShowInvisibles(t)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(t){this.renderer.setDisplayIndentGuides(t)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(t){this.renderer.setShowPrintMargin(t)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(t){this.renderer.setPrintMarginColumn(t)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(t){this.setOption("readOnly",t)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(t){this.setOption("behavioursEnabled",t)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(t){this.setOption("wrapBehavioursEnabled",t)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(t){this.setOption("showFoldWidgets",t)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(t){this.setOption("fadeFoldWidgets",t)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(t){this.selection.isEmpty()&&("left"==t?this.selection.selectLeft():this.selection.selectRight());var e=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,i=n.getState(e.start.row),r=n.getMode().transformAction(i,"deletion",this,n,e);if(0===e.end.column){var s=n.getTextRange(e);if("\n"==s[s.length-1]){var o=n.getLine(e.end.row);/^\s+$/.test(o)&&(e.end.column=o.length)}}r&&(e=r)}this.session.remove(e),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var t=this.getSelectionRange();t.start.column==t.end.column&&t.start.row==t.end.row&&(t.end.column=0,t.end.row++),this.session.remove(t),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var t=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(t)},this.transposeLetters=function(){if(this.selection.isEmpty()){var t=this.getCursorPosition(),e=t.column;if(0!==e){var n,i,r=this.session.getLine(t.row);ee.toLowerCase()?1:0});var r=new f(0,0,0,0);for(i=t.first;i<=t.last;i++){var s=e.getLine(i);r.start.row=i,r.end.row=i,r.end.column=s.length,e.replace(r,n[i-t.first])}},this.toggleCommentLines=function(){var t=this.session.getState(this.getCursorPosition().row),e=this.$getSelectedRows();this.session.getMode().toggleCommentLines(t,this.session,e.first,e.last)},this.toggleBlockComment=function(){var t=this.getCursorPosition(),e=this.session.getState(t.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(e,this.session,n,t)},this.getNumberAt=function(t,e){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var i=this.session.getLine(t);n.lastIndex=e)return{value:r[0],start:r.index,end:r.index+r[0].length}}return null},this.modifyNumber=function(t){var e=this.selection.getCursor().row,n=this.selection.getCursor().column,i=new f(e,n-1,e,n),r=this.session.getTextRange(i);if(!isNaN(parseFloat(r))&&isFinite(r)){var s=this.getNumberAt(e,n);if(s){var o=s.value.indexOf(".")>=0?s.start+s.value.indexOf(".")+1:s.end,a=s.start+s.value.length-o,l=parseFloat(s.value);l*=Math.pow(10,a),l+=t*=o!==s.end&&n=a&&o<=l&&(n=e,c.selection.clearSelection(),c.moveCursorTo(t,a+i),c.selection.selectTo(t,l+i)),a=l});for(var u,h=this.$toggleWordPairs,d=0;df+1)break;f=p.last}for(u--,a=this.session.$moveLines(d,f,e?0:t),e&&-1==t&&(h=u+1);h<=u;)o[h].moveBy(a,0),h++;e||(a=0),l+=a}r.fromOrientedRange(r.ranges[0]),r.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(t){return t=(t||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(t.start.row),last:this.session.getRowFoldEnd(t.end.row)}},this.onCompositionStart=function(t){this.renderer.showComposition(t)},this.onCompositionUpdate=function(t){this.renderer.setCompositionText(t)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(t){return t>=this.getFirstVisibleRow()&&t<=this.getLastVisibleRow()},this.isRowFullyVisible=function(t){return t>=this.renderer.getFirstFullyVisibleRow()&&t<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(t,e){var n=this.renderer,i=this.renderer.layerConfig,r=t*Math.floor(i.height/i.lineHeight);!0===e?this.selection.$moveSelection(function(){this.moveCursorBy(r,0)}):!1===e&&(this.selection.moveCursorBy(r,0),this.selection.clearSelection());var s=n.scrollTop;n.scrollBy(0,r*i.lineHeight),null!=e&&n.scrollCursorIntoView(null,.5),n.animateScrolling(s)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(t){this.renderer.scrollToRow(t)},this.scrollToLine=function(t,e,n,i){this.renderer.scrollToLine(t,e,n,i)},this.centerSelection=function(){var t=this.getSelectionRange(),e={row:Math.floor(t.start.row+(t.end.row-t.start.row)/2),column:Math.floor(t.start.column+(t.end.column-t.start.column)/2)};this.renderer.alignCursor(e,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.selection.selectAll()},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(t,e){this.selection.moveCursorTo(t,e)},this.moveCursorToPosition=function(t){this.selection.moveCursorToPosition(t)},this.jumpToMatching=function(t,e){var n=this.getCursorPosition(),i=new y(this.session,n.row,n.column),r=i.getCurrentToken(),s=r||i.stepForward();if(s){var o,a,l=!1,c={},u=n.column-s.start,h={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(s.value.match(/[{}()\[\]]/g)){for(;u=0;--s)this.$tryReplace(n[s],t)&&i++;return this.selection.setSelectionRange(r),i},this.$tryReplace=function(t,e){var n=this.session.getTextRange(t);return null!==(e=this.$search.replace(n,e))?(t.end=this.session.replace(t,e),t):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(t,e,n){e||(e={}),"string"==typeof t||t instanceof RegExp?e.needle=t:"object"==typeof t&&i.mixin(e,t);var r=this.selection.getRange();null==e.needle&&((t=this.session.getTextRange(r)||this.$search.$options.needle)||(r=this.session.getWordRange(r.start.row,r.start.column),t=this.session.getTextRange(r)),this.$search.set({needle:t})),this.$search.set(e),e.start||this.$search.set({start:r});var s=this.$search.find(this.session);return e.preventScroll?s:s?(this.revealRange(s,n),s):(e.backwards?r.start=r.end:r.end=r.start,void this.selection.setRange(r))},this.findNext=function(t,e){this.find({skipCurrent:!0,backwards:!1},t,e)},this.findPrevious=function(t,e){this.find(t,{skipCurrent:!0,backwards:!0},e)},this.revealRange=function(t,e){this.session.unfold(t),this.selection.setSelectionRange(t);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(t.start,t.end,.5),!1!==e&&this.renderer.animateScrolling(n)},this.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(t){t.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},this.setAutoScrollEditorIntoView=function(t){if(t){var e,n=this,i=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var r=this.$scrollAnchor;r.style.cssText="position:absolute",this.container.insertBefore(r,this.container.firstChild);var s=this.on("changeSelection",function(){i=!0}),o=this.renderer.on("beforeRender",function(){i&&(e=n.renderer.container.getBoundingClientRect())}),a=this.renderer.on("afterRender",function(){if(i&&e&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var t=n.renderer,s=t.$cursorLayer.$pixelPos,o=t.layerConfig,a=s.top-o.offset;null!=(i=s.top>=0&&a+e.top<0||!(s.topwindow.innerHeight)&&null)&&(r.style.top=a+"px",r.style.left=s.left+"px",r.style.height=o.lineHeight+"px",r.scrollIntoView(i)),i=e=null}});this.setAutoScrollEditorIntoView=function(t){t||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",s),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",o))}}},this.$resetCursorStyle=function(){var t=this.$cursorStyle||"ace",e=this.renderer.$cursorLayer;e&&(e.setSmoothBlinking(/smooth/.test(t)),e.isBlinking=!this.$readOnly&&"wide"!=t,r.setCssClass(e.element,"ace_slim-cursors",/slim/.test(t)))},this.prompt=function(t,e,n){var i=this;v.loadModule("./ext/prompt",function(r){r.prompt(i,t,e,n)})}}).call(w.prototype),v.defineOptions(w.prototype,"editor",{selectionStyle:{set:function(t){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:t})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(t){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(t){this.textInput.setReadOnly(t),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(t){this.textInput.setCopyWithEmptySelection(t)},initialValue:!1},cursorStyle:{set:function(t){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(t){this.setAutoScrollEditorIntoView(t)}},keyboardHandler:{set:function(t){this.setKeyboardHandler(t)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(t){this.session.setValue(t)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(t){this.setSession(t)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(t){this.renderer.$gutterLayer.setShowLineNumbers(t),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),t&&this.$relativeLineNumbers?x.attach(this):x.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(t){this.$showLineNumbers&&t?x.attach(this):x.detach(this)}},placeholder:{set:function(t){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var t=this.session&&(this.renderer.$composition||this.getValue());if(t&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),r.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(t||this.renderer.placeholderNode)!t&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");else{this.renderer.on("afterRender",this.$updatePlaceholder),r.addCssClass(this.container,"ace_hasPlaceholder");var e=r.createElement("div");e.className="ace_placeholder",e.textContent=this.$placeholder||"",this.renderer.placeholderNode=e,this.renderer.content.appendChild(this.renderer.placeholderNode)}}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var x={getText:function(t,e){return(Math.abs(t.selection.lead.row-e)||e+1+(e<9?"\xb7":""))+""},getWidth:function(t,e,n){return Math.max(e.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(t,e){e.renderer.$loop.schedule(e.renderer.CHANGE_GUTTER)},attach:function(t){t.renderer.$gutterLayer.$renderer=this,t.on("changeSelection",this.update),this.update(null,t)},detach:function(t){t.renderer.$gutterLayer.$renderer==this&&(t.renderer.$gutterLayer.$renderer=null),t.off("changeSelection",this.update),this.update(null,t)}};e.Editor=w}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(t,e,n){"use strict";var i=function(){this.$maxRev=0,this.$fromUndo=!1,this.reset()};(function(){this.addSession=function(t){this.$session=t},this.add=function(t,e,n){this.$fromUndo||t!=this.$lastDelta&&(this.$keepRedoStack||(this.$redoStack.length=0),!1!==e&&this.lastDeltas||(this.lastDeltas=[],this.$undoStack.push(this.lastDeltas),t.id=this.$rev=++this.$maxRev),"remove"!=t.action&&"insert"!=t.action||(this.$lastDelta=t),this.lastDeltas.push(t))},this.addSelection=function(t,e){this.selections.push({value:t,rev:e||this.$rev})},this.startNewGroup=function(){return this.lastDeltas=null,this.$rev},this.markIgnored=function(t,e){null==e&&(e=this.$rev+1);for(var n=this.$undoStack,i=n.length;i--;){var r=n[i][0];if(r.id<=t)break;r.id0},this.canRedo=function(){return this.$redoStack.length>0},this.bookmark=function(t){null==t&&(t=this.$rev),this.mark=t},this.isAtBookmark=function(){return this.$rev===this.mark},this.toJSON=function(){},this.fromJSON=function(){},this.hasUndo=this.canUndo,this.hasRedo=this.canRedo,this.isClean=this.isAtBookmark,this.markClean=this.bookmark,this.$prettyPrint=function(t){return t?a(t):a(this.$undoStack)+"\n---\n"+a(this.$redoStack)}}).call(i.prototype);var r=t("./range").Range,s=r.comparePoints;function o(t){return{row:t.row,column:t.column}}function a(t){if(t=t||this,Array.isArray(t))return t.map(a).join("\n");var e="";return t.action?(e="insert"==t.action?"+":"-",e+="["+t.lines+"]"):t.value&&(e=Array.isArray(t.value)?t.value.map(l).join("\n"):l(t.value)),t.start&&(e+=l(t)),(t.id||t.rev)&&(e+="\t("+(t.id||t.rev)+")"),e}function l(t){return t.start.row+":"+t.start.column+"=>"+t.end.row+":"+t.end.column}function c(t,e){var n="insert"==t.action,i="insert"==e.action;if(n&&i)if(s(e.start,t.end)>=0)d(e,t,-1);else{if(!(s(e.start,t.start)<=0))return null;d(t,e,1)}else if(n&&!i)if(s(e.start,t.end)>=0)d(e,t,-1);else{if(!(s(e.end,t.start)<=0))return null;d(t,e,-1)}else if(!n&&i)if(s(e.start,t.start)>=0)d(e,t,1);else{if(!(s(e.start,t.start)<=0))return null;d(t,e,1)}else if(!n&&!i)if(s(e.start,t.start)>=0)d(e,t,1);else{if(!(s(e.end,t.start)<=0))return null;d(t,e,-1)}return[e,t]}function u(t,e){for(var n=t.length;n--;)for(var i=0;i=0?d(t,e,-1):(s(t.start,e.start)<=0||d(t,r.fromPoints(e.start,t.start),-1),d(e,t,1));else if(!n&&i)s(e.start,t.end)>=0?d(e,t,-1):(s(e.start,t.start)<=0||d(e,r.fromPoints(t.start,e.start),-1),d(t,e,1));else if(!n&&!i)if(s(e.start,t.end)>=0)d(e,t,-1);else{var o,a;if(!(s(e.end,t.start)<=0))return s(t.start,e.start)<0&&(o=t,t=p(t,e.start)),s(t.end,e.end)>0&&(a=p(t,e.end)),f(e.end,t.start,t.end,-1),a&&!o&&(t.lines=a.lines,t.start=a.start,t.end=a.end,a=t),[e,o,a].filter(Boolean);d(t,e,-1)}return[e,t]}function d(t,e,n){f(t.start,e.start,e.end,n),f(t.end,e.start,e.end,n)}function f(t,e,n,i){t.row==(1==i?e:n).row&&(t.column+=i*(n.column-e.column)),t.row+=i*(n.row-e.row)}function p(t,e){var n=t.lines,i=t.end;t.end=o(e);var r=t.end.row-t.start.row,s=n.splice(r,n.length),a=r?e.column:e.column-t.start.column;return n.push(s[0].substring(0,a)),s[0]=s[0].substr(a),{start:o(e),end:i,lines:s,action:t.action}}function g(t,e){e=function(t){return{start:o(t.start),end:o(t.end),action:t.action,lines:t.lines.slice()}}(e);for(var n=t.length;n--;){for(var i=t[n],r=0;rs&&(s=(r=e.getNextFoldLine(l=r.end.row+1,r))?r.start.row:1/0),l>i){for(;this.$lines.getLength()>a+1;)this.$lines.pop();break}(o=this.$lines.get(++a))?o.row=l:(o=this.$lines.createCell(l,t,this.session,c),this.$lines.push(o)),this.$renderCell(o,t,r,l),l++}this._signal("afterRender"),this.$updateGutterWidth(t)},this.$updateGutterWidth=function(t){var e=this.session,n=e.gutterRenderer||this.$renderer,i=e.$firstLineNumber,r=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||e.$useWrapMode)&&(r=e.getLength()+i-1);var s=n?n.getWidth(e,r,t):r.toString().length*t.characterWidth,o=this.$padding||this.$computePadding();(s+=o.left+o.right)===this.gutterWidth||isNaN(s)||(this.gutterWidth=s,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",s))},this.$updateCursorRow=function(){if(this.$highlightGutterLine){var t=this.session.selection.getCursor();this.$cursorRow!==t.row&&(this.$cursorRow=t.row)}},this.updateLineHighlight=function(){if(this.$highlightGutterLine){var t=this.session.selection.cursor.row;if(this.$cursorRow=t,!this.$cursorCell||this.$cursorCell.row!=t){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var e=this.$lines.cells;this.$cursorCell=null;for(var n=0;n=this.$cursorRow){if(i.row>this.$cursorRow){var r=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&r&&r.start.row==e[n-1].row))break;i=e[n-1]}i.element.className="ace_gutter-active-line "+i.element.className,this.$cursorCell=i;break}}}}},this.scrollLines=function(t){var e=this.config;if(this.config=t,this.$updateCursorRow(),this.$lines.pageChanged(e,t))return this.update(t);this.$lines.moveContainer(t);var n=Math.min(t.lastRow+t.gutterOffset,this.session.getLength()-1),i=this.oldLastRow;if(this.oldLastRow=n,!e||i0;r--)this.$lines.shift();if(i>n)for(r=this.session.getFoldedRowCount(n+1,i);r>0;r--)this.$lines.pop();t.firstRowi&&this.$lines.push(this.$renderLines(t,i+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(t)},this.$renderLines=function(t,e,n){for(var i=[],r=e,s=this.session.getNextFoldLine(r),o=s?s.start.row:1/0;r>o&&(o=(s=this.session.getNextFoldLine(r=s.end.row+1,s))?s.start.row:1/0),!(r>n);){var a=this.$lines.createCell(r,t,this.session,c);this.$renderCell(a,t,s,r),i.push(a),r++}return i},this.$renderCell=function(t,e,n,r){var s=t.element,o=this.session,a=s.childNodes[0],l=s.childNodes[1],c=o.$firstLineNumber,u=o.$breakpoints,h=o.$decorations,d=o.gutterRenderer||this.$renderer,f=this.$showFoldWidgets&&o.foldWidgets,p=n?n.start.row:Number.MAX_VALUE,g="ace_gutter-cell ";if(this.$highlightGutterLine&&(r==this.$cursorRow||n&&r=p&&this.$cursorRow<=n.end.row)&&(g+="ace_gutter-active-line ",this.$cursorCell!=t&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=t)),u[r]&&(g+=u[r]),h[r]&&(g+=h[r]),this.$annotations[r]&&(g+=this.$annotations[r].className),s.className!=g&&(s.className=g),f){var m=f[r];null==m&&(m=f[r]=o.getFoldWidget(r))}m?(g="ace_fold-widget ace_"+m,l.className!=(g+="start"==m&&r==p&&rn.right-e.right?"foldWidgets":void 0}}).call(l.prototype),e.Gutter=l}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(t,e,n){"use strict";var i=t("../range").Range,r=t("../lib/dom"),s=function(t){this.element=r.createElement("div"),this.element.className="ace_layer ace_marker-layer",t.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(t){this.$padding=t},this.setSession=function(t){this.session=t},this.setMarkers=function(t){this.markers=t},this.elt=function(t,e){var n=-1!=this.i&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=e,n.className=t},this.update=function(t){if(t){var e;for(var n in this.config=t,this.i=0,this.markers){var i=this.markers[n];if(i.range){var r=i.range.clipRows(t.firstRow,t.lastRow);if(!r.isEmpty())if(r=r.toScreenRange(this.session),i.renderer){var s=this.$getTop(r.start.row,t);i.renderer(e,r,this.$padding+r.start.column*t.characterWidth,s,t)}else"fullLine"==i.type?this.drawFullLineMarker(e,r,i.clazz,t):"screenLine"==i.type?this.drawScreenLineMarker(e,r,i.clazz,t):r.isMultiLine()?"text"==i.type?this.drawTextMarker(e,r,i.clazz,t):this.drawMultiLineMarker(e,r,i.clazz,t):this.drawSingleLineMarker(e,r,i.clazz+" ace_start ace_br15",t)}else i.update(e,this,this.session,t)}if(-1!=this.i)for(;this.id?4:0)|(c==l?8:0)),r,c==l?0:1,s)},this.drawMultiLineMarker=function(t,e,n,i,r){var s,o=this.$padding,a=i.lineHeight,l=this.$getTop(e.start.row,i),c=o+e.start.column*i.characterWidth;if(r=r||"",this.session.$bidiHandler.isBidiRow(e.start.row)?((s=e.clone()).end.row=s.start.row,s.end.column=this.session.getLine(s.start.row).length,this.drawBidiSingleLineMarker(t,s,n+" ace_br1 ace_start",i,null,r)):this.elt(n+" ace_br1 ace_start","height:"+a+"px;right:0;top:"+l+"px;left:"+c+"px;"+(r||"")),this.session.$bidiHandler.isBidiRow(e.end.row)?((s=e.clone()).start.row=s.end.row,s.start.column=0,this.drawBidiSingleLineMarker(t,s,n+" ace_br12",i,null,r)):(l=this.$getTop(e.end.row,i),this.elt(n+" ace_br12","height:"+a+"px;width:"+e.end.column*i.characterWidth+"px;top:"+l+"px;left:"+o+"px;"+(r||""))),!((a=(e.end.row-e.start.row-1)*i.lineHeight)<=0)){l=this.$getTop(e.start.row+1,i);var u=(e.start.column?1:0)|(e.end.column?0:8);this.elt(n+(u?" ace_br"+u:""),"height:"+a+"px;right:0;top:"+l+"px;left:"+o+"px;"+(r||""))}},this.drawSingleLineMarker=function(t,e,n,i,r,s){if(this.session.$bidiHandler.isBidiRow(e.start.row))return this.drawBidiSingleLineMarker(t,e,n,i,r,s);var o=i.lineHeight,a=(e.end.column+(r||0)-e.start.column)*i.characterWidth,l=this.$getTop(e.start.row,i);this.elt(n,"height:"+o+"px;width:"+a+"px;top:"+l+"px;left:"+(this.$padding+e.start.column*i.characterWidth)+"px;"+(s||""))},this.drawBidiSingleLineMarker=function(t,e,n,i,r,s){var o=i.lineHeight,a=this.$getTop(e.start.row,i),l=this.$padding;this.session.$bidiHandler.getSelections(e.start.column,e.end.column).forEach(function(t){this.elt(n,"height:"+o+"px;width:"+t.width+(r||0)+"px;top:"+a+"px;left:"+(l+t.left)+"px;"+(s||""))},this)},this.drawFullLineMarker=function(t,e,n,i,r){var s=this.$getTop(e.start.row,i),o=i.lineHeight;e.start.row!=e.end.row&&(o+=this.$getTop(e.end.row,i)-s),this.elt(n,"height:"+o+"px;top:"+s+"px;left:0;right:0;"+(r||""))},this.drawScreenLineMarker=function(t,e,n,i,r){var s=this.$getTop(e.start.row,i);this.elt(n,"height:"+i.lineHeight+"px;top:"+s+"px;left:0;right:0;"+(r||""))}}).call(s.prototype),e.Marker=s}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter"],function(t,e,n){"use strict";var i=t("../lib/oop"),r=t("../lib/dom"),s=t("../lib/lang"),o=t("./lines").Lines,a=t("../lib/event_emitter").EventEmitter,l=function(t){this.dom=r,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",t.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new o(this.element)};(function(){i.implement(this,a),this.EOF_CHAR="\xb6",this.EOL_CHAR_LF="\xac",this.EOL_CHAR_CRLF="\xa4",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="\u2014",this.SPACE_CHAR="\xb7",this.$padding=0,this.MAX_LINE_LENGTH=1e4,this.$updateEolChar=function(){var t=this.session.doc,e="\n"==t.getNewLineCharacter()&&"windows"!=t.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=e)return this.EOL_CHAR=e,!0},this.setPadding=function(t){this.$padding=t,this.element.style.margin="0 "+t+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(t){this.$fontMetrics=t,this.$fontMetrics.on("changeCharacterSize",(function(t){this._signal("changeCharacterSize",t)}).bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(t){this.session=t,t&&this.$computeTabString()},this.showInvisibles=!1,this.showSpaces=!1,this.showTabs=!1,this.showEOL=!1,this.setShowInvisibles=function(t){return this.showInvisibles!=t&&(this.showInvisibles=t,"string"==typeof t?(this.showSpaces=/tab/i.test(t),this.showTabs=/space/i.test(t),this.showEOL=/eol/i.test(t)):this.showSpaces=this.showTabs=this.showEOL=t,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(t){return this.displayIndentGuides!=t&&(this.displayIndentGuides=t,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var t=this.session.getTabSize();this.tabSize=t;for(var e=this.$tabStrings=[0],n=1;nu&&(u=(l=this.session.getNextFoldLine(a=l.end.row+1,l))?l.start.row:1/0),!(a>r);){var h=s[o++];if(h){this.dom.removeChildren(h),this.$renderLine(h,a,a==u&&l),c&&(h.style.top=this.$lines.computeLineTop(a,t,this.session)+"px");var d=t.lineHeight*this.session.getRowLength(a)+"px";h.style.height!=d&&(c=!0,h.style.height=d)}a++}if(c)for(;o0;i--)this.$lines.shift();if(e.lastRow>t.lastRow)for(i=this.session.getFoldedRowCount(t.lastRow+1,e.lastRow);i>0;i--)this.$lines.pop();t.firstRowe.lastRow&&this.$lines.push(this.$renderLinesFragment(t,e.lastRow+1,t.lastRow))},this.$renderLinesFragment=function(t,e,n){for(var i=[],s=e,o=this.session.getNextFoldLine(s),a=o?o.start.row:1/0;s>a&&(a=(o=this.session.getNextFoldLine(s=o.end.row+1,o))?o.start.row:1/0),!(s>n);){var l=this.$lines.createCell(s,t,this.session),c=l.element;this.dom.removeChildren(c),r.setStyle(c.style,"height",this.$lines.computeLineHeight(s,t,this.session)+"px"),r.setStyle(c.style,"top",this.$lines.computeLineTop(s,t,this.session)+"px"),this.$renderLine(c,s,s==a&&o),c.className=this.$useLineGroups()?"ace_line_group":"ace_line",i.push(l),s++}return i},this.update=function(t){this.$lines.moveContainer(t),this.config=t;for(var e=t.firstRow,n=t.lastRow,i=this.$lines;i.getLength();)i.pop();i.push(this.$renderLinesFragment(t,e,n))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(t,e,n,i){for(var r,o=this,a=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,l=this.dom.createFragment(this.element),c=0;r=a.exec(i);){var u=r[1],h=r[2],d=r[3],f=r[4],p=r[5];if(o.showSpaces||!h){var g=c!=r.index?i.slice(c,r.index):"";if(c=r.index+r[0].length,g&&l.appendChild(this.dom.createTextNode(g,this.element)),u){var m=o.session.getScreenTabSize(e+r.index);l.appendChild(o.$tabStrings[m].cloneNode(!0)),e+=m-1}else h?o.showSpaces?((y=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",y.textContent=s.stringRepeat(o.SPACE_CHAR,h.length),l.appendChild(y)):l.appendChild(this.com.createTextNode(h,this.element)):d?((y=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",y.textContent=s.stringRepeat(o.SPACE_CHAR,d.length),l.appendChild(y)):f?(e+=1,(y=this.dom.createElement("span")).style.width=2*o.config.characterWidth+"px",y.className=o.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",y.textContent=o.showSpaces?o.SPACE_CHAR:f,l.appendChild(y)):p&&(e+=1,(y=this.dom.createElement("span")).style.width=2*o.config.characterWidth+"px",y.className="ace_cjk",y.textContent=p,l.appendChild(y))}}if(l.appendChild(this.dom.createTextNode(c?i.slice(c):i,this.element)),this.$textToken[n.type])t.appendChild(l);else{var v="ace_"+n.type.replace(/\./g," ace_"),y=this.dom.createElement("span");"fold"==n.type&&(y.style.width=n.value.length*this.config.characterWidth+"px"),y.className=v,y.appendChild(l),t.appendChild(y)}return e+i.length},this.renderIndentGuide=function(t,e,n){var i=e.search(this.$indentGuideRe);if(i<=0||i>=n)return e;if(" "==e[0]){for(var r=(i-=i%this.tabSize)/this.tabSize,s=0;s=o;)a=this.$renderToken(l,a,u,h.substring(0,o-i)),h=h.substring(o-i),i=o,l=this.$createLineElement(),t.appendChild(l),l.appendChild(this.dom.createTextNode(s.stringRepeat("\xa0",n.indent),this.element)),a=0,o=n[++r]||Number.MAX_VALUE;0!=h.length&&(i+=h.length,a=this.$renderToken(l,a,u,h))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(l,a,null,"",!0)},this.$renderSimpleLine=function(t,e){var n=0,i=e[0],r=i.value;this.displayIndentGuides&&(r=this.renderIndentGuide(t,r)),r&&(n=this.$renderToken(t,n,i,r));for(var s=1;sthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(t,n,i,r);n=this.$renderToken(t,n,i,r)}},this.$renderOverflowMessage=function(t,e,n,i,r){n&&this.$renderToken(t,e,n,i.slice(0,this.MAX_LINE_LENGTH-e));var s=this.dom.createElement("span");s.className="ace_inline_button ace_keyword ace_toggle_wrap",s.textContent=r?"":"",t.appendChild(s)},this.$renderLine=function(t,e,n){if(n||0==n||(n=this.session.getFoldLine(e)),n)var i=this.$getFoldLineTokens(e,n);else i=this.session.getTokens(e);var r=t;if(i.length){var s=this.session.getRowSplitData(e);s&&s.length?(this.$renderWrappedLine(t,i,s),r=t.lastChild):(r=t,this.$useLineGroups()&&(r=this.$createLineElement(),t.appendChild(r)),this.$renderSimpleLine(r,i))}else this.$useLineGroups()&&(r=this.$createLineElement(),t.appendChild(r));if(this.showEOL&&r){n&&(e=n.end.row);var o=this.dom.createElement("span");o.className="ace_invisible ace_invisible_eol",o.textContent=e==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,r.appendChild(o)}},this.$getFoldLineTokens=function(t,e){var n=this.session,i=[],r=n.getTokens(t);return e.walk(function(t,e,s,o,a){null!=t?i.push({type:"fold",value:t}):(a&&(r=n.getTokens(e)),r.length&&function(t,e,n){for(var r=0,s=0;s+t[r].value.lengthn-e&&(o=o.substring(0,n-e)),i.push({type:t[r].type,value:o}),s=e+o.length,r+=1);sn?{type:t[r].type,value:o.substring(0,n-s)}:t[r]),s+=o.length,r+=1}}(r,o,s))},e.end.row,this.session.getLine(e.end.row).length),i},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){}}).call(l.prototype),e.Text=l}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(t,e,n){"use strict";var i=t("../lib/dom"),r=function(t){this.element=i.createElement("div"),this.element.className="ace_layer ace_cursor-layer",t.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),i.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)};(function(){this.$updateOpacity=function(t){for(var e=this.cursors,n=e.length;n--;)i.setStyle(e[n].style,"opacity",t?"":"0")},this.$startCssAnimation=function(){for(var t=this.cursors,e=t.length;e--;)t[e].style.animationDuration=this.blinkInterval+"ms";setTimeout((function(){i.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},this.$stopCssAnimation=function(){i.removeCssClass(this.element,"ace_animate-blinking")},this.$padding=0,this.setPadding=function(t){this.$padding=t},this.setSession=function(t){this.session=t},this.setBlinking=function(t){t!=this.isBlinking&&(this.isBlinking=t,this.restartTimer())},this.setBlinkInterval=function(t){t!=this.blinkInterval&&(this.blinkInterval=t,this.restartTimer())},this.setSmoothBlinking=function(t){t!=this.smoothBlinking&&(this.smoothBlinking=t,i.setCssClass(this.element,"ace_smooth-blinking",t),this.$updateCursors(!0),this.restartTimer())},this.addCursor=function(){var t=i.createElement("div");return t.className="ace_cursor",this.element.appendChild(t),this.cursors.push(t),t},this.removeCursor=function(){if(this.cursors.length>1){var t=this.cursors.pop();return t.parentNode.removeChild(t),t}},this.hideCursor=function(){this.isVisible=!1,i.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,i.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var t=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&i.removeCssClass(this.element,"ace_smooth-blinking"),t(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&setTimeout((function(){i.addCssClass(this.element,"ace_smooth-blinking")}).bind(this)),i.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var e=(function(){this.timeoutId=setTimeout(function(){t(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){t(!0),e()},this.blinkInterval),e()}else this.$stopCssAnimation()},this.getPixelPosition=function(t,e){if(!this.config||!this.session)return{left:0,top:0};t||(t=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(t);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,t.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),top:(n.row-(e?this.config.firstRowScreen:0))*this.config.lineHeight}},this.isCursorInView=function(t,e){return t.top>=0&&t.topt.height+t.offset||o.top<0)&&n>1)){var a=this.cursors[r++]||this.addCursor(),l=a.style;this.drawCursor?this.drawCursor(a,o,t,e[n],this.session):this.isCursorInView(o,t)?(i.setStyle(l,"display","block"),i.translate(a,o.left,o.top),i.setStyle(l,"width",Math.round(t.characterWidth)+"px"),i.setStyle(l,"height",t.lineHeight+"px")):i.setStyle(l,"display","none")}}for(;this.cursors.length>r;)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=o,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(t){t!=this.overwrite&&(this.overwrite=t,t?i.addCssClass(this.element,"ace_overwrite-cursors"):i.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(r.prototype),e.Cursor=r}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(t,e,n){"use strict";var i=t("./lib/oop"),r=t("./lib/dom"),s=t("./lib/event"),o=t("./lib/event_emitter").EventEmitter,a=32768,l=function(t){this.element=r.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=r.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xa0",this.element.appendChild(this.inner),t.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addListener(this.element,"scroll",this.onScroll.bind(this)),s.addListener(this.element,"mousedown",s.preventDefault)};(function(){i.implement(this,o),this.setVisible=function(t){this.element.style.display=t?"":"none",this.isVisible=t,this.coeff=1}}).call(l.prototype);var c=function(t,e){l.call(this,t),this.scrollTop=0,this.scrollHeight=0,e.$scrollbarWidth=this.width=r.scrollbarWidth(t.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};i.inherits(c,l),(function(){this.classSuffix="-v",this.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var t=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-t)/(this.coeff-t)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(t){this.element.style.height=t+"px"},this.setInnerHeight=this.setScrollHeight=function(t){this.scrollHeight=t,t>a?(this.coeff=a/t,t=a):1!=this.coeff&&(this.coeff=1),this.inner.style.height=t+"px"},this.setScrollTop=function(t){this.scrollTop!=t&&(this.skipEvent=!0,this.scrollTop=t,this.element.scrollTop=t*this.coeff)}}).call(c.prototype);var u=function(t,e){l.call(this,t),this.scrollLeft=0,this.height=e.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};i.inherits(u,l),(function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(t){this.element.style.width=t+"px"},this.setInnerWidth=function(t){this.inner.style.width=t+"px"},this.setScrollWidth=function(t){this.inner.style.width=t+"px"},this.setScrollLeft=function(t){this.scrollLeft!=t&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=t)}}).call(u.prototype),e.ScrollBar=c,e.ScrollBarV=c,e.ScrollBarH=u,e.VScrollBar=c,e.HScrollBar=u}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(t,e,n){"use strict";var i=t("./lib/event"),r=function(t,e){this.onRender=t,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=e||window;var n=this;this._flush=function(t){n.pending=!1;var e=n.changes;if(e&&(i.blockIdle(100),n.changes=0,n.onRender(e)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}};(function(){this.schedule=function(t){this.changes=this.changes|t,this.changes&&!this.pending&&(i.nextFrame(this._flush),this.pending=!0)},this.clear=function(t){var e=this.changes;return this.changes=0,e}}).call(r.prototype),e.RenderLoop=r}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(t,e,n){var i=t("../lib/oop"),r=t("../lib/dom"),s=t("../lib/lang"),o=t("../lib/event"),a=t("../lib/useragent"),l=t("../lib/event_emitter").EventEmitter,c=256,u="function"==typeof ResizeObserver,h=200,d=e.FontMetrics=function(t){this.el=r.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=r.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=r.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),t.appendChild(this.el),this.$measureNode.textContent=s.stringRepeat("X",c),this.$characterSize={width:0,height:0},u?this.$addObserver():this.checkForSizeChanges()};(function(){i.implement(this,l),this.$characterSize={width:0,height:0},this.$setMeasureNodeStyles=function(t,e){t.width=t.height="auto",t.left=t.top="0px",t.visibility="hidden",t.position="absolute",t.whiteSpace="pre",a.isIE<8?t["font-family"]="inherit":t.font="inherit",t.overflow=e?"hidden":"visible"},this.checkForSizeChanges=function(t){if(void 0===t&&(t=this.$measureSizes()),t&&(this.$characterSize.width!==t.width||this.$characterSize.height!==t.height)){this.$measureNode.style.fontWeight="bold";var e=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=t,this.charSizes=Object.create(null),this.allowBoldFonts=e&&e.width===t.width&&e.height===t.height,this._emit("changeCharacterSize",{data:t})}},this.$addObserver=function(){var t=this;this.$observer=new window.ResizeObserver(function(e){t.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var t=this;return this.$pollSizeChangesTimer=o.onIdle(function e(){t.checkForSizeChanges(),o.onIdle(e,500)},500)},this.setPolling=function(t){t?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(t){var e={height:(t||this.$measureNode).clientHeight,width:(t||this.$measureNode).clientWidth/c};return 0===e.width||0===e.height?null:e},this.$measureCharWidth=function(t){return this.$main.textContent=s.stringRepeat(t,c),this.$main.getBoundingClientRect().width/c},this.getCharacterWidth=function(t){var e=this.charSizes[t];return void 0===e&&(e=this.charSizes[t]=this.$measureCharWidth(t)/this.$characterSize.width),e},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},this.$getZoom=function t(e){return e&&e.parentElement?(window.getComputedStyle(e).zoom||1)*t(e.parentElement):1},this.$initTransformMeasureNodes=function(){var t=function(t,e){return["div",{style:"position: absolute;top:"+t+"px;left:"+e+"px;"}]};this.els=r.buildDom([t(0,0),t(h,0),t(0,h),t(h,h)],this.el)},this.transformCoordinates=function(t,e){function n(t,e,n){var i=t[1]*e[0]-t[0]*e[1];return[(-e[1]*n[0]+e[0]*n[1])/i,(+t[1]*n[0]-t[0]*n[1])/i]}function i(t,e){return[t[0]-e[0],t[1]-e[1]]}function r(t,e){return[t[0]+e[0],t[1]+e[1]]}function s(t,e){return[t*e[0],t*e[1]]}function o(t){var e=t.getBoundingClientRect();return[e.left,e.top]}t&&(t=s(1/this.$getZoom(this.el),t)),this.els||this.$initTransformMeasureNodes();var a=o(this.els[0]),l=o(this.els[1]),c=o(this.els[2]),u=o(this.els[3]),d=n(i(u,l),i(u,c),i(r(l,c),r(u,a))),f=s(1+d[0],i(l,a)),p=s(1+d[1],i(c,a));if(e){var g=e,m=d[0]*g[0]/h+d[1]*g[1]/h+1,v=r(s(g[0],f),s(g[1],p));return r(s(1/m/h,v),a)}var y=i(t,a),b=n(i(f,s(d[0],y)),i(p,s(d[1],y)),y);return s(h,b)}}).call(d.prototype)}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/lib/useragent"],function(t,e,n){"use strict";var i=t("./lib/oop"),r=t("./lib/dom"),s=t("./config"),o=t("./layer/gutter").Gutter,a=t("./layer/marker").Marker,l=t("./layer/text").Text,c=t("./layer/cursor").Cursor,u=t("./scrollbar").HScrollBar,h=t("./scrollbar").VScrollBar,d=t("./renderloop").RenderLoop,f=t("./layer/font_metrics").FontMetrics,p=t("./lib/event_emitter").EventEmitter,g='.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_editor {position: relative;overflow: hidden;padding: 0;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;text-align: left;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;box-sizing: border-box;min-width: 100%;contain: style size layout;font-variant-ligatures: no-common-ligatures;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;contain: style size layout;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {position: absolute;top: 0;left: 0;right: 0;padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {contain: strict;position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;contain: strict;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: transparent;color: inherit;z-index: 1000;opacity: 1;}.ace_composition_placeholder { color: transparent }.ace_composition_marker { border-bottom: 1px solid;position: absolute;border-radius: 0;margin-top: 1px;}[ace_nocontext=true] {transform: none!important;filter: none!important;clip-path: none!important;mask : none!important;contain: none!important;perspective: none!important;mix-blend-mode: initial!important;z-index: auto;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;height: 1000000px;contain: style size layout;}.ace_text-layer {font: inherit !important;position: absolute;height: 1000000px;width: 1000000px;contain: style size layout;}.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {contain: style size layout;position: absolute;top: 0;left: 0;right: 0;}.ace_hidpi .ace_text-layer,.ace_hidpi .ace_gutter-layer,.ace_hidpi .ace_content,.ace_hidpi .ace_gutter {contain: strict;will-change: transform;}.ace_hidpi .ace_text-layer > .ace_line, .ace_hidpi .ace_text-layer > .ace_line_group {contain: strict;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {opacity: 0;}.ace_smooth-blinking .ace_cursor {transition: opacity 0.18s;}.ace_animate-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: step-end;animation-name: blink-ace-animate;animation-iteration-count: infinite;}.ace_animate-blinking.ace_smooth-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: ease-in-out;animation-name: blink-ace-animate-smooth;}@keyframes blink-ace-animate {from, to { opacity: 1; }60% { opacity: 0; }}@keyframes blink-ace-animate-smooth {from, to { opacity: 1; }45% { opacity: 1; }60% { opacity: 0; }85% { opacity: 0; }}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_error_bracket {position: absolute;border-bottom: 1px solid #DE5555;border-radius: 0;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;box-sizing: border-box;}.ace_line .ace_fold {box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_inline_button {border: 1px solid lightgray;display: inline-block;margin: -1px 8px;padding: 0 5px;pointer-events: auto;cursor: pointer;}.ace_inline_button:hover {border-color: gray;background: rgba(200,200,200,0.2);display: inline-block;pointer-events: auto;}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_mobile-menu {position: absolute;line-height: 1.5;border-radius: 4px;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;background: white;box-shadow: 1px 3px 2px grey;border: 1px solid #dcdcdc;color: black;}.ace_dark > .ace_mobile-menu {background: #333;color: #ccc;box-shadow: 1px 3px 2px grey;border: 1px solid #444;}.ace_mobile-button {padding: 2px;cursor: pointer;overflow: hidden;}.ace_mobile-button:hover {background-color: #eee;opacity:1;}.ace_mobile-button:active {background-color: #ddd;}.ace_placeholder {font-family: arial;transform: scale(0.9);transform-origin: left;white-space: pre;opacity: 0.7;margin: 0 10px;}',m=t("./lib/useragent"),v=m.isIE;r.importCssString(g,"ace_editor.css");var y=function(t,e){var n=this;this.container=t||r.createElement("div"),r.addCssClass(this.container,"ace_editor"),r.HI_DPI&&r.addCssClass(this.container,"ace_hidpi"),this.setTheme(e),this.$gutter=r.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=r.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=r.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new o(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new a(this.content);var i=this.$textLayer=new l(this.content);this.canvas=i.element,this.$markerFront=new a(this.content),this.$cursorLayer=new c(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new h(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.on("scroll",function(t){n.$scrollAnimation||n.session.setScrollTop(t.data-n.scrollMargin.top)}),this.scrollBarH.on("scroll",function(t){n.$scrollAnimation||n.session.setScrollLeft(t.data-n.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new f(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(t){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",t)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!m.isIOS,this.$loop=new d(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),s.resetOptions(this),s._signal("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,i.implement(this,p),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),r.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},this.setSession=function(t){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=t,t&&this.scrollMargin.top&&t.getScrollTop()<=0&&t.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(t),this.$markerBack.setSession(t),this.$markerFront.setSession(t),this.$gutterLayer.setSession(t),this.$textLayer.setSession(t),t&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(t,e,n){if(void 0===e&&(e=1/0),this.$changedLines?(this.$changedLines.firstRow>t&&(this.$changedLines.firstRow=t),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(t){t?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(t,e,n,i){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=t?1:0;var r=this.container;i||(i=r.clientHeight||r.scrollHeight),n||(n=r.clientWidth||r.scrollWidth);var s=this.$updateCachedSize(t,e,n,i);if(!this.$size.scrollerHeight||!n&&!i)return this.resizing=0;t&&(this.$gutterLayer.$padding=null),t?this.$renderChanges(s|this.$changes,!0):this.$loop.schedule(s|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(t,e,n,i){var s=0,o=this.$size,a={width:o.width,height:o.height,scrollerHeight:o.scrollerHeight,scrollerWidth:o.scrollerWidth};if((i-=this.$extraHeight||0)&&(t||o.height!=i)&&(o.height=i,s|=this.CHANGE_SIZE,o.scrollerHeight=o.height,this.$horizScroll&&(o.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",s|=this.CHANGE_SCROLL),n&&(t||o.width!=n)){s|=this.CHANGE_SIZE,o.width=n,null==e&&(e=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=e,r.setStyle(this.scrollBarH.element.style,"left",e+"px"),r.setStyle(this.scroller.style,"left",e+this.margin.left+"px"),o.scrollerWidth=Math.max(0,n-e-this.scrollBarV.getWidth()-this.margin.h),r.setStyle(this.$gutter.style,"left",this.margin.left+"px");var l=this.scrollBarV.getWidth()+"px";r.setStyle(this.scrollBarH.element.style,"right",l),r.setStyle(this.scroller.style,"right",l),r.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||t)&&(s|=this.CHANGE_FULL)}return o.$dirty=!n||!i,s&&this._signal("resize",a),s},this.onGutterResize=function(t){var e=this.$showGutter?t:0;e!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,e,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},this.adjustWrapLimit=function(){var t=Math.floor((this.$size.scrollerWidth-2*this.$padding)/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(t){this.setOption("animatedScroll",t)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(t){this.setOption("showInvisibles",t),this.session.$bidiHandler.setShowInvisibles(t)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(t){this.setOption("displayIndentGuides",t)},this.setShowPrintMargin=function(t){this.setOption("showPrintMargin",t)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(t){this.setOption("printMarginColumn",t)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(t){return this.setOption("showGutter",t)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(t){this.setOption("fadeFoldWidgets",t)},this.setHighlightGutterLine=function(t){this.setOption("highlightGutterLine",t)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var t=r.createElement("div");t.className="ace_layer ace_print-margin-layer",this.$printMarginEl=r.createElement("div"),this.$printMarginEl.className="ace_print-margin",t.appendChild(this.$printMarginEl),this.content.insertBefore(t,this.content.firstChild)}var e=this.$printMarginEl.style;e.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",e.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var t=this.textarea.style,e=this.$composition;if(this.$keepTextAreaAtCursor||e){var n=this.$cursorLayer.$pixelPos;if(n){e&&e.markerRange&&(n=this.$cursorLayer.getPixelPosition(e.markerRange.start,!0));var i=this.layerConfig,s=n.top,o=n.left,a=e&&e.useTextareaForIME?this.lineHeight:v?0:1;if((s-=i.offset)<0||s>i.height-a)r.translate(this.textarea,0,0);else{var l=1,c=this.$size.height-a;e?e.useTextareaForIME?l=this.characterWidth*this.session.$getStringScreenWidth(this.textarea.value)[0]:s+=this.lineHeight+2:s+=this.lineHeight,(o-=this.scrollLeft)>this.$size.scrollerWidth-l&&(o=this.$size.scrollerWidth-l),o+=this.gutterWidth+this.margin.left,r.setStyle(t,"height",a+"px"),r.setStyle(t,"width",l+"px"),r.translate(this.textarea,Math.min(o,this.$size.scrollerWidth-l),Math.min(s,c))}}}else r.translate(this.textarea,-100,0)}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var t=this.layerConfig,e=t.lastRow;return this.session.documentToScreenRow(e,0)*t.lineHeight-this.session.getScrollTop()>t.height-t.lineHeight?e-1:e},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(t){this.$padding=t,this.$textLayer.setPadding(t),this.$cursorLayer.setPadding(t),this.$markerFront.setPadding(t),this.$markerBack.setPadding(t),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(t,e,n,i){var r=this.scrollMargin;r.top=0|t,r.bottom=0|e,r.right=0|i,r.left=0|n,r.v=r.top+r.bottom,r.h=r.left+r.right,r.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-r.top),this.updateFull()},this.setMargin=function(t,e,n,i){var r=this.margin;r.top=0|t,r.bottom=0|e,r.right=0|i,r.left=0|n,r.v=r.top+r.bottom,r.h=r.left+r.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(t){this.setOption("hScrollBarAlwaysVisible",t)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(t){this.setOption("vScrollBarAlwaysVisible",t)},this.$updateScrollBarV=function(){var t=this.layerConfig.maxHeight,e=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&this.scrollTop>(t-=(e-this.lineHeight)*this.$scrollPastEnd)-e&&(t=this.scrollTop+e,this.scrollBarV.scrollTop=null),this.scrollBarV.setScrollHeight(t+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(t,e){if(this.$changes&&(t|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(t||e)){if(this.$size.$dirty)return this.$changes|=t,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",t),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(t&this.CHANGE_FULL||t&this.CHANGE_SIZE||t&this.CHANGE_TEXT||t&this.CHANGE_LINES||t&this.CHANGE_SCROLL||t&this.CHANGE_H_SCROLL){if(t|=this.$computeLayerConfig()|this.$loop.clear(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var i=this.scrollTop+(n.firstRow-this.layerConfig.firstRow)*this.lineHeight;i>0&&(this.scrollTop=i,t|=this.CHANGE_SCROLL,t|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),t&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),r.translate(this.content,-this.scrollLeft,-n.offset);var s=n.minHeight+"px";r.setStyle(this.content.style,"width",n.width+2*this.$padding+"px"),r.setStyle(this.content.style,"height",s)}if(t&this.CHANGE_H_SCROLL&&(r.translate(this.content,-this.scrollLeft,-n.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),t&this.CHANGE_FULL)return this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",t);if(t&this.CHANGE_SCROLL)return this.$changedLines=null,t&this.CHANGE_TEXT||t&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&(t&this.CHANGE_GUTTER||t&this.CHANGE_LINES?this.$gutterLayer.update(n):this.$gutterLayer.scrollLines(n)),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",t);t&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n)):t&this.CHANGE_LINES?(this.$updateLines()||t&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n):t&this.CHANGE_TEXT||t&this.CHANGE_GUTTER?this.$showGutter&&this.$gutterLayer.update(n):t&this.CHANGE_CURSOR&&this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(n),t&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor()),t&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),t&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal("afterRender",t)}else this.$changes|=t},this.$autosize=function(){var t=this.session.getScreenLength()*this.lineHeight,e=this.$maxLines*this.lineHeight,n=Math.min(e,Math.max((this.$minLines||1)*this.lineHeight,t))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var i=!(n<=2*this.lineHeight)&&t>e;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||i!=this.$vScroll){i!=this.$vScroll&&(this.$vScroll=i,this.scrollBarV.setVisible(i));var r=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,r,n),this.desiredHeight=n,this._signal("autosize")}},this.$computeLayerConfig=function(){var t=this.session,e=this.$size,n=e.height<=2*this.lineHeight,i=this.session.getScreenLength()*this.lineHeight,r=this.$getLongestLine(),s=!n&&(this.$hScrollBarAlwaysVisible||e.scrollerWidth-r-2*this.$padding<0),o=this.$horizScroll!==s;o&&(this.$horizScroll=s,this.scrollBarH.setVisible(s));var a=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var l=e.scrollerHeight+this.lineHeight,c=!this.$maxLines&&this.$scrollPastEnd?(e.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;i+=c;var u=this.scrollMargin;this.session.setScrollTop(Math.max(-u.top,Math.min(this.scrollTop,i-e.scrollerHeight+u.bottom))),this.session.setScrollLeft(Math.max(-u.left,Math.min(this.scrollLeft,r+2*this.$padding-e.scrollerWidth+u.right)));var h=!n&&(this.$vScrollBarAlwaysVisible||e.scrollerHeight-i+c<0||this.scrollTop>u.top),d=a!==h;d&&(this.$vScroll=h,this.scrollBarV.setVisible(h));var f,p,g=this.scrollTop%this.lineHeight,m=Math.ceil(l/this.lineHeight)-1,v=Math.max(0,Math.round((this.scrollTop-g)/this.lineHeight)),y=v+m,b=this.lineHeight;v=t.screenToDocumentRow(v,0);var w=t.getFoldLine(v);w&&(v=w.start.row),f=t.documentToScreenRow(v,0),p=t.getRowLength(v)*b,y=Math.min(t.screenToDocumentRow(y,0),t.getLength()-1),l=e.scrollerHeight+t.getRowLength(y)*b+p,g=this.scrollTop-f*b;var x=0;return(this.layerConfig.width!=r||o)&&(x=this.CHANGE_H_SCROLL),(o||d)&&(x|=this.$updateCachedSize(!0,this.gutterWidth,e.width,e.height),this._signal("scrollbarVisibilityChanged"),d&&(r=this.$getLongestLine())),this.layerConfig={width:r,padding:this.$padding,firstRow:v,firstRowScreen:f,lastRow:y,lineHeight:b,characterWidth:this.characterWidth,minHeight:l,maxHeight:i,offset:g,gutterOffset:b?Math.max(0,Math.ceil((g+e.height-e.scrollerHeight)/b)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(r-this.$padding),x},this.$updateLines=function(){if(this.$changedLines){var t=this.$changedLines.firstRow,e=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(t>n.lastRow+1||ethis.$textLayer.MAX_LINE_LENGTH&&(t=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(t*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(t,e){this.$gutterLayer.addGutterDecoration(t,e)},this.removeGutterDecoration=function(t,e){this.$gutterLayer.removeGutterDecoration(t,e)},this.updateBreakpoints=function(t){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(t){this.$gutterLayer.setAnnotations(t),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(t,e,n){this.scrollCursorIntoView(t,n),this.scrollCursorIntoView(e,n)},this.scrollCursorIntoView=function(t,e,n){if(0!==this.$size.scrollerHeight){var i=this.$cursorLayer.getPixelPosition(t),r=i.left,s=i.top,o=n&&n.top||0,a=n&&n.bottom||0,l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+o>s?(e&&l+o>s+this.lineHeight&&(s-=e*this.$size.scrollerHeight),0===s&&(s=-this.scrollMargin.top),this.session.setScrollTop(s)):l+this.$size.scrollerHeight-ar?(r=1-this.scrollMargin.top||e>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||t<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||t>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0},this.pixelToScreenCoordinates=function(t,e){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([t,e]);t=i[1]-this.gutterWidth-this.margin.left,e=i[0]}else n=this.scroller.getBoundingClientRect();var r=t+this.scrollLeft-n.left-this.$padding,s=r/this.characterWidth,o=Math.floor((e+this.scrollTop-n.top)/this.lineHeight),a=this.$blockCursor?Math.floor(s):Math.round(s);return{row:o,column:a,side:s-a>0?1:-1,offsetX:r}},this.screenToTextCoordinates=function(t,e){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([t,e]);t=i[1]-this.gutterWidth-this.margin.left,e=i[0]}else n=this.scroller.getBoundingClientRect();var r=t+this.scrollLeft-n.left-this.$padding,s=r/this.characterWidth,o=this.$blockCursor?Math.floor(s):Math.round(s),a=Math.floor((e+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(a,Math.max(o,0),r)},this.textToScreenCoordinates=function(t,e){var n=this.scroller.getBoundingClientRect(),i=this.session.documentToScreenPosition(t,e),r=this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,t)?this.session.$bidiHandler.getPosLeft(i.column):Math.round(i.column*this.characterWidth));return{pageX:n.left+r-this.scrollLeft,pageY:n.top+i.row*this.lineHeight-this.scrollTop}},this.visualizeFocus=function(){r.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){r.removeCssClass(this.container,"ace_focus")},this.showComposition=function(t){this.$composition=t,t.cssText||(t.cssText=this.textarea.style.cssText),null==t.useTextareaForIME&&(t.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(r.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):t.markerId=this.session.addMarker(t.markerRange,"ace_composition_marker","text")},this.setCompositionText=function(t){var e=this.session.selection.cursor;this.addToken(t,"composition_placeholder",e.row,e.column),this.$moveTextAreaToCursor()},this.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),r.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var t=this.session.selection.cursor;this.removeExtraToken(t.row,t.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},this.addToken=function(t,e,n,i){var r=this.session;r.bgTokenizer.lines[n]=null;var s={type:e,value:t},o=r.getTokens(n);if(null==i)o.push(s);else for(var a=0,l=0;l50&&t.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:t}))}}).call(l.prototype),e.UIWorkerClient=function(t,e,n){var i=null,r=!1,a=Object.create(s),c=[],u=new l({messageBuffer:c,terminate:function(){},postMessage:function(t){c.push(t),i&&(r?setTimeout(h):h())}});u.setEmitSync=function(t){r=t};var h=function(){var t=c.shift();t.command?i[t.command].apply(i,t.args):t.event&&a._signal(t.event,t.data)};return a.postMessage=function(t){u.onMessage({data:t})},a.callback=function(t,e){this.postMessage({type:"call",id:e,data:t})},a.emit=function(t,e){this.postMessage({type:"event",name:t,data:e})},o.loadModule(["worker",e],function(t){for(i=new t[n](a);c.length;)h()}),u},e.WorkerClient=l,e.createWorker=a}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(t,e,n){"use strict";var i=t("./range").Range,r=t("./lib/event_emitter").EventEmitter,s=t("./lib/oop"),o=function(t,e,n,i,r,s){var o=this;this.length=e,this.session=t,this.doc=t.getDocument(),this.mainClass=r,this.othersClass=s,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=i,this.$onCursorChange=function(){setTimeout(function(){o.onCursorChange()})},this.$pos=n;var a=t.getUndoManager().$undoStack||t.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=a.length,this.setup(),t.selection.on("changeCursor",this.$onCursorChange)};(function(){s.implement(this,r),this.setup=function(){var t=this,e=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=e.createAnchor(this.$pos.row,this.$pos.column);var r=this.pos;r.$insertRight=!0,r.detach(),r.markerId=n.addMarker(new i(r.row,r.column,r.row,r.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(n){var i=e.createAnchor(n.row,n.column);i.$insertRight=!0,i.detach(),t.others.push(i)}),n.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var t=this.session,e=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=t.addMarker(new i(n.row,n.column,n.row,n.column+e.length),e.othersClass,null,!1)})}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var t=0;t=this.pos.column&&e.start.column<=this.pos.column+this.length+1,s=e.start.column-this.pos.column;if(this.updateAnchors(t),r&&(this.length+=n),r&&!this.session.$fromUndo)if("insert"===t.action)for(var o=this.others.length-1;o>=0;o--)this.doc.insertMergedLines(l={row:(a=this.others[o]).row,column:a.column+s},t.lines);else if("remove"===t.action)for(o=this.others.length-1;o>=0;o--){var a,l;this.doc.remove(new i((l={row:(a=this.others[o]).row,column:a.column+s}).row,l.column,l.row,l.column-n))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(t){this.pos.onChange(t);for(var e=this.others.length;e--;)this.others[e].onChange(t);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var t=this,e=this.session,n=function(n,r){e.removeMarker(n.markerId),n.markerId=e.addMarker(new i(n.row,n.column,n.row,n.column+t.length),r,null,!1)};n(this.pos,this.mainClass);for(var r=this.others.length;r--;)n(this.others[r],this.othersClass)}},this.onCursorChange=function(t){if(!this.$updating&&this.session){var e=this.session.selection.getCursor();e.row===this.pos.row&&e.column>=this.pos.column&&e.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",t)):(this.hideOtherMarkers(),this._emit("cursorLeave",t))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var t=this.session.getUndoManager(),e=(t.$undoStack||t.$undostack).length-this.$undoStackDepth,n=0;n1?t.multiSelect.joinSelections():t.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(t){t.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(t){t.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(t){t.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],e.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(t){t.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(t){return t&&t.inMultiSelectMode}}];var i=t("../keyboard/hash_handler").HashHandler;e.keyboardHandler=new i(e.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(t,e,n){var i=t("./range_list").RangeList,r=t("./range").Range,s=t("./selection").Selection,o=t("./mouse/multi_select_handler").onMouseDown,a=t("./lib/event"),l=t("./lib/lang"),c=t("./commands/multi_select_commands");e.commands=c.defaultCommands.concat(c.multiSelectCommands);var u=new(0,t("./search").Search),h=t("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(h.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(t,e){if(t){if(!this.inMultiSelectMode&&0===this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(t),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),e||this.fromOrientedRange(t);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}t.cursor||(t.cursor=t.end);var i=this.rangeList.add(t);return this.$onAddRange(t),i.length&&this.$onRemoveRange(i),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),e||this.fromOrientedRange(t)}},this.toSingleRange=function(t){t=t||this.ranges[0];var e=this.rangeList.removeAll();e.length&&this.$onRemoveRange(e),t&&this.fromOrientedRange(t)},this.substractPoint=function(t){var e=this.rangeList.substractPoint(t);if(e)return this.$onRemoveRange(e),e[0]},this.mergeOverlappingRanges=function(){var t=this.rangeList.merge();t.length&&this.$onRemoveRange(t)},this.$onAddRange=function(t){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(t),this._signal("addRange",{range:t})},this.$onRemoveRange=function(t){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var e=this.rangeList.ranges.pop();t.push(e),this.rangeCount=0}for(var n=t.length;n--;){var i=this.ranges.indexOf(t[n]);this.ranges.splice(i,1)}this._signal("removeRange",{ranges:t}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(e=e||this.ranges[0])&&!e.isEqual(this.getRange())&&this.fromOrientedRange(e)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new i,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var t=this.ranges.length?this.ranges:[this.getRange()],e=[],n=0;n1){var t=this.rangeList.ranges,e=t[t.length-1],n=r.fromPoints(t[0].start,e.end);this.toSingleRange(),this.setSelectionRange(n,e.cursor==e.start)}else{var i=this.session.documentToScreenPosition(this.cursor),s=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(i,s).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(t,e,n){var i=[],s=t.column0;)y--;if(y>0)for(var b=0;i[b].isEmpty();)b++;for(var w=y;w>=b;w--)i[w].isEmpty()&&i.splice(w,1)}return i}}).call(s.prototype);var d=t("./editor").Editor;function f(t){t.$multiselectOnSessionChange||(t.$onAddRange=t.$onAddRange.bind(t),t.$onRemoveRange=t.$onRemoveRange.bind(t),t.$onMultiSelect=t.$onMultiSelect.bind(t),t.$onSingleSelect=t.$onSingleSelect.bind(t),t.$multiselectOnSessionChange=e.onSessionChange.bind(t),t.$checkMultiselectChange=t.$checkMultiselectChange.bind(t),t.$multiselectOnSessionChange(t),t.on("changeSession",t.$multiselectOnSessionChange),t.on("mousedown",o),t.commands.addCommands(c.defaultCommands),function(t){if(t.textInput){var e=t.textInput.getElement(),n=!1;a.addListener(e,"keydown",function(e){t.$blockSelectEnabled&&18==e.keyCode&&!(e.ctrlKey||e.shiftKey||e.metaKey)?n||(t.renderer.setMouseCursor("crosshair"),n=!0):n&&i()},t),a.addListener(e,"keyup",i,t),a.addListener(e,"blur",i,t)}function i(e){n&&(t.renderer.setMouseCursor(""),n=!1)}}(t))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(t){t.cursor||(t.cursor=t.end);var e=this.getSelectionStyle();return t.marker=this.session.addMarker(t,"ace_selection",e),this.session.$selectionMarkers.push(t),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,t},this.removeSelectionMarker=function(t){if(t.marker){this.session.removeMarker(t.marker);var e=this.session.$selectionMarkers.indexOf(t);-1!=e&&this.session.$selectionMarkers.splice(e,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(t){for(var e=this.session.$selectionMarkers,n=t.length;n--;){var i=t[n];if(i.marker){this.session.removeMarker(i.marker);var r=e.indexOf(i);-1!=r&&e.splice(r,1)}}this.session.selectionMarkerCount=e.length},this.$onAddRange=function(t){this.addSelectionMarker(t.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(t){this.removeSelectionMarkers(t.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(t){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(c.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(t){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(c.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(t){var e=t.command,n=t.editor;if(n.multiSelect){if(e.multiSelectAction)"forEach"==e.multiSelectAction?i=n.forEachSelection(e,t.args):"forEachLine"==e.multiSelectAction?i=n.forEachSelection(e,t.args,!0):"single"==e.multiSelectAction?(n.exitMultiSelectMode(),i=e.exec(n,t.args||{})):i=e.multiSelectAction(n,t.args||{});else{var i=e.exec(n,t.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return i}},this.forEachSelection=function(t,e,n){if(!this.inVirtualSelectionMode){var i,r=1==n||n&&n.$byLines,o=this.session,a=this.selection,l=(n&&n.keepOrder?a:a.rangeList).ranges;if(!l.length)return t.exec?t.exec(this,e||{}):t(this,e||{});var c=a._eventRegistry;a._eventRegistry={};var u=new s(o);this.inVirtualSelectionMode=!0;for(var h=l.length;h--;){if(r)for(;h>0&&l[h].start.row==l[h-1].end.row;)h--;u.fromOrientedRange(l[h]),u.index=h,this.selection=o.selection=u;var d=t.exec?t.exec(this,e||{}):t(this,e||{});i||void 0===d||(i=d),u.toOrientedRange(l[h])}u.detach(),this.selection=o.selection=a,this.inVirtualSelectionMode=!1,a._eventRegistry=c,a.mergeOverlappingRanges(),a.ranges[0]&&a.fromOrientedRange(a.ranges[0]);var f=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),f&&f.from==f.to&&this.renderer.animateScrolling(f.from),i}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var t="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var e=this.multiSelect.rangeList.ranges,n=[],i=0;io&&(o=n.column),iu?t.insert(i,l.stringRepeat(" ",s-u)):t.remove(new r(i.row,i.column,i.row,i.column-s+u)),e.start.column=e.end.column=o,e.start.row=e.end.row=i.row,e.cursor=e.end}),e.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var u=this.selection.getRange(),h=u.start.row,d=u.end.row,f=h==d;if(f){var p,g=this.session.getLength();do{p=this.session.getLine(d)}while(/[=:]/.test(p)&&++d0);h<0&&(h=0),d>=g&&(d=g-1)}var m=this.session.removeFullLines(h,d);m=this.$reAlignText(m,f),this.session.insert({row:h,column:0},m.join("\n")+"\n"),f||(u.start.column=0,u.end.column=m[m.length-1].length),this.selection.setRange(u)}},this.$reAlignText=function(t,e){var n,i,r,s=!0,o=!0;return t.map(function(t){var e=t.match(/(\s*)(.*?)(\s*)([=:].*)/);return e?null==n?(n=e[1].length,i=e[2].length,r=e[3].length,e):(n+i+r!=e[1].length+e[2].length+e[3].length&&(o=!1),n!=e[1].length&&(s=!1),n>e[1].length&&(n=e[1].length),ie[3].length&&(r=e[3].length),e):[t]}).map(e?c:s?o?function(t){return t[2]?a(n+i-t[2].length)+t[2]+a(r)+t[4].replace(/^([=:])\s+/,"$1 "):t[0]}:c:function(t){return t[2]?a(n)+t[2]+a(r)+t[4].replace(/^([=:])\s+/,"$1 "):t[0]});function a(t){return l.stringRepeat(" ",t)}function c(t){return t[2]?a(n)+t[2]+a(i-t[2].length+r)+t[4].replace(/^([=:])\s+/,"$1 "):t[0]}}}).call(d.prototype),e.onSessionChange=function(t){var e=t.session;e&&!e.multiSelect&&(e.$selectionMarkers=[],e.selection.$initRangeList(),e.multiSelect=e.selection),this.multiSelect=e&&e.multiSelect;var n=t.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),e&&(e.multiSelect.on("addRange",this.$onAddRange),e.multiSelect.on("removeRange",this.$onRemoveRange),e.multiSelect.on("multiSelect",this.$onMultiSelect),e.multiSelect.on("singleSelect",this.$onSingleSelect),e.multiSelect.lead.on("change",this.$checkMultiselectChange),e.multiSelect.anchor.on("change",this.$checkMultiselectChange)),e&&this.inMultiSelectMode!=e.selection.inMultiSelectMode&&(e.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},e.MultiSelect=f,t("./config").defineOptions(d.prototype,"editor",{enableMultiselect:{set:function(t){f(this),t?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",o)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",o))},value:!0},enableBlockSelect:{set:function(t){this.$blockSelectEnabled=t},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(t,e,n){"use strict";var i=t("../../range").Range,r=e.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(t,e,n){var i=t.getLine(n);return this.foldingStartMarker.test(i)?"start":"markbeginend"==e&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(t,e,n){return null},this.indentationBlock=function(t,e,n){var r=/\S/,s=t.getLine(e),o=s.search(r);if(-1!=o){for(var a=n||s.length,l=t.getLength(),c=e,u=e;++ec){var f=t.getLine(u).length;return new i(c,a,u,f)}}},this.openingBracketBlock=function(t,e,n,r,s){var o={row:n,column:r+1},a=t.$findClosingBracket(e,o,s);if(a){var l=t.foldWidgets[a.row];return null==l&&(l=t.getFoldWidget(a.row)),"start"==l&&a.row>o.row&&(a.row--,a.column=t.getLine(a.row).length),i.fromPoints(o,a)}},this.closingBracketBlock=function(t,e,n,r,s){var o={row:n,column:r},a=t.$findOpeningBracket(e,o);if(a)return a.column++,o.column--,i.fromPoints(a,o)}}).call(r.prototype)}),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(t,e,n){"use strict";e.isDark=!1,e.cssClass="ace-tm",e.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',e.$id="ace/theme/textmate",t("../lib/dom").importCssString(e.cssText,e.cssClass)}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(t,e,n){"use strict";var i=t("./lib/dom");function r(t){this.session=t,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}(function(){this.getRowLength=function(t){var e;return e=this.lineWidgets&&this.lineWidgets[t]&&this.lineWidgets[t].rowCount||0,this.$useWrapMode&&this.$wrapData[t]?this.$wrapData[t].length+1+e:1+e},this.$getWidgetScreenLength=function(){var t=0;return this.lineWidgets.forEach(function(e){e&&e.rowCount&&!e.hidden&&(t+=e.rowCount)}),t},this.$onChangeEditor=function(t){this.attach(t.editor)},this.attach=function(t){t&&t.widgetManager&&t.widgetManager!=this&&t.widgetManager.detach(),this.editor!=t&&(this.detach(),this.editor=t,t&&(t.widgetManager=this,t.renderer.on("beforeRender",this.measureWidgets),t.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(t){var e=this.editor;if(e){this.editor=null,e.widgetManager=null,e.renderer.off("beforeRender",this.measureWidgets),e.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach(function(t){t&&t.el&&t.el.parentNode&&(t._inDocument=!1,t.el.parentNode.removeChild(t.el))})}},this.updateOnFold=function(t,e){var n=e.lineWidgets;if(n&&t.action){for(var i=t.data,r=i.start.row,s=i.end.row,o="add"==t.action,a=r+1;ae[n].column&&n++,s.unshift(n,0),e.splice.apply(e,s),this.$updateRows()}}},this.$updateRows=function(){var t=this.session.lineWidgets;if(t){var e=!0;t.forEach(function(t,n){if(t)for(e=!1,t.row=n;t.$oldWidget;)t.$oldWidget.row=n,t=t.$oldWidget}),e&&(this.session.lineWidgets=null)}},this.$registerLineWidget=function(t){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var e=this.session.lineWidgets[t.row];return e&&(t.$oldWidget=e,e.el&&e.el.parentNode&&(e.el.parentNode.removeChild(e.el),e._inDocument=!1)),this.session.lineWidgets[t.row]=t,t},this.addLineWidget=function(t){if(this.$registerLineWidget(t),t.session=this.session,!this.editor)return t;var e=this.editor.renderer;t.html&&!t.el&&(t.el=i.createElement("div"),t.el.innerHTML=t.html),t.el&&(i.addCssClass(t.el,"ace_lineWidgetContainer"),t.el.style.position="absolute",t.el.style.zIndex=5,e.container.appendChild(t.el),t._inDocument=!0,t.coverGutter||(t.el.style.zIndex=3),null==t.pixelHeight&&(t.pixelHeight=t.el.offsetHeight)),null==t.rowCount&&(t.rowCount=t.pixelHeight/e.layerConfig.lineHeight);var n=this.session.getFoldAt(t.row,0);if(t.$fold=n,n){var r=this.session.lineWidgets;t.row!=n.end.row||r[n.start.row]?t.hidden=!0:r[n.start.row]=t}return this.session._emit("changeFold",{data:{start:{row:t.row}}}),this.$updateRows(),this.renderWidgets(null,e),this.onWidgetChanged(t),t},this.removeLineWidget=function(t){if(t._inDocument=!1,t.session=null,t.el&&t.el.parentNode&&t.el.parentNode.removeChild(t.el),t.editor&&t.editor.destroy)try{t.editor.destroy()}catch(n){}if(this.session.lineWidgets){var e=this.session.lineWidgets[t.row];if(e==t)this.session.lineWidgets[t.row]=t.$oldWidget,t.$oldWidget&&this.onWidgetChanged(t.$oldWidget);else for(;e;){if(e.$oldWidget==t){e.$oldWidget=t.$oldWidget;break}e=e.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:t.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(t){for(var e=this.session.lineWidgets,n=e&&e[t],i=[];n;)i.push(n),n=n.$oldWidget;return i},this.onWidgetChanged=function(t){this.session._changedWidgets.push(t),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(t,e){var n=this.session._changedWidgets,i=e.layerConfig;if(n&&n.length){for(var r=1/0,s=0;s0&&!i[r];)r--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,e.$cursorLayer.config=n;for(var o=r;o<=s;o++){var a=i[o];if(a&&a.el)if(a.hidden)a.el.style.top=-100-(a.pixelHeight||0)+"px";else{a._inDocument||(a._inDocument=!0,e.container.appendChild(a.el));var l=e.$cursorLayer.getPixelPosition({row:o,column:0},!0).top;a.coverLine||(l+=n.lineHeight*this.session.getRowLineCount(a.row)),a.el.style.top=l-n.offset+"px";var c=a.coverGutter?0:e.gutterWidth;a.fixedWidth||(c-=e.scrollLeft),a.el.style.left=c+"px",a.fullWidth&&a.screenWidth&&(a.el.style.minWidth=n.width+2*n.padding+"px"),a.el.style.right=a.fixedWidth?e.scrollBar.getWidth()+"px":""}}}}}).call(r.prototype),e.LineWidgets=r}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(t,e,n){"use strict";var i=t("../line_widgets").LineWidgets,r=t("../lib/dom"),s=t("../range").Range;e.showErrorMarker=function(t,e){var n=t.session;n.widgetManager||(n.widgetManager=new i(n),n.widgetManager.attach(t));var o=t.getCursorPosition(),a=o.row,l=n.widgetManager.getWidgetsAtRow(a).filter(function(t){return"errorMarker"==t.type})[0];l?l.destroy():a-=e;var c,u=function(t,e,n){var i=t.getAnnotations().sort(s.comparePoints);if(i.length){var r=function(t,e,n){for(var i=0,r=t.length-1;i<=r;){var s=i+r>>1,o=n(e,t[s]);if(o>0)i=s+1;else{if(!(o<0))return s;r=s-1}}return-(i+1)}(i,{row:e,column:-1},s.comparePoints);r<0&&(r=-r-1),r>=i.length?r=n>0?0:i.length-1:0===r&&n<0&&(r=i.length-1);var o=i[r];if(o&&n){if(o.row===e){do{o=i[r+=n]}while(o&&o.row===e);if(!o)return i.slice()}var a=[];e=o.row;do{a[n<0?"unshift":"push"](o),o=i[r+=n]}while(o&&o.row==e);return a.length&&a}}}(n,a,e);if(u){var h=u[0];o.column=(h.pos&&"number"!=typeof h.column?h.pos.sc:h.column)||0,o.row=h.row,c=t.renderer.$gutterLayer.$annotations[o.row]}else{if(l)return;c={text:["Looks good!"],className:"ace_ok"}}t.session.unfold(o.row),t.selection.moveToPosition(o);var d={row:o.row,fixedWidth:!0,coverGutter:!0,el:r.createElement("div"),type:"errorMarker"},f=d.el.appendChild(r.createElement("div")),p=d.el.appendChild(r.createElement("div"));p.className="error_widget_arrow "+c.className;var g=t.renderer.$cursorLayer.getPixelPosition(o).left;p.style.left=g+t.renderer.gutterWidth-5+"px",d.el.className="error_widget_wrapper",f.className="error_widget "+c.className,f.innerHTML=c.text.join("
"),f.appendChild(r.createElement("div"));var m=function(t,e,n){if(0===e&&("esc"===n||"return"===n))return d.destroy(),{command:"null"}};d.destroy=function(){t.$mouseHandler.isMousePressed||(t.keyBinding.removeKeyboardHandler(m),n.widgetManager.removeLineWidget(d),t.off("changeSelection",d.destroy),t.off("changeSession",d.destroy),t.off("mouseup",d.destroy),t.off("change",d.destroy))},t.keyBinding.addKeyboardHandler(m),t.on("changeSelection",d.destroy),t.on("changeSession",d.destroy),t.on("mouseup",d.destroy),t.on("change",d.destroy),t.session.widgetManager.addLineWidget(d),d.el.onmousedown=t.focus.bind(t),t.renderer.scrollCursorIntoView(null,.5,{bottom:d.el.offsetHeight})},r.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")}),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(t,e,i){"use strict";t("./lib/fixoldbrowsers");var r=t("./lib/dom"),s=t("./lib/event"),o=t("./range").Range,a=t("./editor").Editor,l=t("./edit_session").EditSession,c=t("./undomanager").UndoManager,u=t("./virtual_renderer").VirtualRenderer;t("./worker/worker_client"),t("./keyboard/hash_handler"),t("./placeholder"),t("./multi_select"),t("./mode/folding/fold_mode"),t("./theme/textmate"),t("./ext/error_marker"),e.config=t("./config"),e.require=t,e.define=n("B9Yq"),e.edit=function(t,n){if("string"==typeof t){var i=t;if(!(t=document.getElementById(i)))throw new Error("ace.edit can't find div #"+i)}if(t&&t.env&&t.env.editor instanceof a)return t.env.editor;var o="";if(t&&/input|textarea/i.test(t.tagName)){var l=t;o=l.value,t=r.createElement("pre"),l.parentNode.replaceChild(t,l)}else t&&(o=t.textContent,t.innerHTML="");var c=e.createEditSession(o),h=new a(new u(t),c,n),d={document:c,editor:h,onResize:h.resize.bind(h,null)};return l&&(d.textarea=l),s.addListener(window,"resize",d.onResize),h.on("destroy",function(){s.removeListener(window,"resize",d.onResize),d.editor.container.env=null}),h.container.env=h.env=d,h},e.createEditSession=function(t,e){var n=new l(t,e);return n.setUndoManager(new c),n},e.Range=o,e.Editor=a,e.EditSession=l,e.UndoManager=c,e.VirtualRenderer=u,e.version=e.config.version}),ace.require(["ace/ace"],function(e){for(var n in e&&(e.config.init(!0),e.define=ace.define),window.ace||(window.ace=e),e)e.hasOwnProperty(n)&&(window.ace[n]=e[n]);window.ace.default=window.ace,t&&(t.exports=window.ace)})}).call(this,n("YuTi")(t))},hyoZ:function(t,e,n){"use strict";var i=n("w+qe"),r=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],s=["scalar","sequence","mapping"];t.exports=function(t,e){var n,o;if(e=e||{},Object.keys(e).forEach(function(e){if(-1===r.indexOf(e))throw new i('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=(o={},null!==(n=e.styleAliases||null)&&Object.keys(n).forEach(function(t){n[t].forEach(function(e){o[String(e)]=t})}),o),-1===s.indexOf(this.kind))throw new i('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}},jO2K:function(t,e,n){"use strict";var i;try{i=n("tjlA").Buffer}catch(o){}var r=n("hyoZ"),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";t.exports=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e,n,i=0,r=t.length,o=s;for(n=0;n64)){if(e<0)return!1;i+=6}return i%8==0},construct:function(t){var e,n,r=t.replace(/[\r\n=]/g,""),o=r.length,a=s,l=0,c=[];for(e=0;e>16&255),c.push(l>>8&255),c.push(255&l)),l=l<<6|a.indexOf(r.charAt(e));return 0==(n=o%4*6)?(c.push(l>>16&255),c.push(l>>8&255),c.push(255&l)):18===n?(c.push(l>>10&255),c.push(l>>2&255)):12===n&&c.push(l>>4&255),i?i.from?i.from(c):new i(c):c},predicate:function(t){return i&&i.isBuffer(t)},represent:function(t){var e,n,i="",r=0,o=t.length,a=s;for(e=0;e>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]),r=(r<<8)+t[e];return 0==(n=o%3)?(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]):2===n?(i+=a[r>>10&63],i+=a[r>>4&63],i+=a[r<<2&63],i+=a[64]):1===n&&(i+=a[r>>2&63],i+=a[r<<4&63],i+=a[64],i+=a[64]),i}})},"kVK+":function(t,e){e.read=function(t,e,n,i,r){var s,o,a=8*r-i-1,l=(1<>1,u=-7,h=n?r-1:0,d=n?-1:1,f=t[e+h];for(h+=d,s=f&(1<<-u)-1,f>>=-u,u+=a;u>0;s=256*s+t[e+h],h+=d,u-=8);for(o=s&(1<<-u)-1,s>>=-u,u+=i;u>0;o=256*o+t[e+h],h+=d,u-=8);if(0===s)s=1-c;else{if(s===l)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,i),s-=c}return(f?-1:1)*o*Math.pow(2,s-i)},e.write=function(t,e,n,i,r,s){var o,a,l,c=8*s-r-1,u=(1<>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:s-1,p=i?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=u):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(o++,l/=2),o+h>=u?(a=0,o=u):o+h>=1?(a=(e*l-1)*Math.pow(2,r),o+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,r),o=0));r>=8;t[n+f]=255&a,f+=p,a/=256,r-=8);for(o=o<0;t[n+f]=255&o,f+=p,o/=256,c-=8);t[n+f-p]|=128*g}},peYA:function(t,e,n){"use strict";var i=n("hyoZ");t.exports=new i("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(t){if(null===t)return!0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)},construct:function(){return null},predicate:function(t){return null===t},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},pzZA:function(t,e,n){"use strict";var i=n("hyoZ"),r=Object.prototype.hasOwnProperty;t.exports=new i("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(t){if(null===t)return!0;var e,n=t;for(e in n)if(r.call(n,e)&&null!==n[e])return!1;return!0},construct:function(t){return null!==t?t:{}}})},spQ0:function(t,e,n){"use strict";var i=n("hyoZ");t.exports=new i("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(t){return"<<"===t||null===t}})},tN50:function(t,e,n){"use strict";var i=n("Y2Yi");function r(t,e,n,i,r){this.name=t,this.buffer=e,this.position=n,this.line=i,this.column=r}r.prototype.getSnippet=function(t,e){var n,r,s,o,a;if(!this.buffer)return null;for(t=t||4,e=e||75,n="",r=this.position;r>0&&-1==="\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(r-1));)if(this.position-(r-=1)>e/2-1){n=" ... ",r+=5;break}for(s="",o=this.position;oe/2-1){s=" ... ",o-=5;break}return a=this.buffer.slice(r,o),i.repeat(" ",t)+n+a+s+"\n"+i.repeat(" ",t+this.position-r+n.length)+"^"},r.prototype.toString=function(t){var e,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),t||(e=this.getSnippet())&&(n+=":\n"+e),n},t.exports=r},tjlA:function(t,e,n){"use strict";var i=n("H7XF"),r=n("kVK+"),s=n("49sm");function o(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function p(t,e){if(l.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return U(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return V(t).length;default:if(i)return U(t).length;e=(""+e).toLowerCase(),i=!0}}function g(t,e,n){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,e,n);case"utf8":case"utf-8":return E(this,e,n);case"ascii":return D(this,e,n);case"latin1":case"binary":return T(this,e,n);case"base64":return k(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,e,n);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function m(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function v(t,e,n,i,r){if(0===t.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=r?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(r)return-1;n=t.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof e&&(e=l.from(e,i)),l.isBuffer(e))return 0===e.length?-1:y(t,e,n,i,r);if("number"==typeof e)return e&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):y(t,[e],n,i,r);throw new TypeError("val must be string, number or Buffer")}function y(t,e,n,i,r){var s,o=1,a=t.length,l=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;o=2,a/=2,l/=2,n/=2}function c(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(r){var u=-1;for(s=n;sa&&(n=a-l),s=n;s>=0;s--){for(var h=!0,d=0;dr&&(i=r):i=r;var s=e.length;if(s%2!=0)throw new TypeError("Invalid hex string");i>s/2&&(i=s/2);for(var o=0;o>8,r.push(n%256),r.push(i);return r}(e,t.length-n),t,n,i)}function k(t,e,n){return i.fromByteArray(0===e&&n===t.length?t:t.slice(e,n))}function E(t,e,n){n=Math.min(t.length,n);for(var i=[],r=e;r239?4:c>223?3:c>191?2:1;if(r+h<=n)switch(h){case 1:c<128&&(u=c);break;case 2:128==(192&(s=t[r+1]))&&(l=(31&c)<<6|63&s)>127&&(u=l);break;case 3:o=t[r+2],128==(192&(s=t[r+1]))&&128==(192&o)&&(l=(15&c)<<12|(63&s)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:o=t[r+2],a=t[r+3],128==(192&(s=t[r+1]))&&128==(192&o)&&128==(192&a)&&(l=(15&c)<<18|(63&s)<<12|(63&o)<<6|63&a)>65535&&l<1114112&&(u=l)}null===u?(u=65533,h=1):u>65535&&(i.push((u-=65536)>>>10&1023|55296),u=56320|1023&u),i.push(u),r+=h}return function(t){var e=t.length;if(e<=A)return String.fromCharCode.apply(String,t);for(var n="",i=0;i0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},l.prototype.compare=function(t,e,n,i,r){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),e<0||n>t.length||i<0||r>this.length)throw new RangeError("out of range index");if(i>=r&&e>=n)return 0;if(i>=r)return-1;if(e>=n)return 1;if(this===t)return 0;for(var s=(r>>>=0)-(i>>>=0),o=(n>>>=0)-(e>>>=0),a=Math.min(s,o),c=this.slice(i,r),u=t.slice(e,n),h=0;hr)&&(n=r),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var s=!1;;)switch(i){case"hex":return b(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":return x(this,t,e,n);case"latin1":case"binary":return _(this,t,e,n);case"base64":return C(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,n);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function D(t,e,n){var i="";n=Math.min(t.length,n);for(var r=e;rr)&&(n=r);for(var s="",o=e;on)throw new RangeError("Trying to access beyond buffer length")}function L(t,e,n,i,r,s){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>r||et.length)throw new RangeError("Index out of range")}function $(t,e,n,i){e<0&&(e=65535+e+1);for(var r=0,s=Math.min(t.length-n,2);r>>8*(i?r:1-r)}function O(t,e,n,i){e<0&&(e=4294967295+e+1);for(var r=0,s=Math.min(t.length-n,4);r>>8*(i?r:3-r)&255}function I(t,e,n,i,r,s){if(n+i>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(t,e,n,i,s){return s||I(t,0,n,4),r.write(t,e,n,i,23,4),n+4}function P(t,e,n,i,s){return s||I(t,0,n,8),r.write(t,e,n,i,52,8),n+8}l.prototype.slice=function(t,e){var n,i=this.length;if((t=~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),(e=void 0===e?i:~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),e0&&(r*=256);)i+=this[t+--e]*r;return i},l.prototype.readUInt8=function(t,e){return e||M(t,1,this.length),this[t]},l.prototype.readUInt16LE=function(t,e){return e||M(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUInt16BE=function(t,e){return e||M(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUInt32LE=function(t,e){return e||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUInt32BE=function(t,e){return e||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||M(t,e,this.length);for(var i=this[t],r=1,s=0;++s=(r*=128)&&(i-=Math.pow(2,8*e)),i},l.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||M(t,e,this.length);for(var i=e,r=1,s=this[t+--i];i>0&&(r*=256);)s+=this[t+--i]*r;return s>=(r*=128)&&(s-=Math.pow(2,8*e)),s},l.prototype.readInt8=function(t,e){return e||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){e||M(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(t,e){e||M(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(t,e){return e||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return e||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readFloatLE=function(t,e){return e||M(t,4,this.length),r.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return e||M(t,4,this.length),r.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return e||M(t,8,this.length),r.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return e||M(t,8,this.length),r.read(this,t,!1,52,8)},l.prototype.writeUIntLE=function(t,e,n,i){t=+t,e|=0,n|=0,i||L(this,t,e,n,Math.pow(2,8*n)-1,0);var r=1,s=0;for(this[e]=255&t;++s=0&&(s*=256);)this[e+r]=t/s&255;return e+n},l.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,1,255,0),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},l.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):$(this,t,e,!0),e+2},l.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):$(this,t,e,!1),e+2},l.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):O(this,t,e,!0),e+4},l.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):O(this,t,e,!1),e+4},l.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e|=0,!i){var r=Math.pow(2,8*n-1);L(this,t,e,n,r-1,-r)}var s=0,o=1,a=0;for(this[e]=255&t;++s>0)-a&255;return e+n},l.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e|=0,!i){var r=Math.pow(2,8*n-1);L(this,t,e,n,r-1,-r)}var s=n-1,o=1,a=0;for(this[e+s]=255&t;--s>=0&&(o*=256);)t<0&&0===a&&0!==this[e+s+1]&&(a=1),this[e+s]=(t/o>>0)-a&255;return e+n},l.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,1,127,-128),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):$(this,t,e,!0),e+2},l.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):$(this,t,e,!1),e+2},l.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):O(this,t,e,!0),e+4},l.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):O(this,t,e,!1),e+4},l.prototype.writeFloatLE=function(t,e,n){return N(this,t,e,!0,n)},l.prototype.writeFloatBE=function(t,e,n){return N(this,t,e,!1,n)},l.prototype.writeDoubleLE=function(t,e,n){return P(this,t,e,!0,n)},l.prototype.writeDoubleBE=function(t,e,n){return P(this,t,e,!1,n)},l.prototype.copy=function(t,e,n,i){if(n||(n=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e=0;--r)t[r+e]=this[r+n];else if(s<1e3||!l.TYPED_ARRAY_SUPPORT)for(r=0;r>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(s=e;s55295&&n<57344){if(!r){if(n>56319){(e-=3)>-1&&s.push(239,191,189);continue}if(o+1===i){(e-=3)>-1&&s.push(239,191,189);continue}r=n;continue}if(n<56320){(e-=3)>-1&&s.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(e-=3)>-1&&s.push(239,191,189);if(r=null,n<128){if((e-=1)<0)break;s.push(n)}else if(n<2048){if((e-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function V(t){return i.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(B,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function H(t,e,n,i){for(var r=0;r=e.length||r>=t.length);++r)e[r+n]=t[r];return r}},vQl5:function(t,e,n){"use strict";var i=n("hyoZ");t.exports=new i("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return null!==t?t:[]}})},"w+qe":function(t,e,n){"use strict";function i(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}(i.prototype=Object.create(Error.prototype)).constructor=i,i.prototype.toString=function(t){var e=this.name+": ";return e+=this.reason||"(unknown reason)",!t&&this.mark&&(e+=" "+this.mark.toString()),e},t.exports=i},ydHo:function(t,e,n){"use strict";var i=n("Y2Yi"),r=n("hyoZ");function s(t){return 48<=t&&t<=55}function o(t){return 48<=t&&t<=57}t.exports=new r("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e,n,i=t.length,r=0,a=!1;if(!i)return!1;if("-"!==(e=t[r])&&"+"!==e||(e=t[++r]),"0"===e){if(r+1===i)return!0;if("b"===(e=t[++r])){for(r++;r=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0"+t.toString(8):"-0"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},zUnb:function(t,e,n){"use strict";function i(t){return"function"==typeof t}n.r(e);let r=!1;const s={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){const t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}else r&&console.log("RxJS: Back to a better error behavior. Thank you. <3");r=t},get useDeprecatedSynchronousErrorHandling(){return r}};function o(t){setTimeout(()=>{throw t},0)}const a={closed:!0,next(t){},error(t){if(s.useDeprecatedSynchronousErrorHandling)throw t;o(t)},complete(){}},l=(()=>Array.isArray||(t=>t&&"number"==typeof t.length))();function c(t){return null!==t&&"object"==typeof t}const u=(()=>{function t(t){return Error.call(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((t,e)=>`${e+1}) ${t.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t})();let h=(()=>{class t{constructor(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}unsubscribe(){let e;if(this.closed)return;let{_parentOrParents:n,_ctorUnsubscribe:r,_unsubscribe:s,_subscriptions:o}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof t)n.remove(this);else if(null!==n)for(let t=0;tt.concat(e instanceof u?e.errors:e),[])}const f=(()=>"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random())();class p extends h{constructor(t,e,n){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=a;break;case 1:if(!t){this.destination=a;break}if("object"==typeof t){t instanceof p?(this.syncErrorThrowable=t.syncErrorThrowable,this.destination=t,t.add(this)):(this.syncErrorThrowable=!0,this.destination=new g(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new g(this,t,e,n)}}[f](){return this}static create(t,e,n){const i=new p(t,e,n);return i.syncErrorThrowable=!1,i}next(t){this.isStopped||this._next(t)}error(t){this.isStopped||(this.isStopped=!0,this._error(t))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(t){this.destination.next(t)}_error(t){this.destination.error(t),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:t}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this}}class g extends p{constructor(t,e,n,r){let s;super(),this._parentSubscriber=t;let o=this;i(e)?s=e:e&&(s=e.next,n=e.error,r=e.complete,e!==a&&(o=Object.create(e),i(o.unsubscribe)&&this.add(o.unsubscribe.bind(o)),o.unsubscribe=this.unsubscribe.bind(this))),this._context=o,this._next=s,this._error=n,this._complete=r}next(t){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;s.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}}error(t){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:n}=s;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):o(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;o(t)}}}complete(){if(!this.isStopped){const{_parentSubscriber:t}=this;if(this._complete){const e=()=>this._complete.call(this._context);s.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(t,e){try{t.call(this._context,e)}catch(n){if(this.unsubscribe(),s.useDeprecatedSynchronousErrorHandling)throw n;o(n)}}__tryOrSetError(t,e,n){if(!s.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(i){return s.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=i,t.syncErrorThrown=!0,!0):(o(i),!0)}return!1}_unsubscribe(){const{_parentSubscriber:t}=this;this._context=null,this._parentSubscriber=null,t.unsubscribe()}}const m=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")();function v(t){return t}let y=(()=>{class t{constructor(t){this._isScalar=!1,t&&(this._subscribe=t)}lift(e){const n=new t;return n.source=this,n.operator=e,n}subscribe(t,e,n){const{operator:i}=this,r=function(t,e,n){if(t){if(t instanceof p)return t;if(t[f])return t[f]()}return t||e||n?new p(t,e,n):new p(a)}(t,e,n);if(r.add(i?i.call(r,this.source):this.source||s.useDeprecatedSynchronousErrorHandling&&!r.syncErrorThrowable?this._subscribe(r):this._trySubscribe(r)),s.useDeprecatedSynchronousErrorHandling&&r.syncErrorThrowable&&(r.syncErrorThrowable=!1,r.syncErrorThrown))throw r.syncErrorValue;return r}_trySubscribe(t){try{return this._subscribe(t)}catch(e){s.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function(t){for(;t;){const{closed:e,destination:n,isStopped:i}=t;if(e||i)return!1;t=n&&n instanceof p?n:null}return!0}(t)?t.error(e):console.warn(e)}}forEach(t,e){return new(e=b(e))((e,n)=>{let i;i=this.subscribe(e=>{try{t(e)}catch(r){n(r),i&&i.unsubscribe()}},n,e)})}_subscribe(t){const{source:e}=this;return e&&e.subscribe(t)}[m](){return this}pipe(...t){return 0===t.length?this:(0===(e=t).length?v:1===e.length?e[0]:function(t){return e.reduce((t,e)=>e(t),t)})(this);var e}toPromise(t){return new(t=b(t))((t,e)=>{let n;this.subscribe(t=>n=t,t=>e(t),()=>t(n))})}}return t.create=e=>new t(e),t})();function b(t){if(t||(t=s.Promise||Promise),!t)throw new Error("no Promise impl found");return t}const w=(()=>{function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t})();class x extends h{constructor(t,e){super(),this.subject=t,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const t=this.subject,e=t.observers;if(this.subject=null,!e||0===e.length||t.isStopped||t.closed)return;const n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}class _ extends p{constructor(t){super(t),this.destination=t}}let C=(()=>{class t extends y{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[f](){return new _(this)}lift(t){const e=new S(this,this);return e.operator=t,e}next(t){if(this.closed)throw new w;if(!this.isStopped){const{observers:e}=this,n=e.length,i=e.slice();for(let r=0;rnew S(t,e),t})();class S extends C{constructor(t,e){super(),this.destination=t,this.source=e}next(t){const{destination:e}=this;e&&e.next&&e.next(t)}error(t){const{destination:e}=this;e&&e.error&&this.destination.error(t)}complete(){const{destination:t}=this;t&&t.complete&&this.destination.complete()}_subscribe(t){const{source:e}=this;return e?this.source.subscribe(t):h.EMPTY}}function k(t){return t&&"function"==typeof t.schedule}function E(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new A(t,e))}}class A{constructor(t,e){this.project=t,this.thisArg=e}call(t,e){return e.subscribe(new D(t,this.project,this.thisArg))}}class D extends p{constructor(t,e,n){super(t),this.project=e,this.count=0,this.thisArg=n||this}_next(t){let e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}this.destination.next(e)}}const T=t=>e=>{for(let n=0,i=t.length;nt&&"number"==typeof t.length&&"function"!=typeof t;function L(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}const $=t=>{if(t&&"function"==typeof t[m])return i=t,t=>{const e=i[m]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if(M(t))return T(t);if(L(t))return n=t,t=>(n.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,o),t);if(t&&"function"==typeof t[F])return e=t,t=>{const n=e[F]();for(;;){let e;try{e=n.next()}catch(i){return t.error(i),t}if(e.done){t.complete();break}if(t.next(e.value),t.closed)break}return"function"==typeof n.return&&t.add(()=>{n.return&&n.return()}),t};{const e=c(t)?"an invalid object":`'${t}'`;throw new TypeError(`You provided ${e} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`)}var e,n,i};function O(t,e){return new y(n=>{const i=new h;let r=0;return i.add(e.schedule(function(){r!==t.length?(n.next(t[r++]),n.closed||i.add(this.schedule())):n.complete()})),i})}function I(t,e){return e?function(t,e){if(null!=t){if(function(t){return t&&"function"==typeof t[m]}(t))return function(t,e){return new y(n=>{const i=new h;return i.add(e.schedule(()=>{const r=t[m]();i.add(r.subscribe({next(t){i.add(e.schedule(()=>n.next(t)))},error(t){i.add(e.schedule(()=>n.error(t)))},complete(){i.add(e.schedule(()=>n.complete()))}}))})),i})}(t,e);if(L(t))return function(t,e){return new y(n=>{const i=new h;return i.add(e.schedule(()=>t.then(t=>{i.add(e.schedule(()=>{n.next(t),i.add(e.schedule(()=>n.complete()))}))},t=>{i.add(e.schedule(()=>n.error(t)))}))),i})}(t,e);if(M(t))return O(t,e);if(function(t){return t&&"function"==typeof t[F]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new y(n=>{const i=new h;let r;return i.add(()=>{r&&"function"==typeof r.return&&r.return()}),i.add(e.schedule(()=>{r=t[F](),i.add(e.schedule(function(){if(n.closed)return;let t,e;try{const n=r.next();t=n.value,e=n.done}catch(i){return void n.error(i)}e?n.complete():(n.next(t),this.schedule())}))})),i})}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}(t,e):t instanceof y?t:new y($(t))}class N extends p{constructor(t){super(),this.parent=t}_next(t){this.parent.notifyNext(t)}_error(t){this.parent.notifyError(t),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class P extends p{notifyNext(t){this.destination.next(t)}notifyError(t){this.destination.error(t)}notifyComplete(){this.destination.complete()}}function B(t,e){if(!e.closed)return t instanceof y?t.subscribe(e):$(t)(e)}function U(t,e,n=Number.POSITIVE_INFINITY){return"function"==typeof e?i=>i.pipe(U((n,i)=>I(t(n,i)).pipe(E((t,r)=>e(n,t,i,r))),n)):("number"==typeof e&&(n=e),e=>e.lift(new V(t,n)))}class V{constructor(t,e=Number.POSITIVE_INFINITY){this.project=t,this.concurrent=e}call(t,e){return e.subscribe(new H(t,this.project,this.concurrent))}}class H extends P{constructor(t,e,n=Number.POSITIVE_INFINITY){super(t),this.project=e,this.concurrent=n,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(t){this.active0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function j(t=Number.POSITIVE_INFINITY){return U(v,t)}function z(t,e){return e?O(t,e):new y(T(t))}function W(...t){let e=Number.POSITIVE_INFINITY,n=null,i=t[t.length-1];return k(i)?(n=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(e=t.pop())):"number"==typeof i&&(e=t.pop()),null===n&&1===t.length&&t[0]instanceof y?t[0]:j(e)(z(t,n))}function G(){return function(t){return t.lift(new K(t))}}class K{constructor(t){this.connectable=t}call(t,e){const{connectable:n}=this;n._refCount++;const i=new q(t,n),r=e.subscribe(i);return i.closed||(i.connection=n.connect()),r}}class q extends p{constructor(t,e){super(t),this.connectable=e}_unsubscribe(){const{connectable:t}=this;if(!t)return void(this.connection=null);this.connectable=null;const e=t._refCount;if(e<=0)return void(this.connection=null);if(t._refCount=e-1,e>1)return void(this.connection=null);const{connection:n}=this,i=t._connection;this.connection=null,!i||n&&i!==n||i.unsubscribe()}}class Y extends y{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._refCount=0,this._isComplete=!1}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){const t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject}connect(){let t=this._connection;return t||(this._isComplete=!1,t=this._connection=new h,t.add(this.source.subscribe(new J(this.getSubject(),this))),t.closed&&(this._connection=null,t=h.EMPTY)),t}refCount(){return G()(this)}}const X=(()=>{const t=Y.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}})();class J extends _{constructor(t,e){super(t),this.connectable=e}_error(t){this._unsubscribe(),super._error(t)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const t=this.connectable;if(t){this.connectable=null;const e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}}}function Q(){return new C}function Z(t){return{toString:t}.toString()}const tt="__parameters__";function et(t,e,n){return Z(()=>{const i=function(t){return function(...e){if(t){const n=t(...e);for(const t in n)this[t]=n[t]}}}(e);function r(...t){if(this instanceof r)return i.apply(this,t),this;const e=new r(...t);return n.annotation=e,n;function n(t,n,i){const r=t.hasOwnProperty(tt)?t[tt]:Object.defineProperty(t,tt,{value:[]})[tt];for(;r.length<=i;)r.push(null);return(r[i]=r[i]||[]).push(e),t}}return n&&(r.prototype=Object.create(n.prototype)),r.prototype.ngMetadataName=t,r.annotationCls=r,r})}const nt=et("Inject",t=>({token:t})),it=et("Optional"),rt=et("Self"),st=et("SkipSelf"),ot=et("Attribute",t=>({attributeName:t}));var at=function(t){return t[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional",t}({});function lt(t){for(let e in t)if(t[e]===lt)return e;throw Error("Could not find renamed property on target object.")}function ct(t,e){for(const n in e)e.hasOwnProperty(n)&&!t.hasOwnProperty(n)&&(t[n]=e[n])}function ut(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function ht(t){return{factory:t.factory,providers:t.providers||[],imports:t.imports||[]}}function dt(t){return ft(t,gt)||ft(t,vt)}function ft(t,e){return t.hasOwnProperty(e)?t[e]:null}function pt(t){return t&&(t.hasOwnProperty(mt)||t.hasOwnProperty(yt))?t[mt]:null}const gt=lt({"\u0275prov":lt}),mt=lt({"\u0275inj":lt}),vt=lt({ngInjectableDef:lt}),yt=lt({ngInjectorDef:lt});function bt(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(bt).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;const e=t.toString();if(null==e)return""+e;const n=e.indexOf("\n");return-1===n?e:e.substring(0,n)}function wt(t,e){return null==t||""===t?null===e?"":e:null==e||""===e?t:t+" "+e}const xt=lt({__forward_ref__:lt});function _t(t){return t.__forward_ref__=_t,t.toString=function(){return bt(this())},t}function Ct(t){return St(t)?t():t}function St(t){return"function"==typeof t&&t.hasOwnProperty(xt)&&t.__forward_ref__===_t}const kt="undefined"!=typeof globalThis&&globalThis,Et="undefined"!=typeof window&&window,At="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,Dt="undefined"!=typeof global&&global,Tt=kt||Dt||Et||At,Rt=lt({"\u0275cmp":lt}),Ft=lt({"\u0275dir":lt}),Mt=lt({"\u0275pipe":lt}),Lt=lt({"\u0275mod":lt}),$t=lt({"\u0275loc":lt}),Ot=lt({"\u0275fac":lt}),It=lt({__NG_ELEMENT_ID__:lt});function Nt(t,e,n,i){throw new Error(`ASSERTION ERROR: ${t}`+(null==i?"":` [Expected=> ${n} ${i} ${e} <=Actual]`))}class Pt{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=ut({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}toString(){return`InjectionToken ${this._desc}`}}const Bt=new Pt("INJECTOR",-1),Ut={},Vt=/\n/gm,Ht="__source",jt=lt({provide:String,useValue:lt});let zt,Wt;function Gt(t){const e=zt;return zt=t,e}function Kt(t){const e=Wt;return Wt=t,e}function qt(t,e=at.Default){if(void 0===zt)throw new Error("inject() must be called from an injection context");return null===zt?Xt(t,void 0,e):zt.get(t,e&at.Optional?null:void 0,e)}function Yt(t,e=at.Default){return(Wt||qt)(Ct(t),e)}function Xt(t,e,n){const i=dt(t);if(i&&"root"==i.providedIn)return void 0===i.value?i.value=i.factory():i.value;if(n&at.Optional)return null;if(void 0!==e)return e;throw new Error(`Injector: NOT_FOUND [${bt(t)}]`)}function Jt(t){const e=[];for(let n=0;nArray.isArray(t)?ne(t,e):e(t))}function ie(t,e,n){e>=t.length?t.push(n):t.splice(e,0,n)}function re(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function se(t,e){const n=[];for(let i=0;i=0?t[1|i]=n:(i=~i,function(t,e,n,i){let r=t.length;if(r==e)t.push(n,i);else if(1===r)t.push(i,t[0]),t[0]=n;else{for(r--,t.push(t[r-1],t[r]);r>e;)t[r]=t[r-2],r--;t[e]=n,t[e+1]=i}}(t,i,e,n)),i}function ae(t,e){const n=le(t,e);if(n>=0)return t[1|n]}function le(t,e){return function(t,e,n){let i=0,r=t.length>>1;for(;r!==i;){const n=i+(r-i>>1),s=t[n<<1];if(e===s)return n<<1;s>e?r=n:i=n+1}return~(r<<1)}(t,e)}var ce=function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t}({}),ue=function(t){return t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t}({});const he={},de=[];let fe=0;function pe(t){return Z(()=>{const e={},n={type:t.type,providersResolver:null,decls:t.decls,vars:t.vars,factory:null,template:t.template||null,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,inputs:null,outputs:null,exportAs:t.exportAs||null,onPush:t.changeDetection===ce.OnPush,directiveDefs:null,pipeDefs:null,selectors:t.selectors||de,viewQuery:t.viewQuery||null,features:t.features||null,data:t.data||{},encapsulation:t.encapsulation||ue.Emulated,id:"c",styles:t.styles||de,_:null,setInput:null,schemas:t.schemas||null,tView:null},i=t.directives,r=t.features,s=t.pipes;return n.id+=fe++,n.inputs=be(t.inputs,e),n.outputs=be(t.outputs),r&&r.forEach(t=>t(n)),n.directiveDefs=i?()=>("function"==typeof i?i():i).map(ge):null,n.pipeDefs=s?()=>("function"==typeof s?s():s).map(me):null,n})}function ge(t){return xe(t)||function(t){return t[Ft]||null}(t)}function me(t){return function(t){return t[Mt]||null}(t)}const ve={};function ye(t){const e={type:t.type,bootstrap:t.bootstrap||de,declarations:t.declarations||de,imports:t.imports||de,exports:t.exports||de,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null};return null!=t.id&&Z(()=>{ve[t.id]=t.type}),e}function be(t,e){if(null==t)return he;const n={};for(const i in t)if(t.hasOwnProperty(i)){let r=t[i],s=r;Array.isArray(r)&&(s=r[1],r=r[0]),n[r]=i,e&&(e[r]=s)}return n}const we=pe;function xe(t){return t[Rt]||null}function _e(t,e){return t.hasOwnProperty(Ot)?t[Ot]:null}function Ce(t,e){const n=t[Lt]||null;if(!n&&!0===e)throw new Error(`Type ${bt(t)} does not have '\u0275mod' property.`);return n}const Se=20,ke=10;function Ee(t){return Array.isArray(t)&&"object"==typeof t[1]}function Ae(t){return Array.isArray(t)&&!0===t[1]}function De(t){return 0!=(8&t.flags)}function Te(t){return 2==(2&t.flags)}function Re(t){return 1==(1&t.flags)}function Fe(t){return null!==t.template}function Me(t){return 0!=(512&t[2])}class Le extends Error{constructor(t,e){super(function(t,e){return`${t?`NG0${t}: `:""}${e}`}(t,e)),this.code=t}}function $e(t){return"string"==typeof t?t:null==t?"":""+t}function Oe(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():$e(t)}const Ie=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(Tt))();function Ne(t){return{name:"window",target:t.ownerDocument.defaultView}}function Pe(t){return t instanceof Function?t():t}function Be(t,e){const n=e?` in ${e}`:"";throw new Le("201",`No provider for ${Oe(t)} found${n}`)}class Ue{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function Ve(){return He}function He(t){return t.type.prototype.ngOnChanges&&(t.setInput=ze),je}function je(){const t=We(this),e=null==t?void 0:t.current;if(e){const n=t.previous;if(n===he)t.previous=e;else for(let t in e)n[t]=e[t];t.current=null,this.ngOnChanges(e)}}function ze(t,e,n,i){const r=We(t)||function(t,e){return t.__ngSimpleChanges__=e}(t,{previous:he,current:null}),s=r.current||(r.current={}),o=r.previous,a=this.declaredInputs[n],l=o[a];s[a]=new Ue(l&&l.currentValue,e,o===he),t[i]=e}function We(t){return t.__ngSimpleChanges__||null}Ve.ngInherit=!0;const Ge="http://www.w3.org/2000/svg";let Ke;function qe(){return void 0!==Ke?Ke:"undefined"!=typeof document?document:void 0}function Ye(t){return!!t.listen}const Xe={createRenderer:(t,e)=>qe()};function Je(t){for(;Array.isArray(t);)t=t[0];return t}function Qe(t,e){return Je(e[t])}function Ze(t,e){return Je(e[t.index])}function tn(t,e){return t.data[e]}function en(t,e){return t[e]}function nn(t,e){const n=e[t];return Ee(n)?n:n[0]}function rn(t){const e=function(t){return t.__ngContext__||null}(t);return e?Array.isArray(e)?e:e.lView:null}function sn(t){return 4==(4&t[2])}function on(t){return 128==(128&t[2])}function an(t,e){return null==e?null:t[e]}function ln(t){t[18]=0}function cn(t,e){t[5]+=e;let n=t,i=t[3];for(;null!==i&&(1===e&&1===n[5]||-1===e&&0===n[5]);)i[5]+=e,n=i,i=i[3]}const un={lFrame:In(null),bindingsEnabled:!0,isInCheckNoChangesMode:!1};function hn(){return un.bindingsEnabled}function dn(){return un.lFrame.lView}function fn(){return un.lFrame.tView}function pn(t){un.lFrame.contextLView=t}function gn(){let t=mn();for(;null!==t&&64===t.type;)t=t.parent;return t}function mn(){return un.lFrame.currentTNode}function vn(){const t=un.lFrame,e=t.currentTNode;return t.isParent?e:e.parent}function yn(t,e){const n=un.lFrame;n.currentTNode=t,n.isParent=e}function bn(){return un.lFrame.isParent}function wn(){un.lFrame.isParent=!1}function xn(){return un.isInCheckNoChangesMode}function _n(t){un.isInCheckNoChangesMode=t}function Cn(){const t=un.lFrame;let e=t.bindingRootIndex;return-1===e&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function Sn(){return un.lFrame.bindingIndex}function kn(){return un.lFrame.bindingIndex++}function En(t){const e=un.lFrame,n=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,n}function An(t){un.lFrame.inI18n=t}function Dn(t,e){const n=un.lFrame;n.bindingIndex=n.bindingRootIndex=t,Tn(e)}function Tn(t){un.lFrame.currentDirectiveIndex=t}function Rn(){return un.lFrame.currentQueryIndex}function Fn(t){un.lFrame.currentQueryIndex=t}function Mn(t){const e=t[1];return 2===e.type?e.declTNode:1===e.type?t[6]:null}function Ln(t,e,n){if(n&at.SkipSelf){let i=e,r=t;for(;i=i.parent,!(null!==i||n&at.Host||(i=Mn(r),null===i)||(r=r[15],10&i.type)););if(null===i)return!1;e=i,t=r}const i=un.lFrame=On();return i.currentTNode=e,i.lView=t,!0}function $n(t){const e=On(),n=t[1];un.lFrame=e,e.currentTNode=n.firstChild,e.lView=t,e.tView=n,e.contextLView=t,e.bindingIndex=n.bindingStartIndex,e.inI18n=!1}function On(){const t=un.lFrame,e=null===t?null:t.child;return null===e?In(t):e}function In(t){const e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return null!==t&&(t.child=e),e}function Nn(){const t=un.lFrame;return un.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const Pn=Nn;function Bn(){const t=Nn();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function Un(){return un.lFrame.selectedIndex}function Vn(t){un.lFrame.selectedIndex=t}function Hn(){const t=un.lFrame;return tn(t.tView,t.selectedIndex)}function jn(){un.lFrame.currentNamespace=Ge}function zn(){un.lFrame.currentNamespace=null}function Wn(t,e){for(let n=e.directiveStart,i=e.directiveEnd;n=i)break}else e[o]<0&&(t[18]+=65536),(s>11>16&&(3&t[2])===e&&(t[2]+=2048,s.call(o)):s.call(o)}const Jn=-1;class Qn{constructor(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function Zn(t,e,n){const i=Ye(t);let r=0;for(;re){o=s-1;break}}}for(;s>16,i=e;for(;n>0;)i=i[15],n--;return i}let ai=!0;function li(t){const e=ai;return ai=t,e}let ci=0;function ui(t,e){const n=di(t,e);if(-1!==n)return n;const i=e[1];i.firstCreatePass&&(t.injectorIndex=e.length,hi(i.data,t),hi(e,null),hi(i.blueprint,null));const r=fi(t,e),s=t.injectorIndex;if(ri(r)){const t=si(r),n=oi(r,e),i=n[1].data;for(let r=0;r<8;r++)e[s+r]=n[t+r]|i[t+r]}return e[s+8]=r,s}function hi(t,e){t.push(0,0,0,0,0,0,0,0,e)}function di(t,e){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===e[t.injectorIndex+8]?-1:t.injectorIndex}function fi(t,e){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let n=0,i=null,r=e;for(;null!==r;){const t=r[1],e=t.type;if(i=2===e?t.declTNode:1===e?r[6]:null,null===i)return Jn;if(n++,r=r[15],-1!==i.injectorIndex)return i.injectorIndex|n<<16}return Jn}function pi(t,e,n){!function(t,e,n){let i;"string"==typeof n?i=n.charCodeAt(0)||0:n.hasOwnProperty(It)&&(i=n[It]),null==i&&(i=n[It]=ci++);const r=255&i,s=1<0?255&e:e}(n);if("function"==typeof s){if(!Ln(e,t,i))return mi(e,n,i,r);try{const t=s();if(null!=t||i&at.Optional)return t;Be(n)}finally{Pn()}}else if("number"==typeof s){if(-1===s){if(!Ln(e,t,i))return i&at.Host?gi(r,n,i):mi(e,n,i,r);try{return new Si(gn(),dn())}finally{Pn()}}let o=null,a=di(t,e),l=Jn,c=i&at.Host?e[16][6]:null;for((-1===a||i&at.SkipSelf)&&(l=-1===a?fi(t,e):e[a+8],l!==Jn&&Ci(i,!1)?(o=e[1],a=si(l),e=oi(l,e)):a=-1);-1!==a;){const t=e[1];if(_i(s,a,t.data)){const t=bi(a,e,n,o,i,c);if(t!==yi)return t}l=e[a+8],l!==Jn&&Ci(i,e[1].data[a+8]===c)&&_i(s,a,e)?(o=t,a=si(l),e=oi(l,e)):a=-1}}}return mi(e,n,i,r)}const yi={};function bi(t,e,n,i,r,s){const o=e[1],a=o.data[t+8],l=wi(a,o,n,null==i?Te(a)&&ai:i!=o&&0!=(3&a.type),r&at.Host&&s===a);return null!==l?xi(e,o,l,a):yi}function wi(t,e,n,i,r){const s=t.providerIndexes,o=e.data,a=1048575&s,l=t.directiveStart,c=s>>20,u=r?a+c:t.directiveEnd;for(let h=i?a:a+c;h=l&&t.type===n)return h}if(r){const t=o[l];if(t&&Fe(t)&&t.type===n)return l}return null}function xi(t,e,n,i){let r=t[n];const s=e.data;if(r instanceof Qn){const o=r;o.resolving&&function(t,e){throw new Le("200",`Circular dependency in DI detected for ${t}`)}(Oe(s[n]));const a=li(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?Kt(o.injectImpl):null;Ln(t,i,at.Default);try{r=t[n]=o.factory(void 0,s,t,i),e.firstCreatePass&&n>=i.directiveStart&&function(t,e,n){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:s}=e.type.prototype;if(i){const i=He(e);(n.preOrderHooks||(n.preOrderHooks=[])).push(t,i),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,i)}r&&(n.preOrderHooks||(n.preOrderHooks=[])).push(0-t,r),s&&((n.preOrderHooks||(n.preOrderHooks=[])).push(t,s),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,s))}(n,s[n],e)}finally{null!==l&&Kt(l),li(a),o.resolving=!1,Pn()}}return r}function _i(t,e,n){const i=64&t,r=32&t;let s;return s=128&t?i?r?n[e+7]:n[e+6]:r?n[e+5]:n[e+4]:i?r?n[e+3]:n[e+2]:r?n[e+1]:n[e],!!(s&1<{const t=ki(Ct(e));return t?t():null};let n=_e(e);if(null===n){const t=pt(e);n=t&&t.factory}return n||null}function Ei(t){return Z(()=>{const e=t.prototype.constructor,n=e[Ot]||ki(e),i=Object.prototype;let r=Object.getPrototypeOf(t.prototype).constructor;for(;r&&r!==i;){const t=r[Ot]||ki(r);if(t&&t!==n)return t;r=Object.getPrototypeOf(r)}return t=>new t})}function Ai(t){return t.ngDebugContext}function Di(t){return t.ngOriginalError}function Ti(t,...e){t.error(...e)}class Ri{constructor(){this._console=console}handleError(t){const e=this._findOriginalError(t),n=this._findContext(t),i=function(t){return t.ngErrorLogger||Ti}(t);i(this._console,"ERROR",t),e&&i(this._console,"ORIGINAL ERROR",e),n&&i(this._console,"ERROR CONTEXT",n)}_findContext(t){return t?Ai(t)?Ai(t):this._findContext(Di(t)):null}_findOriginalError(t){let e=Di(t);for(;e&&Di(e);)e=Di(e);return e}}let Fi;function Mi(t){var e;return(null===(e=function(){if(void 0===Fi&&(Fi=null,Tt.trustedTypes))try{Fi=Tt.trustedTypes.createPolicy("angular",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch(e){}return Fi}())||void 0===e?void 0:e.createHTML(t))||t}class Li{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see http://g.co/ng/security#xss)`}}class $i extends Li{getTypeName(){return"HTML"}}class Oi extends Li{getTypeName(){return"Style"}}class Ii extends Li{getTypeName(){return"Script"}}class Ni extends Li{getTypeName(){return"URL"}}class Pi extends Li{getTypeName(){return"ResourceURL"}}function Bi(t){return t instanceof Li?t.changingThisBreaksApplicationSecurity:t}function Ui(t,e){const n=Vi(t);if(null!=n&&n!==e){if("ResourceURL"===n&&"URL"===e)return!0;throw new Error(`Required a safe ${e}, got a ${n} (see http://g.co/ng/security#xss)`)}return n===e}function Vi(t){return t instanceof Li&&t.getTypeName()||null}let Hi=!0,ji=!1;function zi(){return ji=!0,Hi}function Wi(t){return function(){try{return!!(new window.DOMParser).parseFromString(Mi(""),"text/html")}catch(t){return!1}}()?new Gi:new Ki(t)}class Gi{getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(Mi(t),"text/html").body;return e.removeChild(e.firstChild),e}catch(e){return null}}}class Ki{constructor(t){if(this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const t=this.inertDocument.createElement("html");this.inertDocument.appendChild(t);const e=this.inertDocument.createElement("body");t.appendChild(e)}}getInertBodyElement(t){const e=this.inertDocument.createElement("template");if("content"in e)return e.innerHTML=Mi(t),e;const n=this.inertDocument.createElement("body");return n.innerHTML=Mi(t),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(n),n}stripCustomNsAttrs(t){const e=t.attributes;for(let i=e.length-1;0Xi(t.trim())).join(", ")}function Qi(t){const e={};for(const n of t.split(","))e[n]=!0;return e}function Zi(...t){const e={};for(const n of t)for(const t in n)n.hasOwnProperty(t)&&(e[t]=!0);return e}const tr=Qi("area,br,col,hr,img,wbr"),er=Qi("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),nr=Qi("rp,rt"),ir=Zi(nr,er),rr=Zi(tr,Zi(er,Qi("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),Zi(nr,Qi("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),ir),sr=Qi("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),or=Qi("srcset"),ar=Zi(sr,or,Qi("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Qi("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),lr=Qi("script,style,template");class cr{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(t){let e=t.firstChild,n=!0;for(;e;)if(e.nodeType===Node.ELEMENT_NODE?n=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,n&&e.firstChild)e=e.firstChild;else for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let t=this.checkClobberedElement(e,e.nextSibling);if(t){e=t;break}e=this.checkClobberedElement(e,e.parentNode)}return this.buf.join("")}startElement(t){const e=t.nodeName.toLowerCase();if(!rr.hasOwnProperty(e))return this.sanitizedSomething=!0,!lr.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);const n=t.attributes;for(let i=0;i"),!0}endElement(t){const e=t.nodeName.toLowerCase();rr.hasOwnProperty(e)&&!tr.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(dr(t))}checkClobberedElement(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`);return e}}const ur=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,hr=/([^\#-~ |!])/g;function dr(t){return t.replace(/&/g,"&").replace(ur,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(hr,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let fr;function pr(t,e){let n=null;try{fr=fr||Wi(t);let i=e?String(e):"";n=fr.getInertBodyElement(i);let r=5,s=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=s,s=n.innerHTML,n=fr.getInertBodyElement(i)}while(i!==s);const o=new cr,a=o.sanitizeChildren(gr(n)||n);return zi()&&o.sanitizedSomething&&console.warn("WARNING: sanitizing HTML stripped some content, see http://g.co/ng/security#xss"),a}finally{if(n){const t=gr(n)||n;for(;t.firstChild;)t.removeChild(t.firstChild)}}}function gr(t){return"content"in t&&function(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var mr=function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t}({});function vr(t){const e=br();return e?e.sanitize(mr.HTML,t)||"":Ui(t,"HTML")?Bi(t):pr(qe(),$e(t))}function yr(t){const e=br();return e?e.sanitize(mr.URL,t)||"":Ui(t,"URL")?Bi(t):Xi($e(t))}function br(){const t=dn();return t&&t[12]}function wr(t,e){t.__ngContext__=e}let xr;function _r(t,e){return xr(t,e)}function Cr(t){const e=t[3];return Ae(e)?e[3]:e}function Sr(t){return Er(t[13])}function kr(t){return Er(t[4])}function Er(t){for(;null!==t&&!Ae(t);)t=t[4];return t}function Ar(t,e,n,i,r){if(null!=i){let s,o=!1;Ae(i)?s=i:Ee(i)&&(o=!0,i=i[0]);const a=Je(i);0===t&&null!==n?null==r?Br(e,n,a):Pr(e,n,a,r||null,!0):1===t&&null!==n?Pr(e,n,a,r||null,!0):2===t?Xr(e,a,o):3===t&&e.destroyNode(a),null!=s&&function(t,e,n,i,r){const s=n[7];s!==Je(n)&&Ar(e,t,i,s,r);for(let o=ke;o0&&(t[n-1][4]=i[4]);const o=re(t,ke+e);Qr(i[1],r=i,r[11],2,null,null),r[0]=null,r[6]=null;const a=o[19];null!==a&&a.detachView(o[1]),i[3]=null,i[4]=null,i[2]&=-129}var r;return i}function $r(t,e){if(!(256&e[2])){const n=e[11];Ye(n)&&n.destroyNode&&Qr(t,e,n,3,null,null),function(t){let e=t[13];if(!e)return Or(t[1],t);for(;e;){let n=null;if(Ee(e))n=e[13];else{const t=e[10];t&&(n=t)}if(!n){for(;e&&!e[4]&&e!==t;)Ee(e)&&Or(e[1],e),e=e[3];null===e&&(e=t),Ee(e)&&Or(e[1],e),n=e&&e[4]}e=n}}(e)}}function Or(t,e){if(!(256&e[2])){e[2]&=-129,e[2]|=256,function(t,e){let n;if(null!=t&&null!=(n=t.destroyHooks))for(let i=0;i=0?t[a]():t[-a].unsubscribe(),i+=2}else n[i].call(t[n[i+1]]);e[7]=null}}(t,e),1===e[1].type&&Ye(e[11])&&e[11].destroy();const n=e[17];if(null!==n&&Ae(e[3])){n!==e[3]&&Mr(n,e);const i=e[19];null!==i&&i.detachView(t)}}}function Ir(t,e,n){return Nr(t,e.parent,n)}function Nr(t,e,n){let i=e;for(;null!==i&&40&i.type;)i=(e=i).parent;if(null===i)return n[0];if(2&i.flags){const e=t.data,n=e[e[i.index].directiveStart].encapsulation;if(n===ue.None||n===ue.Emulated)return null}return Ze(i,n)}function Pr(t,e,n,i,r){Ye(t)?t.insertBefore(e,n,i,r):e.insertBefore(n,i,r)}function Br(t,e,n){Ye(t)?t.appendChild(e,n):e.appendChild(n)}function Ur(t,e,n,i,r){null!==i?Pr(t,e,n,i,r):Br(t,e,n)}function Vr(t,e){return Ye(t)?t.parentNode(e):e.parentNode}function Hr(t,e,n){return Wr(t,e,n)}function jr(t,e,n){return 40&t.type?Ze(t,n):null}let zr,Wr=jr;function Gr(t,e){Wr=t,zr=e}function Kr(t,e,n,i){const r=Ir(t,i,e),s=e[11],o=Hr(i.parent||e[6],i,e);if(null!=r)if(Array.isArray(n))for(let a=0;as?"":r[u+1].toLowerCase();const e=8&i?t:null;if(e&&-1!==ns(e,c,0)||2&i&&c!==t){if(ls(i))return!1;o=!0}}}}else{if(!o&&!ls(i)&&!ls(l))return!1;if(o&&ls(l))continue;o=!1,i=l|1&i}}return ls(i)||o}function ls(t){return 0==(1&t)}function cs(t,e,n,i){if(null===e)return-1;let r=0;if(i||!n){let n=!1;for(;r-1)for(n++;n0?'="'+e+'"':"")+"]"}else 8&i?r+="."+o:4&i&&(r+=" "+o);else""===r||ls(o)||(e+=ds(s,r),r=""),i=o,s=s||!ls(i);n++}return""!==r&&(e+=ds(s,r)),e}const ps={};function gs(t){ms(fn(),dn(),Un()+t,xn())}function ms(t,e,n,i){if(!i)if(3==(3&e[2])){const i=t.preOrderCheckHooks;null!==i&&Gn(e,i,n)}else{const i=t.preOrderHooks;null!==i&&Kn(e,i,0,n)}Vn(n)}function vs(t,e){return t<<17|e<<2}function ys(t){return t>>17&32767}function bs(t){return 2|t}function ws(t){return(131068&t)>>2}function xs(t,e){return-131069&t|e<<2}function _s(t){return 1|t}function Cs(t,e){const n=t.contentQueries;if(null!==n)for(let i=0;iSe&&ms(t,e,Se,xn()),n(i,r)}finally{Vn(s)}}function Ms(t,e,n){if(De(e)){const i=e.directiveEnd;for(let r=e.directiveStart;r0;){const n=t[--e];if("number"==typeof n&&n<0)return n}return 0})(n)!=s&&n.push(s),n.push(i,r,o)}}function js(t,e){null!==t.hostBindings&&t.hostBindings(1,e)}function zs(t,e){e.flags|=2,(t.components||(t.components=[])).push(e.index)}function Ws(t,e,n){if(n){if(e.exportAs)for(let i=0;i0&&to(n)}}function to(t){for(let n=Sr(t);null!==n;n=kr(n))for(let t=ke;t0&&to(e)}const e=t[1].components;if(null!==e)for(let n=0;n0&&to(i)}}function eo(t,e){const n=nn(e,t),i=n[1];!function(t,e){for(let n=e.length;nPromise.resolve(null))();function lo(t){return t[7]||(t[7]=[])}function co(t,e){const n=t[9],i=n?n.get(Ri,null):null;i&&i.handleError(e)}function uo(t,e,n,i,r){for(let s=0;s-1&&this._viewContainerRef.detach(t),this._viewContainerRef=null}$r(this._lView[1],this._lView)}onDestroy(t){Ns(this._lView[1],this._lView,null,t)}markForCheck(){io(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-129}reattach(){this._lView[2]|=128}detectChanges(){ro(this._lView[1],this._lView,this.context)}checkNoChanges(){!function(t,e,n){_n(!0);try{ro(t,e,n)}finally{_n(!1)}}(this._lView[1],this._lView,this.context)}attachToViewContainerRef(t){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=t}detachFromAppRef(){var t;this._appRef=null,Qr(this._lView[1],t=this._lView,t[11],2,null,null)}attachToAppRef(t){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t}}class po extends fo{constructor(t){super(t),this._view=t}detectChanges(){so(this._view)}checkNoChanges(){!function(t){_n(!0);try{so(t)}finally{_n(!1)}}(this._view)}get context(){return null}}function go(t,e,n,i,r=!1){for(;null!==n;){const s=e[n.index];if(null!==s&&i.push(Je(s)),Ae(s))for(let t=ke;t0;)this.remove(this.length-1)}get(t){return null!==this._lContainer[8]&&this._lContainer[8][t]||null}get length(){return this._lContainer.length-ke}createEmbeddedView(t,e,n){const i=t.createEmbeddedView(e||{});return this.insert(i,n),i}createComponent(t,e,n,i,r){const s=n||this.parentInjector;if(!r&&null==t.ngModule&&s){const t=s.get(Zt,null);t&&(r=t)}const o=t.create(s,i,void 0,r);return this.insert(o.hostView,e),o}insert(t,e){const n=t._lView,i=n[1];if(t.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");if(this.allocateContainerIfNeeded(),Ae(n[3])){const e=this.indexOf(t);if(-1!==e)this.detach(e);else{const e=n[3],i=new yo(e,e[6],e[3]);i.detach(i.indexOf(t))}}const r=this._adjustIndex(e),s=this._lContainer;!function(t,e,n,i){const r=ke+i,s=n.length;i>0&&(n[r-1][4]=e),i{class t{}return t.__NG_ELEMENT_ID__=()=>Co(),t})();const Co=function(t=!1){return function(t,e,n){if(!n&&Te(t)){const n=nn(t.index,e);return new fo(n,n)}return 47&t.type?new fo(e[16],e):null}(gn(),dn(),t)},So=Function,ko=new Pt("Set Injector scope."),Eo={},Ao={},Do=[];let To;function Ro(){return void 0===To&&(To=new Qt),To}function Fo(t,e=null,n=null,i){return new Mo(t,n,e||Ro(),i)}class Mo{constructor(t,e,n,i=null){this.parent=n,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;const r=[];e&&ne(e,n=>this.processProvider(n,t,e)),ne([t],t=>this.processInjectorType(t,[],r)),this.records.set(Bt,Oo(void 0,this));const s=this.records.get(ko);this.scope=null!=s?s.value:null,this.source=i||("object"==typeof t?null:bt(t))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(t=>t.ngOnDestroy())}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}get(t,e=Ut,n=at.Default){this.assertNotDestroyed();const i=Gt(this);try{if(!(n&at.SkipSelf)){let e=this.records.get(t);if(void 0===e){const n=("function"==typeof(r=t)||"object"==typeof r&&r instanceof Pt)&&dt(t);e=n&&this.injectableDefInScope(n)?Oo(Lo(t),Eo):null,this.records.set(t,e)}if(null!=e)return this.hydrate(t,e)}return(n&at.Self?Ro():this.parent).get(t,e=n&at.Optional&&e===Ut?null:e)}catch(s){if("NullInjectorError"===s.name){if((s.ngTempTokenPath=s.ngTempTokenPath||[]).unshift(bt(t)),i)throw s;return function(t,e,n,i){const r=t.ngTempTokenPath;throw e[Ht]&&r.unshift(e[Ht]),t.message=function(t,e,n,i=null){t=t&&"\n"===t.charAt(0)&&"\u0275"==t.charAt(1)?t.substr(2):t;let r=bt(e);if(Array.isArray(e))r=e.map(bt).join(" -> ");else if("object"==typeof e){let t=[];for(let n in e)if(e.hasOwnProperty(n)){let i=e[n];t.push(n+":"+("string"==typeof i?JSON.stringify(i):bt(i)))}r=`{${t.join(", ")}}`}return`${n}${i?"("+i+")":""}[${r}]: ${t.replace(Vt,"\n ")}`}("\n"+t.message,r,n,i),t.ngTokenPath=r,t.ngTempTokenPath=null,t}(s,t,"R3InjectorError",this.source)}throw s}finally{Gt(i)}var r}_resolveInjectorDefTypes(){this.injectorDefTypes.forEach(t=>this.get(t))}toString(){const t=[];return this.records.forEach((e,n)=>t.push(bt(n))),`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}processInjectorType(t,e,n){if(!(t=Ct(t)))return!1;let i=pt(t);const r=null==i&&t.ngModule||void 0,s=void 0===r?t:r,o=-1!==n.indexOf(s);if(void 0!==r&&(i=pt(r)),null==i)return!1;if(null!=i.imports&&!o){let t;n.push(s);try{ne(i.imports,i=>{this.processInjectorType(i,e,n)&&(void 0===t&&(t=[]),t.push(i))})}finally{}if(void 0!==t)for(let e=0;ethis.processProvider(t,n,i||Do))}}this.injectorDefTypes.add(s),this.records.set(s,Oo(i.factory,Eo));const a=i.providers;if(null!=a&&!o){const e=t;ne(a,t=>this.processProvider(t,e,a))}return void 0!==r&&void 0!==t.providers}processProvider(t,e,n){let i=No(t=Ct(t))?t:Ct(t&&t.provide);const r=function(t,e,n){return Io(t)?Oo(void 0,t.useValue):Oo($o(t),Eo)}(t);if(No(t)||!0!==t.multi)this.records.get(i);else{let e=this.records.get(i);e||(e=Oo(void 0,Eo,!0),e.factory=()=>Jt(e.multi),this.records.set(i,e)),i=t,e.multi.push(t)}this.records.set(i,r)}hydrate(t,e){var n;return e.value===Eo&&(e.value=Ao,e.value=e.factory()),"object"==typeof e.value&&e.value&&null!==(n=e.value)&&"object"==typeof n&&"function"==typeof n.ngOnDestroy&&this.onDestroy.add(e.value),e.value}injectableDefInScope(t){return!!t.providedIn&&("string"==typeof t.providedIn?"any"===t.providedIn||t.providedIn===this.scope:this.injectorDefTypes.has(t.providedIn))}}function Lo(t){const e=dt(t),n=null!==e?e.factory:_e(t);if(null!==n)return n;const i=pt(t);if(null!==i)return i.factory;if(t instanceof Pt)throw new Error(`Token ${bt(t)} is missing a \u0275prov definition.`);if(t instanceof Function)return function(t){const e=t.length;if(e>0){const n=se(e,"?");throw new Error(`Can't resolve all parameters for ${bt(t)}: (${n.join(", ")}).`)}const n=function(t){const e=t&&(t[gt]||t[vt]);if(e){const n=function(t){if(t.hasOwnProperty("name"))return t.name;const e=(""+t).match(/^function\s*([^\s(]+)/);return null===e?"":e[1]}(t);return console.warn(`DEPRECATED: DI is instantiating a token "${n}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${n}" class.`),e}return null}(t);return null!==n?()=>n.factory(t):()=>new t}(t);throw new Error("unreachable")}function $o(t,e,n){let i;if(No(t)){const e=Ct(t);return _e(e)||Lo(e)}if(Io(t))i=()=>Ct(t.useValue);else if((r=t)&&r.useFactory)i=()=>t.useFactory(...Jt(t.deps||[]));else if(function(t){return!(!t||!t.useExisting)}(t))i=()=>Yt(Ct(t.useExisting));else{const e=Ct(t&&(t.useClass||t.provide));if(!function(t){return!!t.deps}(t))return _e(e)||Lo(e);i=()=>new e(...Jt(t.deps))}var r;return i}function Oo(t,e,n=!1){return{factory:t,value:e,multi:n?[]:void 0}}function Io(t){return null!==t&&"object"==typeof t&&jt in t}function No(t){return"function"==typeof t}const Po=function(t,e,n){return function(t,e=null,n=null,i){const r=Fo(t,e,n,i);return r._resolveInjectorDefTypes(),r}({name:n},e,t,n)};let Bo=(()=>{class t{static create(t,e){return Array.isArray(t)?Po(t,e,""):Po(t.providers,t.parent,t.name||"")}}return t.THROW_IF_NOT_FOUND=Ut,t.NULL=new Qt,t.\u0275prov=ut({token:t,providedIn:"any",factory:()=>Yt(Bt)}),t.__NG_ELEMENT_ID__=-1,t})();const Uo=new Pt("AnalyzeForEntryComponents");function Vo(t,e,n){let i=n?t.styles:null,r=n?t.classes:null,s=0;if(null!==e)for(let o=0;o=0;i--){const r=t[i];r.hostVars=e+=r.hostVars,r.hostAttrs=ni(r.hostAttrs,n=ni(n,r.hostAttrs))}}(i)}function zo(t){return t===he?{}:t===de?[]:t}function Wo(t,e){const n=t.viewQuery;t.viewQuery=n?(t,i)=>{e(t,i),n(t,i)}:e}function Go(t,e){const n=t.contentQueries;t.contentQueries=n?(t,i,r)=>{e(t,i,r),n(t,i,r)}:e}function Ko(t,e){const n=t.hostBindings;t.hostBindings=n?(t,i)=>{e(t,i),n(t,i)}:e}let qo=null;function Yo(){if(!qo){const t=Tt.Symbol;if(t&&t.iterator)qo=t.iterator;else{const t=Object.getOwnPropertyNames(Map.prototype);for(let e=0;ea(Je(t[i.index])).target:i.index;if(Ye(n)){let o=null;if(!a&&l&&(o=function(t,e,n,i){const r=t.cleanup;if(null!=r)for(let s=0;sn?t[n]:null}"string"==typeof t&&(s+=2)}return null}(t,e,r,i.index)),null!==o)(o.__ngLastListenerFn__||o).__ngNextListenerFn__=s,o.__ngLastListenerFn__=s,h=!1;else{s=wa(i,e,s,!1);const t=n.listen(f.name||p,r,s);u.push(s,t),c&&c.push(r,m,g,g+1)}}else s=wa(i,e,s,!0),p.addEventListener(r,s,o),u.push(s),c&&c.push(r,m,g,o)}const d=i.outputs;let f;if(h&&null!==d&&(f=d[r])){const t=f.length;if(t)for(let n=0;n0;)e=e[15],t--;return e}(t,un.lFrame.contextLView))[8]}(t)}function _a(t,e){let n=null;const i=function(t){const e=t.attrs;if(null!=e){const t=e.indexOf(5);if(0==(1&t))return e[t+1]}return null}(t);for(let r=0;r=0}const Ra={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Fa(t){return t.substring(Ra.key,Ra.keyEnd)}function Ma(t,e){const n=Ra.textEnd;return n===e?-1:(e=Ra.keyEnd=function(t,e,n){for(;e32;)e++;return e}(t,Ra.key=e,n),La(t,e,n))}function La(t,e,n){for(;e=0;n=Ma(e,n))oe(t,Fa(e),!0)}function Pa(t,e,n,i){const r=dn(),s=fn(),o=En(2);s.firstUpdatePass&&Va(s,t,o,i),e!==ps&&ta(r,o,e)&&za(s,s.data[Un()],r,r[11],t,r[o+1]=function(t,e){return null==t||("string"==typeof e?t+=e:"object"==typeof t&&(t=bt(Bi(t)))),t}(e,n),i,o)}function Ba(t,e,n,i){const r=fn(),s=En(2);r.firstUpdatePass&&Va(r,null,s,i);const o=dn();if(n!==ps&&ta(o,s,n)){const a=r.data[Un()];if(Ka(a,i)&&!Ua(r,s)){let t=i?a.classesWithoutHost:a.stylesWithoutHost;null!==t&&(n=wt(t,n||"")),ca(r,a,o,n,i)}else!function(t,e,n,i,r,s,o,a){r===ps&&(r=Aa);let l=0,c=0,u=0=t.expandoStartIndex}function Va(t,e,n,i){const r=t.data;if(null===r[n+1]){const s=r[Un()],o=Ua(t,n);Ka(s,i)&&null===e&&!o&&(e=!1),e=function(t,e,n,i){const r=function(t){const e=un.lFrame.currentDirectiveIndex;return-1===e?null:t[e]}(t);let s=i?e.residualClasses:e.residualStyles;if(null===r)0===(i?e.classBindings:e.styleBindings)&&(n=ja(n=Ha(null,t,e,n,i),e.attrs,i),s=null);else{const o=e.directiveStylingLast;if(-1===o||t[o]!==r)if(n=Ha(r,t,e,n,i),null===s){let n=function(t,e,n){const i=n?e.classBindings:e.styleBindings;if(0!==ws(i))return t[ys(i)]}(t,e,i);void 0!==n&&Array.isArray(n)&&(n=Ha(null,t,e,n[1],i),n=ja(n,e.attrs,i),function(t,e,n,i){t[ys(n?e.classBindings:e.styleBindings)]=i}(t,e,i,n))}else s=function(t,e,n){let i;const r=e.directiveEnd;for(let s=1+e.directiveStylingLast;s0)&&(u=!0)}else c=n;if(r)if(0!==l){const e=ys(t[a+1]);t[i+1]=vs(e,a),0!==e&&(t[e+1]=xs(t[e+1],i)),t[a+1]=131071&t[a+1]|i<<17}else t[i+1]=vs(a,0),0!==a&&(t[a+1]=xs(t[a+1],i)),a=i;else t[i+1]=vs(l,0),0===a?a=i:t[l+1]=xs(t[l+1],i),l=i;u&&(t[i+1]=bs(t[i+1])),Da(t,c,i,!0),Da(t,c,i,!1),function(t,e,n,i,r){const s=r?t.residualClasses:t.residualStyles;null!=s&&"string"==typeof e&&le(s,e)>=0&&(n[i+1]=_s(n[i+1]))}(e,c,t,i,s),o=vs(a,l),s?e.classBindings=o:e.styleBindings=o}(r,s,e,n,o,i)}}function Ha(t,e,n,i,r){let s=null;const o=n.directiveEnd;let a=n.directiveStylingLast;for(-1===a?a=n.directiveStart:a++;a0;){const e=t[r],s=Array.isArray(e),l=s?e[1]:e,c=null===l;let u=n[r+1];u===ps&&(u=c?Aa:void 0);let h=c?ae(u,i):l===i?u:void 0;if(s&&!Ga(h)&&(h=ae(e,i)),Ga(h)&&(a=h,o))return a;const d=t[r+1];r=o?ys(d):ws(d)}if(null!==e){let t=s?e.residualClasses:e.residualStyles;null!=t&&(a=ae(t,i))}return a}function Ga(t){return void 0!==t}function Ka(t,e){return 0!=(t.flags&(e?16:32))}function qa(t,e=""){const n=dn(),i=fn(),r=t+Se,s=i.firstCreatePass?ks(i,r,1,e,null):i.data[r],o=n[r]=Dr(n[11],e);Kr(i,n,o,s),yn(s,!1)}function Ya(t){return Xa("",t,""),Ya}function Xa(t,e,n){const i=dn(),r=ia(i,t,e,n);return r!==ps&&ho(i,Un(),r),Xa}function Ja(t,e,n,i,r){const s=dn(),o=function(t,e,n,i,r,s){const o=ea(t,Sn(),n,r);return En(2),o?e+$e(n)+i+$e(r)+s:ps}(s,t,e,n,i,r);return o!==ps&&ho(s,Un(),o),Ja}function Qa(t,e,n){const i=dn();return ta(i,kn(),e)&&Us(fn(),Hn(),i,t,e,i[11],n,!0),Qa}const Za=void 0;var tl=["en",[["a","p"],["AM","PM"],Za],[["AM","PM"],Za,Za],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Za,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Za,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",Za,"{1} 'at' {0}",Za],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(t){let e=Math.floor(Math.abs(t)),n=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===n?1:5}];let el={};function nl(t){const e=function(t){return t.toLowerCase().replace(/_/g,"-")}(t);let n=rl(e);if(n)return n;const i=e.split("-")[0];if(n=rl(i),n)return n;if("en"===i)return tl;throw new Error(`Missing locale data for the locale "${t}".`)}function il(t){return nl(t)[sl.PluralCase]}function rl(t){return t in el||(el[t]=Tt.ng&&Tt.ng.common&&Tt.ng.common.locales&&Tt.ng.common.locales[t]),el[t]}var sl=function(t){return t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData",t}({});const ol=["zero","one","two","few","many"],al="en-US",ll={marker:"element"},cl={marker:"ICU"};var ul=function(t){return t[t.SHIFT=2]="SHIFT",t[t.APPEND_EAGERLY=1]="APPEND_EAGERLY",t[t.COMMENT=2]="COMMENT",t}({});let hl=al;function dl(t){var e;null==(e=t)&&Nt("Expected localeId to be defined",e,null,"!="),"string"==typeof t&&(hl=t.toLowerCase().replace(/_/g,"-"))}function fl(t,e,n){const i=e.insertBeforeIndex,r=Array.isArray(i)?i[0]:i;return null===r?jr(t,0,n):Je(n[r])}function pl(t,e,n,i,r){const s=e.insertBeforeIndex;if(Array.isArray(s)){let o=i,a=null;if(3&e.type||(a=o,o=r),null!==o&&0==(2&e.flags))for(let e=1;e1)for(let n=t.length-2;n>=0;n--){const i=t[n];ml(i)||vl(i,e)&&null===yl(i)&&bl(i,e.index)}}function ml(t){return!(64&t.type)}function vl(t,e){return ml(e)||t.index>e.index}function yl(t){const e=t.insertBeforeIndex;return Array.isArray(e)?e[0]:e}function bl(t,e){const n=t.insertBeforeIndex;Array.isArray(n)?n[0]=e:(Gr(fl,pl),t.insertBeforeIndex=e)}function wl(t,e){const n=t.data[e];return null===n||"string"==typeof n?null:n.hasOwnProperty("currentCaseLViewIndex")?n:n.value}function xl(t,e,n){const i=Es(t,n,64,null,null);return gl(e,i),i}function _l(t,e){const n=e[t.currentCaseLViewIndex];return null===n?n:n<0?~n:n}let Cl=0,Sl=0;function kl(t,e,n,i){const r=n[11];let s,o=null;for(let a=0;a>>17;let u,h;if(null===o&&(o=c,s=Vr(r,i)),c===o?(u=i,h=s):(u=null,h=Je(n[c])),null!==h){const e=(131070&l)>>>1;Pr(r,h,n[e],u,!1);const i=wl(t,e);if(null!==i&&"object"==typeof i){const e=_l(i,n);null!==e&&kl(t,i.create[e],n,n[i.anchorIdx])}}break;case 1:const d=e[++a],f=e[++a];Ys(r,Qe(l>>>1,n),null,null,d,f,null);break;default:throw new Error(`Unable to determine the type of mutate operation for "${l}"`)}else switch(l){case cl:const t=e[++a],i=e[++a];null===n[i]&&wr(n[i]=Rr(r,t),n);break;case ll:const s=e[++a],o=e[++a];null===n[o]&&wr(n[o]=Fr(r,s,null),n)}}}function El(t,e,n,i,r){for(let s=0;s>>2;switch(3&s){case 1:const s=n[++o],l=n[++o],c=t.data[a];"string"==typeof c?Ys(e[11],e[a],null,c,s,r,l):Us(t,c,e,s,r,e[11],l,!1);break;case 0:const u=e[a];null!==u&&Tr(e[11],u,r);break;case 2:Dl(t,wl(t,a),e,r);break;case 3:Al(t,wl(t,a),i,e)}}}}else{const r=n[s+1];if(r>0&&3==(3&r)){const n=wl(t,r>>>2);e[n.currentCaseLViewIndex]<0&&Al(t,n,i,e)}}s+=a}}function Al(t,e,n,i){let r=i[e.currentCaseLViewIndex];if(null!==r){let s=Cl;r<0&&(r=i[e.currentCaseLViewIndex]=~r,s=-1),El(t,i,e.update[r],n,s)}}function Dl(t,e,n,i){const r=function(t,e){let n=t.cases.indexOf(e);if(-1===n)switch(t.type){case 1:{const i=function(t,e){const n=il(e)(parseInt(t,10)),i=ol[n];return void 0!==i?i:"other"}(e,hl);n=t.cases.indexOf(i),-1===n&&"other"!==i&&(n=t.cases.indexOf("other"));break}case 0:n=t.cases.indexOf("other")}return-1===n?null:n}(e,i);if(_l(e,n)!==r&&(Tl(t,e,n),n[e.currentCaseLViewIndex]=null===r?null:~r,null!==r)){const i=n[e.anchorIdx];i&&kl(t,e.create[r],n,i)}}function Tl(t,e,n){let i=_l(e,n);if(null!==i){const r=e.remove[i];for(let e=0;e0){const t=Qe(i,n);null!==t&&Xr(n[11],t)}else Tl(t,wl(t,~i),n)}}}const Rl=/\ufffd(\d+):?\d*\ufffd/gi,Fl=/\ufffd(\d+)\ufffd/,Ml=/^\s*(\ufffd\d+:?\d*\ufffd)\s*,\s*(select|plural)\s*,/,Ll=/\ufffd\/?\*(\d+:\d+)\ufffd/gi,$l=/\ufffd(\/?[#*]\d+):?\d*\ufffd/gi,Ol=/\uE500/g;function Il(t,e,n,i,r,s,o){const a=As(t,i,1,null);let l=a<0?e[o]:(t.push(i,n),r(e[1].data[~o],e),s())}return 0===t.length?null:(n=t.pop(),i=t.pop(),s())}return function(n,i){for(e=i;t.length;)t.pop();return r(n.value,i),s}}())),r.push(l,null===s?"":s);const u=Es(t,a,o?32:1,null===s?"":s,null);gl(n,u);const h=u.index;return yn(u,!1),null!==c&&e!==c&&function(t,e){let n=t.insertBeforeIndex;var i;null===n?(Gr(fl,pl),n=t.insertBeforeIndex=[null,e]):("Expecting array here",(i=Array.isArray(n))!=!0&&Nt("Expecting array here",i,true,"=="),n.push(e))}(c,h),u}function Nl(t,e,n,i,r,s,o){const a=o.match(Rl),l=Il(t,e,n,s,i,a?null:o,!1);a&&Pl(r,o,l.index)}function Pl(t,e,n,i,r=null){const s=t.length,o=s+1;t.push(null,null);const a=s+2,l=e.split(Rl);let c=0;for(let u=0;un.length&&n.push(r)}return{type:i,mainBinding:r,cases:e,values:n}}function jl(t){if(!t)return[];let e=0;const n=[],i=[],r=/[{}]/g;let s;for(r.lastIndex=0;s=r.exec(t);){const r=s.index;if("}"==s[0]){if(n.pop(),0==n.length){const n=t.substring(e,r);Ml.test(n)?i.push(Hl(n)):i.push(n),e=r+1}}else{if(0==n.length){const n=t.substring(e,r);i.push(n),e=r+1}n.push("{")}}const o=t.substring(e);return i.push(o),i}function zl(t,e,n,i,r,s,o,a){const l=[],c=[],u=[];e.cases.push(s),e.create.push(l),e.remove.push(c),e.update.push(u);const h=Wi(qe()).getInertBodyElement(o),d=gr(h)||h;return d?Wl(t,e,n,i,l,c,u,d,r,a,0):0}function Wl(t,e,n,i,r,s,o,a,l,c,u){let h=0,d=a.firstChild;for(;d;){const a=As(t,n,1,null);switch(d.nodeType){case Node.ELEMENT_NODE:const f=d,p=f.tagName.toLowerCase();if(rr.hasOwnProperty(p)){ql(r,ll,p,l,a),t.data[a]=p;const g=f.attributes;for(let t=0;t>>ul.SHIFT;let h=t[u];null===h&&(h=t[u]=l?r.createComment(a):Dr(r,a)),c&&null!==n&&Pr(r,n,h,i,!1)}}(r,l.create,c,a&&8&a.type?r[a.index]:null),An(!0)})(t,e,n),An(!1)}function Jl(t){return ta(dn(),kn(),t)&&(Cl|=1<0){const i=t.data[n];El(t,e,Array.isArray(i)?i:i.update,Sn()-Sl-1,Cl)}Cl=0,Sl=0}(fn(),dn(),t+Se)}function Zl(t,e,n,i,r){if(t=Ct(t),Array.isArray(t))for(let s=0;s>20;if(No(t)||!t.multi){const i=new Qn(l,r,oa),f=nc(a,e,r?u:u+d,h);-1===f?(pi(ui(c,o),s,a),tc(s,t,e.length),e.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),n.push(i),o.push(i)):(n[f]=i,o[f]=i)}else{const f=nc(a,e,u+d,h),p=nc(a,e,u,u+d),g=f>=0&&n[f],m=p>=0&&n[p];if(r&&!m||!r&&!g){pi(ui(c,o),s,a);const u=function(t,e,n,i,r){const s=new Qn(t,n,oa);return s.multi=[],s.index=e,s.componentProviders=0,ec(s,r,i&&!n),s}(r?rc:ic,n.length,r,i,l);!r&&m&&(n[p].providerFactory=u),tc(s,t,e.length,0),e.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),n.push(u),o.push(u)}else tc(s,t,f>-1?f:p,ec(n[r?p:f],l,!r&&i));!r&&i&&m&&n[p].componentProviders++}}}function tc(t,e,n,i){const r=No(e);if(r||e.useClass){const s=(e.useClass||e).prototype.ngOnDestroy;if(s){const o=t.destroyHooks||(t.destroyHooks=[]);if(!r&&e.multi){const t=o.indexOf(n);-1===t?o.push(n,[i,s]):o[t+1].push(i,s)}else o.push(n,s)}}}function ec(t,e,n){return n&&t.componentProviders++,t.multi.push(e)-1}function nc(t,e,n,i){for(let r=n;r{n.providersResolver=(n,i)=>function(t,e,n){const i=fn();if(i.firstCreatePass){const r=Fe(t);Zl(n,i.data,i.blueprint,r,!0),Zl(e,i.data,i.blueprint,r,!1)}}(n,i?i(t):t,e)}}class ac{}class lc{resolveComponentFactory(t){throw function(t){const e=Error(`No component factory found for ${bt(t)}. Did you add it to @NgModule.entryComponents?`);return e.ngComponent=t,e}(t)}}let cc=(()=>{class t{}return t.NULL=new lc,t})(),uc=(()=>{class t{constructor(t){this.nativeElement=t}}return t.__NG_ELEMENT_ID__=()=>hc(t),t})();const hc=function(t){return bo(t,gn(),dn())};class dc{}var fc=function(t){return t[t.Important=1]="Important",t[t.DashCase=2]="DashCase",t}({});let pc=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>gc(),t})();const gc=function(){const t=dn(),e=nn(gn().index,t);return function(t){const e=t[11];if(Ye(e))return e;throw new Error("Cannot inject Renderer2 when the application uses Renderer3!")}(Ee(e)?e:t)};let mc=(()=>{class t{}return t.\u0275prov=ut({token:t,providedIn:"root",factory:()=>null}),t})();class vc{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const yc=new vc("11.0.0");class bc{constructor(){}supports(t){return Jo(t)}create(t){return new xc(t)}}const wc=(t,e)=>e;class xc{constructor(t){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||wc}forEachItem(t){let e;for(e=this._itHead;null!==e;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,n=this._removalsHead,i=0,r=null;for(;e||n;){const s=!n||e&&e.currentIndex{i=this._trackByFn(e,t),null!==r&&Object.is(r.trackById,i)?(s&&(r=this._verifyReinsertion(r,t,i,e)),Object.is(r.item,t)||this._addIdentityChange(r,t)):(r=this._mismatch(r,t,i,e),s=!0),r=r._next,e++}),this.length=e;return this._truncate(r),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,e,n,i){let r;return null===t?r=this._itTail:(r=t._prev,this._remove(t)),null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(n,i))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,r,i)):null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,r,i)):t=this._addAfter(new _c(e,n),r,i),t}_verifyReinsertion(t,e,n,i){let r=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==r?t=this._reinsertAfter(r,t._prev,i):t.currentIndex!=i&&(t.currentIndex=i,this._addToMoves(t,i)),t}_truncate(t){for(;null!==t;){const e=t._next;this._addToRemovals(this._unlink(t)),t=e}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(t,e,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const i=t._prevRemoved,r=t._nextRemoved;return null===i?this._removalsHead=r:i._nextRemoved=r,null===r?this._removalsTail=i:r._prevRemoved=i,this._insertAfter(t,e,n),this._addToMoves(t,n),t}_moveAfter(t,e,n){return this._unlink(t),this._insertAfter(t,e,n),this._addToMoves(t,n),t}_addAfter(t,e,n){return this._insertAfter(t,e,n),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,e,n){const i=null===e?this._itHead:e._next;return t._next=i,t._prev=e,null===i?this._itTail=t:i._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new Sc),this._linkedRecords.put(t),t.currentIndex=n,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const e=t._prev,n=t._next;return null===e?this._itHead=n:e._next=n,null===n?this._itTail=e:n._prev=e,t}_addToMoves(t,e){return t.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new Sc),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,e){return t.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}}class _c{constructor(t,e){this.item=t,this.trackById=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class Cc{constructor(){this._head=null,this._tail=null}add(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,e){let n;for(n=this._head;null!==n;n=n._nextDup)if((null===e||e<=n.currentIndex)&&Object.is(n.trackById,t))return n;return null}remove(t){const e=t._prevDup,n=t._nextDup;return null===e?this._head=n:e._nextDup=n,null===n?this._tail=e:n._prevDup=e,null===this._head}}class Sc{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new Cc,this.map.set(e,n)),n.add(t)}get(t,e){const n=this.map.get(t);return n?n.get(t,e):null}remove(t){const e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function kc(t,e,n){const i=t.previousIndex;if(null===i)return i;let r=0;return n&&i{if(e&&e.key===n)this._maybeAddToChanges(e,t),this._appendAfter=e,e=e._next;else{const i=this._getOrCreateRecordForKey(n,t);e=this._insertBeforeOrAppend(e,i)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let t=e;null!==t;t=t._nextRemoved)t===this._mapHead&&(this._mapHead=null),this._records.delete(t.key),t._nextRemoved=t._next,t.previousValue=t.currentValue,t.currentValue=null,t._prev=null,t._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,e){if(t){const n=t._prev;return e._next=t,e._prev=n,t._prev=e,n&&(n._next=e),t===this._mapHead&&(this._mapHead=e),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(t,e){if(this._records.has(t)){const n=this._records.get(t);this._maybeAddToChanges(n,e);const i=n._prev,r=n._next;return i&&(i._next=r),r&&(r._prev=i),n._next=null,n._prev=null,n}const n=new Dc(t);return this._records.set(t,n),n.currentValue=e,this._addToAdditions(n),n}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,e){Object.is(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))}_addToAdditions(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(n=>e(t[n],n))}}class Dc{constructor(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}let Tc=(()=>{class t{constructor(t){this.factories=t}static create(e,n){if(null!=n){const t=n.factories.slice();e=e.concat(t)}return new t(e)}static extend(e){return{provide:t,useFactory:n=>{if(!n)throw new Error("Cannot extend IterableDiffers without a parent injector");return t.create(e,n)},deps:[[t,new st,new it]]}}find(t){const e=this.factories.find(e=>e.supports(t));if(null!=e)return e;throw new Error(`Cannot find a differ supporting object '${t}' of type '${n=t,n.name||typeof n}'`);var n}}return t.\u0275prov=ut({token:t,providedIn:"root",factory:()=>new t([new bc])}),t})(),Rc=(()=>{class t{constructor(t){this.factories=t}static create(e,n){if(n){const t=n.factories.slice();e=e.concat(t)}return new t(e)}static extend(e){return{provide:t,useFactory:n=>{if(!n)throw new Error("Cannot extend KeyValueDiffers without a parent injector");return t.create(e,n)},deps:[[t,new st,new it]]}}find(t){const e=this.factories.find(e=>e.supports(t));if(e)return e;throw new Error(`Cannot find a differ supporting object '${t}'`)}}return t.\u0275prov=ut({token:t,providedIn:"root",factory:()=>new t([new Ec])}),t})();const Fc=[new Ec],Mc=new Tc([new bc]),Lc=new Rc(Fc);let $c=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>Oc(t,uc),t})();const Oc=function(t,e){return wo(t,e,gn(),dn())};let Ic=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>Nc(t,uc),t})();const Nc=function(t,e){return xo(t,e,gn(),dn())},Pc={};class Bc extends cc{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=xe(t);return new Hc(e,this.ngModule)}}function Uc(t){const e=[];for(let n in t)t.hasOwnProperty(n)&&e.push({propName:t[n],templateName:n});return e}const Vc=new Pt("SCHEDULER_TOKEN",{providedIn:"root",factory:()=>Ie});class Hc extends ac{constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=t.selectors.map(fs).join(","),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}get inputs(){return Uc(this.componentDef.inputs)}get outputs(){return Uc(this.componentDef.outputs)}create(t,e,n,i){const r=(i=i||this.ngModule)?function(t,e){return{get:(n,i,r)=>{const s=t.get(n,Pc,r);return s!==Pc||i===Pc?s:e.get(n,i,r)}}}(t,i.injector):t,s=r.get(dc,Xe),o=r.get(mc,null),a=s.createRenderer(null,this.componentDef),l=this.componentDef.selectors[0][0]||"div",c=n?function(t,e,n){if(Ye(t))return t.selectRootElement(e,n===ue.ShadowDom);let i="string"==typeof e?t.querySelector(e):e;return i.textContent="",i}(a,n,this.componentDef.encapsulation):Fr(s.createRenderer(null,this.componentDef),l,function(t){const e=t.toLowerCase();return"svg"===e?Ge:"math"===e?"http://www.w3.org/1998/MathML/":null}(l)),u=this.componentDef.onPush?576:528,h={components:[],scheduler:Ie,clean:ao,playerHandler:null,flags:0},d=Is(0,null,null,1,0,null,null,null,null,null),f=Ss(null,d,h,u,null,null,s,a,o,r);let p,g;$n(f);try{const t=function(t,e,n,i,r,s){const o=n[1];n[20]=t;const a=ks(o,20,2,"#host",null),l=a.mergedAttrs=e.hostAttrs;null!==l&&(Vo(a,l,!0),null!==t&&(Zn(r,t,l),null!==a.classes&&es(r,t,a.classes),null!==a.styles&&ts(r,t,a.styles)));const c=i.createRenderer(t,e),u=Ss(n,Os(e),null,e.onPush?64:16,n[20],a,i,c,null,null);return o.firstCreatePass&&(pi(ui(a,n),o,e.type),zs(o,a),Gs(a,n.length,1)),no(n,u),n[20]=u}(c,this.componentDef,f,s,a);if(c)if(n)Zn(a,c,["ng-version",yc.full]);else{const{attrs:t,classes:e}=function(t){const e=[],n=[];let i=1,r=2;for(;i0&&es(a,c,e.join(" "))}if(g=tn(d,Se),void 0!==e){const t=g.projection=[];for(let n=0;nt(o,e)),e.contentQueries){const t=gn();e.contentQueries(1,o,t.directiveStart)}const a=gn();return!s.firstCreatePass||null===e.hostBindings&&null===e.hostAttrs||(Vn(a.index),Hs(n[1],a,0,a.directiveStart,a.directiveEnd,e),js(e,o)),o}(t,this.componentDef,f,h,[Ho]),Ds(d,f,null)}finally{Bn()}return new jc(this.componentType,p,bo(uc,g,f),f,g)}}class jc extends class{}{constructor(t,e,n,i,r){super(),this.location=n,this._rootLView=i,this._tNode=r,this.destroyCbs=[],this.instance=e,this.hostView=this.changeDetectorRef=new po(i),this.componentType=t}get injector(){return new Si(this._tNode,this._rootLView)}destroy(){this.destroyCbs&&(this.destroyCbs.forEach(t=>t()),this.destroyCbs=null,!this.hostView.destroyed&&this.hostView.destroy())}onDestroy(t){this.destroyCbs&&this.destroyCbs.push(t)}}const zc=new Map;class Wc extends Zt{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.injector=this,this.destroyCbs=[],this.componentFactoryResolver=new Bc(this);const n=Ce(t),i=t[$t]||null;i&&dl(i),this._bootstrapComponents=Pe(n.bootstrap),this._r3Injector=Fo(t,e,[{provide:Zt,useValue:this},{provide:cc,useValue:this.componentFactoryResolver}],bt(t)),this._r3Injector._resolveInjectorDefTypes(),this.instance=this.get(t)}get(t,e=Bo.THROW_IF_NOT_FOUND,n=at.Default){return t===Bo||t===Zt||t===Bt?this:this._r3Injector.get(t,e,n)}destroy(){const t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}}class Gc extends te{constructor(t){super(),this.moduleType=t,null!==Ce(t)&&function(t){const e=new Set;!function t(n){const i=Ce(n,!0),r=i.id;null!==r&&(function(t,e,n){if(e&&e!==n)throw new Error(`Duplicate module registered for ${t} - ${bt(e)} vs ${bt(e.name)}`)}(r,zc.get(r),n),zc.set(r,n));const s=Pe(i.imports);for(const o of s)e.has(o)||(e.add(o),t(o))}(t)}(t)}create(t){return new Wc(this.moduleType,t)}}function Kc(t,e,n){const i=Cn()+t,r=dn();return r[i]===ps?Zo(r,i,n?e.call(n):e()):function(t,e){return t[e]}(r,i)}function qc(t,e,n,i){return Qc(dn(),Cn(),t,e,n,i)}function Yc(t,e,n,i,r){return function(t,e,n,i,r,s,o){const a=e+n;return ea(t,a,r,s)?Zo(t,a+2,o?i.call(o,r,s):i(r,s)):Jc(t,a+2)}(dn(),Cn(),t,e,n,i,r)}function Xc(t,e,n,i,r,s){return function(t,e,n,i,r,s,o,a){const l=e+n;return function(t,e,n,i,r){const s=ea(t,e,n,i);return ta(t,e+2,r)||s}(t,l,r,s,o)?Zo(t,l+3,a?i.call(a,r,s,o):i(r,s,o)):Jc(t,l+3)}(dn(),Cn(),t,e,n,i,r,s)}function Jc(t,e){const n=t[e];return n===ps?void 0:n}function Qc(t,e,n,i,r,s){const o=e+n;return ta(t,o,r)?Zo(t,o+1,s?i.call(s,r):i(r)):Jc(t,o+1)}const Zc=class extends C{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,e,n){let i,r=t=>null,s=()=>null;t&&"object"==typeof t?(i=this.__isAsync?e=>{setTimeout(()=>t.next(e))}:e=>{t.next(e)},t.error&&(r=this.__isAsync?e=>{setTimeout(()=>t.error(e))}:e=>{t.error(e)}),t.complete&&(s=this.__isAsync?()=>{setTimeout(()=>t.complete())}:()=>{t.complete()})):(i=this.__isAsync?e=>{setTimeout(()=>t(e))}:e=>{t(e)},e&&(r=this.__isAsync?t=>{setTimeout(()=>e(t))}:t=>{e(t)}),n&&(s=this.__isAsync?()=>{setTimeout(()=>n())}:()=>{n()}));const o=super.subscribe(i,r,s);return t instanceof h&&t.add(o),o}};function tu(){return this._results[Yo()]()}class eu{constructor(){this.dirty=!0,this._results=[],this.changes=new Zc,this.length=0;const t=Yo(),e=eu.prototype;e[t]||(e[t]=tu)}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,e){return this._results.reduce(t,e)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t){this._results=ee(t),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]}notifyOnChanges(){this.changes.emit(this)}setDirty(){this.dirty=!0}destroy(){this.changes.complete(),this.changes.unsubscribe()}}class nu{constructor(t){this.queryList=t,this.matches=null}clone(){return new nu(this.queryList)}setDirty(){this.queryList.setDirty()}}class iu{constructor(t=[]){this.queries=t}createEmbeddedView(t){const e=t.queries;if(null!==e){const n=null!==t.contentQueries?t.contentQueries[0]:e.length,i=[];for(let t=0;t0)i.push(o[t/2]);else{const r=s[t+1],o=e[-n];for(let t=ke;t{class t{constructor(t){this.appInits=t,this.initialized=!1,this.done=!1,this.donePromise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}runInitializers(){if(this.initialized)return;const t=[],e=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let n=0;n{e()}).catch(t=>{this.reject(t)}),0===t.length&&e(),this.initialized=!0}}return t.\u0275fac=function(e){return new(e||t)(Yt(_u,8))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();const Su=new Pt("AppId"),ku={provide:Su,useFactory:function(){return`${Eu()}${Eu()}${Eu()}`},deps:[]};function Eu(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const Au=new Pt("Platform Initializer"),Du=new Pt("Platform ID"),Tu=new Pt("appBootstrapListener");let Ru=(()=>{class t{log(t){console.log(t)}warn(t){console.warn(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();const Fu=new Pt("LocaleId"),Mu=new Pt("DefaultCurrencyCode");class Lu{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}const $u=function(t){return new Gc(t)},Ou=$u,Iu=function(t){return Promise.resolve($u(t))},Nu=function(t){const e=$u(t),n=Pe(Ce(t).declarations).reduce((t,e)=>{const n=xe(e);return n&&t.push(new Hc(n)),t},[]);return new Lu(e,n)},Pu=Nu,Bu=function(t){return Promise.resolve(Nu(t))};let Uu=(()=>{class t{constructor(){this.compileModuleSync=Ou,this.compileModuleAsync=Iu,this.compileModuleAndAllComponentsSync=Pu,this.compileModuleAndAllComponentsAsync=Bu}clearCache(){}clearCacheFor(t){}getModuleId(t){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();const Vu=(()=>Promise.resolve(0))();function Hu(t){"undefined"==typeof Zone?Vu.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class ju{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Zc(!1),this.onMicrotaskEmpty=new Zc(!1),this.onStable=new Zc(!1),this.onError=new Zc(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched();const n=this;n._nesting=0,n._outer=n._inner=Zone.current,Zone.wtfZoneSpec&&(n._inner=n._inner.fork(Zone.wtfZoneSpec)),Zone.TaskTrackingZoneSpec&&(n._inner=n._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(n._inner=n._inner.fork(Zone.longStackTraceZoneSpec)),n.shouldCoalesceEventChangeDetection=e,n.lastRequestAnimationFrameId=-1,n.nativeRequestAnimationFrame=function(){let t=Tt.requestAnimationFrame,e=Tt.cancelAnimationFrame;if("undefined"!=typeof Zone&&t&&e){const n=t[Zone.__symbol__("OriginalDelegate")];n&&(t=n);const i=e[Zone.__symbol__("OriginalDelegate")];i&&(e=i)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function(t){const e=!!t.shouldCoalesceEventChangeDetection&&t.nativeRequestAnimationFrame&&(()=>{!function(t){-1===t.lastRequestAnimationFrameId&&(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(Tt,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,Ku(t),Gu(t)},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),Ku(t))}(t)});t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0,maybeDelayChangeDetection:e},onInvokeTask:(n,i,r,s,o,a)=>{try{return qu(t),n.invokeTask(r,s,o,a)}finally{e&&"eventTask"===s.type&&e(),Yu(t)}},onInvoke:(e,n,i,r,s,o,a)=>{try{return qu(t),e.invoke(i,r,s,o,a)}finally{Yu(t)}},onHasTask:(e,n,i,r)=>{e.hasTask(i,r),n===i&&("microTask"==r.change?(t._hasPendingMicrotasks=r.microTask,Ku(t),Gu(t)):"macroTask"==r.change&&(t.hasPendingMacrotasks=r.macroTask))},onHandleError:(e,n,i,r)=>(e.handleError(i,r),t.runOutsideAngular(()=>t.onError.emit(r)),!1)})}(n)}static isInAngularZone(){return!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!ju.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(ju.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(t,e,n){return this._inner.run(t,e,n)}runTask(t,e,n,i){const r=this._inner,s=r.scheduleEventTask("NgZoneEvent: "+i,t,Wu,zu,zu);try{return r.runTask(s,e,n)}finally{r.cancelTask(s)}}runGuarded(t,e,n){return this._inner.runGuarded(t,e,n)}runOutsideAngular(t){return this._outer.run(t)}}function zu(){}const Wu={};function Gu(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function Ku(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||t.shouldCoalesceEventChangeDetection&&-1!==t.lastRequestAnimationFrameId)}function qu(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function Yu(t){t._nesting--,Gu(t)}class Xu{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Zc,this.onMicrotaskEmpty=new Zc,this.onStable=new Zc,this.onError=new Zc}run(t,e,n){return t.apply(e,n)}runGuarded(t,e,n){return t.apply(e,n)}runOutsideAngular(t){return t()}runTask(t,e,n,i){return t.apply(e,n)}}let Ju=(()=>{class t{constructor(t){this._ngZone=t,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),t.run(()=>{this.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{ju.assertNotInAngularZone(),Hu(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())Hu(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(this._didWork)}this._didWork=!1});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(e=>!e.updateCb||!e.updateCb(t)||(clearTimeout(e.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,e,n){let i=-1;e&&e>0&&(i=setTimeout(()=>{this._callbacks=this._callbacks.filter(t=>t.timeoutId!==i),t(this._didWork,this.getPendingTasks())},e)),this._callbacks.push({doneCb:t,timeoutId:i,updateCb:n})}whenStable(t,e,n){if(n&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(t,e,n),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(t,e,n){return[]}}return t.\u0275fac=function(e){return new(e||t)(Yt(ju))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),Qu=(()=>{class t{constructor(){this._applications=new Map,eh.addToWindow(this)}registerApplication(t,e){this._applications.set(t,e)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,e=!0){return eh.findTestabilityInTree(this,t,e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();class Zu{addToWindow(t){}findTestabilityInTree(t,e,n){return null}}let th,eh=new Zu;const nh=new Pt("AllowMultipleToken");class ih{constructor(t,e){this.name=t,this.token=e}}function rh(t,e,n=[]){const i=`Platform: ${e}`,r=new Pt(i);return(e=[])=>{let s=sh();if(!s||s.injector.get(nh,!1))if(t)t(n.concat(e).concat({provide:r,useValue:!0}));else{const t=n.concat(e).concat({provide:r,useValue:!0},{provide:ko,useValue:"platform"});!function(t){if(th&&!th.destroyed&&!th.injector.get(nh,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");th=t.get(oh);const e=t.get(Au,null);e&&e.forEach(t=>t())}(Bo.create({providers:t,name:i}))}return function(t){const e=sh();if(!e)throw new Error("No platform exists!");if(!e.injector.get(t,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return e}(r)}}function sh(){return th&&!th.destroyed?th:null}let oh=(()=>{class t{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,e){const n=function(t,e){let n;return n="noop"===t?new Xu:("zone.js"===t?void 0:t)||new ju({enableLongStackTrace:zi(),shouldCoalesceEventChangeDetection:e}),n}(e?e.ngZone:void 0,e&&e.ngZoneEventCoalescing||!1),i=[{provide:ju,useValue:n}];return n.run(()=>{const e=Bo.create({providers:i,parent:this.injector,name:t.moduleType.name}),r=t.create(e),s=r.injector.get(Ri,null);if(!s)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return r.onDestroy(()=>ch(this._modules,r)),n.runOutsideAngular(()=>n.onError.subscribe({next:t=>{s.handleError(t)}})),function(t,e,n){try{const i=n();return ma(i)?i.catch(n=>{throw e.runOutsideAngular(()=>t.handleError(n)),n}):i}catch(i){throw e.runOutsideAngular(()=>t.handleError(i)),i}}(s,n,()=>{const t=r.injector.get(Cu);return t.runInitializers(),t.donePromise.then(()=>(dl(r.injector.get(Fu,al)||al),this._moduleDoBootstrap(r),r))})})}bootstrapModule(t,e=[]){const n=ah({},e);return function(t,e,n){const i=new Gc(n);return Promise.resolve(i)}(0,0,t).then(t=>this.bootstrapModuleFactory(t,n))}_moduleDoBootstrap(t){const e=t.injector.get(lh);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(t=>e.bootstrap(t));else{if(!t.instance.ngDoBootstrap)throw new Error(`The module ${bt(t.instance.constructor)} was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.`);t.instance.ngDoBootstrap(e)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(t=>t.destroy()),this._destroyListeners.forEach(t=>t()),this._destroyed=!0}get destroyed(){return this._destroyed}}return t.\u0275fac=function(e){return new(e||t)(Yt(Bo))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();function ah(t,e){return Array.isArray(e)?e.reduce(ah,t):Object.assign(Object.assign({},t),e)}let lh=(()=>{class t{constructor(t,e,n,i,r,s){this._zone=t,this._console=e,this._injector=n,this._exceptionHandler=i,this._componentFactoryResolver=r,this._initStatus=s,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=zi(),this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const o=new y(t=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{t.next(this._stable),t.complete()})}),a=new y(t=>{let e;this._zone.runOutsideAngular(()=>{e=this._zone.onStable.subscribe(()=>{ju.assertNotInAngularZone(),Hu(()=>{this._stable||this._zone.hasPendingMacrotasks||this._zone.hasPendingMicrotasks||(this._stable=!0,t.next(!0))})})});const n=this._zone.onUnstable.subscribe(()=>{ju.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{t.next(!1)}))});return()=>{e.unsubscribe(),n.unsubscribe()}});this.isStable=W(o,a.pipe(t=>{return G()((e=Q,function(t){let n;n="function"==typeof e?e:function(){return e};const i=Object.create(t,X);return i.source=t,i.subjectFactory=n,i})(t));var e}))}bootstrap(t,e){if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");let n;n=t instanceof ac?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(n.componentType);const i=n.isBoundToModule?void 0:this._injector.get(Zt),r=n.create(Bo.NULL,[],e||n.selector,i);r.onDestroy(()=>{this._unloadComponent(r)});const s=r.injector.get(Ju,null);return s&&r.injector.get(Qu).registerApplication(r.location.nativeElement,s),this._loadComponent(r),zi()&&this._console.log("Angular is running in development mode. Call enableProdMode() to enable production mode."),r}tick(){if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;for(let t of this._views)t.detectChanges();if(this._enforceNoNewChanges)for(let t of this._views)t.checkNoChanges()}catch(t){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(t))}finally{this._runningTick=!1}}attachView(t){const e=t;this._views.push(e),e.attachToAppRef(this)}detachView(t){const e=t;ch(this._views,e),e.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(Tu,[]).concat(this._bootstrapListeners).forEach(e=>e(t))}_unloadComponent(t){this.detachView(t.hostView),ch(this.components,t)}ngOnDestroy(){this._views.slice().forEach(t=>t.destroy())}get viewCount(){return this._views.length}}return t.\u0275fac=function(e){return new(e||t)(Yt(ju),Yt(Ru),Yt(Bo),Yt(Ri),Yt(cc),Yt(Cu))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();function ch(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class uh{}class hh{}const dh={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"};let fh=(()=>{class t{constructor(t,e){this._compiler=t,this._config=e||dh}load(t){return this.loadAndCompile(t)}loadAndCompile(t){let[e,i]=t.split("#");return void 0===i&&(i="default"),n("zn8P")(e).then(t=>t[i]).then(t=>ph(t,e,i)).then(t=>this._compiler.compileModuleAsync(t))}loadFactory(t){let[e,i]=t.split("#"),r="NgFactory";return void 0===i&&(i="default",r=""),n("zn8P")(this._config.factoryPathPrefix+e+this._config.factoryPathSuffix).then(t=>t[i+r]).then(t=>ph(t,e,i))}}return t.\u0275fac=function(e){return new(e||t)(Yt(Uu),Yt(hh,8))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();function ph(t,e,n){if(!t)throw new Error(`Cannot find '${n}' in '${e}'`);return t}const gh=rh(null,"core",[{provide:Du,useValue:"unknown"},{provide:oh,deps:[Bo]},{provide:Qu,deps:[]},{provide:Ru,deps:[]}]),mh=[{provide:lh,useClass:lh,deps:[ju,Ru,Bo,Ri,cc,Cu]},{provide:Vc,deps:[ju],useFactory:function(t){let e=[];return t.onStable.subscribe(()=>{for(;e.length;)e.pop()()}),function(t){e.push(t)}}},{provide:Cu,useClass:Cu,deps:[[new it,_u]]},{provide:Uu,useClass:Uu,deps:[]},ku,{provide:Tc,useFactory:function(){return Mc},deps:[]},{provide:Rc,useFactory:function(){return Lc},deps:[]},{provide:Fu,useFactory:function(t){return dl(t=t||"undefined"!=typeof $localize&&$localize.locale||al),t},deps:[[new nt(Fu),new it,new st]]},{provide:Mu,useValue:"USD"}];let vh=(()=>{class t{constructor(t){}}return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)(Yt(lh))},providers:mh}),t})(),yh=null;function bh(){return yh}const wh=new Pt("DocumentToken");let xh=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:_h,token:t,providedIn:"platform"}),t})();function _h(){return Yt(Sh)}const Ch=new Pt("Location Initialized");let Sh=(()=>{class t extends xh{constructor(t){super(),this._doc=t,this._init()}_init(){this.location=bh().getLocation(),this._history=bh().getHistory()}getBaseHrefFromDOM(){return bh().getBaseHref(this._doc)}onPopState(t){bh().getGlobalEventTarget(this._doc,"window").addEventListener("popstate",t,!1)}onHashChange(t){bh().getGlobalEventTarget(this._doc,"window").addEventListener("hashchange",t,!1)}get href(){return this.location.href}get protocol(){return this.location.protocol}get hostname(){return this.location.hostname}get port(){return this.location.port}get pathname(){return this.location.pathname}get search(){return this.location.search}get hash(){return this.location.hash}set pathname(t){this.location.pathname=t}pushState(t,e,n){kh()?this._history.pushState(t,e,n):this.location.hash=n}replaceState(t,e,n){kh()?this._history.replaceState(t,e,n):this.location.hash=n}forward(){this._history.forward()}back(){this._history.back()}getState(){return this._history.state}}return t.\u0275fac=function(e){return new(e||t)(Yt(wh))},t.\u0275prov=ut({factory:Eh,token:t,providedIn:"platform"}),t})();function kh(){return!!window.history.pushState}function Eh(){return new Sh(Yt(wh))}function Ah(t,e){if(0==t.length)return e;if(0==e.length)return t;let n=0;return t.endsWith("/")&&n++,e.startsWith("/")&&n++,2==n?t+e.substring(1):1==n?t+e:t+"/"+e}function Dh(t){const e=t.match(/#|\?|$/),n=e&&e.index||t.length;return t.slice(0,n-("/"===t[n-1]?1:0))+t.slice(n)}function Th(t){return t&&"?"!==t[0]?"?"+t:t}let Rh=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:Fh,token:t,providedIn:"root"}),t})();function Fh(t){const e=Yt(wh).location;return new Lh(Yt(xh),e&&e.origin||"")}const Mh=new Pt("appBaseHref");let Lh=(()=>{class t extends Rh{constructor(t,e){if(super(),this._platformLocation=t,null==e&&(e=this._platformLocation.getBaseHrefFromDOM()),null==e)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");this._baseHref=e}onPopState(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)}getBaseHref(){return this._baseHref}prepareExternalUrl(t){return Ah(this._baseHref,t)}path(t=!1){const e=this._platformLocation.pathname+Th(this._platformLocation.search),n=this._platformLocation.hash;return n&&t?`${e}${n}`:e}pushState(t,e,n,i){const r=this.prepareExternalUrl(n+Th(i));this._platformLocation.pushState(t,e,r)}replaceState(t,e,n,i){const r=this.prepareExternalUrl(n+Th(i));this._platformLocation.replaceState(t,e,r)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}}return t.\u0275fac=function(e){return new(e||t)(Yt(xh),Yt(Mh,8))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),$h=(()=>{class t extends Rh{constructor(t,e){super(),this._platformLocation=t,this._baseHref="",null!=e&&(this._baseHref=e)}onPopState(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)}getBaseHref(){return this._baseHref}path(t=!1){let e=this._platformLocation.hash;return null==e&&(e="#"),e.length>0?e.substring(1):e}prepareExternalUrl(t){const e=Ah(this._baseHref,t);return e.length>0?"#"+e:e}pushState(t,e,n,i){let r=this.prepareExternalUrl(n+Th(i));0==r.length&&(r=this._platformLocation.pathname),this._platformLocation.pushState(t,e,r)}replaceState(t,e,n,i){let r=this.prepareExternalUrl(n+Th(i));0==r.length&&(r=this._platformLocation.pathname),this._platformLocation.replaceState(t,e,r)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}}return t.\u0275fac=function(e){return new(e||t)(Yt(xh),Yt(Mh,8))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),Oh=(()=>{class t{constructor(t,e){this._subject=new Zc,this._urlChangeListeners=[],this._platformStrategy=t;const n=this._platformStrategy.getBaseHref();this._platformLocation=e,this._baseHref=Dh(Nh(n)),this._platformStrategy.onPopState(t=>{this._subject.emit({url:this.path(!0),pop:!0,state:t.state,type:t.type})})}path(t=!1){return this.normalize(this._platformStrategy.path(t))}getState(){return this._platformLocation.getState()}isCurrentPathEqualTo(t,e=""){return this.path()==this.normalize(t+Th(e))}normalize(e){return t.stripTrailingSlash(function(t,e){return t&&e.startsWith(t)?e.substring(t.length):e}(this._baseHref,Nh(e)))}prepareExternalUrl(t){return t&&"/"!==t[0]&&(t="/"+t),this._platformStrategy.prepareExternalUrl(t)}go(t,e="",n=null){this._platformStrategy.pushState(n,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+Th(e)),n)}replaceState(t,e="",n=null){this._platformStrategy.replaceState(n,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+Th(e)),n)}forward(){this._platformStrategy.forward()}back(){this._platformStrategy.back()}onUrlChange(t){this._urlChangeListeners.push(t),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(t=>{this._notifyUrlChangeListeners(t.url,t.state)}))}_notifyUrlChangeListeners(t="",e){this._urlChangeListeners.forEach(n=>n(t,e))}subscribe(t,e,n){return this._subject.subscribe({next:t,error:e,complete:n})}}return t.\u0275fac=function(e){return new(e||t)(Yt(Rh),Yt(xh))},t.normalizeQueryParams=Th,t.joinWithSlash=Ah,t.stripTrailingSlash=Dh,t.\u0275prov=ut({factory:Ih,token:t,providedIn:"root"}),t})();function Ih(){return new Oh(Yt(Rh),Yt(xh))}function Nh(t){return t.replace(/\/index.html$/,"")}var Ph=function(t){return t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t[t.Few=3]="Few",t[t.Many=4]="Many",t[t.Other=5]="Other",t}({}),Bh=function(t){return t[t.Format=0]="Format",t[t.Standalone=1]="Standalone",t}({}),Uh=function(t){return t[t.Narrow=0]="Narrow",t[t.Abbreviated=1]="Abbreviated",t[t.Wide=2]="Wide",t[t.Short=3]="Short",t}({}),Vh=function(t){return t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t[t.Full=3]="Full",t}({}),Hh=function(t){return t[t.Decimal=0]="Decimal",t[t.Group=1]="Group",t[t.List=2]="List",t[t.PercentSign=3]="PercentSign",t[t.PlusSign=4]="PlusSign",t[t.MinusSign=5]="MinusSign",t[t.Exponential=6]="Exponential",t[t.SuperscriptingExponent=7]="SuperscriptingExponent",t[t.PerMille=8]="PerMille",t[t[1/0]=9]="Infinity",t[t.NaN=10]="NaN",t[t.TimeSeparator=11]="TimeSeparator",t[t.CurrencyDecimal=12]="CurrencyDecimal",t[t.CurrencyGroup=13]="CurrencyGroup",t}({});function jh(t,e,n){const i=nl(t),r=Qh([i[sl.DayPeriodsFormat],i[sl.DayPeriodsStandalone]],e);return Qh(r,n)}function zh(t,e,n){const i=nl(t),r=Qh([i[sl.DaysFormat],i[sl.DaysStandalone]],e);return Qh(r,n)}function Wh(t,e,n){const i=nl(t),r=Qh([i[sl.MonthsFormat],i[sl.MonthsStandalone]],e);return Qh(r,n)}function Gh(t,e){return Qh(nl(t)[sl.DateFormat],e)}function Kh(t,e){return Qh(nl(t)[sl.TimeFormat],e)}function qh(t,e){return Qh(nl(t)[sl.DateTimeFormat],e)}function Yh(t,e){const n=nl(t),i=n[sl.NumberSymbols][e];if(void 0===i){if(e===Hh.CurrencyDecimal)return n[sl.NumberSymbols][Hh.Decimal];if(e===Hh.CurrencyGroup)return n[sl.NumberSymbols][Hh.Group]}return i}const Xh=il;function Jh(t){if(!t[sl.ExtraData])throw new Error(`Missing extra locale data for the locale "${t[sl.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function Qh(t,e){for(let n=e;n>-1;n--)if(void 0!==t[n])return t[n];throw new Error("Locale data API: locale data undefined")}function Zh(t){const[e,n]=t.split(":");return{hours:+e,minutes:+n}}const td=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,ed={},nd=/((?:[^GyYMLwWdEabBhHmsSzZO']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;var id=function(t){return t[t.Short=0]="Short",t[t.ShortGMT=1]="ShortGMT",t[t.Long=2]="Long",t[t.Extended=3]="Extended",t}({}),rd=function(t){return t[t.FullYear=0]="FullYear",t[t.Month=1]="Month",t[t.Date=2]="Date",t[t.Hours=3]="Hours",t[t.Minutes=4]="Minutes",t[t.Seconds=5]="Seconds",t[t.FractionalSeconds=6]="FractionalSeconds",t[t.Day=7]="Day",t}({}),sd=function(t){return t[t.DayPeriods=0]="DayPeriods",t[t.Days=1]="Days",t[t.Months=2]="Months",t[t.Eras=3]="Eras",t}({});function od(t,e,n,i){let r=function(t){if(yd(t))return t;if("number"==typeof t&&!isNaN(t))return new Date(t);if("string"==typeof t){t=t.trim();const e=parseFloat(t);if(!isNaN(t-e))return new Date(e);if(/^(\d{4}-\d{1,2}-\d{1,2})$/.test(t)){const[e,n,i]=t.split("-").map(t=>+t);return new Date(e,n-1,i)}let n;if(n=t.match(td))return function(t){const e=new Date(0);let n=0,i=0;const r=t[8]?e.setUTCFullYear:e.setFullYear,s=t[8]?e.setUTCHours:e.setHours;t[9]&&(n=Number(t[9]+t[10]),i=Number(t[9]+t[11])),r.call(e,Number(t[1]),Number(t[2])-1,Number(t[3]));const o=Number(t[4]||0)-n,a=Number(t[5]||0)-i,l=Number(t[6]||0),c=Math.floor(1e3*parseFloat("0."+(t[7]||0)));return s.call(e,o,a,l,c),e}(n)}const e=new Date(t);if(!yd(e))throw new Error(`Unable to convert "${t}" into a date`);return e}(t);e=ad(n,e)||e;let s,o=[];for(;e;){if(s=nd.exec(e),!s){o.push(e);break}{o=o.concat(s.slice(1));const t=o.pop();if(!t)break;e=t}}let a=r.getTimezoneOffset();i&&(a=vd(i,a),r=function(t,e,n){const i=t.getTimezoneOffset();return function(t,e){return(t=new Date(t.getTime())).setMinutes(t.getMinutes()+e),t}(t,-1*(vd(e,i)-i))}(r,i));let l="";return o.forEach(t=>{const e=function(t){if(md[t])return md[t];let e;switch(t){case"G":case"GG":case"GGG":e=hd(sd.Eras,Uh.Abbreviated);break;case"GGGG":e=hd(sd.Eras,Uh.Wide);break;case"GGGGG":e=hd(sd.Eras,Uh.Narrow);break;case"y":e=ud(rd.FullYear,1,0,!1,!0);break;case"yy":e=ud(rd.FullYear,2,0,!0,!0);break;case"yyy":e=ud(rd.FullYear,3,0,!1,!0);break;case"yyyy":e=ud(rd.FullYear,4,0,!1,!0);break;case"Y":e=gd(1);break;case"YY":e=gd(2,!0);break;case"YYY":e=gd(3);break;case"YYYY":e=gd(4);break;case"M":case"L":e=ud(rd.Month,1,1);break;case"MM":case"LL":e=ud(rd.Month,2,1);break;case"MMM":e=hd(sd.Months,Uh.Abbreviated);break;case"MMMM":e=hd(sd.Months,Uh.Wide);break;case"MMMMM":e=hd(sd.Months,Uh.Narrow);break;case"LLL":e=hd(sd.Months,Uh.Abbreviated,Bh.Standalone);break;case"LLLL":e=hd(sd.Months,Uh.Wide,Bh.Standalone);break;case"LLLLL":e=hd(sd.Months,Uh.Narrow,Bh.Standalone);break;case"w":e=pd(1);break;case"ww":e=pd(2);break;case"W":e=pd(1,!0);break;case"d":e=ud(rd.Date,1);break;case"dd":e=ud(rd.Date,2);break;case"E":case"EE":case"EEE":e=hd(sd.Days,Uh.Abbreviated);break;case"EEEE":e=hd(sd.Days,Uh.Wide);break;case"EEEEE":e=hd(sd.Days,Uh.Narrow);break;case"EEEEEE":e=hd(sd.Days,Uh.Short);break;case"a":case"aa":case"aaa":e=hd(sd.DayPeriods,Uh.Abbreviated);break;case"aaaa":e=hd(sd.DayPeriods,Uh.Wide);break;case"aaaaa":e=hd(sd.DayPeriods,Uh.Narrow);break;case"b":case"bb":case"bbb":e=hd(sd.DayPeriods,Uh.Abbreviated,Bh.Standalone,!0);break;case"bbbb":e=hd(sd.DayPeriods,Uh.Wide,Bh.Standalone,!0);break;case"bbbbb":e=hd(sd.DayPeriods,Uh.Narrow,Bh.Standalone,!0);break;case"B":case"BB":case"BBB":e=hd(sd.DayPeriods,Uh.Abbreviated,Bh.Format,!0);break;case"BBBB":e=hd(sd.DayPeriods,Uh.Wide,Bh.Format,!0);break;case"BBBBB":e=hd(sd.DayPeriods,Uh.Narrow,Bh.Format,!0);break;case"h":e=ud(rd.Hours,1,-12);break;case"hh":e=ud(rd.Hours,2,-12);break;case"H":e=ud(rd.Hours,1);break;case"HH":e=ud(rd.Hours,2);break;case"m":e=ud(rd.Minutes,1);break;case"mm":e=ud(rd.Minutes,2);break;case"s":e=ud(rd.Seconds,1);break;case"ss":e=ud(rd.Seconds,2);break;case"S":e=ud(rd.FractionalSeconds,1);break;case"SS":e=ud(rd.FractionalSeconds,2);break;case"SSS":e=ud(rd.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":e=dd(id.Short);break;case"ZZZZZ":e=dd(id.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":e=dd(id.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":e=dd(id.Long);break;default:return null}return md[t]=e,e}(t);l+=e?e(r,n,a):"''"===t?"'":t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}function ad(t,e){const n=function(t){return nl(t)[sl.LocaleId]}(t);if(ed[n]=ed[n]||{},ed[n][e])return ed[n][e];let i="";switch(e){case"shortDate":i=Gh(t,Vh.Short);break;case"mediumDate":i=Gh(t,Vh.Medium);break;case"longDate":i=Gh(t,Vh.Long);break;case"fullDate":i=Gh(t,Vh.Full);break;case"shortTime":i=Kh(t,Vh.Short);break;case"mediumTime":i=Kh(t,Vh.Medium);break;case"longTime":i=Kh(t,Vh.Long);break;case"fullTime":i=Kh(t,Vh.Full);break;case"short":const e=ad(t,"shortTime"),n=ad(t,"shortDate");i=ld(qh(t,Vh.Short),[e,n]);break;case"medium":const r=ad(t,"mediumTime"),s=ad(t,"mediumDate");i=ld(qh(t,Vh.Medium),[r,s]);break;case"long":const o=ad(t,"longTime"),a=ad(t,"longDate");i=ld(qh(t,Vh.Long),[o,a]);break;case"full":const l=ad(t,"fullTime"),c=ad(t,"fullDate");i=ld(qh(t,Vh.Full),[l,c])}return i&&(ed[n][e]=i),i}function ld(t,e){return e&&(t=t.replace(/\{([^}]+)}/g,function(t,n){return null!=e&&n in e?e[n]:t})),t}function cd(t,e,n="-",i,r){let s="";(t<0||r&&t<=0)&&(r?t=1-t:(t=-t,s=n));let o=String(t);for(;o.length0||a>-n)&&(a+=n),t===rd.Hours)0===a&&-12===n&&(a=12);else if(t===rd.FractionalSeconds)return l=e,cd(a,3).substr(0,l);var l;const c=Yh(o,Hh.MinusSign);return cd(a,e,c,i,r)}}function hd(t,e,n=Bh.Format,i=!1){return function(r,s){return function(t,e,n,i,r,s){switch(n){case sd.Months:return Wh(e,r,i)[t.getMonth()];case sd.Days:return zh(e,r,i)[t.getDay()];case sd.DayPeriods:const o=t.getHours(),a=t.getMinutes();if(s){const t=function(t){const e=nl(t);return Jh(e),(e[sl.ExtraData][2]||[]).map(t=>"string"==typeof t?Zh(t):[Zh(t[0]),Zh(t[1])])}(e),n=function(t,e,n){const i=nl(t);Jh(i);const r=Qh([i[sl.ExtraData][0],i[sl.ExtraData][1]],e)||[];return Qh(r,n)||[]}(e,r,i),s=t.findIndex(t=>{if(Array.isArray(t)){const[e,n]=t,i=o>=e.hours&&a>=e.minutes,r=o0?Math.floor(r/60):Math.ceil(r/60);switch(t){case id.Short:return(r>=0?"+":"")+cd(o,2,s)+cd(Math.abs(r%60),2,s);case id.ShortGMT:return"GMT"+(r>=0?"+":"")+cd(o,1,s);case id.Long:return"GMT"+(r>=0?"+":"")+cd(o,2,s)+":"+cd(Math.abs(r%60),2,s);case id.Extended:return 0===i?"Z":(r>=0?"+":"")+cd(o,2,s)+":"+cd(Math.abs(r%60),2,s);default:throw new Error(`Unknown zone width "${t}"`)}}}function fd(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate()+(4-t.getDay()))}function pd(t,e=!1){return function(n,i){let r;if(e){const t=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,e=n.getDate();r=1+Math.floor((e+t)/7)}else{const t=fd(n),e=function(t){const e=new Date(t,0,1).getDay();return new Date(t,0,1+(e<=4?4:11)-e)}(t.getFullYear()),i=t.getTime()-e.getTime();r=1+Math.round(i/6048e5)}return cd(r,t,Yh(i,Hh.MinusSign))}}function gd(t,e=!1){return function(n,i){return cd(fd(n).getFullYear(),t,Yh(i,Hh.MinusSign),e)}}const md={};function vd(t,e){t=t.replace(/:/g,"");const n=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(n)?e:n}function yd(t){return t instanceof Date&&!isNaN(t.valueOf())}class bd{}let wd=(()=>{class t extends bd{constructor(t){super(),this.locale=t}getPluralCategory(t,e){switch(Xh(e||this.locale)(t)){case Ph.Zero:return"zero";case Ph.One:return"one";case Ph.Two:return"two";case Ph.Few:return"few";case Ph.Many:return"many";default:return"other"}}}return t.\u0275fac=function(e){return new(e||t)(Yt(Fu))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();function xd(t,e){e=encodeURIComponent(e);for(const n of t.split(";")){const t=n.indexOf("="),[i,r]=-1==t?[n,""]:[n.slice(0,t),n.slice(t+1)];if(i.trim()===e)return decodeURIComponent(r)}return null}let _d=(()=>{class t{constructor(t,e,n,i){this._iterableDiffers=t,this._keyValueDiffers=e,this._ngEl=n,this._renderer=i,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}set klass(t){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof t?t.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}set ngClass(t){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof t?t.split(/\s+/):t,this._rawClass&&(Jo(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}ngDoCheck(){if(this._iterableDiffer){const t=this._iterableDiffer.diff(this._rawClass);t&&this._applyIterableChanges(t)}else if(this._keyValueDiffer){const t=this._keyValueDiffer.diff(this._rawClass);t&&this._applyKeyValueChanges(t)}}_applyKeyValueChanges(t){t.forEachAddedItem(t=>this._toggleClass(t.key,t.currentValue)),t.forEachChangedItem(t=>this._toggleClass(t.key,t.currentValue)),t.forEachRemovedItem(t=>{t.previousValue&&this._toggleClass(t.key,!1)})}_applyIterableChanges(t){t.forEachAddedItem(t=>{if("string"!=typeof t.item)throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${bt(t.item)}`);this._toggleClass(t.item,!0)}),t.forEachRemovedItem(t=>this._toggleClass(t.item,!1))}_applyClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(t=>this._toggleClass(t,!0)):Object.keys(t).forEach(e=>this._toggleClass(e,!!t[e])))}_removeClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(t=>this._toggleClass(t,!1)):Object.keys(t).forEach(t=>this._toggleClass(t,!1)))}_toggleClass(t,e){(t=t.trim())&&t.split(/\s+/g).forEach(t=>{e?this._renderer.addClass(this._ngEl.nativeElement,t):this._renderer.removeClass(this._ngEl.nativeElement,t)})}}return t.\u0275fac=function(e){return new(e||t)(oa(Tc),oa(Rc),oa(uc),oa(pc))},t.\u0275dir=we({type:t,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),t})();class Cd{constructor(t,e,n,i){this.$implicit=t,this.ngForOf=e,this.index=n,this.count=i}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let Sd=(()=>{class t{constructor(t,e,n){this._viewContainer=t,this._template=e,this._differs=n,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){zi()&&null!=t&&"function"!=typeof t&&console&&console.warn&&console.warn(`trackBy must be a function, but received ${JSON.stringify(t)}. See https://angular.io/api/common/NgForOf#change-propagation for more information.`),this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const n=this._ngForOf;if(!this._differ&&n)try{this._differ=this._differs.find(n).create(this.ngForTrackBy)}catch(e){throw new Error(`Cannot find a differ supporting object '${n}' of type '${t=n,t.name||typeof t}'. NgFor only supports binding to Iterables such as Arrays.`)}}var t;if(this._differ){const t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const e=[];t.forEachOperation((t,n,i)=>{if(null==t.previousIndex){const n=this._viewContainer.createEmbeddedView(this._template,new Cd(null,this._ngForOf,-1,-1),null===i?void 0:i),r=new kd(t,n);e.push(r)}else if(null==i)this._viewContainer.remove(null===n?void 0:n);else if(null!==n){const r=this._viewContainer.get(n);this._viewContainer.move(r,i);const s=new kd(t,r);e.push(s)}});for(let n=0;n{this._viewContainer.get(t.currentIndex).context.$implicit=t.item})}_perViewChange(t,e){t.context.$implicit=e.item}static ngTemplateContextGuard(t,e){return!0}}return t.\u0275fac=function(e){return new(e||t)(oa(Ic),oa($c),oa(Tc))},t.\u0275dir=we({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),t})();class kd{constructor(t,e){this.record=t,this.view=e}}let Ed=(()=>{class t{constructor(t,e){this._viewContainer=t,this._context=new Ad,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=e}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){Dd("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){Dd("ngIfElse",t),this._elseTemplateRef=t,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(t,e){return!0}}return t.\u0275fac=function(e){return new(e||t)(oa(Ic),oa($c))},t.\u0275dir=we({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),t})();class Ad{constructor(){this.$implicit=null,this.ngIf=null}}function Dd(t,e){if(e&&!e.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${bt(e)}'.`)}let Td=(()=>{class t{constructor(t,e,n){this._ngEl=t,this._differs=e,this._renderer=n,this._ngStyle=null,this._differ=null}set ngStyle(t){this._ngStyle=t,!this._differ&&t&&(this._differ=this._differs.find(t).create())}ngDoCheck(){if(this._differ){const t=this._differ.diff(this._ngStyle);t&&this._applyChanges(t)}}_setStyle(t,e){const[n,i]=t.split(".");null!=(e=null!=e&&i?`${e}${i}`:e)?this._renderer.setStyle(this._ngEl.nativeElement,n,e):this._renderer.removeStyle(this._ngEl.nativeElement,n)}_applyChanges(t){t.forEachRemovedItem(t=>this._setStyle(t.key,null)),t.forEachAddedItem(t=>this._setStyle(t.key,t.currentValue)),t.forEachChangedItem(t=>this._setStyle(t.key,t.currentValue))}}return t.\u0275fac=function(e){return new(e||t)(oa(uc),oa(Rc),oa(pc))},t.\u0275dir=we({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}}),t})(),Rd=(()=>{class t{constructor(t){this._viewContainerRef=t,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null}ngOnChanges(t){if(this._shouldRecreateView(t)){const t=this._viewContainerRef;this._viewRef&&t.remove(t.indexOf(this._viewRef)),this._viewRef=this.ngTemplateOutlet?t.createEmbeddedView(this.ngTemplateOutlet,this.ngTemplateOutletContext):null}else this._viewRef&&this.ngTemplateOutletContext&&this._updateExistingContext(this.ngTemplateOutletContext)}_shouldRecreateView(t){const e=t.ngTemplateOutletContext;return!!t.ngTemplateOutlet||e&&this._hasContextShapeChanged(e)}_hasContextShapeChanged(t){const e=Object.keys(t.previousValue||{}),n=Object.keys(t.currentValue||{});if(e.length===n.length){for(let t of n)if(-1===e.indexOf(t))return!0;return!1}return!0}_updateExistingContext(t){for(let e of Object.keys(t))this._viewRef.context[e]=this.ngTemplateOutletContext[e]}}return t.\u0275fac=function(e){return new(e||t)(oa(Ic))},t.\u0275dir=we({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet"},features:[Ve]}),t})(),Fd=(()=>{class t{}return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},providers:[{provide:bd,useClass:wd}]}),t})(),Md=(()=>{class t{}return t.\u0275prov=ut({token:t,providedIn:"root",factory:()=>new Ld(Yt(wh),window,Yt(Ri))}),t})();class Ld{constructor(t,e,n){this.document=t,this.window=e,this.errorHandler=n,this.offset=()=>[0,0]}setOffset(t){this.offset=Array.isArray(t)?()=>t:t}getScrollPosition(){return this.supportsScrolling()?[this.window.scrollX,this.window.scrollY]:[0,0]}scrollToPosition(t){this.supportsScrolling()&&this.window.scrollTo(t[0],t[1])}scrollToAnchor(t){if(this.supportsScrolling()){const e=this.document.getElementById(t)||this.document.getElementsByName(t)[0];e&&this.scrollToElement(e)}}setHistoryScrollRestoration(t){if(this.supportScrollRestoration()){const e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=t)}}scrollToElement(t){const e=t.getBoundingClientRect(),n=e.left+this.window.pageXOffset,i=e.top+this.window.pageYOffset,r=this.offset();this.window.scrollTo(n-r[0],i-r[1])}supportScrollRestoration(){try{if(!this.window||!this.window.scrollTo)return!1;const t=$d(this.window.history)||$d(Object.getPrototypeOf(this.window.history));return!(!t||!t.writable&&!t.set)}catch(t){return!1}}supportsScrolling(){try{return!!this.window.scrollTo}catch(t){return!1}}}function $d(t){return Object.getOwnPropertyDescriptor(t,"scrollRestoration")}class Od extends class extends class{}{constructor(){super()}supportsDOMEvents(){return!0}}{static makeCurrent(){var t;t=new Od,yh||(yh=t)}getProperty(t,e){return t[e]}log(t){window.console&&window.console.log&&window.console.log(t)}logGroup(t){window.console&&window.console.group&&window.console.group(t)}logGroupEnd(){window.console&&window.console.groupEnd&&window.console.groupEnd()}onAndCancel(t,e,n){return t.addEventListener(e,n,!1),()=>{t.removeEventListener(e,n,!1)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){return t.parentNode&&t.parentNode.removeChild(t),t}getValue(t){return t.value}createElement(t,e){return(e=e||this.getDefaultDocument()).createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null}getHistory(){return window.history}getLocation(){return window.location}getBaseHref(t){const e=Nd||(Nd=document.querySelector("base"),Nd)?Nd.getAttribute("href"):null;return null==e?null:(n=e,Id||(Id=document.createElement("a")),Id.setAttribute("href",n),"/"===Id.pathname.charAt(0)?Id.pathname:"/"+Id.pathname);var n}resetBaseElement(){Nd=null}getUserAgent(){return window.navigator.userAgent}performanceNow(){return window.performance&&window.performance.now?window.performance.now():(new Date).getTime()}supportsCookies(){return!0}getCookie(t){return xd(document.cookie,t)}}let Id,Nd=null;const Pd=new Pt("TRANSITION_ID"),Bd=[{provide:_u,useFactory:function(t,e,n){return()=>{n.get(Cu).donePromise.then(()=>{const n=bh();Array.prototype.slice.apply(e.querySelectorAll("style[ng-transition]")).filter(e=>e.getAttribute("ng-transition")===t).forEach(t=>n.remove(t))})}},deps:[Pd,wh,Bo],multi:!0}];class Ud{static init(){var t;t=new Ud,eh=t}addToWindow(t){Tt.getAngularTestability=(e,n=!0)=>{const i=t.findTestabilityInTree(e,n);if(null==i)throw new Error("Could not find testability for element.");return i},Tt.getAllAngularTestabilities=()=>t.getAllTestabilities(),Tt.getAllAngularRootElements=()=>t.getAllRootElements(),Tt.frameworkStabilizers||(Tt.frameworkStabilizers=[]),Tt.frameworkStabilizers.push(t=>{const e=Tt.getAllAngularTestabilities();let n=e.length,i=!1;const r=function(e){i=i||e,n--,0==n&&t(i)};e.forEach(function(t){t.whenStable(r)})})}findTestabilityInTree(t,e,n){if(null==e)return null;const i=t.getTestability(e);return null!=i?i:n?bh().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null}}const Vd=new Pt("EventManagerPlugins");let Hd=(()=>{class t{constructor(t,e){this._zone=e,this._eventNameToPlugin=new Map,t.forEach(t=>t.manager=this),this._plugins=t.slice().reverse()}addEventListener(t,e,n){return this._findPluginFor(e).addEventListener(t,e,n)}addGlobalEventListener(t,e,n){return this._findPluginFor(e).addGlobalEventListener(t,e,n)}getZone(){return this._zone}_findPluginFor(t){const e=this._eventNameToPlugin.get(t);if(e)return e;const n=this._plugins;for(let i=0;i{class t{constructor(){this._stylesSet=new Set}addStyles(t){const e=new Set;t.forEach(t=>{this._stylesSet.has(t)||(this._stylesSet.add(t),e.add(t))}),this.onStylesAdded(e)}onStylesAdded(t){}getAllStyles(){return Array.from(this._stylesSet)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),Wd=(()=>{class t extends zd{constructor(t){super(),this._doc=t,this._hostNodes=new Set,this._styleNodes=new Set,this._hostNodes.add(t.head)}_addStylesToHost(t,e){t.forEach(t=>{const n=this._doc.createElement("style");n.textContent=t,this._styleNodes.add(e.appendChild(n))})}addHost(t){this._addStylesToHost(this._stylesSet,t),this._hostNodes.add(t)}removeHost(t){this._hostNodes.delete(t)}onStylesAdded(t){this._hostNodes.forEach(e=>this._addStylesToHost(t,e))}ngOnDestroy(){this._styleNodes.forEach(t=>bh().remove(t))}}return t.\u0275fac=function(e){return new(e||t)(Yt(wh))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();const Gd={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Kd=/%COMP%/g;function qd(t,e,n){for(let i=0;i{if("__ngUnwrap__"===e)return t;!1===t(e)&&(e.preventDefault(),e.returnValue=!1)}}let Xd=(()=>{class t{constructor(t,e,n){this.eventManager=t,this.sharedStylesHost=e,this.appId=n,this.rendererByCompId=new Map,this.defaultRenderer=new Jd(t)}createRenderer(t,e){if(!t||!e)return this.defaultRenderer;switch(e.encapsulation){case ue.Emulated:{let n=this.rendererByCompId.get(e.id);return n||(n=new Qd(this.eventManager,this.sharedStylesHost,e,this.appId),this.rendererByCompId.set(e.id,n)),n.applyToHost(t),n}case 1:case ue.ShadowDom:return new Zd(this.eventManager,this.sharedStylesHost,t,e);default:if(!this.rendererByCompId.has(e.id)){const t=qd(e.id,e.styles,[]);this.sharedStylesHost.addStyles(t),this.rendererByCompId.set(e.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return t.\u0275fac=function(e){return new(e||t)(Yt(Hd),Yt(Wd),Yt(Su))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();class Jd{constructor(t){this.eventManager=t,this.data=Object.create(null)}destroy(){}createElement(t,e){return e?document.createElementNS(Gd[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){t.appendChild(e)}insertBefore(t,e,n){t&&t.insertBefore(e,n)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t,e){let n="string"==typeof t?document.querySelector(t):t;if(!n)throw new Error(`The selector "${t}" did not match any elements`);return e||(n.textContent=""),n}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,n,i){if(i){e=i+":"+e;const r=Gd[i];r?t.setAttributeNS(r,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const i=Gd[n];i?t.removeAttributeNS(i,e):t.removeAttribute(`${n}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,n,i){i&fc.DashCase?t.style.setProperty(e,n,i&fc.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&fc.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,n){t[e]=n}setValue(t,e){t.nodeValue=e}listen(t,e,n){return"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,Yd(n)):this.eventManager.addEventListener(t,e,Yd(n))}}class Qd extends Jd{constructor(t,e,n,i){super(t),this.component=n;const r=qd(i+"-"+n.id,n.styles,[]);e.addStyles(r),this.contentAttr="_ngcontent-%COMP%".replace(Kd,i+"-"+n.id),this.hostAttr="_nghost-%COMP%".replace(Kd,i+"-"+n.id)}applyToHost(t){super.setAttribute(t,this.hostAttr,"")}createElement(t,e){const n=super.createElement(t,e);return super.setAttribute(n,this.contentAttr,""),n}}class Zd extends Jd{constructor(t,e,n,i){super(t),this.sharedStylesHost=e,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const r=qd(i.id,i.styles,[]);for(let s=0;s{class t extends jd{constructor(t){super(t)}supports(t){return!0}addEventListener(t,e,n){return t.addEventListener(e,n,!1),()=>this.removeEventListener(t,e,n)}removeEventListener(t,e,n){return t.removeEventListener(e,n)}}return t.\u0275fac=function(e){return new(e||t)(Yt(wh))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();const ef=["alt","control","meta","shift"],nf={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},rf={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"},sf={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};let of=(()=>{class t extends jd{constructor(t){super(t)}supports(e){return null!=t.parseEventName(e)}addEventListener(e,n,i){const r=t.parseEventName(n),s=t.eventCallback(r.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>bh().onAndCancel(e,r.domEventName,s))}static parseEventName(e){const n=e.toLowerCase().split("."),i=n.shift();if(0===n.length||"keydown"!==i&&"keyup"!==i)return null;const r=t._normalizeKey(n.pop());let s="";if(ef.forEach(t=>{const e=n.indexOf(t);e>-1&&(n.splice(e,1),s+=t+".")}),s+=r,0!=n.length||0===r.length)return null;const o={};return o.domEventName=i,o.fullKey=s,o}static getEventFullKey(t){let e="",n=function(t){let e=t.key;if(null==e){if(e=t.keyIdentifier,null==e)return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),3===t.location&&rf.hasOwnProperty(e)&&(e=rf[e]))}return nf[e]||e}(t);return n=n.toLowerCase()," "===n?n="space":"."===n&&(n="dot"),ef.forEach(i=>{i!=n&&(0,sf[i])(t)&&(e+=i+".")}),e+=n,e}static eventCallback(e,n,i){return r=>{t.getEventFullKey(r)===e&&i.runGuarded(()=>n(r))}}static _normalizeKey(t){switch(t){case"esc":return"escape";default:return t}}}return t.\u0275fac=function(e){return new(e||t)(Yt(wh))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),af=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:function(){return Yt(lf)},token:t,providedIn:"root"}),t})(),lf=(()=>{class t extends af{constructor(t){super(),this._doc=t}sanitize(t,e){if(null==e)return null;switch(t){case mr.NONE:return e;case mr.HTML:return Ui(e,"HTML")?Bi(e):pr(this._doc,String(e));case mr.STYLE:return Ui(e,"Style")?Bi(e):e;case mr.SCRIPT:if(Ui(e,"Script"))return Bi(e);throw new Error("unsafe value used in a script context");case mr.URL:return Vi(e),Ui(e,"URL")?Bi(e):Xi(String(e));case mr.RESOURCE_URL:if(Ui(e,"ResourceURL"))return Bi(e);throw new Error("unsafe value used in a resource URL context (see http://g.co/ng/security#xss)");default:throw new Error(`Unexpected SecurityContext ${t} (see http://g.co/ng/security#xss)`)}}bypassSecurityTrustHtml(t){return new $i(t)}bypassSecurityTrustStyle(t){return new Oi(t)}bypassSecurityTrustScript(t){return new Ii(t)}bypassSecurityTrustUrl(t){return new Ni(t)}bypassSecurityTrustResourceUrl(t){return new Pi(t)}}return t.\u0275fac=function(e){return new(e||t)(Yt(wh))},t.\u0275prov=ut({factory:function(){return t=Yt(Bt),new lf(t.get(wh));var t},token:t,providedIn:"root"}),t})();const cf=rh(gh,"browser",[{provide:Du,useValue:"browser"},{provide:Au,useValue:function(){Od.makeCurrent(),Ud.init()},multi:!0},{provide:wh,useFactory:function(){return function(t){Ke=t}(document),document},deps:[]}]),uf=[[],{provide:ko,useValue:"root"},{provide:Ri,useFactory:function(){return new Ri},deps:[]},{provide:Vd,useClass:tf,multi:!0,deps:[wh,ju,Du]},{provide:Vd,useClass:of,multi:!0,deps:[wh]},[],{provide:Xd,useClass:Xd,deps:[Hd,Wd,Su]},{provide:dc,useExisting:Xd},{provide:zd,useExisting:Wd},{provide:Wd,useClass:Wd,deps:[wh]},{provide:Ju,useClass:Ju,deps:[ju]},{provide:Hd,useClass:Hd,deps:[Vd,ju]},[]];let hf=(()=>{class t{constructor(t){if(t)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}static withServerTransition(e){return{ngModule:t,providers:[{provide:Su,useValue:e.appId},{provide:Pd,useExisting:Su},Bd]}}}return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)(Yt(t,12))},providers:uf,imports:[Fd,vh]}),t})();"undefined"!=typeof window&&window;class df{}const ff="*";function pf(t,e){return{type:7,name:t,definitions:e,options:{}}}function gf(t,e=null){return{type:4,styles:e,timings:t}}function mf(t,e=null){return{type:2,steps:t,options:e}}function vf(t){return{type:6,styles:t,offset:null}}function yf(t,e,n=null){return{type:1,expr:t,animation:e,options:n}}function bf(t){Promise.resolve(null).then(t)}class wf{constructor(t=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this.parentPlayer=null,this.totalTime=t+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){bf(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){}setPosition(t){}getPosition(){return 0}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}class xf{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let e=0,n=0,i=0;const r=this.players.length;0==r?bf(()=>this._onFinish()):this.players.forEach(t=>{t.onDone(()=>{++e==r&&this._onFinish()}),t.onDestroy(()=>{++n==r&&this._onDestroy()}),t.onStart(()=>{++i==r&&this._onStart()})}),this.totalTime=this.players.reduce((t,e)=>Math.max(t,e.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){const e=t*this.totalTime;this.players.forEach(t=>{const n=t.totalTime?Math.min(1,e/t.totalTime):1;t.setPosition(n)})}getPosition(){let t=0;return this.players.forEach(e=>{const n=e.getPosition();t=Math.min(n,t)}),t}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}function _f(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function Cf(t){switch(t.length){case 0:return new wf;case 1:return t[0];default:return new xf(t)}}function Sf(t,e,n,i,r={},s={}){const o=[],a=[];let l=-1,c=null;if(i.forEach(t=>{const n=t.offset,i=n==l,u=i&&c||{};Object.keys(t).forEach(n=>{let i=n,a=t[n];if("offset"!==n)switch(i=e.normalizePropertyName(i,o),a){case"!":a=r[n];break;case ff:a=s[n];break;default:a=e.normalizeStyleValue(n,i,a,o)}u[i]=a}),i||a.push(u),c=u,l=n}),o.length){const t="\n - ";throw new Error(`Unable to animate due to the following errors:${t}${o.join(t)}`)}return a}function kf(t,e,n,i){switch(e){case"start":t.onStart(()=>i(n&&Ef(n,"start",t)));break;case"done":t.onDone(()=>i(n&&Ef(n,"done",t)));break;case"destroy":t.onDestroy(()=>i(n&&Ef(n,"destroy",t)))}}function Ef(t,e,n){const i=n.totalTime,r=Af(t.element,t.triggerName,t.fromState,t.toState,e||t.phaseName,null==i?t.totalTime:i,!!n.disabled),s=t._data;return null!=s&&(r._data=s),r}function Af(t,e,n,i,r="",s=0,o){return{element:t,triggerName:e,fromState:n,toState:i,phaseName:r,totalTime:s,disabled:!!o}}function Df(t,e,n){let i;return t instanceof Map?(i=t.get(e),i||t.set(e,i=n)):(i=t[e],i||(i=t[e]=n)),i}function Tf(t){const e=t.indexOf(":");return[t.substring(1,e),t.substr(e+1)]}let Rf=(t,e)=>!1,Ff=(t,e)=>!1,Mf=(t,e,n)=>[];const Lf=_f();(Lf||"undefined"!=typeof Element)&&(Rf=(t,e)=>t.contains(e),Ff=(()=>{if(Lf||Element.prototype.matches)return(t,e)=>t.matches(e);{const t=Element.prototype,e=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector;return e?(t,n)=>e.apply(t,[n]):Ff}})(),Mf=(t,e,n)=>{let i=[];if(n)i.push(...t.querySelectorAll(e));else{const n=t.querySelector(e);n&&i.push(n)}return i});let $f=null,Of=!1;function If(t){$f||($f=("undefined"!=typeof document?document.body:null)||{},Of=!!$f.style&&"WebkitAppearance"in $f.style);let e=!0;return $f.style&&!function(t){return"ebkit"==t.substring(1,6)}(t)&&(e=t in $f.style,!e&&Of)&&(e="Webkit"+t.charAt(0).toUpperCase()+t.substr(1)in $f.style),e}const Nf=Ff,Pf=Rf,Bf=Mf;function Uf(t){const e={};return Object.keys(t).forEach(n=>{const i=n.replace(/([a-z])([A-Z])/g,"$1-$2");e[i]=t[n]}),e}let Vf=(()=>{class t{validateStyleProperty(t){return If(t)}matchesElement(t,e){return Nf(t,e)}containsElement(t,e){return Pf(t,e)}query(t,e,n){return Bf(t,e,n)}computeStyle(t,e,n){return n||""}animate(t,e,n,i,r,s=[],o){return new wf(n,i)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),Hf=(()=>{class t{}return t.NOOP=new Vf,t})();const jf="ng-enter",zf="ng-leave",Wf="ng-trigger",Gf=".ng-trigger",Kf="ng-animating",qf=".ng-animating";function Yf(t){if("number"==typeof t)return t;const e=t.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:Xf(parseFloat(e[1]),e[2])}function Xf(t,e){switch(e){case"s":return 1e3*t;default:return t}}function Jf(t,e,n){return t.hasOwnProperty("duration")?t:function(t,e,n){let i,r=0,s="";if("string"==typeof t){const n=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===n)return e.push(`The provided timing value "${t}" is invalid.`),{duration:0,delay:0,easing:""};i=Xf(parseFloat(n[1]),n[2]);const o=n[3];null!=o&&(r=Xf(parseFloat(o),n[4]));const a=n[5];a&&(s=a)}else i=t;if(!n){let n=!1,s=e.length;i<0&&(e.push("Duration values below 0 are not allowed for this animation step."),n=!0),r<0&&(e.push("Delay values below 0 are not allowed for this animation step."),n=!0),n&&e.splice(s,0,`The provided timing value "${t}" is invalid.`)}return{duration:i,delay:r,easing:s}}(t,e,n)}function Qf(t,e={}){return Object.keys(t).forEach(n=>{e[n]=t[n]}),e}function Zf(t,e,n={}){if(e)for(let i in t)n[i]=t[i];else Qf(t,n);return n}function tp(t,e,n){return n?e+":"+n+";":""}function ep(t){let e="";for(let n=0;n{const r=up(i);n&&!n.hasOwnProperty(i)&&(n[i]=t.style[r]),t.style[r]=e[i]}),_f()&&ep(t))}function ip(t,e){t.style&&(Object.keys(e).forEach(e=>{const n=up(e);t.style[n]=""}),_f()&&ep(t))}function rp(t){return Array.isArray(t)?1==t.length?t[0]:mf(t):t}const sp=new RegExp("{{\\s*(.+?)\\s*}}","g");function op(t){let e=[];if("string"==typeof t){let n;for(;n=sp.exec(t);)e.push(n[1]);sp.lastIndex=0}return e}function ap(t,e,n){const i=t.toString(),r=i.replace(sp,(t,i)=>{let r=e[i];return e.hasOwnProperty(i)||(n.push(`Please provide a value for the animation param ${i}`),r=""),r.toString()});return r==i?t:r}function lp(t){const e=[];let n=t.next();for(;!n.done;)e.push(n.value),n=t.next();return e}const cp=/-+([a-z0-9])/g;function up(t){return t.replace(cp,(...t)=>t[1].toUpperCase())}function hp(t,e){return 0===t||0===e}function dp(t,e,n){const i=Object.keys(n);if(i.length&&e.length){let s=e[0],o=[];if(i.forEach(t=>{s.hasOwnProperty(t)||o.push(t),s[t]=n[t]}),o.length)for(var r=1;rfunction(t,e,n){if(":"==t[0]){const i=function(t,e){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,e)=>parseFloat(e)>parseFloat(t);case":decrement":return(t,e)=>parseFloat(e) *"}}(t,n);if("function"==typeof i)return void e.push(i);t=i}const i=t.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return n.push(`The provided transition expression "${t}" is not supported`),e;const r=i[1],s=i[2],o=i[3];e.push(bp(r,o)),"<"!=s[0]||r==gp&&o==gp||e.push(bp(o,r))}(t,n,e)):n.push(t),n}const vp=new Set(["true","1"]),yp=new Set(["false","0"]);function bp(t,e){const n=vp.has(t)||yp.has(t),i=vp.has(e)||yp.has(e);return(r,s)=>{let o=t==gp||t==r,a=e==gp||e==s;return!o&&n&&"boolean"==typeof r&&(o=r?vp.has(t):yp.has(t)),!a&&i&&"boolean"==typeof s&&(a=s?vp.has(e):yp.has(e)),o&&a}}const wp=new RegExp("s*:selfs*,?","g");function xp(t,e,n){return new _p(t).build(e,n)}class _p{constructor(t){this._driver=t}build(t,e){const n=new Cp(e);return this._resetContextStyleTimingState(n),fp(this,rp(t),n)}_resetContextStyleTimingState(t){t.currentQuerySelector="",t.collectedStyles={},t.collectedStyles[""]={},t.currentTime=0}visitTrigger(t,e){let n=e.queryCount=0,i=e.depCount=0;const r=[],s=[];return"@"==t.name.charAt(0)&&e.errors.push("animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"),t.definitions.forEach(t=>{if(this._resetContextStyleTimingState(e),0==t.type){const n=t,i=n.name;i.toString().split(/\s*,\s*/).forEach(t=>{n.name=t,r.push(this.visitState(n,e))}),n.name=i}else if(1==t.type){const r=this.visitTransition(t,e);n+=r.queryCount,i+=r.depCount,s.push(r)}else e.errors.push("only state() and transition() definitions can sit inside of a trigger()")}),{type:7,name:t.name,states:r,transitions:s,queryCount:n,depCount:i,options:null}}visitState(t,e){const n=this.visitStyle(t.styles,e),i=t.options&&t.options.params||null;if(n.containsDynamicStyles){const r=new Set,s=i||{};if(n.styles.forEach(t=>{if(Sp(t)){const e=t;Object.keys(e).forEach(t=>{op(e[t]).forEach(t=>{s.hasOwnProperty(t)||r.add(t)})})}}),r.size){const n=lp(r.values());e.errors.push(`state("${t.name}", ...) must define default values for all the following style substitutions: ${n.join(", ")}`)}}return{type:0,name:t.name,style:n,options:i?{params:i}:null}}visitTransition(t,e){e.queryCount=0,e.depCount=0;const n=fp(this,rp(t.animation),e);return{type:1,matchers:mp(t.expr,e.errors),animation:n,queryCount:e.queryCount,depCount:e.depCount,options:kp(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(t=>fp(this,t,e)),options:kp(t.options)}}visitGroup(t,e){const n=e.currentTime;let i=0;const r=t.steps.map(t=>{e.currentTime=n;const r=fp(this,t,e);return i=Math.max(i,e.currentTime),r});return e.currentTime=i,{type:3,steps:r,options:kp(t.options)}}visitAnimate(t,e){const n=function(t,e){let n=null;if(t.hasOwnProperty("duration"))n=t;else if("number"==typeof t)return Ep(Jf(t,e).duration,0,"");const i=t;if(i.split(/\s+/).some(t=>"{"==t.charAt(0)&&"{"==t.charAt(1))){const t=Ep(0,0,"");return t.dynamic=!0,t.strValue=i,t}return n=n||Jf(i,e),Ep(n.duration,n.delay,n.easing)}(t.timings,e.errors);let i;e.currentAnimateTimings=n;let r=t.styles?t.styles:vf({});if(5==r.type)i=this.visitKeyframes(r,e);else{let r=t.styles,s=!1;if(!r){s=!0;const t={};n.easing&&(t.easing=n.easing),r=vf(t)}e.currentTime+=n.duration+n.delay;const o=this.visitStyle(r,e);o.isEmptyStep=s,i=o}return e.currentAnimateTimings=null,{type:4,timings:n,style:i,options:null}}visitStyle(t,e){const n=this._makeStyleAst(t,e);return this._validateStyleAst(n,e),n}_makeStyleAst(t,e){const n=[];Array.isArray(t.styles)?t.styles.forEach(t=>{"string"==typeof t?t==ff?n.push(t):e.errors.push(`The provided style string value ${t} is not allowed.`):n.push(t)}):n.push(t.styles);let i=!1,r=null;return n.forEach(t=>{if(Sp(t)){const e=t,n=e.easing;if(n&&(r=n,delete e.easing),!i)for(let t in e)if(e[t].toString().indexOf("{{")>=0){i=!0;break}}}),{type:6,styles:n,easing:r,offset:t.offset,containsDynamicStyles:i,options:null}}_validateStyleAst(t,e){const n=e.currentAnimateTimings;let i=e.currentTime,r=e.currentTime;n&&r>0&&(r-=n.duration+n.delay),t.styles.forEach(t=>{"string"!=typeof t&&Object.keys(t).forEach(n=>{if(!this._driver.validateStyleProperty(n))return void e.errors.push(`The provided animation property "${n}" is not a supported CSS property for animations`);const s=e.collectedStyles[e.currentQuerySelector],o=s[n];let a=!0;o&&(r!=i&&r>=o.startTime&&i<=o.endTime&&(e.errors.push(`The CSS property "${n}" that exists between the times of "${o.startTime}ms" and "${o.endTime}ms" is also being animated in a parallel animation between the times of "${r}ms" and "${i}ms"`),a=!1),r=o.startTime),a&&(s[n]={startTime:r,endTime:i}),e.options&&function(t,e,n){const i=e.params||{},r=op(t);r.length&&r.forEach(t=>{i.hasOwnProperty(t)||n.push(`Unable to resolve the local animation param ${t} in the given list of values`)})}(t[n],e.options,e.errors)})})}visitKeyframes(t,e){const n={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push("keyframes() must be placed inside of a call to animate()"),n;let i=0;const r=[];let s=!1,o=!1,a=0;const l=t.steps.map(t=>{const n=this._makeStyleAst(t,e);let l=null!=n.offset?n.offset:function(t){if("string"==typeof t)return null;let e=null;if(Array.isArray(t))t.forEach(t=>{if(Sp(t)&&t.hasOwnProperty("offset")){const n=t;e=parseFloat(n.offset),delete n.offset}});else if(Sp(t)&&t.hasOwnProperty("offset")){const n=t;e=parseFloat(n.offset),delete n.offset}return e}(n.styles),c=0;return null!=l&&(i++,c=n.offset=l),o=o||c<0||c>1,s=s||c0&&i{const s=u>0?i==h?1:u*i:r[i],o=s*p;e.currentTime=d+f.delay+o,f.duration=o,this._validateStyleAst(t,e),t.offset=s,n.styles.push(t)}),n}visitReference(t,e){return{type:8,animation:fp(this,rp(t.animation),e),options:kp(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:kp(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:kp(t.options)}}visitQuery(t,e){const n=e.currentQuerySelector,i=t.options||{};e.queryCount++,e.currentQuery=t;const[r,s]=function(t){const e=!!t.split(/\s*,\s*/).find(t=>":self"==t);return e&&(t=t.replace(wp,"")),[t=t.replace(/@\*/g,Gf).replace(/@\w+/g,t=>".ng-trigger-"+t.substr(1)).replace(/:animating/g,qf),e]}(t.selector);e.currentQuerySelector=n.length?n+" "+r:r,Df(e.collectedStyles,e.currentQuerySelector,{});const o=fp(this,rp(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=n,{type:11,selector:r,limit:i.limit||0,optional:!!i.optional,includeSelf:s,animation:o,originalSelector:t.selector,options:kp(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push("stagger() can only be used inside of query()");const n="full"===t.timings?{duration:0,delay:0,easing:"full"}:Jf(t.timings,e.errors,!0);return{type:12,animation:fp(this,rp(t.animation),e),timings:n,options:null}}}class Cp{constructor(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null}}function Sp(t){return!Array.isArray(t)&&"object"==typeof t}function kp(t){var e;return t?(t=Qf(t)).params&&(t.params=(e=t.params)?Qf(e):null):t={},t}function Ep(t,e,n){return{duration:t,delay:e,easing:n}}function Ap(t,e,n,i,r,s,o=null,a=!1){return{type:1,element:t,keyframes:e,preStyleProps:n,postStyleProps:i,duration:r,delay:s,totalTime:r+s,easing:o,subTimeline:a}}class Dp{constructor(){this._map=new Map}consume(t){let e=this._map.get(t);return e?this._map.delete(t):e=[],e}append(t,e){let n=this._map.get(t);n||this._map.set(t,n=[]),n.push(...e)}has(t){return this._map.has(t)}clear(){this._map.clear()}}const Tp=new RegExp(":enter","g"),Rp=new RegExp(":leave","g");function Fp(t,e,n,i,r,s={},o={},a,l,c=[]){return(new Mp).buildKeyframes(t,e,n,i,r,s,o,a,l,c)}class Mp{buildKeyframes(t,e,n,i,r,s,o,a,l,c=[]){l=l||new Dp;const u=new $p(t,e,l,i,r,c,[]);u.options=a,u.currentTimeline.setStyles([s],null,u.errors,a),fp(this,n,u);const h=u.timelines.filter(t=>t.containsAnimation());if(h.length&&Object.keys(o).length){const t=h[h.length-1];t.allowOnlyTimelineStyles()||t.setStyles([o],null,u.errors,a)}return h.length?h.map(t=>t.buildKeyframes()):[Ap(e,[],[],[],0,0,"",!1)]}visitTrigger(t,e){}visitState(t,e){}visitTransition(t,e){}visitAnimateChild(t,e){const n=e.subInstructions.consume(e.element);if(n){const i=e.createSubContext(t.options),r=e.currentTimeline.currentTime,s=this._visitSubInstructions(n,i,i.options);r!=s&&e.transformIntoNewTimeline(s)}e.previousNode=t}visitAnimateRef(t,e){const n=e.createSubContext(t.options);n.transformIntoNewTimeline(),this.visitReference(t.animation,n),e.transformIntoNewTimeline(n.currentTimeline.currentTime),e.previousNode=t}_visitSubInstructions(t,e,n){let i=e.currentTimeline.currentTime;const r=null!=n.duration?Yf(n.duration):null,s=null!=n.delay?Yf(n.delay):null;return 0!==r&&t.forEach(t=>{const n=e.appendInstructionToTimeline(t,r,s);i=Math.max(i,n.duration+n.delay)}),i}visitReference(t,e){e.updateOptions(t.options,!0),fp(this,t.animation,e),e.previousNode=t}visitSequence(t,e){const n=e.subContextCount;let i=e;const r=t.options;if(r&&(r.params||r.delay)&&(i=e.createSubContext(r),i.transformIntoNewTimeline(),null!=r.delay)){6==i.previousNode.type&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=Lp);const t=Yf(r.delay);i.delayNextStep(t)}t.steps.length&&(t.steps.forEach(t=>fp(this,t,i)),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>n&&i.transformIntoNewTimeline()),e.previousNode=t}visitGroup(t,e){const n=[];let i=e.currentTimeline.currentTime;const r=t.options&&t.options.delay?Yf(t.options.delay):0;t.steps.forEach(s=>{const o=e.createSubContext(t.options);r&&o.delayNextStep(r),fp(this,s,o),i=Math.max(i,o.currentTimeline.currentTime),n.push(o.currentTimeline)}),n.forEach(t=>e.currentTimeline.mergeTimelineCollectedStyles(t)),e.transformIntoNewTimeline(i),e.previousNode=t}_visitTiming(t,e){if(t.dynamic){const n=t.strValue;return Jf(e.params?ap(n,e.params,e.errors):n,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,e){const n=e.currentAnimateTimings=this._visitTiming(t.timings,e),i=e.currentTimeline;n.delay&&(e.incrementTime(n.delay),i.snapshotCurrentStyles());const r=t.style;5==r.type?this.visitKeyframes(r,e):(e.incrementTime(n.duration),this.visitStyle(r,e),i.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}visitStyle(t,e){const n=e.currentTimeline,i=e.currentAnimateTimings;!i&&n.getCurrentStyleProperties().length&&n.forwardFrame();const r=i&&i.easing||t.easing;t.isEmptyStep?n.applyEmptyStep(r):n.setStyles(t.styles,r,e.errors,e.options),e.previousNode=t}visitKeyframes(t,e){const n=e.currentAnimateTimings,i=e.currentTimeline.duration,r=n.duration,s=e.createSubContext().currentTimeline;s.easing=n.easing,t.styles.forEach(t=>{s.forwardTime((t.offset||0)*r),s.setStyles(t.styles,t.easing,e.errors,e.options),s.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(s),e.transformIntoNewTimeline(i+r),e.previousNode=t}visitQuery(t,e){const n=e.currentTimeline.currentTime,i=t.options||{},r=i.delay?Yf(i.delay):0;r&&(6===e.previousNode.type||0==n&&e.currentTimeline.getCurrentStyleProperties().length)&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=Lp);let s=n;const o=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!i.optional,e.errors);e.currentQueryTotal=o.length;let a=null;o.forEach((n,i)=>{e.currentQueryIndex=i;const o=e.createSubContext(t.options,n);r&&o.delayNextStep(r),n===e.element&&(a=o.currentTimeline),fp(this,t.animation,o),o.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,o.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),a&&(e.currentTimeline.mergeTimelineCollectedStyles(a),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}visitStagger(t,e){const n=e.parentContext,i=e.currentTimeline,r=t.timings,s=Math.abs(r.duration),o=s*(e.currentQueryTotal-1);let a=s*e.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":a=o-a;break;case"full":a=n.currentStaggerTime}const l=e.currentTimeline;a&&l.delayNextStep(a);const c=l.currentTime;fp(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=i.currentTime-c+(i.startTime-n.currentTimeline.startTime)}}const Lp={};class $p{constructor(t,e,n,i,r,s,o,a){this._driver=t,this.element=e,this.subInstructions=n,this._enterClassName=i,this._leaveClassName=r,this.errors=s,this.timelines=o,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Lp,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=a||new Op(this._driver,e,0),o.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,e){if(!t)return;const n=t;let i=this.options;null!=n.duration&&(i.duration=Yf(n.duration)),null!=n.delay&&(i.delay=Yf(n.delay));const r=n.params;if(r){let t=i.params;t||(t=this.options.params={}),Object.keys(r).forEach(n=>{e&&t.hasOwnProperty(n)||(t[n]=ap(r[n],t,this.errors))})}}_copyOptions(){const t={};if(this.options){const e=this.options.params;if(e){const n=t.params={};Object.keys(e).forEach(t=>{n[t]=e[t]})}}return t}createSubContext(t=null,e,n){const i=e||this.element,r=new $p(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,n||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(t),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(t){return this.previousNode=Lp,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,e,n){const i={duration:null!=e?e:t.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+t.delay,easing:""},r=new Ip(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,i,t.stretchStartingKeyframe);return this.timelines.push(r),i}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,e,n,i,r,s){let o=[];if(i&&o.push(this.element),t.length>0){t=(t=t.replace(Tp,"."+this._enterClassName)).replace(Rp,"."+this._leaveClassName);let e=this._driver.query(this.element,t,1!=n);0!==n&&(e=n<0?e.slice(e.length+n,e.length):e.slice(0,n)),o.push(...e)}return r||0!=o.length||s.push(`\`query("${e}")\` returned zero elements. (Use \`query("${e}", { optional: true })\` if you wish to allow this.)`),o}}class Op{constructor(t,e,n,i){this._driver=t,this.element=e,this.startTime=n,this._elementTimelineStylesLookup=i,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}}getCurrentStyleProperties(){return Object.keys(this._currentKeyframe)}get currentTime(){return this.startTime+this.duration}delayNextStep(t){const e=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,e){return this.applyStylesToKeyframe(),new Op(this._driver,t,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,e){this._localTimelineStyles[t]=e,this._globalTimelineStyles[t]=e,this._styleSummary[t]={time:this.currentTime,value:e}}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&(this._previousKeyframe.easing=t),Object.keys(this._globalTimelineStyles).forEach(t=>{this._backFill[t]=this._globalTimelineStyles[t]||ff,this._currentKeyframe[t]=ff}),this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,i){e&&(this._previousKeyframe.easing=e);const r=i&&i.params||{},s=function(t,e){const n={};let i;return t.forEach(t=>{"*"===t?(i=i||Object.keys(e),i.forEach(t=>{n[t]=ff})):Zf(t,!1,n)}),n}(t,this._globalTimelineStyles);Object.keys(s).forEach(t=>{const e=ap(s[t],r,n);this._pendingStyles[t]=e,this._localTimelineStyles.hasOwnProperty(t)||(this._backFill[t]=this._globalTimelineStyles.hasOwnProperty(t)?this._globalTimelineStyles[t]:ff),this._updateStyle(t,e)})}applyStylesToKeyframe(){const t=this._pendingStyles,e=Object.keys(t);0!=e.length&&(this._pendingStyles={},e.forEach(e=>{this._currentKeyframe[e]=t[e]}),Object.keys(this._localTimelineStyles).forEach(t=>{this._currentKeyframe.hasOwnProperty(t)||(this._currentKeyframe[t]=this._localTimelineStyles[t])}))}snapshotCurrentStyles(){Object.keys(this._localTimelineStyles).forEach(t=>{const e=this._localTimelineStyles[t];this._pendingStyles[t]=e,this._updateStyle(t,e)})}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const t=[];for(let e in this._currentKeyframe)t.push(e);return t}mergeTimelineCollectedStyles(t){Object.keys(t._styleSummary).forEach(e=>{const n=this._styleSummary[e],i=t._styleSummary[e];(!n||i.time>n.time)&&this._updateStyle(e,i.value)})}buildKeyframes(){this.applyStylesToKeyframe();const t=new Set,e=new Set,n=1===this._keyframes.size&&0===this.duration;let i=[];this._keyframes.forEach((r,s)=>{const o=Zf(r,!0);Object.keys(o).forEach(n=>{const i=o[n];"!"==i?t.add(n):i==ff&&e.add(n)}),n||(o.offset=s/this.duration),i.push(o)});const r=t.size?lp(t.values()):[],s=e.size?lp(e.values()):[];if(n){const t=i[0],e=Qf(t);t.offset=0,e.offset=1,i=[t,e]}return Ap(this.element,i,r,s,this.duration,this.startTime,this.easing,!1)}}class Ip extends Op{constructor(t,e,n,i,r,s,o=!1){super(t,e,s.delay),this.element=e,this.keyframes=n,this.preStyleProps=i,this.postStyleProps=r,this._stretchStartingKeyframe=o,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:e,duration:n,easing:i}=this.timings;if(this._stretchStartingKeyframe&&e){const r=[],s=n+e,o=e/s,a=Zf(t[0],!1);a.offset=0,r.push(a);const l=Zf(t[0],!1);l.offset=Np(o),r.push(l);const c=t.length-1;for(let i=1;i<=c;i++){let o=Zf(t[i],!1);o.offset=Np((e+o.offset*n)/s),r.push(o)}n=s,e=0,i="",t=r}return Ap(this.element,t,this.preStyleProps,this.postStyleProps,n,e,i,!0)}}function Np(t,e=3){const n=Math.pow(10,e-1);return Math.round(t*n)/n}class Pp{}class Bp extends Pp{normalizePropertyName(t,e){return up(t)}normalizeStyleValue(t,e,n,i){let r="";const s=n.toString().trim();if(Up[e]&&0!==n&&"0"!==n)if("number"==typeof n)r="px";else{const e=n.match(/^[+-]?[\d\.]+([a-z]*)$/);e&&0==e[1].length&&i.push(`Please provide a CSS unit value for ${t}:${n}`)}return s+r}}const Up=(()=>function(t){const e={};return t.forEach(t=>e[t]=!0),e}("width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective".split(",")))();function Vp(t,e,n,i,r,s,o,a,l,c,u,h,d){return{type:0,element:t,triggerName:e,isRemovalTransition:r,fromState:n,fromStyles:s,toState:i,toStyles:o,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:u,totalTime:h,errors:d}}const Hp={};class jp{constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,i){return function(t,e,n,i,r){return t.some(t=>t(e,n,i,r))}(this.ast.matchers,t,e,n,i)}buildStyles(t,e,n){const i=this._stateStyles["*"],r=this._stateStyles[t],s=i?i.buildStyles(e,n):{};return r?r.buildStyles(e,n):s}build(t,e,n,i,r,s,o,a,l,c){const u=[],h=this.ast.options&&this.ast.options.params||Hp,d=this.buildStyles(n,o&&o.params||Hp,u),f=a&&a.params||Hp,p=this.buildStyles(i,f,u),g=new Set,m=new Map,v=new Map,y="void"===i,b={params:Object.assign(Object.assign({},h),f)},w=c?[]:Fp(t,e,this.ast.animation,r,s,d,p,b,l,u);let x=0;if(w.forEach(t=>{x=Math.max(t.duration+t.delay,x)}),u.length)return Vp(e,this._triggerName,n,i,y,d,p,[],[],m,v,x,u);w.forEach(t=>{const n=t.element,i=Df(m,n,{});t.preStyleProps.forEach(t=>i[t]=!0);const r=Df(v,n,{});t.postStyleProps.forEach(t=>r[t]=!0),n!==e&&g.add(n)});const _=lp(g.values());return Vp(e,this._triggerName,n,i,y,d,p,w,_,m,v,x)}}class zp{constructor(t,e){this.styles=t,this.defaultParams=e}buildStyles(t,e){const n={},i=Qf(this.defaultParams);return Object.keys(t).forEach(e=>{const n=t[e];null!=n&&(i[e]=n)}),this.styles.styles.forEach(t=>{if("string"!=typeof t){const r=t;Object.keys(r).forEach(t=>{let s=r[t];s.length>1&&(s=ap(s,i,e)),n[t]=s})}}),n}}class Wp{constructor(t,e){this.name=t,this.ast=e,this.transitionFactories=[],this.states={},e.states.forEach(t=>{this.states[t.name]=new zp(t.style,t.options&&t.options.params||{})}),Gp(this.states,"true","1"),Gp(this.states,"false","0"),e.transitions.forEach(e=>{this.transitionFactories.push(new jp(t,e,this.states))}),this.fallbackTransition=new jp(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[(t,e)=>!0],options:null,queryCount:0,depCount:0},this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,e,n,i){return this.transitionFactories.find(r=>r.match(t,e,n,i))||null}matchStyles(t,e,n){return this.fallbackTransition.buildStyles(t,e,n)}}function Gp(t,e,n){t.hasOwnProperty(e)?t.hasOwnProperty(n)||(t[n]=t[e]):t.hasOwnProperty(n)&&(t[e]=t[n])}const Kp=new Dp;class qp{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._animations={},this._playersById={},this.players=[]}register(t,e){const n=[],i=xp(this._driver,e,n);if(n.length)throw new Error(`Unable to build the animation due to the following errors: ${n.join("\n")}`);this._animations[t]=i}_buildPlayer(t,e,n){const i=t.element,r=Sf(0,this._normalizer,0,t.keyframes,e,n);return this._driver.animate(i,r,t.duration,t.delay,t.easing,[],!0)}create(t,e,n={}){const i=[],r=this._animations[t];let s;const o=new Map;if(r?(s=Fp(this._driver,e,r,jf,zf,{},{},n,Kp,i),s.forEach(t=>{const e=Df(o,t.element,{});t.postStyleProps.forEach(t=>e[t]=null)})):(i.push("The requested animation doesn't exist or has already been destroyed"),s=[]),i.length)throw new Error(`Unable to create the animation due to the following errors: ${i.join("\n")}`);o.forEach((t,e)=>{Object.keys(t).forEach(n=>{t[n]=this._driver.computeStyle(e,n,ff)})});const a=Cf(s.map(t=>{const e=o.get(t.element);return this._buildPlayer(t,{},e)}));return this._playersById[t]=a,a.onDestroy(()=>this.destroy(t)),this.players.push(a),a}destroy(t){const e=this._getPlayer(t);e.destroy(),delete this._playersById[t];const n=this.players.indexOf(e);n>=0&&this.players.splice(n,1)}_getPlayer(t){const e=this._playersById[t];if(!e)throw new Error(`Unable to find the timeline player referenced by ${t}`);return e}listen(t,e,n,i){const r=Af(e,"","","");return kf(this._getPlayer(t),n,r,i),()=>{}}command(t,e,n,i){if("register"==n)return void this.register(t,i[0]);if("create"==n)return void this.create(t,e,i[0]||{});const r=this._getPlayer(t);switch(n){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(t)}}}const Yp="ng-animate-queued",Xp="ng-animate-disabled",Jp=".ng-animate-disabled",Qp=[],Zp={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},tg={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0};class eg{constructor(t,e=""){this.namespaceId=e;const n=t&&t.hasOwnProperty("value");if(this.value=null!=(i=n?t.value:t)?i:null,n){const e=Qf(t);delete e.value,this.options=e}else this.options={};var i;this.options.params||(this.options.params={})}get params(){return this.options.params}absorbOptions(t){const e=t.params;if(e){const t=this.options.params;Object.keys(e).forEach(n=>{null==t[n]&&(t[n]=e[n])})}}}const ng="void",ig=new eg(ng);class rg{constructor(t,e,n){this.id=t,this.hostElement=e,this._engine=n,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,hg(e,this._hostClassName)}listen(t,e,n,i){if(!this._triggers.hasOwnProperty(e))throw new Error(`Unable to listen on the animation trigger event "${n}" because the animation trigger "${e}" doesn't exist!`);if(null==n||0==n.length)throw new Error(`Unable to listen on the animation trigger "${e}" because the provided event is undefined!`);if("start"!=(r=n)&&"done"!=r)throw new Error(`The provided animation trigger event "${n}" for the animation trigger "${e}" is not supported!`);var r;const s=Df(this._elementListeners,t,[]),o={name:e,phase:n,callback:i};s.push(o);const a=Df(this._engine.statesByElement,t,{});return a.hasOwnProperty(e)||(hg(t,Wf),hg(t,"ng-trigger-"+e),a[e]=ig),()=>{this._engine.afterFlush(()=>{const t=s.indexOf(o);t>=0&&s.splice(t,1),this._triggers[e]||delete a[e]})}}register(t,e){return!this._triggers[t]&&(this._triggers[t]=e,!0)}_getTrigger(t){const e=this._triggers[t];if(!e)throw new Error(`The provided animation trigger "${t}" has not been registered!`);return e}trigger(t,e,n,i=!0){const r=this._getTrigger(e),s=new og(this.id,e,t);let o=this._engine.statesByElement.get(t);o||(hg(t,Wf),hg(t,"ng-trigger-"+e),this._engine.statesByElement.set(t,o={}));let a=o[e];const l=new eg(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&a&&l.absorbOptions(a.options),o[e]=l,a||(a=ig),l.value!==ng&&a.value===l.value){if(!function(t,e){const n=Object.keys(t),i=Object.keys(e);if(n.length!=i.length)return!1;for(let r=0;r{ip(t,n),np(t,i)})}return}const c=Df(this._engine.playersByElement,t,[]);c.forEach(t=>{t.namespaceId==this.id&&t.triggerName==e&&t.queued&&t.destroy()});let u=r.matchTransition(a.value,l.value,t,l.params),h=!1;if(!u){if(!i)return;u=r.fallbackTransition,h=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:u,fromState:a,toState:l,player:s,isFallbackTransition:h}),h||(hg(t,Yp),s.onStart(()=>{dg(t,Yp)})),s.onDone(()=>{let e=this.players.indexOf(s);e>=0&&this.players.splice(e,1);const n=this._engine.playersByElement.get(t);if(n){let t=n.indexOf(s);t>=0&&n.splice(t,1)}}),this.players.push(s),c.push(s),s}deregister(t){delete this._triggers[t],this._engine.statesByElement.forEach((e,n)=>{delete e[t]}),this._elementListeners.forEach((e,n)=>{this._elementListeners.set(n,e.filter(e=>e.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);const e=this._engine.playersByElement.get(t);e&&(e.forEach(t=>t.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,e){const n=this._engine.driver.query(t,Gf,!0);n.forEach(t=>{if(t.__ng_removed)return;const n=this._engine.fetchNamespacesByElement(t);n.size?n.forEach(n=>n.triggerLeaveAnimation(t,e,!1,!0)):this.clearElementCache(t)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(t=>this.clearElementCache(t)))}triggerLeaveAnimation(t,e,n,i){const r=this._engine.statesByElement.get(t);if(r){const s=[];if(Object.keys(r).forEach(e=>{if(this._triggers[e]){const n=this.trigger(t,e,ng,i);n&&s.push(n)}}),s.length)return this._engine.markElementAsRemoved(this.id,t,!0,e),n&&Cf(s).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){const e=this._elementListeners.get(t);if(e){const n=new Set;e.forEach(e=>{const i=e.name;if(n.has(i))return;n.add(i);const r=this._triggers[i].fallbackTransition,s=this._engine.statesByElement.get(t)[i]||ig,o=new eg(ng),a=new og(this.id,i,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:i,transition:r,fromState:s,toState:o,player:a,isFallbackTransition:!0})})}}removeNode(t,e){const n=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),this.triggerLeaveAnimation(t,e,!0))return;let i=!1;if(n.totalAnimations){const e=n.players.length?n.playersByQueriedElement.get(t):[];if(e&&e.length)i=!0;else{let e=t;for(;e=e.parentNode;)if(n.statesByElement.get(e)){i=!0;break}}}if(this.prepareLeaveAnimationListeners(t),i)n.markElementAsRemoved(this.id,t,!1,e);else{const i=t.__ng_removed;i&&i!==Zp||(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}}insertNode(t,e){hg(t,this._hostClassName)}drainQueuedTransitions(t){const e=[];return this._queue.forEach(n=>{const i=n.player;if(i.destroyed)return;const r=n.element,s=this._elementListeners.get(r);s&&s.forEach(e=>{if(e.name==n.triggerName){const i=Af(r,n.triggerName,n.fromState.value,n.toState.value);i._data=t,kf(n.player,e.phase,i,e.callback)}}),i.markedForDestroy?this._engine.afterFlush(()=>{i.destroy()}):e.push(n)}),this._queue=[],e.sort((t,e)=>{const n=t.transition.ast.depCount,i=e.transition.ast.depCount;return 0==n||0==i?n-i:this._engine.driver.containsElement(t.element,e.element)?1:-1})}destroy(t){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}elementContainsData(t){let e=!1;return this._elementListeners.has(t)&&(e=!0),e=!!this._queue.find(e=>e.element===t)||e,e}}class sg{constructor(t,e,n){this.bodyNode=t,this.driver=e,this._normalizer=n,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(t,e)=>{}}_onRemovalComplete(t,e){this.onRemovalComplete(t,e)}get queuedPlayers(){const t=[];return this._namespaceList.forEach(e=>{e.players.forEach(e=>{e.queued&&t.push(e)})}),t}createNamespace(t,e){const n=new rg(t,e,this);return e.parentNode?this._balanceNamespaceList(n,e):(this.newHostElements.set(e,n),this.collectEnterElement(e)),this._namespaceLookup[t]=n}_balanceNamespaceList(t,e){const n=this._namespaceList.length-1;if(n>=0){let i=!1;for(let r=n;r>=0;r--)if(this.driver.containsElement(this._namespaceList[r].hostElement,e)){this._namespaceList.splice(r+1,0,t),i=!0;break}i||this._namespaceList.splice(0,0,t)}else this._namespaceList.push(t);return this.namespacesByHostElement.set(e,t),t}register(t,e){let n=this._namespaceLookup[t];return n||(n=this.createNamespace(t,e)),n}registerTrigger(t,e,n){let i=this._namespaceLookup[t];i&&i.register(e,n)&&this.totalAnimations++}destroy(t,e){if(!t)return;const n=this._fetchNamespace(t);this.afterFlush(()=>{this.namespacesByHostElement.delete(n.hostElement),delete this._namespaceLookup[t];const e=this._namespaceList.indexOf(n);e>=0&&this._namespaceList.splice(e,1)}),this.afterFlushAnimationsDone(()=>n.destroy(e))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){const e=new Set,n=this.statesByElement.get(t);if(n){const t=Object.keys(n);for(let i=0;i=0&&this.collectedLeaveElements.splice(t,1)}if(t){const i=this._fetchNamespace(t);i&&i.insertNode(e,n)}i&&this.collectEnterElement(e)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),hg(t,Xp)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),dg(t,Xp))}removeNode(t,e,n,i){if(ag(e)){const r=t?this._fetchNamespace(t):null;if(r?r.removeNode(e,i):this.markElementAsRemoved(t,e,!1,i),n){const n=this.namespacesByHostElement.get(e);n&&n.id!==t&&n.removeNode(e,i)}}else this._onRemovalComplete(e,i)}markElementAsRemoved(t,e,n,i){this.collectedLeaveElements.push(e),e.__ng_removed={namespaceId:t,setForRemoval:i,hasAnimation:n,removedBeforeQueried:!1}}listen(t,e,n,i,r){return ag(e)?this._fetchNamespace(t).listen(e,n,i,r):()=>{}}_buildInstruction(t,e,n,i,r){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,n,i,t.fromState.options,t.toState.options,e,r)}destroyInnerAnimations(t){let e=this.driver.query(t,Gf,!0);e.forEach(t=>this.destroyActiveAnimationsForElement(t)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,qf,!0),e.forEach(t=>this.finishActiveQueriedAnimationOnElement(t)))}destroyActiveAnimationsForElement(t){const e=this.playersByElement.get(t);e&&e.forEach(t=>{t.queued?t.markedForDestroy=!0:t.destroy()})}finishActiveQueriedAnimationOnElement(t){const e=this.playersByQueriedElement.get(t);e&&e.forEach(t=>t.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return Cf(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t.__ng_removed;if(e&&e.setForRemoval){if(t.__ng_removed=Zp,e.namespaceId){this.destroyInnerAnimations(t);const n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}this.driver.matchesElement(t,Jp)&&this.markElementAsDisabled(t,!1),this.driver.query(t,Jp,!0).forEach(t=>{this.markElementAsDisabled(t,!1)})}flush(t=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((t,e)=>this._balanceNamespaceList(t,e)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;nt()),this._flushFns=[],this._whenQuietFns.length){const t=this._whenQuietFns;this._whenQuietFns=[],e.length?Cf(e).onDone(()=>{t.forEach(t=>t())}):t.forEach(t=>t())}}reportError(t){throw new Error(`Unable to process animations due to the following failed trigger transitions\n ${t.join("\n")}`)}_flushAnimations(t,e){const n=new Dp,i=[],r=new Map,s=[],o=new Map,a=new Map,l=new Map,c=new Set;this.disabledNodes.forEach(t=>{c.add(t);const e=this.driver.query(t,".ng-animate-queued",!0);for(let n=0;n{const n=jf+p++;f.set(e,n),t.forEach(t=>hg(t,n))});const g=[],m=new Set,v=new Set;for(let R=0;Rm.add(t)):v.add(t))}const y=new Map,b=ug(h,Array.from(m));b.forEach((t,e)=>{const n=zf+p++;y.set(e,n),t.forEach(t=>hg(t,n))}),t.push(()=>{d.forEach((t,e)=>{const n=f.get(e);t.forEach(t=>dg(t,n))}),b.forEach((t,e)=>{const n=y.get(e);t.forEach(t=>dg(t,n))}),g.forEach(t=>{this.processLeaveNode(t)})});const w=[],x=[];for(let R=this._namespaceList.length-1;R>=0;R--)this._namespaceList[R].drainQueuedTransitions(e).forEach(t=>{const e=t.player,r=t.element;if(w.push(e),this.collectedEnterElements.length){const t=r.__ng_removed;if(t&&t.setForMove)return void e.destroy()}const c=!u||!this.driver.containsElement(u,r),h=y.get(r),d=f.get(r),p=this._buildInstruction(t,n,d,h,c);if(p.errors&&p.errors.length)x.push(p);else{if(c)return e.onStart(()=>ip(r,p.fromStyles)),e.onDestroy(()=>np(r,p.toStyles)),void i.push(e);if(t.isFallbackTransition)return e.onStart(()=>ip(r,p.fromStyles)),e.onDestroy(()=>np(r,p.toStyles)),void i.push(e);p.timelines.forEach(t=>t.stretchStartingKeyframe=!0),n.append(r,p.timelines),s.push({instruction:p,player:e,element:r}),p.queriedElements.forEach(t=>Df(o,t,[]).push(e)),p.preStyleProps.forEach((t,e)=>{const n=Object.keys(t);if(n.length){let t=a.get(e);t||a.set(e,t=new Set),n.forEach(e=>t.add(e))}}),p.postStyleProps.forEach((t,e)=>{const n=Object.keys(t);let i=l.get(e);i||l.set(e,i=new Set),n.forEach(t=>i.add(t))})}});if(x.length){const t=[];x.forEach(e=>{t.push(`@${e.triggerName} has failed due to:\n`),e.errors.forEach(e=>t.push(`- ${e}\n`))}),w.forEach(t=>t.destroy()),this.reportError(t)}const _=new Map,C=new Map;s.forEach(t=>{const e=t.element;n.has(e)&&(C.set(e,e),this._beforeAnimationBuild(t.player.namespaceId,t.instruction,_))}),i.forEach(t=>{const e=t.element;this._getPreviousPlayers(e,!1,t.namespaceId,t.triggerName,null).forEach(t=>{Df(_,e,[]).push(t),t.destroy()})});const S=g.filter(t=>gg(t,a,l)),k=new Map;cg(k,this.driver,v,l,ff).forEach(t=>{gg(t,a,l)&&S.push(t)});const E=new Map;d.forEach((t,e)=>{cg(E,this.driver,new Set(t),a,"!")}),S.forEach(t=>{const e=k.get(t),n=E.get(t);k.set(t,Object.assign(Object.assign({},e),n))});const A=[],D=[],T={};s.forEach(t=>{const{element:e,player:s,instruction:o}=t;if(n.has(e)){if(c.has(e))return s.onDestroy(()=>np(e,o.toStyles)),s.disabled=!0,s.overrideTotalTime(o.totalTime),void i.push(s);let t=T;if(C.size>1){let n=e;const i=[];for(;n=n.parentNode;){const e=C.get(n);if(e){t=e;break}i.push(n)}i.forEach(e=>C.set(e,t))}const n=this._buildAnimation(s.namespaceId,o,_,r,E,k);if(s.setRealPlayer(n),t===T)A.push(s);else{const e=this.playersByElement.get(t);e&&e.length&&(s.parentPlayer=Cf(e)),i.push(s)}}else ip(e,o.fromStyles),s.onDestroy(()=>np(e,o.toStyles)),D.push(s),c.has(e)&&i.push(s)}),D.forEach(t=>{const e=r.get(t.element);if(e&&e.length){const n=Cf(e);t.setRealPlayer(n)}}),i.forEach(t=>{t.parentPlayer?t.syncPlayerEvents(t.parentPlayer):t.destroy()});for(let R=0;R!t.destroyed);i.length?fg(this,t,i):this.processLeaveNode(t)}return g.length=0,A.forEach(t=>{this.players.push(t),t.onDone(()=>{t.destroy();const e=this.players.indexOf(t);this.players.splice(e,1)}),t.play()}),A}elementContainsData(t,e){let n=!1;const i=e.__ng_removed;return i&&i.setForRemoval&&(n=!0),this.playersByElement.has(e)&&(n=!0),this.playersByQueriedElement.has(e)&&(n=!0),this.statesByElement.has(e)&&(n=!0),this._fetchNamespace(t).elementContainsData(e)||n}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,e,n,i,r){let s=[];if(e){const e=this.playersByQueriedElement.get(t);e&&(s=e)}else{const e=this.playersByElement.get(t);if(e){const t=!r||r==ng;e.forEach(e=>{e.queued||(t||e.triggerName==i)&&s.push(e)})}}return(n||i)&&(s=s.filter(t=>!(n&&n!=t.namespaceId||i&&i!=t.triggerName))),s}_beforeAnimationBuild(t,e,n){const i=e.element,r=e.isRemovalTransition?void 0:t,s=e.isRemovalTransition?void 0:e.triggerName;for(const o of e.timelines){const t=o.element,a=t!==i,l=Df(n,t,[]);this._getPreviousPlayers(t,a,r,s,e.toState).forEach(t=>{const e=t.getRealPlayer();e.beforeDestroy&&e.beforeDestroy(),t.destroy(),l.push(t)})}ip(i,e.fromStyles)}_buildAnimation(t,e,n,i,r,s){const o=e.triggerName,a=e.element,l=[],c=new Set,u=new Set,h=e.timelines.map(e=>{const h=e.element;c.add(h);const d=h.__ng_removed;if(d&&d.removedBeforeQueried)return new wf(e.duration,e.delay);const f=h!==a,p=function(t){const e=[];return pg(t,e),e}((n.get(h)||Qp).map(t=>t.getRealPlayer())).filter(t=>!!t.element&&t.element===h),g=r.get(h),m=s.get(h),v=Sf(0,this._normalizer,0,e.keyframes,g,m),y=this._buildPlayer(e,v,p);if(e.subTimeline&&i&&u.add(h),f){const e=new og(t,o,h);e.setRealPlayer(y),l.push(e)}return y});l.forEach(t=>{Df(this.playersByQueriedElement,t.element,[]).push(t),t.onDone(()=>function(t,e,n){let i;if(t instanceof Map){if(i=t.get(e),i){if(i.length){const t=i.indexOf(n);i.splice(t,1)}0==i.length&&t.delete(e)}}else if(i=t[e],i){if(i.length){const t=i.indexOf(n);i.splice(t,1)}0==i.length&&delete t[e]}return i}(this.playersByQueriedElement,t.element,t))}),c.forEach(t=>hg(t,Kf));const d=Cf(h);return d.onDestroy(()=>{c.forEach(t=>dg(t,Kf)),np(a,e.toStyles)}),u.forEach(t=>{Df(i,t,[]).push(d)}),d}_buildPlayer(t,e,n){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,n):new wf(t.duration,t.delay)}}class og{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new wf,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,Object.keys(this._queuedCallbacks).forEach(e=>{this._queuedCallbacks[e].forEach(n=>kf(t,e,void 0,n))}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){const e=this._player;e.triggerCallback&&t.onStart(()=>e.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,e){Df(this._queuedCallbacks,t,[]).push(e)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){const e=this._player;e.triggerCallback&&e.triggerCallback(t)}}function ag(t){return t&&1===t.nodeType}function lg(t,e){const n=t.style.display;return t.style.display=null!=e?e:"none",n}function cg(t,e,n,i,r){const s=[];n.forEach(t=>s.push(lg(t)));const o=[];i.forEach((n,i)=>{const s={};n.forEach(t=>{const n=s[t]=e.computeStyle(i,t,r);n&&0!=n.length||(i.__ng_removed=tg,o.push(i))}),t.set(i,s)});let a=0;return n.forEach(t=>lg(t,s[a++])),o}function ug(t,e){const n=new Map;if(t.forEach(t=>n.set(t,[])),0==e.length)return n;const i=new Set(e),r=new Map;function s(t){if(!t)return 1;let e=r.get(t);if(e)return e;const o=t.parentNode;return e=n.has(o)?o:i.has(o)?1:s(o),r.set(t,e),e}return e.forEach(t=>{const e=s(t);1!==e&&n.get(e).push(t)}),n}function hg(t,e){if(t.classList)t.classList.add(e);else{let n=t.$$classes;n||(n=t.$$classes={}),n[e]=!0}}function dg(t,e){if(t.classList)t.classList.remove(e);else{let n=t.$$classes;n&&delete n[e]}}function fg(t,e,n){Cf(n).onDone(()=>t.processLeaveNode(e))}function pg(t,e){for(let n=0;nr.add(t)):e.set(t,i),n.delete(t),!0}class mg{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._triggerCache={},this.onRemovalComplete=(t,e)=>{},this._transitionEngine=new sg(t,e,n),this._timelineEngine=new qp(t,e,n),this._transitionEngine.onRemovalComplete=(t,e)=>this.onRemovalComplete(t,e)}registerTrigger(t,e,n,i,r){const s=t+"-"+i;let o=this._triggerCache[s];if(!o){const t=[],e=xp(this._driver,r,t);if(t.length)throw new Error(`The animation trigger "${i}" has failed to build due to the following errors:\n - ${t.join("\n - ")}`);o=function(t,e){return new Wp(t,e)}(i,e),this._triggerCache[s]=o}this._transitionEngine.registerTrigger(e,i,o)}register(t,e){this._transitionEngine.register(t,e)}destroy(t,e){this._transitionEngine.destroy(t,e)}onInsert(t,e,n,i){this._transitionEngine.insertNode(t,e,n,i)}onRemove(t,e,n,i){this._transitionEngine.removeNode(t,e,i||!1,n)}disableAnimations(t,e){this._transitionEngine.markElementAsDisabled(t,e)}process(t,e,n,i){if("@"==n.charAt(0)){const[t,r]=Tf(n);this._timelineEngine.command(t,e,r,i)}else this._transitionEngine.trigger(t,e,n,i)}listen(t,e,n,i,r){if("@"==n.charAt(0)){const[t,i]=Tf(n);return this._timelineEngine.listen(t,e,i,r)}return this._transitionEngine.listen(t,e,n,i,r)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}function vg(t,e){let n=null,i=null;return Array.isArray(e)&&e.length?(n=bg(e[0]),e.length>1&&(i=bg(e[e.length-1]))):e&&(n=bg(e)),n||i?new yg(t,n,i):null}let yg=(()=>{class t{constructor(e,n,i){this._element=e,this._startStyles=n,this._endStyles=i,this._state=0;let r=t.initialStylesByElement.get(e);r||t.initialStylesByElement.set(e,r={}),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&np(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(np(this._element,this._initialStyles),this._endStyles&&(np(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(ip(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(ip(this._element,this._endStyles),this._endStyles=null),np(this._element,this._initialStyles),this._state=3)}}return t.initialStylesByElement=new WeakMap,t})();function bg(t){let e=null;const n=Object.keys(t);for(let i=0;ithis._handleCallback(t)}apply(){!function(t,e){const n=Tg(t,"").trim();n.length&&(function(t,e){let n=0;for(let i=0;i=this._delay&&n>=this._duration&&this.finish()}finish(){this._finished||(this._finished=!0,this._onDoneFn(),Ag(this._element,this._eventFn,!0))}destroy(){this._destroyed||(this._destroyed=!0,this.finish(),function(t,e){const n=Tg(t,"").split(","),i=Eg(n,e);i>=0&&(n.splice(i,1),Dg(t,"",n.join(",")))}(this._element,this._name))}}function Sg(t,e,n){Dg(t,"PlayState",n,kg(t,e))}function kg(t,e){const n=Tg(t,"");return n.indexOf(",")>0?Eg(n.split(","),e):Eg([n],e)}function Eg(t,e){for(let n=0;n=0)return n;return-1}function Ag(t,e,n){n?t.removeEventListener(_g,e):t.addEventListener(_g,e)}function Dg(t,e,n,i){const r=xg+e;if(null!=i){const e=t.style[r];if(e.length){const t=e.split(",");t[i]=n,n=t.join(",")}}t.style[r]=n}function Tg(t,e){return t.style[xg+e]}class Rg{constructor(t,e,n,i,r,s,o,a){this.element=t,this.keyframes=e,this.animationName=n,this._duration=i,this._delay=r,this._finalStyles=o,this._specialStyles=a,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this._state=0,this.easing=s||"linear",this.totalTime=i+r,this._buildStyler()}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}destroy(){this.init(),this._state>=4||(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}_flushDoneFns(){this._onDoneFns.forEach(t=>t()),this._onDoneFns=[]}_flushStartFns(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}finish(){this.init(),this._state>=3||(this._state=3,this._styler.finish(),this._flushStartFns(),this._specialStyles&&this._specialStyles.finish(),this._flushDoneFns())}setPosition(t){this._styler.setPosition(t)}getPosition(){return this._styler.getPosition()}hasStarted(){return this._state>=2}init(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())}play(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2,this._specialStyles&&this._specialStyles.start()),this._styler.resume()}pause(){this.init(),this._styler.pause()}restart(){this.reset(),this.play()}reset(){this._styler.destroy(),this._buildStyler(),this._styler.apply()}_buildStyler(){this._styler=new Cg(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",()=>this.finish())}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}beforeDestroy(){this.init();const t={};if(this.hasStarted()){const e=this._state>=3;Object.keys(this._finalStyles).forEach(n=>{"offset"!=n&&(t[n]=e?this._finalStyles[n]:pp(this.element,n))})}this.currentSnapshot=t}}class Fg extends wf{constructor(t,e){super(),this.element=t,this._startingStyles={},this.__initialized=!1,this._styles=Uf(e)}init(){!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach(t=>{this._startingStyles[t]=this.element.style[t]}),super.init())}play(){this._startingStyles&&(this.init(),Object.keys(this._styles).forEach(t=>this.element.style.setProperty(t,this._styles[t])),super.play())}destroy(){this._startingStyles&&(Object.keys(this._startingStyles).forEach(t=>{const e=this._startingStyles[t];e?this.element.style.setProperty(t,e):this.element.style.removeProperty(t)}),this._startingStyles=null,super.destroy())}}class Mg{constructor(){this._count=0,this._head=document.querySelector("head"),this._warningIssued=!1}validateStyleProperty(t){return If(t)}matchesElement(t,e){return Nf(t,e)}containsElement(t,e){return Pf(t,e)}query(t,e,n){return Bf(t,e,n)}computeStyle(t,e,n){return window.getComputedStyle(t)[e]}buildKeyframeElement(t,e,n){n=n.map(t=>Uf(t));let i=`@keyframes ${e} {\n`,r="";n.forEach(t=>{r=" ";const e=parseFloat(t.offset);i+=`${r}${100*e}% {\n`,r+=" ",Object.keys(t).forEach(e=>{const n=t[e];switch(e){case"offset":return;case"easing":return void(n&&(i+=`${r}animation-timing-function: ${n};\n`));default:return void(i+=`${r}${e}: ${n};\n`)}}),i+=`${r}}\n`}),i+="}\n";const s=document.createElement("style");return s.textContent=i,s}animate(t,e,n,i,r,s=[],o){o&&this._notifyFaultyScrubber();const a=s.filter(t=>t instanceof Rg),l={};hp(n,i)&&a.forEach(t=>{let e=t.currentSnapshot;Object.keys(e).forEach(t=>l[t]=e[t])});const c=function(t){let e={};return t&&(Array.isArray(t)?t:[t]).forEach(t=>{Object.keys(t).forEach(n=>{"offset"!=n&&"easing"!=n&&(e[n]=t[n])})}),e}(e=dp(t,e,l));if(0==n)return new Fg(t,c);const u="gen_css_kf_"+this._count++,h=this.buildKeyframeElement(t,u,e);document.querySelector("head").appendChild(h);const d=vg(t,e),f=new Rg(t,e,u,n,i,r,c,d);return f.onDestroy(()=>{var t;(t=h).parentNode.removeChild(t)}),f}_notifyFaultyScrubber(){this._warningIssued||(console.warn("@angular/animations: please load the web-animations.js polyfill to allow programmatic access...\n"," visit http://bit.ly/IWukam to learn more about using the web-animation-js polyfill."),this._warningIssued=!0)}}class Lg{constructor(t,e,n,i){this.element=t,this.keyframes=e,this.options=n,this._specialStyles=i,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:{},this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_triggerWebAnimation(t,e,n){return t.animate(e,n)}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}setPosition(t){this.domPlayer.currentTime=t*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const t={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(e=>{"offset"!=e&&(t[e]=this._finished?this._finalKeyframe[e]:pp(this.element,e))}),this.currentSnapshot=t}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}class $g{constructor(){this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(Og().toString()),this._cssKeyframesDriver=new Mg}validateStyleProperty(t){return If(t)}matchesElement(t,e){return Nf(t,e)}containsElement(t,e){return Pf(t,e)}query(t,e,n){return Bf(t,e,n)}computeStyle(t,e,n){return window.getComputedStyle(t)[e]}overrideWebAnimationsSupport(t){this._isNativeImpl=t}animate(t,e,n,i,r,s=[],o){if(!o&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(t,e,n,i,r,s);const a={duration:n,delay:i,fill:0==i?"both":"forwards"};r&&(a.easing=r);const l={},c=s.filter(t=>t instanceof Lg);hp(n,i)&&c.forEach(t=>{let e=t.currentSnapshot;Object.keys(e).forEach(t=>l[t]=e[t])});const u=vg(t,e=dp(t,e=e.map(t=>Zf(t,!1)),l));return new Lg(t,e,a,u)}}function Og(){return"undefined"!=typeof window&&void 0!==window.document&&Element.prototype.animate||{}}let Ig=(()=>{class t extends df{constructor(t,e){super(),this._nextAnimationId=0,this._renderer=t.createRenderer(e.body,{id:"0",encapsulation:ue.None,styles:[],data:{animation:[]}})}build(t){const e=this._nextAnimationId.toString();this._nextAnimationId++;const n=Array.isArray(t)?mf(t):t;return Bg(this._renderer,null,e,"register",[n]),new Ng(e,this._renderer)}}return t.\u0275fac=function(e){return new(e||t)(Yt(dc),Yt(wh))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();class Ng extends class{}{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new Pg(this._id,t,e||{},this._renderer)}}class Pg{constructor(t,e,n,i){this.id=t,this.element=e,this._renderer=i,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",n)}_listen(t,e){return this._renderer.listen(this.element,`@@${this.id}:${t}`,e)}_command(t,...e){return Bg(this._renderer,this.element,this.id,t,e)}onDone(t){this._listen("done",t)}onStart(t){this._listen("start",t)}onDestroy(t){this._listen("destroy",t)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset")}setPosition(t){this._command("setPosition",t)}getPosition(){return 0}}function Bg(t,e,n,i,r){return t.setProperty(e,`@@${n}:${i}`,r)}const Ug="@",Vg="@.disabled";let Hg=(()=>{class t{constructor(t,e,n){this.delegate=t,this.engine=e,this._zone=n,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),e.onRemovalComplete=(t,e)=>{e&&e.parentNode(t)&&e.removeChild(t.parentNode,t)}}createRenderer(t,e){const n=this.delegate.createRenderer(t,e);if(!(t&&e&&e.data&&e.data.animation)){let t=this._rendererCache.get(n);return t||(t=new jg("",n,this.engine),this._rendererCache.set(n,t)),t}const i=e.id,r=e.id+"-"+this._currentId;this._currentId++,this.engine.register(r,t);const s=e=>{Array.isArray(e)?e.forEach(s):this.engine.registerTrigger(i,r,t,e.name,e)};return e.data.animation.forEach(s),new zg(this,r,n,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(t,e,n){t>=0&&te(n)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(t=>{const[e,n]=t;e(n)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([e,n]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return t.\u0275fac=function(e){return new(e||t)(Yt(dc),Yt(mg),Yt(ju))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();class jg{constructor(t,e,n){this.namespaceId=t,this.delegate=e,this.engine=n,this.destroyNode=this.delegate.destroyNode?t=>e.destroyNode(t):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)}insertBefore(t,e,n,i=!0){this.delegate.insertBefore(t,e,n),this.engine.onInsert(this.namespaceId,e,t,i)}removeChild(t,e,n){this.engine.onRemove(this.namespaceId,e,this.delegate,n)}selectRootElement(t,e){return this.delegate.selectRootElement(t,e)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,e,n,i){this.delegate.setAttribute(t,e,n,i)}removeAttribute(t,e,n){this.delegate.removeAttribute(t,e,n)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,n,i){this.delegate.setStyle(t,e,n,i)}removeStyle(t,e,n){this.delegate.removeStyle(t,e,n)}setProperty(t,e,n){e.charAt(0)==Ug&&e==Vg?this.disableAnimations(t,!!n):this.delegate.setProperty(t,e,n)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,n){return this.delegate.listen(t,e,n)}disableAnimations(t,e){this.engine.disableAnimations(t,e)}}class zg extends jg{constructor(t,e,n,i){super(e,n,i),this.factory=t,this.namespaceId=e}setProperty(t,e,n){e.charAt(0)==Ug?"."==e.charAt(1)&&e==Vg?this.disableAnimations(t,n=void 0===n||!!n):this.engine.process(this.namespaceId,t,e.substr(1),n):this.delegate.setProperty(t,e,n)}listen(t,e,n){if(e.charAt(0)==Ug){const i=function(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(t);let r=e.substr(1),s="";return r.charAt(0)!=Ug&&([r,s]=function(t){const e=t.indexOf(".");return[t.substring(0,e),t.substr(e+1)]}(r)),this.engine.listen(this.namespaceId,i,r,s,t=>{this.factory.scheduleListenerCallback(t._data||-1,n,t)})}return this.delegate.listen(t,e,n)}}let Wg=(()=>{class t extends mg{constructor(t,e,n){super(t.body,e,n)}}return t.\u0275fac=function(e){return new(e||t)(Yt(wh),Yt(Hf),Yt(Pp))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();const Gg=new Pt("AnimationModuleType"),Kg=[{provide:df,useClass:Ig},{provide:Pp,useFactory:function(){return new Bp}},{provide:mg,useClass:Wg},{provide:dc,useFactory:function(t,e,n){return new Hg(t,e,n)},deps:[Xd,mg,ju]}],qg=[{provide:Hf,useFactory:function(){return"function"==typeof Og()?new $g:new Mg}},{provide:Gg,useValue:"BrowserAnimations"},...Kg],Yg=[{provide:Hf,useClass:Vf},{provide:Gg,useValue:"NoopAnimations"},...Kg];let Xg=(()=>{class t{}return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},providers:qg,imports:[hf]}),t})(),Jg=(()=>{class t{}return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},providers:Yg,imports:[hf]}),t})();function Qg(...t){let e=t[t.length-1];return k(e)?(t.pop(),O(t,e)):z(t)}class Zg extends C{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const e=super._subscribe(t);return e&&!e.closed&&t.next(this._value),e}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new w;return this._value}next(t){super.next(this._value=t)}}class tm extends p{notifyNext(t,e,n,i,r){this.destination.next(e)}notifyError(t,e){this.destination.error(t)}notifyComplete(t){this.destination.complete()}}class em extends p{constructor(t,e,n){super(),this.parent=t,this.outerValue=e,this.outerIndex=n,this.index=0}_next(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)}_error(t){this.parent.notifyError(t,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}function nm(t,e,n,i,r=new em(t,n,i)){if(!r.closed)return e instanceof y?e.subscribe(r):$(e)(r)}const im={};class rm{constructor(t){this.resultSelector=t}call(t,e){return e.subscribe(new sm(t,this.resultSelector))}}class sm extends tm{constructor(t,e){super(t),this.resultSelector=e,this.active=0,this.values=[],this.observables=[]}_next(t){this.values.push(im),this.observables.push(t)}_complete(){const t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(let n=0;n{function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t})(),am=new y(t=>t.complete());function lm(t){return t?function(t){return new y(e=>t.schedule(()=>e.complete()))}(t):am}function cm(t){return new y(e=>{let n;try{n=t()}catch(i){return void e.error(i)}return(n?I(n):lm()).subscribe(e)})}function um(){return j(1)}function hm(t,e){return function(n){return n.lift(new dm(t,e))}}class dm{constructor(t,e){this.predicate=t,this.thisArg=e}call(t,e){return e.subscribe(new fm(t,this.predicate,this.thisArg))}}class fm extends p{constructor(t,e,n){super(t),this.predicate=e,this.thisArg=n,this.count=0}_next(t){let e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}e&&this.destination.next(t)}}const pm=(()=>{function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t})();function gm(t){return function(e){return 0===t?lm():e.lift(new mm(t))}}class mm{constructor(t){if(this.total=t,this.total<0)throw new pm}call(t,e){return e.subscribe(new vm(t,this.total))}}class vm extends p{constructor(t,e){super(t),this.total=e,this.ring=new Array,this.count=0}_next(t){const e=this.ring,n=this.total,i=this.count++;e.length0){const n=this.count>=this.total?this.total:this.count,i=this.ring;for(let r=0;re.lift(new bm(t))}class bm{constructor(t){this.errorFactory=t}call(t,e){return e.subscribe(new wm(t,this.errorFactory))}}class wm extends p{constructor(t,e){super(t),this.errorFactory=e,this.hasValue=!1}_next(t){this.hasValue=!0,this.destination.next(t)}_complete(){if(this.hasValue)return this.destination.complete();{let e;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)}}}function xm(){return new om}function _m(t=null){return e=>e.lift(new Cm(t))}class Cm{constructor(t){this.defaultValue=t}call(t,e){return e.subscribe(new Sm(t,this.defaultValue))}}class Sm extends p{constructor(t,e){super(t),this.defaultValue=e,this.isEmpty=!0}_next(t){this.isEmpty=!1,this.destination.next(t)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}function km(t,e){return"function"==typeof e?n=>n.pipe(km((n,i)=>I(t(n,i)).pipe(E((t,r)=>e(n,t,i,r))))):e=>e.lift(new Em(t))}class Em{constructor(t){this.project=t}call(t,e){return e.subscribe(new Am(t,this.project))}}class Am extends P{constructor(t,e){super(t),this.project=e,this.index=0}_next(t){let e;const n=this.index++;try{e=this.project(t,n)}catch(i){return void this.destination.error(i)}this._innerSub(e)}_innerSub(t){const e=this.innerSubscription;e&&e.unsubscribe();const n=new N(this),i=this.destination;i.add(n),this.innerSubscription=B(t,n),this.innerSubscription!==n&&i.add(this.innerSubscription)}_complete(){const{innerSubscription:t}=this;t&&!t.closed||super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(t){this.destination.next(t)}}function Dm(t){return e=>0===t?lm():e.lift(new Tm(t))}class Tm{constructor(t){if(this.total=t,this.total<0)throw new pm}call(t,e){return e.subscribe(new Rm(t,this.total))}}class Rm extends p{constructor(t,e){super(t),this.total=e,this.count=0}_next(t){const e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))}}function Fm(...t){return um()(Qg(...t))}class Mm{constructor(t,e,n=!1){this.accumulator=t,this.seed=e,this.hasSeed=n}call(t,e){return e.subscribe(new Lm(t,this.accumulator,this.seed,this.hasSeed))}}class Lm extends p{constructor(t,e,n,i){super(t),this.accumulator=e,this._seed=n,this.hasSeed=i,this.index=0}get seed(){return this._seed}set seed(t){this.hasSeed=!0,this._seed=t}_next(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)}_tryNext(t){const e=this.index++;let n;try{n=this.accumulator(this.seed,t,e)}catch(i){this.destination.error(i)}this.seed=n,this.destination.next(n)}}function $m(t){return function(e){const n=new Om(t),i=e.lift(n);return n.caught=i}}class Om{constructor(t){this.selector=t}call(t,e){return e.subscribe(new Im(t,this.selector,this.caught))}}class Im extends P{constructor(t,e,n){super(t),this.selector=e,this.caught=n}error(t){if(!this.isStopped){let n;try{n=this.selector(t,this.caught)}catch(e){return void super.error(e)}this._unsubscribeAndRecycle();const i=new N(this);this.add(i);const r=B(n,i);r!==i&&this.add(r)}}}function Nm(t,e){return U(t,e,1)}function Pm(t,e){const n=arguments.length>=2;return i=>i.pipe(t?hm((e,n)=>t(e,n,i)):v,Dm(1),n?_m(e):ym(()=>new om))}function Bm(){}function Um(t,e,n){return function(i){return i.lift(new Vm(t,e,n))}}class Vm{constructor(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}call(t,e){return e.subscribe(new Hm(t,this.nextOrObserver,this.error,this.complete))}}class Hm extends p{constructor(t,e,n,r){super(t),this._tapNext=Bm,this._tapError=Bm,this._tapComplete=Bm,this._tapError=n||Bm,this._tapComplete=r||Bm,i(e)?(this._context=this,this._tapNext=e):e&&(this._context=e,this._tapNext=e.next||Bm,this._tapError=e.error||Bm,this._tapComplete=e.complete||Bm)}_next(t){try{this._tapNext.call(this._context,t)}catch(e){return void this.destination.error(e)}this.destination.next(t)}_error(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)}_complete(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()}}class jm{constructor(t){this.callback=t}call(t,e){return e.subscribe(new zm(t,this.callback))}}class zm extends p{constructor(t,e){super(t),this.add(new h(e))}}class Wm{constructor(t,e){this.id=t,this.url=e}}class Gm extends Wm{constructor(t,e,n="imperative",i=null){super(t,e),this.navigationTrigger=n,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class Km extends Wm{constructor(t,e,n){super(t,e),this.urlAfterRedirects=n}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class qm extends Wm{constructor(t,e,n){super(t,e),this.reason=n}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class Ym extends Wm{constructor(t,e,n){super(t,e),this.error=n}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class Xm extends Wm{constructor(t,e,n,i){super(t,e),this.urlAfterRedirects=n,this.state=i}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Jm extends Wm{constructor(t,e,n,i){super(t,e),this.urlAfterRedirects=n,this.state=i}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Qm extends Wm{constructor(t,e,n,i,r){super(t,e),this.urlAfterRedirects=n,this.state=i,this.shouldActivate=r}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class Zm extends Wm{constructor(t,e,n,i){super(t,e),this.urlAfterRedirects=n,this.state=i}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class tv extends Wm{constructor(t,e,n,i){super(t,e),this.urlAfterRedirects=n,this.state=i}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class ev{constructor(t){this.route=t}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class nv{constructor(t){this.route=t}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class iv{constructor(t){this.snapshot=t}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class rv{constructor(t){this.snapshot=t}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class sv{constructor(t){this.snapshot=t}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class ov{constructor(t){this.snapshot=t}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class av{constructor(t,e,n){this.routerEvent=t,this.position=e,this.anchor=n}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}const lv="primary";class cv{constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e[0]:e}return null}getAll(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}}function uv(t){return new cv(t)}function hv(t){const e=Error("NavigationCancelingError: "+t);return e.ngNavigationCancelingError=!0,e}function dv(t,e,n){const i=n.path.split("/");if(i.length>t.length)return null;if("full"===n.pathMatch&&(e.hasChildren()||i.lengthi[e]===t)}return t===e}function gv(t){return Array.prototype.concat.apply([],t)}function mv(t){return t.length>0?t[t.length-1]:null}function vv(t,e){for(const n in t)t.hasOwnProperty(n)&&e(t[n],n)}function yv(t){return va(t)?t:ma(t)?I(Promise.resolve(t)):Qg(t)}function bv(t,e,n){return n?function(t,e){return fv(t,e)}(t.queryParams,e.queryParams)&&wv(t.root,e.root):function(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every(n=>pv(t[n],e[n]))}(t.queryParams,e.queryParams)&&xv(t.root,e.root)}function wv(t,e){if(!Ev(t.segments,e.segments))return!1;if(t.numberOfChildren!==e.numberOfChildren)return!1;for(const n in e.children){if(!t.children[n])return!1;if(!wv(t.children[n],e.children[n]))return!1}return!0}function xv(t,e){return _v(t,e,e.segments)}function _v(t,e,n){if(t.segments.length>n.length)return!!Ev(t.segments.slice(0,n.length),n)&&!e.hasChildren();if(t.segments.length===n.length){if(!Ev(t.segments,n))return!1;for(const n in e.children){if(!t.children[n])return!1;if(!xv(t.children[n],e.children[n]))return!1}return!0}{const i=n.slice(0,t.segments.length),r=n.slice(t.segments.length);return!!Ev(t.segments,i)&&!!t.children.primary&&_v(t.children.primary,e,r)}}class Cv{constructor(t,e,n){this.root=t,this.queryParams=e,this.fragment=n}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=uv(this.queryParams)),this._queryParamMap}toString(){return Rv.serialize(this)}}class Sv{constructor(t,e){this.segments=t,this.children=e,this.parent=null,vv(e,(t,e)=>t.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Fv(this)}}class kv{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=uv(this.parameters)),this._parameterMap}toString(){return Pv(this)}}function Ev(t,e){return t.length===e.length&&t.every((t,n)=>t.path===e[n].path)}function Av(t,e){let n=[];return vv(t.children,(t,i)=>{i===lv&&(n=n.concat(e(t,i)))}),vv(t.children,(t,i)=>{i!==lv&&(n=n.concat(e(t,i)))}),n}class Dv{}class Tv{parse(t){const e=new jv(t);return new Cv(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){var e;return`/${Mv(t.root,!0)}${function(t){const e=Object.keys(t).map(e=>{const n=t[e];return Array.isArray(n)?n.map(t=>`${$v(e)}=${$v(t)}`).join("&"):`${$v(e)}=${$v(n)}`});return e.length?`?${e.join("&")}`:""}(t.queryParams)}${"string"==typeof t.fragment?`#${e=t.fragment,encodeURI(e)}`:""}`}}const Rv=new Tv;function Fv(t){return t.segments.map(t=>Pv(t)).join("/")}function Mv(t,e){if(!t.hasChildren())return Fv(t);if(e){const e=t.children.primary?Mv(t.children.primary,!1):"",n=[];return vv(t.children,(t,e)=>{e!==lv&&n.push(`${e}:${Mv(t,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}{const e=Av(t,(e,n)=>n===lv?[Mv(t.children.primary,!1)]:[`${n}:${Mv(e,!1)}`]);return 1===Object.keys(t.children).length&&null!=t.children.primary?`${Fv(t)}/${e[0]}`:`${Fv(t)}/(${e.join("//")})`}}function Lv(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function $v(t){return Lv(t).replace(/%3B/gi,";")}function Ov(t){return Lv(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Iv(t){return decodeURIComponent(t)}function Nv(t){return Iv(t.replace(/\+/g,"%20"))}function Pv(t){return`${Ov(t.path)}${e=t.parameters,Object.keys(e).map(t=>`;${Ov(t)}=${Ov(e[t])}`).join("")}`;var e}const Bv=/^[^\/()?;=#]+/;function Uv(t){const e=t.match(Bv);return e?e[0]:""}const Vv=/^[^=?&#]+/,Hv=/^[^?&#]+/;class jv{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Sv([],{}):new Sv([],this.parseChildren())}parseQueryParams(){const t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(n.primary=new Sv(t,e)),n}parseSegment(){const t=Uv(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);return this.capture(t),new kv(Iv(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=Uv(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const t=Uv(this.remaining);t&&(n=t,this.capture(n))}t[Iv(e)]=Iv(n)}parseQueryParam(t){const e=function(t){const e=t.match(Vv);return e?e[0]:""}(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const t=function(t){const e=t.match(Hv);return e?e[0]:""}(this.remaining);t&&(n=t,this.capture(n))}const i=Nv(e),r=Nv(n);if(t.hasOwnProperty(i)){let e=t[i];Array.isArray(e)||(e=[e],t[i]=e),e.push(r)}else t[i]=r}parseParens(t){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const n=Uv(this.remaining),i=this.remaining[n.length];if("/"!==i&&")"!==i&&";"!==i)throw new Error(`Cannot parse url '${this.url}'`);let r;n.indexOf(":")>-1?(r=n.substr(0,n.indexOf(":")),this.capture(r),this.capture(":")):t&&(r=lv);const s=this.parseChildren();e[r]=1===Object.keys(s).length?s.primary:new Sv([],s),this.consumeOptional("//")}return e}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)}capture(t){if(!this.consumeOptional(t))throw new Error(`Expected "${t}".`)}}class zv{constructor(t){this._root=t}get root(){return this._root.value}parent(t){const e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}children(t){const e=Wv(t,this._root);return e?e.children.map(t=>t.value):[]}firstChild(t){const e=Wv(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=Gv(t,this._root);return e.length<2?[]:e[e.length-2].children.map(t=>t.value).filter(e=>e!==t)}pathFromRoot(t){return Gv(t,this._root).map(t=>t.value)}}function Wv(t,e){if(t===e.value)return e;for(const n of e.children){const e=Wv(t,n);if(e)return e}return null}function Gv(t,e){if(t===e.value)return[e];for(const n of e.children){const i=Gv(t,n);if(i.length)return i.unshift(e),i}return[]}class Kv{constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}}function qv(t){const e={};return t&&t.children.forEach(t=>e[t.value.outlet]=t),e}class Yv extends zv{constructor(t,e){super(t),this.snapshot=e,ey(this,t)}toString(){return this.snapshot.toString()}}function Xv(t,e){const n=function(t,e){const n=new Zv([],{},{},"",{},lv,e,null,t.root,-1,{});return new ty("",new Kv(n,[]))}(t,e),i=new Zg([new kv("",{})]),r=new Zg({}),s=new Zg({}),o=new Zg({}),a=new Zg(""),l=new Jv(i,r,o,a,s,lv,e,n.root);return l.snapshot=n.root,new Yv(new Kv(l,[]),n)}class Jv{constructor(t,e,n,i,r,s,o,a){this.url=t,this.params=e,this.queryParams=n,this.fragment=i,this.data=r,this.outlet=s,this.component=o,this._futureSnapshot=a}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(E(t=>uv(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(E(t=>uv(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function Qv(t,e="emptyOnly"){const n=t.pathFromRoot;let i=0;if("always"!==e)for(i=n.length-1;i>=1;){const t=n[i],e=n[i-1];if(t.routeConfig&&""===t.routeConfig.path)i--;else{if(e.component)break;i--}}return function(t){return t.reduce((t,e)=>({params:Object.assign(Object.assign({},t.params),e.params),data:Object.assign(Object.assign({},t.data),e.data),resolve:Object.assign(Object.assign({},t.resolve),e._resolvedData)}),{params:{},data:{},resolve:{}})}(n.slice(i))}class Zv{constructor(t,e,n,i,r,s,o,a,l,c,u){this.url=t,this.params=e,this.queryParams=n,this.fragment=i,this.data=r,this.outlet=s,this.component=o,this.routeConfig=a,this._urlSegment=l,this._lastPathIndex=c,this._resolve=u}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=uv(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=uv(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(t=>t.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class ty extends zv{constructor(t,e){super(e),this.url=t,ey(this,e)}toString(){return ny(this._root)}}function ey(t,e){e.value._routerState=t,e.children.forEach(e=>ey(t,e))}function ny(t){const e=t.children.length>0?` { ${t.children.map(ny).join(", ")} } `:"";return`${t.value}${e}`}function iy(t){if(t.snapshot){const e=t.snapshot,n=t._futureSnapshot;t.snapshot=n,fv(e.queryParams,n.queryParams)||t.queryParams.next(n.queryParams),e.fragment!==n.fragment&&t.fragment.next(n.fragment),fv(e.params,n.params)||t.params.next(n.params),function(t,e){if(t.length!==e.length)return!1;for(let n=0;nfv(t.parameters,i[e].parameters))&&!(!t.parent!=!e.parent)&&(!t.parent||ry(t.parent,e.parent))}function sy(t,e,n){if(n&&t.shouldReuseRoute(e.value,n.value.snapshot)){const i=n.value;i._futureSnapshot=e.value;const r=function(t,e,n){return e.children.map(e=>{for(const i of n.children)if(t.shouldReuseRoute(e.value,i.value.snapshot))return sy(t,e,i);return sy(t,e)})}(t,e,n);return new Kv(i,r)}{const n=t.retrieve(e.value);if(n){const t=n.route;return oy(e,t),t}{const n=new Jv(new Zg((i=e.value).url),new Zg(i.params),new Zg(i.queryParams),new Zg(i.fragment),new Zg(i.data),i.outlet,i.component,i),r=e.children.map(e=>sy(t,e));return new Kv(n,r)}}var i}function oy(t,e){if(t.value.routeConfig!==e.value.routeConfig)throw new Error("Cannot reattach ActivatedRouteSnapshot created from a different route");if(t.children.length!==e.children.length)throw new Error("Cannot reattach ActivatedRouteSnapshot with a different number of children");e.value._futureSnapshot=t.value;for(let n=0;n{s[e]=Array.isArray(t)?t.map(t=>`${t}`):`${t}`}),new Cv(n.root===t?e:uy(n.root,t,e),s,r)}function uy(t,e,n){const i={};return vv(t.children,(t,r)=>{i[r]=t===e?n:uy(t,e,n)}),new Sv(t.segments,i)}class hy{constructor(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&ay(n[0]))throw new Error("Root segment cannot have matrix parameters");const i=n.find(ly);if(i&&i!==mv(n))throw new Error("{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class dy{constructor(t,e,n){this.segmentGroup=t,this.processChildren=e,this.index=n}}function fy(t,e,n){if(t||(t=new Sv([],{})),0===t.segments.length&&t.hasChildren())return py(t,e,n);const i=function(t,e,n){let i=0,r=e;const s={match:!1,pathIndex:0,commandIndex:0};for(;r=n.length)return s;const e=t.segments[r],o=n[i];if(ly(o))break;const a=`${o}`,l=i0&&void 0===a)break;if(a&&l&&"object"==typeof l&&void 0===l.outlets){if(!yy(a,l,e))return s;i+=2}else{if(!yy(a,{},e))return s;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(t,e,n),r=n.slice(i.commandIndex);if(i.match&&i.pathIndex{null!==n&&(r[i]=fy(t.children[i],e,n))}),vv(t.children,(t,e)=>{void 0===i[e]&&(r[e]=t)}),new Sv(t.segments,r)}}function gy(t,e,n){const i=t.segments.slice(0,e);let r=0;for(;r{null!==t&&(e[n]=gy(new Sv([],{}),0,t))}),e}function vy(t){const e={};return vv(t,(t,n)=>e[n]=`${t}`),e}function yy(t,e,n){return t==n.path&&fv(e,n.parameters)}class by{constructor(t,e,n,i){this.routeReuseStrategy=t,this.futureState=e,this.currState=n,this.forwardEvent=i}activate(t){const e=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,n,t),iy(this.futureState.root),this.activateChildRoutes(e,n,t)}deactivateChildRoutes(t,e,n){const i=qv(e);t.children.forEach(t=>{const e=t.value.outlet;this.deactivateRoutes(t,i[e],n),delete i[e]}),vv(i,(t,e)=>{this.deactivateRouteAndItsChildren(t,n)})}deactivateRoutes(t,e,n){const i=t.value,r=e?e.value:null;if(i===r)if(i.component){const r=n.getContext(i.outlet);r&&this.deactivateChildRoutes(t,e,r.children)}else this.deactivateChildRoutes(t,e,n);else r&&this.deactivateRouteAndItsChildren(e,n)}deactivateRouteAndItsChildren(t,e){this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)}detachAndStoreRouteSubtree(t,e){const n=e.getContext(t.value.outlet);if(n&&n.outlet){const e=n.outlet.detach(),i=n.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:e,route:t,contexts:i})}}deactivateRouteAndOutlet(t,e){const n=e.getContext(t.value.outlet);if(n){const i=qv(t),r=t.value.component?n.children:e;vv(i,(t,e)=>this.deactivateRouteAndItsChildren(t,r)),n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated())}}activateChildRoutes(t,e,n){const i=qv(e);t.children.forEach(t=>{this.activateRoutes(t,i[t.value.outlet],n),this.forwardEvent(new ov(t.value.snapshot))}),t.children.length&&this.forwardEvent(new rv(t.value.snapshot))}activateRoutes(t,e,n){const i=t.value,r=e?e.value:null;if(iy(i),i===r)if(i.component){const r=n.getOrCreateContext(i.outlet);this.activateChildRoutes(t,e,r.children)}else this.activateChildRoutes(t,e,n);else if(i.component){const e=n.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){const t=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),e.children.onOutletReAttached(t.contexts),e.attachRef=t.componentRef,e.route=t.route.value,e.outlet&&e.outlet.attach(t.componentRef,t.route.value),wy(t.route)}else{const n=function(t){for(let e=t.parent;e;e=e.parent){const t=e.routeConfig;if(t&&t._loadedConfig)return t._loadedConfig;if(t&&t.component)return null}return null}(i.snapshot),r=n?n.module.componentFactoryResolver:null;e.attachRef=null,e.route=i,e.resolver=r,e.outlet&&e.outlet.activateWith(i,r),this.activateChildRoutes(t,null,e.children)}}else this.activateChildRoutes(t,null,n)}}function wy(t){iy(t.value),t.children.forEach(wy)}class xy{constructor(t,e){this.routes=t,this.module=e}}function _y(t){return"function"==typeof t}function Cy(t){return t instanceof Cv}const Sy=Symbol("INITIAL_VALUE");function ky(){return km(t=>function(...t){let e,n;return k(t[t.length-1])&&(n=t.pop()),"function"==typeof t[t.length-1]&&(e=t.pop()),1===t.length&&l(t[0])&&(t=t[0]),z(t,n).lift(new rm(e))}(...t.map(t=>t.pipe(Dm(1),function(...t){const e=t[t.length-1];return k(e)?(t.pop(),n=>Fm(t,n,e)):e=>Fm(t,e)}(Sy)))).pipe(function(t,e){let n=!1;return arguments.length>=2&&(n=!0),function(i){return i.lift(new Mm(t,e,n))}}((t,e)=>{let n=!1;return e.reduce((t,i,r)=>{if(t!==Sy)return t;if(i===Sy&&(n=!0),!n){if(!1===i)return i;if(r===e.length-1||Cy(i))return i}return t},t)},Sy),hm(t=>t!==Sy),E(t=>Cy(t)?t:!0===t),Dm(1)))}let Ey=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:1,vars:0,template:function(t,e){1&t&&da(0,"router-outlet")},directives:function(){return[xb]},encapsulation:2}),t})();function Ay(t,e=""){for(let n=0;ne.error(new My(t)))}function Oy(t){return new y(e=>e.error(new Ly(t)))}function Iy(t){return new y(e=>e.error(new Error(`Only absolute redirects can have named outlets. redirectTo: '${t}'`)))}class Ny{constructor(t,e,n,i,r){this.configLoader=e,this.urlSerializer=n,this.urlTree=i,this.config=r,this.allowRedirects=!0,this.ngModule=t.get(Zt)}apply(){return this.expandSegmentGroup(this.ngModule,this.config,this.urlTree.root,lv).pipe(E(t=>this.createUrlTree(t,this.urlTree.queryParams,this.urlTree.fragment))).pipe($m(t=>{if(t instanceof Ly)return this.allowRedirects=!1,this.match(t.urlTree);if(t instanceof My)throw this.noMatchError(t);throw t}))}match(t){return this.expandSegmentGroup(this.ngModule,this.config,t.root,lv).pipe(E(e=>this.createUrlTree(e,t.queryParams,t.fragment))).pipe($m(t=>{if(t instanceof My)throw this.noMatchError(t);throw t}))}noMatchError(t){return new Error(`Cannot match any routes. URL Segment: '${t.segmentGroup}'`)}createUrlTree(t,e,n){const i=t.segments.length>0?new Sv([],{[lv]:t}):t;return new Cv(i,e,n)}expandSegmentGroup(t,e,n,i){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(E(t=>new Sv([],t))):this.expandSegment(t,n,e,n.segments,i,!0)}expandChildren(t,e,n){return function(t,e){if(0===Object.keys(t).length)return Qg({});const n=[],i=[],r={};return vv(t,(t,s)=>{const o=e(s,t).pipe(E(t=>r[s]=t));s===lv?n.push(o):i.push(o)}),Qg.apply(null,n.concat(i)).pipe(um(),function(t,e){const n=arguments.length>=2;return i=>i.pipe(t?hm((e,n)=>t(e,n,i)):v,gm(1),n?_m(e):ym(()=>new om))}(),E(()=>r))}(n.children,(n,i)=>this.expandSegmentGroup(t,e,i,n))}expandSegment(t,e,n,i,r,s){const o=function(t){return t.reduce((t,e)=>{const n=Fy(e);return t.has(n)?t.get(n).push(e):t.set(n,[e]),t},new Map)}(n);o.has(r)||o.set(r,[]);const a=n=>I(n).pipe(Nm(o=>this.expandSegmentAgainstRoute(t,e,n,o,i,r,s).pipe($m(t=>{if(t instanceof My)return Qg(null);throw t}))),Pm(t=>null!==t),$m(t=>{if(t instanceof om||"EmptyError"===t.name){if(this.noLeftoversInUrl(e,i,r))return Qg(new Sv([],{}));throw new My(e)}throw t}));return I(Array.from(o.entries()).map(([t,e])=>{const n=a(e);return t===r?n:n.pipe(E(()=>null),$m(()=>Qg(null)))})).pipe(t=>t.lift(new rm(void 0)),Pm(),E(t=>t.find(t=>null!==t)))}noLeftoversInUrl(t,e,n){return 0===e.length&&!t.children[n]}expandSegmentAgainstRoute(t,e,n,i,r,s,o){return Fy(i)!==s&&""!==i.path?$y(e):void 0===i.redirectTo?this.matchSegmentAgainstRoute(t,e,i,r):o&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,n,i,r,s):$y(e)}expandSegmentAgainstRouteUsingRedirect(t,e,n,i,r,s){return"**"===i.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,n,i,s):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,n,i,r,s)}expandWildCardWithParamsAgainstRouteUsingRedirect(t,e,n,i){const r=this.applyRedirectCommands([],n.redirectTo,{});return n.redirectTo.startsWith("/")?Oy(r):this.lineralizeSegments(n,r).pipe(U(n=>{const r=new Sv(n,{});return this.expandSegment(t,r,e,n,i,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(t,e,n,i,r,s){const{matched:o,consumedSegments:a,lastChild:l,positionalParamSegments:c}=Py(e,i,r);if(!o)return $y(e);const u=this.applyRedirectCommands(a,i.redirectTo,c);return i.redirectTo.startsWith("/")?Oy(u):this.lineralizeSegments(i,u).pipe(U(i=>this.expandSegment(t,e,n,i.concat(r.slice(l)),s,!1)))}matchSegmentAgainstRoute(t,e,n,i){if("**"===n.path)return n.loadChildren?this.configLoader.load(t.injector,n).pipe(E(t=>(n._loadedConfig=t,new Sv(i,{})))):Qg(new Sv(i,{}));const{matched:r,consumedSegments:s,lastChild:o}=Py(e,n,i);if(!r)return $y(e);const a=i.slice(o);return this.getChildConfig(t,n,i).pipe(U(t=>{const n=t.module,i=t.routes,{segmentGroup:r,slicedSegments:o}=function(t,e,n,i){return n.length>0&&function(t,e,n){return n.some(n=>Uy(t,e,n)&&Fy(n)!==lv)}(t,n,i)?{segmentGroup:By(new Sv(e,function(t,e){const n={};n.primary=e;for(const i of t)""===i.path&&Fy(i)!==lv&&(n[Fy(i)]=new Sv([],{}));return n}(i,new Sv(n,t.children)))),slicedSegments:[]}:0===n.length&&function(t,e,n){return n.some(n=>Uy(t,e,n))}(t,n,i)?{segmentGroup:By(new Sv(t.segments,function(t,e,n,i){const r={};for(const s of n)Uy(t,e,s)&&!i[Fy(s)]&&(r[Fy(s)]=new Sv([],{}));return Object.assign(Object.assign({},i),r)}(t,n,i,t.children))),slicedSegments:n}:{segmentGroup:t,slicedSegments:n}}(e,s,a,i);return 0===o.length&&r.hasChildren()?this.expandChildren(n,i,r).pipe(E(t=>new Sv(s,t))):0===i.length&&0===o.length?Qg(new Sv(s,{})):this.expandSegment(n,r,i,o,lv,!0).pipe(E(t=>new Sv(s.concat(t.segments),t.children)))}))}getChildConfig(t,e,n){return e.children?Qg(new xy(e.children,t)):e.loadChildren?void 0!==e._loadedConfig?Qg(e._loadedConfig):this.runCanLoadGuards(t.injector,e,n).pipe(U(n=>n?this.configLoader.load(t.injector,e).pipe(E(t=>(e._loadedConfig=t,t))):function(t){return new y(e=>e.error(hv(`Cannot load children because the guard of the route "path: '${t.path}'" returned false`)))}(e))):Qg(new xy([],t))}runCanLoadGuards(t,e,n){const i=e.canLoad;return i&&0!==i.length?Qg(i.map(i=>{const r=t.get(i);let s;if(function(t){return t&&_y(t.canLoad)}(r))s=r.canLoad(e,n);else{if(!_y(r))throw new Error("Invalid CanLoad guard");s=r(e,n)}return yv(s)})).pipe(ky(),Um(t=>{if(!Cy(t))return;const e=hv(`Redirecting to "${this.urlSerializer.serialize(t)}"`);throw e.url=t,e}),E(t=>!0===t)):Qg(!0)}lineralizeSegments(t,e){let n=[],i=e.root;for(;;){if(n=n.concat(i.segments),0===i.numberOfChildren)return Qg(n);if(i.numberOfChildren>1||!i.children.primary)return Iy(t.redirectTo);i=i.children.primary}}applyRedirectCommands(t,e,n){return this.applyRedirectCreatreUrlTree(e,this.urlSerializer.parse(e),t,n)}applyRedirectCreatreUrlTree(t,e,n,i){const r=this.createSegmentGroup(t,e.root,n,i);return new Cv(r,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const n={};return vv(t,(t,i)=>{if("string"==typeof t&&t.startsWith(":")){const r=t.substring(1);n[i]=e[r]}else n[i]=t}),n}createSegmentGroup(t,e,n,i){const r=this.createSegments(t,e.segments,n,i);let s={};return vv(e.children,(e,r)=>{s[r]=this.createSegmentGroup(t,e,n,i)}),new Sv(r,s)}createSegments(t,e,n,i){return e.map(e=>e.path.startsWith(":")?this.findPosParam(t,e,i):this.findOrReturn(e,n))}findPosParam(t,e,n){const i=n[e.path.substring(1)];if(!i)throw new Error(`Cannot redirect to '${t}'. Cannot find '${e.path}'.`);return i}findOrReturn(t,e){let n=0;for(const i of e){if(i.path===t.path)return e.splice(n),i;n++}return t}}function Py(t,e,n){if(""===e.path)return"full"===e.pathMatch&&(t.hasChildren()||n.length>0)?{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}:{matched:!0,consumedSegments:[],lastChild:0,positionalParamSegments:{}};const i=(e.matcher||dv)(n,t,e);return i?{matched:!0,consumedSegments:i.consumed,lastChild:i.consumed.length,positionalParamSegments:i.posParams}:{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}}function By(t){if(1===t.numberOfChildren&&t.children.primary){const e=t.children.primary;return new Sv(t.segments.concat(e.segments),e.children)}return t}function Uy(t,e,n){return(!(t.hasChildren()||e.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0!==n.redirectTo}class Vy{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class Hy{constructor(t,e){this.component=t,this.route=e}}function jy(t,e,n){const i=t._root;return Wy(i,e?e._root:null,n,[i.value])}function zy(t,e,n){const i=function(t){if(!t)return null;for(let e=t.parent;e;e=e.parent){const t=e.routeConfig;if(t&&t._loadedConfig)return t._loadedConfig}return null}(e);return(i?i.module.injector:n).get(t)}function Wy(t,e,n,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=qv(e);return t.children.forEach(t=>{!function(t,e,n,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=t.value,o=e?e.value:null,a=n?n.getContext(t.value.outlet):null;if(o&&s.routeConfig===o.routeConfig){const l=function(t,e,n){if("function"==typeof n)return n(t,e);switch(n){case"pathParamsChange":return!Ev(t.url,e.url);case"pathParamsOrQueryParamsChange":return!Ev(t.url,e.url)||!fv(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!ry(t,e)||!fv(t.queryParams,e.queryParams);case"paramsChange":default:return!ry(t,e)}}(o,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new Vy(i)):(s.data=o.data,s._resolvedData=o._resolvedData),Wy(t,e,s.component?a?a.children:null:n,i,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new Hy(a.outlet.component,o))}else o&&Gy(e,a,r),r.canActivateChecks.push(new Vy(i)),Wy(t,null,s.component?a?a.children:null:n,i,r)}(t,s[t.value.outlet],n,i.concat([t.value]),r),delete s[t.value.outlet]}),vv(s,(t,e)=>Gy(t,n.getContext(e),r)),r}function Gy(t,e,n){const i=qv(t),r=t.value;vv(i,(t,i)=>{Gy(t,r.component?e?e.children.getContext(i):null:e,n)}),n.canDeactivateChecks.push(new Hy(r.component&&e&&e.outlet&&e.outlet.isActivated?e.outlet.component:null,r))}function Ky(t,e){return null!==t&&e&&e(new sv(t)),Qg(!0)}function qy(t,e){return null!==t&&e&&e(new iv(t)),Qg(!0)}function Yy(t,e,n){const i=e.routeConfig?e.routeConfig.canActivate:null;return i&&0!==i.length?Qg(i.map(i=>cm(()=>{const r=zy(i,e,n);let s;if(function(t){return t&&_y(t.canActivate)}(r))s=yv(r.canActivate(e,t));else{if(!_y(r))throw new Error("Invalid CanActivate guard");s=yv(r(e,t))}return s.pipe(Pm())}))).pipe(ky()):Qg(!0)}function Xy(t,e,n){const i=e[e.length-1],r=e.slice(0,e.length-1).reverse().map(t=>function(t){const e=t.routeConfig?t.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:t,guards:e}:null}(t)).filter(t=>null!==t).map(e=>cm(()=>Qg(e.guards.map(r=>{const s=zy(r,e.node,n);let o;if(function(t){return t&&_y(t.canActivateChild)}(s))o=yv(s.canActivateChild(i,t));else{if(!_y(s))throw new Error("Invalid CanActivateChild guard");o=yv(s(i,t))}return o.pipe(Pm())})).pipe(ky())));return Qg(r).pipe(ky())}class Jy{}class Qy{constructor(t,e,n,i,r,s){this.rootComponentType=t,this.config=e,this.urlTree=n,this.url=i,this.paramsInheritanceStrategy=r,this.relativeLinkResolution=s}recognize(){try{const t=eb(this.urlTree.root,[],[],this.config,this.relativeLinkResolution).segmentGroup,e=this.processSegmentGroup(this.config,t,lv),n=new Zv([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},lv,this.rootComponentType,null,this.urlTree.root,-1,{}),i=new Kv(n,e),r=new ty(this.url,i);return this.inheritParamsAndData(r._root),Qg(r)}catch(t){return new y(e=>e.error(t))}}inheritParamsAndData(t){const e=t.value,n=Qv(e,this.paramsInheritanceStrategy);e.params=Object.freeze(n.params),e.data=Object.freeze(n.data),t.children.forEach(t=>this.inheritParamsAndData(t))}processSegmentGroup(t,e,n){return 0===e.segments.length&&e.hasChildren()?this.processChildren(t,e):this.processSegment(t,e,e.segments,n)}processChildren(t,e){const n=Av(e,(e,n)=>this.processSegmentGroup(t,e,n));return function(t){const e={};t.forEach(t=>{const n=e[t.value.outlet];if(n){const e=n.url.map(t=>t.toString()).join("/"),i=t.value.url.map(t=>t.toString()).join("/");throw new Error(`Two segments cannot have the same outlet name: '${e}' and '${i}'.`)}e[t.value.outlet]=t.value})}(n),n.sort((t,e)=>t.value.outlet===lv?-1:e.value.outlet===lv?1:t.value.outlet.localeCompare(e.value.outlet)),n}processSegment(t,e,n,i){for(const s of t)try{return this.processSegmentAgainstRoute(s,e,n,i)}catch(r){if(!(r instanceof Jy))throw r}if(this.noLeftoversInUrl(e,n,i))return[];throw new Jy}noLeftoversInUrl(t,e,n){return 0===e.length&&!t.children[n]}processSegmentAgainstRoute(t,e,n,i){if(t.redirectTo)throw new Jy;if((t.outlet||lv)!==i)throw new Jy;let r,s=[],o=[];if("**"===t.path){const s=n.length>0?mv(n).parameters:{};r=new Zv(n,s,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,rb(t),i,t.component,t,Zy(e),tb(e)+n.length,sb(t))}else{const a=function(t,e,n){if(""===e.path){if("full"===e.pathMatch&&(t.hasChildren()||n.length>0))throw new Jy;return{consumedSegments:[],lastChild:0,parameters:{}}}const i=(e.matcher||dv)(n,t,e);if(!i)throw new Jy;const r={};vv(i.posParams,(t,e)=>{r[e]=t.path});const s=i.consumed.length>0?Object.assign(Object.assign({},r),i.consumed[i.consumed.length-1].parameters):r;return{consumedSegments:i.consumed,lastChild:i.consumed.length,parameters:s}}(e,t,n);s=a.consumedSegments,o=n.slice(a.lastChild),r=new Zv(s,a.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,rb(t),i,t.component,t,Zy(e),tb(e)+s.length,sb(t))}const a=function(t){return t.children?t.children:t.loadChildren?t._loadedConfig.routes:[]}(t),{segmentGroup:l,slicedSegments:c}=eb(e,s,o,a,this.relativeLinkResolution);if(0===c.length&&l.hasChildren()){const t=this.processChildren(a,l);return[new Kv(r,t)]}if(0===a.length&&0===c.length)return[new Kv(r,[])];const u=this.processSegment(a,l,c,lv);return[new Kv(r,u)]}}function Zy(t){let e=t;for(;e._sourceSegment;)e=e._sourceSegment;return e}function tb(t){let e=t,n=e._segmentIndexShift?e._segmentIndexShift:0;for(;e._sourceSegment;)e=e._sourceSegment,n+=e._segmentIndexShift?e._segmentIndexShift:0;return n-1}function eb(t,e,n,i,r){if(n.length>0&&function(t,e,n){return n.some(n=>nb(t,e,n)&&ib(n)!==lv)}(t,n,i)){const r=new Sv(e,function(t,e,n,i){const r={};r.primary=i,i._sourceSegment=t,i._segmentIndexShift=e.length;for(const s of n)if(""===s.path&&ib(s)!==lv){const n=new Sv([],{});n._sourceSegment=t,n._segmentIndexShift=e.length,r[ib(s)]=n}return r}(t,e,i,new Sv(n,t.children)));return r._sourceSegment=t,r._segmentIndexShift=e.length,{segmentGroup:r,slicedSegments:[]}}if(0===n.length&&function(t,e,n){return n.some(n=>nb(t,e,n))}(t,n,i)){const s=new Sv(t.segments,function(t,e,n,i,r,s){const o={};for(const a of i)if(nb(t,n,a)&&!r[ib(a)]){const n=new Sv([],{});n._sourceSegment=t,n._segmentIndexShift="legacy"===s?t.segments.length:e.length,o[ib(a)]=n}return Object.assign(Object.assign({},r),o)}(t,e,n,i,t.children,r));return s._sourceSegment=t,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:n}}const s=new Sv(t.segments,t.children);return s._sourceSegment=t,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:n}}function nb(t,e,n){return(!(t.hasChildren()||e.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0===n.redirectTo}function ib(t){return t.outlet||lv}function rb(t){return t.data||{}}function sb(t){return t.resolve||{}}function ob(t){return function(e){return e.pipe(km(e=>{const n=t(e);return n?I(n).pipe(E(()=>e)):I([e])}))}}class ab extends class{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}{}const lb=new Pt("ROUTES");class cb{constructor(t,e,n,i){this.loader=t,this.compiler=e,this.onLoadStartListener=n,this.onLoadEndListener=i}load(t,e){return this.onLoadStartListener&&this.onLoadStartListener(e),this.loadModuleFactory(e.loadChildren).pipe(E(n=>{this.onLoadEndListener&&this.onLoadEndListener(e);const i=n.create(t);return new xy(gv(i.injector.get(lb)).map(Ry),i)}))}loadModuleFactory(t){return"string"==typeof t?I(this.loader.load(t)):yv(t()).pipe(U(t=>t instanceof te?Qg(t):I(this.compiler.compileModuleAsync(t))))}}class ub{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.children=new hb,this.attachRef=null}}class hb{constructor(){this.contexts=new Map}onChildOutletCreated(t,e){const n=this.getOrCreateContext(t);n.outlet=e,this.contexts.set(t,n)}onChildOutletDestroyed(t){const e=this.getContext(t);e&&(e.outlet=null)}onOutletDeactivated(){const t=this.contexts;return this.contexts=new Map,t}onOutletReAttached(t){this.contexts=t}getOrCreateContext(t){let e=this.getContext(t);return e||(e=new ub,this.contexts.set(t,e)),e}getContext(t){return this.contexts.get(t)||null}}class db{shouldProcessUrl(t){return!0}extract(t){return t}merge(t,e){return t}}function fb(t){throw t}function pb(t,e,n){return e.parse("/")}function gb(t,e){return Qg(null)}let mb=(()=>{class t{constructor(t,e,n,i,r,s,o,a){this.rootComponentType=t,this.urlSerializer=e,this.rootContexts=n,this.location=i,this.config=a,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.lastLocationChangeInfo=null,this.navigationId=0,this.isNgZoneEnabled=!1,this.events=new C,this.errorHandler=fb,this.malformedUriErrorHandler=pb,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:gb,afterPreactivation:gb},this.urlHandlingStrategy=new db,this.routeReuseStrategy=new ab,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="corrected",this.ngModule=r.get(Zt),this.console=r.get(Ru);const l=r.get(ju);this.isNgZoneEnabled=l instanceof ju,this.resetConfig(a),this.currentUrlTree=new Cv(new Sv([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new cb(s,o,t=>this.triggerEvent(new ev(t)),t=>this.triggerEvent(new nv(t))),this.routerState=Xv(this.currentUrlTree,this.rootComponentType),this.transitions=new Zg({id:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}setupNavigations(t){const e=this.events;return t.pipe(hm(t=>0!==t.id),E(t=>Object.assign(Object.assign({},t),{extractedUrl:this.urlHandlingStrategy.extract(t.rawUrl)})),km(t=>{let n=!1,i=!1;return Qg(t).pipe(Um(t=>{this.currentNavigation={id:t.id,initialUrl:t.currentRawUrl,extractedUrl:t.extractedUrl,trigger:t.source,extras:t.extras,previousNavigation:this.lastSuccessfulNavigation?Object.assign(Object.assign({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),km(t=>{const n=!this.navigated||t.extractedUrl.toString()!==this.browserUrlTree.toString();if(("reload"===this.onSameUrlNavigation||n)&&this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl))return Qg(t).pipe(km(t=>{const n=this.transitions.getValue();return e.next(new Gm(t.id,this.serializeUrl(t.extractedUrl),t.source,t.restoredState)),n!==this.transitions.getValue()?am:[t]}),km(t=>Promise.resolve(t)),(i=this.ngModule.injector,r=this.configLoader,s=this.urlSerializer,o=this.config,function(t){return t.pipe(km(t=>function(t,e,n,i,r){return new Ny(t,e,n,i,r).apply()}(i,r,s,t.extractedUrl,o).pipe(E(e=>Object.assign(Object.assign({},t),{urlAfterRedirects:e})))))}),Um(t=>{this.currentNavigation=Object.assign(Object.assign({},this.currentNavigation),{finalUrl:t.urlAfterRedirects})}),function(t,e,n,i,r){return function(s){return s.pipe(U(s=>function(t,e,n,i,r="emptyOnly",s="legacy"){return new Qy(t,e,n,i,r,s).recognize()}(t,e,s.urlAfterRedirects,n(s.urlAfterRedirects),i,r).pipe(E(t=>Object.assign(Object.assign({},s),{targetSnapshot:t})))))}}(this.rootComponentType,this.config,t=>this.serializeUrl(t),this.paramsInheritanceStrategy,this.relativeLinkResolution),Um(t=>{"eager"===this.urlUpdateStrategy&&(t.extras.skipLocationChange||this.setBrowserUrl(t.urlAfterRedirects,!!t.extras.replaceUrl,t.id,t.extras.state),this.browserUrlTree=t.urlAfterRedirects)}),Um(t=>{const n=new Xm(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.next(n)}));var i,r,s,o;if(n&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)){const{id:n,extractedUrl:i,source:r,restoredState:s,extras:o}=t,a=new Gm(n,this.serializeUrl(i),r,s);e.next(a);const l=Xv(i,this.rootComponentType).snapshot;return Qg(Object.assign(Object.assign({},t),{targetSnapshot:l,urlAfterRedirects:i,extras:Object.assign(Object.assign({},o),{skipLocationChange:!1,replaceUrl:!1})}))}return this.rawUrlTree=t.rawUrl,this.browserUrlTree=t.urlAfterRedirects,t.resolve(null),am}),ob(t=>{const{targetSnapshot:e,id:n,extractedUrl:i,rawUrl:r,extras:{skipLocationChange:s,replaceUrl:o}}=t;return this.hooks.beforePreactivation(e,{navigationId:n,appliedUrlTree:i,rawUrlTree:r,skipLocationChange:!!s,replaceUrl:!!o})}),Um(t=>{const e=new Jm(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}),E(t=>Object.assign(Object.assign({},t),{guards:jy(t.targetSnapshot,t.currentSnapshot,this.rootContexts)})),function(t,e){return function(n){return n.pipe(U(n=>{const{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=n;return 0===o.length&&0===s.length?Qg(Object.assign(Object.assign({},n),{guardsResult:!0})):function(t,e,n,i){return I(t).pipe(U(t=>function(t,e,n,i,r){const s=e&&e.routeConfig?e.routeConfig.canDeactivate:null;return s&&0!==s.length?Qg(s.map(s=>{const o=zy(s,e,r);let a;if(function(t){return t&&_y(t.canDeactivate)}(o))a=yv(o.canDeactivate(t,e,n,i));else{if(!_y(o))throw new Error("Invalid CanDeactivate guard");a=yv(o(t,e,n,i))}return a.pipe(Pm())})).pipe(ky()):Qg(!0)}(t.component,t.route,n,e,i)),Pm(t=>!0!==t,!0))}(o,i,r,t).pipe(U(n=>n&&"boolean"==typeof n?function(t,e,n,i){return I(e).pipe(Nm(e=>I([qy(e.route.parent,i),Ky(e.route,i),Xy(t,e.path,n),Yy(t,e.route,n)]).pipe(um(),Pm(t=>!0!==t,!0))),Pm(t=>!0!==t,!0))}(i,s,t,e):Qg(n)),E(t=>Object.assign(Object.assign({},n),{guardsResult:t})))}))}}(this.ngModule.injector,t=>this.triggerEvent(t)),Um(t=>{if(Cy(t.guardsResult)){const e=hv(`Redirecting to "${this.serializeUrl(t.guardsResult)}"`);throw e.url=t.guardsResult,e}}),Um(t=>{const e=new Qm(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot,!!t.guardsResult);this.triggerEvent(e)}),hm(t=>{if(!t.guardsResult){this.resetUrlToCurrentUrlTree();const n=new qm(t.id,this.serializeUrl(t.extractedUrl),"");return e.next(n),t.resolve(!1),!1}return!0}),ob(t=>{if(t.guards.canActivateChecks.length)return Qg(t).pipe(Um(t=>{const e=new Zm(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}),km(t=>{let n=!1;return Qg(t).pipe((i=this.paramsInheritanceStrategy,r=this.ngModule.injector,function(t){return t.pipe(U(t=>{const{targetSnapshot:e,guards:{canActivateChecks:n}}=t;if(!n.length)return Qg(t);let s=0;return I(n).pipe(Nm(t=>function(t,e,n,i){return function(t,e,n,i){const r=Object.keys(t);if(0===r.length)return Qg({});const s={};return I(r).pipe(U(r=>function(t,e,n,i){const r=zy(t,e,i);return yv(r.resolve?r.resolve(e,n):r(e,n))}(t[r],e,n,i).pipe(Um(t=>{s[r]=t}))),gm(1),U(()=>Object.keys(s).length===r.length?Qg(s):am))}(t._resolve,t,e,i).pipe(E(e=>(t._resolvedData=e,t.data=Object.assign(Object.assign({},t.data),Qv(t,n).resolve),null)))}(t.route,e,i,r)),Um(()=>s++),gm(1),U(e=>s===n.length?Qg(t):am))}))}),Um({next:()=>n=!0,complete:()=>{if(!n){const n=new qm(t.id,this.serializeUrl(t.extractedUrl),"At least one route resolver didn't emit any value.");e.next(n),t.resolve(!1)}}}));var i,r}),Um(t=>{const e=new tv(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}))}),ob(t=>{const{targetSnapshot:e,id:n,extractedUrl:i,rawUrl:r,extras:{skipLocationChange:s,replaceUrl:o}}=t;return this.hooks.afterPreactivation(e,{navigationId:n,appliedUrlTree:i,rawUrlTree:r,skipLocationChange:!!s,replaceUrl:!!o})}),E(t=>{const e=function(t,e,n){const i=sy(t,e._root,n?n._root:void 0);return new Yv(i,e)}(this.routeReuseStrategy,t.targetSnapshot,t.currentRouterState);return Object.assign(Object.assign({},t),{targetRouterState:e})}),Um(t=>{this.currentUrlTree=t.urlAfterRedirects,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,t.rawUrl),this.routerState=t.targetRouterState,"deferred"===this.urlUpdateStrategy&&(t.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,!!t.extras.replaceUrl,t.id,t.extras.state),this.browserUrlTree=t.urlAfterRedirects)}),(s=this.rootContexts,o=this.routeReuseStrategy,a=t=>this.triggerEvent(t),E(t=>(new by(o,t.targetRouterState,t.currentRouterState,a).activate(s),t))),Um({next(){n=!0},complete(){n=!0}}),(r=()=>{if(!n&&!i){this.resetUrlToCurrentUrlTree();const n=new qm(t.id,this.serializeUrl(t.extractedUrl),`Navigation ID ${t.id} is not equal to the current navigation id ${this.navigationId}`);e.next(n),t.resolve(!1)}this.currentNavigation=null},t=>t.lift(new jm(r))),$m(n=>{if(i=!0,(r=n)&&r.ngNavigationCancelingError){const i=Cy(n.url);i||(this.navigated=!0,this.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl));const r=new qm(t.id,this.serializeUrl(t.extractedUrl),n.message);e.next(r),i?setTimeout(()=>{const e=this.urlHandlingStrategy.merge(n.url,this.rawUrlTree);return this.scheduleNavigation(e,"imperative",null,{skipLocationChange:t.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy},{resolve:t.resolve,reject:t.reject,promise:t.promise})},0):t.resolve(!1)}else{this.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl);const i=new Ym(t.id,this.serializeUrl(t.extractedUrl),n);e.next(i);try{t.resolve(this.errorHandler(n))}catch(s){t.reject(s)}}var r;return am}));var r,s,o,a}))}resetRootComponentType(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType}getTransition(){const t=this.transitions.value;return t.urlAfterRedirects=this.browserUrlTree,t}setTransition(t){this.transitions.next(Object.assign(Object.assign({},this.getTransition()),t))}initialNavigation(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(t=>{const e=this.extractLocationChangeInfoFromEvent(t);this.shouldScheduleNavigation(this.lastLocationChangeInfo,e)&&setTimeout(()=>{const{source:t,state:n,urlTree:i}=e,r={replaceUrl:!0};if(n){const t=Object.assign({},n);delete t.navigationId,0!==Object.keys(t).length&&(r.state=t)}this.scheduleNavigation(i,t,n,r)},0),this.lastLocationChangeInfo=e}))}extractLocationChangeInfoFromEvent(t){var e;return{source:"popstate"===t.type?"popstate":"hashchange",urlTree:this.parseUrl(t.url),state:(null===(e=t.state)||void 0===e?void 0:e.navigationId)?t.state:null,transitionId:this.getTransition().id}}shouldScheduleNavigation(t,e){if(!t)return!0;const n=e.urlTree.toString()===t.urlTree.toString();return!(e.transitionId===t.transitionId&&n&&("hashchange"===e.source&&"popstate"===t.source||"popstate"===e.source&&"hashchange"===t.source))}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.currentNavigation}triggerEvent(t){this.events.next(t)}resetConfig(t){Ay(t),this.config=t.map(Ry),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0)}createUrlTree(t,e={}){const{relativeTo:n,queryParams:i,fragment:r,queryParamsHandling:s,preserveFragment:o}=e,a=n||this.routerState.root,l=o?this.currentUrlTree.fragment:r;let c=null;switch(s){case"merge":c=Object.assign(Object.assign({},this.currentUrlTree.queryParams),i);break;case"preserve":c=this.currentUrlTree.queryParams;break;default:c=i||null}return null!==c&&(c=this.removeEmptyProps(c)),function(t,e,n,i,r){if(0===n.length)return cy(e.root,e.root,e,i,r);const s=function(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new hy(!0,0,t);let e=0,n=!1;const i=t.reduce((t,i,r)=>{if("object"==typeof i&&null!=i){if(i.outlets){const e={};return vv(i.outlets,(t,n)=>{e[n]="string"==typeof t?t.split("/"):t}),[...t,{outlets:e}]}if(i.segmentPath)return[...t,i.segmentPath]}return"string"!=typeof i?[...t,i]:0===r?(i.split("/").forEach((i,r)=>{0==r&&"."===i||(0==r&&""===i?n=!0:".."===i?e++:""!=i&&t.push(i))}),t):[...t,i]},[]);return new hy(n,e,i)}(n);if(s.toRoot())return cy(e.root,new Sv([],{}),e,i,r);const o=function(t,e,n){if(t.isAbsolute)return new dy(e.root,!0,0);if(-1===n.snapshot._lastPathIndex){const t=n.snapshot._urlSegment;return new dy(t,t===e.root,0)}const i=ay(t.commands[0])?0:1;return function(t,e,n){let i=t,r=e,s=n;for(;s>r;){if(s-=r,i=i.parent,!i)throw new Error("Invalid number of '../'");r=i.segments.length}return new dy(i,!1,r-s)}(n.snapshot._urlSegment,n.snapshot._lastPathIndex+i,t.numberOfDoubleDots)}(s,e,t),a=o.processChildren?py(o.segmentGroup,o.index,s.commands):fy(o.segmentGroup,o.index,s.commands);return cy(o.segmentGroup,a,e,i,r)}(a,this.currentUrlTree,t,c,l)}navigateByUrl(t,e={skipLocationChange:!1}){const n=Cy(t)?t:this.parseUrl(t),i=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(i,"imperative",null,e)}navigate(t,e={skipLocationChange:!1}){return function(t){for(let e=0;e{const i=t[n];return null!=i&&(e[n]=i),e},{})}processNavigations(){this.navigations.subscribe(t=>{this.navigated=!0,this.lastSuccessfulId=t.id,this.events.next(new Km(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(this.currentUrlTree))),this.lastSuccessfulNavigation=this.currentNavigation,this.currentNavigation=null,t.resolve(!0)},t=>{this.console.warn("Unhandled Navigation Error: ")})}scheduleNavigation(t,e,n,i,r){const s=this.getTransition(),o="imperative"!==e&&"imperative"===(null==s?void 0:s.source),a=(this.lastSuccessfulId===s.id||this.currentNavigation?s.rawUrl:s.urlAfterRedirects).toString()===t.toString();if(o&&a)return Promise.resolve(!0);let l,c,u;r?(l=r.resolve,c=r.reject,u=r.promise):u=new Promise((t,e)=>{l=t,c=e});const h=++this.navigationId;return this.setTransition({id:h,source:e,restoredState:n,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:t,extras:i,resolve:l,reject:c,promise:u,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),u.catch(t=>Promise.reject(t))}setBrowserUrl(t,e,n,i){const r=this.urlSerializer.serialize(t);i=i||{},this.location.isCurrentPathEqualTo(r)||e?this.location.replaceState(r,"",Object.assign(Object.assign({},i),{navigationId:n})):this.location.go(r,"",Object.assign(Object.assign({},i),{navigationId:n}))}resetStateAndUrl(t,e,n){this.routerState=t,this.currentUrlTree=e,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n),this.resetUrlToCurrentUrlTree()}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",{navigationId:this.lastSuccessfulId})}}return t.\u0275fac=function(e){return new(e||t)(Yt(So),Yt(Dv),Yt(hb),Yt(Oh),Yt(Bo),Yt(uh),Yt(Uu),Yt(void 0))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),vb=(()=>{class t{constructor(t,e,n,i,r){this.router=t,this.route=e,this.commands=[],this.onChanges=new C,null==n&&i.setAttribute(r.nativeElement,"tabindex","0")}ngOnChanges(t){this.onChanges.next(this)}set routerLink(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]}onClick(){const t={skipLocationChange:bb(this.skipLocationChange),replaceUrl:bb(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,t),!0}get urlTree(){return this.router.createUrlTree(this.commands,{relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:bb(this.preserveFragment)})}}return t.\u0275fac=function(e){return new(e||t)(oa(mb),oa(Jv),aa("tabindex"),oa(pc),oa(uc))},t.\u0275dir=we({type:t,selectors:[["","routerLink","",5,"a",5,"area"]],hostBindings:function(t,e){1&t&&ya("click",function(){return e.onClick()})},inputs:{routerLink:"routerLink",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state"},features:[Ve]}),t})(),yb=(()=>{class t{constructor(t,e,n){this.router=t,this.route=e,this.locationStrategy=n,this.commands=[],this.onChanges=new C,this.subscription=t.events.subscribe(t=>{t instanceof Km&&this.updateTargetUrlAndHref()})}set routerLink(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]}ngOnChanges(t){this.updateTargetUrlAndHref(),this.onChanges.next(this)}ngOnDestroy(){this.subscription.unsubscribe()}onClick(t,e,n,i,r){if(0!==t||e||n||i||r)return!0;if("string"==typeof this.target&&"_self"!=this.target)return!0;const s={skipLocationChange:bb(this.skipLocationChange),replaceUrl:bb(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,s),!1}updateTargetUrlAndHref(){this.href=this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree))}get urlTree(){return this.router.createUrlTree(this.commands,{relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:bb(this.preserveFragment)})}}return t.\u0275fac=function(e){return new(e||t)(oa(mb),oa(Jv),oa(Rh))},t.\u0275dir=we({type:t,selectors:[["a","routerLink",""],["area","routerLink",""]],hostVars:2,hostBindings:function(t,e){1&t&&ya("click",function(t){return e.onClick(t.button,t.ctrlKey,t.shiftKey,t.altKey,t.metaKey)}),2&t&&(Qa("href",e.href,yr),na("target",e.target))},inputs:{routerLink:"routerLink",target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state"},features:[Ve]}),t})();function bb(t){return""===t||!!t}let wb=(()=>{class t{constructor(t,e,n,i,r,s){this.router=t,this.element=e,this.renderer=n,this.cdr=i,this.link=r,this.linkWithHref=s,this.classes=[],this.isActive=!1,this.routerLinkActiveOptions={exact:!1},this.routerEventsSubscription=t.events.subscribe(t=>{t instanceof Km&&this.update()})}ngAfterContentInit(){I([this.links.changes,this.linksWithHrefs.changes,Qg(null)]).pipe(j()).subscribe(t=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){var t;null===(t=this.linkInputChangesSubscription)||void 0===t||t.unsubscribe();const e=[...this.links.toArray(),...this.linksWithHrefs.toArray(),this.link,this.linkWithHref].filter(t=>!!t).map(t=>t.onChanges);this.linkInputChangesSubscription=I(e).pipe(j()).subscribe(t=>{this.isActive!==this.isLinkActive(this.router)(t)&&this.update()})}set routerLinkActive(t){const e=Array.isArray(t)?t:t.split(" ");this.classes=e.filter(t=>!!t)}ngOnChanges(t){this.update()}ngOnDestroy(){var t;this.routerEventsSubscription.unsubscribe(),null===(t=this.linkInputChangesSubscription)||void 0===t||t.unsubscribe()}update(){this.links&&this.linksWithHrefs&&this.router.navigated&&Promise.resolve().then(()=>{const t=this.hasActiveLinks();this.isActive!==t&&(this.isActive=t,this.cdr.markForCheck(),this.classes.forEach(e=>{t?this.renderer.addClass(this.element.nativeElement,e):this.renderer.removeClass(this.element.nativeElement,e)}))})}isLinkActive(t){return e=>t.isActive(e.urlTree,this.routerLinkActiveOptions.exact)}hasActiveLinks(){const t=this.isLinkActive(this.router);return this.link&&t(this.link)||this.linkWithHref&&t(this.linkWithHref)||this.links.some(t)||this.linksWithHrefs.some(t)}}return t.\u0275fac=function(e){return new(e||t)(oa(mb),oa(uc),oa(pc),oa(_o),oa(vb,8),oa(yb,8))},t.\u0275dir=we({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(t,e,n){if(1&t&&(gu(n,vb,!0),gu(n,yb,!0)),2&t){let t;hu(t=vu())&&(e.links=t),hu(t=vu())&&(e.linksWithHrefs=t)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",routerLinkActive:"routerLinkActive"},exportAs:["routerLinkActive"],features:[Ve]}),t})(),xb=(()=>{class t{constructor(t,e,n,i,r){this.parentContexts=t,this.location=e,this.resolver=n,this.changeDetector=r,this.activated=null,this._activatedRoute=null,this.activateEvents=new Zc,this.deactivateEvents=new Zc,this.name=i||lv,t.onChildOutletCreated(this.name,this)}ngOnDestroy(){this.parentContexts.onChildOutletDestroyed(this.name)}ngOnInit(){if(!this.activated){const t=this.parentContexts.getContext(this.name);t&&t.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.resolver||null))}}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();const t=this.activated;return this.activated=null,this._activatedRoute=null,t}attach(t,e){this.activated=t,this._activatedRoute=e,this.location.insert(t.hostView)}deactivate(){if(this.activated){const t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}}activateWith(t,e){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=t;const n=(e=e||this.resolver).resolveComponentFactory(t._futureSnapshot.routeConfig.component),i=this.parentContexts.getOrCreateContext(this.name).children,r=new _b(t,i,this.location.injector);this.activated=this.location.createComponent(n,this.location.length,r),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return t.\u0275fac=function(e){return new(e||t)(oa(hb),oa(Ic),oa(cc),aa("name"),oa(_o))},t.\u0275dir=we({type:t,selectors:[["router-outlet"]],outputs:{activateEvents:"activate",deactivateEvents:"deactivate"},exportAs:["outlet"]}),t})();class _b{constructor(t,e,n){this.route=t,this.childContexts=e,this.parent=n}get(t,e){return t===Jv?this.route:t===hb?this.childContexts:this.parent.get(t,e)}}class Cb{}class Sb{preload(t,e){return Qg(null)}}let kb=(()=>{class t{constructor(t,e,n,i,r){this.router=t,this.injector=i,this.preloadingStrategy=r,this.loader=new cb(e,n,e=>t.triggerEvent(new ev(e)),e=>t.triggerEvent(new nv(e)))}setUpPreloading(){this.subscription=this.router.events.pipe(hm(t=>t instanceof Km),Nm(()=>this.preload())).subscribe(()=>{})}preload(){const t=this.injector.get(Zt);return this.processRoutes(t,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(t,e){const n=[];for(const i of e)if(i.loadChildren&&!i.canLoad&&i._loadedConfig){const t=i._loadedConfig;n.push(this.processRoutes(t.module,t.routes))}else i.loadChildren&&!i.canLoad?n.push(this.preloadConfig(t,i)):i.children&&n.push(this.processRoutes(t,i.children));return I(n).pipe(j(),E(t=>{}))}preloadConfig(t,e){return this.preloadingStrategy.preload(e,()=>this.loader.load(t.injector,e).pipe(U(t=>(e._loadedConfig=t,this.processRoutes(t.module,t.routes)))))}}return t.\u0275fac=function(e){return new(e||t)(Yt(mb),Yt(uh),Yt(Uu),Yt(Bo),Yt(Cb))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),Eb=(()=>{class t{constructor(t,e,n={}){this.router=t,this.viewportScroller=e,this.options=n,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},n.scrollPositionRestoration=n.scrollPositionRestoration||"disabled",n.anchorScrolling=n.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.router.events.subscribe(t=>{t instanceof Gm?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=t.navigationTrigger,this.restoredId=t.restoredState?t.restoredState.navigationId:0):t instanceof Km&&(this.lastId=t.id,this.scheduleScrollEvent(t,this.router.parseUrl(t.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.router.events.subscribe(t=>{t instanceof av&&(t.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(t.position):t.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(t.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(t,e){this.router.triggerEvent(new av(t,"popstate"===this.lastSource?this.store[this.restoredId]:null,e))}ngOnDestroy(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(Yt(mb),Yt(Md),Yt(void 0))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();const Ab=new Pt("ROUTER_CONFIGURATION"),Db=new Pt("ROUTER_FORROOT_GUARD"),Tb=[Oh,{provide:Dv,useClass:Tv},{provide:mb,useFactory:function(t,e,n,i,r,s,o,a={},l,c){const u=new mb(null,t,e,n,i,r,s,gv(o));if(l&&(u.urlHandlingStrategy=l),c&&(u.routeReuseStrategy=c),function(t,e){t.errorHandler&&(e.errorHandler=t.errorHandler),t.malformedUriErrorHandler&&(e.malformedUriErrorHandler=t.malformedUriErrorHandler),t.onSameUrlNavigation&&(e.onSameUrlNavigation=t.onSameUrlNavigation),t.paramsInheritanceStrategy&&(e.paramsInheritanceStrategy=t.paramsInheritanceStrategy),t.relativeLinkResolution&&(e.relativeLinkResolution=t.relativeLinkResolution),t.urlUpdateStrategy&&(e.urlUpdateStrategy=t.urlUpdateStrategy)}(a,u),a.enableTracing){const t=bh();u.events.subscribe(e=>{t.logGroup(`Router Event: ${e.constructor.name}`),t.log(e.toString()),t.log(e),t.logGroupEnd()})}return u},deps:[Dv,hb,Oh,Bo,uh,Uu,lb,Ab,[class{},new it],[class{},new it]]},hb,{provide:Jv,useFactory:function(t){return t.routerState.root},deps:[mb]},{provide:uh,useClass:fh},kb,Sb,class{preload(t,e){return e().pipe($m(()=>Qg(null)))}},{provide:Ab,useValue:{enableTracing:!1}}];function Rb(){return new ih("Router",mb)}let Fb=(()=>{class t{constructor(t,e){}static forRoot(e,n){return{ngModule:t,providers:[Tb,Ob(e),{provide:Db,useFactory:$b,deps:[[mb,new it,new st]]},{provide:Ab,useValue:n||{}},{provide:Rh,useFactory:Lb,deps:[xh,[new nt(Mh),new it],Ab]},{provide:Eb,useFactory:Mb,deps:[mb,Md,Ab]},{provide:Cb,useExisting:n&&n.preloadingStrategy?n.preloadingStrategy:Sb},{provide:ih,multi:!0,useFactory:Rb},[Ib,{provide:_u,multi:!0,useFactory:Nb,deps:[Ib]},{provide:Bb,useFactory:Pb,deps:[Ib]},{provide:Tu,multi:!0,useExisting:Bb}]]}}static forChild(e){return{ngModule:t,providers:[Ob(e)]}}}return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)(Yt(Db,8),Yt(mb,8))}}),t})();function Mb(t,e,n){return n.scrollOffset&&e.setOffset(n.scrollOffset),new Eb(t,e,n)}function Lb(t,e,n={}){return n.useHash?new $h(t,e):new Lh(t,e)}function $b(t){return"guarded"}function Ob(t){return[{provide:Uo,multi:!0,useValue:t},{provide:lb,multi:!0,useValue:t}]}let Ib=(()=>{class t{constructor(t){this.injector=t,this.initNavigation=!1,this.resultOfPreactivationDone=new C}appInitializer(){return this.injector.get(Ch,Promise.resolve(null)).then(()=>{let t=null;const e=new Promise(e=>t=e),n=this.injector.get(mb),i=this.injector.get(Ab);return"disabled"===i.initialNavigation?(n.setUpLocationChangeListener(),t(!0)):"enabled"===i.initialNavigation||"enabledBlocking"===i.initialNavigation?(n.hooks.afterPreactivation=()=>this.initNavigation?Qg(null):(this.initNavigation=!0,t(!0),this.resultOfPreactivationDone),n.initialNavigation()):t(!0),e})}bootstrapListener(t){const e=this.injector.get(Ab),n=this.injector.get(kb),i=this.injector.get(Eb),r=this.injector.get(mb),s=this.injector.get(lh);t===s.components[0]&&("enabledNonBlocking"!==e.initialNavigation&&void 0!==e.initialNavigation||r.initialNavigation(),n.setUpPreloading(),i.init(),r.resetRootComponentType(s.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}}return t.\u0275fac=function(e){return new(e||t)(Yt(Bo))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();function Nb(t){return t.appInitializer.bind(t)}function Pb(t){return t.bootstrapListener.bind(t)}const Bb=new Pt("Router Initializer");function Ub(t,e){return new y(n=>{const i=t.length;if(0===i)return void n.complete();const r=new Array(i);let s=0,o=0;for(let a=0;a{c||(c=!0,o++),r[a]=t},error:t=>n.error(t),complete:()=>{s++,s!==i&&c||(o===i&&n.next(e?e.reduce((t,e,n)=>(t[e]=r[n],t),{}):r),n.complete())}}))}})}const Vb=new Pt("NgValueAccessor"),Hb={provide:Vb,useExisting:_t(()=>jb),multi:!0};let jb=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"checked",t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(oa(pc),oa(uc))},t.\u0275dir=we({type:t,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(t,e){1&t&&ya("change",function(t){return e.onChange(t.target.checked)})("blur",function(){return e.onTouched()})},features:[oc([Hb])]}),t})();const zb={provide:Vb,useExisting:_t(()=>Gb),multi:!0},Wb=new Pt("CompositionEventMode");let Gb=(()=>{class t{constructor(t,e,n){this._renderer=t,this._elementRef=e,this._compositionMode=n,this.onChange=t=>{},this.onTouched=()=>{},this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function(){const t=bh()?bh().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}}return t.\u0275fac=function(e){return new(e||t)(oa(pc),oa(uc),oa(Wb,8))},t.\u0275dir=we({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(t,e){1&t&&ya("input",function(t){return e._handleInput(t.target.value)})("blur",function(){return e.onTouched()})("compositionstart",function(){return e._compositionStart()})("compositionend",function(t){return e._compositionEnd(t.target.value)})},features:[oc([zb])]}),t})();function Kb(t){return null==t||0===t.length}function qb(t){return null!=t&&"number"==typeof t.length}const Yb=new Pt("NgValidators"),Xb=new Pt("NgAsyncValidators"),Jb=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class Qb{static min(t){return e=>{if(Kb(e.value)||Kb(t))return null;const n=parseFloat(e.value);return!isNaN(n)&&n{if(Kb(e.value)||Kb(t))return null;const n=parseFloat(e.value);return!isNaN(n)&&n>t?{max:{max:t,actual:e.value}}:null}}static required(t){return Kb(t.value)?{required:!0}:null}static requiredTrue(t){return!0===t.value?null:{required:!0}}static email(t){return Kb(t.value)||Jb.test(t.value)?null:{email:!0}}static minLength(t){return e=>Kb(e.value)||!qb(e.value)?null:e.value.lengthqb(e.value)&&e.value.length>t?{maxlength:{requiredLength:t,actualLength:e.value.length}}:null}static pattern(t){if(!t)return Qb.nullValidator;let e,n;return"string"==typeof t?(n="","^"!==t.charAt(0)&&(n+="^"),n+=t,"$"!==t.charAt(t.length-1)&&(n+="$"),e=new RegExp(n)):(n=t.toString(),e=t),t=>{if(Kb(t.value))return null;const i=t.value;return e.test(i)?null:{pattern:{requiredPattern:n,actualValue:i}}}}static nullValidator(t){return null}static compose(t){if(!t)return null;const e=t.filter(Zb);return 0==e.length?null:function(t){return ew(nw(t,e))}}static composeAsync(t){if(!t)return null;const e=t.filter(Zb);return 0==e.length?null:function(t){return function(...t){if(1===t.length){const e=t[0];if(l(e))return Ub(e,null);if(c(e)&&Object.getPrototypeOf(e)===Object.prototype){const t=Object.keys(e);return Ub(t.map(t=>e[t]),t)}}if("function"==typeof t[t.length-1]){const e=t.pop();return Ub(t=1===t.length&&l(t[0])?t[0]:t,null).pipe(E(t=>e(...t)))}return Ub(t,null)}(nw(t,e).map(tw)).pipe(E(ew))}}}function Zb(t){return null!=t}function tw(t){const e=ma(t)?I(t):t;return va(e),e}function ew(t){let e={};return t.forEach(t=>{e=null!=t?Object.assign(Object.assign({},e),t):e}),0===Object.keys(e).length?null:e}function nw(t,e){return e.map(e=>e(t))}function iw(t){return t.map(t=>function(t){return!t.validate}(t)?t:e=>t.validate(e))}function rw(t){return null!=t?Qb.compose(iw(t)):null}function sw(t){return null!=t?Qb.composeAsync(iw(t)):null}function ow(t,e){return null===t?[e]:Array.isArray(t)?[...t,e]:[t,e]}function aw(t){return t._rawValidators}function lw(t){return t._rawAsyncValidators}let cw=(()=>{class t{constructor(){this._rawValidators=[],this._rawAsyncValidators=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=rw(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=sw(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}reset(t){this.control&&this.control.reset(t)}hasError(t,e){return!!this.control&&this.control.hasError(t,e)}getError(t,e){return this.control?this.control.getError(t,e):null}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=we({type:t}),t})(),uw=(()=>{class t extends cw{get formDirective(){return null}get path(){return null}}return t.\u0275fac=function(e){return hw(e||t)},t.\u0275dir=we({type:t,features:[jo]}),t})();const hw=Ei(uw);class dw extends cw{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class fw{constructor(t){this._cd=t}get ngClassUntouched(){return!!this._cd.control&&this._cd.control.untouched}get ngClassTouched(){return!!this._cd.control&&this._cd.control.touched}get ngClassPristine(){return!!this._cd.control&&this._cd.control.pristine}get ngClassDirty(){return!!this._cd.control&&this._cd.control.dirty}get ngClassValid(){return!!this._cd.control&&this._cd.control.valid}get ngClassInvalid(){return!!this._cd.control&&this._cd.control.invalid}get ngClassPending(){return!!this._cd.control&&this._cd.control.pending}}let pw=(()=>{class t extends fw{constructor(t){super(t)}}return t.\u0275fac=function(e){return new(e||t)(oa(dw,2))},t.\u0275dir=we({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,e){2&t&&Oa("ng-untouched",e.ngClassUntouched)("ng-touched",e.ngClassTouched)("ng-pristine",e.ngClassPristine)("ng-dirty",e.ngClassDirty)("ng-valid",e.ngClassValid)("ng-invalid",e.ngClassInvalid)("ng-pending",e.ngClassPending)},features:[jo]}),t})(),gw=(()=>{class t extends fw{constructor(t){super(t)}}return t.\u0275fac=function(e){return new(e||t)(oa(uw,2))},t.\u0275dir=we({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:14,hostBindings:function(t,e){2&t&&Oa("ng-untouched",e.ngClassUntouched)("ng-touched",e.ngClassTouched)("ng-pristine",e.ngClassPristine)("ng-dirty",e.ngClassDirty)("ng-valid",e.ngClassValid)("ng-invalid",e.ngClassInvalid)("ng-pending",e.ngClassPending)},features:[jo]}),t})();const mw="VALID",vw="INVALID",yw="PENDING",bw="DISABLED";function ww(t){return(Sw(t)?t.validators:t)||null}function xw(t){return Array.isArray(t)?rw(t):t||null}function _w(t,e){return(Sw(e)?e.asyncValidators:t)||null}function Cw(t){return Array.isArray(t)?sw(t):t||null}function Sw(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}class kw{constructor(t,e){this._hasOwnPendingAsyncValidator=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=t,this._rawAsyncValidators=e,this._composedValidatorFn=xw(this._rawValidators),this._composedAsyncValidatorFn=Cw(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get valid(){return this.status===mw}get invalid(){return this.status===vw}get pending(){return this.status==yw}get disabled(){return this.status===bw}get enabled(){return this.status!==bw}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._rawValidators=t,this._composedValidatorFn=xw(t)}setAsyncValidators(t){this._rawAsyncValidators=t,this._composedAsyncValidatorFn=Cw(t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(t=>t.markAllAsTouched())}markAsUntouched(t={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}markAsDirty(t={}){this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}markAsPristine(t={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(t=>{t.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}markAsPending(t={}){this.status=yw,!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}disable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status=bw,this.errors=null,this._forEachChild(e=>{e.disable(Object.assign(Object.assign({},t),{onlySelf:!0}))}),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(t=>t(!0))}enable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status=mw,this._forEachChild(e=>{e.enable(Object.assign(Object.assign({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(t=>t(!1))}_updateAncestors(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(t){this._parent=t}updateValueAndValidity(t={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),this.status!==mw&&this.status!==yw||this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?bw:mw}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=yw,this._hasOwnPendingAsyncValidator=!0;const e=tw(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(e=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(e,{emitEvent:t})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)}get(t){return function(t,e,n){if(null==e)return null;if(Array.isArray(e)||(e=e.split(".")),Array.isArray(e)&&0===e.length)return null;let i=t;return e.forEach(t=>{i=i instanceof Aw?i.controls.hasOwnProperty(t)?i.controls[t]:null:i instanceof Dw&&i.at(t)||null}),i}(this,t)}getError(t,e){const n=e?this.get(e):this;return n&&n.errors?n.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}_initObservables(){this.valueChanges=new Zc,this.statusChanges=new Zc}_calculateStatus(){return this._allControlsDisabled()?bw:this.errors?vw:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(yw)?yw:this._anyControlsHaveStatus(vw)?vw:mw}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t={}){this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}_updateTouched(t={}){this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}_isBoxedValue(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){Sw(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}}class Ew extends kw{constructor(t=null,e,n){super(ww(e),_w(n,e)),this._onChange=[],this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!n})}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(t=>t(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=null,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_clearChangeFns(){this._onChange=[],this._onDisabledChange=[],this._onCollectionChange=()=>{}}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_forEachChild(t){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(t){this._isBoxedValue(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}}class Aw extends kw{constructor(t,e,n){super(ww(e),_w(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!n})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e){this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}removeControl(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity(),this._onCollectionChange()}setControl(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){this._checkAllValuesPresent(t),Object.keys(t).forEach(n=>{this._throwIfControlMissing(n),this.controls[n].setValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){Object.keys(t).forEach(n=>{this.controls[n]&&this.controls[n].patchValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}reset(t={},e={}){this._forEachChild((n,i)=>{n.reset(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,n)=>(t[n]=e instanceof Ew?e.value:e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(t,e)=>!!e._syncPendingControls()||t);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_throwIfControlMissing(t){if(!Object.keys(this.controls).length)throw new Error("\n There are no form controls registered with this group yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.controls[t])throw new Error(`Cannot find form control with name: ${t}.`)}_forEachChild(t){Object.keys(this.controls).forEach(e=>t(this.controls[e],e))}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(const e of Object.keys(this.controls)){const n=this.controls[e];if(this.contains(e)&&t(n))return!0}return!1}_reduceValue(){return this._reduceChildren({},(t,e,n)=>((e.enabled||this.disabled)&&(t[n]=e.value),t))}_reduceChildren(t,e){let n=t;return this._forEachChild((t,i)=>{n=e(n,t,i)}),n}_allControlsDisabled(){for(const t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_checkAllValuesPresent(t){this._forEachChild((e,n)=>{if(void 0===t[n])throw new Error(`Must supply a value for form control with name: '${n}'.`)})}}class Dw extends kw{constructor(t,e,n){super(ww(e),_w(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!n})}at(t){return this.controls[t]}push(t){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity(),this._onCollectionChange()}insert(t,e){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity()}removeAt(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),this.updateValueAndValidity()}setControl(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),e&&(this.controls.splice(t,0,e),this._registerControl(e)),this.updateValueAndValidity(),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){this._checkAllValuesPresent(t),t.forEach((t,n)=>{this._throwIfControlMissing(n),this.at(n).setValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t.forEach((t,n)=>{this.at(n)&&this.at(n).patchValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}reset(t=[],e={}){this._forEachChild((n,i)=>{n.reset(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t instanceof Ew?t.value:t.getRawValue())}clear(){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity())}_syncPendingControls(){let t=this.controls.reduce((t,e)=>!!e._syncPendingControls()||t,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_throwIfControlMissing(t){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(t))throw new Error(`Cannot find form control at index ${t}`)}_forEachChild(t){this.controls.forEach((e,n)=>{t(e,n)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_checkAllValuesPresent(t){this._forEachChild((e,n)=>{if(void 0===t[n])throw new Error(`Must supply a value for form control at index: ${n}.`)})}_allControlsDisabled(){for(const t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}}const Tw={provide:Vb,useExisting:_t(()=>Rw),multi:!0};let Rw=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}registerOnChange(t){this.onChange=e=>{t(""==e?null:parseFloat(e))}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(oa(pc),oa(uc))},t.\u0275dir=we({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(t,e){1&t&&ya("input",function(t){return e.onChange(t.target.value)})("blur",function(){return e.onTouched()})},features:[oc([Tw])]}),t})();const Fw={provide:Vb,useExisting:_t(()=>Lw),multi:!0};let Mw=(()=>{class t{constructor(){this._accessors=[]}add(t,e){this._accessors.push([t,e])}remove(t){for(let e=this._accessors.length-1;e>=0;--e)if(this._accessors[e][1]===t)return void this._accessors.splice(e,1)}select(t){this._accessors.forEach(e=>{this._isSameGroup(e,t)&&e[1]!==t&&e[1].fireUncheck(t.value)})}_isSameGroup(t,e){return!!t[0].control&&t[0]._parent===e._control._parent&&t[1].name===e.name}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),Lw=(()=>{class t{constructor(t,e,n,i){this._renderer=t,this._elementRef=e,this._registry=n,this._injector=i,this.onChange=()=>{},this.onTouched=()=>{}}ngOnInit(){this._control=this._injector.get(dw),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(t){this._state=t===this.value,this._renderer.setProperty(this._elementRef.nativeElement,"checked",this._state)}registerOnChange(t){this._fn=t,this.onChange=()=>{t(this.value),this._registry.select(this)}}fireUncheck(t){this.writeValue(t)}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_checkName(){!this.name&&this.formControlName&&(this.name=this.formControlName)}}return t.\u0275fac=function(e){return new(e||t)(oa(pc),oa(uc),oa(Mw),oa(Bo))},t.\u0275dir=we({type:t,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(t,e){1&t&&ya("change",function(){return e.onChange()})("blur",function(){return e.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[oc([Fw])]}),t})();const $w={provide:Vb,useExisting:_t(()=>Ow),multi:!0};let Ow=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",parseFloat(t))}registerOnChange(t){this.onChange=e=>{t(""==e?null:parseFloat(e))}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(oa(pc),oa(uc))},t.\u0275dir=we({type:t,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(t,e){1&t&&ya("change",function(t){return e.onChange(t.target.value)})("input",function(t){return e.onChange(t.target.value)})("blur",function(){return e.onTouched()})},features:[oc([$w])]}),t})();const Iw={provide:Vb,useExisting:_t(()=>Pw),multi:!0};function Nw(t,e){return null==t?`${e}`:(e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}let Pw=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=t=>{},this.onTouched=()=>{},this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){this.value=t;const e=this._getOptionId(t);null==e&&this._renderer.setProperty(this._elementRef.nativeElement,"selectedIndex",-1);const n=Nw(e,t);this._renderer.setProperty(this._elementRef.nativeElement,"value",n)}registerOnChange(t){this.onChange=e=>{this.value=this._getOptionValue(e),t(this.value)}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(const e of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(e),t))return e;return null}_getOptionValue(t){const e=function(t){return t.split(":")[0]}(t);return this._optionMap.has(e)?this._optionMap.get(e):t}}return t.\u0275fac=function(e){return new(e||t)(oa(pc),oa(uc))},t.\u0275dir=we({type:t,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(t,e){1&t&&ya("change",function(t){return e.onChange(t.target.value)})("blur",function(){return e.onTouched()})},inputs:{compareWith:"compareWith"},features:[oc([Iw])]}),t})(),Bw=(()=>{class t{constructor(t,e,n){this._element=t,this._renderer=e,this._select=n,this._select&&(this.id=this._select._registerOption())}set ngValue(t){null!=this._select&&(this._select._optionMap.set(this.id,t),this._setElementValue(Nw(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._setElementValue(t),this._select&&this._select.writeValue(this._select.value)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(oa(uc),oa(pc),oa(Pw,9))},t.\u0275dir=we({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();const Uw={provide:Vb,useExisting:_t(()=>Hw),multi:!0};function Vw(t,e){return null==t?`${e}`:("string"==typeof e&&(e=`'${e}'`),e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}let Hw=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=t=>{},this.onTouched=()=>{},this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){let e;if(this.value=t,Array.isArray(t)){const n=t.map(t=>this._getOptionId(t));e=(t,e)=>{t._setSelected(n.indexOf(e.toString())>-1)}}else e=(t,e)=>{t._setSelected(!1)};this._optionMap.forEach(e)}registerOnChange(t){this.onChange=e=>{const n=[];if(void 0!==e.selectedOptions){const t=e.selectedOptions;for(let e=0;e{class t{constructor(t,e,n){this._element=t,this._renderer=e,this._select=n,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){null!=this._select&&(this._value=t,this._setElementValue(Vw(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(Vw(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(oa(uc),oa(pc),oa(Hw,9))},t.\u0275dir=we({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();function zw(t,e){Gw(t,e,!0),e.valueAccessor.writeValue(t.value),function(t,e){e.valueAccessor.registerOnChange(n=>{t._pendingValue=n,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&qw(t,e)})}(t,e),function(t,e){t.registerOnChange((t,n)=>{e.valueAccessor.writeValue(t),n&&e.viewToModelUpdate(t)})}(t,e),function(t,e){e.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&qw(t,e),"submit"!==t.updateOn&&t.markAsTouched()})}(t,e),e.valueAccessor.setDisabledState&&t.registerOnDisabledChange(t=>{e.valueAccessor.setDisabledState(t)})}function Ww(t,e){t.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function Gw(t,e,n){const i=aw(t);null!==e.validator?t.setValidators(ow(i,e.validator)):"function"==typeof i&&t.setValidators([i]);const r=lw(t);if(null!==e.asyncValidator?t.setAsyncValidators(ow(r,e.asyncValidator)):"function"==typeof r&&t.setAsyncValidators([r]),n){const n=()=>t.updateValueAndValidity();Ww(e._rawValidators,n),Ww(e._rawAsyncValidators,n)}}function Kw(t,e,n){if(null!==t){if(null!==e.validator){const n=aw(t);Array.isArray(n)&&n.length>0&&t.setValidators(n.filter(t=>t!==e.validator))}if(null!==e.asyncValidator){const n=lw(t);Array.isArray(n)&&n.length>0&&t.setAsyncValidators(n.filter(t=>t!==e.asyncValidator))}}if(n){const t=()=>{};Ww(e._rawValidators,t),Ww(e._rawAsyncValidators,t)}}function qw(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function Yw(t,e){Gw(t,e,!1)}const Xw=[jb,Ow,Rw,Pw,Hw,Lw];let Jw=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=we({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),t})();const Qw=new Pt("NgModelWithFormControlWarning"),Zw={provide:uw,useExisting:_t(()=>tx)};let tx=(()=>{class t extends uw{constructor(t,e){super(),this.validators=t,this.asyncValidators=e,this.submitted=!1,this.directives=[],this.form=null,this.ngSubmit=new Zc,this._setValidators(t),this._setAsyncValidators(e)}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){const e=this.form.get(t.path);return zw(e,t),e.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),e}getControl(t){return this.form.get(t.path)}removeControl(t){!function(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}(this.directives,t)}addFormGroup(t){const e=this.form.get(t.path);Yw(e,t),e.updateValueAndValidity({emitEvent:!1})}removeFormGroup(t){}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){const e=this.form.get(t.path);Yw(e,t),e.updateValueAndValidity({emitEvent:!1})}removeFormArray(t){}getFormArray(t){return this.form.get(t.path)}updateModel(t,e){this.form.get(t.path).setValue(e)}onSubmit(t){return this.submitted=!0,e=this.directives,this.form._syncPendingControls(),e.forEach(t=>{const e=t.control;"submit"===e.updateOn&&e._pendingChange&&(t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1)}),this.ngSubmit.emit(t),!1;var e}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_updateDomValue(){this.directives.forEach(t=>{const e=this.form.get(t.path);t.control!==e&&(function(t,e){const n=()=>{};e.valueAccessor.registerOnChange(n),e.valueAccessor.registerOnTouched(n),Kw(t,e,!0),t&&t._clearChangeFns()}(t.control||null,t),e&&zw(e,t),t.control=e)}),this.form._updateTreeValidity({emitEvent:!1})}_updateRegistrations(){this.form._registerOnCollectionChange(()=>this._updateDomValue()),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){Gw(this.form,this,!1),this._oldForm&&Kw(this._oldForm,this,!1)}_checkFormPresent(){}}return t.\u0275fac=function(e){return new(e||t)(oa(Yb,10),oa(Xb,10))},t.\u0275dir=we({type:t,selectors:[["","formGroup",""]],hostBindings:function(t,e){1&t&&ya("submit",function(t){return e.onSubmit(t)})("reset",function(){return e.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[oc([Zw]),jo,Ve]}),t})();const ex={provide:dw,useExisting:_t(()=>nx)};let nx=(()=>{class t extends dw{constructor(t,e,n,i,r){super(),this._ngModelWarningConfig=r,this._added=!1,this.update=new Zc,this._ngModelWarningSent=!1,this._parent=t,this._setValidators(e),this._setAsyncValidators(n),this.valueAccessor=function(t,e){if(!e)return null;let n,i,r;return Array.isArray(e),e.forEach(t=>{var e;t.constructor===Gb?n=t:(e=t,Xw.some(t=>e.constructor===t)?i=t:r=t)}),r||i||n||null}(0,i)}set isDisabled(t){}ngOnChanges(e){var n,i;this._added||this._setUpControl(),function(t,e){if(!t.hasOwnProperty("model"))return!1;const n=t.model;return!!n.isFirstChange()||!Object.is(e,n.currentValue)}(e,this.viewModel)&&(n=t,this,i=this._ngModelWarningConfig,zi()&&"never"!==i&&((null!==i&&"once"!==i||n._ngModelWarningSentOnce)&&("always"!==i||this._ngModelWarningSent)||(n._ngModelWarningSentOnce=!0,this._ngModelWarningSent=!0)),this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}get path(){return t=null==this.name?this.name:this.name.toString(),[...this._parent.path,t];var t}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this._added=!0}}return t.\u0275fac=function(e){return new(e||t)(oa(uw,13),oa(Yb,10),oa(Xb,10),oa(Vb,10),oa(Qw,8))},t.\u0275dir=we({type:t,selectors:[["","formControlName",""]],inputs:{isDisabled:["disabled","isDisabled"],name:["formControlName","name"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[oc([ex]),jo,Ve]}),t._ngModelWarningSentOnce=!1,t})();const ix={provide:Yb,useExisting:_t(()=>rx),multi:!0};let rx=(()=>{class t{constructor(){this._required=!1}get required(){return this._required}set required(t){this._required=null!=t&&!1!==t&&"false"!=`${t}`,this._onChange&&this._onChange()}validate(t){return this.required?Qb.required(t):null}registerOnValidatorChange(t){this._onChange=t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=we({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(t,e){2&t&&na("required",e.required?"":null)},inputs:{required:"required"},features:[oc([ix])]}),t})(),sx=(()=>{class t{}return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)}}),t})(),ox=(()=>{class t{group(t,e=null){const n=this._reduceControls(t);let i,r=null,s=null;return null!=e&&(function(t){return void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn}(e)?(r=null!=e.validators?e.validators:null,s=null!=e.asyncValidators?e.asyncValidators:null,i=null!=e.updateOn?e.updateOn:void 0):(r=null!=e.validator?e.validator:null,s=null!=e.asyncValidator?e.asyncValidator:null)),new Aw(n,{asyncValidators:s,updateOn:i,validators:r})}control(t,e,n){return new Ew(t,e,n)}array(t,e,n){const i=t.map(t=>this._createControl(t));return new Dw(i,e,n)}_reduceControls(t){const e={};return Object.keys(t).forEach(n=>{e[n]=this._createControl(t[n])}),e}_createControl(t){return t instanceof Ew||t instanceof Aw||t instanceof Dw?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),ax=(()=>{class t{}return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},providers:[Mw],imports:[sx]}),t})(),lx=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:Qw,useValue:e.warnOnNgModelWithFormControl}]}}}return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},providers:[ox,Mw],imports:[sx]}),t})();function cx(t,e,n,i){var r,s=arguments.length,o=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,n,o):r(e,n))||o);return s>3&&o&&Object.defineProperty(e,n,o),o}function ux(t,e){return function(n,i){e(n,i,t)}}const hx=new Pt("ngx-segment-analytics.config"),dx={debug:!1,loadOnInitialization:!0,segmentHost:"cdn.segment.com",segmentUri:"/analytics.js/v1/$API_KEY$/analytics.min.js"};let fx=(()=>{let t=class{};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({token:t,factory:function(e){return t.\u0275fac(e)}}),t})(),px=(()=>{let t=class{constructor(t,e,n){if(this._w=t,this._doc=e,this._config=Object.assign(Object.assign({},dx),n),!this._config.loadOnInitialization||void 0!==this._config.apiKey&&""!==this._config.apiKey){if(void 0===this._w.analytics||void 0===this._w.analytics.initialize||!1===this._w.analytics.initialize){if(void 0!==this._w.analytics&&!0===this._w.analytics.invoked)return void console.error("Segment snippet included twice.");this._config.debug&&console.log("Segment initialization..."),this._w.analytics=[],this._w.analytics.invoked=!0,this._w.analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware"],this._w.analytics.factory=t=>(...e)=>(e.unshift(t),this._w.analytics.push(e),this._w.analytics),this._w.analytics.methods.forEach(t=>{this._w.analytics[t]=this._w.analytics.factory(t)}),this._w.analytics.load=(t,e)=>{const n=this._doc.createElement("script");n.type="text/javascript",n.async=!0,n.src="https://"+this._config.segmentHost+this._config.segmentUri.replace("$API_KEY$",t);const i=this._doc.getElementsByTagName("script")[0];i.parentNode.insertBefore(n,i),this._w.analytics._loadOptions=e},this._w.analytics.SNIPPET_VERSION="4.1.0",this._config.loadOnInitialization&&this.load(this._config.apiKey)}}else console.error("The API Key cannot be an empty string if Segment must be loaded on initialization.")}load(t,e){this._w.analytics.load(t,e),this._config.debug&&console.log("Segment initialized"),this.debug(this._config.debug)}identify(t,e,n){return new Promise(i=>{this._w.analytics.identify(t,e,n,t=>i(this))})}track(t,e,n){return new Promise(i=>{this._w.analytics.track(t,e,n,t=>i(this))})}page(t,e,n,i){return new Promise(r=>{this._w.analytics.page(t,e,n,i,t=>r(this))})}group(t,e){return new Promise(n=>{this._w.analytics.group(t,e,t=>n(this))})}alias(t,e,n){return new Promise(i=>{this._w.analytics.alias(t,e,n,t=>i(this))})}ready(){return new Promise(t=>{this._w.analytics.ready(e=>t(this))})}user(){return this._w.analytics.user()}id(){return this._w.analytics.id()}traits(){return this._w.analytics.traits()}reset(){this._w.analytics.reset()}debug(t){this._w.analytics.debug(t)}on(t,e){this._w.analytics.on(t,e)}trackLink(t,e,n){this._w.analytics.trackLink(t,e,n)}trackForm(t,e,n){this._w.analytics.trackForm(t,e,n)}timeout(t){this._w.analytics.timeout(t)}addSourceMiddleware(t){this._w.analytics.addSourceMiddleware(t)}get plugins(){return this._w.analytics.plugins}};return t.\u0275fac=function(e){return new(e||t)(Yt(fx),Yt(wh),Yt(hx))},t.\u0275prov=ut({factory:function(){return new t(Yt(fx),Yt(wh),Yt(hx))},token:t,providedIn:"root"}),t=cx([ux(0,nt(fx)),ux(1,nt(wh)),ux(2,nt(hx))],t),t})();var gx;function mx(t){return function(t){return"browser"===t}(t)?window:{}}let vx=(()=>{let t=gx=class{constructor(t){if(t)throw new Error("SegmentModule is already loaded. Import it in the AppModule only")}static forRoot(t){return{ngModule:gx,providers:[{provide:hx,useValue:t},px]}}};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)(Yt(t,12))},providers:[{provide:fx,useFactory:mx,deps:[Du]}],imports:[[Fd]]}),t=gx=cx([ux(0,it()),ux(0,st())],t),t})();class yx{}class bx{}class wx{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?this.lazyInit="string"==typeof t?()=>{this.headers=new Map,t.split("\n").forEach(t=>{const e=t.indexOf(":");if(e>0){const n=t.slice(0,e),i=n.toLowerCase(),r=t.slice(e+1).trim();this.maybeSetNormalizedName(n,i),this.headers.has(i)?this.headers.get(i).push(r):this.headers.set(i,[r])}})}:()=>{this.headers=new Map,Object.keys(t).forEach(e=>{let n=t[e];const i=e.toLowerCase();"string"==typeof n&&(n=[n]),n.length>0&&(this.headers.set(i,n),this.maybeSetNormalizedName(e,i))})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();const e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof wx?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){const e=new wx;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof wx?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){const e=t.name.toLowerCase();switch(t.op){case"a":case"s":let n=t.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(t.name,e);const i=("a"===t.op?this.headers.get(e):void 0)||[];i.push(...n),this.headers.set(e,i);break;case"d":const r=t.value;if(r){let t=this.headers.get(e);if(!t)return;t=t.filter(t=>-1===r.indexOf(t)),0===t.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,t)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}}class xx{encodeKey(t){return _x(t)}encodeValue(t){return _x(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}function _x(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}class Cx{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new xx,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function(t,e){const n=new Map;return t.length>0&&t.split("&").forEach(t=>{const i=t.indexOf("="),[r,s]=-1==i?[e.decodeKey(t),""]:[e.decodeKey(t.slice(0,i)),e.decodeValue(t.slice(i+1))],o=n.get(r)||[];o.push(s),n.set(r,o)}),n}(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{const n=t.fromObject[e];this.map.set(e,Array.isArray(n)?n:[n])})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();const e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{const e=this.encoder.encodeKey(t);return this.map.get(t).map(t=>e+"="+this.encoder.encodeValue(t)).join("&")}).filter(t=>""!==t).join("&")}clone(t){const e=new Cx({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat([t]),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":const e=("a"===t.op?this.map.get(t.param):void 0)||[];e.push(t.value),this.map.set(t.param,e);break;case"d":if(void 0===t.value){this.map.delete(t.param);break}{let e=this.map.get(t.param)||[];const n=e.indexOf(t.value);-1!==n&&e.splice(n,1),e.length>0?this.map.set(t.param,e):this.map.delete(t.param)}}}),this.cloneFrom=this.updates=null)}}function Sx(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer}function kx(t){return"undefined"!=typeof Blob&&t instanceof Blob}function Ex(t){return"undefined"!=typeof FormData&&t instanceof FormData}class Ax{constructor(t,e,n,i){let r;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||i?(this.body=void 0!==n?n:null,r=i):r=n,r&&(this.reportProgress=!!r.reportProgress,this.withCredentials=!!r.withCredentials,r.responseType&&(this.responseType=r.responseType),r.headers&&(this.headers=r.headers),r.params&&(this.params=r.params)),this.headers||(this.headers=new wx),this.params){const t=this.params.toString();if(0===t.length)this.urlWithParams=e;else{const n=e.indexOf("?");this.urlWithParams=e+(-1===n?"?":ne.set(n,t.setHeaders[n]),a)),t.setParams&&(l=Object.keys(t.setParams).reduce((e,n)=>e.set(n,t.setParams[n]),l)),new Ax(e,n,r,{params:l,headers:a,reportProgress:o,responseType:i,withCredentials:s})}}var Dx=function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t}({});class Tx{constructor(t,e=200,n="OK"){this.headers=t.headers||new wx,this.status=void 0!==t.status?t.status:e,this.statusText=t.statusText||n,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}}class Rx extends Tx{constructor(t={}){super(t),this.type=Dx.ResponseHeader}clone(t={}){return new Rx({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class Fx extends Tx{constructor(t={}){super(t),this.type=Dx.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new Fx({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class Mx extends Tx{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${t.url||"(unknown url)"}`:`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}}function Lx(t,e){return{body:e,headers:t.headers,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}let $x=(()=>{class t{constructor(t){this.handler=t}request(t,e,n={}){let i;if(t instanceof Ax)i=t;else{let r,s;r=n.headers instanceof wx?n.headers:new wx(n.headers),n.params&&(s=n.params instanceof Cx?n.params:new Cx({fromObject:n.params})),i=new Ax(t,e,void 0!==n.body?n.body:null,{headers:r,params:s,reportProgress:n.reportProgress,responseType:n.responseType||"json",withCredentials:n.withCredentials})}const r=Qg(i).pipe(Nm(t=>this.handler.handle(t)));if(t instanceof Ax||"events"===n.observe)return r;const s=r.pipe(hm(t=>t instanceof Fx));switch(n.observe||"body"){case"body":switch(i.responseType){case"arraybuffer":return s.pipe(E(t=>{if(null!==t.body&&!(t.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return t.body}));case"blob":return s.pipe(E(t=>{if(null!==t.body&&!(t.body instanceof Blob))throw new Error("Response is not a Blob.");return t.body}));case"text":return s.pipe(E(t=>{if(null!==t.body&&"string"!=typeof t.body)throw new Error("Response is not a string.");return t.body}));case"json":default:return s.pipe(E(t=>t.body))}case"response":return s;default:throw new Error(`Unreachable: unhandled observe type ${n.observe}}`)}}delete(t,e={}){return this.request("DELETE",t,e)}get(t,e={}){return this.request("GET",t,e)}head(t,e={}){return this.request("HEAD",t,e)}jsonp(t,e){return this.request("JSONP",t,{params:(new Cx).append(e,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,e={}){return this.request("OPTIONS",t,e)}patch(t,e,n={}){return this.request("PATCH",t,Lx(n,e))}post(t,e,n={}){return this.request("POST",t,Lx(n,e))}put(t,e,n={}){return this.request("PUT",t,Lx(n,e))}}return t.\u0275fac=function(e){return new(e||t)(Yt(yx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();class Ox{constructor(t,e){this.next=t,this.interceptor=e}handle(t){return this.interceptor.intercept(t,this.next)}}const Ix=new Pt("HTTP_INTERCEPTORS");let Nx=(()=>{class t{intercept(t,e){return e.handle(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();const Px=/^\)\]\}',?\n/;class Bx{}let Ux=(()=>{class t{constructor(){}build(){return new XMLHttpRequest}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),Vx=(()=>{class t{constructor(t){this.xhrFactory=t}handle(t){if("JSONP"===t.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new y(e=>{const n=this.xhrFactory.build();if(n.open(t.method,t.urlWithParams),t.withCredentials&&(n.withCredentials=!0),t.headers.forEach((t,e)=>n.setRequestHeader(t,e.join(","))),t.headers.has("Accept")||n.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){const e=t.detectContentTypeHeader();null!==e&&n.setRequestHeader("Content-Type",e)}if(t.responseType){const e=t.responseType.toLowerCase();n.responseType="json"!==e?e:"text"}const i=t.serializeBody();let r=null;const s=()=>{if(null!==r)return r;const e=1223===n.status?204:n.status,i=n.statusText||"OK",s=new wx(n.getAllResponseHeaders()),o=function(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(n)||t.url;return r=new Rx({headers:s,status:e,statusText:i,url:o}),r},o=()=>{let{headers:i,status:r,statusText:o,url:a}=s(),l=null;204!==r&&(l=void 0===n.response?n.responseText:n.response),0===r&&(r=l?200:0);let c=r>=200&&r<300;if("json"===t.responseType&&"string"==typeof l){const t=l;l=l.replace(Px,"");try{l=""!==l?JSON.parse(l):null}catch(u){l=t,c&&(c=!1,l={error:u,text:l})}}c?(e.next(new Fx({body:l,headers:i,status:r,statusText:o,url:a||void 0})),e.complete()):e.error(new Mx({error:l,headers:i,status:r,statusText:o,url:a||void 0}))},a=t=>{const{url:i}=s(),r=new Mx({error:t,status:n.status||0,statusText:n.statusText||"Unknown Error",url:i||void 0});e.error(r)};let l=!1;const c=i=>{l||(e.next(s()),l=!0);let r={type:Dx.DownloadProgress,loaded:i.loaded};i.lengthComputable&&(r.total=i.total),"text"===t.responseType&&n.responseText&&(r.partialText=n.responseText),e.next(r)},u=t=>{let n={type:Dx.UploadProgress,loaded:t.loaded};t.lengthComputable&&(n.total=t.total),e.next(n)};return n.addEventListener("load",o),n.addEventListener("error",a),t.reportProgress&&(n.addEventListener("progress",c),null!==i&&n.upload&&n.upload.addEventListener("progress",u)),n.send(i),e.next({type:Dx.Sent}),()=>{n.removeEventListener("error",a),n.removeEventListener("load",o),t.reportProgress&&(n.removeEventListener("progress",c),null!==i&&n.upload&&n.upload.removeEventListener("progress",u)),n.readyState!==n.DONE&&n.abort()}})}}return t.\u0275fac=function(e){return new(e||t)(Yt(Bx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();const Hx=new Pt("XSRF_COOKIE_NAME"),jx=new Pt("XSRF_HEADER_NAME");class zx{}let Wx=(()=>{class t{constructor(t,e,n){this.doc=t,this.platform=e,this.cookieName=n,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=xd(t,this.cookieName),this.lastCookieString=t),this.lastToken}}return t.\u0275fac=function(e){return new(e||t)(Yt(wh),Yt(Du),Yt(Hx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),Gx=(()=>{class t{constructor(t,e){this.tokenService=t,this.headerName=e}intercept(t,e){const n=t.url.toLowerCase();if("GET"===t.method||"HEAD"===t.method||n.startsWith("http://")||n.startsWith("https://"))return e.handle(t);const i=this.tokenService.getToken();return null===i||t.headers.has(this.headerName)||(t=t.clone({headers:t.headers.set(this.headerName,i)})),e.handle(t)}}return t.\u0275fac=function(e){return new(e||t)(Yt(zx),Yt(jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),Kx=(()=>{class t{constructor(t,e){this.backend=t,this.injector=e,this.chain=null}handle(t){if(null===this.chain){const t=this.injector.get(Ix,[]);this.chain=t.reduceRight((t,e)=>new Ox(t,e),this.backend)}return this.chain.handle(t)}}return t.\u0275fac=function(e){return new(e||t)(Yt(bx),Yt(Bo))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),qx=(()=>{class t{static disable(){return{ngModule:t,providers:[{provide:Gx,useClass:Nx}]}}static withOptions(e={}){return{ngModule:t,providers:[e.cookieName?{provide:Hx,useValue:e.cookieName}:[],e.headerName?{provide:jx,useValue:e.headerName}:[]]}}}return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},providers:[Gx,{provide:Ix,useExisting:Gx,multi:!0},{provide:zx,useClass:Wx},{provide:Hx,useValue:"XSRF-TOKEN"},{provide:jx,useValue:"X-XSRF-TOKEN"}]}),t})(),Yx=(()=>{class t{}return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},providers:[$x,{provide:yx,useClass:Kx},Vx,{provide:bx,useExisting:Vx},Ux,{provide:Bx,useExisting:Ux}],imports:[[qx.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),t})();class Xx{}let Jx=(()=>{class t{constructor(t,e){this.httpClient=t,this.config=e||{host:"http://127.0.0.1:7120",timeoutMs:5e3}}addUser(t,e){let n=new Cx;return this.httpClient.post(this.config.host+"/v2/console/user",e,{params:n,headers:this.getTokenAuthHeaders(t)})}authenticate(t){let e=new Cx;return this.httpClient.post(this.config.host+"/v2/console/authenticate",t,{params:e})}banAccount(t,e){const n=`/v2/console/account/${e}/ban`;let i=new Cx;return this.httpClient.post(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}callApiEndpoint(t,e,n){const i=`/v2/console/api/endpoints/${e}`;let r=new Cx;return this.httpClient.post(this.config.host+i,n,{params:r,headers:this.getTokenAuthHeaders(t)})}callRpcEndpoint(t,e,n){const i=`/v2/console/api/endpoints/rpc/${e}`;let r=new Cx;return this.httpClient.post(this.config.host+i,n,{params:r,headers:this.getTokenAuthHeaders(t)})}deleteAccount(t,e,n){const i=`/v2/console/account/${e}`;let r=new Cx;return n&&(r=r.set("record_deletion",String(n))),this.httpClient.delete(this.config.host+i,{params:r,headers:this.getTokenAuthHeaders(t)})}deleteAccounts(t){let e=new Cx;return this.httpClient.delete(this.config.host+"/v2/console/account",{params:e,headers:this.getTokenAuthHeaders(t)})}deleteFriend(t,e,n){const i=`/v2/console/account/${e}/friend/${n}`;let r=new Cx;return this.httpClient.delete(this.config.host+i,{params:r,headers:this.getTokenAuthHeaders(t)})}deleteGroupUser(t,e,n){const i=`/v2/console/account/${e}/group/${n}`;let r=new Cx;return this.httpClient.delete(this.config.host+i,{params:r,headers:this.getTokenAuthHeaders(t)})}deleteLeaderboard(t,e){const n=`/v2/console/leaderboard/${e}`;let i=new Cx;return this.httpClient.delete(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}deleteLeaderboardRecord(t,e,n){const i=`/v2/console/leaderboard/${e}/owner/${n}`;let r=new Cx;return this.httpClient.delete(this.config.host+i,{params:r,headers:this.getTokenAuthHeaders(t)})}deleteStorage(t){let e=new Cx;return this.httpClient.delete(this.config.host+"/v2/console/storage",{params:e,headers:this.getTokenAuthHeaders(t)})}deleteStorageObject(t,e,n,i,r){const s=`/v2/console/storage/${e}/${n}/${i}`;let o=new Cx;return r&&(o=o.set("version",r)),this.httpClient.delete(this.config.host+s,{params:o,headers:this.getTokenAuthHeaders(t)})}deleteUser(t,e){let n=new Cx;return e&&(n=n.set("username",e)),this.httpClient.delete(this.config.host+"/v2/console/user",{params:n,headers:this.getTokenAuthHeaders(t)})}deleteWalletLedger(t,e,n){const i=`/v2/console/account/${e}/wallet/${n}`;let r=new Cx;return this.httpClient.delete(this.config.host+i,{params:r,headers:this.getTokenAuthHeaders(t)})}exportAccount(t,e){const n=`/v2/console/account/${e}/export`;let i=new Cx;return this.httpClient.get(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}getAccount(t,e){const n=`/v2/console/account/${e}`;let i=new Cx;return this.httpClient.get(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}getConfig(t){let e=new Cx;return this.httpClient.get(this.config.host+"/v2/console/config",{params:e,headers:this.getTokenAuthHeaders(t)})}getFriends(t,e){const n=`/v2/console/account/${e}/friend`;let i=new Cx;return this.httpClient.get(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}getGroups(t,e){const n=`/v2/console/account/${e}/group`;let i=new Cx;return this.httpClient.get(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}getLeaderboard(t,e){const n=`/v2/console/leaderboard/${e}`;let i=new Cx;return this.httpClient.get(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}getMatchState(t,e){const n=`/v2/console/match/${e}/state`;let i=new Cx;return this.httpClient.get(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}getRuntime(t){let e=new Cx;return this.httpClient.get(this.config.host+"/v2/console/runtime",{params:e,headers:this.getTokenAuthHeaders(t)})}getStatus(t){let e=new Cx;return this.httpClient.get(this.config.host+"/v2/console/status",{params:e,headers:this.getTokenAuthHeaders(t)})}getStorage(t,e,n,i){const r=`/v2/console/storage/${e}/${n}/${i}`;let s=new Cx;return this.httpClient.get(this.config.host+r,{params:s,headers:this.getTokenAuthHeaders(t)})}getWalletLedger(t,e){const n=`/v2/console/account/${e}/wallet`;let i=new Cx;return this.httpClient.get(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}listAccounts(t,e,n,i){let r=new Cx;return e&&(r=r.set("filter",e)),n&&(r=r.set("tombstones",String(n))),i&&(r=r.set("cursor",i)),this.httpClient.get(this.config.host+"/v2/console/account",{params:r,headers:this.getTokenAuthHeaders(t)})}listApiEndpoints(t){let e=new Cx;return this.httpClient.get(this.config.host+"/v2/console/api/endpoints",{params:e,headers:this.getTokenAuthHeaders(t)})}listLeaderboardRecords(t,e,n,i,r,s){const o=`/v2/console/leaderboard/${e}/records`;let a=new Cx;return n&&n.forEach(t=>a=a.append("owner_ids",String(t))),i&&(a=a.set("limit",String(i))),r&&(a=a.set("cursor",r)),s&&(a=a.set("expiry",s)),this.httpClient.get(this.config.host+o,{params:a,headers:this.getTokenAuthHeaders(t)})}listLeaderboards(t){let e=new Cx;return this.httpClient.get(this.config.host+"/v2/console/leaderboard",{params:e,headers:this.getTokenAuthHeaders(t)})}listMatches(t,e,n,i,r,s,o){let a=new Cx;return e&&(a=a.set("limit",String(e))),n&&(a=a.set("authoritative",String(n))),i&&(a=a.set("label",i)),r&&(a=a.set("min_size",String(r))),s&&(a=a.set("max_size",String(s))),o&&(a=a.set("query",o)),this.httpClient.get(this.config.host+"/v2/console/match",{params:a,headers:this.getTokenAuthHeaders(t)})}listPurchases(t,e,n,i){let r=new Cx;return e&&(r=r.set("user_id",e)),n&&(r=r.set("limit",String(n))),i&&(r=r.set("cursor",i)),this.httpClient.get(this.config.host+"/v2/console/purchase",{params:r,headers:this.getTokenAuthHeaders(t)})}listStorage(t,e,n,i,r){let s=new Cx;return e&&(s=s.set("user_id",e)),n&&(s=s.set("key",n)),i&&(s=s.set("collection",i)),r&&(s=s.set("cursor",r)),this.httpClient.get(this.config.host+"/v2/console/storage",{params:s,headers:this.getTokenAuthHeaders(t)})}listStorageCollections(t){let e=new Cx;return this.httpClient.get(this.config.host+"/v2/console/storage/collections",{params:e,headers:this.getTokenAuthHeaders(t)})}listUsers(t){let e=new Cx;return this.httpClient.get(this.config.host+"/v2/console/user",{params:e,headers:this.getTokenAuthHeaders(t)})}unbanAccount(t,e){const n=`/v2/console/account/${e}/unban`;let i=new Cx;return this.httpClient.post(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}unlinkApple(t,e){const n=`/v2/console/account/${e}/unlink/apple`;let i=new Cx;return this.httpClient.post(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}unlinkCustom(t,e){const n=`/v2/console/account/${e}/unlink/custom`;let i=new Cx;return this.httpClient.post(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}unlinkDevice(t,e,n){const i=`/v2/console/account/${e}/unlink/device`;let r=new Cx;return this.httpClient.post(this.config.host+i,n,{params:r,headers:this.getTokenAuthHeaders(t)})}unlinkEmail(t,e){const n=`/v2/console/account/${e}/unlink/email`;let i=new Cx;return this.httpClient.post(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}unlinkFacebook(t,e){const n=`/v2/console/account/${e}/unlink/facebook`;let i=new Cx;return this.httpClient.post(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}unlinkFacebookInstantGame(t,e){const n=`/v2/console/account/${e}/unlink/facebookinstantgame`;let i=new Cx;return this.httpClient.post(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}unlinkGameCenter(t,e){const n=`/v2/console/account/${e}/unlink/gamecenter`;let i=new Cx;return this.httpClient.post(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}unlinkGoogle(t,e){const n=`/v2/console/account/${e}/unlink/google`;let i=new Cx;return this.httpClient.post(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}unlinkSteam(t,e){const n=`/v2/console/account/${e}/unlink/steam`;let i=new Cx;return this.httpClient.post(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}updateAccount(t,e,n){const i=`/v2/console/account/${e}`;let r=new Cx;return this.httpClient.post(this.config.host+i,n,{params:r,headers:this.getTokenAuthHeaders(t)})}writeStorageObject(t,e,n,i,r){const s=`/v2/console/storage/${e}/${n}/${i}`;let o=new Cx;return this.httpClient.put(this.config.host+s,r,{params:o,headers:this.getTokenAuthHeaders(t)})}getTokenAuthHeaders(t){return(new wx).set("Authorization","Bearer "+t)}getBasicAuthHeaders(t,e){return(new wx).set("Authorization","Basic "+btoa(t+":"+e))}}return t.\u0275fac=function(e){return new(e||t)(Yt($x),Yt(Xx,8))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();var Qx=function(t){return t[t.APPLE_APP_STORE=0]="APPLE_APP_STORE",t[t.GOOGLE_PLAY_STORE=1]="GOOGLE_PLAY_STORE",t[t.HUAWEI_APP_GALLERY=2]="HUAWEI_APP_GALLERY",t}({}),Zx=function(t){return t[t.USER_ROLE_UNKNOWN=0]="USER_ROLE_UNKNOWN",t[t.USER_ROLE_ADMIN=1]="USER_ROLE_ADMIN",t[t.USER_ROLE_DEVELOPER=2]="USER_ROLE_DEVELOPER",t[t.USER_ROLE_MAINTAINER=3]="USER_ROLE_MAINTAINER",t[t.USER_ROLE_READONLY=4]="USER_ROLE_READONLY",t}({});const t_=new Pt("window"),e_=[{provide:t_,useFactory:()=>window}],n_="currentSession";let i_=(()=>{class t{constructor(t,e,n,i){this.window=t,this.segment=e,this.http=n,this.consoleService=i;const r=JSON.parse(localStorage.getItem(n_));r&&this.segmentIdentify(r),this.currentSessionSubject=new Zg(r),this.currentSession=this.currentSessionSubject.asObservable()}get currentSessionValue(){return this.currentSessionSubject.getValue()}get username(){const t=this.currentSessionSubject.getValue().token;return JSON.parse(atob(t.split(".")[1])).usn}get sessionRole(){const t=this.currentSessionSubject.getValue().token;switch(JSON.parse(atob(t.split(".")[1])).rol){case 1:return Zx.USER_ROLE_ADMIN;case 2:return Zx.USER_ROLE_DEVELOPER;case 3:return Zx.USER_ROLE_MAINTAINER;case 4:return Zx.USER_ROLE_READONLY;default:return Zx.USER_ROLE_UNKNOWN}}login(t,e){return this.consoleService.authenticate({username:t,password:e}).pipe(Um(t=>{localStorage.setItem(n_,JSON.stringify(t)),this.currentSessionSubject.next(t),this.segmentIdentify(t)}))}logout(){localStorage.removeItem(n_),this.currentSessionSubject.next(null)}segmentIdentify(t){const e=JSON.parse(atob(t.token.split(".")[1]));this.segment.identify(null,{username:e.usn,email:e.ema,cookie:e.cki})}}return t.\u0275fac=function(e){return new(e||t)(Yt(t_),Yt(px),Yt($x),Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function r_(t,e){if(1&t&&(ua(0,"div",17),qa(1),ha()),2&t){const t=xa();gs(1),Xa(" ",t.error," ")}}const s_=function(t){return{"was-validated":t}},o_=function(t){return{"is-invalid":t}};let a_=(()=>{class t{constructor(t,e,n,i,r){this.segment=t,this.formBuilder=e,this.route=n,this.router=i,this.authenticationService=r,this.error=""}ngOnInit(){this.segment.page("/login"),this.loginForm=this.formBuilder.group({username:["",Qb.compose([Qb.required])],password:["",Qb.compose([Qb.required,Qb.minLength(8)])]}),this.returnUrl=this.route.snapshot.queryParams.next||"/"}onSubmit(){this.submitted=!0,this.error="",this.loginForm.invalid||this.authenticationService.login(this.f.username.value,this.f.password.value).subscribe(t=>{this.loginForm.reset(),this.submitted=!1,this.router.navigate([this.returnUrl])},t=>{this.error=t,this.submitted=!1})}get f(){return this.loginForm.controls}}return t.\u0275fac=function(e){return new(e||t)(oa(px),oa(ox),oa(Jv),oa(mb),oa(i_))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:26,vars:14,consts:[[1,"bg-grad","d-flex","h-100"],[1,"align-self-center","mx-auto"],[1,"text-center","mb-4"],["src","/static/svg/logo.svg","alt","Nakama Logo","width","175"],["class","alert alert-warning","role","alert",4,"ngIf"],[1,"card"],[1,"card-body"],[1,"text-center"],[3,"formGroup","ngClass","ngSubmit"],[1,"form-group","form-row"],[1,"col-sm-12"],["for","username"],["type","text","id","username","formControlName","username","required","","autofocus","",1,"form-control",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","password"],["type","password","id","password","formControlName","password","required","",1,"form-control",3,"ngClass"],[1,"btn","btn-primary","btn-lg","btn-block",3,"disabled"],["role","alert",1,"alert","alert-warning"]],template:function(t,e){1&t&&(ua(0,"div",0),ua(1,"div",1),ua(2,"h1",2),da(3,"img",3),ha(),ra(4,r_,2,1,"div",4),ua(5,"div",5),ua(6,"div",6),ua(7,"h3",7),qa(8,"Login"),ha(),ua(9,"form",8),ya("ngSubmit",function(){return e.onSubmit()}),ua(10,"div",9),ua(11,"div",10),ua(12,"label",11),qa(13,"Username"),ha(),da(14,"input",12),ua(15,"div",13),qa(16,"Please enter a username."),ha(),ha(),ha(),ua(17,"div",9),ua(18,"div",10),ua(19,"label",14),qa(20,"Password"),ha(),da(21,"input",15),ua(22,"div",13),qa(23,"Password must be at least 8 characters."),ha(),ha(),ha(),ua(24,"button",16),qa(25,"Login"),ha(),ha(),ha(),ha(),ha(),ha()),2&t&&(gs(4),la("ngIf",e.error),gs(5),la("formGroup",e.loginForm)("ngClass",qc(8,s_,e.submitted)),gs(5),la("ngClass",qc(10,o_,e.f.username.dirty&&e.f.username.errors)),gs(1),la("hidden",e.f.username.disabled||e.f.username.valid||e.f.username.pristine),gs(6),la("ngClass",qc(12,o_,e.f.password.dirty&&e.f.password.errors)),gs(1),la("hidden",e.f.password.disabled||e.f.password.valid||e.f.password.pristine),gs(2),la("disabled",!e.loginForm.valid||e.submitted))},directives:[Ed,Jw,gw,tx,_d,Gb,pw,nx,rx],styles:["div[_ngcontent-%COMP%] .mx-auto[_ngcontent-%COMP%]{width:420px}"]}),t})(),l_=(()=>{class t{constructor(t,e){this.authService=t,this.router=e}canActivate(t,e){return!this.authService.currentSessionValue||(this.router.navigate(["/"]),!1)}}return t.\u0275fac=function(e){return new(e||t)(Yt(i_),Yt(mb))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),c_=(()=>{class t{constructor(t,e){this.router=t,this.authenticationService=e}canActivate(t,e){return!!this.authenticationService.currentSessionValue||(this.router.navigate(["/login"],{queryParams:{next:e.url}}),!1)}canActivateChild(t,e){return this.canActivate(t,e)}}return t.\u0275fac=function(e){return new(e||t)(Yt(mb),Yt(i_))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();class u_ extends h{constructor(t,e){super()}schedule(t,e=0){return this}}class h_ extends u_{constructor(t,e){super(t,e),this.scheduler=t,this.work=e,this.pending=!1}schedule(t,e=0){if(this.closed)return this;this.state=t;const n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(i,this.id,e),this}requestAsyncId(t,e,n=0){return setInterval(t.flush.bind(t,this),n)}recycleAsyncId(t,e,n=0){if(null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let n,i=!1;try{this.work(t)}catch(r){i=!0,n=!!r&&r||new Error(r)}if(i)return this.unsubscribe(),n}_unsubscribe(){const t=this.id,e=this.scheduler,n=e.actions,i=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&n.splice(i,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null}}let d_=(()=>{class t{constructor(e,n=t.now){this.SchedulerAction=e,this.now=n}schedule(t,e=0,n){return new this.SchedulerAction(this,t).schedule(n,e)}}return t.now=()=>Date.now(),t})();class f_ extends d_{constructor(t,e=d_.now){super(t,()=>f_.delegate&&f_.delegate!==this?f_.delegate.now():e()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(t,e=0,n){return f_.delegate&&f_.delegate!==this?f_.delegate.schedule(t,e,n):super.schedule(t,e,n)}flush(t){const{actions:e}=this;if(this.active)return void e.push(t);let n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}}const p_=new f_(h_);class g_{constructor(t,e,n,i){this.bufferTimeSpan=t,this.bufferCreationInterval=e,this.maxBufferSize=n,this.scheduler=i}call(t,e){return e.subscribe(new v_(t,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))}}class m_{constructor(){this.buffer=[]}}class v_ extends p{constructor(t,e,n,i,r){super(t),this.bufferTimeSpan=e,this.bufferCreationInterval=n,this.maxBufferSize=i,this.scheduler=r,this.contexts=[];const s=this.openContext();if(this.timespanOnly=null==n||n<0,this.timespanOnly)this.add(s.closeAction=r.schedule(y_,e,{subscriber:this,context:s,bufferTimeSpan:e}));else{const t={bufferTimeSpan:e,bufferCreationInterval:n,subscriber:this,scheduler:r};this.add(s.closeAction=r.schedule(w_,e,{subscriber:this,context:s})),this.add(r.schedule(b_,n,t))}}_next(t){const e=this.contexts,n=e.length;let i;for(let r=0;r0;){const n=t.shift();e.next(n.buffer)}super._complete()}_unsubscribe(){this.contexts=null}onBufferFull(t){this.closeContext(t);const e=t.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){t=this.openContext();const e=this.bufferTimeSpan;this.add(t.closeAction=this.scheduler.schedule(y_,e,{subscriber:this,context:t,bufferTimeSpan:e}))}}openContext(){const t=new m_;return this.contexts.push(t),t}closeContext(t){this.destination.next(t.buffer);const e=this.contexts;(e?e.indexOf(t):-1)>=0&&e.splice(e.indexOf(t),1)}}function y_(t){const e=t.subscriber,n=t.context;n&&e.closeContext(n),e.closed||(t.context=e.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function b_(t){const{bufferCreationInterval:e,bufferTimeSpan:n,subscriber:i,scheduler:r}=t,s=i.openContext();i.closed||(i.add(s.closeAction=r.schedule(w_,n,{subscriber:i,context:s})),this.schedule(t,e))}function w_(t){const{subscriber:e,context:n}=t;e.closeContext(n)}class x_{constructor(t,e){this.compare=t,this.keySelector=e}call(t,e){return e.subscribe(new __(t,this.compare,this.keySelector))}}class __ extends p{constructor(t,e,n){super(t),this.keySelector=n,this.hasKey=!1,"function"==typeof e&&(this.compare=e)}compare(t,e){return t===e}_next(t){let e;try{const{keySelector:n}=this;e=n?n(t):t}catch(i){return this.destination.error(i)}let n=!1;if(this.hasKey)try{const{compare:t}=this;n=t(this.key,e)}catch(i){return this.destination.error(i)}else this.hasKey=!0;n||(this.key=e,this.destination.next(t))}}function C_(t){return!l(t)&&t-parseFloat(t)+1>=0}function S_(t=0,e,n){let i=-1;return C_(e)?i=Number(e)<1?1:Number(e):k(e)&&(n=e),k(n)||(n=p_),new y(e=>{const r=C_(t)?t:+t-n.now();return n.schedule(k_,r,{index:0,period:i,subscriber:e})})}function k_(t){const{index:e,period:n,subscriber:i}=t;if(i.next(e),!i.closed){if(-1===n)return i.complete();t.index=e+1,this.schedule(t,n)}}function E_(t,e,n,r){return i(n)&&(r=n,n=void 0),r?E_(t,e,n).pipe(E(t=>l(t)?r(...t):r(t))):new y(i=>{A_(t,e,function(t){i.next(arguments.length>1?Array.prototype.slice.call(arguments):t)},i,n)})}function A_(t,e,n,i,r){let s;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){const i=t;t.addEventListener(e,n,r),s=()=>i.removeEventListener(e,n,r)}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){const i=t;t.on(e,n),s=()=>i.off(e,n)}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){const i=t;t.addListener(e,n),s=()=>i.removeListener(e,n)}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(let s=0,o=t.length;se.lift(new F_(t))}class F_{constructor(t){this.notifier=t}call(t,e){const n=new M_(t),i=B(this.notifier,new N(n));return i&&!n.seenValue?(n.add(i),e.subscribe(n)):n}}class M_ extends P{constructor(t){super(t),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}function L_(...t){return e=>{let n;return"function"==typeof t[t.length-1]&&(n=t.pop()),e.lift(new $_(t,n))}}class $_{constructor(t,e){this.observables=t,this.project=e}call(t,e){return e.subscribe(new O_(t,this.observables,this.project))}}class O_ extends tm{constructor(t,e,n){super(t),this.observables=e,this.project=n,this.toRespond=[];const i=e.length;this.values=new Array(i);for(let r=0;r0){const t=i.indexOf(n);-1!==t&&i.splice(t,1)}}notifyComplete(){}_next(t){if(0===this.toRespond.length){const e=[t,...this.values];this.project?this._tryProject(e):this.destination.next(e)}}_tryProject(t){let e;try{e=this.project.apply(this,t)}catch(n){return void this.destination.error(n)}this.destination.next(e)}}function I_(t,e){return new y(e?n=>e.schedule(N_,0,{error:t,subscriber:n}):e=>e.error(t))}function N_({error:t,subscriber:e}){e.error(t)}let P_=(()=>{class t{constructor(t,e,n){this.kind=t,this.value=e,this.error=n,this.hasValue="N"===t}observe(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}}do(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}}accept(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)}toObservable(){switch(this.kind){case"N":return Qg(this.value);case"E":return I_(this.error);case"C":return lm()}throw new Error("unexpected notification kind value")}static createNext(e){return void 0!==e?new t("N",e):t.undefinedValueNotification}static createError(e){return new t("E",void 0,e)}static createComplete(){return t.completeNotification}}return t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t})();function B_(t,e=p_){var n;const i=(n=t)instanceof Date&&!isNaN(+n)?+t-e.now():Math.abs(t);return t=>t.lift(new U_(i,e))}class U_{constructor(t,e){this.delay=t,this.scheduler=e}call(t,e){return e.subscribe(new V_(t,this.delay,this.scheduler))}}class V_ extends p{constructor(t,e,n){super(t),this.delay=e,this.scheduler=n,this.queue=[],this.active=!1,this.errored=!1}static dispatch(t){const e=t.source,n=e.queue,i=t.scheduler,r=t.destination;for(;n.length>0&&n[0].time-i.now()<=0;)n.shift().notification.observe(r);if(n.length>0){const e=Math.max(0,n[0].time-i.now());this.schedule(t,e)}else this.unsubscribe(),e.active=!1}_schedule(t){this.active=!0,this.destination.add(t.schedule(V_.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))}scheduleNotification(t){if(!0===this.errored)return;const e=this.scheduler,n=new H_(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}_next(t){this.scheduleNotification(P_.createNext(t))}_error(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()}_complete(){this.scheduleNotification(P_.createComplete()),this.unsubscribe()}}class H_{constructor(t,e){this.time=t,this.notification=e}}function j_(t,e){if(1&t){const t=ga();ua(0,"button",1),ya("click",function(){return pn(t),xa().closeHandler()}),ua(1,"span",2),qa(2,"\xd7"),ha(),ha()}}const z_=["*"],W_=["defaultDayTemplate"],G_=["content"];function K_(t,e){if(1&t&&da(0,"div",7),2&t){const t=e.currentMonth,n=e.selected,i=e.disabled,r=e.focused;la("date",e.date)("currentMonth",t)("selected",n)("disabled",i)("focused",r)}}function q_(t,e){if(1&t&&(ua(0,"div",12),qa(1),ha()),2&t){const t=xa().$implicit,e=xa(2);gs(1),Ja(" ",e.i18n.getMonthFullName(t.number,t.year)," ",e.i18n.getYearNumerals(t.year)," ")}}function Y_(t,e){if(1&t&&(ua(0,"div",9),ra(1,q_,2,2,"div",10),da(2,"ngb-datepicker-month",11),ha()),2&t){const t=e.$implicit,n=xa(2);gs(1),la("ngIf","none"===n.navigation||n.displayMonths>1&&"select"===n.navigation),gs(1),la("month",t.firstDate)}}function X_(t,e){1&t&&ra(0,Y_,3,2,"div",8),2&t&&la("ngForOf",xa().model.months)}function J_(t,e){if(1&t){const t=ga();ua(0,"ngb-datepicker-navigation",13),ya("navigate",function(e){return pn(t),xa().onNavigateEvent(e)})("select",function(e){return pn(t),xa().onNavigateDateSelect(e)}),ha()}if(2&t){const t=xa();la("date",t.model.firstDate)("months",t.model.months)("disabled",t.model.disabled)("showSelect","select"===t.model.navigation)("prevDisabled",t.model.prevDisabled)("nextDisabled",t.model.nextDisabled)("selectBoxes",t.model.selectBoxes)}}function Q_(t,e){}function Z_(t,e){}function tC(t,e){1&t&&da(0,"div",5)}function eC(t,e){if(1&t&&(ua(0,"div",6),qa(1),ha()),2&t){const t=e.$implicit,n=xa(2);gs(1),Xa(" ",n.i18n.getWeekdayShortName(t)," ")}}function nC(t,e){if(1&t&&(ua(0,"div",2),ra(1,tC,1,0,"div",3),ra(2,eC,2,1,"div",4),ha()),2&t){const t=xa();gs(1),la("ngIf",t.datepicker.showWeekNumbers),gs(1),la("ngForOf",t.viewModel.weekdays)}}function iC(t,e){if(1&t&&(ua(0,"div",11),qa(1),ha()),2&t){const t=xa(2).$implicit,e=xa();gs(1),Ya(e.i18n.getWeekNumerals(t.number))}}function rC(t,e){}function sC(t,e){if(1&t&&ra(0,rC,0,0,"ng-template",14),2&t){const t=xa().$implicit;la("ngTemplateOutlet",xa(3).datepicker.dayTemplate)("ngTemplateOutletContext",t.context)}}function oC(t,e){if(1&t){const t=ga();ua(0,"div",12),ya("click",function(n){pn(t);const i=e.$implicit;return xa(3).doSelect(i),n.preventDefault()}),ra(1,sC,1,2,"ng-template",13),ha()}if(2&t){const t=e.$implicit;Oa("disabled",t.context.disabled)("hidden",t.hidden)("ngb-dp-today",t.context.today),la("tabindex",t.tabindex),na("aria-label",t.ariaLabel),gs(1),la("ngIf",!t.hidden)}}function aC(t,e){if(1&t&&(ua(0,"div",8),ra(1,iC,2,1,"div",9),ra(2,oC,2,9,"div",10),ha()),2&t){const t=xa().$implicit,e=xa();gs(1),la("ngIf",e.datepicker.showWeekNumbers),gs(1),la("ngForOf",t.days)}}function lC(t,e){1&t&&ra(0,aC,3,2,"div",7),2&t&&la("ngIf",!e.$implicit.collapsed)}function cC(t,e){if(1&t){const t=ga();ua(0,"ngb-datepicker-navigation-select",7),ya("select",function(e){return pn(t),xa().select.emit(e)}),ha()}if(2&t){const t=xa();la("date",t.date)("disabled",t.disabled)("months",t.selectBoxes.months)("years",t.selectBoxes.years)}}function uC(t,e){1&t&&da(0,"div",0)}function hC(t,e){1&t&&da(0,"div",0)}function dC(t,e){if(1&t&&(ra(0,uC,1,0,"div",9),ua(1,"div",10),qa(2),ha(),ra(3,hC,1,0,"div",9)),2&t){const t=e.$implicit,n=e.index,i=xa(2);la("ngIf",n>0),gs(2),Ja(" ",i.i18n.getMonthFullName(t.number,t.year)," ",i.i18n.getYearNumerals(t.year)," "),gs(1),la("ngIf",n!==i.months.length-1)}}function fC(t,e){1&t&&ra(0,dC,4,4,"ng-template",8),2&t&&la("ngForOf",xa().months)}const pC=["ngbDatepickerDayView",""],gC=["month"],mC=["year"];function vC(t,e){if(1&t&&(ua(0,"option",5),qa(1),ha()),2&t){const t=e.$implicit,n=xa();la("value",t),na("aria-label",n.i18n.getMonthFullName(t,null==n.date?null:n.date.year)),gs(1),Ya(n.i18n.getMonthShortName(t,null==n.date?null:n.date.year))}}function yC(t,e){if(1&t&&(ua(0,"option",5),qa(1),ha()),2&t){const t=e.$implicit,n=xa();la("value",t),gs(1),Ya(n.i18n.getYearNumerals(t))}}const bC=["dialog"];function wC(t,e){1&t&&qa(0),2&t&&Ya(100===e.fill?"\u2605":"\u2606")}function xC(t,e){}function _C(t,e){if(1&t){const t=ga();ua(0,"span",2),qa(1),ha(),ua(2,"span",3),ya("mouseenter",function(){pn(t);const n=e.index;return xa().enter(n+1)})("click",function(){pn(t);const n=e.index;return xa().handleClick(n+1)}),ra(3,xC,0,0,"ng-template",4),ha()}if(2&t){const t=e.index,n=xa(),i=sa(1);gs(1),Xa("(",t=12)("ngIfElse",t)}}function OC(t,e){if(1&t&&(ua(0,"span"),qa(1),ha()),2&t){const t=xa().$implicit;Ia(xa().highlightClass),gs(1),Ya(t)}}function IC(t,e){1&t&&qa(0),2&t&&Ya(xa().$implicit)}function NC(t,e){if(1&t&&(ra(0,OC,2,3,"span",1),ra(1,IC,1,1,"ng-template",null,2,xu)),2&t){const t=e.odd,n=sa(2);la("ngIf",t)("ngIfElse",n)}}function PC(t,e){if(1&t&&da(0,"ngb-highlight",2),2&t){const t=e.term;la("result",(0,e.formatter)(e.result))("term",t)}}function BC(t,e){}const UC=function(t,e,n){return{result:t,term:e,formatter:n}};function VC(t,e){if(1&t){const t=ga();ua(0,"button",3),ya("mouseenter",function(){pn(t);const n=e.index;return xa().markActive(n)})("click",function(){pn(t);const n=e.$implicit;return xa().select(n)}),ra(1,BC,0,0,"ng-template",4),ha()}if(2&t){const t=e.$implicit,n=e.index,i=xa(),r=sa(1);Oa("active",n===i.activeIdx),la("id",i.id+"-"+n),gs(1),la("ngTemplateOutlet",i.resultTemplate||r)("ngTemplateOutletContext",Xc(5,UC,t,i.term,i.formatter))}}function HC(t){return parseInt(`${t}`,10)}function jC(t){return null!=t?`${t}`:""}function zC(t){return"string"==typeof t}function WC(t){return!isNaN(HC(t))}function GC(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}function KC(t){return null!=t}function qC(t){return WC(t)?`0${t}`.slice(-2):""}function YC(t,e){return t&&t.className&&t.className.split&&t.className.split(/\s+/).indexOf(e)>=0}"undefined"==typeof Element||Element.prototype.closest||(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest=function(t){let e=this;if(!document.documentElement.contains(e))return null;do{if(e.matches(t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null});let XC=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[Fd]]}),t})(),JC=(()=>{let t=class{constructor(){this.dismissible=!0,this.type="warning"}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:function(){return new t},token:t,providedIn:"root"}),t})(),QC=(()=>{let t=class{constructor(t,e,n){this._renderer=e,this._element=n,this.close=new Zc,this.dismissible=t.dismissible,this.type=t.type}closeHandler(){this.close.emit()}ngOnChanges(t){const e=t.type;e&&!e.firstChange&&(this._renderer.removeClass(this._element.nativeElement,`alert-${e.previousValue}`),this._renderer.addClass(this._element.nativeElement,`alert-${e.currentValue}`))}ngOnInit(){this._renderer.addClass(this._element.nativeElement,`alert-${this.type}`)}};return t.\u0275fac=function(e){return new(e||t)(oa(JC),oa(pc),oa(uc))},t.\u0275cmp=pe({type:t,selectors:[["ngb-alert"]],hostAttrs:["role","alert",1,"alert"],hostVars:2,hostBindings:function(t,e){2&t&&Oa("alert-dismissible",e.dismissible)},inputs:{dismissible:"dismissible",type:"type"},outputs:{close:"close"},features:[Ve],ngContentSelectors:z_,decls:2,vars:1,consts:function(){let t,e;return t=$localize`:@@ngb.alert.close␟f4e529ae5ffd73001d1ff4bbdeeb0a72e342e5c8␟7819314041543176992:Close`,e=$localize`:@@ngb.alert.close␟f4e529ae5ffd73001d1ff4bbdeeb0a72e342e5c8␟7819314041543176992:Close`,[["type","button","class","close","aria-label",t,3,"click",4,"ngIf"],["type","button","aria-label",e,1,"close",3,"click"],["aria-hidden","true"]]},template:function(t,e){1&t&&(Ca(),Sa(0),ra(1,j_,3,0,"button",0)),2&t&&(gs(1),la("ngIf",e.dismissible))},directives:[Ed],styles:["ngb-alert{display:block}"],encapsulation:2,changeDetection:0}),t})(),ZC=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[Fd]]}),t})(),tS=(()=>{let t=class{};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=we({type:t,selectors:[["","ngbButtonLabel",""]],hostVars:8,hostBindings:function(t,e){2&t&&Oa("btn",!0)("active",e.active)("disabled",e.disabled)("focus",e.focused)}}),t})();const eS={provide:Vb,useExisting:_t(()=>nS),multi:!0};let nS=(()=>{let t=class{constructor(t,e){this._label=t,this._cd=e,this.disabled=!1,this.valueChecked=!0,this.valueUnChecked=!1,this.onChange=t=>{},this.onTouched=()=>{}}set focused(t){this._label.focused=t,t||this.onTouched()}onInputChange(t){const e=t.target.checked?this.valueChecked:this.valueUnChecked;this.onChange(e),this.onTouched(),this.writeValue(e)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t,this._label.disabled=t}writeValue(t){this.checked=t===this.valueChecked,this._label.active=this.checked,this._cd.markForCheck()}};return t.\u0275fac=function(e){return new(e||t)(oa(tS),oa(_o))},t.\u0275dir=we({type:t,selectors:[["","ngbButton","","type","checkbox"]],hostVars:2,hostBindings:function(t,e){1&t&&ya("change",function(t){return e.onInputChange(t)})("focus",function(){return e.focused=!0})("blur",function(){return e.focused=!1}),2&t&&Qa("checked",e.checked)("disabled",e.disabled)},inputs:{disabled:"disabled",valueChecked:"valueChecked",valueUnChecked:"valueUnChecked"},features:[oc([eS])]}),t})();const iS={provide:Vb,useExisting:_t(()=>sS),multi:!0};let rS=0,sS=(()=>{let t=class{constructor(){this._radios=new Set,this._value=null,this.name="ngb-radio-"+rS++,this.onChange=t=>{},this.onTouched=()=>{}}get disabled(){return this._disabled}set disabled(t){this.setDisabledState(t)}onRadioChange(t){this.writeValue(t.value),this.onChange(t.value)}onRadioValueUpdate(){this._updateRadiosValue()}register(t){this._radios.add(t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._disabled=t,this._updateRadiosDisabled()}unregister(t){this._radios.delete(t)}writeValue(t){this._value=t,this._updateRadiosValue()}_updateRadiosValue(){this._radios.forEach(t=>t.updateValue(this._value))}_updateRadiosDisabled(){this._radios.forEach(t=>t.updateDisabled())}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=we({type:t,selectors:[["","ngbRadioGroup",""]],hostAttrs:["role","radiogroup"],inputs:{name:"name"},features:[oc([iS])]}),t})(),oS=(()=>{let t=class{constructor(t,e,n,i,r){this._group=t,this._label=e,this._renderer=n,this._element=i,this._cd=r,this._value=null,this._group.register(this),this.updateDisabled()}set value(t){this._value=t;const e=t?t.toString():"";this._renderer.setProperty(this._element.nativeElement,"value",e),this._group.onRadioValueUpdate()}set disabled(t){this._disabled=!1!==t,this.updateDisabled()}set focused(t){this._label&&(this._label.focused=t),t||this._group.onTouched()}get checked(){return this._checked}get disabled(){return this._group.disabled||this._disabled}get value(){return this._value}get nameAttr(){return this.name||this._group.name}ngOnDestroy(){this._group.unregister(this)}onChange(){this._group.onRadioChange(this)}updateValue(t){this.value!==t&&this._cd.markForCheck(),this._checked=this.value===t,this._label.active=this._checked}updateDisabled(){this._label.disabled=this.disabled}};return t.\u0275fac=function(e){return new(e||t)(oa(sS),oa(tS),oa(pc),oa(uc),oa(_o))},t.\u0275dir=we({type:t,selectors:[["","ngbButton","","type","radio"]],hostVars:3,hostBindings:function(t,e){1&t&&ya("change",function(){return e.onChange()})("focus",function(){return e.focused=!0})("blur",function(){return e.focused=!1}),2&t&&Qa("checked",e.checked)("disabled",e.disabled)("name",e.nameAttr)},inputs:{value:"value",disabled:"disabled",name:"name"}}),t})(),aS=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)}}),t})(),lS=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[Fd]]}),t})(),cS=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)}}),t})();class uS{constructor(t,e,n){this.year=GC(t)?t:null,this.month=GC(e)?e:null,this.day=GC(n)?n:null}static from(t){return t instanceof uS?t:t?new uS(t.year,t.month,t.day):null}equals(t){return null!=t&&this.year===t.year&&this.month===t.month&&this.day===t.day}before(t){return!!t&&(this.year===t.year?this.month===t.month?this.day!==t.day&&this.dayt.day:this.month>t.month:this.year>t.year)}}function hS(t){return new uS(t.getFullYear(),t.getMonth()+1,t.getDate())}function dS(t){const e=new Date(t.year,t.month-1,t.day,12);return isNaN(e.getTime())||e.setFullYear(t.year),e}function fS(){return new gS}let pS=(()=>{let t=class{};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:fS,token:t,providedIn:"root"}),t})(),gS=(()=>{let t=class extends pS{getDaysPerWeek(){return 7}getMonths(){return[1,2,3,4,5,6,7,8,9,10,11,12]}getWeeksPerMonth(){return 6}getNext(t,e="d",n=1){let i=dS(t),r=!0,s=i.getMonth();switch(e){case"y":i.setFullYear(i.getFullYear()+n);break;case"m":s+=n,i.setMonth(s),s%=12,s<0&&(s+=12);break;case"d":i.setDate(i.getDate()+n),r=!1;break;default:return t}return r&&i.getMonth()!==s&&i.setDate(0),hS(i)}getPrev(t,e="d",n=1){return this.getNext(t,e,-n)}getWeekday(t){let e=dS(t).getDay();return 0===e?7:e}getWeekNumber(t,e){7===e&&(e=0);const n=dS(t[(11-e)%7]);n.setDate(n.getDate()+4-(n.getDay()||7));const i=n.getTime();return n.setMonth(0),n.setDate(1),Math.floor(Math.round((i-n.getTime())/864e5)/7)+1}getToday(){return hS(new Date)}isValid(t){if(!(t&&GC(t.year)&&GC(t.month)&&GC(t.day)))return!1;if(0===t.year)return!1;const e=dS(t);return!isNaN(e.getTime())&&e.getFullYear()===t.year&&e.getMonth()+1===t.month&&e.getDate()===t.day}};return t.\u0275fac=function(e){return uE(e||t)},t.\u0275prov=ut({token:t,factory:function(e){return t.\u0275fac(e)}}),t})();function mS(t,e){return!function(t,e){return!t&&!e||!!t&&!!e&&t.equals(e)}(t,e)}function vS(t,e){return!(!t&&!e||t&&e&&t.year===e.year&&t.month===e.month)}function yS(t,e,n){return t&&e&&t.before(e)?e:t&&n&&t.after(n)?n:t||null}function bS(t,e){const{minDate:n,maxDate:i,disabled:r,markDisabled:s}=e;return!(null==t||r||s&&s(t,{year:t.year,month:t.month})||n&&t.before(n)||i&&t.after(i))}let wS=(()=>{let t=class{getDayNumerals(t){return`${t.day}`}getWeekNumerals(t){return`${t}`}getYearNumerals(t){return`${t}`}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:function(){return t=Yt(Fu),new xS(t);var t},token:t,providedIn:"root"}),t})(),xS=(()=>{let t=class extends wS{constructor(t){super(),this._locale=t;const e=zh(t,Bh.Standalone,Uh.Short);this._weekdaysShort=e.map((t,n)=>e[(n+1)%7]),this._monthsShort=Wh(t,Bh.Standalone,Uh.Abbreviated),this._monthsFull=Wh(t,Bh.Standalone,Uh.Wide)}getWeekdayShortName(t){return this._weekdaysShort[t-1]||""}getMonthShortName(t){return this._monthsShort[t-1]||""}getMonthFullName(t){return this._monthsFull[t-1]||""}getDayAriaLabel(t){return od(new Date(t.year,t.month-1,t.day),"fullDate",this._locale)}};return t.\u0275fac=function(e){return new(e||t)(Yt(Fu))},t.\u0275prov=ut({token:t,factory:function(e){return t.\u0275fac(e)}}),t=cx([ux(0,nt(Fu))],t),t})(),_S=(()=>{let t=class{constructor(t,e){this._calendar=t,this._i18n=e,this._VALIDATORS={dayTemplateData:t=>{if(this._state.dayTemplateData!==t)return{dayTemplateData:t}},displayMonths:t=>{if(GC(t=HC(t))&&t>0&&this._state.displayMonths!==t)return{displayMonths:t}},disabled:t=>{if(this._state.disabled!==t)return{disabled:t}},firstDayOfWeek:t=>{if(GC(t=HC(t))&&t>=0&&this._state.firstDayOfWeek!==t)return{firstDayOfWeek:t}},focusVisible:t=>{if(this._state.focusVisible!==t&&!this._state.disabled)return{focusVisible:t}},markDisabled:t=>{if(this._state.markDisabled!==t)return{markDisabled:t}},maxDate:t=>{const e=this.toValidDate(t,null);if(mS(this._state.maxDate,e))return{maxDate:e}},minDate:t=>{const e=this.toValidDate(t,null);if(mS(this._state.minDate,e))return{minDate:e}},navigation:t=>{if(this._state.navigation!==t)return{navigation:t}},outsideDays:t=>{if(this._state.outsideDays!==t)return{outsideDays:t}}},this._model$=new C,this._dateSelect$=new C,this._state={dayTemplateData:null,markDisabled:null,maxDate:null,minDate:null,disabled:!1,displayMonths:1,firstDate:null,firstDayOfWeek:1,lastDate:null,focusDate:null,focusVisible:!1,months:[],navigation:"select",outsideDays:"visible",prevDisabled:!1,nextDisabled:!1,selectedDate:null,selectBoxes:{years:[],months:[]}}}get model$(){return this._model$.pipe(hm(t=>t.months.length>0))}get dateSelect$(){return this._dateSelect$.pipe(hm(t=>null!==t))}set(t){let e=Object.keys(t).map(e=>this._VALIDATORS[e](t[e])).reduce((t,e)=>Object.assign(Object.assign({},t),e),{});Object.keys(e).length>0&&this._nextState(e)}focus(t){const e=this.toValidDate(t,null);null!=e&&!this._state.disabled&&mS(this._state.focusDate,e)&&this._nextState({focusDate:t})}focusSelect(){bS(this._state.focusDate,this._state)&&this.select(this._state.focusDate,{emitEvent:!0})}open(t){const e=this.toValidDate(t,this._calendar.getToday());null==e||this._state.disabled||this._state.firstDate&&!vS(this._state.firstDate,e)||this._nextState({firstDate:e})}select(t,e={}){const n=this.toValidDate(t,null);null==n||this._state.disabled||(mS(this._state.selectedDate,n)&&this._nextState({selectedDate:n}),e.emitEvent&&bS(n,this._state)&&this._dateSelect$.next(n))}toValidDate(t,e){const n=uS.from(t);return void 0===e&&(e=this._calendar.getToday()),this._calendar.isValid(n)?n:e}getMonth(t){for(let e of this._state.months)if(t.month===e.number&&t.year===e.year)return e;throw new Error(`month ${t.month} of year ${t.year} not found`)}_nextState(t){const e=this._updateState(t);this._patchContexts(e),this._state=e,this._model$.next(this._state)}_patchContexts(t){const{months:e,displayMonths:n,selectedDate:i,focusDate:r,focusVisible:s,disabled:o,outsideDays:a}=t;t.months.forEach(t=>{t.weeks.forEach(l=>{l.days.forEach(l=>{r&&(l.context.focused=r.equals(l.date)&&s),l.tabindex=!o&&r&&l.date.equals(r)&&r.month===t.number?0:-1,!0===o&&(l.context.disabled=!0),void 0!==i&&(l.context.selected=null!==i&&i.equals(l.date)),t.number!==l.date.month&&(l.hidden="hidden"===a||"collapsed"===a||n>1&&l.date.after(e[0].firstDate)&&l.date.before(e[n-1].lastDate))})})})}_updateState(t){const e=Object.assign({},this._state,t);let n=e.firstDate;if(("minDate"in t||"maxDate"in t)&&(function(t,e){if(e&&t&&e.before(t))throw new Error(`'maxDate' ${e} should be greater than 'minDate' ${t}`)}(e.minDate,e.maxDate),e.focusDate=yS(e.focusDate,e.minDate,e.maxDate),e.firstDate=yS(e.firstDate,e.minDate,e.maxDate),n=e.focusDate),"disabled"in t&&(e.focusVisible=!1),"selectedDate"in t&&0===this._state.months.length&&(n=e.selectedDate),"focusVisible"in t)return e;if("focusDate"in t&&(e.focusDate=yS(e.focusDate,e.minDate,e.maxDate),n=e.focusDate,0!==e.months.length&&e.focusDate&&!e.focusDate.before(e.firstDate)&&!e.focusDate.after(e.lastDate)))return e;if("firstDate"in t&&(e.firstDate=yS(e.firstDate,e.minDate,e.maxDate),n=e.firstDate),n){const i=function(t,e,n,i,r){const{displayMonths:s,months:o}=n,a=o.splice(0,o.length);return Array.from({length:s},(n,i)=>{const s=Object.assign(t.getNext(e,"m",i),{day:1});if(o[i]=null,!r){const t=a.findIndex(t=>t.firstDate.equals(s));-1!==t&&(o[i]=a.splice(t,1)[0])}return s}).forEach((e,r)=>{null===o[r]&&(o[r]=function(t,e,n,i,r={}){const{dayTemplateData:s,minDate:o,maxDate:a,firstDayOfWeek:l,markDisabled:c,outsideDays:u}=n,h=t.getToday();r.firstDate=null,r.lastDate=null,r.number=e.month,r.year=e.year,r.weeks=r.weeks||[],r.weekdays=r.weekdays||[],e=function(t,e,n){const i=t.getDaysPerWeek(),r=new uS(e.year,e.month,1),s=t.getWeekday(r)%i;return t.getPrev(r,"d",(i+s-n)%i)}(t,e,l);for(let d=0;dt.date),l),n.collapsed="collapsed"===u&&f[0].date.month!==r.number&&f[f.length-1].date.month!==r.number}return r}(t,e,n,i,a.shift()||{}))}),o}(this._calendar,n,e,this._i18n,"dayTemplateData"in t||"firstDayOfWeek"in t||"markDisabled"in t||"minDate"in t||"maxDate"in t||"disabled"in t||"outsideDays"in t);e.months=i,e.firstDate=i[0].firstDate,e.lastDate=i[i.length-1].lastDate,"selectedDate"in t&&!bS(e.selectedDate,e)&&(e.selectedDate=null),"firstDate"in t&&(!e.focusDate||e.focusDate.before(e.firstDate)||e.focusDate.after(e.lastDate))&&(e.focusDate=n);const r=!this._state.firstDate||this._state.firstDate.year!==e.firstDate.year,s=!this._state.firstDate||this._state.firstDate.month!==e.firstDate.month;"select"===e.navigation?(("minDate"in t||"maxDate"in t||0===e.selectBoxes.years.length||r)&&(e.selectBoxes.years=function(t,e,n){if(!t)return[];const i=e?Math.max(e.year,t.year-500):t.year-10,r=(n?Math.min(n.year,t.year+500):t.year+10)-i+1,s=Array(r);for(let o=0;ot===n.month);r=r.slice(t)}if(i&&e.year===i.year){const t=r.findIndex(t=>t===i.month);r=r.slice(0,t+1)}return r}(this._calendar,e.firstDate,e.minDate,e.maxDate))):e.selectBoxes={years:[],months:[]},"arrows"!==e.navigation&&"select"!==e.navigation||!(s||r||"minDate"in t||"maxDate"in t||"disabled"in t)||(e.prevDisabled=e.disabled||function(t,e,n){const i=Object.assign(t.getPrev(e,"m"),{day:1});return null!=n&&(i.year===n.year&&i.month{let t=class{constructor(){this.displayMonths=1,this.firstDayOfWeek=1,this.navigation="select",this.outsideDays="visible",this.showWeekdays=!0,this.showWeekNumbers=!1}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:function(){return new t},token:t,providedIn:"root"}),t})();function kS(){return new AS}let ES=(()=>{let t=class{};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:kS,token:t,providedIn:"root"}),t})(),AS=(()=>{let t=class extends ES{fromModel(t){return t&&GC(t.year)&&GC(t.month)&&GC(t.day)?{year:t.year,month:t.month,day:t.day}:null}toModel(t){return t&&GC(t.year)&&GC(t.month)&&GC(t.day)?{year:t.year,month:t.month,day:t.day}:null}};return t.\u0275fac=function(e){return hE(e||t)},t.\u0275prov=ut({token:t,factory:function(e){return t.\u0275fac(e)}}),t})();const DS={provide:Vb,useExisting:_t(()=>RS),multi:!0};let TS=(()=>{let t=class{constructor(t){this.templateRef=t}};return t.\u0275fac=function(e){return new(e||t)(oa($c))},t.\u0275dir=we({type:t,selectors:[["ng-template","ngbDatepickerContent",""]]}),t})(),RS=(()=>{let t=class{constructor(t,e,n,i,r,s,o,a){this._service=t,this._calendar=e,this.i18n=n,this._elementRef=s,this._ngbDateAdapter=o,this._ngZone=a,this._controlValue=null,this._destroyed$=new C,this._publicState={},this.navigate=new Zc,this.dateSelect=new Zc,this.select=this.dateSelect,this.onChange=t=>{},this.onTouched=()=>{},["dayTemplate","dayTemplateData","displayMonths","firstDayOfWeek","footerTemplate","markDisabled","minDate","maxDate","navigation","outsideDays","showWeekdays","showWeekNumbers","startDate"].forEach(t=>this[t]=i[t]),t.dateSelect$.pipe(R_(this._destroyed$)).subscribe(t=>{this.dateSelect.emit(t)}),t.model$.pipe(R_(this._destroyed$)).subscribe(t=>{const e=t.firstDate,n=this.model?this.model.firstDate:null;this._publicState={maxDate:t.maxDate,minDate:t.minDate,firstDate:t.firstDate,lastDate:t.lastDate,focusedDate:t.focusDate,months:t.months.map(t=>t.firstDate)};let i=!1;if(!e.equals(n)&&(this.navigate.emit({current:n?{year:n.year,month:n.month}:null,next:{year:e.year,month:e.month},preventDefault:()=>i=!0}),i&&null!==n))return void this._service.open(n);const s=t.selectedDate,o=t.focusDate,a=this.model?this.model.focusDate:null;this.model=t,mS(s,this._controlValue)&&(this._controlValue=s,this.onTouched(),this.onChange(this._ngbDateAdapter.toModel(s))),mS(o,a)&&a&&t.focusVisible&&this.focus(),r.markForCheck()})}get state(){return this._publicState}get calendar(){return this._calendar}focusDate(t){this._service.focus(uS.from(t))}focusSelect(){this._service.focusSelect()}focus(){this._ngZone.onStable.asObservable().pipe(Dm(1)).subscribe(()=>{const t=this._elementRef.nativeElement.querySelector('div.ngb-dp-day[tabindex="0"]');t&&t.focus()})}navigateTo(t){this._service.open(uS.from(t?t.day?t:Object.assign(Object.assign({},t),{day:1}):null))}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{const t=E_(this._contentEl.nativeElement,"focusin"),e=E_(this._contentEl.nativeElement,"focusout"),{nativeElement:n}=this._elementRef;W(t,e).pipe(hm(({target:t,relatedTarget:e})=>!(YC(t,"ngb-dp-day")&&YC(e,"ngb-dp-day")&&n.contains(t)&&n.contains(e))),R_(this._destroyed$)).subscribe(({type:t})=>this._ngZone.run(()=>this._service.set({focusVisible:"focusin"===t})))})}ngOnDestroy(){this._destroyed$.next()}ngOnInit(){if(void 0===this.model){const t={};["dayTemplateData","displayMonths","markDisabled","firstDayOfWeek","navigation","minDate","maxDate","outsideDays"].forEach(e=>t[e]=this[e]),this._service.set(t),this.navigateTo(this.startDate)}this.dayTemplate||(this.dayTemplate=this._defaultDayTemplate)}ngOnChanges(t){const e={};if(["dayTemplateData","displayMonths","markDisabled","firstDayOfWeek","navigation","minDate","maxDate","outsideDays"].filter(e=>e in t).forEach(t=>e[t]=this[t]),this._service.set(e),"startDate"in t){const{currentValue:e,previousValue:n}=t.startDate;vS(n,e)&&this.navigateTo(this.startDate)}}onDateSelect(t){this._service.focus(t),this._service.select(t,{emitEvent:!0})}onNavigateDateSelect(t){this._service.open(t)}onNavigateEvent(t){switch(t){case CS.PREV:this._service.open(this._calendar.getPrev(this.model.firstDate,"m",1));break;case CS.NEXT:this._service.open(this._calendar.getNext(this.model.firstDate,"m",1))}}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._service.set({disabled:t})}writeValue(t){this._controlValue=uS.from(this._ngbDateAdapter.fromModel(t)),this._service.select(this._controlValue)}};return t.\u0275fac=function(e){return new(e||t)(oa(_S),oa(pS),oa(wS),oa(SS),oa(_o),oa(uc),oa(ES),oa(ju))},t.\u0275cmp=pe({type:t,selectors:[["ngb-datepicker"]],contentQueries:function(t,e,n){if(1&t&&(i=n,r=TS,!0,mu(fn(),dn(),r,true,undefined,!0,gn(),i)),2&t){let t;hu(t=vu())&&(e.contentTemplate=t.first)}var i,r},viewQuery:function(t,e){if(1&t&&(du(W_,!0),du(G_,!0)),2&t){let t;hu(t=vu())&&(e._defaultDayTemplate=t.first),hu(t=vu())&&(e._contentEl=t.first)}},inputs:{dayTemplate:"dayTemplate",dayTemplateData:"dayTemplateData",displayMonths:"displayMonths",firstDayOfWeek:"firstDayOfWeek",footerTemplate:"footerTemplate",markDisabled:"markDisabled",maxDate:"maxDate",minDate:"minDate",navigation:"navigation",outsideDays:"outsideDays",showWeekdays:"showWeekdays",showWeekNumbers:"showWeekNumbers",startDate:"startDate"},outputs:{navigate:"navigate",dateSelect:"dateSelect",select:"select"},exportAs:["ngbDatepicker"],features:[oc([DS,_S]),Ve],decls:10,vars:5,consts:[["defaultDayTemplate",""],["defaultContentTemplate",""],[1,"ngb-dp-header"],[3,"date","months","disabled","showSelect","prevDisabled","nextDisabled","selectBoxes","navigate","select",4,"ngIf"],[1,"ngb-dp-content"],["content",""],[3,"ngTemplateOutlet"],["ngbDatepickerDayView","",3,"date","currentMonth","selected","disabled","focused"],["class","ngb-dp-month",4,"ngFor","ngForOf"],[1,"ngb-dp-month"],["class","ngb-dp-month-name",4,"ngIf"],[3,"month"],[1,"ngb-dp-month-name"],[3,"date","months","disabled","showSelect","prevDisabled","nextDisabled","selectBoxes","navigate","select"]],template:function(t,e){if(1&t&&(ra(0,K_,1,5,"ng-template",null,0,xu),ra(2,X_,1,1,"ng-template",null,1,xu),ua(4,"div",2),ra(5,J_,1,7,"ngb-datepicker-navigation",3),ha(),ua(6,"div",4,5),ra(8,Q_,0,0,"ng-template",6),ha(),ra(9,Z_,0,0,"ng-template",6)),2&t){const t=sa(3);gs(5),la("ngIf","none"!==e.navigation),gs(1),Oa("ngb-dp-months",!e.contentTemplate),gs(2),la("ngTemplateOutlet",(null==e.contentTemplate?null:e.contentTemplate.templateRef)||t),gs(1),la("ngTemplateOutlet",e.footerTemplate)}},directives:function(){return[Ed,Rd,QS,Sd,LS,$S]},styles:["ngb-datepicker{border:1px solid #dfdfdf;border-radius:.25rem;display:inline-block}ngb-datepicker-month{pointer-events:auto}ngb-datepicker.dropdown-menu{padding:0}.ngb-dp-body{z-index:1050}.ngb-dp-header{border-bottom:0;border-radius:.25rem .25rem 0 0;padding-top:.25rem;background-color:#f8f9fa;background-color:var(--light)}.ngb-dp-months{display:-ms-flexbox;display:flex}.ngb-dp-month{pointer-events:none}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center;background-color:#f8f9fa;background-color:var(--light)}.ngb-dp-month+.ngb-dp-month .ngb-dp-month-name,.ngb-dp-month+.ngb-dp-month .ngb-dp-week{padding-left:1rem}.ngb-dp-month:last-child .ngb-dp-week{padding-right:.25rem}.ngb-dp-month:first-child .ngb-dp-week{padding-left:.25rem}.ngb-dp-month .ngb-dp-week:last-child{padding-bottom:.25rem}"],encapsulation:2,changeDetection:0}),t})();var FS=function(t){return t[t.Tab=9]="Tab",t[t.Enter=13]="Enter",t[t.Escape=27]="Escape",t[t.Space=32]="Space",t[t.PageUp=33]="PageUp",t[t.PageDown=34]="PageDown",t[t.End=35]="End",t[t.Home=36]="Home",t[t.ArrowLeft=37]="ArrowLeft",t[t.ArrowUp=38]="ArrowUp",t[t.ArrowRight=39]="ArrowRight",t[t.ArrowDown=40]="ArrowDown",t}({});let MS=(()=>{let t=class{processKey(t,e){const{state:n,calendar:i}=e;switch(t.which){case FS.PageUp:e.focusDate(i.getPrev(n.focusedDate,t.shiftKey?"y":"m",1));break;case FS.PageDown:e.focusDate(i.getNext(n.focusedDate,t.shiftKey?"y":"m",1));break;case FS.End:e.focusDate(t.shiftKey?n.maxDate:n.lastDate);break;case FS.Home:e.focusDate(t.shiftKey?n.minDate:n.firstDate);break;case FS.ArrowLeft:e.focusDate(i.getPrev(n.focusedDate,"d",1));break;case FS.ArrowUp:e.focusDate(i.getPrev(n.focusedDate,"d",i.getDaysPerWeek()));break;case FS.ArrowRight:e.focusDate(i.getNext(n.focusedDate,"d",1));break;case FS.ArrowDown:e.focusDate(i.getNext(n.focusedDate,"d",i.getDaysPerWeek()));break;case FS.Enter:case FS.Space:e.focusSelect();break;default:return}t.preventDefault(),t.stopPropagation()}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:function(){return new t},token:t,providedIn:"root"}),t})(),LS=(()=>{let t=class{constructor(t,e,n,i){this.i18n=t,this.datepicker=e,this._keyboardService=n,this._service=i}set month(t){this.viewModel=this._service.getMonth(t)}onKeyDown(t){this._keyboardService.processKey(t,this.datepicker)}doSelect(t){t.context.disabled||t.hidden||this.datepicker.onDateSelect(t.date)}};return t.\u0275fac=function(e){return new(e||t)(oa(wS),oa(RS),oa(MS),oa(_S))},t.\u0275cmp=pe({type:t,selectors:[["ngb-datepicker-month"]],hostAttrs:["role","grid"],hostBindings:function(t,e){1&t&&ya("keydown",function(t){return e.onKeyDown(t)})},inputs:{month:"month"},decls:2,vars:2,consts:[["class","ngb-dp-week ngb-dp-weekdays","role","row",4,"ngIf"],["ngFor","",3,"ngForOf"],["role","row",1,"ngb-dp-week","ngb-dp-weekdays"],["class","ngb-dp-weekday ngb-dp-showweek",4,"ngIf"],["class","ngb-dp-weekday small","role","columnheader",4,"ngFor","ngForOf"],[1,"ngb-dp-weekday","ngb-dp-showweek"],["role","columnheader",1,"ngb-dp-weekday","small"],["class","ngb-dp-week","role","row",4,"ngIf"],["role","row",1,"ngb-dp-week"],["class","ngb-dp-week-number small text-muted",4,"ngIf"],["class","ngb-dp-day","role","gridcell",3,"disabled","tabindex","hidden","ngb-dp-today","click",4,"ngFor","ngForOf"],[1,"ngb-dp-week-number","small","text-muted"],["role","gridcell",1,"ngb-dp-day",3,"tabindex","click"],[3,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(t,e){1&t&&(ra(0,nC,3,2,"div",0),ra(1,lC,1,1,"ng-template",1)),2&t&&(la("ngIf",e.datepicker.showWeekdays),gs(1),la("ngForOf",e.viewModel.weeks))},directives:[Ed,Sd,Rd],styles:['ngb-datepicker-month{display:block}.ngb-dp-week-number,.ngb-dp-weekday{line-height:2rem;text-align:center;font-style:italic}.ngb-dp-weekday{color:#5bc0de;color:var(--info)}.ngb-dp-week{border-radius:.25rem;display:-ms-flexbox;display:flex}.ngb-dp-weekdays{border-bottom:1px solid rgba(0,0,0,.125);border-radius:0;background-color:#f8f9fa;background-color:var(--light)}.ngb-dp-day,.ngb-dp-week-number,.ngb-dp-weekday{width:2rem;height:2rem}.ngb-dp-day{cursor:pointer}.ngb-dp-day.disabled,.ngb-dp-day.hidden{cursor:default;pointer-events:none}.ngb-dp-day[tabindex="0"]{z-index:1}'],encapsulation:2}),t})(),$S=(()=>{let t=class{constructor(t){this.i18n=t,this.navigation=CS,this.months=[],this.navigate=new Zc,this.select=new Zc}onClickPrev(t){t.currentTarget.focus(),this.navigate.emit(this.navigation.PREV)}onClickNext(t){t.currentTarget.focus(),this.navigate.emit(this.navigation.NEXT)}};return t.\u0275fac=function(e){return new(e||t)(oa(wS))},t.\u0275cmp=pe({type:t,selectors:[["ngb-datepicker-navigation"]],inputs:{months:"months",date:"date",disabled:"disabled",showSelect:"showSelect",prevDisabled:"prevDisabled",nextDisabled:"nextDisabled",selectBoxes:"selectBoxes"},outputs:{navigate:"navigate",select:"select"},decls:8,vars:4,consts:function(){let t,e,n,i;return t=$localize`:@@ngb.datepicker.previous-month␟c3b08b07b5ab98e7cdcf18df39355690ab7d3884␟8586908745456864217:Previous month`,e=$localize`:@@ngb.datepicker.previous-month␟c3b08b07b5ab98e7cdcf18df39355690ab7d3884␟8586908745456864217:Previous month`,n=$localize`:@@ngb.datepicker.next-month␟4bd046985cfe13040d5ef0cd881edce0968a111a␟3628374603023447227:Next month`,i=$localize`:@@ngb.datepicker.next-month␟4bd046985cfe13040d5ef0cd881edce0968a111a␟3628374603023447227:Next month`,[[1,"ngb-dp-arrow"],["type","button","aria-label",t,"title",e,1,"btn","btn-link","ngb-dp-arrow-btn",3,"disabled","click"],[1,"ngb-dp-navigation-chevron"],["class","ngb-dp-navigation-select",3,"date","disabled","months","years","select",4,"ngIf"],[4,"ngIf"],[1,"ngb-dp-arrow","right"],["type","button","aria-label",n,"title",i,1,"btn","btn-link","ngb-dp-arrow-btn",3,"disabled","click"],[1,"ngb-dp-navigation-select",3,"date","disabled","months","years","select"],["ngFor","",3,"ngForOf"],["class","ngb-dp-arrow",4,"ngIf"],[1,"ngb-dp-month-name"]]},template:function(t,e){1&t&&(ua(0,"div",0),ua(1,"button",1),ya("click",function(t){return e.onClickPrev(t)}),da(2,"span",2),ha(),ha(),ra(3,cC,1,4,"ngb-datepicker-navigation-select",3),ra(4,fC,1,1,void 0,4),ua(5,"div",5),ua(6,"button",6),ya("click",function(t){return e.onClickNext(t)}),da(7,"span",2),ha(),ha()),2&t&&(gs(1),la("disabled",e.prevDisabled),gs(2),la("ngIf",e.showSelect),gs(1),la("ngIf",!e.showSelect),gs(2),la("disabled",e.nextDisabled))},directives:function(){return[Ed,ZS,Sd]},styles:["ngb-datepicker-navigation{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.ngb-dp-navigation-chevron{border-style:solid;border-width:.2em .2em 0 0;display:inline-block;width:.75em;height:.75em;margin-left:.25em;margin-right:.15em;-webkit-transform:rotate(-135deg);transform:rotate(-135deg)}.right .ngb-dp-navigation-chevron{-webkit-transform:rotate(45deg);transform:rotate(45deg);margin-left:.15em;margin-right:.25em}.ngb-dp-arrow{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;padding-right:0;padding-left:0;margin:0;width:2rem;height:2rem}.ngb-dp-arrow.right{-ms-flex-pack:end;justify-content:flex-end}.ngb-dp-arrow-btn{padding:0 .25rem;margin:0 .5rem;border:none;background-color:transparent;z-index:1}.ngb-dp-arrow-btn:focus{outline-width:1px;outline-style:auto}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.ngb-dp-arrow-btn:focus{outline-style:solid}}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center}.ngb-dp-navigation-select{display:-ms-flexbox;display:flex;-ms-flex:1 1 9rem;flex:1 1 9rem}"],encapsulation:2,changeDetection:0}),t})();const OS=(t,e)=>!!e&&e.some(e=>e.contains(t)),IS=(t,e)=>!e||null!=function(t,e){return e?void 0===t.closest?null:t.closest(e):null}(t,e),NS="undefined"!=typeof navigator&&!!navigator.userAgent&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2||/Android/.test(navigator.userAgent));function PS(t,e,n,i,r,s,o,a){var c;n&&t.runOutsideAngular((c=()=>{const c=E_(e,"keydown").pipe(R_(r),hm(t=>t.which===FS.Escape),Um(t=>t.preventDefault())),u=E_(e,"mousedown").pipe(E(t=>{const e=t.target;return 2!==t.button&&!OS(e,o)&&("inside"===n?OS(e,s)&&IS(e,a):"outside"===n?!OS(e,s):IS(e,a)||!OS(e,s))}),R_(r)),h=E_(e,"mouseup").pipe(L_(u),hm(([t,e])=>e),B_(0),R_(r));(function(...t){if(1===t.length){if(!l(t[0]))return t[0];t=t[0]}return z(t,void 0).lift(new D_)})([c.pipe(E(t=>0)),h.pipe(E(t=>1))]).subscribe(e=>t.run(()=>i(e)))},NS?()=>setTimeout(()=>c(),100):c))}const BS=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function US(t){const e=Array.from(t.querySelectorAll(BS)).filter(t=>-1!==t.tabIndex);return[e[0],e[e.length-1]]}const VS=(t,e,n,i=!1)=>{t.runOutsideAngular(()=>{const t=E_(e,"focusin").pipe(R_(n),E(t=>t.target));E_(e,"keydown").pipe(R_(n),hm(t=>t.which===FS.Tab),L_(t)).subscribe(([t,n])=>{const[i,r]=US(e);n!==i&&n!==e||!t.shiftKey||(r.focus(),t.preventDefault()),n!==r||t.shiftKey||(i.focus(),t.preventDefault())}),i&&E_(e,"click").pipe(R_(n),L_(t),E(t=>t[1])).subscribe(t=>t.focus())})},HS=/\s+/,jS=new class{getAllStyles(t){return window.getComputedStyle(t)}getStyle(t,e){return this.getAllStyles(t)[e]}isStaticPositioned(t){return"static"===(this.getStyle(t,"position")||"static")}offsetParent(t){let e=t.offsetParent||document.documentElement;for(;e&&e!==document.documentElement&&this.isStaticPositioned(e);)e=e.offsetParent;return e||document.documentElement}position(t,e=!0){let n,i={width:0,height:0,top:0,bottom:0,left:0,right:0};if("fixed"===this.getStyle(t,"position"))n=t.getBoundingClientRect(),n={top:n.top,bottom:n.bottom,left:n.left,right:n.right,height:n.height,width:n.width};else{const e=this.offsetParent(t);n=this.offset(t,!1),e!==document.documentElement&&(i=this.offset(e,!1)),i.top+=e.clientTop,i.left+=e.clientLeft}return n.top-=i.top,n.bottom-=i.top,n.left-=i.left,n.right-=i.left,e&&(n.top=Math.round(n.top),n.bottom=Math.round(n.bottom),n.left=Math.round(n.left),n.right=Math.round(n.right)),n}offset(t,e=!0){const n=t.getBoundingClientRect(),i=window.pageYOffset-document.documentElement.clientTop,r=window.pageXOffset-document.documentElement.clientLeft;let s={height:n.height||t.offsetHeight,width:n.width||t.offsetWidth,top:n.top+i,bottom:n.bottom+i,left:n.left+r,right:n.right+r};return e&&(s.height=Math.round(s.height),s.width=Math.round(s.width),s.top=Math.round(s.top),s.bottom=Math.round(s.bottom),s.left=Math.round(s.left),s.right=Math.round(s.right)),s}positionElements(t,e,n,i){const[r="top",s="center"]=n.split("-"),o=i?this.offset(t,!1):this.position(t,!1),a=this.getAllStyles(e),l=parseFloat(a.marginTop),c=parseFloat(a.marginBottom),u=parseFloat(a.marginLeft),h=parseFloat(a.marginRight);let d=0,f=0;switch(r){case"top":d=o.top-(e.offsetHeight+l+c);break;case"bottom":d=o.top+o.height;break;case"left":f=o.left-(e.offsetWidth+u+h);break;case"right":f=o.left+o.width}switch(s){case"top":d=o.top;break;case"bottom":d=o.top+o.height-e.offsetHeight;break;case"left":f=o.left;break;case"right":f=o.left+o.width-e.offsetWidth;break;case"center":"top"===r||"bottom"===r?f=o.left+o.width/2-e.offsetWidth/2:d=o.top+o.height/2-e.offsetHeight/2}e.style.transform=`translate(${Math.round(f)}px, ${Math.round(d)}px)`;const p=e.getBoundingClientRect(),g=document.documentElement,m=window.innerHeight||g.clientHeight,v=window.innerWidth||g.clientWidth;return p.left>=0&&p.top>=0&&p.right<=v&&p.bottom<=m}};function zS(t,e,n,i,r){let s=Array.isArray(n)?n:n.split(HS);const o=["top","bottom","left","right","top-left","top-right","bottom-left","bottom-right","left-top","left-bottom","right-top","right-bottom"],a=e.classList,l=t=>{const[e,n]=t.split("-"),i=[];return r&&(i.push(`${r}-${e}`),n&&i.push(`${r}-${e}-${n}`),i.forEach(t=>{a.add(t)})),i};r&&o.forEach(t=>{a.remove(`${r}-${t}`)});let c=s.findIndex(t=>"auto"===t);c>=0&&o.forEach(function(t){null==s.find(e=>-1!==e.search("^"+t))&&s.splice(c++,1,t)});const u=e.style;u.position="absolute",u.top="0",u.left="0",u["will-change"]="transform";let h=null,d=!1;for(h of s){let n=l(h);if(jS.positionElements(t,e,h,i)){d=!0;break}r&&n.forEach(t=>{a.remove(t)})}return d||(h=s[0],l(h),jS.positionElements(t,e,h,i)),h}function WS(){return new KS}let GS=(()=>{let t=class{};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:WS,token:t,providedIn:"root"}),t})(),KS=(()=>{let t=class extends GS{parse(t){if(null!=t){const e=t.trim().split("-");if(1===e.length&&WC(e[0]))return{year:HC(e[0]),month:null,day:null};if(2===e.length&&WC(e[0])&&WC(e[1]))return{year:HC(e[0]),month:HC(e[1]),day:null};if(3===e.length&&WC(e[0])&&WC(e[1])&&WC(e[2]))return{year:HC(e[0]),month:HC(e[1]),day:HC(e[2])}}return null}format(t){return t?`${t.year}-${WC(t.month)?qC(t.month):""}-${WC(t.day)?qC(t.day):""}`:""}};return t.\u0275fac=function(e){return dE(e||t)},t.\u0275prov=ut({token:t,factory:function(e){return t.\u0275fac(e)}}),t})(),qS=(()=>{let t=class extends SS{constructor(){super(...arguments),this.autoClose=!0,this.placement=["bottom-left","bottom-right","top-left","top-right"],this.restoreFocus=!0}};return t.\u0275fac=function(e){return fE(e||t)},t.\u0275prov=ut({factory:function(){return new t},token:t,providedIn:"root"}),t})();const YS={provide:Vb,useExisting:_t(()=>JS),multi:!0},XS={provide:Yb,useExisting:_t(()=>JS),multi:!0};let JS=(()=>{let t=class{constructor(t,e,n,i,r,s,o,a,l,c,u){this._parserFormatter=t,this._elRef=e,this._vcRef=n,this._renderer=i,this._cfr=r,this._ngZone=s,this._calendar=o,this._dateAdapter=a,this._document=l,this._changeDetector=c,this._cRef=null,this._disabled=!1,this._elWithFocus=null,this._model=null,this.dateSelect=new Zc,this.navigate=new Zc,this.closed=new Zc,this._onChange=t=>{},this._onTouched=()=>{},this._validatorChange=()=>{},["autoClose","container","positionTarget","placement"].forEach(t=>this[t]=u[t]),this._zoneSubscription=s.onStable.subscribe(()=>this._updatePopupPosition())}get disabled(){return this._disabled}set disabled(t){this._disabled=""===t||t&&"false"!==t,this.isOpen()&&this._cRef.instance.setDisabledState(this._disabled)}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}registerOnValidatorChange(t){this._validatorChange=t}setDisabledState(t){this.disabled=t}validate(t){const{value:e}=t;if(null!=e){const t=this._fromDateStruct(this._dateAdapter.fromModel(e));if(!t)return{ngbDate:{invalid:e}};if(this.minDate&&t.before(uS.from(this.minDate)))return{ngbDate:{minDate:{minDate:this.minDate,actual:e}}};if(this.maxDate&&t.after(uS.from(this.maxDate)))return{ngbDate:{maxDate:{maxDate:this.maxDate,actual:e}}}}return null}writeValue(t){this._model=this._fromDateStruct(this._dateAdapter.fromModel(t)),this._writeModelValue(this._model)}manualDateChange(t,e=!1){const n=t!==this._inputValue;n&&(this._inputValue=t,this._model=this._fromDateStruct(this._parserFormatter.parse(t))),!n&&e||this._onChange(this._model?this._dateAdapter.toModel(this._model):""===t?null:t),e&&this._model&&this._writeModelValue(this._model)}isOpen(){return!!this._cRef}open(){if(!this.isOpen()){const t=this._cfr.resolveComponentFactory(RS);this._cRef=this._vcRef.createComponent(t),this._applyPopupStyling(this._cRef.location.nativeElement),this._applyDatepickerInputs(this._cRef.instance),this._subscribeForDatepickerOutputs(this._cRef.instance),this._cRef.instance.ngOnInit(),this._cRef.instance.writeValue(this._dateAdapter.toModel(this._model)),this._cRef.instance.registerOnChange(t=>{this.writeValue(t),this._onChange(t),this._onTouched()}),this._cRef.changeDetectorRef.detectChanges(),this._cRef.instance.setDisabledState(this.disabled),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._cRef.location.nativeElement),this._elWithFocus=this._document.activeElement,VS(this._ngZone,this._cRef.location.nativeElement,this.closed,!0),this._cRef.instance.focus(),PS(this._ngZone,this._document,this.autoClose,()=>this.close(),this.closed,[],[this._elRef.nativeElement,this._cRef.location.nativeElement])}}close(){if(this.isOpen()){this._vcRef.remove(this._vcRef.indexOf(this._cRef.hostView)),this._cRef=null,this.closed.emit(),this._changeDetector.markForCheck();let t=this._elWithFocus;zC(this.restoreFocus)?t=this._document.querySelector(this.restoreFocus):void 0!==this.restoreFocus&&(t=this.restoreFocus),t&&t.focus?t.focus():this._document.body.focus()}}toggle(){this.isOpen()?this.close():this.open()}navigateTo(t){this.isOpen()&&this._cRef.instance.navigateTo(t)}onBlur(){this._onTouched()}onFocus(){this._elWithFocus=this._elRef.nativeElement}ngOnChanges(t){(t.minDate||t.maxDate)&&(this._validatorChange(),this.isOpen()&&(t.minDate&&(this._cRef.instance.minDate=this.minDate),t.maxDate&&(this._cRef.instance.maxDate=this.maxDate),this._cRef.instance.ngOnChanges(t)))}ngOnDestroy(){this.close(),this._zoneSubscription.unsubscribe()}_applyDatepickerInputs(t){["dayTemplate","dayTemplateData","displayMonths","firstDayOfWeek","footerTemplate","markDisabled","minDate","maxDate","navigation","outsideDays","showNavigation","showWeekdays","showWeekNumbers"].forEach(e=>{void 0!==this[e]&&(t[e]=this[e])}),t.startDate=this.startDate||this._model}_applyPopupStyling(t){this._renderer.addClass(t,"dropdown-menu"),this._renderer.addClass(t,"show"),"body"===this.container&&this._renderer.addClass(t,"ngb-dp-body")}_subscribeForDatepickerOutputs(t){t.navigate.subscribe(t=>this.navigate.emit(t)),t.dateSelect.subscribe(t=>{this.dateSelect.emit(t),!0!==this.autoClose&&"inside"!==this.autoClose||this.close()})}_writeModelValue(t){const e=this._parserFormatter.format(t);this._inputValue=e,this._renderer.setProperty(this._elRef.nativeElement,"value",e),this.isOpen()&&(this._cRef.instance.writeValue(this._dateAdapter.toModel(t)),this._onTouched())}_fromDateStruct(t){const e=t?new uS(t.year,t.month,t.day):null;return this._calendar.isValid(e)?e:null}_updatePopupPosition(){if(!this._cRef)return;let t;if(t=zC(this.positionTarget)?this._document.querySelector(this.positionTarget):this.positionTarget instanceof HTMLElement?this.positionTarget:this._elRef.nativeElement,this.positionTarget&&!t)throw new Error("ngbDatepicker could not find element declared in [positionTarget] to position against.");zS(t,this._cRef.location.nativeElement,this.placement,"body"===this.container)}};return t.\u0275fac=function(e){return new(e||t)(oa(GS),oa(uc),oa(Ic),oa(pc),oa(cc),oa(ju),oa(pS),oa(ES),oa(wh),oa(_o),oa(qS))},t.\u0275dir=we({type:t,selectors:[["input","ngbDatepicker",""]],hostVars:1,hostBindings:function(t,e){1&t&&ya("input",function(t){return e.manualDateChange(t.target.value)})("change",function(t){return e.manualDateChange(t.target.value,!0)})("focus",function(){return e.onFocus()})("blur",function(){return e.onBlur()}),2&t&&Qa("disabled",e.disabled)},inputs:{disabled:"disabled",autoClose:"autoClose",dayTemplate:"dayTemplate",dayTemplateData:"dayTemplateData",displayMonths:"displayMonths",firstDayOfWeek:"firstDayOfWeek",footerTemplate:"footerTemplate",markDisabled:"markDisabled",minDate:"minDate",maxDate:"maxDate",navigation:"navigation",outsideDays:"outsideDays",placement:"placement",restoreFocus:"restoreFocus",showWeekdays:"showWeekdays",showWeekNumbers:"showWeekNumbers",startDate:"startDate",container:"container",positionTarget:"positionTarget"},outputs:{dateSelect:"dateSelect",navigate:"navigate",closed:"closed"},exportAs:["ngbDatepicker"],features:[oc([YS,XS,{provide:SS,useExisting:qS}]),Ve]}),t=cx([ux(8,nt(wh))],t),t})(),QS=(()=>{let t=class{constructor(t){this.i18n=t}isMuted(){return!this.selected&&(this.date.month!==this.currentMonth||this.disabled)}};return t.\u0275fac=function(e){return new(e||t)(oa(wS))},t.\u0275cmp=pe({type:t,selectors:[["","ngbDatepickerDayView",""]],hostAttrs:[1,"btn-light"],hostVars:10,hostBindings:function(t,e){2&t&&Oa("bg-primary",e.selected)("text-white",e.selected)("text-muted",e.isMuted())("outside",e.isMuted())("active",e.focused)},inputs:{currentMonth:"currentMonth",date:"date",disabled:"disabled",focused:"focused",selected:"selected"},attrs:pC,decls:1,vars:1,template:function(t,e){1&t&&qa(0),2&t&&Ya(e.i18n.getDayNumerals(e.date))},styles:["[ngbDatepickerDayView]{text-align:center;width:2rem;height:2rem;line-height:2rem;border-radius:.25rem;background:0 0}[ngbDatepickerDayView].outside{opacity:.5}"],encapsulation:2,changeDetection:0}),t})(),ZS=(()=>{let t=class{constructor(t,e){this.i18n=t,this._renderer=e,this.select=new Zc,this._month=-1,this._year=-1}changeMonth(t){this.select.emit(new uS(this.date.year,HC(t),1))}changeYear(t){this.select.emit(new uS(HC(t),this.date.month,1))}ngAfterViewChecked(){this.date&&(this.date.month!==this._month&&(this._month=this.date.month,this._renderer.setProperty(this.monthSelect.nativeElement,"value",this._month)),this.date.year!==this._year&&(this._year=this.date.year,this._renderer.setProperty(this.yearSelect.nativeElement,"value",this._year)))}};return t.\u0275fac=function(e){return new(e||t)(oa(wS),oa(pc))},t.\u0275cmp=pe({type:t,selectors:[["ngb-datepicker-navigation-select"]],viewQuery:function(t,e){if(1&t&&(du(gC,!0,uc),du(mC,!0,uc)),2&t){let t;hu(t=vu())&&(e.monthSelect=t.first),hu(t=vu())&&(e.yearSelect=t.first)}},inputs:{date:"date",disabled:"disabled",months:"months",years:"years"},outputs:{select:"select"},decls:6,vars:4,consts:function(){let t,e,n,i;return t=$localize`:@@ngb.datepicker.select-month␟1dbc84807f35518112f62e5775d1daebd3d8462b␟2253869508135064750:Select month`,e=$localize`:@@ngb.datepicker.select-month␟1dbc84807f35518112f62e5775d1daebd3d8462b␟2253869508135064750:Select month`,n=$localize`:@@ngb.datepicker.select-year␟8ceb09d002bf0c5d1cac171dfbffe1805d2b3962␟8852264961585484321:Select year`,i=$localize`:@@ngb.datepicker.select-year␟8ceb09d002bf0c5d1cac171dfbffe1805d2b3962␟8852264961585484321:Select year`,[["aria-label",t,"title",e,1,"custom-select",3,"disabled","change"],["month",""],[3,"value",4,"ngFor","ngForOf"],["aria-label",n,"title",i,1,"custom-select",3,"disabled","change"],["year",""],[3,"value"]]},template:function(t,e){1&t&&(ua(0,"select",0,1),ya("change",function(t){return e.changeMonth(t.target.value)}),ra(2,vC,2,3,"option",2),ha(),ua(3,"select",3,4),ya("change",function(t){return e.changeYear(t.target.value)}),ra(5,yC,2,2,"option",2),ha()),2&t&&(la("disabled",e.disabled),gs(2),la("ngForOf",e.months),gs(1),la("disabled",e.disabled),gs(2),la("ngForOf",e.years))},directives:[Sd,Bw,jw],styles:["ngb-datepicker-navigation-select>.custom-select{-ms-flex:1 1 auto;flex:1 1 auto;padding:0 .5rem;font-size:.875rem;height:1.85rem}ngb-datepicker-navigation-select>.custom-select:focus{z-index:1}ngb-datepicker-navigation-select>.custom-select::-ms-value{background-color:transparent!important}"],encapsulation:2,changeDetection:0}),t})();new Date(1882,10,12),new Date(2174,10,25);let tk=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[Fd,ax]]}),t})(),ek=(()=>{let t=class{constructor(){this.autoClose=!0,this.placement=["bottom-left","bottom-right","top-left","top-right"]}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:function(){return new t},token:t,providedIn:"root"}),t})();var nk;let ik=(()=>{let t=class{};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=we({type:t,selectors:[["",8,"navbar"]]}),t})(),rk=(()=>{let t=class{constructor(t){this.elementRef=t,this._disabled=!1}set disabled(t){this._disabled=""===t||!0===t}get disabled(){return this._disabled}};return t.\u0275fac=function(e){return new(e||t)(oa(uc))},t.\u0275dir=we({type:t,selectors:[["","ngbDropdownItem",""]],hostAttrs:[1,"dropdown-item"],hostVars:2,hostBindings:function(t,e){2&t&&Oa("disabled",e.disabled)},inputs:{disabled:"disabled"}}),t})(),sk=(()=>{let t=class{constructor(t,e){this.dropdown=t,this.placement="bottom",this.isOpen=!1,this.nativeElement=e.nativeElement}};return t.\u0275fac=function(e){return new(e||t)(oa(_t(()=>lk)),oa(uc))},t.\u0275dir=we({type:t,selectors:[["","ngbDropdownMenu",""]],contentQueries:function(t,e,n){if(1&t&&gu(n,rk,!1),2&t){let t;hu(t=vu())&&(e.menuItems=t)}},hostVars:5,hostBindings:function(t,e){1&t&&ya("keydown.ArrowUp",function(t){return e.dropdown.onKeyDown(t)})("keydown.ArrowDown",function(t){return e.dropdown.onKeyDown(t)})("keydown.Home",function(t){return e.dropdown.onKeyDown(t)})("keydown.End",function(t){return e.dropdown.onKeyDown(t)})("keydown.Enter",function(t){return e.dropdown.onKeyDown(t)})("keydown.Space",function(t){return e.dropdown.onKeyDown(t)})("keydown.Tab",function(t){return e.dropdown.onKeyDown(t)})("keydown.Shift.Tab",function(t){return e.dropdown.onKeyDown(t)}),2&t&&(na("x-placement",e.placement),Oa("dropdown-menu",!0)("show",e.dropdown.isOpen()))}}),t=cx([ux(0,nt(_t(()=>lk)))],t),t})(),ok=(()=>{let t=class{constructor(t,e){this.dropdown=t,this.nativeElement=e.nativeElement}};return t.\u0275fac=function(e){return new(e||t)(oa(_t(()=>lk)),oa(uc))},t.\u0275dir=we({type:t,selectors:[["","ngbDropdownAnchor",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:1,hostBindings:function(t,e){2&t&&na("aria-expanded",e.dropdown.isOpen())}}),t=cx([ux(0,nt(_t(()=>lk)))],t),t})(),ak=(()=>{let t=nk=class extends ok{constructor(t,e){super(t,e)}};return t.\u0275fac=function(e){return new(e||t)(oa(_t(()=>lk)),oa(uc))},t.\u0275dir=we({type:t,selectors:[["","ngbDropdownToggle",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:1,hostBindings:function(t,e){1&t&&ya("click",function(){return e.dropdown.toggle()})("keydown.ArrowUp",function(t){return e.dropdown.onKeyDown(t)})("keydown.ArrowDown",function(t){return e.dropdown.onKeyDown(t)})("keydown.Home",function(t){return e.dropdown.onKeyDown(t)})("keydown.End",function(t){return e.dropdown.onKeyDown(t)})("keydown.Tab",function(t){return e.dropdown.onKeyDown(t)})("keydown.Shift.Tab",function(t){return e.dropdown.onKeyDown(t)}),2&t&&na("aria-expanded",e.dropdown.isOpen())},features:[oc([{provide:ok,useExisting:_t(()=>nk)}]),jo]}),t=nk=cx([ux(0,nt(_t(()=>lk)))],t),t})(),lk=(()=>{let t=class{constructor(t,e,n,i,r,s,o){this._changeDetector=t,this._document=n,this._ngZone=i,this._elementRef=r,this._renderer=s,this._closed$=new C,this._bodyContainer=null,this._open=!1,this.openChange=new Zc,this.placement=e.placement,this.container=e.container,this.autoClose=e.autoClose,this.display=o?"static":"dynamic",this._zoneSubscription=i.onStable.subscribe(()=>{this._positionMenu()})}ngAfterContentInit(){this._ngZone.onStable.pipe(Dm(1)).subscribe(()=>{this._applyPlacementClasses(),this._open&&this._setCloseHandlers()})}ngOnChanges(t){t.container&&this._open&&this._applyContainer(this.container),t.placement&&!t.placement.isFirstChange&&this._applyPlacementClasses()}isOpen(){return this._open}open(){this._open||(this._open=!0,this._applyContainer(this.container),this.openChange.emit(!0),this._setCloseHandlers(),this._anchor&&this._anchor.nativeElement.focus())}_setCloseHandlers(){PS(this._ngZone,this._document,this.autoClose,t=>{this.close(),0===t&&this._anchor.nativeElement.focus()},this._closed$,this._menu?[this._menu.nativeElement]:[],this._anchor?[this._anchor.nativeElement]:[],".dropdown-item,.dropdown-divider")}close(){this._open&&(this._open=!1,this._resetContainer(),this._closed$.next(),this.openChange.emit(!1),this._changeDetector.markForCheck())}toggle(){this.isOpen()?this.close():this.open()}ngOnDestroy(){this._resetContainer(),this._closed$.next(),this._zoneSubscription.unsubscribe()}onKeyDown(t){const e=t.which,n=this._getMenuElements();let i=-1,r=null;const s=this._isEventFromToggle(t);if(!s&&n.length&&n.forEach((e,n)=>{e.contains(t.target)&&(r=e),e===this._document.activeElement&&(i=n)}),e!==FS.Space&&e!==FS.Enter){if(e!==FS.Tab){if(s||r){if(this.open(),n.length){switch(e){case FS.ArrowDown:i=Math.min(i+1,n.length-1);break;case FS.ArrowUp:if(this._isDropup()&&-1===i){i=n.length-1;break}i=Math.max(i-1,0);break;case FS.Home:i=0;break;case FS.End:i=n.length-1}n[i].focus()}t.preventDefault()}}else if(t.target&&this.isOpen()&&this.autoClose){if(this._anchor.nativeElement===t.target)return void("body"!==this.container||t.shiftKey?t.shiftKey&&this.close():(this._renderer.setAttribute(this._menu.nativeElement,"tabindex","0"),this._menu.nativeElement.focus(),this._renderer.removeAttribute(this._menu.nativeElement,"tabindex")));if("body"===this.container){const e=this._menu.nativeElement.querySelectorAll(BS);t.shiftKey&&t.target===e[0]?(this._anchor.nativeElement.focus(),t.preventDefault()):t.shiftKey||t.target!==e[e.length-1]||(this._anchor.nativeElement.focus(),this.close())}else E_(t.target,"focusout").pipe(Dm(1)).subscribe(({relatedTarget:t})=>{this._elementRef.nativeElement.contains(t)||this.close()})}}else!r||!0!==this.autoClose&&"inside"!==this.autoClose||E_(r,"click").pipe(Dm(1)).subscribe(()=>this.close())}_isDropup(){return this._elementRef.nativeElement.classList.contains("dropup")}_isEventFromToggle(t){return this._anchor.nativeElement.contains(t.target)}_getMenuElements(){const t=this._menu;return null==t?[]:t.menuItems.filter(t=>!t.disabled).map(t=>t.elementRef.nativeElement)}_positionMenu(){const t=this._menu;this.isOpen()&&t&&this._applyPlacementClasses("dynamic"===this.display?zS(this._anchor.nativeElement,this._bodyContainer||this._menu.nativeElement,this.placement,"body"===this.container):this._getFirstPlacement(this.placement))}_getFirstPlacement(t){return Array.isArray(t)?t[0]:t.split(" ")[0]}_resetContainer(){const t=this._renderer;if(this._menu){const e=this._menu.nativeElement;t.appendChild(this._elementRef.nativeElement,e),t.removeStyle(e,"position"),t.removeStyle(e,"transform")}this._bodyContainer&&(t.removeChild(this._document.body,this._bodyContainer),this._bodyContainer=null)}_applyContainer(t=null){if(this._resetContainer(),"body"===t){const t=this._renderer,e=this._menu.nativeElement,n=this._bodyContainer=this._bodyContainer||t.createElement("div");t.setStyle(n,"position","absolute"),t.setStyle(e,"position","static"),t.setStyle(n,"z-index","1050"),t.appendChild(n,e),t.appendChild(this._document.body,n)}}_applyPlacementClasses(t){const e=this._menu;if(e){t||(t=this._getFirstPlacement(this.placement));const n=this._renderer,i=this._elementRef.nativeElement;n.removeClass(i,"dropup"),n.removeClass(i,"dropdown"),e.placement="static"===this.display?null:t;const r=-1!==t.search("^top")?"dropup":"dropdown";n.addClass(i,r);const s=this._bodyContainer;s&&(n.removeClass(s,"dropup"),n.removeClass(s,"dropdown"),n.addClass(s,r))}}};return t.\u0275fac=function(e){return new(e||t)(oa(_o),oa(ek),oa(wh),oa(ju),oa(uc),oa(pc),oa(ik,8))},t.\u0275dir=we({type:t,selectors:[["","ngbDropdown",""]],contentQueries:function(t,e,n){if(1&t&&(gu(n,sk,!0),gu(n,ok,!0)),2&t){let t;hu(t=vu())&&(e._menu=t.first),hu(t=vu())&&(e._anchor=t.first)}},hostVars:2,hostBindings:function(t,e){2&t&&Oa("show",e.isOpen())},inputs:{_open:["open","_open"],placement:"placement",container:"container",autoClose:"autoClose",display:"display"},outputs:{openChange:"openChange"},exportAs:["ngbDropdown"],features:[Ve]}),t=cx([ux(2,nt(wh)),ux(6,it())],t),t})(),ck=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)}}),t})(),uk=(()=>{let t=class{constructor(){this.backdrop=!0,this.keyboard=!0}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:function(){return new t},token:t,providedIn:"root"}),t})();class hk{constructor(t,e,n){this.nodes=t,this.viewRef=e,this.componentRef=n}}class dk{constructor(t,e,n,i,r,s){this._type=t,this._injector=e,this._viewContainerRef=n,this._renderer=i,this._componentFactoryResolver=r,this._applicationRef=s,this._windowRef=null,this._contentRef=null}open(t,e){return this._windowRef||(this._contentRef=this._getContentRef(t,e),this._windowRef=this._viewContainerRef.createComponent(this._componentFactoryResolver.resolveComponentFactory(this._type),this._viewContainerRef.length,this._injector,this._contentRef.nodes)),this._windowRef}close(){var t;this._windowRef&&(this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._windowRef.hostView)),this._windowRef=null,(null===(t=this._contentRef)||void 0===t?void 0:t.viewRef)&&(this._applicationRef.detachView(this._contentRef.viewRef),this._contentRef.viewRef.destroy(),this._contentRef=null))}_getContentRef(t,e){if(t){if(t instanceof $c){const n=t.createEmbeddedView(e);return this._applicationRef.attachView(n),new hk([n.rootNodes],n)}return new hk([[this._renderer.createText(`${t}`)]])}return new hk([])}}const fk=()=>{};let pk=(()=>{let t=class{constructor(t){this._document=t}compensate(){const t=this._getWidth();return this._isPresent(t)?this._adjustBody(t):fk}_adjustBody(t){const e=this._document.body,n=e.style.paddingRight,i=parseFloat(window.getComputedStyle(e)["padding-right"]);return e.style["padding-right"]=`${i+t}px`,()=>e.style["padding-right"]=n}_isPresent(t){const e=this._document.body.getBoundingClientRect();return window.innerWidth-(e.left+e.right)>=t-.1*t}_getWidth(){const t=this._document.createElement("div");t.className="modal-scrollbar-measure";const e=this._document.body;e.appendChild(t);const n=t.getBoundingClientRect().width-t.clientWidth;return e.removeChild(t),n}};return t.\u0275fac=function(e){return new(e||t)(Yt(wh))},t.\u0275prov=ut({factory:function(){return new t(Yt(wh))},token:t,providedIn:"root"}),t=cx([ux(0,nt(wh))],t),t})(),gk=(()=>{let t=class{};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["ngb-modal-backdrop"]],hostAttrs:[2,"z-index","1050"],hostVars:2,hostBindings:function(t,e){2&t&&Ia("modal-backdrop fade show"+(e.backdropClass?" "+e.backdropClass:""))},inputs:{backdropClass:"backdropClass"},decls:0,vars:0,template:function(t,e){},encapsulation:2}),t})();class mk{close(t){}dismiss(t){}}class vk{constructor(t,e,n,i){this._windowCmptRef=t,this._contentRef=e,this._backdropCmptRef=n,this._beforeDismiss=i,t.instance.dismissEvent.subscribe(t=>{this.dismiss(t)}),this.result=new Promise((t,e)=>{this._resolve=t,this._reject=e}),this.result.then(null,()=>{})}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}close(t){this._windowCmptRef&&(this._resolve(t),this._removeModalElements())}_dismiss(t){this._reject(t),this._removeModalElements()}dismiss(t){if(this._windowCmptRef)if(this._beforeDismiss){const e=this._beforeDismiss();e&&e.then?e.then(e=>{!1!==e&&this._dismiss(t)},()=>{}):!1!==e&&this._dismiss(t)}else this._dismiss(t)}_removeModalElements(){const t=this._windowCmptRef.location.nativeElement;if(t.parentNode.removeChild(t),this._windowCmptRef.destroy(),this._backdropCmptRef){const t=this._backdropCmptRef.location.nativeElement;t.parentNode.removeChild(t),this._backdropCmptRef.destroy()}this._contentRef&&this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._windowCmptRef=null,this._backdropCmptRef=null,this._contentRef=null}}var yk=function(t){return t[t.BACKDROP_CLICK=0]="BACKDROP_CLICK",t[t.ESC=1]="ESC",t}({});let bk=(()=>{let t=class{constructor(t,e,n){this._document=t,this._elRef=e,this._zone=n,this._closed$=new C,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new Zc}dismiss(t){this.dismissEvent.emit(t)}ngOnInit(){this._elWithFocus=this._document.activeElement}ngAfterViewInit(){const{nativeElement:t}=this._elRef;if(this._zone.runOutsideAngular(()=>{E_(t,"keydown").pipe(R_(this._closed$),hm(t=>t.which===FS.Escape&&this.keyboard)).subscribe(t=>requestAnimationFrame(()=>{t.defaultPrevented||this._zone.run(()=>this.dismiss(yk.ESC))}));let e=!1;E_(this._dialogEl.nativeElement,"mousedown").pipe(R_(this._closed$),Um(()=>e=!1),km(()=>E_(t,"mouseup").pipe(R_(this._closed$),Dm(1))),hm(({target:e})=>t===e)).subscribe(()=>{e=!0}),E_(t,"click").pipe(R_(this._closed$)).subscribe(({target:n})=>{!0!==this.backdrop||t!==n||e||this._zone.run(()=>this.dismiss(yk.BACKDROP_CLICK)),e=!1})}),!t.contains(document.activeElement)){const e=t.querySelector("[ngbAutofocus]"),n=US(t)[0];(e||n||t).focus()}}ngOnDestroy(){const t=this._document.body,e=this._elWithFocus;let n;n=e&&e.focus&&t.contains(e)?e:t,this._zone.runOutsideAngular(()=>{setTimeout(()=>n.focus()),this._elWithFocus=null}),this._closed$.next()}};return t.\u0275fac=function(e){return new(e||t)(oa(wh),oa(uc),oa(ju))},t.\u0275cmp=pe({type:t,selectors:[["ngb-modal-window"]],viewQuery:function(t,e){if(1&t&&du(bC,!0),2&t){let t;hu(t=vu())&&(e._dialogEl=t.first)}},hostAttrs:["role","dialog","tabindex","-1"],hostVars:5,hostBindings:function(t,e){2&t&&(na("aria-modal",!0)("aria-labelledby",e.ariaLabelledBy)("aria-describedby",e.ariaDescribedBy),Ia("modal fade show d-block"+(e.windowClass?" "+e.windowClass:"")))},inputs:{backdrop:"backdrop",keyboard:"keyboard",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",centered:"centered",scrollable:"scrollable",size:"size",windowClass:"windowClass"},outputs:{dismissEvent:"dismiss"},ngContentSelectors:z_,decls:4,vars:2,consts:[["role","document"],["dialog",""],[1,"modal-content"]],template:function(t,e){1&t&&(Ca(),ua(0,"div",0,1),ua(2,"div",2),Sa(3),ha(),ha()),2&t&&Ia("modal-dialog"+(e.size?" modal-"+e.size:"")+(e.centered?" modal-dialog-centered":"")+(e.scrollable?" modal-dialog-scrollable":""))},styles:["ngb-modal-window .component-host-scrollable{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:hidden}"],encapsulation:2}),t=cx([ux(0,nt(wh))],t),t})(),wk=(()=>{let t=class{constructor(t,e,n,i,r,s){this._applicationRef=t,this._injector=e,this._document=n,this._scrollBar=i,this._rendererFactory=r,this._ngZone=s,this._activeWindowCmptHasChanged=new C,this._ariaHiddenValues=new Map,this._backdropAttributes=["backdropClass"],this._modalRefs=[],this._windowAttributes=["ariaLabelledBy","ariaDescribedBy","backdrop","centered","keyboard","scrollable","size","windowClass"],this._windowCmpts=[],this._activeInstances=new Zc,this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){const t=this._windowCmpts[this._windowCmpts.length-1];VS(this._ngZone,t.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(t.location.nativeElement)}})}open(t,e,n,i){const r=i.container instanceof HTMLElement?i.container:KC(i.container)?this._document.querySelector(i.container):this._document.body,s=this._rendererFactory.createRenderer(null,null),o=this._scrollBar.compensate(),a=()=>{this._modalRefs.length||(s.removeClass(this._document.body,"modal-open"),this._revertAriaHidden())};if(!r)throw new Error(`The specified modal container "${i.container||"body"}" was not found in the DOM.`);const l=new mk,c=this._getContentRef(t,i.injector||e,n,l,i);let u=!1!==i.backdrop?this._attachBackdrop(t,r):void 0,h=this._attachWindowComponent(t,r,c),d=new vk(h,c,u,i.beforeDismiss);return this._registerModalRef(d),this._registerWindowCmpt(h),d.result.then(o,o),d.result.then(a,a),l.close=t=>{d.close(t)},l.dismiss=t=>{d.dismiss(t)},this._applyWindowOptions(h.instance,i),1===this._modalRefs.length&&s.addClass(this._document.body,"modal-open"),u&&u.instance&&this._applyBackdropOptions(u.instance,i),d}get activeInstances(){return this._activeInstances}dismissAll(t){this._modalRefs.forEach(e=>e.dismiss(t))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(t,e){let n=t.resolveComponentFactory(gk).create(this._injector);return this._applicationRef.attachView(n.hostView),e.appendChild(n.location.nativeElement),n}_attachWindowComponent(t,e,n){let i=t.resolveComponentFactory(bk).create(this._injector,n.nodes);return this._applicationRef.attachView(i.hostView),e.appendChild(i.location.nativeElement),i}_applyWindowOptions(t,e){this._windowAttributes.forEach(n=>{KC(e[n])&&(t[n]=e[n])})}_applyBackdropOptions(t,e){this._backdropAttributes.forEach(n=>{KC(e[n])&&(t[n]=e[n])})}_getContentRef(t,e,n,i,r){return n?n instanceof $c?this._createFromTemplateRef(n,i):zC(n)?this._createFromString(n):this._createFromComponent(t,e,n,i,r):new hk([])}_createFromTemplateRef(t,e){const n=t.createEmbeddedView({$implicit:e,close(t){e.close(t)},dismiss(t){e.dismiss(t)}});return this._applicationRef.attachView(n),new hk([n.rootNodes],n)}_createFromString(t){const e=this._document.createTextNode(`${t}`);return new hk([[e]])}_createFromComponent(t,e,n,i,r){const s=t.resolveComponentFactory(n),o=Bo.create({providers:[{provide:mk,useValue:i}],parent:e}),a=s.create(o),l=a.location.nativeElement;return r.scrollable&&l.classList.add("component-host-scrollable"),this._applicationRef.attachView(a.hostView),new hk([[l]],a.hostView,a)}_setAriaHidden(t){const e=t.parentElement;e&&t!==this._document.body&&(Array.from(e.children).forEach(e=>{e!==t&&"SCRIPT"!==e.nodeName&&(this._ariaHiddenValues.set(e,e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))}),this._setAriaHidden(e))}_revertAriaHidden(){this._ariaHiddenValues.forEach((t,e)=>{t?e.setAttribute("aria-hidden",t):e.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(t){const e=()=>{const e=this._modalRefs.indexOf(t);e>-1&&(this._modalRefs.splice(e,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(t),this._activeInstances.emit(this._modalRefs),t.result.then(e,e)}_registerWindowCmpt(t){this._windowCmpts.push(t),this._activeWindowCmptHasChanged.next(),t.onDestroy(()=>{const e=this._windowCmpts.indexOf(t);e>-1&&(this._windowCmpts.splice(e,1),this._activeWindowCmptHasChanged.next())})}};return t.\u0275fac=function(e){return new(e||t)(Yt(lh),Yt(Bo),Yt(wh),Yt(pk),Yt(dc),Yt(ju))},t.\u0275prov=ut({factory:function(){return new t(Yt(lh),Yt(Bt),Yt(wh),Yt(pk),Yt(dc),Yt(ju))},token:t,providedIn:"root"}),t=cx([ux(2,nt(wh))],t),t})(),xk=(()=>{let t=class{constructor(t,e,n,i){this._moduleCFR=t,this._injector=e,this._modalStack=n,this._config=i}open(t,e={}){const n=Object.assign({},this._config,e);return this._modalStack.open(this._moduleCFR,this._injector,t,n)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(t){this._modalStack.dismissAll(t)}hasOpenModals(){return this._modalStack.hasOpenModals()}};return t.\u0275fac=function(e){return new(e||t)(Yt(cc),Yt(Bo),Yt(wk),Yt(uk))},t.\u0275prov=ut({factory:function(){return new t(Yt(cc),Yt(Bt),Yt(wk),Yt(uk))},token:t,providedIn:"root"}),t})(),_k=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},providers:[xk]}),t})(),Ck=(()=>{let t=class{constructor(){this.destroyOnHide=!0,this.orientation="horizontal",this.roles="tablist",this.keyboard=!1}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:function(){return new t},token:t,providedIn:"root"}),t})();const Sk=t=>KC(t)&&""!==t;let kk=0,Ek=(()=>{let t=class{constructor(t){this.templateRef=t}};return t.\u0275fac=function(e){return new(e||t)(oa($c))},t.\u0275dir=we({type:t,selectors:[["ng-template","ngbNavContent",""]]}),t})(),Ak=(()=>{let t=class{constructor(t,e){this.elementRef=e,this.disabled=!1,this._nav=t}ngAfterContentChecked(){this.contentTpl=this.contentTpls.first}ngOnInit(){KC(this.domId)||(this.domId="ngb-nav-"+kk++)}get active(){return this._nav.activeId===this.id}get id(){return Sk(this._id)?this._id:this.domId}get panelDomId(){return`${this.domId}-panel`}isPanelInDom(){return(KC(this.destroyOnHide)?!this.destroyOnHide:!this._nav.destroyOnHide)||this.active}};return t.\u0275fac=function(e){return new(e||t)(oa(_t(()=>Dk)),oa(uc))},t.\u0275dir=we({type:t,selectors:[["","ngbNavItem",""]],contentQueries:function(t,e,n){if(1&t&&gu(n,Ek,!1),2&t){let t;hu(t=vu())&&(e.contentTpls=t)}},hostVars:2,hostBindings:function(t,e){2&t&&Oa("nav-item",!0)},inputs:{disabled:"disabled",domId:"domId",destroyOnHide:"destroyOnHide",_id:["ngbNavItem","_id"]},exportAs:["ngbNavItem"]}),t=cx([ux(0,nt(_t(()=>Dk)))],t),t})(),Dk=(()=>{let t=class{constructor(t,e,n,i){this.role=t,this._cd=n,this._document=i,this.activeIdChange=new Zc,this.navChange=new Zc,this.destroyOnHide=e.destroyOnHide,this.orientation=e.orientation,this.roles=e.roles,this.keyboard=e.keyboard}click(t){t.disabled||this._updateActiveId(t.id)}onKeyDown(t){if("tablist"!==this.roles||!this.keyboard)return;const e=t.which,n=this.links.filter(t=>!t.navItem.disabled),{length:i}=n;let r=-1;if(n.forEach((t,e)=>{t.elRef.nativeElement===this._document.activeElement&&(r=e)}),i){switch(e){case FS.ArrowLeft:if("vertical"===this.orientation)return;r=(r-1+i)%i;break;case FS.ArrowRight:if("vertical"===this.orientation)return;r=(r+1)%i;break;case FS.ArrowDown:if("horizontal"===this.orientation)return;r=(r+1)%i;break;case FS.ArrowUp:if("horizontal"===this.orientation)return;r=(r-1+i)%i;break;case FS.Home:r=0;break;case FS.End:r=i-1}"changeWithArrows"===this.keyboard&&this.select(n[r].navItem.id),n[r].elRef.nativeElement.focus(),t.preventDefault()}}select(t){this._updateActiveId(t,!1)}ngAfterContentInit(){if(!KC(this.activeId)){const t=this.items.first?this.items.first.id:null;Sk(t)&&(this._updateActiveId(t,!1),this._cd.detectChanges())}}_updateActiveId(t,e=!0){if(this.activeId!==t){let n=!1;e&&this.navChange.emit({activeId:this.activeId,nextId:t,preventDefault:()=>{n=!0}}),n||(this.activeId=t,this.activeIdChange.emit(t))}}};return t.\u0275fac=function(e){return new(e||t)(aa("role"),oa(Ck),oa(_o),oa(wh))},t.\u0275dir=we({type:t,selectors:[["","ngbNav",""]],contentQueries:function(t,e,n){if(1&t&&(gu(n,Ak,!1),gu(n,Tk,!0)),2&t){let t;hu(t=vu())&&(e.items=t),hu(t=vu())&&(e.links=t)}},hostVars:6,hostBindings:function(t,e){1&t&&ya("keydown.arrowLeft",function(t){return e.onKeyDown(t)})("keydown.arrowRight",function(t){return e.onKeyDown(t)})("keydown.arrowDown",function(t){return e.onKeyDown(t)})("keydown.arrowUp",function(t){return e.onKeyDown(t)})("keydown.Home",function(t){return e.onKeyDown(t)})("keydown.End",function(t){return e.onKeyDown(t)}),2&t&&(na("aria-orientation","vertical"===e.orientation&&"tablist"===e.roles?"vertical":void 0)("role",e.role?e.role:e.roles?"tablist":void 0),Oa("nav",!0)("flex-column","vertical"===e.orientation))},inputs:{destroyOnHide:"destroyOnHide",orientation:"orientation",roles:"roles",keyboard:"keyboard",activeId:"activeId"},outputs:{activeIdChange:"activeIdChange",navChange:"navChange"},exportAs:["ngbNav"]}),t=cx([ux(0,ot("role")),ux(3,nt(wh))],t),t})(),Tk=(()=>{let t=class{constructor(t,e,n,i){this.role=t,this.navItem=e,this.nav=n,this.elRef=i}hasNavItemClass(){return this.navItem.elementRef.nativeElement.nodeType===Node.COMMENT_NODE}};return t.\u0275fac=function(e){return new(e||t)(aa("role"),oa(Ak),oa(Dk),oa(uc))},t.\u0275dir=we({type:t,selectors:[["a","ngbNavLink",""]],hostAttrs:["href",""],hostVars:14,hostBindings:function(t,e){1&t&&ya("click",function(t){return e.nav.click(e.navItem),t.preventDefault()}),2&t&&(Qa("id",e.navItem.domId),na("role",e.role?e.role:e.nav.roles?"tab":void 0)("tabindex",e.navItem.disabled?-1:void 0)("aria-controls",e.navItem.isPanelInDom()?e.navItem.panelDomId:null)("aria-selected",e.navItem.active)("aria-disabled",e.navItem.disabled),Oa("nav-link",!0)("nav-item",e.hasNavItemClass())("active",e.navItem.active)("disabled",e.navItem.disabled))}}),t=cx([ux(0,ot("role"))],t),t})(),Rk=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[Fd]]}),t})(),Fk=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[Fd]]}),t})(),Mk=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[Fd]]}),t})(),Lk=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[Fd]]}),t})(),$k=(()=>{let t=class{constructor(){this.max=10,this.readonly=!1,this.resettable=!1}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:function(){return new t},token:t,providedIn:"root"}),t})();const Ok={provide:Vb,useExisting:_t(()=>Ik),multi:!0};let Ik=(()=>{let t=class{constructor(t,e){this._changeDetectorRef=e,this.contexts=[],this.disabled=!1,this.hover=new Zc,this.leave=new Zc,this.rateChange=new Zc(!0),this.onChange=t=>{},this.onTouched=()=>{},this.max=t.max,this.readonly=t.readonly}ariaValueText(){return`${this.nextRate} out of ${this.max}`}enter(t){this.readonly||this.disabled||this._updateState(t),this.hover.emit(t)}handleBlur(){this.onTouched()}handleClick(t){this.readonly||this.disabled||this.update(this.resettable&&this.rate===t?0:t)}handleKeyDown(t){switch(t.which){case FS.ArrowDown:case FS.ArrowLeft:this.update(this.rate-1);break;case FS.ArrowUp:case FS.ArrowRight:this.update(this.rate+1);break;case FS.Home:this.update(0);break;case FS.End:this.update(this.max);break;default:return}t.preventDefault()}ngOnChanges(t){t.rate&&this.update(this.rate)}ngOnInit(){this.contexts=Array.from({length:this.max},(t,e)=>({fill:0,index:e})),this._updateState(this.rate)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}reset(){this.leave.emit(this.nextRate),this._updateState(this.rate)}setDisabledState(t){this.disabled=t}update(t,e=!0){const n=function(t,e,n=0){return Math.max(Math.min(t,e),n)}(t,this.max,0);this.readonly||this.disabled||this.rate===n||(this.rate=n,this.rateChange.emit(this.rate)),e&&(this.onChange(this.rate),this.onTouched()),this._updateState(this.rate)}writeValue(t){this.update(t,!1),this._changeDetectorRef.markForCheck()}_getFillValue(t){const e=this.nextRate-t;return e>=1?100:e<1&&e>0?parseInt((100*e).toFixed(2),10):0}_updateState(t){this.nextRate=t,this.contexts.forEach((t,e)=>t.fill=this._getFillValue(e))}};return t.\u0275fac=function(e){return new(e||t)(oa($k),oa(_o))},t.\u0275cmp=pe({type:t,selectors:[["ngb-rating"]],contentQueries:function(t,e,n){if(1&t&&gu(n,$c,!0),2&t){let t;hu(t=vu())&&(e.starTemplateFromContent=t.first)}},hostAttrs:["role","slider","aria-valuemin","0",1,"d-inline-flex"],hostVars:5,hostBindings:function(t,e){1&t&&ya("blur",function(){return e.handleBlur()})("keydown",function(t){return e.handleKeyDown(t)})("mouseleave",function(){return e.reset()}),2&t&&(Qa("tabindex",e.disabled?-1:0),na("aria-valuemax",e.max)("aria-valuenow",e.nextRate)("aria-valuetext",e.ariaValueText())("aria-disabled",!!e.readonly||null))},inputs:{max:"max",readonly:"readonly",rate:"rate",resettable:"resettable",starTemplate:"starTemplate"},outputs:{hover:"hover",leave:"leave",rateChange:"rateChange"},features:[oc([Ok]),Ve],decls:3,vars:1,consts:[["t",""],["ngFor","",3,"ngForOf"],[1,"sr-only"],[3,"mouseenter","click"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(t,e){1&t&&(ra(0,wC,1,1,"ng-template",null,0,xu),ra(2,_C,4,5,"ng-template",1)),2&t&&(gs(2),la("ngForOf",e.contexts))},directives:[Sd,Rd],encapsulation:2,changeDetection:0}),t})(),Nk=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[Fd]]}),t})(),Pk=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[Fd]]}),t})();class Bk{constructor(t,e,n){this.hour=HC(t),this.minute=HC(e),this.second=HC(n)}changeHour(t=1){this.updateHour((isNaN(this.hour)?0:this.hour)+t)}updateHour(t){this.hour=WC(t)?(t<0?24+t:t)%24:NaN}changeMinute(t=1){this.updateMinute((isNaN(this.minute)?0:this.minute)+t)}updateMinute(t){WC(t)?(this.minute=t%60<0?60+t%60:t%60,this.changeHour(Math.floor(t/60))):this.minute=NaN}changeSecond(t=1){this.updateSecond((isNaN(this.second)?0:this.second)+t)}updateSecond(t){WC(t)?(this.second=t<0?60+t%60:t%60,this.changeMinute(Math.floor(t/60))):this.second=NaN}isValid(t=!0){return WC(this.hour)&&WC(this.minute)&&(!t||WC(this.second))}toString(){return`${this.hour||0}:${this.minute||0}:${this.second||0}`}}let Uk=(()=>{let t=class{constructor(){this.meridian=!1,this.spinners=!0,this.seconds=!1,this.hourStep=1,this.minuteStep=1,this.secondStep=1,this.disabled=!1,this.readonlyInputs=!1,this.size="medium"}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:function(){return new t},token:t,providedIn:"root"}),t})();function Vk(){return new jk}let Hk=(()=>{let t=class{};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:Vk,token:t,providedIn:"root"}),t})(),jk=(()=>{let t=class extends Hk{fromModel(t){return t&&GC(t.hour)&&GC(t.minute)?{hour:t.hour,minute:t.minute,second:GC(t.second)?t.second:null}:null}toModel(t){return t&&GC(t.hour)&&GC(t.minute)?{hour:t.hour,minute:t.minute,second:GC(t.second)?t.second:null}:null}};return t.\u0275fac=function(e){return pE(e||t)},t.\u0275prov=ut({token:t,factory:function(e){return t.\u0275fac(e)}}),t})(),zk=(()=>{let t=class{};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:function(){return t=Yt(Fu),new Wk(t);var t},token:t,providedIn:"root"}),t})(),Wk=(()=>{let t=class extends zk{constructor(t){super(),this._periods=jh(t,Bh.Standalone,Uh.Narrow)}getMorningPeriod(){return this._periods[0]}getAfternoonPeriod(){return this._periods[1]}};return t.\u0275fac=function(e){return new(e||t)(Yt(Fu))},t.\u0275prov=ut({token:t,factory:function(e){return t.\u0275fac(e)}}),t=cx([ux(0,nt(Fu))],t),t})();const Gk=/[^0-9]/g,Kk={provide:Vb,useExisting:_t(()=>qk),multi:!0};let qk=(()=>{let t=class{constructor(t,e,n,i){this._config=t,this._ngbTimeAdapter=e,this._cd=n,this.i18n=i,this.onChange=t=>{},this.onTouched=()=>{},this.meridian=t.meridian,this.spinners=t.spinners,this.seconds=t.seconds,this.hourStep=t.hourStep,this.minuteStep=t.minuteStep,this.secondStep=t.secondStep,this.disabled=t.disabled,this.readonlyInputs=t.readonlyInputs,this.size=t.size}set hourStep(t){this._hourStep=GC(t)?t:this._config.hourStep}get hourStep(){return this._hourStep}set minuteStep(t){this._minuteStep=GC(t)?t:this._config.minuteStep}get minuteStep(){return this._minuteStep}set secondStep(t){this._secondStep=GC(t)?t:this._config.secondStep}get secondStep(){return this._secondStep}writeValue(t){const e=this._ngbTimeAdapter.fromModel(t);this.model=e?new Bk(e.hour,e.minute,e.second):new Bk,this.seconds||e&&WC(e.second)||(this.model.second=0),this._cd.markForCheck()}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t}changeHour(t){this.model.changeHour(t),this.propagateModelChange()}changeMinute(t){this.model.changeMinute(t),this.propagateModelChange()}changeSecond(t){this.model.changeSecond(t),this.propagateModelChange()}updateHour(t){const e=this.model.hour>=12,n=HC(t);this.model.updateHour(this.meridian&&(e&&n<12||!e&&12===n)?n+12:n),this.propagateModelChange()}updateMinute(t){this.model.updateMinute(HC(t)),this.propagateModelChange()}updateSecond(t){this.model.updateSecond(HC(t)),this.propagateModelChange()}toggleMeridian(){this.meridian&&this.changeHour(12)}formatInput(t){t.value=t.value.replace(Gk,"")}formatHour(t){return WC(t)?qC(this.meridian?t%12==0?12:t%12:t%24):qC(NaN)}formatMinSec(t){return qC(WC(t)?t:NaN)}get isSmallSize(){return"small"===this.size}get isLargeSize(){return"large"===this.size}ngOnChanges(t){t.seconds&&!this.seconds&&this.model&&!WC(this.model.second)&&(this.model.second=0,this.propagateModelChange(!1))}propagateModelChange(t=!0){t&&this.onTouched(),this.model.isValid(this.seconds)?this.onChange(this._ngbTimeAdapter.toModel({hour:this.model.hour,minute:this.model.minute,second:this.model.second})):this.onChange(this._ngbTimeAdapter.toModel(null))}};return t.\u0275fac=function(e){return new(e||t)(oa(Uk),oa(Hk),oa(_o),oa(zk))},t.\u0275cmp=pe({type:t,selectors:[["ngb-timepicker"]],inputs:{meridian:"meridian",spinners:"spinners",seconds:"seconds",hourStep:"hourStep",minuteStep:"minuteStep",secondStep:"secondStep",readonlyInputs:"readonlyInputs",size:"size"},features:[oc([Kk]),Ve],decls:16,vars:25,consts:function(){let t,e,n,i,r,s,o,a,l,c,u,h,d,f;return t=$localize`:@@ngb.timepicker.HH␟ce676ab1d6d98f85c836381cf100a4a91ef95a1f␟4043638465245303811:HH`,e=$localize`:@@ngb.timepicker.hours␟3bbce5fef7e1151da052a4e529453edb340e3912␟8070396816726827304:Hours`,n=$localize`:@@ngb.timepicker.MM␟72c8edf6a50068a05bde70991e36b1e881f4ca54␟1647282246509919852:MM`,i=$localize`:@@ngb.timepicker.minutes␟41e62daa962947c0d23ded0981975d1bddf0bf38␟5531237363767747080:Minutes`,r=$localize`:@@ngb.timepicker.increment-hours␟cb74bc1d625a6c1742f0d7d47306cf495780c218␟5939278348542933629:Increment hours`,s=$localize`:@@ngb.timepicker.decrement-hours␟147c7a19429da7d999e247d22e33fee370b1691b␟3651829882940481818:Decrement hours`,o=$localize`:@@ngb.timepicker.increment-minutes␟f5a4a3bc05e053f6732475d0e74875ec01c3a348␟180147720391025024:Increment minutes`,a=$localize`:@@ngb.timepicker.decrement-minutes␟c1a6899e529c096da5b660385d4e77fe1f7ad271␟7447789825403243588:Decrement minutes`,l=$localize`:@@ngb.timepicker.SS␟ebe38d36a40a2383c5fefa9b4608ffbda08bd4a3␟3628127143071124194:SS`,c=$localize`:@@ngb.timepicker.seconds␟4f2ed9e71a7c981db3e50ae2fedb28aff2ec4e6c␟8874012390997067175:Seconds`,u=$localize`:@@ngb.timepicker.increment-seconds␟912322ecee7d659d04dcf494a70e22e49d334b26␟5364772110539092174:Increment seconds`,h=$localize`:@@ngb.timepicker.decrement-seconds␟5db47ac104294243a70eb9124fbea9d0004ddf69␟753633511487974857:Decrement seconds`,d=$localize`:@@ngb.timepicker.PM␟8d6e691e10306c1b34c6b26805151aaea320ef7f␟3564199131264287502:${"\ufffd0\ufffd"}:INTERPOLATION:`,f=$localize`:@@ngb.timepicker.AM␟69a1f176a93998876952adac57c3bc3863b6105e␟4592818992509942761:${"\ufffd0\ufffd"}:INTERPOLATION:`,[[3,"disabled"],[1,"ngb-tp"],[1,"ngb-tp-input-container","ngb-tp-hour"],["tabindex","-1","type","button","class","btn btn-link",3,"btn-sm","btn-lg","disabled","click",4,"ngIf"],["type","text","maxlength","2","inputmode","numeric","placeholder",t,"aria-label",e,1,"ngb-tp-input","form-control",3,"value","readOnly","disabled","change","input","keydown.ArrowUp","keydown.ArrowDown"],[1,"ngb-tp-spacer"],[1,"ngb-tp-input-container","ngb-tp-minute"],["type","text","maxlength","2","inputmode","numeric","placeholder",n,"aria-label",i,1,"ngb-tp-input","form-control",3,"value","readOnly","disabled","change","input","keydown.ArrowUp","keydown.ArrowDown"],["class","ngb-tp-spacer",4,"ngIf"],["class","ngb-tp-input-container ngb-tp-second",4,"ngIf"],["class","ngb-tp-meridian",4,"ngIf"],["tabindex","-1","type","button",1,"btn","btn-link",3,"disabled","click"],[1,"chevron","ngb-tp-chevron"],[1,"sr-only"],r,[1,"chevron","ngb-tp-chevron","bottom"],s,o,a,[1,"ngb-tp-input-container","ngb-tp-second"],["type","text","maxlength","2","inputmode","numeric","placeholder",l,"aria-label",c,1,"ngb-tp-input","form-control",3,"value","readOnly","disabled","change","input","keydown.ArrowUp","keydown.ArrowDown"],u,h,[1,"ngb-tp-meridian"],["type","button",1,"btn","btn-outline-primary",3,"disabled","click"],[4,"ngIf","ngIfElse"],["am",""],d,f]},template:function(t,e){1&t&&(ua(0,"fieldset",0),ua(1,"div",1),ua(2,"div",2),ra(3,CC,4,7,"button",3),ua(4,"input",4),ya("change",function(t){return e.updateHour(t.target.value)})("input",function(t){return e.formatInput(t.target)})("keydown.ArrowUp",function(t){return e.changeHour(e.hourStep),t.preventDefault()})("keydown.ArrowDown",function(t){return e.changeHour(-e.hourStep),t.preventDefault()}),ha(),ra(5,SC,4,7,"button",3),ha(),ua(6,"div",5),qa(7,":"),ha(),ua(8,"div",6),ra(9,kC,4,7,"button",3),ua(10,"input",7),ya("change",function(t){return e.updateMinute(t.target.value)})("input",function(t){return e.formatInput(t.target)})("keydown.ArrowUp",function(t){return e.changeMinute(e.minuteStep),t.preventDefault()})("keydown.ArrowDown",function(t){return e.changeMinute(-e.minuteStep),t.preventDefault()}),ha(),ra(11,EC,4,7,"button",3),ha(),ra(12,AC,2,0,"div",8),ra(13,RC,4,9,"div",9),ra(14,FC,1,0,"div",8),ra(15,$C,5,9,"div",10),ha(),ha()),2&t&&(Oa("disabled",e.disabled),la("disabled",e.disabled),gs(3),la("ngIf",e.spinners),gs(1),Oa("form-control-sm",e.isSmallSize)("form-control-lg",e.isLargeSize),la("value",e.formatHour(null==e.model?null:e.model.hour))("readOnly",e.readonlyInputs)("disabled",e.disabled),gs(1),la("ngIf",e.spinners),gs(4),la("ngIf",e.spinners),gs(1),Oa("form-control-sm",e.isSmallSize)("form-control-lg",e.isLargeSize),la("value",e.formatMinSec(null==e.model?null:e.model.minute))("readOnly",e.readonlyInputs)("disabled",e.disabled),gs(1),la("ngIf",e.spinners),gs(1),la("ngIf",e.seconds),gs(1),la("ngIf",e.seconds),gs(1),la("ngIf",e.meridian),gs(1),la("ngIf",e.meridian))},directives:[Ed],styles:['ngb-timepicker{font-size:1rem}.ngb-tp{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.ngb-tp-input-container{width:4em}.ngb-tp-chevron::before{border-style:solid;border-width:.29em .29em 0 0;content:"";display:inline-block;height:.69em;left:.05em;position:relative;top:.15em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);vertical-align:middle;width:.69em}.ngb-tp-chevron.bottom:before{top:-.3em;-webkit-transform:rotate(135deg);transform:rotate(135deg)}.ngb-tp-input{text-align:center}.ngb-tp-hour,.ngb-tp-meridian,.ngb-tp-minute,.ngb-tp-second{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:distribute;justify-content:space-around}.ngb-tp-spacer{width:1em;text-align:center}'],encapsulation:2}),t})(),Yk=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[Fd]]}),t})(),Xk=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[Fd]]}),t})(),Jk=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)}}),t})(),Qk=(()=>{let t=class{constructor(){this.highlightClass="ngb-highlight"}ngOnChanges(t){const e=jC(this.result),n=(Array.isArray(this.term)?this.term:[this.term]).map(t=>jC(t).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")).filter(t=>t);this.parts=n.length?e.split(new RegExp(`(${n.join("|")})`,"gmi")):[e]}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["ngb-highlight"]],inputs:{highlightClass:"highlightClass",result:"result",term:"term"},features:[Ve],decls:1,vars:1,consts:[["ngFor","",3,"ngForOf"],[3,"class",4,"ngIf","ngIfElse"],["even",""]],template:function(t,e){1&t&&ra(0,NC,3,2,"ng-template",0),2&t&&la("ngForOf",e.parts)},directives:[Sd,Ed],styles:[".ngb-highlight{font-weight:700}"],encapsulation:2,changeDetection:0}),t})(),Zk=(()=>{let t=class{constructor(){this.activeIdx=0,this.focusFirst=!0,this.formatter=jC,this.selectEvent=new Zc,this.activeChangeEvent=new Zc}hasActive(){return this.activeIdx>-1&&this.activeIdx=0?this.id+"-"+this.activeIdx:void 0)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["ngb-typeahead-window"]],hostAttrs:["role","listbox",1,"dropdown-menu","show"],hostVars:1,hostBindings:function(t,e){1&t&&ya("mousedown",function(t){return t.preventDefault()}),2&t&&Qa("id",e.id)},inputs:{focusFirst:"focusFirst",formatter:"formatter",id:"id",results:"results",term:"term",resultTemplate:"resultTemplate"},outputs:{selectEvent:"select",activeChangeEvent:"activeChange"},exportAs:["ngbTypeaheadWindow"],decls:3,vars:1,consts:[["rt",""],["ngFor","",3,"ngForOf"],[3,"result","term"],["type","button","role","option",1,"dropdown-item",3,"id","mouseenter","click"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(t,e){1&t&&(ra(0,PC,1,2,"ng-template",null,0,xu),ra(2,VC,2,9,"ng-template",1)),2&t&&(gs(2),la("ngForOf",e.results))},directives:[Sd,Qk,Rd],encapsulation:2}),t})();const tE=new Pt("live announcer delay",{providedIn:"root",factory:function(){return 100}});function eE(t,e=!1){let n=t.body.querySelector("#ngb-live");return null==n&&e&&(n=t.createElement("div"),n.setAttribute("id","ngb-live"),n.setAttribute("aria-live","polite"),n.setAttribute("aria-atomic","true"),n.classList.add("sr-only"),t.body.appendChild(n)),n}let nE=(()=>{let t=class{constructor(t,e){this._document=t,this._delay=e}ngOnDestroy(){const t=eE(this._document);t&&t.parentElement.removeChild(t)}say(t){const e=eE(this._document,!0),n=this._delay;if(null!=e){e.textContent="";const i=()=>e.textContent=t;null===n?i():setTimeout(i,n)}}};return t.\u0275fac=function(e){return new(e||t)(Yt(wh),Yt(tE))},t.\u0275prov=ut({factory:function(){return new t(Yt(wh),Yt(tE))},token:t,providedIn:"root"}),t=cx([ux(0,nt(wh)),ux(1,nt(tE))],t),t})(),iE=(()=>{let t=class{constructor(){this.editable=!0,this.focusFirst=!0,this.showHint=!1,this.placement=["bottom-left","bottom-right","top-left","top-right"]}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:function(){return new t},token:t,providedIn:"root"}),t})();const rE={provide:Vb,useExisting:_t(()=>oE),multi:!0};let sE=0,oE=(()=>{let t=class{constructor(t,e,n,i,r,s,o,a,l,c,u,h){this._elementRef=t,this._renderer=n,this._live=a,this._document=l,this._ngZone=c,this._changeDetector=u,this._subscription=null,this._closed$=new C,this._inputValueBackup=null,this._windowRef=null,this.autocomplete="off",this.placement="bottom-left",this.selectItem=new Zc,this.activeDescendant=null,this.popupId="ngb-typeahead-"+sE++,this._onTouched=()=>{},this._onChange=t=>{},this.container=s.container,this.editable=s.editable,this.focusFirst=s.focusFirst,this.showHint=s.showHint,this.placement=s.placement,this._valueChanges=E_(t.nativeElement,"input").pipe(E(t=>t.target.value)),this._resubscribeTypeahead=new Zg(null),this._popupService=new dk(Zk,i,e,n,r,h),this._zoneSubscription=o.onStable.subscribe(()=>{this.isPopupOpen()&&zS(this._elementRef.nativeElement,this._windowRef.location.nativeElement,this.placement,"body"===this.container)})}ngOnInit(){const t=this._valueChanges.pipe(Um(t=>{this._inputValueBackup=this.showHint?t:null,this._onChange(this.editable?t:void 0)})).pipe(this.ngbTypeahead),e=this._resubscribeTypeahead.pipe(km(()=>t));this._subscription=this._subscribeToUserInput(e)}ngOnDestroy(){this._closePopup(),this._unsubscribeFromUserInput(),this._zoneSubscription.unsubscribe()}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}writeValue(t){this._writeInputValue(this._formatItemForInput(t)),this.showHint&&(this._inputValueBackup=t)}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}dismissPopup(){this.isPopupOpen()&&(this._resubscribeTypeahead.next(null),this._closePopup(),this.showHint&&null!==this._inputValueBackup&&this._writeInputValue(this._inputValueBackup),this._changeDetector.markForCheck())}isPopupOpen(){return null!=this._windowRef}handleBlur(){this._resubscribeTypeahead.next(null),this._onTouched()}handleKeyDown(t){if(this.isPopupOpen())switch(t.which){case FS.ArrowDown:t.preventDefault(),this._windowRef.instance.next(),this._showHint();break;case FS.ArrowUp:t.preventDefault(),this._windowRef.instance.prev(),this._showHint();break;case FS.Enter:case FS.Tab:const e=this._windowRef.instance.getActive();KC(e)&&(t.preventDefault(),t.stopPropagation(),this._selectResult(e)),this._closePopup()}}_openPopup(){this.isPopupOpen()||(this._inputValueBackup=this._elementRef.nativeElement.value,this._windowRef=this._popupService.open(),this._windowRef.instance.id=this.popupId,this._windowRef.instance.selectEvent.subscribe(t=>this._selectResultClosePopup(t)),this._windowRef.instance.activeChangeEvent.subscribe(t=>this.activeDescendant=t),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement),this._changeDetector.markForCheck(),PS(this._ngZone,this._document,"outside",()=>this.dismissPopup(),this._closed$,[this._elementRef.nativeElement,this._windowRef.location.nativeElement]))}_closePopup(){this._closed$.next(),this._popupService.close(),this._windowRef=null,this.activeDescendant=null}_selectResult(t){let e=!1;this.selectItem.emit({item:t,preventDefault:()=>{e=!0}}),this._resubscribeTypeahead.next(null),e||(this.writeValue(t),this._onChange(t))}_selectResultClosePopup(t){this._selectResult(t),this._closePopup()}_showHint(){var t;if(this.showHint&&(null===(t=this._windowRef)||void 0===t?void 0:t.instance.hasActive())&&null!=this._inputValueBackup){const t=this._inputValueBackup.toLowerCase(),e=this._formatItemForInput(this._windowRef.instance.getActive());t===e.substr(0,this._inputValueBackup.length).toLowerCase()?(this._writeInputValue(this._inputValueBackup+e.substr(this._inputValueBackup.length)),this._elementRef.nativeElement.setSelectionRange.apply(this._elementRef.nativeElement,[this._inputValueBackup.length,e.length])):this._writeInputValue(e)}}_formatItemForInput(t){return null!=t&&this.inputFormatter?this.inputFormatter(t):jC(t)}_writeInputValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",jC(t))}_subscribeToUserInput(t){return t.subscribe(t=>{t&&0!==t.length?(this._openPopup(),this._windowRef.instance.focusFirst=this.focusFirst,this._windowRef.instance.results=t,this._windowRef.instance.term=this._elementRef.nativeElement.value,this.resultFormatter&&(this._windowRef.instance.formatter=this.resultFormatter),this.resultTemplate&&(this._windowRef.instance.resultTemplate=this.resultTemplate),this._windowRef.instance.resetActive(),this._windowRef.changeDetectorRef.detectChanges(),this._showHint()):this._closePopup();const e=t?t.length:0;this._live.say(0===e?"No results available":`${e} result${1===e?"":"s"} available`)})}_unsubscribeFromUserInput(){this._subscription&&this._subscription.unsubscribe(),this._subscription=null}};return t.\u0275fac=function(e){return new(e||t)(oa(uc),oa(Ic),oa(pc),oa(Bo),oa(cc),oa(iE),oa(ju),oa(nE),oa(wh),oa(ju),oa(_o),oa(lh))},t.\u0275dir=we({type:t,selectors:[["input","ngbTypeahead",""]],hostAttrs:["autocapitalize","off","autocorrect","off","role","combobox","aria-multiline","false"],hostVars:7,hostBindings:function(t,e){1&t&&ya("blur",function(){return e.handleBlur()})("keydown",function(t){return e.handleKeyDown(t)}),2&t&&(Qa("autocomplete",e.autocomplete),na("aria-autocomplete",e.showHint?"both":"list")("aria-activedescendant",e.activeDescendant)("aria-owns",e.isPopupOpen()?e.popupId:null)("aria-expanded",e.isPopupOpen()),Oa("open",e.isPopupOpen()))},inputs:{autocomplete:"autocomplete",placement:"placement",container:"container",editable:"editable",focusFirst:"focusFirst",showHint:"showHint",inputFormatter:"inputFormatter",ngbTypeahead:"ngbTypeahead",resultFormatter:"resultFormatter",resultTemplate:"resultTemplate"},outputs:{selectItem:"selectItem"},exportAs:["ngbTypeahead"],features:[oc([rE])]}),t=cx([ux(8,nt(wh))],t),t})(),aE=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[Fd]]}),t})();const lE=[XC,ZC,aS,lS,cS,tk,ck,_k,Rk,Fk,Mk,Lk,Nk,Yk,Xk,Jk,aE,Pk];let cE=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[lE,XC,ZC,aS,lS,cS,tk,ck,_k,Rk,Fk,Mk,Lk,Nk,Yk,Xk,Jk,aE,Pk]}),t})();const uE=Ei(gS),hE=Ei(AS),dE=Ei(KS),fE=Ei(qS),pE=Ei(jk);let gE=(()=>{class t{constructor(){this.restrictedPages=new Map([["users",Zx.USER_ROLE_ADMIN],["config",Zx.USER_ROLE_DEVELOPER],["modules",Zx.USER_ROLE_DEVELOPER],["apiexplorer",Zx.USER_ROLE_DEVELOPER]])}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function mE(t,e){if(1&t&&(fa(0,5),ua(1,"a",27),da(2,"img",28),ua(3,"span",12),qa(4),ha(),ha(),pa()),2&t){const t=xa().$implicit;la("ngbNavItem",t.navItem),gs(1),la("routerLink",t.routerLink),gs(1),Ea("src","/static/svg/",t.icon,".svg",yr),gs(2),Ya(t.label)}}function vE(t,e){1&t&&da(0,"hr")}function yE(t,e){if(1&t&&(ra(0,mE,5,4,"ng-container",26),ra(1,vE,1,0,"hr",25)),2&t){const t=e.$implicit;la("ngIf",xa().getSessionRole()<=t.minRole),gs(1),la("ngIf",t.separator)}}function bE(t,e){if(1&t&&(ua(0,"div",29),ua(1,"h2",30),da(2,"img",31),qa(3,"An error has occurred!"),ha(),ua(4,"h6",32),qa(5),ha(),ua(6,"p"),qa(7,"Please refresh the page to try again."),ha(),ha()),2&t){const t=xa();gs(5),Ya(t.error)}}function wE(t,e){1&t&&(ua(0,"div",33),da(1,"img",34),ha())}function xE(t,e){1&t&&da(0,"router-outlet")}const _E=function(){return["/"]},CE=function(){return["/login"]};let SE=(()=>{class t{constructor(t,e,n,i,r){var s;this.route=t,this.router=e,this.segment=n,this.consoleService=i,this.authService=r,this.loading=!0,this.error="",this.routes=[{navItem:"status",routerLink:["/status"],label:"Status",minRole:Zx.USER_ROLE_READONLY,icon:"status"},{navItem:"users",routerLink:["/users"],label:"User Management",minRole:Zx.USER_ROLE_ADMIN,icon:"user-management"},{navItem:"config",routerLink:["/config"],label:"Configuration",minRole:Zx.USER_ROLE_DEVELOPER,icon:"configuration"},{navItem:"modules",routerLink:["/modules"],label:"Runtime Modules",minRole:Zx.USER_ROLE_DEVELOPER,separator:!0,icon:"runtime-modules"},{navItem:"accounts",routerLink:["/accounts"],label:"Accounts",minRole:Zx.USER_ROLE_READONLY,icon:"accounts"},{navItem:"storage",routerLink:["/storage"],label:"Storage",minRole:Zx.USER_ROLE_READONLY,icon:"storage"},{navItem:"leaderboards",routerLink:["/leaderboards"],label:"Leaderboards",minRole:Zx.USER_ROLE_READONLY,icon:"leaderboard"},{navItem:"matches",routerLink:["/matches"],label:"Matches",minRole:Zx.USER_ROLE_READONLY,icon:"running-matches"},{navItem:"apiexplorer",routerLink:["/apiexplorer"],label:"API Explorer",minRole:Zx.USER_ROLE_DEVELOPER,icon:"api-explorer"}],this.loading=!1,this.routerSub=this.router.events.pipe(function(t){let e=arguments.length,n=p_;k(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],e--);let i=null;e>=2&&(i=arguments[1]);let r=Number.POSITIVE_INFINITY;return e>=3&&(r=arguments[2]),function(e){return e.lift(new g_(t,i,r,n))}}(2e3)).subscribe(t=>{if(0===t.length)return;const e=t[t.length-1];e instanceof Gm&&(this.loading=!0),e instanceof Km&&(this.loading=!1),e instanceof qm&&(this.loading=!1),e instanceof Ym&&(this.loading=!1,this.error=e.error)}),this.segmentRouterSub=e.events.pipe((s=(t,e)=>!(e instanceof Km)||t.url===e.url,t=>t.lift(new x_(s,undefined)))).subscribe(t=>{t&&n.page(t.url)})}ngOnInit(){this.route.data.subscribe(t=>{this.error=t.error?t.error:""})}getSessionRole(){return this.authService.sessionRole}getUsername(){return this.authService.username}logout(){this.authService.logout()}ngOnDestroy(){this.segmentRouterSub.unsubscribe(),this.routerSub.unsubscribe()}onSidebarNavChange(t){}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(mb),oa(px),oa(Jx),oa(i_))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:40,vars:11,consts:[[1,"container-fluid"],[1,"row"],["ngbNav","",1,"col-md-2","d-none","d-md-block","sidebar","position-fixed","px-0",3,"navChange"],["sidenav","ngbNav"],[1,"flex-column","text-uppercase"],[3,"ngbNavItem"],[3,"routerLink"],["src","/static/svg/logo.svg","alt","","width","175","height","",1,"logo-full","mx-3","mt-3","mb-1"],["src","/static/svg/logo-icon.svg","alt","","width","32","height","",1,"logo-icon","mx-3","mt-3","mb-1"],["ngFor","",3,"ngForOf"],["href","https://cloud.heroiclabs.com","target","_blank",1,"nav-link"],["src","/static/svg/heroiccloud.svg","alt","","width","24","height","",1,"link-icon","mr-1"],[1,"link-text"],["href","https://heroiclabs.com/docs","target","_blank",1,"nav-link"],["src","/static/svg/docs.svg","alt","","width","24","height","",1,"link-icon","mr-1"],["href","https://forum.heroiclabs.com","target","_blank",1,"nav-link"],["src","/static/svg/forum.svg","alt","","width","24","height","",1,"link-icon","mr-1"],["href","https://heroiclabs.com/blog","target","_blank",1,"nav-link"],["src","/static/svg/blog.svg","alt","","width","24","height","",1,"link-icon","mr-1"],[1,"logged-in-as","nav-link","disabled"],["ngbNavLink","","routerLinkActive","active",3,"routerLink","click"],["src","/static/svg/log-out.svg","alt","","width","24","height","",1,"mr-1"],["role","main",1,"ml-sm-auto","col-md-10","col-lg-10","main-extended","px-4","py-4"],["class","mx-auto",4,"ngIf"],["class","loading mx-auto",4,"ngIf"],[4,"ngIf"],[3,"ngbNavItem",4,"ngIf"],["ngbNavLink","","routerLinkActive","active",3,"routerLink"],["alt","","width","24","height","",1,"link-icon","mr-1",3,"src"],[1,"mx-auto"],[1,"pb-2"],["src","/static/svg/red-triangle.svg",1,"mr-2",2,"width","1em","height","1em"],[1,"mr-2","d-inline","font-weight-bold"],[1,"loading","mx-auto"],["src","/static/spinner.svg",1,"p-1","loading"]],template:function(t,e){1&t&&(ua(0,"div",0),ua(1,"div",1),ua(2,"nav",2,3),ya("navChange",function(t){return e.onSidebarNavChange(t)}),ua(4,"div",4),fa(5,5),ua(6,"a",6),da(7,"img",7),da(8,"img",8),ha(),pa(),da(9,"hr"),ra(10,yE,2,2,"ng-template",9),da(11,"hr"),ua(12,"a",10),da(13,"img",11),ua(14,"span",12),qa(15,"Heroic Cloud"),ha(),ha(),ua(16,"a",13),da(17,"img",14),ua(18,"span",12),qa(19,"Documentation"),ha(),ha(),ua(20,"a",15),da(21,"img",16),ua(22,"span",12),qa(23,"Forum"),ha(),ha(),ua(24,"a",17),da(25,"img",18),ua(26,"span",12),qa(27,"Heroic Labs Blog"),ha(),ha(),da(28,"hr"),ua(29,"div",19),qa(30),ha(),fa(31,5),ua(32,"a",20),ya("click",function(){return e.logout()}),da(33,"img",21),ua(34,"span",12),qa(35,"Logout"),ha(),ha(),pa(),ha(),ha(),ua(36,"main",22),ra(37,bE,8,1,"div",23),ra(38,wE,2,0,"div",24),ra(39,xE,1,0,"router-outlet",25),ha(),ha(),ha()),2&t&&(gs(5),la("ngbNavItem","logo"),gs(1),la("routerLink",Kc(9,_E)),gs(4),la("ngForOf",e.routes),gs(20),Xa("Logged in as: ",e.getUsername(),""),gs(1),la("ngbNavItem","logout"),gs(1),la("routerLink",Kc(10,CE)),gs(5),la("ngIf",e.error),gs(1),la("ngIf",!e.error&&e.loading),gs(1),la("ngIf",!e.error&&!e.loading))},directives:[Dk,Ak,yb,Sd,Tk,wb,Ed,xb],styles:[".nav-link.no-active[_ngcontent-%COMP%]{background-color:initial!important}.nav-item[_ngcontent-%COMP%] hr[_ngcontent-%COMP%]{border-top-color:#708090}.sidebar[_ngcontent-%COMP%]{background-color:#333564;position:fixed;top:0;bottom:0;left:0;z-index:100;font-family:Montserrat,sans-serif;overflow-y:auto}.sidebar[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{color:#fff;font-size:12px;letter-spacing:.1em;opacity:.6;font-weight:500!important}.sidebar[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]:hover{opacity:1;background-color:hsla(0,0%,88.2%,.1)}.sidebar[_ngcontent-%COMP%] hr[_ngcontent-%COMP%]{border-color:#fff;opacity:.2}.active[_ngcontent-%COMP%]{opacity:1}.nav-link.active[_ngcontent-%COMP%]{opacity:1;color:#a69bff}.navbar-collapse[_ngcontent-%COMP%]{letter-spacing:0;text-transform:capitalize}.logo-icon[_ngcontent-%COMP%]{display:none}.link-text[_ngcontent-%COMP%]{padding-left:4px}@media screen and (max-width:1200px){.main-extended[_ngcontent-%COMP%]{width:94.333333%!important;max-width:94.333333%!important;flex:0 0 94.333333%!important}.sidebar[_ngcontent-%COMP%]{min-width:65px!important;width:5.66%!important;max-width:5.66%!important}.sidebar[_ngcontent-%COMP%] .logo-full[_ngcontent-%COMP%]{display:none}.sidebar[_ngcontent-%COMP%] .logo-icon[_ngcontent-%COMP%]{display:block}.sidebar[_ngcontent-%COMP%] .link-icon[_ngcontent-%COMP%]{width:30px}.sidebar[_ngcontent-%COMP%] .link-text[_ngcontent-%COMP%], .sidebar[_ngcontent-%COMP%] .logged-in-as[_ngcontent-%COMP%]{display:none}}"]}),t})(),kE=(()=>{class t{constructor(t,e,n){this.authService=t,this.router=e,this.globals=n}canActivate(t,e){return!0}canActivateChild(t,e){const n=this.globals.restrictedPages.get(t.url[0].path);return!(null!==n&&n{const e=t.element,n=this._document.createComment("dom-portal");e.parentNode.insertBefore(n,e),this.outletElement.appendChild(e),super.setDisposeFn(()=>{n.parentNode&&n.parentNode.replaceChild(e,n)})},this._document=r}attachComponentPortal(t){const e=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component);let n;return t.viewContainerRef?(n=t.viewContainerRef.createComponent(e,t.viewContainerRef.length,t.injector||t.viewContainerRef.injector),this.setDisposeFn(()=>n.destroy())):(n=e.create(t.injector||this._defaultInjector),this._appRef.attachView(n.hostView),this.setDisposeFn(()=>{this._appRef.detachView(n.hostView),n.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(n)),n}attachTemplatePortal(t){let e=t.viewContainerRef,n=e.createEmbeddedView(t.templateRef,t.context);return n.rootNodes.forEach(t=>this.outletElement.appendChild(t)),n.detectChanges(),this.setDisposeFn(()=>{let t=e.indexOf(n);-1!==t&&e.remove(t)}),n}dispose(){super.dispose(),null!=this.outletElement.parentNode&&this.outletElement.parentNode.removeChild(this.outletElement)}_getComponentRootNode(t){return t.hostView.rootNodes[0]}}{}class FE{constructor(t,e){this.dueTime=t,this.scheduler=e}call(t,e){return e.subscribe(new ME(t,this.dueTime,this.scheduler))}}class ME extends p{constructor(t,e,n){super(t),this.dueTime=e,this.scheduler=n,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(LE,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:t}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}}clearDebounce(){const t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)}}function LE(t){t.debouncedNext()}function $E(){}var OE=function(t){return null==t?$E:function(){return this.querySelector(t)}};function IE(){return[]}var NE=function(t){return null==t?IE:function(){return this.querySelectorAll(t)}},PE=function(t){return function(){return this.matches(t)}},BE=function(t){return new Array(t.length)};function UE(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function VE(t,e,n,i,r,s){for(var o,a=0,l=e.length,c=s.length;ae?1:t>=e?0:NaN}UE.prototype={constructor:UE,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var zE="http://www.w3.org/1999/xhtml",WE={svg:"http://www.w3.org/2000/svg",xhtml:zE,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},GE=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),WE.hasOwnProperty(e)?{space:WE[e],local:t}:t};function KE(t){return function(){this.removeAttribute(t)}}function qE(t){return function(){this.removeAttributeNS(t.space,t.local)}}function YE(t,e){return function(){this.setAttribute(t,e)}}function XE(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function JE(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function QE(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}var ZE=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function tA(t){return function(){this.style.removeProperty(t)}}function eA(t,e,n){return function(){this.style.setProperty(t,e,n)}}function nA(t,e,n){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function iA(t,e){return t.style.getPropertyValue(e)||ZE(t).getComputedStyle(t,null).getPropertyValue(e)}function rA(t){return function(){delete this[t]}}function sA(t,e){return function(){this[t]=e}}function oA(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function aA(t){return t.trim().split(/^|\s+/)}function lA(t){return t.classList||new cA(t)}function cA(t){this._node=t,this._names=aA(t.getAttribute("class")||"")}function uA(t,e){for(var n=lA(t),i=-1,r=e.length;++i=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var kA=function(t){var e=GE(t);return(e.local?SA:CA)(e)};function EA(){return null}function AA(){var t=this.parentNode;t&&t.removeChild(this)}function DA(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function TA(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}var RA={},FA=null;function MA(t,e,n){return t=LA(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function LA(t,e,n){return function(i){var r=FA;FA=i;try{t.call(this,this.__data__,e,n)}finally{FA=r}}}function $A(t){return t.trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}})}function OA(t){return function(){var e=this.__on;if(e){for(var n,i=0,r=-1,s=e.length;i=x&&(x=w+1);!(b=v[x])&&++x=0;)(i=r[s])&&(o&&4^i.compareDocumentPosition(o)&&o.parentNode.insertBefore(i,o),o=i);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=jE);for(var n=this._groups,i=n.length,r=new Array(i),s=0;s1?this.each((null==e?tA:"function"==typeof e?nA:eA)(t,e,null==n?"":n)):iA(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?rA:"function"==typeof e?oA:sA)(t,e)):this.node()[t]},classed:function(t,e){var n=aA(t+"");if(arguments.length<2){for(var i=lA(this.node()),r=-1,s=n.length;++r=0&&(n=t.slice(i+1),t=t.slice(0,i)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})}function YA(t,e){for(var n,i=0,r=t.length;i0)for(var n,i,r=new Array(n),s=0;s>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?xD(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?xD(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=uD.exec(t))?new SD(e[1],e[2],e[3],1):(e=hD.exec(t))?new SD(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=dD.exec(t))?xD(e[1],e[2],e[3],e[4]):(e=fD.exec(t))?xD(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=pD.exec(t))?DD(e[1],e[2]/100,e[3]/100,1):(e=gD.exec(t))?DD(e[1],e[2]/100,e[3]/100,e[4]):mD.hasOwnProperty(t)?wD(mD[t]):"transparent"===t?new SD(NaN,NaN,NaN,0):null}function wD(t){return new SD(t>>16&255,t>>8&255,255&t,1)}function xD(t,e,n,i){return i<=0&&(t=e=n=NaN),new SD(t,e,n,i)}function _D(t){return t instanceof iD||(t=bD(t)),t?new SD((t=t.rgb()).r,t.g,t.b,t.opacity):new SD}function CD(t,e,n,i){return 1===arguments.length?_D(t):new SD(t,e,n,null==i?1:i)}function SD(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function kD(){return"#"+AD(this.r)+AD(this.g)+AD(this.b)}function ED(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function AD(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function DD(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new RD(t,e,n,i)}function TD(t){if(t instanceof RD)return new RD(t.h,t.s,t.l,t.opacity);if(t instanceof iD||(t=bD(t)),!t)return new RD;if(t instanceof RD)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),s=Math.max(e,n,i),o=NaN,a=s-r,l=(s+r)/2;return a?(o=e===s?(n-i)/a+6*(n0&&l<1?0:o,new RD(o,a,l,t.opacity)}function RD(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function FD(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function MD(t,e,n,i,r){var s=t*t,o=s*t;return((1-3*t+3*s-o)*e+(4-6*s+3*o)*n+(1+3*t+3*s-3*o)*i+o*r)/6}eD(iD,bD,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:vD,formatHex:vD,formatHsl:function(){return TD(this).formatHsl()},formatRgb:yD,toString:yD}),eD(SD,CD,nD(iD,{brighter:function(t){return t=null==t?sD:Math.pow(sD,t),new SD(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?rD:Math.pow(rD,t),new SD(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:kD,formatHex:kD,formatRgb:ED,toString:ED})),eD(RD,function(t,e,n,i){return 1===arguments.length?TD(t):new RD(t,e,n,null==i?1:i)},nD(iD,{brighter:function(t){return t=null==t?sD:Math.pow(sD,t),new RD(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?rD:Math.pow(rD,t),new RD(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new SD(FD(t>=240?t-240:t+120,r,i),FD(t,r,i),FD(t<120?t+240:t-120,r,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var LD=function(t){return function(){return t}};function $D(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):LD(isNaN(t)?e:t)}var OD=function t(e){var n=function(t){return 1==(t=+t)?$D:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}(e,n,t):LD(isNaN(e)?n:e)}}(e);function i(t,e){var i=n((t=CD(t)).r,(e=CD(e)).r),r=n(t.g,e.g),s=n(t.b,e.b),o=$D(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=r(e),t.b=s(e),t.opacity=o(e),t+""}}return i.gamma=t,i}(1);function ID(t){return function(e){var n,i,r=e.length,s=new Array(r),o=new Array(r),a=new Array(r);for(n=0;n=1?(n=1,e-1):Math.floor(n*e),r=t[i],s=t[i+1];return MD((n-i/e)*e,i>0?t[i-1]:2*r-s,r,s,is&&(r=e.slice(s,r),a[o]?a[o]+=r:a[++o]=r),(n=n[0])===(i=i[0])?a[o]?a[o]+=i:a[++o]=i:(a[++o]=null,l.push({i:o,x:HD(n,i)})),s=WD.lastIndex;return s=0&&e._call.call(null,t),e=e._next;--JD}()}finally{JD=0,function(){for(var t,e,n=BD,i=1/0;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:BD=e);UD=t,hT(i)}(),eT=0}}function uT(){var t=iT.now(),e=t-tT;e>1e3&&(nT-=e,tT=t)}function hT(t){JD||(QD&&(QD=clearTimeout(QD)),t-eT>24?(t<1/0&&(QD=setTimeout(cT,t-iT.now()-nT)),ZD&&(ZD=clearInterval(ZD))):(ZD||(tT=iT.now(),ZD=setInterval(uT,1e3)),JD=1,rT(cT)))}aT.prototype=lT.prototype={constructor:aT,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?sT():+n)+(null==e?0:+e),this._next||UD===this||(UD?UD._next=this:BD=this,UD=this),this._call=t,this._time=n,hT()},stop:function(){this._call&&(this._call=null,this._time=1/0,hT())}};var dT=function(t,e,n){var i=new aT;return i.restart(function(n){i.stop(),t(n+e)},e=null==e?0:+e,n),i},fT=JA("start","end","cancel","interrupt"),pT=[],gT=function(t,e,n,i,r,s){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var i,r=t.__transition;function s(l){var c,u,h,d;if(1!==n.state)return a();for(c in r)if((d=r[c]).name===n.name){if(3===d.state)return dT(s);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete r[c]):+c0)throw new Error("too late; already scheduled");return n}function vT(t,e){var n=yT(t,e);if(n.state>3)throw new Error("too late; already running");return n}function yT(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}var bT,wT,xT,_T,CT=function(t,e){var n,i,r,s=t.__transition,o=!0;if(s){for(r in e=null==e?null:e+"",s)(n=s[r]).name===e?(i=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(i?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete s[r]):o=!1;o&&delete t.__transition}},ST=180/Math.PI,kT={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},ET=function(t,e,n,i,r,s){var o,a,l;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(l=t*n+e*i)&&(n-=t*l,i-=e*l),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,l/=a),t*i180?e+=360:e-t>180&&(t+=360),s.push({i:n.push(r(n)+"rotate(",null,i)-2,x:HD(t,e)})):e&&n.push(r(n)+"rotate("+e+i)}(s.rotate,o.rotate,a,l),function(t,e,n,s){t!==e?s.push({i:n.push(r(n)+"skewX(",null,i)-2,x:HD(t,e)}):e&&n.push(r(n)+"skewX("+e+i)}(s.skewX,o.skewX,a,l),function(t,e,n,i,s,o){if(t!==n||e!==i){var a=s.push(r(s)+"scale(",null,",",null,")");o.push({i:a-4,x:HD(t,n)},{i:a-2,x:HD(e,i)})}else 1===n&&1===i||s.push(r(s)+"scale("+n+","+i+")")}(s.scaleX,s.scaleY,o.scaleX,o.scaleY,a,l),s=o=null,function(t){for(var e,n=-1,i=l.length;++n=0&&(t=t.slice(0,e)),!t||"start"===t})}(e)?mT:vT;return function(){var o=s(this,t),a=o.on;a!==i&&(r=(i=a).copy()).on(e,n),o.on=r}}var XT=jA.prototype.constructor;function JT(t){return function(){this.style.removeProperty(t)}}function QT(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}function ZT(t,e,n){var i,r;function s(){var s=e.apply(this,arguments);return s!==r&&(i=(r=s)&&QT(t,s,n)),i}return s._value=e,s}function tR(t){return function(e){this.textContent=t.call(this,e)}}function eR(t){var e,n;function i(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&tR(i)),e}return i._value=t,i}var nR=0;function iR(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}function rR(){return++nR}var sR=jA.prototype;iR.prototype=(function(t){return jA().transition(t)}).prototype={constructor:iR,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=OE(t));for(var i=this._groups,r=i.length,s=new Array(r),o=0;oe?1:t>=e?0:NaN},LR=function(t){let e=t,n=t;function i(t,e,i,r){for(null==i&&(i=0),null==r&&(r=t.length);i>>1;n(t[s],e)<0?i=s+1:r=s}return i}return 1===t.length&&(e=(e,n)=>t(e)-n,n=function(t){return(e,n)=>MR(t(e),n)}(t)),{left:i,center:function(t,n,r,s){null==r&&(r=0),null==s&&(s=t.length);const o=i(t,n,r,s-1);return o>r&&e(t[o-1],n)>-e(t[o],n)?o-1:o},right:function(t,e,i,r){for(null==i&&(i=0),null==r&&(r=t.length);i>>1;n(t[s],e)>0?r=s:i=s+1}return i}}},$R=Math.sqrt(50),OR=Math.sqrt(10),IR=Math.sqrt(2);function NR(t,e,n){var i=(e-t)/Math.max(0,n),r=Math.floor(Math.log(i)/Math.LN10),s=i/Math.pow(10,r);return r>=0?(s>=$R?10:s>=OR?5:s>=IR?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(s>=$R?10:s>=OR?5:s>=IR?2:1)}function PR(t,e,n){var i=Math.abs(e-t)/Math.max(0,n),r=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),s=i/r;return s>=$R?r*=10:s>=OR?r*=5:s>=IR&&(r*=2),e0))return a;do{a.push(o=new Date(+n)),e(n,s),t(n)}while(o=e)for(;t(e),!n(e);)e.setTime(e-1)},function(t,i){if(t>=t)if(i<0)for(;++i<=0;)for(;e(t,-1),!n(t););else for(;--i>=0;)for(;e(t,1),!n(t););})},n&&(r.count=function(e,i){return BR.setTime(+e),UR.setTime(+i),t(BR),t(UR),Math.floor(n(BR,UR))},r.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?r.filter(i?function(e){return i(e)%t==0}:function(e){return r.count(0,e)%t==0}):r:null}),r}var HR=VR(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t,e){return e.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});HR.every=function(t){return isFinite(t=Math.floor(t))&&t>0?VR(function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,n){e.setFullYear(e.getFullYear()+n*t)}):null};var jR=HR,zR=VR(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,e){t.setMonth(t.getMonth()+e)},function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())},function(t){return t.getMonth()}),WR=1e3,GR=6e4,KR=36e5,qR=864e5,YR=6048e5;function XR(t){return VR(function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},function(t,e){t.setDate(t.getDate()+7*e)},function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*GR)/YR})}var JR=XR(0),QR=XR(1),ZR=(XR(2),XR(3),XR(4)),tF=(XR(5),XR(6),VR(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*GR)/qR,t=>t.getDate()-1)),eF=VR(function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*WR-t.getMinutes()*GR)},function(t,e){t.setTime(+t+e*KR)},function(t,e){return(e-t)/KR},function(t){return t.getHours()}),nF=VR(function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*WR)},function(t,e){t.setTime(+t+e*GR)},function(t,e){return(e-t)/GR},function(t){return t.getMinutes()}),iF=VR(function(t){t.setTime(t-t.getMilliseconds())},function(t,e){t.setTime(+t+e*WR)},function(t,e){return(e-t)/WR},function(t){return t.getUTCSeconds()}),rF=VR(function(){},function(t,e){t.setTime(+t+e)},function(t,e){return e-t});rF.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?VR(function(e){e.setTime(Math.floor(e/t)*t)},function(e,n){e.setTime(+e+n*t)},function(e,n){return(n-e)/t}):rF:null};var sF=rF;function oF(t){return VR(function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+7*e)},function(t,e){return(e-t)/YR})}var aF=oF(0),lF=oF(1),cF=(oF(2),oF(3),oF(4)),uF=(oF(5),oF(6),VR(function(t){t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+e)},function(t,e){return(e-t)/qR},function(t){return t.getUTCDate()-1})),hF=VR(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)},function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});hF.every=function(t){return isFinite(t=Math.floor(t))&&t>0?VR(function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)}):null};var dF=hF;function fF(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function pF(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function gF(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}var mF,vF,yF={"-":"",_:" ",0:"0"},bF=/^\s*\d+/,wF=/^%/,xF=/[\\^$*+?|[\]().{}]/g;function _F(t,e,n){var i=t<0?"-":"",r=(i?-t:t)+"",s=r.length;return i+(s[t.toLowerCase(),e]))}function EF(t,e,n){var i=bF.exec(e.slice(n,n+1));return i?(t.w=+i[0],n+i[0].length):-1}function AF(t,e,n){var i=bF.exec(e.slice(n,n+1));return i?(t.u=+i[0],n+i[0].length):-1}function DF(t,e,n){var i=bF.exec(e.slice(n,n+2));return i?(t.U=+i[0],n+i[0].length):-1}function TF(t,e,n){var i=bF.exec(e.slice(n,n+2));return i?(t.V=+i[0],n+i[0].length):-1}function RF(t,e,n){var i=bF.exec(e.slice(n,n+2));return i?(t.W=+i[0],n+i[0].length):-1}function FF(t,e,n){var i=bF.exec(e.slice(n,n+4));return i?(t.y=+i[0],n+i[0].length):-1}function MF(t,e,n){var i=bF.exec(e.slice(n,n+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function LF(t,e,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function $F(t,e,n){var i=bF.exec(e.slice(n,n+1));return i?(t.q=3*i[0]-3,n+i[0].length):-1}function OF(t,e,n){var i=bF.exec(e.slice(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function IF(t,e,n){var i=bF.exec(e.slice(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function NF(t,e,n){var i=bF.exec(e.slice(n,n+3));return i?(t.m=0,t.d=+i[0],n+i[0].length):-1}function PF(t,e,n){var i=bF.exec(e.slice(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function BF(t,e,n){var i=bF.exec(e.slice(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function UF(t,e,n){var i=bF.exec(e.slice(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function VF(t,e,n){var i=bF.exec(e.slice(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function HF(t,e,n){var i=bF.exec(e.slice(n,n+6));return i?(t.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function jF(t,e,n){var i=wF.exec(e.slice(n,n+1));return i?n+i[0].length:-1}function zF(t,e,n){var i=bF.exec(e.slice(n));return i?(t.Q=+i[0],n+i[0].length):-1}function WF(t,e,n){var i=bF.exec(e.slice(n));return i?(t.s=+i[0],n+i[0].length):-1}function GF(t,e){return _F(t.getDate(),e,2)}function KF(t,e){return _F(t.getHours(),e,2)}function qF(t,e){return _F(t.getHours()%12||12,e,2)}function YF(t,e){return _F(1+tF.count(jR(t),t),e,3)}function XF(t,e){return _F(t.getMilliseconds(),e,3)}function JF(t,e){return XF(t,e)+"000"}function QF(t,e){return _F(t.getMonth()+1,e,2)}function ZF(t,e){return _F(t.getMinutes(),e,2)}function tM(t,e){return _F(t.getSeconds(),e,2)}function eM(t){var e=t.getDay();return 0===e?7:e}function nM(t,e){return _F(JR.count(jR(t)-1,t),e,2)}function iM(t){var e=t.getDay();return e>=4||0===e?ZR(t):ZR.ceil(t)}function rM(t,e){return t=iM(t),_F(ZR.count(jR(t),t)+(4===jR(t).getDay()),e,2)}function sM(t){return t.getDay()}function oM(t,e){return _F(QR.count(jR(t)-1,t),e,2)}function aM(t,e){return _F(t.getFullYear()%100,e,2)}function lM(t,e){return _F((t=iM(t)).getFullYear()%100,e,2)}function cM(t,e){return _F(t.getFullYear()%1e4,e,4)}function uM(t,e){var n=t.getDay();return _F((t=n>=4||0===n?ZR(t):ZR.ceil(t)).getFullYear()%1e4,e,4)}function hM(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+_F(e/60|0,"0",2)+_F(e%60,"0",2)}function dM(t,e){return _F(t.getUTCDate(),e,2)}function fM(t,e){return _F(t.getUTCHours(),e,2)}function pM(t,e){return _F(t.getUTCHours()%12||12,e,2)}function gM(t,e){return _F(1+uF.count(dF(t),t),e,3)}function mM(t,e){return _F(t.getUTCMilliseconds(),e,3)}function vM(t,e){return mM(t,e)+"000"}function yM(t,e){return _F(t.getUTCMonth()+1,e,2)}function bM(t,e){return _F(t.getUTCMinutes(),e,2)}function wM(t,e){return _F(t.getUTCSeconds(),e,2)}function xM(t){var e=t.getUTCDay();return 0===e?7:e}function _M(t,e){return _F(aF.count(dF(t)-1,t),e,2)}function CM(t){var e=t.getUTCDay();return e>=4||0===e?cF(t):cF.ceil(t)}function SM(t,e){return t=CM(t),_F(cF.count(dF(t),t)+(4===dF(t).getUTCDay()),e,2)}function kM(t){return t.getUTCDay()}function EM(t,e){return _F(lF.count(dF(t)-1,t),e,2)}function AM(t,e){return _F(t.getUTCFullYear()%100,e,2)}function DM(t,e){return _F((t=CM(t)).getUTCFullYear()%100,e,2)}function TM(t,e){return _F(t.getUTCFullYear()%1e4,e,4)}function RM(t,e){var n=t.getUTCDay();return _F((t=n>=4||0===n?cF(t):cF.ceil(t)).getUTCFullYear()%1e4,e,4)}function FM(){return"+0000"}function MM(){return"%"}function LM(t){return+t}function $M(t){return Math.floor(+t/1e3)}mF=function(t){var e=t.dateTime,n=t.date,i=t.time,r=t.periods,s=t.days,o=t.shortDays,a=t.months,l=t.shortMonths,c=SF(r),u=kF(r),h=SF(s),d=kF(s),f=SF(o),p=kF(o),g=SF(a),m=kF(a),v=SF(l),y=kF(l),b={a:function(t){return o[t.getDay()]},A:function(t){return s[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:GF,e:GF,f:JF,g:lM,G:uM,H:KF,I:qF,j:YF,L:XF,m:QF,M:ZF,p:function(t){return r[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:LM,s:$M,S:tM,u:eM,U:nM,V:rM,w:sM,W:oM,x:null,X:null,y:aM,Y:cM,Z:hM,"%":MM},w={a:function(t){return o[t.getUTCDay()]},A:function(t){return s[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:dM,e:dM,f:vM,g:DM,G:RM,H:fM,I:pM,j:gM,L:mM,m:yM,M:bM,p:function(t){return r[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:LM,s:$M,S:wM,u:xM,U:_M,V:SM,w:kM,W:EM,x:null,X:null,y:AM,Y:TM,Z:FM,"%":MM},x={a:function(t,e,n){var i=f.exec(e.slice(n));return i?(t.w=p.get(i[0].toLowerCase()),n+i[0].length):-1},A:function(t,e,n){var i=h.exec(e.slice(n));return i?(t.w=d.get(i[0].toLowerCase()),n+i[0].length):-1},b:function(t,e,n){var i=v.exec(e.slice(n));return i?(t.m=y.get(i[0].toLowerCase()),n+i[0].length):-1},B:function(t,e,n){var i=g.exec(e.slice(n));return i?(t.m=m.get(i[0].toLowerCase()),n+i[0].length):-1},c:function(t,n,i){return S(t,e,n,i)},d:IF,e:IF,f:HF,g:MF,G:FF,H:PF,I:PF,j:NF,L:VF,m:OF,M:BF,p:function(t,e,n){var i=c.exec(e.slice(n));return i?(t.p=u.get(i[0].toLowerCase()),n+i[0].length):-1},q:$F,Q:zF,s:WF,S:UF,u:AF,U:DF,V:TF,w:EF,W:RF,x:function(t,e,i){return S(t,n,e,i)},X:function(t,e,n){return S(t,i,e,n)},y:MF,Y:FF,Z:LF,"%":jF};function _(t,e){return function(n){var i,r,s,o=[],a=-1,l=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++a53)return null;"w"in s||(s.w=1),"Z"in s?(r=(i=pF(gF(s.y,0,1))).getUTCDay(),i=r>4||0===r?lF.ceil(i):lF(i),i=uF.offset(i,7*(s.V-1)),s.y=i.getUTCFullYear(),s.m=i.getUTCMonth(),s.d=i.getUTCDate()+(s.w+6)%7):(r=(i=fF(gF(s.y,0,1))).getDay(),i=r>4||0===r?QR.ceil(i):QR(i),i=tF.offset(i,7*(s.V-1)),s.y=i.getFullYear(),s.m=i.getMonth(),s.d=i.getDate()+(s.w+6)%7)}else("W"in s||"U"in s)&&("w"in s||(s.w="u"in s?s.u%7:"W"in s?1:0),r="Z"in s?pF(gF(s.y,0,1)).getUTCDay():fF(gF(s.y,0,1)).getDay(),s.m=0,s.d="W"in s?(s.w+6)%7+7*s.W-(r+5)%7:s.w+7*s.U-(r+6)%7);return"Z"in s?(s.H+=s.Z/100|0,s.M+=s.Z%100,pF(s)):fF(s)}}function S(t,e,n,i){for(var r,s,o=0,a=e.length,l=n.length;o=l)return-1;if(37===(r=e.charCodeAt(o++))){if(r=e.charAt(o++),!(s=x[r in yF?e.charAt(o++):r])||(i=s(t,n,i))<0)return-1}else if(r!=n.charCodeAt(i++))return-1}return i}return b.x=_(n,b),b.X=_(i,b),b.c=_(e,b),w.x=_(n,w),w.X=_(i,w),w.c=_(e,w),{format:function(t){var e=_(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=C(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=_(t+="",w);return e.toString=function(){return t},e},utcParse:function(t){var e=C(t+="",!0);return e.toString=function(){return t},e}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),vF=mF.format;var OM=function(t){return null===t?NaN:+t};const IM=LR(MR).right;LR(OM);var NM=IM,PM=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function BM(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function UM(){}var VM=.7,HM=1/VM,jM="\\s*([+-]?\\d+)\\s*",zM="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",WM="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",GM=/^#([0-9a-f]{3,8})$/,KM=new RegExp("^rgb\\("+[jM,jM,jM]+"\\)$"),qM=new RegExp("^rgb\\("+[WM,WM,WM]+"\\)$"),YM=new RegExp("^rgba\\("+[jM,jM,jM,zM]+"\\)$"),XM=new RegExp("^rgba\\("+[WM,WM,WM,zM]+"\\)$"),JM=new RegExp("^hsl\\("+[zM,WM,WM]+"\\)$"),QM=new RegExp("^hsla\\("+[zM,WM,WM,zM]+"\\)$"),ZM={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function tL(){return this.rgb().formatHex()}function eL(){return this.rgb().formatRgb()}function nL(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=GM.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?iL(e):3===n?new aL(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?rL(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?rL(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=KM.exec(t))?new aL(e[1],e[2],e[3],1):(e=qM.exec(t))?new aL(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=YM.exec(t))?rL(e[1],e[2],e[3],e[4]):(e=XM.exec(t))?rL(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=JM.exec(t))?hL(e[1],e[2]/100,e[3]/100,1):(e=QM.exec(t))?hL(e[1],e[2]/100,e[3]/100,e[4]):ZM.hasOwnProperty(t)?iL(ZM[t]):"transparent"===t?new aL(NaN,NaN,NaN,0):null}function iL(t){return new aL(t>>16&255,t>>8&255,255&t,1)}function rL(t,e,n,i){return i<=0&&(t=e=n=NaN),new aL(t,e,n,i)}function sL(t){return t instanceof UM||(t=nL(t)),t?new aL((t=t.rgb()).r,t.g,t.b,t.opacity):new aL}function oL(t,e,n,i){return 1===arguments.length?sL(t):new aL(t,e,n,null==i?1:i)}function aL(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function lL(){return"#"+uL(this.r)+uL(this.g)+uL(this.b)}function cL(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function uL(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function hL(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new fL(t,e,n,i)}function dL(t){if(t instanceof fL)return new fL(t.h,t.s,t.l,t.opacity);if(t instanceof UM||(t=nL(t)),!t)return new fL;if(t instanceof fL)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),s=Math.max(e,n,i),o=NaN,a=s-r,l=(s+r)/2;return a?(o=e===s?(n-i)/a+6*(n0&&l<1?0:o,new fL(o,a,l,t.opacity)}function fL(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function pL(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function gL(t,e,n,i,r){var s=t*t,o=s*t;return((1-3*t+3*s-o)*e+(4-6*s+3*o)*n+(1+3*t+3*s-3*o)*i+o*r)/6}PM(UM,nL,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:tL,formatHex:tL,formatHsl:function(){return dL(this).formatHsl()},formatRgb:eL,toString:eL}),PM(aL,oL,BM(UM,{brighter:function(t){return t=null==t?HM:Math.pow(HM,t),new aL(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?VM:Math.pow(VM,t),new aL(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:lL,formatHex:lL,formatRgb:cL,toString:cL})),PM(fL,function(t,e,n,i){return 1===arguments.length?dL(t):new fL(t,e,n,null==i?1:i)},BM(UM,{brighter:function(t){return t=null==t?HM:Math.pow(HM,t),new fL(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?VM:Math.pow(VM,t),new fL(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new aL(pL(t>=240?t-240:t+120,r,i),pL(t,r,i),pL(t<120?t+240:t-120,r,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var mL=t=>()=>t;function vL(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):mL(isNaN(t)?e:t)}var yL=function t(e){var n=function(t){return 1==(t=+t)?vL:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}(e,n,t):mL(isNaN(e)?n:e)}}(e);function i(t,e){var i=n((t=oL(t)).r,(e=oL(e)).r),r=n(t.g,e.g),s=n(t.b,e.b),o=vL(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=r(e),t.b=s(e),t.opacity=o(e),t+""}}return i.gamma=t,i}(1);function bL(t){return function(e){var n,i,r=e.length,s=new Array(r),o=new Array(r),a=new Array(r);for(n=0;n=1?(n=1,e-1):Math.floor(n*e),r=t[i],s=t[i+1];return gL((n-i/e)*e,i>0?t[i-1]:2*r-s,r,s,is&&(r=e.slice(s,r),a[o]?a[o]+=r:a[++o]=r),(n=n[0])===(i=i[0])?a[o]?a[o]+=i:a[++o]=i:(a[++o]=null,l.push({i:o,x:CL(n,i)})),s=EL.lastIndex;return s(e=o[l-1])&&(n=t,t=e,e=n),c=function(n){return Math.max(t,Math.min(e,n))}),i=l>2?OL:$L,r=s=null,h}function h(e){return isNaN(e=+e)?n:(r||(r=i(o.map(t),a,l)))(t(c(e)))}return h.invert=function(n){return c(e((s||(s=i(a,o.map(t),CL)))(n)))},h.domain=function(t){return arguments.length?(o=Array.from(t,RL),u()):o.slice()},h.range=function(t){return arguments.length?(a=Array.from(t),u()):a.slice()},h.rangeRound=function(t){return a=Array.from(t),l=TL,u()},h.clamp=function(t){return arguments.length?(c=!!t||ML,u()):c!==ML},h.interpolate=function(t){return arguments.length?(l=t,u()):l},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,i){return t=n,e=i,u()}}()(ML,ML)}function PL(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var BL=31536e6;function UL(t){return new Date(t)}function VL(t){return t instanceof Date?+t:+new Date(+t)}function HL(t,e,n,i,r,s,o,a,l){var c=NL(),u=c.invert,h=c.domain,d=l(".%L"),f=l(":%S"),p=l("%I:%M"),g=l("%I %p"),m=l("%a %d"),v=l("%b %d"),y=l("%B"),b=l("%Y"),w=[[o,1,1e3],[o,5,5e3],[o,15,15e3],[o,30,3e4],[s,1,6e4],[s,5,3e5],[s,15,9e5],[s,30,18e5],[r,1,36e5],[r,3,108e5],[r,6,216e5],[r,12,432e5],[i,1,864e5],[i,2,1728e5],[n,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,BL]];function x(a){return(o(a)=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function WL(t){if(!(e=zL.exec(t)))throw new Error("invalid format: "+t);var e;return new GL({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function GL(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function KL(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,i=t.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}WL.prototype=GL.prototype,GL.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var qL,YL,XL,JL,QL=function(t){return(t=KL(Math.abs(t)))?t[1]:NaN},ZL=function(t,e){var n=KL(t,e);if(!n)return t+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")},t$={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>ZL(100*t,e),r:ZL,s:function(t,e){var n=KL(t,e);if(!n)return t+"";var i=n[0],r=n[1],s=r-(qL=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,o=i.length;return s===o?i:s>o?i+new Array(s-o+1).join("0"):s>0?i.slice(0,s)+"."+i.slice(s):"0."+new Array(1-s).join("0")+KL(t,Math.max(0,e+s-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)},e$=function(t){return t},n$=Array.prototype.map,i$=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function r$(t){var e=t.domain;return t.ticks=function(t){var n=e();return function(t,e,n){var i,r,s,o,a=-1;if(n=+n,(t=+t)==(e=+e)&&n>0)return[t];if((i=e0)for(t=Math.ceil(t/o),e=Math.floor(e/o),s=new Array(r=Math.ceil(e-t+1));++a0;){if((r=NR(l,c,n))===i)return s[o]=l,s[a]=c,e(s);if(r>0)l=Math.floor(l/r)*r,c=Math.ceil(c/r)*r;else{if(!(r<0))break;l=Math.ceil(l*r)/r,c=Math.floor(c*r)/r}i=r}return t},t}function s$(){var t=NL();return t.copy=function(){return IL(t,s$())},PL.apply(t,arguments),r$(t)}YL=function(t){var e,n,i=void 0===t.grouping||void 0===t.thousands?e$:(e=n$.call(t.grouping,Number),n=t.thousands+"",function(t,i){for(var r=t.length,s=[],o=0,a=e[0],l=0;r>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),s.push(t.substring(r-=a,r+a)),!((l+=a+1)>i));)a=e[o=(o+1)%e.length];return s.reverse().join(n)}),r=void 0===t.currency?"":t.currency[0]+"",s=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?e$:function(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}(n$.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"\u2212":t.minus+"",u=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=WL(t)).fill,n=t.align,h=t.sign,d=t.symbol,f=t.zero,p=t.width,g=t.comma,m=t.precision,v=t.trim,y=t.type;"n"===y?(g=!0,y="g"):t$[y]||(void 0===m&&(m=12),v=!0,y="g"),(f||"0"===e&&"="===n)&&(f=!0,e="0",n="=");var b="$"===d?r:"#"===d&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",w="$"===d?s:/[%p]/.test(y)?l:"",x=t$[y],_=/[defgprs%]/.test(y);function C(t){var r,s,l,d=b,C=w;if("c"===y)C=x(t)+C,t="";else{var S=(t=+t)<0||1/t<0;if(t=isNaN(t)?u:x(Math.abs(t),m),v&&(t=function(t){t:for(var e,n=t.length,i=1,r=-1;i0&&(r=0)}return r>0?t.slice(0,r)+t.slice(e+1):t}(t)),S&&0==+t&&"+"!==h&&(S=!1),d=(S?"("===h?h:c:"-"===h||"("===h?"":h)+d,C=("s"===y?i$[8+qL/3]:"")+C+(S&&"("===h?")":""),_)for(r=-1,s=t.length;++r(l=t.charCodeAt(r))||l>57){C=(46===l?o+t.slice(r+1):t.slice(r))+C,t=t.slice(0,r);break}}g&&!f&&(t=i(t,1/0));var k=d.length+t.length+C.length,E=k>1)+d+t+C+E.slice(k);break;default:t=E+d+t+C}return a(t)}return m=void 0===m?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),C.toString=function(){return t+""},C}return{format:h,formatPrefix:function(t,e){var n=h(((t=WL(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(QL(e)/3))),r=Math.pow(10,-i),s=i$[8+i/3];return function(t){return n(r*t)+s}}}}({thousands:",",grouping:[3],currency:["$",""]}),XL=YL.format,JL=YL.formatPrefix;var o$=function(t,e,n){t=+t,e=+e,n=(r=arguments.length)<2?(e=t,t=0,1):r<3?1:+n;for(var i=-1,r=0|Math.max(0,Math.ceil((e-t)/n)),s=new Array(r);++i=1)return+n(t[i-1],i-1,t);var i,r=(i-1)*e,s=Math.floor(r),o=+n(t[s],s,t);return o+(+n(t[s+1],s+1,t)-o)*(r-s)}}function f$(){var t,e=[],n=[],i=[];function r(){var t=0,r=Math.max(1,n.length);for(i=new Array(r-1);++t0?i[r-1]:e[0],ry$)if(Math.abs(u*a-l*c)>y$&&r){var d=n-s,f=i-o,p=a*a+l*l,g=d*d+f*f,m=Math.sqrt(p),v=Math.sqrt(h),y=r*Math.tan((m$-Math.acos((p+h-g)/(2*m*v)))/2),b=y/v,w=y/m;Math.abs(b-1)>y$&&(this._+="L"+(t+b*c)+","+(e+b*u)),this._+="A"+r+","+r+",0,0,"+ +(u*d>c*f)+","+(this._x1=t+w*a)+","+(this._y1=e+w*l)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},arc:function(t,e,n,i,r,s){t=+t,e=+e,s=!!s;var o=(n=+n)*Math.cos(i),a=n*Math.sin(i),l=t+o,c=e+a,u=1^s,h=s?i-r:r-i;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>y$||Math.abs(this._y1-c)>y$)&&(this._+="L"+l+","+c),n&&(h<0&&(h=h%v$+v$),h>b$?this._+="A"+n+","+n+",0,1,"+u+","+(t-o)+","+(e-a)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):h>y$&&(this._+="A"+n+","+n+",0,"+ +(h>=m$)+","+u+","+(this._x1=t+n*Math.cos(r))+","+(this._y1=e+n*Math.sin(r))))},rect:function(t,e,n,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}};var _$=x$,C$=function(t){return function(){return t}};function S$(t){return t[0]}function k$(t){return t[1]}var E$=function(){var t=S$,e=k$,n=C$(!0),i=null,r=g$,s=null;function o(o){var a,l,c,u=o.length,h=!1;for(null==i&&(s=r(c=_$())),a=0;a<=u;++a)!(a=u;--h)a.point(m[h],v[h]);a.lineEnd(),a.areaEnd()}g&&(m[c]=+t(d,c,l),v[c]=+n(d,c,l),a.point(e?+e(d,c,l):m[c],i?+i(d,c,l):v[c]))}if(f)return a=null,f+""||null}function c(){return E$().defined(r).curve(o).context(s)}return l.x=function(n){return arguments.length?(t="function"==typeof n?n:C$(+n),e=null,l):t},l.x0=function(e){return arguments.length?(t="function"==typeof e?e:C$(+e),l):t},l.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:C$(+t),l):e},l.y=function(t){return arguments.length?(n="function"==typeof t?t:C$(+t),i=null,l):n},l.y0=function(t){return arguments.length?(n="function"==typeof t?t:C$(+t),l):n},l.y1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:C$(+t),l):i},l.lineX0=l.lineY0=function(){return c().x(t).y(n)},l.lineY1=function(){return c().x(t).y(i)},l.lineX1=function(){return c().x(e).y(n)},l.defined=function(t){return arguments.length?(r="function"==typeof t?t:C$(!!t),l):r},l.curve=function(t){return arguments.length?(o=t,null!=s&&(a=o(s)),l):o},l.context=function(t){return arguments.length?(null==t?s=a=null:a=o(s=t),l):s},l},D$=function(){};function T$(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function R$(t,e){this._context=t,this._k=(1-e)/6}function F$(t,e){this._context=t,this._k=(1-e)/6}function M$(t){this._curve=t}R$.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:T$(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:T$(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function t(e){function n(t){return new R$(t,e)}return n.tension=function(e){return t(+e)},n}(0),F$.prototype={areaStart:D$,areaEnd:D$,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:T$(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function t(e){function n(t){return new F$(t,e)}return n.tension=function(e){return t(+e)},n}(0),M$.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}},Math,Math,Math,Math,Math,Math,Math,Math;var L$=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function $$(t){if(!(e=L$.exec(t)))throw new Error("invalid format: "+t);var e;return new O$({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function O$(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}$$.prototype=O$.prototype,O$.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var I$,N$=Array.prototype.map;void 0===(I$={decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}).grouping||void 0===I$.thousands||N$.call(I$.grouping,Number),void 0===I$.numerals||N$.call(I$.numerals,String);var P$=function(t,e,n,i,r){for(var s,o=t.children,a=-1,l=o.length,c=t.value&&(i-e)/t.value;++a=0;)e+=n[i].value;else e=1;t.value=e}function V$(t,e){var n,i,r,s,o,a=new W$(t),l=+t.value&&(a.value=t.value),c=[a];for(null==e&&(e=H$);n=c.pop();)if(l&&(n.value=+n.data.value),(r=e(n.data))&&(o=r.length))for(n.children=new Array(o),s=o-1;s>=0;--s)c.push(i=n.children[s]=new W$(r[s])),i.parent=n,i.depth=n.depth+1;return a.eachBefore(z$)}function H$(t){return t.children}function j$(t){t.data=t.data.data}function z$(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function W$(t){this.data=t,this.depth=this.height=0,this.parent=null}!function t(e){function n(t,n,i,r,s){!function(t,e,n,i,r,s){for(var o,a,l,c,u,h,d,f,p,g,m,v=[],y=e.children,b=0,w=0,x=y.length,_=e.value;bd&&(d=a),m=u*u*g,(f=Math.max(d/m,m/h))>p){u-=a;break}p=f}v.push(o={value:u,dice:l1?e:1)},n}((1+Math.sqrt(5))/2),W$.prototype=V$.prototype={constructor:W$,count:function(){return this.eachAfter(U$)},each:function(t){var e,n,i,r,s=this,o=[s];do{for(e=o.reverse(),o=[];s=e.pop();)if(t(s),n=s.children)for(i=0,r=n.length;i=0;--n)r.push(e[n]);return this},sum:function(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,i=e.children,r=i&&i.length;--r>=0;)n+=i[r].value;e.value=n})},sort:function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),i=e.ancestors(),r=null;for(t=n.pop(),e=i.pop();t===e;)r=t,t=n.pop(),e=i.pop();return r}(e,t),i=[e];e!==n;)i.push(e=e.parent);for(var r=i.length;t!==n;)i.splice(r,0,t),t=t.parent;return i},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each(function(e){t.push(e)}),t},leaves:function(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t},links:function(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e},copy:function(){return V$(this).eachBefore(j$)}};var G$=new Date,K$=new Date;function q$(t,e,n,i){function r(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return r.floor=function(e){return t(e=new Date(+e)),e},r.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},r.round=function(t){var e=r(t),n=r.ceil(t);return t-e0))return a;do{a.push(o=new Date(+n)),e(n,s),t(n)}while(o=e)for(;t(e),!n(e);)e.setTime(e-1)},function(t,i){if(t>=t)if(i<0)for(;++i<=0;)for(;e(t,-1),!n(t););else for(;--i>=0;)for(;e(t,1),!n(t););})},n&&(r.count=function(e,i){return G$.setTime(+e),K$.setTime(+i),t(G$),t(K$),Math.floor(n(G$,K$))},r.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?r.filter(i?function(e){return i(e)%t==0}:function(e){return r.count(0,e)%t==0}):r:null}),r}var Y$=864e5,X$=6048e5;function J$(t){return q$(function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+7*e)},function(t,e){return(e-t)/X$})}var Q$=J$(0),Z$=J$(1),tO=(J$(2),J$(3),J$(4)),eO=(J$(5),J$(6),q$(function(t){t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+e)},function(t,e){return(e-t)/Y$},function(t){return t.getUTCDate()-1}));function nO(t){return q$(function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},function(t,e){t.setDate(t.getDate()+7*e)},function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/X$})}var iO=nO(0),rO=nO(1),sO=(nO(2),nO(3),nO(4)),oO=(nO(5),nO(6),q$(function(t){t.setHours(0,0,0,0)},function(t,e){t.setDate(t.getDate()+e)},function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/Y$},function(t){return t.getDate()-1})),aO=q$(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t,e){return e.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});aO.every=function(t){return isFinite(t=Math.floor(t))&&t>0?q$(function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,n){e.setFullYear(e.getFullYear()+n*t)}):null};var lO=aO,cO=q$(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)},function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});cO.every=function(t){return isFinite(t=Math.floor(t))&&t>0?q$(function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)}):null};var uO=cO;var hO={"-":"",_:" ",0:"0"},dO=/[\\^$*+?|[\]().{}]/g;function fO(t,e,n){var i=t<0?"-":"",r=(i?-t:t)+"",s=r.length;return i+(s=4||0===e?sO(t):sO.ceil(t)}function TO(t,e){return t=DO(t),fO(sO.count(lO(t),t)+(4===lO(t).getDay()),e,2)}function RO(t){return t.getDay()}function FO(t,e){return fO(rO.count(lO(t)-1,t),e,2)}function MO(t,e){return fO(t.getFullYear()%100,e,2)}function LO(t,e){return fO((t=DO(t)).getFullYear()%100,e,2)}function $O(t,e){return fO(t.getFullYear()%1e4,e,4)}function OO(t,e){var n=t.getDay();return fO((t=n>=4||0===n?sO(t):sO.ceil(t)).getFullYear()%1e4,e,4)}function IO(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+fO(e/60|0,"0",2)+fO(e%60,"0",2)}function NO(t,e){return fO(t.getUTCDate(),e,2)}function PO(t,e){return fO(t.getUTCHours(),e,2)}function BO(t,e){return fO(t.getUTCHours()%12||12,e,2)}function UO(t,e){return fO(1+eO.count(uO(t),t),e,3)}function VO(t,e){return fO(t.getUTCMilliseconds(),e,3)}function HO(t,e){return VO(t,e)+"000"}function jO(t,e){return fO(t.getUTCMonth()+1,e,2)}function zO(t,e){return fO(t.getUTCMinutes(),e,2)}function WO(t,e){return fO(t.getUTCSeconds(),e,2)}function GO(t){var e=t.getUTCDay();return 0===e?7:e}function KO(t,e){return fO(Q$.count(uO(t)-1,t),e,2)}function qO(t){var e=t.getUTCDay();return e>=4||0===e?tO(t):tO.ceil(t)}function YO(t,e){return t=qO(t),fO(tO.count(uO(t),t)+(4===uO(t).getUTCDay()),e,2)}function XO(t){return t.getUTCDay()}function JO(t,e){return fO(Z$.count(uO(t)-1,t),e,2)}function QO(t,e){return fO(t.getUTCFullYear()%100,e,2)}function ZO(t,e){return fO((t=qO(t)).getUTCFullYear()%100,e,2)}function tI(t,e){return fO(t.getUTCFullYear()%1e4,e,4)}function eI(t,e){var n=t.getUTCDay();return fO((t=n>=4||0===n?tO(t):tO.ceil(t)).getUTCFullYear()%1e4,e,4)}function nI(){return"+0000"}function iI(){return"%"}function rI(t){return+t}function sI(t){return Math.floor(+t/1e3)}!function(t){var e=t.dateTime,n=t.date,i=t.time,r=t.periods,s=t.days,o=t.shortDays,a=t.months,l=t.shortMonths,c=(gO(r),mO(r),gO(s),mO(s),gO(o),mO(o),gO(a),mO(a),gO(l),mO(l),{a:function(t){return o[t.getDay()]},A:function(t){return s[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:vO,e:vO,f:_O,g:LO,G:OO,H:yO,I:bO,j:wO,L:xO,m:CO,M:SO,p:function(t){return r[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:rI,s:sI,S:kO,u:EO,U:AO,V:TO,w:RO,W:FO,x:null,X:null,y:MO,Y:$O,Z:IO,"%":iI}),u={a:function(t){return o[t.getUTCDay()]},A:function(t){return s[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:NO,e:NO,f:HO,g:ZO,G:eI,H:PO,I:BO,j:UO,L:VO,m:jO,M:zO,p:function(t){return r[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:rI,s:sI,S:WO,u:GO,U:KO,V:YO,w:XO,W:JO,x:null,X:null,y:QO,Y:tI,Z:nI,"%":iI};function h(t,e){return function(n){var i,r,s,o=[],a=-1,l=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++a{let t=dN=class{constructor(t,e,n){this.applicationRef=t,this.componentFactoryResolver=e,this.injector=n}static setGlobalRootViewContainer(t){dN.globalRootViewContainer=t}getRootViewContainer(){if(this._container)return this._container;if(dN.globalRootViewContainer)return dN.globalRootViewContainer;if(this.applicationRef.components.length)return this.applicationRef.components[0];throw new Error("View Container not found! ngUpgrade needs to manually set this via setRootViewContainer or setGlobalRootViewContainer.")}setRootViewContainer(t){this._container=t}getComponentRootNode(t){return t.element?t.element.nativeElement:t.hostView&&t.hostView.rootNodes.length>0?t.hostView.rootNodes[0]:t.location.nativeElement}getRootViewContainerNode(t){return this.getComponentRootNode(t)}projectComponentBindings(t,e){if(e){if(void 0!==e.inputs){const n=Object.getOwnPropertyNames(e.inputs);for(const i of n)t.instance[i]=e.inputs[i]}if(void 0!==e.outputs){const n=Object.getOwnPropertyNames(e.outputs);for(const i of n)t.instance[i]=e.outputs[i]}}return t}appendComponent(t,e={},n){n||(n=this.getRootViewContainer());const i=this.getComponentRootNode(n),r=new RE(i,this.componentFactoryResolver,this.applicationRef,this.injector),s=new AE(t),o=r.attach(s);return this.projectComponentBindings(o,e),o}};return t.\u0275fac=function(e){return new(e||t)(Yt(lh),Yt(cc),Yt(Bo))},t.\u0275prov=ut({token:t,factory:function(e){return t.\u0275fac(e)}}),t.globalRootViewContainer=null,t})();function pN(t,e,n){let i,r,s;n=n||{};let o=null,a=0;function l(){a=!1===n.leading?0:+new Date,o=null,s=t.apply(i,r)}return function(){const c=+new Date;a||!1!==n.leading||(a=c);const u=e-(c-a);return i=this,r=arguments,u<=0?(clearTimeout(o),o=null,a=c,s=t.apply(i,r)):o||!1===n.trailing||(o=setTimeout(l,u)),s}}var gN=function(t){return t[t.top="top"]="top",t[t.bottom="bottom"]="bottom",t[t.left="left"]="left",t[t.right="right"]="right",t}({});function mN(t,e,n){return"top"===n?t.top-7:"bottom"===n?t.top+t.height-e.height+7:"center"===n?t.top+t.height/2-e.height/2:void 0}function vN(t,e,n){return"left"===n?t.left-7:"right"===n?t.left+t.width-e.width+7:"center"===n?t.left+t.width/2-e.width/2:void 0}class yN{static calculateVerticalAlignment(t,e,n){let i=mN(t,e,n);return i+e.height>window.innerHeight&&(i=window.innerHeight-e.height),i}static calculateVerticalCaret(t,e,n,i){let r;"top"===i&&(r=t.height/2-n.height/2+7),"bottom"===i&&(r=e.height-t.height/2-n.height/2-7),"center"===i&&(r=e.height/2-n.height/2);const s=mN(t,e,i);return s+e.height>window.innerHeight&&(r+=s+e.height-window.innerHeight),r}static calculateHorizontalAlignment(t,e,n){let i=vN(t,e,n);return i+e.width>window.innerWidth&&(i=window.innerWidth-e.width),i}static calculateHorizontalCaret(t,e,n,i){let r;"left"===i&&(r=t.width/2-n.width/2+7),"right"===i&&(r=e.width-t.width/2-n.width/2-7),"center"===i&&(r=e.width/2-n.width/2);const s=vN(t,e,i);return s+e.width>window.innerWidth&&(r+=s+e.width-window.innerWidth),r}static shouldFlip(t,e,n,i){let r=!1;return"right"===n&&t.left+t.width+e.width+i>window.innerWidth&&(r=!0),"left"===n&&t.left-e.width-i<0&&(r=!0),"top"===n&&t.top-e.height-i<0&&(r=!0),"bottom"===n&&t.top+t.height+e.height+i>window.innerHeight&&(r=!0),r}static positionCaret(t,e,n,i,r){let s=0,o=0;return t===gN.right?(o=-7,s=yN.calculateVerticalCaret(n,e,i,r)):t===gN.left?(o=e.width,s=yN.calculateVerticalCaret(n,e,i,r)):t===gN.top?(s=e.height,o=yN.calculateHorizontalCaret(n,e,i,r)):t===gN.bottom&&(s=-7,o=yN.calculateHorizontalCaret(n,e,i,r)),{top:s,left:o}}static positionContent(t,e,n,i,r){let s=0,o=0;return t===gN.right?(o=n.left+n.width+i,s=yN.calculateVerticalAlignment(n,e,r)):t===gN.left?(o=n.left-e.width-i,s=yN.calculateVerticalAlignment(n,e,r)):t===gN.top?(s=n.top-e.height-i,o=yN.calculateHorizontalAlignment(n,e,r)):t===gN.bottom&&(s=n.top+n.height+i,o=yN.calculateHorizontalAlignment(n,e,r)),{top:s,left:o}}static determinePlacement(t,e,n,i){if(yN.shouldFlip(n,e,t,i)){if(t===gN.right)return gN.left;if(t===gN.left)return gN.right;if(t===gN.top)return gN.bottom;if(t===gN.bottom)return gN.top}return t}}let bN=(()=>{let t=class{constructor(t,e){this.element=t,this.renderer=e}get cssClasses(){let t="ngx-charts-tooltip-content";return t+=` position-${this.placement}`,t+=` type-${this.type}`,t+=` ${this.cssClass}`,t}ngAfterViewInit(){setTimeout(this.position.bind(this))}position(){const t=this.element.nativeElement,e=this.host.nativeElement.getBoundingClientRect();if(!e.height&&!e.width)return;const n=t.getBoundingClientRect();this.checkFlip(e,n),this.positionContent(t,e,n),this.showCaret&&this.positionCaret(e,n),setTimeout(()=>this.renderer.addClass(t,"animate"),1)}positionContent(t,e,n){const{top:i,left:r}=yN.positionContent(this.placement,n,e,this.spacing,this.alignment);this.renderer.setStyle(t,"top",`${i}px`),this.renderer.setStyle(t,"left",`${r}px`)}positionCaret(t,e){const n=this.caretElm.nativeElement,i=n.getBoundingClientRect(),{top:r,left:s}=yN.positionCaret(this.placement,e,t,i,this.alignment);this.renderer.setStyle(n,"top",`${r}px`),this.renderer.setStyle(n,"left",`${s}px`)}checkFlip(t,e){this.placement=yN.determinePlacement(this.placement,e,t,this.spacing)}onWindowResize(){this.position()}};return t.\u0275fac=function(e){return new(e||t)(oa(uc),oa(pc))},t.\u0275cmp=pe({type:t,selectors:[["ngx-tooltip-content"]],viewQuery:function(t,e){if(1&t&&fu(oI,!0),2&t){let t;hu(t=vu())&&(e.caretElm=t.first)}},hostVars:2,hostBindings:function(t,e){1&t&&ya("resize",function(){return e.onWindowResize()},!1,Ne),2&t&&Ia(e.cssClasses)},inputs:{placement:"placement",host:"host",showCaret:"showCaret",type:"type",alignment:"alignment",spacing:"spacing",cssClass:"cssClass",title:"title",template:"template",context:"context"},decls:6,vars:6,consts:[[3,"hidden"],["caretElm",""],[1,"tooltip-content"],[4,"ngIf"],[3,"innerHTML",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"innerHTML"]],template:function(t,e){var n;1&t&&(ua(0,"div"),da(1,"span",0,1),ua(3,"div",2),ra(4,cI,2,4,"span",3),ra(5,uI,1,1,"span",4),ha(),ha()),2&t&&(gs(1),"tooltip-caret position-",n=e.placement,"",Ba(oe,Na,ia(dn(),"tooltip-caret position-",n,""),!0),la("hidden",!e.showCaret),gs(3),la("ngIf",!e.title),gs(1),la("ngIf",e.title))},directives:[Ed,Rd],styles:[".ngx-charts-tooltip-content{position:fixed;border-radius:3px;z-index:5000;display:block;font-weight:400;opacity:0;pointer-events:none!important}.ngx-charts-tooltip-content.type-popover{background:#fff;color:#060709;border:1px solid #72809b;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);font-size:13px;padding:4px}.ngx-charts-tooltip-content.type-popover .tooltip-caret{position:absolute;z-index:5001;width:0;height:0}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-left{border-top:7px solid transparent;border-bottom:7px solid transparent;border-left:7px solid #fff}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-top{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #fff}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-right{border-top:7px solid transparent;border-bottom:7px solid transparent;border-right:7px solid #fff}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-bottom{border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #fff}.ngx-charts-tooltip-content.type-tooltip{color:#fff;background:rgba(0,0,0,.75);font-size:12px;padding:0 10px;text-align:center;pointer-events:auto}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-left{border-top:7px solid transparent;border-bottom:7px solid transparent;border-left:7px solid rgba(0,0,0,.75)}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-top{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid rgba(0,0,0,.75)}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-right{border-top:7px solid transparent;border-bottom:7px solid transparent;border-right:7px solid rgba(0,0,0,.75)}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-bottom{border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid rgba(0,0,0,.75)}.ngx-charts-tooltip-content .tooltip-label{display:block;line-height:1em;padding:8px 5px 5px;font-size:1em}.ngx-charts-tooltip-content .tooltip-val{display:block;font-size:1.3em;line-height:1em;padding:0 5px 8px}.ngx-charts-tooltip-content .tooltip-caret{position:absolute;z-index:5001;width:0;height:0}.ngx-charts-tooltip-content.position-right{transform:translate3d(10px,0,0)}.ngx-charts-tooltip-content.position-left{transform:translate3d(-10px,0,0)}.ngx-charts-tooltip-content.position-top{transform:translate3d(0,-10px,0)}.ngx-charts-tooltip-content.position-bottom{transform:translate3d(0,10px,0)}.ngx-charts-tooltip-content.animate{opacity:1;transition:opacity .3s,transform .3s;transform:translate3d(0,0,0);pointer-events:auto}.area-tooltip-container{padding:5px 0;pointer-events:none}.tooltip-item{text-align:left;line-height:1.2em;padding:5px 0}.tooltip-item .tooltip-item-color{display:inline-block;height:12px;width:12px;margin-right:5px;color:#5b646b;border-radius:3px}"],encapsulation:2}),cx([function(t,e,n){return{configurable:!0,enumerable:n.enumerable,get:function(){return Object.defineProperty(this,e,{configurable:!0,enumerable:n.enumerable,value:pN(n.value,100,void 0)}),this[e]}}}],t.prototype,"onWindowResize",null),t})(),wN=(()=>{let t=class extends class{constructor(t){this.injectionService=t,this.defaults={},this.components=new Map}getByType(t=this.type){return this.components.get(t)}create(t){return this.createByType(this.type,t)}createByType(t,e){e=this.assignDefaults(e);const n=this.injectComponent(t,e);return this.register(t,n),n}destroy(t){const e=this.components.get(t.componentType);if(e&&e.length){const n=e.indexOf(t);n>-1&&(e[n].destroy(),e.splice(n,1))}}destroyAll(){this.destroyByType(this.type)}destroyByType(t){const e=this.components.get(t);if(e&&e.length){let t=e.length-1;for(;t>=0;)this.destroy(e[t--])}}injectComponent(t,e){return this.injectionService.appendComponent(t,e)}assignDefaults(t){const e=Object.assign({},this.defaults.inputs),n=Object.assign({},this.defaults.outputs);return t.inputs||t.outputs||(t={inputs:t}),e&&(t.inputs=Object.assign(Object.assign({},e),t.inputs)),n&&(t.outputs=Object.assign(Object.assign({},n),t.outputs)),t}register(t,e){this.components.has(t)||this.components.set(t,[]),this.components.get(t).push(e)}}{constructor(t){super(t),this.type=bN}};return t.\u0275fac=function(e){return new(e||t)(Yt(fN))},t.\u0275prov=ut({token:t,factory:function(e){return t.\u0275fac(e)}}),t})(),xN=(()=>{let t=class{constructor(){this.showLegend=!1,this.animations=!0,this.legendLabelClick=new Zc,this.legendLabelActivate=new Zc,this.legendLabelDeactivate=new Zc}ngOnChanges(t){this.update()}update(){let t=0;this.showLegend&&(this.legendType=this.getLegendType(),this.legendOptions&&"right"!==this.legendOptions.position||(t="scaleLegend"===this.legendType?1:2)),this.chartWidth=Math.floor(this.view[0]*(12-t)/12),this.legendWidth=this.legendOptions&&"right"!==this.legendOptions.position?this.chartWidth:Math.floor(this.view[0]*t/12)}getLegendType(){return"linear"===this.legendOptions.scaleType?"scaleLegend":"legend"}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["ngx-charts-chart"]],inputs:{showLegend:"showLegend",animations:"animations",legendType:"legendType",view:"view",legendOptions:"legendOptions",data:"data",legendData:"legendData",colors:"colors",activeEntries:"activeEntries"},outputs:{legendLabelClick:"legendLabelClick",legendLabelActivate:"legendLabelActivate",legendLabelDeactivate:"legendLabelDeactivate"},features:[oc([wN]),Ve],ngContentSelectors:fI,decls:5,vars:8,consts:[[1,"ngx-charts-outer"],[1,"ngx-charts"],["class","chart-legend",3,"horizontal","valueRange","colors","height","width",4,"ngIf"],["class","chart-legend",3,"horizontal","data","title","colors","height","width","activeEntries","labelClick","labelActivate","labelDeactivate",4,"ngIf"],[1,"chart-legend",3,"horizontal","valueRange","colors","height","width"],[1,"chart-legend",3,"horizontal","data","title","colors","height","width","activeEntries","labelClick","labelActivate","labelDeactivate"]],template:function(t,e){1&t&&(Ca(),ua(0,"div",0),jn(),ua(1,"svg",1),Sa(2),ha(),ra(3,hI,1,5,"ngx-charts-scale-legend",2),ra(4,dI,1,7,"ngx-charts-legend",3),ha()),2&t&&($a("width",e.view[0],"px"),la("@animationState","active")("@.disabled",!e.animations),gs(1),na("width",e.chartWidth)("height",e.view[1]),gs(2),la("ngIf",e.showLegend&&"scaleLegend"===e.legendType),gs(1),la("ngIf",e.showLegend&&"legend"===e.legendType))},directives:function(){return[Ed,QN,XN]},encapsulation:2,data:{animation:[pf("animationState",[yf(":enter",[vf({opacity:0}),gf("500ms 100ms",vf({opacity:1}))])])]},changeDetection:0}),t})(),_N=(()=>{let t=class{constructor(t,e){this.element=t,this.zone=e,this.visible=new Zc,this.isVisible=!1,this.runCheck()}destroy(){clearTimeout(this.timeout)}onVisibilityChange(){this.zone.run(()=>{this.isVisible=!0,this.visible.emit(!0)})}runCheck(){const t=()=>{if(!this.element)return;const{offsetHeight:e,offsetWidth:n}=this.element.nativeElement;e&&n?(clearTimeout(this.timeout),this.onVisibilityChange()):(clearTimeout(this.timeout),this.zone.runOutsideAngular(()=>{this.timeout=setTimeout(()=>t(),100)}))};this.zone.runOutsideAngular(()=>{this.timeout=setTimeout(()=>t())})}};return t.\u0275fac=function(e){return new(e||t)(oa(uc),oa(ju))},t.\u0275dir=we({type:t,selectors:[["visibility-observer"]],outputs:{visible:"visible"}}),t})(),CN=(()=>{let t=class{constructor(t,e,n){this.chartElement=t,this.zone=e,this.cd=n,this.scheme="cool",this.schemeType="ordinal",this.animations=!0,this.select=new Zc}ngAfterViewInit(){this.bindWindowResizeEvent(),this.visibilityObserver=new _N(this.chartElement,this.zone),this.visibilityObserver.visible.subscribe(this.update.bind(this))}ngOnDestroy(){this.unbindEvents(),this.visibilityObserver&&(this.visibilityObserver.visible.unsubscribe(),this.visibilityObserver.destroy())}ngOnChanges(t){this.update()}update(){if(this.results=this.results?this.cloneData(this.results):[],this.view)this.width=this.view[0],this.height=this.view[1];else{const t=this.getContainerDims();t&&(this.width=t.width,this.height=t.height)}this.width||(this.width=600),this.height||(this.height=400),this.width=Math.floor(this.width),this.height=Math.floor(this.height),this.cd&&this.cd.markForCheck()}getContainerDims(){let t,e;const n=this.chartElement.nativeElement;if(null!==n.parentNode){const i=n.parentNode.getBoundingClientRect();t=i.width,e=i.height}return t&&e?{width:t,height:e}:null}formatDates(){for(let t=0;tn.lift(new FE(t,e))}(200)).subscribe(t=>{this.update(),this.cd&&this.cd.markForCheck()});this.resizeSubscription=t}cloneData(t){const e=[];for(const n of t){const t={name:n.name};if(void 0!==n.value&&(t.value=n.value),void 0!==n.series){t.series=[];for(const e of n.series){const n=Object.assign({},e);t.series.push(n)}}void 0!==n.extra&&(t.extra=JSON.parse(JSON.stringify(n.extra))),e.push(t)}return e}};return t.\u0275fac=function(e){return new(e||t)(oa(uc),oa(ju),oa(_o))},t.\u0275cmp=pe({type:t,selectors:[["base-chart"]],inputs:{scheme:"scheme",schemeType:"schemeType",animations:"animations",results:"results",view:"view",customColors:"customColors"},outputs:{select:"select"},features:[Ve],decls:1,vars:0,template:function(t,e){1&t&&da(0,"div")},encapsulation:2}),t})(),SN=(()=>{let t=class{constructor(t){this.textHeight=25,this.margin=5,this.element=t.nativeElement}ngOnChanges(t){this.update()}update(){switch(this.strokeWidth="0.01",this.textAnchor="middle",this.transform="",this.orient){case"top":case"bottom":this.y=this.offset,this.x=this.width/2;break;case"left":this.y=-(this.offset+this.textHeight+this.margin),this.x=-this.height/2,this.transform="rotate(270)";break;case"right":this.y=this.offset+this.margin,this.x=-this.height/2,this.transform="rotate(270)"}}};return t.\u0275fac=function(e){return new(e||t)(oa(uc))},t.\u0275cmp=pe({type:t,selectors:[["g","ngx-charts-axis-label",""]],inputs:{orient:"orient",label:"label",offset:"offset",width:"width",height:"height"},features:[Ve],attrs:pI,decls:2,vars:6,template:function(t,e){1&t&&(jn(),ua(0,"text"),qa(1),ha()),2&t&&(na("stroke-width",e.strokeWidth)("x",e.x)("y",e.y)("text-anchor",e.textAnchor)("transform",e.transform),gs(1),Xa(" ",e.label," "))},encapsulation:2,changeDetection:0}),t})();function kN(t,e=16){return"string"!=typeof t?"number"==typeof t?t+"":"":(t=t.trim()).length<=e?t:`${t.slice(0,e)}...`}function EN(t,e){if(t.length>e){const n=[],i=Math.floor(t.length/e);for(let e=0;e{let t=class{constructor(){this.tickArguments=[5],this.tickStroke="#ccc",this.trimTicks=!0,this.maxTickLength=16,this.showGridLines=!1,this.rotateTicks=!0,this.dimensionsChanged=new Zc,this.verticalSpacing=20,this.rotateLabels=!1,this.innerTickSize=6,this.outerTickSize=6,this.tickPadding=3,this.textAnchor="middle",this.maxTicksLength=0,this.maxAllowedLength=16,this.height=0}ngOnChanges(t){this.update()}ngAfterViewInit(){setTimeout(()=>this.updateDims())}updateDims(){const t=parseInt(this.ticksElement.nativeElement.getBoundingClientRect().height,10);t!==this.height&&(this.height=t,this.dimensionsChanged.emit({height:t}),setTimeout(()=>this.updateDims()))}update(){const t=this.scale;this.ticks=this.getTicks(),this.tickFormat=this.tickFormatting?this.tickFormatting:t.tickFormat?t.tickFormat.apply(t,this.tickArguments):function(t){return"Date"===t.constructor.name?t.toLocaleDateString():t.toLocaleString()};const e=this.rotateTicks?this.getRotationAngle(this.ticks):null;this.adjustedScale=this.scale.bandwidth?function(t){return this.scale(t)+.5*this.scale.bandwidth()}:this.scale,this.textTransform="",e&&0!==e?(this.textTransform=`rotate(${e})`,this.textAnchor="end",this.verticalSpacing=10):this.textAnchor="middle",setTimeout(()=>this.updateDims())}getRotationAngle(t){let e=0;this.maxTicksLength=0;for(let s=0;sthis.maxTicksLength&&(this.maxTicksLength=n)}const n=8*Math.min(this.maxTicksLength,this.maxAllowedLength);let i=n;const r=Math.floor(this.width/t.length);for(;i>r&&e>-90;)e-=30,i=Math.cos(e*(Math.PI/180))*n;return e}getTicks(){let t;const e=this.getMaxTicks(20),n=this.getMaxTicks(100);return this.tickValues?t=this.tickValues:this.scale.ticks?t=this.scale.ticks.apply(this.scale,[n]):(t=this.scale.domain(),t=EN(t,e)),t}getMaxTicks(t){return Math.floor(this.width/t)}tickTransform(t){return"translate("+this.adjustedScale(t)+","+this.verticalSpacing+")"}gridLineTransform(){return`translate(0,${-this.verticalSpacing-5})`}tickTrim(t){return this.trimTicks?kN(t,this.maxTickLength):t}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["g","ngx-charts-x-axis-ticks",""]],viewQuery:function(t,e){if(1&t&&fu(gI,!0),2&t){let t;hu(t=vu())&&(e.ticksElement=t.first)}},inputs:{tickArguments:"tickArguments",tickStroke:"tickStroke",trimTicks:"trimTicks",maxTickLength:"maxTickLength",showGridLines:"showGridLines",rotateTicks:"rotateTicks",scale:"scale",orient:"orient",tickValues:"tickValues",tickFormatting:"tickFormatting",gridLineHeight:"gridLineHeight",width:"width"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Ve],attrs:mI,decls:4,vars:2,consts:[["ticksel",""],["class","tick",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"tick"],["stroke-width","0.01"],[4,"ngIf"],["y2","0",1,"gridline-path","gridline-path-vertical"]],template:function(t,e){1&t&&(jn(),ua(0,"g",null,0),ra(2,vI,5,7,"g",1),ha(),ra(3,bI,2,2,"g",2)),2&t&&(gs(2),la("ngForOf",e.ticks),gs(1),la("ngForOf",e.ticks))},directives:[Sd,Ed],encapsulation:2,changeDetection:0}),t})(),DN=(()=>{let t=class{constructor(){this.rotateTicks=!0,this.showGridLines=!1,this.xOrient="bottom",this.xAxisOffset=0,this.dimensionsChanged=new Zc,this.xAxisClassName="x axis",this.labelOffset=0,this.fill="none",this.stroke="stroke",this.tickStroke="#ccc",this.strokeWidth="none",this.padding=5}ngOnChanges(t){this.update()}update(){this.transform=`translate(0,${this.xAxisOffset+this.padding+this.dims.height})`,void 0!==this.xAxisTickCount&&(this.tickArguments=[this.xAxisTickCount])}emitTicksHeight({height:t}){const e=t+25+5;e!==this.labelOffset&&(this.labelOffset=e,setTimeout(()=>{this.dimensionsChanged.emit({height:t})},0))}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["g","ngx-charts-x-axis",""]],viewQuery:function(t,e){if(1&t&&fu(AN,!0),2&t){let t;hu(t=vu())&&(e.ticksComponent=t.first)}},inputs:{rotateTicks:"rotateTicks",showGridLines:"showGridLines",xOrient:"xOrient",xAxisOffset:"xAxisOffset",xScale:"xScale",dims:"dims",trimTicks:"trimTicks",maxTickLength:"maxTickLength",tickFormatting:"tickFormatting",showLabel:"showLabel",labelText:"labelText",ticks:"ticks",xAxisTickInterval:"xAxisTickInterval",xAxisTickCount:"xAxisTickCount"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Ve],attrs:wI,decls:3,vars:4,consts:[["ngx-charts-x-axis-ticks","",3,"trimTicks","rotateTicks","maxTickLength","tickFormatting","tickArguments","tickStroke","scale","orient","showGridLines","gridLineHeight","width","tickValues","dimensionsChanged",4,"ngIf"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width",4,"ngIf"],["ngx-charts-x-axis-ticks","",3,"trimTicks","rotateTicks","maxTickLength","tickFormatting","tickArguments","tickStroke","scale","orient","showGridLines","gridLineHeight","width","tickValues","dimensionsChanged"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width"]],template:function(t,e){1&t&&(jn(),ua(0,"g"),ra(1,xI,1,12,"g",0),ra(2,_I,1,5,"g",1),ha()),2&t&&(na("class",e.xAxisClassName)("transform",e.transform),gs(1),la("ngIf",e.xScale),gs(1),la("ngIf",e.showLabel))},directives:[Ed,AN,SN],encapsulation:2,changeDetection:0}),t})(),TN=(()=>{let t=class{constructor(){this.tickArguments=[5],this.tickStroke="#ccc",this.trimTicks=!0,this.maxTickLength=16,this.showGridLines=!1,this.showRefLabels=!1,this.showRefLines=!1,this.dimensionsChanged=new Zc,this.innerTickSize=6,this.tickPadding=3,this.verticalSpacing=20,this.textAnchor="middle",this.width=0,this.outerTickSize=6,this.rotateLabels=!1,this.referenceLineLength=0}ngOnChanges(t){this.update()}ngAfterViewInit(){setTimeout(()=>this.updateDims())}updateDims(){const t=parseInt(this.ticksElement.nativeElement.getBoundingClientRect().width,10);t!==this.width&&(this.width=t,this.dimensionsChanged.emit({width:t}),setTimeout(()=>this.updateDims()))}update(){let t;const e="top"===this.orient||"right"===this.orient?-1:1;switch(this.tickSpacing=Math.max(this.innerTickSize,0)+this.tickPadding,t=this.scale,this.ticks=this.getTicks(),this.tickFormat=this.tickFormatting?this.tickFormatting:t.tickFormat?t.tickFormat.apply(t,this.tickArguments):function(t){return"Date"===t.constructor.name?t.toLocaleDateString():t.toLocaleString()},this.adjustedScale=t.bandwidth?function(e){return t(e)+.5*t.bandwidth()}:t,this.showRefLines&&this.referenceLines&&this.setReferencelines(),this.orient){case"top":case"bottom":this.transform=function(t){return"translate("+this.adjustedScale(t)+",0)"},this.textAnchor="middle",this.y2=this.innerTickSize*e,this.y1=this.tickSpacing*e,this.dy=e<0?"0em":".71em";break;case"left":this.transform=function(t){return"translate(0,"+this.adjustedScale(t)+")"},this.textAnchor="end",this.x2=this.innerTickSize*-e,this.x1=this.tickSpacing*-e,this.dy=".32em";break;case"right":this.transform=function(t){return"translate(0,"+this.adjustedScale(t)+")"},this.textAnchor="start",this.x2=this.innerTickSize*-e,this.x1=this.tickSpacing*-e,this.dy=".32em"}setTimeout(()=>this.updateDims())}setReferencelines(){this.refMin=this.adjustedScale(Math.min.apply(null,this.referenceLines.map(t=>t.value))),this.refMax=this.adjustedScale(Math.max.apply(null,this.referenceLines.map(t=>t.value))),this.referenceLineLength=this.referenceLines.length,this.referenceAreaPath=function(t,e,n,i,r,[s,o,a,l]){let c="";return c=`M${[t+r,e]}`,c+="h"+((n=0===(n=Math.floor(n))?1:n)-2*r),c+=o?`a${[r,r]} 0 0 1 ${[r,r]}`:`h${r}v${r}`,c+="v"+((i=0===(i=Math.floor(i))?1:i)-2*r),c+=l?`a${[r,r]} 0 0 1 ${[-r,r]}`:`v${r}h${-r}`,c+="h"+(2*r-n),c+=a?`a${[r,r]} 0 0 1 ${[-r,-r]}`:`h${-r}v${-r}`,c+="v"+(2*r-i),c+=s?`a${[r,r]} 0 0 1 ${[r,-r]}`:`v${-r}h${r}`,c+="z",c}(0,this.refMax,this.gridLineWidth,this.refMin-this.refMax,0,[!1,!1,!1,!1])}getTicks(){let t;const e=this.getMaxTicks(20),n=this.getMaxTicks(50);return this.tickValues?t=this.tickValues:this.scale.ticks?t=this.scale.ticks.apply(this.scale,[n]):(t=this.scale.domain(),t=EN(t,e)),t}getMaxTicks(t){return Math.floor(this.height/t)}tickTransform(t){return`translate(${this.adjustedScale(t)},${this.verticalSpacing})`}gridLineTransform(){return"translate(5,0)"}tickTrim(t){return this.trimTicks?kN(t,this.maxTickLength):t}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["g","ngx-charts-y-axis-ticks",""]],viewQuery:function(t,e){if(1&t&&fu(gI,!0),2&t){let t;hu(t=vu())&&(e.ticksElement=t.first)}},inputs:{tickArguments:"tickArguments",tickStroke:"tickStroke",trimTicks:"trimTicks",maxTickLength:"maxTickLength",showGridLines:"showGridLines",showRefLabels:"showRefLabels",showRefLines:"showRefLines",scale:"scale",orient:"orient",tickValues:"tickValues",tickFormatting:"tickFormatting",gridLineWidth:"gridLineWidth",height:"height",referenceLines:"referenceLines"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Ve],attrs:CI,decls:6,vars:4,consts:[["ticksel",""],["class","tick",4,"ngFor","ngForOf"],["class","reference-area",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"tick"],["stroke-width","0.01"],[1,"reference-area"],[4,"ngIf"],["class","gridline-path gridline-path-horizontal","x1","0",4,"ngIf"],["x1","0",1,"gridline-path","gridline-path-horizontal"],["x1","0",1,"refline-path","gridline-path-horizontal"],[1,"refline-label"]],template:function(t,e){1&t&&(jn(),ua(0,"g",null,0),ra(2,SI,5,9,"g",1),ha(),ra(3,kI,1,2,"path",2),ra(4,TI,2,2,"g",3),ra(5,MI,2,1,"g",3)),2&t&&(gs(2),la("ngForOf",e.ticks),gs(1),la("ngIf",e.referenceLineLength>1&&e.refMax&&e.refMin&&e.showRefLines),gs(1),la("ngForOf",e.ticks),gs(1),la("ngForOf",e.referenceLines))},directives:[Sd,Ed],encapsulation:2,changeDetection:0}),t})(),RN=(()=>{let t=class{constructor(){this.showGridLines=!1,this.yOrient="left",this.yAxisOffset=0,this.dimensionsChanged=new Zc,this.yAxisClassName="y axis",this.labelOffset=15,this.fill="none",this.stroke="#CCC",this.tickStroke="#CCC",this.strokeWidth=1,this.padding=5}ngOnChanges(t){this.update()}update(){this.offset=-(this.yAxisOffset+this.padding),"right"===this.yOrient?(this.labelOffset=65,this.transform=`translate(${this.offset+this.dims.width} , 0)`):(this.offset=this.offset,this.transform=`translate(${this.offset} , 0)`),void 0!==this.yAxisTickCount&&(this.tickArguments=[this.yAxisTickCount])}emitTicksWidth({width:t}){t!==this.labelOffset&&"right"===this.yOrient?(this.labelOffset=t+this.labelOffset,setTimeout(()=>{this.dimensionsChanged.emit({width:t})},0)):t!==this.labelOffset&&(this.labelOffset=t,setTimeout(()=>{this.dimensionsChanged.emit({width:t})},0))}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["g","ngx-charts-y-axis",""]],viewQuery:function(t,e){if(1&t&&fu(TN,!0),2&t){let t;hu(t=vu())&&(e.ticksComponent=t.first)}},inputs:{showGridLines:"showGridLines",yOrient:"yOrient",yAxisOffset:"yAxisOffset",yScale:"yScale",dims:"dims",trimTicks:"trimTicks",maxTickLength:"maxTickLength",tickFormatting:"tickFormatting",ticks:"ticks",showLabel:"showLabel",labelText:"labelText",yAxisTickInterval:"yAxisTickInterval",yAxisTickCount:"yAxisTickCount",referenceLines:"referenceLines",showRefLines:"showRefLines",showRefLabels:"showRefLabels"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Ve],attrs:LI,decls:3,vars:4,consts:[["ngx-charts-y-axis-ticks","",3,"trimTicks","maxTickLength","tickFormatting","tickArguments","tickValues","tickStroke","scale","orient","showGridLines","gridLineWidth","referenceLines","showRefLines","showRefLabels","height","dimensionsChanged",4,"ngIf"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width",4,"ngIf"],["ngx-charts-y-axis-ticks","",3,"trimTicks","maxTickLength","tickFormatting","tickArguments","tickValues","tickStroke","scale","orient","showGridLines","gridLineWidth","referenceLines","showRefLines","showRefLabels","height","dimensionsChanged"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width"]],template:function(t,e){1&t&&(jn(),ua(0,"g"),ra(1,$I,1,14,"g",0),ra(2,OI,1,5,"g",1),ha()),2&t&&(na("class",e.yAxisClassName)("transform",e.transform),gs(1),la("ngIf",e.yScale),gs(1),la("ngIf",e.showLabel))},directives:[Ed,TN,SN],encapsulation:2,changeDetection:0}),t})(),FN=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[Fd]]}),t})();var MN=function(t){return t[t.popover="popover"]="popover",t[t.tooltip="tooltip"]="tooltip",t}({}),LN=function(t){return t[t.left="left"]="left",t[t.center="center"]="center",t[t.right="right"]="right",t}({}),$N=function(t){return t[t.all="all"]="all",t[t.focus="focus"]="focus",t[t.mouseover="mouseover"]="mouseover",t}({});let ON=(()=>{let t=class{constructor(t,e,n){this.tooltipService=t,this.viewContainerRef=e,this.renderer=n,this.tooltipCssClass="",this.tooltipTitle="",this.tooltipAppendToBody=!0,this.tooltipSpacing=10,this.tooltipDisabled=!1,this.tooltipShowCaret=!0,this.tooltipPlacement=gN.top,this.tooltipAlignment=LN.center,this.tooltipType=MN.popover,this.tooltipCloseOnClickOutside=!0,this.tooltipCloseOnMouseLeave=!0,this.tooltipHideTimeout=300,this.tooltipShowTimeout=100,this.tooltipShowEvent=$N.all,this.tooltipImmediateExit=!1,this.show=new Zc,this.hide=new Zc}get listensForFocus(){return this.tooltipShowEvent===$N.all||this.tooltipShowEvent===$N.focus}get listensForHover(){return this.tooltipShowEvent===$N.all||this.tooltipShowEvent===$N.mouseover}ngOnDestroy(){this.hideTooltip(!0)}onFocus(){this.listensForFocus&&this.showTooltip()}onBlur(){this.listensForFocus&&this.hideTooltip(!0)}onMouseEnter(){this.listensForHover&&this.showTooltip()}onMouseLeave(t){if(this.listensForHover&&this.tooltipCloseOnMouseLeave){if(clearTimeout(this.timeout),this.component&&this.component.instance.element.nativeElement.contains(t))return;this.hideTooltip(this.tooltipImmediateExit)}}onMouseClick(){this.listensForHover&&this.hideTooltip(!0)}showTooltip(t){if(this.component||this.tooltipDisabled)return;const e=t?0:this.tooltipShowTimeout;clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.tooltipService.destroyAll();const t=this.createBoundOptions();this.component=this.tooltipService.create(t),setTimeout(()=>{this.component&&this.addHideListeners(this.component.instance.element.nativeElement)},10),this.show.emit(!0)},e)}addHideListeners(t){this.mouseEnterContentEvent=this.renderer.listen(t,"mouseenter",()=>{clearTimeout(this.timeout)}),this.tooltipCloseOnMouseLeave&&(this.mouseLeaveContentEvent=this.renderer.listen(t,"mouseleave",()=>{this.hideTooltip(this.tooltipImmediateExit)})),this.tooltipCloseOnClickOutside&&(this.documentClickEvent=this.renderer.listen(document,"click",e=>{t.contains(e.target)||this.hideTooltip()}))}hideTooltip(t=!1){if(!this.component)return;const e=()=>{this.mouseLeaveContentEvent&&this.mouseLeaveContentEvent(),this.mouseEnterContentEvent&&this.mouseEnterContentEvent(),this.documentClickEvent&&this.documentClickEvent(),this.hide.emit(!0),this.tooltipService.destroy(this.component),this.component=void 0};clearTimeout(this.timeout),t?e():this.timeout=setTimeout(e,this.tooltipHideTimeout)}createBoundOptions(){return{title:this.tooltipTitle,template:this.tooltipTemplate,host:this.viewContainerRef.element,placement:this.tooltipPlacement,alignment:this.tooltipAlignment,type:this.tooltipType,showCaret:this.tooltipShowCaret,cssClass:this.tooltipCssClass,spacing:this.tooltipSpacing,context:this.tooltipContext}}};return t.\u0275fac=function(e){return new(e||t)(oa(wN),oa(Ic),oa(pc))},t.\u0275dir=we({type:t,selectors:[["","ngx-tooltip",""]],hostBindings:function(t,e){1&t&&ya("focusin",function(){return e.onFocus()})("blur",function(){return e.onBlur()})("mouseenter",function(){return e.onMouseEnter()})("mouseleave",function(t){return e.onMouseLeave(t.target)})("click",function(){return e.onMouseClick()})},inputs:{tooltipCssClass:"tooltipCssClass",tooltipTitle:"tooltipTitle",tooltipAppendToBody:"tooltipAppendToBody",tooltipSpacing:"tooltipSpacing",tooltipDisabled:"tooltipDisabled",tooltipShowCaret:"tooltipShowCaret",tooltipPlacement:"tooltipPlacement",tooltipAlignment:"tooltipAlignment",tooltipType:"tooltipType",tooltipCloseOnClickOutside:"tooltipCloseOnClickOutside",tooltipCloseOnMouseLeave:"tooltipCloseOnMouseLeave",tooltipHideTimeout:"tooltipHideTimeout",tooltipShowTimeout:"tooltipShowTimeout",tooltipShowEvent:"tooltipShowEvent",tooltipImmediateExit:"tooltipImmediateExit",tooltipTemplate:"tooltipTemplate",tooltipContext:"tooltipContext"},outputs:{show:"show",hide:"hide"}}),t})(),IN=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},providers:[fN,wN],imports:[[Fd]]}),t})();function NN(t){return t instanceof Date?t.toLocaleDateString():t.toLocaleString()}function PN(t){return t.toLocaleString().replace(/[&'`"<>]/g,t=>({"&":"&","'":"'","`":"`",'"':""","<":"<",">":">"}[t]))}const BN={};function UN(){let t=("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4);return t=`a${t}`,BN[t]?UN():(BN[t]=!0,t)}let VN,HN=(()=>{let t=class{constructor(){this.type="standard",this.tooltipDisabled=!1,this.select=new Zc,this.activate=new Zc,this.deactivate=new Zc,this.barVisible=!1}ngOnInit(){this.gradientId="grad"+UN().toString(),this.gradientFill=`url(#${this.gradientId})`}ngOnChanges(t){this.update()}update(){this.circle=this.getActiveCircle()}getActiveCircle(){const t=this.data.series.findIndex(t=>{const e=t.name;return e&&this.visibleValue&&e.toString()===this.visibleValue.toString()&&void 0!==t.value});if(-1!==t)return this.mapDataPointToCircle(this.data.series[t],t)}mapDataPointToCircle(t,e){const n=this.data.name,i=t.value,r=t.name,s=NN(r);let o;o=this.xScale("time"===this.scaleType?r:"linear"===this.scaleType?Number(r):r);const a=this.yScale("standard"===this.type?i:t.d1),l=this.yScale.range()[0]-a;let c;return c=this.colors.getColor("linear"===this.colors.scaleType?"standard"===this.type?i:t.d1:n),{classNames:[`circle-data-${e}`],value:i,label:r,data:Object.assign({},t,{series:n,value:i,name:r}),cx:o,cy:a,radius:5,height:l,tooltipLabel:s,color:c,opacity:1,seriesName:n,gradientStops:this.getGradientStops(c),min:t.min,max:t.max}}getTooltipText({tooltipLabel:t,value:e,seriesName:n,min:i,max:r}){return`\n ${PN(n)} \u2022 ${PN(t)}\n ${e.toLocaleString()}${this.getTooltipMinMaxText(i,r)}\n `}getTooltipMinMaxText(t,e){if(void 0!==t||void 0!==e){let n=" (";return void 0!==t?(void 0===e&&(n+="\u2265"),n+=t.toLocaleString(),void 0!==e&&(n+=" - ")):void 0!==e&&(n+="\u2264"),void 0!==e&&(n+=e.toLocaleString()),n+=")",n}return""}getGradientStops(t){return[{offset:0,color:t,opacity:.2},{offset:100,color:t,opacity:1}]}onClick(t){this.select.emit(t)}isActive(t){return!!this.activeEntries&&void 0!==this.activeEntries.find(e=>t.name===e.name)}activateCircle(){this.barVisible=!0,this.activate.emit({name:this.data.name})}deactivateCircle(){this.barVisible=!1,this.circle.opacity=0,this.deactivate.emit({name:this.data.name})}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["g","ngx-charts-circle-series",""]],inputs:{type:"type",tooltipDisabled:"tooltipDisabled",data:"data",xScale:"xScale",yScale:"yScale",colors:"colors",scaleType:"scaleType",visibleValue:"visibleValue",activeEntries:"activeEntries",tooltipTemplate:"tooltipTemplate"},outputs:{select:"select",activate:"activate",deactivate:"deactivate"},features:[Ve],attrs:II,decls:1,vars:1,consts:[[4,"ngIf"],["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops"],["class","tooltip-bar",4,"ngIf"],["ngx-charts-circle","","ngx-tooltip","",1,"circle",3,"cx","cy","r","fill","pointerEvents","data","classNames","tooltipDisabled","tooltipPlacement","tooltipType","tooltipTitle","tooltipTemplate","tooltipContext","select","activate","deactivate"],[1,"tooltip-bar"]],template:function(t,e){1&t&&ra(0,BI,5,20,"g",0),2&t&&la("ngIf",e.circle)},directives:function(){return[Ed,zN,jN,ON]},encapsulation:2,data:{animation:[pf("animationState",[yf(":enter",[vf({opacity:0}),gf(250,vf({opacity:1}))])])]},changeDetection:0}),t})(),jN=(()=>{let t=class{constructor(){this.select=new Zc,this.activate=new Zc,this.deactivate=new Zc}onClick(){this.select.emit(this.data)}onMouseEnter(){this.activate.emit(this.data)}onMouseLeave(){this.deactivate.emit(this.data)}ngOnChanges(t){this.classNames=Array.isArray(this.classNames)?this.classNames.join(" "):"",this.classNames+="circle"}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["g","ngx-charts-circle",""]],hostBindings:function(t,e){1&t&&ya("click",function(){return e.onClick()})("mouseenter",function(){return e.onMouseEnter()})("mouseleave",function(){return e.onMouseLeave()})},inputs:{classNames:"classNames",cx:"cx",cy:"cy",r:"r",fill:"fill",stroke:"stroke",data:"data",circleOpacity:"circleOpacity",pointerEvents:"pointerEvents"},outputs:{select:"select",activate:"activate",deactivate:"deactivate"},features:[Ve],attrs:UI,decls:1,vars:8,template:function(t,e){1&t&&(jn(),da(0,"circle")),2&t&&na("cx",e.cx)("cy",e.cy)("r",e.r)("fill",e.fill)("stroke",e.stroke)("opacity",e.circleOpacity)("class",e.classNames)("pointer-events",e.pointerEvents)},encapsulation:2,changeDetection:0}),t})(),zN=(()=>{let t=class{constructor(){this.orientation="vertical"}ngOnChanges(t){this.x1="0%",this.x2="0%",this.y1="0%",this.y2="0%","horizontal"===this.orientation?this.x2="100%":"vertical"===this.orientation&&(this.y1="100%")}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["g","ngx-charts-svg-linear-gradient",""]],inputs:{orientation:"orientation",name:"name",stops:"stops"},features:[Ve],attrs:VI,decls:2,vars:6,consts:[[3,"id"],[3,"stop-color","stop-opacity",4,"ngFor","ngForOf"]],template:function(t,e){1&t&&(jn(),ua(0,"linearGradient",0),ra(1,HI,1,5,"stop",1),ha()),2&t&&(la("id",e.name),na("x1",e.x1)("y1",e.y1)("x2",e.x2)("y2",e.y2),gs(1),la("ngForOf",e.stops))},directives:[Sd],encapsulation:2,changeDetection:0}),t})(),WN=(()=>{let t=class{constructor(t){this.opacity=1,this.startOpacity=.5,this.endOpacity=1,this.gradient=!1,this.animations=!0,this.select=new Zc,this.initialized=!1,this.hasGradient=!1,this.element=t.nativeElement}ngOnChanges(t){this.initialized?this.update():(this.loadAnimation(),this.initialized=!0)}update(){this.gradientId="grad"+UN().toString(),this.gradientFill=`url(#${this.gradientId})`,this.gradient||this.stops?(this.gradientStops=this.getGradient(),this.hasGradient=!0):this.hasGradient=!1,this.updatePathEl()}loadAnimation(){this.areaPath=this.startingPath,setTimeout(this.update.bind(this),100)}updatePathEl(){const t=zA(this.element).select(".area");this.animations?t.transition().duration(750).attr("d",this.path):t.attr("d",this.path)}getGradient(){return this.stops?this.stops:[{offset:0,color:this.fill,opacity:this.startOpacity},{offset:100,color:this.fill,opacity:this.endOpacity}]}};return t.\u0275fac=function(e){return new(e||t)(oa(uc))},t.\u0275cmp=pe({type:t,selectors:[["g","ngx-charts-area",""]],inputs:{opacity:"opacity",startOpacity:"startOpacity",endOpacity:"endOpacity",gradient:"gradient",animations:"animations",data:"data",path:"path",startingPath:"startingPath",fill:"fill",activeLabel:"activeLabel",stops:"stops"},outputs:{select:"select"},features:[Ve],attrs:jI,decls:2,vars:5,consts:[[4,"ngIf"],[1,"area"],["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops"]],template:function(t,e){1&t&&(ra(0,zI,2,2,"defs",0),jn(),da(1,"path",1)),2&t&&(la("ngIf",e.gradient),gs(1),$a("opacity",e.opacity),na("d",e.areaPath)("fill",e.gradient?e.gradientFill:e.fill))},directives:[Ed,zN],encapsulation:2,changeDetection:0}),t})();"undefined"!=typeof window?VN=window:"undefined"!=typeof global&&(VN=global);const GN=VN.MouseEvent;function KN(t,e=!1,n=!0){if("function"==typeof GN)return new GN(t,{bubbles:e,cancelable:n});{const i=document.createEvent("MouseEvent");return i.initEvent(t,e,n),i}}let qN=(()=>{let t=class{constructor(){this.anchorOpacity=0,this.anchorPos=-1,this.anchorValues=[],this.showPercentage=!1,this.tooltipDisabled=!1,this.hover=new Zc}getValues(t){const e=[];for(const n of this.results){const i=n.series.find(e=>e.name.toString()===t.toString());let r=n.name;if(r instanceof Date&&(r=r.toLocaleDateString()),i){const t=i.name;let s,o=i.value;if(this.showPercentage&&(o=(i.d1-i.d0).toFixed(2)+"%"),"linear"===this.colors.scaleType){let t=o;i.d1&&(t=i.d1),s=this.colors.getColor(t)}else s=this.colors.getColor(n.name);const a=Object.assign({},i,{value:o,name:t,series:r,min:i.min,max:i.max,color:s});e.push(a)}}return e}mouseMove(t){const e=t.pageX-t.target.getBoundingClientRect().left,n=this.findClosestPointIndex(e),i=this.xSet[n];if(this.anchorPos=this.xScale(i),this.anchorPos=Math.max(0,this.anchorPos),this.anchorPos=Math.min(this.dims.width,this.anchorPos),this.anchorValues=this.getValues(i),this.anchorPos!==this.lastAnchorPos){const t=KN("mouseleave");this.tooltipAnchor.nativeElement.dispatchEvent(t),this.anchorOpacity=.7,this.hover.emit({value:i}),this.showTooltip(),this.lastAnchorPos=this.anchorPos}}findClosestPointIndex(t){let e=0,n=this.xSet.length-1,i=Number.MAX_VALUE,r=0;for(;e<=n;){const s=(e+n)/2|0,o=this.xScale(this.xSet[s]),a=Math.abs(o-t);if(at)){i=0,r=s;break}n=s-1}}return r}showTooltip(){const t=KN("mouseenter");this.tooltipAnchor.nativeElement.dispatchEvent(t)}hideTooltip(){const t=KN("mouseleave");this.tooltipAnchor.nativeElement.dispatchEvent(t),this.anchorOpacity=0,this.lastAnchorPos=-1}getToolTipText(t){let e="";return e+=void 0!==t.series?t.series:"???",e+=": ",void 0!==t.value&&(e+=t.value.toLocaleString()),void 0===t.min&&void 0===t.max||(e+=" (",void 0!==t.min?(void 0===t.max&&(e+="\u2265"),e+=t.min.toLocaleString(),void 0!==t.max&&(e+=" - ")):void 0!==t.max&&(e+="\u2264"),void 0!==t.max&&(e+=t.max.toLocaleString()),e+=")"),e}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["g","ngx-charts-tooltip-area",""]],viewQuery:function(t,e){if(1&t&&fu(WI,!0),2&t){let t;hu(t=vu())&&(e.tooltipAnchor=t.first)}},inputs:{showPercentage:"showPercentage",tooltipDisabled:"tooltipDisabled",dims:"dims",xSet:"xSet",xScale:"xScale",yScale:"yScale",results:"results",colors:"colors",tooltipTemplate:"tooltipTemplate"},outputs:{hover:"hover"},attrs:GI,decls:6,vars:18,consts:[["y","0",1,"tooltip-area",2,"opacity","0","cursor","auto",3,"mousemove","mouseleave"],["defaultTooltipTemplate",""],["y","0","ngx-tooltip","",1,"tooltip-anchor",3,"tooltipDisabled","tooltipPlacement","tooltipType","tooltipSpacing","tooltipTemplate","tooltipContext","tooltipImmediateExit"],["tooltipAnchor",""],[1,"area-tooltip-container"],["class","tooltip-item",4,"ngFor","ngForOf"],[1,"tooltip-item"],[1,"tooltip-item-color"]],template:function(t,e){if(1&t&&(jn(),ua(0,"g"),ua(1,"rect",0),ya("mousemove",function(t){return e.mouseMove(t)})("mouseleave",function(){return e.hideTooltip()}),ha(),ra(2,qI,2,1,"ng-template",null,1,xu),da(4,"rect",2,3),ha()),2&t){const t=sa(3);gs(1),na("x",0)("width",e.dims.width)("height",e.dims.height),gs(3),$a("opacity",e.anchorOpacity)("pointer-events","none"),la("@animationState",0!==e.anchorOpacity?"active":"inactive")("tooltipDisabled",e.tooltipDisabled)("tooltipPlacement","right")("tooltipType","tooltip")("tooltipSpacing",15)("tooltipTemplate",e.tooltipTemplate?e.tooltipTemplate:t)("tooltipContext",e.anchorValues)("tooltipImmediateExit",!0),na("x",e.anchorPos)("width",1)("height",e.dims.height)}},directives:[ON,Sd],encapsulation:2,data:{animation:[pf("animationState",[yf("inactive => active",[vf({opacity:0}),gf(250,vf({opacity:.7}))]),yf("active => inactive",[vf({opacity:.7}),gf(250,vf({opacity:0}))])])]},changeDetection:0}),t})(),YN=(()=>{let t=class{constructor(t,e){this.cd=e,this.height=50,this.select=new Zc,this.onDomainChange=new Zc,this.initialized=!1,this.element=t.nativeElement}ngOnChanges(t){this.update(),this.initialized||(this.addBrush(),this.initialized=!0)}update(){this.dims=this.getDims(),this.height=this.dims.height;const t=this.view[1]-this.height;this.xDomain=this.getXDomain(),this.xScale=this.getXScale(),this.brush&&this.updateBrush(),this.transform=`translate(0 , ${t})`,this.filterId="filter"+UN().toString(),this.filter=`url(#${this.filterId})`,this.cd.markForCheck()}getXDomain(){let t=[];for(const n of this.results)for(const e of n.series)t.includes(e.name)||t.push(e.name);let e=[];return"time"===this.scaleType?e=[Math.min(...t),Math.max(...t)]:"linear"===this.scaleType?(t=t.map(t=>Number(t)),e=[Math.min(...t),Math.max(...t)]):e=t,e}getXScale(){let t;return"time"===this.scaleType?t=jL().range([0,this.dims.width]).domain(this.xDomain):"linear"===this.scaleType?t=s$().range([0,this.dims.width]).domain(this.xDomain):"ordinal"===this.scaleType&&(t=h$().range([0,this.dims.width]).padding(.1).domain(this.xDomain)),t}addBrush(){if(this.brush)return;const t=this.height,e=this.view[0];this.brush=function(t){var e,n=DR,i=AR,r=TR,s=!0,o=JA("start","brush","end"),a=6;function l(e){var n=e.property("__brush",g).selectAll(".overlay").data([ER("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",xR.overlay).merge(n).each(function(){var t=RR(this).extent;zA(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])}),e.selectAll(".selection").data([ER("selection")]).enter().append("rect").attr("class","selection").attr("cursor",xR.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var i=e.selectAll(".handle").data(t.handles,function(t){return t.type});i.exit().remove(),i.enter().append("rect").attr("class",function(t){return"handle handle--"+t.type}).attr("cursor",function(t){return xR[t.type]}),e.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",d).filter(r).on("touchstart.brush",d).on("touchmove.brush",f).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function c(){var t=zA(this),e=RR(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",function(t){return"e"===t.type[t.type.length-1]?e[1][0]-a/2:e[0][0]-a/2}).attr("y",function(t){return"s"===t.type[0]?e[1][1]-a/2:e[0][1]-a/2}).attr("width",function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+a:a}).attr("height",function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+a:a})):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(t,e,n){var i=t.__brush.emitter;return!i||n&&i.clean?new h(t,e,n):i}function h(t,e,n){this.that=t,this.args=e,this.state=t.__brush,this.active=0,this.clean=n}function d(){if((!e||FA.touches)&&i.apply(this,arguments)){var n,r,o,a,l,h,d,f,p,g,m,v=this,y=FA.target.__data__.type,b="selection"===(s&&FA.metaKey?y="overlay":y)?dR:s&&FA.altKey?gR:pR,w=t===wR?null:SR[y],x=t===bR?null:kR[y],_=RR(v),C=_.extent,S=_.selection,k=C[0][0],E=C[0][1],A=C[1][0],D=C[1][1],T=0,R=0,F=w&&x&&s&&FA.shiftKey,M=FA.touches?yR(FA.changedTouches[0].identifier):XD,L=M(v),$=L,O=u(v,arguments,!0).beforestart();"overlay"===y?(S&&(p=!0),_.selection=S=[[n=t===wR?k:L[0],o=t===bR?E:L[1]],[l=t===wR?A:n,d=t===bR?D:o]]):(n=S[0][0],o=S[0][1],l=S[1][0],d=S[1][1]),r=n,a=o,h=l,f=d;var I=zA(v).attr("pointer-events","none"),N=I.selectAll(".overlay").attr("cursor",xR[y]);if(FA.touches)O.moved=B,O.ended=V;else{var P=zA(FA.view).on("mousemove.brush",B,!0).on("mouseup.brush",V,!0);s&&P.on("keydown.brush",H,!0).on("keyup.brush",j,!0),ZA(FA.view)}uR(),CT(v),c.call(v),O.start()}function B(){var t=M(v);!F||g||m||(Math.abs(t[0]-$[0])>Math.abs(t[1]-$[1])?m=!0:g=!0),$=t,p=!0,hR(),U()}function U(){var t;switch(T=$[0]-L[0],R=$[1]-L[1],b){case fR:case dR:w&&(T=Math.max(k-n,Math.min(A-l,T)),r=n+T,h=l+T),x&&(R=Math.max(E-o,Math.min(D-d,R)),a=o+R,f=d+R);break;case pR:w<0?(T=Math.max(k-n,Math.min(A-n,T)),r=n+T,h=l):w>0&&(T=Math.max(k-l,Math.min(A-l,T)),r=n,h=l+T),x<0?(R=Math.max(E-o,Math.min(D-o,R)),a=o+R,f=d):x>0&&(R=Math.max(E-d,Math.min(D-d,R)),a=o,f=d+R);break;case gR:w&&(r=Math.max(k,Math.min(A,n-T*w)),h=Math.max(k,Math.min(A,l+T*w))),x&&(a=Math.max(E,Math.min(D,o-R*x)),f=Math.max(E,Math.min(D,d+R*x)))}h0&&(n=r-T),x<0?d=f-R:x>0&&(o=a-R),b=fR,N.attr("cursor",xR.selection),U());break;default:return}hR()}function j(){switch(FA.keyCode){case 16:F&&(g=m=F=!1,U());break;case 18:b===gR&&(w<0?l=h:w>0&&(n=r),x<0?d=f:x>0&&(o=a),b=pR,U());break;case 32:b===fR&&(FA.altKey?(w&&(l=h-T*w,n=r+T*w),x&&(d=f-R*x,o=a+R*x),b=gR):(w<0?l=h:w>0&&(n=r),x<0?d=f:x>0&&(o=a),b=pR),N.attr("cursor",xR[y]),U());break;default:return}hR()}}function f(){u(this,arguments).moved()}function p(){u(this,arguments).ended()}function g(){var e=this.__brush||{selection:null};return e.extent=vR(n.apply(this,arguments)),e.dim=t,e}return l.move=function(e,n){e.selection?e.on("start.brush",function(){u(this,arguments).beforestart().start()}).on("interrupt.brush end.brush",function(){u(this,arguments).end()}).tween("brush",function(){var e=this,i=e.__brush,r=u(e,arguments),s=i.selection,o=t.input("function"==typeof n?n.apply(this,arguments):n,i.extent),a=KD(s,o);function l(t){i.selection=1===t&&null===o?null:a(t),c.call(e),r.brush()}return null!==s&&null!==o?l:l(1)}):e.each(function(){var e=this,i=arguments,r=e.__brush,s=t.input("function"==typeof n?n.apply(e,i):n,r.extent),o=u(e,i).beforestart();CT(e),r.selection=null===s?null:s,c.call(e),o.start().brush().end()})},l.clear=function(t){l.move(t,null)},h.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(e){!function(t,e,n,i){var r=FA;t.sourceEvent=FA,FA=t;try{e.apply(n,i)}finally{FA=r}}(new cR(l,e,t.output(this.state.selection)),o.apply,o,[e,this.that,this.args])}},l.extent=function(t){return arguments.length?(n="function"==typeof t?t:lR(vR(t)),l):n},l.filter=function(t){return arguments.length?(i="function"==typeof t?t:lR(!!t),l):i},l.touchable=function(t){return arguments.length?(r="function"==typeof t?t:lR(!!t),l):r},l.handleSize=function(t){return arguments.length?(a=+t,l):a},l.keyModifiers=function(t){return arguments.length?(s=!!t,l):s},l.on=function(){var t=o.on.apply(o,arguments);return t===o?l:t},l}(bR).extent([[0,0],[e,t]]).on("brush end",()=>{const t=(FA.selection||this.xScale.range()).map(this.xScale.invert);this.onDomainChange.emit(t),this.cd.markForCheck()}),zA(this.element).select(".brush").call(this.brush)}updateBrush(){this.brush&&(this.brush.extent([[0,0],[this.view[0],this.height]]),zA(this.element).select(".brush").call(this.brush),zA(this.element).select(".selection").attr("fill",void 0).attr("stroke",void 0).attr("fill-opacity",void 0),this.cd.markForCheck())}getDims(){return{width:this.view[0],height:this.height}}};return t.\u0275fac=function(e){return new(e||t)(oa(uc),oa(_o))},t.\u0275cmp=pe({type:t,selectors:[["g","ngx-charts-timeline",""]],inputs:{height:"height",view:"view",state:"state",results:"results",scheme:"scheme",customColors:"customColors",legend:"legend",miniChart:"miniChart",autoScale:"autoScale",scaleType:"scaleType"},outputs:{select:"select",onDomainChange:"onDomainChange"},features:[Ve],attrs:YI,ngContentSelectors:fI,decls:7,vars:4,consts:[[1,"timeline"],["in","SourceGraphic","type","matrix","values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"],[1,"embedded-chart"],["x","0","y","0",1,"brush-background"],[1,"brush"]],template:function(t,e){1&t&&(Ca(),jn(),ua(0,"g",0),ua(1,"filter"),da(2,"feColorMatrix",1),ha(),ua(3,"g",2),Sa(4),ha(),da(5,"rect",3),da(6,"g",4),ha()),2&t&&(na("transform",e.transform),gs(1),na("id",e.filterId),gs(4),na("width",e.view[0])("height",e.height))},styles:[".timeline .brush-background{fill:rgba(0,0,0,.05)}.timeline .brush .selection{fill:rgba(0,0,0,.1);stroke-width:1px;stroke:#888}.timeline .brush .handle{fill-opacity:0}.timeline .embedded-chart{opacity:.6}"],encapsulation:2,changeDetection:0}),t})(),XN=(()=>{let t=class{constructor(t){this.cd=t,this.horizontal=!1,this.labelClick=new Zc,this.labelActivate=new Zc,this.labelDeactivate=new Zc,this.legendEntries=[]}ngOnChanges(t){this.update()}update(){this.cd.markForCheck(),this.legendEntries=this.getLegendEntries()}getLegendEntries(){const t=[];for(const e of this.data){const n=NN(e);-1===t.findIndex(t=>t.label===n)&&t.push({label:e,formattedLabel:n,color:this.colors.getColor(e)})}return t}isActive(t){return!!this.activeEntries&&void 0!==this.activeEntries.find(e=>t.label===e.name)}activate(t){this.labelActivate.emit(t)}deactivate(t){this.labelDeactivate.emit(t)}trackBy(t,e){return e.label}};return t.\u0275fac=function(e){return new(e||t)(oa(_o))},t.\u0275cmp=pe({type:t,selectors:[["ngx-charts-legend"]],inputs:{horizontal:"horizontal",data:"data",title:"title",colors:"colors",height:"height",width:"width",activeEntries:"activeEntries"},outputs:{labelClick:"labelClick",labelActivate:"labelActivate",labelDeactivate:"labelDeactivate"},features:[Ve],decls:5,vars:9,consts:[["class","legend-title",4,"ngIf"],[1,"legend-wrap"],[1,"legend-labels"],["class","legend-label",4,"ngFor","ngForOf","ngForTrackBy"],[1,"legend-title"],[1,"legend-title-text"],[1,"legend-label"],[3,"label","formattedLabel","color","isActive","select","activate","deactivate"]],template:function(t,e){1&t&&(ua(0,"div"),ra(1,XI,3,1,"header",0),ua(2,"div",1),ua(3,"ul",2),ra(4,JI,2,4,"li",3),ha(),ha(),ha()),2&t&&($a("width",e.width,"px"),gs(1),la("ngIf",(null==e.title?null:e.title.length)>0),gs(2),$a("max-height",e.height-45,"px"),Oa("horizontal-legend",e.horizontal),gs(1),la("ngForOf",e.legendEntries)("ngForTrackBy",e.trackBy))},directives:function(){return[Ed,Sd,JN]},styles:[".chart-legend{display:inline-block;padding:0;width:auto!important}.chart-legend .legend-title{white-space:nowrap;overflow:hidden;margin-left:10px;margin-bottom:5px;font-size:14px;font-weight:700}.chart-legend li,.chart-legend ul{padding:0;margin:0;list-style:none}.chart-legend .horizontal-legend li{display:inline-block}.chart-legend .legend-wrap{width:calc(100% - 10px)}.chart-legend .legend-labels{line-height:85%;list-style:none;text-align:left;float:left;width:100%;border-radius:3px;overflow-y:auto;overflow-x:hidden;white-space:nowrap;background:rgba(0,0,0,.05)}.chart-legend .legend-label{cursor:pointer;font-size:90%;margin:8px;color:#afb7c8}.chart-legend .legend-label:hover{color:#000;transition:.2s}.chart-legend .legend-label .active .legend-label-text{color:#000}.chart-legend .legend-label-color{display:inline-block;height:15px;width:15px;margin-right:5px;color:#5b646b;border-radius:3px}.chart-legend .legend-label-text{display:inline-block;vertical-align:top;line-height:15px;font-size:12px;width:calc(100% - 20px);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.chart-legend .legend-title-text{vertical-align:bottom;display:inline-block;line-height:16px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}"],encapsulation:2,changeDetection:0}),t})(),JN=(()=>{let t=class{constructor(){this.isActive=!1,this.select=new Zc,this.activate=new Zc,this.deactivate=new Zc,this.toggle=new Zc}get trimmedLabel(){return this.formattedLabel||"(empty)"}onMouseEnter(){this.activate.emit({name:this.label})}onMouseLeave(){this.deactivate.emit({name:this.label})}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["ngx-charts-legend-entry"]],hostBindings:function(t,e){1&t&&ya("mouseenter",function(){return e.onMouseEnter()})("mouseleave",function(){return e.onMouseLeave()})},inputs:{isActive:"isActive",color:"color",label:"label",formattedLabel:"formattedLabel"},outputs:{select:"select",activate:"activate",deactivate:"deactivate",toggle:"toggle"},decls:4,vars:6,consts:[["tabindex","-1",3,"title","click"],[1,"legend-label-color",3,"click"],[1,"legend-label-text"]],template:function(t,e){1&t&&(ua(0,"span",0),ya("click",function(){return e.select.emit(e.formattedLabel)}),ua(1,"span",1),ya("click",function(){return e.toggle.emit(e.formattedLabel)}),ha(),ua(2,"span",2),qa(3),ha(),ha()),2&t&&(Oa("active",e.isActive),la("title",e.formattedLabel),gs(1),$a("background-color",e.color),gs(2),Xa(" ",e.trimmedLabel," "))},encapsulation:2,changeDetection:0}),t})(),QN=(()=>{let t=class{constructor(t){this.sanitizer=t,this.horizontal=!1}ngOnChanges(t){const e=this.gradientString(this.colors.range(),this.colors.domain());this.gradient=this.sanitizer.bypassSecurityTrustStyle(`linear-gradient(to ${this.horizontal?"right":"bottom"}, ${e})`)}gradientString(t,e){e.push(1);const n=[];return t.reverse().forEach((t,i)=>{n.push(`${t} ${Math.round(100*e[i])}%`)}),n.join(", ")}};return t.\u0275fac=function(e){return new(e||t)(oa(af))},t.\u0275cmp=pe({type:t,selectors:[["ngx-charts-scale-legend"]],inputs:{horizontal:"horizontal",valueRange:"valueRange",colors:"colors",height:"height",width:"width"},features:[Ve],decls:8,vars:10,consts:[[1,"scale-legend"],[1,"scale-legend-label"],[1,"scale-legend-wrap"]],template:function(t,e){1&t&&(ua(0,"div",0),ua(1,"div",1),ua(2,"span"),qa(3),ha(),ha(),da(4,"div",2),ua(5,"div",1),ua(6,"span"),qa(7),ha(),ha(),ha()),2&t&&($a("height",e.horizontal?void 0:e.height,"px")("width",e.width,"px"),Oa("horizontal-legend",e.horizontal),gs(3),Ya(e.valueRange[1].toLocaleString()),gs(1),$a("background",e.gradient),gs(3),Ya(e.valueRange[0].toLocaleString()))},styles:[".chart-legend{display:inline-block;padding:0;width:auto!important}.chart-legend .scale-legend{text-align:center;display:flex;flex-direction:column}.chart-legend .scale-legend-wrap{display:inline-block;flex:1;width:30px;border-radius:5px;margin:0 auto}.chart-legend .scale-legend-label{font-size:12px}.chart-legend .horizontal-legend.scale-legend{flex-direction:row}.chart-legend .horizontal-legend .scale-legend-wrap{width:auto;height:30px;margin:0 16px}"],encapsulation:2,changeDetection:0}),t})(),ZN=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[Fd,FN,IN],Fd,FN,IN]}),t})(),tP=[{name:"vivid",selectable:!0,group:"Ordinal",domain:["#647c8a","#3f51b5","#2196f3","#00b862","#afdf0a","#a7b61a","#f3e562","#ff9800","#ff5722","#ff4514"]},{name:"natural",selectable:!0,group:"Ordinal",domain:["#bf9d76","#e99450","#d89f59","#f2dfa7","#a5d7c6","#7794b1","#afafaf","#707160","#ba9383","#d9d5c3"]},{name:"cool",selectable:!0,group:"Ordinal",domain:["#a8385d","#7aa3e5","#a27ea8","#aae3f5","#adcded","#a95963","#8796c0","#7ed3ed","#50abcc","#ad6886"]},{name:"fire",selectable:!0,group:"Ordinal",domain:["#ff3d00","#bf360c","#ff8f00","#ff6f00","#ff5722","#e65100","#ffca28","#ffab00"]},{name:"solar",selectable:!0,group:"Continuous",domain:["#fff8e1","#ffecb3","#ffe082","#ffd54f","#ffca28","#ffc107","#ffb300","#ffa000","#ff8f00","#ff6f00"]},{name:"air",selectable:!0,group:"Continuous",domain:["#e1f5fe","#b3e5fc","#81d4fa","#4fc3f7","#29b6f6","#03a9f4","#039be5","#0288d1","#0277bd","#01579b"]},{name:"aqua",selectable:!0,group:"Continuous",domain:["#e0f7fa","#b2ebf2","#80deea","#4dd0e1","#26c6da","#00bcd4","#00acc1","#0097a7","#00838f","#006064"]},{name:"flame",selectable:!1,group:"Ordinal",domain:["#A10A28","#D3342D","#EF6D49","#FAAD67","#FDDE90","#DBED91","#A9D770","#6CBA67","#2C9653","#146738"]},{name:"ocean",selectable:!1,group:"Ordinal",domain:["#1D68FB","#33C0FC","#4AFFFE","#AFFFFF","#FFFC63","#FDBD2D","#FC8A25","#FA4F1E","#FA141B","#BA38D1"]},{name:"forest",selectable:!1,group:"Ordinal",domain:["#55C22D","#C1F33D","#3CC099","#AFFFFF","#8CFC9D","#76CFFA","#BA60FB","#EE6490","#C42A1C","#FC9F32"]},{name:"horizon",selectable:!1,group:"Ordinal",domain:["#2597FB","#65EBFD","#99FDD0","#FCEE4B","#FEFCFA","#FDD6E3","#FCB1A8","#EF6F7B","#CB96E8","#EFDEE0"]},{name:"neons",selectable:!1,group:"Ordinal",domain:["#FF3333","#FF33FF","#CC33FF","#0000FF","#33CCFF","#33FFFF","#33FF66","#CCFF33","#FFCC00","#FF6600"]},{name:"picnic",selectable:!1,group:"Ordinal",domain:["#FAC51D","#66BD6D","#FAA026","#29BB9C","#E96B56","#55ACD2","#B7332F","#2C83C9","#9166B8","#92E7E8"]},{name:"night",selectable:!1,group:"Ordinal",domain:["#2B1B5A","#501356","#183356","#28203F","#391B3C","#1E2B3C","#120634","#2D0432","#051932","#453080","#75267D","#2C507D","#4B3880","#752F7D","#35547D"]},{name:"nightLights",selectable:!1,group:"Ordinal",domain:["#4e31a5","#9c25a7","#3065ab","#57468b","#904497","#46648b","#32118d","#a00fb3","#1052a2","#6e51bd","#b63cc3","#6c97cb","#8671c1","#b455be","#7496c3"]}];class eP{constructor(t,e,n,i){"string"==typeof t&&(t=tP.find(e=>e.name===t)),this.colorDomain=t.domain,this.scaleType=e,this.domain=n,this.customColors=i,this.scale=this.generateColorScheme(t,e,this.domain)}generateColorScheme(t,e,n){let i;if("string"==typeof t&&(t=tP.find(e=>e.name===t)),"quantile"===e)i=f$().range(t.domain).domain(n);else if("ordinal"===e)i=l$().range(t.domain).domain(n);else if("linear"===e){const e=[...t.domain];1===e.length&&(e.push(e[0]),this.colorDomain=e);const n=o$(0,1,1/e.length);i=s$().domain(n).range(e)}return i}getColor(t){if(null==t)throw new Error("Value can not be null");if("linear"===this.scaleType){const e=s$().domain(this.domain).range([0,1]);return this.scale(e(t))}{if("function"==typeof this.customColors)return this.customColors(t);const e=t.toString();let n;return this.customColors&&this.customColors.length>0&&(n=this.customColors.find(t=>t.name.toLowerCase()===e.toLowerCase())),n?n.value:this.scale(t)}}getLinearGradientStops(t,e){void 0===e&&(e=this.domain[0]);const n=s$().domain(this.domain).range([0,1]),i=c$().domain(this.colorDomain).range([0,1]),r=this.getColor(t),s=n(e),o=this.getColor(e),a=n(t);let l=1,c=s;const u=[];for(u.push({color:o,offset:s,originalOffset:s,opacity:1});c=(a-i.bandwidth()).toFixed(4))break;u.push({color:t,offset:e,opacity:1}),c=e,l++}}if(u[u.length-1].offset<100&&u.push({color:r,offset:a,opacity:1}),a===s)u[0].offset=0,u[1].offset=100;else if(100!==u[u.length-1].offset)for(const h of u)h.offset=(h.offset-s)/(a-s)*100;return u}}let nP=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[ZN]]}),t})(),iP=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[ZN]]}),t})(),rP=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[ZN]]}),t})(),sP=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[ZN]]}),t})(),oP=(()=>{let t=class{constructor(t){this.element=t,this.fill="none",this.animations=!0,this.select=new Zc,this.initialized=!1}ngOnChanges(t){this.initialized?this.updatePathEl():(this.initialized=!0,this.initialPath=this.path)}updatePathEl(){const t=zA(this.element.nativeElement).select(".line");this.animations?t.transition().duration(750).attr("d",this.path):t.attr("d",this.path)}};return t.\u0275fac=function(e){return new(e||t)(oa(uc))},t.\u0275cmp=pe({type:t,selectors:[["g","ngx-charts-line",""]],inputs:{fill:"fill",animations:"animations",path:"path",stroke:"stroke",data:"data"},outputs:{select:"select"},features:[Ve],attrs:eN,decls:1,vars:4,consts:[["stroke-width","1.5px",1,"line"]],template:function(t,e){1&t&&(jn(),da(0,"path",0)),2&t&&(la("@animationState","active"),na("d",e.initialPath)("fill",e.fill)("stroke",e.stroke))},encapsulation:2,data:{animation:[pf("animationState",[yf(":enter",[vf({strokeDasharray:2e3,strokeDashoffset:2e3}),gf(1e3,vf({strokeDashoffset:0}))])])]},changeDetection:0}),t})(),aP=(()=>{let t=class extends CN{constructor(){super(...arguments),this.legendTitle="Legend",this.legendPosition="right",this.showGridLines=!0,this.curve=g$,this.activeEntries=[],this.trimXAxisTicks=!0,this.trimYAxisTicks=!0,this.rotateXAxisTicks=!0,this.maxXAxisTickLength=16,this.maxYAxisTickLength=16,this.roundDomains=!1,this.tooltipDisabled=!1,this.showRefLines=!1,this.showRefLabels=!0,this.activate=new Zc,this.deactivate=new Zc,this.margin=[10,20,10,20],this.xAxisHeight=0,this.yAxisWidth=0,this.timelineHeight=50,this.timelinePadding=10}update(){super.update(),this.dims=function({width:t,height:e,margins:n,showXAxis:i=!1,showYAxis:r=!1,xAxisHeight:s=0,yAxisWidth:o=0,showXLabel:a=!1,showYLabel:l=!1,showLegend:c=!1,legendType:u="ordinal",legendPosition:h="right",columns:d=12}){let f=n[3],p=t,g=e-n[0]-n[2];if(c&&"right"===h&&(d-="ordinal"===u?2:1),p=p*d/12,p=p-n[1]-n[3],i&&(g-=5,g-=s,a)&&(g-=30),r&&(p-=5,p-=o,f+=o,f+=10,l)){const t=30;p-=t,f+=t}return p=Math.max(0,p),g=Math.max(0,g),{width:Math.floor(p),height:Math.floor(g),xOffset:Math.floor(f)}}({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.timeline&&(this.dims.height-=this.timelineHeight+this.margin[2]+this.timelinePadding),this.xDomain=this.getXDomain(),this.filteredDomain&&(this.xDomain=this.filteredDomain),this.yDomain=this.getYDomain(),this.seriesDomain=this.getSeriesDomain(),this.xScale=this.getXScale(this.xDomain,this.dims.width),this.yScale=this.getYScale(this.yDomain,this.dims.height),this.updateTimeline(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform=`translate(${this.dims.xOffset} , ${this.margin[0]})`,this.clipPathId="clip"+UN().toString(),this.clipPath=`url(#${this.clipPathId})`}updateTimeline(){this.timeline&&(this.timelineWidth=this.dims.width,this.timelineXDomain=this.getXDomain(),this.timelineXScale=this.getXScale(this.timelineXDomain,this.timelineWidth),this.timelineYScale=this.getYScale(this.yDomain,this.timelineHeight),this.timelineTransform=`translate(${this.dims.xOffset}, ${-this.margin[2]})`)}getXDomain(){let t=function(t){const e=new Set;for(const n of t)for(const t of n.series)e.add(t.name);return Array.from(e)}(this.results);this.scaleType=function(t,e=!0){return e&&t.every(t=>t instanceof Date)?"time":t.every(t=>"number"==typeof t)?"linear":"ordinal"}(t);let e,n,i=[];return"linear"===this.scaleType&&(t=t.map(t=>Number(t))),"time"!==this.scaleType&&"linear"!==this.scaleType||(e=this.xScaleMin?this.xScaleMin:Math.min(...t),n=this.xScaleMax?this.xScaleMax:Math.max(...t)),"time"===this.scaleType?(i=[new Date(e),new Date(n)],this.xSet=[...t].sort((t,e)=>{const n=t.getTime(),i=e.getTime();return n>i?1:i>n?-1:0})):"linear"===this.scaleType?(i=[e,n],this.xSet=[...t].sort((t,e)=>t-e)):(i=t,this.xSet=t),i}getYDomain(){const t=[];for(const n of this.results)for(const e of n.series)t.indexOf(e.value)<0&&t.push(e.value),void 0!==e.min&&(this.hasRange=!0,t.indexOf(e.min)<0&&t.push(e.min)),void 0!==e.max&&(this.hasRange=!0,t.indexOf(e.max)<0&&t.push(e.max));const e=[...t];return this.autoScale||e.push(0),[this.yScaleMin?this.yScaleMin:Math.min(...e),this.yScaleMax?this.yScaleMax:Math.max(...e)]}getSeriesDomain(){return this.results.map(t=>t.name)}getXScale(t,e){let n;return"time"===this.scaleType?n=jL().range([0,e]).domain(t):"linear"===this.scaleType?(n=s$().range([0,e]).domain(t),this.roundDomains&&(n=n.nice())):"ordinal"===this.scaleType&&(n=h$().range([0,e]).padding(.1).domain(t)),n}getYScale(t,e){const n=s$().range([e,0]).domain(t);return this.roundDomains?n.nice():n}updateDomain(t){this.filteredDomain=t,this.xDomain=this.filteredDomain,this.xScale=this.getXScale(this.xDomain,this.dims.width)}updateHoveredVertical(t){this.hoveredVertical=t.value,this.deactivateAll()}hideCircles(){this.hoveredVertical=null,this.deactivateAll()}onClick(t){this.select.emit(t)}trackBy(t,e){return e.name}setColors(){let t;t="ordinal"===this.schemeType?this.seriesDomain:this.yDomain,this.colors=new eP(this.scheme,this.schemeType,t,this.customColors)}getLegendOptions(){const t={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===t.scaleType?(t.domain=this.seriesDomain,t.colors=this.colors,t.title=this.legendTitle):(t.domain=this.yDomain,t.colors=this.colors.scale),t}updateYAxisWidth({width:t}){this.yAxisWidth=t,this.update()}updateXAxisHeight({height:t}){this.xAxisHeight=t,this.update()}onActivate(t){this.deactivateAll(),this.activeEntries.findIndex(e=>e.name===t.name&&e.value===t.value)>-1||(this.activeEntries=[t],this.activate.emit({value:t,entries:this.activeEntries}))}onDeactivate(t){const e=this.activeEntries.findIndex(e=>e.name===t.name&&e.value===t.value);this.activeEntries.splice(e,1),this.activeEntries=[...this.activeEntries],this.deactivate.emit({value:t,entries:this.activeEntries})}deactivateAll(){this.activeEntries=[...this.activeEntries];for(const t of this.activeEntries)this.deactivate.emit({value:t,entries:[]});this.activeEntries=[]}};return t.\u0275fac=function(e){return mP(e||t)},t.\u0275cmp=pe({type:t,selectors:[["ngx-charts-line-chart"]],contentQueries:function(t,e,n){if(1&t&&(gu(n,QI,!0),gu(n,ZI,!0)),2&t){let t;hu(t=vu())&&(e.tooltipTemplate=t.first),hu(t=vu())&&(e.seriesTooltipTemplate=t.first)}},hostBindings:function(t,e){1&t&&ya("mouseleave",function(){return e.hideCircles()})},inputs:{legendTitle:"legendTitle",legendPosition:"legendPosition",showGridLines:"showGridLines",curve:"curve",activeEntries:"activeEntries",trimXAxisTicks:"trimXAxisTicks",trimYAxisTicks:"trimYAxisTicks",rotateXAxisTicks:"rotateXAxisTicks",maxXAxisTickLength:"maxXAxisTickLength",maxYAxisTickLength:"maxYAxisTickLength",roundDomains:"roundDomains",tooltipDisabled:"tooltipDisabled",showRefLines:"showRefLines",showRefLabels:"showRefLabels",legend:"legend",xAxis:"xAxis",yAxis:"yAxis",showXAxisLabel:"showXAxisLabel",showYAxisLabel:"showYAxisLabel",xAxisLabel:"xAxisLabel",yAxisLabel:"yAxisLabel",autoScale:"autoScale",timeline:"timeline",gradient:"gradient",schemeType:"schemeType",rangeFillOpacity:"rangeFillOpacity",xAxisTickFormatting:"xAxisTickFormatting",yAxisTickFormatting:"yAxisTickFormatting",xAxisTicks:"xAxisTicks",yAxisTicks:"yAxisTicks",referenceLines:"referenceLines",xScaleMin:"xScaleMin",xScaleMax:"xScaleMax",yScaleMin:"yScaleMin",yScaleMax:"yScaleMax"},outputs:{activate:"activate",deactivate:"deactivate"},features:[jo],decls:11,vars:20,consts:[[3,"view","showLegend","legendOptions","activeEntries","animations","legendLabelClick","legendLabelActivate","legendLabelDeactivate"],[1,"line-chart","chart"],["ngx-charts-x-axis","",3,"xScale","dims","showGridLines","showLabel","labelText","trimTicks","rotateTicks","maxTickLength","tickFormatting","ticks","dimensionsChanged",4,"ngIf"],["ngx-charts-y-axis","",3,"yScale","dims","showGridLines","showLabel","labelText","trimTicks","maxTickLength","tickFormatting","ticks","referenceLines","showRefLines","showRefLabels","dimensionsChanged",4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"mouseleave",4,"ngIf"],["ngx-charts-timeline","",3,"results","view","height","scheme","customColors","scaleType","legend","onDomainChange",4,"ngIf"],["ngx-charts-x-axis","",3,"xScale","dims","showGridLines","showLabel","labelText","trimTicks","rotateTicks","maxTickLength","tickFormatting","ticks","dimensionsChanged"],["ngx-charts-y-axis","",3,"yScale","dims","showGridLines","showLabel","labelText","trimTicks","maxTickLength","tickFormatting","ticks","referenceLines","showRefLines","showRefLabels","dimensionsChanged"],["ngx-charts-line-series","",3,"xScale","yScale","colors","data","activeEntries","scaleType","curve","rangeFillOpacity","hasRange","animations"],[3,"mouseleave"],["ngx-charts-tooltip-area","",3,"dims","xSet","xScale","yScale","results","colors","tooltipDisabled","tooltipTemplate","hover"],[4,"ngFor","ngForOf"],["ngx-charts-circle-series","",3,"xScale","yScale","colors","data","scaleType","visibleValue","activeEntries","tooltipDisabled","tooltipTemplate","select","activate","deactivate"],["ngx-charts-timeline","",3,"results","view","height","scheme","customColors","scaleType","legend","onDomainChange"],["ngx-charts-line-series","",3,"xScale","yScale","colors","data","scaleType","curve","hasRange","animations"]],template:function(t,e){1&t&&(ua(0,"ngx-charts-chart",0),ya("legendLabelClick",function(t){return e.onClick(t)})("legendLabelActivate",function(t){return e.onActivate(t)})("legendLabelDeactivate",function(t){return e.onDeactivate(t)}),jn(),ua(1,"defs"),ua(2,"clipPath"),da(3,"rect"),ha(),ha(),ua(4,"g",1),ra(5,nN,1,10,"g",2),ra(6,iN,1,12,"g",3),ua(7,"g"),ra(8,rN,2,11,"g",4),ra(9,oN,3,9,"g",5),ha(),ha(),ra(10,lN,2,13,"g",6),ha()),2&t&&(la("view",Yc(17,tN,e.width,e.height))("showLegend",e.legend)("legendOptions",e.legendOptions)("activeEntries",e.activeEntries)("animations",e.animations),gs(2),na("id",e.clipPathId),gs(1),na("width",e.dims.width+10)("height",e.dims.height+10)("transform","translate(-5, -5)"),gs(1),na("transform",e.transform),gs(1),la("ngIf",e.xAxis),gs(1),la("ngIf",e.yAxis),gs(1),na("clip-path",e.clipPath),gs(1),la("ngForOf",e.results)("ngForTrackBy",e.trackBy),gs(1),la("ngIf",!e.tooltipDisabled),gs(1),la("ngIf",e.timeline&&"ordinal"!=e.scaleType))},directives:function(){return[xN,Ed,Sd,DN,RN,lP,qN,HN,YN]},styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"],encapsulation:2,data:{animation:[pf("animationState",[yf(":leave",[vf({opacity:1}),gf(500,vf({opacity:0}))])])]},changeDetection:0}),t})(),lP=(()=>{let t=class{constructor(){this.animations=!0}ngOnChanges(t){this.update()}update(){this.updateGradients();const t=this.sortData(this.data.series),e=this.getLineGenerator();this.path=e(t)||"";const n=this.getAreaGenerator();if(this.areaPath=n(t)||"",this.hasRange){const e=this.getRangeGenerator();this.outerPath=e(t)||""}if(this.hasGradient){this.stroke=this.gradientUrl;const t=this.data.series.map(t=>t.value),e=Math.max(...t);e===Math.min(...t)&&(this.stroke=this.colors.getColor(e))}else this.stroke=this.colors.getColor(this.data.name)}getLineGenerator(){return E$().x(t=>{const e=t.name;let n;return n=this.xScale("time"===this.scaleType?e:"linear"===this.scaleType?Number(e):e),n}).y(t=>this.yScale(t.value)).curve(this.curve)}getRangeGenerator(){return A$().x(t=>{const e=t.name;let n;return n=this.xScale("time"===this.scaleType?e:"linear"===this.scaleType?Number(e):e),n}).y0(t=>this.yScale("number"==typeof t.min?t.min:t.value)).y1(t=>this.yScale("number"==typeof t.max?t.max:t.value)).curve(this.curve)}getAreaGenerator(){return A$().x(t=>this.xScale(t.name)).y0(()=>this.yScale.range()[0]).y1(t=>this.yScale(t.value)).curve(this.curve)}sortData(t){return"linear"===this.scaleType?function(t,e,n="asc"){return t.sort((t,i)=>"asc"===n?t[e]-i[e]:i[e]-t[e])}(t,"name"):"time"===this.scaleType?function(t,e,n="asc"){return t.sort((t,i)=>{const r=t[e].getTime(),s=i[e].getTime();return"asc"===n?r>s?1:s>r?-1:0:r>s?-1:s>r?1:0})}(t,"name"):function(t,e,n="asc",i){return t.sort((t,r)=>{const s=r[e],o=i.indexOf(t[e]),a=i.indexOf(s);return"asc"===n?o-a:a-o})}(t,"name","asc",this.xScale.domain())}updateGradients(){if("linear"===this.colors.scaleType){this.hasGradient=!0,this.gradientId="grad"+UN().toString(),this.gradientUrl=`url(#${this.gradientId})`;const t=this.data.series.map(t=>t.value),e=Math.max(...t),n=Math.min(...t);this.gradientStops=this.colors.getLinearGradientStops(e,n),this.areaGradientStops=this.colors.getLinearGradientStops(e)}else this.hasGradient=!1,this.gradientStops=void 0,this.areaGradientStops=void 0}isActive(t){return!!this.activeEntries&&void 0!==this.activeEntries.find(e=>t.name===e.name)}isInactive(t){return!(!this.activeEntries||0===this.activeEntries.length)&&void 0===this.activeEntries.find(e=>t.name===e.name)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["g","ngx-charts-line-series",""]],inputs:{animations:"animations",data:"data",xScale:"xScale",yScale:"yScale",colors:"colors",scaleType:"scaleType",curve:"curve",activeEntries:"activeEntries",rangeFillOpacity:"rangeFillOpacity",hasRange:"hasRange"},features:[Ve],attrs:cN,decls:6,vars:22,consts:[["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops",4,"ngIf"],["ngx-charts-area","",1,"line-highlight",3,"data","path","fill","opacity","startOpacity","gradient","stops","animations"],["ngx-charts-line","",1,"line-series",3,"data","path","stroke","animations"],["ngx-charts-area","","class","line-series-range",3,"data","path","fill","active","inactive","opacity","animations",4,"ngIf"],["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops"],["ngx-charts-area","",1,"line-series-range",3,"data","path","fill","opacity","animations"]],template:function(t,e){1&t&&(jn(),ua(0,"g"),ua(1,"defs"),ra(2,uN,1,2,"g",0),ha(),da(3,"g",1),da(4,"g",2),ra(5,hN,1,9,"g",3),ha()),2&t&&(gs(2),la("ngIf",e.hasGradient),gs(1),Oa("active",e.isActive(e.data))("inactive",e.isInactive(e.data)),la("data",e.data)("path",e.areaPath)("fill",e.hasGradient?e.gradientUrl:e.colors.getColor(e.data.name))("opacity",.25)("startOpacity",0)("gradient",!0)("stops",e.areaGradientStops)("animations",e.animations),gs(1),Oa("active",e.isActive(e.data))("inactive",e.isInactive(e.data)),la("data",e.data)("path",e.path)("stroke",e.stroke)("animations",e.animations),gs(1),la("ngIf",e.hasRange))},directives:[Ed,WN,oP,zN],encapsulation:2,changeDetection:0}),t})(),cP=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[ZN]]}),t})();Math;let uP=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[ZN]]}),t})(),hP=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[ZN,uP,cP]]}),t})(),dP=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[ZN]]}),t})(),fP=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[ZN]]}),t})(),pP=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[ZN,uP,iP]]}),t})(),gP=(()=>{let t=class{constructor(){"undefined"!=typeof SVGElement&&void 0===SVGElement.prototype.contains&&(SVGElement.prototype.contains=HTMLDivElement.prototype.contains)}};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[ZN,nP,iP,rP,sP,cP,hP,dP,uP,fP,pP]}),t})();const mP=Ei(aP);function vP(t,e){if(1&t&&(ua(0,"ngb-alert",19),da(1,"img",20),ua(2,"h6",21),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("An error occurred: ",t.error,"")}}function yP(t,e){if(1&t&&(ua(0,"tr",24),ua(1,"td"),qa(2),ha(),ua(3,"td"),qa(4),ua(5,"span",25),qa(6),ha(),ha(),ua(7,"td"),qa(8),ua(9,"span",25),qa(10),ha(),ha(),ua(11,"td"),qa(12),ua(13,"span",25),qa(14),ha(),ha(),ua(15,"td"),qa(16),ua(17,"span",25),qa(18),ha(),ha(),ha()),2&t){const t=e.$implicit,n=xa(2);gs(2),Ya(t.name),gs(2),Xa("",t.session_count," "),gs(1),la("hidden",!n.showDelta),gs(1),Xa("(",n.getMaxSessionCount()-t.session_count," delta)"),gs(2),Xa("",t.presence_count," "),gs(1),la("hidden",!n.showDelta),gs(1),Xa("(",n.getMaxPresenceCount()-t.presence_count," delta)"),gs(2),Xa("",t.match_count," "),gs(1),la("hidden",!n.showDelta),gs(1),Xa("(",n.getMaxMatchCount()-t.match_count," delta)"),gs(2),Xa("",t.goroutine_count," "),gs(1),la("hidden",!n.showDelta),gs(1),Xa("(",n.getMaxGoroutineCount()-t.goroutine_count," delta)")}}function bP(t,e){if(1&t&&(ua(0,"tbody"),ra(1,yP,19,13,"tr",22),ua(2,"tr",3),da(3,"td",23),ua(4,"th",3),qa(5),ha(),ua(6,"th",3),qa(7),ha(),ua(8,"th",3),qa(9),ha(),ua(10,"th",3),qa(11),ha(),ha(),ha()),2&t){const t=xa();gs(1),la("ngForOf",t.statusData.nodes),gs(4),Ya(t.getTotalSessionCount()),gs(2),Ya(t.getMaxPresenceCount()),gs(2),Ya(t.getTotalMatchCount()),gs(2),Ya(t.getTotalGorountineCount())}}function wP(t,e){if(1&t&&(ua(0,"option",26),qa(1),ha()),2&t){const t=e.$implicit,n=xa();ka("value",t),gs(1),Ya(n.ranges[t])}}const xP=function(t){return{"background-color":t}};function _P(t,e){if(1&t&&(ua(0,"span"),da(1,"br"),da(2,"span",32),ua(3,"span",33),qa(4),ha(),ha()),2&t){const t=e.$implicit;gs(2),la("ngStyle",qc(3,xP,t.color)),gs(2),Ja("",t.series,": ",t.value,"")}}function CP(t,e){if(1&t&&(ua(0,"div",30),qa(1),ra(2,_P,5,5,"span",31),ha()),2&t){const t=e.model;gs(1),Xa(" ",t[0].name.toLocaleString()," "),gs(1),la("ngForOf",t)}}function SP(t,e){if(1&t&&(ua(0,"div",27),ua(1,"ngx-charts-line-chart",28),ra(2,CP,3,2,"ng-template",null,29,xu),ha(),ha()),2&t){const t=xa();gs(1),la("scheme",t.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",t.latencyGraphData)}}function kP(t,e){if(1&t&&(ua(0,"span"),da(1,"br"),da(2,"span",32),ua(3,"span",33),qa(4),ha(),ha()),2&t){const t=e.$implicit;gs(2),la("ngStyle",qc(3,xP,t.color)),gs(2),Ja("",t.series,": ",t.value,"")}}function EP(t,e){if(1&t&&(ua(0,"div",30),qa(1),ra(2,kP,5,5,"span",31),ha()),2&t){const t=e.model;gs(1),Xa(" ",t[0].name.toLocaleString()," "),gs(1),la("ngForOf",t)}}function AP(t,e){if(1&t&&(ua(0,"div",27),ua(1,"ngx-charts-line-chart",34),ra(2,EP,3,2,"ng-template",null,29,xu),ha(),ha()),2&t){const t=xa();gs(1),la("scheme",t.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",t.rateGraphData)}}function DP(t,e){if(1&t&&(ua(0,"span"),da(1,"br"),da(2,"span",32),ua(3,"span",33),qa(4),ha(),ha()),2&t){const t=e.$implicit;gs(2),la("ngStyle",qc(3,xP,t.color)),gs(2),Ja("",t.series,": ",t.value,"")}}function TP(t,e){if(1&t&&(ua(0,"div",30),qa(1),ra(2,DP,5,5,"span",31),ha()),2&t){const t=e.model;gs(1),Xa(" ",t[0].name.toLocaleString()," "),gs(1),la("ngForOf",t)}}function RP(t,e){if(1&t&&(ua(0,"div",27),ua(1,"ngx-charts-line-chart",35),ra(2,TP,3,2,"ng-template",null,29,xu),ha(),ha()),2&t){const t=xa();gs(1),la("scheme",t.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",t.inputGraphData)}}function FP(t,e){if(1&t&&(ua(0,"span"),da(1,"br"),da(2,"span",32),ua(3,"span",33),qa(4),ha(),ha()),2&t){const t=e.$implicit;gs(2),la("ngStyle",qc(3,xP,t.color)),gs(2),Ja("",t.series,": ",t.value,"")}}function MP(t,e){if(1&t&&(ua(0,"div",30),qa(1),ra(2,FP,5,5,"span",31),ha()),2&t){const t=e.model;gs(1),Xa(" ",t[0].name.toLocaleString()," "),gs(1),la("ngForOf",t)}}function LP(t,e){if(1&t&&(ua(0,"div",27),ua(1,"ngx-charts-line-chart",36),ra(2,MP,3,2,"ng-template",null,29,xu),ha(),ha()),2&t){const t=xa();gs(1),la("scheme",t.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",t.outputGraphData)}}let $P=(()=>{class t{constructor(t,e,n){this.route=t,this.consoleService=e,this.formBuilder=n,this.error="",this.showDelta=!1,this.rateGraphData=[],this.latencyGraphData=[],this.inputGraphData=[],this.outputGraphData=[],this.ranges={1:"last 1 minute",10:"last 10 minutes",30:"last 30 minutes",60:"last 1 hour",1440:"last 24 hours"},this.rangesKeys=Object.keys(this.ranges).map(t=>+t),this.colorScheme={domain:["#5AA454","#E44D25","#1e59cf","#7aa3e5","#a8385d","#d0bd00"]},this.samples=60}ngOnInit(){this.rangeForm=this.formBuilder.group({rangeMinutes:[10]}),this.route.data.subscribe(t=>{this.initData(t[0]),this.refresh(),this.refreshTimer=S_(0,1e3*this.getPeriod()),this.$refreshTimer=this.refreshTimer.subscribe(t=>this.refresh())},t=>{this.error=t})}refresh(){this.consoleService.getStatus("").subscribe(t=>{this.statusData=t,this.rateGraphData=this.updateData(this.rateGraphData,"avg_rate_sec",t),this.latencyGraphData=this.updateData(this.latencyGraphData,"avg_latency_ms",t),this.inputGraphData=this.updateData(this.inputGraphData,"avg_input_kbs",t),this.outputGraphData=this.updateData(this.outputGraphData,"avg_output_kbs",t)})}generateSeries(){let t=new Date;t.setMilliseconds(0);const e=[];for(let n=0;n({name:t,value:0}))}initData(t){const e=this.generateSeries();this.latencyGraphData=t.map(t=>({name:t,series:e})),this.rateGraphData=t.map(t=>({name:t,series:e})),this.inputGraphData=t.map(t=>({name:t,series:e})),this.outputGraphData=t.map(t=>({name:t,series:e}))}updateData(t,e,n){var i;const r=n.nodes,s=[],o=n.timestamp,a=t.map(t=>t.name),l=r.map(t=>t.name),c=this.diff(a,l);for(const u of t)c.includes(u.name)&&s.push({name:u.name,series:this.shiftData(u.series,0,o)});for(const u of r){let n=[],r={};const a=null===(i=t.find(t=>t.name===u.name))||void 0===i?void 0:i.series;n=this.shiftData(a||this.generateSeries(),u[e],o),r={name:u.name,series:n},s.push(r)}return s}shiftData(t,e,n){const i=t.slice(1);return i.push({name:new Date(n),value:e}),i}getPeriod(){return Math.floor(60*this.f.rangeMinutes.value/this.samples)}setRange(t){this.rangeForm.reset({rangeMinutes:+t.target.value}),this.reset()}reset(){this.consoleService.getStatus("").subscribe(t=>{var e;this.initData(t.nodes.map(t=>t.name)),null===(e=this.$refreshTimer)||void 0===e||e.unsubscribe(),this.refreshTimer=S_(0,1e3*this.getPeriod()),this.$refreshTimer=this.refreshTimer.subscribe(t=>this.refresh())},t=>{this.error=t})}diff(t,e){const n=new Set(t);for(const i of e)n.delete(i);return Array.from(n)}get f(){return this.rangeForm.controls}ngOnDestroy(){this.$refreshTimer.unsubscribe()}getTotalSessionCount(){return this.statusData.nodes.reduce((t,e)=>t+e.session_count,0)}getMaxSessionCount(){return Math.max(...this.statusData.nodes.map(t=>t.session_count))}getMaxPresenceCount(){return Math.max(...this.statusData.nodes.map(t=>t.presence_count))}getMaxMatchCount(){return Math.max(...this.statusData.nodes.map(t=>t.match_count))}getTotalMatchCount(){return this.statusData.nodes.reduce((t,e)=>t+e.match_count,0)}getMaxGoroutineCount(){return Math.max(...this.statusData.nodes.map(t=>t.goroutine_count))}getTotalGorountineCount(){return this.statusData.nodes.reduce((t,e)=>t+e.goroutine_count,0)}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(Jx),oa(ox))},t.\u0275cmp=pe({type:t,selectors:[["app-status"]],decls:62,vars:10,consts:[[1,"pb-4"],["type","danger",3,"dismissible",4,"ngIf"],[1,"status-table","table","table-sm","table-striped","mb-4",3,"mouseover","mouseout"],[1,"thead-light"],["scope","col"],[4,"ngIf"],[3,"formGroup"],[1,"row","no-gutters","justify-content-end"],[1,"col-12","text-right"],["ngbDropdown","","role","group",1,"btn-group"],["formControlName","rangeMinutes",1,"custom-select","custom-select-sm","ml-3",3,"change"],[3,"value",4,"ngFor","ngForOf"],[1,"row"],[1,"col-6","d-inline-flex","justify-content-between","align-items-center"],[1,"graph-title"],[1,"d-inline"],[1,"col-6"],["class","graph",4,"ngIf"],[1,"row","mt-4"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["class","clickable",4,"ngFor","ngForOf"],[1,"border-0"],[1,"clickable"],[1,"text-muted","small",3,"hidden"],[3,"value"],[1,"graph"],["xAxisLabel","Time","yAxisLabel","Latency (ms)",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"],["seriesTooltipTemplate",""],[1,"chart-legend"],[4,"ngFor","ngForOf"],[1,"legend-label-color",3,"ngStyle"],[1,"legend-label-text"],["xAxisLabel","Time","yAxisLabel","Request Count",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"],["xAxisLabel","Time","yAxisLabel","Input (kb/s)",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"],["xAxisLabel","Time","yAxisLabel","Output (kb/s)",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"]],template:function(t,e){1&t&&(ua(0,"h2",0),qa(1,"Status"),ha(),ra(2,vP,4,2,"ngb-alert",1),ua(3,"table",2),ya("mouseover",function(){return e.showDelta=!0})("mouseout",function(){return e.showDelta=!1}),ua(4,"thead",3),ua(5,"tr"),ua(6,"th",4),qa(7,"Node name"),ha(),ua(8,"th",4),qa(9,"Sessions"),ha(),ua(10,"th",4),qa(11,"Presences"),ha(),ua(12,"th",4),qa(13,"Authoritative Matches"),ha(),ua(14,"th",4),qa(15,"Goroutines"),ha(),ha(),ha(),ra(16,bP,12,5,"tbody",5),ha(),ua(17,"form",6),ua(18,"div",7),ua(19,"div",8),ua(20,"span"),qa(21,"View:"),ha(),ua(22,"div",9),ua(23,"select",10),ya("change",function(t){return e.setRange(t)}),ra(24,wP,2,2,"option",11),function(t,e){const n=fn();let i;n.firstCreatePass?(i=function(t,e){if(e)for(let n=e.length-1;n>=0;n--){const i=e[n];if(t===i.name)return i}throw new Le("302",`The pipe '${t}' could not be found!`)}("sortNumbers",n.pipeRegistry),n.data[45]=i,i.onDestroy&&(n.destroyHooks||(n.destroyHooks=[])).push(45,i.onDestroy)):i=n.data[45];const r=i.factory||(i.factory=_e(i.type)),s=Kt(oa);try{const t=li(!1),e=r();li(t),function(t,e,n,i){45>=t.data.length&&(t.data[45]=null,t.blueprint[45]=null),e[45]=i}(n,dn(),0,e)}finally{Kt(s)}}(),ha(),ha(),ha(),ha(),ha(),ua(26,"div",12),ua(27,"div",13),ua(28,"div",14),ua(29,"h5",15),qa(30,"Latency"),ha(),ua(31,"small"),qa(32," (ms)"),ha(),ha(),ha(),ua(33,"div",13),ua(34,"div",14),ua(35,"h5",15),qa(36,"Rate"),ha(),ua(37,"small"),qa(38," (rpc/s)"),ha(),ha(),ha(),ha(),ua(39,"div",12),ua(40,"div",16),ra(41,SP,4,12,"div",17),ha(),ua(42,"div",16),ra(43,AP,4,12,"div",17),ha(),ha(),ua(44,"div",18),ua(45,"div",13),ua(46,"div",14),ua(47,"h5",15),qa(48,"Input"),ha(),ua(49,"small"),qa(50," (kb/s)"),ha(),ha(),ha(),ua(51,"div",13),ua(52,"div",14),ua(53,"h5",15),qa(54,"Output"),ha(),ua(55,"small"),qa(56," (kb/s)"),ha(),ha(),ha(),ha(),ua(57,"div",12),ua(58,"div",16),ra(59,RP,4,12,"div",17),ha(),ua(60,"div",16),ra(61,LP,4,12,"div",17),ha(),ha()),2&t&&(gs(2),la("ngIf",e.error),gs(14),la("ngIf",e.statusData),gs(1),la("formGroup",e.rangeForm),gs(7),la("ngForOf",function(t,e,n){const i=t+Se,r=dn(),s=en(r,i);return function(t,e){return Xo.isWrapped(e)&&(e=Xo.unwrap(e),t[Sn()]=ps),e}(r,function(t,e){return t[1].data[e].pure}(r,i)?Qc(r,Cn(),e,s.transform,n,s):s.transform(n))}(25,8,e.rangesKeys)),gs(17),la("ngIf",e.latencyGraphData.length>0),gs(2),la("ngIf",e.rateGraphData.length>0),gs(16),la("ngIf",e.inputGraphData.length>0),gs(2),la("ngIf",e.outputGraphData.length>0))},directives:function(){return[Ed,Jw,gw,tx,lk,Pw,pw,nx,Sd,QC,Bw,jw,aP,Td]},pipes:function(){return[IP]},styles:[".graph[_ngcontent-%COMP%]{height:450px;border-radius:5px;border:1px solid #dadae9}.graph-title[_ngcontent-%COMP%]{padding:.5rem .5rem .5rem 0}.table[_ngcontent-%COMP%]{table-layout:fixed}h4[_ngcontent-%COMP%]{margin-bottom:0}.status-table[_ngcontent-%COMP%]{empty-cells:hide}.status-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background-color:#fff}.status-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-weight:500}.status-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%], .status-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border:1px solid #dadae9;padding:.6em 1em}.status-table[_ngcontent-%COMP%] .total-row[_ngcontent-%COMP%]{border:2px solid #dadae9;background-color:#f5f5f5}.status-table[_ngcontent-%COMP%] .total-row[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:2px solid #dadae9}"]}),t})(),OP=(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){return this.consoleService.getStatus("").pipe(U(t=>Qg(t.nodes.map(t=>t.name)))).pipe($m(e=>(t.data=Object.assign(Object.assign({},t.data),{error:e}),Qg([]))))}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),IP=(()=>{class t{transform(t){return t.sort((t,e)=>t-e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe={type:(e={name:"sortNumbers",type:t,pure:!1}).type,name:e.name,factory:null,pure:!1!==e.pure,onDestroy:e.type.prototype.ngOnDestroy||null},t;var e})();var NP=n("ZR4k"),PP=n("Iab2");const BP=["fileSelector"];function UP(t,e){if(1&t&&(ua(0,"div",8),qa(1),ha()),2&t){const t=xa(2);gs(1),Ya(t.dropZoneLabel)}}function VP(t,e){if(1&t){const t=ga();ua(0,"div"),ua(1,"input",9),ya("click",function(e){return pn(t),xa(2).openFileSelector(e)}),ha(),ha()}if(2&t){const t=xa(2);gs(1),ka("value",t.browseBtnLabel),la("className",t.browseBtnClassName)}}function HP(t,e){if(1&t&&(ra(0,UP,2,1,"div",6),ra(1,VP,2,2,"div",7)),2&t){const t=xa();la("ngIf",t.dropZoneLabel),gs(1),la("ngIf",t.showBrowseBtn)}}function jP(t,e){}const zP=function(t){return{openFileSelector:t}};class WP{constructor(t,e){this.relativePath=t,this.fileEntry=e}}let GP=(()=>{class t{constructor(t){this.template=t}}return t.\u0275fac=function(e){return new(e||t)(oa($c))},t.\u0275dir=we({type:t,selectors:[["","ngx-file-drop-content-tmp",""]]}),t})(),KP=(()=>{class t{constructor(t,e){this.zone=t,this.renderer=e,this.accept="*",this.directory=!1,this.multiple=!0,this.dropZoneLabel="",this.dropZoneClassName="ngx-file-drop__drop-zone",this.useDragEnter=!1,this.contentClassName="ngx-file-drop__content",this.showBrowseBtn=!1,this.browseBtnClassName="btn btn-primary btn-xs ngx-file-drop__browse-btn",this.browseBtnLabel="Browse files",this.onFileDrop=new Zc,this.onFileOver=new Zc,this.onFileLeave=new Zc,this.isDraggingOverDropZone=!1,this.globalDraggingInProgress=!1,this.files=[],this.numOfActiveReadEntries=0,this.helperFormEl=null,this.fileInputPlaceholderEl=null,this.dropEventTimerSubscription=null,this._disabled=!1,this.openFileSelector=t=>{this.fileSelector&&this.fileSelector.nativeElement&&this.fileSelector.nativeElement.click()},this.globalDragStartListener=this.renderer.listen("document","dragstart",t=>{this.globalDraggingInProgress=!0}),this.globalDragEndListener=this.renderer.listen("document","dragend",t=>{this.globalDraggingInProgress=!1})}get disabled(){return this._disabled}set disabled(t){this._disabled=null!=t&&"false"!=`${t}`}ngOnDestroy(){this.dropEventTimerSubscription&&(this.dropEventTimerSubscription.unsubscribe(),this.dropEventTimerSubscription=null),this.globalDragStartListener(),this.globalDragEndListener(),this.files=[],this.helperFormEl=null,this.fileInputPlaceholderEl=null}onDragOver(t){this.useDragEnter?this.preventAndStop(t):this.isDropzoneDisabled()||this.useDragEnter||(this.isDraggingOverDropZone||(this.isDraggingOverDropZone=!0,this.onFileOver.emit(t)),this.preventAndStop(t))}onDragEnter(t){!this.isDropzoneDisabled()&&this.useDragEnter&&(this.isDraggingOverDropZone||(this.isDraggingOverDropZone=!0,this.onFileOver.emit(t)),this.preventAndStop(t))}onDragLeave(t){this.isDropzoneDisabled()||(this.isDraggingOverDropZone&&(this.isDraggingOverDropZone=!1,this.onFileLeave.emit(t)),this.preventAndStop(t))}dropFiles(t){if(!this.isDropzoneDisabled()&&(this.isDraggingOverDropZone=!1,t.dataTransfer)){let e;t.dataTransfer.dropEffect="copy",e=t.dataTransfer.items?t.dataTransfer.items:t.dataTransfer.files,this.preventAndStop(t),this.checkFiles(e)}}uploadFiles(t){!this.isDropzoneDisabled()&&t.target&&(this.checkFiles(t.target.files||[]),this.resetFileInput())}checkFiles(t){for(let e=0;e{t(n)}},e=new WP(t.name,t);this.addToQueue(e)}}this.dropEventTimerSubscription&&this.dropEventTimerSubscription.unsubscribe(),this.dropEventTimerSubscription=S_(200,200).subscribe(()=>{if(this.files.length>0&&0===this.numOfActiveReadEntries){const t=this.files;this.files=[],this.onFileDrop.emit(t)}})}traverseFileTree(t,e){if(t.isFile){const n=new WP(e,t);this.files.push(n)}else{e+="/";const n=t.createReader();let i=[];const r=()=>{this.numOfActiveReadEntries++,n.readEntries(n=>{if(n.length)i=i.concat(n),r();else if(0===i.length){const n=new WP(e,t);this.zone.run(()=>{this.addToQueue(n)})}else for(let t=0;t{this.traverseFileTree(i[t],e+i[t].name)});this.numOfActiveReadEntries--})};r()}}resetFileInput(){if(this.fileSelector&&this.fileSelector.nativeElement){const t=this.fileSelector.nativeElement,e=t.parentElement,n=this.getHelperFormElement(),i=this.getFileInputPlaceholderElement();e!==n&&(this.renderer.insertBefore(e,i,t),this.renderer.appendChild(n,t),n.reset(),this.renderer.insertBefore(e,t,i),this.renderer.removeChild(e,i))}}getHelperFormElement(){return this.helperFormEl||(this.helperFormEl=this.renderer.createElement("form")),this.helperFormEl}getFileInputPlaceholderElement(){return this.fileInputPlaceholderEl||(this.fileInputPlaceholderEl=this.renderer.createElement("div")),this.fileInputPlaceholderEl}canGetAsEntry(t){return!!t.webkitGetAsEntry}isDropzoneDisabled(){return this.globalDraggingInProgress||this.disabled}addToQueue(t){this.files.push(t)}preventAndStop(t){t.stopPropagation(),t.preventDefault()}}return t.\u0275fac=function(e){return new(e||t)(oa(ju),oa(pc))},t.\u0275cmp=pe({type:t,selectors:[["ngx-file-drop"]],contentQueries:function(t,e,n){if(1&t&&gu(n,GP,!0,$c),2&t){let t;hu(t=vu())&&(e.contentTemplate=t.first)}},viewQuery:function(t,e){if(1&t&&du(BP,!0),2&t){let t;hu(t=vu())&&(e.fileSelector=t.first)}},inputs:{accept:"accept",directory:"directory",multiple:"multiple",dropZoneLabel:"dropZoneLabel",dropZoneClassName:"dropZoneClassName",useDragEnter:"useDragEnter",contentClassName:"contentClassName",showBrowseBtn:"showBrowseBtn",browseBtnClassName:"browseBtnClassName",browseBtnLabel:"browseBtnLabel",disabled:"disabled"},outputs:{onFileDrop:"onFileDrop",onFileOver:"onFileOver",onFileLeave:"onFileLeave"},decls:7,vars:15,consts:[[3,"className","drop","dragover","dragenter","dragleave"],[3,"className"],["type","file",1,"ngx-file-drop__file-input",3,"accept","multiple","change"],["fileSelector",""],["defaultContentTemplate",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["class","ngx-file-drop__drop-zone-label",4,"ngIf"],[4,"ngIf"],[1,"ngx-file-drop__drop-zone-label"],["type","button",3,"className","value","click"]],template:function(t,e){if(1&t&&(ua(0,"div",0),ya("drop",function(t){return e.dropFiles(t)})("dragover",function(t){return e.onDragOver(t)})("dragenter",function(t){return e.onDragEnter(t)})("dragleave",function(t){return e.onDragLeave(t)}),ua(1,"div",1),ua(2,"input",2,3),ya("change",function(t){return e.uploadFiles(t)}),ha(),ra(4,HP,2,2,"ng-template",null,4,xu),ra(6,jP,0,0,"ng-template",5),ha(),ha()),2&t){const t=sa(5);Oa("ngx-file-drop__drop-zone--over",e.isDraggingOverDropZone),la("className",e.dropZoneClassName),gs(1),la("className",e.contentClassName),gs(1),la("accept",e.accept)("multiple",e.multiple),na("directory",e.directory||void 0)("webkitdirectory",e.directory||void 0)("mozdirectory",e.directory||void 0)("msdirectory",e.directory||void 0)("odirectory",e.directory||void 0),gs(4),la("ngTemplateOutlet",e.contentTemplate||t)("ngTemplateOutletContext",qc(13,zP,e.openFileSelector))}},directives:[Rd,Ed],styles:[".ngx-file-drop__drop-zone[_ngcontent-%COMP%]{border:2px dotted #0782d0;border-radius:30px;height:100px;margin:auto}.ngx-file-drop__drop-zone--over[_ngcontent-%COMP%]{background-color:hsla(0,0%,57.6%,.5)}.ngx-file-drop__content[_ngcontent-%COMP%]{align-items:center;color:#0782d0;display:flex;height:100px;justify-content:center}.ngx-file-drop__drop-zone-label[_ngcontent-%COMP%]{text-align:center}.ngx-file-drop__file-input[_ngcontent-%COMP%]{display:none}"]}),t})(),qP=(()=>{class t{}return t.\u0275mod=ye({type:t,bootstrap:function(){return[KP]}}),t.\u0275inj=ht({factory:function(e){return new(e||t)},providers:[],imports:[[Fd]]}),t})();function YP(t,e){1&t&&(ua(0,"ngb-alert",22),da(1,"img",23),ua(2,"h6",24),qa(3,"Failed to retrieve configuration."),ha(),ha()),2&t&&la("dismissible",!1)}function XP(t,e){if(1&t&&(ua(0,"span",33),qa(1),ha()),2&t){const t=xa(2).$implicit;la("id",t.name),gs(1),Ya(t.value)}}function JP(t,e){1&t&&(ua(0,"span",34),qa(1,"(empty)"),ha()),2&t&&la("id",xa(2).$implicit.name)}function QP(t,e){if(1&t&&(ua(0,"div",35),ua(1,"b"),qa(2),ha(),ua(3,"label",27),ua(4,"a",28),da(5,"img",10),ha(),ha(),ha()),2&t){const t=xa(2).index,e=xa();gs(2),Ya(e.flatConfig[t+1].name),gs(1),la("for",e.flatConfig[t+1].name),gs(1),Ea("href","https://heroiclabs.com/docs/install-configuration/#",e.flatConfig[t+1].name,"",yr)}}function ZP(t,e){if(1&t&&(ua(0,"span",33),qa(1),ha()),2&t){const t=xa(3).index,e=xa();la("id",e.flatConfig[t+1].name),gs(1),Ya(e.flatConfig[t+1].value)}}function tB(t,e){if(1&t&&(ua(0,"span",34),qa(1,"(empty)"),ha()),2&t){const t=xa(3).index;la("id",xa().flatConfig[t+1].name)}}function eB(t,e){if(1&t&&(ua(0,"div",36),ra(1,ZP,2,2,"span",29),ra(2,tB,2,1,"span",30),ha()),2&t){const t=xa(2).index,e=xa();gs(1),la("ngIf",!e.isEmpty(e.flatConfig[t+1].value)),gs(1),la("ngIf",e.isEmpty(e.flatConfig[t+1].value))}}function nB(t,e){if(1&t&&(ua(0,"div",26),ua(1,"div",7),ua(2,"b"),qa(3),ha(),ua(4,"label",27),ua(5,"a",28),da(6,"img",10),ha(),ha(),ha(),ua(7,"div",7),ra(8,XP,2,2,"span",29),ra(9,JP,2,1,"span",30),ha(),ra(10,QP,6,3,"div",31),ra(11,eB,3,2,"div",32),ha()),2&t){const t=xa(),e=t.index,n=t.$implicit,i=xa();Oa("border-top-0",e>0),gs(3),Ya(n.name),gs(1),la("for",n.name),gs(1),Ea("href","https://heroiclabs.com/docs/install-configuration/#",n.value.name,"",yr),gs(3),la("ngIf",!i.isEmpty(n.value)),gs(1),la("ngIf",i.isEmpty(n.value)),gs(1),la("ngIf",e{class t{constructor(t,e,n,i,r,s){this.config=t,this.route=e,this.httpClient=n,this.modalService=i,this.consoleService=r,this.formBuilder=s,this.configError="",this.uploadError="",this.deleteError="",this.uploading=!1,this.uploadSuccess=!1,this.deleteSuccess=!1,this.deleting=!1,this.apiConfig=t}ngOnInit(){this.route.data.subscribe(t=>{this.nakamaVersion=t[0].server_version;const e=JSON.parse(t[0].config);this.jsonConfig=e,this.flatConfig=this.flattenConfig(e)},t=>{this.configError=t}),this.confirmDeleteForm=this.formBuilder.group({delete:["",Qb.compose([Qb.required,Qb.pattern("DELETE")])]})}flattenConfig(t){const e=[];return this.traverseConfig("",t,e),e.sort((t,e)=>t.name.localeCompare(e.name))}traverseConfig(t,e,n){for(const i in e)"env"!==i&&(Array.isArray(e[i])?n.push({name:t+i,value:e[i].join(", ")}):"object"==typeof e[i]?this.traverseConfig(i+".",e[i],n):n.push({name:t+i,value:e[i]}))}isEmpty(t){return""===t||0===t}exportYaml(){const t=new Blob([Object(NP.safeDump)(this.jsonConfig)],{type:"text/yaml;charset=utf-8"});PP.saveAs(t,"config.yaml")}dropped(t){this.uploadError="",this.uploadSuccess=!1;for(const e of t)if(e.fileEntry.isFile){const t=e.fileEntry.name.split("."),n=["json","csv"];t.length>1&&n.includes(t[t.length-1].toLowerCase())?e.fileEntry.file(t=>{this.uploadFile(t)}):this.uploadError="Invalid file: must have extension .json or .csv"}}uploadFile(t){const e=new FormData;e.append(t.name,t),this.uploading=!0,this.httpClient.post(this.apiConfig.host+"/v2/console/storage/import",e,{headers:{Authorization:"Bearer "}}).subscribe(()=>{this.uploading=!1,this.uploadSuccess=!0},t=>{this.uploading=!1,this.uploadError=t})}deleteData(){this.deleteError="",this.deleting=!0,this.consoleService.deleteAccounts("").pipe(B_(2e3)).subscribe(()=>{this.deleting=!1,this.deleteError="",this.deleteSuccess=!0},t=>{this.deleting=!1,this.deleteError=t})}openDeleteDataModal(t){this.modalService.open(t,{centered:!0}).result.then(()=>{this.deleteData()},()=>{})}get f(){return this.confirmDeleteForm.controls}ngOnDestroy(){}}return t.\u0275fac=function(e){return new(e||t)(oa(Xx),oa(Jv),oa($x),oa(xk),oa(Jx),oa(ox))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:45,vars:11,consts:[["type","danger",3,"dismissible",4,"ngIf"],[1,"pb-4"],[1,"d-flex","justify-content-between","mb-4","align-items-baseline"],[1,"btn","btn-primary","btn-sm",3,"click"],[1,"config-table"],[4,"ngFor","ngForOf"],[1,"row","py-2","border","border-top-0","add-border-larger","mb-5"],[1,"col-lg-3"],[1,"pl-1"],["target","_blank","href","https://heroiclabs.com/docs/install-configuration/#runtime.env",1,"d-inline"],["src","/static/svg/hint.svg","alt","","width","16","height",""],[1,"col-lg-9"],[4,"ngIf"],[1,"section-divider","d-flex","mb-4"],["type","success",3,"dismissible","close",4,"ngIf"],["accept",".json,.csv","dropZoneClassName","drop-zone","contentClassName","drop-zone-content","dropZoneLabel","Drop CSV or JSON file here",3,"disabled","onFileDrop"],["ngx-file-drop-content-tmp",""],["role","alert",1,"alert","alert-danger","d-flex","justify-content-between","align-items-center"],["src","/static/svg/red-triangle.svg","alt","","width","16","height",""],[1,"pl-2"],["confirmDelete",""],["type","button",1,"btn","btn-danger",3,"disabled","click"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["class","row py-2 border",3,"border-top-0",4,"ngIf"],[1,"row","py-2","border"],[1,"pl-1",3,"for"],["target","_blank",1,"d-inline",3,"href"],["class","text-break-all",3,"id",4,"ngIf"],["class","text-muted",3,"id",4,"ngIf"],["class","col-md-3 left-line",4,"ngIf"],["class","col-md-3",4,"ngIf"],[1,"text-break-all",3,"id"],[1,"text-muted",3,"id"],[1,"col-md-3","left-line"],[1,"col-md-3"],["class","mb-0 text-break-all",4,"ngFor","ngForOf"],[1,"mb-0","text-break-all"],[1,"mb-0","text-muted"],[1,"mb-0","pl-4"],["type","success",3,"dismissible","close"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","button",1,"btn","btn-primary",3,"click"],[1,"modal-header"],[1,"modal-title"],["type","button","aria-describedby","modal-title",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"d-flex","flex-column","justify-content-center"],[1,"mt-2"],[3,"formGroup"],["type","text","id","delete-confirm","placeholder","Type 'DELETE' to confirm","formControlName","delete",1,"form-control",3,"ngClass"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-secondary",3,"click"]],template:function(t,e){if(1&t){const t=ga();ra(0,YP,4,1,"ngb-alert",0),ua(1,"h2",1),qa(2,"Server Configuration"),ha(),ua(3,"div",2),ua(4,"h5"),ua(5,"b"),qa(6,"Server version:"),ha(),qa(7),ha(),ua(8,"button",3),ya("click",function(){return e.exportYaml()}),qa(9,"Export Configuration"),ha(),ha(),ua(10,"div",4),ra(11,iB,2,1,"ng-container",5),ua(12,"div",6),ua(13,"div",7),ua(14,"b"),qa(15,"runtime.env"),ha(),ua(16,"label",8),ua(17,"a",9),da(18,"img",10),ha(),ha(),ha(),ua(19,"div",11),ra(20,sB,2,1,"div",12),ra(21,oB,3,0,"div",12),ha(),ha(),ha(),ua(22,"h5",13),qa(23,"Import storage data"),ha(),ua(24,"p"),qa(25,"Import storage objects from a CSV or JSON file by dragging and dropping it below."),ha(),ra(26,aB,6,2,"ngb-alert",0),ra(27,lB,4,1,"ngb-alert",14),ua(28,"ngx-file-drop",15),ya("onFileDrop",function(t){return e.dropped(t)}),ra(29,cB,2,0,"ng-template",16),ha(),ua(30,"h5",13),qa(31,"Delete all data"),ha(),ua(32,"p"),qa(33,"Delete all user accounts and storage objects."),ha(),ra(34,uB,6,2,"ngb-alert",0),ra(35,hB,4,1,"ngb-alert",14),ua(36,"div",17),ua(37,"div"),da(38,"img",18),ua(39,"small",19),qa(40,"Warning - this operation is not reversible!"),ha(),ha(),ra(41,fB,19,5,"ng-template",null,20,xu),ua(43,"button",21),ya("click",function(){pn(t);const n=sa(42);return e.openDeleteDataModal(n)}),qa(44,"Delete all"),ha(),ha()}2&t&&(la("ngIf",e.configError),gs(7),Xa(" ",e.nakamaVersion,""),gs(4),la("ngForOf",e.flatConfig),gs(9),la("ngIf",e.jsonConfig.runtime&&e.jsonConfig.runtime.env&&e.jsonConfig.runtime.env.length>0),gs(1),la("ngIf",e.jsonConfig.runtime&&e.jsonConfig.runtime.env&&0===e.jsonConfig.runtime.env.length),gs(5),la("ngIf",e.uploadError),gs(1),la("ngIf",e.uploadSuccess),gs(1),la("disabled",e.uploading),gs(6),la("ngIf",e.deleteError),gs(1),la("ngIf",e.deleteSuccess),gs(8),la("disabled",e.deleting))},directives:[Ed,Sd,KP,GP,QC,Jw,gw,tx,Gb,pw,nx,_d],styles:["label[_ngcontent-%COMP%]{margin-bottom:0}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.text-break-all[_ngcontent-%COMP%]{word-break:break-all;word-wrap:anywhere}.config-table[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]:nth-child(2n){background-color:#fafafc}.config-table[_ngcontent-%COMP%] .left-line[_ngcontent-%COMP%]{border-left:1px solid #dadae9}"]}),t})(),gB=(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){return this.consoleService.getConfig("")}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function mB(t,e){if(1&t&&(ua(0,"ngb-alert",48),da(1,"img",49),ua(2,"h6",50),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("An error occurred: ",t.error,"")}}function vB(t,e){1&t&&(ua(0,"tr"),ua(1,"td",51),qa(2,"No additional users are setup. Create a new user below."),ha(),ha()),2&t&&(gs(1),la("colSpan",4))}function yB(t,e){if(1&t){const t=ga();ua(0,"tr"),ua(1,"td"),qa(2),ha(),ua(3,"td"),qa(4),ha(),ua(5,"td"),ua(6,"span",36),qa(7,"Administrator"),ha(),ua(8,"span",36),qa(9,"Developer"),ha(),ua(10,"span",36),qa(11,"Maintainer"),ha(),ua(12,"span",36),qa(13,"View Only"),ha(),ha(),ua(14,"td"),ua(15,"button",52),ya("click",function(){pn(t);const n=e.$implicit;return xa().deleteUser(n.username)}),qa(16,"Delete"),ha(),ha(),ha()}if(2&t){const t=e.$implicit,n=xa();gs(2),Ya(t.username),gs(2),Ya(t.email),gs(2),la("hidden",t.role!==n.adminRole),gs(2),la("hidden",t.role!==n.developerRole),gs(2),la("hidden",t.role!==n.maintainerRole),gs(2),la("hidden",t.role!==n.readonlyRole)}}function bB(t,e){if(1&t&&(ua(0,"ngb-alert",48),da(1,"img",49),ua(2,"h6",50),qa(3,"An error occurred:"),ha(),ua(4,"p",53),qa(5),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(5),Ya(t.userCreateError)}}const wB=function(t){return{"is-invalid":t}};let xB=(()=>{class t{constructor(t,e,n){this.route=t,this.consoleService=e,this.formBuilder=n,this.error="",this.userCreateError="",this.users=[],this.adminRole=Zx.USER_ROLE_ADMIN,this.developerRole=Zx.USER_ROLE_DEVELOPER,this.maintainerRole=Zx.USER_ROLE_MAINTAINER,this.readonlyRole=Zx.USER_ROLE_READONLY}ngOnInit(){this.createUserForm=this.formBuilder.group({username:["",Qb.required],email:["",[Qb.required,Qb.email]],password:["",Qb.compose([Qb.required,Qb.minLength(8)])],role:[+this.readonlyRole,Qb.required],newsletter:[!1]}),this.route.data.subscribe(t=>{const e=t[0];this.users.length=0,this.users.push(...e.users)},t=>{this.error=t})}deleteUser(t){this.error="",this.consoleService.deleteUser("",t).pipe(U(()=>this.consoleService.listUsers(""))).subscribe(t=>{this.error="",this.users.length=0,this.users.push(...t.users)},t=>{this.error=t})}addUser(){this.userCreateError="",this.createUserForm.disable();let t=Zx.USER_ROLE_READONLY;switch(this.f.role.value){case 1:t=Zx.USER_ROLE_ADMIN;break;case 2:t=Zx.USER_ROLE_DEVELOPER;break;case 3:t=Zx.USER_ROLE_MAINTAINER;break;case 4:t=Zx.USER_ROLE_READONLY}this.consoleService.addUser("",{username:this.f.username.value,email:this.f.email.value,password:this.f.password.value,role:t,newsletter_subscription:this.f.newsletter.value}).pipe(U(()=>this.consoleService.listUsers(""))).subscribe(e=>{this.userCreateError="",this.createUserForm.reset({role:+t}),this.createUserForm.enable(),this.users.length=0,this.users.push(...e.users)},t=>{this.userCreateError=t,this.createUserForm.enable()})}get f(){return this.createUserForm.controls}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(Jx),oa(ox))},t.\u0275cmp=pe({type:t,selectors:[["app-users"]],decls:121,vars:24,consts:[[1,"pb-4"],["type","danger",3,"dismissible",4,"ngIf"],[1,"user-details","mb-5","table","table-bordered","table-sm","table-striped"],[1,"thead-light"],[2,"width","400px"],[2,"width","300px"],[2,"width","90px"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"section-divider","d-flex","mb-4"],[1,"mb-4","alert-permissions",3,"type"],[1,"alert-title","font-weight-bold"],[1,"d-flex","flex-wrap","flex-row"],[1,"col","col-md-3","p-4","flex-fill","flex-grow-1"],[1,"d-flex","align-items-center","mb-3"],["src","/static/svg/role-admin.svg","alt","","width","30","height","",1,"mr-2"],[1,"m-0","font-weight-bold"],["src","/static/svg/role-developer.svg","alt","","width","30","height","",1,"mr-2"],["src","/static/svg/role-maintainer.svg","alt","","width","30","height","",1,"mr-2"],["src","/static/svg/role-viewonly.svg","alt","","width","30","height","",1,"mr-2"],[1,"add-border","rounded"],[3,"formGroup","ngSubmit"],[1,"row","no-gutters"],[1,"col","d-flex","justify-content-between","align-items-center"],[1,"col-md-3"],["for","email",1,"d-inline"],[1,"col-md-9","ml-0","p-0"],["type","email","id","email","placeholder","email@example.com","required","","formControlName","email",1,"form-control",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","username",1,"d-inline"],["type","text","id","username","placeholder","Username","required","","formControlName","username",1,"form-control",3,"ngClass"],["for","password",1,"d-inline"],["type","password","id","password","placeholder","Password","required","","formControlName","password",1,"form-control",3,"ngClass"],[1,"d-inline"],[1,"btn-group"],["disabled","",1,"btn","btn-outline-dark","disabled"],[3,"hidden"],["ngbDropdown","","role","group",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-primary","dropdown-toggle-split"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click"],[1,"row","no-gutters","add-border-single-row-bottom","mb-4"],[1,"col","d-flex","align-items-center"],[1,"custom-control","custom-checkbox"],["type","checkbox","id","newsletter","formControlName","newsletter",1,"custom-control-input","mr-2","my-2"],["for","newsletter",1,"form-check-label","custom-control-label"],[1,""],["type","submit",1,"btn","btn-primary",3,"disabled"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[1,"text-muted",3,"colSpan"],["type","button",1,"btn","btn-danger","btn-outline-dark",3,"click"],[1,"mb-0","pl-4"]],template:function(t,e){1&t&&(ua(0,"h2",0),qa(1,"User Management"),ha(),ra(2,mB,4,2,"ngb-alert",1),ua(3,"table",2),ua(4,"thead",3),ua(5,"tr"),ua(6,"th",4),qa(7,"Username"),ha(),ua(8,"th"),qa(9,"Email"),ha(),ua(10,"th",5),qa(11,"Role"),ha(),ua(12,"th",6),qa(13,"Action"),ha(),ha(),ha(),ua(14,"tbody"),ra(15,vB,3,1,"tr",7),ra(16,yB,17,6,"tr",8),ha(),ha(),ua(17,"h5",9),qa(18,"Add new user"),ha(),ua(19,"ngb-alert",10),ua(20,"h6",11),qa(21,"User roles"),ha(),ua(22,"div",12),ua(23,"div",13),ua(24,"div",14),da(25,"img",15),ua(26,"h6",16),qa(27,"Administrator"),ha(),ha(),ua(28,"small"),qa(29," Owners have complete control over the server, its users and resources. "),ha(),ha(),ua(30,"div",13),ua(31,"div",14),da(32,"img",17),ua(33,"h6",16),qa(34,"Developer"),ha(),ha(),ua(35,"small"),qa(36," Like Administrators, Developers have complete control over the server, resources and data. However they cannot add, change or delete console users. "),ha(),ha(),ua(37,"div",13),ua(38,"div",14),da(39,"img",18),ua(40,"h6",16),qa(41,"Maintainer"),ha(),ha(),ua(42,"small"),qa(43," Maintainers have access to adding, changing and delete client resources such as accounts, storage and leaderboard records. They don't have access to the API Explorer or the console users. "),ha(),ha(),ua(44,"div",13),ua(45,"div",14),da(46,"img",19),ua(47,"h6",16),qa(48,"View Only"),ha(),ha(),ua(49,"small"),qa(50," View Only users can only view client resources but cannot make any changes to the data whatsoever. "),ha(),ha(),ha(),ha(),ra(51,bB,6,2,"ngb-alert",1),ua(52,"div",20),ua(53,"form",21),ya("ngSubmit",function(){return e.addUser()}),ua(54,"div",22),ua(55,"div",23),ua(56,"div",24),ua(57,"label",25),qa(58,"Email"),ha(),ha(),ua(59,"div",26),da(60,"input",27),ua(61,"div",28),qa(62,"Email is required"),ha(),ha(),ha(),ha(),ua(63,"div",22),ua(64,"div",23),ua(65,"div",24),ua(66,"label",29),qa(67,"Username"),ha(),ha(),ua(68,"div",26),da(69,"input",30),ua(70,"div",28),qa(71,"Username is required"),ha(),ha(),ha(),ha(),ua(72,"div",22),ua(73,"div",23),ua(74,"div",24),ua(75,"label",31),qa(76,"Password"),ha(),ha(),ua(77,"div",26),da(78,"input",32),ua(79,"div",28),qa(80,"Password is required, must be 8 chars or longer and consist of at least a capital letter, a small letter and a number."),ha(),ha(),ha(),ha(),ua(81,"div",22),ua(82,"div",23),ua(83,"div",24),ua(84,"label",33),qa(85,"Role"),ha(),ha(),ua(86,"div",26),ua(87,"div",34),ua(88,"button",35),ua(89,"span",36),qa(90,"Administrator"),ha(),ua(91,"span",36),qa(92,"Developer"),ha(),ua(93,"span",36),qa(94,"Maintainer"),ha(),ua(95,"span",36),qa(96,"View Only"),ha(),ha(),ua(97,"div",37),da(98,"button",38),ua(99,"div",39),ua(100,"button",40),ya("click",function(){return e.f.role.setValue(+e.adminRole)}),qa(101,"Administrator"),ha(),ua(102,"button",40),ya("click",function(){return e.f.role.setValue(+e.developerRole)}),qa(103,"Developer"),ha(),ua(104,"button",40),ya("click",function(){return e.f.role.setValue(+e.maintainerRole)}),qa(105,"Maintainer"),ha(),ua(106,"button",40),ya("click",function(){return e.f.role.setValue(+e.readonlyRole)}),qa(107,"View Only"),ha(),ha(),ha(),ha(),ua(108,"div",28),qa(109,"Role is required"),ha(),ha(),ha(),ha(),ua(110,"div",41),ua(111,"div",42),da(112,"div",24),ua(113,"div",26),ua(114,"div",43),da(115,"input",44),ua(116,"label",45),qa(117,"Subscribe to Heroic Labs' newsletters to receive latest updates to Nakama and other news."),ha(),ha(),ha(),ha(),ha(),ua(118,"div",46),ua(119,"button",47),qa(120,"Save"),ha(),ha(),ha(),ha()),2&t&&(gs(2),la("ngIf",e.error),gs(13),la("ngIf",0===e.users.length),gs(1),la("ngForOf",e.users),gs(3),la("type","secondary"),gs(32),la("ngIf",e.userCreateError),gs(2),la("formGroup",e.createUserForm),gs(7),la("ngClass",qc(18,wB,e.f.email.dirty&&e.f.email.errors)),gs(1),la("hidden",e.f.email.disabled||e.f.email.valid||e.f.email.pristine),gs(8),la("ngClass",qc(20,wB,e.f.username.dirty&&e.f.username.errors)),gs(1),la("hidden",e.f.username.disabled||e.f.username.valid||e.f.username.pristine),gs(8),la("ngClass",qc(22,wB,e.f.password.dirty&&e.f.password.errors)),gs(1),la("hidden",e.f.password.disabled||e.f.password.valid||e.f.password.pristine),gs(10),la("hidden",e.f.role.value!==+e.adminRole),gs(2),la("hidden",e.f.role.value!==+e.developerRole),gs(2),la("hidden",e.f.role.value!==+e.maintainerRole),gs(2),la("hidden",e.f.role.value!==+e.readonlyRole),gs(13),la("hidden",e.f.role.disabled||e.f.role.valid||e.f.role.pristine),gs(11),la("disabled",e.createUserForm.invalid))},directives:[Ed,Sd,QC,Jw,gw,tx,Gb,rx,pw,nx,_d,lk,ak,sk,rk,jb],styles:[".user-details[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background-color:#fff}.user-details[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:.6em 1em;font-weight:500}.user-details[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:.6em 1em}.alert-permissions[_ngcontent-%COMP%]{padding:0}.alert-permissions[_ngcontent-%COMP%] .alert-title[_ngcontent-%COMP%]{padding:1rem}.alert-permissions[_ngcontent-%COMP%] .flex-row[_ngcontent-%COMP%]{border-top:1px solid #dadae9;margin:0}.alert-permissions[_ngcontent-%COMP%] .flex-row[_ngcontent-%COMP%] .col[_ngcontent-%COMP%]{border-right:1px solid #dadae9}.alert-permissions[_ngcontent-%COMP%] .flex-row[_ngcontent-%COMP%] .col[_ngcontent-%COMP%]:last-child{border-right:none}"]}),t})(),_B=(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){return this.consoleService.listUsers("")}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function CB(t,e){if(1&t&&(ua(0,"ngb-alert",10),da(1,"img",11),ua(2,"h6",12),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("Failed to retrieve runtime information: ",t.error,"")}}function SB(t,e){if(1&t&&(ua(0,"tr"),ua(1,"td"),qa(2),ha(),ua(3,"td",13),qa(4),ha(),ha()),2&t){const t=e.$implicit;gs(2),Ya(t.path),gs(2),Ya(t.mod_time)}}function kB(t,e){1&t&&(ua(0,"tr"),ua(1,"td",14),qa(2,"No Go modules were found."),ha(),da(3,"td"),ha())}function EB(t,e){if(1&t&&(ua(0,"tr"),ua(1,"td"),qa(2),ha(),ua(3,"td",13),qa(4),ha(),ha()),2&t){const t=e.$implicit;gs(2),Ya(t.path),gs(2),Ya(t.mod_time)}}function AB(t,e){1&t&&(ua(0,"tr"),ua(1,"td",14),qa(2,"No Lua modules were found."),ha(),da(3,"td"),ha())}function DB(t,e){if(1&t&&(ua(0,"tr"),ua(1,"td"),qa(2),ha(),ua(3,"td",13),qa(4),ha(),ha()),2&t){const t=e.$implicit;gs(2),Ya(t.path),gs(2),Ya(t.mod_time)}}function TB(t,e){1&t&&(ua(0,"tr"),ua(1,"td",14),qa(2,"No JavaScript modules were found."),ha(),da(3,"td"),ha())}const RB=function(){return["/apiexplorer"]},FB=function(t){return{endpoint:t}};function MB(t,e){if(1&t&&(ua(0,"tr"),ua(1,"td"),ua(2,"code"),qa(3),ha(),ha(),ua(4,"td",15),ua(5,"a",16),qa(6,"API Explorer"),ha(),ha(),ha()),2&t){const t=e.$implicit;gs(3),Ya(t),gs(2),la("routerLink",Kc(3,RB))("queryParams",qc(4,FB,t))}}function LB(t,e){1&t&&(ua(0,"tr"),ua(1,"td",17),qa(2,"No Go RPC functions were found."),ha(),ha())}function $B(t,e){if(1&t&&(ua(0,"tr"),ua(1,"td"),ua(2,"code"),qa(3),ha(),ha(),ua(4,"td",15),ua(5,"a",16),qa(6,"API Explorer"),ha(),ha(),ha()),2&t){const t=e.$implicit;gs(3),Ya(t),gs(2),la("routerLink",Kc(3,RB))("queryParams",qc(4,FB,t))}}function OB(t,e){1&t&&(ua(0,"tr"),ua(1,"td",17),qa(2,"No Lua RPC functions were found."),ha(),ha())}function IB(t,e){if(1&t&&(ua(0,"tr"),ua(1,"td"),ua(2,"code"),qa(3),ha(),ha(),ua(4,"td",15),ua(5,"a",16),qa(6,"API Explorer"),ha(),ha(),ha()),2&t){const t=e.$implicit;gs(3),Ya(t),gs(2),la("routerLink",Kc(3,RB))("queryParams",qc(4,FB,t))}}function NB(t,e){1&t&&(ua(0,"tr"),ua(1,"td",17),qa(2,"No JavaScript RPC functions were found."),ha(),ha())}let PB=(()=>{class t{constructor(t,e){this.route=t,this.consoleService=e,this.error=""}ngOnInit(){this.route.data.subscribe(t=>{this.runtimeInfo=t[0]},t=>{this.error=t})}ngOnDestroy(){}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(Jx))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:51,vars:13,consts:[[1,"pb-4"],["type","danger",3,"dismissible",4,"ngIf"],[1,"runtime-table","mb-4","table","table-sm","table-bordered","mb-5"],[1,"thead-light"],[2,"width","180px"],[4,"ngFor","ngForOf"],[4,"ngIf"],["colspan","2"],[1,"mb-4","section-divider","d-flex"],[1,"runtime-table","table","table-sm","table-bordered"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","200px"],[1,"text-muted"],[2,"width","180px","text-align","center"],[1,"btn","btn-sm","btn-secondary",3,"routerLink","queryParams"],["colspan","2",1,"text-muted"]],template:function(t,e){1&t&&(ua(0,"h2",0),qa(1,"Runtime Modules"),ha(),ra(2,CB,4,2,"ngb-alert",1),ua(3,"table",2),ua(4,"thead",3),ua(5,"tr"),ua(6,"th"),qa(7,"Go Modules"),ha(),ua(8,"th",4),qa(9,"Last Modified"),ha(),ha(),ha(),ua(10,"tbody"),ra(11,SB,5,2,"tr",5),ra(12,kB,4,0,"tr",6),ha(),ua(13,"thead",3),ua(14,"tr"),ua(15,"th",7),qa(16,"Lua Modules"),ha(),ha(),ha(),ua(17,"tbody"),ra(18,EB,5,2,"tr",5),ra(19,AB,4,0,"tr",6),ha(),ua(20,"thead",3),ua(21,"tr"),ua(22,"th",7),qa(23,"JavaScript Modules"),ha(),ha(),ha(),ua(24,"tbody"),ra(25,DB,5,2,"tr",5),ra(26,TB,4,0,"tr",6),ha(),ha(),ua(27,"h4",8),qa(28,"Registered RPC Functions"),ha(),ua(29,"table",9),ua(30,"thead",3),ua(31,"tr"),ua(32,"th",7),qa(33,"Go RPC Functions"),ha(),ha(),ha(),ua(34,"tbody"),ra(35,MB,7,6,"tr",5),ra(36,LB,3,0,"tr",6),ha(),ua(37,"thead",3),ua(38,"tr"),ua(39,"th",7),qa(40,"Lua RPC Functions"),ha(),ha(),ha(),ua(41,"tbody"),ra(42,$B,7,6,"tr",5),ra(43,OB,3,0,"tr",6),ha(),ua(44,"thead",3),ua(45,"tr"),ua(46,"th",7),qa(47,"JavaScript RPC Functions"),ha(),ha(),ha(),ua(48,"tbody"),ra(49,IB,7,6,"tr",5),ra(50,NB,3,0,"tr",6),ha(),ha()),2&t&&(gs(2),la("ngIf",e.error),gs(9),la("ngForOf",e.runtimeInfo.go_modules),gs(1),la("ngIf",0===e.runtimeInfo.go_modules.length),gs(6),la("ngForOf",e.runtimeInfo.lua_modules),gs(1),la("ngIf",0===e.runtimeInfo.lua_modules.length),gs(6),la("ngForOf",e.runtimeInfo.js_modules),gs(1),la("ngIf",0===e.runtimeInfo.js_modules.length),gs(9),la("ngForOf",e.runtimeInfo.go_rpc_functions),gs(1),la("ngIf",0===e.runtimeInfo.go_rpc_functions.length),gs(6),la("ngForOf",e.runtimeInfo.lua_rpc_functions),gs(1),la("ngIf",0===e.runtimeInfo.lua_rpc_functions.length),gs(6),la("ngForOf",e.runtimeInfo.js_rpc_functions),gs(1),la("ngIf",0===e.runtimeInfo.js_rpc_functions.length))},directives:[Ed,Sd,QC,yb],styles:["label[_ngcontent-%COMP%]{margin-bottom:0}.opaque[_ngcontent-%COMP%]{opacity:1%}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.runtime-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background-color:#fff}.runtime-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:.6em 1em;font-weight:500}.runtime-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding-left:1em;padding-right:1em;vertical-align:middle}"]}),t})(),BB=(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){return this.consoleService.getRuntime("")}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function UB(t,e){1&t&&(ua(0,"span"),qa(1,"Filter by collection"),ha())}function VB(t,e){if(1&t&&(ua(0,"span"),qa(1),ha()),2&t){const t=xa();gs(1),Ya(t.f.collection.value)}}function HB(t,e){if(1&t){const t=ga();ua(0,"button",34),ya("click",function(){pn(t);const n=e.$implicit;return xa().f.collection.setValue(n)}),qa(1),ha()}if(2&t){const t=e.$implicit;gs(1),Ya(t)}}function jB(t,e){if(1&t&&(ua(0,"ngb-alert",35),da(1,"img",36),ua(2,"h6",37),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("Error when querying storage objects: ",t.error,"")}}function zB(t,e){1&t&&(ua(0,"th",38),qa(1,"Remove"),ha())}function WB(t,e){1&t&&(ua(0,"tr"),ua(1,"td",39),qa(2,"No storage objects found - change the filter criteria or add new objects."),ha(),ha())}function GB(t,e){if(1&t){const t=ga();ua(0,"td",42),ua(1,"button",43),ya("click",function(e){pn(t);const n=xa(),i=n.index,r=n.$implicit;return xa().deleteObject(e,i,r)}),qa(2,"Delete"),ha(),ha()}}function KB(t,e){if(1&t){const t=ga();ua(0,"tr"),ua(1,"td",40),ya("click",function(){pn(t);const n=e.$implicit;return xa().viewObject(n)}),qa(2),ha(),ua(3,"td",40),ya("click",function(){pn(t);const n=e.$implicit;return xa().viewObject(n)}),qa(4),ha(),ua(5,"td",40),ya("click",function(){pn(t);const n=e.$implicit;return xa().viewObject(n)}),qa(6),ha(),ua(7,"td",40),ya("click",function(){pn(t);const n=e.$implicit;return xa().viewObject(n)}),qa(8),ha(),ra(9,GB,3,0,"td",41),ha()}if(2&t){const t=e.$implicit,n=xa();gs(2),Ya(t.collection),gs(2),Ya(t.key),gs(2),Ya(t.user_id),gs(2),Ya(t.update_time),gs(1),la("ngIf",n.deleteAllowed())}}let qB=(()=>{class t{constructor(t,e,n,i,r){this.route=t,this.router=e,this.consoleService=n,this.authService=i,this.formBuilder=r,this.systemUserId="00000000-0000-0000-0000-000000000000",this.error="",this.collections=[],this.objects=[],this.objectCount=0,this.nextCursor="",this.prevCursor=""}ngOnInit(){this.searchForm=this.formBuilder.group({collection:[""],key:[""],user_id:[""]});const t=this.route.snapshot.queryParamMap;this.f.collection.setValue(t.get("collection")),this.f.key.setValue(t.get("key")),this.f.user_id.setValue(t.get("user_id")),this.nextCursor=t.get("cursor"),this.nextCursor&&""!==this.nextCursor?this.search(1):(this.f.collection.value||this.f.user_id.value)&&this.search(0),this.route.data.subscribe(t=>{this.collections.length=0,this.collections.push(...t[0].collections),this.objectCount=t[1].total_count,this.nextCursor=t[1].next_cursor,this.prevCursor=t[1].prev_cursor,this.objects.length=0,this.objects.push(...t[1].objects)},t=>{this.error=t})}disableSearch(){return!(!this.f.key.value||""===this.f.key.value||this.f.collection.value&&""!==this.f.collection.value)}search(t){let e="";switch(t){case-1:e=this.prevCursor;break;case 0:e="";break;case 1:e=this.nextCursor}this.consoleService.listStorage("",this.f.user_id.value,this.f.key.value,this.f.collection.value,e).subscribe(t=>{this.error="",this.objectCount=t.total_count,this.nextCursor=t.next_cursor,this.objects.length=0,this.objects.push(...t.objects),this.router.navigate([],{relativeTo:this.route,queryParams:{collection:this.f.collection.value,key:this.f.key.value,user_id:this.f.user_id.value,cursor:e},queryParamsHandling:"merge"})},t=>{this.error=t})}deleteObject(t,e,n){t.target.disabled=!0,t.preventDefault(),this.error="",this.consoleService.deleteStorageObject("",n.collection,n.key,n.user_id,n.version).subscribe(()=>{this.error="",this.objectCount--,this.objects.splice(e,1)},t=>{this.error=t})}deleteAllowed(){return this.authService.sessionRole<=Zx.USER_ROLE_DEVELOPER}viewObject(t){this.router.navigate(["/storage",t.collection,t.key,t.user_id],{relativeTo:this.route})}get f(){return this.searchForm.controls}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(mb),oa(Jx),oa(i_),oa(ox))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:50,vars:15,consts:[[1,"pb-1"],[1,"pb-4"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],[1,"input-group-prepend"],["ngbDropdown","",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary","dropdown-radius",3,"disabled"],[4,"ngIf"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",1,"btn","btn-secondary","text-secondary",3,"hidden","click"],[1,"dropdown-divider",3,"hidden"],["type","button","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],["type","text","formControlName","key","placeholder","Filter by key",1,"form-control"],["type","text","formControlName","user_id","placeholder","Filter by user ID",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"input-group-text",3,"click"],["src","/static/svg/purple-cog-1.svg","alt","","width","20","height","",1,"mr-1"],["type","submit",1,"btn","btn-primary",3,"disabled","click"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Basic example",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngFor","ngForOf"],["type","button","ngbDropdownItem","",3,"click"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(t,e){1&t&&(ua(0,"h2",0),qa(1,"Storage Objects"),ha(),ua(2,"h6",1),qa(3),ha(),ua(4,"div",2),ua(5,"div",3),ua(6,"div",4),ua(7,"form",5),ya("ngSubmit",function(){return e.search(0)}),ua(8,"div",6),ua(9,"div",7),ua(10,"div",8),ua(11,"button",9),ra(12,UB,2,0,"span",10),ra(13,VB,2,1,"span",10),ha(),ua(14,"div",11),ua(15,"button",12),ya("click",function(){return e.f.collection.reset()}),qa(16,"\u2718 Deselect collection"),ha(),da(17,"div",13),ra(18,HB,2,1,"button",14),ha(),ha(),ha(),da(19,"input",15),da(20,"input",16),ua(21,"div",17),ua(22,"span",18),ya("click",function(){return e.f.user_id.setValue(e.systemUserId)}),da(23,"img",19),ha(),ha(),ua(24,"div",17),ua(25,"button",20),ya("click",function(){return e.search(0)}),qa(26,"Search"),ha(),ha(),ha(),ha(),ha(),ua(27,"div",21),ua(28,"div",22),ua(29,"button",23),ya("click",function(){return e.search(0)}),da(30,"img",24),ha(),ua(31,"button",23),ya("click",function(){return e.search(1)}),da(32,"img",25),ha(),ha(),ha(),ha(),ha(),ra(33,jB,4,2,"ngb-alert",26),ua(34,"div",27),ua(35,"table",28),ua(36,"thead",29),ua(37,"tr"),ua(38,"th"),qa(39,"Collection Name"),ha(),ua(40,"th"),qa(41,"Key Name"),ha(),ua(42,"th",30),qa(43,"User ID"),ha(),ua(44,"th",31),qa(45,"Last Update"),ha(),ra(46,zB,2,0,"th",32),ha(),ha(),ua(47,"tbody"),ra(48,WB,3,0,"tr",10),ra(49,KB,10,5,"tr",33),ha(),ha(),ha()),2&t&&(gs(3),Xa("",e.objectCount," objects found."),gs(4),la("formGroup",e.searchForm),gs(4),la("disabled",0===e.collections.length),gs(1),la("ngIf",!e.f.collection.value||""===e.f.collection.value),gs(1),la("ngIf",e.f.collection.value&&""!==e.f.collection.value),gs(2),la("hidden",!e.f.collection.value||""===e.f.collection.value),gs(2),la("hidden",!e.f.collection.value||""===e.f.collection.value),gs(1),la("ngForOf",e.collections),gs(7),la("disabled",e.disableSearch()),gs(4),la("disabled",0===e.objects.length),gs(2),la("disabled",""===e.nextCursor),gs(2),la("ngIf",e.error),gs(13),la("ngIf",e.deleteAllowed()),gs(2),la("ngIf",0===e.objects.length),gs(1),la("ngForOf",e.objects))},directives:[Jw,gw,tx,lk,ak,Ed,sk,rk,Sd,Gb,pw,nx,QC],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:initial;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]}),t})(),YB=(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){return this.consoleService.listStorageCollections("")}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),XB=(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){const n=t.queryParamMap.get("collection"),i=t.queryParamMap.get("key"),r=t.queryParamMap.get("user_id");return this.consoleService.listStorage("",r,i,n,null)}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();var JB=n("bU/s");const QB=["editor"];function ZB(t,e){if(1&t&&(ua(0,"ngb-alert",37),da(1,"img",38),ua(2,"h6",39),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("Error while modifying storage object: ",t.error,"")}}function tU(t,e){1&t&&(ua(0,"ngb-alert",40),da(1,"img",41),ua(2,"h6",39),qa(3,"Storage object was modified successfully."),ha(),ha()),2&t&&la("dismissible",!1)}function eU(t,e){1&t&&(ua(0,"span"),qa(1,"Save as a copy"),ha())}function nU(t,e){1&t&&qa(0,"Save")}function iU(t,e){if(1&t&&(ua(0,"button",42),ra(1,eU,2,0,"span",43),ra(2,nU,1,0,"ng-template",null,44,xu),ha()),2&t){const t=sa(3),e=xa();la("disabled",e.updating),gs(1),la("ngIf",e.object.collection!==e.f.collection.value||e.object.key!==e.f.keyname.value||e.object.user_id!==e.f.user_id.value)("ngIfElse",t)}}const rU=function(){return["/storage"]},sU=function(t){return{collection:t}},oU=function(t,e){return{collection:t,key:e}},aU=function(t,e,n){return{collection:t,key:e,user_id:n}},lU=function(t){return{"is-invalid":t}};let cU=(()=>{class t{constructor(t,e,n,i,r){this.route=t,this.router=e,this.consoleService=n,this.authService=i,this.formBuilder=r,this.error="",this.updating=!1,this.updated=!1}ngOnInit(){this.objectForm=this.formBuilder.group({collection:["",Qb.required],keyname:["",Qb.required],user_id:["",Qb.required],permission_read:[0,Qb.required],permission_write:[0,Qb.required]}),this.route.data.subscribe(t=>{this.object=t[0],this.f.collection.setValue(this.object.collection),this.f.keyname.setValue(this.object.key),this.f.user_id.setValue(this.object.user_id),this.f.permission_read.setValue(this.object.permission_read),this.f.permission_write.setValue(this.object.permission_write),this.updateAllowed()||this.objectForm.disable()},t=>{this.error=t})}ngAfterViewInit(){JB.config.set("fontSize","14px"),JB.config.set("printMarginColumn",0),JB.config.set("useWorker",!0),JB.config.set("highlightSelectedWord",!0),JB.config.set("fontFamily",'"Courier New", Courier, monospace'),this.aceEditor=JB.edit(this.editor.nativeElement),this.aceEditor.setReadOnly(!this.updateAllowed());const t=JSON.stringify(JSON.parse(this.object.value),null,2);this.aceEditor.session.setValue(t)}updateObject(){this.error="",this.updated=!1,this.updating=!0;let t="";try{t=JSON.stringify(JSON.parse(this.aceEditor.session.getValue()))}catch(n){return this.error=n,void(this.updating=!1)}let e=this.object.version;this.object.collection===this.f.collection.value&&this.object.key===this.f.keyname.value&&this.object.user_id===this.f.user_id.value||(e=""),this.consoleService.writeStorageObject("",this.f.collection.value,this.f.keyname.value,this.f.user_id.value,{version:e,value:t,permission_read:this.f.permission_read.value,permission_write:this.f.permission_write.value}).subscribe(t=>{this.updated=!0,this.updating=!1,this.object.version=t.version,""===e&&(this.object.collection=this.f.collection.value,this.object.key=this.f.keyname.value,this.object.user_id=this.f.user_id.value,this.object.permission_read=this.f.permission_read.value,this.object.permission_write=this.f.permission_write.value)},t=>{this.error=t,this.updating=!1})}deleteObject(){this.error="",this.updated=!1,this.updating=!1;const t=this.object;this.consoleService.deleteStorageObject("",t.collection,t.key,t.user_id,t.version).subscribe(()=>{this.router.navigate(["/storage"],{relativeTo:this.route,queryParams:{collection:this.f.collection.value,key:this.f.key.value,user_id:this.f.user_id.value}})},t=>{this.error=t})}updateAllowed(){return this.authService.sessionRole<=Zx.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=Zx.USER_ROLE_MAINTAINER}get f(){return this.objectForm.controls}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(mb),oa(Jx),oa(i_),oa(ox))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){if(1&t&&fu(QB,!0),2&t){let t;hu(t=vu())&&(e.editor=t.first)}},decls:88,vars:50,consts:[[1,"pb-1"],[1,"storage-top-nav","d-flex","justify-content-between","align-items-baseline","mb-3"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink","queryParams"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","collection",1,"d-inline"],["type","text","id","collection","placeholder","Collection","required","","formControlName","collection",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","key",1,"d-inline"],["type","text","id","key","placeholder","Key","required","","formControlName","keyname",1,"form-control","form-control-sm","my-2",3,"ngClass"],["for","user_id",1,"d-inline"],["type","text","id","user_id","placeholder","User ID","required","","formControlName","user_id",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","permission_read",1,"d-inline"],["ngbRadioGroup","","id","permission_read","name","permission_read","formControlName","permission_read",1,"btn-group","btn-group-toggle"],["ngbButtonLabel","",1,"btn-outline-secondary"],["ngbButton","","type","radio",3,"disabled","value"],["for","version",1,"d-inline"],["type","text","id","version","placeholder","Version","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","permission_write",1,"d-inline"],["ngbRadioGroup","","id","permission_write","name","permission_write","formControlName","permission_write",1,"btn-group","btn-group-toggle"],[1,"row","add-border-single-row-bottom","mb-3"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","update_time",1,"d-inline"],["type","text","id","update_time","placeholder","Update Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"card","p-2","mt-3","mb-3",2,"height","500px"],[2,"height","500px"],["editor",""],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","submit",1,"btn","btn-primary",3,"disabled"],[4,"ngIf","ngIfElse"],["elseBlock",""]],template:function(t,e){1&t&&(ua(0,"h2",0),qa(1,"Storage Object"),ha(),ua(2,"div",1),ua(3,"nav",2),ua(4,"ol",3),ua(5,"li",4),qa(6,"Storage"),ha(),ua(7,"li",4),ua(8,"a",5),qa(9),ha(),ha(),ua(10,"li",4),ua(11,"a",5),qa(12),ha(),ha(),ua(13,"li",4),ua(14,"a",5),qa(15),ha(),ha(),ha(),ha(),ha(),ra(16,ZB,4,2,"ngb-alert",6),ra(17,tU,4,1,"ngb-alert",7),ua(18,"form",8),ya("ngSubmit",function(){return e.updateObject()}),ua(19,"div",9),ua(20,"div",10),ua(21,"div",11),ua(22,"label",12),qa(23,"Collection"),ha(),ha(),da(24,"input",13),ua(25,"div",14),qa(26,"Collection is required"),ha(),ha(),ua(27,"div",10),ua(28,"div",11),ua(29,"label",15),qa(30,"Key"),ha(),ha(),da(31,"input",16),ua(32,"div",14),qa(33,"Key is required"),ha(),ha(),ha(),ua(34,"div",9),ua(35,"div",10),ua(36,"div",11),ua(37,"label",17),qa(38,"User ID"),ha(),ha(),da(39,"input",18),ua(40,"div",14),qa(41,"User ID is required"),ha(),ha(),ua(42,"div",19),ua(43,"div",11),ua(44,"label",20),qa(45,"Read Permission"),ha(),ha(),ua(46,"div",21),ua(47,"label",22),da(48,"input",23),qa(49," No Read "),ha(),ua(50,"label",22),da(51,"input",23),qa(52," Owner Read "),ha(),ua(53,"label",22),da(54,"input",23),qa(55," Public Read "),ha(),ha(),ha(),ha(),ua(56,"div",9),ua(57,"div",10),ua(58,"div",11),ua(59,"label",24),qa(60,"Version"),ha(),ha(),da(61,"input",25),ha(),ua(62,"div",19),ua(63,"div",11),ua(64,"label",26),qa(65,"Write Permission"),ha(),ha(),ua(66,"div",27),ua(67,"label",22),da(68,"input",23),qa(69," No Write "),ha(),ua(70,"label",22),da(71,"input",23),qa(72," Owner Write "),ha(),ha(),ha(),ha(),ua(73,"div",28),ua(74,"div",10),ua(75,"div",11),ua(76,"label",29),qa(77,"Create Time"),ha(),ha(),da(78,"input",30),ha(),ua(79,"div",10),ua(80,"div",11),ua(81,"label",31),qa(82,"Update Time"),ha(),ha(),da(83,"input",32),ha(),ha(),ua(84,"div",33),da(85,"div",34,35),ha(),ra(87,iU,4,3,"button",36),ha()),2&t&&(gs(8),la("routerLink",Kc(32,rU))("queryParams",qc(33,sU,e.object.collection)),gs(1),Ya(e.object.collection),gs(2),la("routerLink",Kc(35,rU))("queryParams",Yc(36,oU,e.object.collection,e.object.key)),gs(1),Ya(e.object.key),gs(2),la("routerLink",Kc(39,rU))("queryParams",Xc(40,aU,e.object.collection,e.object.key,e.object.user_id)),gs(1),Ya(e.object.user_id),gs(1),la("ngIf",e.error),gs(1),la("ngIf",e.updated),gs(1),la("formGroup",e.objectForm),gs(6),la("ngClass",qc(44,lU,e.f.collection.dirty&&e.f.collection.errors)),gs(1),la("hidden",e.f.collection.disabled||e.f.collection.valid||e.f.collection.pristine),gs(6),la("ngClass",qc(46,lU,e.f.keyname.dirty&&e.f.keyname.errors)),gs(1),la("hidden",e.f.keyname.disabled||e.f.keyname.valid||e.f.keyname.pristine),gs(7),la("ngClass",qc(48,lU,e.f.user_id.dirty&&e.f.user_id.errors)),gs(1),la("hidden",e.f.user_id.disabled||e.f.user_id.valid||e.f.user_id.pristine),gs(8),la("disabled",!e.updateAllowed())("value",0),gs(3),la("disabled",!e.updateAllowed())("value",1),gs(3),la("disabled",!e.updateAllowed())("value",2),gs(7),la("value",e.object.version),gs(7),la("disabled",!e.updateAllowed())("value",0),gs(3),la("disabled",!e.updateAllowed())("value",1),gs(7),la("value",e.object.create_time),gs(5),la("value",e.object.update_time),gs(4),la("ngIf",e.updateAllowed()))},directives:[yb,Ed,Jw,gw,tx,Gb,rx,pw,nx,_d,sS,tS,oS,QC],styles:[".storage-top-nav[_ngcontent-%COMP%]{border-bottom:1px solid #dadae9;padding-bottom:1.5em}"]}),t})(),uU=(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){const n=t.paramMap.get("collection"),i=t.paramMap.get("key"),r=t.paramMap.get("user_id");return this.consoleService.getStorage("",n,i,r)}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function hU(t,e){if(1&t&&(ua(0,"ngb-alert",10),da(1,"img",11),ua(2,"h6",12),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("Error while processing request: ",t.error,"")}}function dU(t,e){1&t&&(ua(0,"th",13),qa(1,"Remove"),ha())}function fU(t,e){if(1&t){const t=ga();ua(0,"td",17),ya("click",function(){pn(t);const e=xa().$implicit;return xa().viewLeaderboardEntries(e)}),qa(1,"Yes"),ha()}}function pU(t,e){if(1&t){const t=ga();ua(0,"td",17),ya("click",function(){pn(t);const e=xa().$implicit;return xa().viewLeaderboardEntries(e)}),qa(1,"No"),ha()}}function gU(t,e){if(1&t){const t=ga();ua(0,"td",17),ya("click",function(){pn(t);const e=xa().$implicit;return xa().viewLeaderboardEntries(e)}),qa(1,"Yes"),ha()}}function mU(t,e){if(1&t){const t=ga();ua(0,"td",17),ya("click",function(){pn(t);const e=xa().$implicit;return xa().viewLeaderboardEntries(e)}),qa(1,"No"),ha()}}function vU(t,e){if(1&t){const t=ga();ua(0,"td",18),ua(1,"button",19),ya("click",function(e){pn(t);const n=xa(),i=n.index,r=n.$implicit;return xa().deleteLeaderboard(e,i,r)}),qa(2,"Delete"),ha(),ha()}}function yU(t,e){if(1&t){const t=ga();ua(0,"tr"),ua(1,"td",14),ya("click",function(){pn(t);const n=e.$implicit;return xa().viewLeaderboardEntries(n)}),qa(2),ha(),ua(3,"td",14),ya("click",function(){pn(t);const n=e.$implicit;return xa().viewLeaderboardEntries(n)}),qa(4),ha(),ua(5,"td",14),ya("click",function(){pn(t);const n=e.$implicit;return xa().viewLeaderboardEntries(n)}),qa(6),ha(),ua(7,"td",14),ya("click",function(){pn(t);const n=e.$implicit;return xa().viewLeaderboardEntries(n)}),qa(8),ha(),ra(9,fU,2,0,"td",15),ra(10,pU,2,0,"td",15),ra(11,gU,2,0,"td",15),ra(12,mU,2,0,"td",15),ra(13,vU,3,0,"td",16),ha()}if(2&t){const t=e.$implicit,n=xa();gs(2),Ya(t.id),gs(2),Ya(n.orderString[t.sort_order]),gs(2),Ya(n.operatorString[t.operator]),gs(2),Ya(""===t.reset_schedule?"-":t.reset_schedule),gs(1),la("ngIf",t.authoritative),gs(1),la("ngIf",!t.authoritative),gs(1),la("ngIf",t.tournament),gs(1),la("ngIf",!t.tournament),gs(1),la("ngIf",n.deleteAllowed())}}function bU(t,e){1&t&&(ua(0,"tr"),ua(1,"td",20),qa(2,"No leaderboards were found."),ha(),ha())}let wU=(()=>{class t{constructor(t,e,n,i){this.route=t,this.router=e,this.authService=n,this.consoleService=i,this.error="",this.leaderboards=[],this.orderString={0:"Ascending",1:"Descending"},this.operatorString={0:"Best",1:"Set",2:"Increment",3:"Decrement"}}ngOnInit(){this.route.data.subscribe(t=>{this.leaderboards.length=0,this.leaderboards.push(...t[0].leaderboards)},t=>{this.error=t})}deleteAllowed(){return this.authService.sessionRole<=Zx.USER_ROLE_DEVELOPER}deleteLeaderboard(t,e,n){t.target.disabled=!0,t.preventDefault(),this.error="",this.consoleService.deleteLeaderboard("",n.id).subscribe(()=>{this.error="",this.leaderboards.splice(e,1)},t=>{this.error=t})}viewLeaderboardEntries(t){this.router.navigate(["/leaderboards",t.id],{relativeTo:this.route})}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(mb),oa(i_),oa(Jx))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:24,vars:5,consts:[[1,"pb-1"],[1,"pb-4"],["type","danger",3,"dismissible",4,"ngIf"],[1,"table","table-sm","table-bordered","table-hover"],[1,"thead-light"],[2,"width","130px"],[2,"width","100px"],["style","width: 90px",4,"ngIf"],[4,"ngFor","ngForOf"],[4,"ngIf"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],[3,"click"],["class","text-center",3,"click",4,"ngIf"],["class","text-center",4,"ngIf"],[1,"text-center",3,"click"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],["colspan","7",1,"text-muted"]],template:function(t,e){1&t&&(ua(0,"h2",0),qa(1,"Leaderboards"),ha(),ua(2,"h6",1),qa(3),ha(),ra(4,hU,4,2,"ngb-alert",2),ua(5,"table",3),ua(6,"thead",4),ua(7,"tr"),ua(8,"th"),qa(9,"Leaderboard ID"),ha(),ua(10,"th",5),qa(11,"Sort Order"),ha(),ua(12,"th",5),qa(13,"Operator"),ha(),ua(14,"th",5),qa(15,"Reset Schedule"),ha(),ua(16,"th",6),qa(17,"Authoritative"),ha(),ua(18,"th",6),qa(19,"Tournament"),ha(),ra(20,dU,2,0,"th",7),ha(),ha(),ua(21,"tbody"),ra(22,yU,14,9,"tr",8),ra(23,bU,3,0,"tr",9),ha(),ha()),2&t&&(gs(3),Xa("",e.leaderboards.length," leaderboards found."),gs(1),la("ngIf",e.error),gs(16),la("ngIf",e.deleteAllowed()),gs(2),la("ngForOf",e.leaderboards),gs(1),la("ngIf",0===e.leaderboards.length))},directives:[Ed,Sd,QC],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}"]}),t})(),xU=(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){return this.consoleService.listLeaderboards("")}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function _U(t,e){if(1&t&&(ua(0,"ngb-alert",31),da(1,"img",32),ua(2,"h6",33),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("Error when querying accounts: ",t.error,"")}}function CU(t,e){1&t&&(ua(0,"th",34),qa(1,"Remove"),ha())}function SU(t,e){1&t&&(ua(0,"tr"),ua(1,"td",35),qa(2,"No users found - change the filter criteria or add new user accounts."),ha(),ha())}function kU(t,e){1&t&&da(0,"td")}function EU(t,e){if(1&t){const t=ga();ua(0,"td",38),ua(1,"button",39),ya("click",function(e){pn(t);const n=xa(),i=n.index,r=n.$implicit;return xa().deleteAccount(e,i,r)}),qa(2,"Delete"),ha(),ha()}}function AU(t,e){if(1&t){const t=ga();ua(0,"tr"),ua(1,"td",36),ya("click",function(){pn(t);const n=e.$implicit;return xa().viewAccount(n)}),qa(2),ha(),ua(3,"td",36),ya("click",function(){pn(t);const n=e.$implicit;return xa().viewAccount(n)}),qa(4),ha(),ua(5,"td",36),ya("click",function(){pn(t);const n=e.$implicit;return xa().viewAccount(n)}),qa(6),ha(),ua(7,"td",36),ya("click",function(){pn(t);const n=e.$implicit;return xa().viewAccount(n)}),qa(8),ha(),ra(9,kU,1,0,"td",29),ra(10,EU,3,0,"td",37),ha()}if(2&t){const t=e.$implicit,n=xa();gs(2),Ya(t.id),gs(2),Ya(t.username),gs(2),Ya(t.display_name),gs(2),Ya(t.update_time),gs(1),la("ngIf",n.deleteAllowed()&&t.id===n.systemUserId),gs(1),la("ngIf",n.deleteAllowed()&&t.id!==n.systemUserId)}}let DU=(()=>{class t{constructor(t,e,n,i,r){this.route=t,this.router=e,this.consoleService=n,this.authService=i,this.formBuilder=r,this.systemUserId="00000000-0000-0000-0000-000000000000",this.error="",this.accountsCount=0,this.accounts=[],this.nextCursor="",this.prevCursor=""}ngOnInit(){this.searchForm=this.formBuilder.group({filter:[""],filter_type:[0]});const t=this.route.snapshot.queryParamMap;this.f.filter.setValue(t.get("filter")),this.f.filter_type.setValue(+t.get("filter_type")),this.nextCursor=t.get("cursor"),this.nextCursor&&""!==this.nextCursor?this.search(1):(this.f.filter.value||this.f.filter_type.value)&&this.search(0),this.route.data.subscribe(t=>{this.accounts.length=0,t&&(this.accounts.push(...t[0].users),this.accountsCount=t[0].total_count,this.nextCursor=t[0].next_cursor,this.prevCursor=t[0].prev_cursor)},t=>{this.error=t})}search(t){let e="";switch(t){case-1:e=this.prevCursor;break;case 0:e="";break;case 1:e=this.nextCursor}this.consoleService.listAccounts("",this.f.filter.value,this.f.filter_type.value&&1===this.f.filter_type.value,e).subscribe(t=>{this.error="",this.accounts.length=0,this.accounts.push(...t.users),this.accountsCount=t.total_count,this.nextCursor=t.next_cursor,this.router.navigate([],{relativeTo:this.route,queryParams:{filter:this.f.filter.value,filter_type:this.f.filter_type.value,cursor:e},queryParamsHandling:"merge"})},t=>{this.error=t})}deleteAccount(t,e,n){t.target.disabled=!0,t.preventDefault(),this.error="",this.consoleService.deleteAccount("",n.id,!1).subscribe(()=>{this.error="",this.accounts.splice(e,1),this.accountsCount--},t=>{this.error=t})}deleteAllowed(){return this.authService.sessionRole<=Zx.USER_ROLE_DEVELOPER}viewAccount(t){this.router.navigate(["/accounts",t.id],{relativeTo:this.route})}get f(){return this.searchForm.controls}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(mb),oa(Jx),oa(i_),oa(ox))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:45,vars:9,consts:[[1,"pb-1"],[1,"pb-3"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],["type","text","formControlName","filter","placeholder","Filter by user ID or username (use '%' for wildcard search)",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"input-group-text",3,"click"],["src","/static/svg/purple-cog-1.svg","alt","","width","20","height","",1,"mr-1"],[1,"btn-group"],["type","button",1,"btn","btn-primary","dropdown-radius",3,"click"],["ngbDropdown","","role","group","aria-label","Button group with nested dropdown",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-primary","dropdown-toggle-split",3,"disabled"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Basic example",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(t,e){1&t&&(ua(0,"h2",0),qa(1,"User Accounts"),ha(),ua(2,"h6",1),qa(3),ha(),ua(4,"div",2),ua(5,"div",3),ua(6,"div",4),ua(7,"form",5),ya("ngSubmit",function(){return e.search(0)}),ua(8,"div",6),da(9,"input",7),ua(10,"div",8),ua(11,"span",9),ya("click",function(){return e.f.filter.setValue(e.systemUserId)}),da(12,"img",10),ha(),ha(),ua(13,"div",8),ua(14,"div",11),ua(15,"button",12),ya("click",function(){return e.f.filter_type.setValue(0),e.search(0)}),qa(16,"Search"),ha(),ua(17,"div",13),da(18,"button",14),ua(19,"div",15),ua(20,"button",16),ya("click",function(){return e.f.filter_type.setValue(1),e.search(0)}),qa(21,"Tombstones"),ha(),ha(),ha(),ha(),ha(),ha(),ha(),ha(),ua(22,"div",17),ua(23,"div",18),ua(24,"button",19),ya("click",function(){return e.search(0)}),da(25,"img",20),ha(),ua(26,"button",19),ya("click",function(){return e.search(1)}),da(27,"img",21),ha(),ha(),ha(),ha(),ha(),ra(28,_U,4,2,"ngb-alert",22),ua(29,"div",23),ua(30,"table",24),ua(31,"thead",25),ua(32,"tr"),ua(33,"th",26),qa(34,"User ID"),ha(),ua(35,"th"),qa(36,"Username"),ha(),ua(37,"th"),qa(38,"Display Name"),ha(),ua(39,"th",27),qa(40,"Last Update"),ha(),ra(41,CU,2,0,"th",28),ha(),ha(),ua(42,"tbody"),ra(43,SU,3,0,"tr",29),ra(44,AU,11,6,"tr",30),ha(),ha(),ha()),2&t&&(gs(3),Xa("",e.accountsCount," accounts found."),gs(4),la("formGroup",e.searchForm),gs(11),la("disabled",!e.f.filter.value||""===e.f.filter.value),gs(6),la("disabled",0===e.accounts.length),gs(2),la("disabled",""===e.nextCursor),gs(2),la("ngIf",e.error),gs(13),la("ngIf",e.deleteAllowed()),gs(2),la("ngIf",0===e.accounts.length),gs(1),la("ngForOf",e.accounts))},directives:[Jw,gw,tx,Gb,pw,nx,lk,ak,sk,rk,Ed,Sd,QC],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:initial;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]}),t})(),TU=(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){const n=t.queryParamMap.get("filter"),i=t.queryParamMap.get("tombstones");return this.consoleService.listAccounts("",n,"true"===i,null)}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function RU(t,e){if(1&t){const t=ga();ua(0,"button",15),ya("click",function(e){return pn(t),xa().exportAccount(e)}),da(1,"img",16),qa(2,"Export"),ha()}}function FU(t,e){1&t&&(ua(0,"span"),qa(1,"Unban"),ha())}function MU(t,e){1&t&&(ua(0,"span"),qa(1,"Ban"),ha())}function LU(t,e){if(1&t){const t=ga();ua(0,"button",15),ya("click",function(e){return pn(t),xa().banUnbanAccount(e)}),da(1,"img",17),ra(2,FU,2,0,"span",18),ra(3,MU,2,0,"span",18),ha()}if(2&t){const t=xa();gs(2),la("ngIf",t.account.disable_time),gs(1),la("ngIf",!t.account.disable_time)}}function $U(t,e){if(1&t){const t=ga();ua(0,"button",19),ya("click",function(e){return pn(t),xa().deleteAccount(e,!1)}),da(1,"img",20),qa(2,"Delete"),ha()}}function OU(t,e){if(1&t){const t=ga();ua(0,"button",19),ya("click",function(e){return pn(t),xa().deleteAccount(e,!0)}),da(1,"img",21),qa(2,"Recorded delete"),ha()}}function IU(t,e){if(1&t&&(ua(0,"ngb-alert",22),da(1,"img",23),ua(2,"h6",24),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("An error occurred: ",t.error,"")}}const NU=function(t,e){return["/accounts",t,e]};function PU(t,e){if(1&t&&(ua(0,"div"),fa(1,25),ua(2,"a",26),qa(3),ha(),pa(),ha()),2&t){const t=e.$implicit,n=xa();gs(1),la("ngbNavItem",t.path),gs(1),la("routerLink",Yc(3,NU,n.account.user.id,t.path)),gs(1),Ya(t.label)}}const BU=function(){return["/accounts"]},UU=function(){return["/storage"]},VU=function(t){return{user_id:t}};let HU=(()=>{class t{constructor(t,e,n,i){this.route=t,this.router=e,this.consoleService=n,this.authService=i,this.error="",this.views=[{label:"Profile",path:"profile"},{label:"Authentication",path:"authentication"},{label:"Friends",path:"friends"},{label:"Groups",path:"groups"},{label:"Wallet",path:"wallet"},{label:"Purchases",path:"purchases"}]}ngOnInit(){this.route.data.subscribe(t=>{this.account=t[0].account},t=>{this.error=t})}deleteAccount(t,e){t.target.disabled=!0,this.error="",this.consoleService.deleteAccount("",this.account.user.id,e).subscribe(()=>{this.error="",this.router.navigate(["/accounts"])},t=>{this.error=t})}banUnbanAccount(t){t.target.disabled=!0,this.error="",this.account.disable_time?this.consoleService.unbanAccount("",this.account.user.id).subscribe(()=>{this.error="",this.account.disable_time=null,t.target.disabled=!1},e=>{this.error=e,t.target.disabled=!1}):this.consoleService.banAccount("",this.account.user.id).subscribe(()=>{this.error="",this.account.disable_time=Date.now().toString(),t.target.disabled=!1},e=>{this.error=e,t.target.disabled=!1})}exportAccount(t){t.target.disabled=!0,this.error="",this.consoleService.exportAccount("",this.account.user.id).subscribe(e=>{this.error="";const n=this.account.user.id+"-export.json",i=JSON.stringify(e,null,2),r=(new TextEncoder).encode(i),s=new Blob([r],{type:"application/json;charset=utf-8"});Object(PP.saveAs)(s,n),t.target.disabled=!1},e=>{t.target.disabled=!1,this.error=e})}updateAllowed(){return this.authService.sessionRole<=Zx.USER_ROLE_MAINTAINER}exportAllowed(){return this.authService.sessionRole<=Zx.USER_ROLE_DEVELOPER}banAllowed(){return this.authService.sessionRole<=Zx.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=Zx.USER_ROLE_DEVELOPER}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(mb),oa(Jx),oa(i_))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:24,vars:14,consts:[[1,"pb-1"],[1,"account-top-nav","d-flex","justify-content-between","align-items-baseline","mb-4"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink"],[1,"breadcrumb-item","active"],["type","button","class","btn btn-outline-secondary mr-2",3,"click",4,"ngIf"],["type","button","class","btn btn-danger btn-danger-icon mr-2",3,"click",4,"ngIf"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["ngbNav","",1,"navbar-expand-sm","p-0","mb-3"],["accountNav","ngbNav"],[4,"ngFor","ngForOf"],["ngbNavItem","storage"],["ngbNavLink","",3,"routerLink","queryParams"],["type","button",1,"btn","btn-outline-secondary","mr-2",3,"click"],["src","/static/svg/export.svg","alt","","width","13","height","13",1,"mr-2"],["src","/static/svg/ban.svg","alt","","width","13","height","13",1,"mr-2"],[4,"ngIf"],["type","button",1,"btn","btn-danger","btn-danger-icon","mr-2",3,"click"],["src","/static/svg/bin-red.svg","alt","","width","14","height","",1,"mr-2"],["src","/static/svg/bin-recorded.svg","alt","","width","15","height","",1,"mr-2"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"ngbNavItem"],["ngbNavLink","","routerLinkActive","account-link-active",3,"routerLink"]],template:function(t,e){1&t&&(ua(0,"h2",0),qa(1,"User Account"),ha(),ua(2,"div",1),ua(3,"nav",2),ua(4,"ol",3),ua(5,"li",4),ua(6,"a",5),qa(7,"Account"),ha(),ha(),ua(8,"li",6),qa(9),ha(),ha(),ha(),ua(10,"div"),ra(11,RU,3,0,"button",7),ra(12,LU,4,2,"button",7),ra(13,$U,3,0,"button",8),ra(14,OU,3,0,"button",8),ha(),ha(),ra(15,IU,4,2,"ngb-alert",9),ua(16,"nav",10,11),ra(18,PU,4,6,"div",12),ua(19,"div"),fa(20,13),ua(21,"a",14),qa(22," Storage "),ha(),pa(),ha(),ha(),da(23,"router-outlet")),2&t&&(gs(6),la("routerLink",Kc(10,BU)),gs(3),Ya(e.account.user.id),gs(2),la("ngIf",e.exportAllowed()),gs(1),la("ngIf",e.banAllowed()),gs(1),la("ngIf",e.deleteAllowed()),gs(1),la("ngIf",e.deleteAllowed()),gs(1),la("ngIf",e.error),gs(3),la("ngForOf",e.views),gs(3),la("routerLink",Kc(11,UU))("queryParams",qc(12,VU,e.account.user.id)))},directives:[yb,Ed,Dk,Sd,Ak,Tk,xb,QC,wb],styles:[".nav-link[_ngcontent-%COMP%]{font-size:12px;font-family:Montserrat,sans-serif;text-transform:uppercase;letter-spacing:.1em;color:#000;opacity:.5;padding:0 0 1.6em;margin-right:3em;margin-bottom:-2px;font-weight:600}.nav-link[_ngcontent-%COMP%]:hover{opacity:1}.nav-link.account-link-active[_ngcontent-%COMP%]{opacity:1;border-bottom:2px solid #7668ed}.account-top-nav[_ngcontent-%COMP%], .navbar-expand-sm[_ngcontent-%COMP%]{border-bottom:1px solid #dadae9}.account-top-nav[_ngcontent-%COMP%]{padding-bottom:1.5em}"]}),t})(),jU=(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){const n=t.paramMap.get("id");return this.consoleService.getAccount("",n)}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const zU=["editor"];function WU(t,e){if(1&t&&(ua(0,"ngb-alert",29),da(1,"img",30),ua(2,"h6",31),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("An error occurred: ",t.error,"")}}function GU(t,e){1&t&&(ua(0,"ngb-alert",32),da(1,"img",33),ua(2,"h6",31),qa(3,"Account was modified successfully."),ha(),ha()),2&t&&la("dismissible",!1)}function KU(t,e){1&t&&(ua(0,"button",34),qa(1,"Save"),ha()),2&t&&la("disabled",xa().updating)}const qU=function(t){return{"is-invalid":t}};let YU=(()=>{class t{constructor(t,e,n,i,r){this.route=t,this.router=e,this.consoleService=n,this.authService=i,this.formBuilder=r,this.error="",this.updating=!1,this.updated=!1}ngOnInit(){this.accountForm=this.formBuilder.group({username:["",Qb.required],display_name:[""],avatar_url:[""],location:[""],timezone:[""]}),this.route.parent.data.subscribe(t=>{this.account=t[0].account,this.f.username.setValue(this.account.user.username),this.f.display_name.setValue(this.account.user.display_name),this.f.avatar_url.setValue(this.account.user.avatar_url),this.f.location.setValue(this.account.user.location),this.f.timezone.setValue(this.account.user.timezone),this.updateAllowed()||this.accountForm.disable()},t=>{this.error=t})}ngAfterViewInit(){JB.config.set("fontSize","14px"),JB.config.set("printMarginColumn",0),JB.config.set("useWorker",!0),JB.config.set("highlightSelectedWord",!0),JB.config.set("fontFamily",'"Courier New", Courier, monospace'),this.aceEditor=JB.edit(this.editor.nativeElement),this.aceEditor.setReadOnly(!this.updateAllowed());const t=JSON.stringify(JSON.parse(this.account.user.metadata),null,2);this.aceEditor.session.setValue(t)}updateAccount(){this.error="",this.updated=!1,this.updating=!0;let t="";try{t=JSON.stringify(JSON.parse(this.aceEditor.session.getValue()))}catch(e){return this.error=e,void(this.updating=!1)}this.consoleService.updateAccount("",this.account.user.id,{username:this.f.username.value,display_name:this.f.display_name.value,avatar_url:this.f.avatar_url.value,location:this.f.location.value,timezone:this.f.timezone.value,metadata:t}).subscribe(t=>{this.updated=!0,this.updating=!1},t=>{this.error=t,this.updating=!1})}updateAllowed(){return this.authService.sessionRole<=Zx.USER_ROLE_MAINTAINER}get f(){return this.accountForm.controls}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(mb),oa(Jx),oa(i_),oa(ox))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){if(1&t&&fu(zU,!0),2&t){let t;hu(t=vu())&&(e.editor=t.first)}},decls:53,vars:11,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","user_id",1,"d-inline"],["type","text","id","user_id","placeholder","User ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","username",1,"d-inline"],["type","text","id","username","placeholder","Username","required","","formControlName","username",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","display_name",1,"d-inline"],["type","text","id","display_name","placeholder","Display Name","formControlName","display_name",1,"form-control","form-control-sm","my-2"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","avatar_url",1,"d-inline"],["type","text","id","avatar_url","placeholder","Avatar URL","formControlName","avatar_url",1,"form-control","form-control-sm","my-2"],["for","location",1,"d-inline"],["type","text","id","location","placeholder","Location","formControlName","location",1,"form-control","form-control-sm","my-2"],["for","timezone",1,"d-inline"],["type","text","id","timezone","placeholder","Timezone","formControlName","timezone",1,"form-control","form-control-sm","my-2"],[1,"row","mb-3","add-border-single-row-bottom"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","update_time",1,"d-inline"],["type","text","id","update_time","placeholder","Update Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"card","p-2","mb-3",2,"height","400px"],[2,"height","400px"],["editor",""],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(t,e){1&t&&(ra(0,WU,4,2,"ngb-alert",0),ra(1,GU,4,1,"ngb-alert",1),ua(2,"form",2),ya("ngSubmit",function(){return e.updateAccount()}),ua(3,"div",3),ua(4,"div",4),ua(5,"div",5),ua(6,"label",6),qa(7,"User ID"),ha(),ha(),da(8,"input",7),ha(),ua(9,"div",4),ua(10,"div",5),ua(11,"label",8),qa(12,"Username"),ha(),ha(),da(13,"input",9),ua(14,"div",10),qa(15,"Username is required"),ha(),ha(),ha(),ua(16,"div",3),ua(17,"div",4),ua(18,"div",5),ua(19,"label",11),qa(20,"Display Name"),ha(),ha(),da(21,"input",12),ha(),ua(22,"div",13),ua(23,"div",5),ua(24,"label",14),qa(25,"Avatar URL"),ha(),ha(),da(26,"input",15),ha(),ha(),ua(27,"div",3),ua(28,"div",4),ua(29,"div",5),ua(30,"label",16),qa(31,"Location"),ha(),ha(),da(32,"input",17),ha(),ua(33,"div",13),ua(34,"div",5),ua(35,"label",18),qa(36,"Timezone"),ha(),ha(),da(37,"input",19),ha(),ha(),ua(38,"div",20),ua(39,"div",4),ua(40,"div",5),ua(41,"label",21),qa(42,"Create Time"),ha(),ha(),da(43,"input",22),ha(),ua(44,"div",4),ua(45,"div",5),ua(46,"label",23),qa(47,"Update Time"),ha(),ha(),da(48,"input",24),ha(),ha(),ua(49,"div",25),da(50,"div",26,27),ha(),ra(52,KU,2,1,"button",28),ha()),2&t&&(la("ngIf",e.error),gs(1),la("ngIf",e.updated),gs(1),la("formGroup",e.accountForm),gs(6),la("value",e.account.user.id),gs(5),la("ngClass",qc(9,qU,e.f.username.dirty&&e.f.username.errors)),gs(1),la("hidden",e.f.username.disabled||e.f.username.valid||e.f.username.pristine),gs(29),la("value",e.account.user.create_time),gs(5),la("value",e.account.user.create_time),gs(4),la("ngIf",e.updateAllowed()))},directives:[Ed,Jw,gw,tx,Gb,rx,pw,nx,_d,QC],styles:[""]}),t})();function XU(t,e){if(1&t&&(ua(0,"ngb-alert",34),da(1,"img",35),ua(2,"h6",36),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("An error occurred: ",t.error,"")}}function JU(t,e){1&t&&(ua(0,"ngb-alert",37),da(1,"img",38),ua(2,"h6",36),qa(3,"Account was modified successfully."),ha(),ha()),2&t&&la("dismissible",!1)}function QU(t,e){if(1&t&&(ua(0,"option",39),qa(1),ha()),2&t){const t=e.$implicit,n=e.index;ka("value",n),la("selected",0===n),gs(1),Ya(t.id)}}function ZU(t,e){1&t&&(ua(0,"button",40),qa(1,"Save"),ha()),2&t&&la("disabled",xa().updating)}let tV=(()=>{class t{constructor(t,e,n,i,r){this.route=t,this.router=e,this.consoleService=n,this.authService=i,this.formBuilder=r,this.error="",this.updating=!1,this.updated=!1}ngOnInit(){this.accountForm=this.formBuilder.group({email:[""],password:[""],selected_device_id_index:[""]}),this.route.parent.data.subscribe(t=>{this.account=t[0].account,this.f.email.setValue(this.account.email),this.f.password.setValue(""),this.f.selected_device_id_index.setValue(0),0===this.account.devices.length&&this.f.selected_device_id_index.disable(),this.updateAllowed()||this.accountForm.disable()},t=>{this.error=t})}updateAccount(){this.error="",this.updated=!1,this.updating=!0;const t={email:this.f.email.value};this.f.password.dirty&&(t.password=this.f.password.value),this.consoleService.updateAccount("",this.account.user.id,t).subscribe(t=>{this.updated=!0,this.updating=!1,this.f.password.reset()},t=>{this.error=t,this.updating=!1})}unlinkDeviceId(t){t.target.disabled=!0,this.error="",this.consoleService.unlinkDevice("",this.account.user.id,{device_id:this.account.devices[this.f.selected_device_id_index.value].id}).subscribe(()=>{this.error="",this.account.devices.splice(this.f.selected_device_id_index.value,1),this.f.selected_device_id_index.setValue(0)},t=>{this.error=t})}unlinkCustomID(t){t.target.disabled=!0,this.error="",this.consoleService.unlinkCustom("",this.account.user.id).subscribe(()=>{this.error="",this.account.custom_id=null},t=>{this.error=t})}unlinkFacebook(t){t.target.disabled=!0,this.error="",this.consoleService.unlinkFacebook("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.facebook_id=null},t=>{this.error=t})}unlinkFacebookInstantGames(t){t.target.disabled=!0,this.error="",this.consoleService.unlinkFacebookInstantGame("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.facebook_instant_game_id=null},t=>{this.error=t})}unlinkApple(t){t.target.disabled=!0,this.error="",this.consoleService.unlinkApple("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.apple_id=null},t=>{this.error=t})}unlinkGameCenter(t){t.target.disabled=!0,this.error="",this.consoleService.unlinkGameCenter("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.gamecenter_id=null},t=>{this.error=t})}unlinkGoogle(t){t.target.disabled=!0,this.error="",this.consoleService.unlinkGoogle("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.google_id=null},t=>{this.error=t})}unlinkSteam(t){t.target.disabled=!0,this.error="",this.consoleService.unlinkSteam("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.steam_id=null},t=>{this.error=t})}updateAllowed(){return this.authService.sessionRole<=Zx.USER_ROLE_MAINTAINER}get f(){return this.accountForm.controls}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(mb),oa(Jx),oa(i_),oa(ox))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:99,vars:21,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","selected_device_id_index",1,"d-inline"],[1,"input-group"],["id","selected_device_id_index","formControlName","selected_device_id_index",1,"form-control","custom-select","custom-select-sm"],[3,"value","selected",4,"ngFor","ngForOf"],[1,"input-group-append"],["type","button",1,"btn","btn-sm","btn-outline-danger",3,"disabled","click"],["for","custom_id",1,"d-inline"],["type","text","id","custom_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","facebook_id",1,"d-inline"],["type","text","id","facebook_id","disabled","",1,"form-control","form-control-sm",3,"value"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","facebook_instant_game_id",1,"d-inline"],["type","text","id","facebook_instant_game_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","apple_id",1,"d-inline"],["type","text","id","apple_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","gamecenter_id",1,"d-inline"],["type","text","id","gamecenter_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","google_id",1,"d-inline"],["type","text","id","google_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","steam_id",1,"d-inline"],["type","text","id","steam_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","email",1,"d-inline"],["type","text","id","email","placeholder","Email","formControlName","email",1,"form-control","form-control-sm"],["for","password",1,"d-inline"],["type","text","id","password","placeholder","Password","formControlName","password",1,"form-control","form-control-sm"],[1,"row","remove-sides"],[1,"small"],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],[3,"value","selected"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(t,e){1&t&&(ra(0,XU,4,2,"ngb-alert",0),ra(1,JU,4,1,"ngb-alert",1),ua(2,"form",2),ya("ngSubmit",function(){return e.updateAccount()}),ua(3,"div",3),ua(4,"div",4),ua(5,"div",5),ua(6,"label",6),qa(7,"Device IDs"),ha(),ha(),ua(8,"div",7),ua(9,"select",8),ra(10,QU,2,3,"option",9),ha(),ua(11,"div",10),ua(12,"button",11),ya("click",function(t){return e.unlinkDeviceId(t)}),qa(13,"Unlink"),ha(),ha(),ha(),ha(),ua(14,"div",4),ua(15,"div",5),ua(16,"label",12),qa(17,"Custom ID"),ha(),ha(),ua(18,"div",7),da(19,"input",13),ua(20,"div",10),ua(21,"button",11),ya("click",function(t){return e.unlinkCustomID(t)}),qa(22,"Unlink"),ha(),ha(),ha(),ha(),ha(),ua(23,"div",3),ua(24,"div",4),ua(25,"div",5),ua(26,"label",14),qa(27,"Facebook ID"),ha(),ha(),ua(28,"div",7),da(29,"input",15),ua(30,"div",10),ua(31,"button",11),ya("click",function(t){return e.unlinkFacebook(t)}),qa(32,"Unlink"),ha(),ha(),ha(),ha(),ua(33,"div",16),ua(34,"div",5),ua(35,"label",17),qa(36,"FB Instant Game ID"),ha(),ha(),ua(37,"div",7),da(38,"input",18),ua(39,"div",10),ua(40,"button",11),ya("click",function(t){return e.unlinkFacebookInstantGames(t)}),qa(41,"Unlink"),ha(),ha(),ha(),ha(),ha(),ua(42,"div",3),ua(43,"div",4),ua(44,"div",5),ua(45,"label",19),qa(46,"Apple ID"),ha(),ha(),ua(47,"div",7),da(48,"input",20),ua(49,"div",10),ua(50,"button",11),ya("click",function(t){return e.unlinkApple(t)}),qa(51,"Unlink"),ha(),ha(),ha(),ha(),ua(52,"div",16),ua(53,"div",5),ua(54,"label",21),qa(55,"GameCenter ID"),ha(),ha(),ua(56,"div",7),da(57,"input",22),ua(58,"div",10),ua(59,"button",11),ya("click",function(t){return e.unlinkGameCenter(t)}),qa(60,"Unlink"),ha(),ha(),ha(),ha(),ha(),ua(61,"div",3),ua(62,"div",4),ua(63,"div",5),ua(64,"label",23),qa(65,"Google ID"),ha(),ha(),ua(66,"div",7),da(67,"input",24),ua(68,"div",10),ua(69,"button",11),ya("click",function(t){return e.unlinkGoogle(t)}),qa(70,"Unlink"),ha(),ha(),ha(),ha(),ua(71,"div",4),ua(72,"div",5),ua(73,"label",25),qa(74,"Steam ID"),ha(),ha(),ua(75,"div",7),da(76,"input",26),ua(77,"div",10),ua(78,"button",11),ya("click",function(t){return e.unlinkGoogle(t)}),qa(79,"Unlink"),ha(),ha(),ha(),ha(),ha(),ua(80,"div",3),ua(81,"div",4),ua(82,"div",5),ua(83,"label",27),qa(84,"Email"),ha(),da(85,"br"),ha(),da(86,"input",28),ha(),ua(87,"div",4),ua(88,"div",5),ua(89,"label",29),qa(90,"password"),ha(),ha(),da(91,"input",30),ha(),ha(),ua(92,"div",31),ua(93,"div",4),da(94,"div",5),ua(95,"span",32),qa(96),ha(),ha(),da(97,"div",4),ha(),ra(98,ZU,2,1,"button",33),ha()),2&t&&(la("ngIf",e.error),gs(1),la("ngIf",e.updated),gs(1),la("formGroup",e.accountForm),gs(8),la("ngForOf",e.account.devices),gs(2),la("disabled",!e.updateAllowed()||0===e.account.devices.length),gs(7),la("value",e.account.custom_id),gs(2),la("disabled",!e.updateAllowed()||!e.account.custom_id||""===e.account.custom_id),gs(8),la("value",e.account.user.facebook_id),gs(2),la("disabled",!e.updateAllowed()||!e.account.user.facebook_id||""===e.account.user.facebook_id),gs(7),la("value",e.account.user.facebook_instant_game_id),gs(2),la("disabled",!e.updateAllowed()||!e.account.user.facebook_instant_game_id||""===e.account.user.facebook_instant_game_id),gs(8),la("value",e.account.user.apple_id),gs(2),la("disabled",!e.updateAllowed()||!e.account.user.apple_id||""===e.account.user.apple_id),gs(7),la("value",e.account.user.gamecenter_id),gs(2),la("disabled",!e.updateAllowed()||!e.account.user.gamecenter_id||""===e.account.user.gamecenter_id),gs(8),la("value",e.account.user.google_id),gs(2),la("disabled",!e.updateAllowed()||!e.account.user.google_id||""===e.account.user.google_id),gs(7),la("value",e.account.user.steam_id),gs(2),la("disabled",!e.updateAllowed()||!e.account.user.steam_id||""===e.account.user.steam_id),gs(18),Xa("Verification Status: ",null===e.account.verify_time?"Not Verified":"Verified",""),gs(2),la("ngIf",e.updateAllowed()))},directives:[Ed,Jw,gw,tx,Pw,pw,nx,Sd,Gb,QC,Bw,jw],styles:[""]}),t})();const eV=["editor"];function nV(t,e){if(1&t&&(ua(0,"ngb-alert",15),da(1,"img",16),ua(2,"h6",17),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("An error occurred: ",t.error,"")}}function iV(t,e){1&t&&(ua(0,"ngb-alert",18),da(1,"img",19),ua(2,"h6",17),qa(3,"Account was modified successfully."),ha(),ha()),2&t&&la("dismissible",!1)}function rV(t,e){if(1&t){const t=ga();ua(0,"button",20),ya("click",function(){return pn(t),xa().updateWallet()}),qa(1,"Save"),ha()}2&t&&la("disabled",xa().updating)}function sV(t,e){1&t&&(ua(0,"th",21),qa(1,"Remove"),ha())}function oV(t,e){1&t&&(ua(0,"tr"),ua(1,"td",22),qa(2,"No wallet ledger items found."),ha(),ha())}function aV(t,e){1&t&&da(0,"div",28)}function lV(t,e){1&t&&da(0,"div",29)}function cV(t,e){if(1&t){const t=ga();ua(0,"td"),ua(1,"button",30),ya("click",function(e){pn(t);const n=xa(),i=n.index,r=n.$implicit;return xa().deleteLedgerItem(e,i,r)}),qa(2,"Delete"),ha(),ha()}}function uV(t,e){if(1&t&&(ua(0,"tr"),ua(1,"td",31),ua(2,"pre",32),ua(3,"small"),qa(4),ha(),ha(),ha(),ha()),2&t){const t=xa().$implicit;gs(4),Ya(t.metadata)}}function hV(t,e){if(1&t){const t=ga();ua(0,"tr"),ua(1,"td"),ua(2,"div",23),ya("click",function(){pn(t);const n=e.index,i=xa();return i.walletLedgerMetadataOpen[n]=!i.walletLedgerMetadataOpen[n]}),ra(3,aV,1,0,"div",24),ra(4,lV,1,0,"div",25),ha(),qa(5),ha(),ua(6,"td",26),ua(7,"pre",27),qa(8),ha(),ha(),ua(9,"td"),qa(10),ha(),ra(11,cV,3,0,"td",13),ha(),ra(12,uV,5,1,"tr",13)}if(2&t){const t=e.index,n=e.$implicit,i=xa();gs(3),la("ngIf",!i.walletLedgerMetadataOpen[t]),gs(1),la("ngIf",i.walletLedgerMetadataOpen[t]),gs(1),Xa(" ",n.id," "),gs(3),Ya(n.changeset),gs(2),Ya(n.update_time),gs(1),la("ngIf",i.deleteAllowed()),gs(1),la("ngIf",i.walletLedgerMetadataOpen[t])}}let dV=(()=>{class t{constructor(t,e,n,i){this.route=t,this.router=e,this.consoleService=n,this.authService=i,this.error="",this.walletLedger=[],this.walletLedgerMetadataOpen=[],this.updating=!1,this.updated=!1}ngOnInit(){this.route.data.subscribe(t=>{this.walletLedger.length=0,this.walletLedger.push(...t[0].items),this.walletLedgerMetadataOpen.length=this.walletLedger.length},t=>{this.error=t}),this.route.parent.data.subscribe(t=>{this.account=t[0].account},t=>{this.error=t})}ngAfterViewInit(){JB.config.set("fontSize","14px"),JB.config.set("printMarginColumn",0),JB.config.set("useWorker",!0),JB.config.set("highlightSelectedWord",!0),JB.config.set("fontFamily",'"Courier New", Courier, monospace'),this.aceEditor=JB.edit(this.editor.nativeElement),this.aceEditor.setReadOnly(!this.updateAllowed());const t=JSON.stringify(JSON.parse(this.account.wallet),null,2);this.aceEditor.session.setValue(t)}updateWallet(){this.error="",this.updated=!1,this.updating=!0;let t="";try{t=JSON.stringify(JSON.parse(this.aceEditor.session.getValue()))}catch(e){return this.error=e,void(this.updating=!1)}this.consoleService.updateAccount("",this.account.user.id,{wallet:t}).subscribe(t=>{this.updated=!0,this.updating=!1},t=>{this.error=t,this.updating=!1})}updateAllowed(){return this.authService.sessionRole<=Zx.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=Zx.USER_ROLE_MAINTAINER}deleteLedgerItem(t,e,n){t.target.disabled=!0,t.preventDefault(),this.error="",this.consoleService.deleteWalletLedger("",this.account.user.id,n.id).subscribe(()=>{this.error="",this.walletLedger.splice(e,1),this.walletLedgerMetadataOpen.splice(e,1)},t=>{this.error=t})}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(mb),oa(Jx),oa(i_))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){if(1&t&&fu(eV,!0),2&t){let t;hu(t=vu())&&(e.editor=t.first)}},decls:21,vars:6,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"card","p-2","mb-3",2,"height","400px"],[2,"height","400px"],["editor",""],["type","button","class","btn btn-primary",3,"disabled","click",4,"ngIf"],[1,"my-4"],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered"],[1,"thead-light"],[2,"width","315px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],["ngFor","",3,"ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","button",1,"btn","btn-primary",3,"disabled","click"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],[1,"align-middle"],[1,"m-0","p-0"],[1,"arrow-right"],[1,"arrow-down"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],["colspan","5",1,"align-middle"],[1,"pre-wrap","m-0","p-0"]],template:function(t,e){1&t&&(ra(0,nV,4,2,"ngb-alert",0),ra(1,iV,4,1,"ngb-alert",1),ua(2,"div",2),da(3,"div",3,4),ha(),ra(5,rV,2,1,"button",5),da(6,"hr",6),ua(7,"div",7),ua(8,"table",8),ua(9,"thead",9),ua(10,"tr"),ua(11,"th",10),qa(12,"ID"),ha(),ua(13,"th"),qa(14,"Changeset"),ha(),ua(15,"th",11),qa(16,"Update Time"),ha(),ra(17,sV,2,0,"th",12),ha(),ha(),ua(18,"tbody"),ra(19,oV,3,0,"tr",13),ra(20,hV,13,7,"ng-template",14),ha(),ha(),ha()),2&t&&(la("ngIf",e.error),gs(1),la("ngIf",e.updated),gs(4),la("ngIf",e.updateAllowed()),gs(12),la("ngIf",e.deleteAllowed()),gs(2),la("ngIf",0===e.walletLedger.length),gs(1),la("ngForOf",e.walletLedger))},directives:[Ed,Sd,QC],styles:[".pre-wrap[_ngcontent-%COMP%]{word-wrap:anywhere;word-break:break-all;white-space:pre-wrap}"]}),t})(),fV=(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){const n=t.parent.paramMap.get("id");return this.consoleService.getWalletLedger("",n)}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function pV(t,e){if(1&t&&(ua(0,"ngb-alert",10),da(1,"img",11),ua(2,"h6",12),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("An error occurred: ",t.error,"")}}function gV(t,e){1&t&&(ua(0,"th",13),qa(1,"Remove"),ha())}function mV(t,e){1&t&&(ua(0,"tr"),ua(1,"td",14),qa(2,"No friends found."),ha(),ha())}function vV(t,e){1&t&&(ua(0,"span"),qa(1,"Friend (0)"),ha())}function yV(t,e){1&t&&(ua(0,"span"),qa(1,"Invite Sent (1)"),ha())}function bV(t,e){1&t&&(ua(0,"span"),qa(1,"Invite Received (2)"),ha())}function wV(t,e){1&t&&(ua(0,"span"),qa(1,"Blocked (3)"),ha())}function xV(t,e){if(1&t){const t=ga();ua(0,"td",16),ua(1,"button",17),ya("click",function(e){pn(t);const n=xa(),i=n.index,r=n.$implicit;return xa().deleteFriend(e,i,r)}),qa(2,"Delete"),ha(),ha()}}function _V(t,e){if(1&t&&(ua(0,"tr"),ua(1,"td"),qa(2),ha(),ua(3,"td"),qa(4),ha(),ua(5,"td"),ra(6,vV,2,0,"span",8),ra(7,yV,2,0,"span",8),ra(8,bV,2,0,"span",8),ra(9,wV,2,0,"span",8),ha(),ua(10,"td"),qa(11),ha(),ra(12,xV,3,0,"td",15),ha()),2&t){const t=e.$implicit,n=xa();gs(2),Ya(t.user.id),gs(2),Ya(t.user.username),gs(2),la("ngIf",0===t.state),gs(1),la("ngIf",1===t.state),gs(1),la("ngIf",2===t.state),gs(1),la("ngIf",3===t.state),gs(2),Ya(t.update_time),gs(1),la("ngIf",n.deleteAllowed())}}let CV=(()=>{class t{constructor(t,e,n,i){this.route=t,this.router=e,this.consoleService=n,this.authService=i,this.error="",this.friends=[]}ngOnInit(){this.route.data.subscribe(t=>{this.friends.length=0,this.friends.push(...t[0].friends)},t=>{this.error=t}),this.route.parent.data.subscribe(t=>{this.account=t[0].account},t=>{this.error=t})}deleteAllowed(){return this.authService.sessionRole<=Zx.USER_ROLE_MAINTAINER}deleteFriend(t,e,n){t.target.disabled=!0,t.preventDefault(),this.error="",this.consoleService.deleteFriend("",this.account.user.id,n.user.id).subscribe(()=>{this.error="",this.friends.splice(e,1)},t=>{this.error=t})}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(mb),oa(Jx),oa(i_))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:17,vars:4,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","300px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(t,e){1&t&&(ra(0,pV,4,2,"ngb-alert",0),ua(1,"div",1),ua(2,"table",2),ua(3,"thead",3),ua(4,"tr"),ua(5,"th",4),qa(6,"User ID"),ha(),ua(7,"th"),qa(8,"Username"),ha(),ua(9,"th",5),qa(10,"State"),ha(),ua(11,"th",6),qa(12,"Update Time"),ha(),ra(13,gV,2,0,"th",7),ha(),ha(),ua(14,"tbody"),ra(15,mV,3,0,"tr",8),ra(16,_V,13,8,"tr",9),ha(),ha(),ha()),2&t&&(la("ngIf",e.error),gs(13),la("ngIf",e.deleteAllowed()),gs(2),la("ngIf",0===e.friends.length),gs(1),la("ngForOf",e.friends))},directives:[Ed,Sd,QC],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}"]}),t})(),SV=(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){const n=t.parent.paramMap.get("id");return this.consoleService.getFriends("",n)}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function kV(t,e){if(1&t&&(ua(0,"ngb-alert",10),da(1,"img",11),ua(2,"h6",12),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("An error occurred: ",t.error,"")}}function EV(t,e){1&t&&(ua(0,"th",13),qa(1,"Remove"),ha())}function AV(t,e){1&t&&(ua(0,"tr"),ua(1,"td",14),qa(2,"No group membership found."),ha(),ha())}function DV(t,e){1&t&&(ua(0,"span"),qa(1,"Superadmin (0)"),ha())}function TV(t,e){1&t&&(ua(0,"span"),qa(1,"Admin (1)"),ha())}function RV(t,e){1&t&&(ua(0,"span"),qa(1,"Member (2)"),ha())}function FV(t,e){1&t&&(ua(0,"span"),qa(1,"Join Request (3)"),ha())}function MV(t,e){1&t&&(ua(0,"span"),qa(1,"Banned (4)"),ha())}function LV(t,e){if(1&t){const t=ga();ua(0,"td"),ua(1,"button",15),ya("click",function(e){pn(t);const n=xa(),i=n.index,r=n.$implicit;return xa().deleteGroupUser(e,i,r)}),qa(2,"Delete"),ha(),ha()}}function $V(t,e){if(1&t&&(ua(0,"tr"),ua(1,"td"),qa(2),ha(),ua(3,"td"),qa(4),ha(),ua(5,"td"),ra(6,DV,2,0,"span",8),ra(7,TV,2,0,"span",8),ra(8,RV,2,0,"span",8),ra(9,FV,2,0,"span",8),ra(10,MV,2,0,"span",8),ha(),ua(11,"td"),qa(12),ha(),ra(13,LV,3,0,"td",8),ha()),2&t){const t=e.$implicit,n=xa();gs(2),Ya(t.group.id),gs(2),Ya(t.group.name),gs(2),la("ngIf",0===t.state),gs(1),la("ngIf",1===t.state),gs(1),la("ngIf",2===t.state),gs(1),la("ngIf",3===t.state),gs(1),la("ngIf",4===t.state),gs(2),Ya(t.group.update_time),gs(1),la("ngIf",n.deleteAllowed())}}let OV=(()=>{class t{constructor(t,e,n,i){this.route=t,this.router=e,this.consoleService=n,this.authService=i,this.error="",this.groups=[]}ngOnInit(){this.route.data.subscribe(t=>{this.groups.length=0,this.groups.push(...t[0].user_groups)},t=>{this.error=t}),this.route.parent.data.subscribe(t=>{this.account=t[0].account},t=>{this.error=t})}deleteAllowed(){return this.authService.sessionRole<=Zx.USER_ROLE_MAINTAINER}deleteGroupUser(t,e,n){t.target.disabled=!0,t.preventDefault(),this.error="",this.consoleService.deleteGroupUser("",this.account.user.id,n.group.id).subscribe(()=>{this.error="",this.groups.splice(e,1)},t=>{this.error=t})}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(mb),oa(Jx),oa(i_))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:17,vars:4,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","300px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(t,e){1&t&&(ra(0,kV,4,2,"ngb-alert",0),ua(1,"div",1),ua(2,"table",2),ua(3,"thead",3),ua(4,"tr"),ua(5,"th",4),qa(6,"Group ID"),ha(),ua(7,"th"),qa(8,"Name"),ha(),ua(9,"th",5),qa(10,"State"),ha(),ua(11,"th",6),qa(12,"Update Time"),ha(),ra(13,EV,2,0,"th",7),ha(),ha(),ua(14,"tbody"),ra(15,AV,3,0,"tr",8),ra(16,$V,14,9,"tr",9),ha(),ha(),ha()),2&t&&(la("ngIf",e.error),gs(13),la("ngIf",e.deleteAllowed()),gs(2),la("ngIf",0===e.groups.length),gs(1),la("ngForOf",e.groups))},directives:[Ed,Sd,QC],styles:[""]}),t})(),IV=(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){const n=t.parent.paramMap.get("id");return this.consoleService.getGroups("",n)}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function NV(t,e){if(1&t&&(ua(0,"ngb-alert",12),da(1,"img",13),ua(2,"h6",14),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("An error occurred: ",t.error,"")}}function PV(t,e){1&t&&(ua(0,"tr"),ua(1,"td",15),qa(2,"No realtime matches were found."),ha(),ha())}function BV(t,e){1&t&&da(0,"div",23)}function UV(t,e){1&t&&da(0,"div",24)}function VV(t,e){if(1&t){const t=ga();ua(0,"div",20),ya("click",function(){pn(t);const e=xa(),n=e.index,i=e.$implicit,r=xa();return r.getMatchState(n,i),r.matchStatesOpen[n]=!r.matchStatesOpen[n]}),ra(1,BV,1,0,"div",21),ra(2,UV,1,0,"div",22),ha()}if(2&t){const t=xa().index,e=xa();gs(1),la("ngIf",!e.matchStatesOpen[t]),gs(1),la("ngIf",e.matchStatesOpen[t])}}function HV(t,e){1&t&&da(0,"div",25)}function jV(t,e){1&t&&(ua(0,"span"),qa(1,"Yes"),ha())}function zV(t,e){1&t&&(ua(0,"span"),qa(1,"No"),ha())}function WV(t,e){1&t&&da(0,"img",34)}function GV(t,e){if(1&t&&(ua(0,"div"),ua(1,"small"),ua(2,"b"),qa(3,"Current Tick"),ha(),ha(),ua(4,"pre",30),ua(5,"small"),qa(6),ha(),ha(),ua(7,"small"),ua(8,"b"),qa(9,"Match State"),ha(),ha(),ua(10,"pre",30),ua(11,"small"),qa(12),ha(),ha(),ha()),2&t){const t=xa(2).index,e=xa();gs(6),Ya(e.matchStates[t].tick),gs(6),Ya(e.matchStates[t].state)}}function KV(t,e){1&t&&da(0,"img",34)}function qV(t,e){if(1&t&&(ua(0,"pre",30),ua(1,"small"),qa(2),ha(),ha()),2&t){const t=xa(2).index,e=xa();gs(2),Ya(e.getMatchPresencesString(e.matchStates[t].presences))}}function YV(t,e){if(1&t&&(ua(0,"tr",26),ua(1,"td",27),ua(2,"div",28),ua(3,"div",29),ua(4,"small"),ua(5,"b"),qa(6,"Match Label"),ha(),ha(),ua(7,"pre",30),ua(8,"small"),qa(9),ha(),ha(),ha(),ua(10,"div",31),ra(11,WV,1,0,"img",32),ra(12,GV,13,2,"div",10),ha(),ua(13,"div",31),ua(14,"small"),ua(15,"b"),qa(16,"Match Presences"),ha(),ha(),ra(17,KV,1,0,"img",32),ra(18,qV,3,1,"pre",33),ha(),ha(),ha(),ha()),2&t){const t=xa(),e=t.$implicit,n=t.index,i=xa();gs(9),Ya(e.label),gs(2),la("ngIf",!i.matchStates[n]||null===i.matchStates[n]),gs(1),la("ngIf",null!==i.matchStates[n]),gs(5),la("ngIf",!i.matchStates[n]||null===i.matchStates[n]),gs(1),la("ngIf",null!==i.matchStates[n])}}function XV(t,e){if(1&t&&(ua(0,"tr"),ua(1,"td"),ra(2,VV,3,2,"div",16),ra(3,HV,1,0,"div",17),qa(4),ha(),ua(5,"td"),qa(6),ha(),ua(7,"td",18),ra(8,jV,2,0,"span",10),ra(9,zV,2,0,"span",10),ha(),ua(10,"td"),qa(11),ha(),ua(12,"td"),qa(13),ha(),ha(),ra(14,YV,19,5,"tr",19)),2&t){const t=e.index,n=e.$implicit,i=xa();gs(2),la("ngIf",n.authoritative),gs(1),la("ngIf",!n.authoritative),gs(1),Xa(" ",n.match_id," "),gs(2),Ya(n.size),gs(2),la("ngIf",n.authoritative),gs(1),la("ngIf",!n.authoritative),gs(2),Ya(n.handler_name),gs(2),Ya(n.authoritative?n.tick_rate:"-"),gs(1),la("ngIf",i.matchStatesOpen[t])}}let JV=(()=>{class t{constructor(t,e){this.route=t,this.consoleService=e,this.error="",this.matches=[],this.matchStates=[],this.matchStatesOpen=[],this.updated=!1}ngOnInit(){this.route.data.subscribe(t=>{this.matches.length=0,this.matches.push(...t[0].matches),this.matchStates.length=this.matches.length,this.matchStatesOpen.length=this.matches.length},t=>{this.error=t})}getMatchState(t,e){this.matchStatesOpen[t]||(this.matchStates[t]=null,this.error="",this.consoleService.getMatchState("",e.match_id).subscribe(e=>{this.matchStatesOpen[t]=!0,this.matchStates[t]=e},e=>{this.matchStatesOpen[t]=!1,this.matchStates[t]=null,this.error=e}))}getMatchPresencesString(t){return JSON.stringify(t)}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(Jx))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:23,vars:6,consts:[[1,"pb-1"],[1,"pb-4"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered"],[1,"thead-light"],[2,"width","140px"],[2,"width","100px"],[2,"width","130px"],[2,"width","90px"],[4,"ngIf"],["ngFor","",3,"ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["colSpan","7",1,"text-muted"],["class","arrow",3,"click",4,"ngIf"],["class","d-inline-block mr-3",4,"ngIf"],[1,"text-center"],["class","open-row",4,"ngIf"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"d-inline-block","mr-3"],[1,"open-row"],["colspan","5",1,"align-middle"],[1,"d-flex","p-0"],[1,"p-3","w-33","border"],[1,"pre-wrap","m-0","p-0"],[1,"p-3","w-33","border","border-left-0"],["src","/static/spinner.svg","class","d-block","width","16",4,"ngIf"],["class","pre-wrap m-0 p-0",4,"ngIf"],["src","/static/spinner.svg","width","16",1,"d-block"]],template:function(t,e){1&t&&(ua(0,"h2",0),qa(1,"Active Matches"),ha(),ua(2,"h6",1),qa(3),ha(),ra(4,NV,4,2,"ngb-alert",2),ua(5,"div",3),ua(6,"table",4),ua(7,"thead",5),ua(8,"tr"),ua(9,"th"),ua(10,"span"),qa(11,"Match ID"),ha(),ha(),ua(12,"th",6),qa(13,"Presence Count"),ha(),ua(14,"th",7),qa(15,"Authoritative"),ha(),ua(16,"th",8),qa(17,"Handler Name"),ha(),ua(18,"th",9),qa(19,"Tick Rate"),ha(),ha(),ha(),ua(20,"tbody"),ra(21,PV,3,0,"tr",10),ra(22,XV,15,9,"ng-template",11),ha(),ha(),ha()),2&t&&(gs(3),Xa("",e.matches.length," running matches found."),gs(1),la("ngIf",e.error),gs(6),Oa("pl-3",e.matches.length>0),gs(11),la("ngIf",0===e.matches.length),gs(1),la("ngForOf",e.matches))},directives:[Ed,Sd,QC],styles:[".pre-wrap[_ngcontent-%COMP%]{word-wrap:anywhere;word-break:break-all;white-space:pre-wrap}.open-row[_ngcontent-%COMP%]{background:#fafafc}.w-33[_ngcontent-%COMP%]{width:33.3333%!important}"]}),t})(),QV=(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){return this.consoleService.listMatches("",null,null,null,null,null,null)}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function ZV(t,e){if(1&t){const t=ga();ua(0,"button",12),ya("click",function(e){return pn(t),xa().deleteLeaderboard(e)}),da(1,"img",13),qa(2,"Delete Leaderboard"),ha()}}function tH(t,e){if(1&t&&(ua(0,"ngb-alert",14),da(1,"img",15),ua(2,"h6",16),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("An error occurred: ",t.error,"")}}const eH=function(t,e){return["/leaderboards",t,e]};function nH(t,e){if(1&t&&(ua(0,"div"),fa(1,17),ua(2,"a",18),qa(3),ha(),pa(),ha()),2&t){const t=e.$implicit,n=xa();gs(1),la("ngbNavItem",t.path),gs(1),la("routerLink",Yc(3,eH,n.leaderboard.id,t.path)),gs(1),Ya(t.label)}}const iH=function(){return["/leaderboards"]};let rH=(()=>{class t{constructor(t,e,n,i){this.route=t,this.router=e,this.consoleService=n,this.authService=i,this.error="",this.views=[{label:"Details",path:"details"},{label:"Records",path:"records"}]}ngOnInit(){this.route.data.subscribe(t=>{this.leaderboard=t[0]},t=>{this.error=t})}deleteLeaderboard(t){t.target.disabled=!0,this.error="",this.consoleService.deleteLeaderboard("",this.leaderboard.id).subscribe(()=>{this.error="",this.router.navigate(["/leaderboards"])},t=>{this.error=t})}deleteAllowed(){return this.authService.sessionRole<=Zx.USER_ROLE_DEVELOPER}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(mb),oa(Jx),oa(i_))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:17,vars:6,consts:[[1,"pb-1"],[1,"leaderboard-top-nav","d-flex","justify-content-between","align-items-baseline","mb-3"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink"],[1,"breadcrumb-item","active"],["type","button","class","btn btn-danger btn-danger-icon",3,"click",4,"ngIf"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["ngbNav","",1,"navbar-expand-sm","p-0","mb-3"],["leaderboardNav","ngbNav"],[4,"ngFor","ngForOf"],["type","button",1,"btn","btn-danger","btn-danger-icon",3,"click"],["src","/static/svg/bin-red.svg","alt","","width","13","height","13",1,"mr-2"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"ngbNavItem"],["ngbNavLink","","routerLinkActive","account-link-active",3,"routerLink"]],template:function(t,e){1&t&&(ua(0,"h2",0),qa(1,"Leaderboard"),ha(),ua(2,"div",1),ua(3,"nav",2),ua(4,"ol",3),ua(5,"li",4),ua(6,"a",5),qa(7,"Leaderboards"),ha(),ha(),ua(8,"li",6),qa(9),ha(),ha(),ha(),ua(10,"div"),ra(11,ZV,3,0,"button",7),ha(),ha(),ra(12,tH,4,2,"ngb-alert",8),ua(13,"nav",9,10),ra(15,nH,4,6,"div",11),ha(),da(16,"router-outlet")),2&t&&(gs(6),la("routerLink",Kc(5,iH)),gs(3),Ya(e.leaderboard.id),gs(2),la("ngIf",e.deleteAllowed()),gs(1),la("ngIf",e.error),gs(3),la("ngForOf",e.views))},directives:[yb,Ed,Dk,Sd,xb,QC,Ak,Tk,wb],styles:[".nav-link[_ngcontent-%COMP%]{font-size:12px;font-family:Montserrat,sans-serif;text-transform:uppercase;letter-spacing:.1em;color:#000;opacity:.5;padding:0 0 1.6em;margin-right:3em;margin-bottom:-2px;font-weight:600}.nav-link[_ngcontent-%COMP%]:hover{opacity:1}.nav-link.account-link-active[_ngcontent-%COMP%]{opacity:1;border-bottom:2px solid #7668ed}.leaderboard-top-nav[_ngcontent-%COMP%], .navbar-expand-sm[_ngcontent-%COMP%]{border-bottom:1px solid #dadae9}.leaderboard-top-nav[_ngcontent-%COMP%]{padding-bottom:1.5em}"]}),t})(),sH=(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){const n=t.paramMap.get("id");return this.consoleService.getLeaderboard("",n)}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const oH=["editor"];function aH(t,e){if(1&t&&(ua(0,"ngb-alert",22),da(1,"img",23),ua(2,"h6",24),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("An error occurred: ",t.error,"")}}function lH(t,e){if(1&t&&(ua(0,"div",25),ua(1,"h6"),qa(2,"Tournaments"),ha(),da(3,"hr",26),ua(4,"div",2),ua(5,"div",3),ua(6,"div",4),ua(7,"label",27),qa(8,"Title"),ha(),ha(),da(9,"input",28),ha(),ua(10,"div",3),ua(11,"div",4),ua(12,"label",29),qa(13,"Description"),ha(),ha(),da(14,"input",30),ha(),ha(),ua(15,"div",2),ua(16,"div",3),ua(17,"div",4),ua(18,"label",31),qa(19,"Category"),ha(),ha(),da(20,"input",32),ha(),ua(21,"div",3),ua(22,"div",4),ua(23,"label",33),qa(24,"Max Num Score"),ha(),ha(),da(25,"input",34),ha(),ha(),ua(26,"div",2),ua(27,"div",3),ua(28,"div",4),ua(29,"label",35),qa(30,"Size"),ha(),ha(),da(31,"input",36),ha(),ua(32,"div",3),ua(33,"div",4),ua(34,"label",37),qa(35,"Max Size"),ha(),ha(),da(36,"input",38),ha(),ha(),ua(37,"div",2),ua(38,"div",3),ua(39,"div",4),ua(40,"label",39),qa(41,"Duration"),ha(),ha(),da(42,"input",40),ha(),ua(43,"div",3),ua(44,"div",4),ua(45,"label",41),qa(46,"Join Required"),ha(),ha(),da(47,"input",42),ha(),ha(),ua(48,"div",2),ua(49,"div",3),ua(50,"div",4),ua(51,"label",43),qa(52,"Start Time"),ha(),ha(),da(53,"input",44),ha(),ua(54,"div",3),ua(55,"div",4),ua(56,"label",45),qa(57,"End Time"),ha(),ha(),da(58,"input",46),ha(),ha(),ua(59,"div",2),ua(60,"div",3),ua(61,"div",4),ua(62,"label",47),qa(63,"Start Active"),ha(),ha(),da(64,"input",48),ha(),ua(65,"div",3),ua(66,"div",4),ua(67,"label",49),qa(68,"End Active"),ha(),ha(),da(69,"input",50),ha(),ha(),ha()),2&t){const t=xa();gs(9),la("value",t.leaderboard.title),gs(5),la("value",t.leaderboard.description),gs(6),la("value",t.leaderboard.category),gs(5),la("value",t.leaderboard.max_num_score),gs(6),la("value",t.leaderboard.size),gs(5),la("value",t.leaderboard.max_size),gs(6),la("value",t.leaderboard.duration),gs(5),la("value",t.leaderboard.join_required),gs(6),la("value",t.leaderboard.start_time),gs(5),la("value",t.leaderboard.end_time),gs(6),la("value",t.leaderboard.start_active),gs(5),la("value",t.leaderboard.end_active)}}let cH=(()=>{class t{constructor(t){this.route=t,this.orderString={0:"Ascending",1:"Descending"},this.operatorString={0:"Best",1:"Set",2:"Increment",3:"Decrement"},this.error=""}ngOnInit(){this.route.parent.data.subscribe(t=>{this.leaderboard=t[0]},t=>{this.error=t})}ngAfterViewInit(){if(JB.config.set("fontSize","14px"),JB.config.set("printMarginColumn",0),JB.config.set("useWorker",!0),JB.config.set("highlightSelectedWord",!0),JB.config.set("fontFamily",'"Courier New", Courier, monospace'),this.aceEditor=JB.edit(this.editor.nativeElement),this.aceEditor.setReadOnly(!0),this.leaderboard.metadata){const t=JSON.stringify(JSON.parse(this.leaderboard.metadata),null,2);this.aceEditor.session.setValue(t)}}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){if(1&t&&fu(oH,!0),2&t){let t;hu(t=vu())&&(e.editor=t.first)}},decls:39,vars:8,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border","mb-3"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","id",1,"d-inline"],["type","text","id","id","placeholder","ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","authoritative",1,"d-inline"],["type","text","id","authoritative","placeholder","Authoritative","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","sortorder",1,"d-inline"],["type","text","id","sortorder","placeholder","Sort Order","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","operator",1,"d-inline"],["type","text","id","operator","placeholder","Operator","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"row","add-border-single-row-bottom"],["for","reset",1,"d-inline"],["type","text","id","reset","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["class","mt-4",4,"ngIf"],[1,"card","p-2","mb-3",2,"height","400px"],[2,"height","400px"],["editor",""],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[1,"mt-4"],[1,"mb-4"],["for","title",1,"d-inline"],["type","text","id","title","placeholder","Title","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","description",1,"d-inline"],["type","text","id","description","placeholder","Description","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","category",1,"d-inline"],["type","text","id","category","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","max_num_score",1,"d-inline"],["type","text","id","max_num_score","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","size",1,"d-inline"],["type","text","id","size","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","max_size",1,"d-inline"],["type","text","id","max_size","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","duration",1,"d-inline"],["type","text","id","duration","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","join_required",1,"d-inline"],["type","text","id","join_required","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","start_time",1,"d-inline"],["type","text","id","start_time","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","end_time",1,"d-inline"],["type","text","id","end_time","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","start_active",1,"d-inline"],["type","text","id","start_active","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","end_active",1,"d-inline"],["type","text","id","end_active","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"]],template:function(t,e){1&t&&(ra(0,aH,4,2,"ngb-alert",0),ua(1,"div",1),ua(2,"div",2),ua(3,"div",3),ua(4,"div",4),ua(5,"label",5),qa(6,"User ID"),ha(),ha(),da(7,"input",6),ha(),ua(8,"div",3),ua(9,"div",4),ua(10,"label",7),qa(11,"Authoritative"),ha(),ha(),da(12,"input",8),ha(),ha(),ua(13,"div",2),ua(14,"div",3),ua(15,"div",4),ua(16,"label",9),qa(17,"Sort Order"),ha(),ha(),da(18,"input",10),ha(),ua(19,"div",3),ua(20,"div",4),ua(21,"label",11),qa(22,"Operator"),ha(),ha(),da(23,"input",12),ha(),ha(),ua(24,"div",13),ua(25,"div",3),ua(26,"div",4),ua(27,"label",14),qa(28,"Reset Schedule"),ha(),ha(),da(29,"input",15),ha(),ua(30,"div",3),ua(31,"div",4),ua(32,"label",16),qa(33,"Create Time"),ha(),ha(),da(34,"input",17),ha(),ha(),ha(),ra(35,lH,70,12,"div",18),ua(36,"div",19),da(37,"div",20,21),ha()),2&t&&(la("ngIf",e.error),gs(7),la("value",e.leaderboard.id),gs(5),la("value",e.leaderboard.authoritative),gs(6),la("value",e.orderString[e.leaderboard.sort_order]),gs(5),la("value",e.operatorString[e.leaderboard.operator]),gs(6),la("value",e.leaderboard.reset_schedule),gs(5),la("value",e.leaderboard.create_time),gs(1),la("ngIf",e.leaderboard.tournament))},directives:[Ed,QC],styles:[".leaderboard-top-nav[_ngcontent-%COMP%]{border-bottom:1px solid #dadae9;padding-bottom:1.5em}"]}),t})();function uH(t,e){if(1&t&&(ua(0,"ngb-alert",19),da(1,"img",20),ua(2,"h6",21),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("An error occurred: ",t.error,"")}}function hH(t,e){1&t&&(ua(0,"th",22),qa(1,"Remove"),ha())}function dH(t,e){1&t&&(ua(0,"tr"),ua(1,"td",23),qa(2,"No records found."),ha(),ha())}function fH(t,e){1&t&&da(0,"div",28)}function pH(t,e){1&t&&da(0,"div",29)}function gH(t,e){if(1&t){const t=ga();ua(0,"td",30),ua(1,"button",31),ya("click",function(e){pn(t);const n=xa(),i=n.index,r=n.$implicit;return xa().deleteRecord(e,i,r)}),qa(2,"Delete"),ha(),ha()}}function mH(t,e){if(1&t&&(ua(0,"tr"),ua(1,"td",32),ua(2,"pre",33),ua(3,"small"),qa(4),ha(),ha(),ha(),ha()),2&t){const t=xa().$implicit;gs(4),Ya(t.metadata)}}function vH(t,e){if(1&t){const t=ga();ua(0,"tr"),ua(1,"td"),ua(2,"div",24),ya("click",function(){pn(t);const n=e.index,i=xa();return i.recordsMetadataOpen[n]=!i.recordsMetadataOpen[n]}),ra(3,fH,1,0,"div",25),ra(4,pH,1,0,"div",26),ha(),qa(5),ha(),ua(6,"td"),qa(7),ha(),ua(8,"td"),qa(9),ha(),ua(10,"td"),qa(11),ha(),ua(12,"td"),qa(13),ha(),ua(14,"td"),qa(15),ha(),ua(16,"td"),qa(17),ha(),ra(18,gH,3,0,"td",27),ha(),ra(19,mH,5,1,"tr",17)}if(2&t){const t=e.index,n=e.$implicit,i=xa();gs(3),la("ngIf",!i.recordsMetadataOpen[t]),gs(1),la("ngIf",i.recordsMetadataOpen[t]),gs(1),Xa(" ",n.owner_id," "),gs(2),Ya(n.username),gs(2),Ya(n.score),gs(2),Ya(n.subscore),gs(2),Ya(n.rank),gs(2),Ya(n.num_score),gs(2),Ya(n.expiry_time?n.expiry_time:"-"),gs(1),la("ngIf",i.deleteAllowed()),gs(1),la("ngIf",i.recordsMetadataOpen[t])}}let yH=(()=>{class t{constructor(t,e,n){this.route=t,this.consoleService=e,this.authService=n,this.error="",this.records=[],this.recordsMetadataOpen=[],this.nextCursor="",this.prevCursor=""}ngOnInit(){this.route.data.subscribe(t=>{this.records.length=0,this.records.push(...t[0].records),this.nextCursor=t[0].next_cursor,this.prevCursor=t[0].prev_cursor,this.recordsMetadataOpen.length=this.records.length},t=>{this.error=t}),this.route.parent.data.subscribe(t=>{this.leaderboard=t[0]},t=>{this.error=t})}loadRecords(t){let e="";switch(t){case-1:e=this.prevCursor;break;case 0:e="";break;case 1:e=this.nextCursor}this.consoleService.listLeaderboardRecords("",this.leaderboard.id,null,100,e,null).subscribe(t=>{this.error="",this.nextCursor=t.next_cursor,this.prevCursor=t.prev_cursor,this.records.length=0,this.records.push(...t.records),this.recordsMetadataOpen.length=0,this.recordsMetadataOpen.length=this.records.length},t=>{this.error=t})}deleteRecord(t,e,n){t.target.disabled=!0,t.preventDefault(),this.error="",this.consoleService.deleteLeaderboardRecord("",n.leaderboard_id,n.owner_id).subscribe(()=>{this.error="",this.records.splice(e,1),this.recordsMetadataOpen.splice(e,1)},t=>{this.error=t})}deleteAllowed(){return this.authService.sessionRole<=Zx.USER_ROLE_DEVELOPER}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(Jx),oa(i_))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:34,vars:7,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[1,"col-md-3","justify-content-end","text-right"],["role","group",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-prev.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered"],[1,"thead-light"],[2,"width","380px"],[2,"width","150px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],["ngFor","",3,"ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","8",1,"text-muted"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],["class","text-center",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],["colspan","7",1,"align-middle"],[1,"pre-wrap","m-0","p-0"]],template:function(t,e){1&t&&(ra(0,uH,4,2,"ngb-alert",0),ua(1,"div",1),ua(2,"div",2),da(3,"div",3),ua(4,"div",4),ua(5,"div",5),ua(6,"button",6),ya("click",function(){return e.loadRecords(0)}),da(7,"img",7),ha(),ua(8,"button",6),ya("click",function(){return e.loadRecords(-1)}),da(9,"img",8),ha(),ua(10,"button",6),ya("click",function(){return e.loadRecords(1)}),da(11,"img",9),ha(),ha(),ha(),ha(),ha(),ua(12,"div",10),ua(13,"table",11),ua(14,"thead",12),ua(15,"tr"),ua(16,"th",13),qa(17,"Owner ID"),ha(),ua(18,"th"),qa(19,"Username"),ha(),ua(20,"th",14),qa(21,"Score"),ha(),ua(22,"th",14),qa(23,"Subscore"),ha(),ua(24,"th",14),qa(25,"Rank"),ha(),ua(26,"th",14),qa(27,"No. of scores"),ha(),ua(28,"th",15),qa(29,"Expiry Time"),ha(),ra(30,hH,2,0,"th",16),ha(),ha(),ua(31,"tbody"),ra(32,dH,3,0,"tr",17),ra(33,vH,20,11,"ng-template",18),ha(),ha(),ha()),2&t&&(la("ngIf",e.error),gs(6),la("disabled",0===e.records.length),gs(2),la("disabled",""===e.prevCursor),gs(2),la("disabled",""===e.nextCursor),gs(20),la("ngIf",e.deleteAllowed()),gs(2),la("ngIf",0===e.records.length),gs(1),la("ngForOf",e.records))},directives:[Ed,Sd,QC],styles:[""]}),t})(),bH=(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){const n=t.parent.paramMap.get("id");return this.consoleService.listLeaderboardRecords("",n,null,100,null,null)}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const wH=["editor"],xH=["editorResponse"];function _H(t,e){if(1&t&&(ua(0,"ngb-alert",23),da(1,"img",24),ua(2,"h6",25),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("Error whilst making RPC call: ",t.error,"")}}function CH(t,e){if(1&t&&(ua(0,"option",26),qa(1),ha()),2&t){const t=e.$implicit;ka("value",t.method),gs(1),Ya(t.method)}}function SH(t,e){if(1&t&&(ua(0,"option",26),qa(1),ha()),2&t){const t=e.$implicit;ka("value",t.method),gs(1),Ya(t.method)}}let kH=(()=>{class t{constructor(t,e,n,i){this.route=t,this.router=e,this.consoleService=n,this.formBuilder=i,this.error="",this.rpcEndpoints=[],this.endpoints=[]}ngOnInit(){this.endpointCallForm=this.formBuilder.group({method:["",Qb.required],user_id:[""]}),this.f.method.valueChanges.subscribe(t=>{const e=this.endpoints.concat(this.rpcEndpoints).find(e=>e.method===t?e:null);this.updateQueryParam(e.method),this.setupRequestBody(e.body_template)}),this.route.data.subscribe(t=>{const e=t[0];this.endpoints.length=0,this.endpoints.push(...e.endpoints),this.rpcEndpoints.length=0,this.rpcEndpoints.push(...e.rpc_endpoints)},t=>{this.error=t});const t=this.endpoints.concat(this.rpcEndpoints).find(t=>t.method===this.route.snapshot.queryParamMap.get("endpoint")?t:null);null!=t&&this.f.method.setValue(t.method)}ngAfterViewInit(){JB.config.set("fontSize","14px"),JB.config.set("printMarginColumn",0),JB.config.set("useWorker",!0),JB.config.set("highlightSelectedWord",!0),JB.config.set("fontFamily",'"Courier New", Courier, monospace'),this.aceEditor=JB.edit(this.editor.nativeElement),this.aceEditor.setReadOnly(!0),this.aceEditorResponse=JB.edit(this.editorResponse.nativeElement),this.aceEditorResponse.setReadOnly(!0)}sendRequest(){this.error="";let t=this.aceEditor.session.getValue();if(""!==t)try{t=JSON.stringify(JSON.parse(t))}catch(i){return void(this.error=i)}const e={user_id:this.f.user_id.value,body:t};let n=null;n=this.isRpcEndpoint(this.f.method.value)?this.consoleService.callRpcEndpoint("",this.f.method.value,e):this.consoleService.callApiEndpoint("",this.f.method.value,e),n.subscribe(e=>{if(e.error_message&&""!==e.error_message)this.aceEditorResponse.session.setValue(e.error_message);else{t="";try{t=JSON.stringify(JSON.parse(e.body),null,2)}catch(i){return void(this.error=i)}this.aceEditorResponse.session.setValue(t)}},t=>{this.aceEditorResponse.session.setValue(""),this.error=t})}isRpcEndpoint(t){return null!=this.rpcEndpoints.find(e=>e.method===t?e:null)}setupRequestBody(t){if(null!=this.aceEditor){if(!t||""===t)return this.aceEditor.session.setValue(""),void this.aceEditor.setReadOnly(!this.isRpcEndpoint(this.f.method.value));try{const e=JSON.stringify(JSON.parse(t),null,2);this.aceEditor.session.setValue(e),this.aceEditor.setReadOnly(!1)}catch(e){return void(this.error=e)}}else console.log("problem?")}updateQueryParam(t){this.router.navigate([],{relativeTo:this.route,queryParams:{endpoint:t},queryParamsHandling:"merge"})}get f(){return this.endpointCallForm.controls}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(mb),oa(Jx),oa(ox))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){if(1&t&&(fu(wH,!0),fu(xH,!0)),2&t){let t;hu(t=vu())&&(e.editor=t.first),hu(t=vu())&&(e.editorResponse=t.first)}},decls:35,vars:6,consts:[[1,"pb-4"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],[1,"input-group-prepend"],["id","method","formControlName","method",1,"form-control","custom-select","dropdown-radius"],["disabled","",3,"value"],[3,"value",4,"ngFor","ngForOf"],["disabled","",1,"text-muted"],["type","text","formControlName","user_id","placeholder","set user ID as request context",1,"form-control","border-right-0"],[1,"input-group-append"],["type","submit",1,"btn","btn-primary",3,"disabled"],[1,"d-flex"],[1,"w-50","py-3"],[1,"mb-4"],[1,"card","p-2","mb-3"],[2,"height","500px"],["editor",""],[1,"w-50","pl-3","py-3"],["editorResponse",""],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"value"]],template:function(t,e){1&t&&(ua(0,"h2",0),qa(1,"API Explorer"),ha(),ra(2,_H,4,2,"ngb-alert",1),ua(3,"div",2),ua(4,"div",3),ua(5,"div",4),ua(6,"form",5),ya("ngSubmit",function(){return e.sendRequest()}),ua(7,"div",6),ua(8,"div",7),ua(9,"select",8),ua(10,"option",9),qa(11,"Select Endpoint"),ha(),ra(12,CH,2,2,"option",10),ua(13,"option",11),qa(14,"----"),ha(),ra(15,SH,2,2,"option",10),ha(),ha(),da(16,"input",12),ua(17,"div",13),ua(18,"button",14),qa(19,"Send Request"),ha(),ha(),ha(),ha(),ha(),ha(),ha(),ua(20,"div",15),ua(21,"div",16),ua(22,"h5"),qa(23,"Request Body"),ha(),da(24,"hr",17),ua(25,"div",18),da(26,"div",19,20),ha(),ha(),ua(28,"div",21),ua(29,"h5"),qa(30,"Response"),ha(),da(31,"hr",17),ua(32,"div",18),da(33,"div",19,22),ha(),ha(),ha()),2&t&&(gs(2),la("ngIf",e.error),gs(4),la("formGroup",e.endpointCallForm),gs(4),la("value",""),gs(2),la("ngForOf",e.rpcEndpoints),gs(3),la("ngForOf",e.endpoints),gs(3),la("disabled",e.f.method.invalid))},directives:[Ed,Jw,gw,tx,Pw,pw,nx,Bw,jw,Sd,Gb,QC],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:initial;cursor:pointer}"]}),t})(),EH=(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){return this.consoleService.listApiEndpoints("")}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function AH(t,e){if(1&t&&(ua(0,"ngb-alert",7),da(1,"img",8),ua(2,"h6",9),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("Error while processing request: ",t.error,"")}}function DH(t,e){1&t&&da(0,"div",14)}function TH(t,e){1&t&&da(0,"div",15)}function RH(t,e){if(1&t&&(ua(0,"tr",16),ua(1,"td",17),ua(2,"div",18),ua(3,"div"),ua(4,"small"),ua(5,"b"),qa(6,"Provider Response"),ha(),ha(),ha(),ua(7,"div"),ua(8,"pre",19),ua(9,"small"),qa(10),ha(),ha(),ha(),ha(),ha(),ha()),2&t){const t=xa().$implicit;gs(10),Ya(t.provider_response)}}function FH(t,e){if(1&t){const t=ga();ua(0,"tr"),ua(1,"td"),ua(2,"div",10),ya("click",function(){pn(t);const n=e.index,i=xa();return i.purchasesRowsOpen[n]=!i.purchasesRowsOpen[n]}),ra(3,DH,1,0,"div",11),ra(4,TH,1,0,"div",12),ha(),qa(5),ha(),ua(6,"td"),qa(7),ha(),ua(8,"td"),qa(9),ha(),ua(10,"td"),qa(11),ha(),ua(12,"td"),qa(13),ha(),ha(),ra(14,RH,11,1,"tr",13)}if(2&t){const t=e.index,n=e.$implicit,i=xa();gs(3),la("ngIf",!i.purchasesRowsOpen[t]),gs(1),la("ngIf",i.purchasesRowsOpen[t]),gs(1),Xa(" ",n.product_id," "),gs(2),Ya(n.transaction_id),gs(2),Ya(i.getStoreText(n.store)),gs(2),Ya(n.purchase_time),gs(2),Ya(n.create_time),gs(1),la("ngIf",i.purchasesRowsOpen[t])}}function MH(t,e){1&t&&(ua(0,"tr"),ua(1,"td",20),qa(2,"No purchases were found."),ha(),ha())}function LH(t,e){if(1&t){const t=ga();ua(0,"div",21),ua(1,"button",22),ya("click",function(){return pn(t),xa().loadOlderPurchases()}),qa(2,"Load more entries"),ha(),ha()}}const $H=[{path:"",component:SE,canActivate:[c_],canActivateChild:[kE],children:[{path:"",redirectTo:"status",pathMatch:"full"},{path:"status",component:$P,resolve:[OP]},{path:"config",component:pB,resolve:[gB]},{path:"users",component:xB,resolve:[_B]},{path:"modules",component:PB,resolve:[BB]},{path:"storage",component:qB,resolve:[YB,XB],pathMatch:"full"},{path:"storage/:collection/:key/:user_id",component:cU,resolve:[uU],pathMatch:"full"},{path:"leaderboards",component:wU,resolve:[xU]},{path:"leaderboards/:id",component:rH,resolve:[sH],children:[{path:"",redirectTo:"details",pathMatch:"full"},{path:"details",component:cH,resolve:[]},{path:"records",component:yH,resolve:[bH]}]},{path:"matches",component:JV,resolve:[QV]},{path:"accounts",component:DU,resolve:[TU]},{path:"accounts/:id",component:HU,resolve:[jU],children:[{path:"",redirectTo:"profile",pathMatch:"full"},{path:"profile",component:YU,resolve:[]},{path:"authentication",component:tV,resolve:[]},{path:"wallet",component:dV,resolve:[fV]},{path:"friends",component:CV,resolve:[SV]},{path:"groups",component:OV,resolve:[IV]},{path:"purchases",component:(()=>{class t{constructor(t,e,n){this.route=t,this.router=e,this.consoleService=n,this.purchases=[],this.purchasesRowsOpen=[],this.error="",this.nextCursor="",this.limit=100}ngOnInit(){this.userID=this.route.snapshot.paramMap.get("id"),this.route.data.subscribe(t=>{this.purchases.push(...t[0].validated_purchases),this.nextCursor=t[0].cursor})}loadOlderPurchases(){this.consoleService.listPurchases("",this.userID,this.limit,this.nextCursor).subscribe(t=>{this.purchases.push(...t.validated_purchases),this.purchasesRowsOpen.push(...Array(t.validated_purchases.length).fill(!1)),this.nextCursor=t.cursor},t=>{this.error=t})}getStoreText(t){return this.formatStoreText(Qx[t])}formatStoreText(t){return t.split("_").map(t=>t[0]+t.slice(1).toLowerCase()).join(" ")}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(mb),oa(Jx))},t.\u0275cmp=pe({type:t,selectors:[["app-purchases"]],decls:18,vars:4,consts:[["type","danger",3,"dismissible",4,"ngIf"],[1,"table","table-sm","table-bordered","table-hover"],[1,"thead-light"],[2,"width","180px"],["ngFor","",3,"ngForOf"],[4,"ngIf"],["class","col-12 text-center",4,"ngIf"],["type","danger",3,"dismissible"],["src","/src/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],["class","open-row",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"open-row"],["colspan","7"],[1,"p-2"],[1,"pre-wrap","m-0","p-0"],["colspan","5",1,"text-muted"],[1,"col-12","text-center"],[1,"btn","btn-outline-primary","mt-3",3,"click"]],template:function(t,e){1&t&&(ra(0,AH,4,2,"ngb-alert",0),ua(1,"table",1),ua(2,"thead",2),ua(3,"tr"),ua(4,"th"),qa(5,"Product ID"),ha(),ua(6,"th"),qa(7,"Transaction ID"),ha(),ua(8,"th"),qa(9,"Store"),ha(),ua(10,"th",3),qa(11,"Purchase Time"),ha(),ua(12,"th",3),qa(13,"Create Time"),ha(),ha(),ha(),ua(14,"tbody"),ra(15,FH,15,8,"ng-template",4),ra(16,MH,3,0,"tr",5),ha(),ha(),ra(17,LH,3,0,"div",6)),2&t&&(la("ngIf",e.error),gs(15),la("ngForOf",e.purchases),gs(1),la("ngIf",0===e.purchases.length),gs(1),la("ngIf",e.nextCursor))},directives:[Ed,Sd,QC],styles:[""]}),t})(),resolve:[(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){const n=t.paramMap.get("id");return this.consoleService.listPurchases("",n,100,"")}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()]}]},{path:"apiexplorer",component:kH,resolve:[EH]}]},{path:"login",component:a_,canActivate:[l_]},{path:"**",redirectTo:""}];let OH=(()=>{class t{}return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[Fb.forRoot($H,{useHash:!0})],Fb]}),t})(),IH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["app-root"]],decls:1,vars:0,template:function(t,e){1&t&&da(0,"router-outlet")},directives:[xb],styles:[""]}),t})();RegExp(/[&<>"']/g.source);const NH={Tab:9,Enter:13,Esc:27,Space:32,ArrowUp:38,ArrowDown:40,Backspace:8};NH[NH.Tab]="Tab",NH[NH.Enter]="Enter",NH[NH.Esc]="Esc",NH[NH.Space]="Space",NH[NH.ArrowUp]="ArrowUp",NH[NH.ArrowDown]="ArrowDown",NH[NH.Backspace]="Backspace";const PH=new Pt("ng-select-selection-model");class BH{constructor(){this._selected=[]}get value(){return this._selected}select(t,e,n){if(t.selected=!0,(!t.children||!e&&n)&&this._selected.push(t),e)if(t.parent){const e=t.parent.children.length,n=t.parent.children.filter(t=>t.selected).length;t.parent.selected=e===n}else t.children&&(this._setChildrenSelectedState(t.children,!0),this._removeChildren(t),this._selected=n&&this._activeChildren(t)?[...this._selected.filter(e=>e.parent!==t),t]:[...this._selected,...t.children.filter(t=>!t.disabled)])}unselect(t,e){if(this._selected=this._selected.filter(e=>e!==t),t.selected=!1,e)if(t.parent&&t.parent.selected){const e=t.parent.children;this._removeParent(t.parent),this._removeChildren(t.parent),this._selected.push(...e.filter(e=>e!==t&&!e.disabled)),t.parent.selected=!1}else t.children&&(this._setChildrenSelectedState(t.children,!1),this._removeChildren(t))}clear(t){this._selected=t?this._selected.filter(t=>t.disabled):[]}_setChildrenSelectedState(t,e){for(const n of t)n.disabled||(n.selected=e)}_removeChildren(t){this._selected=[...this._selected.filter(e=>e.parent!==t),...t.children.filter(e=>e.parent===t&&e.disabled&&e.selected)]}_removeParent(t){this._selected=this._selected.filter(e=>e!==t)}_activeChildren(t){return t.children.every(t=>!t.disabled||t.selected)}}const UH=function(){return new BH};let VH=(()=>{class t{}return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},providers:[{provide:PH,useValue:UH}],imports:[[Fd]]}),t})(),HH=(()=>{class t{constructor(t){this.authenticationService=t}intercept(t,e){const n=this.authenticationService.currentSessionValue;return n&&n.token&&(t=t.clone({setHeaders:{Authorization:`Bearer ${n.token}`}})),e.handle(t)}}return t.\u0275fac=function(e){return new(e||t)(Yt(i_))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),jH=(()=>{class t{constructor(t,e){this.authenticationService=t,this.router=e}intercept(t,e){return e.handle(t).pipe($m(e=>(401===e.status?(this.authenticationService.logout(),t.url.includes("/v3/auth")||this.router.navigate(["/login"],{queryParams:{next:this.router.routerState.snapshot.url}})):e.status>=500&&console.log(`${e.status}: + ${e.error.message||e.statusText}`),I_(e.error.message||e.statusText))))}}return t.\u0275fac=function(e){return new(e||t)(Yt(i_),Yt(mb))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),zH=(()=>{class t{}return t.\u0275mod=ye({type:t,bootstrap:[IH]}),t.\u0275inj=ht({factory:function(e){return new(e||t)},providers:[e_,gE,{provide:Xx,useValue:{host:document.location.origin,timeout:15e3}},{provide:Ix,useClass:HH,multi:!0},{provide:Ix,useClass:jH,multi:!0}],imports:[[qP,OH,hf,Xg,Yx,cE,gP,vx.forRoot({apiKey:"dHl7FTjJ9icepBjEdOCcyMFQYL1BBiQO",debug:!1,loadOnInitialization:!0}),Jg,lx,ax,VH]]}),t})();(function(){if(ji)throw new Error("Cannot enable prod mode after platform setup.");Hi=!1})(),cf().bootstrapModule(zH).then(t=>{window.ngRef&&window.ngRef.destroy(),window.ngRef=t}).catch(t=>console.error(t))},zn8P:function(t,e){function n(t){return Promise.resolve().then(function(){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e})}n.keys=function(){return[]},n.resolve=n,t.exports=n,n.id="zn8P"}},[[0,0]]]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{"+U4B":function(t,e,n){var i;i=function(){return function(t){var e={};function n(i){if(e[i])return e[i].exports;var r=e[i]={exports:{},id:i,loaded:!1};return t[i].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}return n.m=t,n.c=e,n.p="",n(0)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(1),r=n(3),s=n(8),o=n(15);function a(t,e,n){var o=null,a=function(t,e){n&&n(t,e),o&&o.visit(t,e)},l="function"==typeof n?a:null,c=!1;if(e){var u="boolean"==typeof e.attachComment&&e.attachComment;((c="boolean"==typeof e.comment&&e.comment)||u)&&((o=new i.CommentHandler).attach=u,e.comment=!0,l=a)}var h,d=!1;e&&"string"==typeof e.sourceType&&(d="module"===e.sourceType),h=e&&"boolean"==typeof e.jsx&&e.jsx?new r.JSXParser(t,e,l):new s.Parser(t,e,l);var f=d?h.parseModule():h.parseScript();return c&&o&&(f.comments=o.comments),h.config.tokens&&(f.tokens=h.tokens),h.config.tolerant&&(f.errors=h.errorHandler.errors),f}e.parse=a,e.parseModule=function(t,e,n){var i=e||{};return i.sourceType="module",a(t,i,n)},e.parseScript=function(t,e,n){var i=e||{};return i.sourceType="script",a(t,i,n)},e.tokenize=function(t,e,n){var i,r=new o.Tokenizer(t,e);i=[];try{for(;;){var s=r.getNextToken();if(!s)break;n&&(s=n(s)),i.push(s)}}catch(a){r.errorHandler.tolerate(a)}return r.errorHandler.tolerant&&(i.errors=r.errors()),i};var l=n(2);e.Syntax=l.Syntax,e.version="4.0.1"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(2),r=function(){function t(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return t.prototype.insertInnerComments=function(t,e){if(t.type===i.Syntax.BlockStatement&&0===t.body.length){for(var n=[],r=this.leading.length-1;r>=0;--r){var s=this.leading[r];e.end.offset>=s.start&&(n.unshift(s.comment),this.leading.splice(r,1),this.trailing.splice(r,1))}n.length&&(t.innerComments=n)}},t.prototype.findTrailingComments=function(t){var e=[];if(this.trailing.length>0){for(var n=this.trailing.length-1;n>=0;--n){var i=this.trailing[n];i.start>=t.end.offset&&e.unshift(i.comment)}return this.trailing.length=0,e}var r=this.stack[this.stack.length-1];if(r&&r.node.trailingComments){var s=r.node.trailingComments[0];s&&s.range[0]>=t.end.offset&&(e=r.node.trailingComments,delete r.node.trailingComments)}return e},t.prototype.findLeadingComments=function(t){for(var e,n=[];this.stack.length>0&&(s=this.stack[this.stack.length-1])&&s.start>=t.start.offset;)e=s.node,this.stack.pop();if(e){for(var i=(e.leadingComments?e.leadingComments.length:0)-1;i>=0;--i){var r=e.leadingComments[i];r.range[1]<=t.start.offset&&(n.unshift(r),e.leadingComments.splice(i,1))}return e.leadingComments&&0===e.leadingComments.length&&delete e.leadingComments,n}for(i=this.leading.length-1;i>=0;--i){var s;(s=this.leading[i]).start<=t.start.offset&&(n.unshift(s.comment),this.leading.splice(i,1))}return n},t.prototype.visitNode=function(t,e){if(!(t.type===i.Syntax.Program&&t.body.length>0)){this.insertInnerComments(t,e);var n=this.findTrailingComments(e),r=this.findLeadingComments(e);r.length>0&&(t.leadingComments=r),n.length>0&&(t.trailingComments=n),this.stack.push({node:t,start:e.start.offset})}},t.prototype.visitComment=function(t,e){var n="L"===t.type[0]?"Line":"Block",i={type:n,value:t.value};if(t.range&&(i.range=t.range),t.loc&&(i.loc=t.loc),this.comments.push(i),this.attach){var r={comment:{type:n,value:t.value,range:[e.start.offset,e.end.offset]},start:e.start.offset};t.loc&&(r.comment.loc=t.loc),t.type=n,this.leading.push(r),this.trailing.push(r)}},t.prototype.visit=function(t,e){"LineComment"===t.type||"BlockComment"===t.type?this.visitComment(t,e):this.attach&&this.visitNode(t,e)},t}();e.CommentHandler=r},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0});var s=n(4),o=n(5),a=n(6),l=n(7),c=n(8),u=n(13),h=n(14);function d(t){var e;switch(t.type){case a.JSXSyntax.JSXIdentifier:e=t.name;break;case a.JSXSyntax.JSXNamespacedName:var n=t;e=d(n.namespace)+":"+d(n.name);break;case a.JSXSyntax.JSXMemberExpression:var i=t;e=d(i.object)+"."+d(i.property)}return e}u.TokenName[100]="JSXIdentifier",u.TokenName[101]="JSXText";var f=function(t){function e(e,n,i){return t.call(this,e,n,i)||this}return r(e,t),e.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():t.prototype.parsePrimaryExpression.call(this)},e.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},e.prototype.finishJSX=function(){this.nextToken()},e.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},e.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},e.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},e.prototype.scanXHTMLEntity=function(t){for(var e="&",n=!0,i=!1,r=!1,o=!1;!this.scanner.eof()&&n&&!i;){var a=this.scanner.source[this.scanner.index];if(a===t)break;if(i=";"===a,e+=a,++this.scanner.index,!i)switch(e.length){case 2:r="#"===a;break;case 3:r&&(n=(o="x"===a)||s.Character.isDecimalDigit(a.charCodeAt(0)),r=r&&!o);break;default:n=(n=n&&!(r&&!s.Character.isDecimalDigit(a.charCodeAt(0))))&&!(o&&!s.Character.isHexDigit(a.charCodeAt(0)))}}if(n&&i&&e.length>2){var l=e.substr(1,e.length-2);r&&l.length>1?e=String.fromCharCode(parseInt(l.substr(1),10)):o&&l.length>2?e=String.fromCharCode(parseInt("0"+l.substr(1),16)):r||o||!h.XHTMLEntities[l]||(e=h.XHTMLEntities[l])}return e},e.prototype.lexJSX=function(){var t=this.scanner.source.charCodeAt(this.scanner.index);if(60===t||62===t||47===t||58===t||61===t||123===t||125===t)return{type:7,value:r=this.scanner.source[this.scanner.index++],lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index};if(34===t||39===t){for(var e=this.scanner.index,n=this.scanner.source[this.scanner.index++],i="";!this.scanner.eof()&&(l=this.scanner.source[this.scanner.index++])!==n;)i+="&"===l?this.scanXHTMLEntity(n):l;return{type:8,value:i,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index}}if(46===t){var r,o=this.scanner.source.charCodeAt(this.scanner.index+1),a=this.scanner.source.charCodeAt(this.scanner.index+2);return e=this.scanner.index,this.scanner.index+=(r=46===o&&46===a?"...":".").length,{type:7,value:r,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index}}if(96===t)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(s.Character.isIdentifierStart(t)&&92!==t){for(e=this.scanner.index,++this.scanner.index;!this.scanner.eof();){var l=this.scanner.source.charCodeAt(this.scanner.index);if(s.Character.isIdentifierPart(l)&&92!==l)++this.scanner.index;else{if(45!==l)break;++this.scanner.index}}return{type:100,value:this.scanner.source.slice(e,this.scanner.index),lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index}}return this.scanner.lex()},e.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var t=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(t)),t},e.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var t=this.scanner.index,e="";!this.scanner.eof();){var n=this.scanner.source[this.scanner.index];if("{"===n||"<"===n)break;++this.scanner.index,e+=n,s.Character.isLineTerminator(n.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===n&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var i={type:101,value:e,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index};return e.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(i)),i},e.prototype.peekJSXToken=function(){var t=this.scanner.saveState();this.scanner.scanComments();var e=this.lexJSX();return this.scanner.restoreState(t),e},e.prototype.expectJSX=function(t){var e=this.nextJSXToken();7===e.type&&e.value===t||this.throwUnexpectedToken(e)},e.prototype.matchJSX=function(t){var e=this.peekJSXToken();return 7===e.type&&e.value===t},e.prototype.parseJSXIdentifier=function(){var t=this.createJSXNode(),e=this.nextJSXToken();return 100!==e.type&&this.throwUnexpectedToken(e),this.finalize(t,new o.JSXIdentifier(e.value))},e.prototype.parseJSXElementName=function(){var t=this.createJSXNode(),e=this.parseJSXIdentifier();if(this.matchJSX(":")){var n=e;this.expectJSX(":");var i=this.parseJSXIdentifier();e=this.finalize(t,new o.JSXNamespacedName(n,i))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var r=e;this.expectJSX(".");var s=this.parseJSXIdentifier();e=this.finalize(t,new o.JSXMemberExpression(r,s))}return e},e.prototype.parseJSXAttributeName=function(){var t,e=this.createJSXNode(),n=this.parseJSXIdentifier();if(this.matchJSX(":")){var i=n;this.expectJSX(":");var r=this.parseJSXIdentifier();t=this.finalize(e,new o.JSXNamespacedName(i,r))}else t=n;return t},e.prototype.parseJSXStringLiteralAttribute=function(){var t=this.createJSXNode(),e=this.nextJSXToken();8!==e.type&&this.throwUnexpectedToken(e);var n=this.getTokenRaw(e);return this.finalize(t,new l.Literal(e.value,n))},e.prototype.parseJSXExpressionAttribute=function(){var t=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var e=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(t,new o.JSXExpressionContainer(e))},e.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},e.prototype.parseJSXNameValueAttribute=function(){var t=this.createJSXNode(),e=this.parseJSXAttributeName(),n=null;return this.matchJSX("=")&&(this.expectJSX("="),n=this.parseJSXAttributeValue()),this.finalize(t,new o.JSXAttribute(e,n))},e.prototype.parseJSXSpreadAttribute=function(){var t=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var e=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(t,new o.JSXSpreadAttribute(e))},e.prototype.parseJSXAttributes=function(){for(var t=[];!this.matchJSX("/")&&!this.matchJSX(">");){var e=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();t.push(e)}return t},e.prototype.parseJSXOpeningElement=function(){var t=this.createJSXNode();this.expectJSX("<");var e=this.parseJSXElementName(),n=this.parseJSXAttributes(),i=this.matchJSX("/");return i&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(t,new o.JSXOpeningElement(e,i,n))},e.prototype.parseJSXBoundaryElement=function(){var t=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var e=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(t,new o.JSXClosingElement(e))}var n=this.parseJSXElementName(),i=this.parseJSXAttributes(),r=this.matchJSX("/");return r&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(t,new o.JSXOpeningElement(n,r,i))},e.prototype.parseJSXEmptyExpression=function(){var t=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(t,new o.JSXEmptyExpression)},e.prototype.parseJSXExpressionContainer=function(){var t,e=this.createJSXNode();return this.expectJSX("{"),this.matchJSX("}")?(t=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),t=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(e,new o.JSXExpressionContainer(t))},e.prototype.parseJSXChildren=function(){for(var t=[];!this.scanner.eof();){var e=this.createJSXChildNode(),n=this.nextJSXText();if(n.start0))break;s=this.finalize(t.node,new o.JSXElement(t.opening,t.children,t.closing)),(t=e[e.length-1]).children.push(s),e.pop()}}return t},e.prototype.parseJSXElement=function(){var t=this.createJSXNode(),e=this.parseJSXOpeningElement(),n=[],i=null;if(!e.selfClosing){var r=this.parseComplexJSXElement({node:t,opening:e,closing:i,children:n});n=r.children,i=r.closing}return this.finalize(t,new o.JSXElement(e,n,i))},e.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var t=this.parseJSXElement();return this.finishJSX(),t},e.prototype.isStartOfExpression=function(){return t.prototype.isStartOfExpression.call(this)||this.match("<")},e}(c.Parser);e.JSXParser=f},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};e.Character={fromCodePoint:function(t){return t<65536?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10))+String.fromCharCode(56320+(t-65536&1023))},isWhiteSpace:function(t){return 32===t||9===t||11===t||12===t||160===t||t>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(t)>=0},isLineTerminator:function(t){return 10===t||13===t||8232===t||8233===t},isIdentifierStart:function(t){return 36===t||95===t||t>=65&&t<=90||t>=97&&t<=122||92===t||t>=128&&n.NonAsciiIdentifierStart.test(e.Character.fromCodePoint(t))},isIdentifierPart:function(t){return 36===t||95===t||t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||92===t||t>=128&&n.NonAsciiIdentifierPart.test(e.Character.fromCodePoint(t))},isDecimalDigit:function(t){return t>=48&&t<=57},isHexDigit:function(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102},isOctalDigit:function(t){return t>=48&&t<=55}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(6);e.JSXClosingElement=function(t){this.type=i.JSXSyntax.JSXClosingElement,this.name=t},e.JSXElement=function(t,e,n){this.type=i.JSXSyntax.JSXElement,this.openingElement=t,this.children=e,this.closingElement=n},e.JSXEmptyExpression=function(){this.type=i.JSXSyntax.JSXEmptyExpression},e.JSXExpressionContainer=function(t){this.type=i.JSXSyntax.JSXExpressionContainer,this.expression=t},e.JSXIdentifier=function(t){this.type=i.JSXSyntax.JSXIdentifier,this.name=t},e.JSXMemberExpression=function(t,e){this.type=i.JSXSyntax.JSXMemberExpression,this.object=t,this.property=e},e.JSXAttribute=function(t,e){this.type=i.JSXSyntax.JSXAttribute,this.name=t,this.value=e},e.JSXNamespacedName=function(t,e){this.type=i.JSXSyntax.JSXNamespacedName,this.namespace=t,this.name=e},e.JSXOpeningElement=function(t,e,n){this.type=i.JSXSyntax.JSXOpeningElement,this.name=t,this.selfClosing=e,this.attributes=n},e.JSXSpreadAttribute=function(t){this.type=i.JSXSyntax.JSXSpreadAttribute,this.argument=t},e.JSXText=function(t,e){this.type=i.JSXSyntax.JSXText,this.value=t,this.raw=e}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(2);e.ArrayExpression=function(t){this.type=i.Syntax.ArrayExpression,this.elements=t},e.ArrayPattern=function(t){this.type=i.Syntax.ArrayPattern,this.elements=t},e.ArrowFunctionExpression=function(t,e,n){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=t,this.body=e,this.generator=!1,this.expression=n,this.async=!1},e.AssignmentExpression=function(t,e,n){this.type=i.Syntax.AssignmentExpression,this.operator=t,this.left=e,this.right=n},e.AssignmentPattern=function(t,e){this.type=i.Syntax.AssignmentPattern,this.left=t,this.right=e},e.AsyncArrowFunctionExpression=function(t,e,n){this.type=i.Syntax.ArrowFunctionExpression,this.id=null,this.params=t,this.body=e,this.generator=!1,this.expression=n,this.async=!0},e.AsyncFunctionDeclaration=function(t,e,n){this.type=i.Syntax.FunctionDeclaration,this.id=t,this.params=e,this.body=n,this.generator=!1,this.expression=!1,this.async=!0},e.AsyncFunctionExpression=function(t,e,n){this.type=i.Syntax.FunctionExpression,this.id=t,this.params=e,this.body=n,this.generator=!1,this.expression=!1,this.async=!0},e.AwaitExpression=function(t){this.type=i.Syntax.AwaitExpression,this.argument=t},e.BinaryExpression=function(t,e,n){this.type="||"===t||"&&"===t?i.Syntax.LogicalExpression:i.Syntax.BinaryExpression,this.operator=t,this.left=e,this.right=n},e.BlockStatement=function(t){this.type=i.Syntax.BlockStatement,this.body=t},e.BreakStatement=function(t){this.type=i.Syntax.BreakStatement,this.label=t},e.CallExpression=function(t,e){this.type=i.Syntax.CallExpression,this.callee=t,this.arguments=e},e.CatchClause=function(t,e){this.type=i.Syntax.CatchClause,this.param=t,this.body=e},e.ClassBody=function(t){this.type=i.Syntax.ClassBody,this.body=t},e.ClassDeclaration=function(t,e,n){this.type=i.Syntax.ClassDeclaration,this.id=t,this.superClass=e,this.body=n},e.ClassExpression=function(t,e,n){this.type=i.Syntax.ClassExpression,this.id=t,this.superClass=e,this.body=n},e.ComputedMemberExpression=function(t,e){this.type=i.Syntax.MemberExpression,this.computed=!0,this.object=t,this.property=e},e.ConditionalExpression=function(t,e,n){this.type=i.Syntax.ConditionalExpression,this.test=t,this.consequent=e,this.alternate=n},e.ContinueStatement=function(t){this.type=i.Syntax.ContinueStatement,this.label=t},e.DebuggerStatement=function(){this.type=i.Syntax.DebuggerStatement},e.Directive=function(t,e){this.type=i.Syntax.ExpressionStatement,this.expression=t,this.directive=e},e.DoWhileStatement=function(t,e){this.type=i.Syntax.DoWhileStatement,this.body=t,this.test=e},e.EmptyStatement=function(){this.type=i.Syntax.EmptyStatement},e.ExportAllDeclaration=function(t){this.type=i.Syntax.ExportAllDeclaration,this.source=t},e.ExportDefaultDeclaration=function(t){this.type=i.Syntax.ExportDefaultDeclaration,this.declaration=t},e.ExportNamedDeclaration=function(t,e,n){this.type=i.Syntax.ExportNamedDeclaration,this.declaration=t,this.specifiers=e,this.source=n},e.ExportSpecifier=function(t,e){this.type=i.Syntax.ExportSpecifier,this.exported=e,this.local=t},e.ExpressionStatement=function(t){this.type=i.Syntax.ExpressionStatement,this.expression=t},e.ForInStatement=function(t,e,n){this.type=i.Syntax.ForInStatement,this.left=t,this.right=e,this.body=n,this.each=!1},e.ForOfStatement=function(t,e,n){this.type=i.Syntax.ForOfStatement,this.left=t,this.right=e,this.body=n},e.ForStatement=function(t,e,n,r){this.type=i.Syntax.ForStatement,this.init=t,this.test=e,this.update=n,this.body=r},e.FunctionDeclaration=function(t,e,n,r){this.type=i.Syntax.FunctionDeclaration,this.id=t,this.params=e,this.body=n,this.generator=r,this.expression=!1,this.async=!1},e.FunctionExpression=function(t,e,n,r){this.type=i.Syntax.FunctionExpression,this.id=t,this.params=e,this.body=n,this.generator=r,this.expression=!1,this.async=!1},e.Identifier=function(t){this.type=i.Syntax.Identifier,this.name=t},e.IfStatement=function(t,e,n){this.type=i.Syntax.IfStatement,this.test=t,this.consequent=e,this.alternate=n},e.ImportDeclaration=function(t,e){this.type=i.Syntax.ImportDeclaration,this.specifiers=t,this.source=e},e.ImportDefaultSpecifier=function(t){this.type=i.Syntax.ImportDefaultSpecifier,this.local=t},e.ImportNamespaceSpecifier=function(t){this.type=i.Syntax.ImportNamespaceSpecifier,this.local=t},e.ImportSpecifier=function(t,e){this.type=i.Syntax.ImportSpecifier,this.local=t,this.imported=e},e.LabeledStatement=function(t,e){this.type=i.Syntax.LabeledStatement,this.label=t,this.body=e},e.Literal=function(t,e){this.type=i.Syntax.Literal,this.value=t,this.raw=e},e.MetaProperty=function(t,e){this.type=i.Syntax.MetaProperty,this.meta=t,this.property=e},e.MethodDefinition=function(t,e,n,r,s){this.type=i.Syntax.MethodDefinition,this.key=t,this.computed=e,this.value=n,this.kind=r,this.static=s},e.Module=function(t){this.type=i.Syntax.Program,this.body=t,this.sourceType="module"},e.NewExpression=function(t,e){this.type=i.Syntax.NewExpression,this.callee=t,this.arguments=e},e.ObjectExpression=function(t){this.type=i.Syntax.ObjectExpression,this.properties=t},e.ObjectPattern=function(t){this.type=i.Syntax.ObjectPattern,this.properties=t},e.Property=function(t,e,n,r,s,o){this.type=i.Syntax.Property,this.key=e,this.computed=n,this.value=r,this.kind=t,this.method=s,this.shorthand=o},e.RegexLiteral=function(t,e,n,r){this.type=i.Syntax.Literal,this.value=t,this.raw=e,this.regex={pattern:n,flags:r}},e.RestElement=function(t){this.type=i.Syntax.RestElement,this.argument=t},e.ReturnStatement=function(t){this.type=i.Syntax.ReturnStatement,this.argument=t},e.Script=function(t){this.type=i.Syntax.Program,this.body=t,this.sourceType="script"},e.SequenceExpression=function(t){this.type=i.Syntax.SequenceExpression,this.expressions=t},e.SpreadElement=function(t){this.type=i.Syntax.SpreadElement,this.argument=t},e.StaticMemberExpression=function(t,e){this.type=i.Syntax.MemberExpression,this.computed=!1,this.object=t,this.property=e},e.Super=function(){this.type=i.Syntax.Super},e.SwitchCase=function(t,e){this.type=i.Syntax.SwitchCase,this.test=t,this.consequent=e},e.SwitchStatement=function(t,e){this.type=i.Syntax.SwitchStatement,this.discriminant=t,this.cases=e},e.TaggedTemplateExpression=function(t,e){this.type=i.Syntax.TaggedTemplateExpression,this.tag=t,this.quasi=e},e.TemplateElement=function(t,e){this.type=i.Syntax.TemplateElement,this.value=t,this.tail=e},e.TemplateLiteral=function(t,e){this.type=i.Syntax.TemplateLiteral,this.quasis=t,this.expressions=e},e.ThisExpression=function(){this.type=i.Syntax.ThisExpression},e.ThrowStatement=function(t){this.type=i.Syntax.ThrowStatement,this.argument=t},e.TryStatement=function(t,e,n){this.type=i.Syntax.TryStatement,this.block=t,this.handler=e,this.finalizer=n},e.UnaryExpression=function(t,e){this.type=i.Syntax.UnaryExpression,this.operator=t,this.argument=e,this.prefix=!0},e.UpdateExpression=function(t,e,n){this.type=i.Syntax.UpdateExpression,this.operator=t,this.argument=e,this.prefix=n},e.VariableDeclaration=function(t,e){this.type=i.Syntax.VariableDeclaration,this.declarations=t,this.kind=e},e.VariableDeclarator=function(t,e){this.type=i.Syntax.VariableDeclarator,this.id=t,this.init=e},e.WhileStatement=function(t,e){this.type=i.Syntax.WhileStatement,this.test=t,this.body=e},e.WithStatement=function(t,e){this.type=i.Syntax.WithStatement,this.object=t,this.body=e},e.YieldExpression=function(t,e){this.type=i.Syntax.YieldExpression,this.argument=t,this.delegate=e}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(9),r=n(10),s=n(11),o=n(7),a=n(12),l=n(2),c=n(13),u="ArrowParameterPlaceHolder",h=function(){function t(t,e,n){void 0===e&&(e={}),this.config={range:"boolean"==typeof e.range&&e.range,loc:"boolean"==typeof e.loc&&e.loc,source:null,tokens:"boolean"==typeof e.tokens&&e.tokens,comment:"boolean"==typeof e.comment&&e.comment,tolerant:"boolean"==typeof e.tolerant&&e.tolerant},this.config.loc&&e.source&&null!==e.source&&(this.config.source=String(e.source)),this.delegate=n,this.errorHandler=new r.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new a.Scanner(t,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return t.prototype.throwError=function(t){for(var e=[],n=1;n0&&this.delegate)for(var e=0;e>="===t||">>>="===t||"&="===t||"^="===t||"|="===t},t.prototype.isolateCoverGrammar=function(t){var e=this.context.isBindingElement,n=this.context.isAssignmentTarget,i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var r=t.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=e,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=i,r},t.prototype.inheritCoverGrammar=function(t){var e=this.context.isBindingElement,n=this.context.isAssignmentTarget,i=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var r=t.call(this);return this.context.isBindingElement=this.context.isBindingElement&&e,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=i||this.context.firstCoverInitializedNameError,r},t.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(2===this.lookahead.type||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},t.prototype.parsePrimaryExpression=function(){var t,e,n,i=this.createNode();switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),t=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(i,new o.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,s.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,e=this.nextToken(),n=this.getTokenRaw(e),t=this.finalize(i,new o.Literal(e.value,n));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,e=this.nextToken(),n=this.getTokenRaw(e),t=this.finalize(i,new o.Literal("true"===e.value,n));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,e=this.nextToken(),n=this.getTokenRaw(e),t=this.finalize(i,new o.Literal(null,n));break;case 10:t=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,t=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":t=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":t=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,e=this.nextRegexToken(),n=this.getTokenRaw(e),t=this.finalize(i,new o.RegexLiteral(e.regex,n,e.pattern,e.flags));break;default:t=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?t=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?t=this.finalize(i,new o.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?t=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),t=this.finalize(i,new o.ThisExpression)):t=this.matchKeyword("class")?this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:t=this.throwUnexpectedToken(this.nextToken())}return t},t.prototype.parseSpreadElement=function(){var t=this.createNode();this.expect("...");var e=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(t,new o.SpreadElement(e))},t.prototype.parseArrayInitializer=function(){var t=this.createNode(),e=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),e.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),e.push(n)}else e.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(t,new o.ArrayExpression(e))},t.prototype.parsePropertyMethod=function(t){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var e=this.context.strict,n=this.context.allowStrictDirective;this.context.allowStrictDirective=t.simple;var i=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&t.firstRestricted&&this.tolerateUnexpectedToken(t.firstRestricted,t.message),this.context.strict&&t.stricted&&this.tolerateUnexpectedToken(t.stricted,t.message),this.context.strict=e,this.context.allowStrictDirective=n,i},t.prototype.parsePropertyMethodFunction=function(){var t=this.createNode(),e=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters(),i=this.parsePropertyMethod(n);return this.context.allowYield=e,this.finalize(t,new o.FunctionExpression(null,n.params,i,!1))},t.prototype.parsePropertyMethodAsyncFunction=function(){var t=this.createNode(),e=this.context.allowYield,n=this.context.await;this.context.allowYield=!1,this.context.await=!0;var i=this.parseFormalParameters(),r=this.parsePropertyMethod(i);return this.context.allowYield=e,this.context.await=n,this.finalize(t,new o.AsyncFunctionExpression(null,i.params,r))},t.prototype.parseObjectPropertyKey=function(){var t,e=this.createNode(),n=this.nextToken();switch(n.type){case 8:case 6:this.context.strict&&n.octal&&this.tolerateUnexpectedToken(n,s.Messages.StrictOctalLiteral);var i=this.getTokenRaw(n);t=this.finalize(e,new o.Literal(n.value,i));break;case 3:case 1:case 5:case 4:t=this.finalize(e,new o.Identifier(n.value));break;case 7:"["===n.value?(t=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):t=this.throwUnexpectedToken(n);break;default:t=this.throwUnexpectedToken(n)}return t},t.prototype.isPropertyKey=function(t,e){return t.type===l.Syntax.Identifier&&t.name===e||t.type===l.Syntax.Literal&&t.value===e},t.prototype.parseObjectProperty=function(t){var e,n=this.createNode(),i=this.lookahead,r=null,a=null,l=!1,c=!1,u=!1,h=!1;if(3===i.type){var d=i.value;this.nextToken(),l=this.match("["),r=(h=!(this.hasLineTerminator||"async"!==d||this.match(":")||this.match("(")||this.match("*")||this.match(",")))?this.parseObjectPropertyKey():this.finalize(n,new o.Identifier(d))}else this.match("*")?this.nextToken():(l=this.match("["),r=this.parseObjectPropertyKey());var f=this.qualifiedPropertyName(this.lookahead);if(3===i.type&&!h&&"get"===i.value&&f)e="get",l=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,a=this.parseGetterMethod();else if(3===i.type&&!h&&"set"===i.value&&f)e="set",l=this.match("["),r=this.parseObjectPropertyKey(),a=this.parseSetterMethod();else if(7===i.type&&"*"===i.value&&f)e="init",l=this.match("["),r=this.parseObjectPropertyKey(),a=this.parseGeneratorMethod(),c=!0;else if(r||this.throwUnexpectedToken(this.lookahead),e="init",this.match(":")&&!h)!l&&this.isPropertyKey(r,"__proto__")&&(t.value&&this.tolerateError(s.Messages.DuplicateProtoProperty),t.value=!0),this.nextToken(),a=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))a=h?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),c=!0;else if(3===i.type)if(d=this.finalize(n,new o.Identifier(i.value)),this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),u=!0;var p=this.isolateCoverGrammar(this.parseAssignmentExpression);a=this.finalize(n,new o.AssignmentPattern(d,p))}else u=!0,a=d;else this.throwUnexpectedToken(this.nextToken());return this.finalize(n,new o.Property(e,r,l,a,c,u))},t.prototype.parseObjectInitializer=function(){var t=this.createNode();this.expect("{");for(var e=[],n={value:!1};!this.match("}");)e.push(this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(t,new o.ObjectExpression(e))},t.prototype.parseTemplateHead=function(){i.assert(this.lookahead.head,"Template literal must start with a template head");var t=this.createNode(),e=this.nextToken();return this.finalize(t,new o.TemplateElement({raw:e.value,cooked:e.cooked},e.tail))},t.prototype.parseTemplateElement=function(){10!==this.lookahead.type&&this.throwUnexpectedToken();var t=this.createNode(),e=this.nextToken();return this.finalize(t,new o.TemplateElement({raw:e.value,cooked:e.cooked},e.tail))},t.prototype.parseTemplateLiteral=function(){var t=this.createNode(),e=[],n=[],i=this.parseTemplateHead();for(n.push(i);!i.tail;)e.push(this.parseExpression()),i=this.parseTemplateElement(),n.push(i);return this.finalize(t,new o.TemplateLiteral(n,e))},t.prototype.reinterpretExpressionAsPattern=function(t){switch(t.type){case l.Syntax.Identifier:case l.Syntax.MemberExpression:case l.Syntax.RestElement:case l.Syntax.AssignmentPattern:break;case l.Syntax.SpreadElement:t.type=l.Syntax.RestElement,this.reinterpretExpressionAsPattern(t.argument);break;case l.Syntax.ArrayExpression:t.type=l.Syntax.ArrayPattern;for(var e=0;e")||this.expect("=>"),t={type:u,params:[],async:!1};else{var e=this.lookahead,n=[];if(this.match("..."))t=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),t={type:u,params:[t],async:!1};else{var i=!1;if(this.context.isBindingElement=!0,t=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var r=[];for(this.context.isAssignmentTarget=!1,r.push(t);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var s=0;s")||this.expect("=>"),this.context.isBindingElement=!1,s=0;s")&&(t.type===l.Syntax.Identifier&&"yield"===t.name&&(i=!0,t={type:u,params:[t],async:!1}),!i)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),t.type===l.Syntax.SequenceExpression)for(s=0;s")){for(var l=0;l0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var r=[t,this.lookahead],s=e,a=this.isolateCoverGrammar(this.parseExponentiationExpression),l=[s,n.value,a],c=[i];!((i=this.binaryPrecedence(this.lookahead))<=0);){for(;l.length>2&&i<=c[c.length-1];){a=l.pop();var u=l.pop();c.pop(),s=l.pop(),r.pop();var h=this.startNode(r[r.length-1]);l.push(this.finalize(h,new o.BinaryExpression(u,s,a)))}l.push(this.nextToken().value),c.push(i),r.push(this.lookahead),l.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var d=l.length-1;e=l[d];for(var f=r.pop();d>1;){var p=r.pop();h=this.startNode(p,f&&f.lineStart),e=this.finalize(h,new o.BinaryExpression(u=l[d-1],l[d-2],e)),d-=2,f=p}}return e},t.prototype.parseConditionalExpression=function(){var t=this.lookahead,e=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var n=this.context.allowIn;this.context.allowIn=!0;var i=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=n,this.expect(":");var r=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new o.ConditionalExpression(e,i,r)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return e},t.prototype.checkPatternParam=function(t,e){switch(e.type){case l.Syntax.Identifier:this.validateParam(t,e,e.name);break;case l.Syntax.RestElement:this.checkPatternParam(t,e.argument);break;case l.Syntax.AssignmentPattern:this.checkPatternParam(t,e.left);break;case l.Syntax.ArrayPattern:for(var n=0;n")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var r=t.async,a=this.reinterpretAsCoverFormalsList(t);if(a){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var c=this.context.strict,h=this.context.allowStrictDirective;this.context.allowStrictDirective=a.simple;var d=this.context.allowYield,f=this.context.await;this.context.allowYield=!0,this.context.await=r;var p=this.startNode(e);this.expect("=>");var g=void 0;if(this.match("{")){var m=this.context.allowIn;this.context.allowIn=!0,g=this.parseFunctionSourceElements(),this.context.allowIn=m}else g=this.isolateCoverGrammar(this.parseAssignmentExpression);var v=g.type!==l.Syntax.BlockStatement;this.context.strict&&a.firstRestricted&&this.throwUnexpectedToken(a.firstRestricted,a.message),this.context.strict&&a.stricted&&this.tolerateUnexpectedToken(a.stricted,a.message),t=this.finalize(p,r?new o.AsyncArrowFunctionExpression(a.params,g,v):new o.ArrowFunctionExpression(a.params,g,v)),this.context.strict=c,this.context.allowStrictDirective=h,this.context.allowYield=d,this.context.await=f}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(s.Messages.InvalidLHSInAssignment),this.context.strict&&t.type===l.Syntax.Identifier){var y=t;this.scanner.isRestrictedWord(y.name)&&this.tolerateUnexpectedToken(n,s.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(y.name)&&this.tolerateUnexpectedToken(n,s.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(t):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1);var b=(n=this.nextToken()).value,w=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new o.AssignmentExpression(b,t,w)),this.context.firstCoverInitializedNameError=null}}return t},t.prototype.parseExpression=function(){var t=this.lookahead,e=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];for(n.push(e);2!==this.lookahead.type&&this.match(",");)this.nextToken(),n.push(this.isolateCoverGrammar(this.parseAssignmentExpression));e=this.finalize(this.startNode(t),new o.SequenceExpression(n))}return e},t.prototype.parseStatementListItem=function(){var t;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,s.Messages.IllegalExportDeclaration),t=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,s.Messages.IllegalImportDeclaration),t=this.parseImportDeclaration();break;case"const":t=this.parseLexicalDeclaration({inFor:!1});break;case"function":t=this.parseFunctionDeclaration();break;case"class":t=this.parseClassDeclaration();break;case"let":t=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:t=this.parseStatement()}else t=this.parseStatement();return t},t.prototype.parseBlock=function(){var t=this.createNode();this.expect("{");for(var e=[];!this.match("}");)e.push(this.parseStatementListItem());return this.expect("}"),this.finalize(t,new o.BlockStatement(e))},t.prototype.parseLexicalBinding=function(t,e){var n=this.createNode(),i=this.parsePattern([],t);this.context.strict&&i.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(i.name)&&this.tolerateError(s.Messages.StrictVarName);var r=null;return"const"===t?this.matchKeyword("in")||this.matchContextualKeyword("of")||(this.match("=")?(this.nextToken(),r=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(s.Messages.DeclarationMissingInitializer,"const")):(!e.inFor&&i.type!==l.Syntax.Identifier||this.match("="))&&(this.expect("="),r=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(n,new o.VariableDeclarator(i,r))},t.prototype.parseBindingList=function(t,e){for(var n=[this.parseLexicalBinding(t,e)];this.match(",");)this.nextToken(),n.push(this.parseLexicalBinding(t,e));return n},t.prototype.isLexicalDeclaration=function(){var t=this.scanner.saveState();this.scanner.scanComments();var e=this.scanner.lex();return this.scanner.restoreState(t),3===e.type||7===e.type&&"["===e.value||7===e.type&&"{"===e.value||4===e.type&&"let"===e.value||4===e.type&&"yield"===e.value},t.prototype.parseLexicalDeclaration=function(t){var e=this.createNode(),n=this.nextToken().value;i.assert("let"===n||"const"===n,"Lexical declaration must be either let or const");var r=this.parseBindingList(n,t);return this.consumeSemicolon(),this.finalize(e,new o.VariableDeclaration(r,n))},t.prototype.parseBindingRestElement=function(t,e){var n=this.createNode();this.expect("...");var i=this.parsePattern(t,e);return this.finalize(n,new o.RestElement(i))},t.prototype.parseArrayPattern=function(t,e){var n=this.createNode();this.expect("[");for(var i=[];!this.match("]");)if(this.match(","))this.nextToken(),i.push(null);else{if(this.match("...")){i.push(this.parseBindingRestElement(t,e));break}i.push(this.parsePatternWithDefault(t,e)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(n,new o.ArrayPattern(i))},t.prototype.parsePropertyPattern=function(t,e){var n,i,r=this.createNode(),s=!1,a=!1;if(3===this.lookahead.type){var l=this.lookahead;n=this.parseVariableIdentifier();var c=this.finalize(r,new o.Identifier(l.value));if(this.match("=")){t.push(l),a=!0,this.nextToken();var u=this.parseAssignmentExpression();i=this.finalize(this.startNode(l),new o.AssignmentPattern(c,u))}else this.match(":")?(this.expect(":"),i=this.parsePatternWithDefault(t,e)):(t.push(l),a=!0,i=c)}else s=this.match("["),n=this.parseObjectPropertyKey(),this.expect(":"),i=this.parsePatternWithDefault(t,e);return this.finalize(r,new o.Property("init",n,s,i,!1,a))},t.prototype.parseObjectPattern=function(t,e){var n=this.createNode(),i=[];for(this.expect("{");!this.match("}");)i.push(this.parsePropertyPattern(t,e)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(n,new o.ObjectPattern(i))},t.prototype.parsePattern=function(t,e){var n;return this.match("[")?n=this.parseArrayPattern(t,e):this.match("{")?n=this.parseObjectPattern(t,e):(!this.matchKeyword("let")||"const"!==e&&"let"!==e||this.tolerateUnexpectedToken(this.lookahead,s.Messages.LetInLexicalBinding),t.push(this.lookahead),n=this.parseVariableIdentifier(e)),n},t.prototype.parsePatternWithDefault=function(t,e){var n=this.lookahead,i=this.parsePattern(t,e);if(this.match("=")){this.nextToken();var r=this.context.allowYield;this.context.allowYield=!0;var s=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=r,i=this.finalize(this.startNode(n),new o.AssignmentPattern(i,s))}return i},t.prototype.parseVariableIdentifier=function(t){var e=this.createNode(),n=this.nextToken();return 4===n.type&&"yield"===n.value?this.context.strict?this.tolerateUnexpectedToken(n,s.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(n):3!==n.type?this.context.strict&&4===n.type&&this.scanner.isStrictModeReservedWord(n.value)?this.tolerateUnexpectedToken(n,s.Messages.StrictReservedWord):(this.context.strict||"let"!==n.value||"var"!==t)&&this.throwUnexpectedToken(n):(this.context.isModule||this.context.await)&&3===n.type&&"await"===n.value&&this.tolerateUnexpectedToken(n),this.finalize(e,new o.Identifier(n.value))},t.prototype.parseVariableDeclaration=function(t){var e=this.createNode(),n=this.parsePattern([],"var");this.context.strict&&n.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(s.Messages.StrictVarName);var i=null;return this.match("=")?(this.nextToken(),i=this.isolateCoverGrammar(this.parseAssignmentExpression)):n.type===l.Syntax.Identifier||t.inFor||this.expect("="),this.finalize(e,new o.VariableDeclarator(n,i))},t.prototype.parseVariableDeclarationList=function(t){var e={inFor:t.inFor},n=[];for(n.push(this.parseVariableDeclaration(e));this.match(",");)this.nextToken(),n.push(this.parseVariableDeclaration(e));return n},t.prototype.parseVariableStatement=function(){var t=this.createNode();this.expectKeyword("var");var e=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(t,new o.VariableDeclaration(e,"var"))},t.prototype.parseEmptyStatement=function(){var t=this.createNode();return this.expect(";"),this.finalize(t,new o.EmptyStatement)},t.prototype.parseExpressionStatement=function(){var t=this.createNode(),e=this.parseExpression();return this.consumeSemicolon(),this.finalize(t,new o.ExpressionStatement(e))},t.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(s.Messages.StrictFunction),this.parseStatement()},t.prototype.parseIfStatement=function(){var t,e=this.createNode(),n=null;this.expectKeyword("if"),this.expect("(");var i=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new o.EmptyStatement)):(this.expect(")"),t=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),n=this.parseIfClause())),this.finalize(e,new o.IfStatement(i,t,n))},t.prototype.parseDoWhileStatement=function(){var t=this.createNode();this.expectKeyword("do");var e=this.context.inIteration;this.context.inIteration=!0;var n=this.parseStatement();this.context.inIteration=e,this.expectKeyword("while"),this.expect("(");var i=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(t,new o.DoWhileStatement(n,i))},t.prototype.parseWhileStatement=function(){var t,e=this.createNode();this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new o.EmptyStatement);else{this.expect(")");var i=this.context.inIteration;this.context.inIteration=!0,t=this.parseStatement(),this.context.inIteration=i}return this.finalize(e,new o.WhileStatement(n,t))},t.prototype.parseForStatement=function(){var t,e,n,i=null,r=null,a=null,c=!0,u=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){i=this.createNode(),this.nextToken();var h=this.context.allowIn;this.context.allowIn=!1;var d=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=h,1===d.length&&this.matchKeyword("in")){var f=d[0];f.init&&(f.id.type===l.Syntax.ArrayPattern||f.id.type===l.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(s.Messages.ForInOfLoopInitializer,"for-in"),i=this.finalize(i,new o.VariableDeclaration(d,"var")),this.nextToken(),t=i,e=this.parseExpression(),i=null}else 1===d.length&&null===d[0].init&&this.matchContextualKeyword("of")?(i=this.finalize(i,new o.VariableDeclaration(d,"var")),this.nextToken(),t=i,e=this.parseAssignmentExpression(),i=null,c=!1):(i=this.finalize(i,new o.VariableDeclaration(d,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){i=this.createNode();var p=this.nextToken().value;this.context.strict||"in"!==this.lookahead.value?(h=this.context.allowIn,this.context.allowIn=!1,d=this.parseBindingList(p,{inFor:!0}),this.context.allowIn=h,1===d.length&&null===d[0].init&&this.matchKeyword("in")?(i=this.finalize(i,new o.VariableDeclaration(d,p)),this.nextToken(),t=i,e=this.parseExpression(),i=null):1===d.length&&null===d[0].init&&this.matchContextualKeyword("of")?(i=this.finalize(i,new o.VariableDeclaration(d,p)),this.nextToken(),t=i,e=this.parseAssignmentExpression(),i=null,c=!1):(this.consumeSemicolon(),i=this.finalize(i,new o.VariableDeclaration(d,p)))):(i=this.finalize(i,new o.Identifier(p)),this.nextToken(),t=i,e=this.parseExpression(),i=null)}else{var g=this.lookahead;if(h=this.context.allowIn,this.context.allowIn=!1,i=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=h,this.matchKeyword("in"))this.context.isAssignmentTarget&&i.type!==l.Syntax.AssignmentExpression||this.tolerateError(s.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(i),t=i,e=this.parseExpression(),i=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&i.type!==l.Syntax.AssignmentExpression||this.tolerateError(s.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(i),t=i,e=this.parseAssignmentExpression(),i=null,c=!1;else{if(this.match(",")){for(var m=[i];this.match(",");)this.nextToken(),m.push(this.isolateCoverGrammar(this.parseAssignmentExpression));i=this.finalize(this.startNode(g),new o.SequenceExpression(m))}this.expect(";")}}if(void 0===t&&(this.match(";")||(r=this.parseExpression()),this.expect(";"),this.match(")")||(a=this.parseExpression())),!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),n=this.finalize(this.createNode(),new o.EmptyStatement);else{this.expect(")");var v=this.context.inIteration;this.context.inIteration=!0,n=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=v}return this.finalize(u,void 0===t?new o.ForStatement(i,r,a,n):c?new o.ForInStatement(t,e,n):new o.ForOfStatement(t,e,n))},t.prototype.parseContinueStatement=function(){var t=this.createNode();this.expectKeyword("continue");var e=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier();e=n,Object.prototype.hasOwnProperty.call(this.context.labelSet,"$"+n.name)||this.throwError(s.Messages.UnknownLabel,n.name)}return this.consumeSemicolon(),null!==e||this.context.inIteration||this.throwError(s.Messages.IllegalContinue),this.finalize(t,new o.ContinueStatement(e))},t.prototype.parseBreakStatement=function(){var t=this.createNode();this.expectKeyword("break");var e=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier();Object.prototype.hasOwnProperty.call(this.context.labelSet,"$"+n.name)||this.throwError(s.Messages.UnknownLabel,n.name),e=n}return this.consumeSemicolon(),null!==e||this.context.inIteration||this.context.inSwitch||this.throwError(s.Messages.IllegalBreak),this.finalize(t,new o.BreakStatement(e))},t.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(s.Messages.IllegalReturn);var t=this.createNode();this.expectKeyword("return");var e=(this.match(";")||this.match("}")||this.hasLineTerminator||2===this.lookahead.type)&&8!==this.lookahead.type&&10!==this.lookahead.type?null:this.parseExpression();return this.consumeSemicolon(),this.finalize(t,new o.ReturnStatement(e))},t.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(s.Messages.StrictModeWith);var t,e=this.createNode();this.expectKeyword("with"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),t=this.finalize(this.createNode(),new o.EmptyStatement)):(this.expect(")"),t=this.parseStatement()),this.finalize(e,new o.WithStatement(n,t))},t.prototype.parseSwitchCase=function(){var t,e=this.createNode();this.matchKeyword("default")?(this.nextToken(),t=null):(this.expectKeyword("case"),t=this.parseExpression()),this.expect(":");for(var n=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)n.push(this.parseStatementListItem());return this.finalize(e,new o.SwitchCase(t,n))},t.prototype.parseSwitchStatement=function(){var t=this.createNode();this.expectKeyword("switch"),this.expect("(");var e=this.parseExpression();this.expect(")");var n=this.context.inSwitch;this.context.inSwitch=!0;var i=[],r=!1;for(this.expect("{");!this.match("}");){var a=this.parseSwitchCase();null===a.test&&(r&&this.throwError(s.Messages.MultipleDefaultsInSwitch),r=!0),i.push(a)}return this.expect("}"),this.context.inSwitch=n,this.finalize(t,new o.SwitchStatement(e,i))},t.prototype.parseLabelledStatement=function(){var t,e=this.createNode(),n=this.parseExpression();if(n.type===l.Syntax.Identifier&&this.match(":")){this.nextToken();var i=n,r="$"+i.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)&&this.throwError(s.Messages.Redeclaration,"Label",i.name),this.context.labelSet[r]=!0;var a=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),a=this.parseClassDeclaration();else if(this.matchKeyword("function")){var c=this.lookahead,u=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(c,s.Messages.StrictFunction):u.generator&&this.tolerateUnexpectedToken(c,s.Messages.GeneratorInLegacyContext),a=u}else a=this.parseStatement();delete this.context.labelSet[r],t=new o.LabeledStatement(i,a)}else this.consumeSemicolon(),t=new o.ExpressionStatement(n);return this.finalize(e,t)},t.prototype.parseThrowStatement=function(){var t=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(s.Messages.NewlineAfterThrow);var e=this.parseExpression();return this.consumeSemicolon(),this.finalize(t,new o.ThrowStatement(e))},t.prototype.parseCatchClause=function(){var t=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var e=[],n=this.parsePattern(e),i={},r=0;r0&&this.tolerateError(s.Messages.BadGetterArity);var i=this.parsePropertyMethod(n);return this.context.allowYield=e,this.finalize(t,new o.FunctionExpression(null,n.params,i,!1))},t.prototype.parseSetterMethod=function(){var t=this.createNode(),e=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();1!==n.params.length?this.tolerateError(s.Messages.BadSetterArity):n.params[0]instanceof o.RestElement&&this.tolerateError(s.Messages.BadSetterRestParameter);var i=this.parsePropertyMethod(n);return this.context.allowYield=e,this.finalize(t,new o.FunctionExpression(null,n.params,i,!1))},t.prototype.parseGeneratorMethod=function(){var t=this.createNode(),e=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();this.context.allowYield=!1;var i=this.parsePropertyMethod(n);return this.context.allowYield=e,this.finalize(t,new o.FunctionExpression(null,n.params,i,!0))},t.prototype.isStartOfExpression=function(){var t=!0,e=this.lookahead.value;switch(this.lookahead.type){case 7:t="["===e||"("===e||"{"===e||"+"===e||"-"===e||"!"===e||"~"===e||"++"===e||"--"===e||"/"===e||"/="===e;break;case 4:t="class"===e||"delete"===e||"function"===e||"let"===e||"new"===e||"super"===e||"this"===e||"typeof"===e||"void"===e||"yield"===e}return t},t.prototype.parseYieldExpression=function(){var t=this.createNode();this.expectKeyword("yield");var e=null,n=!1;if(!this.hasLineTerminator){var i=this.context.allowYield;this.context.allowYield=!1,(n=this.match("*"))?(this.nextToken(),e=this.parseAssignmentExpression()):this.isStartOfExpression()&&(e=this.parseAssignmentExpression()),this.context.allowYield=i}return this.finalize(t,new o.YieldExpression(e,n))},t.prototype.parseClassElement=function(t){var e=this.lookahead,n=this.createNode(),i="",r=null,a=null,l=!1,c=!1,u=!1,h=!1;if(this.match("*"))this.nextToken();else if(l=this.match("["),"static"===(r=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(e=this.lookahead,u=!0,l=this.match("["),this.match("*")?this.nextToken():r=this.parseObjectPropertyKey()),3===e.type&&!this.hasLineTerminator&&"async"===e.value){var d=this.lookahead.value;":"!==d&&"("!==d&&"*"!==d&&(h=!0,e=this.lookahead,r=this.parseObjectPropertyKey(),3===e.type&&"constructor"===e.value&&this.tolerateUnexpectedToken(e,s.Messages.ConstructorIsAsync))}var f=this.qualifiedPropertyName(this.lookahead);return 3===e.type?"get"===e.value&&f?(i="get",l=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,a=this.parseGetterMethod()):"set"===e.value&&f&&(i="set",l=this.match("["),r=this.parseObjectPropertyKey(),a=this.parseSetterMethod()):7===e.type&&"*"===e.value&&f&&(i="init",l=this.match("["),r=this.parseObjectPropertyKey(),a=this.parseGeneratorMethod(),c=!0),!i&&r&&this.match("(")&&(i="init",a=h?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),c=!0),i||this.throwUnexpectedToken(this.lookahead),"init"===i&&(i="method"),l||(u&&this.isPropertyKey(r,"prototype")&&this.throwUnexpectedToken(e,s.Messages.StaticPrototype),!u&&this.isPropertyKey(r,"constructor")&&(("method"!==i||!c||a&&a.generator)&&this.throwUnexpectedToken(e,s.Messages.ConstructorSpecialMethod),t.value?this.throwUnexpectedToken(e,s.Messages.DuplicateConstructor):t.value=!0,i="constructor")),this.finalize(n,new o.MethodDefinition(r,l,a,i,u))},t.prototype.parseClassElementList=function(){var t=[],e={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():t.push(this.parseClassElement(e));return this.expect("}"),t},t.prototype.parseClassBody=function(){var t=this.createNode(),e=this.parseClassElementList();return this.finalize(t,new o.ClassBody(e))},t.prototype.parseClassDeclaration=function(t){var e=this.createNode(),n=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var i=t&&3!==this.lookahead.type?null:this.parseVariableIdentifier(),r=null;this.matchKeyword("extends")&&(this.nextToken(),r=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var s=this.parseClassBody();return this.context.strict=n,this.finalize(e,new o.ClassDeclaration(i,r,s))},t.prototype.parseClassExpression=function(){var t=this.createNode(),e=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=3===this.lookahead.type?this.parseVariableIdentifier():null,i=null;this.matchKeyword("extends")&&(this.nextToken(),i=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var r=this.parseClassBody();return this.context.strict=e,this.finalize(t,new o.ClassExpression(n,i,r))},t.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var t=this.createNode(),e=this.parseDirectivePrologues();2!==this.lookahead.type;)e.push(this.parseStatementListItem());return this.finalize(t,new o.Module(e))},t.prototype.parseScript=function(){for(var t=this.createNode(),e=this.parseDirectivePrologues();2!==this.lookahead.type;)e.push(this.parseStatementListItem());return this.finalize(t,new o.Script(e))},t.prototype.parseModuleSpecifier=function(){var t=this.createNode();8!==this.lookahead.type&&this.throwError(s.Messages.InvalidModuleSpecifier);var e=this.nextToken(),n=this.getTokenRaw(e);return this.finalize(t,new o.Literal(e.value,n))},t.prototype.parseImportSpecifier=function(){var t,e,n=this.createNode();return 3===this.lookahead.type?(e=t=this.parseVariableIdentifier(),this.matchContextualKeyword("as")&&(this.nextToken(),e=this.parseVariableIdentifier())):(e=t=this.parseIdentifierName(),this.matchContextualKeyword("as")?(this.nextToken(),e=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(n,new o.ImportSpecifier(e,t))},t.prototype.parseNamedImports=function(){this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),t},t.prototype.parseImportDefaultSpecifier=function(){var t=this.createNode(),e=this.parseIdentifierName();return this.finalize(t,new o.ImportDefaultSpecifier(e))},t.prototype.parseImportNamespaceSpecifier=function(){var t=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(s.Messages.NoAsAfterImportNamespace),this.nextToken();var e=this.parseIdentifierName();return this.finalize(t,new o.ImportNamespaceSpecifier(e))},t.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(s.Messages.IllegalImportDeclaration);var t,e=this.createNode();this.expectKeyword("import");var n=[];return 8===this.lookahead.type||(this.match("{")?n=n.concat(this.parseNamedImports()):this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(n.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.match("{")?n=n.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),this.matchContextualKeyword("from")||this.throwError(this.lookahead.value?s.Messages.UnexpectedToken:s.Messages.MissingFromClause,this.lookahead.value),this.nextToken()),t=this.parseModuleSpecifier(),this.consumeSemicolon(),this.finalize(e,new o.ImportDeclaration(n,t))},t.prototype.parseExportSpecifier=function(){var t=this.createNode(),e=this.parseIdentifierName(),n=e;return this.matchContextualKeyword("as")&&(this.nextToken(),n=this.parseIdentifierName()),this.finalize(t,new o.ExportSpecifier(e,n))},t.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(s.Messages.IllegalExportDeclaration);var t,e=this.createNode();if(this.expectKeyword("export"),this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var n=this.parseFunctionDeclaration(!0);t=this.finalize(e,new o.ExportDefaultDeclaration(n))}else this.matchKeyword("class")?(n=this.parseClassDeclaration(!0),t=this.finalize(e,new o.ExportDefaultDeclaration(n))):this.matchContextualKeyword("async")?(n=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression(),t=this.finalize(e,new o.ExportDefaultDeclaration(n))):(this.matchContextualKeyword("from")&&this.throwError(s.Messages.UnexpectedToken,this.lookahead.value),n=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression(),this.consumeSemicolon(),t=this.finalize(e,new o.ExportDefaultDeclaration(n)));else if(this.match("*")){this.nextToken(),this.matchContextualKeyword("from")||this.throwError(this.lookahead.value?s.Messages.UnexpectedToken:s.Messages.MissingFromClause,this.lookahead.value),this.nextToken();var i=this.parseModuleSpecifier();this.consumeSemicolon(),t=this.finalize(e,new o.ExportAllDeclaration(i))}else if(4===this.lookahead.type){switch(n=void 0,this.lookahead.value){case"let":case"const":n=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":n=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}t=this.finalize(e,new o.ExportNamedDeclaration(n,[],null))}else if(this.matchAsyncFunction())n=this.parseFunctionDeclaration(),t=this.finalize(e,new o.ExportNamedDeclaration(n,[],null));else{var r=[],a=null,l=!1;for(this.expect("{");!this.match("}");)l=l||this.matchKeyword("default"),r.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");this.expect("}"),this.matchContextualKeyword("from")?(this.nextToken(),a=this.parseModuleSpecifier(),this.consumeSemicolon()):l?this.throwError(this.lookahead.value?s.Messages.UnexpectedToken:s.Messages.MissingFromClause,this.lookahead.value):this.consumeSemicolon(),t=this.finalize(e,new o.ExportNamedDeclaration(null,r,a))}return t},t}();e.Parser=h},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.assert=function(t,e){if(!t)throw new Error("ASSERT: "+e)}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){this.errors=[],this.tolerant=!1}return t.prototype.recordError=function(t){this.errors.push(t)},t.prototype.tolerate=function(t){if(!this.tolerant)throw t;this.recordError(t)},t.prototype.constructError=function(t,e){var n=new Error(t);try{throw n}catch(i){Object.create&&Object.defineProperty&&(n=Object.create(i),Object.defineProperty(n,"column",{value:e}))}return n},t.prototype.createError=function(t,e,n,i){var r=this.constructError("Line "+e+": "+i,n);return r.index=t,r.lineNumber=e,r.description=i,r},t.prototype.throwError=function(t,e,n,i){throw this.createError(t,e,n,i)},t.prototype.tolerateError=function(t,e,n,i){var r=this.createError(t,e,n,i);if(!this.tolerant)throw r;this.recordError(r)},t}();e.ErrorHandler=n},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(9),r=n(4),s=n(11);function o(t){return"0123456789abcdef".indexOf(t.toLowerCase())}function a(t){return"01234567".indexOf(t)}var l=function(){function t(t,e){this.source=t,this.errorHandler=e,this.trackComment=!1,this.isModule=!1,this.length=t.length,this.index=0,this.lineNumber=t.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return t.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},t.prototype.restoreState=function(t){this.index=t.index,this.lineNumber=t.lineNumber,this.lineStart=t.lineStart},t.prototype.eof=function(){return this.index>=this.length},t.prototype.throwUnexpectedToken=function(t){return void 0===t&&(t=s.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,t)},t.prototype.tolerateUnexpectedToken=function(t){void 0===t&&(t=s.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,t)},t.prototype.skipSingleLineComment=function(t){var e,n,i=[];for(this.trackComment&&(i=[],e=this.index-t,n={start:{line:this.lineNumber,column:this.index-this.lineStart-t},end:{}});!this.eof();){var s=this.source.charCodeAt(this.index);if(++this.index,r.Character.isLineTerminator(s))return this.trackComment&&(n.end={line:this.lineNumber,column:this.index-this.lineStart-1},i.push({multiLine:!1,slice:[e+t,this.index-1],range:[e,this.index-1],loc:n})),13===s&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,i}return this.trackComment&&(n.end={line:this.lineNumber,column:this.index-this.lineStart},i.push({multiLine:!1,slice:[e+t,this.index],range:[e,this.index],loc:n})),i},t.prototype.skipMultiLineComment=function(){var t,e,n=[];for(this.trackComment&&(n=[],t=this.index-2,e={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var i=this.source.charCodeAt(this.index);if(r.Character.isLineTerminator(i))13===i&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===i){if(47===this.source.charCodeAt(this.index+1))return this.index+=2,this.trackComment&&(e.end={line:this.lineNumber,column:this.index-this.lineStart},n.push({multiLine:!0,slice:[t+2,this.index-2],range:[t,this.index],loc:e})),n;++this.index}else++this.index}return this.trackComment&&(e.end={line:this.lineNumber,column:this.index-this.lineStart},n.push({multiLine:!0,slice:[t+2,this.index],range:[t,this.index],loc:e})),this.tolerateUnexpectedToken(),n},t.prototype.scanComments=function(){var t;this.trackComment&&(t=[]);for(var e=0===this.index;!this.eof();){var n=this.source.charCodeAt(this.index);if(r.Character.isWhiteSpace(n))++this.index;else if(r.Character.isLineTerminator(n))++this.index,13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,e=!0;else if(47===n)if(47===(n=this.source.charCodeAt(this.index+1))){this.index+=2;var i=this.skipSingleLineComment(2);this.trackComment&&(t=t.concat(i)),e=!0}else{if(42!==n)break;this.index+=2,i=this.skipMultiLineComment(),this.trackComment&&(t=t.concat(i))}else if(e&&45===n){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3,i=this.skipSingleLineComment(3),this.trackComment&&(t=t.concat(i))}else{if(60!==n||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4,i=this.skipSingleLineComment(4),this.trackComment&&(t=t.concat(i))}}return t},t.prototype.isFutureReservedWord=function(t){switch(t){case"enum":case"export":case"import":case"super":return!0;default:return!1}},t.prototype.isStrictModeReservedWord=function(t){switch(t){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},t.prototype.isRestrictedWord=function(t){return"eval"===t||"arguments"===t},t.prototype.isKeyword=function(t){switch(t.length){case 2:return"if"===t||"in"===t||"do"===t;case 3:return"var"===t||"for"===t||"new"===t||"try"===t||"let"===t;case 4:return"this"===t||"else"===t||"case"===t||"void"===t||"with"===t||"enum"===t;case 5:return"while"===t||"break"===t||"catch"===t||"throw"===t||"const"===t||"yield"===t||"class"===t||"super"===t;case 6:return"return"===t||"typeof"===t||"delete"===t||"switch"===t||"export"===t||"import"===t;case 7:return"default"===t||"finally"===t||"extends"===t;case 8:return"function"===t||"continue"===t||"debugger"===t;case 10:return"instanceof"===t;default:return!1}},t.prototype.codePointAt=function(t){var e=this.source.charCodeAt(t);if(e>=55296&&e<=56319){var n=this.source.charCodeAt(t+1);n>=56320&&n<=57343&&(e=1024*(e-55296)+n-56320+65536)}return e},t.prototype.scanHexEscape=function(t){for(var e="u"===t?4:2,n=0,i=0;i1114111||"}"!==t)&&this.throwUnexpectedToken(),r.Character.fromCodePoint(e)},t.prototype.getIdentifier=function(){for(var t=this.index++;!this.eof();){var e=this.source.charCodeAt(this.index);if(92===e)return this.index=t,this.getComplexIdentifier();if(e>=55296&&e<57343)return this.index=t,this.getComplexIdentifier();if(!r.Character.isIdentifierPart(e))break;++this.index}return this.source.slice(t,this.index)},t.prototype.getComplexIdentifier=function(){var t,e=this.codePointAt(this.index),n=r.Character.fromCodePoint(e);for(this.index+=n.length,92===e&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,t=this.scanUnicodeCodePointEscape()):null!==(t=this.scanHexEscape("u"))&&"\\"!==t&&r.Character.isIdentifierStart(t.charCodeAt(0))||this.throwUnexpectedToken(),n=t);!this.eof()&&(e=this.codePointAt(this.index),r.Character.isIdentifierPart(e));)n+=t=r.Character.fromCodePoint(e),this.index+=t.length,92===e&&(n=n.substr(0,n.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,t=this.scanUnicodeCodePointEscape()):null!==(t=this.scanHexEscape("u"))&&"\\"!==t&&r.Character.isIdentifierPart(t.charCodeAt(0))||this.throwUnexpectedToken(),n+=t);return n},t.prototype.octalToDecimal=function(t){var e="0"!==t,n=a(t);return!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(e=!0,n=8*n+a(this.source[this.index++]),"0123".indexOf(t)>=0&&!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(n=8*n+a(this.source[this.index++]))),{code:n,octal:e}},t.prototype.scanIdentifier=function(){var t,e=this.index,n=92===this.source.charCodeAt(e)?this.getComplexIdentifier():this.getIdentifier();if(3!=(t=1===n.length?3:this.isKeyword(n)?4:"null"===n?5:"true"===n||"false"===n?1:3)&&e+n.length!==this.index){var i=this.index;this.index=e,this.tolerateUnexpectedToken(s.Messages.InvalidEscapedReservedWord),this.index=i}return{type:t,value:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},t.prototype.scanPunctuator=function(){var t=this.index,e=this.source[this.index];switch(e){case"(":case"{":"{"===e&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,e="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:">>>="===(e=this.source.substr(this.index,4))?this.index+=4:"==="===(e=e.substr(0,3))||"!=="===e||">>>"===e||"<<="===e||">>="===e||"**="===e?this.index+=3:"&&"===(e=e.substr(0,2))||"||"===e||"=="===e||"!="===e||"+="===e||"-="===e||"*="===e||"/="===e||"++"===e||"--"===e||"<<"===e||">>"===e||"&="===e||"|="===e||"^="===e||"%="===e||"<="===e||">="===e||"=>"===e||"**"===e?this.index+=2:"<>=!+-*%&|^/".indexOf(e=this.source[this.index])>=0&&++this.index}return this.index===t&&this.throwUnexpectedToken(),{type:7,value:e,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},t.prototype.scanHexLiteral=function(t){for(var e="";!this.eof()&&r.Character.isHexDigit(this.source.charCodeAt(this.index));)e+=this.source[this.index++];return 0===e.length&&this.throwUnexpectedToken(),r.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+e,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},t.prototype.scanBinaryLiteral=function(t){for(var e,n="";!this.eof()&&("0"===(e=this.source[this.index])||"1"===e);)n+=this.source[this.index++];return 0===n.length&&this.throwUnexpectedToken(),this.eof()||(e=this.source.charCodeAt(this.index),(r.Character.isIdentifierStart(e)||r.Character.isDecimalDigit(e))&&this.throwUnexpectedToken()),{type:6,value:parseInt(n,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},t.prototype.scanOctalLiteral=function(t,e){var n="",i=!1;for(r.Character.isOctalDigit(t.charCodeAt(0))?(i=!0,n="0"+this.source[this.index++]):++this.index;!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];return i||0!==n.length||this.throwUnexpectedToken(),(r.Character.isIdentifierStart(this.source.charCodeAt(this.index))||r.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(n,8),octal:i,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},t.prototype.isImplicitOctalLiteral=function(){for(var t=this.index+1;t=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,function(t,e,n){var r=parseInt(e||n,16);return r>1114111&&i.throwUnexpectedToken(s.Messages.InvalidRegExp),r<=65535?String.fromCharCode(r):"\uffff"}).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"\uffff"));try{RegExp(n)}catch(r){this.throwUnexpectedToken(s.Messages.InvalidRegExp)}try{return new RegExp(t,e)}catch(o){return null}},t.prototype.scanRegExpBody=function(){var t=this.source[this.index];i.assert("/"===t,"Regular expression literal must start with a slash");for(var e=this.source[this.index++],n=!1,o=!1;!this.eof();)if(e+=t=this.source[this.index++],"\\"===t)t=this.source[this.index++],r.Character.isLineTerminator(t.charCodeAt(0))&&this.throwUnexpectedToken(s.Messages.UnterminatedRegExp),e+=t;else if(r.Character.isLineTerminator(t.charCodeAt(0)))this.throwUnexpectedToken(s.Messages.UnterminatedRegExp);else if(n)"]"===t&&(n=!1);else{if("/"===t){o=!0;break}"["===t&&(n=!0)}return o||this.throwUnexpectedToken(s.Messages.UnterminatedRegExp),e.substr(1,e.length-2)},t.prototype.scanRegExpFlags=function(){for(var t="";!this.eof();){var e=this.source[this.index];if(!r.Character.isIdentifierPart(e.charCodeAt(0)))break;if(++this.index,"\\"!==e||this.eof())t+=e;else if("u"===(e=this.source[this.index])){++this.index;var n=this.index,i=this.scanHexEscape("u");if(null!==i)for(t+=i;n=55296&&t<57343&&r.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},t}();e.Scanner=l},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TokenName={},e.TokenName[1]="Boolean",e.TokenName[2]="",e.TokenName[3]="Identifier",e.TokenName[4]="Keyword",e.TokenName[5]="Null",e.TokenName[6]="Numeric",e.TokenName[7]="Punctuator",e.TokenName[8]="String",e.TokenName[9]="RegularExpression",e.TokenName[10]="Template"},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:"\xa0",iexcl:"\xa1",cent:"\xa2",pound:"\xa3",curren:"\xa4",yen:"\xa5",brvbar:"\xa6",sect:"\xa7",uml:"\xa8",copy:"\xa9",ordf:"\xaa",laquo:"\xab",not:"\xac",shy:"\xad",reg:"\xae",macr:"\xaf",deg:"\xb0",plusmn:"\xb1",sup2:"\xb2",sup3:"\xb3",acute:"\xb4",micro:"\xb5",para:"\xb6",middot:"\xb7",cedil:"\xb8",sup1:"\xb9",ordm:"\xba",raquo:"\xbb",frac14:"\xbc",frac12:"\xbd",frac34:"\xbe",iquest:"\xbf",Agrave:"\xc0",Aacute:"\xc1",Acirc:"\xc2",Atilde:"\xc3",Auml:"\xc4",Aring:"\xc5",AElig:"\xc6",Ccedil:"\xc7",Egrave:"\xc8",Eacute:"\xc9",Ecirc:"\xca",Euml:"\xcb",Igrave:"\xcc",Iacute:"\xcd",Icirc:"\xce",Iuml:"\xcf",ETH:"\xd0",Ntilde:"\xd1",Ograve:"\xd2",Oacute:"\xd3",Ocirc:"\xd4",Otilde:"\xd5",Ouml:"\xd6",times:"\xd7",Oslash:"\xd8",Ugrave:"\xd9",Uacute:"\xda",Ucirc:"\xdb",Uuml:"\xdc",Yacute:"\xdd",THORN:"\xde",szlig:"\xdf",agrave:"\xe0",aacute:"\xe1",acirc:"\xe2",atilde:"\xe3",auml:"\xe4",aring:"\xe5",aelig:"\xe6",ccedil:"\xe7",egrave:"\xe8",eacute:"\xe9",ecirc:"\xea",euml:"\xeb",igrave:"\xec",iacute:"\xed",icirc:"\xee",iuml:"\xef",eth:"\xf0",ntilde:"\xf1",ograve:"\xf2",oacute:"\xf3",ocirc:"\xf4",otilde:"\xf5",ouml:"\xf6",divide:"\xf7",oslash:"\xf8",ugrave:"\xf9",uacute:"\xfa",ucirc:"\xfb",uuml:"\xfc",yacute:"\xfd",thorn:"\xfe",yuml:"\xff",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02c6",tilde:"\u02dc",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039a",Lambda:"\u039b",Mu:"\u039c",Nu:"\u039d",Xi:"\u039e",Omicron:"\u039f",Pi:"\u03a0",Rho:"\u03a1",Sigma:"\u03a3",Tau:"\u03a4",Upsilon:"\u03a5",Phi:"\u03a6",Chi:"\u03a7",Psi:"\u03a8",Omega:"\u03a9",alpha:"\u03b1",beta:"\u03b2",gamma:"\u03b3",delta:"\u03b4",epsilon:"\u03b5",zeta:"\u03b6",eta:"\u03b7",theta:"\u03b8",iota:"\u03b9",kappa:"\u03ba",lambda:"\u03bb",mu:"\u03bc",nu:"\u03bd",xi:"\u03be",omicron:"\u03bf",pi:"\u03c0",rho:"\u03c1",sigmaf:"\u03c2",sigma:"\u03c3",tau:"\u03c4",upsilon:"\u03c5",phi:"\u03c6",chi:"\u03c7",psi:"\u03c8",omega:"\u03c9",thetasym:"\u03d1",upsih:"\u03d2",piv:"\u03d6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200c",zwj:"\u200d",lrm:"\u200e",rlm:"\u200f",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201a",ldquo:"\u201c",rdquo:"\u201d",bdquo:"\u201e",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203a",oline:"\u203e",frasl:"\u2044",euro:"\u20ac",image:"\u2111",weierp:"\u2118",real:"\u211c",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21b5",lArr:"\u21d0",uArr:"\u21d1",rArr:"\u21d2",dArr:"\u21d3",hArr:"\u21d4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220b",prod:"\u220f",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221a",prop:"\u221d",infin:"\u221e",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222a",int:"\u222b",there4:"\u2234",sim:"\u223c",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22a5",sdot:"\u22c5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230a",rfloor:"\u230b",loz:"\u25ca",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",lang:"\u27e8",rang:"\u27e9"}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(10),r=n(12),s=n(13),o=function(){function t(){this.values=[],this.curly=this.paren=-1}return t.prototype.beforeFunctionExpression=function(t){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(t)>=0},t.prototype.isRegexStart=function(){var t=this.values[this.values.length-1],e=null!==t;switch(t){case"this":case"]":e=!1;break;case")":var n=this.values[this.paren-1];e="if"===n||"while"===n||"for"===n||"with"===n;break;case"}":if(e=!1,"function"===this.values[this.curly-3])e=!!(i=this.values[this.curly-4])&&!this.beforeFunctionExpression(i);else if("function"===this.values[this.curly-4]){var i;e=!(i=this.values[this.curly-5])||!this.beforeFunctionExpression(i)}}return e},t.prototype.push=function(t){7===t.type||4===t.type?("{"===t.value?this.curly=this.values.length:"("===t.value&&(this.paren=this.values.length),this.values.push(t.value)):this.values.push(null)},t}(),a=function(){function t(t,e){this.errorHandler=new i.ErrorHandler,this.errorHandler.tolerant=!!e&&"boolean"==typeof e.tolerant&&e.tolerant,this.scanner=new r.Scanner(t,this.errorHandler),this.scanner.trackComment=!!e&&"boolean"==typeof e.comment&&e.comment,this.trackRange=!!e&&"boolean"==typeof e.range&&e.range,this.trackLoc=!!e&&"boolean"==typeof e.loc&&e.loc,this.buffer=[],this.reader=new o}return t.prototype.errors=function(){return this.errorHandler.errors},t.prototype.getNextToken=function(){if(0===this.buffer.length){var t=this.scanner.scanComments();if(this.scanner.trackComment)for(var e=0;e>10),56320+(t-65536&1023))}for(var _=new Array(256),C=new Array(256),S=0;S<256;S++)_[S]=w(S)?1:0,C[S]=w(S);function k(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||a,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function E(t,e){return new r(e,new s(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function A(t,e){throw E(t,e)}function D(t,e){t.onWarning&&t.onWarning.call(null,E(t,e))}var T={YAML:function(t,e,n){var i,r,s;null!==t.version&&A(t,"duplication of %YAML directive"),1!==n.length&&A(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&A(t,"ill-formed argument of the YAML directive"),r=parseInt(i[1],10),s=parseInt(i[2],10),1!==r&&A(t,"unacceptable YAML version of the document"),t.version=n[0],t.checkLineBreaks=s<2,1!==s&&2!==s&&D(t,"unsupported YAML version of the document")},TAG:function(t,e,n){var i,r;2!==n.length&&A(t,"TAG directive accepts exactly two arguments"),r=n[1],d.test(i=n[0])||A(t,"ill-formed tag handle (first argument) of the TAG directive"),l.call(t.tagMap,i)&&A(t,'there is a previously declared suffix for "'+i+'" tag handle'),f.test(r)||A(t,"ill-formed tag prefix (second argument) of the TAG directive"),t.tagMap[i]=r}};function R(t,e,n,i){var r,s,o,a;if(e1&&(t.result+=i.repeat("\n",e-1))}function N(t,e){var n,i,r=t.tag,s=t.anchor,o=[],a=!1;for(null!==t.anchor&&(t.anchorMap[t.anchor]=o),i=t.input.charCodeAt(t.position);0!==i&&45===i&&v(t.input.charCodeAt(t.position+1));)if(a=!0,t.position++,$(t,!0,-1)&&t.lineIndent<=e)o.push(null),i=t.input.charCodeAt(t.position);else if(n=t.line,U(t,e,3,!1,!0),o.push(t.result),$(t,!0,-1),i=t.input.charCodeAt(t.position),(t.line===n||t.lineIndent>e)&&0!==i)A(t,"bad indentation of a sequence entry");else if(t.lineIndente?w=1:t.lineIndent===e?w=0:t.lineIndente?w=1:t.lineIndent===e?w=0:t.lineIndente)&&(U(t,e,4,!0,r)&&(g?f=t.result:p=t.result),g||(M(t,u,h,d,f,p,s,o),d=f=p=null),$(t,!0,-1),a=t.input.charCodeAt(t.position)),t.lineIndent>e&&0!==a)A(t,"bad indentation of a mapping entry");else if(t.lineIndent=0))break;0===s?A(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?A(t,"repeat of an indentation width identifier"):(h=e+s-1,u=!0)}if(m(o)){do{o=t.input.charCodeAt(++t.position)}while(m(o));if(35===o)do{o=t.input.charCodeAt(++t.position)}while(!g(o)&&0!==o)}for(;0!==o;){for(L(t),t.lineIndent=0,o=t.input.charCodeAt(t.position);(!u||t.lineIndenth&&(h=t.lineIndent),g(o))d++;else{if(t.lineIndent0){for(r=o,s=0;r>0;r--)(o=b(a=t.input.charCodeAt(++t.position)))>=0?s=(s<<4)+o:A(t,"expected hexadecimal character");t.result+=x(s),t.position++}else A(t,"unknown escape sequence");n=i=t.position}else g(a)?(R(t,n,i,!0),I(t,$(t,!1,e)),n=i=t.position):t.position===t.lineStart&&O(t)?A(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}A(t,"unexpected end of the stream within a double quoted scalar")}(t,f)?k=!0:function(t){var e,n,i;if(42!==(i=t.input.charCodeAt(t.position)))return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;0!==i&&!v(i)&&!y(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&A(t,"name of an alias node must contain at least one character"),n=t.input.slice(e,t.position),t.anchorMap.hasOwnProperty(n)||A(t,'unidentified alias "'+n+'"'),t.result=t.anchorMap[n],$(t,!0,-1),!0}(t)?(k=!0,null===t.tag&&null===t.anchor||A(t,"alias node should not have any properties")):function(t,e,n){var i,r,s,o,a,l,c,u,h=t.kind,d=t.result;if(v(u=t.input.charCodeAt(t.position))||y(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if((63===u||45===u)&&(v(i=t.input.charCodeAt(t.position+1))||n&&y(i)))return!1;for(t.kind="scalar",t.result="",r=s=t.position,o=!1;0!==u;){if(58===u){if(v(i=t.input.charCodeAt(t.position+1))||n&&y(i))break}else if(35===u){if(v(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&O(t)||n&&y(u))break;if(g(u)){if(a=t.line,l=t.lineStart,c=t.lineIndent,$(t,!1,-1),t.lineIndent>=e){o=!0,u=t.input.charCodeAt(t.position);continue}t.position=s,t.line=a,t.lineStart=l,t.lineIndent=c;break}}o&&(R(t,r,s,!1),I(t,t.line-a),r=s=t.position,o=!1),m(u)||(s=t.position+1),u=t.input.charCodeAt(++t.position)}return R(t,r,s,!1),!!t.result||(t.kind=h,t.result=d,!1)}(t,f,1===n)&&(k=!0,null===t.tag&&(t.tag="?")),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):0===w&&(k=c&&N(t,p))),null!==t.tag&&"!"!==t.tag)if("?"===t.tag){for(null!==t.result&&"scalar"!==t.kind&&A(t,'unacceptable node kind for ! tag; it should be "scalar", not "'+t.kind+'"'),u=0,h=t.implicitTypes.length;u tag; it should be "'+d.kind+'", not "'+t.kind+'"'),d.resolve(t.result)?(t.result=d.construct(t.result),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):A(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")):A(t,"unknown tag !<"+t.tag+">");return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||k}function V(t){var e,n,i,r,s=t.position,o=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap={},t.anchorMap={};0!==(r=t.input.charCodeAt(t.position))&&($(t,!0,-1),r=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==r));){for(o=!0,r=t.input.charCodeAt(++t.position),e=t.position;0!==r&&!v(r);)r=t.input.charCodeAt(++t.position);for(i=[],(n=t.input.slice(e,t.position)).length<1&&A(t,"directive name must not be less than one character in length");0!==r;){for(;m(r);)r=t.input.charCodeAt(++t.position);if(35===r){do{r=t.input.charCodeAt(++t.position)}while(0!==r&&!g(r));break}if(g(r))break;for(e=t.position;0!==r&&!v(r);)r=t.input.charCodeAt(++t.position);i.push(t.input.slice(e,t.position))}0!==r&&L(t),l.call(T,n)?T[n](t,n,i):D(t,'unknown document directive "'+n+'"')}$(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,$(t,!0,-1)):o&&A(t,"directives end mark is expected"),U(t,t.lineIndent-1,4,!1,!0),$(t,!0,-1),t.checkLineBreaks&&u.test(t.input.slice(s,t.position))&&D(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&O(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,$(t,!0,-1)):t.position0?o-4:o;for(n=0;n>16&255,l[u++]=e>>8&255,l[u++]=255&e;return 2===a&&(e=r[t.charCodeAt(n)]<<2|r[t.charCodeAt(n+1)]>>4,l[u++]=255&e),1===a&&(e=r[t.charCodeAt(n)]<<10|r[t.charCodeAt(n+1)]<<4|r[t.charCodeAt(n+2)]>>2,l[u++]=e>>8&255,l[u++]=255&e),l},e.fromByteArray=function(t){for(var e,n=t.length,r=n%3,s=[],o=16383,a=0,l=n-r;al?l:a+o));return 1===r?s.push(i[(e=t[n-1])>>2]+i[e<<4&63]+"=="):2===r&&s.push(i[(e=(t[n-2]<<8)+t[n-1])>>10]+i[e>>4&63]+i[e<<2&63]+"="),s.join("")};for(var i=[],r=[],s="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,l=o.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=e),[n,n===e?0:4-n%4]}function u(t,e,n){for(var r,s=[],o=e;o>18&63]+i[r>>12&63]+i[r>>6&63]+i[63&r]);return s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},HUeH:function(t,e,n){"use strict";var i=n("ClZL"),r=n("XP29");function s(t){return function(){throw new Error("Function "+t+" is deprecated and cannot be used.")}}t.exports.Type=n("hyoZ"),t.exports.Schema=n("3lC6"),t.exports.FAILSAFE_SCHEMA=n("2YgE"),t.exports.JSON_SCHEMA=n("+VNs"),t.exports.CORE_SCHEMA=n("RSjF"),t.exports.DEFAULT_SAFE_SCHEMA=n("Z3Ei"),t.exports.DEFAULT_FULL_SCHEMA=n("VtPO"),t.exports.load=i.load,t.exports.loadAll=i.loadAll,t.exports.safeLoad=i.safeLoad,t.exports.safeLoadAll=i.safeLoadAll,t.exports.dump=r.dump,t.exports.safeDump=r.safeDump,t.exports.YAMLException=n("w+qe"),t.exports.MINIMAL_SCHEMA=n("2YgE"),t.exports.SAFE_SCHEMA=n("Z3Ei"),t.exports.DEFAULT_SCHEMA=n("VtPO"),t.exports.scan=s("scan"),t.exports.parse=s("parse"),t.exports.compose=s("compose"),t.exports.addConstructor=s("addConstructor")},Iab2:function(t,e,n){var i,r;void 0===(r="function"==typeof(i=function(){"use strict";function e(t,e,n){var i=new XMLHttpRequest;i.open("GET",t),i.responseType="blob",i.onload=function(){o(i.response,e,n)},i.onerror=function(){console.error("could not download file")},i.send()}function n(t){var e=new XMLHttpRequest;e.open("HEAD",t,!1);try{e.send()}catch(t){}return 200<=e.status&&299>=e.status}function i(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(e){var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(n)}}var r="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof global&&global.global===global?global:void 0,s=r.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),o=r.saveAs||("object"!=typeof window||window!==r?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(t,s,o){var a=r.URL||r.webkitURL,l=document.createElement("a");l.download=s=s||t.name||"download",l.rel="noopener","string"==typeof t?(l.href=t,l.origin===location.origin?i(l):n(l.href)?e(t,s,o):i(l,l.target="_blank")):(l.href=a.createObjectURL(t),setTimeout(function(){a.revokeObjectURL(l.href)},4e4),setTimeout(function(){i(l)},0))}:"msSaveOrOpenBlob"in navigator?function(t,r,s){if(r=r||t.name||"download","string"!=typeof t)navigator.msSaveOrOpenBlob(function(t,e){return void 0===e?e={autoBom:!1}:"object"!=typeof e&&(console.warn("Deprecated: Expected third argument to be a object"),e={autoBom:!e}),e.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(t.type)?new Blob(["\ufeff",t],{type:t.type}):t}(t,s),r);else if(n(t))e(t,r,s);else{var o=document.createElement("a");o.href=t,o.target="_blank",setTimeout(function(){i(o)})}}:function(t,n,i,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),"string"==typeof t)return e(t,n,i);var a="application/octet-stream"===t.type,l=/constructor/i.test(r.HTMLElement)||r.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||a&&l||s)&&"undefined"!=typeof FileReader){var u=new FileReader;u.onloadend=function(){var t=u.result;t=c?t:t.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=t:location=t,o=null},u.readAsDataURL(t)}else{var h=r.URL||r.webkitURL,d=h.createObjectURL(t);o?o.location=d:location.href=d,o=null,setTimeout(function(){h.revokeObjectURL(d)},4e4)}});r.saveAs=o.saveAs=o,t.exports=o})?i.apply(e,[]):i)||(t.exports=r)},LFvy:function(t,e,n){"use strict";var i=n("hyoZ");t.exports=new i("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return null!==t?t:""}})},Ljib:function(t,e,n){"use strict";var i=n("hyoZ");t.exports=new i("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return null!==t?t:{}}})},MERt:function(t,e,n){"use strict";var i=n("hyoZ");t.exports=new i("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:function(){return!0},construct:function(){},predicate:function(t){return void 0===t},represent:function(){return""}})},Njqi:function(t,e,n){"use strict";var i;try{i=n("+U4B")}catch(s){"undefined"!=typeof window&&(i=window.esprima)}var r=n("hyoZ");t.exports=new r("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function(t){if(null===t)return!1;try{var e=i.parse("("+t+")",{range:!0});return"Program"===e.type&&1===e.body.length&&"ExpressionStatement"===e.body[0].type&&("ArrowFunctionExpression"===e.body[0].expression.type||"FunctionExpression"===e.body[0].expression.type)}catch(n){return!1}},construct:function(t){var e,n="("+t+")",r=i.parse(n,{range:!0}),s=[];if("Program"!==r.type||1!==r.body.length||"ExpressionStatement"!==r.body[0].type||"ArrowFunctionExpression"!==r.body[0].expression.type&&"FunctionExpression"!==r.body[0].expression.type)throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach(function(t){s.push(t.name)}),e=r.body[0].expression.body.range,new Function(s,"BlockStatement"===r.body[0].expression.body.type?n.slice(e[0]+1,e[1]-1):"return "+n.slice(e[0],e[1]))},predicate:function(t){return"[object Function]"===Object.prototype.toString.call(t)},represent:function(t){return t.toString()}})},Pe6h:function(t,e,n){"use strict";var i=n("Y2Yi"),r=n("hyoZ"),s=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),o=/^[-+]?[0-9]+e/;t.exports=new r("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(t){return null!==t&&!(!s.test(t)||"_"===t[t.length-1])},construct:function(t){var e,n,i,r;return n="-"===(e=t.replace(/_/g,"").toLowerCase())[0]?-1:1,r=[],"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:e.indexOf(":")>=0?(e.split(":").forEach(function(t){r.unshift(parseFloat(t,10))}),e=0,i=1,r.forEach(function(t){e+=t*i,i*=60}),n*e):n*parseFloat(e,10)},predicate:function(t){return"[object Number]"===Object.prototype.toString.call(t)&&(t%1!=0||i.isNegativeZero(t))},represent:function(t,e){var n;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(i.isNegativeZero(t))return"-0.0";return n=t.toString(10),o.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"})},RSjF:function(t,e,n){"use strict";var i=n("3lC6");t.exports=new i({include:[n("+VNs")]})},UQ3f:function(t,e,n){"use strict";var i=n("hyoZ");t.exports=new i("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:function(t){if(null===t)return!1;if(0===t.length)return!1;var e=t,n=/\/([gim]*)$/.exec(t),i="";if("/"===e[0]){if(n&&(i=n[1]),i.length>3)return!1;if("/"!==e[e.length-i.length-1])return!1}return!0},construct:function(t){var e=t,n=/\/([gim]*)$/.exec(t),i="";return"/"===e[0]&&(n&&(i=n[1]),e=e.slice(1,e.length-i.length-1)),new RegExp(e,i)},predicate:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},represent:function(t){var e="/"+t.source+"/";return t.global&&(e+="g"),t.multiline&&(e+="m"),t.ignoreCase&&(e+="i"),e}})},VtPO:function(t,e,n){"use strict";var i=n("3lC6");t.exports=i.DEFAULT=new i({include:[n("Z3Ei")],explicit:[n("MERt"),n("UQ3f"),n("Njqi")]})},XP29:function(t,e,n){"use strict";var i=n("Y2Yi"),r=n("w+qe"),s=n("VtPO"),o=n("Z3Ei"),a=Object.prototype.toString,l=Object.prototype.hasOwnProperty,c={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},u=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function h(t){var e,n,s;if(e=t.toString(16).toUpperCase(),t<=255)n="x",s=2;else if(t<=65535)n="u",s=4;else{if(!(t<=4294967295))throw new r("code point within a string may not be greater than 0xFFFFFFFF");n="U",s=8}return"\\"+n+i.repeat("0",s-e.length)+e}function d(t){this.schema=t.schema||s,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=i.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=function(t,e){var n,i,r,s,o,a,c;if(null===e)return{};for(n={},r=0,s=(i=Object.keys(e)).length;r0?e.charCodeAt(o-1):null,p=p&&v(a,l)}else{for(o=0;or&&" "!==e[f+1],f=o);else if(!m(a))return 5;l=o>0?e.charCodeAt(o-1):null,p=p&&v(a,l)}h=h||d&&o-f-1>r&&" "!==e[f+1]}return u||h?i>9&&y(e)?5:h?4:3:p&&!function(e){return function(t,e){var n,i;for(n=0,i=t.implicitTypes.length;n-1&&n>=t.flowLevel,t.indent,o)){case 1:return e;case 2:return"'"+e.replace(/'/g,"''")+"'";case 3:return"|"+w(e,t.indent)+x(f(e,s));case 4:return">"+w(e,t.indent)+x(f(function(t,e){for(var n,i,r,s=/(\n+)([^\n]*)/g,o=(r=t.indexOf("\n"),s.lastIndex=r=-1!==r?r:t.length,_(t.slice(0,r),e)),a="\n"===t[0]||" "===t[0];i=s.exec(t);){var l=i[2];n=" "===l[0],o+=i[1]+(a||n||""===l?"":"\n")+_(l,e),a=n}return o}(e,o),s));case 5:return'"'+function(t){for(var e,n,i,r="",s=0;s=55296&&e<=56319&&(n=t.charCodeAt(s+1))>=56320&&n<=57343?(r+=h(1024*(e-55296)+n-56320+65536),s++):r+=!(i=c[e])&&m(e)?t[s]:i||h(e);return r}(e)+'"';default:throw new r("impossible error: invalid scalar style")}}()}function w(t,e){var n=y(t)?String(e):"",i="\n"===t[t.length-1];return n+(!i||"\n"!==t[t.length-2]&&"\n"!==t?i?"":"-":"+")+"\n"}function x(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function _(t,e){if(""===t||" "===t[0])return t;for(var n,i,r=/ [^ ]/g,s=0,o=0,a=0,l="";n=r.exec(t);)(a=n.index)-s>e&&(l+="\n"+t.slice(s,i=o>s?o:a),s=i+1),o=a;return l+="\n",(l+=t.length-s>e&&o>s?t.slice(s,o)+"\n"+t.slice(o+1):t.slice(s)).slice(1)}function C(t,e,n){var i,s,o,c,u,h;for(o=0,c=(s=n?t.explicitTypes:t.implicitTypes).length;o tag resolver accepts not "'+h+'" style');i=u.represent[h](e,h)}t.dump=i}return!0}return!1}function S(t,e,n,i,s,o){t.tag=null,t.dump=n,C(t,n,!1)||C(t,n,!0);var l=a.call(t.dump);i&&(i=t.flowLevel<0||t.flowLevel>e);var c,u,h="[object Object]"===l||"[object Array]"===l;if(h&&(u=-1!==(c=t.duplicates.indexOf(n))),(null!==t.tag&&"?"!==t.tag||u||2!==t.indent&&e>0)&&(s=!1),u&&t.usedDuplicates[c])t.dump="*ref_"+c;else{if(h&&u&&!t.usedDuplicates[c]&&(t.usedDuplicates[c]=!0),"[object Object]"===l)i&&0!==Object.keys(t.dump).length?(function(t,e,n,i){var s,o,a,l,c,u,h="",d=t.tag,f=Object.keys(n);if(!0===t.sortKeys)f.sort();else if("function"==typeof t.sortKeys)f.sort(t.sortKeys);else if(t.sortKeys)throw new r("sortKeys must be a boolean or a function");for(s=0,o=f.length;s1024)&&(t.dump&&10===t.dump.charCodeAt(0)?u+="?":u+="? "),u+=t.dump,c&&(u+=p(t,e)),S(t,e+1,l,!0,c)&&(t.dump&&10===t.dump.charCodeAt(0)?u+=":":u+=": ",h+=u+=t.dump));t.tag=d,t.dump=h||"{}"}(t,e,t.dump,s),u&&(t.dump="&ref_"+c+t.dump)):(function(t,e,n){var i,r,s,o,a,l="",c=t.tag,u=Object.keys(n);for(i=0,r=u.length;i1024&&(a+="? "),a+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),S(t,e,o,!1,!1)&&(l+=a+=t.dump));t.tag=c,t.dump="{"+l+"}"}(t,e,t.dump),u&&(t.dump="&ref_"+c+" "+t.dump));else if("[object Array]"===l){var d=t.noArrayIndent&&e>0?e-1:e;i&&0!==t.dump.length?(function(t,e,n,i){var r,s,o="",a=t.tag;for(r=0,s=n.length;r "+t.dump)}return!0}function k(t,e){var n,i,r=[],s=[];for(E(t,r,s),n=0,i=s.length;n=0?parseFloat((s.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]):parseFloat((s.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),e.isOldIE=e.isIE&&e.isIE<9,e.isGecko=e.isMozilla=s.match(/ Gecko\/\d+/),e.isOpera="object"==typeof opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),e.isWebKit=parseFloat(s.split("WebKit/")[1])||void 0,e.isChrome=parseFloat(s.split(" Chrome/")[1])||void 0,e.isEdge=parseFloat(s.split(" Edge/")[1])||void 0,e.isAIR=s.indexOf("AdobeAIR")>=0,e.isAndroid=s.indexOf("Android")>=0,e.isChromeOS=s.indexOf(" CrOS ")>=0,e.isIOS=/iPad|iPhone|iPod/.test(s)&&!window.MSStream,e.isIOS&&(e.isMac=!0),e.isMobile=e.isIOS||e.isAndroid}),ace.define("ace/lib/dom",["require","exports","module","ace/lib/useragent"],function(t,e,n){"use strict";var i=t("./useragent");if(e.buildDom=function t(e,n,i){if("string"==typeof e&&e){var r=document.createTextNode(e);return n&&n.appendChild(r),r}if(!Array.isArray(e))return e&&e.appendChild&&n&&n.appendChild(e),e;if("string"!=typeof e[0]||!e[0]){for(var s=[],o=0;o=1.5,"undefined"!=typeof document){var r=document.createElement("div");e.HI_DPI&&void 0!==r.style.transform&&(e.HAS_CSS_TRANSFORMS=!0),i.isEdge||void 0===r.style.animationName||(e.HAS_CSS_ANIMATION=!0),r=null}e.translate=e.HAS_CSS_TRANSFORMS?function(t,e,n){t.style.transform="translate("+Math.round(e)+"px, "+Math.round(n)+"px)"}:function(t,e,n){t.style.top=Math.round(n)+"px",t.style.left=Math.round(e)+"px"}}),ace.define("ace/lib/oop",["require","exports","module"],function(t,e,n){"use strict";e.inherits=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})},e.mixin=function(t,e){for(var n in e)t[n]=e[n];return t},e.implement=function(t,n){e.mixin(t,n)}}),ace.define("ace/lib/keys",["require","exports","module","ace/lib/oop"],function(t,e,n){"use strict";var i=t("./oop"),r=function(){var t,e,n={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta",91:"MetaLeft",92:"MetaRight",93:"ContextMenu"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,super:8,meta:8,command:8,cmd:8,control:1},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*"}};for(e in n.FUNCTION_KEYS)t=n.FUNCTION_KEYS[e].toLowerCase(),n[t]=parseInt(e,10);for(e in n.PRINTABLE_KEYS)t=n.PRINTABLE_KEYS[e].toLowerCase(),n[t]=parseInt(e,10);return i.mixin(n,n.MODIFIER_KEYS),i.mixin(n,n.PRINTABLE_KEYS),i.mixin(n,n.FUNCTION_KEYS),n.enter=n.return,n.escape=n.esc,n.del=n.delete,n[173]="-",function(){for(var t=["cmd","ctrl","alt","shift"],e=Math.pow(2,t.length);e--;)n.KEY_MODS[e]=t.filter(function(t){return e&n.KEY_MODS[t]}).join("-")+"-"}(),n.KEY_MODS[0]="",n.KEY_MODS[-1]="input-",n}();i.mixin(e,r),e.keyCodeToString=function(t){var e=r[t];return"string"!=typeof e&&(e=String.fromCharCode(t)),e.toLowerCase()}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(t,e,n){"use strict";var i,r=t("./keys"),s=t("./useragent"),o=null,a=0;function l(){return null==i&&function(){i=!1;try{document.createComment("").addEventListener("test",function(){},{get passive(){i={passive:!1}}})}catch(t){}}(),i}function c(t,e,n){this.elem=t,this.type=e,this.callback=n}c.prototype.destroy=function(){h(this.elem,this.type,this.callback),this.elem=this.type=this.callback=void 0};var u=e.addListener=function(t,e,n,i){t.addEventListener(e,n,l()),i&&i.$toDestroy.push(new c(t,e,n))},h=e.removeListener=function(t,e,n){t.removeEventListener(e,n,l())};e.stopEvent=function(t){return e.stopPropagation(t),e.preventDefault(t),!1},e.stopPropagation=function(t){t.stopPropagation&&t.stopPropagation()},e.preventDefault=function(t){t.preventDefault&&t.preventDefault()},e.getButton=function(t){return"dblclick"==t.type?0:"contextmenu"==t.type||s.isMac&&t.ctrlKey&&!t.altKey&&!t.shiftKey?2:t.button},e.capture=function(t,e,n){var i=t&&t.ownerDocument||document;function r(t){e&&e(t),n&&n(t),h(i,"mousemove",e),h(i,"mouseup",r),h(i,"dragstart",r)}return u(i,"mousemove",e),u(i,"mouseup",r),u(i,"dragstart",r),r},e.addMouseWheelListener=function(t,e,n){"onmousewheel"in t?u(t,"mousewheel",function(t){void 0!==t.wheelDeltaX?(t.wheelX=-t.wheelDeltaX/8,t.wheelY=-t.wheelDeltaY/8):(t.wheelX=0,t.wheelY=-t.wheelDelta/8),e(t)},n):"onwheel"in t?u(t,"wheel",function(t){switch(t.deltaMode){case t.DOM_DELTA_PIXEL:t.wheelX=.35*t.deltaX||0,t.wheelY=.35*t.deltaY||0;break;case t.DOM_DELTA_LINE:case t.DOM_DELTA_PAGE:t.wheelX=5*(t.deltaX||0),t.wheelY=5*(t.deltaY||0)}e(t)},n):u(t,"DOMMouseScroll",function(t){t.axis&&t.axis==t.HORIZONTAL_AXIS?(t.wheelX=5*(t.detail||0),t.wheelY=0):(t.wheelX=0,t.wheelY=5*(t.detail||0)),e(t)},n)},e.addMultiMouseDownListener=function(t,n,i,r,o){var a,l,c,h=0,d={2:"dblclick",3:"tripleclick",4:"quadclick"};function f(t){if(0!==e.getButton(t)?h=0:t.detail>1?++h>4&&(h=1):h=1,s.isIE){var o=Math.abs(t.clientX-a)>5||Math.abs(t.clientY-l)>5;c&&!o||(h=1),c&&clearTimeout(c),c=setTimeout(function(){c=null},n[h-1]||600),1==h&&(a=t.clientX,l=t.clientY)}if(t._clicks=h,i[r]("mousedown",t),h>4)h=0;else if(h>1)return i[r](d[h],t)}Array.isArray(t)||(t=[t]),t.forEach(function(t){u(t,"mousedown",f,o)})};var d=function(t){return 0|(t.ctrlKey?1:0)|(t.altKey?2:0)|(t.shiftKey?4:0)|(t.metaKey?8:0)};function f(t,e,n){var i=d(e);if(!s.isMac&&o){if(e.getModifierState&&(e.getModifierState("OS")||e.getModifierState("Win"))&&(i|=8),o.altGr){if(3==(3&i))return;o.altGr=0}if(18===n||17===n){var l="location"in e?e.location:e.keyLocation;17===n&&1===l?1==o[n]&&(a=e.timeStamp):18===n&&3===i&&2===l&&e.timeStamp-a<50&&(o.altGr=!0)}}if(n in r.MODIFIER_KEYS&&(n=-1),i||13!==n||3!==(l="location"in e?e.location:e.keyLocation)||(t(e,i,-n),!e.defaultPrevented)){if(s.isChromeOS&&8&i){if(t(e,i,n),e.defaultPrevented)return;i&=-9}return!!(i||n in r.FUNCTION_KEYS||n in r.PRINTABLE_KEYS)&&t(e,i,n)}}function p(){o=Object.create(null)}if(e.getModifierString=function(t){return r.KEY_MODS[d(t)]},e.addCommandKeyListener=function(t,n,i){if(s.isOldGecko||s.isOpera&&!("KeyboardEvent"in window)){var r=null;u(t,"keydown",function(t){r=t.keyCode},i),u(t,"keypress",function(t){return f(n,t,r)},i)}else{var a=null;u(t,"keydown",function(t){o[t.keyCode]=(o[t.keyCode]||0)+1;var e=f(n,t,t.keyCode);return a=t.defaultPrevented,e},i),u(t,"keypress",function(t){a&&(t.ctrlKey||t.altKey||t.shiftKey||t.metaKey)&&(e.stopEvent(t),a=null)},i),u(t,"keyup",function(t){o[t.keyCode]=null},i),o||(p(),u(window,"focus",p))}},"object"==typeof window&&window.postMessage&&!s.isOldIE){var g=1;e.nextTick=function(t,n){n=n||window;var i="zero-timeout-message-"+g++,r=function(s){s.data==i&&(e.stopPropagation(s),h(n,"message",r),t())};u(n,"message",r),n.postMessage(i,"*")}}e.$idleBlocked=!1,e.onIdle=function(t,n){return setTimeout(function n(){e.$idleBlocked?setTimeout(n,100):t()},n)},e.$idleBlockId=null,e.blockIdle=function(t){e.$idleBlockId&&clearTimeout(e.$idleBlockId),e.$idleBlocked=!0,e.$idleBlockId=setTimeout(function(){e.$idleBlocked=!1},t||100)},e.nextFrame="object"==typeof window&&(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame),e.nextFrame=e.nextFrame?e.nextFrame.bind(window):function(t){setTimeout(t,17)}}),ace.define("ace/range",["require","exports","module"],function(t,e,n){"use strict";var i=function(t,e,n,i){this.start={row:t,column:e},this.end={row:n,column:i}};(function(){this.isEqual=function(t){return this.start.row===t.start.row&&this.end.row===t.end.row&&this.start.column===t.start.column&&this.end.column===t.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(t,e){return 0==this.compare(t,e)},this.compareRange=function(t){var e,n=t.end,i=t.start;return 1==(e=this.compare(n.row,n.column))?1==(e=this.compare(i.row,i.column))?2:0==e?1:0:-1==e?-2:-1==(e=this.compare(i.row,i.column))?-1:1==e?42:0},this.comparePoint=function(t){return this.compare(t.row,t.column)},this.containsRange=function(t){return 0==this.comparePoint(t.start)&&0==this.comparePoint(t.end)},this.intersects=function(t){var e=this.compareRange(t);return-1==e||0==e||1==e},this.isEnd=function(t,e){return this.end.row==t&&this.end.column==e},this.isStart=function(t,e){return this.start.row==t&&this.start.column==e},this.setStart=function(t,e){"object"==typeof t?(this.start.column=t.column,this.start.row=t.row):(this.start.row=t,this.start.column=e)},this.setEnd=function(t,e){"object"==typeof t?(this.end.column=t.column,this.end.row=t.row):(this.end.row=t,this.end.column=e)},this.inside=function(t,e){return 0==this.compare(t,e)&&!this.isEnd(t,e)&&!this.isStart(t,e)},this.insideStart=function(t,e){return 0==this.compare(t,e)&&!this.isEnd(t,e)},this.insideEnd=function(t,e){return 0==this.compare(t,e)&&!this.isStart(t,e)},this.compare=function(t,e){return this.isMultiLine()||t!==this.start.row?tthis.end.row?1:this.start.row===t?e>=this.start.column?0:-1:this.end.row===t?e<=this.end.column?0:1:0:ethis.end.column?1:0},this.compareStart=function(t,e){return this.start.row==t&&this.start.column==e?-1:this.compare(t,e)},this.compareEnd=function(t,e){return this.end.row==t&&this.end.column==e?1:this.compare(t,e)},this.compareInside=function(t,e){return this.end.row==t&&this.end.column==e?1:this.start.row==t&&this.start.column==e?-1:this.compare(t,e)},this.clipRows=function(t,e){if(this.end.row>e)var n={row:e+1,column:0};else this.end.rowe)var r={row:e+1,column:0};else this.start.row0;)1&e&&(n+=t),(e>>=1)&&(t+=t);return n};var i=/^\s\s*/,r=/\s\s*$/;e.stringTrimLeft=function(t){return t.replace(i,"")},e.stringTrimRight=function(t){return t.replace(r,"")},e.copyObject=function(t){var e={};for(var n in t)e[n]=t[n];return e},e.copyArray=function(t){for(var e=[],n=0,i=t.length;nDate.now()-50)||(i=!1)},cancel:function(){i=Date.now()}}}),ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"],function(t,e,n){"use strict";var i=t("../lib/event"),r=t("../lib/useragent"),s=t("../lib/dom"),o=t("../lib/lang"),a=t("../clipboard"),l=r.isChrome<18,c=r.isIE,u=r.isChrome>63,h=400,d=t("../lib/keys"),f=d.KEY_MODS,p=r.isIOS,g=p?/\s/:/\n/,m=r.isMobile;e.TextInput=function(t,e){var n=s.createElement("textarea");n.className="ace_text-input",n.setAttribute("wrap","off"),n.setAttribute("autocorrect","off"),n.setAttribute("autocapitalize","off"),n.setAttribute("spellcheck",!1),n.style.opacity="0",t.insertBefore(n,t.firstChild);var v=!1,y=!1,b=!1,w=!1,x="";m||(n.style.fontSize="1px");var _=!1,C=!1,S="",k=0,E=0,A=0;try{var D=document.activeElement===n}catch(G){}i.addListener(n,"blur",function(t){C||(e.onBlur(t),D=!1)},e),i.addListener(n,"focus",function(t){if(!C){if(D=!0,r.isEdge)try{if(!document.hasFocus())return}catch(t){}e.onFocus(t),r.isEdge?setTimeout(T):T()}},e),this.$focusScroll=!1,this.focus=function(){if(x||u||"browser"==this.$focusScroll)return n.focus({preventScroll:!0});var t=n.style.top;n.style.position="fixed",n.style.top="0px";try{var e=0!=n.getBoundingClientRect().top}catch(G){return}var i=[];if(e)for(var r=n.parentElement;r&&1==r.nodeType;)i.push(r),r.setAttribute("ace_nocontext",!0),r=!r.parentElement&&r.getRootNode?r.getRootNode().host:r.parentElement;n.focus({preventScroll:!0}),e&&i.forEach(function(t){t.removeAttribute("ace_nocontext")}),setTimeout(function(){n.style.position="","0px"==n.style.top&&(n.style.top=t)},0)},this.blur=function(){n.blur()},this.isFocused=function(){return D},e.on("beforeEndOperation",function(){var t=e.curOp,i=t&&t.command&&t.command.name;"insertstring"!=i&&(b&&i&&(t.docChanged||t.selectionChanged)&&(S=n.value="",U()),T())});var T=p?function(t){if(D&&(!v||t)&&!w){t||(t="");var i="\n ab"+t+"cde fg\n";i!=n.value&&(n.value=S=i);var r=4+(t.length||(e.selection.isEmpty()?0:1));4==k&&E==r||n.setSelectionRange(4,r),k=4,E=r}}:function(){if(!b&&!w&&(D||F)){b=!0;var t=0,i=0,r="";if(e.session){var s=e.selection,o=s.getRange(),a=s.cursor.row;if(t=o.start.column,i=o.end.column,r=e.session.getLine(a),o.start.row!=a){var l=e.session.getLine(a-1);t=o.start.rowa+1?c.length:i,i+=r.length+1,r=r+"\n"+c}else m&&a>0&&(r="\n"+r,i+=1,t+=1);r.length>h&&(t0&&S[d]==t[d];)d++,a--;for(c=c.slice(d),d=1;l>0&&S.length-d>k-1&&S[S.length-d]==t[t.length-d];)d++,l--;u-=d-1,h-=d-1;var f=c.length-d+1;if(f<0&&(a=-f,f=0),c=c.slice(0,f),!(i||c||u||a||l||h))return"";w=!0;var p=!1;return r.isAndroid&&". "==c&&(c=" ",p=!0),c&&!a&&!l&&!u&&!h||_?e.onTextInput(c):e.onTextInput(c,{extendLeft:a,extendRight:l,restoreStart:u,restoreEnd:h}),w=!1,S=t,k=s,E=o,A=h,p?"\n":c},L=function(t){if(b)return B();if(t&&t.inputType){if("historyUndo"==t.inputType)return e.execCommand("undo");if("historyRedo"==t.inputType)return e.execCommand("redo")}var i=n.value,r=M(i,!0);(i.length>500||g.test(r)||m&&k<1&&k==E)&&T()},$=function(t,e,n){var i=t.clipboardData||window.clipboardData;if(i&&!l){var r=c||n?"Text":"text/plain";try{return e?!1!==i.setData(r,e):i.getData(r)}catch(t){if(!n)return $(t,e,!0)}}},O=function(t,r){var s=e.getCopyText();if(!s)return i.preventDefault(t);$(t,s)?(p&&(T(s),v=s,setTimeout(function(){v=!1},10)),r?e.onCut():e.onCopy(),i.preventDefault(t)):(v=!0,n.value=s,n.select(),setTimeout(function(){v=!1,T(),r?e.onCut():e.onCopy()}))},I=function(t){O(t,!0)},N=function(t){O(t,!1)},P=function(t){var s=$(t);a.pasteCancelled()||("string"==typeof s?(s&&e.onPaste(s,t),r.isIE&&setTimeout(T),i.preventDefault(t)):(n.value="",y=!0))};i.addCommandKeyListener(n,e.onCommandKey.bind(e),e),i.addListener(n,"select",function(t){b||(v?v=!1:function(t){return 0===t.selectionStart&&t.selectionEnd>=S.length&&t.value===S&&S&&t.selectionEnd!==E}(n)?(e.selectAll(),T()):m&&n.selectionStart!=k&&T())},e),i.addListener(n,"input",L,e),i.addListener(n,"cut",I,e),i.addListener(n,"copy",N,e),i.addListener(n,"paste",P,e),"oncut"in n&&"oncopy"in n&&"onpaste"in n||i.addListener(t,"keydown",function(t){if((!r.isMac||t.metaKey)&&t.ctrlKey)switch(t.keyCode){case 67:N(t);break;case 86:P(t);break;case 88:I(t)}},e);var B=function(){if(b&&e.onCompositionUpdate&&!e.$readOnly){if(_)return V();b.useTextareaForIME?e.onCompositionUpdate(n.value):(M(n.value),b.markerRange&&(b.context&&(b.markerRange.start.column=b.selectionStart=b.context.compositionStartOffset),b.markerRange.end.column=b.markerRange.start.column+E-b.selectionStart+A))}},U=function(t){e.onCompositionEnd&&!e.$readOnly&&(b=!1,e.onCompositionEnd(),e.off("mousedown",V),t&&L())};function V(){C=!0,n.blur(),n.focus(),C=!1}var H,j=o.delayedCall(B,50).schedule.bind(null,null);function z(){clearTimeout(H),H=setTimeout(function(){x&&(n.style.cssText=x,x=""),e.renderer.$isMousePressed=!1,e.renderer.$keepTextAreaAtCursor&&e.renderer.$moveTextAreaToCursor()},0)}i.addListener(n,"compositionstart",function(t){if(!b&&e.onCompositionStart&&!e.$readOnly&&(b={},!_)){t.data&&(b.useTextareaForIME=!1),setTimeout(B,0),e._signal("compositionStart"),e.on("mousedown",V);var i=e.getSelectionRange();i.end.row=i.start.row,i.end.column=i.start.column,b.markerRange=i,b.selectionStart=k,e.onCompositionStart(b),b.useTextareaForIME?(S=n.value="",k=0,E=0):(n.msGetInputContext&&(b.context=n.msGetInputContext()),n.getInputContext&&(b.context=n.getInputContext()))}},e),i.addListener(n,"compositionupdate",B,e),i.addListener(n,"keyup",function(t){27==t.keyCode&&n.value.lengthE&&"\n"==S[s]?o=d.end:iE&&S.slice(0,s).split("\n").length>2?o=d.down:s>E&&" "==S[s-1]?(o=d.right,a=f.option):(s>E||s==E&&E!=k&&i==s)&&(o=d.right),i!==s&&(a|=f.shift),o){if(!e.onCommandKey({},a,o)&&e.commands){o=d.keyCodeToString(o);var l=e.commands.findKeyCommand(a,o);l&&e.execCommand(l)}k=i,E=s,T("")}}};document.addEventListener("selectionchange",s),e.on("destroy",function(){document.removeEventListener("selectionchange",s)})}(0,e,n)},e.$setUserAgentForTests=function(t,e){m=t,p=e}}),ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"],function(t,e,n){"use strict";var i=t("../lib/useragent");function r(t){t.$clickSelection=null;var e=t.editor;e.setDefaultHandler("mousedown",this.onMouseDown.bind(t)),e.setDefaultHandler("dblclick",this.onDoubleClick.bind(t)),e.setDefaultHandler("tripleclick",this.onTripleClick.bind(t)),e.setDefaultHandler("quadclick",this.onQuadClick.bind(t)),e.setDefaultHandler("mousewheel",this.onMouseWheel.bind(t)),["select","startSelect","selectEnd","selectAllEnd","selectByWordsEnd","selectByLinesEnd","dragWait","dragWaitEnd","focusWait"].forEach(function(e){t[e]=this[e]},this),t.selectByLines=this.extendSelectionBy.bind(t,"getLineRange"),t.selectByWords=this.extendSelectionBy.bind(t,"getWordRange")}function s(t,e){if(t.start.row==t.end.row)var n=2*e.column-t.start.column-t.end.column;else n=t.start.row!=t.end.row-1||t.start.column||t.end.column?2*e.row-t.start.row-t.end.row:e.column-4;return n<0?{cursor:t.start,anchor:t.end}:{cursor:t.end,anchor:t.start}}(function(){this.onMouseDown=function(t){var e=t.inSelection(),n=t.getDocumentPosition();this.mousedownEvent=t;var r=this.editor,s=t.getButton();return 0!==s?((r.getSelectionRange().isEmpty()||1==s)&&r.selection.moveToPosition(n),void(2==s&&(r.textInput.onContextMenu(t.domEvent),i.isMozilla||t.preventDefault()))):(this.mousedownEvent.time=Date.now(),!e||r.isFocused()||(r.focus(),!this.$focusTimeout||this.$clickSelection||r.inMultiSelectMode)?(this.captureMouse(t),this.startSelect(n,t.domEvent._clicks>1),t.preventDefault()):(this.setState("focusWait"),void this.captureMouse(t)))},this.startSelect=function(t,e){t=t||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var n=this.editor;this.mousedownEvent&&(this.mousedownEvent.getShiftKey()?n.selection.selectToPosition(t):e||n.selection.moveToPosition(t),e||this.select(),n.renderer.scroller.setCapture&&n.renderer.scroller.setCapture(),n.setStyle("ace_selecting"),this.setState("select"))},this.select=function(){var t,e=this.editor,n=e.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var i=this.$clickSelection.comparePoint(n);if(-1==i)t=this.$clickSelection.end;else if(1==i)t=this.$clickSelection.start;else{var r=s(this.$clickSelection,n);n=r.cursor,t=r.anchor}e.selection.setSelectionAnchor(t.row,t.column)}e.selection.selectToPosition(n),e.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(t){var e,n=this.editor,i=n.renderer.screenToTextCoordinates(this.x,this.y),r=n.selection[t](i.row,i.column);if(this.$clickSelection){var o=this.$clickSelection.comparePoint(r.start),a=this.$clickSelection.comparePoint(r.end);if(-1==o&&a<=0)e=this.$clickSelection.end,r.end.row==i.row&&r.end.column==i.column||(i=r.start);else if(1==a&&o>=0)e=this.$clickSelection.start,r.start.row==i.row&&r.start.column==i.column||(i=r.end);else if(-1==o&&1==a)i=r.end,e=r.start;else{var l=s(this.$clickSelection,i);i=l.cursor,e=l.anchor}n.selection.setSelectionAnchor(e.row,e.column)}n.selection.selectToPosition(i),n.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var t,e,n=(t=this.mousedownEvent.y,e=this.y,Math.sqrt(Math.pow(this.x-this.mousedownEvent.x,2)+Math.pow(e-t,2))),i=Date.now();(n>0||i-this.mousedownEvent.time>this.$focusTimeout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(t){var e=t.getDocumentPosition(),n=this.editor,i=n.session.getBracketRange(e);i?(i.isEmpty()&&(i.start.column--,i.end.column++),this.setState("select")):(i=n.selection.getWordRange(e.row,e.column),this.setState("selectByWords")),this.$clickSelection=i,this.select()},this.onTripleClick=function(t){var e=t.getDocumentPosition(),n=this.editor;this.setState("selectByLines");var i=n.getSelectionRange();i.isMultiLine()&&i.contains(e.row,e.column)?(this.$clickSelection=n.selection.getLineRange(i.start.row),this.$clickSelection.end=n.selection.getLineRange(i.end.row).end):this.$clickSelection=n.selection.getLineRange(e.row),this.select()},this.onQuadClick=function(t){var e=this.editor;e.selectAll(),this.$clickSelection=e.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(t){if(!t.getAccelKey()){t.getShiftKey()&&t.wheelY&&!t.wheelX&&(t.wheelX=t.wheelY,t.wheelY=0);var e=this.editor;this.$lastScroll||(this.$lastScroll={t:0,vx:0,vy:0,allowed:0});var n=this.$lastScroll,i=t.domEvent.timeStamp,r=i-n.t,s=r?t.wheelX/r:n.vx,o=r?t.wheelY/r:n.vy;r<550&&(s=(s+n.vx)/2,o=(o+n.vy)/2);var a=Math.abs(s/o),l=!1;return a>=1&&e.renderer.isScrollableBy(t.wheelX*t.speed,0)&&(l=!0),a<=1&&e.renderer.isScrollableBy(0,t.wheelY*t.speed)&&(l=!0),l?n.allowed=i:i-n.allowed<550&&(Math.abs(s)<=1.5*Math.abs(n.vx)&&Math.abs(o)<=1.5*Math.abs(n.vy)?(l=!0,n.allowed=i):n.allowed=0),n.t=i,n.vx=s,n.vy=o,l?(e.renderer.scrollBy(t.wheelX*t.speed,t.wheelY*t.speed),t.stop()):void 0}}}).call(r.prototype),e.DefaultHandlers=r}),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(t,e,n){"use strict";t("./lib/oop");var i=t("./lib/dom");function r(t){this.isOpen=!1,this.$element=null,this.$parentNode=t}(function(){this.$init=function(){return this.$element=i.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(t){this.getElement().textContent=t},this.setHtml=function(t){this.getElement().innerHTML=t},this.setPosition=function(t,e){this.getElement().style.left=t+"px",this.getElement().style.top=e+"px"},this.setClassName=function(t){i.addCssClass(this.getElement(),t)},this.show=function(t,e,n){null!=t&&this.setText(t),null!=e&&null!=n&&this.setPosition(e,n),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth},this.destroy=function(){this.isOpen=!1,this.$element&&this.$element.parentNode&&this.$element.parentNode.removeChild(this.$element)}}).call(r.prototype),e.Tooltip=r}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],function(t,e,n){"use strict";var i=t("../lib/dom"),r=t("../lib/oop"),s=t("../lib/event"),o=t("../tooltip").Tooltip;function a(t){o.call(this,t)}r.inherits(a,o),(function(){this.setPosition=function(t,e){var n=window.innerWidth||document.documentElement.clientWidth,i=window.innerHeight||document.documentElement.clientHeight,r=this.getWidth(),s=this.getHeight();(t+=15)+r>n&&(t-=t+r-n),(e+=15)+s>i&&(e-=20+s),o.prototype.setPosition.call(this,t,e)}}).call(a.prototype),e.GutterHandler=function(t){var e,n,r,o=t.editor,l=o.renderer.$gutterLayer,c=new a(o.container);function u(){e&&(e=clearTimeout(e)),r&&(c.hide(),r=null,o._signal("hideGutterTooltip",c),o.off("mousewheel",u))}function h(t){c.setPosition(t.x,t.y)}t.editor.setDefaultHandler("guttermousedown",function(e){if(o.isFocused()&&0==e.getButton()&&"foldWidgets"!=l.getRegion(e)){var n=e.getDocumentPosition().row,i=o.session.selection;if(e.getShiftKey())i.selectTo(n,0);else{if(2==e.domEvent.detail)return o.selectAll(),e.preventDefault();t.$clickSelection=o.selection.getLineRange(n)}return t.setState("selectByLines"),t.captureMouse(e),e.preventDefault()}}),t.editor.setDefaultHandler("guttermousemove",function(s){if(i.hasCssClass(s.domEvent.target||s.domEvent.srcElement,"ace_fold-widget"))return u();r&&t.$tooltipFollowsMouse&&h(s),n=s,e||(e=setTimeout(function(){e=null,n&&!t.isMousePressed?function(){var e=n.getDocumentPosition().row,i=l.$annotations[e];if(!i)return u();if(e==o.session.getLength()){var s=o.renderer.pixelToScreenCoordinates(0,n.y).row,a=n.$pos;if(s>o.session.documentToScreenRow(a.row,a.column))return u()}if(r!=i)if(r=i.text.join("
"),c.setHtml(r),c.show(),o._signal("showGutterTooltip",c),o.on("mousewheel",u),t.$tooltipFollowsMouse)h(n);else{var d=n.domEvent.target.getBoundingClientRect(),f=c.getElement().style;f.left=d.right+"px",f.top=d.bottom+"px"}}():u()},50))}),s.addListener(o.renderer.$gutter,"mouseout",function(t){n=null,r&&!e&&(e=setTimeout(function(){e=null,u()},50))},o),o.on("changeSession",u)}}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(t,e,n){"use strict";var i=t("../lib/event"),r=t("../lib/useragent"),s=e.MouseEvent=function(t,e){this.domEvent=t,this.editor=e,this.x=this.clientX=t.clientX,this.y=this.clientY=t.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){i.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){i.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos||(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY)),this.$pos},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var t=this.editor.getSelectionRange();if(t.isEmpty())this.$inSelection=!1;else{var e=this.getDocumentPosition();this.$inSelection=t.contains(e.row,e.column)}return this.$inSelection},this.getButton=function(){return i.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=r.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(s.prototype)}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(t,e,n){"use strict";var i=t("../lib/dom"),r=t("../lib/event"),s=t("../lib/useragent");function o(t){var e=t.editor,n=i.createElement("img");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",s.isOpera&&(n.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;"),["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"].forEach(function(e){t[e]=this[e]},this),e.on("mousedown",this.onMouseDown.bind(t));var o,l,c,u,h,d,f,p,g,m,v,y=e.container,b=0;function w(){var t=d;(function(t,n){var i=Date.now();m&&n&&t.row==n.row&&n&&t.column==n.column?a(v.x,v.y,l,c)>5?m=null:i-m>=200&&(e.renderer.scrollCursorIntoView(),m=null):(e.moveCursorToPosition(t),m=i,v={x:l,y:c})})(d=e.renderer.screenToTextCoordinates(l,c),t),function(t,n){var i=Date.now(),r=e.renderer.layerConfig.lineHeight,s=e.renderer.layerConfig.characterWidth,o=e.renderer.scroller.getBoundingClientRect(),a={x:{left:l-o.left,right:o.right-l},y:{top:c-o.top,bottom:o.bottom-c}},u=Math.min(a.x.left,a.x.right),h=Math.min(a.y.top,a.y.bottom),d={row:t.row,column:t.column};u/s<=2&&(d.column+=a.x.left=200&&e.renderer.scrollCursorIntoView(d):g=i:g=null}(d,t)}function x(){h=e.selection.toOrientedRange(),o=e.session.addMarker(h,"ace_selection",e.getSelectionStyle()),e.clearSelection(),e.isFocused()&&e.renderer.$cursorLayer.setBlinking(!1),clearInterval(u),w(),u=setInterval(w,20),b=0,r.addListener(document,"mousemove",S)}function _(){clearInterval(u),e.session.removeMarker(o),o=null,e.selection.fromOrientedRange(h),e.isFocused()&&!p&&e.$resetCursorStyle(),h=null,d=null,b=0,g=null,m=null,r.removeListener(document,"mousemove",S)}this.onDragStart=function(t){if(this.cancelDrag||!y.draggable){var i=this;return setTimeout(function(){i.startSelect(),i.captureMouse(t)},0),t.preventDefault()}h=e.getSelectionRange();var r=t.dataTransfer;r.effectAllowed=e.getReadOnly()?"copy":"copyMove",s.isOpera&&(e.container.appendChild(n),n.scrollTop=0),r.setDragImage&&r.setDragImage(n,0,0),s.isOpera&&e.container.removeChild(n),r.clearData(),r.setData("Text",e.session.getTextRange()),p=!0,this.setState("drag")},this.onDragEnd=function(t){y.draggable=!1,p=!1,this.setState(null),e.getReadOnly()||(f||"move"!=t.dataTransfer.dropEffect||e.session.remove(e.getSelectionRange()),e.$resetCursorStyle()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(t){if(!e.getReadOnly()&&k(t.dataTransfer))return l=t.clientX,c=t.clientY,o||x(),b++,t.dataTransfer.dropEffect=f=E(t),r.preventDefault(t)},this.onDragOver=function(t){if(!e.getReadOnly()&&k(t.dataTransfer))return l=t.clientX,c=t.clientY,o||(x(),b++),null!==C&&(C=null),t.dataTransfer.dropEffect=f=E(t),r.preventDefault(t)},this.onDragLeave=function(t){if(--b<=0&&o)return _(),f=null,r.preventDefault(t)},this.onDrop=function(t){if(d){var n=t.dataTransfer;if(p)switch(f){case"move":h=h.contains(d.row,d.column)?{start:d,end:d}:e.moveText(h,d);break;case"copy":h=e.moveText(h,d,!0)}else{var i=n.getData("Text");h={start:d,end:e.session.insert(d,i)},e.focus(),f=null}return _(),r.preventDefault(t)}},r.addListener(y,"dragstart",this.onDragStart.bind(t),e),r.addListener(y,"dragend",this.onDragEnd.bind(t),e),r.addListener(y,"dragenter",this.onDragEnter.bind(t),e),r.addListener(y,"dragover",this.onDragOver.bind(t),e),r.addListener(y,"dragleave",this.onDragLeave.bind(t),e),r.addListener(y,"drop",this.onDrop.bind(t),e);var C=null;function S(){null==C&&(C=setTimeout(function(){null!=C&&o&&_()},20))}function k(t){var e=t.types;return!e||Array.prototype.some.call(e,function(t){return"text/plain"==t||"Text"==t})}function E(t){var e=["copy","copymove","all","uninitialized"],n=s.isMac?t.altKey:t.ctrlKey,i="uninitialized";try{i=t.dataTransfer.effectAllowed.toLowerCase()}catch(t){}var r="none";return n&&e.indexOf(i)>=0?r="copy":["move","copymove","linkmove","all","uninitialized"].indexOf(i)>=0?r="move":e.indexOf(i)>=0&&(r="copy"),r}}function a(t,e,n,i){return Math.sqrt(Math.pow(n-t,2)+Math.pow(i-e,2))}(function(){this.dragWait=function(){Date.now()-this.mousedownEvent.time>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){this.editor.container.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(t){this.editor.$resetCursorStyle(),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var t=this.editor;t.container.draggable=!0,t.renderer.$cursorLayer.setBlinking(!1),t.setStyle("ace_dragging"),t.renderer.setCursorStyle(s.isWin?"default":"move"),this.setState("dragReady")},this.onMouseDrag=function(t){var e=this.editor.container;s.isIE&&"dragReady"==this.state&&a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>3&&e.dragDrop(),"dragWait"===this.state&&a(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y)>0&&(e.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))},this.onMouseDown=function(t){if(this.$dragEnabled){this.mousedownEvent=t;var e=this.editor,n=t.inSelection(),i=t.getButton();if(1===(t.domEvent.detail||1)&&0===i&&n){if(t.editor.inMultiSelectMode&&(t.getAccelKey()||t.getShiftKey()))return;this.mousedownEvent.time=Date.now();var r=t.domEvent.target||t.domEvent.srcElement;"unselectable"in r&&(r.unselectable="on"),e.getDragDelay()?(s.isWebKit&&(this.cancelDrag=!0,e.container.draggable=!0),this.setState("dragWait")):this.startDrag(),this.captureMouse(t,this.onMouseDrag.bind(this)),t.defaultPrevented=!0}}}}).call(o.prototype),e.DragdropHandler=o}),ace.define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/event","ace/lib/dom"],function(t,e,n){"use strict";var i=t("./mouse_event").MouseEvent,r=t("../lib/event"),s=t("../lib/dom");e.addTouchListeners=function(t,e){var n,o,a,l,c,u,h,d,f,p="scroll",g=0,m=0,v=0,y=0;function b(){var t,n,i;f||(t=window.navigator&&window.navigator.clipboard,n=!1,i=function(i){var r,o,a=i.target.getAttribute("action");if("more"==a||!n)return n=!n,r=e.getCopyText(),o=e.session.getUndoManager().hasUndo(),void f.replaceChild(s.buildDom(n?["span",!r&&["span",{class:"ace_mobile-button",action:"selectall"},"Select All"],r&&["span",{class:"ace_mobile-button",action:"copy"},"Copy"],r&&["span",{class:"ace_mobile-button",action:"cut"},"Cut"],t&&["span",{class:"ace_mobile-button",action:"paste"},"Paste"],o&&["span",{class:"ace_mobile-button",action:"undo"},"Undo"],["span",{class:"ace_mobile-button",action:"find"},"Find"],["span",{class:"ace_mobile-button",action:"openCommandPallete"},"Pallete"]]:["span"]),f.firstChild);"paste"==a?t.readText().then(function(t){e.execCommand(a,t)}):a&&("cut"!=a&&"copy"!=a||(t?t.writeText(e.getCopyText()):document.execCommand("copy")),e.execCommand(a)),f.firstChild.style.display="none",n=!1,"openCommandPallete"!=a&&e.focus()},f=s.buildDom(["div",{class:"ace_mobile-menu",ontouchstart:function(t){p="menu",t.stopPropagation(),t.preventDefault(),e.textInput.focus()},ontouchend:function(t){t.stopPropagation(),t.preventDefault(),i(t)},onclick:i},["span"],["span",{class:"ace_mobile-button",action:"more"},"..."]],e.container));var r=e.selection.cursor,o=e.renderer.textToScreenCoordinates(r.row,r.column),a=e.renderer.textToScreenCoordinates(0,0).pageX,l=e.renderer.scrollLeft,c=e.container.getBoundingClientRect();f.style.top=o.pageY-c.top-3+"px",o.pageX-c.left1)return clearTimeout(c),c=null,a=-1,void(p="zoom");d=e.$mouseHandler.isMousePressed=!0;var s=e.renderer.layerConfig.lineHeight,u=e.renderer.layerConfig.lineHeight,f=t.timeStamp;l=f;var b=r[0],w=b.clientX,_=b.clientY;Math.abs(n-w)+Math.abs(o-_)>s&&(a=-1),n=t.clientX=w,o=t.clientY=_,v=y=0;var C=new i(t,e);if(h=C.getDocumentPosition(),f-a<500&&1==r.length&&!g)m++,t.preventDefault(),t.button=0,function(){c=null,clearTimeout(c),e.selection.moveToPosition(h);var t=m>=2?e.selection.getLineRange(h.row):e.session.getBracketRange(h);t&&!t.isEmpty()?e.selection.setRange(t):e.selection.selectWord(),p="wait"}();else{m=0;var S=e.selection.cursor,k=e.selection.isEmpty()?S:e.selection.anchor,E=e.renderer.$cursorLayer.getPixelPosition(S,!0),A=e.renderer.$cursorLayer.getPixelPosition(k,!0),D=e.renderer.scroller.getBoundingClientRect(),T=e.renderer.layerConfig.offset,R=e.renderer.scrollLeft,F=function(t,e){return(t/=u)*t+(e=e/s-.75)*e};if(t.clientXL?"cursor":"anchor"),p=L<3.5?"anchor":M<3.5?"cursor":"scroll",c=setTimeout(x,450)}a=f},e),r.addListener(t,"touchend",function(t){d=e.$mouseHandler.isMousePressed=!1,u&&clearInterval(u),"zoom"==p?(p="",g=0):c?(e.selection.moveToPosition(h),g=0,b()):"scroll"==p?(g+=60,u=setInterval(function(){g--<=0&&(clearInterval(u),u=null),Math.abs(v)<.01&&(v=0),Math.abs(y)<.01&&(y=0),g<20&&(v*=.9),g<20&&(y*=.9);var t=e.session.getScrollTop();e.renderer.scrollBy(10*v,10*y),t==e.session.getScrollTop()&&(g=0)},10),w()):b(),clearTimeout(c),c=null},e),r.addListener(t,"touchmove",function(t){c&&(clearTimeout(c),c=null);var r=t.touches;if(!(r.length>1||"zoom"==p)){var s=r[0],a=n-s.clientX,u=o-s.clientY;if("wait"==p){if(!(a*a+u*u>4))return t.preventDefault();p="cursor"}n=s.clientX,o=s.clientY,t.clientX=s.clientX,t.clientY=s.clientY;var h=t.timeStamp,d=h-l;if(l=h,"scroll"==p){var f=new i(t,e);f.speed=1,f.wheelX=a,f.wheelY=u,10*Math.abs(a)1&&(r=n[n.length-2]);var o=l[e+"Path"];return null==o?o=l.basePath:"/"==i&&(e=i=""),o&&"/"!=o.slice(-1)&&(o+="/"),o+e+i+r+this.get("suffix")},e.setModuleUrl=function(t,e){return l.$moduleUrls[t]=e},e.$loading={},e.loadModule=function(n,i){var r,o;Array.isArray(n)&&(o=n[0],n=n[1]);try{r=t(n)}catch(l){}if(r&&!e.$loading[n])return i&&i(r);if(e.$loading[n]||(e.$loading[n]=[]),e.$loading[n].push(i),!(e.$loading[n].length>1)){var a=function(){t([n],function(t){e._emit("load.module",{name:n,module:t});var i=e.$loading[n];e.$loading[n]=null,i.forEach(function(e){e&&e(t)})})};if(!e.get("packaged"))return a();s.loadScript(e.moduleUrl(n,o),a),c()}};var c=function(){l.basePath||l.workerPath||l.modePath||l.themePath||Object.keys(l.$moduleUrls).length||(console.error("Unable to infer path to ace from script src,","use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes","or with webpack use ace/webpack-resolver"),c=function(){})};function u(r){if(a&&a.document){l.packaged=r||t.packaged||i.packaged||a.define&&n("B9Yq").packaged;for(var s,o={},c="",u=document.currentScript||document._currentScript,h=(u&&u.ownerDocument||document).getElementsByTagName("script"),d=0;d=t){for(s=h+1;s=t;)s++;for(a=h,l=s-1;a=e.length||2!=(l=n[r-1])&&3!=l||2!=(c=e[r+1])&&3!=c?4:(s&&(c=3),c==l?c:4);case 10:return 2==(l=r>0?n[r-1]:5)&&r+10&&2==n[r-1])return 2;if(s)return 4;for(f=r+1,d=e.length;f=1425&&g<=2303||64286==g)&&(1==l||7==l))return 1}return r<1||5==(l=e[r-1])?4:n[r-1];case 5:return s=!1,o=!0,i;case 6:return a=!0,4;case 13:case 14:case 16:case 17:case 15:s=!1;case h:return 4}}function m(t){var e=t.charCodeAt(0),n=e>>8;return 0==n?e>191?0:d[e]:5==n?/[\u0591-\u05f4]/.test(t)?1:0:6==n?/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(t)?12:/[\u0660-\u0669\u066b-\u066c]/.test(t)?3:1642==e?u:/[\u06f0-\u06f9]/.test(t)?2:7:32==n&&e<=8287?f[255&e]:254==n&&e>=65136?7:4}e.L=0,e.R=1,e.EN=2,e.ON_R=3,e.AN=4,e.R_H=5,e.B=6,e.RLE=7,e.DOT="\xb7",e.doBidiReorder=function(t,n,u){if(t.length<2)return{};var d=t.split(""),f=new Array(d.length),v=new Array(d.length),y=[];i=u?1:0,function(t,e,n,u){var h=i?c:l,d=null,f=null,p=null,v=0,y=null,b=-1,w=null,x=null,_=[];if(!u)for(w=0,u=[];w0)if(16==y){for(w=b;w-1){for(w=b;w=0&&8==u[C];C--)e[C]=i}}(d,y,d.length,n);for(var b=0;b7&&n[b]<13||4===n[b]||n[b]===h)?y[b]=e.ON_R:b>0&&"\u0644"===d[b-1]&&/\u0622|\u0623|\u0625|\u0627/.test(d[b])&&(y[b-1]=y[b]=e.R_H,b++);for(d[d.length-1]===e.DOT&&(y[d.length-1]=e.B),"\u202b"===d[0]&&(y[0]=e.RLE),b=0;b=0&&(t=this.session.$docRowCache[n])}return t},this.getSplitIndex=function(){var t=0,e=this.session.$screenRowCache;if(e.length)for(var n,i=this.session.$getRowCacheIndex(e,this.currentRow);this.currentRow-t>0&&(n=this.session.$getRowCacheIndex(e,this.currentRow-t-1))===i;)i=n,t++;else t=this.currentRow;return t},this.updateRowLine=function(t,e){void 0===t&&(t=this.getDocumentRow());var n=t===this.session.getLength()-1?this.EOF:this.EOL;if(this.wrapIndent=0,this.line=this.session.getLine(t),this.isRtlDir=this.$isRtl||this.line.charAt(0)===this.RLE,this.session.$useWrapMode){var s=this.session.$wrapData[t];s&&(void 0===e&&(e=this.getSplitIndex()),e>0&&s.length?(this.wrapIndent=s.indent,this.wrapOffset=this.wrapIndent*this.charWidths[i.L],this.line=ee?this.session.getOverwrite()?t:t-1:e,r=i.getVisualFromLogicalIdx(n,this.bidiMap),s=this.bidiMap.bidiLevels,o=0;!this.session.getOverwrite()&&t<=e&&s[r]%2!=0&&r++;for(var a=0;ae&&s[r]%2==0&&(o+=this.charWidths[s[r]]),this.wrapIndent&&(o+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset),this.isRtlDir&&(o+=this.rtlLineOffset),o},this.getSelections=function(t,e){var n,i=this.bidiMap,r=i.bidiLevels,s=[],o=0,a=Math.min(t,e)-this.wrapIndent,l=Math.max(t,e)-this.wrapIndent,c=!1,u=!1,h=0;this.wrapIndent&&(o+=this.isRtlDir?-1*this.wrapOffset:this.wrapOffset);for(var d,f=0;f=a&&dn+s/2;){if(n+=s,i===r.length-1){s=0;break}s=this.charWidths[r[++i]]}return i>0&&r[i-1]%2!=0&&r[i]%2==0?(t0&&r[i-1]%2==0&&r[i]%2!=0?e=1+(t>n?this.bidiMap.logicalFromVisual[i]:this.bidiMap.logicalFromVisual[i-1]):this.isRtlDir&&i===r.length-1&&0===s&&r[i-1]%2==0||!this.isRtlDir&&0===i&&r[i]%2!=0?e=1+this.bidiMap.logicalFromVisual[i]:(i>0&&r[i-1]%2!=0&&0!==s&&i--,e=this.bidiMap.logicalFromVisual[i]),0===e&&this.isRtlDir&&e++,e+this.wrapIndent}}).call(o.prototype),e.BidiHandler=o}),ace.define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"],function(t,e,n){"use strict";var i=t("./lib/oop"),r=t("./lib/lang"),s=t("./lib/event_emitter").EventEmitter,o=t("./range").Range,a=function(t){this.session=t,this.doc=t.getDocument(),this.clearSelection(),this.cursor=this.lead=this.doc.createAnchor(0,0),this.anchor=this.doc.createAnchor(0,0),this.$silent=!1;var e=this;this.cursor.on("change",function(t){e.$cursorChanged=!0,e.$silent||e._emit("changeCursor"),e.$isEmpty||e.$silent||e._emit("changeSelection"),e.$keepDesiredColumnOnChange||t.old.column==t.value.column||(e.$desiredColumn=null)}),this.anchor.on("change",function(){e.$anchorChanged=!0,e.$isEmpty||e.$silent||e._emit("changeSelection")})};(function(){i.implement(this,s),this.isEmpty=function(){return this.$isEmpty||this.anchor.row==this.lead.row&&this.anchor.column==this.lead.column},this.isMultiLine=function(){return!this.$isEmpty&&this.anchor.row!=this.cursor.row},this.getCursor=function(){return this.lead.getPosition()},this.setSelectionAnchor=function(t,e){this.$isEmpty=!1,this.anchor.setPosition(t,e)},this.getAnchor=this.getSelectionAnchor=function(){return this.$isEmpty?this.getSelectionLead():this.anchor.getPosition()},this.getSelectionLead=function(){return this.lead.getPosition()},this.isBackwards=function(){var t=this.anchor,e=this.lead;return t.row>e.row||t.row==e.row&&t.column>e.column},this.getRange=function(){var t=this.anchor,e=this.lead;return this.$isEmpty?o.fromPoints(e,e):this.isBackwards()?o.fromPoints(e,t):o.fromPoints(t,e)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){this.$setSelection(0,0,Number.MAX_VALUE,Number.MAX_VALUE)},this.setRange=this.setSelectionRange=function(t,e){var n=e?t.end:t.start,i=e?t.start:t.end;this.$setSelection(n.row,n.column,i.row,i.column)},this.$setSelection=function(t,e,n,i){if(!this.$silent){var r=this.$isEmpty,s=this.inMultiSelectMode;this.$silent=!0,this.$cursorChanged=this.$anchorChanged=!1,this.anchor.setPosition(t,e),this.cursor.setPosition(n,i),this.$isEmpty=!o.comparePoints(this.anchor,this.cursor),this.$silent=!1,this.$cursorChanged&&this._emit("changeCursor"),(this.$cursorChanged||this.$anchorChanged||r!=this.$isEmpty||s)&&this._emit("changeSelection")}},this.$moveSelection=function(t){var e=this.lead;this.$isEmpty&&this.setSelectionAnchor(e.row,e.column),t.call(this)},this.selectTo=function(t,e){this.$moveSelection(function(){this.moveCursorTo(t,e)})},this.selectToPosition=function(t){this.$moveSelection(function(){this.moveCursorToPosition(t)})},this.moveTo=function(t,e){this.clearSelection(),this.moveCursorTo(t,e)},this.moveToPosition=function(t){this.clearSelection(),this.moveCursorToPosition(t)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(t,e){if(void 0===e){var n=t||this.lead;t=n.row,e=n.column}return this.session.getWordRange(t,e)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var t=this.getCursor(),e=this.session.getAWordRange(t.row,t.column);this.setSelectionRange(e)},this.getLineRange=function(t,e){var n,i="number"==typeof t?t:this.lead.row,r=this.session.getFoldLine(i);return r?(i=r.start.row,n=r.end.row):n=i,!0===e?new o(i,0,n,this.session.getLine(n).length):new o(i,0,n+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.wouldMoveIntoSoftTab=function(t,e,n){var i=t.column,r=t.column+e;return n<0&&(i=t.column-e,r=t.column),this.session.isTabStop(t)&&this.doc.getLine(t.row).slice(i,r).split(" ").length-1==e},this.moveCursorLeft=function(){var t,e=this.lead.getPosition();if(t=this.session.getFoldAt(e.row,e.column,-1))this.moveCursorTo(t.start.row,t.start.column);else if(0===e.column)e.row>0&&this.moveCursorTo(e.row-1,this.doc.getLine(e.row-1).length);else{var n=this.session.getTabSize();this.wouldMoveIntoSoftTab(e,n,-1)&&!this.session.getNavigateWithinSoftTabs()?this.moveCursorBy(0,-n):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var t,e=this.lead.getPosition();if(t=this.session.getFoldAt(e.row,e.column,1))this.moveCursorTo(t.end.row,t.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(e.column=i)}}this.moveCursorTo(e.row,e.column)},this.moveCursorFileEnd=function(){var t=this.doc.getLength()-1,e=this.doc.getLine(t).length;this.moveCursorTo(t,e)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var t=this.lead.row,e=this.lead.column,n=this.doc.getLine(t),i=n.substring(e);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var r=this.session.getFoldAt(t,e,1);if(r)this.moveCursorTo(r.end.row,r.end.column);else{if(this.session.nonTokenRe.exec(i)&&(e+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,i=n.substring(e)),e>=n.length)return this.moveCursorTo(t,n.length),this.moveCursorRight(),void(t0&&this.moveCursorWordLeft());this.session.tokenRe.exec(s)&&(n-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),this.moveCursorTo(e,n)}},this.$shortWordEndIndex=function(t){var e,n=0,i=/\s/,r=this.session.tokenRe;if(r.lastIndex=0,this.session.tokenRe.exec(t))n=this.session.tokenRe.lastIndex;else{for(;(e=t[n])&&i.test(e);)n++;if(n<1)for(r.lastIndex=0;(e=t[n])&&!r.test(e);)if(r.lastIndex=0,n++,i.test(e)){if(n>2){n--;break}for(;(e=t[n])&&i.test(e);)n++;if(n>2)break}}return r.lastIndex=0,n},this.moveCursorShortWordRight=function(){var t=this.lead.row,e=this.lead.column,n=this.doc.getLine(t),i=n.substring(e),r=this.session.getFoldAt(t,e,1);if(r)return this.moveCursorTo(r.end.row,r.end.column);if(e==n.length){var s=this.doc.getLength();do{t++,i=this.doc.getLine(t)}while(t0&&/^\s*$/.test(i));n=i.length,/\s+$/.test(i)||(i="")}var s=r.stringReverse(i),o=this.$shortWordEndIndex(s);return this.moveCursorTo(e,n-o)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(t,e){var n,i=this.session.documentToScreenPosition(this.lead.row,this.lead.column);if(0===e&&(0!==t&&(this.session.$bidiHandler.isBidiRow(i.row,this.lead.row)?(n=this.session.$bidiHandler.getPosLeft(i.column),i.column=Math.round(n/this.session.$bidiHandler.charWidths[0])):n=i.column*this.session.$bidiHandler.charWidths[0]),this.$desiredColumn?i.column=this.$desiredColumn:this.$desiredColumn=i.column),0!=t&&this.session.lineWidgets&&this.session.lineWidgets[this.lead.row]){var r=this.session.lineWidgets[this.lead.row];t<0?t-=r.rowsAbove||0:t>0&&(t+=r.rowCount-(r.rowsAbove||0))}var s=this.session.screenToDocumentPosition(i.row+t,i.column,n);this.moveCursorTo(s.row,s.column+e,0===e)},this.moveCursorToPosition=function(t){this.moveCursorTo(t.row,t.column)},this.moveCursorTo=function(t,e,n){var i=this.session.getFoldAt(t,e,1);i&&(t=i.start.row,e=i.start.column),this.$keepDesiredColumnOnChange=!0;var r=this.session.getLine(t);/[\uDC00-\uDFFF]/.test(r.charAt(e))&&r.charAt(e-1)&&(this.lead.row==t&&this.lead.column==e+1?e-=1:e+=1),this.lead.setPosition(t,e),this.$keepDesiredColumnOnChange=!1,n||(this.$desiredColumn=null)},this.moveCursorToScreen=function(t,e,n){var i=this.session.screenToDocumentPosition(t,e);this.moveCursorTo(i.row,i.column,n)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(t){this.setSelectionRange(t,t.cursor==t.start),this.$desiredColumn=t.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(t){var e=this.getRange();return t?(t.start.column=e.start.column,t.start.row=e.start.row,t.end.column=e.end.column,t.end.row=e.end.row):t=e,t.cursor=this.isBackwards()?t.start:t.end,t.desiredColumn=this.$desiredColumn,t},this.getRangeOfMovements=function(t){var e=this.getCursor();try{t(this);var n=this.getCursor();return o.fromPoints(e,n)}catch(i){return o.fromPoints(e,e)}finally{this.moveCursorToPosition(e)}},this.toJSON=function(){if(this.rangeCount)var t=this.ranges.map(function(t){var e=t.clone();return e.isBackwards=t.cursor==t.start,e});else(t=this.getRange()).isBackwards=this.isBackwards();return t},this.fromJSON=function(t){if(null==t.start){if(this.rangeList&&t.length>1){this.toSingleRange(t[0]);for(var e=t.length;e--;){var n=o.fromPoints(t[e].start,t[e].end);t[e].isBackwards&&(n.cursor=n.start),this.addRange(n,!0)}return}t=t[0]}this.rangeList&&this.toSingleRange(t),this.setSelectionRange(t,t.isBackwards)},this.isEqual=function(t){if((t.length||this.rangeCount)&&t.length!=this.rangeCount)return!1;if(!t.length||!this.ranges)return this.getRange().isEqual(t);for(var e=this.ranges.length;e--;)if(!this.ranges[e].isEqual(t[e]))return!1;return!0}}).call(a.prototype),e.Selection=a}),ace.define("ace/tokenizer",["require","exports","module","ace/config"],function(t,e,n){"use strict";var i=t("./config"),r=2e3,s=function(t){for(var e in this.states=t,this.regExps={},this.matchMappings={},this.states){for(var n=this.states[e],i=[],r=0,s=this.matchMappings[e]={defaultToken:"text"},o="g",a=[],l=0;l1?this.$applyToken:c.token),h>1&&(/\\\d/.test(c.regex)?u=c.regex.replace(/\\([0-9]+)/g,function(t,e){return"\\"+(parseInt(e,10)+r+1)}):(h=1,u=this.removeCapturingGroups(c.regex)),c.splitRegex||"string"==typeof c.token||a.push(c)),s[r]=l,r+=h,i.push(u),c.onMatch||(c.onMatch=null)}}i.length||(s[0]=0,i.push("$")),a.forEach(function(t){t.splitRegex=this.createSplitterRegexp(t.regex,o)},this),this.regExps[e]=new RegExp("("+i.join(")|(")+")|($)",o)}};(function(){this.$setMaxTokenCount=function(t){r=0|t},this.$applyToken=function(t){var e=this.splitRegex.exec(t).slice(1),n=this.token.apply(this,e);if("string"==typeof n)return[{type:n,value:t}];for(var i=[],r=0,s=n.length;ru){var v=t.substring(u,m-g.length);d.type==f?d.value+=v:(d.type&&c.push(d),d={type:f,value:v})}for(var y=0;yr){for(h>2*t.length&&this.reportError("infinite loop with in ace tokenizer",{startState:e,line:t});u1&&n[0]!==i&&n.unshift("#tmp",i),{tokens:c,state:n.length?n:i}},this.reportError=i.reportError}).call(s.prototype),e.Tokenizer=s}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(t,e,n){"use strict";var i=t("../lib/lang"),r=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(t,e){if(e)for(var n in t){for(var i=t[n],r=0;r=this.$rowTokens.length;){if(this.$row+=1,t||(t=this.$session.getLength()),this.$row>=t)return this.$row=t-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var t=this.$rowTokens,e=this.$tokenIndex,n=t[e].start;if(void 0!==n)return n;for(n=0;e>0;)n+=t[e-=1].value.length;return n},this.getCurrentTokenPosition=function(){return{row:this.$row,column:this.getCurrentTokenColumn()}},this.getCurrentTokenRange=function(){var t=this.$rowTokens[this.$tokenIndex],e=this.getCurrentTokenColumn();return new i(this.$row,e,this.$row,e+t.value.length)}}).call(r.prototype),e.TokenIterator=r}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(t,e,n){"use strict";var i,r=t("../../lib/oop"),s=t("../behaviour").Behaviour,o=t("../../token_iterator").TokenIterator,a=t("../../lib/lang"),l=["text","paren.rparen","rparen","paren","punctuation.operator"],c=["text","paren.rparen","rparen","paren","punctuation.operator","comment"],u={},h={'"':'"',"'":"'"},d=function(t){var e=-1;if(t.multiSelect&&(e=t.selection.index,u.rangeCount!=t.multiSelect.rangeCount&&(u={rangeCount:t.multiSelect.rangeCount})),u[e])return i=u[e];i=u[e]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""}},f=function(t,e,n,i){var r=t.end.row-t.start.row;return{text:n+e+i,selection:[0,t.start.column+1,r,t.end.column+(r?0:1)]}},p=function(t){this.add("braces","insertion",function(e,n,r,s,o){var l=r.getCursorPosition(),c=s.doc.getLine(l.row);if("{"==o){d(r);var u=r.getSelectionRange(),h=s.doc.getTextRange(u);if(""!==h&&"{"!==h&&r.getWrapBehavioursEnabled())return f(u,h,"{","}");if(p.isSaneInsertion(r,s))return/[\]\}\)]/.test(c[l.column])||r.inMultiSelectMode||t&&t.braces?(p.recordAutoInsert(r,s,"}"),{text:"{}",selection:[1,1]}):(p.recordMaybeInsert(r,s,"{"),{text:"{",selection:[1,1]})}else if("}"==o){if(d(r),"}"==c.substring(l.column,l.column+1)&&null!==s.$findOpeningBracket("}",{column:l.column+1,row:l.row})&&p.isAutoInsertedClosing(l,c,o))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}else{if("\n"==o||"\r\n"==o){d(r);var g="";if(p.isMaybeInsertedClosing(l,c)&&(g=a.stringRepeat("}",i.maybeInsertedBrackets),p.clearMaybeInsertedClosing()),"}"===c.substring(l.column,l.column+1)){var m=s.findMatchingBracket({row:l.row,column:l.column+1},"}");if(!m)return null;var v=this.$getIndent(s.getLine(m.row))}else{if(!g)return void p.clearMaybeInsertedClosing();v=this.$getIndent(c)}var y=v+s.getTabString();return{text:"\n"+y+"\n"+v+g,selection:[1,y.length,1,y.length]}}p.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(t,e,n,r,s){var o=r.doc.getTextRange(s);if(!s.isMultiLine()&&"{"==o){if(d(n),"}"==r.doc.getLine(s.start.row).substring(s.end.column,s.end.column+1))return s.end.column++,s;i.maybeInsertedBrackets--}}),this.add("parens","insertion",function(t,e,n,i,r){if("("==r){d(n);var s=n.getSelectionRange(),o=i.doc.getTextRange(s);if(""!==o&&n.getWrapBehavioursEnabled())return f(s,o,"(",")");if(p.isSaneInsertion(n,i))return p.recordAutoInsert(n,i,")"),{text:"()",selection:[1,1]}}else if(")"==r){d(n);var a=n.getCursorPosition(),l=i.doc.getLine(a.row);if(")"==l.substring(a.column,a.column+1)&&null!==i.$findOpeningBracket(")",{column:a.column+1,row:a.row})&&p.isAutoInsertedClosing(a,l,r))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("parens","deletion",function(t,e,n,i,r){var s=i.doc.getTextRange(r);if(!r.isMultiLine()&&"("==s&&(d(n),")"==i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r}),this.add("brackets","insertion",function(t,e,n,i,r){if("["==r){d(n);var s=n.getSelectionRange(),o=i.doc.getTextRange(s);if(""!==o&&n.getWrapBehavioursEnabled())return f(s,o,"[","]");if(p.isSaneInsertion(n,i))return p.recordAutoInsert(n,i,"]"),{text:"[]",selection:[1,1]}}else if("]"==r){d(n);var a=n.getCursorPosition(),l=i.doc.getLine(a.row);if("]"==l.substring(a.column,a.column+1)&&null!==i.$findOpeningBracket("]",{column:a.column+1,row:a.row})&&p.isAutoInsertedClosing(a,l,r))return p.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}),this.add("brackets","deletion",function(t,e,n,i,r){var s=i.doc.getTextRange(r);if(!r.isMultiLine()&&"["==s&&(d(n),"]"==i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)))return r.end.column++,r}),this.add("string_dquotes","insertion",function(t,e,n,i,r){var s=i.$mode.$quotes||h;if(1==r.length&&s[r]){if(this.lineCommentStart&&-1!=this.lineCommentStart.indexOf(r))return;d(n);var o=r,a=n.getSelectionRange(),l=i.doc.getTextRange(a);if(!(""===l||1==l.length&&s[l])&&n.getWrapBehavioursEnabled())return f(a,l,o,o);if(!l){var c=n.getCursorPosition(),u=i.doc.getLine(c.row),p=u.substring(c.column-1,c.column),g=u.substring(c.column,c.column+1),m=i.getTokenAt(c.row,c.column),v=i.getTokenAt(c.row,c.column+1);if("\\"==p&&m&&/escape/.test(m.type))return null;var y,b=m&&/string|escape/.test(m.type),w=!v||/string|escape/.test(v.type);if(g==o)(y=b!==w)&&/string\.end/.test(v.type)&&(y=!1);else{if(b&&!w)return null;if(b&&w)return null;var x=i.$mode.tokenRe;x.lastIndex=0;var _=x.test(p);x.lastIndex=0;var C=x.test(p);if(_||C)return null;if(g&&!/[\s;,.})\]\\]/.test(g))return null;var S=u[c.column-2];if(p==o&&(S==o||x.test(S)))return null;y=!0}return{text:y?o+o:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(t,e,n,i,r){var s=i.$mode.$quotes||h,o=i.doc.getTextRange(r);if(!r.isMultiLine()&&s.hasOwnProperty(o)&&(d(n),i.doc.getLine(r.start.row).substring(r.start.column+1,r.start.column+2)==o))return r.end.column++,r})};p.isSaneInsertion=function(t,e){var n=t.getCursorPosition(),i=new o(e,n.row,n.column);if(!this.$matchTokenType(i.getCurrentToken()||"text",l)){if(/[)}\]]/.test(t.session.getLine(n.row)[n.column]))return!0;var r=new o(e,n.row,n.column+1);if(!this.$matchTokenType(r.getCurrentToken()||"text",l))return!1}return i.stepForward(),i.getCurrentTokenRow()!==n.row||this.$matchTokenType(i.getCurrentToken()||"text",c)},p.$matchTokenType=function(t,e){return e.indexOf(t.type||t)>-1},p.recordAutoInsert=function(t,e,n){var r=t.getCursorPosition(),s=e.doc.getLine(r.row);this.isAutoInsertedClosing(r,s,i.autoInsertedLineEnd[0])||(i.autoInsertedBrackets=0),i.autoInsertedRow=r.row,i.autoInsertedLineEnd=n+s.substr(r.column),i.autoInsertedBrackets++},p.recordMaybeInsert=function(t,e,n){var r=t.getCursorPosition(),s=e.doc.getLine(r.row);this.isMaybeInsertedClosing(r,s)||(i.maybeInsertedBrackets=0),i.maybeInsertedRow=r.row,i.maybeInsertedLineStart=s.substr(0,r.column)+n,i.maybeInsertedLineEnd=s.substr(r.column),i.maybeInsertedBrackets++},p.isAutoInsertedClosing=function(t,e,n){return i.autoInsertedBrackets>0&&t.row===i.autoInsertedRow&&n===i.autoInsertedLineEnd[0]&&e.substr(t.column)===i.autoInsertedLineEnd},p.isMaybeInsertedClosing=function(t,e){return i.maybeInsertedBrackets>0&&t.row===i.maybeInsertedRow&&e.substr(t.column)===i.maybeInsertedLineEnd&&e.substr(0,t.column)==i.maybeInsertedLineStart},p.popAutoInsertedClosing=function(){i.autoInsertedLineEnd=i.autoInsertedLineEnd.substr(1),i.autoInsertedBrackets--},p.clearMaybeInsertedClosing=function(){i&&(i.maybeInsertedBrackets=0,i.maybeInsertedRow=-1)},r.inherits(p,s),e.CstyleBehaviour=p}),ace.define("ace/unicode",["require","exports","module"],function(t,e,n){"use strict";for(var i=[48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2],r=0,s=[],o=0;o2?i%c!=c-1:i%c==0})}else{if(!this.blockComment)return!1;var f=this.blockComment.start,p=this.blockComment.end,g=new RegExp("^(\\s*)(?:"+l.escapeRegExp(f)+")"),m=new RegExp("(?:"+l.escapeRegExp(p)+")\\s*$"),v=function(t,e){b(t,e)||s&&!/\S/.test(t)||(r.insertInLine({row:e,column:t.length},p),r.insertInLine({row:e,column:a},f))},y=function(t,e){var n;(n=t.match(m))&&r.removeInLine(e,t.length-n[0].length,t.length),(n=t.match(g))&&r.removeInLine(e,n[1].length,n[0].length)},b=function(t,n){if(g.test(t))return!0;for(var i=e.getTokens(n),r=0;rt.length&&(x=t.length)}),a==1/0&&(a=x,s=!1,o=!1),u&&a%c!=0&&(a=Math.floor(a/c)*c),w(o?y:v)},this.toggleBlockComment=function(t,e,n,i){var r=this.blockComment;if(r){!r.start&&r[0]&&(r=r[0]);var s,o,a=(g=new c(e,i.row,i.column)).getCurrentToken(),l=e.selection.toOrientedRange();if(a&&/comment/.test(a.type)){for(var h,d;a&&/comment/.test(a.type);){if(-1!=(m=a.value.indexOf(r.start))){var f=g.getCurrentTokenRow(),p=g.getCurrentTokenColumn()+m;h=new u(f,p,f,p+r.start.length);break}a=g.stepBackward()}var g;for(a=(g=new c(e,i.row,i.column)).getCurrentToken();a&&/comment/.test(a.type);){var m;if(-1!=(m=a.value.indexOf(r.end))){f=g.getCurrentTokenRow(),p=g.getCurrentTokenColumn()+m,d=new u(f,p,f,p+r.end.length);break}a=g.stepForward()}d&&e.remove(d),h&&(e.remove(h),s=h.start.row,o=-r.start.length)}else o=r.start.length,s=n.start.row,e.insert(n.end,r.end),e.insert(n.start,r.start);l.start.row==s&&(l.start.column+=o),l.end.row==s&&(l.end.column+=o),e.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(t,e,n){return this.$getIndent(e)},this.checkOutdent=function(t,e,n){return!1},this.autoOutdent=function(t,e,n){},this.$getIndent=function(t){return t.match(/^\s*/)[0]},this.createWorker=function(t){return null},this.createModeDelegates=function(t){for(var e in this.$embeds=[],this.$modes={},t)if(t[e]){var n=t[e],r=n.prototype.$id,s=i.$modes[r];s||(i.$modes[r]=s=new n),i.$modes[e]||(i.$modes[e]=s),this.$embeds.push(e),this.$modes[e]=s}var o=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"];for(e=0;ethis.row)){var n=function(e,n,i){var r="insert"==e.action,s=(r?1:-1)*(e.end.row-e.start.row),o=(r?1:-1)*(e.end.column-e.start.column),a=e.start,l=r?a:e.end;return t(n,a,i)?{row:n.row,column:n.column}:t(l,n,!i)?{row:n.row+s,column:n.column+(n.row==l.row?o:0)}:{row:a.row,column:a.column}}(e,{row:this.row,column:this.column},this.$insertRight);this.setPosition(n.row,n.column,!0)}},this.setPosition=function(t,e,n){var i;if(i=n?{row:t,column:e}:this.$clipPositionToDocument(t,e),this.row!=i.row||this.column!=i.column){var r={row:this.row,column:this.column};this.row=i.row,this.column=i.column,this._signal("change",{old:r,value:i})}},this.detach=function(){this.document.off("change",this.$onChange)},this.attach=function(t){this.document=t||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(t,e){var n={};return t>=this.document.getLength()?(n.row=Math.max(0,this.document.getLength()-1),n.column=this.document.getLine(n.row).length):t<0?(n.row=0,n.column=0):(n.row=t,n.column=Math.min(this.document.getLine(n.row).length,Math.max(0,e))),e<0&&(n.column=0),n}}).call(s.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"],function(t,e,n){"use strict";var i=t("./lib/oop"),r=t("./apply_delta").applyDelta,s=t("./lib/event_emitter").EventEmitter,o=t("./range").Range,a=t("./anchor").Anchor,l=function(t){this.$lines=[""],0===t.length?this.$lines=[""]:Array.isArray(t)?this.insertMergedLines({row:0,column:0},t):this.insert({row:0,column:0},t)};(function(){i.implement(this,s),this.setValue=function(t){var e=this.getLength()-1;this.remove(new o(0,0,e,this.getLine(e).length)),this.insert({row:0,column:0},t)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(t,e){return new a(this,t,e)},this.$split=0==="aaa".split(/a/).length?function(t){return t.replace(/\r\n|\r/g,"\n").split("\n")}:function(t){return t.split(/\r\n|\r|\n/)},this.$detectNewLine=function(t){var e=t.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=e?e[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(t){this.$newLineMode!==t&&(this.$newLineMode=t,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(t){return"\r\n"==t||"\r"==t||"\n"==t},this.getLine=function(t){return this.$lines[t]||""},this.getLines=function(t,e){return this.$lines.slice(t,e+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(t){return this.getLinesForRange(t).join(this.getNewLineCharacter())},this.getLinesForRange=function(t){var e;if(t.start.row===t.end.row)e=[this.getLine(t.start.row).substring(t.start.column,t.end.column)];else{(e=this.getLines(t.start.row,t.end.row))[0]=(e[0]||"").substring(t.start.column);var n=e.length-1;t.end.row-t.start.row==n&&(e[n]=e[n].substring(0,t.end.column))}return e},this.insertLines=function(t,e){return console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."),this.insertFullLines(t,e)},this.removeLines=function(t,e){return console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."),this.removeFullLines(t,e)},this.insertNewLine=function(t){return console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."),this.insertMergedLines(t,["",""])},this.insert=function(t,e){return this.getLength()<=1&&this.$detectNewLine(e),this.insertMergedLines(t,this.$split(e))},this.insertInLine=function(t,e){var n=this.clippedPos(t.row,t.column),i=this.pos(t.row,t.column+e.length);return this.applyDelta({start:n,end:i,action:"insert",lines:[e]},!0),this.clonePos(i)},this.clippedPos=function(t,e){var n=this.getLength();void 0===t?t=n:t<0?t=0:t>=n&&(t=n-1,e=void 0);var i=this.getLine(t);return null==e&&(e=i.length),{row:t,column:e=Math.min(Math.max(e,0),i.length)}},this.clonePos=function(t){return{row:t.row,column:t.column}},this.pos=function(t,e){return{row:t,column:e}},this.$clipPosition=function(t){var e=this.getLength();return t.row>=e?(t.row=Math.max(0,e-1),t.column=this.getLine(e-1).length):(t.row=Math.max(0,t.row),t.column=Math.min(Math.max(t.column,0),this.getLine(t.row).length)),t},this.insertFullLines=function(t,e){var n=0;(t=Math.min(Math.max(t,0),this.getLength()))0,i=e=0&&this.applyDelta({start:this.pos(t,this.getLine(t).length),end:this.pos(t+1,0),action:"remove",lines:["",""]})},this.replace=function(t,e){return t instanceof o||(t=o.fromPoints(t.start,t.end)),0===e.length&&t.isEmpty()?t.start:e==this.getTextRange(t)?t.end:(this.remove(t),e?this.insert(t.start,e):t.start)},this.applyDeltas=function(t){for(var e=0;e=0;e--)this.revertDelta(t[e])},this.applyDelta=function(t,e){var n="insert"==t.action;(n?t.lines.length<=1&&!t.lines[0]:!o.comparePoints(t.start,t.end))||(n&&t.lines.length>2e4?this.$splitAndapplyLargeDelta(t,2e4):(r(this.$lines,t,e),this._signal("change",t)))},this.$safeApplyDelta=function(t){var e=this.$lines.length;("remove"==t.action&&t.start.row20){n.running=setTimeout(n.$worker,20);break}}n.currentLine=e,-1==i&&(i=e),s<=i&&n.fireUpdateEvent(s,i)}}};(function(){i.implement(this,r),this.setTokenizer=function(t){this.tokenizer=t,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(t){this.doc=t,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(t,e){this._signal("update",{data:{first:t,last:e}})},this.start=function(t){this.currentLine=Math.min(t||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(t){var e=t.start.row,n=t.end.row-e;if(0===n)this.lines[e]=null;else if("remove"==t.action)this.lines.splice(e,n+1,null),this.states.splice(e,n+1,null);else{var i=Array(n+1);i.unshift(e,1),this.lines.splice.apply(this.lines,i),this.states.splice.apply(this.states,i)}this.currentLine=Math.min(e,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(t){return this.lines[t]||this.$tokenizeRow(t)},this.getState=function(t){return this.currentLine==t&&this.$tokenizeRow(t),this.states[t]||"start"},this.$tokenizeRow=function(t){var e=this.doc.getLine(t),n=this.tokenizer.getLineTokens(e,this.states[t-1],t);return this.states[t]+""!=n.state+""?(this.states[t]=n.state,this.lines[t+1]=null,this.currentLine>t+1&&(this.currentLine=t+1)):this.currentLine==t&&(this.currentLine=t+1),this.lines[t]=n.tokens}}).call(s.prototype),e.BackgroundTokenizer=s}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(t,e,n){"use strict";var i=t("./lib/lang"),r=(t("./lib/oop"),t("./range").Range),s=function(t,e,n){this.setRegexp(t),this.clazz=e,this.type=n||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(t){this.regExp+""!=t+""&&(this.regExp=t,this.cache=[])},this.update=function(t,e,n,s){if(this.regExp)for(var o=s.lastRow,a=s.firstRow;a<=o;a++){var l=this.cache[a];null==l&&((l=i.getMatchOffsets(n.getLine(a),this.regExp)).length>this.MAX_RANGES&&(l=l.slice(0,this.MAX_RANGES)),l=l.map(function(t){return new r(a,t.offset,a,t.offset+t.length)}),this.cache[a]=l.length?l:"");for(var c=l.length;c--;)e.drawSingleLineMarker(t,l[c].toScreenRange(n),this.clazz,s)}}}).call(s.prototype),e.SearchHighlight=s}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(t,e,n){"use strict";var i=t("../range").Range;function r(t,e){this.foldData=t,Array.isArray(e)?this.folds=e:e=this.folds=[e];var n=e[e.length-1];this.range=new i(e[0].start.row,e[0].start.column,n.end.row,n.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(t){t.setFoldLine(this)},this)}(function(){this.shiftRow=function(t){this.start.row+=t,this.end.row+=t,this.folds.forEach(function(e){e.start.row+=t,e.end.row+=t})},this.addFold=function(t){if(t.sameRow){if(t.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(t),this.folds.sort(function(t,e){return-t.range.compareEnd(e.start.row,e.start.column)}),this.range.compareEnd(t.start.row,t.start.column)>0?(this.end.row=t.end.row,this.end.column=t.end.column):this.range.compareStart(t.end.row,t.end.column)<0&&(this.start.row=t.start.row,this.start.column=t.start.column)}else if(t.start.row==this.end.row)this.folds.push(t),this.end.row=t.end.row,this.end.column=t.end.column;else{if(t.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(t),this.start.row=t.start.row,this.start.column=t.start.column}t.foldLine=this},this.containsRow=function(t){return t>=this.start.row&&t<=this.end.row},this.walk=function(t,e,n){var i,r,s=0,o=this.folds,a=!0;null==e&&(e=this.end.row,n=this.end.column);for(var l=0;l0)){var l=i(t,o.start);return 0===a?e&&0!==l?-s-2:s:l>0||0===l&&!e?s:-s-1}}return-s-1},this.add=function(t){var e=!t.isEmpty(),n=this.pointIndex(t.start,e);n<0&&(n=-n-1);var i=this.pointIndex(t.end,e,n);return i<0?i=-i-1:i++,this.ranges.splice(n,i-n,t)},this.addList=function(t){for(var e=[],n=t.length;n--;)e.push.apply(e,this.add(t[n]));return e},this.substractPoint=function(t){var e=this.pointIndex(t);if(e>=0)return this.ranges.splice(e,1)},this.merge=function(){for(var t,e=[],n=this.ranges,r=(n=n.sort(function(t,e){return i(t.start,e.start)}))[0],s=1;s=0},this.containsPoint=function(t){return this.pointIndex(t)>=0},this.rangeAtPoint=function(t){var e=this.pointIndex(t);if(e>=0)return this.ranges[e]},this.clipRows=function(t,e){var n=this.ranges;if(n[0].start.row>e||n[n.length-1].start.row=i);o++);if("insert"==t.action){for(var l=r-i,c=-e.column+n.column;oi);o++)if(u.start.row==i&&u.start.column>=e.column&&(u.start.column==e.column&&this.$bias<=0||(u.start.column+=c,u.start.row+=l)),u.end.row==i&&u.end.column>=e.column){if(u.end.column==e.column&&this.$bias<0)continue;u.end.column==e.column&&c>0&&ou.start.column&&u.end.column==s[o+1].start.column&&(u.end.column-=c),u.end.column+=c,u.end.row+=l}}else for(l=i-r,c=e.column-n.column;or);o++)u.end.rowe.column)&&(u.end.column=e.column,u.end.row=e.row):(u.end.column+=c,u.end.row+=l):u.end.row>r&&(u.end.row+=l),u.start.rowe.column)&&(u.start.column=e.column,u.start.row=e.row):(u.start.column+=c,u.start.row+=l):u.start.row>r&&(u.start.row+=l);if(0!=l&&o=t)return r;if(r.end.row>t)return null}return null},this.getNextFoldLine=function(t,e){var n=this.$foldData,i=0;for(e&&(i=n.indexOf(e)),-1==i&&(i=0);i=t)return r}return null},this.getFoldedRowCount=function(t,e){for(var n=this.$foldData,i=e-t+1,r=0;r=e){a=t?i-=e-a:i=0);break}o>=t&&(i-=a>=t?o-a:o-t+1)}return i},this.$addFoldLine=function(t){return this.$foldData.push(t),this.$foldData.sort(function(t,e){return t.start.row-e.start.row}),t},this.addFold=function(t,e){var n,i=this.$foldData,o=!1;t instanceof s?n=t:(n=new s(e,t)).collapseChildren=e.collapseChildren,this.$clipRangeToDocument(n.range);var a=n.start.row,l=n.start.column,c=n.end.row,u=n.end.column,h=this.getFoldAt(a,l,1),d=this.getFoldAt(c,u,-1);if(h&&d==h)return h.addSubFold(n);h&&!h.range.isStart(a,l)&&this.removeFold(h),d&&!d.range.isEnd(c,u)&&this.removeFold(d);var f=this.getFoldsInRange(n.range);f.length>0&&(this.removeFolds(f),n.collapseChildren||f.forEach(function(t){n.addSubFold(t)}));for(var p=0;p0&&this.foldAll(t.start.row+1,t.end.row,t.collapseChildren-1),t.subFolds=[]},this.expandFolds=function(t){t.forEach(function(t){this.expandFold(t)},this)},this.unfold=function(t,e){var n,r;if(null==t?(n=new i(0,0,this.getLength(),0),null==e&&(e=!0)):n="number"==typeof t?new i(t,0,t,this.getLine(t).length):"row"in t?i.fromPoints(t,t):t,r=this.getFoldsInRangeList(n),0!=e?this.removeFolds(r):this.expandFolds(r),r.length)return r},this.isRowFolded=function(t,e){return!!this.getFoldLine(t,e)},this.getRowFoldEnd=function(t,e){var n=this.getFoldLine(t,e);return n?n.end.row:t},this.getRowFoldStart=function(t,e){var n=this.getFoldLine(t,e);return n?n.start.row:t},this.getFoldDisplayLine=function(t,e,n,i,r){null==i&&(i=t.start.row),null==r&&(r=0),null==e&&(e=t.end.row),null==n&&(n=this.getLine(e).length);var s=this.doc,o="";return t.walk(function(t,e,n,a){if(!(eu)break}while(s&&l.test(s.type));s=r.stepBackward()}else s=r.getCurrentToken();return c.end.row=r.getCurrentTokenRow(),c.end.column=r.getCurrentTokenColumn()+s.value.length-2,c}},this.foldAll=function(t,e,n,i){null==n&&(n=1e5);var r=this.foldWidgets;if(r){e=e||this.getLength();for(var s=t=t||0;s=t&&(s=o.end.row,o.collapseChildren=n,this.addFold("...",o))}}},this.foldToLevel=function(t){for(this.foldAll();t-- >0;)this.unfold(null,!1)},this.foldAllComments=function(){var t=this;this.foldAll(null,null,null,function(e){for(var n=t.getTokens(e),i=0;i=0;){var s=n[r];if(null==s&&(s=n[r]=this.getFoldWidget(r)),"start"==s){var o=this.getFoldWidgetRange(r);if(i||(i=o),o&&o.end.row>=t)break}r--}return{range:-1!==r&&o,firstRange:i}},this.onFoldWidgetClick=function(t,e){if(!this.$toggleFoldWidget(t,{children:(e=e.domEvent).shiftKey,all:e.ctrlKey||e.metaKey,siblings:e.altKey})){var n=e.target||e.srcElement;n&&/ace_fold-widget/.test(n.className)&&(n.className+=" ace_invalid")}},this.$toggleFoldWidget=function(t,e){if(this.getFoldWidget){var n=this.getFoldWidget(t),i=this.getLine(t),r="end"===n?-1:1,s=this.getFoldAt(t,-1===r?0:i.length,r);if(s)return e.children||e.all?this.removeFold(s):this.expandFold(s),s;var o=this.getFoldWidgetRange(t,!0);if(o&&!o.isMultiLine()&&(s=this.getFoldAt(o.start.row,o.start.column,1))&&o.isEqual(s.range))return this.removeFold(s),s;if(e.siblings){var a=this.getParentFoldRangeData(t);if(a.range)var l=a.range.start.row+1,c=a.range.end.row;this.foldAll(l,c,e.all?1e4:0)}else e.children?(c=o?o.end.row:this.getLength(),this.foldAll(t+1,c,e.all?1e4:0)):o&&(e.all&&(o.collapseChildren=1e4),this.addFold("...",o));return o}},this.toggleFoldWidget=function(t){var e=this.selection.getCursor().row;e=this.getRowFoldStart(e);var n=this.$toggleFoldWidget(e,{});if(!n){var i=this.getParentFoldRangeData(e,!0);if(n=i.range||i.firstRange){var r=this.getFoldAt(e=n.start.row,this.getLine(e).length,1);r?this.removeFold(r):this.addFold("...",n)}}},this.updateFoldWidgets=function(t){var e=t.start.row,n=t.end.row-e;if(0===n)this.foldWidgets[e]=null;else if("remove"==t.action)this.foldWidgets.splice(e,n+1,null);else{var i=Array(n+1);i.unshift(e,1),this.foldWidgets.splice.apply(this.foldWidgets,i)}},this.tokenizerUpdateFoldWidgets=function(t){var e=t.data;e.first!=e.last&&this.foldWidgets.length>e.first&&this.foldWidgets.splice(e.first,this.foldWidgets.length)}}}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(t,e,n){"use strict";var i=t("../token_iterator").TokenIterator,r=t("../range").Range;e.BracketMatch=function(){this.findMatchingBracket=function(t,e){if(0==t.column)return null;var n=e||this.getLine(t.row).charAt(t.column-1);if(""==n)return null;var i=n.match(/([\(\[\{])|([\)\]\}])/);return i?i[1]?this.$findClosingBracket(i[1],t):this.$findOpeningBracket(i[2],t):null},this.getBracketRange=function(t){var e,n=this.getLine(t.row),i=!0,s=n.charAt(t.column-1),o=s&&s.match(/([\(\[\{])|([\)\]\}])/);if(o||(s=n.charAt(t.column),t={row:t.row,column:t.column+1},o=s&&s.match(/([\(\[\{])|([\)\]\}])/),i=!1),!o)return null;if(o[1]){if(!(a=this.$findClosingBracket(o[1],t)))return null;e=r.fromPoints(t,a),i||(e.end.column++,e.start.column--),e.cursor=e.end}else{var a;if(!(a=this.$findOpeningBracket(o[2],t)))return null;e=r.fromPoints(a,t),i||(e.start.column++,e.end.column--),e.cursor=e.start}return e},this.getMatchingBracketRanges=function(t){var e=this.getLine(t.row),n=e.charAt(t.column-1),i=n&&n.match(/([\(\[\{])|([\)\]\}])/);if(i||(n=e.charAt(t.column),t={row:t.row,column:t.column+1},i=n&&n.match(/([\(\[\{])|([\)\]\}])/)),!i)return null;var s=new r(t.row,t.column-1,t.row,t.column),o=i[1]?this.$findClosingBracket(i[1],t):this.$findOpeningBracket(i[2],t);return o?[s,new r(o.row,o.column,o.row,o.column+1)]:[s]},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{","<":">",">":"<"},this.$findOpeningBracket=function(t,e,n){var r=this.$brackets[t],s=1,o=new i(this,e.row,e.column),a=o.getCurrentToken();if(a||(a=o.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end)\b/,"(?:start|begin|end)")+")+"));for(var l=e.column-o.getCurrentTokenColumn()-2,c=a.value;;){for(;l>=0;){var u=c.charAt(l);if(u==r){if(0==(s-=1))return{row:o.getCurrentTokenRow(),column:l+o.getCurrentTokenColumn()}}else u==t&&(s+=1);l-=1}do{a=o.stepBackward()}while(a&&!n.test(a.type));if(null==a)break;l=(c=a.value).length-1}return null}},this.$findClosingBracket=function(t,e,n){var r=this.$brackets[t],s=1,o=new i(this,e.row,e.column),a=o.getCurrentToken();if(a||(a=o.stepForward()),a){n||(n=new RegExp("(\\.?"+a.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:start|begin)\b/,"(?:start|begin|end)")+")+"));for(var l=e.column-o.getCurrentTokenColumn();;){for(var c=a.value,u=c.length;ln&&(this.$docRowCache.splice(n,e),this.$screenRowCache.splice(n,e))},this.$getRowCacheIndex=function(t,e){for(var n=0,i=t.length-1;n<=i;){var r=n+i>>1,s=t[r];if(e>s)n=r+1;else{if(!(e=e);s++);return(n=i[s])?(n.index=s,n.start=r-n.value.length,n):null},this.setUndoManager=function(t){if(this.$undoManager=t,this.$informUndoManager&&this.$informUndoManager.cancel(),t){var e=this;t.addSession(this),this.$syncInformUndoManager=function(){e.$informUndoManager.cancel(),e.mergeUndoDeltas=!1},this.$informUndoManager=r.delayedCall(this.$syncInformUndoManager)}else this.$syncInformUndoManager=function(){}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},hasUndo:function(){},hasRedo:function(){},reset:function(){},add:function(){},addSelection:function(){},startNewGroup:function(){},addSession:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?r.stringRepeat(" ",this.getTabSize()):"\t"},this.setUseSoftTabs=function(t){this.setOption("useSoftTabs",t)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(t){this.setOption("tabSize",t)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(t){return this.$useSoftTabs&&t.column%this.$tabSize==0},this.setNavigateWithinSoftTabs=function(t){this.setOption("navigateWithinSoftTabs",t)},this.getNavigateWithinSoftTabs=function(){return this.$navigateWithinSoftTabs},this.$overwrite=!1,this.setOverwrite=function(t){this.setOption("overwrite",t)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(t,e){this.$decorations[t]||(this.$decorations[t]=""),this.$decorations[t]+=" "+e,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(t,e){this.$decorations[t]=(this.$decorations[t]||"").replace(" "+e,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(t){this.$breakpoints=[];for(var e=0;e0&&(i=!!n.charAt(e-1).match(this.tokenRe)),i||(i=!!n.charAt(e).match(this.tokenRe)),i)var r=this.tokenRe;else r=/^\s+$/.test(n.slice(e-1,e+1))?/\s/:this.nonTokenRe;var s=e;if(s>0){do{s--}while(s>=0&&n.charAt(s).match(r));s++}for(var o=e;ot&&(t=e.screenWidth)}),this.lineWidgetWidth=t},this.$computeWidth=function(t){if(this.$modified||t){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var e=this.doc.getAllLines(),n=this.$rowLengthCache,i=0,r=0,s=this.$foldData[r],o=s?s.start.row:1/0,a=e.length,l=0;lo){if((l=s.end.row+1)>=a)break;o=(s=this.$foldData[r++])?s.start.row:1/0}null==n[l]&&(n[l]=this.$getStringScreenWidth(e[l])[0]),n[l]>i&&(i=n[l])}this.screenWidth=i}},this.getLine=function(t){return this.doc.getLine(t)},this.getLines=function(t,e){return this.doc.getLines(t,e)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(t){return this.doc.getTextRange(t||this.selection.getRange())},this.insert=function(t,e){return this.doc.insert(t,e)},this.remove=function(t){return this.doc.remove(t)},this.removeFullLines=function(t,e){return this.doc.removeFullLines(t,e)},this.undoChanges=function(t,e){if(t.length){this.$fromUndo=!0;for(var n=t.length-1;-1!=n;n--){var i=t[n];"insert"==i.action||"remove"==i.action?this.doc.revertDelta(i):i.folds&&this.addFolds(i.folds)}!e&&this.$undoSelect&&(t.selectionBefore?this.selection.fromJSON(t.selectionBefore):this.selection.setRange(this.$getUndoSelection(t,!0))),this.$fromUndo=!1}},this.redoChanges=function(t,e){if(t.length){this.$fromUndo=!0;for(var n=0;nt.end.column&&(s.start.column+=c),s.end.row==t.end.row&&s.end.column>t.end.column&&(s.end.column+=c)),l&&s.start.row>=t.end.row&&(s.start.row+=l,s.end.row+=l)),s.end=this.insert(s.start,i),r.length){var o=t.start,a=s.start,l=a.row-o.row,c=a.column-o.column;this.addFolds(r.map(function(t){return(t=t.clone()).start.row==o.row&&(t.start.column+=c),t.end.row==o.row&&(t.end.column+=c),t.start.row+=l,t.end.row+=l,t}))}return s},this.indentRows=function(t,e,n){n=n.replace(/\t/g,this.getTabString());for(var i=t;i<=e;i++)this.doc.insertInLine({row:i,column:0},n)},this.outdentRows=function(t){for(var e=t.collapseRows(),n=new u(0,0,0,0),i=this.getTabSize(),r=e.start.row;r<=e.end.row;++r){var s=this.getLine(r);n.start.row=r,n.end.row=r;for(var o=0;o0){var r;if((r=this.getRowFoldEnd(e+n))>this.doc.getLength()-1)return 0;i=r-e}else t=this.$clipRowToDocument(t),i=(e=this.$clipRowToDocument(e))-t+1;var s=new u(t,0,e,Number.MAX_VALUE),o=this.getFoldsInRange(s).map(function(t){return(t=t.clone()).start.row+=i,t.end.row+=i,t}),a=0==n?this.doc.getLines(t,e):this.doc.removeFullLines(t,e);return this.doc.insertFullLines(t+i,a),o.length&&this.addFolds(o),i},this.moveLinesUp=function(t,e){return this.$moveLines(t,e,-1)},this.moveLinesDown=function(t,e){return this.$moveLines(t,e,1)},this.duplicateLines=function(t,e){return this.$moveLines(t,e,0)},this.$clipRowToDocument=function(t){return Math.max(0,Math.min(t,this.doc.getLength()-1))},this.$clipColumnToRow=function(t,e){return e<0?0:Math.min(this.doc.getLine(t).length,e)},this.$clipPositionToDocument=function(t,e){if(e=Math.max(0,e),t<0)t=0,e=0;else{var n=this.doc.getLength();t>=n?(t=n-1,e=this.doc.getLine(n-1).length):e=Math.min(this.doc.getLine(t).length,e)}return{row:t,column:e}},this.$clipRangeToDocument=function(t){t.start.row<0?(t.start.row=0,t.start.column=0):t.start.column=this.$clipColumnToRow(t.start.row,t.start.column);var e=this.doc.getLength()-1;return t.end.row>e?(t.end.row=e,t.end.column=this.doc.getLine(e).length):t.end.column=this.$clipColumnToRow(t.end.row,t.end.column),t},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(t){if(t!=this.$useWrapMode){if(this.$useWrapMode=t,this.$modified=!0,this.$resetRowCache(0),t){var e=this.getLength();this.$wrapData=Array(e),this.$updateWrapData(0,e-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(t,e){this.$wrapLimitRange.min===t&&this.$wrapLimitRange.max===e||(this.$wrapLimitRange={min:t,max:e},this.$modified=!0,this.$bidiHandler.markAsDirty(),this.$useWrapMode&&this._signal("changeWrapMode"))},this.adjustWrapLimit=function(t,e){var n=this.$wrapLimitRange;n.max<0&&(n={min:e,max:e});var i=this.$constrainWrapLimit(t,n.min,n.max);return i!=this.$wrapLimit&&i>1&&(this.$wrapLimit=i,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0)},this.$constrainWrapLimit=function(t,e,n){return e&&(t=Math.max(e,t)),n&&(t=Math.min(n,t)),t},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(t){this.setWrapLimitRange(t,t)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(t){var e=this.$useWrapMode,n=t.action,i=t.start,r=t.end,s=i.row,o=r.row,a=o-s,l=null;if(this.$updating=!0,0!=a)if("remove"===n){this[e?"$wrapData":"$rowLengthCache"].splice(s,a);var c=this.$foldData;l=this.getFoldsInRange(t),this.removeFolds(l);var u=0;if(g=this.getFoldLine(r.row)){g.addRemoveChars(r.row,r.column,i.column-r.column),g.shiftRow(-a);var h=this.getFoldLine(s);h&&h!==g&&(h.merge(g),g=h),u=c.indexOf(g)+1}for(;u=r.row&&g.shiftRow(-a);o=s}else{var d=Array(a);d.unshift(s,0);var f=e?this.$wrapData:this.$rowLengthCache;if(f.splice.apply(f,d),c=this.$foldData,u=0,g=this.getFoldLine(s)){var p=g.range.compareInside(i.row,i.column);0==p?(g=g.split(i.row,i.column))&&(g.shiftRow(a),g.addRemoveChars(o,0,r.column-i.column)):-1==p&&(g.addRemoveChars(s,0,r.column-i.column),g.shiftRow(a)),u=c.indexOf(g)+1}for(;u=s&&g.shiftRow(a)}}else a=Math.abs(t.start.column-t.end.column),"remove"===n&&(l=this.getFoldsInRange(t),this.removeFolds(l),a=-a),(g=this.getFoldLine(s))&&g.addRemoveChars(s,i.column,a);return e&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,e?this.$updateWrapData(s,o):this.$updateRowLengthCache(s,o),l},this.$updateRowLengthCache=function(t,e,n){this.$rowLengthCache[t]=null,this.$rowLengthCache[e]=null},this.$updateWrapData=function(n,i){var r,s,o=this.doc.getAllLines(),a=this.getTabSize(),l=this.$wrapData,c=this.$wrapLimit,u=n;for(i=Math.min(i,o.length-1);u<=i;)(s=this.getFoldLine(u,s))?(r=[],s.walk((function(n,i,s,a){var l;if(null!=n){(l=this.$getDisplayTokens(n,r.length))[0]=t;for(var c=1;c=4352&&t<=4447||t>=4515&&t<=4519||t>=4602&&t<=4607||t>=9001&&t<=9002||t>=11904&&t<=11929||t>=11931&&t<=12019||t>=12032&&t<=12245||t>=12272&&t<=12283||t>=12288&&t<=12350||t>=12353&&t<=12438||t>=12441&&t<=12543||t>=12549&&t<=12589||t>=12593&&t<=12686||t>=12688&&t<=12730||t>=12736&&t<=12771||t>=12784&&t<=12830||t>=12832&&t<=12871||t>=12880&&t<=13054||t>=13056&&t<=19903||t>=19968&&t<=42124||t>=42128&&t<=42182||t>=43360&&t<=43388||t>=44032&&t<=55203||t>=55216&&t<=55238||t>=55243&&t<=55291||t>=63744&&t<=64255||t>=65040&&t<=65049||t>=65072&&t<=65106||t>=65108&&t<=65126||t>=65128&&t<=65131||t>=65281&&t<=65376||t>=65504&&t<=65510)}this.$computeWrapSplits=function(n,i,r){if(0==n.length)return[];var s=[],o=n.length,a=0,l=0,c=this.$wrapAsCode,u=this.$indentedSoftWrap,h=i<=Math.max(2*r,8)||!1===u?0:Math.floor(i/2);function d(t){for(var e=t-a,i=a;ii-f;){var p=a+i-f;if(n[p-1]>=10&&n[p]>=10)d(p);else if(n[p]!=t&&n[p]!=e){for(var g=Math.max(p-(i-(i>>2)),a-1);p>g&&n[p]g&&n[p]g&&9==n[p];)p--}else for(;p>g&&n[p]<10;)p--;p>g?d(++p):(2==n[p=a+i]&&p--,d(p-f))}else{for(;p!=a-1&&n[p]!=t;p--);if(p>a){d(p);continue}for(p=a+i;p39&&o<48||o>57&&o<64?r.push(9):o>=4352&&n(o)?r.push(1,2):r.push(1)}return r},this.$getStringScreenWidth=function(t,e,i){if(0==e)return[0,0];var r,s;for(null==e&&(e=1/0),i=i||0,s=0;s=4352&&n(r)?i+=2:i+=1,!(i>e));s++);return[i,s]},this.lineWidgets=null,this.getRowLength=function(t){var e=1;return this.lineWidgets&&(e+=this.lineWidgets[t]&&this.lineWidgets[t].rowCount||0),this.$useWrapMode&&this.$wrapData[t]?this.$wrapData[t].length+e:e},this.getRowLineCount=function(t){return this.$useWrapMode&&this.$wrapData[t]?this.$wrapData[t].length+1:1},this.getRowWrapIndent=function(t){if(this.$useWrapMode){var e=this.screenToDocumentPosition(t,Number.MAX_VALUE),n=this.$wrapData[e.row];return n.length&&n[0]=0){a=c[u],s=this.$docRowCache[u];var d=t>c[h-1]}else d=!h;for(var f=this.getLength()-1,p=this.getNextFoldLine(s),g=p?p.start.row:1/0;a<=t&&!(a+(l=this.getRowLength(s))>t||s>=f);)a+=l,++s>g&&(g=(p=this.getNextFoldLine(s=p.end.row+1,p))?p.start.row:1/0),d&&(this.$docRowCache.push(s),this.$screenRowCache.push(a));if(p&&p.start.row<=s)i=this.getFoldDisplayLine(p),s=p.start.row;else{if(a+l<=t||s>f)return{row:f,column:this.getLine(f).length};i=this.getLine(s),p=null}var m=0,v=Math.floor(t-a);if(this.$useWrapMode){var y=this.$wrapData[s];y&&(r=y[v],v>0&&y.length&&(m=y.indent,i=i.substring(o=y[v-1]||y[y.length-1])))}return void 0!==n&&this.$bidiHandler.isBidiRow(a+v,s,v)&&(e=this.$bidiHandler.offsetToCol(n)),o+=this.$getStringScreenWidth(i,e-m)[1],this.$useWrapMode&&o>=r&&(o=r-1),p?p.idxToPosition(o):{row:s,column:o}},this.documentToScreenPosition=function(t,e){if(void 0===e)var n=this.$clipPositionToDocument(t.row,t.column);else n=this.$clipPositionToDocument(t,e);var i,r=0,s=null;(i=this.getFoldAt(t=n.row,e=n.column,1))&&(t=i.start.row,e=i.start.column);var o,a=0,l=this.$docRowCache,c=this.$getRowCacheIndex(l,t),u=l.length;if(u&&c>=0){a=l[c],r=this.$screenRowCache[c];var h=t>l[u-1]}else h=!u;for(var d=this.getNextFoldLine(a),f=d?d.start.row:1/0;a=f){if((o=d.end.row+1)>t)break;f=(d=this.getNextFoldLine(o,d))?d.start.row:1/0}else o=a+1;r+=this.getRowLength(a),a=o,h&&(this.$docRowCache.push(a),this.$screenRowCache.push(r))}var p="";d&&a>=f?(p=this.getFoldDisplayLine(d,t,e),s=d.start.row):(p=this.getLine(t).substring(0,e),s=t);var g=0;if(this.$useWrapMode){var m=this.$wrapData[s];if(m){for(var v=0;p.length>=m[v];)r++,v++;p=p.substring(m[v-1]||0,p.length),g=v>0?m.indent:0}}return this.lineWidgets&&this.lineWidgets[a]&&this.lineWidgets[a].rowsAbove&&(r+=this.lineWidgets[a].rowsAbove),{row:r,column:g+this.$getStringScreenWidth(p)[0]}},this.documentToScreenColumn=function(t,e){return this.documentToScreenPosition(t,e).column},this.documentToScreenRow=function(t,e){return this.documentToScreenPosition(t,e).row},this.getScreenLength=function(){var t=0,e=null;if(this.$useWrapMode)for(var n=this.$wrapData.length,i=0,r=(a=0,(e=this.$foldData[a++])?e.start.row:1/0);ir&&(i=e.end.row+1,r=(e=this.$foldData[a++])?e.start.row:1/0)}else{t=this.getLength();for(var o=this.$foldData,a=0;an);s++);return[i,s]})},this.destroy=function(){this.bgTokenizer&&(this.bgTokenizer.setDocument(null),this.bgTokenizer=null),this.$stopWorker(),this.removeAllListeners(),this.selection.detach()},this.isFullWidth=n}).call(p.prototype),t("./edit_session/folding").Folding.call(p.prototype),t("./edit_session/bracket_match").BracketMatch.call(p.prototype),o.defineOptions(p.prototype,"session",{wrap:{set:function(t){if(t&&"off"!=t?"free"==t?t=!0:"printMargin"==t?t=-1:"string"==typeof t&&(t=parseInt(t,10)||!1):t=!1,this.$wrap!=t)if(this.$wrap=t,t){var e="number"==typeof t?t:null;this.setWrapLimitRange(e,e),this.setUseWrapMode(!0)}else this.setUseWrapMode(!1)},get:function(){return this.getUseWrapMode()?-1==this.$wrap?"printMargin":this.getWrapLimitRange().min?this.$wrap:"free":"off"},handlesSet:!0},wrapMethod:{set:function(t){(t="auto"==t?"text"!=this.$mode.type:"text"!=t)!=this.$wrapAsCode&&(this.$wrapAsCode=t,this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0)))},initialValue:"auto"},indentedSoftWrap:{set:function(){this.$useWrapMode&&(this.$useWrapMode=!1,this.setUseWrapMode(!0))},initialValue:!0},firstLineNumber:{set:function(){this._signal("changeBreakpoint")},initialValue:1},useWorker:{set:function(t){this.$useWorker=t,this.$stopWorker(),t&&this.$startWorker()},initialValue:!0},useSoftTabs:{initialValue:!0},tabSize:{set:function(t){(t=parseInt(t))>0&&this.$tabSize!==t&&(this.$modified=!0,this.$rowLengthCache=[],this.$tabSize=t,this._signal("changeTabSize"))},initialValue:4,handlesSet:!0},navigateWithinSoftTabs:{initialValue:!1},foldStyle:{set:function(t){this.setFoldStyle(t)},handlesSet:!0},overwrite:{set:function(t){this._signal("changeOverwrite")},initialValue:!1},newLineMode:{set:function(t){this.doc.setNewLineMode(t)},get:function(){return this.doc.getNewLineMode()},handlesSet:!0},mode:{set:function(t){this.setMode(t)},get:function(){return this.$modeId},handlesSet:!0}}),e.EditSession=p}),ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(t,e,n){"use strict";var i=t("./lib/lang"),r=t("./lib/oop"),s=t("./range").Range,o=function(){this.$options={}};(function(){this.set=function(t){return r.mixin(this.$options,t),this},this.getOptions=function(){return i.copyObject(this.$options)},this.setOptions=function(t){this.$options=t},this.find=function(t){var e=this.$options,n=this.$matchIterator(t,e);if(!n)return!1;var i=null;return n.forEach(function(t,n,r,o){return i=new s(t,n,r,o),!(n==o&&e.start&&e.start.start&&0!=e.skipCurrent&&i.isEqual(e.start)&&(i=null,1))}),i},this.findAll=function(t){var e=this.$options;if(!e.needle)return[];this.$assembleRegExp(e);var n=e.range,r=n?t.getLines(n.start.row,n.end.row):t.doc.getAllLines(),o=[],a=e.re;if(e.$isMultiLine){var l,c=a.length,u=r.length-c;t:for(var h=a.offset||0;h<=u;h++){for(var d=0;dg||(o.push(l=new s(h,g,h+c-1,m)),c>2&&(h=h+c-2))}}else for(var v=0;vx&&o[d].end.row==n.end.row;)d--;for(o=o.slice(v,d+1),v=0,d=o.length;v=a;n--)if(h(n,Number.MAX_VALUE,t))return;if(0!=e.wrap)for(n=l,a=o.row;n>=a;n--)if(h(n,Number.MAX_VALUE,t))return}};else c=function(t){var n=o.row;if(!h(n,o.column,t)){for(n+=1;n<=l;n++)if(h(n,0,t))return;if(0!=e.wrap)for(n=a,l=o.row;n<=l;n++)if(h(n,0,t))return}};if(e.$isMultiLine)var u=n.length,h=function(e,r,s){var o=i?e-u+1:e;if(!(o<0)){var a=t.getLine(o),l=a.search(n[0]);if(!(!i&&lr))return!!s(o,l,o+u-1,h)||void 0}}};else h=i?function(e,i,r){var s,o=t.getLine(e),a=[],l=0;for(n.lastIndex=0;s=n.exec(o);){if(l=s.index,!(u=s[0].length)){if(l>=o.length)break;n.lastIndex=l+=1}if(s.index+u>i)break;a.push(s.index,u)}for(var c=a.length-1;c>=0;c-=2){var u,h=a[c-1];if(r(e,h,e,h+(u=a[c])))return!0}}:function(e,i,r){var s,o,a=t.getLine(e);for(n.lastIndex=i;o=n.exec(a);){var l=o[0].length;if(r(e,s=o.index,e,s+l))return!0;if(!l&&(n.lastIndex=s+=1,s>=a.length))return!1}};return{forEach:c}}}).call(o.prototype),e.Search=o}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(t,e,n){"use strict";var i=t("../lib/keys"),r=t("../lib/useragent"),s=i.KEY_MODS;function o(t,e){this.platform=e||(r.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(t),this.$singleCommand=!0}function a(t,e){o.call(this,t,e),this.$singleCommand=!1}a.prototype=o.prototype,(function(){function t(t){return"object"==typeof t&&t.bindKey&&t.bindKey.position||(t.isDefault?-100:0)}this.addCommand=function(t){this.commands[t.name]&&this.removeCommand(t),this.commands[t.name]=t,t.bindKey&&this._buildKeyHash(t)},this.removeCommand=function(t,e){var n=t&&("string"==typeof t?t:t.name);t=this.commands[n],e||delete this.commands[n];var i=this.commandKeyBinding;for(var r in i){var s=i[r];if(s==t)delete i[r];else if(Array.isArray(s)){var o=s.indexOf(t);-1!=o&&(s.splice(o,1),1==s.length&&(i[r]=s[0]))}}},this.bindKey=function(t,e,n){if("object"==typeof t&&t&&(null==n&&(n=t.position),t=t[this.platform]),t)return"function"==typeof e?this.addCommand({exec:e,bindKey:t,name:e.name||t}):void t.split("|").forEach(function(t){var i="";if(-1!=t.indexOf(" ")){var r=t.split(/\s+/);t=r.pop(),r.forEach(function(t){var e=this.parseKeys(t);this._addCommandToBinding(i+=(i?" ":"")+(s[e.hashId]+e.key),"chainKeys")},this),i+=" "}var o=this.parseKeys(t);this._addCommandToBinding(i+(s[o.hashId]+o.key),e,n)},this)},this._addCommandToBinding=function(e,n,i){var r,s=this.commandKeyBinding;if(n)if(!s[e]||this.$singleCommand)s[e]=n;else{Array.isArray(s[e])?-1!=(r=s[e].indexOf(n))&&s[e].splice(r,1):s[e]=[s[e]],"number"!=typeof i&&(i=t(n));var o=s[e];for(r=0;ri);r++);o.splice(r,0,n)}else delete s[e]},this.addCommands=function(t){t&&Object.keys(t).forEach(function(e){var n=t[e];if(n){if("string"==typeof n)return this.bindKey(n,e);"function"==typeof n&&(n={exec:n}),"object"==typeof n&&(n.name||(n.name=e),this.addCommand(n))}},this)},this.removeCommands=function(t){Object.keys(t).forEach(function(e){this.removeCommand(t[e])},this)},this.bindKeys=function(t){Object.keys(t).forEach(function(e){this.bindKey(e,t[e])},this)},this._buildKeyHash=function(t){this.bindKey(t.bindKey,t)},this.parseKeys=function(t){var e=t.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(t){return t}),n=e.pop(),r=i[n];if(i.FUNCTION_KEYS[r])n=i.FUNCTION_KEYS[r].toLowerCase();else{if(!e.length)return{key:n,hashId:-1};if(1==e.length&&"shift"==e[0])return{key:n.toUpperCase(),hashId:-1}}for(var s=0,o=e.length;o--;){var a=i.KEY_MODS[e[o]];if(null==a)return"undefined"!=typeof console&&console.error("invalid modifier "+e[o]+" in "+t),!1;s|=a}return{key:n,hashId:s}},this.findKeyCommand=function(t,e){return this.commandKeyBinding[s[t]+e]},this.handleKeyboard=function(t,e,n,i){if(!(i<0)){var r=s[e]+n,o=this.commandKeyBinding[r];return t.$keyChain&&(t.$keyChain+=" "+r,o=this.commandKeyBinding[t.$keyChain]||o),!o||"chainKeys"!=o&&"chainKeys"!=o[o.length-1]?(t.$keyChain&&(e&&4!=e||1!=n.length?(-1==e||i>0)&&(t.$keyChain=""):t.$keyChain=t.$keyChain.slice(0,-r.length-1)),{command:o}):(t.$keyChain=t.$keyChain||r,{command:"null"})}},this.getStatusText=function(t,e){return e.$keyChain||""}}).call(o.prototype),e.HashHandler=o,e.MultiHashHandler=a}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(t,e,n){"use strict";var i=t("../lib/oop"),r=t("../keyboard/hash_handler").MultiHashHandler,s=t("../lib/event_emitter").EventEmitter,o=function(t,e){r.call(this,e,t),this.byName=this.commands,this.setDefaultHandler("exec",function(t){return t.command.exec(t.editor,t.args||{})})};i.inherits(o,r),(function(){i.implement(this,s),this.exec=function(t,e,n){if(Array.isArray(t)){for(var i=t.length;i--;)if(this.exec(t[i],e,n))return!0;return!1}if("string"==typeof t&&(t=this.commands[t]),!t)return!1;if(e&&e.$readOnly&&!t.readOnly)return!1;if(0!=this.$checkCommandState&&t.isAvailable&&!t.isAvailable(e))return!1;var r={editor:e,command:t,args:n};return r.returnValue=this._emit("exec",r),this._signal("afterExec",r),!1!==r.returnValue},this.toggleRecording=function(t){if(!this.$inReplay)return t&&t._emit("changeStatus"),this.recording?(this.macro.pop(),this.off("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=(function(t){this.macro.push([t.command,t.args])}).bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0)},this.replay=function(t){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(t);try{this.$inReplay=!0,this.macro.forEach(function(e){"string"==typeof e?this.exec(e,t):this.exec(e[0],t,e[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(t){return t.map(function(t){return"string"!=typeof t[0]&&(t[0]=t[0].name),t[1]||(t=t[0]),t})}}).call(o.prototype),e.CommandManager=o}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(t,e,n){"use strict";var i=t("../lib/lang"),r=t("../config"),s=t("../range").Range;function o(t,e){return{win:t,mac:e}}e.commands=[{name:"showSettingsMenu",bindKey:o("Ctrl-,","Command-,"),exec:function(t){r.loadModule("ace/ext/settings_menu",function(e){e.init(t),t.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:o("Alt-E","F4"),exec:function(t){r.loadModule("./ext/error_marker",function(e){e.showErrorMarker(t,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:o("Alt-Shift-E","Shift-F4"),exec:function(t){r.loadModule("./ext/error_marker",function(e){e.showErrorMarker(t,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",description:"Select all",bindKey:o("Ctrl-A","Command-A"),exec:function(t){t.selectAll()},readOnly:!0},{name:"centerselection",description:"Center selection",bindKey:o(null,"Ctrl-L"),exec:function(t){t.centerSelection()},readOnly:!0},{name:"gotoline",description:"Go to line...",bindKey:o("Ctrl-L","Command-L"),exec:function(t,e){"number"!=typeof e||isNaN(e)||t.gotoLine(e),t.prompt({$type:"gotoLine"})},readOnly:!0},{name:"fold",bindKey:o("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(t){t.session.toggleFold(!1)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:o("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(t){t.session.toggleFold(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:o("F2","F2"),exec:function(t){t.session.toggleFoldWidget()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:o("Alt-F2","Alt-F2"),exec:function(t){t.session.toggleFoldWidget(!0)},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"foldall",description:"Fold all",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(t){t.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldAllComments",description:"Fold all comments",bindKey:o(null,"Ctrl-Command-Option-0"),exec:function(t){t.session.foldAllComments()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",description:"Fold other",bindKey:o("Alt-0","Command-Option-0"),exec:function(t){t.session.foldAll(),t.session.unfold(t.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",description:"Unfold all",bindKey:o("Alt-Shift-0","Command-Option-Shift-0"),exec:function(t){t.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",description:"Find next",bindKey:o("Ctrl-K","Command-G"),exec:function(t){t.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",description:"Find previous",bindKey:o("Ctrl-Shift-K","Command-Shift-G"),exec:function(t){t.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",description:"Select or find next",bindKey:o("Alt-K","Ctrl-G"),exec:function(t){t.selection.isEmpty()?t.selection.selectWord():t.findNext()},readOnly:!0},{name:"selectOrFindPrevious",description:"Select or find previous",bindKey:o("Alt-Shift-K","Ctrl-Shift-G"),exec:function(t){t.selection.isEmpty()?t.selection.selectWord():t.findPrevious()},readOnly:!0},{name:"find",description:"Find",bindKey:o("Ctrl-F","Command-F"),exec:function(t){r.loadModule("ace/ext/searchbox",function(e){e.Search(t)})},readOnly:!0},{name:"overwrite",description:"Overwrite",bindKey:"Insert",exec:function(t){t.toggleOverwrite()},readOnly:!0},{name:"selecttostart",description:"Select to start",bindKey:o("Ctrl-Shift-Home","Command-Shift-Home|Command-Shift-Up"),exec:function(t){t.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",description:"Go to start",bindKey:o("Ctrl-Home","Command-Home|Command-Up"),exec:function(t){t.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",description:"Select up",bindKey:o("Shift-Up","Shift-Up|Ctrl-Shift-P"),exec:function(t){t.getSelection().selectUp()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golineup",description:"Go line up",bindKey:o("Up","Up|Ctrl-P"),exec:function(t,e){t.navigateUp(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttoend",description:"Select to end",bindKey:o("Ctrl-Shift-End","Command-Shift-End|Command-Shift-Down"),exec:function(t){t.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",description:"Go to end",bindKey:o("Ctrl-End","Command-End|Command-Down"),exec:function(t){t.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",description:"Select down",bindKey:o("Shift-Down","Shift-Down|Ctrl-Shift-N"),exec:function(t){t.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",description:"Go line down",bindKey:o("Down","Down|Ctrl-N"),exec:function(t,e){t.navigateDown(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",description:"Select word left",bindKey:o("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(t){t.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",description:"Go to word left",bindKey:o("Ctrl-Left","Option-Left"),exec:function(t){t.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",description:"Select to line start",bindKey:o("Alt-Shift-Left","Command-Shift-Left|Ctrl-Shift-A"),exec:function(t){t.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",description:"Go to line start",bindKey:o("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(t){t.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",description:"Select left",bindKey:o("Shift-Left","Shift-Left|Ctrl-Shift-B"),exec:function(t){t.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",description:"Go to left",bindKey:o("Left","Left|Ctrl-B"),exec:function(t,e){t.navigateLeft(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",description:"Select word right",bindKey:o("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(t){t.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",description:"Go to word right",bindKey:o("Ctrl-Right","Option-Right"),exec:function(t){t.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",description:"Select to line end",bindKey:o("Alt-Shift-Right","Command-Shift-Right|Shift-End|Ctrl-Shift-E"),exec:function(t){t.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",description:"Go to line end",bindKey:o("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(t){t.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",description:"Select right",bindKey:o("Shift-Right","Shift-Right"),exec:function(t){t.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",description:"Go to right",bindKey:o("Right","Right|Ctrl-F"),exec:function(t,e){t.navigateRight(e.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",description:"Select page down",bindKey:"Shift-PageDown",exec:function(t){t.selectPageDown()},readOnly:!0},{name:"pagedown",description:"Page down",bindKey:o(null,"Option-PageDown"),exec:function(t){t.scrollPageDown()},readOnly:!0},{name:"gotopagedown",description:"Go to page down",bindKey:o("PageDown","PageDown|Ctrl-V"),exec:function(t){t.gotoPageDown()},readOnly:!0},{name:"selectpageup",description:"Select page up",bindKey:"Shift-PageUp",exec:function(t){t.selectPageUp()},readOnly:!0},{name:"pageup",description:"Page up",bindKey:o(null,"Option-PageUp"),exec:function(t){t.scrollPageUp()},readOnly:!0},{name:"gotopageup",description:"Go to page up",bindKey:"PageUp",exec:function(t){t.gotoPageUp()},readOnly:!0},{name:"scrollup",description:"Scroll up",bindKey:o("Ctrl-Up",null),exec:function(t){t.renderer.scrollBy(0,-2*t.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",description:"Scroll down",bindKey:o("Ctrl-Down",null),exec:function(t){t.renderer.scrollBy(0,2*t.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",description:"Select line start",bindKey:"Shift-Home",exec:function(t){t.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",description:"Select line end",bindKey:"Shift-End",exec:function(t){t.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",description:"Toggle recording",bindKey:o("Ctrl-Alt-E","Command-Option-E"),exec:function(t){t.commands.toggleRecording(t)},readOnly:!0},{name:"replaymacro",description:"Replay macro",bindKey:o("Ctrl-Shift-E","Command-Shift-E"),exec:function(t){t.commands.replay(t)},readOnly:!0},{name:"jumptomatching",description:"Jump to matching",bindKey:o("Ctrl-\\|Ctrl-P","Command-\\"),exec:function(t){t.jumpToMatching()},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"selecttomatching",description:"Select to matching",bindKey:o("Ctrl-Shift-\\|Ctrl-Shift-P","Command-Shift-\\"),exec:function(t){t.jumpToMatching(!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"expandToMatching",description:"Expand to matching",bindKey:o("Ctrl-Shift-M","Ctrl-Shift-M"),exec:function(t){t.jumpToMatching(!0,!0)},multiSelectAction:"forEach",scrollIntoView:"animate",readOnly:!0},{name:"passKeysToBrowser",description:"Pass keys to browser",bindKey:o(null,null),exec:function(){},passEvent:!0,readOnly:!0},{name:"copy",description:"Copy",exec:function(t){},readOnly:!0},{name:"cut",description:"Cut",exec:function(t){var e=t.$copyWithEmptySelection&&t.selection.isEmpty()?t.selection.getLineRange():t.selection.getRange();t._emit("cut",e),e.isEmpty()||t.session.remove(e),t.clearSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"paste",description:"Paste",exec:function(t,e){t.$handlePaste(e)},scrollIntoView:"cursor"},{name:"removeline",description:"Remove line",bindKey:o("Ctrl-D","Command-D"),exec:function(t){t.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",description:"Duplicate selection",bindKey:o("Ctrl-Shift-D","Command-Shift-D"),exec:function(t){t.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",description:"Sort lines",bindKey:o("Ctrl-Alt-S","Command-Alt-S"),exec:function(t){t.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",description:"Toggle comment",bindKey:o("Ctrl-/","Command-/"),exec:function(t){t.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",description:"Toggle block comment",bindKey:o("Ctrl-Shift-/","Command-Shift-/"),exec:function(t){t.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",description:"Modify number up",bindKey:o("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(t){t.modifyNumber(1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"modifyNumberDown",description:"Modify number down",bindKey:o("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(t){t.modifyNumber(-1)},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"replace",description:"Replace",bindKey:o("Ctrl-H","Command-Option-F"),exec:function(t){r.loadModule("ace/ext/searchbox",function(e){e.Search(t,!0)})}},{name:"undo",description:"Undo",bindKey:o("Ctrl-Z","Command-Z"),exec:function(t){t.undo()}},{name:"redo",description:"Redo",bindKey:o("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(t){t.redo()}},{name:"copylinesup",description:"Copy lines up",bindKey:o("Alt-Shift-Up","Command-Option-Up"),exec:function(t){t.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",description:"Move lines up",bindKey:o("Alt-Up","Option-Up"),exec:function(t){t.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",description:"Copy lines down",bindKey:o("Alt-Shift-Down","Command-Option-Down"),exec:function(t){t.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",description:"Move lines down",bindKey:o("Alt-Down","Option-Down"),exec:function(t){t.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",description:"Delete",bindKey:o("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(t){t.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",description:"Backspace",bindKey:o("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(t){t.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",description:"Cut or delete",bindKey:o("Shift-Delete",null),exec:function(t){if(!t.selection.isEmpty())return!1;t.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",description:"Remove to line start",bindKey:o("Alt-Backspace","Command-Backspace"),exec:function(t){t.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",description:"Remove to line end",bindKey:o("Alt-Delete","Ctrl-K|Command-Delete"),exec:function(t){t.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestarthard",description:"Remove to line start hard",bindKey:o("Ctrl-Shift-Backspace",null),exec:function(t){var e=t.selection.getRange();e.start.column=0,t.session.remove(e)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineendhard",description:"Remove to line end hard",bindKey:o("Ctrl-Shift-Delete",null),exec:function(t){var e=t.selection.getRange();e.end.column=Number.MAX_VALUE,t.session.remove(e)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",description:"Remove word left",bindKey:o("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(t){t.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",description:"Remove word right",bindKey:o("Ctrl-Delete","Alt-Delete"),exec:function(t){t.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",description:"Outdent",bindKey:o("Shift-Tab","Shift-Tab"),exec:function(t){t.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",description:"Indent",bindKey:o("Tab","Tab"),exec:function(t){t.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",description:"Block outdent",bindKey:o("Ctrl-[","Ctrl-["),exec:function(t){t.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",description:"Block indent",bindKey:o("Ctrl-]","Ctrl-]"),exec:function(t){t.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",description:"Insert string",exec:function(t,e){t.insert(e)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",description:"Insert text",exec:function(t,e){t.insert(i.stringRepeat(e.text||"",e.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",description:"Split line",bindKey:o(null,"Ctrl-O"),exec:function(t){t.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",description:"Transpose letters",bindKey:o("Alt-Shift-X","Ctrl-T"),exec:function(t){t.transposeLetters()},multiSelectAction:function(t){t.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",description:"To uppercase",bindKey:o("Ctrl-U","Ctrl-U"),exec:function(t){t.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",description:"To lowercase",bindKey:o("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(t){t.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"autoindent",description:"Auto Indent",bindKey:o(null,null),exec:function(t){t.autoIndent()},multiSelectAction:"forEachLine",scrollIntoView:"animate"},{name:"expandtoline",description:"Expand to line",bindKey:o("Ctrl-Shift-L","Command-Shift-L"),exec:function(t){var e=t.selection.getRange();e.start.column=e.end.column=0,e.end.row++,t.selection.setRange(e,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",description:"Join lines",bindKey:o(null,null),exec:function(t){for(var e=t.selection.isBackwards(),n=e?t.selection.getSelectionLead():t.selection.getSelectionAnchor(),r=e?t.selection.getSelectionAnchor():t.selection.getSelectionLead(),o=t.session.doc.getLine(n.row).length,a=t.session.doc.getTextRange(t.selection.getRange()).replace(/\n\s*/," ").length,l=t.session.doc.getLine(n.row),c=n.row+1;c<=r.row+1;c++){var u=i.stringTrimLeft(i.stringTrimRight(t.session.doc.getLine(c)));0!==u.length&&(u=" "+u),l+=u}r.row+10?(t.selection.moveCursorTo(n.row,n.column),t.selection.selectTo(n.row,n.column+a)):(o=t.session.doc.getLine(n.row).length>o?o+1:o,t.selection.moveCursorTo(n.row,o))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",description:"Invert selection",bindKey:o(null,null),exec:function(t){var e=t.session.doc.getLength()-1,n=t.session.doc.getLine(e).length,i=t.selection.rangeList.ranges,r=[];i.length<1&&(i=[t.selection.getRange()]);for(var o=0;o=r.lastRow||i.end.row<=r.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==n&&this.renderer.animateScrolling(this.curOp.scrollTop)}var s=this.selection.toJSON();this.curOp.selectionAfter=s,this.$lastSel=this.selection.toJSON(),this.session.getUndoManager().addSelection(s),this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(t){if(this.$mergeUndoDeltas){var e=this.prevOp,n=this.$mergeableCommands,i=e.command&&t.command.name==e.command.name;if("insertstring"==t.command.name){var r=t.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),i=i&&this.mergeNextCommand&&(!/\s/.test(r)||/\s/.test(e.args)),this.mergeNextCommand=!0}else i=i&&-1!==n.indexOf(t.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(i=!1),i?this.session.mergeUndoDeltas=!0:-1!==n.indexOf(t.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(t,e){if(t&&"string"==typeof t&&"ace"!=t){this.$keybindingId=t;var n=this;v.loadModule(["keybinding",t],function(i){n.$keybindingId==t&&n.keyBinding.setKeyboardHandler(i&&i.handler),e&&e()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(t),e&&e()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(t){if(this.session!=t){this.curOp&&this.endOperation(),this.curOp={};var e=this.session;if(e){this.session.off("change",this.$onDocumentChange),this.session.off("changeMode",this.$onChangeMode),this.session.off("tokenizerUpdate",this.$onTokenizerUpdate),this.session.off("changeTabSize",this.$onChangeTabSize),this.session.off("changeWrapLimit",this.$onChangeWrapLimit),this.session.off("changeWrapMode",this.$onChangeWrapMode),this.session.off("changeFold",this.$onChangeFold),this.session.off("changeFrontMarker",this.$onChangeFrontMarker),this.session.off("changeBackMarker",this.$onChangeBackMarker),this.session.off("changeBreakpoint",this.$onChangeBreakpoint),this.session.off("changeAnnotation",this.$onChangeAnnotation),this.session.off("changeOverwrite",this.$onCursorChange),this.session.off("changeScrollTop",this.$onScrollTopChange),this.session.off("changeScrollLeft",this.$onScrollLeftChange);var n=this.session.getSelection();n.off("changeCursor",this.$onCursorChange),n.off("changeSelection",this.$onSelectionChange)}this.session=t,t?(this.$onDocumentChange=this.onDocumentChange.bind(this),t.on("change",this.$onDocumentChange),this.renderer.setSession(t),this.$onChangeMode=this.onChangeMode.bind(this),t.on("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),t.on("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),t.on("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),t.on("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),t.on("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),t.on("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.on("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.on("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.on("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.on("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.on("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.on("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.on("changeScrollLeft",this.$onScrollLeftChange),this.selection=t.getSelection(),this.selection.on("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.on("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(t)),this._signal("changeSession",{session:t,oldSession:e}),this.curOp=null,e&&e._signal("changeEditor",{oldEditor:this}),t&&t._signal("changeEditor",{editor:this}),t&&t.bgTokenizer&&t.bgTokenizer.scheduleStart()}},this.getSession=function(){return this.session},this.setValue=function(t,e){return this.session.doc.setValue(t),e?1==e?this.navigateFileEnd():-1==e&&this.navigateFileStart():this.selectAll(),t},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(t){this.renderer.onResize(t)},this.setTheme=function(t,e){this.renderer.setTheme(t,e)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(t){this.renderer.setStyle(t)},this.unsetStyle=function(t){this.renderer.unsetStyle(t)},this.getFontSize=function(){return this.getOption("fontSize")||r.computedStyle(this.container).fontSize},this.setFontSize=function(t){this.setOption("fontSize",t)},this.$highlightBrackets=function(){if(!this.$highlightPending){var t=this;this.$highlightPending=!0,setTimeout(function(){t.$highlightPending=!1;var e=t.session;if(e&&e.bgTokenizer){e.$bracketHighlight&&(e.$bracketHighlight.markerIds.forEach(function(t){e.removeMarker(t)}),e.$bracketHighlight=null);var n=e.getMatchingBracketRanges(t.getCursorPosition());if(!n&&e.$mode.getMatching&&(n=e.$mode.getMatching(t.session)),n){var i="ace_bracket";Array.isArray(n)?1==n.length&&(i="ace_error_bracket"):n=[n],2==n.length&&(0==f.comparePoints(n[0].end,n[1].start)?n=[f.fromPoints(n[0].start,n[1].end)]:0==f.comparePoints(n[0].start,n[1].end)&&(n=[f.fromPoints(n[1].start,n[0].end)])),e.$bracketHighlight={ranges:n,markerIds:n.map(function(t){return e.addMarker(t,i,"text")})}}}},50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var t=this;this.$highlightTagPending=!0,setTimeout(function(){t.$highlightTagPending=!1;var e=t.session;if(e&&e.bgTokenizer){var n=t.getCursorPosition(),i=new y(t.session,n.row,n.column),r=i.getCurrentToken();if(!r||!/\b(?:tag-open|tag-name)/.test(r.type))return e.removeMarker(e.$tagHighlight),void(e.$tagHighlight=null);if(-1===r.type.indexOf("tag-open")||(r=i.stepForward())){var s=r.value,o=r.value,a=0,l=i.stepBackward();if("<"===l.value)do{l=r,(r=i.stepForward())&&(-1!==r.type.indexOf("tag-name")?s===(o=r.value)&&("<"===l.value?a++:""===r.value&&a--)}while(r&&a>=0);else{do{if(r=l,l=i.stepBackward(),r)if(-1!==r.type.indexOf("tag-name"))s===r.value&&("<"===l.value?a++:""===r.value){for(var c=0,u=l;u;){if(-1!==u.type.indexOf("tag-name")&&u.value===s){a--;break}if("<"===u.value)break;u=i.stepBackward(),c++}for(var h=0;h1||(t=!1)),e.$highlightLineMarker&&!t)e.removeMarker(e.$highlightLineMarker.id),e.$highlightLineMarker=null;else if(!e.$highlightLineMarker&&t){var n=new f(t.row,t.column,t.row,1/0);n.id=e.addMarker(n,"ace_active-line","screenLine"),e.$highlightLineMarker=n}else t&&(e.$highlightLineMarker.start.row=t.row,e.$highlightLineMarker.end.row=t.row,e.$highlightLineMarker.start.column=t.column,e._signal("changeBackMarker"))},this.onSelectionChange=function(t){var e=this.session;if(e.$selectionMarker&&e.removeMarker(e.$selectionMarker),e.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var n=this.selection.getRange(),i=this.getSelectionStyle();e.$selectionMarker=e.addMarker(n,"ace_selection",i)}var r=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(r),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var t=this.session,e=this.getSelectionRange();if(!e.isEmpty()&&!e.isMultiLine()){var n=e.start.column,i=e.end.column,r=t.getLine(e.start.row),s=r.substring(n,i);if(!(s.length>5e3)&&/[\w\d]/.test(s)){var o=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:s}),a=r.substring(n-1,i+1);if(o.test(a))return o}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(t){this.renderer.updateText(),this._emit("changeMode",t)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var t=this.getSelectedText(),e=this.session.doc.getNewLineCharacter(),n=!1;if(!t&&this.$copyWithEmptySelection){n=!0;for(var i=this.selection.getAllRanges(),r=0;ra.search(/\S|$/)){var l=a.substr(r.column).search(/\S|$/);n.doc.removeInLine(r.row,r.column,r.column+l)}}this.clearSelection();var c=r.column,u=n.getState(r.row),h=(a=n.getLine(r.row),i.checkOutdent(u,a,t));if(n.insert(r,t),s&&s.selection&&this.selection.setSelectionRange(2==s.selection.length?new f(r.row,c+s.selection[0],r.row,c+s.selection[1]):new f(r.row+s.selection[0],s.selection[1],r.row+s.selection[2],s.selection[3])),this.$enableAutoIndent){if(n.getDocument().isNewLine(t)){var d=i.getNextLineIndent(u,a.slice(0,r.column),n.getTabString());n.insert({row:r.row+1,column:0},d)}h&&i.autoOutdent(u,n,r.row)}},this.autoIndent=function(){var t,e,n=this.session,i=n.getMode();if(this.selection.isEmpty())t=0,e=n.doc.getLength()-1;else{var r=this.getSelectionRange();t=r.start.row,e=r.end.row}for(var s,o,a,l="",c="",u="",h=n.getTabString(),d=t;d<=e;d++)d>0&&(l=n.getState(d-1),c=n.getLine(d-1),u=i.getNextLineIndent(l,c,h)),s=n.getLine(d),u!==(o=i.$getIndent(s))&&(o.length>0&&(a=new f(d,0,d,o.length),n.remove(a)),u.length>0&&n.insert({row:d,column:0},u)),i.autoOutdent(l,n,d)},this.onTextInput=function(t,e){if(!e)return this.keyBinding.onTextInput(t);this.startOperation({command:{name:"insertstring"}});var n=this.applyComposition.bind(this,t,e);this.selection.rangeCount?this.forEachSelection(n):n(),this.endOperation()},this.applyComposition=function(t,e){var n;(e.extendLeft||e.extendRight)&&((n=this.selection.getRange()).start.column-=e.extendLeft,n.end.column+=e.extendRight,n.start.column<0&&(n.start.row--,n.start.column+=this.session.getLine(n.start.row).length+1),this.selection.setRange(n),t||n.isEmpty()||this.remove()),!t&&this.selection.isEmpty()||this.insert(t,!0),(e.restoreStart||e.restoreEnd)&&((n=this.selection.getRange()).start.column-=e.restoreStart,n.end.column-=e.restoreEnd,this.selection.setRange(n))},this.onCommandKey=function(t,e,n){return this.keyBinding.onCommandKey(t,e,n)},this.setOverwrite=function(t){this.session.setOverwrite(t)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(t){this.setOption("scrollSpeed",t)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(t){this.setOption("dragDelay",t)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(t){this.setOption("selectionStyle",t)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(t){this.setOption("highlightActiveLine",t)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(t){this.setOption("highlightGutterLine",t)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(t){this.setOption("highlightSelectedWord",t)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(t){this.renderer.setAnimatedScroll(t)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(t){this.renderer.setShowInvisibles(t)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(t){this.renderer.setDisplayIndentGuides(t)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(t){this.renderer.setShowPrintMargin(t)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(t){this.renderer.setPrintMarginColumn(t)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(t){this.setOption("readOnly",t)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(t){this.setOption("behavioursEnabled",t)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(t){this.setOption("wrapBehavioursEnabled",t)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(t){this.setOption("showFoldWidgets",t)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(t){this.setOption("fadeFoldWidgets",t)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(t){this.selection.isEmpty()&&("left"==t?this.selection.selectLeft():this.selection.selectRight());var e=this.getSelectionRange();if(this.getBehavioursEnabled()){var n=this.session,i=n.getState(e.start.row),r=n.getMode().transformAction(i,"deletion",this,n,e);if(0===e.end.column){var s=n.getTextRange(e);if("\n"==s[s.length-1]){var o=n.getLine(e.end.row);/^\s+$/.test(o)&&(e.end.column=o.length)}}r&&(e=r)}this.session.remove(e),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.selection.isEmpty()&&this.selection.selectLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var t=this.getSelectionRange();t.start.column==t.end.column&&t.start.row==t.end.row&&(t.end.column=0,t.end.row++),this.session.remove(t),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var t=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(t)},this.transposeLetters=function(){if(this.selection.isEmpty()){var t=this.getCursorPosition(),e=t.column;if(0!==e){var n,i,r=this.session.getLine(t.row);ee.toLowerCase()?1:0});var r=new f(0,0,0,0);for(i=t.first;i<=t.last;i++){var s=e.getLine(i);r.start.row=i,r.end.row=i,r.end.column=s.length,e.replace(r,n[i-t.first])}},this.toggleCommentLines=function(){var t=this.session.getState(this.getCursorPosition().row),e=this.$getSelectedRows();this.session.getMode().toggleCommentLines(t,this.session,e.first,e.last)},this.toggleBlockComment=function(){var t=this.getCursorPosition(),e=this.session.getState(t.row),n=this.getSelectionRange();this.session.getMode().toggleBlockComment(e,this.session,n,t)},this.getNumberAt=function(t,e){var n=/[\-]?[0-9]+(?:\.[0-9]+)?/g;n.lastIndex=0;for(var i=this.session.getLine(t);n.lastIndex=e)return{value:r[0],start:r.index,end:r.index+r[0].length}}return null},this.modifyNumber=function(t){var e=this.selection.getCursor().row,n=this.selection.getCursor().column,i=new f(e,n-1,e,n),r=this.session.getTextRange(i);if(!isNaN(parseFloat(r))&&isFinite(r)){var s=this.getNumberAt(e,n);if(s){var o=s.value.indexOf(".")>=0?s.start+s.value.indexOf(".")+1:s.end,a=s.start+s.value.length-o,l=parseFloat(s.value);l*=Math.pow(10,a),l+=t*=o!==s.end&&n=a&&o<=l&&(n=e,c.selection.clearSelection(),c.moveCursorTo(t,a+i),c.selection.selectTo(t,l+i)),a=l});for(var u,h=this.$toggleWordPairs,d=0;df+1)break;f=p.last}for(u--,a=this.session.$moveLines(d,f,e?0:t),e&&-1==t&&(h=u+1);h<=u;)o[h].moveBy(a,0),h++;e||(a=0),l+=a}r.fromOrientedRange(r.ranges[0]),r.rangeList.attach(this.session),this.inVirtualSelectionMode=!1}},this.$getSelectedRows=function(t){return t=(t||this.getSelectionRange()).collapseRows(),{first:this.session.getRowFoldStart(t.start.row),last:this.session.getRowFoldEnd(t.end.row)}},this.onCompositionStart=function(t){this.renderer.showComposition(t)},this.onCompositionUpdate=function(t){this.renderer.setCompositionText(t)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(t){return t>=this.getFirstVisibleRow()&&t<=this.getLastVisibleRow()},this.isRowFullyVisible=function(t){return t>=this.renderer.getFirstFullyVisibleRow()&&t<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(t,e){var n=this.renderer,i=this.renderer.layerConfig,r=t*Math.floor(i.height/i.lineHeight);!0===e?this.selection.$moveSelection(function(){this.moveCursorBy(r,0)}):!1===e&&(this.selection.moveCursorBy(r,0),this.selection.clearSelection());var s=n.scrollTop;n.scrollBy(0,r*i.lineHeight),null!=e&&n.scrollCursorIntoView(null,.5),n.animateScrolling(s)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(t){this.renderer.scrollToRow(t)},this.scrollToLine=function(t,e,n,i){this.renderer.scrollToLine(t,e,n,i)},this.centerSelection=function(){var t=this.getSelectionRange(),e={row:Math.floor(t.start.row+(t.end.row-t.start.row)/2),column:Math.floor(t.start.column+(t.end.column-t.start.column)/2)};this.renderer.alignCursor(e,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.selection.selectAll()},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(t,e){this.selection.moveCursorTo(t,e)},this.moveCursorToPosition=function(t){this.selection.moveCursorToPosition(t)},this.jumpToMatching=function(t,e){var n=this.getCursorPosition(),i=new y(this.session,n.row,n.column),r=i.getCurrentToken(),s=r||i.stepForward();if(s){var o,a,l=!1,c={},u=n.column-s.start,h={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(s.value.match(/[{}()\[\]]/g)){for(;u=0;--s)this.$tryReplace(n[s],t)&&i++;return this.selection.setSelectionRange(r),i},this.$tryReplace=function(t,e){var n=this.session.getTextRange(t);return null!==(e=this.$search.replace(n,e))?(t.end=this.session.replace(t,e),t):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(t,e,n){e||(e={}),"string"==typeof t||t instanceof RegExp?e.needle=t:"object"==typeof t&&i.mixin(e,t);var r=this.selection.getRange();null==e.needle&&((t=this.session.getTextRange(r)||this.$search.$options.needle)||(r=this.session.getWordRange(r.start.row,r.start.column),t=this.session.getTextRange(r)),this.$search.set({needle:t})),this.$search.set(e),e.start||this.$search.set({start:r});var s=this.$search.find(this.session);return e.preventScroll?s:s?(this.revealRange(s,n),s):(e.backwards?r.start=r.end:r.end=r.start,void this.selection.setRange(r))},this.findNext=function(t,e){this.find({skipCurrent:!0,backwards:!1},t,e)},this.findPrevious=function(t,e){this.find(t,{skipCurrent:!0,backwards:!0},e)},this.revealRange=function(t,e){this.session.unfold(t),this.selection.setSelectionRange(t);var n=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(t.start,t.end,.5),!1!==e&&this.renderer.animateScrolling(n)},this.undo=function(){this.session.getUndoManager().undo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.session.getUndoManager().redo(this.session),this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.$toDestroy&&(this.$toDestroy.forEach(function(t){t.destroy()}),this.$toDestroy=null),this.$mouseHandler&&this.$mouseHandler.destroy(),this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy(),this._$emitInputEvent&&this._$emitInputEvent.cancel(),this.removeAllListeners()},this.setAutoScrollEditorIntoView=function(t){if(t){var e,n=this,i=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var r=this.$scrollAnchor;r.style.cssText="position:absolute",this.container.insertBefore(r,this.container.firstChild);var s=this.on("changeSelection",function(){i=!0}),o=this.renderer.on("beforeRender",function(){i&&(e=n.renderer.container.getBoundingClientRect())}),a=this.renderer.on("afterRender",function(){if(i&&e&&(n.isFocused()||n.searchBox&&n.searchBox.isFocused())){var t=n.renderer,s=t.$cursorLayer.$pixelPos,o=t.layerConfig,a=s.top-o.offset;null!=(i=s.top>=0&&a+e.top<0||!(s.topwindow.innerHeight)&&null)&&(r.style.top=a+"px",r.style.left=s.left+"px",r.style.height=o.lineHeight+"px",r.scrollIntoView(i)),i=e=null}});this.setAutoScrollEditorIntoView=function(t){t||(delete this.setAutoScrollEditorIntoView,this.off("changeSelection",s),this.renderer.off("afterRender",a),this.renderer.off("beforeRender",o))}}},this.$resetCursorStyle=function(){var t=this.$cursorStyle||"ace",e=this.renderer.$cursorLayer;e&&(e.setSmoothBlinking(/smooth/.test(t)),e.isBlinking=!this.$readOnly&&"wide"!=t,r.setCssClass(e.element,"ace_slim-cursors",/slim/.test(t)))},this.prompt=function(t,e,n){var i=this;v.loadModule("./ext/prompt",function(r){r.prompt(i,t,e,n)})}}).call(w.prototype),v.defineOptions(w.prototype,"editor",{selectionStyle:{set:function(t){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:t})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(t){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(t){this.textInput.setReadOnly(t),this.$resetCursorStyle()},initialValue:!1},copyWithEmptySelection:{set:function(t){this.textInput.setCopyWithEmptySelection(t)},initialValue:!1},cursorStyle:{set:function(t){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},enableAutoIndent:{initialValue:!0},autoScrollEditorIntoView:{set:function(t){this.setAutoScrollEditorIntoView(t)}},keyboardHandler:{set:function(t){this.setKeyboardHandler(t)},get:function(){return this.$keybindingId},handlesSet:!0},value:{set:function(t){this.session.setValue(t)},get:function(){return this.getValue()},handlesSet:!0,hidden:!0},session:{set:function(t){this.setSession(t)},get:function(){return this.session},handlesSet:!0,hidden:!0},showLineNumbers:{set:function(t){this.renderer.$gutterLayer.setShowLineNumbers(t),this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER),t&&this.$relativeLineNumbers?x.attach(this):x.detach(this)},initialValue:!0},relativeLineNumbers:{set:function(t){this.$showLineNumbers&&t?x.attach(this):x.detach(this)}},placeholder:{set:function(t){this.$updatePlaceholder||(this.$updatePlaceholder=(function(){var t=this.session&&(this.renderer.$composition||this.getValue());if(t&&this.renderer.placeholderNode)this.renderer.off("afterRender",this.$updatePlaceholder),r.removeCssClass(this.container,"ace_hasPlaceholder"),this.renderer.placeholderNode.remove(),this.renderer.placeholderNode=null;else if(t||this.renderer.placeholderNode)!t&&this.renderer.placeholderNode&&(this.renderer.placeholderNode.textContent=this.$placeholder||"");else{this.renderer.on("afterRender",this.$updatePlaceholder),r.addCssClass(this.container,"ace_hasPlaceholder");var e=r.createElement("div");e.className="ace_placeholder",e.textContent=this.$placeholder||"",this.renderer.placeholderNode=e,this.renderer.content.appendChild(this.renderer.placeholderNode)}}).bind(this),this.on("input",this.$updatePlaceholder)),this.$updatePlaceholder()}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",displayIndentGuides:"renderer",showGutter:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",hasCssTransforms:"renderer",maxPixelHeight:"renderer",useTextareaForIME:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimeout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",navigateWithinSoftTabs:"session",tabSize:"session",wrap:"session",indentedSoftWrap:"session",foldStyle:"session",mode:"session"});var x={getText:function(t,e){return(Math.abs(t.selection.lead.row-e)||e+1+(e<9?"\xb7":""))+""},getWidth:function(t,e,n){return Math.max(e.toString().length,(n.lastRow+1).toString().length,2)*n.characterWidth},update:function(t,e){e.renderer.$loop.schedule(e.renderer.CHANGE_GUTTER)},attach:function(t){t.renderer.$gutterLayer.$renderer=this,t.on("changeSelection",this.update),this.update(null,t)},detach:function(t){t.renderer.$gutterLayer.$renderer==this&&(t.renderer.$gutterLayer.$renderer=null),t.off("changeSelection",this.update),this.update(null,t)}};e.Editor=w}),ace.define("ace/undomanager",["require","exports","module","ace/range"],function(t,e,n){"use strict";var i=function(){this.$maxRev=0,this.$fromUndo=!1,this.reset()};(function(){this.addSession=function(t){this.$session=t},this.add=function(t,e,n){this.$fromUndo||t!=this.$lastDelta&&(this.$keepRedoStack||(this.$redoStack.length=0),!1!==e&&this.lastDeltas||(this.lastDeltas=[],this.$undoStack.push(this.lastDeltas),t.id=this.$rev=++this.$maxRev),"remove"!=t.action&&"insert"!=t.action||(this.$lastDelta=t),this.lastDeltas.push(t))},this.addSelection=function(t,e){this.selections.push({value:t,rev:e||this.$rev})},this.startNewGroup=function(){return this.lastDeltas=null,this.$rev},this.markIgnored=function(t,e){null==e&&(e=this.$rev+1);for(var n=this.$undoStack,i=n.length;i--;){var r=n[i][0];if(r.id<=t)break;r.id0},this.canRedo=function(){return this.$redoStack.length>0},this.bookmark=function(t){null==t&&(t=this.$rev),this.mark=t},this.isAtBookmark=function(){return this.$rev===this.mark},this.toJSON=function(){},this.fromJSON=function(){},this.hasUndo=this.canUndo,this.hasRedo=this.canRedo,this.isClean=this.isAtBookmark,this.markClean=this.bookmark,this.$prettyPrint=function(t){return t?a(t):a(this.$undoStack)+"\n---\n"+a(this.$redoStack)}}).call(i.prototype);var r=t("./range").Range,s=r.comparePoints;function o(t){return{row:t.row,column:t.column}}function a(t){if(t=t||this,Array.isArray(t))return t.map(a).join("\n");var e="";return t.action?(e="insert"==t.action?"+":"-",e+="["+t.lines+"]"):t.value&&(e=Array.isArray(t.value)?t.value.map(l).join("\n"):l(t.value)),t.start&&(e+=l(t)),(t.id||t.rev)&&(e+="\t("+(t.id||t.rev)+")"),e}function l(t){return t.start.row+":"+t.start.column+"=>"+t.end.row+":"+t.end.column}function c(t,e){var n="insert"==t.action,i="insert"==e.action;if(n&&i)if(s(e.start,t.end)>=0)d(e,t,-1);else{if(!(s(e.start,t.start)<=0))return null;d(t,e,1)}else if(n&&!i)if(s(e.start,t.end)>=0)d(e,t,-1);else{if(!(s(e.end,t.start)<=0))return null;d(t,e,-1)}else if(!n&&i)if(s(e.start,t.start)>=0)d(e,t,1);else{if(!(s(e.start,t.start)<=0))return null;d(t,e,1)}else if(!n&&!i)if(s(e.start,t.start)>=0)d(e,t,1);else{if(!(s(e.end,t.start)<=0))return null;d(t,e,-1)}return[e,t]}function u(t,e){for(var n=t.length;n--;)for(var i=0;i=0?d(t,e,-1):(s(t.start,e.start)<=0||d(t,r.fromPoints(e.start,t.start),-1),d(e,t,1));else if(!n&&i)s(e.start,t.end)>=0?d(e,t,-1):(s(e.start,t.start)<=0||d(e,r.fromPoints(t.start,e.start),-1),d(t,e,1));else if(!n&&!i)if(s(e.start,t.end)>=0)d(e,t,-1);else{var o,a;if(!(s(e.end,t.start)<=0))return s(t.start,e.start)<0&&(o=t,t=p(t,e.start)),s(t.end,e.end)>0&&(a=p(t,e.end)),f(e.end,t.start,t.end,-1),a&&!o&&(t.lines=a.lines,t.start=a.start,t.end=a.end,a=t),[e,o,a].filter(Boolean);d(t,e,-1)}return[e,t]}function d(t,e,n){f(t.start,e.start,e.end,n),f(t.end,e.start,e.end,n)}function f(t,e,n,i){t.row==(1==i?e:n).row&&(t.column+=i*(n.column-e.column)),t.row+=i*(n.row-e.row)}function p(t,e){var n=t.lines,i=t.end;t.end=o(e);var r=t.end.row-t.start.row,s=n.splice(r,n.length),a=r?e.column:e.column-t.start.column;return n.push(s[0].substring(0,a)),s[0]=s[0].substr(a),{start:o(e),end:i,lines:s,action:t.action}}function g(t,e){e=function(t){return{start:o(t.start),end:o(t.end),action:t.action,lines:t.lines.slice()}}(e);for(var n=t.length;n--;){for(var i=t[n],r=0;rs&&(s=(r=e.getNextFoldLine(l=r.end.row+1,r))?r.start.row:1/0),l>i){for(;this.$lines.getLength()>a+1;)this.$lines.pop();break}(o=this.$lines.get(++a))?o.row=l:(o=this.$lines.createCell(l,t,this.session,c),this.$lines.push(o)),this.$renderCell(o,t,r,l),l++}this._signal("afterRender"),this.$updateGutterWidth(t)},this.$updateGutterWidth=function(t){var e=this.session,n=e.gutterRenderer||this.$renderer,i=e.$firstLineNumber,r=this.$lines.last()?this.$lines.last().text:"";(this.$fixedWidth||e.$useWrapMode)&&(r=e.getLength()+i-1);var s=n?n.getWidth(e,r,t):r.toString().length*t.characterWidth,o=this.$padding||this.$computePadding();(s+=o.left+o.right)===this.gutterWidth||isNaN(s)||(this.gutterWidth=s,this.element.parentNode.style.width=this.element.style.width=Math.ceil(this.gutterWidth)+"px",this._signal("changeGutterWidth",s))},this.$updateCursorRow=function(){if(this.$highlightGutterLine){var t=this.session.selection.getCursor();this.$cursorRow!==t.row&&(this.$cursorRow=t.row)}},this.updateLineHighlight=function(){if(this.$highlightGutterLine){var t=this.session.selection.cursor.row;if(this.$cursorRow=t,!this.$cursorCell||this.$cursorCell.row!=t){this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ",""));var e=this.$lines.cells;this.$cursorCell=null;for(var n=0;n=this.$cursorRow){if(i.row>this.$cursorRow){var r=this.session.getFoldLine(this.$cursorRow);if(!(n>0&&r&&r.start.row==e[n-1].row))break;i=e[n-1]}i.element.className="ace_gutter-active-line "+i.element.className,this.$cursorCell=i;break}}}}},this.scrollLines=function(t){var e=this.config;if(this.config=t,this.$updateCursorRow(),this.$lines.pageChanged(e,t))return this.update(t);this.$lines.moveContainer(t);var n=Math.min(t.lastRow+t.gutterOffset,this.session.getLength()-1),i=this.oldLastRow;if(this.oldLastRow=n,!e||i0;r--)this.$lines.shift();if(i>n)for(r=this.session.getFoldedRowCount(n+1,i);r>0;r--)this.$lines.pop();t.firstRowi&&this.$lines.push(this.$renderLines(t,i+1,n)),this.updateLineHighlight(),this._signal("afterRender"),this.$updateGutterWidth(t)},this.$renderLines=function(t,e,n){for(var i=[],r=e,s=this.session.getNextFoldLine(r),o=s?s.start.row:1/0;r>o&&(o=(s=this.session.getNextFoldLine(r=s.end.row+1,s))?s.start.row:1/0),!(r>n);){var a=this.$lines.createCell(r,t,this.session,c);this.$renderCell(a,t,s,r),i.push(a),r++}return i},this.$renderCell=function(t,e,n,r){var s=t.element,o=this.session,a=s.childNodes[0],l=s.childNodes[1],c=o.$firstLineNumber,u=o.$breakpoints,h=o.$decorations,d=o.gutterRenderer||this.$renderer,f=this.$showFoldWidgets&&o.foldWidgets,p=n?n.start.row:Number.MAX_VALUE,g="ace_gutter-cell ";if(this.$highlightGutterLine&&(r==this.$cursorRow||n&&r=p&&this.$cursorRow<=n.end.row)&&(g+="ace_gutter-active-line ",this.$cursorCell!=t&&(this.$cursorCell&&(this.$cursorCell.element.className=this.$cursorCell.element.className.replace("ace_gutter-active-line ","")),this.$cursorCell=t)),u[r]&&(g+=u[r]),h[r]&&(g+=h[r]),this.$annotations[r]&&(g+=this.$annotations[r].className),s.className!=g&&(s.className=g),f){var m=f[r];null==m&&(m=f[r]=o.getFoldWidget(r))}m?(g="ace_fold-widget ace_"+m,l.className!=(g+="start"==m&&r==p&&rn.right-e.right?"foldWidgets":void 0}}).call(l.prototype),e.Gutter=l}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(t,e,n){"use strict";var i=t("../range").Range,r=t("../lib/dom"),s=function(t){this.element=r.createElement("div"),this.element.className="ace_layer ace_marker-layer",t.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(t){this.$padding=t},this.setSession=function(t){this.session=t},this.setMarkers=function(t){this.markers=t},this.elt=function(t,e){var n=-1!=this.i&&this.element.childNodes[this.i];n?this.i++:(n=document.createElement("div"),this.element.appendChild(n),this.i=-1),n.style.cssText=e,n.className=t},this.update=function(t){if(t){var e;for(var n in this.config=t,this.i=0,this.markers){var i=this.markers[n];if(i.range){var r=i.range.clipRows(t.firstRow,t.lastRow);if(!r.isEmpty())if(r=r.toScreenRange(this.session),i.renderer){var s=this.$getTop(r.start.row,t);i.renderer(e,r,this.$padding+r.start.column*t.characterWidth,s,t)}else"fullLine"==i.type?this.drawFullLineMarker(e,r,i.clazz,t):"screenLine"==i.type?this.drawScreenLineMarker(e,r,i.clazz,t):r.isMultiLine()?"text"==i.type?this.drawTextMarker(e,r,i.clazz,t):this.drawMultiLineMarker(e,r,i.clazz,t):this.drawSingleLineMarker(e,r,i.clazz+" ace_start ace_br15",t)}else i.update(e,this,this.session,t)}if(-1!=this.i)for(;this.id?4:0)|(c==l?8:0)),r,c==l?0:1,s)},this.drawMultiLineMarker=function(t,e,n,i,r){var s,o=this.$padding,a=i.lineHeight,l=this.$getTop(e.start.row,i),c=o+e.start.column*i.characterWidth;if(r=r||"",this.session.$bidiHandler.isBidiRow(e.start.row)?((s=e.clone()).end.row=s.start.row,s.end.column=this.session.getLine(s.start.row).length,this.drawBidiSingleLineMarker(t,s,n+" ace_br1 ace_start",i,null,r)):this.elt(n+" ace_br1 ace_start","height:"+a+"px;right:0;top:"+l+"px;left:"+c+"px;"+(r||"")),this.session.$bidiHandler.isBidiRow(e.end.row)?((s=e.clone()).start.row=s.end.row,s.start.column=0,this.drawBidiSingleLineMarker(t,s,n+" ace_br12",i,null,r)):(l=this.$getTop(e.end.row,i),this.elt(n+" ace_br12","height:"+a+"px;width:"+e.end.column*i.characterWidth+"px;top:"+l+"px;left:"+o+"px;"+(r||""))),!((a=(e.end.row-e.start.row-1)*i.lineHeight)<=0)){l=this.$getTop(e.start.row+1,i);var u=(e.start.column?1:0)|(e.end.column?0:8);this.elt(n+(u?" ace_br"+u:""),"height:"+a+"px;right:0;top:"+l+"px;left:"+o+"px;"+(r||""))}},this.drawSingleLineMarker=function(t,e,n,i,r,s){if(this.session.$bidiHandler.isBidiRow(e.start.row))return this.drawBidiSingleLineMarker(t,e,n,i,r,s);var o=i.lineHeight,a=(e.end.column+(r||0)-e.start.column)*i.characterWidth,l=this.$getTop(e.start.row,i);this.elt(n,"height:"+o+"px;width:"+a+"px;top:"+l+"px;left:"+(this.$padding+e.start.column*i.characterWidth)+"px;"+(s||""))},this.drawBidiSingleLineMarker=function(t,e,n,i,r,s){var o=i.lineHeight,a=this.$getTop(e.start.row,i),l=this.$padding;this.session.$bidiHandler.getSelections(e.start.column,e.end.column).forEach(function(t){this.elt(n,"height:"+o+"px;width:"+t.width+(r||0)+"px;top:"+a+"px;left:"+(l+t.left)+"px;"+(s||""))},this)},this.drawFullLineMarker=function(t,e,n,i,r){var s=this.$getTop(e.start.row,i),o=i.lineHeight;e.start.row!=e.end.row&&(o+=this.$getTop(e.end.row,i)-s),this.elt(n,"height:"+o+"px;top:"+s+"px;left:0;right:0;"+(r||""))},this.drawScreenLineMarker=function(t,e,n,i,r){var s=this.$getTop(e.start.row,i);this.elt(n,"height:"+i.lineHeight+"px;top:"+s+"px;left:0;right:0;"+(r||""))}}).call(s.prototype),e.Marker=s}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter"],function(t,e,n){"use strict";var i=t("../lib/oop"),r=t("../lib/dom"),s=t("../lib/lang"),o=t("./lines").Lines,a=t("../lib/event_emitter").EventEmitter,l=function(t){this.dom=r,this.element=this.dom.createElement("div"),this.element.className="ace_layer ace_text-layer",t.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this),this.$lines=new o(this.element)};(function(){i.implement(this,a),this.EOF_CHAR="\xb6",this.EOL_CHAR_LF="\xac",this.EOL_CHAR_CRLF="\xa4",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="\u2014",this.SPACE_CHAR="\xb7",this.$padding=0,this.MAX_LINE_LENGTH=1e4,this.$updateEolChar=function(){var t=this.session.doc,e="\n"==t.getNewLineCharacter()&&"windows"!=t.getNewLineMode()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;if(this.EOL_CHAR!=e)return this.EOL_CHAR=e,!0},this.setPadding=function(t){this.$padding=t,this.element.style.margin="0 "+t+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(t){this.$fontMetrics=t,this.$fontMetrics.on("changeCharacterSize",(function(t){this._signal("changeCharacterSize",t)}).bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(t){this.session=t,t&&this.$computeTabString()},this.showInvisibles=!1,this.showSpaces=!1,this.showTabs=!1,this.showEOL=!1,this.setShowInvisibles=function(t){return this.showInvisibles!=t&&(this.showInvisibles=t,"string"==typeof t?(this.showSpaces=/tab/i.test(t),this.showTabs=/space/i.test(t),this.showEOL=/eol/i.test(t)):this.showSpaces=this.showTabs=this.showEOL=t,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(t){return this.displayIndentGuides!=t&&(this.displayIndentGuides=t,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var t=this.session.getTabSize();this.tabSize=t;for(var e=this.$tabStrings=[0],n=1;nu&&(u=(l=this.session.getNextFoldLine(a=l.end.row+1,l))?l.start.row:1/0),!(a>r);){var h=s[o++];if(h){this.dom.removeChildren(h),this.$renderLine(h,a,a==u&&l),c&&(h.style.top=this.$lines.computeLineTop(a,t,this.session)+"px");var d=t.lineHeight*this.session.getRowLength(a)+"px";h.style.height!=d&&(c=!0,h.style.height=d)}a++}if(c)for(;o0;i--)this.$lines.shift();if(e.lastRow>t.lastRow)for(i=this.session.getFoldedRowCount(t.lastRow+1,e.lastRow);i>0;i--)this.$lines.pop();t.firstRowe.lastRow&&this.$lines.push(this.$renderLinesFragment(t,e.lastRow+1,t.lastRow))},this.$renderLinesFragment=function(t,e,n){for(var i=[],s=e,o=this.session.getNextFoldLine(s),a=o?o.start.row:1/0;s>a&&(a=(o=this.session.getNextFoldLine(s=o.end.row+1,o))?o.start.row:1/0),!(s>n);){var l=this.$lines.createCell(s,t,this.session),c=l.element;this.dom.removeChildren(c),r.setStyle(c.style,"height",this.$lines.computeLineHeight(s,t,this.session)+"px"),r.setStyle(c.style,"top",this.$lines.computeLineTop(s,t,this.session)+"px"),this.$renderLine(c,s,s==a&&o),c.className=this.$useLineGroups()?"ace_line_group":"ace_line",i.push(l),s++}return i},this.update=function(t){this.$lines.moveContainer(t),this.config=t;for(var e=t.firstRow,n=t.lastRow,i=this.$lines;i.getLength();)i.pop();i.push(this.$renderLinesFragment(t,e,n))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(t,e,n,i){for(var r,o=this,a=/(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g,l=this.dom.createFragment(this.element),c=0;r=a.exec(i);){var u=r[1],h=r[2],d=r[3],f=r[4],p=r[5];if(o.showSpaces||!h){var g=c!=r.index?i.slice(c,r.index):"";if(c=r.index+r[0].length,g&&l.appendChild(this.dom.createTextNode(g,this.element)),u){var m=o.session.getScreenTabSize(e+r.index);l.appendChild(o.$tabStrings[m].cloneNode(!0)),e+=m-1}else h?o.showSpaces?((y=this.dom.createElement("span")).className="ace_invisible ace_invisible_space",y.textContent=s.stringRepeat(o.SPACE_CHAR,h.length),l.appendChild(y)):l.appendChild(this.com.createTextNode(h,this.element)):d?((y=this.dom.createElement("span")).className="ace_invisible ace_invisible_space ace_invalid",y.textContent=s.stringRepeat(o.SPACE_CHAR,d.length),l.appendChild(y)):f?(e+=1,(y=this.dom.createElement("span")).style.width=2*o.config.characterWidth+"px",y.className=o.showSpaces?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",y.textContent=o.showSpaces?o.SPACE_CHAR:f,l.appendChild(y)):p&&(e+=1,(y=this.dom.createElement("span")).style.width=2*o.config.characterWidth+"px",y.className="ace_cjk",y.textContent=p,l.appendChild(y))}}if(l.appendChild(this.dom.createTextNode(c?i.slice(c):i,this.element)),this.$textToken[n.type])t.appendChild(l);else{var v="ace_"+n.type.replace(/\./g," ace_"),y=this.dom.createElement("span");"fold"==n.type&&(y.style.width=n.value.length*this.config.characterWidth+"px"),y.className=v,y.appendChild(l),t.appendChild(y)}return e+i.length},this.renderIndentGuide=function(t,e,n){var i=e.search(this.$indentGuideRe);if(i<=0||i>=n)return e;if(" "==e[0]){for(var r=(i-=i%this.tabSize)/this.tabSize,s=0;s=o;)a=this.$renderToken(l,a,u,h.substring(0,o-i)),h=h.substring(o-i),i=o,l=this.$createLineElement(),t.appendChild(l),l.appendChild(this.dom.createTextNode(s.stringRepeat("\xa0",n.indent),this.element)),a=0,o=n[++r]||Number.MAX_VALUE;0!=h.length&&(i+=h.length,a=this.$renderToken(l,a,u,h))}}n[n.length-1]>this.MAX_LINE_LENGTH&&this.$renderOverflowMessage(l,a,null,"",!0)},this.$renderSimpleLine=function(t,e){var n=0,i=e[0],r=i.value;this.displayIndentGuides&&(r=this.renderIndentGuide(t,r)),r&&(n=this.$renderToken(t,n,i,r));for(var s=1;sthis.MAX_LINE_LENGTH)return this.$renderOverflowMessage(t,n,i,r);n=this.$renderToken(t,n,i,r)}},this.$renderOverflowMessage=function(t,e,n,i,r){n&&this.$renderToken(t,e,n,i.slice(0,this.MAX_LINE_LENGTH-e));var s=this.dom.createElement("span");s.className="ace_inline_button ace_keyword ace_toggle_wrap",s.textContent=r?"":"",t.appendChild(s)},this.$renderLine=function(t,e,n){if(n||0==n||(n=this.session.getFoldLine(e)),n)var i=this.$getFoldLineTokens(e,n);else i=this.session.getTokens(e);var r=t;if(i.length){var s=this.session.getRowSplitData(e);s&&s.length?(this.$renderWrappedLine(t,i,s),r=t.lastChild):(r=t,this.$useLineGroups()&&(r=this.$createLineElement(),t.appendChild(r)),this.$renderSimpleLine(r,i))}else this.$useLineGroups()&&(r=this.$createLineElement(),t.appendChild(r));if(this.showEOL&&r){n&&(e=n.end.row);var o=this.dom.createElement("span");o.className="ace_invisible ace_invisible_eol",o.textContent=e==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,r.appendChild(o)}},this.$getFoldLineTokens=function(t,e){var n=this.session,i=[],r=n.getTokens(t);return e.walk(function(t,e,s,o,a){null!=t?i.push({type:"fold",value:t}):(a&&(r=n.getTokens(e)),r.length&&function(t,e,n){for(var r=0,s=0;s+t[r].value.lengthn-e&&(o=o.substring(0,n-e)),i.push({type:t[r].type,value:o}),s=e+o.length,r+=1);sn?{type:t[r].type,value:o.substring(0,n-s)}:t[r]),s+=o.length,r+=1}}(r,o,s))},e.end.row,this.session.getLine(e.end.row).length),i},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){}}).call(l.prototype),e.Text=l}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(t,e,n){"use strict";var i=t("../lib/dom"),r=function(t){this.element=i.createElement("div"),this.element.className="ace_layer ace_cursor-layer",t.appendChild(this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),i.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateOpacity.bind(this)};(function(){this.$updateOpacity=function(t){for(var e=this.cursors,n=e.length;n--;)i.setStyle(e[n].style,"opacity",t?"":"0")},this.$startCssAnimation=function(){for(var t=this.cursors,e=t.length;e--;)t[e].style.animationDuration=this.blinkInterval+"ms";setTimeout((function(){i.addCssClass(this.element,"ace_animate-blinking")}).bind(this))},this.$stopCssAnimation=function(){i.removeCssClass(this.element,"ace_animate-blinking")},this.$padding=0,this.setPadding=function(t){this.$padding=t},this.setSession=function(t){this.session=t},this.setBlinking=function(t){t!=this.isBlinking&&(this.isBlinking=t,this.restartTimer())},this.setBlinkInterval=function(t){t!=this.blinkInterval&&(this.blinkInterval=t,this.restartTimer())},this.setSmoothBlinking=function(t){t!=this.smoothBlinking&&(this.smoothBlinking=t,i.setCssClass(this.element,"ace_smooth-blinking",t),this.$updateCursors(!0),this.restartTimer())},this.addCursor=function(){var t=i.createElement("div");return t.className="ace_cursor",this.element.appendChild(t),this.cursors.push(t),t},this.removeCursor=function(){if(this.cursors.length>1){var t=this.cursors.pop();return t.parentNode.removeChild(t),t}},this.hideCursor=function(){this.isVisible=!1,i.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,i.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var t=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.$stopCssAnimation(),this.smoothBlinking&&i.removeCssClass(this.element,"ace_smooth-blinking"),t(!0),this.isBlinking&&this.blinkInterval&&this.isVisible)if(this.smoothBlinking&&setTimeout((function(){i.addCssClass(this.element,"ace_smooth-blinking")}).bind(this)),i.HAS_CSS_ANIMATION)this.$startCssAnimation();else{var e=(function(){this.timeoutId=setTimeout(function(){t(!1)},.6*this.blinkInterval)}).bind(this);this.intervalId=setInterval(function(){t(!0),e()},this.blinkInterval),e()}else this.$stopCssAnimation()},this.getPixelPosition=function(t,e){if(!this.config||!this.session)return{left:0,top:0};t||(t=this.session.selection.getCursor());var n=this.session.documentToScreenPosition(t);return{left:this.$padding+(this.session.$bidiHandler.isBidiRow(n.row,t.row)?this.session.$bidiHandler.getPosLeft(n.column):n.column*this.config.characterWidth),top:(n.row-(e?this.config.firstRowScreen:0))*this.config.lineHeight}},this.isCursorInView=function(t,e){return t.top>=0&&t.topt.height+t.offset||o.top<0)&&n>1)){var a=this.cursors[r++]||this.addCursor(),l=a.style;this.drawCursor?this.drawCursor(a,o,t,e[n],this.session):this.isCursorInView(o,t)?(i.setStyle(l,"display","block"),i.translate(a,o.left,o.top),i.setStyle(l,"width",Math.round(t.characterWidth)+"px"),i.setStyle(l,"height",t.lineHeight+"px")):i.setStyle(l,"display","none")}}for(;this.cursors.length>r;)this.removeCursor();var c=this.session.getOverwrite();this.$setOverwrite(c),this.$pixelPos=o,this.restartTimer()},this.drawCursor=null,this.$setOverwrite=function(t){t!=this.overwrite&&(this.overwrite=t,t?i.addCssClass(this.element,"ace_overwrite-cursors"):i.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(r.prototype),e.Cursor=r}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(t,e,n){"use strict";var i=t("./lib/oop"),r=t("./lib/dom"),s=t("./lib/event"),o=t("./lib/event_emitter").EventEmitter,a=32768,l=function(t){this.element=r.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=r.createElement("div"),this.inner.className="ace_scrollbar-inner",this.inner.textContent="\xa0",this.element.appendChild(this.inner),t.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,s.addListener(this.element,"scroll",this.onScroll.bind(this)),s.addListener(this.element,"mousedown",s.preventDefault)};(function(){i.implement(this,o),this.setVisible=function(t){this.element.style.display=t?"":"none",this.isVisible=t,this.coeff=1}}).call(l.prototype);var c=function(t,e){l.call(this,t),this.scrollTop=0,this.scrollHeight=0,e.$scrollbarWidth=this.width=r.scrollbarWidth(t.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px",this.$minWidth=0};i.inherits(c,l),(function(){this.classSuffix="-v",this.onScroll=function(){if(!this.skipEvent){if(this.scrollTop=this.element.scrollTop,1!=this.coeff){var t=this.element.clientHeight/this.scrollHeight;this.scrollTop=this.scrollTop*(1-t)/(this.coeff-t)}this._emit("scroll",{data:this.scrollTop})}this.skipEvent=!1},this.getWidth=function(){return Math.max(this.isVisible?this.width:0,this.$minWidth||0)},this.setHeight=function(t){this.element.style.height=t+"px"},this.setInnerHeight=this.setScrollHeight=function(t){this.scrollHeight=t,t>a?(this.coeff=a/t,t=a):1!=this.coeff&&(this.coeff=1),this.inner.style.height=t+"px"},this.setScrollTop=function(t){this.scrollTop!=t&&(this.skipEvent=!0,this.scrollTop=t,this.element.scrollTop=t*this.coeff)}}).call(c.prototype);var u=function(t,e){l.call(this,t),this.scrollLeft=0,this.height=e.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};i.inherits(u,l),(function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(t){this.element.style.width=t+"px"},this.setInnerWidth=function(t){this.inner.style.width=t+"px"},this.setScrollWidth=function(t){this.inner.style.width=t+"px"},this.setScrollLeft=function(t){this.scrollLeft!=t&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=t)}}).call(u.prototype),e.ScrollBar=c,e.ScrollBarV=c,e.ScrollBarH=u,e.VScrollBar=c,e.HScrollBar=u}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(t,e,n){"use strict";var i=t("./lib/event"),r=function(t,e){this.onRender=t,this.pending=!1,this.changes=0,this.$recursionLimit=2,this.window=e||window;var n=this;this._flush=function(t){n.pending=!1;var e=n.changes;if(e&&(i.blockIdle(100),n.changes=0,n.onRender(e)),n.changes){if(n.$recursionLimit--<0)return;n.schedule()}else n.$recursionLimit=2}};(function(){this.schedule=function(t){this.changes=this.changes|t,this.changes&&!this.pending&&(i.nextFrame(this._flush),this.pending=!0)},this.clear=function(t){var e=this.changes;return this.changes=0,e}}).call(r.prototype),e.RenderLoop=r}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"],function(t,e,n){var i=t("../lib/oop"),r=t("../lib/dom"),s=t("../lib/lang"),o=t("../lib/event"),a=t("../lib/useragent"),l=t("../lib/event_emitter").EventEmitter,c=256,u="function"==typeof ResizeObserver,h=200,d=e.FontMetrics=function(t){this.el=r.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=r.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=r.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),t.appendChild(this.el),this.$measureNode.textContent=s.stringRepeat("X",c),this.$characterSize={width:0,height:0},u?this.$addObserver():this.checkForSizeChanges()};(function(){i.implement(this,l),this.$characterSize={width:0,height:0},this.$setMeasureNodeStyles=function(t,e){t.width=t.height="auto",t.left=t.top="0px",t.visibility="hidden",t.position="absolute",t.whiteSpace="pre",a.isIE<8?t["font-family"]="inherit":t.font="inherit",t.overflow=e?"hidden":"visible"},this.checkForSizeChanges=function(t){if(void 0===t&&(t=this.$measureSizes()),t&&(this.$characterSize.width!==t.width||this.$characterSize.height!==t.height)){this.$measureNode.style.fontWeight="bold";var e=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=t,this.charSizes=Object.create(null),this.allowBoldFonts=e&&e.width===t.width&&e.height===t.height,this._emit("changeCharacterSize",{data:t})}},this.$addObserver=function(){var t=this;this.$observer=new window.ResizeObserver(function(e){t.checkForSizeChanges()}),this.$observer.observe(this.$measureNode)},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer||this.$observer)return this.$pollSizeChangesTimer;var t=this;return this.$pollSizeChangesTimer=o.onIdle(function e(){t.checkForSizeChanges(),o.onIdle(e,500)},500)},this.setPolling=function(t){t?this.$pollSizeChanges():this.$pollSizeChangesTimer&&(clearInterval(this.$pollSizeChangesTimer),this.$pollSizeChangesTimer=0)},this.$measureSizes=function(t){var e={height:(t||this.$measureNode).clientHeight,width:(t||this.$measureNode).clientWidth/c};return 0===e.width||0===e.height?null:e},this.$measureCharWidth=function(t){return this.$main.textContent=s.stringRepeat(t,c),this.$main.getBoundingClientRect().width/c},this.getCharacterWidth=function(t){var e=this.charSizes[t];return void 0===e&&(e=this.charSizes[t]=this.$measureCharWidth(t)/this.$characterSize.width),e},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$observer&&this.$observer.disconnect(),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)},this.$getZoom=function t(e){return e&&e.parentElement?(window.getComputedStyle(e).zoom||1)*t(e.parentElement):1},this.$initTransformMeasureNodes=function(){var t=function(t,e){return["div",{style:"position: absolute;top:"+t+"px;left:"+e+"px;"}]};this.els=r.buildDom([t(0,0),t(h,0),t(0,h),t(h,h)],this.el)},this.transformCoordinates=function(t,e){function n(t,e,n){var i=t[1]*e[0]-t[0]*e[1];return[(-e[1]*n[0]+e[0]*n[1])/i,(+t[1]*n[0]-t[0]*n[1])/i]}function i(t,e){return[t[0]-e[0],t[1]-e[1]]}function r(t,e){return[t[0]+e[0],t[1]+e[1]]}function s(t,e){return[t*e[0],t*e[1]]}function o(t){var e=t.getBoundingClientRect();return[e.left,e.top]}t&&(t=s(1/this.$getZoom(this.el),t)),this.els||this.$initTransformMeasureNodes();var a=o(this.els[0]),l=o(this.els[1]),c=o(this.els[2]),u=o(this.els[3]),d=n(i(u,l),i(u,c),i(r(l,c),r(u,a))),f=s(1+d[0],i(l,a)),p=s(1+d[1],i(c,a));if(e){var g=e,m=d[0]*g[0]/h+d[1]*g[1]/h+1,v=r(s(g[0],f),s(g[1],p));return r(s(1/m/h,v),a)}var y=i(t,a),b=n(i(f,s(d[0],y)),i(p,s(d[1],y)),y);return s(h,b)}}).call(d.prototype)}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/lib/useragent"],function(t,e,n){"use strict";var i=t("./lib/oop"),r=t("./lib/dom"),s=t("./config"),o=t("./layer/gutter").Gutter,a=t("./layer/marker").Marker,l=t("./layer/text").Text,c=t("./layer/cursor").Cursor,u=t("./scrollbar").HScrollBar,h=t("./scrollbar").VScrollBar,d=t("./renderloop").RenderLoop,f=t("./layer/font_metrics").FontMetrics,p=t("./lib/event_emitter").EventEmitter,g='.ace_br1 {border-top-left-radius : 3px;}.ace_br2 {border-top-right-radius : 3px;}.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}.ace_br4 {border-bottom-right-radius: 3px;}.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}.ace_br8 {border-bottom-left-radius : 3px;}.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}.ace_editor {position: relative;overflow: hidden;padding: 0;font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace;direction: ltr;text-align: left;-webkit-tap-highlight-color: rgba(0, 0, 0, 0);}.ace_scroller {position: absolute;overflow: hidden;top: 0;bottom: 0;background-color: inherit;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;cursor: text;}.ace_content {position: absolute;box-sizing: border-box;min-width: 100%;contain: style size layout;font-variant-ligatures: no-common-ligatures;}.ace_dragging .ace_scroller:before{position: absolute;top: 0;left: 0;right: 0;bottom: 0;content: \'\';background: rgba(250, 250, 250, 0.01);z-index: 1000;}.ace_dragging.ace_dark .ace_scroller:before{background: rgba(0, 0, 0, 0.01);}.ace_selecting, .ace_selecting * {cursor: text !important;}.ace_gutter {position: absolute;overflow : hidden;width: auto;top: 0;bottom: 0;left: 0;cursor: default;z-index: 4;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;contain: style size layout;}.ace_gutter-active-line {position: absolute;left: 0;right: 0;}.ace_scroller.ace_scroll-left {box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;}.ace_gutter-cell {position: absolute;top: 0;left: 0;right: 0;padding-left: 19px;padding-right: 6px;background-repeat: no-repeat;}.ace_gutter-cell.ace_error {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: 2px center;}.ace_gutter-cell.ace_warning {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg==");background-position: 2px center;}.ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII=");background-position: 2px center;}.ace_dark .ace_gutter-cell.ace_info {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC");}.ace_scrollbar {contain: strict;position: absolute;right: 0;bottom: 0;z-index: 6;}.ace_scrollbar-inner {position: absolute;cursor: text;left: 0;top: 0;}.ace_scrollbar-v{overflow-x: hidden;overflow-y: scroll;top: 0;}.ace_scrollbar-h {overflow-x: scroll;overflow-y: hidden;left: 0;}.ace_print-margin {position: absolute;height: 100%;}.ace_text-input {position: absolute;z-index: 0;width: 0.5em;height: 1em;opacity: 0;background: transparent;-moz-appearance: none;appearance: none;border: none;resize: none;outline: none;overflow: hidden;font: inherit;padding: 0 1px;margin: 0 -1px;contain: strict;-ms-user-select: text;-moz-user-select: text;-webkit-user-select: text;user-select: text;white-space: pre!important;}.ace_text-input.ace_composition {background: transparent;color: inherit;z-index: 1000;opacity: 1;}.ace_composition_placeholder { color: transparent }.ace_composition_marker { border-bottom: 1px solid;position: absolute;border-radius: 0;margin-top: 1px;}[ace_nocontext=true] {transform: none!important;filter: none!important;clip-path: none!important;mask : none!important;contain: none!important;perspective: none!important;mix-blend-mode: initial!important;z-index: auto;}.ace_layer {z-index: 1;position: absolute;overflow: hidden;word-wrap: normal;white-space: pre;height: 100%;width: 100%;box-sizing: border-box;pointer-events: none;}.ace_gutter-layer {position: relative;width: auto;text-align: right;pointer-events: auto;height: 1000000px;contain: style size layout;}.ace_text-layer {font: inherit !important;position: absolute;height: 1000000px;width: 1000000px;contain: style size layout;}.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {contain: style size layout;position: absolute;top: 0;left: 0;right: 0;}.ace_hidpi .ace_text-layer,.ace_hidpi .ace_gutter-layer,.ace_hidpi .ace_content,.ace_hidpi .ace_gutter {contain: strict;will-change: transform;}.ace_hidpi .ace_text-layer > .ace_line, .ace_hidpi .ace_text-layer > .ace_line_group {contain: strict;}.ace_cjk {display: inline-block;text-align: center;}.ace_cursor-layer {z-index: 4;}.ace_cursor {z-index: 4;position: absolute;box-sizing: border-box;border-left: 2px solid;transform: translatez(0);}.ace_multiselect .ace_cursor {border-left-width: 1px;}.ace_slim-cursors .ace_cursor {border-left-width: 1px;}.ace_overwrite-cursors .ace_cursor {border-left-width: 0;border-bottom: 1px solid;}.ace_hidden-cursors .ace_cursor {opacity: 0.2;}.ace_hasPlaceholder .ace_hidden-cursors .ace_cursor {opacity: 0;}.ace_smooth-blinking .ace_cursor {transition: opacity 0.18s;}.ace_animate-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: step-end;animation-name: blink-ace-animate;animation-iteration-count: infinite;}.ace_animate-blinking.ace_smooth-blinking .ace_cursor {animation-duration: 1000ms;animation-timing-function: ease-in-out;animation-name: blink-ace-animate-smooth;}@keyframes blink-ace-animate {from, to { opacity: 1; }60% { opacity: 0; }}@keyframes blink-ace-animate-smooth {from, to { opacity: 1; }45% { opacity: 1; }60% { opacity: 0; }85% { opacity: 0; }}.ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {position: absolute;z-index: 3;}.ace_marker-layer .ace_selection {position: absolute;z-index: 5;}.ace_marker-layer .ace_bracket {position: absolute;z-index: 6;}.ace_marker-layer .ace_error_bracket {position: absolute;border-bottom: 1px solid #DE5555;border-radius: 0;}.ace_marker-layer .ace_active-line {position: absolute;z-index: 2;}.ace_marker-layer .ace_selected-word {position: absolute;z-index: 4;box-sizing: border-box;}.ace_line .ace_fold {box-sizing: border-box;display: inline-block;height: 11px;margin-top: -2px;vertical-align: middle;background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII=");background-repeat: no-repeat, repeat-x;background-position: center center, top left;color: transparent;border: 1px solid black;border-radius: 2px;cursor: pointer;pointer-events: auto;}.ace_dark .ace_fold {}.ace_fold:hover{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="),url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC");}.ace_tooltip {background-color: #FFF;background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));border: 1px solid gray;border-radius: 1px;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);color: black;max-width: 100%;padding: 3px 4px;position: fixed;z-index: 999999;box-sizing: border-box;cursor: default;white-space: pre;word-wrap: break-word;line-height: normal;font-style: normal;font-weight: normal;letter-spacing: normal;pointer-events: none;}.ace_folding-enabled > .ace_gutter-cell {padding-right: 13px;}.ace_fold-widget {box-sizing: border-box;margin: 0 -12px 0 1px;display: none;width: 11px;vertical-align: top;background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg==");background-repeat: no-repeat;background-position: center;border-radius: 3px;border: 1px solid transparent;cursor: pointer;}.ace_folding-enabled .ace_fold-widget {display: inline-block; }.ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg==");}.ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA==");}.ace_fold-widget:hover {border: 1px solid rgba(0, 0, 0, 0.3);background-color: rgba(255, 255, 255, 0.2);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7);}.ace_fold-widget:active {border: 1px solid rgba(0, 0, 0, 0.4);background-color: rgba(0, 0, 0, 0.05);box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);}.ace_dark .ace_fold-widget {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC");}.ace_dark .ace_fold-widget.ace_end {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget.ace_closed {background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg==");}.ace_dark .ace_fold-widget:hover {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);background-color: rgba(255, 255, 255, 0.1);}.ace_dark .ace_fold-widget:active {box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);}.ace_inline_button {border: 1px solid lightgray;display: inline-block;margin: -1px 8px;padding: 0 5px;pointer-events: auto;cursor: pointer;}.ace_inline_button:hover {border-color: gray;background: rgba(200,200,200,0.2);display: inline-block;pointer-events: auto;}.ace_fold-widget.ace_invalid {background-color: #FFB4B4;border-color: #DE5555;}.ace_fade-fold-widgets .ace_fold-widget {transition: opacity 0.4s ease 0.05s;opacity: 0;}.ace_fade-fold-widgets:hover .ace_fold-widget {transition: opacity 0.05s ease 0.05s;opacity:1;}.ace_underline {text-decoration: underline;}.ace_bold {font-weight: bold;}.ace_nobold .ace_bold {font-weight: normal;}.ace_italic {font-style: italic;}.ace_error-marker {background-color: rgba(255, 0, 0,0.2);position: absolute;z-index: 9;}.ace_highlight-marker {background-color: rgba(255, 255, 0,0.2);position: absolute;z-index: 8;}.ace_mobile-menu {position: absolute;line-height: 1.5;border-radius: 4px;-ms-user-select: none;-moz-user-select: none;-webkit-user-select: none;user-select: none;background: white;box-shadow: 1px 3px 2px grey;border: 1px solid #dcdcdc;color: black;}.ace_dark > .ace_mobile-menu {background: #333;color: #ccc;box-shadow: 1px 3px 2px grey;border: 1px solid #444;}.ace_mobile-button {padding: 2px;cursor: pointer;overflow: hidden;}.ace_mobile-button:hover {background-color: #eee;opacity:1;}.ace_mobile-button:active {background-color: #ddd;}.ace_placeholder {font-family: arial;transform: scale(0.9);transform-origin: left;white-space: pre;opacity: 0.7;margin: 0 10px;}',m=t("./lib/useragent"),v=m.isIE;r.importCssString(g,"ace_editor.css");var y=function(t,e){var n=this;this.container=t||r.createElement("div"),r.addCssClass(this.container,"ace_editor"),r.HI_DPI&&r.addCssClass(this.container,"ace_hidpi"),this.setTheme(e),this.$gutter=r.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.$gutter.setAttribute("aria-hidden",!0),this.scroller=r.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=r.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new o(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new a(this.content);var i=this.$textLayer=new l(this.content);this.canvas=i.element,this.$markerFront=new a(this.content),this.$cursorLayer=new c(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new h(this.container,this),this.scrollBarH=new u(this.container,this),this.scrollBarV.on("scroll",function(t){n.$scrollAnimation||n.session.setScrollTop(t.data-n.scrollMargin.top)}),this.scrollBarH.on("scroll",function(t){n.$scrollAnimation||n.session.setScrollLeft(t.data-n.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new f(this.container),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.on("changeCharacterSize",function(t){n.updateCharacterSize(),n.onResize(!0,n.gutterWidth,n.$size.width,n.$size.height),n._signal("changeCharacterSize",t)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.margin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$keepTextAreaAtCursor=!m.isIOS,this.$loop=new d(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),s.resetOptions(this),s._signal("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,i.implement(this,p),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin(),r.setStyle(this.scroller.style,"line-height",this.lineHeight+"px")},this.setSession=function(t){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=t,t&&this.scrollMargin.top&&t.getScrollTop()<=0&&t.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(t),this.$markerBack.setSession(t),this.$markerFront.setSession(t),this.$gutterLayer.setSession(t),this.$textLayer.setSession(t),t&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.scrollBarH.scrollLeft=this.scrollBarV.scrollTop=null,this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(t,e,n){if(void 0===e&&(e=1/0),this.$changedLines?(this.$changedLines.firstRow>t&&(this.$changedLines.firstRow=t),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar(),this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR)},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(t){t?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(t,e,n,i){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=t?1:0;var r=this.container;i||(i=r.clientHeight||r.scrollHeight),n||(n=r.clientWidth||r.scrollWidth);var s=this.$updateCachedSize(t,e,n,i);if(!this.$size.scrollerHeight||!n&&!i)return this.resizing=0;t&&(this.$gutterLayer.$padding=null),t?this.$renderChanges(s|this.$changes,!0):this.$loop.schedule(s|this.$changes),this.resizing&&(this.resizing=0),this.scrollBarV.scrollLeft=this.scrollBarV.scrollTop=null}},this.$updateCachedSize=function(t,e,n,i){var s=0,o=this.$size,a={width:o.width,height:o.height,scrollerHeight:o.scrollerHeight,scrollerWidth:o.scrollerWidth};if((i-=this.$extraHeight||0)&&(t||o.height!=i)&&(o.height=i,s|=this.CHANGE_SIZE,o.scrollerHeight=o.height,this.$horizScroll&&(o.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",s|=this.CHANGE_SCROLL),n&&(t||o.width!=n)){s|=this.CHANGE_SIZE,o.width=n,null==e&&(e=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=e,r.setStyle(this.scrollBarH.element.style,"left",e+"px"),r.setStyle(this.scroller.style,"left",e+this.margin.left+"px"),o.scrollerWidth=Math.max(0,n-e-this.scrollBarV.getWidth()-this.margin.h),r.setStyle(this.$gutter.style,"left",this.margin.left+"px");var l=this.scrollBarV.getWidth()+"px";r.setStyle(this.scrollBarH.element.style,"right",l),r.setStyle(this.scroller.style,"right",l),r.setStyle(this.scroller.style,"bottom",this.scrollBarH.getHeight()),(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||t)&&(s|=this.CHANGE_FULL)}return o.$dirty=!n||!i,s&&this._signal("resize",a),s},this.onGutterResize=function(t){var e=this.$showGutter?t:0;e!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,e,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()||this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):this.$computeLayerConfig()},this.adjustWrapLimit=function(){var t=Math.floor((this.$size.scrollerWidth-2*this.$padding)/this.characterWidth);return this.session.adjustWrapLimit(t,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(t){this.setOption("animatedScroll",t)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(t){this.setOption("showInvisibles",t),this.session.$bidiHandler.setShowInvisibles(t)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(t){this.setOption("displayIndentGuides",t)},this.setShowPrintMargin=function(t){this.setOption("showPrintMargin",t)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(t){this.setOption("printMarginColumn",t)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(t){return this.setOption("showGutter",t)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(t){this.setOption("fadeFoldWidgets",t)},this.setHighlightGutterLine=function(t){this.setOption("highlightGutterLine",t)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var t=r.createElement("div");t.className="ace_layer ace_print-margin-layer",this.$printMarginEl=r.createElement("div"),this.$printMarginEl.className="ace_print-margin",t.appendChild(this.$printMarginEl),this.content.insertBefore(t,this.content.firstChild)}var e=this.$printMarginEl.style;e.left=Math.round(this.characterWidth*this.$printMarginColumn+this.$padding)+"px",e.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.scroller},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(!this.$isMousePressed){var t=this.textarea.style,e=this.$composition;if(this.$keepTextAreaAtCursor||e){var n=this.$cursorLayer.$pixelPos;if(n){e&&e.markerRange&&(n=this.$cursorLayer.getPixelPosition(e.markerRange.start,!0));var i=this.layerConfig,s=n.top,o=n.left,a=e&&e.useTextareaForIME?this.lineHeight:v?0:1;if((s-=i.offset)<0||s>i.height-a)r.translate(this.textarea,0,0);else{var l=1,c=this.$size.height-a;e?e.useTextareaForIME?l=this.characterWidth*this.session.$getStringScreenWidth(this.textarea.value)[0]:s+=this.lineHeight+2:s+=this.lineHeight,(o-=this.scrollLeft)>this.$size.scrollerWidth-l&&(o=this.$size.scrollerWidth-l),o+=this.gutterWidth+this.margin.left,r.setStyle(t,"height",a+"px"),r.setStyle(t,"width",l+"px"),r.translate(this.textarea,Math.min(o,this.$size.scrollerWidth-l),Math.min(s,c))}}}else r.translate(this.textarea,-100,0)}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var t=this.layerConfig,e=t.lastRow;return this.session.documentToScreenRow(e,0)*t.lineHeight-this.session.getScrollTop()>t.height-t.lineHeight?e-1:e},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(t){this.$padding=t,this.$textLayer.setPadding(t),this.$cursorLayer.setPadding(t),this.$markerFront.setPadding(t),this.$markerBack.setPadding(t),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(t,e,n,i){var r=this.scrollMargin;r.top=0|t,r.bottom=0|e,r.right=0|i,r.left=0|n,r.v=r.top+r.bottom,r.h=r.left+r.right,r.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-r.top),this.updateFull()},this.setMargin=function(t,e,n,i){var r=this.margin;r.top=0|t,r.bottom=0|e,r.right=0|i,r.left=0|n,r.v=r.top+r.bottom,r.h=r.left+r.right,this.$updateCachedSize(!0,this.gutterWidth,this.$size.width,this.$size.height),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(t){this.setOption("hScrollBarAlwaysVisible",t)},this.getVScrollBarAlwaysVisible=function(){return this.$vScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(t){this.setOption("vScrollBarAlwaysVisible",t)},this.$updateScrollBarV=function(){var t=this.layerConfig.maxHeight,e=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&this.scrollTop>(t-=(e-this.lineHeight)*this.$scrollPastEnd)-e&&(t=this.scrollTop+e,this.scrollBarV.scrollTop=null),this.scrollBarV.setScrollHeight(t+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(t,e){if(this.$changes&&(t|=this.$changes,this.$changes=0),this.session&&this.container.offsetWidth&&!this.$frozen&&(t||e)){if(this.$size.$dirty)return this.$changes|=t,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender",t),this.session&&this.session.$bidiHandler&&this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics);var n=this.layerConfig;if(t&this.CHANGE_FULL||t&this.CHANGE_SIZE||t&this.CHANGE_TEXT||t&this.CHANGE_LINES||t&this.CHANGE_SCROLL||t&this.CHANGE_H_SCROLL){if(t|=this.$computeLayerConfig()|this.$loop.clear(),n.firstRow!=this.layerConfig.firstRow&&n.firstRowScreen==this.layerConfig.firstRowScreen){var i=this.scrollTop+(n.firstRow-this.layerConfig.firstRow)*this.lineHeight;i>0&&(this.scrollTop=i,t|=this.CHANGE_SCROLL,t|=this.$computeLayerConfig()|this.$loop.clear())}n=this.layerConfig,this.$updateScrollBarV(),t&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),r.translate(this.content,-this.scrollLeft,-n.offset);var s=n.minHeight+"px";r.setStyle(this.content.style,"width",n.width+2*this.$padding+"px"),r.setStyle(this.content.style,"height",s)}if(t&this.CHANGE_H_SCROLL&&(r.translate(this.content,-this.scrollLeft,-n.offset),this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),t&this.CHANGE_FULL)return this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",t);if(t&this.CHANGE_SCROLL)return this.$changedLines=null,t&this.CHANGE_TEXT||t&this.CHANGE_LINES?this.$textLayer.update(n):this.$textLayer.scrollLines(n),this.$showGutter&&(t&this.CHANGE_GUTTER||t&this.CHANGE_LINES?this.$gutterLayer.update(n):this.$gutterLayer.scrollLines(n)),this.$markerBack.update(n),this.$markerFront.update(n),this.$cursorLayer.update(n),this.$moveTextAreaToCursor(),void this._signal("afterRender",t);t&this.CHANGE_TEXT?(this.$changedLines=null,this.$textLayer.update(n),this.$showGutter&&this.$gutterLayer.update(n)):t&this.CHANGE_LINES?(this.$updateLines()||t&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(n):t&this.CHANGE_TEXT||t&this.CHANGE_GUTTER?this.$showGutter&&this.$gutterLayer.update(n):t&this.CHANGE_CURSOR&&this.$highlightGutterLine&&this.$gutterLayer.updateLineHighlight(n),t&this.CHANGE_CURSOR&&(this.$cursorLayer.update(n),this.$moveTextAreaToCursor()),t&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(n),t&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(n),this._signal("afterRender",t)}else this.$changes|=t},this.$autosize=function(){var t=this.session.getScreenLength()*this.lineHeight,e=this.$maxLines*this.lineHeight,n=Math.min(e,Math.max((this.$minLines||1)*this.lineHeight,t))+this.scrollMargin.v+(this.$extraHeight||0);this.$horizScroll&&(n+=this.scrollBarH.getHeight()),this.$maxPixelHeight&&n>this.$maxPixelHeight&&(n=this.$maxPixelHeight);var i=!(n<=2*this.lineHeight)&&t>e;if(n!=this.desiredHeight||this.$size.height!=this.desiredHeight||i!=this.$vScroll){i!=this.$vScroll&&(this.$vScroll=i,this.scrollBarV.setVisible(i));var r=this.container.clientWidth;this.container.style.height=n+"px",this.$updateCachedSize(!0,this.$gutterWidth,r,n),this.desiredHeight=n,this._signal("autosize")}},this.$computeLayerConfig=function(){var t=this.session,e=this.$size,n=e.height<=2*this.lineHeight,i=this.session.getScreenLength()*this.lineHeight,r=this.$getLongestLine(),s=!n&&(this.$hScrollBarAlwaysVisible||e.scrollerWidth-r-2*this.$padding<0),o=this.$horizScroll!==s;o&&(this.$horizScroll=s,this.scrollBarH.setVisible(s));var a=this.$vScroll;this.$maxLines&&this.lineHeight>1&&this.$autosize();var l=e.scrollerHeight+this.lineHeight,c=!this.$maxLines&&this.$scrollPastEnd?(e.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;i+=c;var u=this.scrollMargin;this.session.setScrollTop(Math.max(-u.top,Math.min(this.scrollTop,i-e.scrollerHeight+u.bottom))),this.session.setScrollLeft(Math.max(-u.left,Math.min(this.scrollLeft,r+2*this.$padding-e.scrollerWidth+u.right)));var h=!n&&(this.$vScrollBarAlwaysVisible||e.scrollerHeight-i+c<0||this.scrollTop>u.top),d=a!==h;d&&(this.$vScroll=h,this.scrollBarV.setVisible(h));var f,p,g=this.scrollTop%this.lineHeight,m=Math.ceil(l/this.lineHeight)-1,v=Math.max(0,Math.round((this.scrollTop-g)/this.lineHeight)),y=v+m,b=this.lineHeight;v=t.screenToDocumentRow(v,0);var w=t.getFoldLine(v);w&&(v=w.start.row),f=t.documentToScreenRow(v,0),p=t.getRowLength(v)*b,y=Math.min(t.screenToDocumentRow(y,0),t.getLength()-1),l=e.scrollerHeight+t.getRowLength(y)*b+p,g=this.scrollTop-f*b;var x=0;return(this.layerConfig.width!=r||o)&&(x=this.CHANGE_H_SCROLL),(o||d)&&(x|=this.$updateCachedSize(!0,this.gutterWidth,e.width,e.height),this._signal("scrollbarVisibilityChanged"),d&&(r=this.$getLongestLine())),this.layerConfig={width:r,padding:this.$padding,firstRow:v,firstRowScreen:f,lastRow:y,lineHeight:b,characterWidth:this.characterWidth,minHeight:l,maxHeight:i,offset:g,gutterOffset:b?Math.max(0,Math.ceil((g+e.height-e.scrollerHeight)/b)):0,height:this.$size.scrollerHeight},this.session.$bidiHandler&&this.session.$bidiHandler.setContentWidth(r-this.$padding),x},this.$updateLines=function(){if(this.$changedLines){var t=this.$changedLines.firstRow,e=this.$changedLines.lastRow;this.$changedLines=null;var n=this.layerConfig;if(!(t>n.lastRow+1||ethis.$textLayer.MAX_LINE_LENGTH&&(t=this.$textLayer.MAX_LINE_LENGTH+30),Math.max(this.$size.scrollerWidth-2*this.$padding,Math.round(t*this.characterWidth))},this.updateFrontMarkers=function(){this.$markerFront.setMarkers(this.session.getMarkers(!0)),this.$loop.schedule(this.CHANGE_MARKER_FRONT)},this.updateBackMarkers=function(){this.$markerBack.setMarkers(this.session.getMarkers()),this.$loop.schedule(this.CHANGE_MARKER_BACK)},this.addGutterDecoration=function(t,e){this.$gutterLayer.addGutterDecoration(t,e)},this.removeGutterDecoration=function(t,e){this.$gutterLayer.removeGutterDecoration(t,e)},this.updateBreakpoints=function(t){this.$loop.schedule(this.CHANGE_GUTTER)},this.setAnnotations=function(t){this.$gutterLayer.setAnnotations(t),this.$loop.schedule(this.CHANGE_GUTTER)},this.updateCursor=function(){this.$loop.schedule(this.CHANGE_CURSOR)},this.hideCursor=function(){this.$cursorLayer.hideCursor()},this.showCursor=function(){this.$cursorLayer.showCursor()},this.scrollSelectionIntoView=function(t,e,n){this.scrollCursorIntoView(t,n),this.scrollCursorIntoView(e,n)},this.scrollCursorIntoView=function(t,e,n){if(0!==this.$size.scrollerHeight){var i=this.$cursorLayer.getPixelPosition(t),r=i.left,s=i.top,o=n&&n.top||0,a=n&&n.bottom||0,l=this.$scrollAnimation?this.session.getScrollTop():this.scrollTop;l+o>s?(e&&l+o>s+this.lineHeight&&(s-=e*this.$size.scrollerHeight),0===s&&(s=-this.scrollMargin.top),this.session.setScrollTop(s)):l+this.$size.scrollerHeight-ar?(r=1-this.scrollMargin.top||e>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom||t<0&&this.session.getScrollLeft()>=1-this.scrollMargin.left||t>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right||void 0},this.pixelToScreenCoordinates=function(t,e){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([t,e]);t=i[1]-this.gutterWidth-this.margin.left,e=i[0]}else n=this.scroller.getBoundingClientRect();var r=t+this.scrollLeft-n.left-this.$padding,s=r/this.characterWidth,o=Math.floor((e+this.scrollTop-n.top)/this.lineHeight),a=this.$blockCursor?Math.floor(s):Math.round(s);return{row:o,column:a,side:s-a>0?1:-1,offsetX:r}},this.screenToTextCoordinates=function(t,e){var n;if(this.$hasCssTransforms){n={top:0,left:0};var i=this.$fontMetrics.transformCoordinates([t,e]);t=i[1]-this.gutterWidth-this.margin.left,e=i[0]}else n=this.scroller.getBoundingClientRect();var r=t+this.scrollLeft-n.left-this.$padding,s=r/this.characterWidth,o=this.$blockCursor?Math.floor(s):Math.round(s),a=Math.floor((e+this.scrollTop-n.top)/this.lineHeight);return this.session.screenToDocumentPosition(a,Math.max(o,0),r)},this.textToScreenCoordinates=function(t,e){var n=this.scroller.getBoundingClientRect(),i=this.session.documentToScreenPosition(t,e),r=this.$padding+(this.session.$bidiHandler.isBidiRow(i.row,t)?this.session.$bidiHandler.getPosLeft(i.column):Math.round(i.column*this.characterWidth));return{pageX:n.left+r-this.scrollLeft,pageY:n.top+i.row*this.lineHeight-this.scrollTop}},this.visualizeFocus=function(){r.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){r.removeCssClass(this.container,"ace_focus")},this.showComposition=function(t){this.$composition=t,t.cssText||(t.cssText=this.textarea.style.cssText),null==t.useTextareaForIME&&(t.useTextareaForIME=this.$useTextareaForIME),this.$useTextareaForIME?(r.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor(),this.$cursorLayer.element.style.display="none"):t.markerId=this.session.addMarker(t.markerRange,"ace_composition_marker","text")},this.setCompositionText=function(t){var e=this.session.selection.cursor;this.addToken(t,"composition_placeholder",e.row,e.column),this.$moveTextAreaToCursor()},this.hideComposition=function(){if(this.$composition){this.$composition.markerId&&this.session.removeMarker(this.$composition.markerId),r.removeCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText=this.$composition.cssText;var t=this.session.selection.cursor;this.removeExtraToken(t.row,t.column),this.$composition=null,this.$cursorLayer.element.style.display=""}},this.addToken=function(t,e,n,i){var r=this.session;r.bgTokenizer.lines[n]=null;var s={type:e,value:t},o=r.getTokens(n);if(null==i)o.push(s);else for(var a=0,l=0;l50&&t.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:t}))}}).call(l.prototype),e.UIWorkerClient=function(t,e,n){var i=null,r=!1,a=Object.create(s),c=[],u=new l({messageBuffer:c,terminate:function(){},postMessage:function(t){c.push(t),i&&(r?setTimeout(h):h())}});u.setEmitSync=function(t){r=t};var h=function(){var t=c.shift();t.command?i[t.command].apply(i,t.args):t.event&&a._signal(t.event,t.data)};return a.postMessage=function(t){u.onMessage({data:t})},a.callback=function(t,e){this.postMessage({type:"call",id:e,data:t})},a.emit=function(t,e){this.postMessage({type:"event",name:t,data:e})},o.loadModule(["worker",e],function(t){for(i=new t[n](a);c.length;)h()}),u},e.WorkerClient=l,e.createWorker=a}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(t,e,n){"use strict";var i=t("./range").Range,r=t("./lib/event_emitter").EventEmitter,s=t("./lib/oop"),o=function(t,e,n,i,r,s){var o=this;this.length=e,this.session=t,this.doc=t.getDocument(),this.mainClass=r,this.othersClass=s,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=i,this.$onCursorChange=function(){setTimeout(function(){o.onCursorChange()})},this.$pos=n;var a=t.getUndoManager().$undoStack||t.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=a.length,this.setup(),t.selection.on("changeCursor",this.$onCursorChange)};(function(){s.implement(this,r),this.setup=function(){var t=this,e=this.doc,n=this.session;this.selectionBefore=n.selection.toJSON(),n.selection.inMultiSelectMode&&n.selection.toSingleRange(),this.pos=e.createAnchor(this.$pos.row,this.$pos.column);var r=this.pos;r.$insertRight=!0,r.detach(),r.markerId=n.addMarker(new i(r.row,r.column,r.row,r.column+this.length),this.mainClass,null,!1),this.others=[],this.$others.forEach(function(n){var i=e.createAnchor(n.row,n.column);i.$insertRight=!0,i.detach(),t.others.push(i)}),n.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var t=this.session,e=this;this.othersActive=!0,this.others.forEach(function(n){n.markerId=t.addMarker(new i(n.row,n.column,n.row,n.column+e.length),e.othersClass,null,!1)})}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var t=0;t=this.pos.column&&e.start.column<=this.pos.column+this.length+1,s=e.start.column-this.pos.column;if(this.updateAnchors(t),r&&(this.length+=n),r&&!this.session.$fromUndo)if("insert"===t.action)for(var o=this.others.length-1;o>=0;o--)this.doc.insertMergedLines(l={row:(a=this.others[o]).row,column:a.column+s},t.lines);else if("remove"===t.action)for(o=this.others.length-1;o>=0;o--){var a,l;this.doc.remove(new i((l={row:(a=this.others[o]).row,column:a.column+s}).row,l.column,l.row,l.column-n))}this.$updating=!1,this.updateMarkers()}},this.updateAnchors=function(t){this.pos.onChange(t);for(var e=this.others.length;e--;)this.others[e].onChange(t);this.updateMarkers()},this.updateMarkers=function(){if(!this.$updating){var t=this,e=this.session,n=function(n,r){e.removeMarker(n.markerId),n.markerId=e.addMarker(new i(n.row,n.column,n.row,n.column+t.length),r,null,!1)};n(this.pos,this.mainClass);for(var r=this.others.length;r--;)n(this.others[r],this.othersClass)}},this.onCursorChange=function(t){if(!this.$updating&&this.session){var e=this.session.selection.getCursor();e.row===this.pos.row&&e.column>=this.pos.column&&e.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",t)):(this.hideOtherMarkers(),this._emit("cursorLeave",t))}},this.detach=function(){this.session.removeMarker(this.pos&&this.pos.markerId),this.hideOtherMarkers(),this.doc.off("change",this.$onUpdate),this.session.selection.off("changeCursor",this.$onCursorChange),this.session.setUndoSelect(!0),this.session=null},this.cancel=function(){if(-1!==this.$undoStackDepth){for(var t=this.session.getUndoManager(),e=(t.$undoStack||t.$undostack).length-this.$undoStackDepth,n=0;n1?t.multiSelect.joinSelections():t.multiSelect.splitIntoLines()},bindKey:{win:"Ctrl-Alt-L",mac:"Ctrl-Alt-L"},readOnly:!0},{name:"splitSelectionIntoLines",description:"Split into lines",exec:function(t){t.multiSelect.splitIntoLines()},readOnly:!0},{name:"alignCursors",description:"Align cursors",exec:function(t){t.alignCursors()},bindKey:{win:"Ctrl-Alt-A",mac:"Ctrl-Alt-A"},scrollIntoView:"cursor"},{name:"findAll",description:"Find all",exec:function(t){t.findAll()},bindKey:{win:"Ctrl-Alt-K",mac:"Ctrl-Alt-G"},scrollIntoView:"cursor",readOnly:!0}],e.multiSelectCommands=[{name:"singleSelection",description:"Single selection",bindKey:"esc",exec:function(t){t.exitMultiSelectMode()},scrollIntoView:"cursor",readOnly:!0,isAvailable:function(t){return t&&t.inMultiSelectMode}}];var i=t("../keyboard/hash_handler").HashHandler;e.keyboardHandler=new i(e.multiSelectCommands)}),ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"],function(t,e,n){var i=t("./range_list").RangeList,r=t("./range").Range,s=t("./selection").Selection,o=t("./mouse/multi_select_handler").onMouseDown,a=t("./lib/event"),l=t("./lib/lang"),c=t("./commands/multi_select_commands");e.commands=c.defaultCommands.concat(c.multiSelectCommands);var u=new(0,t("./search").Search),h=t("./edit_session").EditSession;(function(){this.getSelectionMarkers=function(){return this.$selectionMarkers}}).call(h.prototype),(function(){this.ranges=null,this.rangeList=null,this.addRange=function(t,e){if(t){if(!this.inMultiSelectMode&&0===this.rangeCount){var n=this.toOrientedRange();if(this.rangeList.add(n),this.rangeList.add(t),2!=this.rangeList.ranges.length)return this.rangeList.removeAll(),e||this.fromOrientedRange(t);this.rangeList.removeAll(),this.rangeList.add(n),this.$onAddRange(n)}t.cursor||(t.cursor=t.end);var i=this.rangeList.add(t);return this.$onAddRange(t),i.length&&this.$onRemoveRange(i),this.rangeCount>1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),e||this.fromOrientedRange(t)}},this.toSingleRange=function(t){t=t||this.ranges[0];var e=this.rangeList.removeAll();e.length&&this.$onRemoveRange(e),t&&this.fromOrientedRange(t)},this.substractPoint=function(t){var e=this.rangeList.substractPoint(t);if(e)return this.$onRemoveRange(e),e[0]},this.mergeOverlappingRanges=function(){var t=this.rangeList.merge();t.length&&this.$onRemoveRange(t)},this.$onAddRange=function(t){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(t),this._signal("addRange",{range:t})},this.$onRemoveRange=function(t){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var e=this.rangeList.ranges.pop();t.push(e),this.rangeCount=0}for(var n=t.length;n--;){var i=this.ranges.indexOf(t[n]);this.ranges.splice(i,1)}this._signal("removeRange",{ranges:t}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),(e=e||this.ranges[0])&&!e.isEqual(this.getRange())&&this.fromOrientedRange(e)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new i,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){for(var t=this.ranges.length?this.ranges:[this.getRange()],e=[],n=0;n1){var t=this.rangeList.ranges,e=t[t.length-1],n=r.fromPoints(t[0].start,e.end);this.toSingleRange(),this.setSelectionRange(n,e.cursor==e.start)}else{var i=this.session.documentToScreenPosition(this.cursor),s=this.session.documentToScreenPosition(this.anchor);this.rectangularRangeBlock(i,s).forEach(this.addRange,this)}},this.rectangularRangeBlock=function(t,e,n){var i=[],s=t.column0;)y--;if(y>0)for(var b=0;i[b].isEmpty();)b++;for(var w=y;w>=b;w--)i[w].isEmpty()&&i.splice(w,1)}return i}}).call(s.prototype);var d=t("./editor").Editor;function f(t){t.$multiselectOnSessionChange||(t.$onAddRange=t.$onAddRange.bind(t),t.$onRemoveRange=t.$onRemoveRange.bind(t),t.$onMultiSelect=t.$onMultiSelect.bind(t),t.$onSingleSelect=t.$onSingleSelect.bind(t),t.$multiselectOnSessionChange=e.onSessionChange.bind(t),t.$checkMultiselectChange=t.$checkMultiselectChange.bind(t),t.$multiselectOnSessionChange(t),t.on("changeSession",t.$multiselectOnSessionChange),t.on("mousedown",o),t.commands.addCommands(c.defaultCommands),function(t){if(t.textInput){var e=t.textInput.getElement(),n=!1;a.addListener(e,"keydown",function(e){t.$blockSelectEnabled&&18==e.keyCode&&!(e.ctrlKey||e.shiftKey||e.metaKey)?n||(t.renderer.setMouseCursor("crosshair"),n=!0):n&&i()},t),a.addListener(e,"keyup",i,t),a.addListener(e,"blur",i,t)}function i(e){n&&(t.renderer.setMouseCursor(""),n=!1)}}(t))}(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(t){t.cursor||(t.cursor=t.end);var e=this.getSelectionStyle();return t.marker=this.session.addMarker(t,"ace_selection",e),this.session.$selectionMarkers.push(t),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,t},this.removeSelectionMarker=function(t){if(t.marker){this.session.removeMarker(t.marker);var e=this.session.$selectionMarkers.indexOf(t);-1!=e&&this.session.$selectionMarkers.splice(e,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(t){for(var e=this.session.$selectionMarkers,n=t.length;n--;){var i=t[n];if(i.marker){this.session.removeMarker(i.marker);var r=e.indexOf(i);-1!=r&&e.splice(r,1)}}this.session.selectionMarkerCount=e.length},this.$onAddRange=function(t){this.addSelectionMarker(t.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(t){this.removeSelectionMarkers(t.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(t){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(c.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(t){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(c.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(t){var e=t.command,n=t.editor;if(n.multiSelect){if(e.multiSelectAction)"forEach"==e.multiSelectAction?i=n.forEachSelection(e,t.args):"forEachLine"==e.multiSelectAction?i=n.forEachSelection(e,t.args,!0):"single"==e.multiSelectAction?(n.exitMultiSelectMode(),i=e.exec(n,t.args||{})):i=e.multiSelectAction(n,t.args||{});else{var i=e.exec(n,t.args||{});n.multiSelect.addRange(n.multiSelect.toOrientedRange()),n.multiSelect.mergeOverlappingRanges()}return i}},this.forEachSelection=function(t,e,n){if(!this.inVirtualSelectionMode){var i,r=1==n||n&&n.$byLines,o=this.session,a=this.selection,l=(n&&n.keepOrder?a:a.rangeList).ranges;if(!l.length)return t.exec?t.exec(this,e||{}):t(this,e||{});var c=a._eventRegistry;a._eventRegistry={};var u=new s(o);this.inVirtualSelectionMode=!0;for(var h=l.length;h--;){if(r)for(;h>0&&l[h].start.row==l[h-1].end.row;)h--;u.fromOrientedRange(l[h]),u.index=h,this.selection=o.selection=u;var d=t.exec?t.exec(this,e||{}):t(this,e||{});i||void 0===d||(i=d),u.toOrientedRange(l[h])}u.detach(),this.selection=o.selection=a,this.inVirtualSelectionMode=!1,a._eventRegistry=c,a.mergeOverlappingRanges(),a.ranges[0]&&a.fromOrientedRange(a.ranges[0]);var f=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),f&&f.from==f.to&&this.renderer.animateScrolling(f.from),i}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var t="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var e=this.multiSelect.rangeList.ranges,n=[],i=0;io&&(o=n.column),iu?t.insert(i,l.stringRepeat(" ",s-u)):t.remove(new r(i.row,i.column,i.row,i.column-s+u)),e.start.column=e.end.column=o,e.start.row=e.end.row=i.row,e.cursor=e.end}),e.fromOrientedRange(n[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var u=this.selection.getRange(),h=u.start.row,d=u.end.row,f=h==d;if(f){var p,g=this.session.getLength();do{p=this.session.getLine(d)}while(/[=:]/.test(p)&&++d0);h<0&&(h=0),d>=g&&(d=g-1)}var m=this.session.removeFullLines(h,d);m=this.$reAlignText(m,f),this.session.insert({row:h,column:0},m.join("\n")+"\n"),f||(u.start.column=0,u.end.column=m[m.length-1].length),this.selection.setRange(u)}},this.$reAlignText=function(t,e){var n,i,r,s=!0,o=!0;return t.map(function(t){var e=t.match(/(\s*)(.*?)(\s*)([=:].*)/);return e?null==n?(n=e[1].length,i=e[2].length,r=e[3].length,e):(n+i+r!=e[1].length+e[2].length+e[3].length&&(o=!1),n!=e[1].length&&(s=!1),n>e[1].length&&(n=e[1].length),ie[3].length&&(r=e[3].length),e):[t]}).map(e?c:s?o?function(t){return t[2]?a(n+i-t[2].length)+t[2]+a(r)+t[4].replace(/^([=:])\s+/,"$1 "):t[0]}:c:function(t){return t[2]?a(n)+t[2]+a(r)+t[4].replace(/^([=:])\s+/,"$1 "):t[0]});function a(t){return l.stringRepeat(" ",t)}function c(t){return t[2]?a(n)+t[2]+a(i-t[2].length+r)+t[4].replace(/^([=:])\s+/,"$1 "):t[0]}}}).call(d.prototype),e.onSessionChange=function(t){var e=t.session;e&&!e.multiSelect&&(e.$selectionMarkers=[],e.selection.$initRangeList(),e.multiSelect=e.selection),this.multiSelect=e&&e.multiSelect;var n=t.oldSession;n&&(n.multiSelect.off("addRange",this.$onAddRange),n.multiSelect.off("removeRange",this.$onRemoveRange),n.multiSelect.off("multiSelect",this.$onMultiSelect),n.multiSelect.off("singleSelect",this.$onSingleSelect),n.multiSelect.lead.off("change",this.$checkMultiselectChange),n.multiSelect.anchor.off("change",this.$checkMultiselectChange)),e&&(e.multiSelect.on("addRange",this.$onAddRange),e.multiSelect.on("removeRange",this.$onRemoveRange),e.multiSelect.on("multiSelect",this.$onMultiSelect),e.multiSelect.on("singleSelect",this.$onSingleSelect),e.multiSelect.lead.on("change",this.$checkMultiselectChange),e.multiSelect.anchor.on("change",this.$checkMultiselectChange)),e&&this.inMultiSelectMode!=e.selection.inMultiSelectMode&&(e.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},e.MultiSelect=f,t("./config").defineOptions(d.prototype,"editor",{enableMultiselect:{set:function(t){f(this),t?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",o)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",o))},value:!0},enableBlockSelect:{set:function(t){this.$blockSelectEnabled=t},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(t,e,n){"use strict";var i=t("../../range").Range,r=e.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(t,e,n){var i=t.getLine(n);return this.foldingStartMarker.test(i)?"start":"markbeginend"==e&&this.foldingStopMarker&&this.foldingStopMarker.test(i)?"end":""},this.getFoldWidgetRange=function(t,e,n){return null},this.indentationBlock=function(t,e,n){var r=/\S/,s=t.getLine(e),o=s.search(r);if(-1!=o){for(var a=n||s.length,l=t.getLength(),c=e,u=e;++ec){var f=t.getLine(u).length;return new i(c,a,u,f)}}},this.openingBracketBlock=function(t,e,n,r,s){var o={row:n,column:r+1},a=t.$findClosingBracket(e,o,s);if(a){var l=t.foldWidgets[a.row];return null==l&&(l=t.getFoldWidget(a.row)),"start"==l&&a.row>o.row&&(a.row--,a.column=t.getLine(a.row).length),i.fromPoints(o,a)}},this.closingBracketBlock=function(t,e,n,r,s){var o={row:n,column:r},a=t.$findOpeningBracket(e,o);if(a)return a.column++,o.column--,i.fromPoints(a,o)}}).call(r.prototype)}),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(t,e,n){"use strict";e.isDark=!1,e.cssClass="ace-tm",e.cssText='.ace-tm .ace_gutter {background: #f0f0f0;color: #333;}.ace-tm .ace_print-margin {width: 1px;background: #e8e8e8;}.ace-tm .ace_fold {background-color: #6B72E6;}.ace-tm {background-color: #FFFFFF;color: black;}.ace-tm .ace_cursor {color: black;}.ace-tm .ace_invisible {color: rgb(191, 191, 191);}.ace-tm .ace_storage,.ace-tm .ace_keyword {color: blue;}.ace-tm .ace_constant {color: rgb(197, 6, 11);}.ace-tm .ace_constant.ace_buildin {color: rgb(88, 72, 246);}.ace-tm .ace_constant.ace_language {color: rgb(88, 92, 246);}.ace-tm .ace_constant.ace_library {color: rgb(6, 150, 14);}.ace-tm .ace_invalid {background-color: rgba(255, 0, 0, 0.1);color: red;}.ace-tm .ace_support.ace_function {color: rgb(60, 76, 114);}.ace-tm .ace_support.ace_constant {color: rgb(6, 150, 14);}.ace-tm .ace_support.ace_type,.ace-tm .ace_support.ace_class {color: rgb(109, 121, 222);}.ace-tm .ace_keyword.ace_operator {color: rgb(104, 118, 135);}.ace-tm .ace_string {color: rgb(3, 106, 7);}.ace-tm .ace_comment {color: rgb(76, 136, 107);}.ace-tm .ace_comment.ace_doc {color: rgb(0, 102, 255);}.ace-tm .ace_comment.ace_doc.ace_tag {color: rgb(128, 159, 191);}.ace-tm .ace_constant.ace_numeric {color: rgb(0, 0, 205);}.ace-tm .ace_variable {color: rgb(49, 132, 149);}.ace-tm .ace_xml-pe {color: rgb(104, 104, 91);}.ace-tm .ace_entity.ace_name.ace_function {color: #0000A2;}.ace-tm .ace_heading {color: rgb(12, 7, 255);}.ace-tm .ace_list {color:rgb(185, 6, 144);}.ace-tm .ace_meta.ace_tag {color:rgb(0, 22, 142);}.ace-tm .ace_string.ace_regex {color: rgb(255, 0, 0)}.ace-tm .ace_marker-layer .ace_selection {background: rgb(181, 213, 255);}.ace-tm.ace_multiselect .ace_selection.ace_start {box-shadow: 0 0 3px 0px white;}.ace-tm .ace_marker-layer .ace_step {background: rgb(252, 255, 0);}.ace-tm .ace_marker-layer .ace_stack {background: rgb(164, 229, 101);}.ace-tm .ace_marker-layer .ace_bracket {margin: -1px 0 0 -1px;border: 1px solid rgb(192, 192, 192);}.ace-tm .ace_marker-layer .ace_active-line {background: rgba(0, 0, 0, 0.07);}.ace-tm .ace_gutter-active-line {background-color : #dcdcdc;}.ace-tm .ace_marker-layer .ace_selected-word {background: rgb(250, 250, 255);border: 1px solid rgb(200, 200, 250);}.ace-tm .ace_indent-guide {background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y;}',e.$id="ace/theme/textmate",t("../lib/dom").importCssString(e.cssText,e.cssClass)}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/dom"],function(t,e,n){"use strict";var i=t("./lib/dom");function r(t){this.session=t,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeFold",this.updateOnFold),this.session.on("changeEditor",this.$onChangeEditor)}(function(){this.getRowLength=function(t){var e;return e=this.lineWidgets&&this.lineWidgets[t]&&this.lineWidgets[t].rowCount||0,this.$useWrapMode&&this.$wrapData[t]?this.$wrapData[t].length+1+e:1+e},this.$getWidgetScreenLength=function(){var t=0;return this.lineWidgets.forEach(function(e){e&&e.rowCount&&!e.hidden&&(t+=e.rowCount)}),t},this.$onChangeEditor=function(t){this.attach(t.editor)},this.attach=function(t){t&&t.widgetManager&&t.widgetManager!=this&&t.widgetManager.detach(),this.editor!=t&&(this.detach(),this.editor=t,t&&(t.widgetManager=this,t.renderer.on("beforeRender",this.measureWidgets),t.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(t){var e=this.editor;if(e){this.editor=null,e.widgetManager=null,e.renderer.off("beforeRender",this.measureWidgets),e.renderer.off("afterRender",this.renderWidgets);var n=this.session.lineWidgets;n&&n.forEach(function(t){t&&t.el&&t.el.parentNode&&(t._inDocument=!1,t.el.parentNode.removeChild(t.el))})}},this.updateOnFold=function(t,e){var n=e.lineWidgets;if(n&&t.action){for(var i=t.data,r=i.start.row,s=i.end.row,o="add"==t.action,a=r+1;ae[n].column&&n++,s.unshift(n,0),e.splice.apply(e,s),this.$updateRows()}}},this.$updateRows=function(){var t=this.session.lineWidgets;if(t){var e=!0;t.forEach(function(t,n){if(t)for(e=!1,t.row=n;t.$oldWidget;)t.$oldWidget.row=n,t=t.$oldWidget}),e&&(this.session.lineWidgets=null)}},this.$registerLineWidget=function(t){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength()));var e=this.session.lineWidgets[t.row];return e&&(t.$oldWidget=e,e.el&&e.el.parentNode&&(e.el.parentNode.removeChild(e.el),e._inDocument=!1)),this.session.lineWidgets[t.row]=t,t},this.addLineWidget=function(t){if(this.$registerLineWidget(t),t.session=this.session,!this.editor)return t;var e=this.editor.renderer;t.html&&!t.el&&(t.el=i.createElement("div"),t.el.innerHTML=t.html),t.el&&(i.addCssClass(t.el,"ace_lineWidgetContainer"),t.el.style.position="absolute",t.el.style.zIndex=5,e.container.appendChild(t.el),t._inDocument=!0,t.coverGutter||(t.el.style.zIndex=3),null==t.pixelHeight&&(t.pixelHeight=t.el.offsetHeight)),null==t.rowCount&&(t.rowCount=t.pixelHeight/e.layerConfig.lineHeight);var n=this.session.getFoldAt(t.row,0);if(t.$fold=n,n){var r=this.session.lineWidgets;t.row!=n.end.row||r[n.start.row]?t.hidden=!0:r[n.start.row]=t}return this.session._emit("changeFold",{data:{start:{row:t.row}}}),this.$updateRows(),this.renderWidgets(null,e),this.onWidgetChanged(t),t},this.removeLineWidget=function(t){if(t._inDocument=!1,t.session=null,t.el&&t.el.parentNode&&t.el.parentNode.removeChild(t.el),t.editor&&t.editor.destroy)try{t.editor.destroy()}catch(n){}if(this.session.lineWidgets){var e=this.session.lineWidgets[t.row];if(e==t)this.session.lineWidgets[t.row]=t.$oldWidget,t.$oldWidget&&this.onWidgetChanged(t.$oldWidget);else for(;e;){if(e.$oldWidget==t){e.$oldWidget=t.$oldWidget;break}e=e.$oldWidget}}this.session._emit("changeFold",{data:{start:{row:t.row}}}),this.$updateRows()},this.getWidgetsAtRow=function(t){for(var e=this.session.lineWidgets,n=e&&e[t],i=[];n;)i.push(n),n=n.$oldWidget;return i},this.onWidgetChanged=function(t){this.session._changedWidgets.push(t),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(t,e){var n=this.session._changedWidgets,i=e.layerConfig;if(n&&n.length){for(var r=1/0,s=0;s0&&!i[r];)r--;this.firstRow=n.firstRow,this.lastRow=n.lastRow,e.$cursorLayer.config=n;for(var o=r;o<=s;o++){var a=i[o];if(a&&a.el)if(a.hidden)a.el.style.top=-100-(a.pixelHeight||0)+"px";else{a._inDocument||(a._inDocument=!0,e.container.appendChild(a.el));var l=e.$cursorLayer.getPixelPosition({row:o,column:0},!0).top;a.coverLine||(l+=n.lineHeight*this.session.getRowLineCount(a.row)),a.el.style.top=l-n.offset+"px";var c=a.coverGutter?0:e.gutterWidth;a.fixedWidth||(c-=e.scrollLeft),a.el.style.left=c+"px",a.fullWidth&&a.screenWidth&&(a.el.style.minWidth=n.width+2*n.padding+"px"),a.el.style.right=a.fixedWidth?e.scrollBar.getWidth()+"px":""}}}}}).call(r.prototype),e.LineWidgets=r}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(t,e,n){"use strict";var i=t("../line_widgets").LineWidgets,r=t("../lib/dom"),s=t("../range").Range;e.showErrorMarker=function(t,e){var n=t.session;n.widgetManager||(n.widgetManager=new i(n),n.widgetManager.attach(t));var o=t.getCursorPosition(),a=o.row,l=n.widgetManager.getWidgetsAtRow(a).filter(function(t){return"errorMarker"==t.type})[0];l?l.destroy():a-=e;var c,u=function(t,e,n){var i=t.getAnnotations().sort(s.comparePoints);if(i.length){var r=function(t,e,n){for(var i=0,r=t.length-1;i<=r;){var s=i+r>>1,o=n(e,t[s]);if(o>0)i=s+1;else{if(!(o<0))return s;r=s-1}}return-(i+1)}(i,{row:e,column:-1},s.comparePoints);r<0&&(r=-r-1),r>=i.length?r=n>0?0:i.length-1:0===r&&n<0&&(r=i.length-1);var o=i[r];if(o&&n){if(o.row===e){do{o=i[r+=n]}while(o&&o.row===e);if(!o)return i.slice()}var a=[];e=o.row;do{a[n<0?"unshift":"push"](o),o=i[r+=n]}while(o&&o.row==e);return a.length&&a}}}(n,a,e);if(u){var h=u[0];o.column=(h.pos&&"number"!=typeof h.column?h.pos.sc:h.column)||0,o.row=h.row,c=t.renderer.$gutterLayer.$annotations[o.row]}else{if(l)return;c={text:["Looks good!"],className:"ace_ok"}}t.session.unfold(o.row),t.selection.moveToPosition(o);var d={row:o.row,fixedWidth:!0,coverGutter:!0,el:r.createElement("div"),type:"errorMarker"},f=d.el.appendChild(r.createElement("div")),p=d.el.appendChild(r.createElement("div"));p.className="error_widget_arrow "+c.className;var g=t.renderer.$cursorLayer.getPixelPosition(o).left;p.style.left=g+t.renderer.gutterWidth-5+"px",d.el.className="error_widget_wrapper",f.className="error_widget "+c.className,f.innerHTML=c.text.join("
"),f.appendChild(r.createElement("div"));var m=function(t,e,n){if(0===e&&("esc"===n||"return"===n))return d.destroy(),{command:"null"}};d.destroy=function(){t.$mouseHandler.isMousePressed||(t.keyBinding.removeKeyboardHandler(m),n.widgetManager.removeLineWidget(d),t.off("changeSelection",d.destroy),t.off("changeSession",d.destroy),t.off("mouseup",d.destroy),t.off("change",d.destroy))},t.keyBinding.addKeyboardHandler(m),t.on("changeSelection",d.destroy),t.on("changeSession",d.destroy),t.on("mouseup",d.destroy),t.on("change",d.destroy),t.session.widgetManager.addLineWidget(d),d.el.onmousedown=t.focus.bind(t),t.renderer.scrollCursorIntoView(null,.5,{bottom:d.el.offsetHeight})},r.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; }","")}),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(t,e,i){"use strict";t("./lib/fixoldbrowsers");var r=t("./lib/dom"),s=t("./lib/event"),o=t("./range").Range,a=t("./editor").Editor,l=t("./edit_session").EditSession,c=t("./undomanager").UndoManager,u=t("./virtual_renderer").VirtualRenderer;t("./worker/worker_client"),t("./keyboard/hash_handler"),t("./placeholder"),t("./multi_select"),t("./mode/folding/fold_mode"),t("./theme/textmate"),t("./ext/error_marker"),e.config=t("./config"),e.require=t,e.define=n("B9Yq"),e.edit=function(t,n){if("string"==typeof t){var i=t;if(!(t=document.getElementById(i)))throw new Error("ace.edit can't find div #"+i)}if(t&&t.env&&t.env.editor instanceof a)return t.env.editor;var o="";if(t&&/input|textarea/i.test(t.tagName)){var l=t;o=l.value,t=r.createElement("pre"),l.parentNode.replaceChild(t,l)}else t&&(o=t.textContent,t.innerHTML="");var c=e.createEditSession(o),h=new a(new u(t),c,n),d={document:c,editor:h,onResize:h.resize.bind(h,null)};return l&&(d.textarea=l),s.addListener(window,"resize",d.onResize),h.on("destroy",function(){s.removeListener(window,"resize",d.onResize),d.editor.container.env=null}),h.container.env=h.env=d,h},e.createEditSession=function(t,e){var n=new l(t,e);return n.setUndoManager(new c),n},e.Range=o,e.Editor=a,e.EditSession=l,e.UndoManager=c,e.VirtualRenderer=u,e.version=e.config.version}),ace.require(["ace/ace"],function(e){for(var n in e&&(e.config.init(!0),e.define=ace.define),window.ace||(window.ace=e),e)e.hasOwnProperty(n)&&(window.ace[n]=e[n]);window.ace.default=window.ace,t&&(t.exports=window.ace)})}).call(this,n("YuTi")(t))},hyoZ:function(t,e,n){"use strict";var i=n("w+qe"),r=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],s=["scalar","sequence","mapping"];t.exports=function(t,e){var n,o;if(e=e||{},Object.keys(e).forEach(function(e){if(-1===r.indexOf(e))throw new i('Unknown option "'+e+'" is met in definition of "'+t+'" YAML type.')}),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(t){return t},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=(o={},null!==(n=e.styleAliases||null)&&Object.keys(n).forEach(function(t){n[t].forEach(function(e){o[String(e)]=t})}),o),-1===s.indexOf(this.kind))throw new i('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}},jO2K:function(t,e,n){"use strict";var i;try{i=n("tjlA").Buffer}catch(o){}var r=n("hyoZ"),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";t.exports=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e,n,i=0,r=t.length,o=s;for(n=0;n64)){if(e<0)return!1;i+=6}return i%8==0},construct:function(t){var e,n,r=t.replace(/[\r\n=]/g,""),o=r.length,a=s,l=0,c=[];for(e=0;e>16&255),c.push(l>>8&255),c.push(255&l)),l=l<<6|a.indexOf(r.charAt(e));return 0==(n=o%4*6)?(c.push(l>>16&255),c.push(l>>8&255),c.push(255&l)):18===n?(c.push(l>>10&255),c.push(l>>2&255)):12===n&&c.push(l>>4&255),i?i.from?i.from(c):new i(c):c},predicate:function(t){return i&&i.isBuffer(t)},represent:function(t){var e,n,i="",r=0,o=t.length,a=s;for(e=0;e>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]),r=(r<<8)+t[e];return 0==(n=o%3)?(i+=a[r>>18&63],i+=a[r>>12&63],i+=a[r>>6&63],i+=a[63&r]):2===n?(i+=a[r>>10&63],i+=a[r>>4&63],i+=a[r<<2&63],i+=a[64]):1===n&&(i+=a[r>>2&63],i+=a[r<<4&63],i+=a[64],i+=a[64]),i}})},"kVK+":function(t,e){e.read=function(t,e,n,i,r){var s,o,a=8*r-i-1,l=(1<>1,u=-7,h=n?r-1:0,d=n?-1:1,f=t[e+h];for(h+=d,s=f&(1<<-u)-1,f>>=-u,u+=a;u>0;s=256*s+t[e+h],h+=d,u-=8);for(o=s&(1<<-u)-1,s>>=-u,u+=i;u>0;o=256*o+t[e+h],h+=d,u-=8);if(0===s)s=1-c;else{if(s===l)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,i),s-=c}return(f?-1:1)*o*Math.pow(2,s-i)},e.write=function(t,e,n,i,r,s){var o,a,l,c=8*s-r-1,u=(1<>1,d=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,f=i?0:s-1,p=i?1:-1,g=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,o=u):(o=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-o))<1&&(o--,l*=2),(e+=o+h>=1?d/l:d*Math.pow(2,1-h))*l>=2&&(o++,l/=2),o+h>=u?(a=0,o=u):o+h>=1?(a=(e*l-1)*Math.pow(2,r),o+=h):(a=e*Math.pow(2,h-1)*Math.pow(2,r),o=0));r>=8;t[n+f]=255&a,f+=p,a/=256,r-=8);for(o=o<0;t[n+f]=255&o,f+=p,o/=256,c-=8);t[n+f-p]|=128*g}},peYA:function(t,e,n){"use strict";var i=n("hyoZ");t.exports=new i("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(t){if(null===t)return!0;var e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)},construct:function(){return null},predicate:function(t){return null===t},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},pzZA:function(t,e,n){"use strict";var i=n("hyoZ"),r=Object.prototype.hasOwnProperty;t.exports=new i("tag:yaml.org,2002:set",{kind:"mapping",resolve:function(t){if(null===t)return!0;var e,n=t;for(e in n)if(r.call(n,e)&&null!==n[e])return!1;return!0},construct:function(t){return null!==t?t:{}}})},spQ0:function(t,e,n){"use strict";var i=n("hyoZ");t.exports=new i("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(t){return"<<"===t||null===t}})},tN50:function(t,e,n){"use strict";var i=n("Y2Yi");function r(t,e,n,i,r){this.name=t,this.buffer=e,this.position=n,this.line=i,this.column=r}r.prototype.getSnippet=function(t,e){var n,r,s,o,a;if(!this.buffer)return null;for(t=t||4,e=e||75,n="",r=this.position;r>0&&-1==="\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(r-1));)if(this.position-(r-=1)>e/2-1){n=" ... ",r+=5;break}for(s="",o=this.position;oe/2-1){s=" ... ",o-=5;break}return a=this.buffer.slice(r,o),i.repeat(" ",t)+n+a+s+"\n"+i.repeat(" ",t+this.position-r+n.length)+"^"},r.prototype.toString=function(t){var e,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),t||(e=this.getSnippet())&&(n+=":\n"+e),n},t.exports=r},tjlA:function(t,e,n){"use strict";var i=n("H7XF"),r=n("kVK+"),s=n("49sm");function o(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(t,e){if(o()=o())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o().toString(16)+" bytes");return 0|t}function p(t,e){if(l.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return U(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return V(t).length;default:if(i)return U(t).length;e=(""+e).toLowerCase(),i=!0}}function g(t,e,n){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return R(this,e,n);case"utf8":case"utf-8":return E(this,e,n);case"ascii":return D(this,e,n);case"latin1":case"binary":return T(this,e,n);case"base64":return k(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return F(this,e,n);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function m(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function v(t,e,n,i,r){if(0===t.length)return-1;if("string"==typeof n?(i=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=r?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(r)return-1;n=t.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof e&&(e=l.from(e,i)),l.isBuffer(e))return 0===e.length?-1:y(t,e,n,i,r);if("number"==typeof e)return e&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(t,e,n):Uint8Array.prototype.lastIndexOf.call(t,e,n):y(t,[e],n,i,r);throw new TypeError("val must be string, number or Buffer")}function y(t,e,n,i,r){var s,o=1,a=t.length,l=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;o=2,a/=2,l/=2,n/=2}function c(t,e){return 1===o?t[e]:t.readUInt16BE(e*o)}if(r){var u=-1;for(s=n;sa&&(n=a-l),s=n;s>=0;s--){for(var h=!0,d=0;dr&&(i=r):i=r;var s=e.length;if(s%2!=0)throw new TypeError("Invalid hex string");i>s/2&&(i=s/2);for(var o=0;o>8,r.push(n%256),r.push(i);return r}(e,t.length-n),t,n,i)}function k(t,e,n){return i.fromByteArray(0===e&&n===t.length?t:t.slice(e,n))}function E(t,e,n){n=Math.min(t.length,n);for(var i=[],r=e;r239?4:c>223?3:c>191?2:1;if(r+h<=n)switch(h){case 1:c<128&&(u=c);break;case 2:128==(192&(s=t[r+1]))&&(l=(31&c)<<6|63&s)>127&&(u=l);break;case 3:o=t[r+2],128==(192&(s=t[r+1]))&&128==(192&o)&&(l=(15&c)<<12|(63&s)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:o=t[r+2],a=t[r+3],128==(192&(s=t[r+1]))&&128==(192&o)&&128==(192&a)&&(l=(15&c)<<18|(63&s)<<12|(63&o)<<6|63&a)>65535&&l<1114112&&(u=l)}null===u?(u=65533,h=1):u>65535&&(i.push((u-=65536)>>>10&1023|55296),u=56320|1023&u),i.push(u),r+=h}return function(t){var e=t.length;if(e<=A)return String.fromCharCode.apply(String,t);for(var n="",i=0;i0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},l.prototype.compare=function(t,e,n,i,r){if(!l.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===n&&(n=t?t.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),e<0||n>t.length||i<0||r>this.length)throw new RangeError("out of range index");if(i>=r&&e>=n)return 0;if(i>=r)return-1;if(e>=n)return 1;if(this===t)return 0;for(var s=(r>>>=0)-(i>>>=0),o=(n>>>=0)-(e>>>=0),a=Math.min(s,o),c=this.slice(i,r),u=t.slice(e,n),h=0;hr)&&(n=r),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var s=!1;;)switch(i){case"hex":return b(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":return x(this,t,e,n);case"latin1":case"binary":return _(this,t,e,n);case"base64":return C(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,e,n);default:if(s)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),s=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function D(t,e,n){var i="";n=Math.min(t.length,n);for(var r=e;rr)&&(n=r);for(var s="",o=e;on)throw new RangeError("Trying to access beyond buffer length")}function L(t,e,n,i,r,s){if(!l.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>r||et.length)throw new RangeError("Index out of range")}function $(t,e,n,i){e<0&&(e=65535+e+1);for(var r=0,s=Math.min(t.length-n,2);r>>8*(i?r:1-r)}function O(t,e,n,i){e<0&&(e=4294967295+e+1);for(var r=0,s=Math.min(t.length-n,4);r>>8*(i?r:3-r)&255}function I(t,e,n,i,r,s){if(n+i>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(t,e,n,i,s){return s||I(t,0,n,4),r.write(t,e,n,i,23,4),n+4}function P(t,e,n,i,s){return s||I(t,0,n,8),r.write(t,e,n,i,52,8),n+8}l.prototype.slice=function(t,e){var n,i=this.length;if((t=~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),(e=void 0===e?i:~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),e0&&(r*=256);)i+=this[t+--e]*r;return i},l.prototype.readUInt8=function(t,e){return e||M(t,1,this.length),this[t]},l.prototype.readUInt16LE=function(t,e){return e||M(t,2,this.length),this[t]|this[t+1]<<8},l.prototype.readUInt16BE=function(t,e){return e||M(t,2,this.length),this[t]<<8|this[t+1]},l.prototype.readUInt32LE=function(t,e){return e||M(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},l.prototype.readUInt32BE=function(t,e){return e||M(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},l.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||M(t,e,this.length);for(var i=this[t],r=1,s=0;++s=(r*=128)&&(i-=Math.pow(2,8*e)),i},l.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||M(t,e,this.length);for(var i=e,r=1,s=this[t+--i];i>0&&(r*=256);)s+=this[t+--i]*r;return s>=(r*=128)&&(s-=Math.pow(2,8*e)),s},l.prototype.readInt8=function(t,e){return e||M(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},l.prototype.readInt16LE=function(t,e){e||M(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(t,e){e||M(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(t,e){return e||M(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},l.prototype.readInt32BE=function(t,e){return e||M(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},l.prototype.readFloatLE=function(t,e){return e||M(t,4,this.length),r.read(this,t,!0,23,4)},l.prototype.readFloatBE=function(t,e){return e||M(t,4,this.length),r.read(this,t,!1,23,4)},l.prototype.readDoubleLE=function(t,e){return e||M(t,8,this.length),r.read(this,t,!0,52,8)},l.prototype.readDoubleBE=function(t,e){return e||M(t,8,this.length),r.read(this,t,!1,52,8)},l.prototype.writeUIntLE=function(t,e,n,i){t=+t,e|=0,n|=0,i||L(this,t,e,n,Math.pow(2,8*n)-1,0);var r=1,s=0;for(this[e]=255&t;++s=0&&(s*=256);)this[e+r]=t/s&255;return e+n},l.prototype.writeUInt8=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,1,255,0),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},l.prototype.writeUInt16LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):$(this,t,e,!0),e+2},l.prototype.writeUInt16BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):$(this,t,e,!1),e+2},l.prototype.writeUInt32LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):O(this,t,e,!0),e+4},l.prototype.writeUInt32BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):O(this,t,e,!1),e+4},l.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e|=0,!i){var r=Math.pow(2,8*n-1);L(this,t,e,n,r-1,-r)}var s=0,o=1,a=0;for(this[e]=255&t;++s>0)-a&255;return e+n},l.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e|=0,!i){var r=Math.pow(2,8*n-1);L(this,t,e,n,r-1,-r)}var s=n-1,o=1,a=0;for(this[e+s]=255&t;--s>=0&&(o*=256);)t<0&&0===a&&0!==this[e+s+1]&&(a=1),this[e+s]=(t/o>>0)-a&255;return e+n},l.prototype.writeInt8=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,1,127,-128),l.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},l.prototype.writeInt16LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):$(this,t,e,!0),e+2},l.prototype.writeInt16BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):$(this,t,e,!1),e+2},l.prototype.writeInt32LE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):O(this,t,e,!0),e+4},l.prototype.writeInt32BE=function(t,e,n){return t=+t,e|=0,n||L(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),l.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):O(this,t,e,!1),e+4},l.prototype.writeFloatLE=function(t,e,n){return N(this,t,e,!0,n)},l.prototype.writeFloatBE=function(t,e,n){return N(this,t,e,!1,n)},l.prototype.writeDoubleLE=function(t,e,n){return P(this,t,e,!0,n)},l.prototype.writeDoubleBE=function(t,e,n){return P(this,t,e,!1,n)},l.prototype.copy=function(t,e,n,i){if(n||(n=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e=0;--r)t[r+e]=this[r+n];else if(s<1e3||!l.TYPED_ARRAY_SUPPORT)for(r=0;r>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(s=e;s55295&&n<57344){if(!r){if(n>56319){(e-=3)>-1&&s.push(239,191,189);continue}if(o+1===i){(e-=3)>-1&&s.push(239,191,189);continue}r=n;continue}if(n<56320){(e-=3)>-1&&s.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(e-=3)>-1&&s.push(239,191,189);if(r=null,n<128){if((e-=1)<0)break;s.push(n)}else if(n<2048){if((e-=2)<0)break;s.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;s.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;s.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return s}function V(t){return i.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(B,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function H(t,e,n,i){for(var r=0;r=e.length||r>=t.length);++r)e[r+n]=t[r];return r}},vQl5:function(t,e,n){"use strict";var i=n("hyoZ");t.exports=new i("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return null!==t?t:[]}})},"w+qe":function(t,e,n){"use strict";function i(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}(i.prototype=Object.create(Error.prototype)).constructor=i,i.prototype.toString=function(t){var e=this.name+": ";return e+=this.reason||"(unknown reason)",!t&&this.mark&&(e+=" "+this.mark.toString()),e},t.exports=i},ydHo:function(t,e,n){"use strict";var i=n("Y2Yi"),r=n("hyoZ");function s(t){return 48<=t&&t<=55}function o(t){return 48<=t&&t<=57}t.exports=new r("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(t){if(null===t)return!1;var e,n,i=t.length,r=0,a=!1;if(!i)return!1;if("-"!==(e=t[r])&&"+"!==e||(e=t[++r]),"0"===e){if(r+1===i)return!0;if("b"===(e=t[++r])){for(r++;r=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0"+t.toString(8):"-0"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},zUnb:function(t,e,n){"use strict";function i(t){return"function"==typeof t}n.r(e);let r=!1;const s={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){if(t){const t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}else r&&console.log("RxJS: Back to a better error behavior. Thank you. <3");r=t},get useDeprecatedSynchronousErrorHandling(){return r}};function o(t){setTimeout(()=>{throw t},0)}const a={closed:!0,next(t){},error(t){if(s.useDeprecatedSynchronousErrorHandling)throw t;o(t)},complete(){}},l=(()=>Array.isArray||(t=>t&&"number"==typeof t.length))();function c(t){return null!==t&&"object"==typeof t}const u=(()=>{function t(t){return Error.call(this),this.message=t?`${t.length} errors occurred during unsubscription:\n${t.map((t,e)=>`${e+1}) ${t.toString()}`).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t})();let h=(()=>{class t{constructor(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._ctorUnsubscribe=!0,this._unsubscribe=t)}unsubscribe(){let e;if(this.closed)return;let{_parentOrParents:n,_ctorUnsubscribe:r,_unsubscribe:s,_subscriptions:o}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof t)n.remove(this);else if(null!==n)for(let t=0;tt.concat(e instanceof u?e.errors:e),[])}const f=(()=>"function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random())();class p extends h{constructor(t,e,n){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=a;break;case 1:if(!t){this.destination=a;break}if("object"==typeof t){t instanceof p?(this.syncErrorThrowable=t.syncErrorThrowable,this.destination=t,t.add(this)):(this.syncErrorThrowable=!0,this.destination=new g(this,t));break}default:this.syncErrorThrowable=!0,this.destination=new g(this,t,e,n)}}[f](){return this}static create(t,e,n){const i=new p(t,e,n);return i.syncErrorThrowable=!1,i}next(t){this.isStopped||this._next(t)}error(t){this.isStopped||(this.isStopped=!0,this._error(t))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(t){this.destination.next(t)}_error(t){this.destination.error(t),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:t}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this}}class g extends p{constructor(t,e,n,r){let s;super(),this._parentSubscriber=t;let o=this;i(e)?s=e:e&&(s=e.next,n=e.error,r=e.complete,e!==a&&(o=Object.create(e),i(o.unsubscribe)&&this.add(o.unsubscribe.bind(o)),o.unsubscribe=this.unsubscribe.bind(this))),this._context=o,this._next=s,this._error=n,this._complete=r}next(t){if(!this.isStopped&&this._next){const{_parentSubscriber:e}=this;s.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}}error(t){if(!this.isStopped){const{_parentSubscriber:e}=this,{useDeprecatedSynchronousErrorHandling:n}=s;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):o(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;o(t)}}}complete(){if(!this.isStopped){const{_parentSubscriber:t}=this;if(this._complete){const e=()=>this._complete.call(this._context);s.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,e),this.unsubscribe()):(this.__tryOrUnsub(e),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(t,e){try{t.call(this._context,e)}catch(n){if(this.unsubscribe(),s.useDeprecatedSynchronousErrorHandling)throw n;o(n)}}__tryOrSetError(t,e,n){if(!s.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(i){return s.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=i,t.syncErrorThrown=!0,!0):(o(i),!0)}return!1}_unsubscribe(){const{_parentSubscriber:t}=this;this._context=null,this._parentSubscriber=null,t.unsubscribe()}}const m=(()=>"function"==typeof Symbol&&Symbol.observable||"@@observable")();function v(t){return t}let y=(()=>{class t{constructor(t){this._isScalar=!1,t&&(this._subscribe=t)}lift(e){const n=new t;return n.source=this,n.operator=e,n}subscribe(t,e,n){const{operator:i}=this,r=function(t,e,n){if(t){if(t instanceof p)return t;if(t[f])return t[f]()}return t||e||n?new p(t,e,n):new p(a)}(t,e,n);if(r.add(i?i.call(r,this.source):this.source||s.useDeprecatedSynchronousErrorHandling&&!r.syncErrorThrowable?this._subscribe(r):this._trySubscribe(r)),s.useDeprecatedSynchronousErrorHandling&&r.syncErrorThrowable&&(r.syncErrorThrowable=!1,r.syncErrorThrown))throw r.syncErrorValue;return r}_trySubscribe(t){try{return this._subscribe(t)}catch(e){s.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),function(t){for(;t;){const{closed:e,destination:n,isStopped:i}=t;if(e||i)return!1;t=n&&n instanceof p?n:null}return!0}(t)?t.error(e):console.warn(e)}}forEach(t,e){return new(e=b(e))((e,n)=>{let i;i=this.subscribe(e=>{try{t(e)}catch(r){n(r),i&&i.unsubscribe()}},n,e)})}_subscribe(t){const{source:e}=this;return e&&e.subscribe(t)}[m](){return this}pipe(...t){return 0===t.length?this:(0===(e=t).length?v:1===e.length?e[0]:function(t){return e.reduce((t,e)=>e(t),t)})(this);var e}toPromise(t){return new(t=b(t))((t,e)=>{let n;this.subscribe(t=>n=t,t=>e(t),()=>t(n))})}}return t.create=e=>new t(e),t})();function b(t){if(t||(t=s.Promise||Promise),!t)throw new Error("no Promise impl found");return t}const w=(()=>{function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t})();class x extends h{constructor(t,e){super(),this.subject=t,this.subscriber=e,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const t=this.subject,e=t.observers;if(this.subject=null,!e||0===e.length||t.isStopped||t.closed)return;const n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}class _ extends p{constructor(t){super(t),this.destination=t}}let C=(()=>{class t extends y{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[f](){return new _(this)}lift(t){const e=new S(this,this);return e.operator=t,e}next(t){if(this.closed)throw new w;if(!this.isStopped){const{observers:e}=this,n=e.length,i=e.slice();for(let r=0;rnew S(t,e),t})();class S extends C{constructor(t,e){super(),this.destination=t,this.source=e}next(t){const{destination:e}=this;e&&e.next&&e.next(t)}error(t){const{destination:e}=this;e&&e.error&&this.destination.error(t)}complete(){const{destination:t}=this;t&&t.complete&&this.destination.complete()}_subscribe(t){const{source:e}=this;return e?this.source.subscribe(t):h.EMPTY}}function k(t){return t&&"function"==typeof t.schedule}function E(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new A(t,e))}}class A{constructor(t,e){this.project=t,this.thisArg=e}call(t,e){return e.subscribe(new D(t,this.project,this.thisArg))}}class D extends p{constructor(t,e,n){super(t),this.project=e,this.count=0,this.thisArg=n||this}_next(t){let e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}this.destination.next(e)}}const T=t=>e=>{for(let n=0,i=t.length;nt&&"number"==typeof t.length&&"function"!=typeof t;function L(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}const $=t=>{if(t&&"function"==typeof t[m])return i=t,t=>{const e=i[m]();if("function"!=typeof e.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return e.subscribe(t)};if(M(t))return T(t);if(L(t))return n=t,t=>(n.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,o),t);if(t&&"function"==typeof t[F])return e=t,t=>{const n=e[F]();for(;;){let e;try{e=n.next()}catch(i){return t.error(i),t}if(e.done){t.complete();break}if(t.next(e.value),t.closed)break}return"function"==typeof n.return&&t.add(()=>{n.return&&n.return()}),t};{const e=c(t)?"an invalid object":`'${t}'`;throw new TypeError(`You provided ${e} where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.`)}var e,n,i};function O(t,e){return new y(n=>{const i=new h;let r=0;return i.add(e.schedule(function(){r!==t.length?(n.next(t[r++]),n.closed||i.add(this.schedule())):n.complete()})),i})}function I(t,e){return e?function(t,e){if(null!=t){if(function(t){return t&&"function"==typeof t[m]}(t))return function(t,e){return new y(n=>{const i=new h;return i.add(e.schedule(()=>{const r=t[m]();i.add(r.subscribe({next(t){i.add(e.schedule(()=>n.next(t)))},error(t){i.add(e.schedule(()=>n.error(t)))},complete(){i.add(e.schedule(()=>n.complete()))}}))})),i})}(t,e);if(L(t))return function(t,e){return new y(n=>{const i=new h;return i.add(e.schedule(()=>t.then(t=>{i.add(e.schedule(()=>{n.next(t),i.add(e.schedule(()=>n.complete()))}))},t=>{i.add(e.schedule(()=>n.error(t)))}))),i})}(t,e);if(M(t))return O(t,e);if(function(t){return t&&"function"==typeof t[F]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return new y(n=>{const i=new h;let r;return i.add(()=>{r&&"function"==typeof r.return&&r.return()}),i.add(e.schedule(()=>{r=t[F](),i.add(e.schedule(function(){if(n.closed)return;let t,e;try{const n=r.next();t=n.value,e=n.done}catch(i){return void n.error(i)}e?n.complete():(n.next(t),this.schedule())}))})),i})}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}(t,e):t instanceof y?t:new y($(t))}class N extends p{constructor(t){super(),this.parent=t}_next(t){this.parent.notifyNext(t)}_error(t){this.parent.notifyError(t),this.unsubscribe()}_complete(){this.parent.notifyComplete(),this.unsubscribe()}}class P extends p{notifyNext(t){this.destination.next(t)}notifyError(t){this.destination.error(t)}notifyComplete(){this.destination.complete()}}function B(t,e){if(!e.closed)return t instanceof y?t.subscribe(e):$(t)(e)}function U(t,e,n=Number.POSITIVE_INFINITY){return"function"==typeof e?i=>i.pipe(U((n,i)=>I(t(n,i)).pipe(E((t,r)=>e(n,t,i,r))),n)):("number"==typeof e&&(n=e),e=>e.lift(new V(t,n)))}class V{constructor(t,e=Number.POSITIVE_INFINITY){this.project=t,this.concurrent=e}call(t,e){return e.subscribe(new H(t,this.project,this.concurrent))}}class H extends P{constructor(t,e,n=Number.POSITIVE_INFINITY){super(t),this.project=e,this.concurrent=n,this.hasCompleted=!1,this.buffer=[],this.active=0,this.index=0}_next(t){this.active0?this._next(t.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()}}function j(t=Number.POSITIVE_INFINITY){return U(v,t)}function z(t,e){return e?O(t,e):new y(T(t))}function W(...t){let e=Number.POSITIVE_INFINITY,n=null,i=t[t.length-1];return k(i)?(n=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(e=t.pop())):"number"==typeof i&&(e=t.pop()),null===n&&1===t.length&&t[0]instanceof y?t[0]:j(e)(z(t,n))}function G(){return function(t){return t.lift(new K(t))}}class K{constructor(t){this.connectable=t}call(t,e){const{connectable:n}=this;n._refCount++;const i=new q(t,n),r=e.subscribe(i);return i.closed||(i.connection=n.connect()),r}}class q extends p{constructor(t,e){super(t),this.connectable=e}_unsubscribe(){const{connectable:t}=this;if(!t)return void(this.connection=null);this.connectable=null;const e=t._refCount;if(e<=0)return void(this.connection=null);if(t._refCount=e-1,e>1)return void(this.connection=null);const{connection:n}=this,i=t._connection;this.connection=null,!i||n&&i!==n||i.unsubscribe()}}class Y extends y{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._refCount=0,this._isComplete=!1}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){const t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject}connect(){let t=this._connection;return t||(this._isComplete=!1,t=this._connection=new h,t.add(this.source.subscribe(new J(this.getSubject(),this))),t.closed&&(this._connection=null,t=h.EMPTY)),t}refCount(){return G()(this)}}const X=(()=>{const t=Y.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}})();class J extends _{constructor(t,e){super(t),this.connectable=e}_error(t){this._unsubscribe(),super._error(t)}_complete(){this.connectable._isComplete=!0,this._unsubscribe(),super._complete()}_unsubscribe(){const t=this.connectable;if(t){this.connectable=null;const e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}}}function Q(){return new C}function Z(t){return{toString:t}.toString()}const tt="__parameters__";function et(t,e,n){return Z(()=>{const i=function(t){return function(...e){if(t){const n=t(...e);for(const t in n)this[t]=n[t]}}}(e);function r(...t){if(this instanceof r)return i.apply(this,t),this;const e=new r(...t);return n.annotation=e,n;function n(t,n,i){const r=t.hasOwnProperty(tt)?t[tt]:Object.defineProperty(t,tt,{value:[]})[tt];for(;r.length<=i;)r.push(null);return(r[i]=r[i]||[]).push(e),t}}return n&&(r.prototype=Object.create(n.prototype)),r.prototype.ngMetadataName=t,r.annotationCls=r,r})}const nt=et("Inject",t=>({token:t})),it=et("Optional"),rt=et("Self"),st=et("SkipSelf"),ot=et("Attribute",t=>({attributeName:t}));var at=function(t){return t[t.Default=0]="Default",t[t.Host=1]="Host",t[t.Self=2]="Self",t[t.SkipSelf=4]="SkipSelf",t[t.Optional=8]="Optional",t}({});function lt(t){for(let e in t)if(t[e]===lt)return e;throw Error("Could not find renamed property on target object.")}function ct(t,e){for(const n in e)e.hasOwnProperty(n)&&!t.hasOwnProperty(n)&&(t[n]=e[n])}function ut(t){return{token:t.token,providedIn:t.providedIn||null,factory:t.factory,value:void 0}}function ht(t){return{factory:t.factory,providers:t.providers||[],imports:t.imports||[]}}function dt(t){return ft(t,gt)||ft(t,vt)}function ft(t,e){return t.hasOwnProperty(e)?t[e]:null}function pt(t){return t&&(t.hasOwnProperty(mt)||t.hasOwnProperty(yt))?t[mt]:null}const gt=lt({"\u0275prov":lt}),mt=lt({"\u0275inj":lt}),vt=lt({ngInjectableDef:lt}),yt=lt({ngInjectorDef:lt});function bt(t){if("string"==typeof t)return t;if(Array.isArray(t))return"["+t.map(bt).join(", ")+"]";if(null==t)return""+t;if(t.overriddenName)return`${t.overriddenName}`;if(t.name)return`${t.name}`;const e=t.toString();if(null==e)return""+e;const n=e.indexOf("\n");return-1===n?e:e.substring(0,n)}function wt(t,e){return null==t||""===t?null===e?"":e:null==e||""===e?t:t+" "+e}const xt=lt({__forward_ref__:lt});function _t(t){return t.__forward_ref__=_t,t.toString=function(){return bt(this())},t}function Ct(t){return St(t)?t():t}function St(t){return"function"==typeof t&&t.hasOwnProperty(xt)&&t.__forward_ref__===_t}const kt="undefined"!=typeof globalThis&&globalThis,Et="undefined"!=typeof window&&window,At="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,Dt="undefined"!=typeof global&&global,Tt=kt||Dt||Et||At,Rt=lt({"\u0275cmp":lt}),Ft=lt({"\u0275dir":lt}),Mt=lt({"\u0275pipe":lt}),Lt=lt({"\u0275mod":lt}),$t=lt({"\u0275loc":lt}),Ot=lt({"\u0275fac":lt}),It=lt({__NG_ELEMENT_ID__:lt});function Nt(t,e,n,i){throw new Error(`ASSERTION ERROR: ${t}`+(null==i?"":` [Expected=> ${n} ${i} ${e} <=Actual]`))}class Pt{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,"number"==typeof e?this.__NG_ELEMENT_ID__=e:void 0!==e&&(this.\u0275prov=ut({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}toString(){return`InjectionToken ${this._desc}`}}const Bt=new Pt("INJECTOR",-1),Ut={},Vt=/\n/gm,Ht="__source",jt=lt({provide:String,useValue:lt});let zt,Wt;function Gt(t){const e=zt;return zt=t,e}function Kt(t){const e=Wt;return Wt=t,e}function qt(t,e=at.Default){if(void 0===zt)throw new Error("inject() must be called from an injection context");return null===zt?Xt(t,void 0,e):zt.get(t,e&at.Optional?null:void 0,e)}function Yt(t,e=at.Default){return(Wt||qt)(Ct(t),e)}function Xt(t,e,n){const i=dt(t);if(i&&"root"==i.providedIn)return void 0===i.value?i.value=i.factory():i.value;if(n&at.Optional)return null;if(void 0!==e)return e;throw new Error(`Injector: NOT_FOUND [${bt(t)}]`)}function Jt(t){const e=[];for(let n=0;nArray.isArray(t)?ne(t,e):e(t))}function ie(t,e,n){e>=t.length?t.push(n):t.splice(e,0,n)}function re(t,e){return e>=t.length-1?t.pop():t.splice(e,1)[0]}function se(t,e){const n=[];for(let i=0;i=0?t[1|i]=n:(i=~i,function(t,e,n,i){let r=t.length;if(r==e)t.push(n,i);else if(1===r)t.push(i,t[0]),t[0]=n;else{for(r--,t.push(t[r-1],t[r]);r>e;)t[r]=t[r-2],r--;t[e]=n,t[e+1]=i}}(t,i,e,n)),i}function ae(t,e){const n=le(t,e);if(n>=0)return t[1|n]}function le(t,e){return function(t,e,n){let i=0,r=t.length>>1;for(;r!==i;){const n=i+(r-i>>1),s=t[n<<1];if(e===s)return n<<1;s>e?r=n:i=n+1}return~(r<<1)}(t,e)}var ce=function(t){return t[t.OnPush=0]="OnPush",t[t.Default=1]="Default",t}({}),ue=function(t){return t[t.Emulated=0]="Emulated",t[t.None=2]="None",t[t.ShadowDom=3]="ShadowDom",t}({});const he={},de=[];let fe=0;function pe(t){return Z(()=>{const e={},n={type:t.type,providersResolver:null,decls:t.decls,vars:t.vars,factory:null,template:t.template||null,consts:t.consts||null,ngContentSelectors:t.ngContentSelectors,hostBindings:t.hostBindings||null,hostVars:t.hostVars||0,hostAttrs:t.hostAttrs||null,contentQueries:t.contentQueries||null,declaredInputs:e,inputs:null,outputs:null,exportAs:t.exportAs||null,onPush:t.changeDetection===ce.OnPush,directiveDefs:null,pipeDefs:null,selectors:t.selectors||de,viewQuery:t.viewQuery||null,features:t.features||null,data:t.data||{},encapsulation:t.encapsulation||ue.Emulated,id:"c",styles:t.styles||de,_:null,setInput:null,schemas:t.schemas||null,tView:null},i=t.directives,r=t.features,s=t.pipes;return n.id+=fe++,n.inputs=be(t.inputs,e),n.outputs=be(t.outputs),r&&r.forEach(t=>t(n)),n.directiveDefs=i?()=>("function"==typeof i?i():i).map(ge):null,n.pipeDefs=s?()=>("function"==typeof s?s():s).map(me):null,n})}function ge(t){return xe(t)||function(t){return t[Ft]||null}(t)}function me(t){return function(t){return t[Mt]||null}(t)}const ve={};function ye(t){const e={type:t.type,bootstrap:t.bootstrap||de,declarations:t.declarations||de,imports:t.imports||de,exports:t.exports||de,transitiveCompileScopes:null,schemas:t.schemas||null,id:t.id||null};return null!=t.id&&Z(()=>{ve[t.id]=t.type}),e}function be(t,e){if(null==t)return he;const n={};for(const i in t)if(t.hasOwnProperty(i)){let r=t[i],s=r;Array.isArray(r)&&(s=r[1],r=r[0]),n[r]=i,e&&(e[r]=s)}return n}const we=pe;function xe(t){return t[Rt]||null}function _e(t,e){return t.hasOwnProperty(Ot)?t[Ot]:null}function Ce(t,e){const n=t[Lt]||null;if(!n&&!0===e)throw new Error(`Type ${bt(t)} does not have '\u0275mod' property.`);return n}const Se=20,ke=10;function Ee(t){return Array.isArray(t)&&"object"==typeof t[1]}function Ae(t){return Array.isArray(t)&&!0===t[1]}function De(t){return 0!=(8&t.flags)}function Te(t){return 2==(2&t.flags)}function Re(t){return 1==(1&t.flags)}function Fe(t){return null!==t.template}function Me(t){return 0!=(512&t[2])}class Le extends Error{constructor(t,e){super(function(t,e){return`${t?`NG0${t}: `:""}${e}`}(t,e)),this.code=t}}function $e(t){return"string"==typeof t?t:null==t?"":""+t}function Oe(t){return"function"==typeof t?t.name||t.toString():"object"==typeof t&&null!=t&&"function"==typeof t.type?t.type.name||t.type.toString():$e(t)}const Ie=(()=>("undefined"!=typeof requestAnimationFrame&&requestAnimationFrame||setTimeout).bind(Tt))();function Ne(t){return{name:"window",target:t.ownerDocument.defaultView}}function Pe(t){return t instanceof Function?t():t}function Be(t,e){const n=e?` in ${e}`:"";throw new Le("201",`No provider for ${Oe(t)} found${n}`)}class Ue{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}}function Ve(){return He}function He(t){return t.type.prototype.ngOnChanges&&(t.setInput=ze),je}function je(){const t=We(this),e=null==t?void 0:t.current;if(e){const n=t.previous;if(n===he)t.previous=e;else for(let t in e)n[t]=e[t];t.current=null,this.ngOnChanges(e)}}function ze(t,e,n,i){const r=We(t)||function(t,e){return t.__ngSimpleChanges__=e}(t,{previous:he,current:null}),s=r.current||(r.current={}),o=r.previous,a=this.declaredInputs[n],l=o[a];s[a]=new Ue(l&&l.currentValue,e,o===he),t[i]=e}function We(t){return t.__ngSimpleChanges__||null}Ve.ngInherit=!0;const Ge="http://www.w3.org/2000/svg";let Ke;function qe(){return void 0!==Ke?Ke:"undefined"!=typeof document?document:void 0}function Ye(t){return!!t.listen}const Xe={createRenderer:(t,e)=>qe()};function Je(t){for(;Array.isArray(t);)t=t[0];return t}function Qe(t,e){return Je(e[t])}function Ze(t,e){return Je(e[t.index])}function tn(t,e){return t.data[e]}function en(t,e){return t[e]}function nn(t,e){const n=e[t];return Ee(n)?n:n[0]}function rn(t){const e=function(t){return t.__ngContext__||null}(t);return e?Array.isArray(e)?e:e.lView:null}function sn(t){return 4==(4&t[2])}function on(t){return 128==(128&t[2])}function an(t,e){return null==e?null:t[e]}function ln(t){t[18]=0}function cn(t,e){t[5]+=e;let n=t,i=t[3];for(;null!==i&&(1===e&&1===n[5]||-1===e&&0===n[5]);)i[5]+=e,n=i,i=i[3]}const un={lFrame:In(null),bindingsEnabled:!0,isInCheckNoChangesMode:!1};function hn(){return un.bindingsEnabled}function dn(){return un.lFrame.lView}function fn(){return un.lFrame.tView}function pn(t){un.lFrame.contextLView=t}function gn(){let t=mn();for(;null!==t&&64===t.type;)t=t.parent;return t}function mn(){return un.lFrame.currentTNode}function vn(){const t=un.lFrame,e=t.currentTNode;return t.isParent?e:e.parent}function yn(t,e){const n=un.lFrame;n.currentTNode=t,n.isParent=e}function bn(){return un.lFrame.isParent}function wn(){un.lFrame.isParent=!1}function xn(){return un.isInCheckNoChangesMode}function _n(t){un.isInCheckNoChangesMode=t}function Cn(){const t=un.lFrame;let e=t.bindingRootIndex;return-1===e&&(e=t.bindingRootIndex=t.tView.bindingStartIndex),e}function Sn(){return un.lFrame.bindingIndex}function kn(){return un.lFrame.bindingIndex++}function En(t){const e=un.lFrame,n=e.bindingIndex;return e.bindingIndex=e.bindingIndex+t,n}function An(t){un.lFrame.inI18n=t}function Dn(t,e){const n=un.lFrame;n.bindingIndex=n.bindingRootIndex=t,Tn(e)}function Tn(t){un.lFrame.currentDirectiveIndex=t}function Rn(){return un.lFrame.currentQueryIndex}function Fn(t){un.lFrame.currentQueryIndex=t}function Mn(t){const e=t[1];return 2===e.type?e.declTNode:1===e.type?t[6]:null}function Ln(t,e,n){if(n&at.SkipSelf){let i=e,r=t;for(;i=i.parent,!(null!==i||n&at.Host||(i=Mn(r),null===i)||(r=r[15],10&i.type)););if(null===i)return!1;e=i,t=r}const i=un.lFrame=On();return i.currentTNode=e,i.lView=t,!0}function $n(t){const e=On(),n=t[1];un.lFrame=e,e.currentTNode=n.firstChild,e.lView=t,e.tView=n,e.contextLView=t,e.bindingIndex=n.bindingStartIndex,e.inI18n=!1}function On(){const t=un.lFrame,e=null===t?null:t.child;return null===e?In(t):e}function In(t){const e={currentTNode:null,isParent:!0,lView:null,tView:null,selectedIndex:-1,contextLView:null,elementDepthCount:0,currentNamespace:null,currentDirectiveIndex:-1,bindingRootIndex:-1,bindingIndex:-1,currentQueryIndex:0,parent:t,child:null,inI18n:!1};return null!==t&&(t.child=e),e}function Nn(){const t=un.lFrame;return un.lFrame=t.parent,t.currentTNode=null,t.lView=null,t}const Pn=Nn;function Bn(){const t=Nn();t.isParent=!0,t.tView=null,t.selectedIndex=-1,t.contextLView=null,t.elementDepthCount=0,t.currentDirectiveIndex=-1,t.currentNamespace=null,t.bindingRootIndex=-1,t.bindingIndex=-1,t.currentQueryIndex=0}function Un(){return un.lFrame.selectedIndex}function Vn(t){un.lFrame.selectedIndex=t}function Hn(){const t=un.lFrame;return tn(t.tView,t.selectedIndex)}function jn(){un.lFrame.currentNamespace=Ge}function zn(){un.lFrame.currentNamespace=null}function Wn(t,e){for(let n=e.directiveStart,i=e.directiveEnd;n=i)break}else e[o]<0&&(t[18]+=65536),(s>11>16&&(3&t[2])===e&&(t[2]+=2048,s.call(o)):s.call(o)}const Jn=-1;class Qn{constructor(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}}function Zn(t,e,n){const i=Ye(t);let r=0;for(;re){o=s-1;break}}}for(;s>16,i=e;for(;n>0;)i=i[15],n--;return i}let ai=!0;function li(t){const e=ai;return ai=t,e}let ci=0;function ui(t,e){const n=di(t,e);if(-1!==n)return n;const i=e[1];i.firstCreatePass&&(t.injectorIndex=e.length,hi(i.data,t),hi(e,null),hi(i.blueprint,null));const r=fi(t,e),s=t.injectorIndex;if(ri(r)){const t=si(r),n=oi(r,e),i=n[1].data;for(let r=0;r<8;r++)e[s+r]=n[t+r]|i[t+r]}return e[s+8]=r,s}function hi(t,e){t.push(0,0,0,0,0,0,0,0,e)}function di(t,e){return-1===t.injectorIndex||t.parent&&t.parent.injectorIndex===t.injectorIndex||null===e[t.injectorIndex+8]?-1:t.injectorIndex}function fi(t,e){if(t.parent&&-1!==t.parent.injectorIndex)return t.parent.injectorIndex;let n=0,i=null,r=e;for(;null!==r;){const t=r[1],e=t.type;if(i=2===e?t.declTNode:1===e?r[6]:null,null===i)return Jn;if(n++,r=r[15],-1!==i.injectorIndex)return i.injectorIndex|n<<16}return Jn}function pi(t,e,n){!function(t,e,n){let i;"string"==typeof n?i=n.charCodeAt(0)||0:n.hasOwnProperty(It)&&(i=n[It]),null==i&&(i=n[It]=ci++);const r=255&i,s=1<0?255&e:e}(n);if("function"==typeof s){if(!Ln(e,t,i))return mi(e,n,i,r);try{const t=s();if(null!=t||i&at.Optional)return t;Be(n)}finally{Pn()}}else if("number"==typeof s){if(-1===s){if(!Ln(e,t,i))return i&at.Host?gi(r,n,i):mi(e,n,i,r);try{return new Si(gn(),dn())}finally{Pn()}}let o=null,a=di(t,e),l=Jn,c=i&at.Host?e[16][6]:null;for((-1===a||i&at.SkipSelf)&&(l=-1===a?fi(t,e):e[a+8],l!==Jn&&Ci(i,!1)?(o=e[1],a=si(l),e=oi(l,e)):a=-1);-1!==a;){const t=e[1];if(_i(s,a,t.data)){const t=bi(a,e,n,o,i,c);if(t!==yi)return t}l=e[a+8],l!==Jn&&Ci(i,e[1].data[a+8]===c)&&_i(s,a,e)?(o=t,a=si(l),e=oi(l,e)):a=-1}}}return mi(e,n,i,r)}const yi={};function bi(t,e,n,i,r,s){const o=e[1],a=o.data[t+8],l=wi(a,o,n,null==i?Te(a)&&ai:i!=o&&0!=(3&a.type),r&at.Host&&s===a);return null!==l?xi(e,o,l,a):yi}function wi(t,e,n,i,r){const s=t.providerIndexes,o=e.data,a=1048575&s,l=t.directiveStart,c=s>>20,u=r?a+c:t.directiveEnd;for(let h=i?a:a+c;h=l&&t.type===n)return h}if(r){const t=o[l];if(t&&Fe(t)&&t.type===n)return l}return null}function xi(t,e,n,i){let r=t[n];const s=e.data;if(r instanceof Qn){const o=r;o.resolving&&function(t,e){throw new Le("200",`Circular dependency in DI detected for ${t}`)}(Oe(s[n]));const a=li(o.canSeeViewProviders);o.resolving=!0;const l=o.injectImpl?Kt(o.injectImpl):null;Ln(t,i,at.Default);try{r=t[n]=o.factory(void 0,s,t,i),e.firstCreatePass&&n>=i.directiveStart&&function(t,e,n){const{ngOnChanges:i,ngOnInit:r,ngDoCheck:s}=e.type.prototype;if(i){const i=He(e);(n.preOrderHooks||(n.preOrderHooks=[])).push(t,i),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,i)}r&&(n.preOrderHooks||(n.preOrderHooks=[])).push(0-t,r),s&&((n.preOrderHooks||(n.preOrderHooks=[])).push(t,s),(n.preOrderCheckHooks||(n.preOrderCheckHooks=[])).push(t,s))}(n,s[n],e)}finally{null!==l&&Kt(l),li(a),o.resolving=!1,Pn()}}return r}function _i(t,e,n){const i=64&t,r=32&t;let s;return s=128&t?i?r?n[e+7]:n[e+6]:r?n[e+5]:n[e+4]:i?r?n[e+3]:n[e+2]:r?n[e+1]:n[e],!!(s&1<{const t=ki(Ct(e));return t?t():null};let n=_e(e);if(null===n){const t=pt(e);n=t&&t.factory}return n||null}function Ei(t){return Z(()=>{const e=t.prototype.constructor,n=e[Ot]||ki(e),i=Object.prototype;let r=Object.getPrototypeOf(t.prototype).constructor;for(;r&&r!==i;){const t=r[Ot]||ki(r);if(t&&t!==n)return t;r=Object.getPrototypeOf(r)}return t=>new t})}function Ai(t){return t.ngDebugContext}function Di(t){return t.ngOriginalError}function Ti(t,...e){t.error(...e)}class Ri{constructor(){this._console=console}handleError(t){const e=this._findOriginalError(t),n=this._findContext(t),i=function(t){return t.ngErrorLogger||Ti}(t);i(this._console,"ERROR",t),e&&i(this._console,"ORIGINAL ERROR",e),n&&i(this._console,"ERROR CONTEXT",n)}_findContext(t){return t?Ai(t)?Ai(t):this._findContext(Di(t)):null}_findOriginalError(t){let e=Di(t);for(;e&&Di(e);)e=Di(e);return e}}let Fi;function Mi(t){var e;return(null===(e=function(){if(void 0===Fi&&(Fi=null,Tt.trustedTypes))try{Fi=Tt.trustedTypes.createPolicy("angular",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t})}catch(e){}return Fi}())||void 0===e?void 0:e.createHTML(t))||t}class Li{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see http://g.co/ng/security#xss)`}}class $i extends Li{getTypeName(){return"HTML"}}class Oi extends Li{getTypeName(){return"Style"}}class Ii extends Li{getTypeName(){return"Script"}}class Ni extends Li{getTypeName(){return"URL"}}class Pi extends Li{getTypeName(){return"ResourceURL"}}function Bi(t){return t instanceof Li?t.changingThisBreaksApplicationSecurity:t}function Ui(t,e){const n=Vi(t);if(null!=n&&n!==e){if("ResourceURL"===n&&"URL"===e)return!0;throw new Error(`Required a safe ${e}, got a ${n} (see http://g.co/ng/security#xss)`)}return n===e}function Vi(t){return t instanceof Li&&t.getTypeName()||null}let Hi=!0,ji=!1;function zi(){return ji=!0,Hi}function Wi(t){return function(){try{return!!(new window.DOMParser).parseFromString(Mi(""),"text/html")}catch(t){return!1}}()?new Gi:new Ki(t)}class Gi{getInertBodyElement(t){t=""+t;try{const e=(new window.DOMParser).parseFromString(Mi(t),"text/html").body;return e.removeChild(e.firstChild),e}catch(e){return null}}}class Ki{constructor(t){if(this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert"),null==this.inertDocument.body){const t=this.inertDocument.createElement("html");this.inertDocument.appendChild(t);const e=this.inertDocument.createElement("body");t.appendChild(e)}}getInertBodyElement(t){const e=this.inertDocument.createElement("template");if("content"in e)return e.innerHTML=Mi(t),e;const n=this.inertDocument.createElement("body");return n.innerHTML=Mi(t),this.defaultDoc.documentMode&&this.stripCustomNsAttrs(n),n}stripCustomNsAttrs(t){const e=t.attributes;for(let i=e.length-1;0Xi(t.trim())).join(", ")}function Qi(t){const e={};for(const n of t.split(","))e[n]=!0;return e}function Zi(...t){const e={};for(const n of t)for(const t in n)n.hasOwnProperty(t)&&(e[t]=!0);return e}const tr=Qi("area,br,col,hr,img,wbr"),er=Qi("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),nr=Qi("rp,rt"),ir=Zi(nr,er),rr=Zi(tr,Zi(er,Qi("address,article,aside,blockquote,caption,center,del,details,dialog,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,main,map,menu,nav,ol,pre,section,summary,table,ul")),Zi(nr,Qi("a,abbr,acronym,audio,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,picture,q,ruby,rp,rt,s,samp,small,source,span,strike,strong,sub,sup,time,track,tt,u,var,video")),ir),sr=Qi("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),or=Qi("srcset"),ar=Zi(sr,or,Qi("abbr,accesskey,align,alt,autoplay,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,controls,coords,datetime,default,dir,download,face,headers,height,hidden,hreflang,hspace,ismap,itemscope,itemprop,kind,label,lang,language,loop,media,muted,nohref,nowrap,open,preload,rel,rev,role,rows,rowspan,rules,scope,scrolling,shape,size,sizes,span,srclang,start,summary,tabindex,target,title,translate,type,usemap,valign,value,vspace,width"),Qi("aria-activedescendant,aria-atomic,aria-autocomplete,aria-busy,aria-checked,aria-colcount,aria-colindex,aria-colspan,aria-controls,aria-current,aria-describedby,aria-details,aria-disabled,aria-dropeffect,aria-errormessage,aria-expanded,aria-flowto,aria-grabbed,aria-haspopup,aria-hidden,aria-invalid,aria-keyshortcuts,aria-label,aria-labelledby,aria-level,aria-live,aria-modal,aria-multiline,aria-multiselectable,aria-orientation,aria-owns,aria-placeholder,aria-posinset,aria-pressed,aria-readonly,aria-relevant,aria-required,aria-roledescription,aria-rowcount,aria-rowindex,aria-rowspan,aria-selected,aria-setsize,aria-sort,aria-valuemax,aria-valuemin,aria-valuenow,aria-valuetext")),lr=Qi("script,style,template");class cr{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(t){let e=t.firstChild,n=!0;for(;e;)if(e.nodeType===Node.ELEMENT_NODE?n=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,n&&e.firstChild)e=e.firstChild;else for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let t=this.checkClobberedElement(e,e.nextSibling);if(t){e=t;break}e=this.checkClobberedElement(e,e.parentNode)}return this.buf.join("")}startElement(t){const e=t.nodeName.toLowerCase();if(!rr.hasOwnProperty(e))return this.sanitizedSomething=!0,!lr.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);const n=t.attributes;for(let i=0;i"),!0}endElement(t){const e=t.nodeName.toLowerCase();rr.hasOwnProperty(e)&&!tr.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(dr(t))}checkClobberedElement(t,e){if(e&&(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)===Node.DOCUMENT_POSITION_CONTAINED_BY)throw new Error(`Failed to sanitize html because the element is clobbered: ${t.outerHTML}`);return e}}const ur=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,hr=/([^\#-~ |!])/g;function dr(t){return t.replace(/&/g,"&").replace(ur,function(t){return"&#"+(1024*(t.charCodeAt(0)-55296)+(t.charCodeAt(1)-56320)+65536)+";"}).replace(hr,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}let fr;function pr(t,e){let n=null;try{fr=fr||Wi(t);let i=e?String(e):"";n=fr.getInertBodyElement(i);let r=5,s=i;do{if(0===r)throw new Error("Failed to sanitize html because the input is unstable");r--,i=s,s=n.innerHTML,n=fr.getInertBodyElement(i)}while(i!==s);const o=new cr,a=o.sanitizeChildren(gr(n)||n);return zi()&&o.sanitizedSomething&&console.warn("WARNING: sanitizing HTML stripped some content, see http://g.co/ng/security#xss"),a}finally{if(n){const t=gr(n)||n;for(;t.firstChild;)t.removeChild(t.firstChild)}}}function gr(t){return"content"in t&&function(t){return t.nodeType===Node.ELEMENT_NODE&&"TEMPLATE"===t.nodeName}(t)?t.content:null}var mr=function(t){return t[t.NONE=0]="NONE",t[t.HTML=1]="HTML",t[t.STYLE=2]="STYLE",t[t.SCRIPT=3]="SCRIPT",t[t.URL=4]="URL",t[t.RESOURCE_URL=5]="RESOURCE_URL",t}({});function vr(t){const e=br();return e?e.sanitize(mr.HTML,t)||"":Ui(t,"HTML")?Bi(t):pr(qe(),$e(t))}function yr(t){const e=br();return e?e.sanitize(mr.URL,t)||"":Ui(t,"URL")?Bi(t):Xi($e(t))}function br(){const t=dn();return t&&t[12]}function wr(t,e){t.__ngContext__=e}let xr;function _r(t,e){return xr(t,e)}function Cr(t){const e=t[3];return Ae(e)?e[3]:e}function Sr(t){return Er(t[13])}function kr(t){return Er(t[4])}function Er(t){for(;null!==t&&!Ae(t);)t=t[4];return t}function Ar(t,e,n,i,r){if(null!=i){let s,o=!1;Ae(i)?s=i:Ee(i)&&(o=!0,i=i[0]);const a=Je(i);0===t&&null!==n?null==r?Br(e,n,a):Pr(e,n,a,r||null,!0):1===t&&null!==n?Pr(e,n,a,r||null,!0):2===t?Xr(e,a,o):3===t&&e.destroyNode(a),null!=s&&function(t,e,n,i,r){const s=n[7];s!==Je(n)&&Ar(e,t,i,s,r);for(let o=ke;o0&&(t[n-1][4]=i[4]);const o=re(t,ke+e);Qr(i[1],r=i,r[11],2,null,null),r[0]=null,r[6]=null;const a=o[19];null!==a&&a.detachView(o[1]),i[3]=null,i[4]=null,i[2]&=-129}var r;return i}function $r(t,e){if(!(256&e[2])){const n=e[11];Ye(n)&&n.destroyNode&&Qr(t,e,n,3,null,null),function(t){let e=t[13];if(!e)return Or(t[1],t);for(;e;){let n=null;if(Ee(e))n=e[13];else{const t=e[10];t&&(n=t)}if(!n){for(;e&&!e[4]&&e!==t;)Ee(e)&&Or(e[1],e),e=e[3];null===e&&(e=t),Ee(e)&&Or(e[1],e),n=e&&e[4]}e=n}}(e)}}function Or(t,e){if(!(256&e[2])){e[2]&=-129,e[2]|=256,function(t,e){let n;if(null!=t&&null!=(n=t.destroyHooks))for(let i=0;i=0?t[a]():t[-a].unsubscribe(),i+=2}else n[i].call(t[n[i+1]]);e[7]=null}}(t,e),1===e[1].type&&Ye(e[11])&&e[11].destroy();const n=e[17];if(null!==n&&Ae(e[3])){n!==e[3]&&Mr(n,e);const i=e[19];null!==i&&i.detachView(t)}}}function Ir(t,e,n){return Nr(t,e.parent,n)}function Nr(t,e,n){let i=e;for(;null!==i&&40&i.type;)i=(e=i).parent;if(null===i)return n[0];if(2&i.flags){const e=t.data,n=e[e[i.index].directiveStart].encapsulation;if(n===ue.None||n===ue.Emulated)return null}return Ze(i,n)}function Pr(t,e,n,i,r){Ye(t)?t.insertBefore(e,n,i,r):e.insertBefore(n,i,r)}function Br(t,e,n){Ye(t)?t.appendChild(e,n):e.appendChild(n)}function Ur(t,e,n,i,r){null!==i?Pr(t,e,n,i,r):Br(t,e,n)}function Vr(t,e){return Ye(t)?t.parentNode(e):e.parentNode}function Hr(t,e,n){return Wr(t,e,n)}function jr(t,e,n){return 40&t.type?Ze(t,n):null}let zr,Wr=jr;function Gr(t,e){Wr=t,zr=e}function Kr(t,e,n,i){const r=Ir(t,i,e),s=e[11],o=Hr(i.parent||e[6],i,e);if(null!=r)if(Array.isArray(n))for(let a=0;as?"":r[u+1].toLowerCase();const e=8&i?t:null;if(e&&-1!==ns(e,c,0)||2&i&&c!==t){if(ls(i))return!1;o=!0}}}}else{if(!o&&!ls(i)&&!ls(l))return!1;if(o&&ls(l))continue;o=!1,i=l|1&i}}return ls(i)||o}function ls(t){return 0==(1&t)}function cs(t,e,n,i){if(null===e)return-1;let r=0;if(i||!n){let n=!1;for(;r-1)for(n++;n0?'="'+e+'"':"")+"]"}else 8&i?r+="."+o:4&i&&(r+=" "+o);else""===r||ls(o)||(e+=ds(s,r),r=""),i=o,s=s||!ls(i);n++}return""!==r&&(e+=ds(s,r)),e}const ps={};function gs(t){ms(fn(),dn(),Un()+t,xn())}function ms(t,e,n,i){if(!i)if(3==(3&e[2])){const i=t.preOrderCheckHooks;null!==i&&Gn(e,i,n)}else{const i=t.preOrderHooks;null!==i&&Kn(e,i,0,n)}Vn(n)}function vs(t,e){return t<<17|e<<2}function ys(t){return t>>17&32767}function bs(t){return 2|t}function ws(t){return(131068&t)>>2}function xs(t,e){return-131069&t|e<<2}function _s(t){return 1|t}function Cs(t,e){const n=t.contentQueries;if(null!==n)for(let i=0;iSe&&ms(t,e,Se,xn()),n(i,r)}finally{Vn(s)}}function Ms(t,e,n){if(De(e)){const i=e.directiveEnd;for(let r=e.directiveStart;r0;){const n=t[--e];if("number"==typeof n&&n<0)return n}return 0})(n)!=s&&n.push(s),n.push(i,r,o)}}function js(t,e){null!==t.hostBindings&&t.hostBindings(1,e)}function zs(t,e){e.flags|=2,(t.components||(t.components=[])).push(e.index)}function Ws(t,e,n){if(n){if(e.exportAs)for(let i=0;i0&&to(n)}}function to(t){for(let n=Sr(t);null!==n;n=kr(n))for(let t=ke;t0&&to(e)}const e=t[1].components;if(null!==e)for(let n=0;n0&&to(i)}}function eo(t,e){const n=nn(e,t),i=n[1];!function(t,e){for(let n=e.length;nPromise.resolve(null))();function lo(t){return t[7]||(t[7]=[])}function co(t,e){const n=t[9],i=n?n.get(Ri,null):null;i&&i.handleError(e)}function uo(t,e,n,i,r){for(let s=0;s-1&&this._viewContainerRef.detach(t),this._viewContainerRef=null}$r(this._lView[1],this._lView)}onDestroy(t){Ns(this._lView[1],this._lView,null,t)}markForCheck(){io(this._cdRefInjectingView||this._lView)}detach(){this._lView[2]&=-129}reattach(){this._lView[2]|=128}detectChanges(){ro(this._lView[1],this._lView,this.context)}checkNoChanges(){!function(t,e,n){_n(!0);try{ro(t,e,n)}finally{_n(!1)}}(this._lView[1],this._lView,this.context)}attachToViewContainerRef(t){if(this._appRef)throw new Error("This view is already attached directly to the ApplicationRef!");this._viewContainerRef=t}detachFromAppRef(){var t;this._appRef=null,Qr(this._lView[1],t=this._lView,t[11],2,null,null)}attachToAppRef(t){if(this._viewContainerRef)throw new Error("This view is already attached to a ViewContainer!");this._appRef=t}}class po extends fo{constructor(t){super(t),this._view=t}detectChanges(){so(this._view)}checkNoChanges(){!function(t){_n(!0);try{so(t)}finally{_n(!1)}}(this._view)}get context(){return null}}function go(t,e,n,i,r=!1){for(;null!==n;){const s=e[n.index];if(null!==s&&i.push(Je(s)),Ae(s))for(let t=ke;t0;)this.remove(this.length-1)}get(t){return null!==this._lContainer[8]&&this._lContainer[8][t]||null}get length(){return this._lContainer.length-ke}createEmbeddedView(t,e,n){const i=t.createEmbeddedView(e||{});return this.insert(i,n),i}createComponent(t,e,n,i,r){const s=n||this.parentInjector;if(!r&&null==t.ngModule&&s){const t=s.get(Zt,null);t&&(r=t)}const o=t.create(s,i,void 0,r);return this.insert(o.hostView,e),o}insert(t,e){const n=t._lView,i=n[1];if(t.destroyed)throw new Error("Cannot insert a destroyed View in a ViewContainer!");if(this.allocateContainerIfNeeded(),Ae(n[3])){const e=this.indexOf(t);if(-1!==e)this.detach(e);else{const e=n[3],i=new yo(e,e[6],e[3]);i.detach(i.indexOf(t))}}const r=this._adjustIndex(e),s=this._lContainer;!function(t,e,n,i){const r=ke+i,s=n.length;i>0&&(n[r-1][4]=e),i{class t{}return t.__NG_ELEMENT_ID__=()=>Co(),t})();const Co=function(t=!1){return function(t,e,n){if(!n&&Te(t)){const n=nn(t.index,e);return new fo(n,n)}return 47&t.type?new fo(e[16],e):null}(gn(),dn(),t)},So=Function,ko=new Pt("Set Injector scope."),Eo={},Ao={},Do=[];let To;function Ro(){return void 0===To&&(To=new Qt),To}function Fo(t,e=null,n=null,i){return new Mo(t,n,e||Ro(),i)}class Mo{constructor(t,e,n,i=null){this.parent=n,this.records=new Map,this.injectorDefTypes=new Set,this.onDestroy=new Set,this._destroyed=!1;const r=[];e&&ne(e,n=>this.processProvider(n,t,e)),ne([t],t=>this.processInjectorType(t,[],r)),this.records.set(Bt,Oo(void 0,this));const s=this.records.get(ko);this.scope=null!=s?s.value:null,this.source=i||("object"==typeof t?null:bt(t))}get destroyed(){return this._destroyed}destroy(){this.assertNotDestroyed(),this._destroyed=!0;try{this.onDestroy.forEach(t=>t.ngOnDestroy())}finally{this.records.clear(),this.onDestroy.clear(),this.injectorDefTypes.clear()}}get(t,e=Ut,n=at.Default){this.assertNotDestroyed();const i=Gt(this);try{if(!(n&at.SkipSelf)){let e=this.records.get(t);if(void 0===e){const n=("function"==typeof(r=t)||"object"==typeof r&&r instanceof Pt)&&dt(t);e=n&&this.injectableDefInScope(n)?Oo(Lo(t),Eo):null,this.records.set(t,e)}if(null!=e)return this.hydrate(t,e)}return(n&at.Self?Ro():this.parent).get(t,e=n&at.Optional&&e===Ut?null:e)}catch(s){if("NullInjectorError"===s.name){if((s.ngTempTokenPath=s.ngTempTokenPath||[]).unshift(bt(t)),i)throw s;return function(t,e,n,i){const r=t.ngTempTokenPath;throw e[Ht]&&r.unshift(e[Ht]),t.message=function(t,e,n,i=null){t=t&&"\n"===t.charAt(0)&&"\u0275"==t.charAt(1)?t.substr(2):t;let r=bt(e);if(Array.isArray(e))r=e.map(bt).join(" -> ");else if("object"==typeof e){let t=[];for(let n in e)if(e.hasOwnProperty(n)){let i=e[n];t.push(n+":"+("string"==typeof i?JSON.stringify(i):bt(i)))}r=`{${t.join(", ")}}`}return`${n}${i?"("+i+")":""}[${r}]: ${t.replace(Vt,"\n ")}`}("\n"+t.message,r,n,i),t.ngTokenPath=r,t.ngTempTokenPath=null,t}(s,t,"R3InjectorError",this.source)}throw s}finally{Gt(i)}var r}_resolveInjectorDefTypes(){this.injectorDefTypes.forEach(t=>this.get(t))}toString(){const t=[];return this.records.forEach((e,n)=>t.push(bt(n))),`R3Injector[${t.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Error("Injector has already been destroyed.")}processInjectorType(t,e,n){if(!(t=Ct(t)))return!1;let i=pt(t);const r=null==i&&t.ngModule||void 0,s=void 0===r?t:r,o=-1!==n.indexOf(s);if(void 0!==r&&(i=pt(r)),null==i)return!1;if(null!=i.imports&&!o){let t;n.push(s);try{ne(i.imports,i=>{this.processInjectorType(i,e,n)&&(void 0===t&&(t=[]),t.push(i))})}finally{}if(void 0!==t)for(let e=0;ethis.processProvider(t,n,i||Do))}}this.injectorDefTypes.add(s),this.records.set(s,Oo(i.factory,Eo));const a=i.providers;if(null!=a&&!o){const e=t;ne(a,t=>this.processProvider(t,e,a))}return void 0!==r&&void 0!==t.providers}processProvider(t,e,n){let i=No(t=Ct(t))?t:Ct(t&&t.provide);const r=function(t,e,n){return Io(t)?Oo(void 0,t.useValue):Oo($o(t),Eo)}(t);if(No(t)||!0!==t.multi)this.records.get(i);else{let e=this.records.get(i);e||(e=Oo(void 0,Eo,!0),e.factory=()=>Jt(e.multi),this.records.set(i,e)),i=t,e.multi.push(t)}this.records.set(i,r)}hydrate(t,e){var n;return e.value===Eo&&(e.value=Ao,e.value=e.factory()),"object"==typeof e.value&&e.value&&null!==(n=e.value)&&"object"==typeof n&&"function"==typeof n.ngOnDestroy&&this.onDestroy.add(e.value),e.value}injectableDefInScope(t){return!!t.providedIn&&("string"==typeof t.providedIn?"any"===t.providedIn||t.providedIn===this.scope:this.injectorDefTypes.has(t.providedIn))}}function Lo(t){const e=dt(t),n=null!==e?e.factory:_e(t);if(null!==n)return n;const i=pt(t);if(null!==i)return i.factory;if(t instanceof Pt)throw new Error(`Token ${bt(t)} is missing a \u0275prov definition.`);if(t instanceof Function)return function(t){const e=t.length;if(e>0){const n=se(e,"?");throw new Error(`Can't resolve all parameters for ${bt(t)}: (${n.join(", ")}).`)}const n=function(t){const e=t&&(t[gt]||t[vt]);if(e){const n=function(t){if(t.hasOwnProperty("name"))return t.name;const e=(""+t).match(/^function\s*([^\s(]+)/);return null===e?"":e[1]}(t);return console.warn(`DEPRECATED: DI is instantiating a token "${n}" that inherits its @Injectable decorator but does not provide one itself.\nThis will become an error in a future version of Angular. Please add @Injectable() to the "${n}" class.`),e}return null}(t);return null!==n?()=>n.factory(t):()=>new t}(t);throw new Error("unreachable")}function $o(t,e,n){let i;if(No(t)){const e=Ct(t);return _e(e)||Lo(e)}if(Io(t))i=()=>Ct(t.useValue);else if((r=t)&&r.useFactory)i=()=>t.useFactory(...Jt(t.deps||[]));else if(function(t){return!(!t||!t.useExisting)}(t))i=()=>Yt(Ct(t.useExisting));else{const e=Ct(t&&(t.useClass||t.provide));if(!function(t){return!!t.deps}(t))return _e(e)||Lo(e);i=()=>new e(...Jt(t.deps))}var r;return i}function Oo(t,e,n=!1){return{factory:t,value:e,multi:n?[]:void 0}}function Io(t){return null!==t&&"object"==typeof t&&jt in t}function No(t){return"function"==typeof t}const Po=function(t,e,n){return function(t,e=null,n=null,i){const r=Fo(t,e,n,i);return r._resolveInjectorDefTypes(),r}({name:n},e,t,n)};let Bo=(()=>{class t{static create(t,e){return Array.isArray(t)?Po(t,e,""):Po(t.providers,t.parent,t.name||"")}}return t.THROW_IF_NOT_FOUND=Ut,t.NULL=new Qt,t.\u0275prov=ut({token:t,providedIn:"any",factory:()=>Yt(Bt)}),t.__NG_ELEMENT_ID__=-1,t})();const Uo=new Pt("AnalyzeForEntryComponents");function Vo(t,e,n){let i=n?t.styles:null,r=n?t.classes:null,s=0;if(null!==e)for(let o=0;o=0;i--){const r=t[i];r.hostVars=e+=r.hostVars,r.hostAttrs=ni(r.hostAttrs,n=ni(n,r.hostAttrs))}}(i)}function zo(t){return t===he?{}:t===de?[]:t}function Wo(t,e){const n=t.viewQuery;t.viewQuery=n?(t,i)=>{e(t,i),n(t,i)}:e}function Go(t,e){const n=t.contentQueries;t.contentQueries=n?(t,i,r)=>{e(t,i,r),n(t,i,r)}:e}function Ko(t,e){const n=t.hostBindings;t.hostBindings=n?(t,i)=>{e(t,i),n(t,i)}:e}let qo=null;function Yo(){if(!qo){const t=Tt.Symbol;if(t&&t.iterator)qo=t.iterator;else{const t=Object.getOwnPropertyNames(Map.prototype);for(let e=0;ea(Je(t[i.index])).target:i.index;if(Ye(n)){let o=null;if(!a&&l&&(o=function(t,e,n,i){const r=t.cleanup;if(null!=r)for(let s=0;sn?t[n]:null}"string"==typeof t&&(s+=2)}return null}(t,e,r,i.index)),null!==o)(o.__ngLastListenerFn__||o).__ngNextListenerFn__=s,o.__ngLastListenerFn__=s,h=!1;else{s=wa(i,e,s,!1);const t=n.listen(f.name||p,r,s);u.push(s,t),c&&c.push(r,m,g,g+1)}}else s=wa(i,e,s,!0),p.addEventListener(r,s,o),u.push(s),c&&c.push(r,m,g,o)}const d=i.outputs;let f;if(h&&null!==d&&(f=d[r])){const t=f.length;if(t)for(let n=0;n0;)e=e[15],t--;return e}(t,un.lFrame.contextLView))[8]}(t)}function _a(t,e){let n=null;const i=function(t){const e=t.attrs;if(null!=e){const t=e.indexOf(5);if(0==(1&t))return e[t+1]}return null}(t);for(let r=0;r=0}const Ra={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function Fa(t){return t.substring(Ra.key,Ra.keyEnd)}function Ma(t,e){const n=Ra.textEnd;return n===e?-1:(e=Ra.keyEnd=function(t,e,n){for(;e32;)e++;return e}(t,Ra.key=e,n),La(t,e,n))}function La(t,e,n){for(;e=0;n=Ma(e,n))oe(t,Fa(e),!0)}function Pa(t,e,n,i){const r=dn(),s=fn(),o=En(2);s.firstUpdatePass&&Va(s,t,o,i),e!==ps&&ta(r,o,e)&&za(s,s.data[Un()],r,r[11],t,r[o+1]=function(t,e){return null==t||("string"==typeof e?t+=e:"object"==typeof t&&(t=bt(Bi(t)))),t}(e,n),i,o)}function Ba(t,e,n,i){const r=fn(),s=En(2);r.firstUpdatePass&&Va(r,null,s,i);const o=dn();if(n!==ps&&ta(o,s,n)){const a=r.data[Un()];if(Ka(a,i)&&!Ua(r,s)){let t=i?a.classesWithoutHost:a.stylesWithoutHost;null!==t&&(n=wt(t,n||"")),ca(r,a,o,n,i)}else!function(t,e,n,i,r,s,o,a){r===ps&&(r=Aa);let l=0,c=0,u=0=t.expandoStartIndex}function Va(t,e,n,i){const r=t.data;if(null===r[n+1]){const s=r[Un()],o=Ua(t,n);Ka(s,i)&&null===e&&!o&&(e=!1),e=function(t,e,n,i){const r=function(t){const e=un.lFrame.currentDirectiveIndex;return-1===e?null:t[e]}(t);let s=i?e.residualClasses:e.residualStyles;if(null===r)0===(i?e.classBindings:e.styleBindings)&&(n=ja(n=Ha(null,t,e,n,i),e.attrs,i),s=null);else{const o=e.directiveStylingLast;if(-1===o||t[o]!==r)if(n=Ha(r,t,e,n,i),null===s){let n=function(t,e,n){const i=n?e.classBindings:e.styleBindings;if(0!==ws(i))return t[ys(i)]}(t,e,i);void 0!==n&&Array.isArray(n)&&(n=Ha(null,t,e,n[1],i),n=ja(n,e.attrs,i),function(t,e,n,i){t[ys(n?e.classBindings:e.styleBindings)]=i}(t,e,i,n))}else s=function(t,e,n){let i;const r=e.directiveEnd;for(let s=1+e.directiveStylingLast;s0)&&(u=!0)}else c=n;if(r)if(0!==l){const e=ys(t[a+1]);t[i+1]=vs(e,a),0!==e&&(t[e+1]=xs(t[e+1],i)),t[a+1]=131071&t[a+1]|i<<17}else t[i+1]=vs(a,0),0!==a&&(t[a+1]=xs(t[a+1],i)),a=i;else t[i+1]=vs(l,0),0===a?a=i:t[l+1]=xs(t[l+1],i),l=i;u&&(t[i+1]=bs(t[i+1])),Da(t,c,i,!0),Da(t,c,i,!1),function(t,e,n,i,r){const s=r?t.residualClasses:t.residualStyles;null!=s&&"string"==typeof e&&le(s,e)>=0&&(n[i+1]=_s(n[i+1]))}(e,c,t,i,s),o=vs(a,l),s?e.classBindings=o:e.styleBindings=o}(r,s,e,n,o,i)}}function Ha(t,e,n,i,r){let s=null;const o=n.directiveEnd;let a=n.directiveStylingLast;for(-1===a?a=n.directiveStart:a++;a0;){const e=t[r],s=Array.isArray(e),l=s?e[1]:e,c=null===l;let u=n[r+1];u===ps&&(u=c?Aa:void 0);let h=c?ae(u,i):l===i?u:void 0;if(s&&!Ga(h)&&(h=ae(e,i)),Ga(h)&&(a=h,o))return a;const d=t[r+1];r=o?ys(d):ws(d)}if(null!==e){let t=s?e.residualClasses:e.residualStyles;null!=t&&(a=ae(t,i))}return a}function Ga(t){return void 0!==t}function Ka(t,e){return 0!=(t.flags&(e?16:32))}function qa(t,e=""){const n=dn(),i=fn(),r=t+Se,s=i.firstCreatePass?ks(i,r,1,e,null):i.data[r],o=n[r]=Dr(n[11],e);Kr(i,n,o,s),yn(s,!1)}function Ya(t){return Xa("",t,""),Ya}function Xa(t,e,n){const i=dn(),r=ia(i,t,e,n);return r!==ps&&ho(i,Un(),r),Xa}function Ja(t,e,n,i,r){const s=dn(),o=function(t,e,n,i,r,s){const o=ea(t,Sn(),n,r);return En(2),o?e+$e(n)+i+$e(r)+s:ps}(s,t,e,n,i,r);return o!==ps&&ho(s,Un(),o),Ja}function Qa(t,e,n){const i=dn();return ta(i,kn(),e)&&Us(fn(),Hn(),i,t,e,i[11],n,!0),Qa}const Za=void 0;var tl=["en",[["a","p"],["AM","PM"],Za],[["AM","PM"],Za,Za],[["S","M","T","W","T","F","S"],["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],["Su","Mo","Tu","We","Th","Fr","Sa"]],Za,[["J","F","M","A","M","J","J","A","S","O","N","D"],["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],["January","February","March","April","May","June","July","August","September","October","November","December"]],Za,[["B","A"],["BC","AD"],["Before Christ","Anno Domini"]],0,[6,0],["M/d/yy","MMM d, y","MMMM d, y","EEEE, MMMM d, y"],["h:mm a","h:mm:ss a","h:mm:ss a z","h:mm:ss a zzzz"],["{1}, {0}",Za,"{1} 'at' {0}",Za],[".",",",";","%","+","-","E","\xd7","\u2030","\u221e","NaN",":"],["#,##0.###","#,##0%","\xa4#,##0.00","#E0"],"USD","$","US Dollar",{},"ltr",function(t){let e=Math.floor(Math.abs(t)),n=t.toString().replace(/^[^.]*\.?/,"").length;return 1===e&&0===n?1:5}];let el={};function nl(t){const e=function(t){return t.toLowerCase().replace(/_/g,"-")}(t);let n=rl(e);if(n)return n;const i=e.split("-")[0];if(n=rl(i),n)return n;if("en"===i)return tl;throw new Error(`Missing locale data for the locale "${t}".`)}function il(t){return nl(t)[sl.PluralCase]}function rl(t){return t in el||(el[t]=Tt.ng&&Tt.ng.common&&Tt.ng.common.locales&&Tt.ng.common.locales[t]),el[t]}var sl=function(t){return t[t.LocaleId=0]="LocaleId",t[t.DayPeriodsFormat=1]="DayPeriodsFormat",t[t.DayPeriodsStandalone=2]="DayPeriodsStandalone",t[t.DaysFormat=3]="DaysFormat",t[t.DaysStandalone=4]="DaysStandalone",t[t.MonthsFormat=5]="MonthsFormat",t[t.MonthsStandalone=6]="MonthsStandalone",t[t.Eras=7]="Eras",t[t.FirstDayOfWeek=8]="FirstDayOfWeek",t[t.WeekendRange=9]="WeekendRange",t[t.DateFormat=10]="DateFormat",t[t.TimeFormat=11]="TimeFormat",t[t.DateTimeFormat=12]="DateTimeFormat",t[t.NumberSymbols=13]="NumberSymbols",t[t.NumberFormats=14]="NumberFormats",t[t.CurrencyCode=15]="CurrencyCode",t[t.CurrencySymbol=16]="CurrencySymbol",t[t.CurrencyName=17]="CurrencyName",t[t.Currencies=18]="Currencies",t[t.Directionality=19]="Directionality",t[t.PluralCase=20]="PluralCase",t[t.ExtraData=21]="ExtraData",t}({});const ol=["zero","one","two","few","many"],al="en-US",ll={marker:"element"},cl={marker:"ICU"};var ul=function(t){return t[t.SHIFT=2]="SHIFT",t[t.APPEND_EAGERLY=1]="APPEND_EAGERLY",t[t.COMMENT=2]="COMMENT",t}({});let hl=al;function dl(t){var e;null==(e=t)&&Nt("Expected localeId to be defined",e,null,"!="),"string"==typeof t&&(hl=t.toLowerCase().replace(/_/g,"-"))}function fl(t,e,n){const i=e.insertBeforeIndex,r=Array.isArray(i)?i[0]:i;return null===r?jr(t,0,n):Je(n[r])}function pl(t,e,n,i,r){const s=e.insertBeforeIndex;if(Array.isArray(s)){let o=i,a=null;if(3&e.type||(a=o,o=r),null!==o&&0==(2&e.flags))for(let e=1;e1)for(let n=t.length-2;n>=0;n--){const i=t[n];ml(i)||vl(i,e)&&null===yl(i)&&bl(i,e.index)}}function ml(t){return!(64&t.type)}function vl(t,e){return ml(e)||t.index>e.index}function yl(t){const e=t.insertBeforeIndex;return Array.isArray(e)?e[0]:e}function bl(t,e){const n=t.insertBeforeIndex;Array.isArray(n)?n[0]=e:(Gr(fl,pl),t.insertBeforeIndex=e)}function wl(t,e){const n=t.data[e];return null===n||"string"==typeof n?null:n.hasOwnProperty("currentCaseLViewIndex")?n:n.value}function xl(t,e,n){const i=Es(t,n,64,null,null);return gl(e,i),i}function _l(t,e){const n=e[t.currentCaseLViewIndex];return null===n?n:n<0?~n:n}let Cl=0,Sl=0;function kl(t,e,n,i){const r=n[11];let s,o=null;for(let a=0;a>>17;let u,h;if(null===o&&(o=c,s=Vr(r,i)),c===o?(u=i,h=s):(u=null,h=Je(n[c])),null!==h){const e=(131070&l)>>>1;Pr(r,h,n[e],u,!1);const i=wl(t,e);if(null!==i&&"object"==typeof i){const e=_l(i,n);null!==e&&kl(t,i.create[e],n,n[i.anchorIdx])}}break;case 1:const d=e[++a],f=e[++a];Ys(r,Qe(l>>>1,n),null,null,d,f,null);break;default:throw new Error(`Unable to determine the type of mutate operation for "${l}"`)}else switch(l){case cl:const t=e[++a],i=e[++a];null===n[i]&&wr(n[i]=Rr(r,t),n);break;case ll:const s=e[++a],o=e[++a];null===n[o]&&wr(n[o]=Fr(r,s,null),n)}}}function El(t,e,n,i,r){for(let s=0;s>>2;switch(3&s){case 1:const s=n[++o],l=n[++o],c=t.data[a];"string"==typeof c?Ys(e[11],e[a],null,c,s,r,l):Us(t,c,e,s,r,e[11],l,!1);break;case 0:const u=e[a];null!==u&&Tr(e[11],u,r);break;case 2:Dl(t,wl(t,a),e,r);break;case 3:Al(t,wl(t,a),i,e)}}}}else{const r=n[s+1];if(r>0&&3==(3&r)){const n=wl(t,r>>>2);e[n.currentCaseLViewIndex]<0&&Al(t,n,i,e)}}s+=a}}function Al(t,e,n,i){let r=i[e.currentCaseLViewIndex];if(null!==r){let s=Cl;r<0&&(r=i[e.currentCaseLViewIndex]=~r,s=-1),El(t,i,e.update[r],n,s)}}function Dl(t,e,n,i){const r=function(t,e){let n=t.cases.indexOf(e);if(-1===n)switch(t.type){case 1:{const i=function(t,e){const n=il(e)(parseInt(t,10)),i=ol[n];return void 0!==i?i:"other"}(e,hl);n=t.cases.indexOf(i),-1===n&&"other"!==i&&(n=t.cases.indexOf("other"));break}case 0:n=t.cases.indexOf("other")}return-1===n?null:n}(e,i);if(_l(e,n)!==r&&(Tl(t,e,n),n[e.currentCaseLViewIndex]=null===r?null:~r,null!==r)){const i=n[e.anchorIdx];i&&kl(t,e.create[r],n,i)}}function Tl(t,e,n){let i=_l(e,n);if(null!==i){const r=e.remove[i];for(let e=0;e0){const t=Qe(i,n);null!==t&&Xr(n[11],t)}else Tl(t,wl(t,~i),n)}}}const Rl=/\ufffd(\d+):?\d*\ufffd/gi,Fl=/\ufffd(\d+)\ufffd/,Ml=/^\s*(\ufffd\d+:?\d*\ufffd)\s*,\s*(select|plural)\s*,/,Ll=/\ufffd\/?\*(\d+:\d+)\ufffd/gi,$l=/\ufffd(\/?[#*]\d+):?\d*\ufffd/gi,Ol=/\uE500/g;function Il(t,e,n,i,r,s,o){const a=As(t,i,1,null);let l=a<0?e[o]:(t.push(i,n),r(e[1].data[~o],e),s())}return 0===t.length?null:(n=t.pop(),i=t.pop(),s())}return function(n,i){for(e=i;t.length;)t.pop();return r(n.value,i),s}}())),r.push(l,null===s?"":s);const u=Es(t,a,o?32:1,null===s?"":s,null);gl(n,u);const h=u.index;return yn(u,!1),null!==c&&e!==c&&function(t,e){let n=t.insertBeforeIndex;var i;null===n?(Gr(fl,pl),n=t.insertBeforeIndex=[null,e]):("Expecting array here",(i=Array.isArray(n))!=!0&&Nt("Expecting array here",i,true,"=="),n.push(e))}(c,h),u}function Nl(t,e,n,i,r,s,o){const a=o.match(Rl),l=Il(t,e,n,s,i,a?null:o,!1);a&&Pl(r,o,l.index)}function Pl(t,e,n,i,r=null){const s=t.length,o=s+1;t.push(null,null);const a=s+2,l=e.split(Rl);let c=0;for(let u=0;un.length&&n.push(r)}return{type:i,mainBinding:r,cases:e,values:n}}function jl(t){if(!t)return[];let e=0;const n=[],i=[],r=/[{}]/g;let s;for(r.lastIndex=0;s=r.exec(t);){const r=s.index;if("}"==s[0]){if(n.pop(),0==n.length){const n=t.substring(e,r);Ml.test(n)?i.push(Hl(n)):i.push(n),e=r+1}}else{if(0==n.length){const n=t.substring(e,r);i.push(n),e=r+1}n.push("{")}}const o=t.substring(e);return i.push(o),i}function zl(t,e,n,i,r,s,o,a){const l=[],c=[],u=[];e.cases.push(s),e.create.push(l),e.remove.push(c),e.update.push(u);const h=Wi(qe()).getInertBodyElement(o),d=gr(h)||h;return d?Wl(t,e,n,i,l,c,u,d,r,a,0):0}function Wl(t,e,n,i,r,s,o,a,l,c,u){let h=0,d=a.firstChild;for(;d;){const a=As(t,n,1,null);switch(d.nodeType){case Node.ELEMENT_NODE:const f=d,p=f.tagName.toLowerCase();if(rr.hasOwnProperty(p)){ql(r,ll,p,l,a),t.data[a]=p;const g=f.attributes;for(let t=0;t>>ul.SHIFT;let h=t[u];null===h&&(h=t[u]=l?r.createComment(a):Dr(r,a)),c&&null!==n&&Pr(r,n,h,i,!1)}}(r,l.create,c,a&&8&a.type?r[a.index]:null),An(!0)})(t,e,n),An(!1)}function Jl(t){return ta(dn(),kn(),t)&&(Cl|=1<0){const i=t.data[n];El(t,e,Array.isArray(i)?i:i.update,Sn()-Sl-1,Cl)}Cl=0,Sl=0}(fn(),dn(),t+Se)}function Zl(t,e,n,i,r){if(t=Ct(t),Array.isArray(t))for(let s=0;s>20;if(No(t)||!t.multi){const i=new Qn(l,r,oa),f=nc(a,e,r?u:u+d,h);-1===f?(pi(ui(c,o),s,a),tc(s,t,e.length),e.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),n.push(i),o.push(i)):(n[f]=i,o[f]=i)}else{const f=nc(a,e,u+d,h),p=nc(a,e,u,u+d),g=f>=0&&n[f],m=p>=0&&n[p];if(r&&!m||!r&&!g){pi(ui(c,o),s,a);const u=function(t,e,n,i,r){const s=new Qn(t,n,oa);return s.multi=[],s.index=e,s.componentProviders=0,ec(s,r,i&&!n),s}(r?rc:ic,n.length,r,i,l);!r&&m&&(n[p].providerFactory=u),tc(s,t,e.length,0),e.push(a),c.directiveStart++,c.directiveEnd++,r&&(c.providerIndexes+=1048576),n.push(u),o.push(u)}else tc(s,t,f>-1?f:p,ec(n[r?p:f],l,!r&&i));!r&&i&&m&&n[p].componentProviders++}}}function tc(t,e,n,i){const r=No(e);if(r||e.useClass){const s=(e.useClass||e).prototype.ngOnDestroy;if(s){const o=t.destroyHooks||(t.destroyHooks=[]);if(!r&&e.multi){const t=o.indexOf(n);-1===t?o.push(n,[i,s]):o[t+1].push(i,s)}else o.push(n,s)}}}function ec(t,e,n){return n&&t.componentProviders++,t.multi.push(e)-1}function nc(t,e,n,i){for(let r=n;r{n.providersResolver=(n,i)=>function(t,e,n){const i=fn();if(i.firstCreatePass){const r=Fe(t);Zl(n,i.data,i.blueprint,r,!0),Zl(e,i.data,i.blueprint,r,!1)}}(n,i?i(t):t,e)}}class ac{}class lc{resolveComponentFactory(t){throw function(t){const e=Error(`No component factory found for ${bt(t)}. Did you add it to @NgModule.entryComponents?`);return e.ngComponent=t,e}(t)}}let cc=(()=>{class t{}return t.NULL=new lc,t})(),uc=(()=>{class t{constructor(t){this.nativeElement=t}}return t.__NG_ELEMENT_ID__=()=>hc(t),t})();const hc=function(t){return bo(t,gn(),dn())};class dc{}var fc=function(t){return t[t.Important=1]="Important",t[t.DashCase=2]="DashCase",t}({});let pc=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>gc(),t})();const gc=function(){const t=dn(),e=nn(gn().index,t);return function(t){const e=t[11];if(Ye(e))return e;throw new Error("Cannot inject Renderer2 when the application uses Renderer3!")}(Ee(e)?e:t)};let mc=(()=>{class t{}return t.\u0275prov=ut({token:t,providedIn:"root",factory:()=>null}),t})();class vc{constructor(t){this.full=t,this.major=t.split(".")[0],this.minor=t.split(".")[1],this.patch=t.split(".").slice(2).join(".")}}const yc=new vc("11.0.0");class bc{constructor(){}supports(t){return Jo(t)}create(t){return new xc(t)}}const wc=(t,e)=>e;class xc{constructor(t){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||wc}forEachItem(t){let e;for(e=this._itHead;null!==e;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,n=this._removalsHead,i=0,r=null;for(;e||n;){const s=!n||e&&e.currentIndex{i=this._trackByFn(e,t),null!==r&&Object.is(r.trackById,i)?(s&&(r=this._verifyReinsertion(r,t,i,e)),Object.is(r.item,t)||this._addIdentityChange(r,t)):(r=this._mismatch(r,t,i,e),s=!0),r=r._next,e++}),this.length=e;return this._truncate(r),this.collection=t,this.isDirty}get isDirty(){return null!==this._additionsHead||null!==this._movesHead||null!==this._removalsHead||null!==this._identityChangesHead}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;null!==t;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;null!==t;t=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,e,n,i){let r;return null===t?r=this._itTail:(r=t._prev,this._remove(t)),null!==(t=null===this._linkedRecords?null:this._linkedRecords.get(n,i))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,r,i)):null!==(t=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null))?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,r,i)):t=this._addAfter(new _c(e,n),r,i),t}_verifyReinsertion(t,e,n,i){let r=null===this._unlinkedRecords?null:this._unlinkedRecords.get(n,null);return null!==r?t=this._reinsertAfter(r,t._prev,i):t.currentIndex!=i&&(t.currentIndex=i,this._addToMoves(t,i)),t}_truncate(t){for(;null!==t;){const e=t._next;this._addToRemovals(this._unlink(t)),t=e}null!==this._unlinkedRecords&&this._unlinkedRecords.clear(),null!==this._additionsTail&&(this._additionsTail._nextAdded=null),null!==this._movesTail&&(this._movesTail._nextMoved=null),null!==this._itTail&&(this._itTail._next=null),null!==this._removalsTail&&(this._removalsTail._nextRemoved=null),null!==this._identityChangesTail&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(t,e,n){null!==this._unlinkedRecords&&this._unlinkedRecords.remove(t);const i=t._prevRemoved,r=t._nextRemoved;return null===i?this._removalsHead=r:i._nextRemoved=r,null===r?this._removalsTail=i:r._prevRemoved=i,this._insertAfter(t,e,n),this._addToMoves(t,n),t}_moveAfter(t,e,n){return this._unlink(t),this._insertAfter(t,e,n),this._addToMoves(t,n),t}_addAfter(t,e,n){return this._insertAfter(t,e,n),this._additionsTail=null===this._additionsTail?this._additionsHead=t:this._additionsTail._nextAdded=t,t}_insertAfter(t,e,n){const i=null===e?this._itHead:e._next;return t._next=i,t._prev=e,null===i?this._itTail=t:i._prev=t,null===e?this._itHead=t:e._next=t,null===this._linkedRecords&&(this._linkedRecords=new Sc),this._linkedRecords.put(t),t.currentIndex=n,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){null!==this._linkedRecords&&this._linkedRecords.remove(t);const e=t._prev,n=t._next;return null===e?this._itHead=n:e._next=n,null===n?this._itTail=e:n._prev=e,t}_addToMoves(t,e){return t.previousIndex===e||(this._movesTail=null===this._movesTail?this._movesHead=t:this._movesTail._nextMoved=t),t}_addToRemovals(t){return null===this._unlinkedRecords&&(this._unlinkedRecords=new Sc),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,null===this._removalsTail?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,e){return t.item=e,this._identityChangesTail=null===this._identityChangesTail?this._identityChangesHead=t:this._identityChangesTail._nextIdentityChange=t,t}}class _c{constructor(t,e){this.item=t,this.trackById=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}}class Cc{constructor(){this._head=null,this._tail=null}add(t){null===this._head?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,e){let n;for(n=this._head;null!==n;n=n._nextDup)if((null===e||e<=n.currentIndex)&&Object.is(n.trackById,t))return n;return null}remove(t){const e=t._prevDup,n=t._nextDup;return null===e?this._head=n:e._nextDup=n,null===n?this._tail=e:n._prevDup=e,null===this._head}}class Sc{constructor(){this.map=new Map}put(t){const e=t.trackById;let n=this.map.get(e);n||(n=new Cc,this.map.set(e,n)),n.add(t)}get(t,e){const n=this.map.get(t);return n?n.get(t,e):null}remove(t){const e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}get isEmpty(){return 0===this.map.size}clear(){this.map.clear()}}function kc(t,e,n){const i=t.previousIndex;if(null===i)return i;let r=0;return n&&i{if(e&&e.key===n)this._maybeAddToChanges(e,t),this._appendAfter=e,e=e._next;else{const i=this._getOrCreateRecordForKey(n,t);e=this._insertBeforeOrAppend(e,i)}}),e){e._prev&&(e._prev._next=null),this._removalsHead=e;for(let t=e;null!==t;t=t._nextRemoved)t===this._mapHead&&(this._mapHead=null),this._records.delete(t.key),t._nextRemoved=t._next,t.previousValue=t.currentValue,t.currentValue=null,t._prev=null,t._next=null}return this._changesTail&&(this._changesTail._nextChanged=null),this._additionsTail&&(this._additionsTail._nextAdded=null),this.isDirty}_insertBeforeOrAppend(t,e){if(t){const n=t._prev;return e._next=t,e._prev=n,t._prev=e,n&&(n._next=e),t===this._mapHead&&(this._mapHead=e),this._appendAfter=t,t}return this._appendAfter?(this._appendAfter._next=e,e._prev=this._appendAfter):this._mapHead=e,this._appendAfter=e,null}_getOrCreateRecordForKey(t,e){if(this._records.has(t)){const n=this._records.get(t);this._maybeAddToChanges(n,e);const i=n._prev,r=n._next;return i&&(i._next=r),r&&(r._prev=i),n._next=null,n._prev=null,n}const n=new Dc(t);return this._records.set(t,n),n.currentValue=e,this._addToAdditions(n),n}_reset(){if(this.isDirty){let t;for(this._previousMapHead=this._mapHead,t=this._previousMapHead;null!==t;t=t._next)t._nextPrevious=t._next;for(t=this._changesHead;null!==t;t=t._nextChanged)t.previousValue=t.currentValue;for(t=this._additionsHead;null!=t;t=t._nextAdded)t.previousValue=t.currentValue;this._changesHead=this._changesTail=null,this._additionsHead=this._additionsTail=null,this._removalsHead=null}}_maybeAddToChanges(t,e){Object.is(e,t.currentValue)||(t.previousValue=t.currentValue,t.currentValue=e,this._addToChanges(t))}_addToAdditions(t){null===this._additionsHead?this._additionsHead=this._additionsTail=t:(this._additionsTail._nextAdded=t,this._additionsTail=t)}_addToChanges(t){null===this._changesHead?this._changesHead=this._changesTail=t:(this._changesTail._nextChanged=t,this._changesTail=t)}_forEach(t,e){t instanceof Map?t.forEach(e):Object.keys(t).forEach(n=>e(t[n],n))}}class Dc{constructor(t){this.key=t,this.previousValue=null,this.currentValue=null,this._nextPrevious=null,this._next=null,this._prev=null,this._nextAdded=null,this._nextRemoved=null,this._nextChanged=null}}let Tc=(()=>{class t{constructor(t){this.factories=t}static create(e,n){if(null!=n){const t=n.factories.slice();e=e.concat(t)}return new t(e)}static extend(e){return{provide:t,useFactory:n=>{if(!n)throw new Error("Cannot extend IterableDiffers without a parent injector");return t.create(e,n)},deps:[[t,new st,new it]]}}find(t){const e=this.factories.find(e=>e.supports(t));if(null!=e)return e;throw new Error(`Cannot find a differ supporting object '${t}' of type '${n=t,n.name||typeof n}'`);var n}}return t.\u0275prov=ut({token:t,providedIn:"root",factory:()=>new t([new bc])}),t})(),Rc=(()=>{class t{constructor(t){this.factories=t}static create(e,n){if(n){const t=n.factories.slice();e=e.concat(t)}return new t(e)}static extend(e){return{provide:t,useFactory:n=>{if(!n)throw new Error("Cannot extend KeyValueDiffers without a parent injector");return t.create(e,n)},deps:[[t,new st,new it]]}}find(t){const e=this.factories.find(e=>e.supports(t));if(e)return e;throw new Error(`Cannot find a differ supporting object '${t}'`)}}return t.\u0275prov=ut({token:t,providedIn:"root",factory:()=>new t([new Ec])}),t})();const Fc=[new Ec],Mc=new Tc([new bc]),Lc=new Rc(Fc);let $c=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>Oc(t,uc),t})();const Oc=function(t,e){return wo(t,e,gn(),dn())};let Ic=(()=>{class t{}return t.__NG_ELEMENT_ID__=()=>Nc(t,uc),t})();const Nc=function(t,e){return xo(t,e,gn(),dn())},Pc={};class Bc extends cc{constructor(t){super(),this.ngModule=t}resolveComponentFactory(t){const e=xe(t);return new Hc(e,this.ngModule)}}function Uc(t){const e=[];for(let n in t)t.hasOwnProperty(n)&&e.push({propName:t[n],templateName:n});return e}const Vc=new Pt("SCHEDULER_TOKEN",{providedIn:"root",factory:()=>Ie});class Hc extends ac{constructor(t,e){super(),this.componentDef=t,this.ngModule=e,this.componentType=t.type,this.selector=t.selectors.map(fs).join(","),this.ngContentSelectors=t.ngContentSelectors?t.ngContentSelectors:[],this.isBoundToModule=!!e}get inputs(){return Uc(this.componentDef.inputs)}get outputs(){return Uc(this.componentDef.outputs)}create(t,e,n,i){const r=(i=i||this.ngModule)?function(t,e){return{get:(n,i,r)=>{const s=t.get(n,Pc,r);return s!==Pc||i===Pc?s:e.get(n,i,r)}}}(t,i.injector):t,s=r.get(dc,Xe),o=r.get(mc,null),a=s.createRenderer(null,this.componentDef),l=this.componentDef.selectors[0][0]||"div",c=n?function(t,e,n){if(Ye(t))return t.selectRootElement(e,n===ue.ShadowDom);let i="string"==typeof e?t.querySelector(e):e;return i.textContent="",i}(a,n,this.componentDef.encapsulation):Fr(s.createRenderer(null,this.componentDef),l,function(t){const e=t.toLowerCase();return"svg"===e?Ge:"math"===e?"http://www.w3.org/1998/MathML/":null}(l)),u=this.componentDef.onPush?576:528,h={components:[],scheduler:Ie,clean:ao,playerHandler:null,flags:0},d=Is(0,null,null,1,0,null,null,null,null,null),f=Ss(null,d,h,u,null,null,s,a,o,r);let p,g;$n(f);try{const t=function(t,e,n,i,r,s){const o=n[1];n[20]=t;const a=ks(o,20,2,"#host",null),l=a.mergedAttrs=e.hostAttrs;null!==l&&(Vo(a,l,!0),null!==t&&(Zn(r,t,l),null!==a.classes&&es(r,t,a.classes),null!==a.styles&&ts(r,t,a.styles)));const c=i.createRenderer(t,e),u=Ss(n,Os(e),null,e.onPush?64:16,n[20],a,i,c,null,null);return o.firstCreatePass&&(pi(ui(a,n),o,e.type),zs(o,a),Gs(a,n.length,1)),no(n,u),n[20]=u}(c,this.componentDef,f,s,a);if(c)if(n)Zn(a,c,["ng-version",yc.full]);else{const{attrs:t,classes:e}=function(t){const e=[],n=[];let i=1,r=2;for(;i0&&es(a,c,e.join(" "))}if(g=tn(d,Se),void 0!==e){const t=g.projection=[];for(let n=0;nt(o,e)),e.contentQueries){const t=gn();e.contentQueries(1,o,t.directiveStart)}const a=gn();return!s.firstCreatePass||null===e.hostBindings&&null===e.hostAttrs||(Vn(a.index),Hs(n[1],a,0,a.directiveStart,a.directiveEnd,e),js(e,o)),o}(t,this.componentDef,f,h,[Ho]),Ds(d,f,null)}finally{Bn()}return new jc(this.componentType,p,bo(uc,g,f),f,g)}}class jc extends class{}{constructor(t,e,n,i,r){super(),this.location=n,this._rootLView=i,this._tNode=r,this.destroyCbs=[],this.instance=e,this.hostView=this.changeDetectorRef=new po(i),this.componentType=t}get injector(){return new Si(this._tNode,this._rootLView)}destroy(){this.destroyCbs&&(this.destroyCbs.forEach(t=>t()),this.destroyCbs=null,!this.hostView.destroyed&&this.hostView.destroy())}onDestroy(t){this.destroyCbs&&this.destroyCbs.push(t)}}const zc=new Map;class Wc extends Zt{constructor(t,e){super(),this._parent=e,this._bootstrapComponents=[],this.injector=this,this.destroyCbs=[],this.componentFactoryResolver=new Bc(this);const n=Ce(t),i=t[$t]||null;i&&dl(i),this._bootstrapComponents=Pe(n.bootstrap),this._r3Injector=Fo(t,e,[{provide:Zt,useValue:this},{provide:cc,useValue:this.componentFactoryResolver}],bt(t)),this._r3Injector._resolveInjectorDefTypes(),this.instance=this.get(t)}get(t,e=Bo.THROW_IF_NOT_FOUND,n=at.Default){return t===Bo||t===Zt||t===Bt?this:this._r3Injector.get(t,e,n)}destroy(){const t=this._r3Injector;!t.destroyed&&t.destroy(),this.destroyCbs.forEach(t=>t()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}}class Gc extends te{constructor(t){super(),this.moduleType=t,null!==Ce(t)&&function(t){const e=new Set;!function t(n){const i=Ce(n,!0),r=i.id;null!==r&&(function(t,e,n){if(e&&e!==n)throw new Error(`Duplicate module registered for ${t} - ${bt(e)} vs ${bt(e.name)}`)}(r,zc.get(r),n),zc.set(r,n));const s=Pe(i.imports);for(const o of s)e.has(o)||(e.add(o),t(o))}(t)}(t)}create(t){return new Wc(this.moduleType,t)}}function Kc(t,e,n){const i=Cn()+t,r=dn();return r[i]===ps?Zo(r,i,n?e.call(n):e()):function(t,e){return t[e]}(r,i)}function qc(t,e,n,i){return Qc(dn(),Cn(),t,e,n,i)}function Yc(t,e,n,i,r){return function(t,e,n,i,r,s,o){const a=e+n;return ea(t,a,r,s)?Zo(t,a+2,o?i.call(o,r,s):i(r,s)):Jc(t,a+2)}(dn(),Cn(),t,e,n,i,r)}function Xc(t,e,n,i,r,s){return function(t,e,n,i,r,s,o,a){const l=e+n;return function(t,e,n,i,r){const s=ea(t,e,n,i);return ta(t,e+2,r)||s}(t,l,r,s,o)?Zo(t,l+3,a?i.call(a,r,s,o):i(r,s,o)):Jc(t,l+3)}(dn(),Cn(),t,e,n,i,r,s)}function Jc(t,e){const n=t[e];return n===ps?void 0:n}function Qc(t,e,n,i,r,s){const o=e+n;return ta(t,o,r)?Zo(t,o+1,s?i.call(s,r):i(r)):Jc(t,o+1)}const Zc=class extends C{constructor(t=!1){super(),this.__isAsync=t}emit(t){super.next(t)}subscribe(t,e,n){let i,r=t=>null,s=()=>null;t&&"object"==typeof t?(i=this.__isAsync?e=>{setTimeout(()=>t.next(e))}:e=>{t.next(e)},t.error&&(r=this.__isAsync?e=>{setTimeout(()=>t.error(e))}:e=>{t.error(e)}),t.complete&&(s=this.__isAsync?()=>{setTimeout(()=>t.complete())}:()=>{t.complete()})):(i=this.__isAsync?e=>{setTimeout(()=>t(e))}:e=>{t(e)},e&&(r=this.__isAsync?t=>{setTimeout(()=>e(t))}:t=>{e(t)}),n&&(s=this.__isAsync?()=>{setTimeout(()=>n())}:()=>{n()}));const o=super.subscribe(i,r,s);return t instanceof h&&t.add(o),o}};function tu(){return this._results[Yo()]()}class eu{constructor(){this.dirty=!0,this._results=[],this.changes=new Zc,this.length=0;const t=Yo(),e=eu.prototype;e[t]||(e[t]=tu)}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,e){return this._results.reduce(t,e)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t){this._results=ee(t),this.dirty=!1,this.length=this._results.length,this.last=this._results[this.length-1],this.first=this._results[0]}notifyOnChanges(){this.changes.emit(this)}setDirty(){this.dirty=!0}destroy(){this.changes.complete(),this.changes.unsubscribe()}}class nu{constructor(t){this.queryList=t,this.matches=null}clone(){return new nu(this.queryList)}setDirty(){this.queryList.setDirty()}}class iu{constructor(t=[]){this.queries=t}createEmbeddedView(t){const e=t.queries;if(null!==e){const n=null!==t.contentQueries?t.contentQueries[0]:e.length,i=[];for(let t=0;t0)i.push(o[t/2]);else{const r=s[t+1],o=e[-n];for(let t=ke;t{class t{constructor(t){this.appInits=t,this.initialized=!1,this.done=!1,this.donePromise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}runInitializers(){if(this.initialized)return;const t=[],e=()=>{this.done=!0,this.resolve()};if(this.appInits)for(let n=0;n{e()}).catch(t=>{this.reject(t)}),0===t.length&&e(),this.initialized=!0}}return t.\u0275fac=function(e){return new(e||t)(Yt(_u,8))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();const Su=new Pt("AppId"),ku={provide:Su,useFactory:function(){return`${Eu()}${Eu()}${Eu()}`},deps:[]};function Eu(){return String.fromCharCode(97+Math.floor(25*Math.random()))}const Au=new Pt("Platform Initializer"),Du=new Pt("Platform ID"),Tu=new Pt("appBootstrapListener");let Ru=(()=>{class t{log(t){console.log(t)}warn(t){console.warn(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();const Fu=new Pt("LocaleId"),Mu=new Pt("DefaultCurrencyCode");class Lu{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}}const $u=function(t){return new Gc(t)},Ou=$u,Iu=function(t){return Promise.resolve($u(t))},Nu=function(t){const e=$u(t),n=Pe(Ce(t).declarations).reduce((t,e)=>{const n=xe(e);return n&&t.push(new Hc(n)),t},[]);return new Lu(e,n)},Pu=Nu,Bu=function(t){return Promise.resolve(Nu(t))};let Uu=(()=>{class t{constructor(){this.compileModuleSync=Ou,this.compileModuleAsync=Iu,this.compileModuleAndAllComponentsSync=Pu,this.compileModuleAndAllComponentsAsync=Bu}clearCache(){}clearCacheFor(t){}getModuleId(t){}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();const Vu=(()=>Promise.resolve(0))();function Hu(t){"undefined"==typeof Zone?Vu.then(()=>{t&&t.apply(null,null)}):Zone.current.scheduleMicroTask("scheduleMicrotask",t)}class ju{constructor({enableLongStackTrace:t=!1,shouldCoalesceEventChangeDetection:e=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Zc(!1),this.onMicrotaskEmpty=new Zc(!1),this.onStable=new Zc(!1),this.onError=new Zc(!1),"undefined"==typeof Zone)throw new Error("In this configuration Angular requires Zone.js");Zone.assertZonePatched();const n=this;n._nesting=0,n._outer=n._inner=Zone.current,Zone.wtfZoneSpec&&(n._inner=n._inner.fork(Zone.wtfZoneSpec)),Zone.TaskTrackingZoneSpec&&(n._inner=n._inner.fork(new Zone.TaskTrackingZoneSpec)),t&&Zone.longStackTraceZoneSpec&&(n._inner=n._inner.fork(Zone.longStackTraceZoneSpec)),n.shouldCoalesceEventChangeDetection=e,n.lastRequestAnimationFrameId=-1,n.nativeRequestAnimationFrame=function(){let t=Tt.requestAnimationFrame,e=Tt.cancelAnimationFrame;if("undefined"!=typeof Zone&&t&&e){const n=t[Zone.__symbol__("OriginalDelegate")];n&&(t=n);const i=e[Zone.__symbol__("OriginalDelegate")];i&&(e=i)}return{nativeRequestAnimationFrame:t,nativeCancelAnimationFrame:e}}().nativeRequestAnimationFrame,function(t){const e=!!t.shouldCoalesceEventChangeDetection&&t.nativeRequestAnimationFrame&&(()=>{!function(t){-1===t.lastRequestAnimationFrameId&&(t.lastRequestAnimationFrameId=t.nativeRequestAnimationFrame.call(Tt,()=>{t.fakeTopEventTask||(t.fakeTopEventTask=Zone.root.scheduleEventTask("fakeTopEventTask",()=>{t.lastRequestAnimationFrameId=-1,Ku(t),Gu(t)},void 0,()=>{},()=>{})),t.fakeTopEventTask.invoke()}),Ku(t))}(t)});t._inner=t._inner.fork({name:"angular",properties:{isAngularZone:!0,maybeDelayChangeDetection:e},onInvokeTask:(n,i,r,s,o,a)=>{try{return qu(t),n.invokeTask(r,s,o,a)}finally{e&&"eventTask"===s.type&&e(),Yu(t)}},onInvoke:(e,n,i,r,s,o,a)=>{try{return qu(t),e.invoke(i,r,s,o,a)}finally{Yu(t)}},onHasTask:(e,n,i,r)=>{e.hasTask(i,r),n===i&&("microTask"==r.change?(t._hasPendingMicrotasks=r.microTask,Ku(t),Gu(t)):"macroTask"==r.change&&(t.hasPendingMacrotasks=r.macroTask))},onHandleError:(e,n,i,r)=>(e.handleError(i,r),t.runOutsideAngular(()=>t.onError.emit(r)),!1)})}(n)}static isInAngularZone(){return!0===Zone.current.get("isAngularZone")}static assertInAngularZone(){if(!ju.isInAngularZone())throw new Error("Expected to be in Angular Zone, but it is not!")}static assertNotInAngularZone(){if(ju.isInAngularZone())throw new Error("Expected to not be in Angular Zone, but it is!")}run(t,e,n){return this._inner.run(t,e,n)}runTask(t,e,n,i){const r=this._inner,s=r.scheduleEventTask("NgZoneEvent: "+i,t,Wu,zu,zu);try{return r.runTask(s,e,n)}finally{r.cancelTask(s)}}runGuarded(t,e,n){return this._inner.runGuarded(t,e,n)}runOutsideAngular(t){return this._outer.run(t)}}function zu(){}const Wu={};function Gu(t){if(0==t._nesting&&!t.hasPendingMicrotasks&&!t.isStable)try{t._nesting++,t.onMicrotaskEmpty.emit(null)}finally{if(t._nesting--,!t.hasPendingMicrotasks)try{t.runOutsideAngular(()=>t.onStable.emit(null))}finally{t.isStable=!0}}}function Ku(t){t.hasPendingMicrotasks=!!(t._hasPendingMicrotasks||t.shouldCoalesceEventChangeDetection&&-1!==t.lastRequestAnimationFrameId)}function qu(t){t._nesting++,t.isStable&&(t.isStable=!1,t.onUnstable.emit(null))}function Yu(t){t._nesting--,Gu(t)}class Xu{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Zc,this.onMicrotaskEmpty=new Zc,this.onStable=new Zc,this.onError=new Zc}run(t,e,n){return t.apply(e,n)}runGuarded(t,e,n){return t.apply(e,n)}runOutsideAngular(t){return t()}runTask(t,e,n,i){return t.apply(e,n)}}let Ju=(()=>{class t{constructor(t){this._ngZone=t,this._pendingCount=0,this._isZoneStable=!0,this._didWork=!1,this._callbacks=[],this.taskTrackingZone=null,this._watchAngularEvents(),t.run(()=>{this.taskTrackingZone="undefined"==typeof Zone?null:Zone.current.get("TaskTrackingZone")})}_watchAngularEvents(){this._ngZone.onUnstable.subscribe({next:()=>{this._didWork=!0,this._isZoneStable=!1}}),this._ngZone.runOutsideAngular(()=>{this._ngZone.onStable.subscribe({next:()=>{ju.assertNotInAngularZone(),Hu(()=>{this._isZoneStable=!0,this._runCallbacksIfReady()})}})})}increasePendingRequestCount(){return this._pendingCount+=1,this._didWork=!0,this._pendingCount}decreasePendingRequestCount(){if(this._pendingCount-=1,this._pendingCount<0)throw new Error("pending async requests below zero");return this._runCallbacksIfReady(),this._pendingCount}isStable(){return this._isZoneStable&&0===this._pendingCount&&!this._ngZone.hasPendingMacrotasks}_runCallbacksIfReady(){if(this.isStable())Hu(()=>{for(;0!==this._callbacks.length;){let t=this._callbacks.pop();clearTimeout(t.timeoutId),t.doneCb(this._didWork)}this._didWork=!1});else{let t=this.getPendingTasks();this._callbacks=this._callbacks.filter(e=>!e.updateCb||!e.updateCb(t)||(clearTimeout(e.timeoutId),!1)),this._didWork=!0}}getPendingTasks(){return this.taskTrackingZone?this.taskTrackingZone.macroTasks.map(t=>({source:t.source,creationLocation:t.creationLocation,data:t.data})):[]}addCallback(t,e,n){let i=-1;e&&e>0&&(i=setTimeout(()=>{this._callbacks=this._callbacks.filter(t=>t.timeoutId!==i),t(this._didWork,this.getPendingTasks())},e)),this._callbacks.push({doneCb:t,timeoutId:i,updateCb:n})}whenStable(t,e,n){if(n&&!this.taskTrackingZone)throw new Error('Task tracking zone is required when passing an update callback to whenStable(). Is "zone.js/dist/task-tracking.js" loaded?');this.addCallback(t,e,n),this._runCallbacksIfReady()}getPendingRequestCount(){return this._pendingCount}findProviders(t,e,n){return[]}}return t.\u0275fac=function(e){return new(e||t)(Yt(ju))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),Qu=(()=>{class t{constructor(){this._applications=new Map,eh.addToWindow(this)}registerApplication(t,e){this._applications.set(t,e)}unregisterApplication(t){this._applications.delete(t)}unregisterAllApplications(){this._applications.clear()}getTestability(t){return this._applications.get(t)||null}getAllTestabilities(){return Array.from(this._applications.values())}getAllRootElements(){return Array.from(this._applications.keys())}findTestabilityInTree(t,e=!0){return eh.findTestabilityInTree(this,t,e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();class Zu{addToWindow(t){}findTestabilityInTree(t,e,n){return null}}let th,eh=new Zu;const nh=new Pt("AllowMultipleToken");class ih{constructor(t,e){this.name=t,this.token=e}}function rh(t,e,n=[]){const i=`Platform: ${e}`,r=new Pt(i);return(e=[])=>{let s=sh();if(!s||s.injector.get(nh,!1))if(t)t(n.concat(e).concat({provide:r,useValue:!0}));else{const t=n.concat(e).concat({provide:r,useValue:!0},{provide:ko,useValue:"platform"});!function(t){if(th&&!th.destroyed&&!th.injector.get(nh,!1))throw new Error("There can be only one platform. Destroy the previous one to create a new one.");th=t.get(oh);const e=t.get(Au,null);e&&e.forEach(t=>t())}(Bo.create({providers:t,name:i}))}return function(t){const e=sh();if(!e)throw new Error("No platform exists!");if(!e.injector.get(t,null))throw new Error("A platform with a different configuration has been created. Please destroy it first.");return e}(r)}}function sh(){return th&&!th.destroyed?th:null}let oh=(()=>{class t{constructor(t){this._injector=t,this._modules=[],this._destroyListeners=[],this._destroyed=!1}bootstrapModuleFactory(t,e){const n=function(t,e){let n;return n="noop"===t?new Xu:("zone.js"===t?void 0:t)||new ju({enableLongStackTrace:zi(),shouldCoalesceEventChangeDetection:e}),n}(e?e.ngZone:void 0,e&&e.ngZoneEventCoalescing||!1),i=[{provide:ju,useValue:n}];return n.run(()=>{const e=Bo.create({providers:i,parent:this.injector,name:t.moduleType.name}),r=t.create(e),s=r.injector.get(Ri,null);if(!s)throw new Error("No ErrorHandler. Is platform module (BrowserModule) included?");return r.onDestroy(()=>ch(this._modules,r)),n.runOutsideAngular(()=>n.onError.subscribe({next:t=>{s.handleError(t)}})),function(t,e,n){try{const i=n();return ma(i)?i.catch(n=>{throw e.runOutsideAngular(()=>t.handleError(n)),n}):i}catch(i){throw e.runOutsideAngular(()=>t.handleError(i)),i}}(s,n,()=>{const t=r.injector.get(Cu);return t.runInitializers(),t.donePromise.then(()=>(dl(r.injector.get(Fu,al)||al),this._moduleDoBootstrap(r),r))})})}bootstrapModule(t,e=[]){const n=ah({},e);return function(t,e,n){const i=new Gc(n);return Promise.resolve(i)}(0,0,t).then(t=>this.bootstrapModuleFactory(t,n))}_moduleDoBootstrap(t){const e=t.injector.get(lh);if(t._bootstrapComponents.length>0)t._bootstrapComponents.forEach(t=>e.bootstrap(t));else{if(!t.instance.ngDoBootstrap)throw new Error(`The module ${bt(t.instance.constructor)} was bootstrapped, but it does not declare "@NgModule.bootstrap" components nor a "ngDoBootstrap" method. Please define one of these.`);t.instance.ngDoBootstrap(e)}this._modules.push(t)}onDestroy(t){this._destroyListeners.push(t)}get injector(){return this._injector}destroy(){if(this._destroyed)throw new Error("The platform has already been destroyed!");this._modules.slice().forEach(t=>t.destroy()),this._destroyListeners.forEach(t=>t()),this._destroyed=!0}get destroyed(){return this._destroyed}}return t.\u0275fac=function(e){return new(e||t)(Yt(Bo))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();function ah(t,e){return Array.isArray(e)?e.reduce(ah,t):Object.assign(Object.assign({},t),e)}let lh=(()=>{class t{constructor(t,e,n,i,r,s){this._zone=t,this._console=e,this._injector=n,this._exceptionHandler=i,this._componentFactoryResolver=r,this._initStatus=s,this._bootstrapListeners=[],this._views=[],this._runningTick=!1,this._enforceNoNewChanges=!1,this._stable=!0,this.componentTypes=[],this.components=[],this._enforceNoNewChanges=zi(),this._zone.onMicrotaskEmpty.subscribe({next:()=>{this._zone.run(()=>{this.tick()})}});const o=new y(t=>{this._stable=this._zone.isStable&&!this._zone.hasPendingMacrotasks&&!this._zone.hasPendingMicrotasks,this._zone.runOutsideAngular(()=>{t.next(this._stable),t.complete()})}),a=new y(t=>{let e;this._zone.runOutsideAngular(()=>{e=this._zone.onStable.subscribe(()=>{ju.assertNotInAngularZone(),Hu(()=>{this._stable||this._zone.hasPendingMacrotasks||this._zone.hasPendingMicrotasks||(this._stable=!0,t.next(!0))})})});const n=this._zone.onUnstable.subscribe(()=>{ju.assertInAngularZone(),this._stable&&(this._stable=!1,this._zone.runOutsideAngular(()=>{t.next(!1)}))});return()=>{e.unsubscribe(),n.unsubscribe()}});this.isStable=W(o,a.pipe(t=>{return G()((e=Q,function(t){let n;n="function"==typeof e?e:function(){return e};const i=Object.create(t,X);return i.source=t,i.subjectFactory=n,i})(t));var e}))}bootstrap(t,e){if(!this._initStatus.done)throw new Error("Cannot bootstrap as there are still asynchronous initializers running. Bootstrap components in the `ngDoBootstrap` method of the root module.");let n;n=t instanceof ac?t:this._componentFactoryResolver.resolveComponentFactory(t),this.componentTypes.push(n.componentType);const i=n.isBoundToModule?void 0:this._injector.get(Zt),r=n.create(Bo.NULL,[],e||n.selector,i);r.onDestroy(()=>{this._unloadComponent(r)});const s=r.injector.get(Ju,null);return s&&r.injector.get(Qu).registerApplication(r.location.nativeElement,s),this._loadComponent(r),zi()&&this._console.log("Angular is running in development mode. Call enableProdMode() to enable production mode."),r}tick(){if(this._runningTick)throw new Error("ApplicationRef.tick is called recursively");try{this._runningTick=!0;for(let t of this._views)t.detectChanges();if(this._enforceNoNewChanges)for(let t of this._views)t.checkNoChanges()}catch(t){this._zone.runOutsideAngular(()=>this._exceptionHandler.handleError(t))}finally{this._runningTick=!1}}attachView(t){const e=t;this._views.push(e),e.attachToAppRef(this)}detachView(t){const e=t;ch(this._views,e),e.detachFromAppRef()}_loadComponent(t){this.attachView(t.hostView),this.tick(),this.components.push(t),this._injector.get(Tu,[]).concat(this._bootstrapListeners).forEach(e=>e(t))}_unloadComponent(t){this.detachView(t.hostView),ch(this.components,t)}ngOnDestroy(){this._views.slice().forEach(t=>t.destroy())}get viewCount(){return this._views.length}}return t.\u0275fac=function(e){return new(e||t)(Yt(ju),Yt(Ru),Yt(Bo),Yt(Ri),Yt(cc),Yt(Cu))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();function ch(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class uh{}class hh{}const dh={factoryPathPrefix:"",factoryPathSuffix:".ngfactory"};let fh=(()=>{class t{constructor(t,e){this._compiler=t,this._config=e||dh}load(t){return this.loadAndCompile(t)}loadAndCompile(t){let[e,i]=t.split("#");return void 0===i&&(i="default"),n("zn8P")(e).then(t=>t[i]).then(t=>ph(t,e,i)).then(t=>this._compiler.compileModuleAsync(t))}loadFactory(t){let[e,i]=t.split("#"),r="NgFactory";return void 0===i&&(i="default",r=""),n("zn8P")(this._config.factoryPathPrefix+e+this._config.factoryPathSuffix).then(t=>t[i+r]).then(t=>ph(t,e,i))}}return t.\u0275fac=function(e){return new(e||t)(Yt(Uu),Yt(hh,8))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();function ph(t,e,n){if(!t)throw new Error(`Cannot find '${n}' in '${e}'`);return t}const gh=rh(null,"core",[{provide:Du,useValue:"unknown"},{provide:oh,deps:[Bo]},{provide:Qu,deps:[]},{provide:Ru,deps:[]}]),mh=[{provide:lh,useClass:lh,deps:[ju,Ru,Bo,Ri,cc,Cu]},{provide:Vc,deps:[ju],useFactory:function(t){let e=[];return t.onStable.subscribe(()=>{for(;e.length;)e.pop()()}),function(t){e.push(t)}}},{provide:Cu,useClass:Cu,deps:[[new it,_u]]},{provide:Uu,useClass:Uu,deps:[]},ku,{provide:Tc,useFactory:function(){return Mc},deps:[]},{provide:Rc,useFactory:function(){return Lc},deps:[]},{provide:Fu,useFactory:function(t){return dl(t=t||"undefined"!=typeof $localize&&$localize.locale||al),t},deps:[[new nt(Fu),new it,new st]]},{provide:Mu,useValue:"USD"}];let vh=(()=>{class t{constructor(t){}}return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)(Yt(lh))},providers:mh}),t})(),yh=null;function bh(){return yh}const wh=new Pt("DocumentToken");let xh=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:_h,token:t,providedIn:"platform"}),t})();function _h(){return Yt(Sh)}const Ch=new Pt("Location Initialized");let Sh=(()=>{class t extends xh{constructor(t){super(),this._doc=t,this._init()}_init(){this.location=bh().getLocation(),this._history=bh().getHistory()}getBaseHrefFromDOM(){return bh().getBaseHref(this._doc)}onPopState(t){bh().getGlobalEventTarget(this._doc,"window").addEventListener("popstate",t,!1)}onHashChange(t){bh().getGlobalEventTarget(this._doc,"window").addEventListener("hashchange",t,!1)}get href(){return this.location.href}get protocol(){return this.location.protocol}get hostname(){return this.location.hostname}get port(){return this.location.port}get pathname(){return this.location.pathname}get search(){return this.location.search}get hash(){return this.location.hash}set pathname(t){this.location.pathname=t}pushState(t,e,n){kh()?this._history.pushState(t,e,n):this.location.hash=n}replaceState(t,e,n){kh()?this._history.replaceState(t,e,n):this.location.hash=n}forward(){this._history.forward()}back(){this._history.back()}getState(){return this._history.state}}return t.\u0275fac=function(e){return new(e||t)(Yt(wh))},t.\u0275prov=ut({factory:Eh,token:t,providedIn:"platform"}),t})();function kh(){return!!window.history.pushState}function Eh(){return new Sh(Yt(wh))}function Ah(t,e){if(0==t.length)return e;if(0==e.length)return t;let n=0;return t.endsWith("/")&&n++,e.startsWith("/")&&n++,2==n?t+e.substring(1):1==n?t+e:t+"/"+e}function Dh(t){const e=t.match(/#|\?|$/),n=e&&e.index||t.length;return t.slice(0,n-("/"===t[n-1]?1:0))+t.slice(n)}function Th(t){return t&&"?"!==t[0]?"?"+t:t}let Rh=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:Fh,token:t,providedIn:"root"}),t})();function Fh(t){const e=Yt(wh).location;return new Lh(Yt(xh),e&&e.origin||"")}const Mh=new Pt("appBaseHref");let Lh=(()=>{class t extends Rh{constructor(t,e){if(super(),this._platformLocation=t,null==e&&(e=this._platformLocation.getBaseHrefFromDOM()),null==e)throw new Error("No base href set. Please provide a value for the APP_BASE_HREF token or add a base element to the document.");this._baseHref=e}onPopState(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)}getBaseHref(){return this._baseHref}prepareExternalUrl(t){return Ah(this._baseHref,t)}path(t=!1){const e=this._platformLocation.pathname+Th(this._platformLocation.search),n=this._platformLocation.hash;return n&&t?`${e}${n}`:e}pushState(t,e,n,i){const r=this.prepareExternalUrl(n+Th(i));this._platformLocation.pushState(t,e,r)}replaceState(t,e,n,i){const r=this.prepareExternalUrl(n+Th(i));this._platformLocation.replaceState(t,e,r)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}}return t.\u0275fac=function(e){return new(e||t)(Yt(xh),Yt(Mh,8))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),$h=(()=>{class t extends Rh{constructor(t,e){super(),this._platformLocation=t,this._baseHref="",null!=e&&(this._baseHref=e)}onPopState(t){this._platformLocation.onPopState(t),this._platformLocation.onHashChange(t)}getBaseHref(){return this._baseHref}path(t=!1){let e=this._platformLocation.hash;return null==e&&(e="#"),e.length>0?e.substring(1):e}prepareExternalUrl(t){const e=Ah(this._baseHref,t);return e.length>0?"#"+e:e}pushState(t,e,n,i){let r=this.prepareExternalUrl(n+Th(i));0==r.length&&(r=this._platformLocation.pathname),this._platformLocation.pushState(t,e,r)}replaceState(t,e,n,i){let r=this.prepareExternalUrl(n+Th(i));0==r.length&&(r=this._platformLocation.pathname),this._platformLocation.replaceState(t,e,r)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}}return t.\u0275fac=function(e){return new(e||t)(Yt(xh),Yt(Mh,8))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),Oh=(()=>{class t{constructor(t,e){this._subject=new Zc,this._urlChangeListeners=[],this._platformStrategy=t;const n=this._platformStrategy.getBaseHref();this._platformLocation=e,this._baseHref=Dh(Nh(n)),this._platformStrategy.onPopState(t=>{this._subject.emit({url:this.path(!0),pop:!0,state:t.state,type:t.type})})}path(t=!1){return this.normalize(this._platformStrategy.path(t))}getState(){return this._platformLocation.getState()}isCurrentPathEqualTo(t,e=""){return this.path()==this.normalize(t+Th(e))}normalize(e){return t.stripTrailingSlash(function(t,e){return t&&e.startsWith(t)?e.substring(t.length):e}(this._baseHref,Nh(e)))}prepareExternalUrl(t){return t&&"/"!==t[0]&&(t="/"+t),this._platformStrategy.prepareExternalUrl(t)}go(t,e="",n=null){this._platformStrategy.pushState(n,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+Th(e)),n)}replaceState(t,e="",n=null){this._platformStrategy.replaceState(n,"",t,e),this._notifyUrlChangeListeners(this.prepareExternalUrl(t+Th(e)),n)}forward(){this._platformStrategy.forward()}back(){this._platformStrategy.back()}onUrlChange(t){this._urlChangeListeners.push(t),this._urlChangeSubscription||(this._urlChangeSubscription=this.subscribe(t=>{this._notifyUrlChangeListeners(t.url,t.state)}))}_notifyUrlChangeListeners(t="",e){this._urlChangeListeners.forEach(n=>n(t,e))}subscribe(t,e,n){return this._subject.subscribe({next:t,error:e,complete:n})}}return t.\u0275fac=function(e){return new(e||t)(Yt(Rh),Yt(xh))},t.normalizeQueryParams=Th,t.joinWithSlash=Ah,t.stripTrailingSlash=Dh,t.\u0275prov=ut({factory:Ih,token:t,providedIn:"root"}),t})();function Ih(){return new Oh(Yt(Rh),Yt(xh))}function Nh(t){return t.replace(/\/index.html$/,"")}var Ph=function(t){return t[t.Zero=0]="Zero",t[t.One=1]="One",t[t.Two=2]="Two",t[t.Few=3]="Few",t[t.Many=4]="Many",t[t.Other=5]="Other",t}({}),Bh=function(t){return t[t.Format=0]="Format",t[t.Standalone=1]="Standalone",t}({}),Uh=function(t){return t[t.Narrow=0]="Narrow",t[t.Abbreviated=1]="Abbreviated",t[t.Wide=2]="Wide",t[t.Short=3]="Short",t}({}),Vh=function(t){return t[t.Short=0]="Short",t[t.Medium=1]="Medium",t[t.Long=2]="Long",t[t.Full=3]="Full",t}({}),Hh=function(t){return t[t.Decimal=0]="Decimal",t[t.Group=1]="Group",t[t.List=2]="List",t[t.PercentSign=3]="PercentSign",t[t.PlusSign=4]="PlusSign",t[t.MinusSign=5]="MinusSign",t[t.Exponential=6]="Exponential",t[t.SuperscriptingExponent=7]="SuperscriptingExponent",t[t.PerMille=8]="PerMille",t[t[1/0]=9]="Infinity",t[t.NaN=10]="NaN",t[t.TimeSeparator=11]="TimeSeparator",t[t.CurrencyDecimal=12]="CurrencyDecimal",t[t.CurrencyGroup=13]="CurrencyGroup",t}({});function jh(t,e,n){const i=nl(t),r=Qh([i[sl.DayPeriodsFormat],i[sl.DayPeriodsStandalone]],e);return Qh(r,n)}function zh(t,e,n){const i=nl(t),r=Qh([i[sl.DaysFormat],i[sl.DaysStandalone]],e);return Qh(r,n)}function Wh(t,e,n){const i=nl(t),r=Qh([i[sl.MonthsFormat],i[sl.MonthsStandalone]],e);return Qh(r,n)}function Gh(t,e){return Qh(nl(t)[sl.DateFormat],e)}function Kh(t,e){return Qh(nl(t)[sl.TimeFormat],e)}function qh(t,e){return Qh(nl(t)[sl.DateTimeFormat],e)}function Yh(t,e){const n=nl(t),i=n[sl.NumberSymbols][e];if(void 0===i){if(e===Hh.CurrencyDecimal)return n[sl.NumberSymbols][Hh.Decimal];if(e===Hh.CurrencyGroup)return n[sl.NumberSymbols][Hh.Group]}return i}const Xh=il;function Jh(t){if(!t[sl.ExtraData])throw new Error(`Missing extra locale data for the locale "${t[sl.LocaleId]}". Use "registerLocaleData" to load new data. See the "I18n guide" on angular.io to know more.`)}function Qh(t,e){for(let n=e;n>-1;n--)if(void 0!==t[n])return t[n];throw new Error("Locale data API: locale data undefined")}function Zh(t){const[e,n]=t.split(":");return{hours:+e,minutes:+n}}const td=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/,ed={},nd=/((?:[^GyYMLwWdEabBhHmsSzZO']+)|(?:'(?:[^']|'')*')|(?:G{1,5}|y{1,4}|Y{1,4}|M{1,5}|L{1,5}|w{1,2}|W{1}|d{1,2}|E{1,6}|a{1,5}|b{1,5}|B{1,5}|h{1,2}|H{1,2}|m{1,2}|s{1,2}|S{1,3}|z{1,4}|Z{1,5}|O{1,4}))([\s\S]*)/;var id=function(t){return t[t.Short=0]="Short",t[t.ShortGMT=1]="ShortGMT",t[t.Long=2]="Long",t[t.Extended=3]="Extended",t}({}),rd=function(t){return t[t.FullYear=0]="FullYear",t[t.Month=1]="Month",t[t.Date=2]="Date",t[t.Hours=3]="Hours",t[t.Minutes=4]="Minutes",t[t.Seconds=5]="Seconds",t[t.FractionalSeconds=6]="FractionalSeconds",t[t.Day=7]="Day",t}({}),sd=function(t){return t[t.DayPeriods=0]="DayPeriods",t[t.Days=1]="Days",t[t.Months=2]="Months",t[t.Eras=3]="Eras",t}({});function od(t,e,n,i){let r=function(t){if(yd(t))return t;if("number"==typeof t&&!isNaN(t))return new Date(t);if("string"==typeof t){t=t.trim();const e=parseFloat(t);if(!isNaN(t-e))return new Date(e);if(/^(\d{4}-\d{1,2}-\d{1,2})$/.test(t)){const[e,n,i]=t.split("-").map(t=>+t);return new Date(e,n-1,i)}let n;if(n=t.match(td))return function(t){const e=new Date(0);let n=0,i=0;const r=t[8]?e.setUTCFullYear:e.setFullYear,s=t[8]?e.setUTCHours:e.setHours;t[9]&&(n=Number(t[9]+t[10]),i=Number(t[9]+t[11])),r.call(e,Number(t[1]),Number(t[2])-1,Number(t[3]));const o=Number(t[4]||0)-n,a=Number(t[5]||0)-i,l=Number(t[6]||0),c=Math.floor(1e3*parseFloat("0."+(t[7]||0)));return s.call(e,o,a,l,c),e}(n)}const e=new Date(t);if(!yd(e))throw new Error(`Unable to convert "${t}" into a date`);return e}(t);e=ad(n,e)||e;let s,o=[];for(;e;){if(s=nd.exec(e),!s){o.push(e);break}{o=o.concat(s.slice(1));const t=o.pop();if(!t)break;e=t}}let a=r.getTimezoneOffset();i&&(a=vd(i,a),r=function(t,e,n){const i=t.getTimezoneOffset();return function(t,e){return(t=new Date(t.getTime())).setMinutes(t.getMinutes()+e),t}(t,-1*(vd(e,i)-i))}(r,i));let l="";return o.forEach(t=>{const e=function(t){if(md[t])return md[t];let e;switch(t){case"G":case"GG":case"GGG":e=hd(sd.Eras,Uh.Abbreviated);break;case"GGGG":e=hd(sd.Eras,Uh.Wide);break;case"GGGGG":e=hd(sd.Eras,Uh.Narrow);break;case"y":e=ud(rd.FullYear,1,0,!1,!0);break;case"yy":e=ud(rd.FullYear,2,0,!0,!0);break;case"yyy":e=ud(rd.FullYear,3,0,!1,!0);break;case"yyyy":e=ud(rd.FullYear,4,0,!1,!0);break;case"Y":e=gd(1);break;case"YY":e=gd(2,!0);break;case"YYY":e=gd(3);break;case"YYYY":e=gd(4);break;case"M":case"L":e=ud(rd.Month,1,1);break;case"MM":case"LL":e=ud(rd.Month,2,1);break;case"MMM":e=hd(sd.Months,Uh.Abbreviated);break;case"MMMM":e=hd(sd.Months,Uh.Wide);break;case"MMMMM":e=hd(sd.Months,Uh.Narrow);break;case"LLL":e=hd(sd.Months,Uh.Abbreviated,Bh.Standalone);break;case"LLLL":e=hd(sd.Months,Uh.Wide,Bh.Standalone);break;case"LLLLL":e=hd(sd.Months,Uh.Narrow,Bh.Standalone);break;case"w":e=pd(1);break;case"ww":e=pd(2);break;case"W":e=pd(1,!0);break;case"d":e=ud(rd.Date,1);break;case"dd":e=ud(rd.Date,2);break;case"E":case"EE":case"EEE":e=hd(sd.Days,Uh.Abbreviated);break;case"EEEE":e=hd(sd.Days,Uh.Wide);break;case"EEEEE":e=hd(sd.Days,Uh.Narrow);break;case"EEEEEE":e=hd(sd.Days,Uh.Short);break;case"a":case"aa":case"aaa":e=hd(sd.DayPeriods,Uh.Abbreviated);break;case"aaaa":e=hd(sd.DayPeriods,Uh.Wide);break;case"aaaaa":e=hd(sd.DayPeriods,Uh.Narrow);break;case"b":case"bb":case"bbb":e=hd(sd.DayPeriods,Uh.Abbreviated,Bh.Standalone,!0);break;case"bbbb":e=hd(sd.DayPeriods,Uh.Wide,Bh.Standalone,!0);break;case"bbbbb":e=hd(sd.DayPeriods,Uh.Narrow,Bh.Standalone,!0);break;case"B":case"BB":case"BBB":e=hd(sd.DayPeriods,Uh.Abbreviated,Bh.Format,!0);break;case"BBBB":e=hd(sd.DayPeriods,Uh.Wide,Bh.Format,!0);break;case"BBBBB":e=hd(sd.DayPeriods,Uh.Narrow,Bh.Format,!0);break;case"h":e=ud(rd.Hours,1,-12);break;case"hh":e=ud(rd.Hours,2,-12);break;case"H":e=ud(rd.Hours,1);break;case"HH":e=ud(rd.Hours,2);break;case"m":e=ud(rd.Minutes,1);break;case"mm":e=ud(rd.Minutes,2);break;case"s":e=ud(rd.Seconds,1);break;case"ss":e=ud(rd.Seconds,2);break;case"S":e=ud(rd.FractionalSeconds,1);break;case"SS":e=ud(rd.FractionalSeconds,2);break;case"SSS":e=ud(rd.FractionalSeconds,3);break;case"Z":case"ZZ":case"ZZZ":e=dd(id.Short);break;case"ZZZZZ":e=dd(id.Extended);break;case"O":case"OO":case"OOO":case"z":case"zz":case"zzz":e=dd(id.ShortGMT);break;case"OOOO":case"ZZZZ":case"zzzz":e=dd(id.Long);break;default:return null}return md[t]=e,e}(t);l+=e?e(r,n,a):"''"===t?"'":t.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),l}function ad(t,e){const n=function(t){return nl(t)[sl.LocaleId]}(t);if(ed[n]=ed[n]||{},ed[n][e])return ed[n][e];let i="";switch(e){case"shortDate":i=Gh(t,Vh.Short);break;case"mediumDate":i=Gh(t,Vh.Medium);break;case"longDate":i=Gh(t,Vh.Long);break;case"fullDate":i=Gh(t,Vh.Full);break;case"shortTime":i=Kh(t,Vh.Short);break;case"mediumTime":i=Kh(t,Vh.Medium);break;case"longTime":i=Kh(t,Vh.Long);break;case"fullTime":i=Kh(t,Vh.Full);break;case"short":const e=ad(t,"shortTime"),n=ad(t,"shortDate");i=ld(qh(t,Vh.Short),[e,n]);break;case"medium":const r=ad(t,"mediumTime"),s=ad(t,"mediumDate");i=ld(qh(t,Vh.Medium),[r,s]);break;case"long":const o=ad(t,"longTime"),a=ad(t,"longDate");i=ld(qh(t,Vh.Long),[o,a]);break;case"full":const l=ad(t,"fullTime"),c=ad(t,"fullDate");i=ld(qh(t,Vh.Full),[l,c])}return i&&(ed[n][e]=i),i}function ld(t,e){return e&&(t=t.replace(/\{([^}]+)}/g,function(t,n){return null!=e&&n in e?e[n]:t})),t}function cd(t,e,n="-",i,r){let s="";(t<0||r&&t<=0)&&(r?t=1-t:(t=-t,s=n));let o=String(t);for(;o.length0||a>-n)&&(a+=n),t===rd.Hours)0===a&&-12===n&&(a=12);else if(t===rd.FractionalSeconds)return l=e,cd(a,3).substr(0,l);var l;const c=Yh(o,Hh.MinusSign);return cd(a,e,c,i,r)}}function hd(t,e,n=Bh.Format,i=!1){return function(r,s){return function(t,e,n,i,r,s){switch(n){case sd.Months:return Wh(e,r,i)[t.getMonth()];case sd.Days:return zh(e,r,i)[t.getDay()];case sd.DayPeriods:const o=t.getHours(),a=t.getMinutes();if(s){const t=function(t){const e=nl(t);return Jh(e),(e[sl.ExtraData][2]||[]).map(t=>"string"==typeof t?Zh(t):[Zh(t[0]),Zh(t[1])])}(e),n=function(t,e,n){const i=nl(t);Jh(i);const r=Qh([i[sl.ExtraData][0],i[sl.ExtraData][1]],e)||[];return Qh(r,n)||[]}(e,r,i),s=t.findIndex(t=>{if(Array.isArray(t)){const[e,n]=t,i=o>=e.hours&&a>=e.minutes,r=o0?Math.floor(r/60):Math.ceil(r/60);switch(t){case id.Short:return(r>=0?"+":"")+cd(o,2,s)+cd(Math.abs(r%60),2,s);case id.ShortGMT:return"GMT"+(r>=0?"+":"")+cd(o,1,s);case id.Long:return"GMT"+(r>=0?"+":"")+cd(o,2,s)+":"+cd(Math.abs(r%60),2,s);case id.Extended:return 0===i?"Z":(r>=0?"+":"")+cd(o,2,s)+":"+cd(Math.abs(r%60),2,s);default:throw new Error(`Unknown zone width "${t}"`)}}}function fd(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate()+(4-t.getDay()))}function pd(t,e=!1){return function(n,i){let r;if(e){const t=new Date(n.getFullYear(),n.getMonth(),1).getDay()-1,e=n.getDate();r=1+Math.floor((e+t)/7)}else{const t=fd(n),e=function(t){const e=new Date(t,0,1).getDay();return new Date(t,0,1+(e<=4?4:11)-e)}(t.getFullYear()),i=t.getTime()-e.getTime();r=1+Math.round(i/6048e5)}return cd(r,t,Yh(i,Hh.MinusSign))}}function gd(t,e=!1){return function(n,i){return cd(fd(n).getFullYear(),t,Yh(i,Hh.MinusSign),e)}}const md={};function vd(t,e){t=t.replace(/:/g,"");const n=Date.parse("Jan 01, 1970 00:00:00 "+t)/6e4;return isNaN(n)?e:n}function yd(t){return t instanceof Date&&!isNaN(t.valueOf())}class bd{}let wd=(()=>{class t extends bd{constructor(t){super(),this.locale=t}getPluralCategory(t,e){switch(Xh(e||this.locale)(t)){case Ph.Zero:return"zero";case Ph.One:return"one";case Ph.Two:return"two";case Ph.Few:return"few";case Ph.Many:return"many";default:return"other"}}}return t.\u0275fac=function(e){return new(e||t)(Yt(Fu))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();function xd(t,e){e=encodeURIComponent(e);for(const n of t.split(";")){const t=n.indexOf("="),[i,r]=-1==t?[n,""]:[n.slice(0,t),n.slice(t+1)];if(i.trim()===e)return decodeURIComponent(r)}return null}let _d=(()=>{class t{constructor(t,e,n,i){this._iterableDiffers=t,this._keyValueDiffers=e,this._ngEl=n,this._renderer=i,this._iterableDiffer=null,this._keyValueDiffer=null,this._initialClasses=[],this._rawClass=null}set klass(t){this._removeClasses(this._initialClasses),this._initialClasses="string"==typeof t?t.split(/\s+/):[],this._applyClasses(this._initialClasses),this._applyClasses(this._rawClass)}set ngClass(t){this._removeClasses(this._rawClass),this._applyClasses(this._initialClasses),this._iterableDiffer=null,this._keyValueDiffer=null,this._rawClass="string"==typeof t?t.split(/\s+/):t,this._rawClass&&(Jo(this._rawClass)?this._iterableDiffer=this._iterableDiffers.find(this._rawClass).create():this._keyValueDiffer=this._keyValueDiffers.find(this._rawClass).create())}ngDoCheck(){if(this._iterableDiffer){const t=this._iterableDiffer.diff(this._rawClass);t&&this._applyIterableChanges(t)}else if(this._keyValueDiffer){const t=this._keyValueDiffer.diff(this._rawClass);t&&this._applyKeyValueChanges(t)}}_applyKeyValueChanges(t){t.forEachAddedItem(t=>this._toggleClass(t.key,t.currentValue)),t.forEachChangedItem(t=>this._toggleClass(t.key,t.currentValue)),t.forEachRemovedItem(t=>{t.previousValue&&this._toggleClass(t.key,!1)})}_applyIterableChanges(t){t.forEachAddedItem(t=>{if("string"!=typeof t.item)throw new Error(`NgClass can only toggle CSS classes expressed as strings, got ${bt(t.item)}`);this._toggleClass(t.item,!0)}),t.forEachRemovedItem(t=>this._toggleClass(t.item,!1))}_applyClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(t=>this._toggleClass(t,!0)):Object.keys(t).forEach(e=>this._toggleClass(e,!!t[e])))}_removeClasses(t){t&&(Array.isArray(t)||t instanceof Set?t.forEach(t=>this._toggleClass(t,!1)):Object.keys(t).forEach(t=>this._toggleClass(t,!1)))}_toggleClass(t,e){(t=t.trim())&&t.split(/\s+/g).forEach(t=>{e?this._renderer.addClass(this._ngEl.nativeElement,t):this._renderer.removeClass(this._ngEl.nativeElement,t)})}}return t.\u0275fac=function(e){return new(e||t)(oa(Tc),oa(Rc),oa(uc),oa(pc))},t.\u0275dir=we({type:t,selectors:[["","ngClass",""]],inputs:{klass:["class","klass"],ngClass:"ngClass"}}),t})();class Cd{constructor(t,e,n,i){this.$implicit=t,this.ngForOf=e,this.index=n,this.count=i}get first(){return 0===this.index}get last(){return this.index===this.count-1}get even(){return this.index%2==0}get odd(){return!this.even}}let Sd=(()=>{class t{constructor(t,e,n){this._viewContainer=t,this._template=e,this._differs=n,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForOf(t){this._ngForOf=t,this._ngForOfDirty=!0}set ngForTrackBy(t){zi()&&null!=t&&"function"!=typeof t&&console&&console.warn&&console.warn(`trackBy must be a function, but received ${JSON.stringify(t)}. See https://angular.io/api/common/NgForOf#change-propagation for more information.`),this._trackByFn=t}get ngForTrackBy(){return this._trackByFn}set ngForTemplate(t){t&&(this._template=t)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;const n=this._ngForOf;if(!this._differ&&n)try{this._differ=this._differs.find(n).create(this.ngForTrackBy)}catch(e){throw new Error(`Cannot find a differ supporting object '${n}' of type '${t=n,t.name||typeof t}'. NgFor only supports binding to Iterables such as Arrays.`)}}var t;if(this._differ){const t=this._differ.diff(this._ngForOf);t&&this._applyChanges(t)}}_applyChanges(t){const e=[];t.forEachOperation((t,n,i)=>{if(null==t.previousIndex){const n=this._viewContainer.createEmbeddedView(this._template,new Cd(null,this._ngForOf,-1,-1),null===i?void 0:i),r=new kd(t,n);e.push(r)}else if(null==i)this._viewContainer.remove(null===n?void 0:n);else if(null!==n){const r=this._viewContainer.get(n);this._viewContainer.move(r,i);const s=new kd(t,r);e.push(s)}});for(let n=0;n{this._viewContainer.get(t.currentIndex).context.$implicit=t.item})}_perViewChange(t,e){t.context.$implicit=e.item}static ngTemplateContextGuard(t,e){return!0}}return t.\u0275fac=function(e){return new(e||t)(oa(Ic),oa($c),oa(Tc))},t.\u0275dir=we({type:t,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"}}),t})();class kd{constructor(t,e){this.record=t,this.view=e}}let Ed=(()=>{class t{constructor(t,e){this._viewContainer=t,this._context=new Ad,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=e}set ngIf(t){this._context.$implicit=this._context.ngIf=t,this._updateView()}set ngIfThen(t){Dd("ngIfThen",t),this._thenTemplateRef=t,this._thenViewRef=null,this._updateView()}set ngIfElse(t){Dd("ngIfElse",t),this._elseTemplateRef=t,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(t,e){return!0}}return t.\u0275fac=function(e){return new(e||t)(oa(Ic),oa($c))},t.\u0275dir=we({type:t,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"}}),t})();class Ad{constructor(){this.$implicit=null,this.ngIf=null}}function Dd(t,e){if(e&&!e.createEmbeddedView)throw new Error(`${t} must be a TemplateRef, but received '${bt(e)}'.`)}let Td=(()=>{class t{constructor(t,e,n){this._ngEl=t,this._differs=e,this._renderer=n,this._ngStyle=null,this._differ=null}set ngStyle(t){this._ngStyle=t,!this._differ&&t&&(this._differ=this._differs.find(t).create())}ngDoCheck(){if(this._differ){const t=this._differ.diff(this._ngStyle);t&&this._applyChanges(t)}}_setStyle(t,e){const[n,i]=t.split(".");null!=(e=null!=e&&i?`${e}${i}`:e)?this._renderer.setStyle(this._ngEl.nativeElement,n,e):this._renderer.removeStyle(this._ngEl.nativeElement,n)}_applyChanges(t){t.forEachRemovedItem(t=>this._setStyle(t.key,null)),t.forEachAddedItem(t=>this._setStyle(t.key,t.currentValue)),t.forEachChangedItem(t=>this._setStyle(t.key,t.currentValue))}}return t.\u0275fac=function(e){return new(e||t)(oa(uc),oa(Rc),oa(pc))},t.\u0275dir=we({type:t,selectors:[["","ngStyle",""]],inputs:{ngStyle:"ngStyle"}}),t})(),Rd=(()=>{class t{constructor(t){this._viewContainerRef=t,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null}ngOnChanges(t){if(this._shouldRecreateView(t)){const t=this._viewContainerRef;this._viewRef&&t.remove(t.indexOf(this._viewRef)),this._viewRef=this.ngTemplateOutlet?t.createEmbeddedView(this.ngTemplateOutlet,this.ngTemplateOutletContext):null}else this._viewRef&&this.ngTemplateOutletContext&&this._updateExistingContext(this.ngTemplateOutletContext)}_shouldRecreateView(t){const e=t.ngTemplateOutletContext;return!!t.ngTemplateOutlet||e&&this._hasContextShapeChanged(e)}_hasContextShapeChanged(t){const e=Object.keys(t.previousValue||{}),n=Object.keys(t.currentValue||{});if(e.length===n.length){for(let t of n)if(-1===e.indexOf(t))return!0;return!1}return!0}_updateExistingContext(t){for(let e of Object.keys(t))this._viewRef.context[e]=this.ngTemplateOutletContext[e]}}return t.\u0275fac=function(e){return new(e||t)(oa(Ic))},t.\u0275dir=we({type:t,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet"},features:[Ve]}),t})(),Fd=(()=>{class t{}return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},providers:[{provide:bd,useClass:wd}]}),t})(),Md=(()=>{class t{}return t.\u0275prov=ut({token:t,providedIn:"root",factory:()=>new Ld(Yt(wh),window,Yt(Ri))}),t})();class Ld{constructor(t,e,n){this.document=t,this.window=e,this.errorHandler=n,this.offset=()=>[0,0]}setOffset(t){this.offset=Array.isArray(t)?()=>t:t}getScrollPosition(){return this.supportsScrolling()?[this.window.scrollX,this.window.scrollY]:[0,0]}scrollToPosition(t){this.supportsScrolling()&&this.window.scrollTo(t[0],t[1])}scrollToAnchor(t){if(this.supportsScrolling()){const e=this.document.getElementById(t)||this.document.getElementsByName(t)[0];e&&this.scrollToElement(e)}}setHistoryScrollRestoration(t){if(this.supportScrollRestoration()){const e=this.window.history;e&&e.scrollRestoration&&(e.scrollRestoration=t)}}scrollToElement(t){const e=t.getBoundingClientRect(),n=e.left+this.window.pageXOffset,i=e.top+this.window.pageYOffset,r=this.offset();this.window.scrollTo(n-r[0],i-r[1])}supportScrollRestoration(){try{if(!this.window||!this.window.scrollTo)return!1;const t=$d(this.window.history)||$d(Object.getPrototypeOf(this.window.history));return!(!t||!t.writable&&!t.set)}catch(t){return!1}}supportsScrolling(){try{return!!this.window.scrollTo}catch(t){return!1}}}function $d(t){return Object.getOwnPropertyDescriptor(t,"scrollRestoration")}class Od extends class extends class{}{constructor(){super()}supportsDOMEvents(){return!0}}{static makeCurrent(){var t;t=new Od,yh||(yh=t)}getProperty(t,e){return t[e]}log(t){window.console&&window.console.log&&window.console.log(t)}logGroup(t){window.console&&window.console.group&&window.console.group(t)}logGroupEnd(){window.console&&window.console.groupEnd&&window.console.groupEnd()}onAndCancel(t,e,n){return t.addEventListener(e,n,!1),()=>{t.removeEventListener(e,n,!1)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){return t.parentNode&&t.parentNode.removeChild(t),t}getValue(t){return t.value}createElement(t,e){return(e=e||this.getDefaultDocument()).createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return"window"===e?window:"document"===e?t:"body"===e?t.body:null}getHistory(){return window.history}getLocation(){return window.location}getBaseHref(t){const e=Nd||(Nd=document.querySelector("base"),Nd)?Nd.getAttribute("href"):null;return null==e?null:(n=e,Id||(Id=document.createElement("a")),Id.setAttribute("href",n),"/"===Id.pathname.charAt(0)?Id.pathname:"/"+Id.pathname);var n}resetBaseElement(){Nd=null}getUserAgent(){return window.navigator.userAgent}performanceNow(){return window.performance&&window.performance.now?window.performance.now():(new Date).getTime()}supportsCookies(){return!0}getCookie(t){return xd(document.cookie,t)}}let Id,Nd=null;const Pd=new Pt("TRANSITION_ID"),Bd=[{provide:_u,useFactory:function(t,e,n){return()=>{n.get(Cu).donePromise.then(()=>{const n=bh();Array.prototype.slice.apply(e.querySelectorAll("style[ng-transition]")).filter(e=>e.getAttribute("ng-transition")===t).forEach(t=>n.remove(t))})}},deps:[Pd,wh,Bo],multi:!0}];class Ud{static init(){var t;t=new Ud,eh=t}addToWindow(t){Tt.getAngularTestability=(e,n=!0)=>{const i=t.findTestabilityInTree(e,n);if(null==i)throw new Error("Could not find testability for element.");return i},Tt.getAllAngularTestabilities=()=>t.getAllTestabilities(),Tt.getAllAngularRootElements=()=>t.getAllRootElements(),Tt.frameworkStabilizers||(Tt.frameworkStabilizers=[]),Tt.frameworkStabilizers.push(t=>{const e=Tt.getAllAngularTestabilities();let n=e.length,i=!1;const r=function(e){i=i||e,n--,0==n&&t(i)};e.forEach(function(t){t.whenStable(r)})})}findTestabilityInTree(t,e,n){if(null==e)return null;const i=t.getTestability(e);return null!=i?i:n?bh().isShadowRoot(e)?this.findTestabilityInTree(t,e.host,!0):this.findTestabilityInTree(t,e.parentElement,!0):null}}const Vd=new Pt("EventManagerPlugins");let Hd=(()=>{class t{constructor(t,e){this._zone=e,this._eventNameToPlugin=new Map,t.forEach(t=>t.manager=this),this._plugins=t.slice().reverse()}addEventListener(t,e,n){return this._findPluginFor(e).addEventListener(t,e,n)}addGlobalEventListener(t,e,n){return this._findPluginFor(e).addGlobalEventListener(t,e,n)}getZone(){return this._zone}_findPluginFor(t){const e=this._eventNameToPlugin.get(t);if(e)return e;const n=this._plugins;for(let i=0;i{class t{constructor(){this._stylesSet=new Set}addStyles(t){const e=new Set;t.forEach(t=>{this._stylesSet.has(t)||(this._stylesSet.add(t),e.add(t))}),this.onStylesAdded(e)}onStylesAdded(t){}getAllStyles(){return Array.from(this._stylesSet)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),Wd=(()=>{class t extends zd{constructor(t){super(),this._doc=t,this._hostNodes=new Set,this._styleNodes=new Set,this._hostNodes.add(t.head)}_addStylesToHost(t,e){t.forEach(t=>{const n=this._doc.createElement("style");n.textContent=t,this._styleNodes.add(e.appendChild(n))})}addHost(t){this._addStylesToHost(this._stylesSet,t),this._hostNodes.add(t)}removeHost(t){this._hostNodes.delete(t)}onStylesAdded(t){this._hostNodes.forEach(e=>this._addStylesToHost(t,e))}ngOnDestroy(){this._styleNodes.forEach(t=>bh().remove(t))}}return t.\u0275fac=function(e){return new(e||t)(Yt(wh))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();const Gd={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Kd=/%COMP%/g;function qd(t,e,n){for(let i=0;i{if("__ngUnwrap__"===e)return t;!1===t(e)&&(e.preventDefault(),e.returnValue=!1)}}let Xd=(()=>{class t{constructor(t,e,n){this.eventManager=t,this.sharedStylesHost=e,this.appId=n,this.rendererByCompId=new Map,this.defaultRenderer=new Jd(t)}createRenderer(t,e){if(!t||!e)return this.defaultRenderer;switch(e.encapsulation){case ue.Emulated:{let n=this.rendererByCompId.get(e.id);return n||(n=new Qd(this.eventManager,this.sharedStylesHost,e,this.appId),this.rendererByCompId.set(e.id,n)),n.applyToHost(t),n}case 1:case ue.ShadowDom:return new Zd(this.eventManager,this.sharedStylesHost,t,e);default:if(!this.rendererByCompId.has(e.id)){const t=qd(e.id,e.styles,[]);this.sharedStylesHost.addStyles(t),this.rendererByCompId.set(e.id,this.defaultRenderer)}return this.defaultRenderer}}begin(){}end(){}}return t.\u0275fac=function(e){return new(e||t)(Yt(Hd),Yt(Wd),Yt(Su))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();class Jd{constructor(t){this.eventManager=t,this.data=Object.create(null)}destroy(){}createElement(t,e){return e?document.createElementNS(Gd[e]||e,t):document.createElement(t)}createComment(t){return document.createComment(t)}createText(t){return document.createTextNode(t)}appendChild(t,e){t.appendChild(e)}insertBefore(t,e,n){t&&t.insertBefore(e,n)}removeChild(t,e){t&&t.removeChild(e)}selectRootElement(t,e){let n="string"==typeof t?document.querySelector(t):t;if(!n)throw new Error(`The selector "${t}" did not match any elements`);return e||(n.textContent=""),n}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,n,i){if(i){e=i+":"+e;const r=Gd[i];r?t.setAttributeNS(r,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){const i=Gd[n];i?t.removeAttributeNS(i,e):t.removeAttribute(`${n}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,n,i){i&fc.DashCase?t.style.setProperty(e,n,i&fc.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&fc.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,n){t[e]=n}setValue(t,e){t.nodeValue=e}listen(t,e,n){return"string"==typeof t?this.eventManager.addGlobalEventListener(t,e,Yd(n)):this.eventManager.addEventListener(t,e,Yd(n))}}class Qd extends Jd{constructor(t,e,n,i){super(t),this.component=n;const r=qd(i+"-"+n.id,n.styles,[]);e.addStyles(r),this.contentAttr="_ngcontent-%COMP%".replace(Kd,i+"-"+n.id),this.hostAttr="_nghost-%COMP%".replace(Kd,i+"-"+n.id)}applyToHost(t){super.setAttribute(t,this.hostAttr,"")}createElement(t,e){const n=super.createElement(t,e);return super.setAttribute(n,this.contentAttr,""),n}}class Zd extends Jd{constructor(t,e,n,i){super(t),this.sharedStylesHost=e,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);const r=qd(i.id,i.styles,[]);for(let s=0;s{class t extends jd{constructor(t){super(t)}supports(t){return!0}addEventListener(t,e,n){return t.addEventListener(e,n,!1),()=>this.removeEventListener(t,e,n)}removeEventListener(t,e,n){return t.removeEventListener(e,n)}}return t.\u0275fac=function(e){return new(e||t)(Yt(wh))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();const ef=["alt","control","meta","shift"],nf={"\b":"Backspace","\t":"Tab","\x7f":"Delete","\x1b":"Escape",Del:"Delete",Esc:"Escape",Left:"ArrowLeft",Right:"ArrowRight",Up:"ArrowUp",Down:"ArrowDown",Menu:"ContextMenu",Scroll:"ScrollLock",Win:"OS"},rf={A:"1",B:"2",C:"3",D:"4",E:"5",F:"6",G:"7",H:"8",I:"9",J:"*",K:"+",M:"-",N:".",O:"/","`":"0","\x90":"NumLock"},sf={alt:t=>t.altKey,control:t=>t.ctrlKey,meta:t=>t.metaKey,shift:t=>t.shiftKey};let of=(()=>{class t extends jd{constructor(t){super(t)}supports(e){return null!=t.parseEventName(e)}addEventListener(e,n,i){const r=t.parseEventName(n),s=t.eventCallback(r.fullKey,i,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>bh().onAndCancel(e,r.domEventName,s))}static parseEventName(e){const n=e.toLowerCase().split("."),i=n.shift();if(0===n.length||"keydown"!==i&&"keyup"!==i)return null;const r=t._normalizeKey(n.pop());let s="";if(ef.forEach(t=>{const e=n.indexOf(t);e>-1&&(n.splice(e,1),s+=t+".")}),s+=r,0!=n.length||0===r.length)return null;const o={};return o.domEventName=i,o.fullKey=s,o}static getEventFullKey(t){let e="",n=function(t){let e=t.key;if(null==e){if(e=t.keyIdentifier,null==e)return"Unidentified";e.startsWith("U+")&&(e=String.fromCharCode(parseInt(e.substring(2),16)),3===t.location&&rf.hasOwnProperty(e)&&(e=rf[e]))}return nf[e]||e}(t);return n=n.toLowerCase()," "===n?n="space":"."===n&&(n="dot"),ef.forEach(i=>{i!=n&&(0,sf[i])(t)&&(e+=i+".")}),e+=n,e}static eventCallback(e,n,i){return r=>{t.getEventFullKey(r)===e&&i.runGuarded(()=>n(r))}}static _normalizeKey(t){switch(t){case"esc":return"escape";default:return t}}}return t.\u0275fac=function(e){return new(e||t)(Yt(wh))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),af=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:function(){return Yt(lf)},token:t,providedIn:"root"}),t})(),lf=(()=>{class t extends af{constructor(t){super(),this._doc=t}sanitize(t,e){if(null==e)return null;switch(t){case mr.NONE:return e;case mr.HTML:return Ui(e,"HTML")?Bi(e):pr(this._doc,String(e));case mr.STYLE:return Ui(e,"Style")?Bi(e):e;case mr.SCRIPT:if(Ui(e,"Script"))return Bi(e);throw new Error("unsafe value used in a script context");case mr.URL:return Vi(e),Ui(e,"URL")?Bi(e):Xi(String(e));case mr.RESOURCE_URL:if(Ui(e,"ResourceURL"))return Bi(e);throw new Error("unsafe value used in a resource URL context (see http://g.co/ng/security#xss)");default:throw new Error(`Unexpected SecurityContext ${t} (see http://g.co/ng/security#xss)`)}}bypassSecurityTrustHtml(t){return new $i(t)}bypassSecurityTrustStyle(t){return new Oi(t)}bypassSecurityTrustScript(t){return new Ii(t)}bypassSecurityTrustUrl(t){return new Ni(t)}bypassSecurityTrustResourceUrl(t){return new Pi(t)}}return t.\u0275fac=function(e){return new(e||t)(Yt(wh))},t.\u0275prov=ut({factory:function(){return t=Yt(Bt),new lf(t.get(wh));var t},token:t,providedIn:"root"}),t})();const cf=rh(gh,"browser",[{provide:Du,useValue:"browser"},{provide:Au,useValue:function(){Od.makeCurrent(),Ud.init()},multi:!0},{provide:wh,useFactory:function(){return function(t){Ke=t}(document),document},deps:[]}]),uf=[[],{provide:ko,useValue:"root"},{provide:Ri,useFactory:function(){return new Ri},deps:[]},{provide:Vd,useClass:tf,multi:!0,deps:[wh,ju,Du]},{provide:Vd,useClass:of,multi:!0,deps:[wh]},[],{provide:Xd,useClass:Xd,deps:[Hd,Wd,Su]},{provide:dc,useExisting:Xd},{provide:zd,useExisting:Wd},{provide:Wd,useClass:Wd,deps:[wh]},{provide:Ju,useClass:Ju,deps:[ju]},{provide:Hd,useClass:Hd,deps:[Vd,ju]},[]];let hf=(()=>{class t{constructor(t){if(t)throw new Error("BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.")}static withServerTransition(e){return{ngModule:t,providers:[{provide:Su,useValue:e.appId},{provide:Pd,useExisting:Su},Bd]}}}return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)(Yt(t,12))},providers:uf,imports:[Fd,vh]}),t})();"undefined"!=typeof window&&window;class df{}const ff="*";function pf(t,e){return{type:7,name:t,definitions:e,options:{}}}function gf(t,e=null){return{type:4,styles:e,timings:t}}function mf(t,e=null){return{type:2,steps:t,options:e}}function vf(t){return{type:6,styles:t,offset:null}}function yf(t,e,n=null){return{type:1,expr:t,animation:e,options:n}}function bf(t){Promise.resolve(null).then(t)}class wf{constructor(t=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this.parentPlayer=null,this.totalTime=t+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){bf(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){}setPosition(t){}getPosition(){return 0}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}class xf{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let e=0,n=0,i=0;const r=this.players.length;0==r?bf(()=>this._onFinish()):this.players.forEach(t=>{t.onDone(()=>{++e==r&&this._onFinish()}),t.onDestroy(()=>{++n==r&&this._onDestroy()}),t.onStart(()=>{++i==r&&this._onStart()})}),this.totalTime=this.players.reduce((t,e)=>Math.max(t,e.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){const e=t*this.totalTime;this.players.forEach(t=>{const n=t.totalTime?Math.min(1,e/t.totalTime):1;t.setPosition(n)})}getPosition(){let t=0;return this.players.forEach(e=>{const n=e.getPosition();t=Math.min(n,t)}),t}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}function _f(){return"undefined"!=typeof process&&"[object process]"==={}.toString.call(process)}function Cf(t){switch(t.length){case 0:return new wf;case 1:return t[0];default:return new xf(t)}}function Sf(t,e,n,i,r={},s={}){const o=[],a=[];let l=-1,c=null;if(i.forEach(t=>{const n=t.offset,i=n==l,u=i&&c||{};Object.keys(t).forEach(n=>{let i=n,a=t[n];if("offset"!==n)switch(i=e.normalizePropertyName(i,o),a){case"!":a=r[n];break;case ff:a=s[n];break;default:a=e.normalizeStyleValue(n,i,a,o)}u[i]=a}),i||a.push(u),c=u,l=n}),o.length){const t="\n - ";throw new Error(`Unable to animate due to the following errors:${t}${o.join(t)}`)}return a}function kf(t,e,n,i){switch(e){case"start":t.onStart(()=>i(n&&Ef(n,"start",t)));break;case"done":t.onDone(()=>i(n&&Ef(n,"done",t)));break;case"destroy":t.onDestroy(()=>i(n&&Ef(n,"destroy",t)))}}function Ef(t,e,n){const i=n.totalTime,r=Af(t.element,t.triggerName,t.fromState,t.toState,e||t.phaseName,null==i?t.totalTime:i,!!n.disabled),s=t._data;return null!=s&&(r._data=s),r}function Af(t,e,n,i,r="",s=0,o){return{element:t,triggerName:e,fromState:n,toState:i,phaseName:r,totalTime:s,disabled:!!o}}function Df(t,e,n){let i;return t instanceof Map?(i=t.get(e),i||t.set(e,i=n)):(i=t[e],i||(i=t[e]=n)),i}function Tf(t){const e=t.indexOf(":");return[t.substring(1,e),t.substr(e+1)]}let Rf=(t,e)=>!1,Ff=(t,e)=>!1,Mf=(t,e,n)=>[];const Lf=_f();(Lf||"undefined"!=typeof Element)&&(Rf=(t,e)=>t.contains(e),Ff=(()=>{if(Lf||Element.prototype.matches)return(t,e)=>t.matches(e);{const t=Element.prototype,e=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector;return e?(t,n)=>e.apply(t,[n]):Ff}})(),Mf=(t,e,n)=>{let i=[];if(n)i.push(...t.querySelectorAll(e));else{const n=t.querySelector(e);n&&i.push(n)}return i});let $f=null,Of=!1;function If(t){$f||($f=("undefined"!=typeof document?document.body:null)||{},Of=!!$f.style&&"WebkitAppearance"in $f.style);let e=!0;return $f.style&&!function(t){return"ebkit"==t.substring(1,6)}(t)&&(e=t in $f.style,!e&&Of)&&(e="Webkit"+t.charAt(0).toUpperCase()+t.substr(1)in $f.style),e}const Nf=Ff,Pf=Rf,Bf=Mf;function Uf(t){const e={};return Object.keys(t).forEach(n=>{const i=n.replace(/([a-z])([A-Z])/g,"$1-$2");e[i]=t[n]}),e}let Vf=(()=>{class t{validateStyleProperty(t){return If(t)}matchesElement(t,e){return Nf(t,e)}containsElement(t,e){return Pf(t,e)}query(t,e,n){return Bf(t,e,n)}computeStyle(t,e,n){return n||""}animate(t,e,n,i,r,s=[],o){return new wf(n,i)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),Hf=(()=>{class t{}return t.NOOP=new Vf,t})();const jf="ng-enter",zf="ng-leave",Wf="ng-trigger",Gf=".ng-trigger",Kf="ng-animating",qf=".ng-animating";function Yf(t){if("number"==typeof t)return t;const e=t.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:Xf(parseFloat(e[1]),e[2])}function Xf(t,e){switch(e){case"s":return 1e3*t;default:return t}}function Jf(t,e,n){return t.hasOwnProperty("duration")?t:function(t,e,n){let i,r=0,s="";if("string"==typeof t){const n=t.match(/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i);if(null===n)return e.push(`The provided timing value "${t}" is invalid.`),{duration:0,delay:0,easing:""};i=Xf(parseFloat(n[1]),n[2]);const o=n[3];null!=o&&(r=Xf(parseFloat(o),n[4]));const a=n[5];a&&(s=a)}else i=t;if(!n){let n=!1,s=e.length;i<0&&(e.push("Duration values below 0 are not allowed for this animation step."),n=!0),r<0&&(e.push("Delay values below 0 are not allowed for this animation step."),n=!0),n&&e.splice(s,0,`The provided timing value "${t}" is invalid.`)}return{duration:i,delay:r,easing:s}}(t,e,n)}function Qf(t,e={}){return Object.keys(t).forEach(n=>{e[n]=t[n]}),e}function Zf(t,e,n={}){if(e)for(let i in t)n[i]=t[i];else Qf(t,n);return n}function tp(t,e,n){return n?e+":"+n+";":""}function ep(t){let e="";for(let n=0;n{const r=up(i);n&&!n.hasOwnProperty(i)&&(n[i]=t.style[r]),t.style[r]=e[i]}),_f()&&ep(t))}function ip(t,e){t.style&&(Object.keys(e).forEach(e=>{const n=up(e);t.style[n]=""}),_f()&&ep(t))}function rp(t){return Array.isArray(t)?1==t.length?t[0]:mf(t):t}const sp=new RegExp("{{\\s*(.+?)\\s*}}","g");function op(t){let e=[];if("string"==typeof t){let n;for(;n=sp.exec(t);)e.push(n[1]);sp.lastIndex=0}return e}function ap(t,e,n){const i=t.toString(),r=i.replace(sp,(t,i)=>{let r=e[i];return e.hasOwnProperty(i)||(n.push(`Please provide a value for the animation param ${i}`),r=""),r.toString()});return r==i?t:r}function lp(t){const e=[];let n=t.next();for(;!n.done;)e.push(n.value),n=t.next();return e}const cp=/-+([a-z0-9])/g;function up(t){return t.replace(cp,(...t)=>t[1].toUpperCase())}function hp(t,e){return 0===t||0===e}function dp(t,e,n){const i=Object.keys(n);if(i.length&&e.length){let s=e[0],o=[];if(i.forEach(t=>{s.hasOwnProperty(t)||o.push(t),s[t]=n[t]}),o.length)for(var r=1;rfunction(t,e,n){if(":"==t[0]){const i=function(t,e){switch(t){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,e)=>parseFloat(e)>parseFloat(t);case":decrement":return(t,e)=>parseFloat(e) *"}}(t,n);if("function"==typeof i)return void e.push(i);t=i}const i=t.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(null==i||i.length<4)return n.push(`The provided transition expression "${t}" is not supported`),e;const r=i[1],s=i[2],o=i[3];e.push(bp(r,o)),"<"!=s[0]||r==gp&&o==gp||e.push(bp(o,r))}(t,n,e)):n.push(t),n}const vp=new Set(["true","1"]),yp=new Set(["false","0"]);function bp(t,e){const n=vp.has(t)||yp.has(t),i=vp.has(e)||yp.has(e);return(r,s)=>{let o=t==gp||t==r,a=e==gp||e==s;return!o&&n&&"boolean"==typeof r&&(o=r?vp.has(t):yp.has(t)),!a&&i&&"boolean"==typeof s&&(a=s?vp.has(e):yp.has(e)),o&&a}}const wp=new RegExp("s*:selfs*,?","g");function xp(t,e,n){return new _p(t).build(e,n)}class _p{constructor(t){this._driver=t}build(t,e){const n=new Cp(e);return this._resetContextStyleTimingState(n),fp(this,rp(t),n)}_resetContextStyleTimingState(t){t.currentQuerySelector="",t.collectedStyles={},t.collectedStyles[""]={},t.currentTime=0}visitTrigger(t,e){let n=e.queryCount=0,i=e.depCount=0;const r=[],s=[];return"@"==t.name.charAt(0)&&e.errors.push("animation triggers cannot be prefixed with an `@` sign (e.g. trigger('@foo', [...]))"),t.definitions.forEach(t=>{if(this._resetContextStyleTimingState(e),0==t.type){const n=t,i=n.name;i.toString().split(/\s*,\s*/).forEach(t=>{n.name=t,r.push(this.visitState(n,e))}),n.name=i}else if(1==t.type){const r=this.visitTransition(t,e);n+=r.queryCount,i+=r.depCount,s.push(r)}else e.errors.push("only state() and transition() definitions can sit inside of a trigger()")}),{type:7,name:t.name,states:r,transitions:s,queryCount:n,depCount:i,options:null}}visitState(t,e){const n=this.visitStyle(t.styles,e),i=t.options&&t.options.params||null;if(n.containsDynamicStyles){const r=new Set,s=i||{};if(n.styles.forEach(t=>{if(Sp(t)){const e=t;Object.keys(e).forEach(t=>{op(e[t]).forEach(t=>{s.hasOwnProperty(t)||r.add(t)})})}}),r.size){const n=lp(r.values());e.errors.push(`state("${t.name}", ...) must define default values for all the following style substitutions: ${n.join(", ")}`)}}return{type:0,name:t.name,style:n,options:i?{params:i}:null}}visitTransition(t,e){e.queryCount=0,e.depCount=0;const n=fp(this,rp(t.animation),e);return{type:1,matchers:mp(t.expr,e.errors),animation:n,queryCount:e.queryCount,depCount:e.depCount,options:kp(t.options)}}visitSequence(t,e){return{type:2,steps:t.steps.map(t=>fp(this,t,e)),options:kp(t.options)}}visitGroup(t,e){const n=e.currentTime;let i=0;const r=t.steps.map(t=>{e.currentTime=n;const r=fp(this,t,e);return i=Math.max(i,e.currentTime),r});return e.currentTime=i,{type:3,steps:r,options:kp(t.options)}}visitAnimate(t,e){const n=function(t,e){let n=null;if(t.hasOwnProperty("duration"))n=t;else if("number"==typeof t)return Ep(Jf(t,e).duration,0,"");const i=t;if(i.split(/\s+/).some(t=>"{"==t.charAt(0)&&"{"==t.charAt(1))){const t=Ep(0,0,"");return t.dynamic=!0,t.strValue=i,t}return n=n||Jf(i,e),Ep(n.duration,n.delay,n.easing)}(t.timings,e.errors);let i;e.currentAnimateTimings=n;let r=t.styles?t.styles:vf({});if(5==r.type)i=this.visitKeyframes(r,e);else{let r=t.styles,s=!1;if(!r){s=!0;const t={};n.easing&&(t.easing=n.easing),r=vf(t)}e.currentTime+=n.duration+n.delay;const o=this.visitStyle(r,e);o.isEmptyStep=s,i=o}return e.currentAnimateTimings=null,{type:4,timings:n,style:i,options:null}}visitStyle(t,e){const n=this._makeStyleAst(t,e);return this._validateStyleAst(n,e),n}_makeStyleAst(t,e){const n=[];Array.isArray(t.styles)?t.styles.forEach(t=>{"string"==typeof t?t==ff?n.push(t):e.errors.push(`The provided style string value ${t} is not allowed.`):n.push(t)}):n.push(t.styles);let i=!1,r=null;return n.forEach(t=>{if(Sp(t)){const e=t,n=e.easing;if(n&&(r=n,delete e.easing),!i)for(let t in e)if(e[t].toString().indexOf("{{")>=0){i=!0;break}}}),{type:6,styles:n,easing:r,offset:t.offset,containsDynamicStyles:i,options:null}}_validateStyleAst(t,e){const n=e.currentAnimateTimings;let i=e.currentTime,r=e.currentTime;n&&r>0&&(r-=n.duration+n.delay),t.styles.forEach(t=>{"string"!=typeof t&&Object.keys(t).forEach(n=>{if(!this._driver.validateStyleProperty(n))return void e.errors.push(`The provided animation property "${n}" is not a supported CSS property for animations`);const s=e.collectedStyles[e.currentQuerySelector],o=s[n];let a=!0;o&&(r!=i&&r>=o.startTime&&i<=o.endTime&&(e.errors.push(`The CSS property "${n}" that exists between the times of "${o.startTime}ms" and "${o.endTime}ms" is also being animated in a parallel animation between the times of "${r}ms" and "${i}ms"`),a=!1),r=o.startTime),a&&(s[n]={startTime:r,endTime:i}),e.options&&function(t,e,n){const i=e.params||{},r=op(t);r.length&&r.forEach(t=>{i.hasOwnProperty(t)||n.push(`Unable to resolve the local animation param ${t} in the given list of values`)})}(t[n],e.options,e.errors)})})}visitKeyframes(t,e){const n={type:5,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push("keyframes() must be placed inside of a call to animate()"),n;let i=0;const r=[];let s=!1,o=!1,a=0;const l=t.steps.map(t=>{const n=this._makeStyleAst(t,e);let l=null!=n.offset?n.offset:function(t){if("string"==typeof t)return null;let e=null;if(Array.isArray(t))t.forEach(t=>{if(Sp(t)&&t.hasOwnProperty("offset")){const n=t;e=parseFloat(n.offset),delete n.offset}});else if(Sp(t)&&t.hasOwnProperty("offset")){const n=t;e=parseFloat(n.offset),delete n.offset}return e}(n.styles),c=0;return null!=l&&(i++,c=n.offset=l),o=o||c<0||c>1,s=s||c0&&i{const s=u>0?i==h?1:u*i:r[i],o=s*p;e.currentTime=d+f.delay+o,f.duration=o,this._validateStyleAst(t,e),t.offset=s,n.styles.push(t)}),n}visitReference(t,e){return{type:8,animation:fp(this,rp(t.animation),e),options:kp(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:9,options:kp(t.options)}}visitAnimateRef(t,e){return{type:10,animation:this.visitReference(t.animation,e),options:kp(t.options)}}visitQuery(t,e){const n=e.currentQuerySelector,i=t.options||{};e.queryCount++,e.currentQuery=t;const[r,s]=function(t){const e=!!t.split(/\s*,\s*/).find(t=>":self"==t);return e&&(t=t.replace(wp,"")),[t=t.replace(/@\*/g,Gf).replace(/@\w+/g,t=>".ng-trigger-"+t.substr(1)).replace(/:animating/g,qf),e]}(t.selector);e.currentQuerySelector=n.length?n+" "+r:r,Df(e.collectedStyles,e.currentQuerySelector,{});const o=fp(this,rp(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=n,{type:11,selector:r,limit:i.limit||0,optional:!!i.optional,includeSelf:s,animation:o,originalSelector:t.selector,options:kp(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push("stagger() can only be used inside of query()");const n="full"===t.timings?{duration:0,delay:0,easing:"full"}:Jf(t.timings,e.errors,!0);return{type:12,animation:fp(this,rp(t.animation),e),timings:n,options:null}}}class Cp{constructor(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles={},this.options=null}}function Sp(t){return!Array.isArray(t)&&"object"==typeof t}function kp(t){var e;return t?(t=Qf(t)).params&&(t.params=(e=t.params)?Qf(e):null):t={},t}function Ep(t,e,n){return{duration:t,delay:e,easing:n}}function Ap(t,e,n,i,r,s,o=null,a=!1){return{type:1,element:t,keyframes:e,preStyleProps:n,postStyleProps:i,duration:r,delay:s,totalTime:r+s,easing:o,subTimeline:a}}class Dp{constructor(){this._map=new Map}consume(t){let e=this._map.get(t);return e?this._map.delete(t):e=[],e}append(t,e){let n=this._map.get(t);n||this._map.set(t,n=[]),n.push(...e)}has(t){return this._map.has(t)}clear(){this._map.clear()}}const Tp=new RegExp(":enter","g"),Rp=new RegExp(":leave","g");function Fp(t,e,n,i,r,s={},o={},a,l,c=[]){return(new Mp).buildKeyframes(t,e,n,i,r,s,o,a,l,c)}class Mp{buildKeyframes(t,e,n,i,r,s,o,a,l,c=[]){l=l||new Dp;const u=new $p(t,e,l,i,r,c,[]);u.options=a,u.currentTimeline.setStyles([s],null,u.errors,a),fp(this,n,u);const h=u.timelines.filter(t=>t.containsAnimation());if(h.length&&Object.keys(o).length){const t=h[h.length-1];t.allowOnlyTimelineStyles()||t.setStyles([o],null,u.errors,a)}return h.length?h.map(t=>t.buildKeyframes()):[Ap(e,[],[],[],0,0,"",!1)]}visitTrigger(t,e){}visitState(t,e){}visitTransition(t,e){}visitAnimateChild(t,e){const n=e.subInstructions.consume(e.element);if(n){const i=e.createSubContext(t.options),r=e.currentTimeline.currentTime,s=this._visitSubInstructions(n,i,i.options);r!=s&&e.transformIntoNewTimeline(s)}e.previousNode=t}visitAnimateRef(t,e){const n=e.createSubContext(t.options);n.transformIntoNewTimeline(),this.visitReference(t.animation,n),e.transformIntoNewTimeline(n.currentTimeline.currentTime),e.previousNode=t}_visitSubInstructions(t,e,n){let i=e.currentTimeline.currentTime;const r=null!=n.duration?Yf(n.duration):null,s=null!=n.delay?Yf(n.delay):null;return 0!==r&&t.forEach(t=>{const n=e.appendInstructionToTimeline(t,r,s);i=Math.max(i,n.duration+n.delay)}),i}visitReference(t,e){e.updateOptions(t.options,!0),fp(this,t.animation,e),e.previousNode=t}visitSequence(t,e){const n=e.subContextCount;let i=e;const r=t.options;if(r&&(r.params||r.delay)&&(i=e.createSubContext(r),i.transformIntoNewTimeline(),null!=r.delay)){6==i.previousNode.type&&(i.currentTimeline.snapshotCurrentStyles(),i.previousNode=Lp);const t=Yf(r.delay);i.delayNextStep(t)}t.steps.length&&(t.steps.forEach(t=>fp(this,t,i)),i.currentTimeline.applyStylesToKeyframe(),i.subContextCount>n&&i.transformIntoNewTimeline()),e.previousNode=t}visitGroup(t,e){const n=[];let i=e.currentTimeline.currentTime;const r=t.options&&t.options.delay?Yf(t.options.delay):0;t.steps.forEach(s=>{const o=e.createSubContext(t.options);r&&o.delayNextStep(r),fp(this,s,o),i=Math.max(i,o.currentTimeline.currentTime),n.push(o.currentTimeline)}),n.forEach(t=>e.currentTimeline.mergeTimelineCollectedStyles(t)),e.transformIntoNewTimeline(i),e.previousNode=t}_visitTiming(t,e){if(t.dynamic){const n=t.strValue;return Jf(e.params?ap(n,e.params,e.errors):n,e.errors)}return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,e){const n=e.currentAnimateTimings=this._visitTiming(t.timings,e),i=e.currentTimeline;n.delay&&(e.incrementTime(n.delay),i.snapshotCurrentStyles());const r=t.style;5==r.type?this.visitKeyframes(r,e):(e.incrementTime(n.duration),this.visitStyle(r,e),i.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}visitStyle(t,e){const n=e.currentTimeline,i=e.currentAnimateTimings;!i&&n.getCurrentStyleProperties().length&&n.forwardFrame();const r=i&&i.easing||t.easing;t.isEmptyStep?n.applyEmptyStep(r):n.setStyles(t.styles,r,e.errors,e.options),e.previousNode=t}visitKeyframes(t,e){const n=e.currentAnimateTimings,i=e.currentTimeline.duration,r=n.duration,s=e.createSubContext().currentTimeline;s.easing=n.easing,t.styles.forEach(t=>{s.forwardTime((t.offset||0)*r),s.setStyles(t.styles,t.easing,e.errors,e.options),s.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(s),e.transformIntoNewTimeline(i+r),e.previousNode=t}visitQuery(t,e){const n=e.currentTimeline.currentTime,i=t.options||{},r=i.delay?Yf(i.delay):0;r&&(6===e.previousNode.type||0==n&&e.currentTimeline.getCurrentStyleProperties().length)&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=Lp);let s=n;const o=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!i.optional,e.errors);e.currentQueryTotal=o.length;let a=null;o.forEach((n,i)=>{e.currentQueryIndex=i;const o=e.createSubContext(t.options,n);r&&o.delayNextStep(r),n===e.element&&(a=o.currentTimeline),fp(this,t.animation,o),o.currentTimeline.applyStylesToKeyframe(),s=Math.max(s,o.currentTimeline.currentTime)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),a&&(e.currentTimeline.mergeTimelineCollectedStyles(a),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}visitStagger(t,e){const n=e.parentContext,i=e.currentTimeline,r=t.timings,s=Math.abs(r.duration),o=s*(e.currentQueryTotal-1);let a=s*e.currentQueryIndex;switch(r.duration<0?"reverse":r.easing){case"reverse":a=o-a;break;case"full":a=n.currentStaggerTime}const l=e.currentTimeline;a&&l.delayNextStep(a);const c=l.currentTime;fp(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=i.currentTime-c+(i.startTime-n.currentTimeline.startTime)}}const Lp={};class $p{constructor(t,e,n,i,r,s,o,a){this._driver=t,this.element=e,this.subInstructions=n,this._enterClassName=i,this._leaveClassName=r,this.errors=s,this.timelines=o,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Lp,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=a||new Op(this._driver,e,0),o.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,e){if(!t)return;const n=t;let i=this.options;null!=n.duration&&(i.duration=Yf(n.duration)),null!=n.delay&&(i.delay=Yf(n.delay));const r=n.params;if(r){let t=i.params;t||(t=this.options.params={}),Object.keys(r).forEach(n=>{e&&t.hasOwnProperty(n)||(t[n]=ap(r[n],t,this.errors))})}}_copyOptions(){const t={};if(this.options){const e=this.options.params;if(e){const n=t.params={};Object.keys(e).forEach(t=>{n[t]=e[t]})}}return t}createSubContext(t=null,e,n){const i=e||this.element,r=new $p(this._driver,i,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(i,n||0));return r.previousNode=this.previousNode,r.currentAnimateTimings=this.currentAnimateTimings,r.options=this._copyOptions(),r.updateOptions(t),r.currentQueryIndex=this.currentQueryIndex,r.currentQueryTotal=this.currentQueryTotal,r.parentContext=this,this.subContextCount++,r}transformIntoNewTimeline(t){return this.previousNode=Lp,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,e,n){const i={duration:null!=e?e:t.duration,delay:this.currentTimeline.currentTime+(null!=n?n:0)+t.delay,easing:""},r=new Ip(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,i,t.stretchStartingKeyframe);return this.timelines.push(r),i}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,e,n,i,r,s){let o=[];if(i&&o.push(this.element),t.length>0){t=(t=t.replace(Tp,"."+this._enterClassName)).replace(Rp,"."+this._leaveClassName);let e=this._driver.query(this.element,t,1!=n);0!==n&&(e=n<0?e.slice(e.length+n,e.length):e.slice(0,n)),o.push(...e)}return r||0!=o.length||s.push(`\`query("${e}")\` returned zero elements. (Use \`query("${e}", { optional: true })\` if you wish to allow this.)`),o}}class Op{constructor(t,e,n,i){this._driver=t,this.element=e,this.startTime=n,this._elementTimelineStylesLookup=i,this.duration=0,this._previousKeyframe={},this._currentKeyframe={},this._keyframes=new Map,this._styleSummary={},this._pendingStyles={},this._backFill={},this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._localTimelineStyles=Object.create(this._backFill,{}),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.getCurrentStyleProperties().length>0;default:return!0}}getCurrentStyleProperties(){return Object.keys(this._currentKeyframe)}get currentTime(){return this.startTime+this.duration}delayNextStep(t){const e=1==this._keyframes.size&&Object.keys(this._pendingStyles).length;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,e){return this.applyStylesToKeyframe(),new Op(this._driver,t,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=Object.create(this._backFill,{}),this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=1,this._loadKeyframe()}forwardTime(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,e){this._localTimelineStyles[t]=e,this._globalTimelineStyles[t]=e,this._styleSummary[t]={time:this.currentTime,value:e}}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&(this._previousKeyframe.easing=t),Object.keys(this._globalTimelineStyles).forEach(t=>{this._backFill[t]=this._globalTimelineStyles[t]||ff,this._currentKeyframe[t]=ff}),this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,i){e&&(this._previousKeyframe.easing=e);const r=i&&i.params||{},s=function(t,e){const n={};let i;return t.forEach(t=>{"*"===t?(i=i||Object.keys(e),i.forEach(t=>{n[t]=ff})):Zf(t,!1,n)}),n}(t,this._globalTimelineStyles);Object.keys(s).forEach(t=>{const e=ap(s[t],r,n);this._pendingStyles[t]=e,this._localTimelineStyles.hasOwnProperty(t)||(this._backFill[t]=this._globalTimelineStyles.hasOwnProperty(t)?this._globalTimelineStyles[t]:ff),this._updateStyle(t,e)})}applyStylesToKeyframe(){const t=this._pendingStyles,e=Object.keys(t);0!=e.length&&(this._pendingStyles={},e.forEach(e=>{this._currentKeyframe[e]=t[e]}),Object.keys(this._localTimelineStyles).forEach(t=>{this._currentKeyframe.hasOwnProperty(t)||(this._currentKeyframe[t]=this._localTimelineStyles[t])}))}snapshotCurrentStyles(){Object.keys(this._localTimelineStyles).forEach(t=>{const e=this._localTimelineStyles[t];this._pendingStyles[t]=e,this._updateStyle(t,e)})}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){const t=[];for(let e in this._currentKeyframe)t.push(e);return t}mergeTimelineCollectedStyles(t){Object.keys(t._styleSummary).forEach(e=>{const n=this._styleSummary[e],i=t._styleSummary[e];(!n||i.time>n.time)&&this._updateStyle(e,i.value)})}buildKeyframes(){this.applyStylesToKeyframe();const t=new Set,e=new Set,n=1===this._keyframes.size&&0===this.duration;let i=[];this._keyframes.forEach((r,s)=>{const o=Zf(r,!0);Object.keys(o).forEach(n=>{const i=o[n];"!"==i?t.add(n):i==ff&&e.add(n)}),n||(o.offset=s/this.duration),i.push(o)});const r=t.size?lp(t.values()):[],s=e.size?lp(e.values()):[];if(n){const t=i[0],e=Qf(t);t.offset=0,e.offset=1,i=[t,e]}return Ap(this.element,i,r,s,this.duration,this.startTime,this.easing,!1)}}class Ip extends Op{constructor(t,e,n,i,r,s,o=!1){super(t,e,s.delay),this.element=e,this.keyframes=n,this.preStyleProps=i,this.postStyleProps=r,this._stretchStartingKeyframe=o,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:e,duration:n,easing:i}=this.timings;if(this._stretchStartingKeyframe&&e){const r=[],s=n+e,o=e/s,a=Zf(t[0],!1);a.offset=0,r.push(a);const l=Zf(t[0],!1);l.offset=Np(o),r.push(l);const c=t.length-1;for(let i=1;i<=c;i++){let o=Zf(t[i],!1);o.offset=Np((e+o.offset*n)/s),r.push(o)}n=s,e=0,i="",t=r}return Ap(this.element,t,this.preStyleProps,this.postStyleProps,n,e,i,!0)}}function Np(t,e=3){const n=Math.pow(10,e-1);return Math.round(t*n)/n}class Pp{}class Bp extends Pp{normalizePropertyName(t,e){return up(t)}normalizeStyleValue(t,e,n,i){let r="";const s=n.toString().trim();if(Up[e]&&0!==n&&"0"!==n)if("number"==typeof n)r="px";else{const e=n.match(/^[+-]?[\d\.]+([a-z]*)$/);e&&0==e[1].length&&i.push(`Please provide a CSS unit value for ${t}:${n}`)}return s+r}}const Up=(()=>function(t){const e={};return t.forEach(t=>e[t]=!0),e}("width,height,minWidth,minHeight,maxWidth,maxHeight,left,top,bottom,right,fontSize,outlineWidth,outlineOffset,paddingTop,paddingLeft,paddingBottom,paddingRight,marginTop,marginLeft,marginBottom,marginRight,borderRadius,borderWidth,borderTopWidth,borderLeftWidth,borderRightWidth,borderBottomWidth,textIndent,perspective".split(",")))();function Vp(t,e,n,i,r,s,o,a,l,c,u,h,d){return{type:0,element:t,triggerName:e,isRemovalTransition:r,fromState:n,fromStyles:s,toState:i,toStyles:o,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:u,totalTime:h,errors:d}}const Hp={};class jp{constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,i){return function(t,e,n,i,r){return t.some(t=>t(e,n,i,r))}(this.ast.matchers,t,e,n,i)}buildStyles(t,e,n){const i=this._stateStyles["*"],r=this._stateStyles[t],s=i?i.buildStyles(e,n):{};return r?r.buildStyles(e,n):s}build(t,e,n,i,r,s,o,a,l,c){const u=[],h=this.ast.options&&this.ast.options.params||Hp,d=this.buildStyles(n,o&&o.params||Hp,u),f=a&&a.params||Hp,p=this.buildStyles(i,f,u),g=new Set,m=new Map,v=new Map,y="void"===i,b={params:Object.assign(Object.assign({},h),f)},w=c?[]:Fp(t,e,this.ast.animation,r,s,d,p,b,l,u);let x=0;if(w.forEach(t=>{x=Math.max(t.duration+t.delay,x)}),u.length)return Vp(e,this._triggerName,n,i,y,d,p,[],[],m,v,x,u);w.forEach(t=>{const n=t.element,i=Df(m,n,{});t.preStyleProps.forEach(t=>i[t]=!0);const r=Df(v,n,{});t.postStyleProps.forEach(t=>r[t]=!0),n!==e&&g.add(n)});const _=lp(g.values());return Vp(e,this._triggerName,n,i,y,d,p,w,_,m,v,x)}}class zp{constructor(t,e){this.styles=t,this.defaultParams=e}buildStyles(t,e){const n={},i=Qf(this.defaultParams);return Object.keys(t).forEach(e=>{const n=t[e];null!=n&&(i[e]=n)}),this.styles.styles.forEach(t=>{if("string"!=typeof t){const r=t;Object.keys(r).forEach(t=>{let s=r[t];s.length>1&&(s=ap(s,i,e)),n[t]=s})}}),n}}class Wp{constructor(t,e){this.name=t,this.ast=e,this.transitionFactories=[],this.states={},e.states.forEach(t=>{this.states[t.name]=new zp(t.style,t.options&&t.options.params||{})}),Gp(this.states,"true","1"),Gp(this.states,"false","0"),e.transitions.forEach(e=>{this.transitionFactories.push(new jp(t,e,this.states))}),this.fallbackTransition=new jp(t,{type:1,animation:{type:2,steps:[],options:null},matchers:[(t,e)=>!0],options:null,queryCount:0,depCount:0},this.states)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,e,n,i){return this.transitionFactories.find(r=>r.match(t,e,n,i))||null}matchStyles(t,e,n){return this.fallbackTransition.buildStyles(t,e,n)}}function Gp(t,e,n){t.hasOwnProperty(e)?t.hasOwnProperty(n)||(t[n]=t[e]):t.hasOwnProperty(n)&&(t[e]=t[n])}const Kp=new Dp;class qp{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._animations={},this._playersById={},this.players=[]}register(t,e){const n=[],i=xp(this._driver,e,n);if(n.length)throw new Error(`Unable to build the animation due to the following errors: ${n.join("\n")}`);this._animations[t]=i}_buildPlayer(t,e,n){const i=t.element,r=Sf(0,this._normalizer,0,t.keyframes,e,n);return this._driver.animate(i,r,t.duration,t.delay,t.easing,[],!0)}create(t,e,n={}){const i=[],r=this._animations[t];let s;const o=new Map;if(r?(s=Fp(this._driver,e,r,jf,zf,{},{},n,Kp,i),s.forEach(t=>{const e=Df(o,t.element,{});t.postStyleProps.forEach(t=>e[t]=null)})):(i.push("The requested animation doesn't exist or has already been destroyed"),s=[]),i.length)throw new Error(`Unable to create the animation due to the following errors: ${i.join("\n")}`);o.forEach((t,e)=>{Object.keys(t).forEach(n=>{t[n]=this._driver.computeStyle(e,n,ff)})});const a=Cf(s.map(t=>{const e=o.get(t.element);return this._buildPlayer(t,{},e)}));return this._playersById[t]=a,a.onDestroy(()=>this.destroy(t)),this.players.push(a),a}destroy(t){const e=this._getPlayer(t);e.destroy(),delete this._playersById[t];const n=this.players.indexOf(e);n>=0&&this.players.splice(n,1)}_getPlayer(t){const e=this._playersById[t];if(!e)throw new Error(`Unable to find the timeline player referenced by ${t}`);return e}listen(t,e,n,i){const r=Af(e,"","","");return kf(this._getPlayer(t),n,r,i),()=>{}}command(t,e,n,i){if("register"==n)return void this.register(t,i[0]);if("create"==n)return void this.create(t,e,i[0]||{});const r=this._getPlayer(t);switch(n){case"play":r.play();break;case"pause":r.pause();break;case"reset":r.reset();break;case"restart":r.restart();break;case"finish":r.finish();break;case"init":r.init();break;case"setPosition":r.setPosition(parseFloat(i[0]));break;case"destroy":this.destroy(t)}}}const Yp="ng-animate-queued",Xp="ng-animate-disabled",Jp=".ng-animate-disabled",Qp=[],Zp={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},tg={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0};class eg{constructor(t,e=""){this.namespaceId=e;const n=t&&t.hasOwnProperty("value");if(this.value=null!=(i=n?t.value:t)?i:null,n){const e=Qf(t);delete e.value,this.options=e}else this.options={};var i;this.options.params||(this.options.params={})}get params(){return this.options.params}absorbOptions(t){const e=t.params;if(e){const t=this.options.params;Object.keys(e).forEach(n=>{null==t[n]&&(t[n]=e[n])})}}}const ng="void",ig=new eg(ng);class rg{constructor(t,e,n){this.id=t,this.hostElement=e,this._engine=n,this.players=[],this._triggers={},this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,hg(e,this._hostClassName)}listen(t,e,n,i){if(!this._triggers.hasOwnProperty(e))throw new Error(`Unable to listen on the animation trigger event "${n}" because the animation trigger "${e}" doesn't exist!`);if(null==n||0==n.length)throw new Error(`Unable to listen on the animation trigger "${e}" because the provided event is undefined!`);if("start"!=(r=n)&&"done"!=r)throw new Error(`The provided animation trigger event "${n}" for the animation trigger "${e}" is not supported!`);var r;const s=Df(this._elementListeners,t,[]),o={name:e,phase:n,callback:i};s.push(o);const a=Df(this._engine.statesByElement,t,{});return a.hasOwnProperty(e)||(hg(t,Wf),hg(t,"ng-trigger-"+e),a[e]=ig),()=>{this._engine.afterFlush(()=>{const t=s.indexOf(o);t>=0&&s.splice(t,1),this._triggers[e]||delete a[e]})}}register(t,e){return!this._triggers[t]&&(this._triggers[t]=e,!0)}_getTrigger(t){const e=this._triggers[t];if(!e)throw new Error(`The provided animation trigger "${t}" has not been registered!`);return e}trigger(t,e,n,i=!0){const r=this._getTrigger(e),s=new og(this.id,e,t);let o=this._engine.statesByElement.get(t);o||(hg(t,Wf),hg(t,"ng-trigger-"+e),this._engine.statesByElement.set(t,o={}));let a=o[e];const l=new eg(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&a&&l.absorbOptions(a.options),o[e]=l,a||(a=ig),l.value!==ng&&a.value===l.value){if(!function(t,e){const n=Object.keys(t),i=Object.keys(e);if(n.length!=i.length)return!1;for(let r=0;r{ip(t,n),np(t,i)})}return}const c=Df(this._engine.playersByElement,t,[]);c.forEach(t=>{t.namespaceId==this.id&&t.triggerName==e&&t.queued&&t.destroy()});let u=r.matchTransition(a.value,l.value,t,l.params),h=!1;if(!u){if(!i)return;u=r.fallbackTransition,h=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:u,fromState:a,toState:l,player:s,isFallbackTransition:h}),h||(hg(t,Yp),s.onStart(()=>{dg(t,Yp)})),s.onDone(()=>{let e=this.players.indexOf(s);e>=0&&this.players.splice(e,1);const n=this._engine.playersByElement.get(t);if(n){let t=n.indexOf(s);t>=0&&n.splice(t,1)}}),this.players.push(s),c.push(s),s}deregister(t){delete this._triggers[t],this._engine.statesByElement.forEach((e,n)=>{delete e[t]}),this._elementListeners.forEach((e,n)=>{this._elementListeners.set(n,e.filter(e=>e.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);const e=this._engine.playersByElement.get(t);e&&(e.forEach(t=>t.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,e){const n=this._engine.driver.query(t,Gf,!0);n.forEach(t=>{if(t.__ng_removed)return;const n=this._engine.fetchNamespacesByElement(t);n.size?n.forEach(n=>n.triggerLeaveAnimation(t,e,!1,!0)):this.clearElementCache(t)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(t=>this.clearElementCache(t)))}triggerLeaveAnimation(t,e,n,i){const r=this._engine.statesByElement.get(t);if(r){const s=[];if(Object.keys(r).forEach(e=>{if(this._triggers[e]){const n=this.trigger(t,e,ng,i);n&&s.push(n)}}),s.length)return this._engine.markElementAsRemoved(this.id,t,!0,e),n&&Cf(s).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){const e=this._elementListeners.get(t);if(e){const n=new Set;e.forEach(e=>{const i=e.name;if(n.has(i))return;n.add(i);const r=this._triggers[i].fallbackTransition,s=this._engine.statesByElement.get(t)[i]||ig,o=new eg(ng),a=new og(this.id,i,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:i,transition:r,fromState:s,toState:o,player:a,isFallbackTransition:!0})})}}removeNode(t,e){const n=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),this.triggerLeaveAnimation(t,e,!0))return;let i=!1;if(n.totalAnimations){const e=n.players.length?n.playersByQueriedElement.get(t):[];if(e&&e.length)i=!0;else{let e=t;for(;e=e.parentNode;)if(n.statesByElement.get(e)){i=!0;break}}}if(this.prepareLeaveAnimationListeners(t),i)n.markElementAsRemoved(this.id,t,!1,e);else{const i=t.__ng_removed;i&&i!==Zp||(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}}insertNode(t,e){hg(t,this._hostClassName)}drainQueuedTransitions(t){const e=[];return this._queue.forEach(n=>{const i=n.player;if(i.destroyed)return;const r=n.element,s=this._elementListeners.get(r);s&&s.forEach(e=>{if(e.name==n.triggerName){const i=Af(r,n.triggerName,n.fromState.value,n.toState.value);i._data=t,kf(n.player,e.phase,i,e.callback)}}),i.markedForDestroy?this._engine.afterFlush(()=>{i.destroy()}):e.push(n)}),this._queue=[],e.sort((t,e)=>{const n=t.transition.ast.depCount,i=e.transition.ast.depCount;return 0==n||0==i?n-i:this._engine.driver.containsElement(t.element,e.element)?1:-1})}destroy(t){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}elementContainsData(t){let e=!1;return this._elementListeners.has(t)&&(e=!0),e=!!this._queue.find(e=>e.element===t)||e,e}}class sg{constructor(t,e,n){this.bodyNode=t,this.driver=e,this._normalizer=n,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(t,e)=>{}}_onRemovalComplete(t,e){this.onRemovalComplete(t,e)}get queuedPlayers(){const t=[];return this._namespaceList.forEach(e=>{e.players.forEach(e=>{e.queued&&t.push(e)})}),t}createNamespace(t,e){const n=new rg(t,e,this);return e.parentNode?this._balanceNamespaceList(n,e):(this.newHostElements.set(e,n),this.collectEnterElement(e)),this._namespaceLookup[t]=n}_balanceNamespaceList(t,e){const n=this._namespaceList.length-1;if(n>=0){let i=!1;for(let r=n;r>=0;r--)if(this.driver.containsElement(this._namespaceList[r].hostElement,e)){this._namespaceList.splice(r+1,0,t),i=!0;break}i||this._namespaceList.splice(0,0,t)}else this._namespaceList.push(t);return this.namespacesByHostElement.set(e,t),t}register(t,e){let n=this._namespaceLookup[t];return n||(n=this.createNamespace(t,e)),n}registerTrigger(t,e,n){let i=this._namespaceLookup[t];i&&i.register(e,n)&&this.totalAnimations++}destroy(t,e){if(!t)return;const n=this._fetchNamespace(t);this.afterFlush(()=>{this.namespacesByHostElement.delete(n.hostElement),delete this._namespaceLookup[t];const e=this._namespaceList.indexOf(n);e>=0&&this._namespaceList.splice(e,1)}),this.afterFlushAnimationsDone(()=>n.destroy(e))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){const e=new Set,n=this.statesByElement.get(t);if(n){const t=Object.keys(n);for(let i=0;i=0&&this.collectedLeaveElements.splice(t,1)}if(t){const i=this._fetchNamespace(t);i&&i.insertNode(e,n)}i&&this.collectEnterElement(e)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),hg(t,Xp)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),dg(t,Xp))}removeNode(t,e,n,i){if(ag(e)){const r=t?this._fetchNamespace(t):null;if(r?r.removeNode(e,i):this.markElementAsRemoved(t,e,!1,i),n){const n=this.namespacesByHostElement.get(e);n&&n.id!==t&&n.removeNode(e,i)}}else this._onRemovalComplete(e,i)}markElementAsRemoved(t,e,n,i){this.collectedLeaveElements.push(e),e.__ng_removed={namespaceId:t,setForRemoval:i,hasAnimation:n,removedBeforeQueried:!1}}listen(t,e,n,i,r){return ag(e)?this._fetchNamespace(t).listen(e,n,i,r):()=>{}}_buildInstruction(t,e,n,i,r){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,n,i,t.fromState.options,t.toState.options,e,r)}destroyInnerAnimations(t){let e=this.driver.query(t,Gf,!0);e.forEach(t=>this.destroyActiveAnimationsForElement(t)),0!=this.playersByQueriedElement.size&&(e=this.driver.query(t,qf,!0),e.forEach(t=>this.finishActiveQueriedAnimationOnElement(t)))}destroyActiveAnimationsForElement(t){const e=this.playersByElement.get(t);e&&e.forEach(t=>{t.queued?t.markedForDestroy=!0:t.destroy()})}finishActiveQueriedAnimationOnElement(t){const e=this.playersByQueriedElement.get(t);e&&e.forEach(t=>t.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return Cf(this.players).onDone(()=>t());t()})}processLeaveNode(t){const e=t.__ng_removed;if(e&&e.setForRemoval){if(t.__ng_removed=Zp,e.namespaceId){this.destroyInnerAnimations(t);const n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}this.driver.matchesElement(t,Jp)&&this.markElementAsDisabled(t,!1),this.driver.query(t,Jp,!0).forEach(t=>{this.markElementAsDisabled(t,!1)})}flush(t=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((t,e)=>this._balanceNamespaceList(t,e)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;nt()),this._flushFns=[],this._whenQuietFns.length){const t=this._whenQuietFns;this._whenQuietFns=[],e.length?Cf(e).onDone(()=>{t.forEach(t=>t())}):t.forEach(t=>t())}}reportError(t){throw new Error(`Unable to process animations due to the following failed trigger transitions\n ${t.join("\n")}`)}_flushAnimations(t,e){const n=new Dp,i=[],r=new Map,s=[],o=new Map,a=new Map,l=new Map,c=new Set;this.disabledNodes.forEach(t=>{c.add(t);const e=this.driver.query(t,".ng-animate-queued",!0);for(let n=0;n{const n=jf+p++;f.set(e,n),t.forEach(t=>hg(t,n))});const g=[],m=new Set,v=new Set;for(let R=0;Rm.add(t)):v.add(t))}const y=new Map,b=ug(h,Array.from(m));b.forEach((t,e)=>{const n=zf+p++;y.set(e,n),t.forEach(t=>hg(t,n))}),t.push(()=>{d.forEach((t,e)=>{const n=f.get(e);t.forEach(t=>dg(t,n))}),b.forEach((t,e)=>{const n=y.get(e);t.forEach(t=>dg(t,n))}),g.forEach(t=>{this.processLeaveNode(t)})});const w=[],x=[];for(let R=this._namespaceList.length-1;R>=0;R--)this._namespaceList[R].drainQueuedTransitions(e).forEach(t=>{const e=t.player,r=t.element;if(w.push(e),this.collectedEnterElements.length){const t=r.__ng_removed;if(t&&t.setForMove)return void e.destroy()}const c=!u||!this.driver.containsElement(u,r),h=y.get(r),d=f.get(r),p=this._buildInstruction(t,n,d,h,c);if(p.errors&&p.errors.length)x.push(p);else{if(c)return e.onStart(()=>ip(r,p.fromStyles)),e.onDestroy(()=>np(r,p.toStyles)),void i.push(e);if(t.isFallbackTransition)return e.onStart(()=>ip(r,p.fromStyles)),e.onDestroy(()=>np(r,p.toStyles)),void i.push(e);p.timelines.forEach(t=>t.stretchStartingKeyframe=!0),n.append(r,p.timelines),s.push({instruction:p,player:e,element:r}),p.queriedElements.forEach(t=>Df(o,t,[]).push(e)),p.preStyleProps.forEach((t,e)=>{const n=Object.keys(t);if(n.length){let t=a.get(e);t||a.set(e,t=new Set),n.forEach(e=>t.add(e))}}),p.postStyleProps.forEach((t,e)=>{const n=Object.keys(t);let i=l.get(e);i||l.set(e,i=new Set),n.forEach(t=>i.add(t))})}});if(x.length){const t=[];x.forEach(e=>{t.push(`@${e.triggerName} has failed due to:\n`),e.errors.forEach(e=>t.push(`- ${e}\n`))}),w.forEach(t=>t.destroy()),this.reportError(t)}const _=new Map,C=new Map;s.forEach(t=>{const e=t.element;n.has(e)&&(C.set(e,e),this._beforeAnimationBuild(t.player.namespaceId,t.instruction,_))}),i.forEach(t=>{const e=t.element;this._getPreviousPlayers(e,!1,t.namespaceId,t.triggerName,null).forEach(t=>{Df(_,e,[]).push(t),t.destroy()})});const S=g.filter(t=>gg(t,a,l)),k=new Map;cg(k,this.driver,v,l,ff).forEach(t=>{gg(t,a,l)&&S.push(t)});const E=new Map;d.forEach((t,e)=>{cg(E,this.driver,new Set(t),a,"!")}),S.forEach(t=>{const e=k.get(t),n=E.get(t);k.set(t,Object.assign(Object.assign({},e),n))});const A=[],D=[],T={};s.forEach(t=>{const{element:e,player:s,instruction:o}=t;if(n.has(e)){if(c.has(e))return s.onDestroy(()=>np(e,o.toStyles)),s.disabled=!0,s.overrideTotalTime(o.totalTime),void i.push(s);let t=T;if(C.size>1){let n=e;const i=[];for(;n=n.parentNode;){const e=C.get(n);if(e){t=e;break}i.push(n)}i.forEach(e=>C.set(e,t))}const n=this._buildAnimation(s.namespaceId,o,_,r,E,k);if(s.setRealPlayer(n),t===T)A.push(s);else{const e=this.playersByElement.get(t);e&&e.length&&(s.parentPlayer=Cf(e)),i.push(s)}}else ip(e,o.fromStyles),s.onDestroy(()=>np(e,o.toStyles)),D.push(s),c.has(e)&&i.push(s)}),D.forEach(t=>{const e=r.get(t.element);if(e&&e.length){const n=Cf(e);t.setRealPlayer(n)}}),i.forEach(t=>{t.parentPlayer?t.syncPlayerEvents(t.parentPlayer):t.destroy()});for(let R=0;R!t.destroyed);i.length?fg(this,t,i):this.processLeaveNode(t)}return g.length=0,A.forEach(t=>{this.players.push(t),t.onDone(()=>{t.destroy();const e=this.players.indexOf(t);this.players.splice(e,1)}),t.play()}),A}elementContainsData(t,e){let n=!1;const i=e.__ng_removed;return i&&i.setForRemoval&&(n=!0),this.playersByElement.has(e)&&(n=!0),this.playersByQueriedElement.has(e)&&(n=!0),this.statesByElement.has(e)&&(n=!0),this._fetchNamespace(t).elementContainsData(e)||n}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,e,n,i,r){let s=[];if(e){const e=this.playersByQueriedElement.get(t);e&&(s=e)}else{const e=this.playersByElement.get(t);if(e){const t=!r||r==ng;e.forEach(e=>{e.queued||(t||e.triggerName==i)&&s.push(e)})}}return(n||i)&&(s=s.filter(t=>!(n&&n!=t.namespaceId||i&&i!=t.triggerName))),s}_beforeAnimationBuild(t,e,n){const i=e.element,r=e.isRemovalTransition?void 0:t,s=e.isRemovalTransition?void 0:e.triggerName;for(const o of e.timelines){const t=o.element,a=t!==i,l=Df(n,t,[]);this._getPreviousPlayers(t,a,r,s,e.toState).forEach(t=>{const e=t.getRealPlayer();e.beforeDestroy&&e.beforeDestroy(),t.destroy(),l.push(t)})}ip(i,e.fromStyles)}_buildAnimation(t,e,n,i,r,s){const o=e.triggerName,a=e.element,l=[],c=new Set,u=new Set,h=e.timelines.map(e=>{const h=e.element;c.add(h);const d=h.__ng_removed;if(d&&d.removedBeforeQueried)return new wf(e.duration,e.delay);const f=h!==a,p=function(t){const e=[];return pg(t,e),e}((n.get(h)||Qp).map(t=>t.getRealPlayer())).filter(t=>!!t.element&&t.element===h),g=r.get(h),m=s.get(h),v=Sf(0,this._normalizer,0,e.keyframes,g,m),y=this._buildPlayer(e,v,p);if(e.subTimeline&&i&&u.add(h),f){const e=new og(t,o,h);e.setRealPlayer(y),l.push(e)}return y});l.forEach(t=>{Df(this.playersByQueriedElement,t.element,[]).push(t),t.onDone(()=>function(t,e,n){let i;if(t instanceof Map){if(i=t.get(e),i){if(i.length){const t=i.indexOf(n);i.splice(t,1)}0==i.length&&t.delete(e)}}else if(i=t[e],i){if(i.length){const t=i.indexOf(n);i.splice(t,1)}0==i.length&&delete t[e]}return i}(this.playersByQueriedElement,t.element,t))}),c.forEach(t=>hg(t,Kf));const d=Cf(h);return d.onDestroy(()=>{c.forEach(t=>dg(t,Kf)),np(a,e.toStyles)}),u.forEach(t=>{Df(i,t,[]).push(d)}),d}_buildPlayer(t,e,n){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,n):new wf(t.duration,t.delay)}}class og{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new wf,this._containsRealPlayer=!1,this._queuedCallbacks={},this.destroyed=!1,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,Object.keys(this._queuedCallbacks).forEach(e=>{this._queuedCallbacks[e].forEach(n=>kf(t,e,void 0,n))}),this._queuedCallbacks={},this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){const e=this._player;e.triggerCallback&&t.onStart(()=>e.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,e){Df(this._queuedCallbacks,t,[]).push(e)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}init(){this._player.init()}hasStarted(){return!this.queued&&this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){const e=this._player;e.triggerCallback&&e.triggerCallback(t)}}function ag(t){return t&&1===t.nodeType}function lg(t,e){const n=t.style.display;return t.style.display=null!=e?e:"none",n}function cg(t,e,n,i,r){const s=[];n.forEach(t=>s.push(lg(t)));const o=[];i.forEach((n,i)=>{const s={};n.forEach(t=>{const n=s[t]=e.computeStyle(i,t,r);n&&0!=n.length||(i.__ng_removed=tg,o.push(i))}),t.set(i,s)});let a=0;return n.forEach(t=>lg(t,s[a++])),o}function ug(t,e){const n=new Map;if(t.forEach(t=>n.set(t,[])),0==e.length)return n;const i=new Set(e),r=new Map;function s(t){if(!t)return 1;let e=r.get(t);if(e)return e;const o=t.parentNode;return e=n.has(o)?o:i.has(o)?1:s(o),r.set(t,e),e}return e.forEach(t=>{const e=s(t);1!==e&&n.get(e).push(t)}),n}function hg(t,e){if(t.classList)t.classList.add(e);else{let n=t.$$classes;n||(n=t.$$classes={}),n[e]=!0}}function dg(t,e){if(t.classList)t.classList.remove(e);else{let n=t.$$classes;n&&delete n[e]}}function fg(t,e,n){Cf(n).onDone(()=>t.processLeaveNode(e))}function pg(t,e){for(let n=0;nr.add(t)):e.set(t,i),n.delete(t),!0}class mg{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._triggerCache={},this.onRemovalComplete=(t,e)=>{},this._transitionEngine=new sg(t,e,n),this._timelineEngine=new qp(t,e,n),this._transitionEngine.onRemovalComplete=(t,e)=>this.onRemovalComplete(t,e)}registerTrigger(t,e,n,i,r){const s=t+"-"+i;let o=this._triggerCache[s];if(!o){const t=[],e=xp(this._driver,r,t);if(t.length)throw new Error(`The animation trigger "${i}" has failed to build due to the following errors:\n - ${t.join("\n - ")}`);o=function(t,e){return new Wp(t,e)}(i,e),this._triggerCache[s]=o}this._transitionEngine.registerTrigger(e,i,o)}register(t,e){this._transitionEngine.register(t,e)}destroy(t,e){this._transitionEngine.destroy(t,e)}onInsert(t,e,n,i){this._transitionEngine.insertNode(t,e,n,i)}onRemove(t,e,n,i){this._transitionEngine.removeNode(t,e,i||!1,n)}disableAnimations(t,e){this._transitionEngine.markElementAsDisabled(t,e)}process(t,e,n,i){if("@"==n.charAt(0)){const[t,r]=Tf(n);this._timelineEngine.command(t,e,r,i)}else this._transitionEngine.trigger(t,e,n,i)}listen(t,e,n,i,r){if("@"==n.charAt(0)){const[t,i]=Tf(n);return this._timelineEngine.listen(t,e,i,r)}return this._transitionEngine.listen(t,e,n,i,r)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return this._transitionEngine.players.concat(this._timelineEngine.players)}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}}function vg(t,e){let n=null,i=null;return Array.isArray(e)&&e.length?(n=bg(e[0]),e.length>1&&(i=bg(e[e.length-1]))):e&&(n=bg(e)),n||i?new yg(t,n,i):null}let yg=(()=>{class t{constructor(e,n,i){this._element=e,this._startStyles=n,this._endStyles=i,this._state=0;let r=t.initialStylesByElement.get(e);r||t.initialStylesByElement.set(e,r={}),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&np(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&(np(this._element,this._initialStyles),this._endStyles&&(np(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(t.initialStylesByElement.delete(this._element),this._startStyles&&(ip(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(ip(this._element,this._endStyles),this._endStyles=null),np(this._element,this._initialStyles),this._state=3)}}return t.initialStylesByElement=new WeakMap,t})();function bg(t){let e=null;const n=Object.keys(t);for(let i=0;ithis._handleCallback(t)}apply(){!function(t,e){const n=Tg(t,"").trim();n.length&&(function(t,e){let n=0;for(let i=0;i=this._delay&&n>=this._duration&&this.finish()}finish(){this._finished||(this._finished=!0,this._onDoneFn(),Ag(this._element,this._eventFn,!0))}destroy(){this._destroyed||(this._destroyed=!0,this.finish(),function(t,e){const n=Tg(t,"").split(","),i=Eg(n,e);i>=0&&(n.splice(i,1),Dg(t,"",n.join(",")))}(this._element,this._name))}}function Sg(t,e,n){Dg(t,"PlayState",n,kg(t,e))}function kg(t,e){const n=Tg(t,"");return n.indexOf(",")>0?Eg(n.split(","),e):Eg([n],e)}function Eg(t,e){for(let n=0;n=0)return n;return-1}function Ag(t,e,n){n?t.removeEventListener(_g,e):t.addEventListener(_g,e)}function Dg(t,e,n,i){const r=xg+e;if(null!=i){const e=t.style[r];if(e.length){const t=e.split(",");t[i]=n,n=t.join(",")}}t.style[r]=n}function Tg(t,e){return t.style[xg+e]}class Rg{constructor(t,e,n,i,r,s,o,a){this.element=t,this.keyframes=e,this.animationName=n,this._duration=i,this._delay=r,this._finalStyles=o,this._specialStyles=a,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._started=!1,this.currentSnapshot={},this._state=0,this.easing=s||"linear",this.totalTime=i+r,this._buildStyler()}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}destroy(){this.init(),this._state>=4||(this._state=4,this._styler.destroy(),this._flushStartFns(),this._flushDoneFns(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}_flushDoneFns(){this._onDoneFns.forEach(t=>t()),this._onDoneFns=[]}_flushStartFns(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}finish(){this.init(),this._state>=3||(this._state=3,this._styler.finish(),this._flushStartFns(),this._specialStyles&&this._specialStyles.finish(),this._flushDoneFns())}setPosition(t){this._styler.setPosition(t)}getPosition(){return this._styler.getPosition()}hasStarted(){return this._state>=2}init(){this._state>=1||(this._state=1,this._styler.apply(),this._delay&&this._styler.pause())}play(){this.init(),this.hasStarted()||(this._flushStartFns(),this._state=2,this._specialStyles&&this._specialStyles.start()),this._styler.resume()}pause(){this.init(),this._styler.pause()}restart(){this.reset(),this.play()}reset(){this._styler.destroy(),this._buildStyler(),this._styler.apply()}_buildStyler(){this._styler=new Cg(this.element,this.animationName,this._duration,this._delay,this.easing,"forwards",()=>this.finish())}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}beforeDestroy(){this.init();const t={};if(this.hasStarted()){const e=this._state>=3;Object.keys(this._finalStyles).forEach(n=>{"offset"!=n&&(t[n]=e?this._finalStyles[n]:pp(this.element,n))})}this.currentSnapshot=t}}class Fg extends wf{constructor(t,e){super(),this.element=t,this._startingStyles={},this.__initialized=!1,this._styles=Uf(e)}init(){!this.__initialized&&this._startingStyles&&(this.__initialized=!0,Object.keys(this._styles).forEach(t=>{this._startingStyles[t]=this.element.style[t]}),super.init())}play(){this._startingStyles&&(this.init(),Object.keys(this._styles).forEach(t=>this.element.style.setProperty(t,this._styles[t])),super.play())}destroy(){this._startingStyles&&(Object.keys(this._startingStyles).forEach(t=>{const e=this._startingStyles[t];e?this.element.style.setProperty(t,e):this.element.style.removeProperty(t)}),this._startingStyles=null,super.destroy())}}class Mg{constructor(){this._count=0,this._head=document.querySelector("head"),this._warningIssued=!1}validateStyleProperty(t){return If(t)}matchesElement(t,e){return Nf(t,e)}containsElement(t,e){return Pf(t,e)}query(t,e,n){return Bf(t,e,n)}computeStyle(t,e,n){return window.getComputedStyle(t)[e]}buildKeyframeElement(t,e,n){n=n.map(t=>Uf(t));let i=`@keyframes ${e} {\n`,r="";n.forEach(t=>{r=" ";const e=parseFloat(t.offset);i+=`${r}${100*e}% {\n`,r+=" ",Object.keys(t).forEach(e=>{const n=t[e];switch(e){case"offset":return;case"easing":return void(n&&(i+=`${r}animation-timing-function: ${n};\n`));default:return void(i+=`${r}${e}: ${n};\n`)}}),i+=`${r}}\n`}),i+="}\n";const s=document.createElement("style");return s.textContent=i,s}animate(t,e,n,i,r,s=[],o){o&&this._notifyFaultyScrubber();const a=s.filter(t=>t instanceof Rg),l={};hp(n,i)&&a.forEach(t=>{let e=t.currentSnapshot;Object.keys(e).forEach(t=>l[t]=e[t])});const c=function(t){let e={};return t&&(Array.isArray(t)?t:[t]).forEach(t=>{Object.keys(t).forEach(n=>{"offset"!=n&&"easing"!=n&&(e[n]=t[n])})}),e}(e=dp(t,e,l));if(0==n)return new Fg(t,c);const u="gen_css_kf_"+this._count++,h=this.buildKeyframeElement(t,u,e);document.querySelector("head").appendChild(h);const d=vg(t,e),f=new Rg(t,e,u,n,i,r,c,d);return f.onDestroy(()=>{var t;(t=h).parentNode.removeChild(t)}),f}_notifyFaultyScrubber(){this._warningIssued||(console.warn("@angular/animations: please load the web-animations.js polyfill to allow programmatic access...\n"," visit http://bit.ly/IWukam to learn more about using the web-animation-js polyfill."),this._warningIssued=!0)}}class Lg{constructor(t,e,n,i){this.element=t,this.keyframes=e,this.options=n,this._specialStyles=i,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this.time=0,this.parentPlayer=null,this.currentSnapshot={},this._duration=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;const t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:{},this.domPlayer.addEventListener("finish",()=>this._onFinish())}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_triggerWebAnimation(t,e,n){return t.animate(e,n)}onStart(t){this._onStartFns.push(t)}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}setPosition(t){this.domPlayer.currentTime=t*this.time}getPosition(){return this.domPlayer.currentTime/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){const t={};this.hasStarted()&&Object.keys(this._finalKeyframe).forEach(e=>{"offset"!=e&&(t[e]=this._finished?this._finalKeyframe[e]:pp(this.element,e))}),this.currentSnapshot=t}triggerCallback(t){const e="start"==t?this._onStartFns:this._onDoneFns;e.forEach(t=>t()),e.length=0}}class $g{constructor(){this._isNativeImpl=/\{\s*\[native\s+code\]\s*\}/.test(Og().toString()),this._cssKeyframesDriver=new Mg}validateStyleProperty(t){return If(t)}matchesElement(t,e){return Nf(t,e)}containsElement(t,e){return Pf(t,e)}query(t,e,n){return Bf(t,e,n)}computeStyle(t,e,n){return window.getComputedStyle(t)[e]}overrideWebAnimationsSupport(t){this._isNativeImpl=t}animate(t,e,n,i,r,s=[],o){if(!o&&!this._isNativeImpl)return this._cssKeyframesDriver.animate(t,e,n,i,r,s);const a={duration:n,delay:i,fill:0==i?"both":"forwards"};r&&(a.easing=r);const l={},c=s.filter(t=>t instanceof Lg);hp(n,i)&&c.forEach(t=>{let e=t.currentSnapshot;Object.keys(e).forEach(t=>l[t]=e[t])});const u=vg(t,e=dp(t,e=e.map(t=>Zf(t,!1)),l));return new Lg(t,e,a,u)}}function Og(){return"undefined"!=typeof window&&void 0!==window.document&&Element.prototype.animate||{}}let Ig=(()=>{class t extends df{constructor(t,e){super(),this._nextAnimationId=0,this._renderer=t.createRenderer(e.body,{id:"0",encapsulation:ue.None,styles:[],data:{animation:[]}})}build(t){const e=this._nextAnimationId.toString();this._nextAnimationId++;const n=Array.isArray(t)?mf(t):t;return Bg(this._renderer,null,e,"register",[n]),new Ng(e,this._renderer)}}return t.\u0275fac=function(e){return new(e||t)(Yt(dc),Yt(wh))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();class Ng extends class{}{constructor(t,e){super(),this._id=t,this._renderer=e}create(t,e){return new Pg(this._id,t,e||{},this._renderer)}}class Pg{constructor(t,e,n,i){this.id=t,this.element=e,this._renderer=i,this.parentPlayer=null,this._started=!1,this.totalTime=0,this._command("create",n)}_listen(t,e){return this._renderer.listen(this.element,`@@${this.id}:${t}`,e)}_command(t,...e){return Bg(this._renderer,this.element,this.id,t,e)}onDone(t){this._listen("done",t)}onStart(t){this._listen("start",t)}onDestroy(t){this._listen("destroy",t)}init(){this._command("init")}hasStarted(){return this._started}play(){this._command("play"),this._started=!0}pause(){this._command("pause")}restart(){this._command("restart")}finish(){this._command("finish")}destroy(){this._command("destroy")}reset(){this._command("reset")}setPosition(t){this._command("setPosition",t)}getPosition(){return 0}}function Bg(t,e,n,i,r){return t.setProperty(e,`@@${n}:${i}`,r)}const Ug="@",Vg="@.disabled";let Hg=(()=>{class t{constructor(t,e,n){this.delegate=t,this.engine=e,this._zone=n,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,this.promise=Promise.resolve(0),e.onRemovalComplete=(t,e)=>{e&&e.parentNode(t)&&e.removeChild(t.parentNode,t)}}createRenderer(t,e){const n=this.delegate.createRenderer(t,e);if(!(t&&e&&e.data&&e.data.animation)){let t=this._rendererCache.get(n);return t||(t=new jg("",n,this.engine),this._rendererCache.set(n,t)),t}const i=e.id,r=e.id+"-"+this._currentId;this._currentId++,this.engine.register(r,t);const s=e=>{Array.isArray(e)?e.forEach(s):this.engine.registerTrigger(i,r,t,e.name,e)};return e.data.animation.forEach(s),new zg(this,r,n,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){this.promise.then(()=>{this._microtaskId++})}scheduleListenerCallback(t,e,n){t>=0&&te(n)):(0==this._animationCallbacksBuffer.length&&Promise.resolve(null).then(()=>{this._zone.run(()=>{this._animationCallbacksBuffer.forEach(t=>{const[e,n]=t;e(n)}),this._animationCallbacksBuffer=[]})}),this._animationCallbacksBuffer.push([e,n]))}end(){this._cdRecurDepth--,0==this._cdRecurDepth&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}}return t.\u0275fac=function(e){return new(e||t)(Yt(dc),Yt(mg),Yt(ju))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();class jg{constructor(t,e,n){this.namespaceId=t,this.delegate=e,this.engine=n,this.destroyNode=this.delegate.destroyNode?t=>e.destroyNode(t):null}get data(){return this.delegate.data}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.delegate.destroy()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)}insertBefore(t,e,n,i=!0){this.delegate.insertBefore(t,e,n),this.engine.onInsert(this.namespaceId,e,t,i)}removeChild(t,e,n){this.engine.onRemove(this.namespaceId,e,this.delegate,n)}selectRootElement(t,e){return this.delegate.selectRootElement(t,e)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,e,n,i){this.delegate.setAttribute(t,e,n,i)}removeAttribute(t,e,n){this.delegate.removeAttribute(t,e,n)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,n,i){this.delegate.setStyle(t,e,n,i)}removeStyle(t,e,n){this.delegate.removeStyle(t,e,n)}setProperty(t,e,n){e.charAt(0)==Ug&&e==Vg?this.disableAnimations(t,!!n):this.delegate.setProperty(t,e,n)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,n){return this.delegate.listen(t,e,n)}disableAnimations(t,e){this.engine.disableAnimations(t,e)}}class zg extends jg{constructor(t,e,n,i){super(e,n,i),this.factory=t,this.namespaceId=e}setProperty(t,e,n){e.charAt(0)==Ug?"."==e.charAt(1)&&e==Vg?this.disableAnimations(t,n=void 0===n||!!n):this.engine.process(this.namespaceId,t,e.substr(1),n):this.delegate.setProperty(t,e,n)}listen(t,e,n){if(e.charAt(0)==Ug){const i=function(t){switch(t){case"body":return document.body;case"document":return document;case"window":return window;default:return t}}(t);let r=e.substr(1),s="";return r.charAt(0)!=Ug&&([r,s]=function(t){const e=t.indexOf(".");return[t.substring(0,e),t.substr(e+1)]}(r)),this.engine.listen(this.namespaceId,i,r,s,t=>{this.factory.scheduleListenerCallback(t._data||-1,n,t)})}return this.delegate.listen(t,e,n)}}let Wg=(()=>{class t extends mg{constructor(t,e,n){super(t.body,e,n)}}return t.\u0275fac=function(e){return new(e||t)(Yt(wh),Yt(Hf),Yt(Pp))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();const Gg=new Pt("AnimationModuleType"),Kg=[{provide:df,useClass:Ig},{provide:Pp,useFactory:function(){return new Bp}},{provide:mg,useClass:Wg},{provide:dc,useFactory:function(t,e,n){return new Hg(t,e,n)},deps:[Xd,mg,ju]}],qg=[{provide:Hf,useFactory:function(){return"function"==typeof Og()?new $g:new Mg}},{provide:Gg,useValue:"BrowserAnimations"},...Kg],Yg=[{provide:Hf,useClass:Vf},{provide:Gg,useValue:"NoopAnimations"},...Kg];let Xg=(()=>{class t{}return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},providers:qg,imports:[hf]}),t})(),Jg=(()=>{class t{}return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},providers:Yg,imports:[hf]}),t})();function Qg(...t){let e=t[t.length-1];return k(e)?(t.pop(),O(t,e)):z(t)}class Zg extends C{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){const e=super._subscribe(t);return e&&!e.closed&&t.next(this._value),e}getValue(){if(this.hasError)throw this.thrownError;if(this.closed)throw new w;return this._value}next(t){super.next(this._value=t)}}class tm extends p{notifyNext(t,e,n,i,r){this.destination.next(e)}notifyError(t,e){this.destination.error(t)}notifyComplete(t){this.destination.complete()}}class em extends p{constructor(t,e,n){super(),this.parent=t,this.outerValue=e,this.outerIndex=n,this.index=0}_next(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)}_error(t){this.parent.notifyError(t,this),this.unsubscribe()}_complete(){this.parent.notifyComplete(this),this.unsubscribe()}}function nm(t,e,n,i,r=new em(t,n,i)){if(!r.closed)return e instanceof y?e.subscribe(r):$(e)(r)}const im={};class rm{constructor(t){this.resultSelector=t}call(t,e){return e.subscribe(new sm(t,this.resultSelector))}}class sm extends tm{constructor(t,e){super(t),this.resultSelector=e,this.active=0,this.values=[],this.observables=[]}_next(t){this.values.push(im),this.observables.push(t)}_complete(){const t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(let n=0;n{function t(){return Error.call(this),this.message="no elements in sequence",this.name="EmptyError",this}return t.prototype=Object.create(Error.prototype),t})(),am=new y(t=>t.complete());function lm(t){return t?function(t){return new y(e=>t.schedule(()=>e.complete()))}(t):am}function cm(t){return new y(e=>{let n;try{n=t()}catch(i){return void e.error(i)}return(n?I(n):lm()).subscribe(e)})}function um(){return j(1)}function hm(t,e){return function(n){return n.lift(new dm(t,e))}}class dm{constructor(t,e){this.predicate=t,this.thisArg=e}call(t,e){return e.subscribe(new fm(t,this.predicate,this.thisArg))}}class fm extends p{constructor(t,e,n){super(t),this.predicate=e,this.thisArg=n,this.count=0}_next(t){let e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(n){return void this.destination.error(n)}e&&this.destination.next(t)}}const pm=(()=>{function t(){return Error.call(this),this.message="argument out of range",this.name="ArgumentOutOfRangeError",this}return t.prototype=Object.create(Error.prototype),t})();function gm(t){return function(e){return 0===t?lm():e.lift(new mm(t))}}class mm{constructor(t){if(this.total=t,this.total<0)throw new pm}call(t,e){return e.subscribe(new vm(t,this.total))}}class vm extends p{constructor(t,e){super(t),this.total=e,this.ring=new Array,this.count=0}_next(t){const e=this.ring,n=this.total,i=this.count++;e.length0){const n=this.count>=this.total?this.total:this.count,i=this.ring;for(let r=0;re.lift(new bm(t))}class bm{constructor(t){this.errorFactory=t}call(t,e){return e.subscribe(new wm(t,this.errorFactory))}}class wm extends p{constructor(t,e){super(t),this.errorFactory=e,this.hasValue=!1}_next(t){this.hasValue=!0,this.destination.next(t)}_complete(){if(this.hasValue)return this.destination.complete();{let e;try{e=this.errorFactory()}catch(t){e=t}this.destination.error(e)}}}function xm(){return new om}function _m(t=null){return e=>e.lift(new Cm(t))}class Cm{constructor(t){this.defaultValue=t}call(t,e){return e.subscribe(new Sm(t,this.defaultValue))}}class Sm extends p{constructor(t,e){super(t),this.defaultValue=e,this.isEmpty=!0}_next(t){this.isEmpty=!1,this.destination.next(t)}_complete(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()}}function km(t,e){return"function"==typeof e?n=>n.pipe(km((n,i)=>I(t(n,i)).pipe(E((t,r)=>e(n,t,i,r))))):e=>e.lift(new Em(t))}class Em{constructor(t){this.project=t}call(t,e){return e.subscribe(new Am(t,this.project))}}class Am extends P{constructor(t,e){super(t),this.project=e,this.index=0}_next(t){let e;const n=this.index++;try{e=this.project(t,n)}catch(i){return void this.destination.error(i)}this._innerSub(e)}_innerSub(t){const e=this.innerSubscription;e&&e.unsubscribe();const n=new N(this),i=this.destination;i.add(n),this.innerSubscription=B(t,n),this.innerSubscription!==n&&i.add(this.innerSubscription)}_complete(){const{innerSubscription:t}=this;t&&!t.closed||super._complete(),this.unsubscribe()}_unsubscribe(){this.innerSubscription=void 0}notifyComplete(){this.innerSubscription=void 0,this.isStopped&&super._complete()}notifyNext(t){this.destination.next(t)}}function Dm(t){return e=>0===t?lm():e.lift(new Tm(t))}class Tm{constructor(t){if(this.total=t,this.total<0)throw new pm}call(t,e){return e.subscribe(new Rm(t,this.total))}}class Rm extends p{constructor(t,e){super(t),this.total=e,this.count=0}_next(t){const e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))}}function Fm(...t){return um()(Qg(...t))}class Mm{constructor(t,e,n=!1){this.accumulator=t,this.seed=e,this.hasSeed=n}call(t,e){return e.subscribe(new Lm(t,this.accumulator,this.seed,this.hasSeed))}}class Lm extends p{constructor(t,e,n,i){super(t),this.accumulator=e,this._seed=n,this.hasSeed=i,this.index=0}get seed(){return this._seed}set seed(t){this.hasSeed=!0,this._seed=t}_next(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)}_tryNext(t){const e=this.index++;let n;try{n=this.accumulator(this.seed,t,e)}catch(i){this.destination.error(i)}this.seed=n,this.destination.next(n)}}function $m(t){return function(e){const n=new Om(t),i=e.lift(n);return n.caught=i}}class Om{constructor(t){this.selector=t}call(t,e){return e.subscribe(new Im(t,this.selector,this.caught))}}class Im extends P{constructor(t,e,n){super(t),this.selector=e,this.caught=n}error(t){if(!this.isStopped){let n;try{n=this.selector(t,this.caught)}catch(e){return void super.error(e)}this._unsubscribeAndRecycle();const i=new N(this);this.add(i);const r=B(n,i);r!==i&&this.add(r)}}}function Nm(t,e){return U(t,e,1)}function Pm(t,e){const n=arguments.length>=2;return i=>i.pipe(t?hm((e,n)=>t(e,n,i)):v,Dm(1),n?_m(e):ym(()=>new om))}function Bm(){}function Um(t,e,n){return function(i){return i.lift(new Vm(t,e,n))}}class Vm{constructor(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}call(t,e){return e.subscribe(new Hm(t,this.nextOrObserver,this.error,this.complete))}}class Hm extends p{constructor(t,e,n,r){super(t),this._tapNext=Bm,this._tapError=Bm,this._tapComplete=Bm,this._tapError=n||Bm,this._tapComplete=r||Bm,i(e)?(this._context=this,this._tapNext=e):e&&(this._context=e,this._tapNext=e.next||Bm,this._tapError=e.error||Bm,this._tapComplete=e.complete||Bm)}_next(t){try{this._tapNext.call(this._context,t)}catch(e){return void this.destination.error(e)}this.destination.next(t)}_error(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)}_complete(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()}}class jm{constructor(t){this.callback=t}call(t,e){return e.subscribe(new zm(t,this.callback))}}class zm extends p{constructor(t,e){super(t),this.add(new h(e))}}class Wm{constructor(t,e){this.id=t,this.url=e}}class Gm extends Wm{constructor(t,e,n="imperative",i=null){super(t,e),this.navigationTrigger=n,this.restoredState=i}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}}class Km extends Wm{constructor(t,e,n){super(t,e),this.urlAfterRedirects=n}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}}class qm extends Wm{constructor(t,e,n){super(t,e),this.reason=n}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}}class Ym extends Wm{constructor(t,e,n){super(t,e),this.error=n}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}}class Xm extends Wm{constructor(t,e,n,i){super(t,e),this.urlAfterRedirects=n,this.state=i}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Jm extends Wm{constructor(t,e,n,i){super(t,e),this.urlAfterRedirects=n,this.state=i}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class Qm extends Wm{constructor(t,e,n,i,r){super(t,e),this.urlAfterRedirects=n,this.state=i,this.shouldActivate=r}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}}class Zm extends Wm{constructor(t,e,n,i){super(t,e),this.urlAfterRedirects=n,this.state=i}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class tv extends Wm{constructor(t,e,n,i){super(t,e),this.urlAfterRedirects=n,this.state=i}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}}class ev{constructor(t){this.route=t}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}}class nv{constructor(t){this.route=t}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}}class iv{constructor(t){this.snapshot=t}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class rv{constructor(t){this.snapshot=t}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class sv{constructor(t){this.snapshot=t}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class ov{constructor(t){this.snapshot=t}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}}class av{constructor(t,e,n){this.routerEvent=t,this.position=e,this.anchor=n}toString(){return`Scroll(anchor: '${this.anchor}', position: '${this.position?`${this.position[0]}, ${this.position[1]}`:null}')`}}const lv="primary";class cv{constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e[0]:e}return null}getAll(t){if(this.has(t)){const e=this.params[t];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}}function uv(t){return new cv(t)}function hv(t){const e=Error("NavigationCancelingError: "+t);return e.ngNavigationCancelingError=!0,e}function dv(t,e,n){const i=n.path.split("/");if(i.length>t.length)return null;if("full"===n.pathMatch&&(e.hasChildren()||i.lengthi[e]===t)}return t===e}function gv(t){return Array.prototype.concat.apply([],t)}function mv(t){return t.length>0?t[t.length-1]:null}function vv(t,e){for(const n in t)t.hasOwnProperty(n)&&e(t[n],n)}function yv(t){return va(t)?t:ma(t)?I(Promise.resolve(t)):Qg(t)}function bv(t,e,n){return n?function(t,e){return fv(t,e)}(t.queryParams,e.queryParams)&&wv(t.root,e.root):function(t,e){return Object.keys(e).length<=Object.keys(t).length&&Object.keys(e).every(n=>pv(t[n],e[n]))}(t.queryParams,e.queryParams)&&xv(t.root,e.root)}function wv(t,e){if(!Ev(t.segments,e.segments))return!1;if(t.numberOfChildren!==e.numberOfChildren)return!1;for(const n in e.children){if(!t.children[n])return!1;if(!wv(t.children[n],e.children[n]))return!1}return!0}function xv(t,e){return _v(t,e,e.segments)}function _v(t,e,n){if(t.segments.length>n.length)return!!Ev(t.segments.slice(0,n.length),n)&&!e.hasChildren();if(t.segments.length===n.length){if(!Ev(t.segments,n))return!1;for(const n in e.children){if(!t.children[n])return!1;if(!xv(t.children[n],e.children[n]))return!1}return!0}{const i=n.slice(0,t.segments.length),r=n.slice(t.segments.length);return!!Ev(t.segments,i)&&!!t.children.primary&&_v(t.children.primary,e,r)}}class Cv{constructor(t,e,n){this.root=t,this.queryParams=e,this.fragment=n}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=uv(this.queryParams)),this._queryParamMap}toString(){return Rv.serialize(this)}}class Sv{constructor(t,e){this.segments=t,this.children=e,this.parent=null,vv(e,(t,e)=>t.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return Fv(this)}}class kv{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap||(this._parameterMap=uv(this.parameters)),this._parameterMap}toString(){return Pv(this)}}function Ev(t,e){return t.length===e.length&&t.every((t,n)=>t.path===e[n].path)}function Av(t,e){let n=[];return vv(t.children,(t,i)=>{i===lv&&(n=n.concat(e(t,i)))}),vv(t.children,(t,i)=>{i!==lv&&(n=n.concat(e(t,i)))}),n}class Dv{}class Tv{parse(t){const e=new jv(t);return new Cv(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){var e;return`/${Mv(t.root,!0)}${function(t){const e=Object.keys(t).map(e=>{const n=t[e];return Array.isArray(n)?n.map(t=>`${$v(e)}=${$v(t)}`).join("&"):`${$v(e)}=${$v(n)}`});return e.length?`?${e.join("&")}`:""}(t.queryParams)}${"string"==typeof t.fragment?`#${e=t.fragment,encodeURI(e)}`:""}`}}const Rv=new Tv;function Fv(t){return t.segments.map(t=>Pv(t)).join("/")}function Mv(t,e){if(!t.hasChildren())return Fv(t);if(e){const e=t.children.primary?Mv(t.children.primary,!1):"",n=[];return vv(t.children,(t,e)=>{e!==lv&&n.push(`${e}:${Mv(t,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}{const e=Av(t,(e,n)=>n===lv?[Mv(t.children.primary,!1)]:[`${n}:${Mv(e,!1)}`]);return 1===Object.keys(t.children).length&&null!=t.children.primary?`${Fv(t)}/${e[0]}`:`${Fv(t)}/(${e.join("//")})`}}function Lv(t){return encodeURIComponent(t).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function $v(t){return Lv(t).replace(/%3B/gi,";")}function Ov(t){return Lv(t).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function Iv(t){return decodeURIComponent(t)}function Nv(t){return Iv(t.replace(/\+/g,"%20"))}function Pv(t){return`${Ov(t.path)}${e=t.parameters,Object.keys(e).map(t=>`;${Ov(t)}=${Ov(e[t])}`).join("")}`;var e}const Bv=/^[^\/()?;=#]+/;function Uv(t){const e=t.match(Bv);return e?e[0]:""}const Vv=/^[^=?&#]+/,Hv=/^[^?&#]+/;class jv{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),""===this.remaining||this.peekStartsWith("?")||this.peekStartsWith("#")?new Sv([],{}):new Sv([],this.parseChildren())}parseQueryParams(){const t={};if(this.consumeOptional("?"))do{this.parseQueryParam(t)}while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(""===this.remaining)return{};this.consumeOptional("/");const t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(n.primary=new Sv(t,e)),n}parseSegment(){const t=Uv(this.remaining);if(""===t&&this.peekStartsWith(";"))throw new Error(`Empty path url segment cannot have parameters: '${this.remaining}'.`);return this.capture(t),new kv(Iv(t),this.parseMatrixParams())}parseMatrixParams(){const t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){const e=Uv(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const t=Uv(this.remaining);t&&(n=t,this.capture(n))}t[Iv(e)]=Iv(n)}parseQueryParam(t){const e=function(t){const e=t.match(Vv);return e?e[0]:""}(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){const t=function(t){const e=t.match(Hv);return e?e[0]:""}(this.remaining);t&&(n=t,this.capture(n))}const i=Nv(e),r=Nv(n);if(t.hasOwnProperty(i)){let e=t[i];Array.isArray(e)||(e=[e],t[i]=e),e.push(r)}else t[i]=r}parseParens(t){const e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){const n=Uv(this.remaining),i=this.remaining[n.length];if("/"!==i&&")"!==i&&";"!==i)throw new Error(`Cannot parse url '${this.url}'`);let r;n.indexOf(":")>-1?(r=n.substr(0,n.indexOf(":")),this.capture(r),this.capture(":")):t&&(r=lv);const s=this.parseChildren();e[r]=1===Object.keys(s).length?s.primary:new Sv([],s),this.consumeOptional("//")}return e}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return!!this.peekStartsWith(t)&&(this.remaining=this.remaining.substring(t.length),!0)}capture(t){if(!this.consumeOptional(t))throw new Error(`Expected "${t}".`)}}class zv{constructor(t){this._root=t}get root(){return this._root.value}parent(t){const e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}children(t){const e=Wv(t,this._root);return e?e.children.map(t=>t.value):[]}firstChild(t){const e=Wv(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){const e=Gv(t,this._root);return e.length<2?[]:e[e.length-2].children.map(t=>t.value).filter(e=>e!==t)}pathFromRoot(t){return Gv(t,this._root).map(t=>t.value)}}function Wv(t,e){if(t===e.value)return e;for(const n of e.children){const e=Wv(t,n);if(e)return e}return null}function Gv(t,e){if(t===e.value)return[e];for(const n of e.children){const i=Gv(t,n);if(i.length)return i.unshift(e),i}return[]}class Kv{constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}}function qv(t){const e={};return t&&t.children.forEach(t=>e[t.value.outlet]=t),e}class Yv extends zv{constructor(t,e){super(t),this.snapshot=e,ey(this,t)}toString(){return this.snapshot.toString()}}function Xv(t,e){const n=function(t,e){const n=new Zv([],{},{},"",{},lv,e,null,t.root,-1,{});return new ty("",new Kv(n,[]))}(t,e),i=new Zg([new kv("",{})]),r=new Zg({}),s=new Zg({}),o=new Zg({}),a=new Zg(""),l=new Jv(i,r,o,a,s,lv,e,n.root);return l.snapshot=n.root,new Yv(new Kv(l,[]),n)}class Jv{constructor(t,e,n,i,r,s,o,a){this.url=t,this.params=e,this.queryParams=n,this.fragment=i,this.data=r,this.outlet=s,this.component=o,this._futureSnapshot=a}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=this.params.pipe(E(t=>uv(t)))),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=this.queryParams.pipe(E(t=>uv(t)))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}}function Qv(t,e="emptyOnly"){const n=t.pathFromRoot;let i=0;if("always"!==e)for(i=n.length-1;i>=1;){const t=n[i],e=n[i-1];if(t.routeConfig&&""===t.routeConfig.path)i--;else{if(e.component)break;i--}}return function(t){return t.reduce((t,e)=>({params:Object.assign(Object.assign({},t.params),e.params),data:Object.assign(Object.assign({},t.data),e.data),resolve:Object.assign(Object.assign({},t.resolve),e._resolvedData)}),{params:{},data:{},resolve:{}})}(n.slice(i))}class Zv{constructor(t,e,n,i,r,s,o,a,l,c,u){this.url=t,this.params=e,this.queryParams=n,this.fragment=i,this.data=r,this.outlet=s,this.component=o,this.routeConfig=a,this._urlSegment=l,this._lastPathIndex=c,this._resolve=u}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap||(this._paramMap=uv(this.params)),this._paramMap}get queryParamMap(){return this._queryParamMap||(this._queryParamMap=uv(this.queryParams)),this._queryParamMap}toString(){return`Route(url:'${this.url.map(t=>t.toString()).join("/")}', path:'${this.routeConfig?this.routeConfig.path:""}')`}}class ty extends zv{constructor(t,e){super(e),this.url=t,ey(this,e)}toString(){return ny(this._root)}}function ey(t,e){e.value._routerState=t,e.children.forEach(e=>ey(t,e))}function ny(t){const e=t.children.length>0?` { ${t.children.map(ny).join(", ")} } `:"";return`${t.value}${e}`}function iy(t){if(t.snapshot){const e=t.snapshot,n=t._futureSnapshot;t.snapshot=n,fv(e.queryParams,n.queryParams)||t.queryParams.next(n.queryParams),e.fragment!==n.fragment&&t.fragment.next(n.fragment),fv(e.params,n.params)||t.params.next(n.params),function(t,e){if(t.length!==e.length)return!1;for(let n=0;nfv(t.parameters,i[e].parameters))&&!(!t.parent!=!e.parent)&&(!t.parent||ry(t.parent,e.parent))}function sy(t,e,n){if(n&&t.shouldReuseRoute(e.value,n.value.snapshot)){const i=n.value;i._futureSnapshot=e.value;const r=function(t,e,n){return e.children.map(e=>{for(const i of n.children)if(t.shouldReuseRoute(e.value,i.value.snapshot))return sy(t,e,i);return sy(t,e)})}(t,e,n);return new Kv(i,r)}{const n=t.retrieve(e.value);if(n){const t=n.route;return oy(e,t),t}{const n=new Jv(new Zg((i=e.value).url),new Zg(i.params),new Zg(i.queryParams),new Zg(i.fragment),new Zg(i.data),i.outlet,i.component,i),r=e.children.map(e=>sy(t,e));return new Kv(n,r)}}var i}function oy(t,e){if(t.value.routeConfig!==e.value.routeConfig)throw new Error("Cannot reattach ActivatedRouteSnapshot created from a different route");if(t.children.length!==e.children.length)throw new Error("Cannot reattach ActivatedRouteSnapshot with a different number of children");e.value._futureSnapshot=t.value;for(let n=0;n{s[e]=Array.isArray(t)?t.map(t=>`${t}`):`${t}`}),new Cv(n.root===t?e:uy(n.root,t,e),s,r)}function uy(t,e,n){const i={};return vv(t.children,(t,r)=>{i[r]=t===e?n:uy(t,e,n)}),new Sv(t.segments,i)}class hy{constructor(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&ay(n[0]))throw new Error("Root segment cannot have matrix parameters");const i=n.find(ly);if(i&&i!==mv(n))throw new Error("{outlets:{}} has to be the last command")}toRoot(){return this.isAbsolute&&1===this.commands.length&&"/"==this.commands[0]}}class dy{constructor(t,e,n){this.segmentGroup=t,this.processChildren=e,this.index=n}}function fy(t,e,n){if(t||(t=new Sv([],{})),0===t.segments.length&&t.hasChildren())return py(t,e,n);const i=function(t,e,n){let i=0,r=e;const s={match:!1,pathIndex:0,commandIndex:0};for(;r=n.length)return s;const e=t.segments[r],o=n[i];if(ly(o))break;const a=`${o}`,l=i0&&void 0===a)break;if(a&&l&&"object"==typeof l&&void 0===l.outlets){if(!yy(a,l,e))return s;i+=2}else{if(!yy(a,{},e))return s;i++}r++}return{match:!0,pathIndex:r,commandIndex:i}}(t,e,n),r=n.slice(i.commandIndex);if(i.match&&i.pathIndex{null!==n&&(r[i]=fy(t.children[i],e,n))}),vv(t.children,(t,e)=>{void 0===i[e]&&(r[e]=t)}),new Sv(t.segments,r)}}function gy(t,e,n){const i=t.segments.slice(0,e);let r=0;for(;r{null!==t&&(e[n]=gy(new Sv([],{}),0,t))}),e}function vy(t){const e={};return vv(t,(t,n)=>e[n]=`${t}`),e}function yy(t,e,n){return t==n.path&&fv(e,n.parameters)}class by{constructor(t,e,n,i){this.routeReuseStrategy=t,this.futureState=e,this.currState=n,this.forwardEvent=i}activate(t){const e=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,n,t),iy(this.futureState.root),this.activateChildRoutes(e,n,t)}deactivateChildRoutes(t,e,n){const i=qv(e);t.children.forEach(t=>{const e=t.value.outlet;this.deactivateRoutes(t,i[e],n),delete i[e]}),vv(i,(t,e)=>{this.deactivateRouteAndItsChildren(t,n)})}deactivateRoutes(t,e,n){const i=t.value,r=e?e.value:null;if(i===r)if(i.component){const r=n.getContext(i.outlet);r&&this.deactivateChildRoutes(t,e,r.children)}else this.deactivateChildRoutes(t,e,n);else r&&this.deactivateRouteAndItsChildren(e,n)}deactivateRouteAndItsChildren(t,e){this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)}detachAndStoreRouteSubtree(t,e){const n=e.getContext(t.value.outlet);if(n&&n.outlet){const e=n.outlet.detach(),i=n.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:e,route:t,contexts:i})}}deactivateRouteAndOutlet(t,e){const n=e.getContext(t.value.outlet);if(n){const i=qv(t),r=t.value.component?n.children:e;vv(i,(t,e)=>this.deactivateRouteAndItsChildren(t,r)),n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated())}}activateChildRoutes(t,e,n){const i=qv(e);t.children.forEach(t=>{this.activateRoutes(t,i[t.value.outlet],n),this.forwardEvent(new ov(t.value.snapshot))}),t.children.length&&this.forwardEvent(new rv(t.value.snapshot))}activateRoutes(t,e,n){const i=t.value,r=e?e.value:null;if(iy(i),i===r)if(i.component){const r=n.getOrCreateContext(i.outlet);this.activateChildRoutes(t,e,r.children)}else this.activateChildRoutes(t,e,n);else if(i.component){const e=n.getOrCreateContext(i.outlet);if(this.routeReuseStrategy.shouldAttach(i.snapshot)){const t=this.routeReuseStrategy.retrieve(i.snapshot);this.routeReuseStrategy.store(i.snapshot,null),e.children.onOutletReAttached(t.contexts),e.attachRef=t.componentRef,e.route=t.route.value,e.outlet&&e.outlet.attach(t.componentRef,t.route.value),wy(t.route)}else{const n=function(t){for(let e=t.parent;e;e=e.parent){const t=e.routeConfig;if(t&&t._loadedConfig)return t._loadedConfig;if(t&&t.component)return null}return null}(i.snapshot),r=n?n.module.componentFactoryResolver:null;e.attachRef=null,e.route=i,e.resolver=r,e.outlet&&e.outlet.activateWith(i,r),this.activateChildRoutes(t,null,e.children)}}else this.activateChildRoutes(t,null,n)}}function wy(t){iy(t.value),t.children.forEach(wy)}class xy{constructor(t,e){this.routes=t,this.module=e}}function _y(t){return"function"==typeof t}function Cy(t){return t instanceof Cv}const Sy=Symbol("INITIAL_VALUE");function ky(){return km(t=>function(...t){let e,n;return k(t[t.length-1])&&(n=t.pop()),"function"==typeof t[t.length-1]&&(e=t.pop()),1===t.length&&l(t[0])&&(t=t[0]),z(t,n).lift(new rm(e))}(...t.map(t=>t.pipe(Dm(1),function(...t){const e=t[t.length-1];return k(e)?(t.pop(),n=>Fm(t,n,e)):e=>Fm(t,e)}(Sy)))).pipe(function(t,e){let n=!1;return arguments.length>=2&&(n=!0),function(i){return i.lift(new Mm(t,e,n))}}((t,e)=>{let n=!1;return e.reduce((t,i,r)=>{if(t!==Sy)return t;if(i===Sy&&(n=!0),!n){if(!1===i)return i;if(r===e.length-1||Cy(i))return i}return t},t)},Sy),hm(t=>t!==Sy),E(t=>Cy(t)?t:!0===t),Dm(1)))}let Ey=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:1,vars:0,template:function(t,e){1&t&&da(0,"router-outlet")},directives:function(){return[xb]},encapsulation:2}),t})();function Ay(t,e=""){for(let n=0;ne.error(new My(t)))}function Oy(t){return new y(e=>e.error(new Ly(t)))}function Iy(t){return new y(e=>e.error(new Error(`Only absolute redirects can have named outlets. redirectTo: '${t}'`)))}class Ny{constructor(t,e,n,i,r){this.configLoader=e,this.urlSerializer=n,this.urlTree=i,this.config=r,this.allowRedirects=!0,this.ngModule=t.get(Zt)}apply(){return this.expandSegmentGroup(this.ngModule,this.config,this.urlTree.root,lv).pipe(E(t=>this.createUrlTree(t,this.urlTree.queryParams,this.urlTree.fragment))).pipe($m(t=>{if(t instanceof Ly)return this.allowRedirects=!1,this.match(t.urlTree);if(t instanceof My)throw this.noMatchError(t);throw t}))}match(t){return this.expandSegmentGroup(this.ngModule,this.config,t.root,lv).pipe(E(e=>this.createUrlTree(e,t.queryParams,t.fragment))).pipe($m(t=>{if(t instanceof My)throw this.noMatchError(t);throw t}))}noMatchError(t){return new Error(`Cannot match any routes. URL Segment: '${t.segmentGroup}'`)}createUrlTree(t,e,n){const i=t.segments.length>0?new Sv([],{[lv]:t}):t;return new Cv(i,e,n)}expandSegmentGroup(t,e,n,i){return 0===n.segments.length&&n.hasChildren()?this.expandChildren(t,e,n).pipe(E(t=>new Sv([],t))):this.expandSegment(t,n,e,n.segments,i,!0)}expandChildren(t,e,n){return function(t,e){if(0===Object.keys(t).length)return Qg({});const n=[],i=[],r={};return vv(t,(t,s)=>{const o=e(s,t).pipe(E(t=>r[s]=t));s===lv?n.push(o):i.push(o)}),Qg.apply(null,n.concat(i)).pipe(um(),function(t,e){const n=arguments.length>=2;return i=>i.pipe(t?hm((e,n)=>t(e,n,i)):v,gm(1),n?_m(e):ym(()=>new om))}(),E(()=>r))}(n.children,(n,i)=>this.expandSegmentGroup(t,e,i,n))}expandSegment(t,e,n,i,r,s){const o=function(t){return t.reduce((t,e)=>{const n=Fy(e);return t.has(n)?t.get(n).push(e):t.set(n,[e]),t},new Map)}(n);o.has(r)||o.set(r,[]);const a=n=>I(n).pipe(Nm(o=>this.expandSegmentAgainstRoute(t,e,n,o,i,r,s).pipe($m(t=>{if(t instanceof My)return Qg(null);throw t}))),Pm(t=>null!==t),$m(t=>{if(t instanceof om||"EmptyError"===t.name){if(this.noLeftoversInUrl(e,i,r))return Qg(new Sv([],{}));throw new My(e)}throw t}));return I(Array.from(o.entries()).map(([t,e])=>{const n=a(e);return t===r?n:n.pipe(E(()=>null),$m(()=>Qg(null)))})).pipe(t=>t.lift(new rm(void 0)),Pm(),E(t=>t.find(t=>null!==t)))}noLeftoversInUrl(t,e,n){return 0===e.length&&!t.children[n]}expandSegmentAgainstRoute(t,e,n,i,r,s,o){return Fy(i)!==s&&""!==i.path?$y(e):void 0===i.redirectTo?this.matchSegmentAgainstRoute(t,e,i,r):o&&this.allowRedirects?this.expandSegmentAgainstRouteUsingRedirect(t,e,n,i,r,s):$y(e)}expandSegmentAgainstRouteUsingRedirect(t,e,n,i,r,s){return"**"===i.path?this.expandWildCardWithParamsAgainstRouteUsingRedirect(t,n,i,s):this.expandRegularSegmentAgainstRouteUsingRedirect(t,e,n,i,r,s)}expandWildCardWithParamsAgainstRouteUsingRedirect(t,e,n,i){const r=this.applyRedirectCommands([],n.redirectTo,{});return n.redirectTo.startsWith("/")?Oy(r):this.lineralizeSegments(n,r).pipe(U(n=>{const r=new Sv(n,{});return this.expandSegment(t,r,e,n,i,!1)}))}expandRegularSegmentAgainstRouteUsingRedirect(t,e,n,i,r,s){const{matched:o,consumedSegments:a,lastChild:l,positionalParamSegments:c}=Py(e,i,r);if(!o)return $y(e);const u=this.applyRedirectCommands(a,i.redirectTo,c);return i.redirectTo.startsWith("/")?Oy(u):this.lineralizeSegments(i,u).pipe(U(i=>this.expandSegment(t,e,n,i.concat(r.slice(l)),s,!1)))}matchSegmentAgainstRoute(t,e,n,i){if("**"===n.path)return n.loadChildren?this.configLoader.load(t.injector,n).pipe(E(t=>(n._loadedConfig=t,new Sv(i,{})))):Qg(new Sv(i,{}));const{matched:r,consumedSegments:s,lastChild:o}=Py(e,n,i);if(!r)return $y(e);const a=i.slice(o);return this.getChildConfig(t,n,i).pipe(U(t=>{const n=t.module,i=t.routes,{segmentGroup:r,slicedSegments:o}=function(t,e,n,i){return n.length>0&&function(t,e,n){return n.some(n=>Uy(t,e,n)&&Fy(n)!==lv)}(t,n,i)?{segmentGroup:By(new Sv(e,function(t,e){const n={};n.primary=e;for(const i of t)""===i.path&&Fy(i)!==lv&&(n[Fy(i)]=new Sv([],{}));return n}(i,new Sv(n,t.children)))),slicedSegments:[]}:0===n.length&&function(t,e,n){return n.some(n=>Uy(t,e,n))}(t,n,i)?{segmentGroup:By(new Sv(t.segments,function(t,e,n,i){const r={};for(const s of n)Uy(t,e,s)&&!i[Fy(s)]&&(r[Fy(s)]=new Sv([],{}));return Object.assign(Object.assign({},i),r)}(t,n,i,t.children))),slicedSegments:n}:{segmentGroup:t,slicedSegments:n}}(e,s,a,i);return 0===o.length&&r.hasChildren()?this.expandChildren(n,i,r).pipe(E(t=>new Sv(s,t))):0===i.length&&0===o.length?Qg(new Sv(s,{})):this.expandSegment(n,r,i,o,lv,!0).pipe(E(t=>new Sv(s.concat(t.segments),t.children)))}))}getChildConfig(t,e,n){return e.children?Qg(new xy(e.children,t)):e.loadChildren?void 0!==e._loadedConfig?Qg(e._loadedConfig):this.runCanLoadGuards(t.injector,e,n).pipe(U(n=>n?this.configLoader.load(t.injector,e).pipe(E(t=>(e._loadedConfig=t,t))):function(t){return new y(e=>e.error(hv(`Cannot load children because the guard of the route "path: '${t.path}'" returned false`)))}(e))):Qg(new xy([],t))}runCanLoadGuards(t,e,n){const i=e.canLoad;return i&&0!==i.length?Qg(i.map(i=>{const r=t.get(i);let s;if(function(t){return t&&_y(t.canLoad)}(r))s=r.canLoad(e,n);else{if(!_y(r))throw new Error("Invalid CanLoad guard");s=r(e,n)}return yv(s)})).pipe(ky(),Um(t=>{if(!Cy(t))return;const e=hv(`Redirecting to "${this.urlSerializer.serialize(t)}"`);throw e.url=t,e}),E(t=>!0===t)):Qg(!0)}lineralizeSegments(t,e){let n=[],i=e.root;for(;;){if(n=n.concat(i.segments),0===i.numberOfChildren)return Qg(n);if(i.numberOfChildren>1||!i.children.primary)return Iy(t.redirectTo);i=i.children.primary}}applyRedirectCommands(t,e,n){return this.applyRedirectCreatreUrlTree(e,this.urlSerializer.parse(e),t,n)}applyRedirectCreatreUrlTree(t,e,n,i){const r=this.createSegmentGroup(t,e.root,n,i);return new Cv(r,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){const n={};return vv(t,(t,i)=>{if("string"==typeof t&&t.startsWith(":")){const r=t.substring(1);n[i]=e[r]}else n[i]=t}),n}createSegmentGroup(t,e,n,i){const r=this.createSegments(t,e.segments,n,i);let s={};return vv(e.children,(e,r)=>{s[r]=this.createSegmentGroup(t,e,n,i)}),new Sv(r,s)}createSegments(t,e,n,i){return e.map(e=>e.path.startsWith(":")?this.findPosParam(t,e,i):this.findOrReturn(e,n))}findPosParam(t,e,n){const i=n[e.path.substring(1)];if(!i)throw new Error(`Cannot redirect to '${t}'. Cannot find '${e.path}'.`);return i}findOrReturn(t,e){let n=0;for(const i of e){if(i.path===t.path)return e.splice(n),i;n++}return t}}function Py(t,e,n){if(""===e.path)return"full"===e.pathMatch&&(t.hasChildren()||n.length>0)?{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}:{matched:!0,consumedSegments:[],lastChild:0,positionalParamSegments:{}};const i=(e.matcher||dv)(n,t,e);return i?{matched:!0,consumedSegments:i.consumed,lastChild:i.consumed.length,positionalParamSegments:i.posParams}:{matched:!1,consumedSegments:[],lastChild:0,positionalParamSegments:{}}}function By(t){if(1===t.numberOfChildren&&t.children.primary){const e=t.children.primary;return new Sv(t.segments.concat(e.segments),e.children)}return t}function Uy(t,e,n){return(!(t.hasChildren()||e.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0!==n.redirectTo}class Vy{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}}class Hy{constructor(t,e){this.component=t,this.route=e}}function jy(t,e,n){const i=t._root;return Wy(i,e?e._root:null,n,[i.value])}function zy(t,e,n){const i=function(t){if(!t)return null;for(let e=t.parent;e;e=e.parent){const t=e.routeConfig;if(t&&t._loadedConfig)return t._loadedConfig}return null}(e);return(i?i.module.injector:n).get(t)}function Wy(t,e,n,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=qv(e);return t.children.forEach(t=>{!function(t,e,n,i,r={canDeactivateChecks:[],canActivateChecks:[]}){const s=t.value,o=e?e.value:null,a=n?n.getContext(t.value.outlet):null;if(o&&s.routeConfig===o.routeConfig){const l=function(t,e,n){if("function"==typeof n)return n(t,e);switch(n){case"pathParamsChange":return!Ev(t.url,e.url);case"pathParamsOrQueryParamsChange":return!Ev(t.url,e.url)||!fv(t.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!ry(t,e)||!fv(t.queryParams,e.queryParams);case"paramsChange":default:return!ry(t,e)}}(o,s,s.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new Vy(i)):(s.data=o.data,s._resolvedData=o._resolvedData),Wy(t,e,s.component?a?a.children:null:n,i,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new Hy(a.outlet.component,o))}else o&&Gy(e,a,r),r.canActivateChecks.push(new Vy(i)),Wy(t,null,s.component?a?a.children:null:n,i,r)}(t,s[t.value.outlet],n,i.concat([t.value]),r),delete s[t.value.outlet]}),vv(s,(t,e)=>Gy(t,n.getContext(e),r)),r}function Gy(t,e,n){const i=qv(t),r=t.value;vv(i,(t,i)=>{Gy(t,r.component?e?e.children.getContext(i):null:e,n)}),n.canDeactivateChecks.push(new Hy(r.component&&e&&e.outlet&&e.outlet.isActivated?e.outlet.component:null,r))}function Ky(t,e){return null!==t&&e&&e(new sv(t)),Qg(!0)}function qy(t,e){return null!==t&&e&&e(new iv(t)),Qg(!0)}function Yy(t,e,n){const i=e.routeConfig?e.routeConfig.canActivate:null;return i&&0!==i.length?Qg(i.map(i=>cm(()=>{const r=zy(i,e,n);let s;if(function(t){return t&&_y(t.canActivate)}(r))s=yv(r.canActivate(e,t));else{if(!_y(r))throw new Error("Invalid CanActivate guard");s=yv(r(e,t))}return s.pipe(Pm())}))).pipe(ky()):Qg(!0)}function Xy(t,e,n){const i=e[e.length-1],r=e.slice(0,e.length-1).reverse().map(t=>function(t){const e=t.routeConfig?t.routeConfig.canActivateChild:null;return e&&0!==e.length?{node:t,guards:e}:null}(t)).filter(t=>null!==t).map(e=>cm(()=>Qg(e.guards.map(r=>{const s=zy(r,e.node,n);let o;if(function(t){return t&&_y(t.canActivateChild)}(s))o=yv(s.canActivateChild(i,t));else{if(!_y(s))throw new Error("Invalid CanActivateChild guard");o=yv(s(i,t))}return o.pipe(Pm())})).pipe(ky())));return Qg(r).pipe(ky())}class Jy{}class Qy{constructor(t,e,n,i,r,s){this.rootComponentType=t,this.config=e,this.urlTree=n,this.url=i,this.paramsInheritanceStrategy=r,this.relativeLinkResolution=s}recognize(){try{const t=eb(this.urlTree.root,[],[],this.config,this.relativeLinkResolution).segmentGroup,e=this.processSegmentGroup(this.config,t,lv),n=new Zv([],Object.freeze({}),Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,{},lv,this.rootComponentType,null,this.urlTree.root,-1,{}),i=new Kv(n,e),r=new ty(this.url,i);return this.inheritParamsAndData(r._root),Qg(r)}catch(t){return new y(e=>e.error(t))}}inheritParamsAndData(t){const e=t.value,n=Qv(e,this.paramsInheritanceStrategy);e.params=Object.freeze(n.params),e.data=Object.freeze(n.data),t.children.forEach(t=>this.inheritParamsAndData(t))}processSegmentGroup(t,e,n){return 0===e.segments.length&&e.hasChildren()?this.processChildren(t,e):this.processSegment(t,e,e.segments,n)}processChildren(t,e){const n=Av(e,(e,n)=>this.processSegmentGroup(t,e,n));return function(t){const e={};t.forEach(t=>{const n=e[t.value.outlet];if(n){const e=n.url.map(t=>t.toString()).join("/"),i=t.value.url.map(t=>t.toString()).join("/");throw new Error(`Two segments cannot have the same outlet name: '${e}' and '${i}'.`)}e[t.value.outlet]=t.value})}(n),n.sort((t,e)=>t.value.outlet===lv?-1:e.value.outlet===lv?1:t.value.outlet.localeCompare(e.value.outlet)),n}processSegment(t,e,n,i){for(const s of t)try{return this.processSegmentAgainstRoute(s,e,n,i)}catch(r){if(!(r instanceof Jy))throw r}if(this.noLeftoversInUrl(e,n,i))return[];throw new Jy}noLeftoversInUrl(t,e,n){return 0===e.length&&!t.children[n]}processSegmentAgainstRoute(t,e,n,i){if(t.redirectTo)throw new Jy;if((t.outlet||lv)!==i)throw new Jy;let r,s=[],o=[];if("**"===t.path){const s=n.length>0?mv(n).parameters:{};r=new Zv(n,s,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,rb(t),i,t.component,t,Zy(e),tb(e)+n.length,sb(t))}else{const a=function(t,e,n){if(""===e.path){if("full"===e.pathMatch&&(t.hasChildren()||n.length>0))throw new Jy;return{consumedSegments:[],lastChild:0,parameters:{}}}const i=(e.matcher||dv)(n,t,e);if(!i)throw new Jy;const r={};vv(i.posParams,(t,e)=>{r[e]=t.path});const s=i.consumed.length>0?Object.assign(Object.assign({},r),i.consumed[i.consumed.length-1].parameters):r;return{consumedSegments:i.consumed,lastChild:i.consumed.length,parameters:s}}(e,t,n);s=a.consumedSegments,o=n.slice(a.lastChild),r=new Zv(s,a.parameters,Object.freeze(Object.assign({},this.urlTree.queryParams)),this.urlTree.fragment,rb(t),i,t.component,t,Zy(e),tb(e)+s.length,sb(t))}const a=function(t){return t.children?t.children:t.loadChildren?t._loadedConfig.routes:[]}(t),{segmentGroup:l,slicedSegments:c}=eb(e,s,o,a,this.relativeLinkResolution);if(0===c.length&&l.hasChildren()){const t=this.processChildren(a,l);return[new Kv(r,t)]}if(0===a.length&&0===c.length)return[new Kv(r,[])];const u=this.processSegment(a,l,c,lv);return[new Kv(r,u)]}}function Zy(t){let e=t;for(;e._sourceSegment;)e=e._sourceSegment;return e}function tb(t){let e=t,n=e._segmentIndexShift?e._segmentIndexShift:0;for(;e._sourceSegment;)e=e._sourceSegment,n+=e._segmentIndexShift?e._segmentIndexShift:0;return n-1}function eb(t,e,n,i,r){if(n.length>0&&function(t,e,n){return n.some(n=>nb(t,e,n)&&ib(n)!==lv)}(t,n,i)){const r=new Sv(e,function(t,e,n,i){const r={};r.primary=i,i._sourceSegment=t,i._segmentIndexShift=e.length;for(const s of n)if(""===s.path&&ib(s)!==lv){const n=new Sv([],{});n._sourceSegment=t,n._segmentIndexShift=e.length,r[ib(s)]=n}return r}(t,e,i,new Sv(n,t.children)));return r._sourceSegment=t,r._segmentIndexShift=e.length,{segmentGroup:r,slicedSegments:[]}}if(0===n.length&&function(t,e,n){return n.some(n=>nb(t,e,n))}(t,n,i)){const s=new Sv(t.segments,function(t,e,n,i,r,s){const o={};for(const a of i)if(nb(t,n,a)&&!r[ib(a)]){const n=new Sv([],{});n._sourceSegment=t,n._segmentIndexShift="legacy"===s?t.segments.length:e.length,o[ib(a)]=n}return Object.assign(Object.assign({},r),o)}(t,e,n,i,t.children,r));return s._sourceSegment=t,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:n}}const s=new Sv(t.segments,t.children);return s._sourceSegment=t,s._segmentIndexShift=e.length,{segmentGroup:s,slicedSegments:n}}function nb(t,e,n){return(!(t.hasChildren()||e.length>0)||"full"!==n.pathMatch)&&""===n.path&&void 0===n.redirectTo}function ib(t){return t.outlet||lv}function rb(t){return t.data||{}}function sb(t){return t.resolve||{}}function ob(t){return function(e){return e.pipe(km(e=>{const n=t(e);return n?I(n).pipe(E(()=>e)):I([e])}))}}class ab extends class{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}}{}const lb=new Pt("ROUTES");class cb{constructor(t,e,n,i){this.loader=t,this.compiler=e,this.onLoadStartListener=n,this.onLoadEndListener=i}load(t,e){return this.onLoadStartListener&&this.onLoadStartListener(e),this.loadModuleFactory(e.loadChildren).pipe(E(n=>{this.onLoadEndListener&&this.onLoadEndListener(e);const i=n.create(t);return new xy(gv(i.injector.get(lb)).map(Ry),i)}))}loadModuleFactory(t){return"string"==typeof t?I(this.loader.load(t)):yv(t()).pipe(U(t=>t instanceof te?Qg(t):I(this.compiler.compileModuleAsync(t))))}}class ub{constructor(){this.outlet=null,this.route=null,this.resolver=null,this.children=new hb,this.attachRef=null}}class hb{constructor(){this.contexts=new Map}onChildOutletCreated(t,e){const n=this.getOrCreateContext(t);n.outlet=e,this.contexts.set(t,n)}onChildOutletDestroyed(t){const e=this.getContext(t);e&&(e.outlet=null)}onOutletDeactivated(){const t=this.contexts;return this.contexts=new Map,t}onOutletReAttached(t){this.contexts=t}getOrCreateContext(t){let e=this.getContext(t);return e||(e=new ub,this.contexts.set(t,e)),e}getContext(t){return this.contexts.get(t)||null}}class db{shouldProcessUrl(t){return!0}extract(t){return t}merge(t,e){return t}}function fb(t){throw t}function pb(t,e,n){return e.parse("/")}function gb(t,e){return Qg(null)}let mb=(()=>{class t{constructor(t,e,n,i,r,s,o,a){this.rootComponentType=t,this.urlSerializer=e,this.rootContexts=n,this.location=i,this.config=a,this.lastSuccessfulNavigation=null,this.currentNavigation=null,this.lastLocationChangeInfo=null,this.navigationId=0,this.isNgZoneEnabled=!1,this.events=new C,this.errorHandler=fb,this.malformedUriErrorHandler=pb,this.navigated=!1,this.lastSuccessfulId=-1,this.hooks={beforePreactivation:gb,afterPreactivation:gb},this.urlHandlingStrategy=new db,this.routeReuseStrategy=new ab,this.onSameUrlNavigation="ignore",this.paramsInheritanceStrategy="emptyOnly",this.urlUpdateStrategy="deferred",this.relativeLinkResolution="corrected",this.ngModule=r.get(Zt),this.console=r.get(Ru);const l=r.get(ju);this.isNgZoneEnabled=l instanceof ju,this.resetConfig(a),this.currentUrlTree=new Cv(new Sv([],{}),{},null),this.rawUrlTree=this.currentUrlTree,this.browserUrlTree=this.currentUrlTree,this.configLoader=new cb(s,o,t=>this.triggerEvent(new ev(t)),t=>this.triggerEvent(new nv(t))),this.routerState=Xv(this.currentUrlTree,this.rootComponentType),this.transitions=new Zg({id:0,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,extractedUrl:this.urlHandlingStrategy.extract(this.currentUrlTree),urlAfterRedirects:this.urlHandlingStrategy.extract(this.currentUrlTree),rawUrl:this.currentUrlTree,extras:{},resolve:null,reject:null,promise:Promise.resolve(!0),source:"imperative",restoredState:null,currentSnapshot:this.routerState.snapshot,targetSnapshot:null,currentRouterState:this.routerState,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.navigations=this.setupNavigations(this.transitions),this.processNavigations()}setupNavigations(t){const e=this.events;return t.pipe(hm(t=>0!==t.id),E(t=>Object.assign(Object.assign({},t),{extractedUrl:this.urlHandlingStrategy.extract(t.rawUrl)})),km(t=>{let n=!1,i=!1;return Qg(t).pipe(Um(t=>{this.currentNavigation={id:t.id,initialUrl:t.currentRawUrl,extractedUrl:t.extractedUrl,trigger:t.source,extras:t.extras,previousNavigation:this.lastSuccessfulNavigation?Object.assign(Object.assign({},this.lastSuccessfulNavigation),{previousNavigation:null}):null}}),km(t=>{const n=!this.navigated||t.extractedUrl.toString()!==this.browserUrlTree.toString();if(("reload"===this.onSameUrlNavigation||n)&&this.urlHandlingStrategy.shouldProcessUrl(t.rawUrl))return Qg(t).pipe(km(t=>{const n=this.transitions.getValue();return e.next(new Gm(t.id,this.serializeUrl(t.extractedUrl),t.source,t.restoredState)),n!==this.transitions.getValue()?am:[t]}),km(t=>Promise.resolve(t)),(i=this.ngModule.injector,r=this.configLoader,s=this.urlSerializer,o=this.config,function(t){return t.pipe(km(t=>function(t,e,n,i,r){return new Ny(t,e,n,i,r).apply()}(i,r,s,t.extractedUrl,o).pipe(E(e=>Object.assign(Object.assign({},t),{urlAfterRedirects:e})))))}),Um(t=>{this.currentNavigation=Object.assign(Object.assign({},this.currentNavigation),{finalUrl:t.urlAfterRedirects})}),function(t,e,n,i,r){return function(s){return s.pipe(U(s=>function(t,e,n,i,r="emptyOnly",s="legacy"){return new Qy(t,e,n,i,r,s).recognize()}(t,e,s.urlAfterRedirects,n(s.urlAfterRedirects),i,r).pipe(E(t=>Object.assign(Object.assign({},s),{targetSnapshot:t})))))}}(this.rootComponentType,this.config,t=>this.serializeUrl(t),this.paramsInheritanceStrategy,this.relativeLinkResolution),Um(t=>{"eager"===this.urlUpdateStrategy&&(t.extras.skipLocationChange||this.setBrowserUrl(t.urlAfterRedirects,!!t.extras.replaceUrl,t.id,t.extras.state),this.browserUrlTree=t.urlAfterRedirects)}),Um(t=>{const n=new Xm(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);e.next(n)}));var i,r,s,o;if(n&&this.rawUrlTree&&this.urlHandlingStrategy.shouldProcessUrl(this.rawUrlTree)){const{id:n,extractedUrl:i,source:r,restoredState:s,extras:o}=t,a=new Gm(n,this.serializeUrl(i),r,s);e.next(a);const l=Xv(i,this.rootComponentType).snapshot;return Qg(Object.assign(Object.assign({},t),{targetSnapshot:l,urlAfterRedirects:i,extras:Object.assign(Object.assign({},o),{skipLocationChange:!1,replaceUrl:!1})}))}return this.rawUrlTree=t.rawUrl,this.browserUrlTree=t.urlAfterRedirects,t.resolve(null),am}),ob(t=>{const{targetSnapshot:e,id:n,extractedUrl:i,rawUrl:r,extras:{skipLocationChange:s,replaceUrl:o}}=t;return this.hooks.beforePreactivation(e,{navigationId:n,appliedUrlTree:i,rawUrlTree:r,skipLocationChange:!!s,replaceUrl:!!o})}),Um(t=>{const e=new Jm(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}),E(t=>Object.assign(Object.assign({},t),{guards:jy(t.targetSnapshot,t.currentSnapshot,this.rootContexts)})),function(t,e){return function(n){return n.pipe(U(n=>{const{targetSnapshot:i,currentSnapshot:r,guards:{canActivateChecks:s,canDeactivateChecks:o}}=n;return 0===o.length&&0===s.length?Qg(Object.assign(Object.assign({},n),{guardsResult:!0})):function(t,e,n,i){return I(t).pipe(U(t=>function(t,e,n,i,r){const s=e&&e.routeConfig?e.routeConfig.canDeactivate:null;return s&&0!==s.length?Qg(s.map(s=>{const o=zy(s,e,r);let a;if(function(t){return t&&_y(t.canDeactivate)}(o))a=yv(o.canDeactivate(t,e,n,i));else{if(!_y(o))throw new Error("Invalid CanDeactivate guard");a=yv(o(t,e,n,i))}return a.pipe(Pm())})).pipe(ky()):Qg(!0)}(t.component,t.route,n,e,i)),Pm(t=>!0!==t,!0))}(o,i,r,t).pipe(U(n=>n&&"boolean"==typeof n?function(t,e,n,i){return I(e).pipe(Nm(e=>I([qy(e.route.parent,i),Ky(e.route,i),Xy(t,e.path,n),Yy(t,e.route,n)]).pipe(um(),Pm(t=>!0!==t,!0))),Pm(t=>!0!==t,!0))}(i,s,t,e):Qg(n)),E(t=>Object.assign(Object.assign({},n),{guardsResult:t})))}))}}(this.ngModule.injector,t=>this.triggerEvent(t)),Um(t=>{if(Cy(t.guardsResult)){const e=hv(`Redirecting to "${this.serializeUrl(t.guardsResult)}"`);throw e.url=t.guardsResult,e}}),Um(t=>{const e=new Qm(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot,!!t.guardsResult);this.triggerEvent(e)}),hm(t=>{if(!t.guardsResult){this.resetUrlToCurrentUrlTree();const n=new qm(t.id,this.serializeUrl(t.extractedUrl),"");return e.next(n),t.resolve(!1),!1}return!0}),ob(t=>{if(t.guards.canActivateChecks.length)return Qg(t).pipe(Um(t=>{const e=new Zm(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}),km(t=>{let n=!1;return Qg(t).pipe((i=this.paramsInheritanceStrategy,r=this.ngModule.injector,function(t){return t.pipe(U(t=>{const{targetSnapshot:e,guards:{canActivateChecks:n}}=t;if(!n.length)return Qg(t);let s=0;return I(n).pipe(Nm(t=>function(t,e,n,i){return function(t,e,n,i){const r=Object.keys(t);if(0===r.length)return Qg({});const s={};return I(r).pipe(U(r=>function(t,e,n,i){const r=zy(t,e,i);return yv(r.resolve?r.resolve(e,n):r(e,n))}(t[r],e,n,i).pipe(Um(t=>{s[r]=t}))),gm(1),U(()=>Object.keys(s).length===r.length?Qg(s):am))}(t._resolve,t,e,i).pipe(E(e=>(t._resolvedData=e,t.data=Object.assign(Object.assign({},t.data),Qv(t,n).resolve),null)))}(t.route,e,i,r)),Um(()=>s++),gm(1),U(e=>s===n.length?Qg(t):am))}))}),Um({next:()=>n=!0,complete:()=>{if(!n){const n=new qm(t.id,this.serializeUrl(t.extractedUrl),"At least one route resolver didn't emit any value.");e.next(n),t.resolve(!1)}}}));var i,r}),Um(t=>{const e=new tv(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(t.urlAfterRedirects),t.targetSnapshot);this.triggerEvent(e)}))}),ob(t=>{const{targetSnapshot:e,id:n,extractedUrl:i,rawUrl:r,extras:{skipLocationChange:s,replaceUrl:o}}=t;return this.hooks.afterPreactivation(e,{navigationId:n,appliedUrlTree:i,rawUrlTree:r,skipLocationChange:!!s,replaceUrl:!!o})}),E(t=>{const e=function(t,e,n){const i=sy(t,e._root,n?n._root:void 0);return new Yv(i,e)}(this.routeReuseStrategy,t.targetSnapshot,t.currentRouterState);return Object.assign(Object.assign({},t),{targetRouterState:e})}),Um(t=>{this.currentUrlTree=t.urlAfterRedirects,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,t.rawUrl),this.routerState=t.targetRouterState,"deferred"===this.urlUpdateStrategy&&(t.extras.skipLocationChange||this.setBrowserUrl(this.rawUrlTree,!!t.extras.replaceUrl,t.id,t.extras.state),this.browserUrlTree=t.urlAfterRedirects)}),(s=this.rootContexts,o=this.routeReuseStrategy,a=t=>this.triggerEvent(t),E(t=>(new by(o,t.targetRouterState,t.currentRouterState,a).activate(s),t))),Um({next(){n=!0},complete(){n=!0}}),(r=()=>{if(!n&&!i){this.resetUrlToCurrentUrlTree();const n=new qm(t.id,this.serializeUrl(t.extractedUrl),`Navigation ID ${t.id} is not equal to the current navigation id ${this.navigationId}`);e.next(n),t.resolve(!1)}this.currentNavigation=null},t=>t.lift(new jm(r))),$m(n=>{if(i=!0,(r=n)&&r.ngNavigationCancelingError){const i=Cy(n.url);i||(this.navigated=!0,this.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl));const r=new qm(t.id,this.serializeUrl(t.extractedUrl),n.message);e.next(r),i?setTimeout(()=>{const e=this.urlHandlingStrategy.merge(n.url,this.rawUrlTree);return this.scheduleNavigation(e,"imperative",null,{skipLocationChange:t.extras.skipLocationChange,replaceUrl:"eager"===this.urlUpdateStrategy},{resolve:t.resolve,reject:t.reject,promise:t.promise})},0):t.resolve(!1)}else{this.resetStateAndUrl(t.currentRouterState,t.currentUrlTree,t.rawUrl);const i=new Ym(t.id,this.serializeUrl(t.extractedUrl),n);e.next(i);try{t.resolve(this.errorHandler(n))}catch(s){t.reject(s)}}var r;return am}));var r,s,o,a}))}resetRootComponentType(t){this.rootComponentType=t,this.routerState.root.component=this.rootComponentType}getTransition(){const t=this.transitions.value;return t.urlAfterRedirects=this.browserUrlTree,t}setTransition(t){this.transitions.next(Object.assign(Object.assign({},this.getTransition()),t))}initialNavigation(){this.setUpLocationChangeListener(),0===this.navigationId&&this.navigateByUrl(this.location.path(!0),{replaceUrl:!0})}setUpLocationChangeListener(){this.locationSubscription||(this.locationSubscription=this.location.subscribe(t=>{const e=this.extractLocationChangeInfoFromEvent(t);this.shouldScheduleNavigation(this.lastLocationChangeInfo,e)&&setTimeout(()=>{const{source:t,state:n,urlTree:i}=e,r={replaceUrl:!0};if(n){const t=Object.assign({},n);delete t.navigationId,0!==Object.keys(t).length&&(r.state=t)}this.scheduleNavigation(i,t,n,r)},0),this.lastLocationChangeInfo=e}))}extractLocationChangeInfoFromEvent(t){var e;return{source:"popstate"===t.type?"popstate":"hashchange",urlTree:this.parseUrl(t.url),state:(null===(e=t.state)||void 0===e?void 0:e.navigationId)?t.state:null,transitionId:this.getTransition().id}}shouldScheduleNavigation(t,e){if(!t)return!0;const n=e.urlTree.toString()===t.urlTree.toString();return!(e.transitionId===t.transitionId&&n&&("hashchange"===e.source&&"popstate"===t.source||"popstate"===e.source&&"hashchange"===t.source))}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.currentNavigation}triggerEvent(t){this.events.next(t)}resetConfig(t){Ay(t),this.config=t.map(Ry),this.navigated=!1,this.lastSuccessfulId=-1}ngOnDestroy(){this.dispose()}dispose(){this.locationSubscription&&(this.locationSubscription.unsubscribe(),this.locationSubscription=void 0)}createUrlTree(t,e={}){const{relativeTo:n,queryParams:i,fragment:r,queryParamsHandling:s,preserveFragment:o}=e,a=n||this.routerState.root,l=o?this.currentUrlTree.fragment:r;let c=null;switch(s){case"merge":c=Object.assign(Object.assign({},this.currentUrlTree.queryParams),i);break;case"preserve":c=this.currentUrlTree.queryParams;break;default:c=i||null}return null!==c&&(c=this.removeEmptyProps(c)),function(t,e,n,i,r){if(0===n.length)return cy(e.root,e.root,e,i,r);const s=function(t){if("string"==typeof t[0]&&1===t.length&&"/"===t[0])return new hy(!0,0,t);let e=0,n=!1;const i=t.reduce((t,i,r)=>{if("object"==typeof i&&null!=i){if(i.outlets){const e={};return vv(i.outlets,(t,n)=>{e[n]="string"==typeof t?t.split("/"):t}),[...t,{outlets:e}]}if(i.segmentPath)return[...t,i.segmentPath]}return"string"!=typeof i?[...t,i]:0===r?(i.split("/").forEach((i,r)=>{0==r&&"."===i||(0==r&&""===i?n=!0:".."===i?e++:""!=i&&t.push(i))}),t):[...t,i]},[]);return new hy(n,e,i)}(n);if(s.toRoot())return cy(e.root,new Sv([],{}),e,i,r);const o=function(t,e,n){if(t.isAbsolute)return new dy(e.root,!0,0);if(-1===n.snapshot._lastPathIndex){const t=n.snapshot._urlSegment;return new dy(t,t===e.root,0)}const i=ay(t.commands[0])?0:1;return function(t,e,n){let i=t,r=e,s=n;for(;s>r;){if(s-=r,i=i.parent,!i)throw new Error("Invalid number of '../'");r=i.segments.length}return new dy(i,!1,r-s)}(n.snapshot._urlSegment,n.snapshot._lastPathIndex+i,t.numberOfDoubleDots)}(s,e,t),a=o.processChildren?py(o.segmentGroup,o.index,s.commands):fy(o.segmentGroup,o.index,s.commands);return cy(o.segmentGroup,a,e,i,r)}(a,this.currentUrlTree,t,c,l)}navigateByUrl(t,e={skipLocationChange:!1}){const n=Cy(t)?t:this.parseUrl(t),i=this.urlHandlingStrategy.merge(n,this.rawUrlTree);return this.scheduleNavigation(i,"imperative",null,e)}navigate(t,e={skipLocationChange:!1}){return function(t){for(let e=0;e{const i=t[n];return null!=i&&(e[n]=i),e},{})}processNavigations(){this.navigations.subscribe(t=>{this.navigated=!0,this.lastSuccessfulId=t.id,this.events.next(new Km(t.id,this.serializeUrl(t.extractedUrl),this.serializeUrl(this.currentUrlTree))),this.lastSuccessfulNavigation=this.currentNavigation,this.currentNavigation=null,t.resolve(!0)},t=>{this.console.warn("Unhandled Navigation Error: ")})}scheduleNavigation(t,e,n,i,r){const s=this.getTransition(),o="imperative"!==e&&"imperative"===(null==s?void 0:s.source),a=(this.lastSuccessfulId===s.id||this.currentNavigation?s.rawUrl:s.urlAfterRedirects).toString()===t.toString();if(o&&a)return Promise.resolve(!0);let l,c,u;r?(l=r.resolve,c=r.reject,u=r.promise):u=new Promise((t,e)=>{l=t,c=e});const h=++this.navigationId;return this.setTransition({id:h,source:e,restoredState:n,currentUrlTree:this.currentUrlTree,currentRawUrl:this.rawUrlTree,rawUrl:t,extras:i,resolve:l,reject:c,promise:u,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),u.catch(t=>Promise.reject(t))}setBrowserUrl(t,e,n,i){const r=this.urlSerializer.serialize(t);i=i||{},this.location.isCurrentPathEqualTo(r)||e?this.location.replaceState(r,"",Object.assign(Object.assign({},i),{navigationId:n})):this.location.go(r,"",Object.assign(Object.assign({},i),{navigationId:n}))}resetStateAndUrl(t,e,n){this.routerState=t,this.currentUrlTree=e,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n),this.resetUrlToCurrentUrlTree()}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",{navigationId:this.lastSuccessfulId})}}return t.\u0275fac=function(e){return new(e||t)(Yt(So),Yt(Dv),Yt(hb),Yt(Oh),Yt(Bo),Yt(uh),Yt(Uu),Yt(void 0))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),vb=(()=>{class t{constructor(t,e,n,i,r){this.router=t,this.route=e,this.commands=[],this.onChanges=new C,null==n&&i.setAttribute(r.nativeElement,"tabindex","0")}ngOnChanges(t){this.onChanges.next(this)}set routerLink(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]}onClick(){const t={skipLocationChange:bb(this.skipLocationChange),replaceUrl:bb(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,t),!0}get urlTree(){return this.router.createUrlTree(this.commands,{relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:bb(this.preserveFragment)})}}return t.\u0275fac=function(e){return new(e||t)(oa(mb),oa(Jv),aa("tabindex"),oa(pc),oa(uc))},t.\u0275dir=we({type:t,selectors:[["","routerLink","",5,"a",5,"area"]],hostBindings:function(t,e){1&t&&ya("click",function(){return e.onClick()})},inputs:{routerLink:"routerLink",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state"},features:[Ve]}),t})(),yb=(()=>{class t{constructor(t,e,n){this.router=t,this.route=e,this.locationStrategy=n,this.commands=[],this.onChanges=new C,this.subscription=t.events.subscribe(t=>{t instanceof Km&&this.updateTargetUrlAndHref()})}set routerLink(t){this.commands=null!=t?Array.isArray(t)?t:[t]:[]}ngOnChanges(t){this.updateTargetUrlAndHref(),this.onChanges.next(this)}ngOnDestroy(){this.subscription.unsubscribe()}onClick(t,e,n,i,r){if(0!==t||e||n||i||r)return!0;if("string"==typeof this.target&&"_self"!=this.target)return!0;const s={skipLocationChange:bb(this.skipLocationChange),replaceUrl:bb(this.replaceUrl),state:this.state};return this.router.navigateByUrl(this.urlTree,s),!1}updateTargetUrlAndHref(){this.href=this.locationStrategy.prepareExternalUrl(this.router.serializeUrl(this.urlTree))}get urlTree(){return this.router.createUrlTree(this.commands,{relativeTo:this.route,queryParams:this.queryParams,fragment:this.fragment,queryParamsHandling:this.queryParamsHandling,preserveFragment:bb(this.preserveFragment)})}}return t.\u0275fac=function(e){return new(e||t)(oa(mb),oa(Jv),oa(Rh))},t.\u0275dir=we({type:t,selectors:[["a","routerLink",""],["area","routerLink",""]],hostVars:2,hostBindings:function(t,e){1&t&&ya("click",function(t){return e.onClick(t.button,t.ctrlKey,t.shiftKey,t.altKey,t.metaKey)}),2&t&&(Qa("href",e.href,yr),na("target",e.target))},inputs:{routerLink:"routerLink",target:"target",queryParams:"queryParams",fragment:"fragment",queryParamsHandling:"queryParamsHandling",preserveFragment:"preserveFragment",skipLocationChange:"skipLocationChange",replaceUrl:"replaceUrl",state:"state"},features:[Ve]}),t})();function bb(t){return""===t||!!t}let wb=(()=>{class t{constructor(t,e,n,i,r,s){this.router=t,this.element=e,this.renderer=n,this.cdr=i,this.link=r,this.linkWithHref=s,this.classes=[],this.isActive=!1,this.routerLinkActiveOptions={exact:!1},this.routerEventsSubscription=t.events.subscribe(t=>{t instanceof Km&&this.update()})}ngAfterContentInit(){I([this.links.changes,this.linksWithHrefs.changes,Qg(null)]).pipe(j()).subscribe(t=>{this.update(),this.subscribeToEachLinkOnChanges()})}subscribeToEachLinkOnChanges(){var t;null===(t=this.linkInputChangesSubscription)||void 0===t||t.unsubscribe();const e=[...this.links.toArray(),...this.linksWithHrefs.toArray(),this.link,this.linkWithHref].filter(t=>!!t).map(t=>t.onChanges);this.linkInputChangesSubscription=I(e).pipe(j()).subscribe(t=>{this.isActive!==this.isLinkActive(this.router)(t)&&this.update()})}set routerLinkActive(t){const e=Array.isArray(t)?t:t.split(" ");this.classes=e.filter(t=>!!t)}ngOnChanges(t){this.update()}ngOnDestroy(){var t;this.routerEventsSubscription.unsubscribe(),null===(t=this.linkInputChangesSubscription)||void 0===t||t.unsubscribe()}update(){this.links&&this.linksWithHrefs&&this.router.navigated&&Promise.resolve().then(()=>{const t=this.hasActiveLinks();this.isActive!==t&&(this.isActive=t,this.cdr.markForCheck(),this.classes.forEach(e=>{t?this.renderer.addClass(this.element.nativeElement,e):this.renderer.removeClass(this.element.nativeElement,e)}))})}isLinkActive(t){return e=>t.isActive(e.urlTree,this.routerLinkActiveOptions.exact)}hasActiveLinks(){const t=this.isLinkActive(this.router);return this.link&&t(this.link)||this.linkWithHref&&t(this.linkWithHref)||this.links.some(t)||this.linksWithHrefs.some(t)}}return t.\u0275fac=function(e){return new(e||t)(oa(mb),oa(uc),oa(pc),oa(_o),oa(vb,8),oa(yb,8))},t.\u0275dir=we({type:t,selectors:[["","routerLinkActive",""]],contentQueries:function(t,e,n){if(1&t&&(gu(n,vb,!0),gu(n,yb,!0)),2&t){let t;hu(t=vu())&&(e.links=t),hu(t=vu())&&(e.linksWithHrefs=t)}},inputs:{routerLinkActiveOptions:"routerLinkActiveOptions",routerLinkActive:"routerLinkActive"},exportAs:["routerLinkActive"],features:[Ve]}),t})(),xb=(()=>{class t{constructor(t,e,n,i,r){this.parentContexts=t,this.location=e,this.resolver=n,this.changeDetector=r,this.activated=null,this._activatedRoute=null,this.activateEvents=new Zc,this.deactivateEvents=new Zc,this.name=i||lv,t.onChildOutletCreated(this.name,this)}ngOnDestroy(){this.parentContexts.onChildOutletDestroyed(this.name)}ngOnInit(){if(!this.activated){const t=this.parentContexts.getContext(this.name);t&&t.route&&(t.attachRef?this.attach(t.attachRef,t.route):this.activateWith(t.route,t.resolver||null))}}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Error("Outlet is not activated");return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Error("Outlet is not activated");return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Error("Outlet is not activated");this.location.detach();const t=this.activated;return this.activated=null,this._activatedRoute=null,t}attach(t,e){this.activated=t,this._activatedRoute=e,this.location.insert(t.hostView)}deactivate(){if(this.activated){const t=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(t)}}activateWith(t,e){if(this.isActivated)throw new Error("Cannot activate an already activated outlet");this._activatedRoute=t;const n=(e=e||this.resolver).resolveComponentFactory(t._futureSnapshot.routeConfig.component),i=this.parentContexts.getOrCreateContext(this.name).children,r=new _b(t,i,this.location.injector);this.activated=this.location.createComponent(n,this.location.length,r),this.changeDetector.markForCheck(),this.activateEvents.emit(this.activated.instance)}}return t.\u0275fac=function(e){return new(e||t)(oa(hb),oa(Ic),oa(cc),aa("name"),oa(_o))},t.\u0275dir=we({type:t,selectors:[["router-outlet"]],outputs:{activateEvents:"activate",deactivateEvents:"deactivate"},exportAs:["outlet"]}),t})();class _b{constructor(t,e,n){this.route=t,this.childContexts=e,this.parent=n}get(t,e){return t===Jv?this.route:t===hb?this.childContexts:this.parent.get(t,e)}}class Cb{}class Sb{preload(t,e){return Qg(null)}}let kb=(()=>{class t{constructor(t,e,n,i,r){this.router=t,this.injector=i,this.preloadingStrategy=r,this.loader=new cb(e,n,e=>t.triggerEvent(new ev(e)),e=>t.triggerEvent(new nv(e)))}setUpPreloading(){this.subscription=this.router.events.pipe(hm(t=>t instanceof Km),Nm(()=>this.preload())).subscribe(()=>{})}preload(){const t=this.injector.get(Zt);return this.processRoutes(t,this.router.config)}ngOnDestroy(){this.subscription&&this.subscription.unsubscribe()}processRoutes(t,e){const n=[];for(const i of e)if(i.loadChildren&&!i.canLoad&&i._loadedConfig){const t=i._loadedConfig;n.push(this.processRoutes(t.module,t.routes))}else i.loadChildren&&!i.canLoad?n.push(this.preloadConfig(t,i)):i.children&&n.push(this.processRoutes(t,i.children));return I(n).pipe(j(),E(t=>{}))}preloadConfig(t,e){return this.preloadingStrategy.preload(e,()=>this.loader.load(t.injector,e).pipe(U(t=>(e._loadedConfig=t,this.processRoutes(t.module,t.routes)))))}}return t.\u0275fac=function(e){return new(e||t)(Yt(mb),Yt(uh),Yt(Uu),Yt(Bo),Yt(Cb))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),Eb=(()=>{class t{constructor(t,e,n={}){this.router=t,this.viewportScroller=e,this.options=n,this.lastId=0,this.lastSource="imperative",this.restoredId=0,this.store={},n.scrollPositionRestoration=n.scrollPositionRestoration||"disabled",n.anchorScrolling=n.anchorScrolling||"disabled"}init(){"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.setHistoryScrollRestoration("manual"),this.routerEventsSubscription=this.createScrollEvents(),this.scrollEventsSubscription=this.consumeScrollEvents()}createScrollEvents(){return this.router.events.subscribe(t=>{t instanceof Gm?(this.store[this.lastId]=this.viewportScroller.getScrollPosition(),this.lastSource=t.navigationTrigger,this.restoredId=t.restoredState?t.restoredState.navigationId:0):t instanceof Km&&(this.lastId=t.id,this.scheduleScrollEvent(t,this.router.parseUrl(t.urlAfterRedirects).fragment))})}consumeScrollEvents(){return this.router.events.subscribe(t=>{t instanceof av&&(t.position?"top"===this.options.scrollPositionRestoration?this.viewportScroller.scrollToPosition([0,0]):"enabled"===this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition(t.position):t.anchor&&"enabled"===this.options.anchorScrolling?this.viewportScroller.scrollToAnchor(t.anchor):"disabled"!==this.options.scrollPositionRestoration&&this.viewportScroller.scrollToPosition([0,0]))})}scheduleScrollEvent(t,e){this.router.triggerEvent(new av(t,"popstate"===this.lastSource?this.store[this.restoredId]:null,e))}ngOnDestroy(){this.routerEventsSubscription&&this.routerEventsSubscription.unsubscribe(),this.scrollEventsSubscription&&this.scrollEventsSubscription.unsubscribe()}}return t.\u0275fac=function(e){return new(e||t)(Yt(mb),Yt(Md),Yt(void 0))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();const Ab=new Pt("ROUTER_CONFIGURATION"),Db=new Pt("ROUTER_FORROOT_GUARD"),Tb=[Oh,{provide:Dv,useClass:Tv},{provide:mb,useFactory:function(t,e,n,i,r,s,o,a={},l,c){const u=new mb(null,t,e,n,i,r,s,gv(o));if(l&&(u.urlHandlingStrategy=l),c&&(u.routeReuseStrategy=c),function(t,e){t.errorHandler&&(e.errorHandler=t.errorHandler),t.malformedUriErrorHandler&&(e.malformedUriErrorHandler=t.malformedUriErrorHandler),t.onSameUrlNavigation&&(e.onSameUrlNavigation=t.onSameUrlNavigation),t.paramsInheritanceStrategy&&(e.paramsInheritanceStrategy=t.paramsInheritanceStrategy),t.relativeLinkResolution&&(e.relativeLinkResolution=t.relativeLinkResolution),t.urlUpdateStrategy&&(e.urlUpdateStrategy=t.urlUpdateStrategy)}(a,u),a.enableTracing){const t=bh();u.events.subscribe(e=>{t.logGroup(`Router Event: ${e.constructor.name}`),t.log(e.toString()),t.log(e),t.logGroupEnd()})}return u},deps:[Dv,hb,Oh,Bo,uh,Uu,lb,Ab,[class{},new it],[class{},new it]]},hb,{provide:Jv,useFactory:function(t){return t.routerState.root},deps:[mb]},{provide:uh,useClass:fh},kb,Sb,class{preload(t,e){return e().pipe($m(()=>Qg(null)))}},{provide:Ab,useValue:{enableTracing:!1}}];function Rb(){return new ih("Router",mb)}let Fb=(()=>{class t{constructor(t,e){}static forRoot(e,n){return{ngModule:t,providers:[Tb,Ob(e),{provide:Db,useFactory:$b,deps:[[mb,new it,new st]]},{provide:Ab,useValue:n||{}},{provide:Rh,useFactory:Lb,deps:[xh,[new nt(Mh),new it],Ab]},{provide:Eb,useFactory:Mb,deps:[mb,Md,Ab]},{provide:Cb,useExisting:n&&n.preloadingStrategy?n.preloadingStrategy:Sb},{provide:ih,multi:!0,useFactory:Rb},[Ib,{provide:_u,multi:!0,useFactory:Nb,deps:[Ib]},{provide:Bb,useFactory:Pb,deps:[Ib]},{provide:Tu,multi:!0,useExisting:Bb}]]}}static forChild(e){return{ngModule:t,providers:[Ob(e)]}}}return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)(Yt(Db,8),Yt(mb,8))}}),t})();function Mb(t,e,n){return n.scrollOffset&&e.setOffset(n.scrollOffset),new Eb(t,e,n)}function Lb(t,e,n={}){return n.useHash?new $h(t,e):new Lh(t,e)}function $b(t){return"guarded"}function Ob(t){return[{provide:Uo,multi:!0,useValue:t},{provide:lb,multi:!0,useValue:t}]}let Ib=(()=>{class t{constructor(t){this.injector=t,this.initNavigation=!1,this.resultOfPreactivationDone=new C}appInitializer(){return this.injector.get(Ch,Promise.resolve(null)).then(()=>{let t=null;const e=new Promise(e=>t=e),n=this.injector.get(mb),i=this.injector.get(Ab);return"disabled"===i.initialNavigation?(n.setUpLocationChangeListener(),t(!0)):"enabled"===i.initialNavigation||"enabledBlocking"===i.initialNavigation?(n.hooks.afterPreactivation=()=>this.initNavigation?Qg(null):(this.initNavigation=!0,t(!0),this.resultOfPreactivationDone),n.initialNavigation()):t(!0),e})}bootstrapListener(t){const e=this.injector.get(Ab),n=this.injector.get(kb),i=this.injector.get(Eb),r=this.injector.get(mb),s=this.injector.get(lh);t===s.components[0]&&("enabledNonBlocking"!==e.initialNavigation&&void 0!==e.initialNavigation||r.initialNavigation(),n.setUpPreloading(),i.init(),r.resetRootComponentType(s.componentTypes[0]),this.resultOfPreactivationDone.next(null),this.resultOfPreactivationDone.complete())}}return t.\u0275fac=function(e){return new(e||t)(Yt(Bo))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();function Nb(t){return t.appInitializer.bind(t)}function Pb(t){return t.bootstrapListener.bind(t)}const Bb=new Pt("Router Initializer");function Ub(t,e){return new y(n=>{const i=t.length;if(0===i)return void n.complete();const r=new Array(i);let s=0,o=0;for(let a=0;a{c||(c=!0,o++),r[a]=t},error:t=>n.error(t),complete:()=>{s++,s!==i&&c||(o===i&&n.next(e?e.reduce((t,e,n)=>(t[e]=r[n],t),{}):r),n.complete())}}))}})}const Vb=new Pt("NgValueAccessor"),Hb={provide:Vb,useExisting:_t(()=>jb),multi:!0};let jb=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"checked",t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(oa(pc),oa(uc))},t.\u0275dir=we({type:t,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(t,e){1&t&&ya("change",function(t){return e.onChange(t.target.checked)})("blur",function(){return e.onTouched()})},features:[oc([Hb])]}),t})();const zb={provide:Vb,useExisting:_t(()=>Gb),multi:!0},Wb=new Pt("CompositionEventMode");let Gb=(()=>{class t{constructor(t,e,n){this._renderer=t,this._elementRef=e,this._compositionMode=n,this.onChange=t=>{},this.onTouched=()=>{},this._composing=!1,null==this._compositionMode&&(this._compositionMode=!function(){const t=bh()?bh().getUserAgent():"";return/android (\d+)/.test(t.toLowerCase())}())}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_handleInput(t){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(t)}_compositionStart(){this._composing=!0}_compositionEnd(t){this._composing=!1,this._compositionMode&&this.onChange(t)}}return t.\u0275fac=function(e){return new(e||t)(oa(pc),oa(uc),oa(Wb,8))},t.\u0275dir=we({type:t,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(t,e){1&t&&ya("input",function(t){return e._handleInput(t.target.value)})("blur",function(){return e.onTouched()})("compositionstart",function(){return e._compositionStart()})("compositionend",function(t){return e._compositionEnd(t.target.value)})},features:[oc([zb])]}),t})();function Kb(t){return null==t||0===t.length}function qb(t){return null!=t&&"number"==typeof t.length}const Yb=new Pt("NgValidators"),Xb=new Pt("NgAsyncValidators"),Jb=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;class Qb{static min(t){return e=>{if(Kb(e.value)||Kb(t))return null;const n=parseFloat(e.value);return!isNaN(n)&&n{if(Kb(e.value)||Kb(t))return null;const n=parseFloat(e.value);return!isNaN(n)&&n>t?{max:{max:t,actual:e.value}}:null}}static required(t){return Kb(t.value)?{required:!0}:null}static requiredTrue(t){return!0===t.value?null:{required:!0}}static email(t){return Kb(t.value)||Jb.test(t.value)?null:{email:!0}}static minLength(t){return e=>Kb(e.value)||!qb(e.value)?null:e.value.lengthqb(e.value)&&e.value.length>t?{maxlength:{requiredLength:t,actualLength:e.value.length}}:null}static pattern(t){if(!t)return Qb.nullValidator;let e,n;return"string"==typeof t?(n="","^"!==t.charAt(0)&&(n+="^"),n+=t,"$"!==t.charAt(t.length-1)&&(n+="$"),e=new RegExp(n)):(n=t.toString(),e=t),t=>{if(Kb(t.value))return null;const i=t.value;return e.test(i)?null:{pattern:{requiredPattern:n,actualValue:i}}}}static nullValidator(t){return null}static compose(t){if(!t)return null;const e=t.filter(Zb);return 0==e.length?null:function(t){return ew(nw(t,e))}}static composeAsync(t){if(!t)return null;const e=t.filter(Zb);return 0==e.length?null:function(t){return function(...t){if(1===t.length){const e=t[0];if(l(e))return Ub(e,null);if(c(e)&&Object.getPrototypeOf(e)===Object.prototype){const t=Object.keys(e);return Ub(t.map(t=>e[t]),t)}}if("function"==typeof t[t.length-1]){const e=t.pop();return Ub(t=1===t.length&&l(t[0])?t[0]:t,null).pipe(E(t=>e(...t)))}return Ub(t,null)}(nw(t,e).map(tw)).pipe(E(ew))}}}function Zb(t){return null!=t}function tw(t){const e=ma(t)?I(t):t;return va(e),e}function ew(t){let e={};return t.forEach(t=>{e=null!=t?Object.assign(Object.assign({},e),t):e}),0===Object.keys(e).length?null:e}function nw(t,e){return e.map(e=>e(t))}function iw(t){return t.map(t=>function(t){return!t.validate}(t)?t:e=>t.validate(e))}function rw(t){return null!=t?Qb.compose(iw(t)):null}function sw(t){return null!=t?Qb.composeAsync(iw(t)):null}function ow(t,e){return null===t?[e]:Array.isArray(t)?[...t,e]:[t,e]}function aw(t){return t._rawValidators}function lw(t){return t._rawAsyncValidators}let cw=(()=>{class t{constructor(){this._rawValidators=[],this._rawAsyncValidators=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=rw(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=sw(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}reset(t){this.control&&this.control.reset(t)}hasError(t,e){return!!this.control&&this.control.hasError(t,e)}getError(t,e){return this.control?this.control.getError(t,e):null}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=we({type:t}),t})(),uw=(()=>{class t extends cw{get formDirective(){return null}get path(){return null}}return t.\u0275fac=function(e){return hw(e||t)},t.\u0275dir=we({type:t,features:[jo]}),t})();const hw=Ei(uw);class dw extends cw{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}}class fw{constructor(t){this._cd=t}get ngClassUntouched(){return!!this._cd.control&&this._cd.control.untouched}get ngClassTouched(){return!!this._cd.control&&this._cd.control.touched}get ngClassPristine(){return!!this._cd.control&&this._cd.control.pristine}get ngClassDirty(){return!!this._cd.control&&this._cd.control.dirty}get ngClassValid(){return!!this._cd.control&&this._cd.control.valid}get ngClassInvalid(){return!!this._cd.control&&this._cd.control.invalid}get ngClassPending(){return!!this._cd.control&&this._cd.control.pending}}let pw=(()=>{class t extends fw{constructor(t){super(t)}}return t.\u0275fac=function(e){return new(e||t)(oa(dw,2))},t.\u0275dir=we({type:t,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(t,e){2&t&&Oa("ng-untouched",e.ngClassUntouched)("ng-touched",e.ngClassTouched)("ng-pristine",e.ngClassPristine)("ng-dirty",e.ngClassDirty)("ng-valid",e.ngClassValid)("ng-invalid",e.ngClassInvalid)("ng-pending",e.ngClassPending)},features:[jo]}),t})(),gw=(()=>{class t extends fw{constructor(t){super(t)}}return t.\u0275fac=function(e){return new(e||t)(oa(uw,2))},t.\u0275dir=we({type:t,selectors:[["","formGroupName",""],["","formArrayName",""],["","ngModelGroup",""],["","formGroup",""],["form",3,"ngNoForm",""],["","ngForm",""]],hostVars:14,hostBindings:function(t,e){2&t&&Oa("ng-untouched",e.ngClassUntouched)("ng-touched",e.ngClassTouched)("ng-pristine",e.ngClassPristine)("ng-dirty",e.ngClassDirty)("ng-valid",e.ngClassValid)("ng-invalid",e.ngClassInvalid)("ng-pending",e.ngClassPending)},features:[jo]}),t})();const mw="VALID",vw="INVALID",yw="PENDING",bw="DISABLED";function ww(t){return(Sw(t)?t.validators:t)||null}function xw(t){return Array.isArray(t)?rw(t):t||null}function _w(t,e){return(Sw(e)?e.asyncValidators:t)||null}function Cw(t){return Array.isArray(t)?sw(t):t||null}function Sw(t){return null!=t&&!Array.isArray(t)&&"object"==typeof t}class kw{constructor(t,e){this._hasOwnPendingAsyncValidator=!1,this._onCollectionChange=()=>{},this._parent=null,this.pristine=!0,this.touched=!1,this._onDisabledChange=[],this._rawValidators=t,this._rawAsyncValidators=e,this._composedValidatorFn=xw(this._rawValidators),this._composedAsyncValidatorFn=Cw(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get valid(){return this.status===mw}get invalid(){return this.status===vw}get pending(){return this.status==yw}get disabled(){return this.status===bw}get enabled(){return this.status!==bw}get dirty(){return!this.pristine}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._rawValidators=t,this._composedValidatorFn=xw(t)}setAsyncValidators(t){this._rawAsyncValidators=t,this._composedAsyncValidatorFn=Cw(t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){this.touched=!0,this._parent&&!t.onlySelf&&this._parent.markAsTouched(t)}markAllAsTouched(){this.markAsTouched({onlySelf:!0}),this._forEachChild(t=>t.markAllAsTouched())}markAsUntouched(t={}){this.touched=!1,this._pendingTouched=!1,this._forEachChild(t=>{t.markAsUntouched({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}markAsDirty(t={}){this.pristine=!1,this._parent&&!t.onlySelf&&this._parent.markAsDirty(t)}markAsPristine(t={}){this.pristine=!0,this._pendingDirty=!1,this._forEachChild(t=>{t.markAsPristine({onlySelf:!0})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}markAsPending(t={}){this.status=yw,!1!==t.emitEvent&&this.statusChanges.emit(this.status),this._parent&&!t.onlySelf&&this._parent.markAsPending(t)}disable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status=bw,this.errors=null,this._forEachChild(e=>{e.disable(Object.assign(Object.assign({},t),{onlySelf:!0}))}),this._updateValue(),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(t=>t(!0))}enable(t={}){const e=this._parentMarkedDirty(t.onlySelf);this.status=mw,this._forEachChild(e=>{e.enable(Object.assign(Object.assign({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(Object.assign(Object.assign({},t),{skipPristineCheck:e})),this._onDisabledChange.forEach(t=>t(!1))}_updateAncestors(t){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine(),this._parent._updateTouched())}setParent(t){this._parent=t}updateValueAndValidity(t={}){this._setInitialStatus(),this._updateValue(),this.enabled&&(this._cancelExistingSubscription(),this.errors=this._runValidator(),this.status=this._calculateStatus(),this.status!==mw&&this.status!==yw||this._runAsyncValidator(t.emitEvent)),!1!==t.emitEvent&&(this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(t)}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?bw:mw}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t){if(this.asyncValidator){this.status=yw,this._hasOwnPendingAsyncValidator=!0;const e=tw(this.asyncValidator(this));this._asyncValidationSubscription=e.subscribe(e=>{this._hasOwnPendingAsyncValidator=!1,this.setErrors(e,{emitEvent:t})})}}_cancelExistingSubscription(){this._asyncValidationSubscription&&(this._asyncValidationSubscription.unsubscribe(),this._hasOwnPendingAsyncValidator=!1)}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(!1!==e.emitEvent)}get(t){return function(t,e,n){if(null==e)return null;if(Array.isArray(e)||(e=e.split(".")),Array.isArray(e)&&0===e.length)return null;let i=t;return e.forEach(t=>{i=i instanceof Aw?i.controls.hasOwnProperty(t)?i.controls[t]:null:i instanceof Dw&&i.at(t)||null}),i}(this,t)}getError(t,e){const n=e?this.get(e):this;return n&&n.errors?n.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),this._parent&&this._parent._updateControlsErrors(t)}_initObservables(){this.valueChanges=new Zc,this.statusChanges=new Zc}_calculateStatus(){return this._allControlsDisabled()?bw:this.errors?vw:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(yw)?yw:this._anyControlsHaveStatus(vw)?vw:mw}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t={}){this.pristine=!this._anyControlsDirty(),this._parent&&!t.onlySelf&&this._parent._updatePristine(t)}_updateTouched(t={}){this.touched=this._anyControlsTouched(),this._parent&&!t.onlySelf&&this._parent._updateTouched(t)}_isBoxedValue(t){return"object"==typeof t&&null!==t&&2===Object.keys(t).length&&"value"in t&&"disabled"in t}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){Sw(t)&&null!=t.updateOn&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){return!t&&!(!this._parent||!this._parent.dirty)&&!this._parent._anyControlsDirty()}}class Ew extends kw{constructor(t=null,e,n){super(ww(e),_w(n,e)),this._onChange=[],this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!n})}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&!1!==e.emitModelToViewChange&&this._onChange.forEach(t=>t(this.value,!1!==e.emitViewToModelChange)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=null,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_clearChangeFns(){this._onChange=[],this._onDisabledChange=[],this._onCollectionChange=()=>{}}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_forEachChild(t){}_syncPendingControls(){return!("submit"!==this.updateOn||(this._pendingDirty&&this.markAsDirty(),this._pendingTouched&&this.markAsTouched(),!this._pendingChange)||(this.setValue(this._pendingValue,{onlySelf:!0,emitModelToViewChange:!1}),0))}_applyFormState(t){this._isBoxedValue(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}}class Aw extends kw{constructor(t,e,n){super(ww(e),_w(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!n})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e){this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}removeControl(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity(),this._onCollectionChange()}setControl(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity(),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){this._checkAllValuesPresent(t),Object.keys(t).forEach(n=>{this._throwIfControlMissing(n),this.controls[n].setValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){Object.keys(t).forEach(n=>{this.controls[n]&&this.controls[n].patchValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}reset(t={},e={}){this._forEachChild((n,i)=>{n.reset(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,n)=>(t[n]=e instanceof Ew?e.value:e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(t,e)=>!!e._syncPendingControls()||t);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_throwIfControlMissing(t){if(!Object.keys(this.controls).length)throw new Error("\n There are no form controls registered with this group yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.controls[t])throw new Error(`Cannot find form control with name: ${t}.`)}_forEachChild(t){Object.keys(this.controls).forEach(e=>t(this.controls[e],e))}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(const e of Object.keys(this.controls)){const n=this.controls[e];if(this.contains(e)&&t(n))return!0}return!1}_reduceValue(){return this._reduceChildren({},(t,e,n)=>((e.enabled||this.disabled)&&(t[n]=e.value),t))}_reduceChildren(t,e){let n=t;return this._forEachChild((t,i)=>{n=e(n,t,i)}),n}_allControlsDisabled(){for(const t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_checkAllValuesPresent(t){this._forEachChild((e,n)=>{if(void 0===t[n])throw new Error(`Must supply a value for form control with name: '${n}'.`)})}}class Dw extends kw{constructor(t,e,n){super(ww(e),_w(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!n})}at(t){return this.controls[t]}push(t){this.controls.push(t),this._registerControl(t),this.updateValueAndValidity(),this._onCollectionChange()}insert(t,e){this.controls.splice(t,0,e),this._registerControl(e),this.updateValueAndValidity()}removeAt(t){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),this.updateValueAndValidity()}setControl(t,e){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),this.controls.splice(t,1),e&&(this.controls.splice(t,0,e),this._registerControl(e)),this.updateValueAndValidity(),this._onCollectionChange()}get length(){return this.controls.length}setValue(t,e={}){this._checkAllValuesPresent(t),t.forEach((t,n)=>{this._throwIfControlMissing(n),this.at(n).setValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t.forEach((t,n)=>{this.at(n)&&this.at(n).patchValue(t,{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}reset(t=[],e={}){this._forEachChild((n,i)=>{n.reset(t[i],{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e),this._updateTouched(e),this.updateValueAndValidity(e)}getRawValue(){return this.controls.map(t=>t instanceof Ew?t.value:t.getRawValue())}clear(){this.controls.length<1||(this._forEachChild(t=>t._registerOnCollectionChange(()=>{})),this.controls.splice(0),this.updateValueAndValidity())}_syncPendingControls(){let t=this.controls.reduce((t,e)=>!!e._syncPendingControls()||t,!1);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_throwIfControlMissing(t){if(!this.controls.length)throw new Error("\n There are no form controls registered with this array yet. If you're using ngModel,\n you may want to check next tick (e.g. use setTimeout).\n ");if(!this.at(t))throw new Error(`Cannot find form control at index ${t}`)}_forEachChild(t){this.controls.forEach((e,n)=>{t(e,n)})}_updateValue(){this.value=this.controls.filter(t=>t.enabled||this.disabled).map(t=>t.value)}_anyControls(t){return this.controls.some(e=>e.enabled&&t(e))}_setUpControls(){this._forEachChild(t=>this._registerControl(t))}_checkAllValuesPresent(t){this._forEachChild((e,n)=>{if(void 0===t[n])throw new Error(`Must supply a value for form control at index: ${n}.`)})}_allControlsDisabled(){for(const t of this.controls)if(t.enabled)return!1;return this.controls.length>0||this.disabled}_registerControl(t){t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)}}const Tw={provide:Vb,useExisting:_t(()=>Rw),multi:!0};let Rw=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",null==t?"":t)}registerOnChange(t){this.onChange=e=>{t(""==e?null:parseFloat(e))}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(oa(pc),oa(uc))},t.\u0275dir=we({type:t,selectors:[["input","type","number","formControlName",""],["input","type","number","formControl",""],["input","type","number","ngModel",""]],hostBindings:function(t,e){1&t&&ya("input",function(t){return e.onChange(t.target.value)})("blur",function(){return e.onTouched()})},features:[oc([Tw])]}),t})();const Fw={provide:Vb,useExisting:_t(()=>Lw),multi:!0};let Mw=(()=>{class t{constructor(){this._accessors=[]}add(t,e){this._accessors.push([t,e])}remove(t){for(let e=this._accessors.length-1;e>=0;--e)if(this._accessors[e][1]===t)return void this._accessors.splice(e,1)}select(t){this._accessors.forEach(e=>{this._isSameGroup(e,t)&&e[1]!==t&&e[1].fireUncheck(t.value)})}_isSameGroup(t,e){return!!t[0].control&&t[0]._parent===e._control._parent&&t[1].name===e.name}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),Lw=(()=>{class t{constructor(t,e,n,i){this._renderer=t,this._elementRef=e,this._registry=n,this._injector=i,this.onChange=()=>{},this.onTouched=()=>{}}ngOnInit(){this._control=this._injector.get(dw),this._checkName(),this._registry.add(this._control,this)}ngOnDestroy(){this._registry.remove(this)}writeValue(t){this._state=t===this.value,this._renderer.setProperty(this._elementRef.nativeElement,"checked",this._state)}registerOnChange(t){this._fn=t,this.onChange=()=>{t(this.value),this._registry.select(this)}}fireUncheck(t){this.writeValue(t)}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_checkName(){!this.name&&this.formControlName&&(this.name=this.formControlName)}}return t.\u0275fac=function(e){return new(e||t)(oa(pc),oa(uc),oa(Mw),oa(Bo))},t.\u0275dir=we({type:t,selectors:[["input","type","radio","formControlName",""],["input","type","radio","formControl",""],["input","type","radio","ngModel",""]],hostBindings:function(t,e){1&t&&ya("change",function(){return e.onChange()})("blur",function(){return e.onTouched()})},inputs:{name:"name",formControlName:"formControlName",value:"value"},features:[oc([Fw])]}),t})();const $w={provide:Vb,useExisting:_t(()=>Ow),multi:!0};let Ow=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this.onChange=t=>{},this.onTouched=()=>{}}writeValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",parseFloat(t))}registerOnChange(t){this.onChange=e=>{t(""==e?null:parseFloat(e))}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}}return t.\u0275fac=function(e){return new(e||t)(oa(pc),oa(uc))},t.\u0275dir=we({type:t,selectors:[["input","type","range","formControlName",""],["input","type","range","formControl",""],["input","type","range","ngModel",""]],hostBindings:function(t,e){1&t&&ya("change",function(t){return e.onChange(t.target.value)})("input",function(t){return e.onChange(t.target.value)})("blur",function(){return e.onTouched()})},features:[oc([$w])]}),t})();const Iw={provide:Vb,useExisting:_t(()=>Pw),multi:!0};function Nw(t,e){return null==t?`${e}`:(e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}let Pw=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=t=>{},this.onTouched=()=>{},this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){this.value=t;const e=this._getOptionId(t);null==e&&this._renderer.setProperty(this._elementRef.nativeElement,"selectedIndex",-1);const n=Nw(e,t);this._renderer.setProperty(this._elementRef.nativeElement,"value",n)}registerOnChange(t){this.onChange=e=>{this.value=this._getOptionValue(e),t(this.value)}}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}_registerOption(){return(this._idCounter++).toString()}_getOptionId(t){for(const e of Array.from(this._optionMap.keys()))if(this._compareWith(this._optionMap.get(e),t))return e;return null}_getOptionValue(t){const e=function(t){return t.split(":")[0]}(t);return this._optionMap.has(e)?this._optionMap.get(e):t}}return t.\u0275fac=function(e){return new(e||t)(oa(pc),oa(uc))},t.\u0275dir=we({type:t,selectors:[["select","formControlName","",3,"multiple",""],["select","formControl","",3,"multiple",""],["select","ngModel","",3,"multiple",""]],hostBindings:function(t,e){1&t&&ya("change",function(t){return e.onChange(t.target.value)})("blur",function(){return e.onTouched()})},inputs:{compareWith:"compareWith"},features:[oc([Iw])]}),t})(),Bw=(()=>{class t{constructor(t,e,n){this._element=t,this._renderer=e,this._select=n,this._select&&(this.id=this._select._registerOption())}set ngValue(t){null!=this._select&&(this._select._optionMap.set(this.id,t),this._setElementValue(Nw(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._setElementValue(t),this._select&&this._select.writeValue(this._select.value)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(oa(uc),oa(pc),oa(Pw,9))},t.\u0275dir=we({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();const Uw={provide:Vb,useExisting:_t(()=>Hw),multi:!0};function Vw(t,e){return null==t?`${e}`:("string"==typeof e&&(e=`'${e}'`),e&&"object"==typeof e&&(e="Object"),`${t}: ${e}`.slice(0,50))}let Hw=(()=>{class t{constructor(t,e){this._renderer=t,this._elementRef=e,this._optionMap=new Map,this._idCounter=0,this.onChange=t=>{},this.onTouched=()=>{},this._compareWith=Object.is}set compareWith(t){this._compareWith=t}writeValue(t){let e;if(this.value=t,Array.isArray(t)){const n=t.map(t=>this._getOptionId(t));e=(t,e)=>{t._setSelected(n.indexOf(e.toString())>-1)}}else e=(t,e)=>{t._setSelected(!1)};this._optionMap.forEach(e)}registerOnChange(t){this.onChange=e=>{const n=[];if(void 0!==e.selectedOptions){const t=e.selectedOptions;for(let e=0;e{class t{constructor(t,e,n){this._element=t,this._renderer=e,this._select=n,this._select&&(this.id=this._select._registerOption(this))}set ngValue(t){null!=this._select&&(this._value=t,this._setElementValue(Vw(this.id,t)),this._select.writeValue(this._select.value))}set value(t){this._select?(this._value=t,this._setElementValue(Vw(this.id,t)),this._select.writeValue(this._select.value)):this._setElementValue(t)}_setElementValue(t){this._renderer.setProperty(this._element.nativeElement,"value",t)}_setSelected(t){this._renderer.setProperty(this._element.nativeElement,"selected",t)}ngOnDestroy(){this._select&&(this._select._optionMap.delete(this.id),this._select.writeValue(this._select.value))}}return t.\u0275fac=function(e){return new(e||t)(oa(uc),oa(pc),oa(Hw,9))},t.\u0275dir=we({type:t,selectors:[["option"]],inputs:{ngValue:"ngValue",value:"value"}}),t})();function zw(t,e){Gw(t,e,!0),e.valueAccessor.writeValue(t.value),function(t,e){e.valueAccessor.registerOnChange(n=>{t._pendingValue=n,t._pendingChange=!0,t._pendingDirty=!0,"change"===t.updateOn&&qw(t,e)})}(t,e),function(t,e){t.registerOnChange((t,n)=>{e.valueAccessor.writeValue(t),n&&e.viewToModelUpdate(t)})}(t,e),function(t,e){e.valueAccessor.registerOnTouched(()=>{t._pendingTouched=!0,"blur"===t.updateOn&&t._pendingChange&&qw(t,e),"submit"!==t.updateOn&&t.markAsTouched()})}(t,e),e.valueAccessor.setDisabledState&&t.registerOnDisabledChange(t=>{e.valueAccessor.setDisabledState(t)})}function Ww(t,e){t.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function Gw(t,e,n){const i=aw(t);null!==e.validator?t.setValidators(ow(i,e.validator)):"function"==typeof i&&t.setValidators([i]);const r=lw(t);if(null!==e.asyncValidator?t.setAsyncValidators(ow(r,e.asyncValidator)):"function"==typeof r&&t.setAsyncValidators([r]),n){const n=()=>t.updateValueAndValidity();Ww(e._rawValidators,n),Ww(e._rawAsyncValidators,n)}}function Kw(t,e,n){if(null!==t){if(null!==e.validator){const n=aw(t);Array.isArray(n)&&n.length>0&&t.setValidators(n.filter(t=>t!==e.validator))}if(null!==e.asyncValidator){const n=lw(t);Array.isArray(n)&&n.length>0&&t.setAsyncValidators(n.filter(t=>t!==e.asyncValidator))}}if(n){const t=()=>{};Ww(e._rawValidators,t),Ww(e._rawAsyncValidators,t)}}function qw(t,e){t._pendingDirty&&t.markAsDirty(),t.setValue(t._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(t._pendingValue),t._pendingChange=!1}function Yw(t,e){Gw(t,e,!1)}const Xw=[jb,Ow,Rw,Pw,Hw,Lw];let Jw=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=we({type:t,selectors:[["form",3,"ngNoForm","",3,"ngNativeValidate",""]],hostAttrs:["novalidate",""]}),t})();const Qw=new Pt("NgModelWithFormControlWarning"),Zw={provide:uw,useExisting:_t(()=>tx)};let tx=(()=>{class t extends uw{constructor(t,e){super(),this.validators=t,this.asyncValidators=e,this.submitted=!1,this.directives=[],this.form=null,this.ngSubmit=new Zc,this._setValidators(t),this._setAsyncValidators(e)}ngOnChanges(t){this._checkFormPresent(),t.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(t){const e=this.form.get(t.path);return zw(e,t),e.updateValueAndValidity({emitEvent:!1}),this.directives.push(t),e}getControl(t){return this.form.get(t.path)}removeControl(t){!function(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}(this.directives,t)}addFormGroup(t){const e=this.form.get(t.path);Yw(e,t),e.updateValueAndValidity({emitEvent:!1})}removeFormGroup(t){}getFormGroup(t){return this.form.get(t.path)}addFormArray(t){const e=this.form.get(t.path);Yw(e,t),e.updateValueAndValidity({emitEvent:!1})}removeFormArray(t){}getFormArray(t){return this.form.get(t.path)}updateModel(t,e){this.form.get(t.path).setValue(e)}onSubmit(t){return this.submitted=!0,e=this.directives,this.form._syncPendingControls(),e.forEach(t=>{const e=t.control;"submit"===e.updateOn&&e._pendingChange&&(t.viewToModelUpdate(e._pendingValue),e._pendingChange=!1)}),this.ngSubmit.emit(t),!1;var e}onReset(){this.resetForm()}resetForm(t){this.form.reset(t),this.submitted=!1}_updateDomValue(){this.directives.forEach(t=>{const e=this.form.get(t.path);t.control!==e&&(function(t,e){const n=()=>{};e.valueAccessor.registerOnChange(n),e.valueAccessor.registerOnTouched(n),Kw(t,e,!0),t&&t._clearChangeFns()}(t.control||null,t),e&&zw(e,t),t.control=e)}),this.form._updateTreeValidity({emitEvent:!1})}_updateRegistrations(){this.form._registerOnCollectionChange(()=>this._updateDomValue()),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){Gw(this.form,this,!1),this._oldForm&&Kw(this._oldForm,this,!1)}_checkFormPresent(){}}return t.\u0275fac=function(e){return new(e||t)(oa(Yb,10),oa(Xb,10))},t.\u0275dir=we({type:t,selectors:[["","formGroup",""]],hostBindings:function(t,e){1&t&&ya("submit",function(t){return e.onSubmit(t)})("reset",function(){return e.onReset()})},inputs:{form:["formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[oc([Zw]),jo,Ve]}),t})();const ex={provide:dw,useExisting:_t(()=>nx)};let nx=(()=>{class t extends dw{constructor(t,e,n,i,r){super(),this._ngModelWarningConfig=r,this._added=!1,this.update=new Zc,this._ngModelWarningSent=!1,this._parent=t,this._setValidators(e),this._setAsyncValidators(n),this.valueAccessor=function(t,e){if(!e)return null;let n,i,r;return Array.isArray(e),e.forEach(t=>{var e;t.constructor===Gb?n=t:(e=t,Xw.some(t=>e.constructor===t)?i=t:r=t)}),r||i||n||null}(0,i)}set isDisabled(t){}ngOnChanges(e){var n,i;this._added||this._setUpControl(),function(t,e){if(!t.hasOwnProperty("model"))return!1;const n=t.model;return!!n.isFirstChange()||!Object.is(e,n.currentValue)}(e,this.viewModel)&&(n=t,this,i=this._ngModelWarningConfig,zi()&&"never"!==i&&((null!==i&&"once"!==i||n._ngModelWarningSentOnce)&&("always"!==i||this._ngModelWarningSent)||(n._ngModelWarningSentOnce=!0,this._ngModelWarningSent=!0)),this.viewModel=this.model,this.formDirective.updateModel(this,this.model))}ngOnDestroy(){this.formDirective&&this.formDirective.removeControl(this)}viewToModelUpdate(t){this.viewModel=t,this.update.emit(t)}get path(){return t=null==this.name?this.name:this.name.toString(),[...this._parent.path,t];var t}get formDirective(){return this._parent?this._parent.formDirective:null}_checkParentType(){}_setUpControl(){this._checkParentType(),this.control=this.formDirective.addControl(this),this.control.disabled&&this.valueAccessor.setDisabledState&&this.valueAccessor.setDisabledState(!0),this._added=!0}}return t.\u0275fac=function(e){return new(e||t)(oa(uw,13),oa(Yb,10),oa(Xb,10),oa(Vb,10),oa(Qw,8))},t.\u0275dir=we({type:t,selectors:[["","formControlName",""]],inputs:{isDisabled:["disabled","isDisabled"],name:["formControlName","name"],model:["ngModel","model"]},outputs:{update:"ngModelChange"},features:[oc([ex]),jo,Ve]}),t._ngModelWarningSentOnce=!1,t})();const ix={provide:Yb,useExisting:_t(()=>rx),multi:!0};let rx=(()=>{class t{constructor(){this._required=!1}get required(){return this._required}set required(t){this._required=null!=t&&!1!==t&&"false"!=`${t}`,this._onChange&&this._onChange()}validate(t){return this.required?Qb.required(t):null}registerOnValidatorChange(t){this._onChange=t}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=we({type:t,selectors:[["","required","","formControlName","",3,"type","checkbox"],["","required","","formControl","",3,"type","checkbox"],["","required","","ngModel","",3,"type","checkbox"]],hostVars:1,hostBindings:function(t,e){2&t&&na("required",e.required?"":null)},inputs:{required:"required"},features:[oc([ix])]}),t})(),sx=(()=>{class t{}return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)}}),t})(),ox=(()=>{class t{group(t,e=null){const n=this._reduceControls(t);let i,r=null,s=null;return null!=e&&(function(t){return void 0!==t.asyncValidators||void 0!==t.validators||void 0!==t.updateOn}(e)?(r=null!=e.validators?e.validators:null,s=null!=e.asyncValidators?e.asyncValidators:null,i=null!=e.updateOn?e.updateOn:void 0):(r=null!=e.validator?e.validator:null,s=null!=e.asyncValidator?e.asyncValidator:null)),new Aw(n,{asyncValidators:s,updateOn:i,validators:r})}control(t,e,n){return new Ew(t,e,n)}array(t,e,n){const i=t.map(t=>this._createControl(t));return new Dw(i,e,n)}_reduceControls(t){const e={};return Object.keys(t).forEach(n=>{e[n]=this._createControl(t[n])}),e}_createControl(t){return t instanceof Ew||t instanceof Aw||t instanceof Dw?t:Array.isArray(t)?this.control(t[0],t.length>1?t[1]:null,t.length>2?t[2]:null):this.control(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),ax=(()=>{class t{}return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},providers:[Mw],imports:[sx]}),t})(),lx=(()=>{class t{static withConfig(e){return{ngModule:t,providers:[{provide:Qw,useValue:e.warnOnNgModelWithFormControl}]}}}return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},providers:[ox,Mw],imports:[sx]}),t})();function cx(t,e,n,i){var r,s=arguments.length,o=s<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(r=t[a])&&(o=(s<3?r(o):s>3?r(e,n,o):r(e,n))||o);return s>3&&o&&Object.defineProperty(e,n,o),o}function ux(t,e){return function(n,i){e(n,i,t)}}const hx=new Pt("ngx-segment-analytics.config"),dx={debug:!1,loadOnInitialization:!0,segmentHost:"cdn.segment.com",segmentUri:"/analytics.js/v1/$API_KEY$/analytics.min.js"};let fx=(()=>{let t=class{};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({token:t,factory:function(e){return t.\u0275fac(e)}}),t})(),px=(()=>{let t=class{constructor(t,e,n){if(this._w=t,this._doc=e,this._config=Object.assign(Object.assign({},dx),n),!this._config.loadOnInitialization||void 0!==this._config.apiKey&&""!==this._config.apiKey){if(void 0===this._w.analytics||void 0===this._w.analytics.initialize||!1===this._w.analytics.initialize){if(void 0!==this._w.analytics&&!0===this._w.analytics.invoked)return void console.error("Segment snippet included twice.");this._config.debug&&console.log("Segment initialization..."),this._w.analytics=[],this._w.analytics.invoked=!0,this._w.analytics.methods=["trackSubmit","trackClick","trackLink","trackForm","pageview","identify","reset","group","track","ready","alias","debug","page","once","off","on","addSourceMiddleware"],this._w.analytics.factory=t=>(...e)=>(e.unshift(t),this._w.analytics.push(e),this._w.analytics),this._w.analytics.methods.forEach(t=>{this._w.analytics[t]=this._w.analytics.factory(t)}),this._w.analytics.load=(t,e)=>{const n=this._doc.createElement("script");n.type="text/javascript",n.async=!0,n.src="https://"+this._config.segmentHost+this._config.segmentUri.replace("$API_KEY$",t);const i=this._doc.getElementsByTagName("script")[0];i.parentNode.insertBefore(n,i),this._w.analytics._loadOptions=e},this._w.analytics.SNIPPET_VERSION="4.1.0",this._config.loadOnInitialization&&this.load(this._config.apiKey)}}else console.error("The API Key cannot be an empty string if Segment must be loaded on initialization.")}load(t,e){this._w.analytics.load(t,e),this._config.debug&&console.log("Segment initialized"),this.debug(this._config.debug)}identify(t,e,n){return new Promise(i=>{this._w.analytics.identify(t,e,n,t=>i(this))})}track(t,e,n){return new Promise(i=>{this._w.analytics.track(t,e,n,t=>i(this))})}page(t,e,n,i){return new Promise(r=>{this._w.analytics.page(t,e,n,i,t=>r(this))})}group(t,e){return new Promise(n=>{this._w.analytics.group(t,e,t=>n(this))})}alias(t,e,n){return new Promise(i=>{this._w.analytics.alias(t,e,n,t=>i(this))})}ready(){return new Promise(t=>{this._w.analytics.ready(e=>t(this))})}user(){return this._w.analytics.user()}id(){return this._w.analytics.id()}traits(){return this._w.analytics.traits()}reset(){this._w.analytics.reset()}debug(t){this._w.analytics.debug(t)}on(t,e){this._w.analytics.on(t,e)}trackLink(t,e,n){this._w.analytics.trackLink(t,e,n)}trackForm(t,e,n){this._w.analytics.trackForm(t,e,n)}timeout(t){this._w.analytics.timeout(t)}addSourceMiddleware(t){this._w.analytics.addSourceMiddleware(t)}get plugins(){return this._w.analytics.plugins}};return t.\u0275fac=function(e){return new(e||t)(Yt(fx),Yt(wh),Yt(hx))},t.\u0275prov=ut({factory:function(){return new t(Yt(fx),Yt(wh),Yt(hx))},token:t,providedIn:"root"}),t=cx([ux(0,nt(fx)),ux(1,nt(wh)),ux(2,nt(hx))],t),t})();var gx;function mx(t){return function(t){return"browser"===t}(t)?window:{}}let vx=(()=>{let t=gx=class{constructor(t){if(t)throw new Error("SegmentModule is already loaded. Import it in the AppModule only")}static forRoot(t){return{ngModule:gx,providers:[{provide:hx,useValue:t},px]}}};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)(Yt(t,12))},providers:[{provide:fx,useFactory:mx,deps:[Du]}],imports:[[Fd]]}),t=gx=cx([ux(0,it()),ux(0,st())],t),t})();class yx{}class bx{}class wx{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?this.lazyInit="string"==typeof t?()=>{this.headers=new Map,t.split("\n").forEach(t=>{const e=t.indexOf(":");if(e>0){const n=t.slice(0,e),i=n.toLowerCase(),r=t.slice(e+1).trim();this.maybeSetNormalizedName(n,i),this.headers.has(i)?this.headers.get(i).push(r):this.headers.set(i,[r])}})}:()=>{this.headers=new Map,Object.keys(t).forEach(e=>{let n=t[e];const i=e.toLowerCase();"string"==typeof n&&(n=[n]),n.length>0&&(this.headers.set(i,n),this.maybeSetNormalizedName(e,i))})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();const e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof wx?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){const e=new wx;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof wx?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){const e=t.name.toLowerCase();switch(t.op){case"a":case"s":let n=t.value;if("string"==typeof n&&(n=[n]),0===n.length)return;this.maybeSetNormalizedName(t.name,e);const i=("a"===t.op?this.headers.get(e):void 0)||[];i.push(...n),this.headers.set(e,i);break;case"d":const r=t.value;if(r){let t=this.headers.get(e);if(!t)return;t=t.filter(t=>-1===r.indexOf(t)),0===t.length?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,t)}else this.headers.delete(e),this.normalizedNames.delete(e)}}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}}class xx{encodeKey(t){return _x(t)}encodeValue(t){return _x(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}}function _x(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/gi,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%2B/gi,"+").replace(/%3D/gi,"=").replace(/%3F/gi,"?").replace(/%2F/gi,"/")}class Cx{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new xx,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=function(t,e){const n=new Map;return t.length>0&&t.split("&").forEach(t=>{const i=t.indexOf("="),[r,s]=-1==i?[e.decodeKey(t),""]:[e.decodeKey(t.slice(0,i)),e.decodeValue(t.slice(i+1))],o=n.get(r)||[];o.push(s),n.set(r,o)}),n}(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{const n=t.fromObject[e];this.map.set(e,Array.isArray(n)?n:[n])})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();const e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{const e=this.encoder.encodeKey(t);return this.map.get(t).map(t=>e+"="+this.encoder.encodeValue(t)).join("&")}).filter(t=>""!==t).join("&")}clone(t){const e=new Cx({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat([t]),e}init(){null===this.map&&(this.map=new Map),null!==this.cloneFrom&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":const e=("a"===t.op?this.map.get(t.param):void 0)||[];e.push(t.value),this.map.set(t.param,e);break;case"d":if(void 0===t.value){this.map.delete(t.param);break}{let e=this.map.get(t.param)||[];const n=e.indexOf(t.value);-1!==n&&e.splice(n,1),e.length>0?this.map.set(t.param,e):this.map.delete(t.param)}}}),this.cloneFrom=this.updates=null)}}function Sx(t){return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer}function kx(t){return"undefined"!=typeof Blob&&t instanceof Blob}function Ex(t){return"undefined"!=typeof FormData&&t instanceof FormData}class Ax{constructor(t,e,n,i){let r;if(this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase(),function(t){switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}(this.method)||i?(this.body=void 0!==n?n:null,r=i):r=n,r&&(this.reportProgress=!!r.reportProgress,this.withCredentials=!!r.withCredentials,r.responseType&&(this.responseType=r.responseType),r.headers&&(this.headers=r.headers),r.params&&(this.params=r.params)),this.headers||(this.headers=new wx),this.params){const t=this.params.toString();if(0===t.length)this.urlWithParams=e;else{const n=e.indexOf("?");this.urlWithParams=e+(-1===n?"?":ne.set(n,t.setHeaders[n]),a)),t.setParams&&(l=Object.keys(t.setParams).reduce((e,n)=>e.set(n,t.setParams[n]),l)),new Ax(e,n,r,{params:l,headers:a,reportProgress:o,responseType:i,withCredentials:s})}}var Dx=function(t){return t[t.Sent=0]="Sent",t[t.UploadProgress=1]="UploadProgress",t[t.ResponseHeader=2]="ResponseHeader",t[t.DownloadProgress=3]="DownloadProgress",t[t.Response=4]="Response",t[t.User=5]="User",t}({});class Tx{constructor(t,e=200,n="OK"){this.headers=t.headers||new wx,this.status=void 0!==t.status?t.status:e,this.statusText=t.statusText||n,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}}class Rx extends Tx{constructor(t={}){super(t),this.type=Dx.ResponseHeader}clone(t={}){return new Rx({headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class Fx extends Tx{constructor(t={}){super(t),this.type=Dx.Response,this.body=void 0!==t.body?t.body:null}clone(t={}){return new Fx({body:void 0!==t.body?t.body:this.body,headers:t.headers||this.headers,status:void 0!==t.status?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}}class Mx extends Tx{constructor(t){super(t,0,"Unknown Error"),this.name="HttpErrorResponse",this.ok=!1,this.message=this.status>=200&&this.status<300?`Http failure during parsing for ${t.url||"(unknown url)"}`:`Http failure response for ${t.url||"(unknown url)"}: ${t.status} ${t.statusText}`,this.error=t.error||null}}function Lx(t,e){return{body:e,headers:t.headers,observe:t.observe,params:t.params,reportProgress:t.reportProgress,responseType:t.responseType,withCredentials:t.withCredentials}}let $x=(()=>{class t{constructor(t){this.handler=t}request(t,e,n={}){let i;if(t instanceof Ax)i=t;else{let r,s;r=n.headers instanceof wx?n.headers:new wx(n.headers),n.params&&(s=n.params instanceof Cx?n.params:new Cx({fromObject:n.params})),i=new Ax(t,e,void 0!==n.body?n.body:null,{headers:r,params:s,reportProgress:n.reportProgress,responseType:n.responseType||"json",withCredentials:n.withCredentials})}const r=Qg(i).pipe(Nm(t=>this.handler.handle(t)));if(t instanceof Ax||"events"===n.observe)return r;const s=r.pipe(hm(t=>t instanceof Fx));switch(n.observe||"body"){case"body":switch(i.responseType){case"arraybuffer":return s.pipe(E(t=>{if(null!==t.body&&!(t.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return t.body}));case"blob":return s.pipe(E(t=>{if(null!==t.body&&!(t.body instanceof Blob))throw new Error("Response is not a Blob.");return t.body}));case"text":return s.pipe(E(t=>{if(null!==t.body&&"string"!=typeof t.body)throw new Error("Response is not a string.");return t.body}));case"json":default:return s.pipe(E(t=>t.body))}case"response":return s;default:throw new Error(`Unreachable: unhandled observe type ${n.observe}}`)}}delete(t,e={}){return this.request("DELETE",t,e)}get(t,e={}){return this.request("GET",t,e)}head(t,e={}){return this.request("HEAD",t,e)}jsonp(t,e){return this.request("JSONP",t,{params:(new Cx).append(e,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(t,e={}){return this.request("OPTIONS",t,e)}patch(t,e,n={}){return this.request("PATCH",t,Lx(n,e))}post(t,e,n={}){return this.request("POST",t,Lx(n,e))}put(t,e,n={}){return this.request("PUT",t,Lx(n,e))}}return t.\u0275fac=function(e){return new(e||t)(Yt(yx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();class Ox{constructor(t,e){this.next=t,this.interceptor=e}handle(t){return this.interceptor.intercept(t,this.next)}}const Ix=new Pt("HTTP_INTERCEPTORS");let Nx=(()=>{class t{intercept(t,e){return e.handle(t)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();const Px=/^\)\]\}',?\n/;class Bx{}let Ux=(()=>{class t{constructor(){}build(){return new XMLHttpRequest}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),Vx=(()=>{class t{constructor(t){this.xhrFactory=t}handle(t){if("JSONP"===t.method)throw new Error("Attempted to construct Jsonp request without HttpClientJsonpModule installed.");return new y(e=>{const n=this.xhrFactory.build();if(n.open(t.method,t.urlWithParams),t.withCredentials&&(n.withCredentials=!0),t.headers.forEach((t,e)=>n.setRequestHeader(t,e.join(","))),t.headers.has("Accept")||n.setRequestHeader("Accept","application/json, text/plain, */*"),!t.headers.has("Content-Type")){const e=t.detectContentTypeHeader();null!==e&&n.setRequestHeader("Content-Type",e)}if(t.responseType){const e=t.responseType.toLowerCase();n.responseType="json"!==e?e:"text"}const i=t.serializeBody();let r=null;const s=()=>{if(null!==r)return r;const e=1223===n.status?204:n.status,i=n.statusText||"OK",s=new wx(n.getAllResponseHeaders()),o=function(t){return"responseURL"in t&&t.responseURL?t.responseURL:/^X-Request-URL:/m.test(t.getAllResponseHeaders())?t.getResponseHeader("X-Request-URL"):null}(n)||t.url;return r=new Rx({headers:s,status:e,statusText:i,url:o}),r},o=()=>{let{headers:i,status:r,statusText:o,url:a}=s(),l=null;204!==r&&(l=void 0===n.response?n.responseText:n.response),0===r&&(r=l?200:0);let c=r>=200&&r<300;if("json"===t.responseType&&"string"==typeof l){const t=l;l=l.replace(Px,"");try{l=""!==l?JSON.parse(l):null}catch(u){l=t,c&&(c=!1,l={error:u,text:l})}}c?(e.next(new Fx({body:l,headers:i,status:r,statusText:o,url:a||void 0})),e.complete()):e.error(new Mx({error:l,headers:i,status:r,statusText:o,url:a||void 0}))},a=t=>{const{url:i}=s(),r=new Mx({error:t,status:n.status||0,statusText:n.statusText||"Unknown Error",url:i||void 0});e.error(r)};let l=!1;const c=i=>{l||(e.next(s()),l=!0);let r={type:Dx.DownloadProgress,loaded:i.loaded};i.lengthComputable&&(r.total=i.total),"text"===t.responseType&&n.responseText&&(r.partialText=n.responseText),e.next(r)},u=t=>{let n={type:Dx.UploadProgress,loaded:t.loaded};t.lengthComputable&&(n.total=t.total),e.next(n)};return n.addEventListener("load",o),n.addEventListener("error",a),t.reportProgress&&(n.addEventListener("progress",c),null!==i&&n.upload&&n.upload.addEventListener("progress",u)),n.send(i),e.next({type:Dx.Sent}),()=>{n.removeEventListener("error",a),n.removeEventListener("load",o),t.reportProgress&&(n.removeEventListener("progress",c),null!==i&&n.upload&&n.upload.removeEventListener("progress",u)),n.readyState!==n.DONE&&n.abort()}})}}return t.\u0275fac=function(e){return new(e||t)(Yt(Bx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})();const Hx=new Pt("XSRF_COOKIE_NAME"),jx=new Pt("XSRF_HEADER_NAME");class zx{}let Wx=(()=>{class t{constructor(t,e,n){this.doc=t,this.platform=e,this.cookieName=n,this.lastCookieString="",this.lastToken=null,this.parseCount=0}getToken(){if("server"===this.platform)return null;const t=this.doc.cookie||"";return t!==this.lastCookieString&&(this.parseCount++,this.lastToken=xd(t,this.cookieName),this.lastCookieString=t),this.lastToken}}return t.\u0275fac=function(e){return new(e||t)(Yt(wh),Yt(Du),Yt(Hx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),Gx=(()=>{class t{constructor(t,e){this.tokenService=t,this.headerName=e}intercept(t,e){const n=t.url.toLowerCase();if("GET"===t.method||"HEAD"===t.method||n.startsWith("http://")||n.startsWith("https://"))return e.handle(t);const i=this.tokenService.getToken();return null===i||t.headers.has(this.headerName)||(t=t.clone({headers:t.headers.set(this.headerName,i)})),e.handle(t)}}return t.\u0275fac=function(e){return new(e||t)(Yt(zx),Yt(jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),Kx=(()=>{class t{constructor(t,e){this.backend=t,this.injector=e,this.chain=null}handle(t){if(null===this.chain){const t=this.injector.get(Ix,[]);this.chain=t.reduceRight((t,e)=>new Ox(t,e),this.backend)}return this.chain.handle(t)}}return t.\u0275fac=function(e){return new(e||t)(Yt(bx),Yt(Bo))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),qx=(()=>{class t{static disable(){return{ngModule:t,providers:[{provide:Gx,useClass:Nx}]}}static withOptions(e={}){return{ngModule:t,providers:[e.cookieName?{provide:Hx,useValue:e.cookieName}:[],e.headerName?{provide:jx,useValue:e.headerName}:[]]}}}return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},providers:[Gx,{provide:Ix,useExisting:Gx,multi:!0},{provide:zx,useClass:Wx},{provide:Hx,useValue:"XSRF-TOKEN"},{provide:jx,useValue:"X-XSRF-TOKEN"}]}),t})(),Yx=(()=>{class t{}return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},providers:[$x,{provide:yx,useClass:Kx},Vx,{provide:bx,useExisting:Vx},Ux,{provide:Bx,useExisting:Ux}],imports:[[qx.withOptions({cookieName:"XSRF-TOKEN",headerName:"X-XSRF-TOKEN"})]]}),t})();class Xx{}let Jx=(()=>{class t{constructor(t,e){this.httpClient=t,this.config=e||{host:"http://127.0.0.1:7120",timeoutMs:5e3}}addUser(t,e){let n=new Cx;return this.httpClient.post(this.config.host+"/v2/console/user",e,{params:n,headers:this.getTokenAuthHeaders(t)})}authenticate(t){let e=new Cx;return this.httpClient.post(this.config.host+"/v2/console/authenticate",t,{params:e})}banAccount(t,e){const n=`/v2/console/account/${e}/ban`;let i=new Cx;return this.httpClient.post(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}callApiEndpoint(t,e,n){const i=`/v2/console/api/endpoints/${e}`;let r=new Cx;return this.httpClient.post(this.config.host+i,n,{params:r,headers:this.getTokenAuthHeaders(t)})}callRpcEndpoint(t,e,n){const i=`/v2/console/api/endpoints/rpc/${e}`;let r=new Cx;return this.httpClient.post(this.config.host+i,n,{params:r,headers:this.getTokenAuthHeaders(t)})}deleteAccount(t,e,n){const i=`/v2/console/account/${e}`;let r=new Cx;return n&&(r=r.set("record_deletion",String(n))),this.httpClient.delete(this.config.host+i,{params:r,headers:this.getTokenAuthHeaders(t)})}deleteAccounts(t){let e=new Cx;return this.httpClient.delete(this.config.host+"/v2/console/account",{params:e,headers:this.getTokenAuthHeaders(t)})}deleteFriend(t,e,n){const i=`/v2/console/account/${e}/friend/${n}`;let r=new Cx;return this.httpClient.delete(this.config.host+i,{params:r,headers:this.getTokenAuthHeaders(t)})}deleteGroupUser(t,e,n){const i=`/v2/console/account/${e}/group/${n}`;let r=new Cx;return this.httpClient.delete(this.config.host+i,{params:r,headers:this.getTokenAuthHeaders(t)})}deleteLeaderboard(t,e){const n=`/v2/console/leaderboard/${e}`;let i=new Cx;return this.httpClient.delete(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}deleteLeaderboardRecord(t,e,n){const i=`/v2/console/leaderboard/${e}/owner/${n}`;let r=new Cx;return this.httpClient.delete(this.config.host+i,{params:r,headers:this.getTokenAuthHeaders(t)})}deleteStorage(t){let e=new Cx;return this.httpClient.delete(this.config.host+"/v2/console/storage",{params:e,headers:this.getTokenAuthHeaders(t)})}deleteStorageObject(t,e,n,i,r){const s=`/v2/console/storage/${e}/${n}/${i}`;let o=new Cx;return r&&(o=o.set("version",r)),this.httpClient.delete(this.config.host+s,{params:o,headers:this.getTokenAuthHeaders(t)})}deleteUser(t,e){let n=new Cx;return e&&(n=n.set("username",e)),this.httpClient.delete(this.config.host+"/v2/console/user",{params:n,headers:this.getTokenAuthHeaders(t)})}deleteWalletLedger(t,e,n){const i=`/v2/console/account/${e}/wallet/${n}`;let r=new Cx;return this.httpClient.delete(this.config.host+i,{params:r,headers:this.getTokenAuthHeaders(t)})}exportAccount(t,e){const n=`/v2/console/account/${e}/export`;let i=new Cx;return this.httpClient.get(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}getAccount(t,e){const n=`/v2/console/account/${e}`;let i=new Cx;return this.httpClient.get(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}getConfig(t){let e=new Cx;return this.httpClient.get(this.config.host+"/v2/console/config",{params:e,headers:this.getTokenAuthHeaders(t)})}getFriends(t,e){const n=`/v2/console/account/${e}/friend`;let i=new Cx;return this.httpClient.get(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}getGroups(t,e){const n=`/v2/console/account/${e}/group`;let i=new Cx;return this.httpClient.get(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}getLeaderboard(t,e){const n=`/v2/console/leaderboard/${e}`;let i=new Cx;return this.httpClient.get(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}getMatchState(t,e){const n=`/v2/console/match/${e}/state`;let i=new Cx;return this.httpClient.get(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}getRuntime(t){let e=new Cx;return this.httpClient.get(this.config.host+"/v2/console/runtime",{params:e,headers:this.getTokenAuthHeaders(t)})}getStatus(t){let e=new Cx;return this.httpClient.get(this.config.host+"/v2/console/status",{params:e,headers:this.getTokenAuthHeaders(t)})}getStorage(t,e,n,i){const r=`/v2/console/storage/${e}/${n}/${i}`;let s=new Cx;return this.httpClient.get(this.config.host+r,{params:s,headers:this.getTokenAuthHeaders(t)})}getWalletLedger(t,e){const n=`/v2/console/account/${e}/wallet`;let i=new Cx;return this.httpClient.get(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}listAccounts(t,e,n,i){let r=new Cx;return e&&(r=r.set("filter",e)),n&&(r=r.set("tombstones",String(n))),i&&(r=r.set("cursor",i)),this.httpClient.get(this.config.host+"/v2/console/account",{params:r,headers:this.getTokenAuthHeaders(t)})}listApiEndpoints(t){let e=new Cx;return this.httpClient.get(this.config.host+"/v2/console/api/endpoints",{params:e,headers:this.getTokenAuthHeaders(t)})}listLeaderboardRecords(t,e,n,i,r,s){const o=`/v2/console/leaderboard/${e}/records`;let a=new Cx;return n&&n.forEach(t=>a=a.append("owner_ids",String(t))),i&&(a=a.set("limit",String(i))),r&&(a=a.set("cursor",r)),s&&(a=a.set("expiry",s)),this.httpClient.get(this.config.host+o,{params:a,headers:this.getTokenAuthHeaders(t)})}listLeaderboards(t){let e=new Cx;return this.httpClient.get(this.config.host+"/v2/console/leaderboard",{params:e,headers:this.getTokenAuthHeaders(t)})}listMatches(t,e,n,i,r,s,o){let a=new Cx;return e&&(a=a.set("limit",String(e))),n&&(a=a.set("authoritative",String(n))),i&&(a=a.set("label",i)),r&&(a=a.set("min_size",String(r))),s&&(a=a.set("max_size",String(s))),o&&(a=a.set("query",o)),this.httpClient.get(this.config.host+"/v2/console/match",{params:a,headers:this.getTokenAuthHeaders(t)})}listPurchases(t,e,n,i){let r=new Cx;return e&&(r=r.set("user_id",e)),n&&(r=r.set("limit",String(n))),i&&(r=r.set("cursor",i)),this.httpClient.get(this.config.host+"/v2/console/purchase",{params:r,headers:this.getTokenAuthHeaders(t)})}listStorage(t,e,n,i,r){let s=new Cx;return e&&(s=s.set("user_id",e)),n&&(s=s.set("key",n)),i&&(s=s.set("collection",i)),r&&(s=s.set("cursor",r)),this.httpClient.get(this.config.host+"/v2/console/storage",{params:s,headers:this.getTokenAuthHeaders(t)})}listStorageCollections(t){let e=new Cx;return this.httpClient.get(this.config.host+"/v2/console/storage/collections",{params:e,headers:this.getTokenAuthHeaders(t)})}listUsers(t){let e=new Cx;return this.httpClient.get(this.config.host+"/v2/console/user",{params:e,headers:this.getTokenAuthHeaders(t)})}unbanAccount(t,e){const n=`/v2/console/account/${e}/unban`;let i=new Cx;return this.httpClient.post(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}unlinkApple(t,e){const n=`/v2/console/account/${e}/unlink/apple`;let i=new Cx;return this.httpClient.post(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}unlinkCustom(t,e){const n=`/v2/console/account/${e}/unlink/custom`;let i=new Cx;return this.httpClient.post(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}unlinkDevice(t,e,n){const i=`/v2/console/account/${e}/unlink/device`;let r=new Cx;return this.httpClient.post(this.config.host+i,n,{params:r,headers:this.getTokenAuthHeaders(t)})}unlinkEmail(t,e){const n=`/v2/console/account/${e}/unlink/email`;let i=new Cx;return this.httpClient.post(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}unlinkFacebook(t,e){const n=`/v2/console/account/${e}/unlink/facebook`;let i=new Cx;return this.httpClient.post(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}unlinkFacebookInstantGame(t,e){const n=`/v2/console/account/${e}/unlink/facebookinstantgame`;let i=new Cx;return this.httpClient.post(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}unlinkGameCenter(t,e){const n=`/v2/console/account/${e}/unlink/gamecenter`;let i=new Cx;return this.httpClient.post(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}unlinkGoogle(t,e){const n=`/v2/console/account/${e}/unlink/google`;let i=new Cx;return this.httpClient.post(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}unlinkSteam(t,e){const n=`/v2/console/account/${e}/unlink/steam`;let i=new Cx;return this.httpClient.post(this.config.host+n,{params:i,headers:this.getTokenAuthHeaders(t)})}updateAccount(t,e,n){const i=`/v2/console/account/${e}`;let r=new Cx;return this.httpClient.post(this.config.host+i,n,{params:r,headers:this.getTokenAuthHeaders(t)})}writeStorageObject(t,e,n,i,r){const s=`/v2/console/storage/${e}/${n}/${i}`;let o=new Cx;return this.httpClient.put(this.config.host+s,r,{params:o,headers:this.getTokenAuthHeaders(t)})}getTokenAuthHeaders(t){return(new wx).set("Authorization","Bearer "+t)}getBasicAuthHeaders(t,e){return(new wx).set("Authorization","Basic "+btoa(t+":"+e))}}return t.\u0275fac=function(e){return new(e||t)(Yt($x),Yt(Xx,8))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();var Qx=function(t){return t[t.APPLE_APP_STORE=0]="APPLE_APP_STORE",t[t.GOOGLE_PLAY_STORE=1]="GOOGLE_PLAY_STORE",t[t.HUAWEI_APP_GALLERY=2]="HUAWEI_APP_GALLERY",t}({}),Zx=function(t){return t[t.USER_ROLE_UNKNOWN=0]="USER_ROLE_UNKNOWN",t[t.USER_ROLE_ADMIN=1]="USER_ROLE_ADMIN",t[t.USER_ROLE_DEVELOPER=2]="USER_ROLE_DEVELOPER",t[t.USER_ROLE_MAINTAINER=3]="USER_ROLE_MAINTAINER",t[t.USER_ROLE_READONLY=4]="USER_ROLE_READONLY",t}({});const t_=new Pt("window"),e_=[{provide:t_,useFactory:()=>window}],n_="currentSession";let i_=(()=>{class t{constructor(t,e,n,i){this.window=t,this.segment=e,this.http=n,this.consoleService=i;const r=JSON.parse(localStorage.getItem(n_));r&&this.segmentIdentify(r),this.currentSessionSubject=new Zg(r),this.currentSession=this.currentSessionSubject.asObservable()}get currentSessionValue(){return this.currentSessionSubject.getValue()}get username(){const t=this.currentSessionSubject.getValue().token;return JSON.parse(atob(t.split(".")[1])).usn}get sessionRole(){const t=this.currentSessionSubject.getValue().token;switch(JSON.parse(atob(t.split(".")[1])).rol){case 1:return Zx.USER_ROLE_ADMIN;case 2:return Zx.USER_ROLE_DEVELOPER;case 3:return Zx.USER_ROLE_MAINTAINER;case 4:return Zx.USER_ROLE_READONLY;default:return Zx.USER_ROLE_UNKNOWN}}login(t,e){return this.consoleService.authenticate({username:t,password:e}).pipe(Um(t=>{localStorage.setItem(n_,JSON.stringify(t)),this.currentSessionSubject.next(t),this.segmentIdentify(t)}))}logout(){localStorage.removeItem(n_),this.currentSessionSubject.next(null)}segmentIdentify(t){const e=JSON.parse(atob(t.token.split(".")[1]));this.segment.identify(null,{username:e.usn,email:e.ema,cookie:e.cki})}}return t.\u0275fac=function(e){return new(e||t)(Yt(t_),Yt(px),Yt($x),Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function r_(t,e){if(1&t&&(ua(0,"div",17),qa(1),ha()),2&t){const t=xa();gs(1),Xa(" ",t.error," ")}}const s_=function(t){return{"was-validated":t}},o_=function(t){return{"is-invalid":t}};let a_=(()=>{class t{constructor(t,e,n,i,r){this.segment=t,this.formBuilder=e,this.route=n,this.router=i,this.authenticationService=r,this.error=""}ngOnInit(){this.segment.page("/login"),this.loginForm=this.formBuilder.group({username:["",Qb.compose([Qb.required])],password:["",Qb.compose([Qb.required,Qb.minLength(8)])]}),this.returnUrl=this.route.snapshot.queryParams.next||"/"}onSubmit(){this.submitted=!0,this.error="",this.loginForm.invalid||this.authenticationService.login(this.f.username.value,this.f.password.value).subscribe(t=>{this.loginForm.reset(),this.submitted=!1,this.router.navigate([this.returnUrl])},t=>{this.error=t,this.submitted=!1})}get f(){return this.loginForm.controls}}return t.\u0275fac=function(e){return new(e||t)(oa(px),oa(ox),oa(Jv),oa(mb),oa(i_))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:26,vars:14,consts:[[1,"bg-grad","d-flex","h-100"],[1,"align-self-center","mx-auto"],[1,"text-center","mb-4"],["src","/static/svg/logo.svg","alt","Nakama Logo","width","175"],["class","alert alert-warning","role","alert",4,"ngIf"],[1,"card"],[1,"card-body"],[1,"text-center"],[3,"formGroup","ngClass","ngSubmit"],[1,"form-group","form-row"],[1,"col-sm-12"],["for","username"],["type","text","id","username","formControlName","username","required","","autofocus","",1,"form-control",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","password"],["type","password","id","password","formControlName","password","required","",1,"form-control",3,"ngClass"],[1,"btn","btn-primary","btn-lg","btn-block",3,"disabled"],["role","alert",1,"alert","alert-warning"]],template:function(t,e){1&t&&(ua(0,"div",0),ua(1,"div",1),ua(2,"h1",2),da(3,"img",3),ha(),ra(4,r_,2,1,"div",4),ua(5,"div",5),ua(6,"div",6),ua(7,"h3",7),qa(8,"Login"),ha(),ua(9,"form",8),ya("ngSubmit",function(){return e.onSubmit()}),ua(10,"div",9),ua(11,"div",10),ua(12,"label",11),qa(13,"Username"),ha(),da(14,"input",12),ua(15,"div",13),qa(16,"Please enter a username."),ha(),ha(),ha(),ua(17,"div",9),ua(18,"div",10),ua(19,"label",14),qa(20,"Password"),ha(),da(21,"input",15),ua(22,"div",13),qa(23,"Password must be at least 8 characters."),ha(),ha(),ha(),ua(24,"button",16),qa(25,"Login"),ha(),ha(),ha(),ha(),ha(),ha()),2&t&&(gs(4),la("ngIf",e.error),gs(5),la("formGroup",e.loginForm)("ngClass",qc(8,s_,e.submitted)),gs(5),la("ngClass",qc(10,o_,e.f.username.dirty&&e.f.username.errors)),gs(1),la("hidden",e.f.username.disabled||e.f.username.valid||e.f.username.pristine),gs(6),la("ngClass",qc(12,o_,e.f.password.dirty&&e.f.password.errors)),gs(1),la("hidden",e.f.password.disabled||e.f.password.valid||e.f.password.pristine),gs(2),la("disabled",!e.loginForm.valid||e.submitted))},directives:[Ed,Jw,gw,tx,_d,Gb,pw,nx,rx],styles:["div[_ngcontent-%COMP%] .mx-auto[_ngcontent-%COMP%]{width:420px}"]}),t})(),l_=(()=>{class t{constructor(t,e){this.authService=t,this.router=e}canActivate(t,e){return!this.authService.currentSessionValue||(this.router.navigate(["/"]),!1)}}return t.\u0275fac=function(e){return new(e||t)(Yt(i_),Yt(mb))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),c_=(()=>{class t{constructor(t,e){this.router=t,this.authenticationService=e}canActivate(t,e){return!!this.authenticationService.currentSessionValue||(this.router.navigate(["/login"],{queryParams:{next:e.url}}),!1)}canActivateChild(t,e){return this.canActivate(t,e)}}return t.\u0275fac=function(e){return new(e||t)(Yt(mb),Yt(i_))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();class u_ extends h{constructor(t,e){super()}schedule(t,e=0){return this}}class h_ extends u_{constructor(t,e){super(t,e),this.scheduler=t,this.work=e,this.pending=!1}schedule(t,e=0){if(this.closed)return this;this.state=t;const n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(i,this.id,e),this}requestAsyncId(t,e,n=0){return setInterval(t.flush.bind(t,this),n)}recycleAsyncId(t,e,n=0){if(null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)}execute(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(t,e){let n,i=!1;try{this.work(t)}catch(r){i=!0,n=!!r&&r||new Error(r)}if(i)return this.unsubscribe(),n}_unsubscribe(){const t=this.id,e=this.scheduler,n=e.actions,i=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&n.splice(i,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null}}let d_=(()=>{class t{constructor(e,n=t.now){this.SchedulerAction=e,this.now=n}schedule(t,e=0,n){return new this.SchedulerAction(this,t).schedule(n,e)}}return t.now=()=>Date.now(),t})();class f_ extends d_{constructor(t,e=d_.now){super(t,()=>f_.delegate&&f_.delegate!==this?f_.delegate.now():e()),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(t,e=0,n){return f_.delegate&&f_.delegate!==this?f_.delegate.schedule(t,e,n):super.schedule(t,e,n)}flush(t){const{actions:e}=this;if(this.active)return void e.push(t);let n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}}const p_=new f_(h_);class g_{constructor(t,e,n,i){this.bufferTimeSpan=t,this.bufferCreationInterval=e,this.maxBufferSize=n,this.scheduler=i}call(t,e){return e.subscribe(new v_(t,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))}}class m_{constructor(){this.buffer=[]}}class v_ extends p{constructor(t,e,n,i,r){super(t),this.bufferTimeSpan=e,this.bufferCreationInterval=n,this.maxBufferSize=i,this.scheduler=r,this.contexts=[];const s=this.openContext();if(this.timespanOnly=null==n||n<0,this.timespanOnly)this.add(s.closeAction=r.schedule(y_,e,{subscriber:this,context:s,bufferTimeSpan:e}));else{const t={bufferTimeSpan:e,bufferCreationInterval:n,subscriber:this,scheduler:r};this.add(s.closeAction=r.schedule(w_,e,{subscriber:this,context:s})),this.add(r.schedule(b_,n,t))}}_next(t){const e=this.contexts,n=e.length;let i;for(let r=0;r0;){const n=t.shift();e.next(n.buffer)}super._complete()}_unsubscribe(){this.contexts=null}onBufferFull(t){this.closeContext(t);const e=t.closeAction;if(e.unsubscribe(),this.remove(e),!this.closed&&this.timespanOnly){t=this.openContext();const e=this.bufferTimeSpan;this.add(t.closeAction=this.scheduler.schedule(y_,e,{subscriber:this,context:t,bufferTimeSpan:e}))}}openContext(){const t=new m_;return this.contexts.push(t),t}closeContext(t){this.destination.next(t.buffer);const e=this.contexts;(e?e.indexOf(t):-1)>=0&&e.splice(e.indexOf(t),1)}}function y_(t){const e=t.subscriber,n=t.context;n&&e.closeContext(n),e.closed||(t.context=e.openContext(),t.context.closeAction=this.schedule(t,t.bufferTimeSpan))}function b_(t){const{bufferCreationInterval:e,bufferTimeSpan:n,subscriber:i,scheduler:r}=t,s=i.openContext();i.closed||(i.add(s.closeAction=r.schedule(w_,n,{subscriber:i,context:s})),this.schedule(t,e))}function w_(t){const{subscriber:e,context:n}=t;e.closeContext(n)}class x_{constructor(t,e){this.compare=t,this.keySelector=e}call(t,e){return e.subscribe(new __(t,this.compare,this.keySelector))}}class __ extends p{constructor(t,e,n){super(t),this.keySelector=n,this.hasKey=!1,"function"==typeof e&&(this.compare=e)}compare(t,e){return t===e}_next(t){let e;try{const{keySelector:n}=this;e=n?n(t):t}catch(i){return this.destination.error(i)}let n=!1;if(this.hasKey)try{const{compare:t}=this;n=t(this.key,e)}catch(i){return this.destination.error(i)}else this.hasKey=!0;n||(this.key=e,this.destination.next(t))}}function C_(t){return!l(t)&&t-parseFloat(t)+1>=0}function S_(t=0,e,n){let i=-1;return C_(e)?i=Number(e)<1?1:Number(e):k(e)&&(n=e),k(n)||(n=p_),new y(e=>{const r=C_(t)?t:+t-n.now();return n.schedule(k_,r,{index:0,period:i,subscriber:e})})}function k_(t){const{index:e,period:n,subscriber:i}=t;if(i.next(e),!i.closed){if(-1===n)return i.complete();t.index=e+1,this.schedule(t,n)}}function E_(t,e,n,r){return i(n)&&(r=n,n=void 0),r?E_(t,e,n).pipe(E(t=>l(t)?r(...t):r(t))):new y(i=>{A_(t,e,function(t){i.next(arguments.length>1?Array.prototype.slice.call(arguments):t)},i,n)})}function A_(t,e,n,i,r){let s;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(t)){const i=t;t.addEventListener(e,n,r),s=()=>i.removeEventListener(e,n,r)}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(t)){const i=t;t.on(e,n),s=()=>i.off(e,n)}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(t)){const i=t;t.addListener(e,n),s=()=>i.removeListener(e,n)}else{if(!t||!t.length)throw new TypeError("Invalid event target");for(let s=0,o=t.length;se.lift(new F_(t))}class F_{constructor(t){this.notifier=t}call(t,e){const n=new M_(t),i=B(this.notifier,new N(n));return i&&!n.seenValue?(n.add(i),e.subscribe(n)):n}}class M_ extends P{constructor(t){super(t),this.seenValue=!1}notifyNext(){this.seenValue=!0,this.complete()}notifyComplete(){}}function L_(...t){return e=>{let n;return"function"==typeof t[t.length-1]&&(n=t.pop()),e.lift(new $_(t,n))}}class $_{constructor(t,e){this.observables=t,this.project=e}call(t,e){return e.subscribe(new O_(t,this.observables,this.project))}}class O_ extends tm{constructor(t,e,n){super(t),this.observables=e,this.project=n,this.toRespond=[];const i=e.length;this.values=new Array(i);for(let r=0;r0){const t=i.indexOf(n);-1!==t&&i.splice(t,1)}}notifyComplete(){}_next(t){if(0===this.toRespond.length){const e=[t,...this.values];this.project?this._tryProject(e):this.destination.next(e)}}_tryProject(t){let e;try{e=this.project.apply(this,t)}catch(n){return void this.destination.error(n)}this.destination.next(e)}}function I_(t,e){return new y(e?n=>e.schedule(N_,0,{error:t,subscriber:n}):e=>e.error(t))}function N_({error:t,subscriber:e}){e.error(t)}let P_=(()=>{class t{constructor(t,e,n){this.kind=t,this.value=e,this.error=n,this.hasValue="N"===t}observe(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}}do(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}}accept(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)}toObservable(){switch(this.kind){case"N":return Qg(this.value);case"E":return I_(this.error);case"C":return lm()}throw new Error("unexpected notification kind value")}static createNext(e){return void 0!==e?new t("N",e):t.undefinedValueNotification}static createError(e){return new t("E",void 0,e)}static createComplete(){return t.completeNotification}}return t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t})();function B_(t,e=p_){var n;const i=(n=t)instanceof Date&&!isNaN(+n)?+t-e.now():Math.abs(t);return t=>t.lift(new U_(i,e))}class U_{constructor(t,e){this.delay=t,this.scheduler=e}call(t,e){return e.subscribe(new V_(t,this.delay,this.scheduler))}}class V_ extends p{constructor(t,e,n){super(t),this.delay=e,this.scheduler=n,this.queue=[],this.active=!1,this.errored=!1}static dispatch(t){const e=t.source,n=e.queue,i=t.scheduler,r=t.destination;for(;n.length>0&&n[0].time-i.now()<=0;)n.shift().notification.observe(r);if(n.length>0){const e=Math.max(0,n[0].time-i.now());this.schedule(t,e)}else this.unsubscribe(),e.active=!1}_schedule(t){this.active=!0,this.destination.add(t.schedule(V_.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))}scheduleNotification(t){if(!0===this.errored)return;const e=this.scheduler,n=new H_(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}_next(t){this.scheduleNotification(P_.createNext(t))}_error(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()}_complete(){this.scheduleNotification(P_.createComplete()),this.unsubscribe()}}class H_{constructor(t,e){this.time=t,this.notification=e}}function j_(t,e){if(1&t){const t=ga();ua(0,"button",1),ya("click",function(){return pn(t),xa().closeHandler()}),ua(1,"span",2),qa(2,"\xd7"),ha(),ha()}}const z_=["*"],W_=["defaultDayTemplate"],G_=["content"];function K_(t,e){if(1&t&&da(0,"div",7),2&t){const t=e.currentMonth,n=e.selected,i=e.disabled,r=e.focused;la("date",e.date)("currentMonth",t)("selected",n)("disabled",i)("focused",r)}}function q_(t,e){if(1&t&&(ua(0,"div",12),qa(1),ha()),2&t){const t=xa().$implicit,e=xa(2);gs(1),Ja(" ",e.i18n.getMonthFullName(t.number,t.year)," ",e.i18n.getYearNumerals(t.year)," ")}}function Y_(t,e){if(1&t&&(ua(0,"div",9),ra(1,q_,2,2,"div",10),da(2,"ngb-datepicker-month",11),ha()),2&t){const t=e.$implicit,n=xa(2);gs(1),la("ngIf","none"===n.navigation||n.displayMonths>1&&"select"===n.navigation),gs(1),la("month",t.firstDate)}}function X_(t,e){1&t&&ra(0,Y_,3,2,"div",8),2&t&&la("ngForOf",xa().model.months)}function J_(t,e){if(1&t){const t=ga();ua(0,"ngb-datepicker-navigation",13),ya("navigate",function(e){return pn(t),xa().onNavigateEvent(e)})("select",function(e){return pn(t),xa().onNavigateDateSelect(e)}),ha()}if(2&t){const t=xa();la("date",t.model.firstDate)("months",t.model.months)("disabled",t.model.disabled)("showSelect","select"===t.model.navigation)("prevDisabled",t.model.prevDisabled)("nextDisabled",t.model.nextDisabled)("selectBoxes",t.model.selectBoxes)}}function Q_(t,e){}function Z_(t,e){}function tC(t,e){1&t&&da(0,"div",5)}function eC(t,e){if(1&t&&(ua(0,"div",6),qa(1),ha()),2&t){const t=e.$implicit,n=xa(2);gs(1),Xa(" ",n.i18n.getWeekdayShortName(t)," ")}}function nC(t,e){if(1&t&&(ua(0,"div",2),ra(1,tC,1,0,"div",3),ra(2,eC,2,1,"div",4),ha()),2&t){const t=xa();gs(1),la("ngIf",t.datepicker.showWeekNumbers),gs(1),la("ngForOf",t.viewModel.weekdays)}}function iC(t,e){if(1&t&&(ua(0,"div",11),qa(1),ha()),2&t){const t=xa(2).$implicit,e=xa();gs(1),Ya(e.i18n.getWeekNumerals(t.number))}}function rC(t,e){}function sC(t,e){if(1&t&&ra(0,rC,0,0,"ng-template",14),2&t){const t=xa().$implicit;la("ngTemplateOutlet",xa(3).datepicker.dayTemplate)("ngTemplateOutletContext",t.context)}}function oC(t,e){if(1&t){const t=ga();ua(0,"div",12),ya("click",function(n){pn(t);const i=e.$implicit;return xa(3).doSelect(i),n.preventDefault()}),ra(1,sC,1,2,"ng-template",13),ha()}if(2&t){const t=e.$implicit;Oa("disabled",t.context.disabled)("hidden",t.hidden)("ngb-dp-today",t.context.today),la("tabindex",t.tabindex),na("aria-label",t.ariaLabel),gs(1),la("ngIf",!t.hidden)}}function aC(t,e){if(1&t&&(ua(0,"div",8),ra(1,iC,2,1,"div",9),ra(2,oC,2,9,"div",10),ha()),2&t){const t=xa().$implicit,e=xa();gs(1),la("ngIf",e.datepicker.showWeekNumbers),gs(1),la("ngForOf",t.days)}}function lC(t,e){1&t&&ra(0,aC,3,2,"div",7),2&t&&la("ngIf",!e.$implicit.collapsed)}function cC(t,e){if(1&t){const t=ga();ua(0,"ngb-datepicker-navigation-select",7),ya("select",function(e){return pn(t),xa().select.emit(e)}),ha()}if(2&t){const t=xa();la("date",t.date)("disabled",t.disabled)("months",t.selectBoxes.months)("years",t.selectBoxes.years)}}function uC(t,e){1&t&&da(0,"div",0)}function hC(t,e){1&t&&da(0,"div",0)}function dC(t,e){if(1&t&&(ra(0,uC,1,0,"div",9),ua(1,"div",10),qa(2),ha(),ra(3,hC,1,0,"div",9)),2&t){const t=e.$implicit,n=e.index,i=xa(2);la("ngIf",n>0),gs(2),Ja(" ",i.i18n.getMonthFullName(t.number,t.year)," ",i.i18n.getYearNumerals(t.year)," "),gs(1),la("ngIf",n!==i.months.length-1)}}function fC(t,e){1&t&&ra(0,dC,4,4,"ng-template",8),2&t&&la("ngForOf",xa().months)}const pC=["ngbDatepickerDayView",""],gC=["month"],mC=["year"];function vC(t,e){if(1&t&&(ua(0,"option",5),qa(1),ha()),2&t){const t=e.$implicit,n=xa();la("value",t),na("aria-label",n.i18n.getMonthFullName(t,null==n.date?null:n.date.year)),gs(1),Ya(n.i18n.getMonthShortName(t,null==n.date?null:n.date.year))}}function yC(t,e){if(1&t&&(ua(0,"option",5),qa(1),ha()),2&t){const t=e.$implicit,n=xa();la("value",t),gs(1),Ya(n.i18n.getYearNumerals(t))}}const bC=["dialog"];function wC(t,e){1&t&&qa(0),2&t&&Ya(100===e.fill?"\u2605":"\u2606")}function xC(t,e){}function _C(t,e){if(1&t){const t=ga();ua(0,"span",2),qa(1),ha(),ua(2,"span",3),ya("mouseenter",function(){pn(t);const n=e.index;return xa().enter(n+1)})("click",function(){pn(t);const n=e.index;return xa().handleClick(n+1)}),ra(3,xC,0,0,"ng-template",4),ha()}if(2&t){const t=e.index,n=xa(),i=sa(1);gs(1),Xa("(",t=12)("ngIfElse",t)}}function OC(t,e){if(1&t&&(ua(0,"span"),qa(1),ha()),2&t){const t=xa().$implicit;Ia(xa().highlightClass),gs(1),Ya(t)}}function IC(t,e){1&t&&qa(0),2&t&&Ya(xa().$implicit)}function NC(t,e){if(1&t&&(ra(0,OC,2,3,"span",1),ra(1,IC,1,1,"ng-template",null,2,xu)),2&t){const t=e.odd,n=sa(2);la("ngIf",t)("ngIfElse",n)}}function PC(t,e){if(1&t&&da(0,"ngb-highlight",2),2&t){const t=e.term;la("result",(0,e.formatter)(e.result))("term",t)}}function BC(t,e){}const UC=function(t,e,n){return{result:t,term:e,formatter:n}};function VC(t,e){if(1&t){const t=ga();ua(0,"button",3),ya("mouseenter",function(){pn(t);const n=e.index;return xa().markActive(n)})("click",function(){pn(t);const n=e.$implicit;return xa().select(n)}),ra(1,BC,0,0,"ng-template",4),ha()}if(2&t){const t=e.$implicit,n=e.index,i=xa(),r=sa(1);Oa("active",n===i.activeIdx),la("id",i.id+"-"+n),gs(1),la("ngTemplateOutlet",i.resultTemplate||r)("ngTemplateOutletContext",Xc(5,UC,t,i.term,i.formatter))}}function HC(t){return parseInt(`${t}`,10)}function jC(t){return null!=t?`${t}`:""}function zC(t){return"string"==typeof t}function WC(t){return!isNaN(HC(t))}function GC(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}function KC(t){return null!=t}function qC(t){return WC(t)?`0${t}`.slice(-2):""}function YC(t,e){return t&&t.className&&t.className.split&&t.className.split(/\s+/).indexOf(e)>=0}"undefined"==typeof Element||Element.prototype.closest||(Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest=function(t){let e=this;if(!document.documentElement.contains(e))return null;do{if(e.matches(t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null});let XC=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[Fd]]}),t})(),JC=(()=>{let t=class{constructor(){this.dismissible=!0,this.type="warning"}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:function(){return new t},token:t,providedIn:"root"}),t})(),QC=(()=>{let t=class{constructor(t,e,n){this._renderer=e,this._element=n,this.close=new Zc,this.dismissible=t.dismissible,this.type=t.type}closeHandler(){this.close.emit()}ngOnChanges(t){const e=t.type;e&&!e.firstChange&&(this._renderer.removeClass(this._element.nativeElement,`alert-${e.previousValue}`),this._renderer.addClass(this._element.nativeElement,`alert-${e.currentValue}`))}ngOnInit(){this._renderer.addClass(this._element.nativeElement,`alert-${this.type}`)}};return t.\u0275fac=function(e){return new(e||t)(oa(JC),oa(pc),oa(uc))},t.\u0275cmp=pe({type:t,selectors:[["ngb-alert"]],hostAttrs:["role","alert",1,"alert"],hostVars:2,hostBindings:function(t,e){2&t&&Oa("alert-dismissible",e.dismissible)},inputs:{dismissible:"dismissible",type:"type"},outputs:{close:"close"},features:[Ve],ngContentSelectors:z_,decls:2,vars:1,consts:function(){let t,e;return t=$localize`:@@ngb.alert.close␟f4e529ae5ffd73001d1ff4bbdeeb0a72e342e5c8␟7819314041543176992:Close`,e=$localize`:@@ngb.alert.close␟f4e529ae5ffd73001d1ff4bbdeeb0a72e342e5c8␟7819314041543176992:Close`,[["type","button","class","close","aria-label",t,3,"click",4,"ngIf"],["type","button","aria-label",e,1,"close",3,"click"],["aria-hidden","true"]]},template:function(t,e){1&t&&(Ca(),Sa(0),ra(1,j_,3,0,"button",0)),2&t&&(gs(1),la("ngIf",e.dismissible))},directives:[Ed],styles:["ngb-alert{display:block}"],encapsulation:2,changeDetection:0}),t})(),ZC=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[Fd]]}),t})(),tS=(()=>{let t=class{};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=we({type:t,selectors:[["","ngbButtonLabel",""]],hostVars:8,hostBindings:function(t,e){2&t&&Oa("btn",!0)("active",e.active)("disabled",e.disabled)("focus",e.focused)}}),t})();const eS={provide:Vb,useExisting:_t(()=>nS),multi:!0};let nS=(()=>{let t=class{constructor(t,e){this._label=t,this._cd=e,this.disabled=!1,this.valueChecked=!0,this.valueUnChecked=!1,this.onChange=t=>{},this.onTouched=()=>{}}set focused(t){this._label.focused=t,t||this.onTouched()}onInputChange(t){const e=t.target.checked?this.valueChecked:this.valueUnChecked;this.onChange(e),this.onTouched(),this.writeValue(e)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t,this._label.disabled=t}writeValue(t){this.checked=t===this.valueChecked,this._label.active=this.checked,this._cd.markForCheck()}};return t.\u0275fac=function(e){return new(e||t)(oa(tS),oa(_o))},t.\u0275dir=we({type:t,selectors:[["","ngbButton","","type","checkbox"]],hostVars:2,hostBindings:function(t,e){1&t&&ya("change",function(t){return e.onInputChange(t)})("focus",function(){return e.focused=!0})("blur",function(){return e.focused=!1}),2&t&&Qa("checked",e.checked)("disabled",e.disabled)},inputs:{disabled:"disabled",valueChecked:"valueChecked",valueUnChecked:"valueUnChecked"},features:[oc([eS])]}),t})();const iS={provide:Vb,useExisting:_t(()=>sS),multi:!0};let rS=0,sS=(()=>{let t=class{constructor(){this._radios=new Set,this._value=null,this.name="ngb-radio-"+rS++,this.onChange=t=>{},this.onTouched=()=>{}}get disabled(){return this._disabled}set disabled(t){this.setDisabledState(t)}onRadioChange(t){this.writeValue(t.value),this.onChange(t.value)}onRadioValueUpdate(){this._updateRadiosValue()}register(t){this._radios.add(t)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._disabled=t,this._updateRadiosDisabled()}unregister(t){this._radios.delete(t)}writeValue(t){this._value=t,this._updateRadiosValue()}_updateRadiosValue(){this._radios.forEach(t=>t.updateValue(this._value))}_updateRadiosDisabled(){this._radios.forEach(t=>t.updateDisabled())}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=we({type:t,selectors:[["","ngbRadioGroup",""]],hostAttrs:["role","radiogroup"],inputs:{name:"name"},features:[oc([iS])]}),t})(),oS=(()=>{let t=class{constructor(t,e,n,i,r){this._group=t,this._label=e,this._renderer=n,this._element=i,this._cd=r,this._value=null,this._group.register(this),this.updateDisabled()}set value(t){this._value=t;const e=t?t.toString():"";this._renderer.setProperty(this._element.nativeElement,"value",e),this._group.onRadioValueUpdate()}set disabled(t){this._disabled=!1!==t,this.updateDisabled()}set focused(t){this._label&&(this._label.focused=t),t||this._group.onTouched()}get checked(){return this._checked}get disabled(){return this._group.disabled||this._disabled}get value(){return this._value}get nameAttr(){return this.name||this._group.name}ngOnDestroy(){this._group.unregister(this)}onChange(){this._group.onRadioChange(this)}updateValue(t){this.value!==t&&this._cd.markForCheck(),this._checked=this.value===t,this._label.active=this._checked}updateDisabled(){this._label.disabled=this.disabled}};return t.\u0275fac=function(e){return new(e||t)(oa(sS),oa(tS),oa(pc),oa(uc),oa(_o))},t.\u0275dir=we({type:t,selectors:[["","ngbButton","","type","radio"]],hostVars:3,hostBindings:function(t,e){1&t&&ya("change",function(){return e.onChange()})("focus",function(){return e.focused=!0})("blur",function(){return e.focused=!1}),2&t&&Qa("checked",e.checked)("disabled",e.disabled)("name",e.nameAttr)},inputs:{value:"value",disabled:"disabled",name:"name"}}),t})(),aS=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)}}),t})(),lS=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[Fd]]}),t})(),cS=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)}}),t})();class uS{constructor(t,e,n){this.year=GC(t)?t:null,this.month=GC(e)?e:null,this.day=GC(n)?n:null}static from(t){return t instanceof uS?t:t?new uS(t.year,t.month,t.day):null}equals(t){return null!=t&&this.year===t.year&&this.month===t.month&&this.day===t.day}before(t){return!!t&&(this.year===t.year?this.month===t.month?this.day!==t.day&&this.dayt.day:this.month>t.month:this.year>t.year)}}function hS(t){return new uS(t.getFullYear(),t.getMonth()+1,t.getDate())}function dS(t){const e=new Date(t.year,t.month-1,t.day,12);return isNaN(e.getTime())||e.setFullYear(t.year),e}function fS(){return new gS}let pS=(()=>{let t=class{};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:fS,token:t,providedIn:"root"}),t})(),gS=(()=>{let t=class extends pS{getDaysPerWeek(){return 7}getMonths(){return[1,2,3,4,5,6,7,8,9,10,11,12]}getWeeksPerMonth(){return 6}getNext(t,e="d",n=1){let i=dS(t),r=!0,s=i.getMonth();switch(e){case"y":i.setFullYear(i.getFullYear()+n);break;case"m":s+=n,i.setMonth(s),s%=12,s<0&&(s+=12);break;case"d":i.setDate(i.getDate()+n),r=!1;break;default:return t}return r&&i.getMonth()!==s&&i.setDate(0),hS(i)}getPrev(t,e="d",n=1){return this.getNext(t,e,-n)}getWeekday(t){let e=dS(t).getDay();return 0===e?7:e}getWeekNumber(t,e){7===e&&(e=0);const n=dS(t[(11-e)%7]);n.setDate(n.getDate()+4-(n.getDay()||7));const i=n.getTime();return n.setMonth(0),n.setDate(1),Math.floor(Math.round((i-n.getTime())/864e5)/7)+1}getToday(){return hS(new Date)}isValid(t){if(!(t&&GC(t.year)&&GC(t.month)&&GC(t.day)))return!1;if(0===t.year)return!1;const e=dS(t);return!isNaN(e.getTime())&&e.getFullYear()===t.year&&e.getMonth()+1===t.month&&e.getDate()===t.day}};return t.\u0275fac=function(e){return uE(e||t)},t.\u0275prov=ut({token:t,factory:function(e){return t.\u0275fac(e)}}),t})();function mS(t,e){return!function(t,e){return!t&&!e||!!t&&!!e&&t.equals(e)}(t,e)}function vS(t,e){return!(!t&&!e||t&&e&&t.year===e.year&&t.month===e.month)}function yS(t,e,n){return t&&e&&t.before(e)?e:t&&n&&t.after(n)?n:t||null}function bS(t,e){const{minDate:n,maxDate:i,disabled:r,markDisabled:s}=e;return!(null==t||r||s&&s(t,{year:t.year,month:t.month})||n&&t.before(n)||i&&t.after(i))}let wS=(()=>{let t=class{getDayNumerals(t){return`${t.day}`}getWeekNumerals(t){return`${t}`}getYearNumerals(t){return`${t}`}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:function(){return t=Yt(Fu),new xS(t);var t},token:t,providedIn:"root"}),t})(),xS=(()=>{let t=class extends wS{constructor(t){super(),this._locale=t;const e=zh(t,Bh.Standalone,Uh.Short);this._weekdaysShort=e.map((t,n)=>e[(n+1)%7]),this._monthsShort=Wh(t,Bh.Standalone,Uh.Abbreviated),this._monthsFull=Wh(t,Bh.Standalone,Uh.Wide)}getWeekdayShortName(t){return this._weekdaysShort[t-1]||""}getMonthShortName(t){return this._monthsShort[t-1]||""}getMonthFullName(t){return this._monthsFull[t-1]||""}getDayAriaLabel(t){return od(new Date(t.year,t.month-1,t.day),"fullDate",this._locale)}};return t.\u0275fac=function(e){return new(e||t)(Yt(Fu))},t.\u0275prov=ut({token:t,factory:function(e){return t.\u0275fac(e)}}),t=cx([ux(0,nt(Fu))],t),t})(),_S=(()=>{let t=class{constructor(t,e){this._calendar=t,this._i18n=e,this._VALIDATORS={dayTemplateData:t=>{if(this._state.dayTemplateData!==t)return{dayTemplateData:t}},displayMonths:t=>{if(GC(t=HC(t))&&t>0&&this._state.displayMonths!==t)return{displayMonths:t}},disabled:t=>{if(this._state.disabled!==t)return{disabled:t}},firstDayOfWeek:t=>{if(GC(t=HC(t))&&t>=0&&this._state.firstDayOfWeek!==t)return{firstDayOfWeek:t}},focusVisible:t=>{if(this._state.focusVisible!==t&&!this._state.disabled)return{focusVisible:t}},markDisabled:t=>{if(this._state.markDisabled!==t)return{markDisabled:t}},maxDate:t=>{const e=this.toValidDate(t,null);if(mS(this._state.maxDate,e))return{maxDate:e}},minDate:t=>{const e=this.toValidDate(t,null);if(mS(this._state.minDate,e))return{minDate:e}},navigation:t=>{if(this._state.navigation!==t)return{navigation:t}},outsideDays:t=>{if(this._state.outsideDays!==t)return{outsideDays:t}}},this._model$=new C,this._dateSelect$=new C,this._state={dayTemplateData:null,markDisabled:null,maxDate:null,minDate:null,disabled:!1,displayMonths:1,firstDate:null,firstDayOfWeek:1,lastDate:null,focusDate:null,focusVisible:!1,months:[],navigation:"select",outsideDays:"visible",prevDisabled:!1,nextDisabled:!1,selectedDate:null,selectBoxes:{years:[],months:[]}}}get model$(){return this._model$.pipe(hm(t=>t.months.length>0))}get dateSelect$(){return this._dateSelect$.pipe(hm(t=>null!==t))}set(t){let e=Object.keys(t).map(e=>this._VALIDATORS[e](t[e])).reduce((t,e)=>Object.assign(Object.assign({},t),e),{});Object.keys(e).length>0&&this._nextState(e)}focus(t){const e=this.toValidDate(t,null);null!=e&&!this._state.disabled&&mS(this._state.focusDate,e)&&this._nextState({focusDate:t})}focusSelect(){bS(this._state.focusDate,this._state)&&this.select(this._state.focusDate,{emitEvent:!0})}open(t){const e=this.toValidDate(t,this._calendar.getToday());null==e||this._state.disabled||this._state.firstDate&&!vS(this._state.firstDate,e)||this._nextState({firstDate:e})}select(t,e={}){const n=this.toValidDate(t,null);null==n||this._state.disabled||(mS(this._state.selectedDate,n)&&this._nextState({selectedDate:n}),e.emitEvent&&bS(n,this._state)&&this._dateSelect$.next(n))}toValidDate(t,e){const n=uS.from(t);return void 0===e&&(e=this._calendar.getToday()),this._calendar.isValid(n)?n:e}getMonth(t){for(let e of this._state.months)if(t.month===e.number&&t.year===e.year)return e;throw new Error(`month ${t.month} of year ${t.year} not found`)}_nextState(t){const e=this._updateState(t);this._patchContexts(e),this._state=e,this._model$.next(this._state)}_patchContexts(t){const{months:e,displayMonths:n,selectedDate:i,focusDate:r,focusVisible:s,disabled:o,outsideDays:a}=t;t.months.forEach(t=>{t.weeks.forEach(l=>{l.days.forEach(l=>{r&&(l.context.focused=r.equals(l.date)&&s),l.tabindex=!o&&r&&l.date.equals(r)&&r.month===t.number?0:-1,!0===o&&(l.context.disabled=!0),void 0!==i&&(l.context.selected=null!==i&&i.equals(l.date)),t.number!==l.date.month&&(l.hidden="hidden"===a||"collapsed"===a||n>1&&l.date.after(e[0].firstDate)&&l.date.before(e[n-1].lastDate))})})})}_updateState(t){const e=Object.assign({},this._state,t);let n=e.firstDate;if(("minDate"in t||"maxDate"in t)&&(function(t,e){if(e&&t&&e.before(t))throw new Error(`'maxDate' ${e} should be greater than 'minDate' ${t}`)}(e.minDate,e.maxDate),e.focusDate=yS(e.focusDate,e.minDate,e.maxDate),e.firstDate=yS(e.firstDate,e.minDate,e.maxDate),n=e.focusDate),"disabled"in t&&(e.focusVisible=!1),"selectedDate"in t&&0===this._state.months.length&&(n=e.selectedDate),"focusVisible"in t)return e;if("focusDate"in t&&(e.focusDate=yS(e.focusDate,e.minDate,e.maxDate),n=e.focusDate,0!==e.months.length&&e.focusDate&&!e.focusDate.before(e.firstDate)&&!e.focusDate.after(e.lastDate)))return e;if("firstDate"in t&&(e.firstDate=yS(e.firstDate,e.minDate,e.maxDate),n=e.firstDate),n){const i=function(t,e,n,i,r){const{displayMonths:s,months:o}=n,a=o.splice(0,o.length);return Array.from({length:s},(n,i)=>{const s=Object.assign(t.getNext(e,"m",i),{day:1});if(o[i]=null,!r){const t=a.findIndex(t=>t.firstDate.equals(s));-1!==t&&(o[i]=a.splice(t,1)[0])}return s}).forEach((e,r)=>{null===o[r]&&(o[r]=function(t,e,n,i,r={}){const{dayTemplateData:s,minDate:o,maxDate:a,firstDayOfWeek:l,markDisabled:c,outsideDays:u}=n,h=t.getToday();r.firstDate=null,r.lastDate=null,r.number=e.month,r.year=e.year,r.weeks=r.weeks||[],r.weekdays=r.weekdays||[],e=function(t,e,n){const i=t.getDaysPerWeek(),r=new uS(e.year,e.month,1),s=t.getWeekday(r)%i;return t.getPrev(r,"d",(i+s-n)%i)}(t,e,l);for(let d=0;dt.date),l),n.collapsed="collapsed"===u&&f[0].date.month!==r.number&&f[f.length-1].date.month!==r.number}return r}(t,e,n,i,a.shift()||{}))}),o}(this._calendar,n,e,this._i18n,"dayTemplateData"in t||"firstDayOfWeek"in t||"markDisabled"in t||"minDate"in t||"maxDate"in t||"disabled"in t||"outsideDays"in t);e.months=i,e.firstDate=i[0].firstDate,e.lastDate=i[i.length-1].lastDate,"selectedDate"in t&&!bS(e.selectedDate,e)&&(e.selectedDate=null),"firstDate"in t&&(!e.focusDate||e.focusDate.before(e.firstDate)||e.focusDate.after(e.lastDate))&&(e.focusDate=n);const r=!this._state.firstDate||this._state.firstDate.year!==e.firstDate.year,s=!this._state.firstDate||this._state.firstDate.month!==e.firstDate.month;"select"===e.navigation?(("minDate"in t||"maxDate"in t||0===e.selectBoxes.years.length||r)&&(e.selectBoxes.years=function(t,e,n){if(!t)return[];const i=e?Math.max(e.year,t.year-500):t.year-10,r=(n?Math.min(n.year,t.year+500):t.year+10)-i+1,s=Array(r);for(let o=0;ot===n.month);r=r.slice(t)}if(i&&e.year===i.year){const t=r.findIndex(t=>t===i.month);r=r.slice(0,t+1)}return r}(this._calendar,e.firstDate,e.minDate,e.maxDate))):e.selectBoxes={years:[],months:[]},"arrows"!==e.navigation&&"select"!==e.navigation||!(s||r||"minDate"in t||"maxDate"in t||"disabled"in t)||(e.prevDisabled=e.disabled||function(t,e,n){const i=Object.assign(t.getPrev(e,"m"),{day:1});return null!=n&&(i.year===n.year&&i.month{let t=class{constructor(){this.displayMonths=1,this.firstDayOfWeek=1,this.navigation="select",this.outsideDays="visible",this.showWeekdays=!0,this.showWeekNumbers=!1}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:function(){return new t},token:t,providedIn:"root"}),t})();function kS(){return new AS}let ES=(()=>{let t=class{};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:kS,token:t,providedIn:"root"}),t})(),AS=(()=>{let t=class extends ES{fromModel(t){return t&&GC(t.year)&&GC(t.month)&&GC(t.day)?{year:t.year,month:t.month,day:t.day}:null}toModel(t){return t&&GC(t.year)&&GC(t.month)&&GC(t.day)?{year:t.year,month:t.month,day:t.day}:null}};return t.\u0275fac=function(e){return hE(e||t)},t.\u0275prov=ut({token:t,factory:function(e){return t.\u0275fac(e)}}),t})();const DS={provide:Vb,useExisting:_t(()=>RS),multi:!0};let TS=(()=>{let t=class{constructor(t){this.templateRef=t}};return t.\u0275fac=function(e){return new(e||t)(oa($c))},t.\u0275dir=we({type:t,selectors:[["ng-template","ngbDatepickerContent",""]]}),t})(),RS=(()=>{let t=class{constructor(t,e,n,i,r,s,o,a){this._service=t,this._calendar=e,this.i18n=n,this._elementRef=s,this._ngbDateAdapter=o,this._ngZone=a,this._controlValue=null,this._destroyed$=new C,this._publicState={},this.navigate=new Zc,this.dateSelect=new Zc,this.select=this.dateSelect,this.onChange=t=>{},this.onTouched=()=>{},["dayTemplate","dayTemplateData","displayMonths","firstDayOfWeek","footerTemplate","markDisabled","minDate","maxDate","navigation","outsideDays","showWeekdays","showWeekNumbers","startDate"].forEach(t=>this[t]=i[t]),t.dateSelect$.pipe(R_(this._destroyed$)).subscribe(t=>{this.dateSelect.emit(t)}),t.model$.pipe(R_(this._destroyed$)).subscribe(t=>{const e=t.firstDate,n=this.model?this.model.firstDate:null;this._publicState={maxDate:t.maxDate,minDate:t.minDate,firstDate:t.firstDate,lastDate:t.lastDate,focusedDate:t.focusDate,months:t.months.map(t=>t.firstDate)};let i=!1;if(!e.equals(n)&&(this.navigate.emit({current:n?{year:n.year,month:n.month}:null,next:{year:e.year,month:e.month},preventDefault:()=>i=!0}),i&&null!==n))return void this._service.open(n);const s=t.selectedDate,o=t.focusDate,a=this.model?this.model.focusDate:null;this.model=t,mS(s,this._controlValue)&&(this._controlValue=s,this.onTouched(),this.onChange(this._ngbDateAdapter.toModel(s))),mS(o,a)&&a&&t.focusVisible&&this.focus(),r.markForCheck()})}get state(){return this._publicState}get calendar(){return this._calendar}focusDate(t){this._service.focus(uS.from(t))}focusSelect(){this._service.focusSelect()}focus(){this._ngZone.onStable.asObservable().pipe(Dm(1)).subscribe(()=>{const t=this._elementRef.nativeElement.querySelector('div.ngb-dp-day[tabindex="0"]');t&&t.focus()})}navigateTo(t){this._service.open(uS.from(t?t.day?t:Object.assign(Object.assign({},t),{day:1}):null))}ngAfterViewInit(){this._ngZone.runOutsideAngular(()=>{const t=E_(this._contentEl.nativeElement,"focusin"),e=E_(this._contentEl.nativeElement,"focusout"),{nativeElement:n}=this._elementRef;W(t,e).pipe(hm(({target:t,relatedTarget:e})=>!(YC(t,"ngb-dp-day")&&YC(e,"ngb-dp-day")&&n.contains(t)&&n.contains(e))),R_(this._destroyed$)).subscribe(({type:t})=>this._ngZone.run(()=>this._service.set({focusVisible:"focusin"===t})))})}ngOnDestroy(){this._destroyed$.next()}ngOnInit(){if(void 0===this.model){const t={};["dayTemplateData","displayMonths","markDisabled","firstDayOfWeek","navigation","minDate","maxDate","outsideDays"].forEach(e=>t[e]=this[e]),this._service.set(t),this.navigateTo(this.startDate)}this.dayTemplate||(this.dayTemplate=this._defaultDayTemplate)}ngOnChanges(t){const e={};if(["dayTemplateData","displayMonths","markDisabled","firstDayOfWeek","navigation","minDate","maxDate","outsideDays"].filter(e=>e in t).forEach(t=>e[t]=this[t]),this._service.set(e),"startDate"in t){const{currentValue:e,previousValue:n}=t.startDate;vS(n,e)&&this.navigateTo(this.startDate)}}onDateSelect(t){this._service.focus(t),this._service.select(t,{emitEvent:!0})}onNavigateDateSelect(t){this._service.open(t)}onNavigateEvent(t){switch(t){case CS.PREV:this._service.open(this._calendar.getPrev(this.model.firstDate,"m",1));break;case CS.NEXT:this._service.open(this._calendar.getNext(this.model.firstDate,"m",1))}}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this._service.set({disabled:t})}writeValue(t){this._controlValue=uS.from(this._ngbDateAdapter.fromModel(t)),this._service.select(this._controlValue)}};return t.\u0275fac=function(e){return new(e||t)(oa(_S),oa(pS),oa(wS),oa(SS),oa(_o),oa(uc),oa(ES),oa(ju))},t.\u0275cmp=pe({type:t,selectors:[["ngb-datepicker"]],contentQueries:function(t,e,n){if(1&t&&(i=n,r=TS,!0,mu(fn(),dn(),r,true,undefined,!0,gn(),i)),2&t){let t;hu(t=vu())&&(e.contentTemplate=t.first)}var i,r},viewQuery:function(t,e){if(1&t&&(du(W_,!0),du(G_,!0)),2&t){let t;hu(t=vu())&&(e._defaultDayTemplate=t.first),hu(t=vu())&&(e._contentEl=t.first)}},inputs:{dayTemplate:"dayTemplate",dayTemplateData:"dayTemplateData",displayMonths:"displayMonths",firstDayOfWeek:"firstDayOfWeek",footerTemplate:"footerTemplate",markDisabled:"markDisabled",maxDate:"maxDate",minDate:"minDate",navigation:"navigation",outsideDays:"outsideDays",showWeekdays:"showWeekdays",showWeekNumbers:"showWeekNumbers",startDate:"startDate"},outputs:{navigate:"navigate",dateSelect:"dateSelect",select:"select"},exportAs:["ngbDatepicker"],features:[oc([DS,_S]),Ve],decls:10,vars:5,consts:[["defaultDayTemplate",""],["defaultContentTemplate",""],[1,"ngb-dp-header"],[3,"date","months","disabled","showSelect","prevDisabled","nextDisabled","selectBoxes","navigate","select",4,"ngIf"],[1,"ngb-dp-content"],["content",""],[3,"ngTemplateOutlet"],["ngbDatepickerDayView","",3,"date","currentMonth","selected","disabled","focused"],["class","ngb-dp-month",4,"ngFor","ngForOf"],[1,"ngb-dp-month"],["class","ngb-dp-month-name",4,"ngIf"],[3,"month"],[1,"ngb-dp-month-name"],[3,"date","months","disabled","showSelect","prevDisabled","nextDisabled","selectBoxes","navigate","select"]],template:function(t,e){if(1&t&&(ra(0,K_,1,5,"ng-template",null,0,xu),ra(2,X_,1,1,"ng-template",null,1,xu),ua(4,"div",2),ra(5,J_,1,7,"ngb-datepicker-navigation",3),ha(),ua(6,"div",4,5),ra(8,Q_,0,0,"ng-template",6),ha(),ra(9,Z_,0,0,"ng-template",6)),2&t){const t=sa(3);gs(5),la("ngIf","none"!==e.navigation),gs(1),Oa("ngb-dp-months",!e.contentTemplate),gs(2),la("ngTemplateOutlet",(null==e.contentTemplate?null:e.contentTemplate.templateRef)||t),gs(1),la("ngTemplateOutlet",e.footerTemplate)}},directives:function(){return[Ed,Rd,QS,Sd,LS,$S]},styles:["ngb-datepicker{border:1px solid #dfdfdf;border-radius:.25rem;display:inline-block}ngb-datepicker-month{pointer-events:auto}ngb-datepicker.dropdown-menu{padding:0}.ngb-dp-body{z-index:1050}.ngb-dp-header{border-bottom:0;border-radius:.25rem .25rem 0 0;padding-top:.25rem;background-color:#f8f9fa;background-color:var(--light)}.ngb-dp-months{display:-ms-flexbox;display:flex}.ngb-dp-month{pointer-events:none}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center;background-color:#f8f9fa;background-color:var(--light)}.ngb-dp-month+.ngb-dp-month .ngb-dp-month-name,.ngb-dp-month+.ngb-dp-month .ngb-dp-week{padding-left:1rem}.ngb-dp-month:last-child .ngb-dp-week{padding-right:.25rem}.ngb-dp-month:first-child .ngb-dp-week{padding-left:.25rem}.ngb-dp-month .ngb-dp-week:last-child{padding-bottom:.25rem}"],encapsulation:2,changeDetection:0}),t})();var FS=function(t){return t[t.Tab=9]="Tab",t[t.Enter=13]="Enter",t[t.Escape=27]="Escape",t[t.Space=32]="Space",t[t.PageUp=33]="PageUp",t[t.PageDown=34]="PageDown",t[t.End=35]="End",t[t.Home=36]="Home",t[t.ArrowLeft=37]="ArrowLeft",t[t.ArrowUp=38]="ArrowUp",t[t.ArrowRight=39]="ArrowRight",t[t.ArrowDown=40]="ArrowDown",t}({});let MS=(()=>{let t=class{processKey(t,e){const{state:n,calendar:i}=e;switch(t.which){case FS.PageUp:e.focusDate(i.getPrev(n.focusedDate,t.shiftKey?"y":"m",1));break;case FS.PageDown:e.focusDate(i.getNext(n.focusedDate,t.shiftKey?"y":"m",1));break;case FS.End:e.focusDate(t.shiftKey?n.maxDate:n.lastDate);break;case FS.Home:e.focusDate(t.shiftKey?n.minDate:n.firstDate);break;case FS.ArrowLeft:e.focusDate(i.getPrev(n.focusedDate,"d",1));break;case FS.ArrowUp:e.focusDate(i.getPrev(n.focusedDate,"d",i.getDaysPerWeek()));break;case FS.ArrowRight:e.focusDate(i.getNext(n.focusedDate,"d",1));break;case FS.ArrowDown:e.focusDate(i.getNext(n.focusedDate,"d",i.getDaysPerWeek()));break;case FS.Enter:case FS.Space:e.focusSelect();break;default:return}t.preventDefault(),t.stopPropagation()}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:function(){return new t},token:t,providedIn:"root"}),t})(),LS=(()=>{let t=class{constructor(t,e,n,i){this.i18n=t,this.datepicker=e,this._keyboardService=n,this._service=i}set month(t){this.viewModel=this._service.getMonth(t)}onKeyDown(t){this._keyboardService.processKey(t,this.datepicker)}doSelect(t){t.context.disabled||t.hidden||this.datepicker.onDateSelect(t.date)}};return t.\u0275fac=function(e){return new(e||t)(oa(wS),oa(RS),oa(MS),oa(_S))},t.\u0275cmp=pe({type:t,selectors:[["ngb-datepicker-month"]],hostAttrs:["role","grid"],hostBindings:function(t,e){1&t&&ya("keydown",function(t){return e.onKeyDown(t)})},inputs:{month:"month"},decls:2,vars:2,consts:[["class","ngb-dp-week ngb-dp-weekdays","role","row",4,"ngIf"],["ngFor","",3,"ngForOf"],["role","row",1,"ngb-dp-week","ngb-dp-weekdays"],["class","ngb-dp-weekday ngb-dp-showweek",4,"ngIf"],["class","ngb-dp-weekday small","role","columnheader",4,"ngFor","ngForOf"],[1,"ngb-dp-weekday","ngb-dp-showweek"],["role","columnheader",1,"ngb-dp-weekday","small"],["class","ngb-dp-week","role","row",4,"ngIf"],["role","row",1,"ngb-dp-week"],["class","ngb-dp-week-number small text-muted",4,"ngIf"],["class","ngb-dp-day","role","gridcell",3,"disabled","tabindex","hidden","ngb-dp-today","click",4,"ngFor","ngForOf"],[1,"ngb-dp-week-number","small","text-muted"],["role","gridcell",1,"ngb-dp-day",3,"tabindex","click"],[3,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(t,e){1&t&&(ra(0,nC,3,2,"div",0),ra(1,lC,1,1,"ng-template",1)),2&t&&(la("ngIf",e.datepicker.showWeekdays),gs(1),la("ngForOf",e.viewModel.weeks))},directives:[Ed,Sd,Rd],styles:['ngb-datepicker-month{display:block}.ngb-dp-week-number,.ngb-dp-weekday{line-height:2rem;text-align:center;font-style:italic}.ngb-dp-weekday{color:#5bc0de;color:var(--info)}.ngb-dp-week{border-radius:.25rem;display:-ms-flexbox;display:flex}.ngb-dp-weekdays{border-bottom:1px solid rgba(0,0,0,.125);border-radius:0;background-color:#f8f9fa;background-color:var(--light)}.ngb-dp-day,.ngb-dp-week-number,.ngb-dp-weekday{width:2rem;height:2rem}.ngb-dp-day{cursor:pointer}.ngb-dp-day.disabled,.ngb-dp-day.hidden{cursor:default;pointer-events:none}.ngb-dp-day[tabindex="0"]{z-index:1}'],encapsulation:2}),t})(),$S=(()=>{let t=class{constructor(t){this.i18n=t,this.navigation=CS,this.months=[],this.navigate=new Zc,this.select=new Zc}onClickPrev(t){t.currentTarget.focus(),this.navigate.emit(this.navigation.PREV)}onClickNext(t){t.currentTarget.focus(),this.navigate.emit(this.navigation.NEXT)}};return t.\u0275fac=function(e){return new(e||t)(oa(wS))},t.\u0275cmp=pe({type:t,selectors:[["ngb-datepicker-navigation"]],inputs:{months:"months",date:"date",disabled:"disabled",showSelect:"showSelect",prevDisabled:"prevDisabled",nextDisabled:"nextDisabled",selectBoxes:"selectBoxes"},outputs:{navigate:"navigate",select:"select"},decls:8,vars:4,consts:function(){let t,e,n,i;return t=$localize`:@@ngb.datepicker.previous-month␟c3b08b07b5ab98e7cdcf18df39355690ab7d3884␟8586908745456864217:Previous month`,e=$localize`:@@ngb.datepicker.previous-month␟c3b08b07b5ab98e7cdcf18df39355690ab7d3884␟8586908745456864217:Previous month`,n=$localize`:@@ngb.datepicker.next-month␟4bd046985cfe13040d5ef0cd881edce0968a111a␟3628374603023447227:Next month`,i=$localize`:@@ngb.datepicker.next-month␟4bd046985cfe13040d5ef0cd881edce0968a111a␟3628374603023447227:Next month`,[[1,"ngb-dp-arrow"],["type","button","aria-label",t,"title",e,1,"btn","btn-link","ngb-dp-arrow-btn",3,"disabled","click"],[1,"ngb-dp-navigation-chevron"],["class","ngb-dp-navigation-select",3,"date","disabled","months","years","select",4,"ngIf"],[4,"ngIf"],[1,"ngb-dp-arrow","right"],["type","button","aria-label",n,"title",i,1,"btn","btn-link","ngb-dp-arrow-btn",3,"disabled","click"],[1,"ngb-dp-navigation-select",3,"date","disabled","months","years","select"],["ngFor","",3,"ngForOf"],["class","ngb-dp-arrow",4,"ngIf"],[1,"ngb-dp-month-name"]]},template:function(t,e){1&t&&(ua(0,"div",0),ua(1,"button",1),ya("click",function(t){return e.onClickPrev(t)}),da(2,"span",2),ha(),ha(),ra(3,cC,1,4,"ngb-datepicker-navigation-select",3),ra(4,fC,1,1,void 0,4),ua(5,"div",5),ua(6,"button",6),ya("click",function(t){return e.onClickNext(t)}),da(7,"span",2),ha(),ha()),2&t&&(gs(1),la("disabled",e.prevDisabled),gs(2),la("ngIf",e.showSelect),gs(1),la("ngIf",!e.showSelect),gs(2),la("disabled",e.nextDisabled))},directives:function(){return[Ed,ZS,Sd]},styles:["ngb-datepicker-navigation{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.ngb-dp-navigation-chevron{border-style:solid;border-width:.2em .2em 0 0;display:inline-block;width:.75em;height:.75em;margin-left:.25em;margin-right:.15em;-webkit-transform:rotate(-135deg);transform:rotate(-135deg)}.right .ngb-dp-navigation-chevron{-webkit-transform:rotate(45deg);transform:rotate(45deg);margin-left:.15em;margin-right:.25em}.ngb-dp-arrow{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;padding-right:0;padding-left:0;margin:0;width:2rem;height:2rem}.ngb-dp-arrow.right{-ms-flex-pack:end;justify-content:flex-end}.ngb-dp-arrow-btn{padding:0 .25rem;margin:0 .5rem;border:none;background-color:transparent;z-index:1}.ngb-dp-arrow-btn:focus{outline-width:1px;outline-style:auto}@media all and (-ms-high-contrast:none),(-ms-high-contrast:active){.ngb-dp-arrow-btn:focus{outline-style:solid}}.ngb-dp-month-name{font-size:larger;height:2rem;line-height:2rem;text-align:center}.ngb-dp-navigation-select{display:-ms-flexbox;display:flex;-ms-flex:1 1 9rem;flex:1 1 9rem}"],encapsulation:2,changeDetection:0}),t})();const OS=(t,e)=>!!e&&e.some(e=>e.contains(t)),IS=(t,e)=>!e||null!=function(t,e){return e?void 0===t.closest?null:t.closest(e):null}(t,e),NS="undefined"!=typeof navigator&&!!navigator.userAgent&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||/Macintosh/.test(navigator.userAgent)&&navigator.maxTouchPoints&&navigator.maxTouchPoints>2||/Android/.test(navigator.userAgent));function PS(t,e,n,i,r,s,o,a){var c;n&&t.runOutsideAngular((c=()=>{const c=E_(e,"keydown").pipe(R_(r),hm(t=>t.which===FS.Escape),Um(t=>t.preventDefault())),u=E_(e,"mousedown").pipe(E(t=>{const e=t.target;return 2!==t.button&&!OS(e,o)&&("inside"===n?OS(e,s)&&IS(e,a):"outside"===n?!OS(e,s):IS(e,a)||!OS(e,s))}),R_(r)),h=E_(e,"mouseup").pipe(L_(u),hm(([t,e])=>e),B_(0),R_(r));(function(...t){if(1===t.length){if(!l(t[0]))return t[0];t=t[0]}return z(t,void 0).lift(new D_)})([c.pipe(E(t=>0)),h.pipe(E(t=>1))]).subscribe(e=>t.run(()=>i(e)))},NS?()=>setTimeout(()=>c(),100):c))}const BS=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","[contenteditable]",'[tabindex]:not([tabindex="-1"])'].join(", ");function US(t){const e=Array.from(t.querySelectorAll(BS)).filter(t=>-1!==t.tabIndex);return[e[0],e[e.length-1]]}const VS=(t,e,n,i=!1)=>{t.runOutsideAngular(()=>{const t=E_(e,"focusin").pipe(R_(n),E(t=>t.target));E_(e,"keydown").pipe(R_(n),hm(t=>t.which===FS.Tab),L_(t)).subscribe(([t,n])=>{const[i,r]=US(e);n!==i&&n!==e||!t.shiftKey||(r.focus(),t.preventDefault()),n!==r||t.shiftKey||(i.focus(),t.preventDefault())}),i&&E_(e,"click").pipe(R_(n),L_(t),E(t=>t[1])).subscribe(t=>t.focus())})},HS=/\s+/,jS=new class{getAllStyles(t){return window.getComputedStyle(t)}getStyle(t,e){return this.getAllStyles(t)[e]}isStaticPositioned(t){return"static"===(this.getStyle(t,"position")||"static")}offsetParent(t){let e=t.offsetParent||document.documentElement;for(;e&&e!==document.documentElement&&this.isStaticPositioned(e);)e=e.offsetParent;return e||document.documentElement}position(t,e=!0){let n,i={width:0,height:0,top:0,bottom:0,left:0,right:0};if("fixed"===this.getStyle(t,"position"))n=t.getBoundingClientRect(),n={top:n.top,bottom:n.bottom,left:n.left,right:n.right,height:n.height,width:n.width};else{const e=this.offsetParent(t);n=this.offset(t,!1),e!==document.documentElement&&(i=this.offset(e,!1)),i.top+=e.clientTop,i.left+=e.clientLeft}return n.top-=i.top,n.bottom-=i.top,n.left-=i.left,n.right-=i.left,e&&(n.top=Math.round(n.top),n.bottom=Math.round(n.bottom),n.left=Math.round(n.left),n.right=Math.round(n.right)),n}offset(t,e=!0){const n=t.getBoundingClientRect(),i=window.pageYOffset-document.documentElement.clientTop,r=window.pageXOffset-document.documentElement.clientLeft;let s={height:n.height||t.offsetHeight,width:n.width||t.offsetWidth,top:n.top+i,bottom:n.bottom+i,left:n.left+r,right:n.right+r};return e&&(s.height=Math.round(s.height),s.width=Math.round(s.width),s.top=Math.round(s.top),s.bottom=Math.round(s.bottom),s.left=Math.round(s.left),s.right=Math.round(s.right)),s}positionElements(t,e,n,i){const[r="top",s="center"]=n.split("-"),o=i?this.offset(t,!1):this.position(t,!1),a=this.getAllStyles(e),l=parseFloat(a.marginTop),c=parseFloat(a.marginBottom),u=parseFloat(a.marginLeft),h=parseFloat(a.marginRight);let d=0,f=0;switch(r){case"top":d=o.top-(e.offsetHeight+l+c);break;case"bottom":d=o.top+o.height;break;case"left":f=o.left-(e.offsetWidth+u+h);break;case"right":f=o.left+o.width}switch(s){case"top":d=o.top;break;case"bottom":d=o.top+o.height-e.offsetHeight;break;case"left":f=o.left;break;case"right":f=o.left+o.width-e.offsetWidth;break;case"center":"top"===r||"bottom"===r?f=o.left+o.width/2-e.offsetWidth/2:d=o.top+o.height/2-e.offsetHeight/2}e.style.transform=`translate(${Math.round(f)}px, ${Math.round(d)}px)`;const p=e.getBoundingClientRect(),g=document.documentElement,m=window.innerHeight||g.clientHeight,v=window.innerWidth||g.clientWidth;return p.left>=0&&p.top>=0&&p.right<=v&&p.bottom<=m}};function zS(t,e,n,i,r){let s=Array.isArray(n)?n:n.split(HS);const o=["top","bottom","left","right","top-left","top-right","bottom-left","bottom-right","left-top","left-bottom","right-top","right-bottom"],a=e.classList,l=t=>{const[e,n]=t.split("-"),i=[];return r&&(i.push(`${r}-${e}`),n&&i.push(`${r}-${e}-${n}`),i.forEach(t=>{a.add(t)})),i};r&&o.forEach(t=>{a.remove(`${r}-${t}`)});let c=s.findIndex(t=>"auto"===t);c>=0&&o.forEach(function(t){null==s.find(e=>-1!==e.search("^"+t))&&s.splice(c++,1,t)});const u=e.style;u.position="absolute",u.top="0",u.left="0",u["will-change"]="transform";let h=null,d=!1;for(h of s){let n=l(h);if(jS.positionElements(t,e,h,i)){d=!0;break}r&&n.forEach(t=>{a.remove(t)})}return d||(h=s[0],l(h),jS.positionElements(t,e,h,i)),h}function WS(){return new KS}let GS=(()=>{let t=class{};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:WS,token:t,providedIn:"root"}),t})(),KS=(()=>{let t=class extends GS{parse(t){if(null!=t){const e=t.trim().split("-");if(1===e.length&&WC(e[0]))return{year:HC(e[0]),month:null,day:null};if(2===e.length&&WC(e[0])&&WC(e[1]))return{year:HC(e[0]),month:HC(e[1]),day:null};if(3===e.length&&WC(e[0])&&WC(e[1])&&WC(e[2]))return{year:HC(e[0]),month:HC(e[1]),day:HC(e[2])}}return null}format(t){return t?`${t.year}-${WC(t.month)?qC(t.month):""}-${WC(t.day)?qC(t.day):""}`:""}};return t.\u0275fac=function(e){return dE(e||t)},t.\u0275prov=ut({token:t,factory:function(e){return t.\u0275fac(e)}}),t})(),qS=(()=>{let t=class extends SS{constructor(){super(...arguments),this.autoClose=!0,this.placement=["bottom-left","bottom-right","top-left","top-right"],this.restoreFocus=!0}};return t.\u0275fac=function(e){return fE(e||t)},t.\u0275prov=ut({factory:function(){return new t},token:t,providedIn:"root"}),t})();const YS={provide:Vb,useExisting:_t(()=>JS),multi:!0},XS={provide:Yb,useExisting:_t(()=>JS),multi:!0};let JS=(()=>{let t=class{constructor(t,e,n,i,r,s,o,a,l,c,u){this._parserFormatter=t,this._elRef=e,this._vcRef=n,this._renderer=i,this._cfr=r,this._ngZone=s,this._calendar=o,this._dateAdapter=a,this._document=l,this._changeDetector=c,this._cRef=null,this._disabled=!1,this._elWithFocus=null,this._model=null,this.dateSelect=new Zc,this.navigate=new Zc,this.closed=new Zc,this._onChange=t=>{},this._onTouched=()=>{},this._validatorChange=()=>{},["autoClose","container","positionTarget","placement"].forEach(t=>this[t]=u[t]),this._zoneSubscription=s.onStable.subscribe(()=>this._updatePopupPosition())}get disabled(){return this._disabled}set disabled(t){this._disabled=""===t||t&&"false"!==t,this.isOpen()&&this._cRef.instance.setDisabledState(this._disabled)}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}registerOnValidatorChange(t){this._validatorChange=t}setDisabledState(t){this.disabled=t}validate(t){const{value:e}=t;if(null!=e){const t=this._fromDateStruct(this._dateAdapter.fromModel(e));if(!t)return{ngbDate:{invalid:e}};if(this.minDate&&t.before(uS.from(this.minDate)))return{ngbDate:{minDate:{minDate:this.minDate,actual:e}}};if(this.maxDate&&t.after(uS.from(this.maxDate)))return{ngbDate:{maxDate:{maxDate:this.maxDate,actual:e}}}}return null}writeValue(t){this._model=this._fromDateStruct(this._dateAdapter.fromModel(t)),this._writeModelValue(this._model)}manualDateChange(t,e=!1){const n=t!==this._inputValue;n&&(this._inputValue=t,this._model=this._fromDateStruct(this._parserFormatter.parse(t))),!n&&e||this._onChange(this._model?this._dateAdapter.toModel(this._model):""===t?null:t),e&&this._model&&this._writeModelValue(this._model)}isOpen(){return!!this._cRef}open(){if(!this.isOpen()){const t=this._cfr.resolveComponentFactory(RS);this._cRef=this._vcRef.createComponent(t),this._applyPopupStyling(this._cRef.location.nativeElement),this._applyDatepickerInputs(this._cRef.instance),this._subscribeForDatepickerOutputs(this._cRef.instance),this._cRef.instance.ngOnInit(),this._cRef.instance.writeValue(this._dateAdapter.toModel(this._model)),this._cRef.instance.registerOnChange(t=>{this.writeValue(t),this._onChange(t),this._onTouched()}),this._cRef.changeDetectorRef.detectChanges(),this._cRef.instance.setDisabledState(this.disabled),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._cRef.location.nativeElement),this._elWithFocus=this._document.activeElement,VS(this._ngZone,this._cRef.location.nativeElement,this.closed,!0),this._cRef.instance.focus(),PS(this._ngZone,this._document,this.autoClose,()=>this.close(),this.closed,[],[this._elRef.nativeElement,this._cRef.location.nativeElement])}}close(){if(this.isOpen()){this._vcRef.remove(this._vcRef.indexOf(this._cRef.hostView)),this._cRef=null,this.closed.emit(),this._changeDetector.markForCheck();let t=this._elWithFocus;zC(this.restoreFocus)?t=this._document.querySelector(this.restoreFocus):void 0!==this.restoreFocus&&(t=this.restoreFocus),t&&t.focus?t.focus():this._document.body.focus()}}toggle(){this.isOpen()?this.close():this.open()}navigateTo(t){this.isOpen()&&this._cRef.instance.navigateTo(t)}onBlur(){this._onTouched()}onFocus(){this._elWithFocus=this._elRef.nativeElement}ngOnChanges(t){(t.minDate||t.maxDate)&&(this._validatorChange(),this.isOpen()&&(t.minDate&&(this._cRef.instance.minDate=this.minDate),t.maxDate&&(this._cRef.instance.maxDate=this.maxDate),this._cRef.instance.ngOnChanges(t)))}ngOnDestroy(){this.close(),this._zoneSubscription.unsubscribe()}_applyDatepickerInputs(t){["dayTemplate","dayTemplateData","displayMonths","firstDayOfWeek","footerTemplate","markDisabled","minDate","maxDate","navigation","outsideDays","showNavigation","showWeekdays","showWeekNumbers"].forEach(e=>{void 0!==this[e]&&(t[e]=this[e])}),t.startDate=this.startDate||this._model}_applyPopupStyling(t){this._renderer.addClass(t,"dropdown-menu"),this._renderer.addClass(t,"show"),"body"===this.container&&this._renderer.addClass(t,"ngb-dp-body")}_subscribeForDatepickerOutputs(t){t.navigate.subscribe(t=>this.navigate.emit(t)),t.dateSelect.subscribe(t=>{this.dateSelect.emit(t),!0!==this.autoClose&&"inside"!==this.autoClose||this.close()})}_writeModelValue(t){const e=this._parserFormatter.format(t);this._inputValue=e,this._renderer.setProperty(this._elRef.nativeElement,"value",e),this.isOpen()&&(this._cRef.instance.writeValue(this._dateAdapter.toModel(t)),this._onTouched())}_fromDateStruct(t){const e=t?new uS(t.year,t.month,t.day):null;return this._calendar.isValid(e)?e:null}_updatePopupPosition(){if(!this._cRef)return;let t;if(t=zC(this.positionTarget)?this._document.querySelector(this.positionTarget):this.positionTarget instanceof HTMLElement?this.positionTarget:this._elRef.nativeElement,this.positionTarget&&!t)throw new Error("ngbDatepicker could not find element declared in [positionTarget] to position against.");zS(t,this._cRef.location.nativeElement,this.placement,"body"===this.container)}};return t.\u0275fac=function(e){return new(e||t)(oa(GS),oa(uc),oa(Ic),oa(pc),oa(cc),oa(ju),oa(pS),oa(ES),oa(wh),oa(_o),oa(qS))},t.\u0275dir=we({type:t,selectors:[["input","ngbDatepicker",""]],hostVars:1,hostBindings:function(t,e){1&t&&ya("input",function(t){return e.manualDateChange(t.target.value)})("change",function(t){return e.manualDateChange(t.target.value,!0)})("focus",function(){return e.onFocus()})("blur",function(){return e.onBlur()}),2&t&&Qa("disabled",e.disabled)},inputs:{disabled:"disabled",autoClose:"autoClose",dayTemplate:"dayTemplate",dayTemplateData:"dayTemplateData",displayMonths:"displayMonths",firstDayOfWeek:"firstDayOfWeek",footerTemplate:"footerTemplate",markDisabled:"markDisabled",minDate:"minDate",maxDate:"maxDate",navigation:"navigation",outsideDays:"outsideDays",placement:"placement",restoreFocus:"restoreFocus",showWeekdays:"showWeekdays",showWeekNumbers:"showWeekNumbers",startDate:"startDate",container:"container",positionTarget:"positionTarget"},outputs:{dateSelect:"dateSelect",navigate:"navigate",closed:"closed"},exportAs:["ngbDatepicker"],features:[oc([YS,XS,{provide:SS,useExisting:qS}]),Ve]}),t=cx([ux(8,nt(wh))],t),t})(),QS=(()=>{let t=class{constructor(t){this.i18n=t}isMuted(){return!this.selected&&(this.date.month!==this.currentMonth||this.disabled)}};return t.\u0275fac=function(e){return new(e||t)(oa(wS))},t.\u0275cmp=pe({type:t,selectors:[["","ngbDatepickerDayView",""]],hostAttrs:[1,"btn-light"],hostVars:10,hostBindings:function(t,e){2&t&&Oa("bg-primary",e.selected)("text-white",e.selected)("text-muted",e.isMuted())("outside",e.isMuted())("active",e.focused)},inputs:{currentMonth:"currentMonth",date:"date",disabled:"disabled",focused:"focused",selected:"selected"},attrs:pC,decls:1,vars:1,template:function(t,e){1&t&&qa(0),2&t&&Ya(e.i18n.getDayNumerals(e.date))},styles:["[ngbDatepickerDayView]{text-align:center;width:2rem;height:2rem;line-height:2rem;border-radius:.25rem;background:0 0}[ngbDatepickerDayView].outside{opacity:.5}"],encapsulation:2,changeDetection:0}),t})(),ZS=(()=>{let t=class{constructor(t,e){this.i18n=t,this._renderer=e,this.select=new Zc,this._month=-1,this._year=-1}changeMonth(t){this.select.emit(new uS(this.date.year,HC(t),1))}changeYear(t){this.select.emit(new uS(HC(t),this.date.month,1))}ngAfterViewChecked(){this.date&&(this.date.month!==this._month&&(this._month=this.date.month,this._renderer.setProperty(this.monthSelect.nativeElement,"value",this._month)),this.date.year!==this._year&&(this._year=this.date.year,this._renderer.setProperty(this.yearSelect.nativeElement,"value",this._year)))}};return t.\u0275fac=function(e){return new(e||t)(oa(wS),oa(pc))},t.\u0275cmp=pe({type:t,selectors:[["ngb-datepicker-navigation-select"]],viewQuery:function(t,e){if(1&t&&(du(gC,!0,uc),du(mC,!0,uc)),2&t){let t;hu(t=vu())&&(e.monthSelect=t.first),hu(t=vu())&&(e.yearSelect=t.first)}},inputs:{date:"date",disabled:"disabled",months:"months",years:"years"},outputs:{select:"select"},decls:6,vars:4,consts:function(){let t,e,n,i;return t=$localize`:@@ngb.datepicker.select-month␟1dbc84807f35518112f62e5775d1daebd3d8462b␟2253869508135064750:Select month`,e=$localize`:@@ngb.datepicker.select-month␟1dbc84807f35518112f62e5775d1daebd3d8462b␟2253869508135064750:Select month`,n=$localize`:@@ngb.datepicker.select-year␟8ceb09d002bf0c5d1cac171dfbffe1805d2b3962␟8852264961585484321:Select year`,i=$localize`:@@ngb.datepicker.select-year␟8ceb09d002bf0c5d1cac171dfbffe1805d2b3962␟8852264961585484321:Select year`,[["aria-label",t,"title",e,1,"custom-select",3,"disabled","change"],["month",""],[3,"value",4,"ngFor","ngForOf"],["aria-label",n,"title",i,1,"custom-select",3,"disabled","change"],["year",""],[3,"value"]]},template:function(t,e){1&t&&(ua(0,"select",0,1),ya("change",function(t){return e.changeMonth(t.target.value)}),ra(2,vC,2,3,"option",2),ha(),ua(3,"select",3,4),ya("change",function(t){return e.changeYear(t.target.value)}),ra(5,yC,2,2,"option",2),ha()),2&t&&(la("disabled",e.disabled),gs(2),la("ngForOf",e.months),gs(1),la("disabled",e.disabled),gs(2),la("ngForOf",e.years))},directives:[Sd,Bw,jw],styles:["ngb-datepicker-navigation-select>.custom-select{-ms-flex:1 1 auto;flex:1 1 auto;padding:0 .5rem;font-size:.875rem;height:1.85rem}ngb-datepicker-navigation-select>.custom-select:focus{z-index:1}ngb-datepicker-navigation-select>.custom-select::-ms-value{background-color:transparent!important}"],encapsulation:2,changeDetection:0}),t})();new Date(1882,10,12),new Date(2174,10,25);let tk=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[Fd,ax]]}),t})(),ek=(()=>{let t=class{constructor(){this.autoClose=!0,this.placement=["bottom-left","bottom-right","top-left","top-right"]}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:function(){return new t},token:t,providedIn:"root"}),t})();var nk;let ik=(()=>{let t=class{};return t.\u0275fac=function(e){return new(e||t)},t.\u0275dir=we({type:t,selectors:[["",8,"navbar"]]}),t})(),rk=(()=>{let t=class{constructor(t){this.elementRef=t,this._disabled=!1}set disabled(t){this._disabled=""===t||!0===t}get disabled(){return this._disabled}};return t.\u0275fac=function(e){return new(e||t)(oa(uc))},t.\u0275dir=we({type:t,selectors:[["","ngbDropdownItem",""]],hostAttrs:[1,"dropdown-item"],hostVars:2,hostBindings:function(t,e){2&t&&Oa("disabled",e.disabled)},inputs:{disabled:"disabled"}}),t})(),sk=(()=>{let t=class{constructor(t,e){this.dropdown=t,this.placement="bottom",this.isOpen=!1,this.nativeElement=e.nativeElement}};return t.\u0275fac=function(e){return new(e||t)(oa(_t(()=>lk)),oa(uc))},t.\u0275dir=we({type:t,selectors:[["","ngbDropdownMenu",""]],contentQueries:function(t,e,n){if(1&t&&gu(n,rk,!1),2&t){let t;hu(t=vu())&&(e.menuItems=t)}},hostVars:5,hostBindings:function(t,e){1&t&&ya("keydown.ArrowUp",function(t){return e.dropdown.onKeyDown(t)})("keydown.ArrowDown",function(t){return e.dropdown.onKeyDown(t)})("keydown.Home",function(t){return e.dropdown.onKeyDown(t)})("keydown.End",function(t){return e.dropdown.onKeyDown(t)})("keydown.Enter",function(t){return e.dropdown.onKeyDown(t)})("keydown.Space",function(t){return e.dropdown.onKeyDown(t)})("keydown.Tab",function(t){return e.dropdown.onKeyDown(t)})("keydown.Shift.Tab",function(t){return e.dropdown.onKeyDown(t)}),2&t&&(na("x-placement",e.placement),Oa("dropdown-menu",!0)("show",e.dropdown.isOpen()))}}),t=cx([ux(0,nt(_t(()=>lk)))],t),t})(),ok=(()=>{let t=class{constructor(t,e){this.dropdown=t,this.nativeElement=e.nativeElement}};return t.\u0275fac=function(e){return new(e||t)(oa(_t(()=>lk)),oa(uc))},t.\u0275dir=we({type:t,selectors:[["","ngbDropdownAnchor",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:1,hostBindings:function(t,e){2&t&&na("aria-expanded",e.dropdown.isOpen())}}),t=cx([ux(0,nt(_t(()=>lk)))],t),t})(),ak=(()=>{let t=nk=class extends ok{constructor(t,e){super(t,e)}};return t.\u0275fac=function(e){return new(e||t)(oa(_t(()=>lk)),oa(uc))},t.\u0275dir=we({type:t,selectors:[["","ngbDropdownToggle",""]],hostAttrs:[1,"dropdown-toggle"],hostVars:1,hostBindings:function(t,e){1&t&&ya("click",function(){return e.dropdown.toggle()})("keydown.ArrowUp",function(t){return e.dropdown.onKeyDown(t)})("keydown.ArrowDown",function(t){return e.dropdown.onKeyDown(t)})("keydown.Home",function(t){return e.dropdown.onKeyDown(t)})("keydown.End",function(t){return e.dropdown.onKeyDown(t)})("keydown.Tab",function(t){return e.dropdown.onKeyDown(t)})("keydown.Shift.Tab",function(t){return e.dropdown.onKeyDown(t)}),2&t&&na("aria-expanded",e.dropdown.isOpen())},features:[oc([{provide:ok,useExisting:_t(()=>nk)}]),jo]}),t=nk=cx([ux(0,nt(_t(()=>lk)))],t),t})(),lk=(()=>{let t=class{constructor(t,e,n,i,r,s,o){this._changeDetector=t,this._document=n,this._ngZone=i,this._elementRef=r,this._renderer=s,this._closed$=new C,this._bodyContainer=null,this._open=!1,this.openChange=new Zc,this.placement=e.placement,this.container=e.container,this.autoClose=e.autoClose,this.display=o?"static":"dynamic",this._zoneSubscription=i.onStable.subscribe(()=>{this._positionMenu()})}ngAfterContentInit(){this._ngZone.onStable.pipe(Dm(1)).subscribe(()=>{this._applyPlacementClasses(),this._open&&this._setCloseHandlers()})}ngOnChanges(t){t.container&&this._open&&this._applyContainer(this.container),t.placement&&!t.placement.isFirstChange&&this._applyPlacementClasses()}isOpen(){return this._open}open(){this._open||(this._open=!0,this._applyContainer(this.container),this.openChange.emit(!0),this._setCloseHandlers(),this._anchor&&this._anchor.nativeElement.focus())}_setCloseHandlers(){PS(this._ngZone,this._document,this.autoClose,t=>{this.close(),0===t&&this._anchor.nativeElement.focus()},this._closed$,this._menu?[this._menu.nativeElement]:[],this._anchor?[this._anchor.nativeElement]:[],".dropdown-item,.dropdown-divider")}close(){this._open&&(this._open=!1,this._resetContainer(),this._closed$.next(),this.openChange.emit(!1),this._changeDetector.markForCheck())}toggle(){this.isOpen()?this.close():this.open()}ngOnDestroy(){this._resetContainer(),this._closed$.next(),this._zoneSubscription.unsubscribe()}onKeyDown(t){const e=t.which,n=this._getMenuElements();let i=-1,r=null;const s=this._isEventFromToggle(t);if(!s&&n.length&&n.forEach((e,n)=>{e.contains(t.target)&&(r=e),e===this._document.activeElement&&(i=n)}),e!==FS.Space&&e!==FS.Enter){if(e!==FS.Tab){if(s||r){if(this.open(),n.length){switch(e){case FS.ArrowDown:i=Math.min(i+1,n.length-1);break;case FS.ArrowUp:if(this._isDropup()&&-1===i){i=n.length-1;break}i=Math.max(i-1,0);break;case FS.Home:i=0;break;case FS.End:i=n.length-1}n[i].focus()}t.preventDefault()}}else if(t.target&&this.isOpen()&&this.autoClose){if(this._anchor.nativeElement===t.target)return void("body"!==this.container||t.shiftKey?t.shiftKey&&this.close():(this._renderer.setAttribute(this._menu.nativeElement,"tabindex","0"),this._menu.nativeElement.focus(),this._renderer.removeAttribute(this._menu.nativeElement,"tabindex")));if("body"===this.container){const e=this._menu.nativeElement.querySelectorAll(BS);t.shiftKey&&t.target===e[0]?(this._anchor.nativeElement.focus(),t.preventDefault()):t.shiftKey||t.target!==e[e.length-1]||(this._anchor.nativeElement.focus(),this.close())}else E_(t.target,"focusout").pipe(Dm(1)).subscribe(({relatedTarget:t})=>{this._elementRef.nativeElement.contains(t)||this.close()})}}else!r||!0!==this.autoClose&&"inside"!==this.autoClose||E_(r,"click").pipe(Dm(1)).subscribe(()=>this.close())}_isDropup(){return this._elementRef.nativeElement.classList.contains("dropup")}_isEventFromToggle(t){return this._anchor.nativeElement.contains(t.target)}_getMenuElements(){const t=this._menu;return null==t?[]:t.menuItems.filter(t=>!t.disabled).map(t=>t.elementRef.nativeElement)}_positionMenu(){const t=this._menu;this.isOpen()&&t&&this._applyPlacementClasses("dynamic"===this.display?zS(this._anchor.nativeElement,this._bodyContainer||this._menu.nativeElement,this.placement,"body"===this.container):this._getFirstPlacement(this.placement))}_getFirstPlacement(t){return Array.isArray(t)?t[0]:t.split(" ")[0]}_resetContainer(){const t=this._renderer;if(this._menu){const e=this._menu.nativeElement;t.appendChild(this._elementRef.nativeElement,e),t.removeStyle(e,"position"),t.removeStyle(e,"transform")}this._bodyContainer&&(t.removeChild(this._document.body,this._bodyContainer),this._bodyContainer=null)}_applyContainer(t=null){if(this._resetContainer(),"body"===t){const t=this._renderer,e=this._menu.nativeElement,n=this._bodyContainer=this._bodyContainer||t.createElement("div");t.setStyle(n,"position","absolute"),t.setStyle(e,"position","static"),t.setStyle(n,"z-index","1050"),t.appendChild(n,e),t.appendChild(this._document.body,n)}}_applyPlacementClasses(t){const e=this._menu;if(e){t||(t=this._getFirstPlacement(this.placement));const n=this._renderer,i=this._elementRef.nativeElement;n.removeClass(i,"dropup"),n.removeClass(i,"dropdown"),e.placement="static"===this.display?null:t;const r=-1!==t.search("^top")?"dropup":"dropdown";n.addClass(i,r);const s=this._bodyContainer;s&&(n.removeClass(s,"dropup"),n.removeClass(s,"dropdown"),n.addClass(s,r))}}};return t.\u0275fac=function(e){return new(e||t)(oa(_o),oa(ek),oa(wh),oa(ju),oa(uc),oa(pc),oa(ik,8))},t.\u0275dir=we({type:t,selectors:[["","ngbDropdown",""]],contentQueries:function(t,e,n){if(1&t&&(gu(n,sk,!0),gu(n,ok,!0)),2&t){let t;hu(t=vu())&&(e._menu=t.first),hu(t=vu())&&(e._anchor=t.first)}},hostVars:2,hostBindings:function(t,e){2&t&&Oa("show",e.isOpen())},inputs:{_open:["open","_open"],placement:"placement",container:"container",autoClose:"autoClose",display:"display"},outputs:{openChange:"openChange"},exportAs:["ngbDropdown"],features:[Ve]}),t=cx([ux(2,nt(wh)),ux(6,it())],t),t})(),ck=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)}}),t})(),uk=(()=>{let t=class{constructor(){this.backdrop=!0,this.keyboard=!0}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:function(){return new t},token:t,providedIn:"root"}),t})();class hk{constructor(t,e,n){this.nodes=t,this.viewRef=e,this.componentRef=n}}class dk{constructor(t,e,n,i,r,s){this._type=t,this._injector=e,this._viewContainerRef=n,this._renderer=i,this._componentFactoryResolver=r,this._applicationRef=s,this._windowRef=null,this._contentRef=null}open(t,e){return this._windowRef||(this._contentRef=this._getContentRef(t,e),this._windowRef=this._viewContainerRef.createComponent(this._componentFactoryResolver.resolveComponentFactory(this._type),this._viewContainerRef.length,this._injector,this._contentRef.nodes)),this._windowRef}close(){var t;this._windowRef&&(this._viewContainerRef.remove(this._viewContainerRef.indexOf(this._windowRef.hostView)),this._windowRef=null,(null===(t=this._contentRef)||void 0===t?void 0:t.viewRef)&&(this._applicationRef.detachView(this._contentRef.viewRef),this._contentRef.viewRef.destroy(),this._contentRef=null))}_getContentRef(t,e){if(t){if(t instanceof $c){const n=t.createEmbeddedView(e);return this._applicationRef.attachView(n),new hk([n.rootNodes],n)}return new hk([[this._renderer.createText(`${t}`)]])}return new hk([])}}const fk=()=>{};let pk=(()=>{let t=class{constructor(t){this._document=t}compensate(){const t=this._getWidth();return this._isPresent(t)?this._adjustBody(t):fk}_adjustBody(t){const e=this._document.body,n=e.style.paddingRight,i=parseFloat(window.getComputedStyle(e)["padding-right"]);return e.style["padding-right"]=`${i+t}px`,()=>e.style["padding-right"]=n}_isPresent(t){const e=this._document.body.getBoundingClientRect();return window.innerWidth-(e.left+e.right)>=t-.1*t}_getWidth(){const t=this._document.createElement("div");t.className="modal-scrollbar-measure";const e=this._document.body;e.appendChild(t);const n=t.getBoundingClientRect().width-t.clientWidth;return e.removeChild(t),n}};return t.\u0275fac=function(e){return new(e||t)(Yt(wh))},t.\u0275prov=ut({factory:function(){return new t(Yt(wh))},token:t,providedIn:"root"}),t=cx([ux(0,nt(wh))],t),t})(),gk=(()=>{let t=class{};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["ngb-modal-backdrop"]],hostAttrs:[2,"z-index","1050"],hostVars:2,hostBindings:function(t,e){2&t&&Ia("modal-backdrop fade show"+(e.backdropClass?" "+e.backdropClass:""))},inputs:{backdropClass:"backdropClass"},decls:0,vars:0,template:function(t,e){},encapsulation:2}),t})();class mk{close(t){}dismiss(t){}}class vk{constructor(t,e,n,i){this._windowCmptRef=t,this._contentRef=e,this._backdropCmptRef=n,this._beforeDismiss=i,t.instance.dismissEvent.subscribe(t=>{this.dismiss(t)}),this.result=new Promise((t,e)=>{this._resolve=t,this._reject=e}),this.result.then(null,()=>{})}get componentInstance(){if(this._contentRef&&this._contentRef.componentRef)return this._contentRef.componentRef.instance}close(t){this._windowCmptRef&&(this._resolve(t),this._removeModalElements())}_dismiss(t){this._reject(t),this._removeModalElements()}dismiss(t){if(this._windowCmptRef)if(this._beforeDismiss){const e=this._beforeDismiss();e&&e.then?e.then(e=>{!1!==e&&this._dismiss(t)},()=>{}):!1!==e&&this._dismiss(t)}else this._dismiss(t)}_removeModalElements(){const t=this._windowCmptRef.location.nativeElement;if(t.parentNode.removeChild(t),this._windowCmptRef.destroy(),this._backdropCmptRef){const t=this._backdropCmptRef.location.nativeElement;t.parentNode.removeChild(t),this._backdropCmptRef.destroy()}this._contentRef&&this._contentRef.viewRef&&this._contentRef.viewRef.destroy(),this._windowCmptRef=null,this._backdropCmptRef=null,this._contentRef=null}}var yk=function(t){return t[t.BACKDROP_CLICK=0]="BACKDROP_CLICK",t[t.ESC=1]="ESC",t}({});let bk=(()=>{let t=class{constructor(t,e,n){this._document=t,this._elRef=e,this._zone=n,this._closed$=new C,this._elWithFocus=null,this.backdrop=!0,this.keyboard=!0,this.dismissEvent=new Zc}dismiss(t){this.dismissEvent.emit(t)}ngOnInit(){this._elWithFocus=this._document.activeElement}ngAfterViewInit(){const{nativeElement:t}=this._elRef;if(this._zone.runOutsideAngular(()=>{E_(t,"keydown").pipe(R_(this._closed$),hm(t=>t.which===FS.Escape&&this.keyboard)).subscribe(t=>requestAnimationFrame(()=>{t.defaultPrevented||this._zone.run(()=>this.dismiss(yk.ESC))}));let e=!1;E_(this._dialogEl.nativeElement,"mousedown").pipe(R_(this._closed$),Um(()=>e=!1),km(()=>E_(t,"mouseup").pipe(R_(this._closed$),Dm(1))),hm(({target:e})=>t===e)).subscribe(()=>{e=!0}),E_(t,"click").pipe(R_(this._closed$)).subscribe(({target:n})=>{!0!==this.backdrop||t!==n||e||this._zone.run(()=>this.dismiss(yk.BACKDROP_CLICK)),e=!1})}),!t.contains(document.activeElement)){const e=t.querySelector("[ngbAutofocus]"),n=US(t)[0];(e||n||t).focus()}}ngOnDestroy(){const t=this._document.body,e=this._elWithFocus;let n;n=e&&e.focus&&t.contains(e)?e:t,this._zone.runOutsideAngular(()=>{setTimeout(()=>n.focus()),this._elWithFocus=null}),this._closed$.next()}};return t.\u0275fac=function(e){return new(e||t)(oa(wh),oa(uc),oa(ju))},t.\u0275cmp=pe({type:t,selectors:[["ngb-modal-window"]],viewQuery:function(t,e){if(1&t&&du(bC,!0),2&t){let t;hu(t=vu())&&(e._dialogEl=t.first)}},hostAttrs:["role","dialog","tabindex","-1"],hostVars:5,hostBindings:function(t,e){2&t&&(na("aria-modal",!0)("aria-labelledby",e.ariaLabelledBy)("aria-describedby",e.ariaDescribedBy),Ia("modal fade show d-block"+(e.windowClass?" "+e.windowClass:"")))},inputs:{backdrop:"backdrop",keyboard:"keyboard",ariaLabelledBy:"ariaLabelledBy",ariaDescribedBy:"ariaDescribedBy",centered:"centered",scrollable:"scrollable",size:"size",windowClass:"windowClass"},outputs:{dismissEvent:"dismiss"},ngContentSelectors:z_,decls:4,vars:2,consts:[["role","document"],["dialog",""],[1,"modal-content"]],template:function(t,e){1&t&&(Ca(),ua(0,"div",0,1),ua(2,"div",2),Sa(3),ha(),ha()),2&t&&Ia("modal-dialog"+(e.size?" modal-"+e.size:"")+(e.centered?" modal-dialog-centered":"")+(e.scrollable?" modal-dialog-scrollable":""))},styles:["ngb-modal-window .component-host-scrollable{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;overflow:hidden}"],encapsulation:2}),t=cx([ux(0,nt(wh))],t),t})(),wk=(()=>{let t=class{constructor(t,e,n,i,r,s){this._applicationRef=t,this._injector=e,this._document=n,this._scrollBar=i,this._rendererFactory=r,this._ngZone=s,this._activeWindowCmptHasChanged=new C,this._ariaHiddenValues=new Map,this._backdropAttributes=["backdropClass"],this._modalRefs=[],this._windowAttributes=["ariaLabelledBy","ariaDescribedBy","backdrop","centered","keyboard","scrollable","size","windowClass"],this._windowCmpts=[],this._activeInstances=new Zc,this._activeWindowCmptHasChanged.subscribe(()=>{if(this._windowCmpts.length){const t=this._windowCmpts[this._windowCmpts.length-1];VS(this._ngZone,t.location.nativeElement,this._activeWindowCmptHasChanged),this._revertAriaHidden(),this._setAriaHidden(t.location.nativeElement)}})}open(t,e,n,i){const r=i.container instanceof HTMLElement?i.container:KC(i.container)?this._document.querySelector(i.container):this._document.body,s=this._rendererFactory.createRenderer(null,null),o=this._scrollBar.compensate(),a=()=>{this._modalRefs.length||(s.removeClass(this._document.body,"modal-open"),this._revertAriaHidden())};if(!r)throw new Error(`The specified modal container "${i.container||"body"}" was not found in the DOM.`);const l=new mk,c=this._getContentRef(t,i.injector||e,n,l,i);let u=!1!==i.backdrop?this._attachBackdrop(t,r):void 0,h=this._attachWindowComponent(t,r,c),d=new vk(h,c,u,i.beforeDismiss);return this._registerModalRef(d),this._registerWindowCmpt(h),d.result.then(o,o),d.result.then(a,a),l.close=t=>{d.close(t)},l.dismiss=t=>{d.dismiss(t)},this._applyWindowOptions(h.instance,i),1===this._modalRefs.length&&s.addClass(this._document.body,"modal-open"),u&&u.instance&&this._applyBackdropOptions(u.instance,i),d}get activeInstances(){return this._activeInstances}dismissAll(t){this._modalRefs.forEach(e=>e.dismiss(t))}hasOpenModals(){return this._modalRefs.length>0}_attachBackdrop(t,e){let n=t.resolveComponentFactory(gk).create(this._injector);return this._applicationRef.attachView(n.hostView),e.appendChild(n.location.nativeElement),n}_attachWindowComponent(t,e,n){let i=t.resolveComponentFactory(bk).create(this._injector,n.nodes);return this._applicationRef.attachView(i.hostView),e.appendChild(i.location.nativeElement),i}_applyWindowOptions(t,e){this._windowAttributes.forEach(n=>{KC(e[n])&&(t[n]=e[n])})}_applyBackdropOptions(t,e){this._backdropAttributes.forEach(n=>{KC(e[n])&&(t[n]=e[n])})}_getContentRef(t,e,n,i,r){return n?n instanceof $c?this._createFromTemplateRef(n,i):zC(n)?this._createFromString(n):this._createFromComponent(t,e,n,i,r):new hk([])}_createFromTemplateRef(t,e){const n=t.createEmbeddedView({$implicit:e,close(t){e.close(t)},dismiss(t){e.dismiss(t)}});return this._applicationRef.attachView(n),new hk([n.rootNodes],n)}_createFromString(t){const e=this._document.createTextNode(`${t}`);return new hk([[e]])}_createFromComponent(t,e,n,i,r){const s=t.resolveComponentFactory(n),o=Bo.create({providers:[{provide:mk,useValue:i}],parent:e}),a=s.create(o),l=a.location.nativeElement;return r.scrollable&&l.classList.add("component-host-scrollable"),this._applicationRef.attachView(a.hostView),new hk([[l]],a.hostView,a)}_setAriaHidden(t){const e=t.parentElement;e&&t!==this._document.body&&(Array.from(e.children).forEach(e=>{e!==t&&"SCRIPT"!==e.nodeName&&(this._ariaHiddenValues.set(e,e.getAttribute("aria-hidden")),e.setAttribute("aria-hidden","true"))}),this._setAriaHidden(e))}_revertAriaHidden(){this._ariaHiddenValues.forEach((t,e)=>{t?e.setAttribute("aria-hidden",t):e.removeAttribute("aria-hidden")}),this._ariaHiddenValues.clear()}_registerModalRef(t){const e=()=>{const e=this._modalRefs.indexOf(t);e>-1&&(this._modalRefs.splice(e,1),this._activeInstances.emit(this._modalRefs))};this._modalRefs.push(t),this._activeInstances.emit(this._modalRefs),t.result.then(e,e)}_registerWindowCmpt(t){this._windowCmpts.push(t),this._activeWindowCmptHasChanged.next(),t.onDestroy(()=>{const e=this._windowCmpts.indexOf(t);e>-1&&(this._windowCmpts.splice(e,1),this._activeWindowCmptHasChanged.next())})}};return t.\u0275fac=function(e){return new(e||t)(Yt(lh),Yt(Bo),Yt(wh),Yt(pk),Yt(dc),Yt(ju))},t.\u0275prov=ut({factory:function(){return new t(Yt(lh),Yt(Bt),Yt(wh),Yt(pk),Yt(dc),Yt(ju))},token:t,providedIn:"root"}),t=cx([ux(2,nt(wh))],t),t})(),xk=(()=>{let t=class{constructor(t,e,n,i){this._moduleCFR=t,this._injector=e,this._modalStack=n,this._config=i}open(t,e={}){const n=Object.assign({},this._config,e);return this._modalStack.open(this._moduleCFR,this._injector,t,n)}get activeInstances(){return this._modalStack.activeInstances}dismissAll(t){this._modalStack.dismissAll(t)}hasOpenModals(){return this._modalStack.hasOpenModals()}};return t.\u0275fac=function(e){return new(e||t)(Yt(cc),Yt(Bo),Yt(wk),Yt(uk))},t.\u0275prov=ut({factory:function(){return new t(Yt(cc),Yt(Bt),Yt(wk),Yt(uk))},token:t,providedIn:"root"}),t})(),_k=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},providers:[xk]}),t})(),Ck=(()=>{let t=class{constructor(){this.destroyOnHide=!0,this.orientation="horizontal",this.roles="tablist",this.keyboard=!1}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:function(){return new t},token:t,providedIn:"root"}),t})();const Sk=t=>KC(t)&&""!==t;let kk=0,Ek=(()=>{let t=class{constructor(t){this.templateRef=t}};return t.\u0275fac=function(e){return new(e||t)(oa($c))},t.\u0275dir=we({type:t,selectors:[["ng-template","ngbNavContent",""]]}),t})(),Ak=(()=>{let t=class{constructor(t,e){this.elementRef=e,this.disabled=!1,this._nav=t}ngAfterContentChecked(){this.contentTpl=this.contentTpls.first}ngOnInit(){KC(this.domId)||(this.domId="ngb-nav-"+kk++)}get active(){return this._nav.activeId===this.id}get id(){return Sk(this._id)?this._id:this.domId}get panelDomId(){return`${this.domId}-panel`}isPanelInDom(){return(KC(this.destroyOnHide)?!this.destroyOnHide:!this._nav.destroyOnHide)||this.active}};return t.\u0275fac=function(e){return new(e||t)(oa(_t(()=>Dk)),oa(uc))},t.\u0275dir=we({type:t,selectors:[["","ngbNavItem",""]],contentQueries:function(t,e,n){if(1&t&&gu(n,Ek,!1),2&t){let t;hu(t=vu())&&(e.contentTpls=t)}},hostVars:2,hostBindings:function(t,e){2&t&&Oa("nav-item",!0)},inputs:{disabled:"disabled",domId:"domId",destroyOnHide:"destroyOnHide",_id:["ngbNavItem","_id"]},exportAs:["ngbNavItem"]}),t=cx([ux(0,nt(_t(()=>Dk)))],t),t})(),Dk=(()=>{let t=class{constructor(t,e,n,i){this.role=t,this._cd=n,this._document=i,this.activeIdChange=new Zc,this.navChange=new Zc,this.destroyOnHide=e.destroyOnHide,this.orientation=e.orientation,this.roles=e.roles,this.keyboard=e.keyboard}click(t){t.disabled||this._updateActiveId(t.id)}onKeyDown(t){if("tablist"!==this.roles||!this.keyboard)return;const e=t.which,n=this.links.filter(t=>!t.navItem.disabled),{length:i}=n;let r=-1;if(n.forEach((t,e)=>{t.elRef.nativeElement===this._document.activeElement&&(r=e)}),i){switch(e){case FS.ArrowLeft:if("vertical"===this.orientation)return;r=(r-1+i)%i;break;case FS.ArrowRight:if("vertical"===this.orientation)return;r=(r+1)%i;break;case FS.ArrowDown:if("horizontal"===this.orientation)return;r=(r+1)%i;break;case FS.ArrowUp:if("horizontal"===this.orientation)return;r=(r-1+i)%i;break;case FS.Home:r=0;break;case FS.End:r=i-1}"changeWithArrows"===this.keyboard&&this.select(n[r].navItem.id),n[r].elRef.nativeElement.focus(),t.preventDefault()}}select(t){this._updateActiveId(t,!1)}ngAfterContentInit(){if(!KC(this.activeId)){const t=this.items.first?this.items.first.id:null;Sk(t)&&(this._updateActiveId(t,!1),this._cd.detectChanges())}}_updateActiveId(t,e=!0){if(this.activeId!==t){let n=!1;e&&this.navChange.emit({activeId:this.activeId,nextId:t,preventDefault:()=>{n=!0}}),n||(this.activeId=t,this.activeIdChange.emit(t))}}};return t.\u0275fac=function(e){return new(e||t)(aa("role"),oa(Ck),oa(_o),oa(wh))},t.\u0275dir=we({type:t,selectors:[["","ngbNav",""]],contentQueries:function(t,e,n){if(1&t&&(gu(n,Ak,!1),gu(n,Tk,!0)),2&t){let t;hu(t=vu())&&(e.items=t),hu(t=vu())&&(e.links=t)}},hostVars:6,hostBindings:function(t,e){1&t&&ya("keydown.arrowLeft",function(t){return e.onKeyDown(t)})("keydown.arrowRight",function(t){return e.onKeyDown(t)})("keydown.arrowDown",function(t){return e.onKeyDown(t)})("keydown.arrowUp",function(t){return e.onKeyDown(t)})("keydown.Home",function(t){return e.onKeyDown(t)})("keydown.End",function(t){return e.onKeyDown(t)}),2&t&&(na("aria-orientation","vertical"===e.orientation&&"tablist"===e.roles?"vertical":void 0)("role",e.role?e.role:e.roles?"tablist":void 0),Oa("nav",!0)("flex-column","vertical"===e.orientation))},inputs:{destroyOnHide:"destroyOnHide",orientation:"orientation",roles:"roles",keyboard:"keyboard",activeId:"activeId"},outputs:{activeIdChange:"activeIdChange",navChange:"navChange"},exportAs:["ngbNav"]}),t=cx([ux(0,ot("role")),ux(3,nt(wh))],t),t})(),Tk=(()=>{let t=class{constructor(t,e,n,i){this.role=t,this.navItem=e,this.nav=n,this.elRef=i}hasNavItemClass(){return this.navItem.elementRef.nativeElement.nodeType===Node.COMMENT_NODE}};return t.\u0275fac=function(e){return new(e||t)(aa("role"),oa(Ak),oa(Dk),oa(uc))},t.\u0275dir=we({type:t,selectors:[["a","ngbNavLink",""]],hostAttrs:["href",""],hostVars:14,hostBindings:function(t,e){1&t&&ya("click",function(t){return e.nav.click(e.navItem),t.preventDefault()}),2&t&&(Qa("id",e.navItem.domId),na("role",e.role?e.role:e.nav.roles?"tab":void 0)("tabindex",e.navItem.disabled?-1:void 0)("aria-controls",e.navItem.isPanelInDom()?e.navItem.panelDomId:null)("aria-selected",e.navItem.active)("aria-disabled",e.navItem.disabled),Oa("nav-link",!0)("nav-item",e.hasNavItemClass())("active",e.navItem.active)("disabled",e.navItem.disabled))}}),t=cx([ux(0,ot("role"))],t),t})(),Rk=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[Fd]]}),t})(),Fk=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[Fd]]}),t})(),Mk=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[Fd]]}),t})(),Lk=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[Fd]]}),t})(),$k=(()=>{let t=class{constructor(){this.max=10,this.readonly=!1,this.resettable=!1}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:function(){return new t},token:t,providedIn:"root"}),t})();const Ok={provide:Vb,useExisting:_t(()=>Ik),multi:!0};let Ik=(()=>{let t=class{constructor(t,e){this._changeDetectorRef=e,this.contexts=[],this.disabled=!1,this.hover=new Zc,this.leave=new Zc,this.rateChange=new Zc(!0),this.onChange=t=>{},this.onTouched=()=>{},this.max=t.max,this.readonly=t.readonly}ariaValueText(){return`${this.nextRate} out of ${this.max}`}enter(t){this.readonly||this.disabled||this._updateState(t),this.hover.emit(t)}handleBlur(){this.onTouched()}handleClick(t){this.readonly||this.disabled||this.update(this.resettable&&this.rate===t?0:t)}handleKeyDown(t){switch(t.which){case FS.ArrowDown:case FS.ArrowLeft:this.update(this.rate-1);break;case FS.ArrowUp:case FS.ArrowRight:this.update(this.rate+1);break;case FS.Home:this.update(0);break;case FS.End:this.update(this.max);break;default:return}t.preventDefault()}ngOnChanges(t){t.rate&&this.update(this.rate)}ngOnInit(){this.contexts=Array.from({length:this.max},(t,e)=>({fill:0,index:e})),this._updateState(this.rate)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}reset(){this.leave.emit(this.nextRate),this._updateState(this.rate)}setDisabledState(t){this.disabled=t}update(t,e=!0){const n=function(t,e,n=0){return Math.max(Math.min(t,e),n)}(t,this.max,0);this.readonly||this.disabled||this.rate===n||(this.rate=n,this.rateChange.emit(this.rate)),e&&(this.onChange(this.rate),this.onTouched()),this._updateState(this.rate)}writeValue(t){this.update(t,!1),this._changeDetectorRef.markForCheck()}_getFillValue(t){const e=this.nextRate-t;return e>=1?100:e<1&&e>0?parseInt((100*e).toFixed(2),10):0}_updateState(t){this.nextRate=t,this.contexts.forEach((t,e)=>t.fill=this._getFillValue(e))}};return t.\u0275fac=function(e){return new(e||t)(oa($k),oa(_o))},t.\u0275cmp=pe({type:t,selectors:[["ngb-rating"]],contentQueries:function(t,e,n){if(1&t&&gu(n,$c,!0),2&t){let t;hu(t=vu())&&(e.starTemplateFromContent=t.first)}},hostAttrs:["role","slider","aria-valuemin","0",1,"d-inline-flex"],hostVars:5,hostBindings:function(t,e){1&t&&ya("blur",function(){return e.handleBlur()})("keydown",function(t){return e.handleKeyDown(t)})("mouseleave",function(){return e.reset()}),2&t&&(Qa("tabindex",e.disabled?-1:0),na("aria-valuemax",e.max)("aria-valuenow",e.nextRate)("aria-valuetext",e.ariaValueText())("aria-disabled",!!e.readonly||null))},inputs:{max:"max",readonly:"readonly",rate:"rate",resettable:"resettable",starTemplate:"starTemplate"},outputs:{hover:"hover",leave:"leave",rateChange:"rateChange"},features:[oc([Ok]),Ve],decls:3,vars:1,consts:[["t",""],["ngFor","",3,"ngForOf"],[1,"sr-only"],[3,"mouseenter","click"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(t,e){1&t&&(ra(0,wC,1,1,"ng-template",null,0,xu),ra(2,_C,4,5,"ng-template",1)),2&t&&(gs(2),la("ngForOf",e.contexts))},directives:[Sd,Rd],encapsulation:2,changeDetection:0}),t})(),Nk=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[Fd]]}),t})(),Pk=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[Fd]]}),t})();class Bk{constructor(t,e,n){this.hour=HC(t),this.minute=HC(e),this.second=HC(n)}changeHour(t=1){this.updateHour((isNaN(this.hour)?0:this.hour)+t)}updateHour(t){this.hour=WC(t)?(t<0?24+t:t)%24:NaN}changeMinute(t=1){this.updateMinute((isNaN(this.minute)?0:this.minute)+t)}updateMinute(t){WC(t)?(this.minute=t%60<0?60+t%60:t%60,this.changeHour(Math.floor(t/60))):this.minute=NaN}changeSecond(t=1){this.updateSecond((isNaN(this.second)?0:this.second)+t)}updateSecond(t){WC(t)?(this.second=t<0?60+t%60:t%60,this.changeMinute(Math.floor(t/60))):this.second=NaN}isValid(t=!0){return WC(this.hour)&&WC(this.minute)&&(!t||WC(this.second))}toString(){return`${this.hour||0}:${this.minute||0}:${this.second||0}`}}let Uk=(()=>{let t=class{constructor(){this.meridian=!1,this.spinners=!0,this.seconds=!1,this.hourStep=1,this.minuteStep=1,this.secondStep=1,this.disabled=!1,this.readonlyInputs=!1,this.size="medium"}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:function(){return new t},token:t,providedIn:"root"}),t})();function Vk(){return new jk}let Hk=(()=>{let t=class{};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:Vk,token:t,providedIn:"root"}),t})(),jk=(()=>{let t=class extends Hk{fromModel(t){return t&&GC(t.hour)&&GC(t.minute)?{hour:t.hour,minute:t.minute,second:GC(t.second)?t.second:null}:null}toModel(t){return t&&GC(t.hour)&&GC(t.minute)?{hour:t.hour,minute:t.minute,second:GC(t.second)?t.second:null}:null}};return t.\u0275fac=function(e){return pE(e||t)},t.\u0275prov=ut({token:t,factory:function(e){return t.\u0275fac(e)}}),t})(),zk=(()=>{let t=class{};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:function(){return t=Yt(Fu),new Wk(t);var t},token:t,providedIn:"root"}),t})(),Wk=(()=>{let t=class extends zk{constructor(t){super(),this._periods=jh(t,Bh.Standalone,Uh.Narrow)}getMorningPeriod(){return this._periods[0]}getAfternoonPeriod(){return this._periods[1]}};return t.\u0275fac=function(e){return new(e||t)(Yt(Fu))},t.\u0275prov=ut({token:t,factory:function(e){return t.\u0275fac(e)}}),t=cx([ux(0,nt(Fu))],t),t})();const Gk=/[^0-9]/g,Kk={provide:Vb,useExisting:_t(()=>qk),multi:!0};let qk=(()=>{let t=class{constructor(t,e,n,i){this._config=t,this._ngbTimeAdapter=e,this._cd=n,this.i18n=i,this.onChange=t=>{},this.onTouched=()=>{},this.meridian=t.meridian,this.spinners=t.spinners,this.seconds=t.seconds,this.hourStep=t.hourStep,this.minuteStep=t.minuteStep,this.secondStep=t.secondStep,this.disabled=t.disabled,this.readonlyInputs=t.readonlyInputs,this.size=t.size}set hourStep(t){this._hourStep=GC(t)?t:this._config.hourStep}get hourStep(){return this._hourStep}set minuteStep(t){this._minuteStep=GC(t)?t:this._config.minuteStep}get minuteStep(){return this._minuteStep}set secondStep(t){this._secondStep=GC(t)?t:this._config.secondStep}get secondStep(){return this._secondStep}writeValue(t){const e=this._ngbTimeAdapter.fromModel(t);this.model=e?new Bk(e.hour,e.minute,e.second):new Bk,this.seconds||e&&WC(e.second)||(this.model.second=0),this._cd.markForCheck()}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t}changeHour(t){this.model.changeHour(t),this.propagateModelChange()}changeMinute(t){this.model.changeMinute(t),this.propagateModelChange()}changeSecond(t){this.model.changeSecond(t),this.propagateModelChange()}updateHour(t){const e=this.model.hour>=12,n=HC(t);this.model.updateHour(this.meridian&&(e&&n<12||!e&&12===n)?n+12:n),this.propagateModelChange()}updateMinute(t){this.model.updateMinute(HC(t)),this.propagateModelChange()}updateSecond(t){this.model.updateSecond(HC(t)),this.propagateModelChange()}toggleMeridian(){this.meridian&&this.changeHour(12)}formatInput(t){t.value=t.value.replace(Gk,"")}formatHour(t){return WC(t)?qC(this.meridian?t%12==0?12:t%12:t%24):qC(NaN)}formatMinSec(t){return qC(WC(t)?t:NaN)}get isSmallSize(){return"small"===this.size}get isLargeSize(){return"large"===this.size}ngOnChanges(t){t.seconds&&!this.seconds&&this.model&&!WC(this.model.second)&&(this.model.second=0,this.propagateModelChange(!1))}propagateModelChange(t=!0){t&&this.onTouched(),this.model.isValid(this.seconds)?this.onChange(this._ngbTimeAdapter.toModel({hour:this.model.hour,minute:this.model.minute,second:this.model.second})):this.onChange(this._ngbTimeAdapter.toModel(null))}};return t.\u0275fac=function(e){return new(e||t)(oa(Uk),oa(Hk),oa(_o),oa(zk))},t.\u0275cmp=pe({type:t,selectors:[["ngb-timepicker"]],inputs:{meridian:"meridian",spinners:"spinners",seconds:"seconds",hourStep:"hourStep",minuteStep:"minuteStep",secondStep:"secondStep",readonlyInputs:"readonlyInputs",size:"size"},features:[oc([Kk]),Ve],decls:16,vars:25,consts:function(){let t,e,n,i,r,s,o,a,l,c,u,h,d,f;return t=$localize`:@@ngb.timepicker.HH␟ce676ab1d6d98f85c836381cf100a4a91ef95a1f␟4043638465245303811:HH`,e=$localize`:@@ngb.timepicker.hours␟3bbce5fef7e1151da052a4e529453edb340e3912␟8070396816726827304:Hours`,n=$localize`:@@ngb.timepicker.MM␟72c8edf6a50068a05bde70991e36b1e881f4ca54␟1647282246509919852:MM`,i=$localize`:@@ngb.timepicker.minutes␟41e62daa962947c0d23ded0981975d1bddf0bf38␟5531237363767747080:Minutes`,r=$localize`:@@ngb.timepicker.increment-hours␟cb74bc1d625a6c1742f0d7d47306cf495780c218␟5939278348542933629:Increment hours`,s=$localize`:@@ngb.timepicker.decrement-hours␟147c7a19429da7d999e247d22e33fee370b1691b␟3651829882940481818:Decrement hours`,o=$localize`:@@ngb.timepicker.increment-minutes␟f5a4a3bc05e053f6732475d0e74875ec01c3a348␟180147720391025024:Increment minutes`,a=$localize`:@@ngb.timepicker.decrement-minutes␟c1a6899e529c096da5b660385d4e77fe1f7ad271␟7447789825403243588:Decrement minutes`,l=$localize`:@@ngb.timepicker.SS␟ebe38d36a40a2383c5fefa9b4608ffbda08bd4a3␟3628127143071124194:SS`,c=$localize`:@@ngb.timepicker.seconds␟4f2ed9e71a7c981db3e50ae2fedb28aff2ec4e6c␟8874012390997067175:Seconds`,u=$localize`:@@ngb.timepicker.increment-seconds␟912322ecee7d659d04dcf494a70e22e49d334b26␟5364772110539092174:Increment seconds`,h=$localize`:@@ngb.timepicker.decrement-seconds␟5db47ac104294243a70eb9124fbea9d0004ddf69␟753633511487974857:Decrement seconds`,d=$localize`:@@ngb.timepicker.PM␟8d6e691e10306c1b34c6b26805151aaea320ef7f␟3564199131264287502:${"\ufffd0\ufffd"}:INTERPOLATION:`,f=$localize`:@@ngb.timepicker.AM␟69a1f176a93998876952adac57c3bc3863b6105e␟4592818992509942761:${"\ufffd0\ufffd"}:INTERPOLATION:`,[[3,"disabled"],[1,"ngb-tp"],[1,"ngb-tp-input-container","ngb-tp-hour"],["tabindex","-1","type","button","class","btn btn-link",3,"btn-sm","btn-lg","disabled","click",4,"ngIf"],["type","text","maxlength","2","inputmode","numeric","placeholder",t,"aria-label",e,1,"ngb-tp-input","form-control",3,"value","readOnly","disabled","change","input","keydown.ArrowUp","keydown.ArrowDown"],[1,"ngb-tp-spacer"],[1,"ngb-tp-input-container","ngb-tp-minute"],["type","text","maxlength","2","inputmode","numeric","placeholder",n,"aria-label",i,1,"ngb-tp-input","form-control",3,"value","readOnly","disabled","change","input","keydown.ArrowUp","keydown.ArrowDown"],["class","ngb-tp-spacer",4,"ngIf"],["class","ngb-tp-input-container ngb-tp-second",4,"ngIf"],["class","ngb-tp-meridian",4,"ngIf"],["tabindex","-1","type","button",1,"btn","btn-link",3,"disabled","click"],[1,"chevron","ngb-tp-chevron"],[1,"sr-only"],r,[1,"chevron","ngb-tp-chevron","bottom"],s,o,a,[1,"ngb-tp-input-container","ngb-tp-second"],["type","text","maxlength","2","inputmode","numeric","placeholder",l,"aria-label",c,1,"ngb-tp-input","form-control",3,"value","readOnly","disabled","change","input","keydown.ArrowUp","keydown.ArrowDown"],u,h,[1,"ngb-tp-meridian"],["type","button",1,"btn","btn-outline-primary",3,"disabled","click"],[4,"ngIf","ngIfElse"],["am",""],d,f]},template:function(t,e){1&t&&(ua(0,"fieldset",0),ua(1,"div",1),ua(2,"div",2),ra(3,CC,4,7,"button",3),ua(4,"input",4),ya("change",function(t){return e.updateHour(t.target.value)})("input",function(t){return e.formatInput(t.target)})("keydown.ArrowUp",function(t){return e.changeHour(e.hourStep),t.preventDefault()})("keydown.ArrowDown",function(t){return e.changeHour(-e.hourStep),t.preventDefault()}),ha(),ra(5,SC,4,7,"button",3),ha(),ua(6,"div",5),qa(7,":"),ha(),ua(8,"div",6),ra(9,kC,4,7,"button",3),ua(10,"input",7),ya("change",function(t){return e.updateMinute(t.target.value)})("input",function(t){return e.formatInput(t.target)})("keydown.ArrowUp",function(t){return e.changeMinute(e.minuteStep),t.preventDefault()})("keydown.ArrowDown",function(t){return e.changeMinute(-e.minuteStep),t.preventDefault()}),ha(),ra(11,EC,4,7,"button",3),ha(),ra(12,AC,2,0,"div",8),ra(13,RC,4,9,"div",9),ra(14,FC,1,0,"div",8),ra(15,$C,5,9,"div",10),ha(),ha()),2&t&&(Oa("disabled",e.disabled),la("disabled",e.disabled),gs(3),la("ngIf",e.spinners),gs(1),Oa("form-control-sm",e.isSmallSize)("form-control-lg",e.isLargeSize),la("value",e.formatHour(null==e.model?null:e.model.hour))("readOnly",e.readonlyInputs)("disabled",e.disabled),gs(1),la("ngIf",e.spinners),gs(4),la("ngIf",e.spinners),gs(1),Oa("form-control-sm",e.isSmallSize)("form-control-lg",e.isLargeSize),la("value",e.formatMinSec(null==e.model?null:e.model.minute))("readOnly",e.readonlyInputs)("disabled",e.disabled),gs(1),la("ngIf",e.spinners),gs(1),la("ngIf",e.seconds),gs(1),la("ngIf",e.seconds),gs(1),la("ngIf",e.meridian),gs(1),la("ngIf",e.meridian))},directives:[Ed],styles:['ngb-timepicker{font-size:1rem}.ngb-tp{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.ngb-tp-input-container{width:4em}.ngb-tp-chevron::before{border-style:solid;border-width:.29em .29em 0 0;content:"";display:inline-block;height:.69em;left:.05em;position:relative;top:.15em;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);vertical-align:middle;width:.69em}.ngb-tp-chevron.bottom:before{top:-.3em;-webkit-transform:rotate(135deg);transform:rotate(135deg)}.ngb-tp-input{text-align:center}.ngb-tp-hour,.ngb-tp-meridian,.ngb-tp-minute,.ngb-tp-second{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:distribute;justify-content:space-around}.ngb-tp-spacer{width:1em;text-align:center}'],encapsulation:2}),t})(),Yk=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[Fd]]}),t})(),Xk=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[Fd]]}),t})(),Jk=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)}}),t})(),Qk=(()=>{let t=class{constructor(){this.highlightClass="ngb-highlight"}ngOnChanges(t){const e=jC(this.result),n=(Array.isArray(this.term)?this.term:[this.term]).map(t=>jC(t).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")).filter(t=>t);this.parts=n.length?e.split(new RegExp(`(${n.join("|")})`,"gmi")):[e]}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["ngb-highlight"]],inputs:{highlightClass:"highlightClass",result:"result",term:"term"},features:[Ve],decls:1,vars:1,consts:[["ngFor","",3,"ngForOf"],[3,"class",4,"ngIf","ngIfElse"],["even",""]],template:function(t,e){1&t&&ra(0,NC,3,2,"ng-template",0),2&t&&la("ngForOf",e.parts)},directives:[Sd,Ed],styles:[".ngb-highlight{font-weight:700}"],encapsulation:2,changeDetection:0}),t})(),Zk=(()=>{let t=class{constructor(){this.activeIdx=0,this.focusFirst=!0,this.formatter=jC,this.selectEvent=new Zc,this.activeChangeEvent=new Zc}hasActive(){return this.activeIdx>-1&&this.activeIdx=0?this.id+"-"+this.activeIdx:void 0)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["ngb-typeahead-window"]],hostAttrs:["role","listbox",1,"dropdown-menu","show"],hostVars:1,hostBindings:function(t,e){1&t&&ya("mousedown",function(t){return t.preventDefault()}),2&t&&Qa("id",e.id)},inputs:{focusFirst:"focusFirst",formatter:"formatter",id:"id",results:"results",term:"term",resultTemplate:"resultTemplate"},outputs:{selectEvent:"select",activeChangeEvent:"activeChange"},exportAs:["ngbTypeaheadWindow"],decls:3,vars:1,consts:[["rt",""],["ngFor","",3,"ngForOf"],[3,"result","term"],["type","button","role","option",1,"dropdown-item",3,"id","mouseenter","click"],[3,"ngTemplateOutlet","ngTemplateOutletContext"]],template:function(t,e){1&t&&(ra(0,PC,1,2,"ng-template",null,0,xu),ra(2,VC,2,9,"ng-template",1)),2&t&&(gs(2),la("ngForOf",e.results))},directives:[Sd,Qk,Rd],encapsulation:2}),t})();const tE=new Pt("live announcer delay",{providedIn:"root",factory:function(){return 100}});function eE(t,e=!1){let n=t.body.querySelector("#ngb-live");return null==n&&e&&(n=t.createElement("div"),n.setAttribute("id","ngb-live"),n.setAttribute("aria-live","polite"),n.setAttribute("aria-atomic","true"),n.classList.add("sr-only"),t.body.appendChild(n)),n}let nE=(()=>{let t=class{constructor(t,e){this._document=t,this._delay=e}ngOnDestroy(){const t=eE(this._document);t&&t.parentElement.removeChild(t)}say(t){const e=eE(this._document,!0),n=this._delay;if(null!=e){e.textContent="";const i=()=>e.textContent=t;null===n?i():setTimeout(i,n)}}};return t.\u0275fac=function(e){return new(e||t)(Yt(wh),Yt(tE))},t.\u0275prov=ut({factory:function(){return new t(Yt(wh),Yt(tE))},token:t,providedIn:"root"}),t=cx([ux(0,nt(wh)),ux(1,nt(tE))],t),t})(),iE=(()=>{let t=class{constructor(){this.editable=!0,this.focusFirst=!0,this.showHint=!1,this.placement=["bottom-left","bottom-right","top-left","top-right"]}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({factory:function(){return new t},token:t,providedIn:"root"}),t})();const rE={provide:Vb,useExisting:_t(()=>oE),multi:!0};let sE=0,oE=(()=>{let t=class{constructor(t,e,n,i,r,s,o,a,l,c,u,h){this._elementRef=t,this._renderer=n,this._live=a,this._document=l,this._ngZone=c,this._changeDetector=u,this._subscription=null,this._closed$=new C,this._inputValueBackup=null,this._windowRef=null,this.autocomplete="off",this.placement="bottom-left",this.selectItem=new Zc,this.activeDescendant=null,this.popupId="ngb-typeahead-"+sE++,this._onTouched=()=>{},this._onChange=t=>{},this.container=s.container,this.editable=s.editable,this.focusFirst=s.focusFirst,this.showHint=s.showHint,this.placement=s.placement,this._valueChanges=E_(t.nativeElement,"input").pipe(E(t=>t.target.value)),this._resubscribeTypeahead=new Zg(null),this._popupService=new dk(Zk,i,e,n,r,h),this._zoneSubscription=o.onStable.subscribe(()=>{this.isPopupOpen()&&zS(this._elementRef.nativeElement,this._windowRef.location.nativeElement,this.placement,"body"===this.container)})}ngOnInit(){const t=this._valueChanges.pipe(Um(t=>{this._inputValueBackup=this.showHint?t:null,this._onChange(this.editable?t:void 0)})).pipe(this.ngbTypeahead),e=this._resubscribeTypeahead.pipe(km(()=>t));this._subscription=this._subscribeToUserInput(e)}ngOnDestroy(){this._closePopup(),this._unsubscribeFromUserInput(),this._zoneSubscription.unsubscribe()}registerOnChange(t){this._onChange=t}registerOnTouched(t){this._onTouched=t}writeValue(t){this._writeInputValue(this._formatItemForInput(t)),this.showHint&&(this._inputValueBackup=t)}setDisabledState(t){this._renderer.setProperty(this._elementRef.nativeElement,"disabled",t)}dismissPopup(){this.isPopupOpen()&&(this._resubscribeTypeahead.next(null),this._closePopup(),this.showHint&&null!==this._inputValueBackup&&this._writeInputValue(this._inputValueBackup),this._changeDetector.markForCheck())}isPopupOpen(){return null!=this._windowRef}handleBlur(){this._resubscribeTypeahead.next(null),this._onTouched()}handleKeyDown(t){if(this.isPopupOpen())switch(t.which){case FS.ArrowDown:t.preventDefault(),this._windowRef.instance.next(),this._showHint();break;case FS.ArrowUp:t.preventDefault(),this._windowRef.instance.prev(),this._showHint();break;case FS.Enter:case FS.Tab:const e=this._windowRef.instance.getActive();KC(e)&&(t.preventDefault(),t.stopPropagation(),this._selectResult(e)),this._closePopup()}}_openPopup(){this.isPopupOpen()||(this._inputValueBackup=this._elementRef.nativeElement.value,this._windowRef=this._popupService.open(),this._windowRef.instance.id=this.popupId,this._windowRef.instance.selectEvent.subscribe(t=>this._selectResultClosePopup(t)),this._windowRef.instance.activeChangeEvent.subscribe(t=>this.activeDescendant=t),"body"===this.container&&this._document.querySelector(this.container).appendChild(this._windowRef.location.nativeElement),this._changeDetector.markForCheck(),PS(this._ngZone,this._document,"outside",()=>this.dismissPopup(),this._closed$,[this._elementRef.nativeElement,this._windowRef.location.nativeElement]))}_closePopup(){this._closed$.next(),this._popupService.close(),this._windowRef=null,this.activeDescendant=null}_selectResult(t){let e=!1;this.selectItem.emit({item:t,preventDefault:()=>{e=!0}}),this._resubscribeTypeahead.next(null),e||(this.writeValue(t),this._onChange(t))}_selectResultClosePopup(t){this._selectResult(t),this._closePopup()}_showHint(){var t;if(this.showHint&&(null===(t=this._windowRef)||void 0===t?void 0:t.instance.hasActive())&&null!=this._inputValueBackup){const t=this._inputValueBackup.toLowerCase(),e=this._formatItemForInput(this._windowRef.instance.getActive());t===e.substr(0,this._inputValueBackup.length).toLowerCase()?(this._writeInputValue(this._inputValueBackup+e.substr(this._inputValueBackup.length)),this._elementRef.nativeElement.setSelectionRange.apply(this._elementRef.nativeElement,[this._inputValueBackup.length,e.length])):this._writeInputValue(e)}}_formatItemForInput(t){return null!=t&&this.inputFormatter?this.inputFormatter(t):jC(t)}_writeInputValue(t){this._renderer.setProperty(this._elementRef.nativeElement,"value",jC(t))}_subscribeToUserInput(t){return t.subscribe(t=>{t&&0!==t.length?(this._openPopup(),this._windowRef.instance.focusFirst=this.focusFirst,this._windowRef.instance.results=t,this._windowRef.instance.term=this._elementRef.nativeElement.value,this.resultFormatter&&(this._windowRef.instance.formatter=this.resultFormatter),this.resultTemplate&&(this._windowRef.instance.resultTemplate=this.resultTemplate),this._windowRef.instance.resetActive(),this._windowRef.changeDetectorRef.detectChanges(),this._showHint()):this._closePopup();const e=t?t.length:0;this._live.say(0===e?"No results available":`${e} result${1===e?"":"s"} available`)})}_unsubscribeFromUserInput(){this._subscription&&this._subscription.unsubscribe(),this._subscription=null}};return t.\u0275fac=function(e){return new(e||t)(oa(uc),oa(Ic),oa(pc),oa(Bo),oa(cc),oa(iE),oa(ju),oa(nE),oa(wh),oa(ju),oa(_o),oa(lh))},t.\u0275dir=we({type:t,selectors:[["input","ngbTypeahead",""]],hostAttrs:["autocapitalize","off","autocorrect","off","role","combobox","aria-multiline","false"],hostVars:7,hostBindings:function(t,e){1&t&&ya("blur",function(){return e.handleBlur()})("keydown",function(t){return e.handleKeyDown(t)}),2&t&&(Qa("autocomplete",e.autocomplete),na("aria-autocomplete",e.showHint?"both":"list")("aria-activedescendant",e.activeDescendant)("aria-owns",e.isPopupOpen()?e.popupId:null)("aria-expanded",e.isPopupOpen()),Oa("open",e.isPopupOpen()))},inputs:{autocomplete:"autocomplete",placement:"placement",container:"container",editable:"editable",focusFirst:"focusFirst",showHint:"showHint",inputFormatter:"inputFormatter",ngbTypeahead:"ngbTypeahead",resultFormatter:"resultFormatter",resultTemplate:"resultTemplate"},outputs:{selectItem:"selectItem"},exportAs:["ngbTypeahead"],features:[oc([rE])]}),t=cx([ux(8,nt(wh))],t),t})(),aE=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[Fd]]}),t})();const lE=[XC,ZC,aS,lS,cS,tk,ck,_k,Rk,Fk,Mk,Lk,Nk,Yk,Xk,Jk,aE,Pk];let cE=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[lE,XC,ZC,aS,lS,cS,tk,ck,_k,Rk,Fk,Mk,Lk,Nk,Yk,Xk,Jk,aE,Pk]}),t})();const uE=Ei(gS),hE=Ei(AS),dE=Ei(KS),fE=Ei(qS),pE=Ei(jk);let gE=(()=>{class t{constructor(){this.restrictedPages=new Map([["users",Zx.USER_ROLE_ADMIN],["config",Zx.USER_ROLE_DEVELOPER],["modules",Zx.USER_ROLE_DEVELOPER],["apiexplorer",Zx.USER_ROLE_DEVELOPER]])}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function mE(t,e){if(1&t&&(fa(0,5),ua(1,"a",27),da(2,"img",28),ua(3,"span",12),qa(4),ha(),ha(),pa()),2&t){const t=xa().$implicit;la("ngbNavItem",t.navItem),gs(1),la("routerLink",t.routerLink),gs(1),Ea("src","/static/svg/",t.icon,".svg",yr),gs(2),Ya(t.label)}}function vE(t,e){1&t&&da(0,"hr")}function yE(t,e){if(1&t&&(ra(0,mE,5,4,"ng-container",26),ra(1,vE,1,0,"hr",25)),2&t){const t=e.$implicit;la("ngIf",xa().getSessionRole()<=t.minRole),gs(1),la("ngIf",t.separator)}}function bE(t,e){if(1&t&&(ua(0,"div",29),ua(1,"h2",30),da(2,"img",31),qa(3,"An error has occurred!"),ha(),ua(4,"h6",32),qa(5),ha(),ua(6,"p"),qa(7,"Please refresh the page to try again."),ha(),ha()),2&t){const t=xa();gs(5),Ya(t.error)}}function wE(t,e){1&t&&(ua(0,"div",33),da(1,"img",34),ha())}function xE(t,e){1&t&&da(0,"router-outlet")}const _E=function(){return["/"]},CE=function(){return["/login"]};let SE=(()=>{class t{constructor(t,e,n,i,r){var s;this.route=t,this.router=e,this.segment=n,this.consoleService=i,this.authService=r,this.loading=!0,this.error="",this.routes=[{navItem:"status",routerLink:["/status"],label:"Status",minRole:Zx.USER_ROLE_READONLY,icon:"status"},{navItem:"users",routerLink:["/users"],label:"User Management",minRole:Zx.USER_ROLE_ADMIN,icon:"user-management"},{navItem:"config",routerLink:["/config"],label:"Configuration",minRole:Zx.USER_ROLE_DEVELOPER,icon:"configuration"},{navItem:"modules",routerLink:["/modules"],label:"Runtime Modules",minRole:Zx.USER_ROLE_DEVELOPER,separator:!0,icon:"runtime-modules"},{navItem:"accounts",routerLink:["/accounts"],label:"Accounts",minRole:Zx.USER_ROLE_READONLY,icon:"accounts"},{navItem:"storage",routerLink:["/storage"],label:"Storage",minRole:Zx.USER_ROLE_READONLY,icon:"storage"},{navItem:"leaderboards",routerLink:["/leaderboards"],label:"Leaderboards",minRole:Zx.USER_ROLE_READONLY,icon:"leaderboard"},{navItem:"matches",routerLink:["/matches"],label:"Matches",minRole:Zx.USER_ROLE_READONLY,icon:"running-matches"},{navItem:"apiexplorer",routerLink:["/apiexplorer"],label:"API Explorer",minRole:Zx.USER_ROLE_DEVELOPER,icon:"api-explorer"}],this.loading=!1,this.routerSub=this.router.events.pipe(function(t){let e=arguments.length,n=p_;k(arguments[arguments.length-1])&&(n=arguments[arguments.length-1],e--);let i=null;e>=2&&(i=arguments[1]);let r=Number.POSITIVE_INFINITY;return e>=3&&(r=arguments[2]),function(e){return e.lift(new g_(t,i,r,n))}}(2e3)).subscribe(t=>{if(0===t.length)return;const e=t[t.length-1];e instanceof Gm&&(this.loading=!0),e instanceof Km&&(this.loading=!1),e instanceof qm&&(this.loading=!1),e instanceof Ym&&(this.loading=!1,this.error=e.error)}),this.segmentRouterSub=e.events.pipe((s=(t,e)=>!(e instanceof Km)||t.url===e.url,t=>t.lift(new x_(s,undefined)))).subscribe(t=>{t&&n.page(t.url)})}ngOnInit(){this.route.data.subscribe(t=>{this.error=t.error?t.error:""})}getSessionRole(){return this.authService.sessionRole}getUsername(){return this.authService.username}logout(){this.authService.logout()}ngOnDestroy(){this.segmentRouterSub.unsubscribe(),this.routerSub.unsubscribe()}onSidebarNavChange(t){}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(mb),oa(px),oa(Jx),oa(i_))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:40,vars:11,consts:[[1,"container-fluid"],[1,"row"],["ngbNav","",1,"col-md-2","d-none","d-md-block","sidebar","position-fixed","px-0",3,"navChange"],["sidenav","ngbNav"],[1,"flex-column","text-uppercase"],[3,"ngbNavItem"],[3,"routerLink"],["src","/static/svg/logo.svg","alt","","width","175","height","",1,"logo-full","mx-3","mt-3","mb-1"],["src","/static/svg/logo-icon.svg","alt","","width","32","height","",1,"logo-icon","mx-3","mt-3","mb-1"],["ngFor","",3,"ngForOf"],["href","https://cloud.heroiclabs.com","target","_blank",1,"nav-link"],["src","/static/svg/heroiccloud.svg","alt","","width","24","height","",1,"link-icon","mr-1"],[1,"link-text"],["href","https://heroiclabs.com/docs","target","_blank",1,"nav-link"],["src","/static/svg/docs.svg","alt","","width","24","height","",1,"link-icon","mr-1"],["href","https://forum.heroiclabs.com","target","_blank",1,"nav-link"],["src","/static/svg/forum.svg","alt","","width","24","height","",1,"link-icon","mr-1"],["href","https://heroiclabs.com/blog","target","_blank",1,"nav-link"],["src","/static/svg/blog.svg","alt","","width","24","height","",1,"link-icon","mr-1"],[1,"logged-in-as","nav-link","disabled"],["ngbNavLink","","routerLinkActive","active",3,"routerLink","click"],["src","/static/svg/log-out.svg","alt","","width","24","height","",1,"mr-1"],["role","main",1,"ml-sm-auto","col-md-10","col-lg-10","main-extended","px-4","py-4"],["class","mx-auto",4,"ngIf"],["class","loading mx-auto",4,"ngIf"],[4,"ngIf"],[3,"ngbNavItem",4,"ngIf"],["ngbNavLink","","routerLinkActive","active",3,"routerLink"],["alt","","width","24","height","",1,"link-icon","mr-1",3,"src"],[1,"mx-auto"],[1,"pb-2"],["src","/static/svg/red-triangle.svg",1,"mr-2",2,"width","1em","height","1em"],[1,"mr-2","d-inline","font-weight-bold"],[1,"loading","mx-auto"],["src","/static/spinner.svg",1,"p-1","loading"]],template:function(t,e){1&t&&(ua(0,"div",0),ua(1,"div",1),ua(2,"nav",2,3),ya("navChange",function(t){return e.onSidebarNavChange(t)}),ua(4,"div",4),fa(5,5),ua(6,"a",6),da(7,"img",7),da(8,"img",8),ha(),pa(),da(9,"hr"),ra(10,yE,2,2,"ng-template",9),da(11,"hr"),ua(12,"a",10),da(13,"img",11),ua(14,"span",12),qa(15,"Heroic Cloud"),ha(),ha(),ua(16,"a",13),da(17,"img",14),ua(18,"span",12),qa(19,"Documentation"),ha(),ha(),ua(20,"a",15),da(21,"img",16),ua(22,"span",12),qa(23,"Forum"),ha(),ha(),ua(24,"a",17),da(25,"img",18),ua(26,"span",12),qa(27,"Heroic Labs Blog"),ha(),ha(),da(28,"hr"),ua(29,"div",19),qa(30),ha(),fa(31,5),ua(32,"a",20),ya("click",function(){return e.logout()}),da(33,"img",21),ua(34,"span",12),qa(35,"Logout"),ha(),ha(),pa(),ha(),ha(),ua(36,"main",22),ra(37,bE,8,1,"div",23),ra(38,wE,2,0,"div",24),ra(39,xE,1,0,"router-outlet",25),ha(),ha(),ha()),2&t&&(gs(5),la("ngbNavItem","logo"),gs(1),la("routerLink",Kc(9,_E)),gs(4),la("ngForOf",e.routes),gs(20),Xa("Logged in as: ",e.getUsername(),""),gs(1),la("ngbNavItem","logout"),gs(1),la("routerLink",Kc(10,CE)),gs(5),la("ngIf",e.error),gs(1),la("ngIf",!e.error&&e.loading),gs(1),la("ngIf",!e.error&&!e.loading))},directives:[Dk,Ak,yb,Sd,Tk,wb,Ed,xb],styles:[".nav-link.no-active[_ngcontent-%COMP%]{background-color:initial!important}.nav-item[_ngcontent-%COMP%] hr[_ngcontent-%COMP%]{border-top-color:#708090}.sidebar[_ngcontent-%COMP%]{background-color:#333564;position:fixed;top:0;bottom:0;left:0;z-index:100;font-family:Montserrat,sans-serif;overflow-y:auto}.sidebar[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]{color:#fff;font-size:12px;letter-spacing:.1em;opacity:.6;font-weight:500!important}.sidebar[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]:hover{opacity:1;background-color:hsla(0,0%,88.2%,.1)}.sidebar[_ngcontent-%COMP%] hr[_ngcontent-%COMP%]{border-color:#fff;opacity:.2}.active[_ngcontent-%COMP%]{opacity:1}.nav-link.active[_ngcontent-%COMP%]{opacity:1;color:#a69bff}.navbar-collapse[_ngcontent-%COMP%]{letter-spacing:0;text-transform:capitalize}.logo-icon[_ngcontent-%COMP%]{display:none}.link-text[_ngcontent-%COMP%]{padding-left:4px}@media screen and (max-width:1200px){.main-extended[_ngcontent-%COMP%]{width:94.333333%!important;max-width:94.333333%!important;flex:0 0 94.333333%!important}.sidebar[_ngcontent-%COMP%]{min-width:65px!important;width:5.66%!important;max-width:5.66%!important}.sidebar[_ngcontent-%COMP%] .logo-full[_ngcontent-%COMP%]{display:none}.sidebar[_ngcontent-%COMP%] .logo-icon[_ngcontent-%COMP%]{display:block}.sidebar[_ngcontent-%COMP%] .link-icon[_ngcontent-%COMP%]{width:30px}.sidebar[_ngcontent-%COMP%] .link-text[_ngcontent-%COMP%], .sidebar[_ngcontent-%COMP%] .logged-in-as[_ngcontent-%COMP%]{display:none}}"]}),t})(),kE=(()=>{class t{constructor(t,e,n){this.authService=t,this.router=e,this.globals=n}canActivate(t,e){return!0}canActivateChild(t,e){const n=this.globals.restrictedPages.get(t.url[0].path);return!(null!==n&&n{const e=t.element,n=this._document.createComment("dom-portal");e.parentNode.insertBefore(n,e),this.outletElement.appendChild(e),super.setDisposeFn(()=>{n.parentNode&&n.parentNode.replaceChild(e,n)})},this._document=r}attachComponentPortal(t){const e=(t.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(t.component);let n;return t.viewContainerRef?(n=t.viewContainerRef.createComponent(e,t.viewContainerRef.length,t.injector||t.viewContainerRef.injector),this.setDisposeFn(()=>n.destroy())):(n=e.create(t.injector||this._defaultInjector),this._appRef.attachView(n.hostView),this.setDisposeFn(()=>{this._appRef.detachView(n.hostView),n.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(n)),n}attachTemplatePortal(t){let e=t.viewContainerRef,n=e.createEmbeddedView(t.templateRef,t.context);return n.rootNodes.forEach(t=>this.outletElement.appendChild(t)),n.detectChanges(),this.setDisposeFn(()=>{let t=e.indexOf(n);-1!==t&&e.remove(t)}),n}dispose(){super.dispose(),null!=this.outletElement.parentNode&&this.outletElement.parentNode.removeChild(this.outletElement)}_getComponentRootNode(t){return t.hostView.rootNodes[0]}}{}class FE{constructor(t,e){this.dueTime=t,this.scheduler=e}call(t,e){return e.subscribe(new ME(t,this.dueTime,this.scheduler))}}class ME extends p{constructor(t,e,n){super(t),this.dueTime=e,this.scheduler=n,this.debouncedSubscription=null,this.lastValue=null,this.hasValue=!1}_next(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(LE,this.dueTime,this))}_complete(){this.debouncedNext(),this.destination.complete()}debouncedNext(){if(this.clearDebounce(),this.hasValue){const{lastValue:t}=this;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}}clearDebounce(){const t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)}}function LE(t){t.debouncedNext()}function $E(){}var OE=function(t){return null==t?$E:function(){return this.querySelector(t)}};function IE(){return[]}var NE=function(t){return null==t?IE:function(){return this.querySelectorAll(t)}},PE=function(t){return function(){return this.matches(t)}},BE=function(t){return new Array(t.length)};function UE(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function VE(t,e,n,i,r,s){for(var o,a=0,l=e.length,c=s.length;ae?1:t>=e?0:NaN}UE.prototype={constructor:UE,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var zE="http://www.w3.org/1999/xhtml",WE={svg:"http://www.w3.org/2000/svg",xhtml:zE,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},GE=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),WE.hasOwnProperty(e)?{space:WE[e],local:t}:t};function KE(t){return function(){this.removeAttribute(t)}}function qE(t){return function(){this.removeAttributeNS(t.space,t.local)}}function YE(t,e){return function(){this.setAttribute(t,e)}}function XE(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function JE(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function QE(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}var ZE=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function tA(t){return function(){this.style.removeProperty(t)}}function eA(t,e,n){return function(){this.style.setProperty(t,e,n)}}function nA(t,e,n){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}function iA(t,e){return t.style.getPropertyValue(e)||ZE(t).getComputedStyle(t,null).getPropertyValue(e)}function rA(t){return function(){delete this[t]}}function sA(t,e){return function(){this[t]=e}}function oA(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function aA(t){return t.trim().split(/^|\s+/)}function lA(t){return t.classList||new cA(t)}function cA(t){this._node=t,this._names=aA(t.getAttribute("class")||"")}function uA(t,e){for(var n=lA(t),i=-1,r=e.length;++i=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var kA=function(t){var e=GE(t);return(e.local?SA:CA)(e)};function EA(){return null}function AA(){var t=this.parentNode;t&&t.removeChild(this)}function DA(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function TA(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}var RA={},FA=null;function MA(t,e,n){return t=LA(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function LA(t,e,n){return function(i){var r=FA;FA=i;try{t.call(this,this.__data__,e,n)}finally{FA=r}}}function $A(t){return t.trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}})}function OA(t){return function(){var e=this.__on;if(e){for(var n,i=0,r=-1,s=e.length;i=x&&(x=w+1);!(b=v[x])&&++x=0;)(i=r[s])&&(o&&4^i.compareDocumentPosition(o)&&o.parentNode.insertBefore(i,o),o=i);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=jE);for(var n=this._groups,i=n.length,r=new Array(i),s=0;s1?this.each((null==e?tA:"function"==typeof e?nA:eA)(t,e,null==n?"":n)):iA(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?rA:"function"==typeof e?oA:sA)(t,e)):this.node()[t]},classed:function(t,e){var n=aA(t+"");if(arguments.length<2){for(var i=lA(this.node()),r=-1,s=n.length;++r=0&&(n=t.slice(i+1),t=t.slice(0,i)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})}function YA(t,e){for(var n,i=0,r=t.length;i0)for(var n,i,r=new Array(n),s=0;s>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?xD(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?xD(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=uD.exec(t))?new SD(e[1],e[2],e[3],1):(e=hD.exec(t))?new SD(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=dD.exec(t))?xD(e[1],e[2],e[3],e[4]):(e=fD.exec(t))?xD(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=pD.exec(t))?DD(e[1],e[2]/100,e[3]/100,1):(e=gD.exec(t))?DD(e[1],e[2]/100,e[3]/100,e[4]):mD.hasOwnProperty(t)?wD(mD[t]):"transparent"===t?new SD(NaN,NaN,NaN,0):null}function wD(t){return new SD(t>>16&255,t>>8&255,255&t,1)}function xD(t,e,n,i){return i<=0&&(t=e=n=NaN),new SD(t,e,n,i)}function _D(t){return t instanceof iD||(t=bD(t)),t?new SD((t=t.rgb()).r,t.g,t.b,t.opacity):new SD}function CD(t,e,n,i){return 1===arguments.length?_D(t):new SD(t,e,n,null==i?1:i)}function SD(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function kD(){return"#"+AD(this.r)+AD(this.g)+AD(this.b)}function ED(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function AD(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function DD(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new RD(t,e,n,i)}function TD(t){if(t instanceof RD)return new RD(t.h,t.s,t.l,t.opacity);if(t instanceof iD||(t=bD(t)),!t)return new RD;if(t instanceof RD)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),s=Math.max(e,n,i),o=NaN,a=s-r,l=(s+r)/2;return a?(o=e===s?(n-i)/a+6*(n0&&l<1?0:o,new RD(o,a,l,t.opacity)}function RD(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function FD(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function MD(t,e,n,i,r){var s=t*t,o=s*t;return((1-3*t+3*s-o)*e+(4-6*s+3*o)*n+(1+3*t+3*s-3*o)*i+o*r)/6}eD(iD,bD,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:vD,formatHex:vD,formatHsl:function(){return TD(this).formatHsl()},formatRgb:yD,toString:yD}),eD(SD,CD,nD(iD,{brighter:function(t){return t=null==t?sD:Math.pow(sD,t),new SD(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?rD:Math.pow(rD,t),new SD(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:kD,formatHex:kD,formatRgb:ED,toString:ED})),eD(RD,function(t,e,n,i){return 1===arguments.length?TD(t):new RD(t,e,n,null==i?1:i)},nD(iD,{brighter:function(t){return t=null==t?sD:Math.pow(sD,t),new RD(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?rD:Math.pow(rD,t),new RD(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new SD(FD(t>=240?t-240:t+120,r,i),FD(t,r,i),FD(t<120?t+240:t-120,r,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var LD=function(t){return function(){return t}};function $D(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):LD(isNaN(t)?e:t)}var OD=function t(e){var n=function(t){return 1==(t=+t)?$D:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}(e,n,t):LD(isNaN(e)?n:e)}}(e);function i(t,e){var i=n((t=CD(t)).r,(e=CD(e)).r),r=n(t.g,e.g),s=n(t.b,e.b),o=$D(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=r(e),t.b=s(e),t.opacity=o(e),t+""}}return i.gamma=t,i}(1);function ID(t){return function(e){var n,i,r=e.length,s=new Array(r),o=new Array(r),a=new Array(r);for(n=0;n=1?(n=1,e-1):Math.floor(n*e),r=t[i],s=t[i+1];return MD((n-i/e)*e,i>0?t[i-1]:2*r-s,r,s,is&&(r=e.slice(s,r),a[o]?a[o]+=r:a[++o]=r),(n=n[0])===(i=i[0])?a[o]?a[o]+=i:a[++o]=i:(a[++o]=null,l.push({i:o,x:HD(n,i)})),s=WD.lastIndex;return s=0&&e._call.call(null,t),e=e._next;--JD}()}finally{JD=0,function(){for(var t,e,n=BD,i=1/0;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:BD=e);UD=t,hT(i)}(),eT=0}}function uT(){var t=iT.now(),e=t-tT;e>1e3&&(nT-=e,tT=t)}function hT(t){JD||(QD&&(QD=clearTimeout(QD)),t-eT>24?(t<1/0&&(QD=setTimeout(cT,t-iT.now()-nT)),ZD&&(ZD=clearInterval(ZD))):(ZD||(tT=iT.now(),ZD=setInterval(uT,1e3)),JD=1,rT(cT)))}aT.prototype=lT.prototype={constructor:aT,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?sT():+n)+(null==e?0:+e),this._next||UD===this||(UD?UD._next=this:BD=this,UD=this),this._call=t,this._time=n,hT()},stop:function(){this._call&&(this._call=null,this._time=1/0,hT())}};var dT=function(t,e,n){var i=new aT;return i.restart(function(n){i.stop(),t(n+e)},e=null==e?0:+e,n),i},fT=JA("start","end","cancel","interrupt"),pT=[],gT=function(t,e,n,i,r,s){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var i,r=t.__transition;function s(l){var c,u,h,d;if(1!==n.state)return a();for(c in r)if((d=r[c]).name===n.name){if(3===d.state)return dT(s);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete r[c]):+c0)throw new Error("too late; already scheduled");return n}function vT(t,e){var n=yT(t,e);if(n.state>3)throw new Error("too late; already running");return n}function yT(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}var bT,wT,xT,_T,CT=function(t,e){var n,i,r,s=t.__transition,o=!0;if(s){for(r in e=null==e?null:e+"",s)(n=s[r]).name===e?(i=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(i?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete s[r]):o=!1;o&&delete t.__transition}},ST=180/Math.PI,kT={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},ET=function(t,e,n,i,r,s){var o,a,l;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(l=t*n+e*i)&&(n-=t*l,i-=e*l),(a=Math.sqrt(n*n+i*i))&&(n/=a,i/=a,l/=a),t*i180?e+=360:e-t>180&&(t+=360),s.push({i:n.push(r(n)+"rotate(",null,i)-2,x:HD(t,e)})):e&&n.push(r(n)+"rotate("+e+i)}(s.rotate,o.rotate,a,l),function(t,e,n,s){t!==e?s.push({i:n.push(r(n)+"skewX(",null,i)-2,x:HD(t,e)}):e&&n.push(r(n)+"skewX("+e+i)}(s.skewX,o.skewX,a,l),function(t,e,n,i,s,o){if(t!==n||e!==i){var a=s.push(r(s)+"scale(",null,",",null,")");o.push({i:a-4,x:HD(t,n)},{i:a-2,x:HD(e,i)})}else 1===n&&1===i||s.push(r(s)+"scale("+n+","+i+")")}(s.scaleX,s.scaleY,o.scaleX,o.scaleY,a,l),s=o=null,function(t){for(var e,n=-1,i=l.length;++n=0&&(t=t.slice(0,e)),!t||"start"===t})}(e)?mT:vT;return function(){var o=s(this,t),a=o.on;a!==i&&(r=(i=a).copy()).on(e,n),o.on=r}}var XT=jA.prototype.constructor;function JT(t){return function(){this.style.removeProperty(t)}}function QT(t,e,n){return function(i){this.style.setProperty(t,e.call(this,i),n)}}function ZT(t,e,n){var i,r;function s(){var s=e.apply(this,arguments);return s!==r&&(i=(r=s)&&QT(t,s,n)),i}return s._value=e,s}function tR(t){return function(e){this.textContent=t.call(this,e)}}function eR(t){var e,n;function i(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&tR(i)),e}return i._value=t,i}var nR=0;function iR(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}function rR(){return++nR}var sR=jA.prototype;iR.prototype=(function(t){return jA().transition(t)}).prototype={constructor:iR,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=OE(t));for(var i=this._groups,r=i.length,s=new Array(r),o=0;oe?1:t>=e?0:NaN},LR=function(t){let e=t,n=t;function i(t,e,i,r){for(null==i&&(i=0),null==r&&(r=t.length);i>>1;n(t[s],e)<0?i=s+1:r=s}return i}return 1===t.length&&(e=(e,n)=>t(e)-n,n=function(t){return(e,n)=>MR(t(e),n)}(t)),{left:i,center:function(t,n,r,s){null==r&&(r=0),null==s&&(s=t.length);const o=i(t,n,r,s-1);return o>r&&e(t[o-1],n)>-e(t[o],n)?o-1:o},right:function(t,e,i,r){for(null==i&&(i=0),null==r&&(r=t.length);i>>1;n(t[s],e)>0?r=s:i=s+1}return i}}},$R=Math.sqrt(50),OR=Math.sqrt(10),IR=Math.sqrt(2);function NR(t,e,n){var i=(e-t)/Math.max(0,n),r=Math.floor(Math.log(i)/Math.LN10),s=i/Math.pow(10,r);return r>=0?(s>=$R?10:s>=OR?5:s>=IR?2:1)*Math.pow(10,r):-Math.pow(10,-r)/(s>=$R?10:s>=OR?5:s>=IR?2:1)}function PR(t,e,n){var i=Math.abs(e-t)/Math.max(0,n),r=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),s=i/r;return s>=$R?r*=10:s>=OR?r*=5:s>=IR&&(r*=2),e0))return a;do{a.push(o=new Date(+n)),e(n,s),t(n)}while(o=e)for(;t(e),!n(e);)e.setTime(e-1)},function(t,i){if(t>=t)if(i<0)for(;++i<=0;)for(;e(t,-1),!n(t););else for(;--i>=0;)for(;e(t,1),!n(t););})},n&&(r.count=function(e,i){return BR.setTime(+e),UR.setTime(+i),t(BR),t(UR),Math.floor(n(BR,UR))},r.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?r.filter(i?function(e){return i(e)%t==0}:function(e){return r.count(0,e)%t==0}):r:null}),r}var HR=VR(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t,e){return e.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});HR.every=function(t){return isFinite(t=Math.floor(t))&&t>0?VR(function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,n){e.setFullYear(e.getFullYear()+n*t)}):null};var jR=HR,zR=VR(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,e){t.setMonth(t.getMonth()+e)},function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())},function(t){return t.getMonth()}),WR=1e3,GR=6e4,KR=36e5,qR=864e5,YR=6048e5;function XR(t){return VR(function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},function(t,e){t.setDate(t.getDate()+7*e)},function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*GR)/YR})}var JR=XR(0),QR=XR(1),ZR=(XR(2),XR(3),XR(4)),tF=(XR(5),XR(6),VR(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*GR)/qR,t=>t.getDate()-1)),eF=VR(function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*WR-t.getMinutes()*GR)},function(t,e){t.setTime(+t+e*KR)},function(t,e){return(e-t)/KR},function(t){return t.getHours()}),nF=VR(function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*WR)},function(t,e){t.setTime(+t+e*GR)},function(t,e){return(e-t)/GR},function(t){return t.getMinutes()}),iF=VR(function(t){t.setTime(t-t.getMilliseconds())},function(t,e){t.setTime(+t+e*WR)},function(t,e){return(e-t)/WR},function(t){return t.getUTCSeconds()}),rF=VR(function(){},function(t,e){t.setTime(+t+e)},function(t,e){return e-t});rF.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?VR(function(e){e.setTime(Math.floor(e/t)*t)},function(e,n){e.setTime(+e+n*t)},function(e,n){return(n-e)/t}):rF:null};var sF=rF;function oF(t){return VR(function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+7*e)},function(t,e){return(e-t)/YR})}var aF=oF(0),lF=oF(1),cF=(oF(2),oF(3),oF(4)),uF=(oF(5),oF(6),VR(function(t){t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+e)},function(t,e){return(e-t)/qR},function(t){return t.getUTCDate()-1})),hF=VR(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)},function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});hF.every=function(t){return isFinite(t=Math.floor(t))&&t>0?VR(function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)}):null};var dF=hF;function fF(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function pF(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function gF(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}var mF,vF,yF={"-":"",_:" ",0:"0"},bF=/^\s*\d+/,wF=/^%/,xF=/[\\^$*+?|[\]().{}]/g;function _F(t,e,n){var i=t<0?"-":"",r=(i?-t:t)+"",s=r.length;return i+(s[t.toLowerCase(),e]))}function EF(t,e,n){var i=bF.exec(e.slice(n,n+1));return i?(t.w=+i[0],n+i[0].length):-1}function AF(t,e,n){var i=bF.exec(e.slice(n,n+1));return i?(t.u=+i[0],n+i[0].length):-1}function DF(t,e,n){var i=bF.exec(e.slice(n,n+2));return i?(t.U=+i[0],n+i[0].length):-1}function TF(t,e,n){var i=bF.exec(e.slice(n,n+2));return i?(t.V=+i[0],n+i[0].length):-1}function RF(t,e,n){var i=bF.exec(e.slice(n,n+2));return i?(t.W=+i[0],n+i[0].length):-1}function FF(t,e,n){var i=bF.exec(e.slice(n,n+4));return i?(t.y=+i[0],n+i[0].length):-1}function MF(t,e,n){var i=bF.exec(e.slice(n,n+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function LF(t,e,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function $F(t,e,n){var i=bF.exec(e.slice(n,n+1));return i?(t.q=3*i[0]-3,n+i[0].length):-1}function OF(t,e,n){var i=bF.exec(e.slice(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function IF(t,e,n){var i=bF.exec(e.slice(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function NF(t,e,n){var i=bF.exec(e.slice(n,n+3));return i?(t.m=0,t.d=+i[0],n+i[0].length):-1}function PF(t,e,n){var i=bF.exec(e.slice(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function BF(t,e,n){var i=bF.exec(e.slice(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function UF(t,e,n){var i=bF.exec(e.slice(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function VF(t,e,n){var i=bF.exec(e.slice(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function HF(t,e,n){var i=bF.exec(e.slice(n,n+6));return i?(t.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function jF(t,e,n){var i=wF.exec(e.slice(n,n+1));return i?n+i[0].length:-1}function zF(t,e,n){var i=bF.exec(e.slice(n));return i?(t.Q=+i[0],n+i[0].length):-1}function WF(t,e,n){var i=bF.exec(e.slice(n));return i?(t.s=+i[0],n+i[0].length):-1}function GF(t,e){return _F(t.getDate(),e,2)}function KF(t,e){return _F(t.getHours(),e,2)}function qF(t,e){return _F(t.getHours()%12||12,e,2)}function YF(t,e){return _F(1+tF.count(jR(t),t),e,3)}function XF(t,e){return _F(t.getMilliseconds(),e,3)}function JF(t,e){return XF(t,e)+"000"}function QF(t,e){return _F(t.getMonth()+1,e,2)}function ZF(t,e){return _F(t.getMinutes(),e,2)}function tM(t,e){return _F(t.getSeconds(),e,2)}function eM(t){var e=t.getDay();return 0===e?7:e}function nM(t,e){return _F(JR.count(jR(t)-1,t),e,2)}function iM(t){var e=t.getDay();return e>=4||0===e?ZR(t):ZR.ceil(t)}function rM(t,e){return t=iM(t),_F(ZR.count(jR(t),t)+(4===jR(t).getDay()),e,2)}function sM(t){return t.getDay()}function oM(t,e){return _F(QR.count(jR(t)-1,t),e,2)}function aM(t,e){return _F(t.getFullYear()%100,e,2)}function lM(t,e){return _F((t=iM(t)).getFullYear()%100,e,2)}function cM(t,e){return _F(t.getFullYear()%1e4,e,4)}function uM(t,e){var n=t.getDay();return _F((t=n>=4||0===n?ZR(t):ZR.ceil(t)).getFullYear()%1e4,e,4)}function hM(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+_F(e/60|0,"0",2)+_F(e%60,"0",2)}function dM(t,e){return _F(t.getUTCDate(),e,2)}function fM(t,e){return _F(t.getUTCHours(),e,2)}function pM(t,e){return _F(t.getUTCHours()%12||12,e,2)}function gM(t,e){return _F(1+uF.count(dF(t),t),e,3)}function mM(t,e){return _F(t.getUTCMilliseconds(),e,3)}function vM(t,e){return mM(t,e)+"000"}function yM(t,e){return _F(t.getUTCMonth()+1,e,2)}function bM(t,e){return _F(t.getUTCMinutes(),e,2)}function wM(t,e){return _F(t.getUTCSeconds(),e,2)}function xM(t){var e=t.getUTCDay();return 0===e?7:e}function _M(t,e){return _F(aF.count(dF(t)-1,t),e,2)}function CM(t){var e=t.getUTCDay();return e>=4||0===e?cF(t):cF.ceil(t)}function SM(t,e){return t=CM(t),_F(cF.count(dF(t),t)+(4===dF(t).getUTCDay()),e,2)}function kM(t){return t.getUTCDay()}function EM(t,e){return _F(lF.count(dF(t)-1,t),e,2)}function AM(t,e){return _F(t.getUTCFullYear()%100,e,2)}function DM(t,e){return _F((t=CM(t)).getUTCFullYear()%100,e,2)}function TM(t,e){return _F(t.getUTCFullYear()%1e4,e,4)}function RM(t,e){var n=t.getUTCDay();return _F((t=n>=4||0===n?cF(t):cF.ceil(t)).getUTCFullYear()%1e4,e,4)}function FM(){return"+0000"}function MM(){return"%"}function LM(t){return+t}function $M(t){return Math.floor(+t/1e3)}mF=function(t){var e=t.dateTime,n=t.date,i=t.time,r=t.periods,s=t.days,o=t.shortDays,a=t.months,l=t.shortMonths,c=SF(r),u=kF(r),h=SF(s),d=kF(s),f=SF(o),p=kF(o),g=SF(a),m=kF(a),v=SF(l),y=kF(l),b={a:function(t){return o[t.getDay()]},A:function(t){return s[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:GF,e:GF,f:JF,g:lM,G:uM,H:KF,I:qF,j:YF,L:XF,m:QF,M:ZF,p:function(t){return r[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:LM,s:$M,S:tM,u:eM,U:nM,V:rM,w:sM,W:oM,x:null,X:null,y:aM,Y:cM,Z:hM,"%":MM},w={a:function(t){return o[t.getUTCDay()]},A:function(t){return s[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:dM,e:dM,f:vM,g:DM,G:RM,H:fM,I:pM,j:gM,L:mM,m:yM,M:bM,p:function(t){return r[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:LM,s:$M,S:wM,u:xM,U:_M,V:SM,w:kM,W:EM,x:null,X:null,y:AM,Y:TM,Z:FM,"%":MM},x={a:function(t,e,n){var i=f.exec(e.slice(n));return i?(t.w=p.get(i[0].toLowerCase()),n+i[0].length):-1},A:function(t,e,n){var i=h.exec(e.slice(n));return i?(t.w=d.get(i[0].toLowerCase()),n+i[0].length):-1},b:function(t,e,n){var i=v.exec(e.slice(n));return i?(t.m=y.get(i[0].toLowerCase()),n+i[0].length):-1},B:function(t,e,n){var i=g.exec(e.slice(n));return i?(t.m=m.get(i[0].toLowerCase()),n+i[0].length):-1},c:function(t,n,i){return S(t,e,n,i)},d:IF,e:IF,f:HF,g:MF,G:FF,H:PF,I:PF,j:NF,L:VF,m:OF,M:BF,p:function(t,e,n){var i=c.exec(e.slice(n));return i?(t.p=u.get(i[0].toLowerCase()),n+i[0].length):-1},q:$F,Q:zF,s:WF,S:UF,u:AF,U:DF,V:TF,w:EF,W:RF,x:function(t,e,i){return S(t,n,e,i)},X:function(t,e,n){return S(t,i,e,n)},y:MF,Y:FF,Z:LF,"%":jF};function _(t,e){return function(n){var i,r,s,o=[],a=-1,l=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++a53)return null;"w"in s||(s.w=1),"Z"in s?(r=(i=pF(gF(s.y,0,1))).getUTCDay(),i=r>4||0===r?lF.ceil(i):lF(i),i=uF.offset(i,7*(s.V-1)),s.y=i.getUTCFullYear(),s.m=i.getUTCMonth(),s.d=i.getUTCDate()+(s.w+6)%7):(r=(i=fF(gF(s.y,0,1))).getDay(),i=r>4||0===r?QR.ceil(i):QR(i),i=tF.offset(i,7*(s.V-1)),s.y=i.getFullYear(),s.m=i.getMonth(),s.d=i.getDate()+(s.w+6)%7)}else("W"in s||"U"in s)&&("w"in s||(s.w="u"in s?s.u%7:"W"in s?1:0),r="Z"in s?pF(gF(s.y,0,1)).getUTCDay():fF(gF(s.y,0,1)).getDay(),s.m=0,s.d="W"in s?(s.w+6)%7+7*s.W-(r+5)%7:s.w+7*s.U-(r+6)%7);return"Z"in s?(s.H+=s.Z/100|0,s.M+=s.Z%100,pF(s)):fF(s)}}function S(t,e,n,i){for(var r,s,o=0,a=e.length,l=n.length;o=l)return-1;if(37===(r=e.charCodeAt(o++))){if(r=e.charAt(o++),!(s=x[r in yF?e.charAt(o++):r])||(i=s(t,n,i))<0)return-1}else if(r!=n.charCodeAt(i++))return-1}return i}return b.x=_(n,b),b.X=_(i,b),b.c=_(e,b),w.x=_(n,w),w.X=_(i,w),w.c=_(e,w),{format:function(t){var e=_(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=C(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=_(t+="",w);return e.toString=function(){return t},e},utcParse:function(t){var e=C(t+="",!0);return e.toString=function(){return t},e}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),vF=mF.format;var OM=function(t){return null===t?NaN:+t};const IM=LR(MR).right;LR(OM);var NM=IM,PM=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function BM(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function UM(){}var VM=.7,HM=1/VM,jM="\\s*([+-]?\\d+)\\s*",zM="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",WM="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",GM=/^#([0-9a-f]{3,8})$/,KM=new RegExp("^rgb\\("+[jM,jM,jM]+"\\)$"),qM=new RegExp("^rgb\\("+[WM,WM,WM]+"\\)$"),YM=new RegExp("^rgba\\("+[jM,jM,jM,zM]+"\\)$"),XM=new RegExp("^rgba\\("+[WM,WM,WM,zM]+"\\)$"),JM=new RegExp("^hsl\\("+[zM,WM,WM]+"\\)$"),QM=new RegExp("^hsla\\("+[zM,WM,WM,zM]+"\\)$"),ZM={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function tL(){return this.rgb().formatHex()}function eL(){return this.rgb().formatRgb()}function nL(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=GM.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?iL(e):3===n?new aL(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?rL(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?rL(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=KM.exec(t))?new aL(e[1],e[2],e[3],1):(e=qM.exec(t))?new aL(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=YM.exec(t))?rL(e[1],e[2],e[3],e[4]):(e=XM.exec(t))?rL(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=JM.exec(t))?hL(e[1],e[2]/100,e[3]/100,1):(e=QM.exec(t))?hL(e[1],e[2]/100,e[3]/100,e[4]):ZM.hasOwnProperty(t)?iL(ZM[t]):"transparent"===t?new aL(NaN,NaN,NaN,0):null}function iL(t){return new aL(t>>16&255,t>>8&255,255&t,1)}function rL(t,e,n,i){return i<=0&&(t=e=n=NaN),new aL(t,e,n,i)}function sL(t){return t instanceof UM||(t=nL(t)),t?new aL((t=t.rgb()).r,t.g,t.b,t.opacity):new aL}function oL(t,e,n,i){return 1===arguments.length?sL(t):new aL(t,e,n,null==i?1:i)}function aL(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function lL(){return"#"+uL(this.r)+uL(this.g)+uL(this.b)}function cL(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function uL(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function hL(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new fL(t,e,n,i)}function dL(t){if(t instanceof fL)return new fL(t.h,t.s,t.l,t.opacity);if(t instanceof UM||(t=nL(t)),!t)return new fL;if(t instanceof fL)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),s=Math.max(e,n,i),o=NaN,a=s-r,l=(s+r)/2;return a?(o=e===s?(n-i)/a+6*(n0&&l<1?0:o,new fL(o,a,l,t.opacity)}function fL(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function pL(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function gL(t,e,n,i,r){var s=t*t,o=s*t;return((1-3*t+3*s-o)*e+(4-6*s+3*o)*n+(1+3*t+3*s-3*o)*i+o*r)/6}PM(UM,nL,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:tL,formatHex:tL,formatHsl:function(){return dL(this).formatHsl()},formatRgb:eL,toString:eL}),PM(aL,oL,BM(UM,{brighter:function(t){return t=null==t?HM:Math.pow(HM,t),new aL(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?VM:Math.pow(VM,t),new aL(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:lL,formatHex:lL,formatRgb:cL,toString:cL})),PM(fL,function(t,e,n,i){return 1===arguments.length?dL(t):new fL(t,e,n,null==i?1:i)},BM(UM,{brighter:function(t){return t=null==t?HM:Math.pow(HM,t),new fL(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?VM:Math.pow(VM,t),new fL(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new aL(pL(t>=240?t-240:t+120,r,i),pL(t,r,i),pL(t<120?t+240:t-120,r,i),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var mL=t=>()=>t;function vL(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):mL(isNaN(t)?e:t)}var yL=function t(e){var n=function(t){return 1==(t=+t)?vL:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(i){return Math.pow(t+i*e,n)}}(e,n,t):mL(isNaN(e)?n:e)}}(e);function i(t,e){var i=n((t=oL(t)).r,(e=oL(e)).r),r=n(t.g,e.g),s=n(t.b,e.b),o=vL(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=r(e),t.b=s(e),t.opacity=o(e),t+""}}return i.gamma=t,i}(1);function bL(t){return function(e){var n,i,r=e.length,s=new Array(r),o=new Array(r),a=new Array(r);for(n=0;n=1?(n=1,e-1):Math.floor(n*e),r=t[i],s=t[i+1];return gL((n-i/e)*e,i>0?t[i-1]:2*r-s,r,s,is&&(r=e.slice(s,r),a[o]?a[o]+=r:a[++o]=r),(n=n[0])===(i=i[0])?a[o]?a[o]+=i:a[++o]=i:(a[++o]=null,l.push({i:o,x:CL(n,i)})),s=EL.lastIndex;return s(e=o[l-1])&&(n=t,t=e,e=n),c=function(n){return Math.max(t,Math.min(e,n))}),i=l>2?OL:$L,r=s=null,h}function h(e){return isNaN(e=+e)?n:(r||(r=i(o.map(t),a,l)))(t(c(e)))}return h.invert=function(n){return c(e((s||(s=i(a,o.map(t),CL)))(n)))},h.domain=function(t){return arguments.length?(o=Array.from(t,RL),u()):o.slice()},h.range=function(t){return arguments.length?(a=Array.from(t),u()):a.slice()},h.rangeRound=function(t){return a=Array.from(t),l=TL,u()},h.clamp=function(t){return arguments.length?(c=!!t||ML,u()):c!==ML},h.interpolate=function(t){return arguments.length?(l=t,u()):l},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,i){return t=n,e=i,u()}}()(ML,ML)}function PL(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var BL=31536e6;function UL(t){return new Date(t)}function VL(t){return t instanceof Date?+t:+new Date(+t)}function HL(t,e,n,i,r,s,o,a,l){var c=NL(),u=c.invert,h=c.domain,d=l(".%L"),f=l(":%S"),p=l("%I:%M"),g=l("%I %p"),m=l("%a %d"),v=l("%b %d"),y=l("%B"),b=l("%Y"),w=[[o,1,1e3],[o,5,5e3],[o,15,15e3],[o,30,3e4],[s,1,6e4],[s,5,3e5],[s,15,9e5],[s,30,18e5],[r,1,36e5],[r,3,108e5],[r,6,216e5],[r,12,432e5],[i,1,864e5],[i,2,1728e5],[n,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,BL]];function x(a){return(o(a)=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function WL(t){if(!(e=zL.exec(t)))throw new Error("invalid format: "+t);var e;return new GL({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function GL(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function KL(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,i=t.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}WL.prototype=GL.prototype,GL.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var qL,YL,XL,JL,QL=function(t){return(t=KL(Math.abs(t)))?t[1]:NaN},ZL=function(t,e){var n=KL(t,e);if(!n)return t+"";var i=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")},t$={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>ZL(100*t,e),r:ZL,s:function(t,e){var n=KL(t,e);if(!n)return t+"";var i=n[0],r=n[1],s=r-(qL=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,o=i.length;return s===o?i:s>o?i+new Array(s-o+1).join("0"):s>0?i.slice(0,s)+"."+i.slice(s):"0."+new Array(1-s).join("0")+KL(t,Math.max(0,e+s-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)},e$=function(t){return t},n$=Array.prototype.map,i$=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function r$(t){var e=t.domain;return t.ticks=function(t){var n=e();return function(t,e,n){var i,r,s,o,a=-1;if(n=+n,(t=+t)==(e=+e)&&n>0)return[t];if((i=e0)for(t=Math.ceil(t/o),e=Math.floor(e/o),s=new Array(r=Math.ceil(e-t+1));++a0;){if((r=NR(l,c,n))===i)return s[o]=l,s[a]=c,e(s);if(r>0)l=Math.floor(l/r)*r,c=Math.ceil(c/r)*r;else{if(!(r<0))break;l=Math.ceil(l*r)/r,c=Math.floor(c*r)/r}i=r}return t},t}function s$(){var t=NL();return t.copy=function(){return IL(t,s$())},PL.apply(t,arguments),r$(t)}YL=function(t){var e,n,i=void 0===t.grouping||void 0===t.thousands?e$:(e=n$.call(t.grouping,Number),n=t.thousands+"",function(t,i){for(var r=t.length,s=[],o=0,a=e[0],l=0;r>0&&a>0&&(l+a+1>i&&(a=Math.max(1,i-l)),s.push(t.substring(r-=a,r+a)),!((l+=a+1)>i));)a=e[o=(o+1)%e.length];return s.reverse().join(n)}),r=void 0===t.currency?"":t.currency[0]+"",s=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",a=void 0===t.numerals?e$:function(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}(n$.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"\u2212":t.minus+"",u=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=WL(t)).fill,n=t.align,h=t.sign,d=t.symbol,f=t.zero,p=t.width,g=t.comma,m=t.precision,v=t.trim,y=t.type;"n"===y?(g=!0,y="g"):t$[y]||(void 0===m&&(m=12),v=!0,y="g"),(f||"0"===e&&"="===n)&&(f=!0,e="0",n="=");var b="$"===d?r:"#"===d&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",w="$"===d?s:/[%p]/.test(y)?l:"",x=t$[y],_=/[defgprs%]/.test(y);function C(t){var r,s,l,d=b,C=w;if("c"===y)C=x(t)+C,t="";else{var S=(t=+t)<0||1/t<0;if(t=isNaN(t)?u:x(Math.abs(t),m),v&&(t=function(t){t:for(var e,n=t.length,i=1,r=-1;i0&&(r=0)}return r>0?t.slice(0,r)+t.slice(e+1):t}(t)),S&&0==+t&&"+"!==h&&(S=!1),d=(S?"("===h?h:c:"-"===h||"("===h?"":h)+d,C=("s"===y?i$[8+qL/3]:"")+C+(S&&"("===h?")":""),_)for(r=-1,s=t.length;++r(l=t.charCodeAt(r))||l>57){C=(46===l?o+t.slice(r+1):t.slice(r))+C,t=t.slice(0,r);break}}g&&!f&&(t=i(t,1/0));var k=d.length+t.length+C.length,E=k>1)+d+t+C+E.slice(k);break;default:t=E+d+t+C}return a(t)}return m=void 0===m?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),C.toString=function(){return t+""},C}return{format:h,formatPrefix:function(t,e){var n=h(((t=WL(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(QL(e)/3))),r=Math.pow(10,-i),s=i$[8+i/3];return function(t){return n(r*t)+s}}}}({thousands:",",grouping:[3],currency:["$",""]}),XL=YL.format,JL=YL.formatPrefix;var o$=function(t,e,n){t=+t,e=+e,n=(r=arguments.length)<2?(e=t,t=0,1):r<3?1:+n;for(var i=-1,r=0|Math.max(0,Math.ceil((e-t)/n)),s=new Array(r);++i=1)return+n(t[i-1],i-1,t);var i,r=(i-1)*e,s=Math.floor(r),o=+n(t[s],s,t);return o+(+n(t[s+1],s+1,t)-o)*(r-s)}}function f$(){var t,e=[],n=[],i=[];function r(){var t=0,r=Math.max(1,n.length);for(i=new Array(r-1);++t0?i[r-1]:e[0],ry$)if(Math.abs(u*a-l*c)>y$&&r){var d=n-s,f=i-o,p=a*a+l*l,g=d*d+f*f,m=Math.sqrt(p),v=Math.sqrt(h),y=r*Math.tan((m$-Math.acos((p+h-g)/(2*m*v)))/2),b=y/v,w=y/m;Math.abs(b-1)>y$&&(this._+="L"+(t+b*c)+","+(e+b*u)),this._+="A"+r+","+r+",0,0,"+ +(u*d>c*f)+","+(this._x1=t+w*a)+","+(this._y1=e+w*l)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},arc:function(t,e,n,i,r,s){t=+t,e=+e,s=!!s;var o=(n=+n)*Math.cos(i),a=n*Math.sin(i),l=t+o,c=e+a,u=1^s,h=s?i-r:r-i;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>y$||Math.abs(this._y1-c)>y$)&&(this._+="L"+l+","+c),n&&(h<0&&(h=h%v$+v$),h>b$?this._+="A"+n+","+n+",0,1,"+u+","+(t-o)+","+(e-a)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):h>y$&&(this._+="A"+n+","+n+",0,"+ +(h>=m$)+","+u+","+(this._x1=t+n*Math.cos(r))+","+(this._y1=e+n*Math.sin(r))))},rect:function(t,e,n,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}};var _$=x$,C$=function(t){return function(){return t}};function S$(t){return t[0]}function k$(t){return t[1]}var E$=function(){var t=S$,e=k$,n=C$(!0),i=null,r=g$,s=null;function o(o){var a,l,c,u=o.length,h=!1;for(null==i&&(s=r(c=_$())),a=0;a<=u;++a)!(a=u;--h)a.point(m[h],v[h]);a.lineEnd(),a.areaEnd()}g&&(m[c]=+t(d,c,l),v[c]=+n(d,c,l),a.point(e?+e(d,c,l):m[c],i?+i(d,c,l):v[c]))}if(f)return a=null,f+""||null}function c(){return E$().defined(r).curve(o).context(s)}return l.x=function(n){return arguments.length?(t="function"==typeof n?n:C$(+n),e=null,l):t},l.x0=function(e){return arguments.length?(t="function"==typeof e?e:C$(+e),l):t},l.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:C$(+t),l):e},l.y=function(t){return arguments.length?(n="function"==typeof t?t:C$(+t),i=null,l):n},l.y0=function(t){return arguments.length?(n="function"==typeof t?t:C$(+t),l):n},l.y1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:C$(+t),l):i},l.lineX0=l.lineY0=function(){return c().x(t).y(n)},l.lineY1=function(){return c().x(t).y(i)},l.lineX1=function(){return c().x(e).y(n)},l.defined=function(t){return arguments.length?(r="function"==typeof t?t:C$(!!t),l):r},l.curve=function(t){return arguments.length?(o=t,null!=s&&(a=o(s)),l):o},l.context=function(t){return arguments.length?(null==t?s=a=null:a=o(s=t),l):s},l},D$=function(){};function T$(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function R$(t,e){this._context=t,this._k=(1-e)/6}function F$(t,e){this._context=t,this._k=(1-e)/6}function M$(t){this._curve=t}R$.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:T$(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:T$(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function t(e){function n(t){return new R$(t,e)}return n.tension=function(e){return t(+e)},n}(0),F$.prototype={areaStart:D$,areaEnd:D$,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:T$(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}},function t(e){function n(t){return new F$(t,e)}return n.tension=function(e){return t(+e)},n}(0),M$.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}},Math,Math,Math,Math,Math,Math,Math,Math;var L$=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function $$(t){if(!(e=L$.exec(t)))throw new Error("invalid format: "+t);var e;return new O$({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function O$(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}$$.prototype=O$.prototype,O$.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var I$,N$=Array.prototype.map;void 0===(I$={decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}).grouping||void 0===I$.thousands||N$.call(I$.grouping,Number),void 0===I$.numerals||N$.call(I$.numerals,String);var P$=function(t,e,n,i,r){for(var s,o=t.children,a=-1,l=o.length,c=t.value&&(i-e)/t.value;++a=0;)e+=n[i].value;else e=1;t.value=e}function V$(t,e){var n,i,r,s,o,a=new W$(t),l=+t.value&&(a.value=t.value),c=[a];for(null==e&&(e=H$);n=c.pop();)if(l&&(n.value=+n.data.value),(r=e(n.data))&&(o=r.length))for(n.children=new Array(o),s=o-1;s>=0;--s)c.push(i=n.children[s]=new W$(r[s])),i.parent=n,i.depth=n.depth+1;return a.eachBefore(z$)}function H$(t){return t.children}function j$(t){t.data=t.data.data}function z$(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function W$(t){this.data=t,this.depth=this.height=0,this.parent=null}!function t(e){function n(t,n,i,r,s){!function(t,e,n,i,r,s){for(var o,a,l,c,u,h,d,f,p,g,m,v=[],y=e.children,b=0,w=0,x=y.length,_=e.value;bd&&(d=a),m=u*u*g,(f=Math.max(d/m,m/h))>p){u-=a;break}p=f}v.push(o={value:u,dice:l1?e:1)},n}((1+Math.sqrt(5))/2),W$.prototype=V$.prototype={constructor:W$,count:function(){return this.eachAfter(U$)},each:function(t){var e,n,i,r,s=this,o=[s];do{for(e=o.reverse(),o=[];s=e.pop();)if(t(s),n=s.children)for(i=0,r=n.length;i=0;--n)r.push(e[n]);return this},sum:function(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,i=e.children,r=i&&i.length;--r>=0;)n+=i[r].value;e.value=n})},sort:function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),i=e.ancestors(),r=null;for(t=n.pop(),e=i.pop();t===e;)r=t,t=n.pop(),e=i.pop();return r}(e,t),i=[e];e!==n;)i.push(e=e.parent);for(var r=i.length;t!==n;)i.splice(r,0,t),t=t.parent;return i},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each(function(e){t.push(e)}),t},leaves:function(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t},links:function(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e},copy:function(){return V$(this).eachBefore(j$)}};var G$=new Date,K$=new Date;function q$(t,e,n,i){function r(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return r.floor=function(e){return t(e=new Date(+e)),e},r.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},r.round=function(t){var e=r(t),n=r.ceil(t);return t-e0))return a;do{a.push(o=new Date(+n)),e(n,s),t(n)}while(o=e)for(;t(e),!n(e);)e.setTime(e-1)},function(t,i){if(t>=t)if(i<0)for(;++i<=0;)for(;e(t,-1),!n(t););else for(;--i>=0;)for(;e(t,1),!n(t););})},n&&(r.count=function(e,i){return G$.setTime(+e),K$.setTime(+i),t(G$),t(K$),Math.floor(n(G$,K$))},r.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?r.filter(i?function(e){return i(e)%t==0}:function(e){return r.count(0,e)%t==0}):r:null}),r}var Y$=864e5,X$=6048e5;function J$(t){return q$(function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+7*e)},function(t,e){return(e-t)/X$})}var Q$=J$(0),Z$=J$(1),tO=(J$(2),J$(3),J$(4)),eO=(J$(5),J$(6),q$(function(t){t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+e)},function(t,e){return(e-t)/Y$},function(t){return t.getUTCDate()-1}));function nO(t){return q$(function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},function(t,e){t.setDate(t.getDate()+7*e)},function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/X$})}var iO=nO(0),rO=nO(1),sO=(nO(2),nO(3),nO(4)),oO=(nO(5),nO(6),q$(function(t){t.setHours(0,0,0,0)},function(t,e){t.setDate(t.getDate()+e)},function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/Y$},function(t){return t.getDate()-1})),aO=q$(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t,e){return e.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});aO.every=function(t){return isFinite(t=Math.floor(t))&&t>0?q$(function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,n){e.setFullYear(e.getFullYear()+n*t)}):null};var lO=aO,cO=q$(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)},function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});cO.every=function(t){return isFinite(t=Math.floor(t))&&t>0?q$(function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)}):null};var uO=cO;var hO={"-":"",_:" ",0:"0"},dO=/[\\^$*+?|[\]().{}]/g;function fO(t,e,n){var i=t<0?"-":"",r=(i?-t:t)+"",s=r.length;return i+(s=4||0===e?sO(t):sO.ceil(t)}function TO(t,e){return t=DO(t),fO(sO.count(lO(t),t)+(4===lO(t).getDay()),e,2)}function RO(t){return t.getDay()}function FO(t,e){return fO(rO.count(lO(t)-1,t),e,2)}function MO(t,e){return fO(t.getFullYear()%100,e,2)}function LO(t,e){return fO((t=DO(t)).getFullYear()%100,e,2)}function $O(t,e){return fO(t.getFullYear()%1e4,e,4)}function OO(t,e){var n=t.getDay();return fO((t=n>=4||0===n?sO(t):sO.ceil(t)).getFullYear()%1e4,e,4)}function IO(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+fO(e/60|0,"0",2)+fO(e%60,"0",2)}function NO(t,e){return fO(t.getUTCDate(),e,2)}function PO(t,e){return fO(t.getUTCHours(),e,2)}function BO(t,e){return fO(t.getUTCHours()%12||12,e,2)}function UO(t,e){return fO(1+eO.count(uO(t),t),e,3)}function VO(t,e){return fO(t.getUTCMilliseconds(),e,3)}function HO(t,e){return VO(t,e)+"000"}function jO(t,e){return fO(t.getUTCMonth()+1,e,2)}function zO(t,e){return fO(t.getUTCMinutes(),e,2)}function WO(t,e){return fO(t.getUTCSeconds(),e,2)}function GO(t){var e=t.getUTCDay();return 0===e?7:e}function KO(t,e){return fO(Q$.count(uO(t)-1,t),e,2)}function qO(t){var e=t.getUTCDay();return e>=4||0===e?tO(t):tO.ceil(t)}function YO(t,e){return t=qO(t),fO(tO.count(uO(t),t)+(4===uO(t).getUTCDay()),e,2)}function XO(t){return t.getUTCDay()}function JO(t,e){return fO(Z$.count(uO(t)-1,t),e,2)}function QO(t,e){return fO(t.getUTCFullYear()%100,e,2)}function ZO(t,e){return fO((t=qO(t)).getUTCFullYear()%100,e,2)}function tI(t,e){return fO(t.getUTCFullYear()%1e4,e,4)}function eI(t,e){var n=t.getUTCDay();return fO((t=n>=4||0===n?tO(t):tO.ceil(t)).getUTCFullYear()%1e4,e,4)}function nI(){return"+0000"}function iI(){return"%"}function rI(t){return+t}function sI(t){return Math.floor(+t/1e3)}!function(t){var e=t.dateTime,n=t.date,i=t.time,r=t.periods,s=t.days,o=t.shortDays,a=t.months,l=t.shortMonths,c=(gO(r),mO(r),gO(s),mO(s),gO(o),mO(o),gO(a),mO(a),gO(l),mO(l),{a:function(t){return o[t.getDay()]},A:function(t){return s[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:vO,e:vO,f:_O,g:LO,G:OO,H:yO,I:bO,j:wO,L:xO,m:CO,M:SO,p:function(t){return r[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:rI,s:sI,S:kO,u:EO,U:AO,V:TO,w:RO,W:FO,x:null,X:null,y:MO,Y:$O,Z:IO,"%":iI}),u={a:function(t){return o[t.getUTCDay()]},A:function(t){return s[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:NO,e:NO,f:HO,g:ZO,G:eI,H:PO,I:BO,j:UO,L:VO,m:jO,M:zO,p:function(t){return r[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:rI,s:sI,S:WO,u:GO,U:KO,V:YO,w:XO,W:JO,x:null,X:null,y:QO,Y:tI,Z:nI,"%":iI};function h(t,e){return function(n){var i,r,s,o=[],a=-1,l=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++a{let t=dN=class{constructor(t,e,n){this.applicationRef=t,this.componentFactoryResolver=e,this.injector=n}static setGlobalRootViewContainer(t){dN.globalRootViewContainer=t}getRootViewContainer(){if(this._container)return this._container;if(dN.globalRootViewContainer)return dN.globalRootViewContainer;if(this.applicationRef.components.length)return this.applicationRef.components[0];throw new Error("View Container not found! ngUpgrade needs to manually set this via setRootViewContainer or setGlobalRootViewContainer.")}setRootViewContainer(t){this._container=t}getComponentRootNode(t){return t.element?t.element.nativeElement:t.hostView&&t.hostView.rootNodes.length>0?t.hostView.rootNodes[0]:t.location.nativeElement}getRootViewContainerNode(t){return this.getComponentRootNode(t)}projectComponentBindings(t,e){if(e){if(void 0!==e.inputs){const n=Object.getOwnPropertyNames(e.inputs);for(const i of n)t.instance[i]=e.inputs[i]}if(void 0!==e.outputs){const n=Object.getOwnPropertyNames(e.outputs);for(const i of n)t.instance[i]=e.outputs[i]}}return t}appendComponent(t,e={},n){n||(n=this.getRootViewContainer());const i=this.getComponentRootNode(n),r=new RE(i,this.componentFactoryResolver,this.applicationRef,this.injector),s=new AE(t),o=r.attach(s);return this.projectComponentBindings(o,e),o}};return t.\u0275fac=function(e){return new(e||t)(Yt(lh),Yt(cc),Yt(Bo))},t.\u0275prov=ut({token:t,factory:function(e){return t.\u0275fac(e)}}),t.globalRootViewContainer=null,t})();function pN(t,e,n){let i,r,s;n=n||{};let o=null,a=0;function l(){a=!1===n.leading?0:+new Date,o=null,s=t.apply(i,r)}return function(){const c=+new Date;a||!1!==n.leading||(a=c);const u=e-(c-a);return i=this,r=arguments,u<=0?(clearTimeout(o),o=null,a=c,s=t.apply(i,r)):o||!1===n.trailing||(o=setTimeout(l,u)),s}}var gN=function(t){return t[t.top="top"]="top",t[t.bottom="bottom"]="bottom",t[t.left="left"]="left",t[t.right="right"]="right",t}({});function mN(t,e,n){return"top"===n?t.top-7:"bottom"===n?t.top+t.height-e.height+7:"center"===n?t.top+t.height/2-e.height/2:void 0}function vN(t,e,n){return"left"===n?t.left-7:"right"===n?t.left+t.width-e.width+7:"center"===n?t.left+t.width/2-e.width/2:void 0}class yN{static calculateVerticalAlignment(t,e,n){let i=mN(t,e,n);return i+e.height>window.innerHeight&&(i=window.innerHeight-e.height),i}static calculateVerticalCaret(t,e,n,i){let r;"top"===i&&(r=t.height/2-n.height/2+7),"bottom"===i&&(r=e.height-t.height/2-n.height/2-7),"center"===i&&(r=e.height/2-n.height/2);const s=mN(t,e,i);return s+e.height>window.innerHeight&&(r+=s+e.height-window.innerHeight),r}static calculateHorizontalAlignment(t,e,n){let i=vN(t,e,n);return i+e.width>window.innerWidth&&(i=window.innerWidth-e.width),i}static calculateHorizontalCaret(t,e,n,i){let r;"left"===i&&(r=t.width/2-n.width/2+7),"right"===i&&(r=e.width-t.width/2-n.width/2-7),"center"===i&&(r=e.width/2-n.width/2);const s=vN(t,e,i);return s+e.width>window.innerWidth&&(r+=s+e.width-window.innerWidth),r}static shouldFlip(t,e,n,i){let r=!1;return"right"===n&&t.left+t.width+e.width+i>window.innerWidth&&(r=!0),"left"===n&&t.left-e.width-i<0&&(r=!0),"top"===n&&t.top-e.height-i<0&&(r=!0),"bottom"===n&&t.top+t.height+e.height+i>window.innerHeight&&(r=!0),r}static positionCaret(t,e,n,i,r){let s=0,o=0;return t===gN.right?(o=-7,s=yN.calculateVerticalCaret(n,e,i,r)):t===gN.left?(o=e.width,s=yN.calculateVerticalCaret(n,e,i,r)):t===gN.top?(s=e.height,o=yN.calculateHorizontalCaret(n,e,i,r)):t===gN.bottom&&(s=-7,o=yN.calculateHorizontalCaret(n,e,i,r)),{top:s,left:o}}static positionContent(t,e,n,i,r){let s=0,o=0;return t===gN.right?(o=n.left+n.width+i,s=yN.calculateVerticalAlignment(n,e,r)):t===gN.left?(o=n.left-e.width-i,s=yN.calculateVerticalAlignment(n,e,r)):t===gN.top?(s=n.top-e.height-i,o=yN.calculateHorizontalAlignment(n,e,r)):t===gN.bottom&&(s=n.top+n.height+i,o=yN.calculateHorizontalAlignment(n,e,r)),{top:s,left:o}}static determinePlacement(t,e,n,i){if(yN.shouldFlip(n,e,t,i)){if(t===gN.right)return gN.left;if(t===gN.left)return gN.right;if(t===gN.top)return gN.bottom;if(t===gN.bottom)return gN.top}return t}}let bN=(()=>{let t=class{constructor(t,e){this.element=t,this.renderer=e}get cssClasses(){let t="ngx-charts-tooltip-content";return t+=` position-${this.placement}`,t+=` type-${this.type}`,t+=` ${this.cssClass}`,t}ngAfterViewInit(){setTimeout(this.position.bind(this))}position(){const t=this.element.nativeElement,e=this.host.nativeElement.getBoundingClientRect();if(!e.height&&!e.width)return;const n=t.getBoundingClientRect();this.checkFlip(e,n),this.positionContent(t,e,n),this.showCaret&&this.positionCaret(e,n),setTimeout(()=>this.renderer.addClass(t,"animate"),1)}positionContent(t,e,n){const{top:i,left:r}=yN.positionContent(this.placement,n,e,this.spacing,this.alignment);this.renderer.setStyle(t,"top",`${i}px`),this.renderer.setStyle(t,"left",`${r}px`)}positionCaret(t,e){const n=this.caretElm.nativeElement,i=n.getBoundingClientRect(),{top:r,left:s}=yN.positionCaret(this.placement,e,t,i,this.alignment);this.renderer.setStyle(n,"top",`${r}px`),this.renderer.setStyle(n,"left",`${s}px`)}checkFlip(t,e){this.placement=yN.determinePlacement(this.placement,e,t,this.spacing)}onWindowResize(){this.position()}};return t.\u0275fac=function(e){return new(e||t)(oa(uc),oa(pc))},t.\u0275cmp=pe({type:t,selectors:[["ngx-tooltip-content"]],viewQuery:function(t,e){if(1&t&&fu(oI,!0),2&t){let t;hu(t=vu())&&(e.caretElm=t.first)}},hostVars:2,hostBindings:function(t,e){1&t&&ya("resize",function(){return e.onWindowResize()},!1,Ne),2&t&&Ia(e.cssClasses)},inputs:{placement:"placement",host:"host",showCaret:"showCaret",type:"type",alignment:"alignment",spacing:"spacing",cssClass:"cssClass",title:"title",template:"template",context:"context"},decls:6,vars:6,consts:[[3,"hidden"],["caretElm",""],[1,"tooltip-content"],[4,"ngIf"],[3,"innerHTML",4,"ngIf"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"innerHTML"]],template:function(t,e){var n;1&t&&(ua(0,"div"),da(1,"span",0,1),ua(3,"div",2),ra(4,cI,2,4,"span",3),ra(5,uI,1,1,"span",4),ha(),ha()),2&t&&(gs(1),"tooltip-caret position-",n=e.placement,"",Ba(oe,Na,ia(dn(),"tooltip-caret position-",n,""),!0),la("hidden",!e.showCaret),gs(3),la("ngIf",!e.title),gs(1),la("ngIf",e.title))},directives:[Ed,Rd],styles:[".ngx-charts-tooltip-content{position:fixed;border-radius:3px;z-index:5000;display:block;font-weight:400;opacity:0;pointer-events:none!important}.ngx-charts-tooltip-content.type-popover{background:#fff;color:#060709;border:1px solid #72809b;box-shadow:0 1px 3px 0 rgba(0,0,0,.2),0 1px 1px 0 rgba(0,0,0,.14),0 2px 1px -1px rgba(0,0,0,.12);font-size:13px;padding:4px}.ngx-charts-tooltip-content.type-popover .tooltip-caret{position:absolute;z-index:5001;width:0;height:0}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-left{border-top:7px solid transparent;border-bottom:7px solid transparent;border-left:7px solid #fff}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-top{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid #fff}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-right{border-top:7px solid transparent;border-bottom:7px solid transparent;border-right:7px solid #fff}.ngx-charts-tooltip-content.type-popover .tooltip-caret.position-bottom{border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #fff}.ngx-charts-tooltip-content.type-tooltip{color:#fff;background:rgba(0,0,0,.75);font-size:12px;padding:0 10px;text-align:center;pointer-events:auto}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-left{border-top:7px solid transparent;border-bottom:7px solid transparent;border-left:7px solid rgba(0,0,0,.75)}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-top{border-left:7px solid transparent;border-right:7px solid transparent;border-top:7px solid rgba(0,0,0,.75)}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-right{border-top:7px solid transparent;border-bottom:7px solid transparent;border-right:7px solid rgba(0,0,0,.75)}.ngx-charts-tooltip-content.type-tooltip .tooltip-caret.position-bottom{border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid rgba(0,0,0,.75)}.ngx-charts-tooltip-content .tooltip-label{display:block;line-height:1em;padding:8px 5px 5px;font-size:1em}.ngx-charts-tooltip-content .tooltip-val{display:block;font-size:1.3em;line-height:1em;padding:0 5px 8px}.ngx-charts-tooltip-content .tooltip-caret{position:absolute;z-index:5001;width:0;height:0}.ngx-charts-tooltip-content.position-right{transform:translate3d(10px,0,0)}.ngx-charts-tooltip-content.position-left{transform:translate3d(-10px,0,0)}.ngx-charts-tooltip-content.position-top{transform:translate3d(0,-10px,0)}.ngx-charts-tooltip-content.position-bottom{transform:translate3d(0,10px,0)}.ngx-charts-tooltip-content.animate{opacity:1;transition:opacity .3s,transform .3s;transform:translate3d(0,0,0);pointer-events:auto}.area-tooltip-container{padding:5px 0;pointer-events:none}.tooltip-item{text-align:left;line-height:1.2em;padding:5px 0}.tooltip-item .tooltip-item-color{display:inline-block;height:12px;width:12px;margin-right:5px;color:#5b646b;border-radius:3px}"],encapsulation:2}),cx([function(t,e,n){return{configurable:!0,enumerable:n.enumerable,get:function(){return Object.defineProperty(this,e,{configurable:!0,enumerable:n.enumerable,value:pN(n.value,100,void 0)}),this[e]}}}],t.prototype,"onWindowResize",null),t})(),wN=(()=>{let t=class extends class{constructor(t){this.injectionService=t,this.defaults={},this.components=new Map}getByType(t=this.type){return this.components.get(t)}create(t){return this.createByType(this.type,t)}createByType(t,e){e=this.assignDefaults(e);const n=this.injectComponent(t,e);return this.register(t,n),n}destroy(t){const e=this.components.get(t.componentType);if(e&&e.length){const n=e.indexOf(t);n>-1&&(e[n].destroy(),e.splice(n,1))}}destroyAll(){this.destroyByType(this.type)}destroyByType(t){const e=this.components.get(t);if(e&&e.length){let t=e.length-1;for(;t>=0;)this.destroy(e[t--])}}injectComponent(t,e){return this.injectionService.appendComponent(t,e)}assignDefaults(t){const e=Object.assign({},this.defaults.inputs),n=Object.assign({},this.defaults.outputs);return t.inputs||t.outputs||(t={inputs:t}),e&&(t.inputs=Object.assign(Object.assign({},e),t.inputs)),n&&(t.outputs=Object.assign(Object.assign({},n),t.outputs)),t}register(t,e){this.components.has(t)||this.components.set(t,[]),this.components.get(t).push(e)}}{constructor(t){super(t),this.type=bN}};return t.\u0275fac=function(e){return new(e||t)(Yt(fN))},t.\u0275prov=ut({token:t,factory:function(e){return t.\u0275fac(e)}}),t})(),xN=(()=>{let t=class{constructor(){this.showLegend=!1,this.animations=!0,this.legendLabelClick=new Zc,this.legendLabelActivate=new Zc,this.legendLabelDeactivate=new Zc}ngOnChanges(t){this.update()}update(){let t=0;this.showLegend&&(this.legendType=this.getLegendType(),this.legendOptions&&"right"!==this.legendOptions.position||(t="scaleLegend"===this.legendType?1:2)),this.chartWidth=Math.floor(this.view[0]*(12-t)/12),this.legendWidth=this.legendOptions&&"right"!==this.legendOptions.position?this.chartWidth:Math.floor(this.view[0]*t/12)}getLegendType(){return"linear"===this.legendOptions.scaleType?"scaleLegend":"legend"}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["ngx-charts-chart"]],inputs:{showLegend:"showLegend",animations:"animations",legendType:"legendType",view:"view",legendOptions:"legendOptions",data:"data",legendData:"legendData",colors:"colors",activeEntries:"activeEntries"},outputs:{legendLabelClick:"legendLabelClick",legendLabelActivate:"legendLabelActivate",legendLabelDeactivate:"legendLabelDeactivate"},features:[oc([wN]),Ve],ngContentSelectors:fI,decls:5,vars:8,consts:[[1,"ngx-charts-outer"],[1,"ngx-charts"],["class","chart-legend",3,"horizontal","valueRange","colors","height","width",4,"ngIf"],["class","chart-legend",3,"horizontal","data","title","colors","height","width","activeEntries","labelClick","labelActivate","labelDeactivate",4,"ngIf"],[1,"chart-legend",3,"horizontal","valueRange","colors","height","width"],[1,"chart-legend",3,"horizontal","data","title","colors","height","width","activeEntries","labelClick","labelActivate","labelDeactivate"]],template:function(t,e){1&t&&(Ca(),ua(0,"div",0),jn(),ua(1,"svg",1),Sa(2),ha(),ra(3,hI,1,5,"ngx-charts-scale-legend",2),ra(4,dI,1,7,"ngx-charts-legend",3),ha()),2&t&&($a("width",e.view[0],"px"),la("@animationState","active")("@.disabled",!e.animations),gs(1),na("width",e.chartWidth)("height",e.view[1]),gs(2),la("ngIf",e.showLegend&&"scaleLegend"===e.legendType),gs(1),la("ngIf",e.showLegend&&"legend"===e.legendType))},directives:function(){return[Ed,QN,XN]},encapsulation:2,data:{animation:[pf("animationState",[yf(":enter",[vf({opacity:0}),gf("500ms 100ms",vf({opacity:1}))])])]},changeDetection:0}),t})(),_N=(()=>{let t=class{constructor(t,e){this.element=t,this.zone=e,this.visible=new Zc,this.isVisible=!1,this.runCheck()}destroy(){clearTimeout(this.timeout)}onVisibilityChange(){this.zone.run(()=>{this.isVisible=!0,this.visible.emit(!0)})}runCheck(){const t=()=>{if(!this.element)return;const{offsetHeight:e,offsetWidth:n}=this.element.nativeElement;e&&n?(clearTimeout(this.timeout),this.onVisibilityChange()):(clearTimeout(this.timeout),this.zone.runOutsideAngular(()=>{this.timeout=setTimeout(()=>t(),100)}))};this.zone.runOutsideAngular(()=>{this.timeout=setTimeout(()=>t())})}};return t.\u0275fac=function(e){return new(e||t)(oa(uc),oa(ju))},t.\u0275dir=we({type:t,selectors:[["visibility-observer"]],outputs:{visible:"visible"}}),t})(),CN=(()=>{let t=class{constructor(t,e,n){this.chartElement=t,this.zone=e,this.cd=n,this.scheme="cool",this.schemeType="ordinal",this.animations=!0,this.select=new Zc}ngAfterViewInit(){this.bindWindowResizeEvent(),this.visibilityObserver=new _N(this.chartElement,this.zone),this.visibilityObserver.visible.subscribe(this.update.bind(this))}ngOnDestroy(){this.unbindEvents(),this.visibilityObserver&&(this.visibilityObserver.visible.unsubscribe(),this.visibilityObserver.destroy())}ngOnChanges(t){this.update()}update(){if(this.results=this.results?this.cloneData(this.results):[],this.view)this.width=this.view[0],this.height=this.view[1];else{const t=this.getContainerDims();t&&(this.width=t.width,this.height=t.height)}this.width||(this.width=600),this.height||(this.height=400),this.width=Math.floor(this.width),this.height=Math.floor(this.height),this.cd&&this.cd.markForCheck()}getContainerDims(){let t,e;const n=this.chartElement.nativeElement;if(null!==n.parentNode){const i=n.parentNode.getBoundingClientRect();t=i.width,e=i.height}return t&&e?{width:t,height:e}:null}formatDates(){for(let t=0;tn.lift(new FE(t,e))}(200)).subscribe(t=>{this.update(),this.cd&&this.cd.markForCheck()});this.resizeSubscription=t}cloneData(t){const e=[];for(const n of t){const t={name:n.name};if(void 0!==n.value&&(t.value=n.value),void 0!==n.series){t.series=[];for(const e of n.series){const n=Object.assign({},e);t.series.push(n)}}void 0!==n.extra&&(t.extra=JSON.parse(JSON.stringify(n.extra))),e.push(t)}return e}};return t.\u0275fac=function(e){return new(e||t)(oa(uc),oa(ju),oa(_o))},t.\u0275cmp=pe({type:t,selectors:[["base-chart"]],inputs:{scheme:"scheme",schemeType:"schemeType",animations:"animations",results:"results",view:"view",customColors:"customColors"},outputs:{select:"select"},features:[Ve],decls:1,vars:0,template:function(t,e){1&t&&da(0,"div")},encapsulation:2}),t})(),SN=(()=>{let t=class{constructor(t){this.textHeight=25,this.margin=5,this.element=t.nativeElement}ngOnChanges(t){this.update()}update(){switch(this.strokeWidth="0.01",this.textAnchor="middle",this.transform="",this.orient){case"top":case"bottom":this.y=this.offset,this.x=this.width/2;break;case"left":this.y=-(this.offset+this.textHeight+this.margin),this.x=-this.height/2,this.transform="rotate(270)";break;case"right":this.y=this.offset+this.margin,this.x=-this.height/2,this.transform="rotate(270)"}}};return t.\u0275fac=function(e){return new(e||t)(oa(uc))},t.\u0275cmp=pe({type:t,selectors:[["g","ngx-charts-axis-label",""]],inputs:{orient:"orient",label:"label",offset:"offset",width:"width",height:"height"},features:[Ve],attrs:pI,decls:2,vars:6,template:function(t,e){1&t&&(jn(),ua(0,"text"),qa(1),ha()),2&t&&(na("stroke-width",e.strokeWidth)("x",e.x)("y",e.y)("text-anchor",e.textAnchor)("transform",e.transform),gs(1),Xa(" ",e.label," "))},encapsulation:2,changeDetection:0}),t})();function kN(t,e=16){return"string"!=typeof t?"number"==typeof t?t+"":"":(t=t.trim()).length<=e?t:`${t.slice(0,e)}...`}function EN(t,e){if(t.length>e){const n=[],i=Math.floor(t.length/e);for(let e=0;e{let t=class{constructor(){this.tickArguments=[5],this.tickStroke="#ccc",this.trimTicks=!0,this.maxTickLength=16,this.showGridLines=!1,this.rotateTicks=!0,this.dimensionsChanged=new Zc,this.verticalSpacing=20,this.rotateLabels=!1,this.innerTickSize=6,this.outerTickSize=6,this.tickPadding=3,this.textAnchor="middle",this.maxTicksLength=0,this.maxAllowedLength=16,this.height=0}ngOnChanges(t){this.update()}ngAfterViewInit(){setTimeout(()=>this.updateDims())}updateDims(){const t=parseInt(this.ticksElement.nativeElement.getBoundingClientRect().height,10);t!==this.height&&(this.height=t,this.dimensionsChanged.emit({height:t}),setTimeout(()=>this.updateDims()))}update(){const t=this.scale;this.ticks=this.getTicks(),this.tickFormat=this.tickFormatting?this.tickFormatting:t.tickFormat?t.tickFormat.apply(t,this.tickArguments):function(t){return"Date"===t.constructor.name?t.toLocaleDateString():t.toLocaleString()};const e=this.rotateTicks?this.getRotationAngle(this.ticks):null;this.adjustedScale=this.scale.bandwidth?function(t){return this.scale(t)+.5*this.scale.bandwidth()}:this.scale,this.textTransform="",e&&0!==e?(this.textTransform=`rotate(${e})`,this.textAnchor="end",this.verticalSpacing=10):this.textAnchor="middle",setTimeout(()=>this.updateDims())}getRotationAngle(t){let e=0;this.maxTicksLength=0;for(let s=0;sthis.maxTicksLength&&(this.maxTicksLength=n)}const n=8*Math.min(this.maxTicksLength,this.maxAllowedLength);let i=n;const r=Math.floor(this.width/t.length);for(;i>r&&e>-90;)e-=30,i=Math.cos(e*(Math.PI/180))*n;return e}getTicks(){let t;const e=this.getMaxTicks(20),n=this.getMaxTicks(100);return this.tickValues?t=this.tickValues:this.scale.ticks?t=this.scale.ticks.apply(this.scale,[n]):(t=this.scale.domain(),t=EN(t,e)),t}getMaxTicks(t){return Math.floor(this.width/t)}tickTransform(t){return"translate("+this.adjustedScale(t)+","+this.verticalSpacing+")"}gridLineTransform(){return`translate(0,${-this.verticalSpacing-5})`}tickTrim(t){return this.trimTicks?kN(t,this.maxTickLength):t}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["g","ngx-charts-x-axis-ticks",""]],viewQuery:function(t,e){if(1&t&&fu(gI,!0),2&t){let t;hu(t=vu())&&(e.ticksElement=t.first)}},inputs:{tickArguments:"tickArguments",tickStroke:"tickStroke",trimTicks:"trimTicks",maxTickLength:"maxTickLength",showGridLines:"showGridLines",rotateTicks:"rotateTicks",scale:"scale",orient:"orient",tickValues:"tickValues",tickFormatting:"tickFormatting",gridLineHeight:"gridLineHeight",width:"width"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Ve],attrs:mI,decls:4,vars:2,consts:[["ticksel",""],["class","tick",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf"],[1,"tick"],["stroke-width","0.01"],[4,"ngIf"],["y2","0",1,"gridline-path","gridline-path-vertical"]],template:function(t,e){1&t&&(jn(),ua(0,"g",null,0),ra(2,vI,5,7,"g",1),ha(),ra(3,bI,2,2,"g",2)),2&t&&(gs(2),la("ngForOf",e.ticks),gs(1),la("ngForOf",e.ticks))},directives:[Sd,Ed],encapsulation:2,changeDetection:0}),t})(),DN=(()=>{let t=class{constructor(){this.rotateTicks=!0,this.showGridLines=!1,this.xOrient="bottom",this.xAxisOffset=0,this.dimensionsChanged=new Zc,this.xAxisClassName="x axis",this.labelOffset=0,this.fill="none",this.stroke="stroke",this.tickStroke="#ccc",this.strokeWidth="none",this.padding=5}ngOnChanges(t){this.update()}update(){this.transform=`translate(0,${this.xAxisOffset+this.padding+this.dims.height})`,void 0!==this.xAxisTickCount&&(this.tickArguments=[this.xAxisTickCount])}emitTicksHeight({height:t}){const e=t+25+5;e!==this.labelOffset&&(this.labelOffset=e,setTimeout(()=>{this.dimensionsChanged.emit({height:t})},0))}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["g","ngx-charts-x-axis",""]],viewQuery:function(t,e){if(1&t&&fu(AN,!0),2&t){let t;hu(t=vu())&&(e.ticksComponent=t.first)}},inputs:{rotateTicks:"rotateTicks",showGridLines:"showGridLines",xOrient:"xOrient",xAxisOffset:"xAxisOffset",xScale:"xScale",dims:"dims",trimTicks:"trimTicks",maxTickLength:"maxTickLength",tickFormatting:"tickFormatting",showLabel:"showLabel",labelText:"labelText",ticks:"ticks",xAxisTickInterval:"xAxisTickInterval",xAxisTickCount:"xAxisTickCount"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Ve],attrs:wI,decls:3,vars:4,consts:[["ngx-charts-x-axis-ticks","",3,"trimTicks","rotateTicks","maxTickLength","tickFormatting","tickArguments","tickStroke","scale","orient","showGridLines","gridLineHeight","width","tickValues","dimensionsChanged",4,"ngIf"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width",4,"ngIf"],["ngx-charts-x-axis-ticks","",3,"trimTicks","rotateTicks","maxTickLength","tickFormatting","tickArguments","tickStroke","scale","orient","showGridLines","gridLineHeight","width","tickValues","dimensionsChanged"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width"]],template:function(t,e){1&t&&(jn(),ua(0,"g"),ra(1,xI,1,12,"g",0),ra(2,_I,1,5,"g",1),ha()),2&t&&(na("class",e.xAxisClassName)("transform",e.transform),gs(1),la("ngIf",e.xScale),gs(1),la("ngIf",e.showLabel))},directives:[Ed,AN,SN],encapsulation:2,changeDetection:0}),t})(),TN=(()=>{let t=class{constructor(){this.tickArguments=[5],this.tickStroke="#ccc",this.trimTicks=!0,this.maxTickLength=16,this.showGridLines=!1,this.showRefLabels=!1,this.showRefLines=!1,this.dimensionsChanged=new Zc,this.innerTickSize=6,this.tickPadding=3,this.verticalSpacing=20,this.textAnchor="middle",this.width=0,this.outerTickSize=6,this.rotateLabels=!1,this.referenceLineLength=0}ngOnChanges(t){this.update()}ngAfterViewInit(){setTimeout(()=>this.updateDims())}updateDims(){const t=parseInt(this.ticksElement.nativeElement.getBoundingClientRect().width,10);t!==this.width&&(this.width=t,this.dimensionsChanged.emit({width:t}),setTimeout(()=>this.updateDims()))}update(){let t;const e="top"===this.orient||"right"===this.orient?-1:1;switch(this.tickSpacing=Math.max(this.innerTickSize,0)+this.tickPadding,t=this.scale,this.ticks=this.getTicks(),this.tickFormat=this.tickFormatting?this.tickFormatting:t.tickFormat?t.tickFormat.apply(t,this.tickArguments):function(t){return"Date"===t.constructor.name?t.toLocaleDateString():t.toLocaleString()},this.adjustedScale=t.bandwidth?function(e){return t(e)+.5*t.bandwidth()}:t,this.showRefLines&&this.referenceLines&&this.setReferencelines(),this.orient){case"top":case"bottom":this.transform=function(t){return"translate("+this.adjustedScale(t)+",0)"},this.textAnchor="middle",this.y2=this.innerTickSize*e,this.y1=this.tickSpacing*e,this.dy=e<0?"0em":".71em";break;case"left":this.transform=function(t){return"translate(0,"+this.adjustedScale(t)+")"},this.textAnchor="end",this.x2=this.innerTickSize*-e,this.x1=this.tickSpacing*-e,this.dy=".32em";break;case"right":this.transform=function(t){return"translate(0,"+this.adjustedScale(t)+")"},this.textAnchor="start",this.x2=this.innerTickSize*-e,this.x1=this.tickSpacing*-e,this.dy=".32em"}setTimeout(()=>this.updateDims())}setReferencelines(){this.refMin=this.adjustedScale(Math.min.apply(null,this.referenceLines.map(t=>t.value))),this.refMax=this.adjustedScale(Math.max.apply(null,this.referenceLines.map(t=>t.value))),this.referenceLineLength=this.referenceLines.length,this.referenceAreaPath=function(t,e,n,i,r,[s,o,a,l]){let c="";return c=`M${[t+r,e]}`,c+="h"+((n=0===(n=Math.floor(n))?1:n)-2*r),c+=o?`a${[r,r]} 0 0 1 ${[r,r]}`:`h${r}v${r}`,c+="v"+((i=0===(i=Math.floor(i))?1:i)-2*r),c+=l?`a${[r,r]} 0 0 1 ${[-r,r]}`:`v${r}h${-r}`,c+="h"+(2*r-n),c+=a?`a${[r,r]} 0 0 1 ${[-r,-r]}`:`h${-r}v${-r}`,c+="v"+(2*r-i),c+=s?`a${[r,r]} 0 0 1 ${[r,-r]}`:`v${-r}h${r}`,c+="z",c}(0,this.refMax,this.gridLineWidth,this.refMin-this.refMax,0,[!1,!1,!1,!1])}getTicks(){let t;const e=this.getMaxTicks(20),n=this.getMaxTicks(50);return this.tickValues?t=this.tickValues:this.scale.ticks?t=this.scale.ticks.apply(this.scale,[n]):(t=this.scale.domain(),t=EN(t,e)),t}getMaxTicks(t){return Math.floor(this.height/t)}tickTransform(t){return`translate(${this.adjustedScale(t)},${this.verticalSpacing})`}gridLineTransform(){return"translate(5,0)"}tickTrim(t){return this.trimTicks?kN(t,this.maxTickLength):t}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["g","ngx-charts-y-axis-ticks",""]],viewQuery:function(t,e){if(1&t&&fu(gI,!0),2&t){let t;hu(t=vu())&&(e.ticksElement=t.first)}},inputs:{tickArguments:"tickArguments",tickStroke:"tickStroke",trimTicks:"trimTicks",maxTickLength:"maxTickLength",showGridLines:"showGridLines",showRefLabels:"showRefLabels",showRefLines:"showRefLines",scale:"scale",orient:"orient",tickValues:"tickValues",tickFormatting:"tickFormatting",gridLineWidth:"gridLineWidth",height:"height",referenceLines:"referenceLines"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Ve],attrs:CI,decls:6,vars:4,consts:[["ticksel",""],["class","tick",4,"ngFor","ngForOf"],["class","reference-area",4,"ngIf"],[4,"ngFor","ngForOf"],[1,"tick"],["stroke-width","0.01"],[1,"reference-area"],[4,"ngIf"],["class","gridline-path gridline-path-horizontal","x1","0",4,"ngIf"],["x1","0",1,"gridline-path","gridline-path-horizontal"],["x1","0",1,"refline-path","gridline-path-horizontal"],[1,"refline-label"]],template:function(t,e){1&t&&(jn(),ua(0,"g",null,0),ra(2,SI,5,9,"g",1),ha(),ra(3,kI,1,2,"path",2),ra(4,TI,2,2,"g",3),ra(5,MI,2,1,"g",3)),2&t&&(gs(2),la("ngForOf",e.ticks),gs(1),la("ngIf",e.referenceLineLength>1&&e.refMax&&e.refMin&&e.showRefLines),gs(1),la("ngForOf",e.ticks),gs(1),la("ngForOf",e.referenceLines))},directives:[Sd,Ed],encapsulation:2,changeDetection:0}),t})(),RN=(()=>{let t=class{constructor(){this.showGridLines=!1,this.yOrient="left",this.yAxisOffset=0,this.dimensionsChanged=new Zc,this.yAxisClassName="y axis",this.labelOffset=15,this.fill="none",this.stroke="#CCC",this.tickStroke="#CCC",this.strokeWidth=1,this.padding=5}ngOnChanges(t){this.update()}update(){this.offset=-(this.yAxisOffset+this.padding),"right"===this.yOrient?(this.labelOffset=65,this.transform=`translate(${this.offset+this.dims.width} , 0)`):(this.offset=this.offset,this.transform=`translate(${this.offset} , 0)`),void 0!==this.yAxisTickCount&&(this.tickArguments=[this.yAxisTickCount])}emitTicksWidth({width:t}){t!==this.labelOffset&&"right"===this.yOrient?(this.labelOffset=t+this.labelOffset,setTimeout(()=>{this.dimensionsChanged.emit({width:t})},0)):t!==this.labelOffset&&(this.labelOffset=t,setTimeout(()=>{this.dimensionsChanged.emit({width:t})},0))}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["g","ngx-charts-y-axis",""]],viewQuery:function(t,e){if(1&t&&fu(TN,!0),2&t){let t;hu(t=vu())&&(e.ticksComponent=t.first)}},inputs:{showGridLines:"showGridLines",yOrient:"yOrient",yAxisOffset:"yAxisOffset",yScale:"yScale",dims:"dims",trimTicks:"trimTicks",maxTickLength:"maxTickLength",tickFormatting:"tickFormatting",ticks:"ticks",showLabel:"showLabel",labelText:"labelText",yAxisTickInterval:"yAxisTickInterval",yAxisTickCount:"yAxisTickCount",referenceLines:"referenceLines",showRefLines:"showRefLines",showRefLabels:"showRefLabels"},outputs:{dimensionsChanged:"dimensionsChanged"},features:[Ve],attrs:LI,decls:3,vars:4,consts:[["ngx-charts-y-axis-ticks","",3,"trimTicks","maxTickLength","tickFormatting","tickArguments","tickValues","tickStroke","scale","orient","showGridLines","gridLineWidth","referenceLines","showRefLines","showRefLabels","height","dimensionsChanged",4,"ngIf"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width",4,"ngIf"],["ngx-charts-y-axis-ticks","",3,"trimTicks","maxTickLength","tickFormatting","tickArguments","tickValues","tickStroke","scale","orient","showGridLines","gridLineWidth","referenceLines","showRefLines","showRefLabels","height","dimensionsChanged"],["ngx-charts-axis-label","",3,"label","offset","orient","height","width"]],template:function(t,e){1&t&&(jn(),ua(0,"g"),ra(1,$I,1,14,"g",0),ra(2,OI,1,5,"g",1),ha()),2&t&&(na("class",e.yAxisClassName)("transform",e.transform),gs(1),la("ngIf",e.yScale),gs(1),la("ngIf",e.showLabel))},directives:[Ed,TN,SN],encapsulation:2,changeDetection:0}),t})(),FN=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[Fd]]}),t})();var MN=function(t){return t[t.popover="popover"]="popover",t[t.tooltip="tooltip"]="tooltip",t}({}),LN=function(t){return t[t.left="left"]="left",t[t.center="center"]="center",t[t.right="right"]="right",t}({}),$N=function(t){return t[t.all="all"]="all",t[t.focus="focus"]="focus",t[t.mouseover="mouseover"]="mouseover",t}({});let ON=(()=>{let t=class{constructor(t,e,n){this.tooltipService=t,this.viewContainerRef=e,this.renderer=n,this.tooltipCssClass="",this.tooltipTitle="",this.tooltipAppendToBody=!0,this.tooltipSpacing=10,this.tooltipDisabled=!1,this.tooltipShowCaret=!0,this.tooltipPlacement=gN.top,this.tooltipAlignment=LN.center,this.tooltipType=MN.popover,this.tooltipCloseOnClickOutside=!0,this.tooltipCloseOnMouseLeave=!0,this.tooltipHideTimeout=300,this.tooltipShowTimeout=100,this.tooltipShowEvent=$N.all,this.tooltipImmediateExit=!1,this.show=new Zc,this.hide=new Zc}get listensForFocus(){return this.tooltipShowEvent===$N.all||this.tooltipShowEvent===$N.focus}get listensForHover(){return this.tooltipShowEvent===$N.all||this.tooltipShowEvent===$N.mouseover}ngOnDestroy(){this.hideTooltip(!0)}onFocus(){this.listensForFocus&&this.showTooltip()}onBlur(){this.listensForFocus&&this.hideTooltip(!0)}onMouseEnter(){this.listensForHover&&this.showTooltip()}onMouseLeave(t){if(this.listensForHover&&this.tooltipCloseOnMouseLeave){if(clearTimeout(this.timeout),this.component&&this.component.instance.element.nativeElement.contains(t))return;this.hideTooltip(this.tooltipImmediateExit)}}onMouseClick(){this.listensForHover&&this.hideTooltip(!0)}showTooltip(t){if(this.component||this.tooltipDisabled)return;const e=t?0:this.tooltipShowTimeout;clearTimeout(this.timeout),this.timeout=setTimeout(()=>{this.tooltipService.destroyAll();const t=this.createBoundOptions();this.component=this.tooltipService.create(t),setTimeout(()=>{this.component&&this.addHideListeners(this.component.instance.element.nativeElement)},10),this.show.emit(!0)},e)}addHideListeners(t){this.mouseEnterContentEvent=this.renderer.listen(t,"mouseenter",()=>{clearTimeout(this.timeout)}),this.tooltipCloseOnMouseLeave&&(this.mouseLeaveContentEvent=this.renderer.listen(t,"mouseleave",()=>{this.hideTooltip(this.tooltipImmediateExit)})),this.tooltipCloseOnClickOutside&&(this.documentClickEvent=this.renderer.listen(document,"click",e=>{t.contains(e.target)||this.hideTooltip()}))}hideTooltip(t=!1){if(!this.component)return;const e=()=>{this.mouseLeaveContentEvent&&this.mouseLeaveContentEvent(),this.mouseEnterContentEvent&&this.mouseEnterContentEvent(),this.documentClickEvent&&this.documentClickEvent(),this.hide.emit(!0),this.tooltipService.destroy(this.component),this.component=void 0};clearTimeout(this.timeout),t?e():this.timeout=setTimeout(e,this.tooltipHideTimeout)}createBoundOptions(){return{title:this.tooltipTitle,template:this.tooltipTemplate,host:this.viewContainerRef.element,placement:this.tooltipPlacement,alignment:this.tooltipAlignment,type:this.tooltipType,showCaret:this.tooltipShowCaret,cssClass:this.tooltipCssClass,spacing:this.tooltipSpacing,context:this.tooltipContext}}};return t.\u0275fac=function(e){return new(e||t)(oa(wN),oa(Ic),oa(pc))},t.\u0275dir=we({type:t,selectors:[["","ngx-tooltip",""]],hostBindings:function(t,e){1&t&&ya("focusin",function(){return e.onFocus()})("blur",function(){return e.onBlur()})("mouseenter",function(){return e.onMouseEnter()})("mouseleave",function(t){return e.onMouseLeave(t.target)})("click",function(){return e.onMouseClick()})},inputs:{tooltipCssClass:"tooltipCssClass",tooltipTitle:"tooltipTitle",tooltipAppendToBody:"tooltipAppendToBody",tooltipSpacing:"tooltipSpacing",tooltipDisabled:"tooltipDisabled",tooltipShowCaret:"tooltipShowCaret",tooltipPlacement:"tooltipPlacement",tooltipAlignment:"tooltipAlignment",tooltipType:"tooltipType",tooltipCloseOnClickOutside:"tooltipCloseOnClickOutside",tooltipCloseOnMouseLeave:"tooltipCloseOnMouseLeave",tooltipHideTimeout:"tooltipHideTimeout",tooltipShowTimeout:"tooltipShowTimeout",tooltipShowEvent:"tooltipShowEvent",tooltipImmediateExit:"tooltipImmediateExit",tooltipTemplate:"tooltipTemplate",tooltipContext:"tooltipContext"},outputs:{show:"show",hide:"hide"}}),t})(),IN=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},providers:[fN,wN],imports:[[Fd]]}),t})();function NN(t){return t instanceof Date?t.toLocaleDateString():t.toLocaleString()}function PN(t){return t.toLocaleString().replace(/[&'`"<>]/g,t=>({"&":"&","'":"'","`":"`",'"':""","<":"<",">":">"}[t]))}const BN={};function UN(){let t=("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4);return t=`a${t}`,BN[t]?UN():(BN[t]=!0,t)}let VN,HN=(()=>{let t=class{constructor(){this.type="standard",this.tooltipDisabled=!1,this.select=new Zc,this.activate=new Zc,this.deactivate=new Zc,this.barVisible=!1}ngOnInit(){this.gradientId="grad"+UN().toString(),this.gradientFill=`url(#${this.gradientId})`}ngOnChanges(t){this.update()}update(){this.circle=this.getActiveCircle()}getActiveCircle(){const t=this.data.series.findIndex(t=>{const e=t.name;return e&&this.visibleValue&&e.toString()===this.visibleValue.toString()&&void 0!==t.value});if(-1!==t)return this.mapDataPointToCircle(this.data.series[t],t)}mapDataPointToCircle(t,e){const n=this.data.name,i=t.value,r=t.name,s=NN(r);let o;o=this.xScale("time"===this.scaleType?r:"linear"===this.scaleType?Number(r):r);const a=this.yScale("standard"===this.type?i:t.d1),l=this.yScale.range()[0]-a;let c;return c=this.colors.getColor("linear"===this.colors.scaleType?"standard"===this.type?i:t.d1:n),{classNames:[`circle-data-${e}`],value:i,label:r,data:Object.assign({},t,{series:n,value:i,name:r}),cx:o,cy:a,radius:5,height:l,tooltipLabel:s,color:c,opacity:1,seriesName:n,gradientStops:this.getGradientStops(c),min:t.min,max:t.max}}getTooltipText({tooltipLabel:t,value:e,seriesName:n,min:i,max:r}){return`\n ${PN(n)} \u2022 ${PN(t)}\n ${e.toLocaleString()}${this.getTooltipMinMaxText(i,r)}\n `}getTooltipMinMaxText(t,e){if(void 0!==t||void 0!==e){let n=" (";return void 0!==t?(void 0===e&&(n+="\u2265"),n+=t.toLocaleString(),void 0!==e&&(n+=" - ")):void 0!==e&&(n+="\u2264"),void 0!==e&&(n+=e.toLocaleString()),n+=")",n}return""}getGradientStops(t){return[{offset:0,color:t,opacity:.2},{offset:100,color:t,opacity:1}]}onClick(t){this.select.emit(t)}isActive(t){return!!this.activeEntries&&void 0!==this.activeEntries.find(e=>t.name===e.name)}activateCircle(){this.barVisible=!0,this.activate.emit({name:this.data.name})}deactivateCircle(){this.barVisible=!1,this.circle.opacity=0,this.deactivate.emit({name:this.data.name})}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["g","ngx-charts-circle-series",""]],inputs:{type:"type",tooltipDisabled:"tooltipDisabled",data:"data",xScale:"xScale",yScale:"yScale",colors:"colors",scaleType:"scaleType",visibleValue:"visibleValue",activeEntries:"activeEntries",tooltipTemplate:"tooltipTemplate"},outputs:{select:"select",activate:"activate",deactivate:"deactivate"},features:[Ve],attrs:II,decls:1,vars:1,consts:[[4,"ngIf"],["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops"],["class","tooltip-bar",4,"ngIf"],["ngx-charts-circle","","ngx-tooltip","",1,"circle",3,"cx","cy","r","fill","pointerEvents","data","classNames","tooltipDisabled","tooltipPlacement","tooltipType","tooltipTitle","tooltipTemplate","tooltipContext","select","activate","deactivate"],[1,"tooltip-bar"]],template:function(t,e){1&t&&ra(0,BI,5,20,"g",0),2&t&&la("ngIf",e.circle)},directives:function(){return[Ed,zN,jN,ON]},encapsulation:2,data:{animation:[pf("animationState",[yf(":enter",[vf({opacity:0}),gf(250,vf({opacity:1}))])])]},changeDetection:0}),t})(),jN=(()=>{let t=class{constructor(){this.select=new Zc,this.activate=new Zc,this.deactivate=new Zc}onClick(){this.select.emit(this.data)}onMouseEnter(){this.activate.emit(this.data)}onMouseLeave(){this.deactivate.emit(this.data)}ngOnChanges(t){this.classNames=Array.isArray(this.classNames)?this.classNames.join(" "):"",this.classNames+="circle"}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["g","ngx-charts-circle",""]],hostBindings:function(t,e){1&t&&ya("click",function(){return e.onClick()})("mouseenter",function(){return e.onMouseEnter()})("mouseleave",function(){return e.onMouseLeave()})},inputs:{classNames:"classNames",cx:"cx",cy:"cy",r:"r",fill:"fill",stroke:"stroke",data:"data",circleOpacity:"circleOpacity",pointerEvents:"pointerEvents"},outputs:{select:"select",activate:"activate",deactivate:"deactivate"},features:[Ve],attrs:UI,decls:1,vars:8,template:function(t,e){1&t&&(jn(),da(0,"circle")),2&t&&na("cx",e.cx)("cy",e.cy)("r",e.r)("fill",e.fill)("stroke",e.stroke)("opacity",e.circleOpacity)("class",e.classNames)("pointer-events",e.pointerEvents)},encapsulation:2,changeDetection:0}),t})(),zN=(()=>{let t=class{constructor(){this.orientation="vertical"}ngOnChanges(t){this.x1="0%",this.x2="0%",this.y1="0%",this.y2="0%","horizontal"===this.orientation?this.x2="100%":"vertical"===this.orientation&&(this.y1="100%")}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["g","ngx-charts-svg-linear-gradient",""]],inputs:{orientation:"orientation",name:"name",stops:"stops"},features:[Ve],attrs:VI,decls:2,vars:6,consts:[[3,"id"],[3,"stop-color","stop-opacity",4,"ngFor","ngForOf"]],template:function(t,e){1&t&&(jn(),ua(0,"linearGradient",0),ra(1,HI,1,5,"stop",1),ha()),2&t&&(la("id",e.name),na("x1",e.x1)("y1",e.y1)("x2",e.x2)("y2",e.y2),gs(1),la("ngForOf",e.stops))},directives:[Sd],encapsulation:2,changeDetection:0}),t})(),WN=(()=>{let t=class{constructor(t){this.opacity=1,this.startOpacity=.5,this.endOpacity=1,this.gradient=!1,this.animations=!0,this.select=new Zc,this.initialized=!1,this.hasGradient=!1,this.element=t.nativeElement}ngOnChanges(t){this.initialized?this.update():(this.loadAnimation(),this.initialized=!0)}update(){this.gradientId="grad"+UN().toString(),this.gradientFill=`url(#${this.gradientId})`,this.gradient||this.stops?(this.gradientStops=this.getGradient(),this.hasGradient=!0):this.hasGradient=!1,this.updatePathEl()}loadAnimation(){this.areaPath=this.startingPath,setTimeout(this.update.bind(this),100)}updatePathEl(){const t=zA(this.element).select(".area");this.animations?t.transition().duration(750).attr("d",this.path):t.attr("d",this.path)}getGradient(){return this.stops?this.stops:[{offset:0,color:this.fill,opacity:this.startOpacity},{offset:100,color:this.fill,opacity:this.endOpacity}]}};return t.\u0275fac=function(e){return new(e||t)(oa(uc))},t.\u0275cmp=pe({type:t,selectors:[["g","ngx-charts-area",""]],inputs:{opacity:"opacity",startOpacity:"startOpacity",endOpacity:"endOpacity",gradient:"gradient",animations:"animations",data:"data",path:"path",startingPath:"startingPath",fill:"fill",activeLabel:"activeLabel",stops:"stops"},outputs:{select:"select"},features:[Ve],attrs:jI,decls:2,vars:5,consts:[[4,"ngIf"],[1,"area"],["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops"]],template:function(t,e){1&t&&(ra(0,zI,2,2,"defs",0),jn(),da(1,"path",1)),2&t&&(la("ngIf",e.gradient),gs(1),$a("opacity",e.opacity),na("d",e.areaPath)("fill",e.gradient?e.gradientFill:e.fill))},directives:[Ed,zN],encapsulation:2,changeDetection:0}),t})();"undefined"!=typeof window?VN=window:"undefined"!=typeof global&&(VN=global);const GN=VN.MouseEvent;function KN(t,e=!1,n=!0){if("function"==typeof GN)return new GN(t,{bubbles:e,cancelable:n});{const i=document.createEvent("MouseEvent");return i.initEvent(t,e,n),i}}let qN=(()=>{let t=class{constructor(){this.anchorOpacity=0,this.anchorPos=-1,this.anchorValues=[],this.showPercentage=!1,this.tooltipDisabled=!1,this.hover=new Zc}getValues(t){const e=[];for(const n of this.results){const i=n.series.find(e=>e.name.toString()===t.toString());let r=n.name;if(r instanceof Date&&(r=r.toLocaleDateString()),i){const t=i.name;let s,o=i.value;if(this.showPercentage&&(o=(i.d1-i.d0).toFixed(2)+"%"),"linear"===this.colors.scaleType){let t=o;i.d1&&(t=i.d1),s=this.colors.getColor(t)}else s=this.colors.getColor(n.name);const a=Object.assign({},i,{value:o,name:t,series:r,min:i.min,max:i.max,color:s});e.push(a)}}return e}mouseMove(t){const e=t.pageX-t.target.getBoundingClientRect().left,n=this.findClosestPointIndex(e),i=this.xSet[n];if(this.anchorPos=this.xScale(i),this.anchorPos=Math.max(0,this.anchorPos),this.anchorPos=Math.min(this.dims.width,this.anchorPos),this.anchorValues=this.getValues(i),this.anchorPos!==this.lastAnchorPos){const t=KN("mouseleave");this.tooltipAnchor.nativeElement.dispatchEvent(t),this.anchorOpacity=.7,this.hover.emit({value:i}),this.showTooltip(),this.lastAnchorPos=this.anchorPos}}findClosestPointIndex(t){let e=0,n=this.xSet.length-1,i=Number.MAX_VALUE,r=0;for(;e<=n;){const s=(e+n)/2|0,o=this.xScale(this.xSet[s]),a=Math.abs(o-t);if(at)){i=0,r=s;break}n=s-1}}return r}showTooltip(){const t=KN("mouseenter");this.tooltipAnchor.nativeElement.dispatchEvent(t)}hideTooltip(){const t=KN("mouseleave");this.tooltipAnchor.nativeElement.dispatchEvent(t),this.anchorOpacity=0,this.lastAnchorPos=-1}getToolTipText(t){let e="";return e+=void 0!==t.series?t.series:"???",e+=": ",void 0!==t.value&&(e+=t.value.toLocaleString()),void 0===t.min&&void 0===t.max||(e+=" (",void 0!==t.min?(void 0===t.max&&(e+="\u2265"),e+=t.min.toLocaleString(),void 0!==t.max&&(e+=" - ")):void 0!==t.max&&(e+="\u2264"),void 0!==t.max&&(e+=t.max.toLocaleString()),e+=")"),e}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["g","ngx-charts-tooltip-area",""]],viewQuery:function(t,e){if(1&t&&fu(WI,!0),2&t){let t;hu(t=vu())&&(e.tooltipAnchor=t.first)}},inputs:{showPercentage:"showPercentage",tooltipDisabled:"tooltipDisabled",dims:"dims",xSet:"xSet",xScale:"xScale",yScale:"yScale",results:"results",colors:"colors",tooltipTemplate:"tooltipTemplate"},outputs:{hover:"hover"},attrs:GI,decls:6,vars:18,consts:[["y","0",1,"tooltip-area",2,"opacity","0","cursor","auto",3,"mousemove","mouseleave"],["defaultTooltipTemplate",""],["y","0","ngx-tooltip","",1,"tooltip-anchor",3,"tooltipDisabled","tooltipPlacement","tooltipType","tooltipSpacing","tooltipTemplate","tooltipContext","tooltipImmediateExit"],["tooltipAnchor",""],[1,"area-tooltip-container"],["class","tooltip-item",4,"ngFor","ngForOf"],[1,"tooltip-item"],[1,"tooltip-item-color"]],template:function(t,e){if(1&t&&(jn(),ua(0,"g"),ua(1,"rect",0),ya("mousemove",function(t){return e.mouseMove(t)})("mouseleave",function(){return e.hideTooltip()}),ha(),ra(2,qI,2,1,"ng-template",null,1,xu),da(4,"rect",2,3),ha()),2&t){const t=sa(3);gs(1),na("x",0)("width",e.dims.width)("height",e.dims.height),gs(3),$a("opacity",e.anchorOpacity)("pointer-events","none"),la("@animationState",0!==e.anchorOpacity?"active":"inactive")("tooltipDisabled",e.tooltipDisabled)("tooltipPlacement","right")("tooltipType","tooltip")("tooltipSpacing",15)("tooltipTemplate",e.tooltipTemplate?e.tooltipTemplate:t)("tooltipContext",e.anchorValues)("tooltipImmediateExit",!0),na("x",e.anchorPos)("width",1)("height",e.dims.height)}},directives:[ON,Sd],encapsulation:2,data:{animation:[pf("animationState",[yf("inactive => active",[vf({opacity:0}),gf(250,vf({opacity:.7}))]),yf("active => inactive",[vf({opacity:.7}),gf(250,vf({opacity:0}))])])]},changeDetection:0}),t})(),YN=(()=>{let t=class{constructor(t,e){this.cd=e,this.height=50,this.select=new Zc,this.onDomainChange=new Zc,this.initialized=!1,this.element=t.nativeElement}ngOnChanges(t){this.update(),this.initialized||(this.addBrush(),this.initialized=!0)}update(){this.dims=this.getDims(),this.height=this.dims.height;const t=this.view[1]-this.height;this.xDomain=this.getXDomain(),this.xScale=this.getXScale(),this.brush&&this.updateBrush(),this.transform=`translate(0 , ${t})`,this.filterId="filter"+UN().toString(),this.filter=`url(#${this.filterId})`,this.cd.markForCheck()}getXDomain(){let t=[];for(const n of this.results)for(const e of n.series)t.includes(e.name)||t.push(e.name);let e=[];return"time"===this.scaleType?e=[Math.min(...t),Math.max(...t)]:"linear"===this.scaleType?(t=t.map(t=>Number(t)),e=[Math.min(...t),Math.max(...t)]):e=t,e}getXScale(){let t;return"time"===this.scaleType?t=jL().range([0,this.dims.width]).domain(this.xDomain):"linear"===this.scaleType?t=s$().range([0,this.dims.width]).domain(this.xDomain):"ordinal"===this.scaleType&&(t=h$().range([0,this.dims.width]).padding(.1).domain(this.xDomain)),t}addBrush(){if(this.brush)return;const t=this.height,e=this.view[0];this.brush=function(t){var e,n=DR,i=AR,r=TR,s=!0,o=JA("start","brush","end"),a=6;function l(e){var n=e.property("__brush",g).selectAll(".overlay").data([ER("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",xR.overlay).merge(n).each(function(){var t=RR(this).extent;zA(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])}),e.selectAll(".selection").data([ER("selection")]).enter().append("rect").attr("class","selection").attr("cursor",xR.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var i=e.selectAll(".handle").data(t.handles,function(t){return t.type});i.exit().remove(),i.enter().append("rect").attr("class",function(t){return"handle handle--"+t.type}).attr("cursor",function(t){return xR[t.type]}),e.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",d).filter(r).on("touchstart.brush",d).on("touchmove.brush",f).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function c(){var t=zA(this),e=RR(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",function(t){return"e"===t.type[t.type.length-1]?e[1][0]-a/2:e[0][0]-a/2}).attr("y",function(t){return"s"===t.type[0]?e[1][1]-a/2:e[0][1]-a/2}).attr("width",function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+a:a}).attr("height",function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+a:a})):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(t,e,n){var i=t.__brush.emitter;return!i||n&&i.clean?new h(t,e,n):i}function h(t,e,n){this.that=t,this.args=e,this.state=t.__brush,this.active=0,this.clean=n}function d(){if((!e||FA.touches)&&i.apply(this,arguments)){var n,r,o,a,l,h,d,f,p,g,m,v=this,y=FA.target.__data__.type,b="selection"===(s&&FA.metaKey?y="overlay":y)?dR:s&&FA.altKey?gR:pR,w=t===wR?null:SR[y],x=t===bR?null:kR[y],_=RR(v),C=_.extent,S=_.selection,k=C[0][0],E=C[0][1],A=C[1][0],D=C[1][1],T=0,R=0,F=w&&x&&s&&FA.shiftKey,M=FA.touches?yR(FA.changedTouches[0].identifier):XD,L=M(v),$=L,O=u(v,arguments,!0).beforestart();"overlay"===y?(S&&(p=!0),_.selection=S=[[n=t===wR?k:L[0],o=t===bR?E:L[1]],[l=t===wR?A:n,d=t===bR?D:o]]):(n=S[0][0],o=S[0][1],l=S[1][0],d=S[1][1]),r=n,a=o,h=l,f=d;var I=zA(v).attr("pointer-events","none"),N=I.selectAll(".overlay").attr("cursor",xR[y]);if(FA.touches)O.moved=B,O.ended=V;else{var P=zA(FA.view).on("mousemove.brush",B,!0).on("mouseup.brush",V,!0);s&&P.on("keydown.brush",H,!0).on("keyup.brush",j,!0),ZA(FA.view)}uR(),CT(v),c.call(v),O.start()}function B(){var t=M(v);!F||g||m||(Math.abs(t[0]-$[0])>Math.abs(t[1]-$[1])?m=!0:g=!0),$=t,p=!0,hR(),U()}function U(){var t;switch(T=$[0]-L[0],R=$[1]-L[1],b){case fR:case dR:w&&(T=Math.max(k-n,Math.min(A-l,T)),r=n+T,h=l+T),x&&(R=Math.max(E-o,Math.min(D-d,R)),a=o+R,f=d+R);break;case pR:w<0?(T=Math.max(k-n,Math.min(A-n,T)),r=n+T,h=l):w>0&&(T=Math.max(k-l,Math.min(A-l,T)),r=n,h=l+T),x<0?(R=Math.max(E-o,Math.min(D-o,R)),a=o+R,f=d):x>0&&(R=Math.max(E-d,Math.min(D-d,R)),a=o,f=d+R);break;case gR:w&&(r=Math.max(k,Math.min(A,n-T*w)),h=Math.max(k,Math.min(A,l+T*w))),x&&(a=Math.max(E,Math.min(D,o-R*x)),f=Math.max(E,Math.min(D,d+R*x)))}h0&&(n=r-T),x<0?d=f-R:x>0&&(o=a-R),b=fR,N.attr("cursor",xR.selection),U());break;default:return}hR()}function j(){switch(FA.keyCode){case 16:F&&(g=m=F=!1,U());break;case 18:b===gR&&(w<0?l=h:w>0&&(n=r),x<0?d=f:x>0&&(o=a),b=pR,U());break;case 32:b===fR&&(FA.altKey?(w&&(l=h-T*w,n=r+T*w),x&&(d=f-R*x,o=a+R*x),b=gR):(w<0?l=h:w>0&&(n=r),x<0?d=f:x>0&&(o=a),b=pR),N.attr("cursor",xR[y]),U());break;default:return}hR()}}function f(){u(this,arguments).moved()}function p(){u(this,arguments).ended()}function g(){var e=this.__brush||{selection:null};return e.extent=vR(n.apply(this,arguments)),e.dim=t,e}return l.move=function(e,n){e.selection?e.on("start.brush",function(){u(this,arguments).beforestart().start()}).on("interrupt.brush end.brush",function(){u(this,arguments).end()}).tween("brush",function(){var e=this,i=e.__brush,r=u(e,arguments),s=i.selection,o=t.input("function"==typeof n?n.apply(this,arguments):n,i.extent),a=KD(s,o);function l(t){i.selection=1===t&&null===o?null:a(t),c.call(e),r.brush()}return null!==s&&null!==o?l:l(1)}):e.each(function(){var e=this,i=arguments,r=e.__brush,s=t.input("function"==typeof n?n.apply(e,i):n,r.extent),o=u(e,i).beforestart();CT(e),r.selection=null===s?null:s,c.call(e),o.start().brush().end()})},l.clear=function(t){l.move(t,null)},h.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(e){!function(t,e,n,i){var r=FA;t.sourceEvent=FA,FA=t;try{e.apply(n,i)}finally{FA=r}}(new cR(l,e,t.output(this.state.selection)),o.apply,o,[e,this.that,this.args])}},l.extent=function(t){return arguments.length?(n="function"==typeof t?t:lR(vR(t)),l):n},l.filter=function(t){return arguments.length?(i="function"==typeof t?t:lR(!!t),l):i},l.touchable=function(t){return arguments.length?(r="function"==typeof t?t:lR(!!t),l):r},l.handleSize=function(t){return arguments.length?(a=+t,l):a},l.keyModifiers=function(t){return arguments.length?(s=!!t,l):s},l.on=function(){var t=o.on.apply(o,arguments);return t===o?l:t},l}(bR).extent([[0,0],[e,t]]).on("brush end",()=>{const t=(FA.selection||this.xScale.range()).map(this.xScale.invert);this.onDomainChange.emit(t),this.cd.markForCheck()}),zA(this.element).select(".brush").call(this.brush)}updateBrush(){this.brush&&(this.brush.extent([[0,0],[this.view[0],this.height]]),zA(this.element).select(".brush").call(this.brush),zA(this.element).select(".selection").attr("fill",void 0).attr("stroke",void 0).attr("fill-opacity",void 0),this.cd.markForCheck())}getDims(){return{width:this.view[0],height:this.height}}};return t.\u0275fac=function(e){return new(e||t)(oa(uc),oa(_o))},t.\u0275cmp=pe({type:t,selectors:[["g","ngx-charts-timeline",""]],inputs:{height:"height",view:"view",state:"state",results:"results",scheme:"scheme",customColors:"customColors",legend:"legend",miniChart:"miniChart",autoScale:"autoScale",scaleType:"scaleType"},outputs:{select:"select",onDomainChange:"onDomainChange"},features:[Ve],attrs:YI,ngContentSelectors:fI,decls:7,vars:4,consts:[[1,"timeline"],["in","SourceGraphic","type","matrix","values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"],[1,"embedded-chart"],["x","0","y","0",1,"brush-background"],[1,"brush"]],template:function(t,e){1&t&&(Ca(),jn(),ua(0,"g",0),ua(1,"filter"),da(2,"feColorMatrix",1),ha(),ua(3,"g",2),Sa(4),ha(),da(5,"rect",3),da(6,"g",4),ha()),2&t&&(na("transform",e.transform),gs(1),na("id",e.filterId),gs(4),na("width",e.view[0])("height",e.height))},styles:[".timeline .brush-background{fill:rgba(0,0,0,.05)}.timeline .brush .selection{fill:rgba(0,0,0,.1);stroke-width:1px;stroke:#888}.timeline .brush .handle{fill-opacity:0}.timeline .embedded-chart{opacity:.6}"],encapsulation:2,changeDetection:0}),t})(),XN=(()=>{let t=class{constructor(t){this.cd=t,this.horizontal=!1,this.labelClick=new Zc,this.labelActivate=new Zc,this.labelDeactivate=new Zc,this.legendEntries=[]}ngOnChanges(t){this.update()}update(){this.cd.markForCheck(),this.legendEntries=this.getLegendEntries()}getLegendEntries(){const t=[];for(const e of this.data){const n=NN(e);-1===t.findIndex(t=>t.label===n)&&t.push({label:e,formattedLabel:n,color:this.colors.getColor(e)})}return t}isActive(t){return!!this.activeEntries&&void 0!==this.activeEntries.find(e=>t.label===e.name)}activate(t){this.labelActivate.emit(t)}deactivate(t){this.labelDeactivate.emit(t)}trackBy(t,e){return e.label}};return t.\u0275fac=function(e){return new(e||t)(oa(_o))},t.\u0275cmp=pe({type:t,selectors:[["ngx-charts-legend"]],inputs:{horizontal:"horizontal",data:"data",title:"title",colors:"colors",height:"height",width:"width",activeEntries:"activeEntries"},outputs:{labelClick:"labelClick",labelActivate:"labelActivate",labelDeactivate:"labelDeactivate"},features:[Ve],decls:5,vars:9,consts:[["class","legend-title",4,"ngIf"],[1,"legend-wrap"],[1,"legend-labels"],["class","legend-label",4,"ngFor","ngForOf","ngForTrackBy"],[1,"legend-title"],[1,"legend-title-text"],[1,"legend-label"],[3,"label","formattedLabel","color","isActive","select","activate","deactivate"]],template:function(t,e){1&t&&(ua(0,"div"),ra(1,XI,3,1,"header",0),ua(2,"div",1),ua(3,"ul",2),ra(4,JI,2,4,"li",3),ha(),ha(),ha()),2&t&&($a("width",e.width,"px"),gs(1),la("ngIf",(null==e.title?null:e.title.length)>0),gs(2),$a("max-height",e.height-45,"px"),Oa("horizontal-legend",e.horizontal),gs(1),la("ngForOf",e.legendEntries)("ngForTrackBy",e.trackBy))},directives:function(){return[Ed,Sd,JN]},styles:[".chart-legend{display:inline-block;padding:0;width:auto!important}.chart-legend .legend-title{white-space:nowrap;overflow:hidden;margin-left:10px;margin-bottom:5px;font-size:14px;font-weight:700}.chart-legend li,.chart-legend ul{padding:0;margin:0;list-style:none}.chart-legend .horizontal-legend li{display:inline-block}.chart-legend .legend-wrap{width:calc(100% - 10px)}.chart-legend .legend-labels{line-height:85%;list-style:none;text-align:left;float:left;width:100%;border-radius:3px;overflow-y:auto;overflow-x:hidden;white-space:nowrap;background:rgba(0,0,0,.05)}.chart-legend .legend-label{cursor:pointer;font-size:90%;margin:8px;color:#afb7c8}.chart-legend .legend-label:hover{color:#000;transition:.2s}.chart-legend .legend-label .active .legend-label-text{color:#000}.chart-legend .legend-label-color{display:inline-block;height:15px;width:15px;margin-right:5px;color:#5b646b;border-radius:3px}.chart-legend .legend-label-text{display:inline-block;vertical-align:top;line-height:15px;font-size:12px;width:calc(100% - 20px);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.chart-legend .legend-title-text{vertical-align:bottom;display:inline-block;line-height:16px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}"],encapsulation:2,changeDetection:0}),t})(),JN=(()=>{let t=class{constructor(){this.isActive=!1,this.select=new Zc,this.activate=new Zc,this.deactivate=new Zc,this.toggle=new Zc}get trimmedLabel(){return this.formattedLabel||"(empty)"}onMouseEnter(){this.activate.emit({name:this.label})}onMouseLeave(){this.deactivate.emit({name:this.label})}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["ngx-charts-legend-entry"]],hostBindings:function(t,e){1&t&&ya("mouseenter",function(){return e.onMouseEnter()})("mouseleave",function(){return e.onMouseLeave()})},inputs:{isActive:"isActive",color:"color",label:"label",formattedLabel:"formattedLabel"},outputs:{select:"select",activate:"activate",deactivate:"deactivate",toggle:"toggle"},decls:4,vars:6,consts:[["tabindex","-1",3,"title","click"],[1,"legend-label-color",3,"click"],[1,"legend-label-text"]],template:function(t,e){1&t&&(ua(0,"span",0),ya("click",function(){return e.select.emit(e.formattedLabel)}),ua(1,"span",1),ya("click",function(){return e.toggle.emit(e.formattedLabel)}),ha(),ua(2,"span",2),qa(3),ha(),ha()),2&t&&(Oa("active",e.isActive),la("title",e.formattedLabel),gs(1),$a("background-color",e.color),gs(2),Xa(" ",e.trimmedLabel," "))},encapsulation:2,changeDetection:0}),t})(),QN=(()=>{let t=class{constructor(t){this.sanitizer=t,this.horizontal=!1}ngOnChanges(t){const e=this.gradientString(this.colors.range(),this.colors.domain());this.gradient=this.sanitizer.bypassSecurityTrustStyle(`linear-gradient(to ${this.horizontal?"right":"bottom"}, ${e})`)}gradientString(t,e){e.push(1);const n=[];return t.reverse().forEach((t,i)=>{n.push(`${t} ${Math.round(100*e[i])}%`)}),n.join(", ")}};return t.\u0275fac=function(e){return new(e||t)(oa(af))},t.\u0275cmp=pe({type:t,selectors:[["ngx-charts-scale-legend"]],inputs:{horizontal:"horizontal",valueRange:"valueRange",colors:"colors",height:"height",width:"width"},features:[Ve],decls:8,vars:10,consts:[[1,"scale-legend"],[1,"scale-legend-label"],[1,"scale-legend-wrap"]],template:function(t,e){1&t&&(ua(0,"div",0),ua(1,"div",1),ua(2,"span"),qa(3),ha(),ha(),da(4,"div",2),ua(5,"div",1),ua(6,"span"),qa(7),ha(),ha(),ha()),2&t&&($a("height",e.horizontal?void 0:e.height,"px")("width",e.width,"px"),Oa("horizontal-legend",e.horizontal),gs(3),Ya(e.valueRange[1].toLocaleString()),gs(1),$a("background",e.gradient),gs(3),Ya(e.valueRange[0].toLocaleString()))},styles:[".chart-legend{display:inline-block;padding:0;width:auto!important}.chart-legend .scale-legend{text-align:center;display:flex;flex-direction:column}.chart-legend .scale-legend-wrap{display:inline-block;flex:1;width:30px;border-radius:5px;margin:0 auto}.chart-legend .scale-legend-label{font-size:12px}.chart-legend .horizontal-legend.scale-legend{flex-direction:row}.chart-legend .horizontal-legend .scale-legend-wrap{width:auto;height:30px;margin:0 16px}"],encapsulation:2,changeDetection:0}),t})(),ZN=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[Fd,FN,IN],Fd,FN,IN]}),t})(),tP=[{name:"vivid",selectable:!0,group:"Ordinal",domain:["#647c8a","#3f51b5","#2196f3","#00b862","#afdf0a","#a7b61a","#f3e562","#ff9800","#ff5722","#ff4514"]},{name:"natural",selectable:!0,group:"Ordinal",domain:["#bf9d76","#e99450","#d89f59","#f2dfa7","#a5d7c6","#7794b1","#afafaf","#707160","#ba9383","#d9d5c3"]},{name:"cool",selectable:!0,group:"Ordinal",domain:["#a8385d","#7aa3e5","#a27ea8","#aae3f5","#adcded","#a95963","#8796c0","#7ed3ed","#50abcc","#ad6886"]},{name:"fire",selectable:!0,group:"Ordinal",domain:["#ff3d00","#bf360c","#ff8f00","#ff6f00","#ff5722","#e65100","#ffca28","#ffab00"]},{name:"solar",selectable:!0,group:"Continuous",domain:["#fff8e1","#ffecb3","#ffe082","#ffd54f","#ffca28","#ffc107","#ffb300","#ffa000","#ff8f00","#ff6f00"]},{name:"air",selectable:!0,group:"Continuous",domain:["#e1f5fe","#b3e5fc","#81d4fa","#4fc3f7","#29b6f6","#03a9f4","#039be5","#0288d1","#0277bd","#01579b"]},{name:"aqua",selectable:!0,group:"Continuous",domain:["#e0f7fa","#b2ebf2","#80deea","#4dd0e1","#26c6da","#00bcd4","#00acc1","#0097a7","#00838f","#006064"]},{name:"flame",selectable:!1,group:"Ordinal",domain:["#A10A28","#D3342D","#EF6D49","#FAAD67","#FDDE90","#DBED91","#A9D770","#6CBA67","#2C9653","#146738"]},{name:"ocean",selectable:!1,group:"Ordinal",domain:["#1D68FB","#33C0FC","#4AFFFE","#AFFFFF","#FFFC63","#FDBD2D","#FC8A25","#FA4F1E","#FA141B","#BA38D1"]},{name:"forest",selectable:!1,group:"Ordinal",domain:["#55C22D","#C1F33D","#3CC099","#AFFFFF","#8CFC9D","#76CFFA","#BA60FB","#EE6490","#C42A1C","#FC9F32"]},{name:"horizon",selectable:!1,group:"Ordinal",domain:["#2597FB","#65EBFD","#99FDD0","#FCEE4B","#FEFCFA","#FDD6E3","#FCB1A8","#EF6F7B","#CB96E8","#EFDEE0"]},{name:"neons",selectable:!1,group:"Ordinal",domain:["#FF3333","#FF33FF","#CC33FF","#0000FF","#33CCFF","#33FFFF","#33FF66","#CCFF33","#FFCC00","#FF6600"]},{name:"picnic",selectable:!1,group:"Ordinal",domain:["#FAC51D","#66BD6D","#FAA026","#29BB9C","#E96B56","#55ACD2","#B7332F","#2C83C9","#9166B8","#92E7E8"]},{name:"night",selectable:!1,group:"Ordinal",domain:["#2B1B5A","#501356","#183356","#28203F","#391B3C","#1E2B3C","#120634","#2D0432","#051932","#453080","#75267D","#2C507D","#4B3880","#752F7D","#35547D"]},{name:"nightLights",selectable:!1,group:"Ordinal",domain:["#4e31a5","#9c25a7","#3065ab","#57468b","#904497","#46648b","#32118d","#a00fb3","#1052a2","#6e51bd","#b63cc3","#6c97cb","#8671c1","#b455be","#7496c3"]}];class eP{constructor(t,e,n,i){"string"==typeof t&&(t=tP.find(e=>e.name===t)),this.colorDomain=t.domain,this.scaleType=e,this.domain=n,this.customColors=i,this.scale=this.generateColorScheme(t,e,this.domain)}generateColorScheme(t,e,n){let i;if("string"==typeof t&&(t=tP.find(e=>e.name===t)),"quantile"===e)i=f$().range(t.domain).domain(n);else if("ordinal"===e)i=l$().range(t.domain).domain(n);else if("linear"===e){const e=[...t.domain];1===e.length&&(e.push(e[0]),this.colorDomain=e);const n=o$(0,1,1/e.length);i=s$().domain(n).range(e)}return i}getColor(t){if(null==t)throw new Error("Value can not be null");if("linear"===this.scaleType){const e=s$().domain(this.domain).range([0,1]);return this.scale(e(t))}{if("function"==typeof this.customColors)return this.customColors(t);const e=t.toString();let n;return this.customColors&&this.customColors.length>0&&(n=this.customColors.find(t=>t.name.toLowerCase()===e.toLowerCase())),n?n.value:this.scale(t)}}getLinearGradientStops(t,e){void 0===e&&(e=this.domain[0]);const n=s$().domain(this.domain).range([0,1]),i=c$().domain(this.colorDomain).range([0,1]),r=this.getColor(t),s=n(e),o=this.getColor(e),a=n(t);let l=1,c=s;const u=[];for(u.push({color:o,offset:s,originalOffset:s,opacity:1});c=(a-i.bandwidth()).toFixed(4))break;u.push({color:t,offset:e,opacity:1}),c=e,l++}}if(u[u.length-1].offset<100&&u.push({color:r,offset:a,opacity:1}),a===s)u[0].offset=0,u[1].offset=100;else if(100!==u[u.length-1].offset)for(const h of u)h.offset=(h.offset-s)/(a-s)*100;return u}}let nP=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[ZN]]}),t})(),iP=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[ZN]]}),t})(),rP=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[ZN]]}),t})(),sP=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[ZN]]}),t})(),oP=(()=>{let t=class{constructor(t){this.element=t,this.fill="none",this.animations=!0,this.select=new Zc,this.initialized=!1}ngOnChanges(t){this.initialized?this.updatePathEl():(this.initialized=!0,this.initialPath=this.path)}updatePathEl(){const t=zA(this.element.nativeElement).select(".line");this.animations?t.transition().duration(750).attr("d",this.path):t.attr("d",this.path)}};return t.\u0275fac=function(e){return new(e||t)(oa(uc))},t.\u0275cmp=pe({type:t,selectors:[["g","ngx-charts-line",""]],inputs:{fill:"fill",animations:"animations",path:"path",stroke:"stroke",data:"data"},outputs:{select:"select"},features:[Ve],attrs:eN,decls:1,vars:4,consts:[["stroke-width","1.5px",1,"line"]],template:function(t,e){1&t&&(jn(),da(0,"path",0)),2&t&&(la("@animationState","active"),na("d",e.initialPath)("fill",e.fill)("stroke",e.stroke))},encapsulation:2,data:{animation:[pf("animationState",[yf(":enter",[vf({strokeDasharray:2e3,strokeDashoffset:2e3}),gf(1e3,vf({strokeDashoffset:0}))])])]},changeDetection:0}),t})(),aP=(()=>{let t=class extends CN{constructor(){super(...arguments),this.legendTitle="Legend",this.legendPosition="right",this.showGridLines=!0,this.curve=g$,this.activeEntries=[],this.trimXAxisTicks=!0,this.trimYAxisTicks=!0,this.rotateXAxisTicks=!0,this.maxXAxisTickLength=16,this.maxYAxisTickLength=16,this.roundDomains=!1,this.tooltipDisabled=!1,this.showRefLines=!1,this.showRefLabels=!0,this.activate=new Zc,this.deactivate=new Zc,this.margin=[10,20,10,20],this.xAxisHeight=0,this.yAxisWidth=0,this.timelineHeight=50,this.timelinePadding=10}update(){super.update(),this.dims=function({width:t,height:e,margins:n,showXAxis:i=!1,showYAxis:r=!1,xAxisHeight:s=0,yAxisWidth:o=0,showXLabel:a=!1,showYLabel:l=!1,showLegend:c=!1,legendType:u="ordinal",legendPosition:h="right",columns:d=12}){let f=n[3],p=t,g=e-n[0]-n[2];if(c&&"right"===h&&(d-="ordinal"===u?2:1),p=p*d/12,p=p-n[1]-n[3],i&&(g-=5,g-=s,a)&&(g-=30),r&&(p-=5,p-=o,f+=o,f+=10,l)){const t=30;p-=t,f+=t}return p=Math.max(0,p),g=Math.max(0,g),{width:Math.floor(p),height:Math.floor(g),xOffset:Math.floor(f)}}({width:this.width,height:this.height,margins:this.margin,showXAxis:this.xAxis,showYAxis:this.yAxis,xAxisHeight:this.xAxisHeight,yAxisWidth:this.yAxisWidth,showXLabel:this.showXAxisLabel,showYLabel:this.showYAxisLabel,showLegend:this.legend,legendType:this.schemeType,legendPosition:this.legendPosition}),this.timeline&&(this.dims.height-=this.timelineHeight+this.margin[2]+this.timelinePadding),this.xDomain=this.getXDomain(),this.filteredDomain&&(this.xDomain=this.filteredDomain),this.yDomain=this.getYDomain(),this.seriesDomain=this.getSeriesDomain(),this.xScale=this.getXScale(this.xDomain,this.dims.width),this.yScale=this.getYScale(this.yDomain,this.dims.height),this.updateTimeline(),this.setColors(),this.legendOptions=this.getLegendOptions(),this.transform=`translate(${this.dims.xOffset} , ${this.margin[0]})`,this.clipPathId="clip"+UN().toString(),this.clipPath=`url(#${this.clipPathId})`}updateTimeline(){this.timeline&&(this.timelineWidth=this.dims.width,this.timelineXDomain=this.getXDomain(),this.timelineXScale=this.getXScale(this.timelineXDomain,this.timelineWidth),this.timelineYScale=this.getYScale(this.yDomain,this.timelineHeight),this.timelineTransform=`translate(${this.dims.xOffset}, ${-this.margin[2]})`)}getXDomain(){let t=function(t){const e=new Set;for(const n of t)for(const t of n.series)e.add(t.name);return Array.from(e)}(this.results);this.scaleType=function(t,e=!0){return e&&t.every(t=>t instanceof Date)?"time":t.every(t=>"number"==typeof t)?"linear":"ordinal"}(t);let e,n,i=[];return"linear"===this.scaleType&&(t=t.map(t=>Number(t))),"time"!==this.scaleType&&"linear"!==this.scaleType||(e=this.xScaleMin?this.xScaleMin:Math.min(...t),n=this.xScaleMax?this.xScaleMax:Math.max(...t)),"time"===this.scaleType?(i=[new Date(e),new Date(n)],this.xSet=[...t].sort((t,e)=>{const n=t.getTime(),i=e.getTime();return n>i?1:i>n?-1:0})):"linear"===this.scaleType?(i=[e,n],this.xSet=[...t].sort((t,e)=>t-e)):(i=t,this.xSet=t),i}getYDomain(){const t=[];for(const n of this.results)for(const e of n.series)t.indexOf(e.value)<0&&t.push(e.value),void 0!==e.min&&(this.hasRange=!0,t.indexOf(e.min)<0&&t.push(e.min)),void 0!==e.max&&(this.hasRange=!0,t.indexOf(e.max)<0&&t.push(e.max));const e=[...t];return this.autoScale||e.push(0),[this.yScaleMin?this.yScaleMin:Math.min(...e),this.yScaleMax?this.yScaleMax:Math.max(...e)]}getSeriesDomain(){return this.results.map(t=>t.name)}getXScale(t,e){let n;return"time"===this.scaleType?n=jL().range([0,e]).domain(t):"linear"===this.scaleType?(n=s$().range([0,e]).domain(t),this.roundDomains&&(n=n.nice())):"ordinal"===this.scaleType&&(n=h$().range([0,e]).padding(.1).domain(t)),n}getYScale(t,e){const n=s$().range([e,0]).domain(t);return this.roundDomains?n.nice():n}updateDomain(t){this.filteredDomain=t,this.xDomain=this.filteredDomain,this.xScale=this.getXScale(this.xDomain,this.dims.width)}updateHoveredVertical(t){this.hoveredVertical=t.value,this.deactivateAll()}hideCircles(){this.hoveredVertical=null,this.deactivateAll()}onClick(t){this.select.emit(t)}trackBy(t,e){return e.name}setColors(){let t;t="ordinal"===this.schemeType?this.seriesDomain:this.yDomain,this.colors=new eP(this.scheme,this.schemeType,t,this.customColors)}getLegendOptions(){const t={scaleType:this.schemeType,colors:void 0,domain:[],title:void 0,position:this.legendPosition};return"ordinal"===t.scaleType?(t.domain=this.seriesDomain,t.colors=this.colors,t.title=this.legendTitle):(t.domain=this.yDomain,t.colors=this.colors.scale),t}updateYAxisWidth({width:t}){this.yAxisWidth=t,this.update()}updateXAxisHeight({height:t}){this.xAxisHeight=t,this.update()}onActivate(t){this.deactivateAll(),this.activeEntries.findIndex(e=>e.name===t.name&&e.value===t.value)>-1||(this.activeEntries=[t],this.activate.emit({value:t,entries:this.activeEntries}))}onDeactivate(t){const e=this.activeEntries.findIndex(e=>e.name===t.name&&e.value===t.value);this.activeEntries.splice(e,1),this.activeEntries=[...this.activeEntries],this.deactivate.emit({value:t,entries:this.activeEntries})}deactivateAll(){this.activeEntries=[...this.activeEntries];for(const t of this.activeEntries)this.deactivate.emit({value:t,entries:[]});this.activeEntries=[]}};return t.\u0275fac=function(e){return mP(e||t)},t.\u0275cmp=pe({type:t,selectors:[["ngx-charts-line-chart"]],contentQueries:function(t,e,n){if(1&t&&(gu(n,QI,!0),gu(n,ZI,!0)),2&t){let t;hu(t=vu())&&(e.tooltipTemplate=t.first),hu(t=vu())&&(e.seriesTooltipTemplate=t.first)}},hostBindings:function(t,e){1&t&&ya("mouseleave",function(){return e.hideCircles()})},inputs:{legendTitle:"legendTitle",legendPosition:"legendPosition",showGridLines:"showGridLines",curve:"curve",activeEntries:"activeEntries",trimXAxisTicks:"trimXAxisTicks",trimYAxisTicks:"trimYAxisTicks",rotateXAxisTicks:"rotateXAxisTicks",maxXAxisTickLength:"maxXAxisTickLength",maxYAxisTickLength:"maxYAxisTickLength",roundDomains:"roundDomains",tooltipDisabled:"tooltipDisabled",showRefLines:"showRefLines",showRefLabels:"showRefLabels",legend:"legend",xAxis:"xAxis",yAxis:"yAxis",showXAxisLabel:"showXAxisLabel",showYAxisLabel:"showYAxisLabel",xAxisLabel:"xAxisLabel",yAxisLabel:"yAxisLabel",autoScale:"autoScale",timeline:"timeline",gradient:"gradient",schemeType:"schemeType",rangeFillOpacity:"rangeFillOpacity",xAxisTickFormatting:"xAxisTickFormatting",yAxisTickFormatting:"yAxisTickFormatting",xAxisTicks:"xAxisTicks",yAxisTicks:"yAxisTicks",referenceLines:"referenceLines",xScaleMin:"xScaleMin",xScaleMax:"xScaleMax",yScaleMin:"yScaleMin",yScaleMax:"yScaleMax"},outputs:{activate:"activate",deactivate:"deactivate"},features:[jo],decls:11,vars:20,consts:[[3,"view","showLegend","legendOptions","activeEntries","animations","legendLabelClick","legendLabelActivate","legendLabelDeactivate"],[1,"line-chart","chart"],["ngx-charts-x-axis","",3,"xScale","dims","showGridLines","showLabel","labelText","trimTicks","rotateTicks","maxTickLength","tickFormatting","ticks","dimensionsChanged",4,"ngIf"],["ngx-charts-y-axis","",3,"yScale","dims","showGridLines","showLabel","labelText","trimTicks","maxTickLength","tickFormatting","ticks","referenceLines","showRefLines","showRefLabels","dimensionsChanged",4,"ngIf"],[4,"ngFor","ngForOf","ngForTrackBy"],[3,"mouseleave",4,"ngIf"],["ngx-charts-timeline","",3,"results","view","height","scheme","customColors","scaleType","legend","onDomainChange",4,"ngIf"],["ngx-charts-x-axis","",3,"xScale","dims","showGridLines","showLabel","labelText","trimTicks","rotateTicks","maxTickLength","tickFormatting","ticks","dimensionsChanged"],["ngx-charts-y-axis","",3,"yScale","dims","showGridLines","showLabel","labelText","trimTicks","maxTickLength","tickFormatting","ticks","referenceLines","showRefLines","showRefLabels","dimensionsChanged"],["ngx-charts-line-series","",3,"xScale","yScale","colors","data","activeEntries","scaleType","curve","rangeFillOpacity","hasRange","animations"],[3,"mouseleave"],["ngx-charts-tooltip-area","",3,"dims","xSet","xScale","yScale","results","colors","tooltipDisabled","tooltipTemplate","hover"],[4,"ngFor","ngForOf"],["ngx-charts-circle-series","",3,"xScale","yScale","colors","data","scaleType","visibleValue","activeEntries","tooltipDisabled","tooltipTemplate","select","activate","deactivate"],["ngx-charts-timeline","",3,"results","view","height","scheme","customColors","scaleType","legend","onDomainChange"],["ngx-charts-line-series","",3,"xScale","yScale","colors","data","scaleType","curve","hasRange","animations"]],template:function(t,e){1&t&&(ua(0,"ngx-charts-chart",0),ya("legendLabelClick",function(t){return e.onClick(t)})("legendLabelActivate",function(t){return e.onActivate(t)})("legendLabelDeactivate",function(t){return e.onDeactivate(t)}),jn(),ua(1,"defs"),ua(2,"clipPath"),da(3,"rect"),ha(),ha(),ua(4,"g",1),ra(5,nN,1,10,"g",2),ra(6,iN,1,12,"g",3),ua(7,"g"),ra(8,rN,2,11,"g",4),ra(9,oN,3,9,"g",5),ha(),ha(),ra(10,lN,2,13,"g",6),ha()),2&t&&(la("view",Yc(17,tN,e.width,e.height))("showLegend",e.legend)("legendOptions",e.legendOptions)("activeEntries",e.activeEntries)("animations",e.animations),gs(2),na("id",e.clipPathId),gs(1),na("width",e.dims.width+10)("height",e.dims.height+10)("transform","translate(-5, -5)"),gs(1),na("transform",e.transform),gs(1),la("ngIf",e.xAxis),gs(1),la("ngIf",e.yAxis),gs(1),na("clip-path",e.clipPath),gs(1),la("ngForOf",e.results)("ngForTrackBy",e.trackBy),gs(1),la("ngIf",!e.tooltipDisabled),gs(1),la("ngIf",e.timeline&&"ordinal"!=e.scaleType))},directives:function(){return[xN,Ed,Sd,DN,RN,lP,qN,HN,YN]},styles:[".ngx-charts{float:left;overflow:visible}.ngx-charts .arc,.ngx-charts .bar,.ngx-charts .circle{cursor:pointer}.ngx-charts .arc.active,.ngx-charts .arc:hover,.ngx-charts .bar.active,.ngx-charts .bar:hover,.ngx-charts .card.active,.ngx-charts .card:hover,.ngx-charts .cell.active,.ngx-charts .cell:hover{opacity:.8;transition:opacity .1s ease-in-out}.ngx-charts .arc:focus,.ngx-charts .bar:focus,.ngx-charts .card:focus,.ngx-charts .cell:focus{outline:0}.ngx-charts .arc.hidden,.ngx-charts .bar.hidden,.ngx-charts .card.hidden,.ngx-charts .cell.hidden{display:none}.ngx-charts g:focus{outline:0}.ngx-charts .area-series.inactive,.ngx-charts .line-series-range.inactive,.ngx-charts .line-series.inactive,.ngx-charts .polar-series-area.inactive,.ngx-charts .polar-series-path.inactive{transition:opacity .1s ease-in-out;opacity:.2}.ngx-charts .line-highlight{display:none}.ngx-charts .line-highlight.active{display:block}.ngx-charts .area{opacity:.6}.ngx-charts .circle:hover{cursor:pointer}.ngx-charts .label{font-size:12px;font-weight:400}.ngx-charts .tooltip-anchor{fill:#000}.ngx-charts .gridline-path{stroke:#ddd;stroke-width:1;fill:none}.ngx-charts .refline-path{stroke:#a8b2c7;stroke-width:1;stroke-dasharray:5;stroke-dashoffset:5}.ngx-charts .refline-label{font-size:9px}.ngx-charts .reference-area{fill-opacity:.05;fill:#000}.ngx-charts .gridline-path-dotted{stroke:#ddd;stroke-width:1;fill:none;stroke-dasharray:1,20;stroke-dashoffset:3}.ngx-charts .grid-panel rect{fill:none}.ngx-charts .grid-panel.odd rect{fill:rgba(0,0,0,.05)}"],encapsulation:2,data:{animation:[pf("animationState",[yf(":leave",[vf({opacity:1}),gf(500,vf({opacity:0}))])])]},changeDetection:0}),t})(),lP=(()=>{let t=class{constructor(){this.animations=!0}ngOnChanges(t){this.update()}update(){this.updateGradients();const t=this.sortData(this.data.series),e=this.getLineGenerator();this.path=e(t)||"";const n=this.getAreaGenerator();if(this.areaPath=n(t)||"",this.hasRange){const e=this.getRangeGenerator();this.outerPath=e(t)||""}if(this.hasGradient){this.stroke=this.gradientUrl;const t=this.data.series.map(t=>t.value),e=Math.max(...t);e===Math.min(...t)&&(this.stroke=this.colors.getColor(e))}else this.stroke=this.colors.getColor(this.data.name)}getLineGenerator(){return E$().x(t=>{const e=t.name;let n;return n=this.xScale("time"===this.scaleType?e:"linear"===this.scaleType?Number(e):e),n}).y(t=>this.yScale(t.value)).curve(this.curve)}getRangeGenerator(){return A$().x(t=>{const e=t.name;let n;return n=this.xScale("time"===this.scaleType?e:"linear"===this.scaleType?Number(e):e),n}).y0(t=>this.yScale("number"==typeof t.min?t.min:t.value)).y1(t=>this.yScale("number"==typeof t.max?t.max:t.value)).curve(this.curve)}getAreaGenerator(){return A$().x(t=>this.xScale(t.name)).y0(()=>this.yScale.range()[0]).y1(t=>this.yScale(t.value)).curve(this.curve)}sortData(t){return"linear"===this.scaleType?function(t,e,n="asc"){return t.sort((t,i)=>"asc"===n?t[e]-i[e]:i[e]-t[e])}(t,"name"):"time"===this.scaleType?function(t,e,n="asc"){return t.sort((t,i)=>{const r=t[e].getTime(),s=i[e].getTime();return"asc"===n?r>s?1:s>r?-1:0:r>s?-1:s>r?1:0})}(t,"name"):function(t,e,n="asc",i){return t.sort((t,r)=>{const s=r[e],o=i.indexOf(t[e]),a=i.indexOf(s);return"asc"===n?o-a:a-o})}(t,"name","asc",this.xScale.domain())}updateGradients(){if("linear"===this.colors.scaleType){this.hasGradient=!0,this.gradientId="grad"+UN().toString(),this.gradientUrl=`url(#${this.gradientId})`;const t=this.data.series.map(t=>t.value),e=Math.max(...t),n=Math.min(...t);this.gradientStops=this.colors.getLinearGradientStops(e,n),this.areaGradientStops=this.colors.getLinearGradientStops(e)}else this.hasGradient=!1,this.gradientStops=void 0,this.areaGradientStops=void 0}isActive(t){return!!this.activeEntries&&void 0!==this.activeEntries.find(e=>t.name===e.name)}isInactive(t){return!(!this.activeEntries||0===this.activeEntries.length)&&void 0===this.activeEntries.find(e=>t.name===e.name)}};return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["g","ngx-charts-line-series",""]],inputs:{animations:"animations",data:"data",xScale:"xScale",yScale:"yScale",colors:"colors",scaleType:"scaleType",curve:"curve",activeEntries:"activeEntries",rangeFillOpacity:"rangeFillOpacity",hasRange:"hasRange"},features:[Ve],attrs:cN,decls:6,vars:22,consts:[["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops",4,"ngIf"],["ngx-charts-area","",1,"line-highlight",3,"data","path","fill","opacity","startOpacity","gradient","stops","animations"],["ngx-charts-line","",1,"line-series",3,"data","path","stroke","animations"],["ngx-charts-area","","class","line-series-range",3,"data","path","fill","active","inactive","opacity","animations",4,"ngIf"],["ngx-charts-svg-linear-gradient","","orientation","vertical",3,"name","stops"],["ngx-charts-area","",1,"line-series-range",3,"data","path","fill","opacity","animations"]],template:function(t,e){1&t&&(jn(),ua(0,"g"),ua(1,"defs"),ra(2,uN,1,2,"g",0),ha(),da(3,"g",1),da(4,"g",2),ra(5,hN,1,9,"g",3),ha()),2&t&&(gs(2),la("ngIf",e.hasGradient),gs(1),Oa("active",e.isActive(e.data))("inactive",e.isInactive(e.data)),la("data",e.data)("path",e.areaPath)("fill",e.hasGradient?e.gradientUrl:e.colors.getColor(e.data.name))("opacity",.25)("startOpacity",0)("gradient",!0)("stops",e.areaGradientStops)("animations",e.animations),gs(1),Oa("active",e.isActive(e.data))("inactive",e.isInactive(e.data)),la("data",e.data)("path",e.path)("stroke",e.stroke)("animations",e.animations),gs(1),la("ngIf",e.hasRange))},directives:[Ed,WN,oP,zN],encapsulation:2,changeDetection:0}),t})(),cP=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[ZN]]}),t})();Math;let uP=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[ZN]]}),t})(),hP=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[ZN,uP,cP]]}),t})(),dP=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[ZN]]}),t})(),fP=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[ZN]]}),t})(),pP=(()=>{let t=class{};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[ZN,uP,iP]]}),t})(),gP=(()=>{let t=class{constructor(){"undefined"!=typeof SVGElement&&void 0===SVGElement.prototype.contains&&(SVGElement.prototype.contains=HTMLDivElement.prototype.contains)}};return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[ZN,nP,iP,rP,sP,cP,hP,dP,uP,fP,pP]}),t})();const mP=Ei(aP);function vP(t,e){if(1&t&&(ua(0,"ngb-alert",19),da(1,"img",20),ua(2,"h6",21),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("An error occurred: ",t.error,"")}}function yP(t,e){if(1&t&&(ua(0,"tr",24),ua(1,"td"),qa(2),ha(),ua(3,"td"),qa(4),ua(5,"span",25),qa(6),ha(),ha(),ua(7,"td"),qa(8),ua(9,"span",25),qa(10),ha(),ha(),ua(11,"td"),qa(12),ua(13,"span",25),qa(14),ha(),ha(),ua(15,"td"),qa(16),ua(17,"span",25),qa(18),ha(),ha(),ha()),2&t){const t=e.$implicit,n=xa(2);gs(2),Ya(t.name),gs(2),Xa("",t.session_count," "),gs(1),la("hidden",!n.showDelta),gs(1),Xa("(",n.getMaxSessionCount()-t.session_count," delta)"),gs(2),Xa("",t.presence_count," "),gs(1),la("hidden",!n.showDelta),gs(1),Xa("(",n.getMaxPresenceCount()-t.presence_count," delta)"),gs(2),Xa("",t.match_count," "),gs(1),la("hidden",!n.showDelta),gs(1),Xa("(",n.getMaxMatchCount()-t.match_count," delta)"),gs(2),Xa("",t.goroutine_count," "),gs(1),la("hidden",!n.showDelta),gs(1),Xa("(",n.getMaxGoroutineCount()-t.goroutine_count," delta)")}}function bP(t,e){if(1&t&&(ua(0,"tbody"),ra(1,yP,19,13,"tr",22),ua(2,"tr",3),da(3,"td",23),ua(4,"th",3),qa(5),ha(),ua(6,"th",3),qa(7),ha(),ua(8,"th",3),qa(9),ha(),ua(10,"th",3),qa(11),ha(),ha(),ha()),2&t){const t=xa();gs(1),la("ngForOf",t.statusData.nodes),gs(4),Ya(t.getTotalSessionCount()),gs(2),Ya(t.getMaxPresenceCount()),gs(2),Ya(t.getTotalMatchCount()),gs(2),Ya(t.getTotalGorountineCount())}}function wP(t,e){if(1&t&&(ua(0,"option",26),qa(1),ha()),2&t){const t=e.$implicit,n=xa();ka("value",t),gs(1),Ya(n.ranges[t])}}const xP=function(t){return{"background-color":t}};function _P(t,e){if(1&t&&(ua(0,"span"),da(1,"br"),da(2,"span",32),ua(3,"span",33),qa(4),ha(),ha()),2&t){const t=e.$implicit;gs(2),la("ngStyle",qc(3,xP,t.color)),gs(2),Ja("",t.series,": ",t.value,"")}}function CP(t,e){if(1&t&&(ua(0,"div",30),qa(1),ra(2,_P,5,5,"span",31),ha()),2&t){const t=e.model;gs(1),Xa(" ",t[0].name.toLocaleString()," "),gs(1),la("ngForOf",t)}}function SP(t,e){if(1&t&&(ua(0,"div",27),ua(1,"ngx-charts-line-chart",28),ra(2,CP,3,2,"ng-template",null,29,xu),ha(),ha()),2&t){const t=xa();gs(1),la("scheme",t.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",t.latencyGraphData)}}function kP(t,e){if(1&t&&(ua(0,"span"),da(1,"br"),da(2,"span",32),ua(3,"span",33),qa(4),ha(),ha()),2&t){const t=e.$implicit;gs(2),la("ngStyle",qc(3,xP,t.color)),gs(2),Ja("",t.series,": ",t.value,"")}}function EP(t,e){if(1&t&&(ua(0,"div",30),qa(1),ra(2,kP,5,5,"span",31),ha()),2&t){const t=e.model;gs(1),Xa(" ",t[0].name.toLocaleString()," "),gs(1),la("ngForOf",t)}}function AP(t,e){if(1&t&&(ua(0,"div",27),ua(1,"ngx-charts-line-chart",34),ra(2,EP,3,2,"ng-template",null,29,xu),ha(),ha()),2&t){const t=xa();gs(1),la("scheme",t.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",t.rateGraphData)}}function DP(t,e){if(1&t&&(ua(0,"span"),da(1,"br"),da(2,"span",32),ua(3,"span",33),qa(4),ha(),ha()),2&t){const t=e.$implicit;gs(2),la("ngStyle",qc(3,xP,t.color)),gs(2),Ja("",t.series,": ",t.value,"")}}function TP(t,e){if(1&t&&(ua(0,"div",30),qa(1),ra(2,DP,5,5,"span",31),ha()),2&t){const t=e.model;gs(1),Xa(" ",t[0].name.toLocaleString()," "),gs(1),la("ngForOf",t)}}function RP(t,e){if(1&t&&(ua(0,"div",27),ua(1,"ngx-charts-line-chart",35),ra(2,TP,3,2,"ng-template",null,29,xu),ha(),ha()),2&t){const t=xa();gs(1),la("scheme",t.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",t.inputGraphData)}}function FP(t,e){if(1&t&&(ua(0,"span"),da(1,"br"),da(2,"span",32),ua(3,"span",33),qa(4),ha(),ha()),2&t){const t=e.$implicit;gs(2),la("ngStyle",qc(3,xP,t.color)),gs(2),Ja("",t.series,": ",t.value,"")}}function MP(t,e){if(1&t&&(ua(0,"div",30),qa(1),ra(2,FP,5,5,"span",31),ha()),2&t){const t=e.model;gs(1),Xa(" ",t[0].name.toLocaleString()," "),gs(1),la("ngForOf",t)}}function LP(t,e){if(1&t&&(ua(0,"div",27),ua(1,"ngx-charts-line-chart",36),ra(2,MP,3,2,"ng-template",null,29,xu),ha(),ha()),2&t){const t=xa();gs(1),la("scheme",t.colorScheme)("legend",!1)("showXAxisLabel",!1)("showYAxisLabel",!1)("animations",!1)("timeline",!1)("autoScale",!1)("xAxis",!0)("yAxis",!0)("yScaleMin",0)("roundDomains",!0)("results",t.outputGraphData)}}let $P=(()=>{class t{constructor(t,e,n){this.route=t,this.consoleService=e,this.formBuilder=n,this.error="",this.showDelta=!1,this.rateGraphData=[],this.latencyGraphData=[],this.inputGraphData=[],this.outputGraphData=[],this.ranges={1:"last 1 minute",10:"last 10 minutes",30:"last 30 minutes",60:"last 1 hour",1440:"last 24 hours"},this.rangesKeys=Object.keys(this.ranges).map(t=>+t),this.colorScheme={domain:["#5AA454","#E44D25","#1e59cf","#7aa3e5","#a8385d","#d0bd00"]},this.samples=60}ngOnInit(){this.rangeForm=this.formBuilder.group({rangeMinutes:[10]}),this.route.data.subscribe(t=>{this.initData(t[0]),this.refresh(),this.refreshTimer=S_(0,1e3*this.getPeriod()),this.$refreshTimer=this.refreshTimer.subscribe(t=>this.refresh())},t=>{this.error=t})}refresh(){this.consoleService.getStatus("").subscribe(t=>{this.statusData=t,this.rateGraphData=this.updateData(this.rateGraphData,"avg_rate_sec",t),this.latencyGraphData=this.updateData(this.latencyGraphData,"avg_latency_ms",t),this.inputGraphData=this.updateData(this.inputGraphData,"avg_input_kbs",t),this.outputGraphData=this.updateData(this.outputGraphData,"avg_output_kbs",t)})}generateSeries(){let t=new Date;t.setMilliseconds(0);const e=[];for(let n=0;n({name:t,value:0}))}initData(t){const e=this.generateSeries();this.latencyGraphData=t.map(t=>({name:t,series:e})),this.rateGraphData=t.map(t=>({name:t,series:e})),this.inputGraphData=t.map(t=>({name:t,series:e})),this.outputGraphData=t.map(t=>({name:t,series:e}))}updateData(t,e,n){var i;const r=n.nodes,s=[],o=n.timestamp,a=t.map(t=>t.name),l=r.map(t=>t.name),c=this.diff(a,l);for(const u of t)c.includes(u.name)&&s.push({name:u.name,series:this.shiftData(u.series,0,o)});for(const u of r){let n=[],r={};const a=null===(i=t.find(t=>t.name===u.name))||void 0===i?void 0:i.series;n=this.shiftData(a||this.generateSeries(),u[e],o),r={name:u.name,series:n},s.push(r)}return s}shiftData(t,e,n){const i=t.slice(1);return i.push({name:new Date(n),value:e}),i}getPeriod(){return Math.floor(60*this.f.rangeMinutes.value/this.samples)}setRange(t){this.rangeForm.reset({rangeMinutes:+t.target.value}),this.reset()}reset(){this.consoleService.getStatus("").subscribe(t=>{var e;this.initData(t.nodes.map(t=>t.name)),null===(e=this.$refreshTimer)||void 0===e||e.unsubscribe(),this.refreshTimer=S_(0,1e3*this.getPeriod()),this.$refreshTimer=this.refreshTimer.subscribe(t=>this.refresh())},t=>{this.error=t})}diff(t,e){const n=new Set(t);for(const i of e)n.delete(i);return Array.from(n)}get f(){return this.rangeForm.controls}ngOnDestroy(){this.$refreshTimer.unsubscribe()}getTotalSessionCount(){return this.statusData.nodes.reduce((t,e)=>t+e.session_count,0)}getMaxSessionCount(){return Math.max(...this.statusData.nodes.map(t=>t.session_count))}getMaxPresenceCount(){return Math.max(...this.statusData.nodes.map(t=>t.presence_count))}getMaxMatchCount(){return Math.max(...this.statusData.nodes.map(t=>t.match_count))}getTotalMatchCount(){return this.statusData.nodes.reduce((t,e)=>t+e.match_count,0)}getMaxGoroutineCount(){return Math.max(...this.statusData.nodes.map(t=>t.goroutine_count))}getTotalGorountineCount(){return this.statusData.nodes.reduce((t,e)=>t+e.goroutine_count,0)}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(Jx),oa(ox))},t.\u0275cmp=pe({type:t,selectors:[["app-status"]],decls:62,vars:10,consts:[[1,"pb-4"],["type","danger",3,"dismissible",4,"ngIf"],[1,"status-table","table","table-sm","table-striped","mb-4",3,"mouseover","mouseout"],[1,"thead-light"],["scope","col"],[4,"ngIf"],[3,"formGroup"],[1,"row","no-gutters","justify-content-end"],[1,"col-12","text-right"],["ngbDropdown","","role","group",1,"btn-group"],["formControlName","rangeMinutes",1,"custom-select","custom-select-sm","ml-3",3,"change"],[3,"value",4,"ngFor","ngForOf"],[1,"row"],[1,"col-6","d-inline-flex","justify-content-between","align-items-center"],[1,"graph-title"],[1,"d-inline"],[1,"col-6"],["class","graph",4,"ngIf"],[1,"row","mt-4"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["class","clickable",4,"ngFor","ngForOf"],[1,"border-0"],[1,"clickable"],[1,"text-muted","small",3,"hidden"],[3,"value"],[1,"graph"],["xAxisLabel","Time","yAxisLabel","Latency (ms)",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"],["seriesTooltipTemplate",""],[1,"chart-legend"],[4,"ngFor","ngForOf"],[1,"legend-label-color",3,"ngStyle"],[1,"legend-label-text"],["xAxisLabel","Time","yAxisLabel","Request Count",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"],["xAxisLabel","Time","yAxisLabel","Input (kb/s)",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"],["xAxisLabel","Time","yAxisLabel","Output (kb/s)",3,"scheme","legend","showXAxisLabel","showYAxisLabel","animations","timeline","autoScale","xAxis","yAxis","yScaleMin","roundDomains","results"]],template:function(t,e){1&t&&(ua(0,"h2",0),qa(1,"Status"),ha(),ra(2,vP,4,2,"ngb-alert",1),ua(3,"table",2),ya("mouseover",function(){return e.showDelta=!0})("mouseout",function(){return e.showDelta=!1}),ua(4,"thead",3),ua(5,"tr"),ua(6,"th",4),qa(7,"Node name"),ha(),ua(8,"th",4),qa(9,"Sessions"),ha(),ua(10,"th",4),qa(11,"Presences"),ha(),ua(12,"th",4),qa(13,"Authoritative Matches"),ha(),ua(14,"th",4),qa(15,"Goroutines"),ha(),ha(),ha(),ra(16,bP,12,5,"tbody",5),ha(),ua(17,"form",6),ua(18,"div",7),ua(19,"div",8),ua(20,"span"),qa(21,"View:"),ha(),ua(22,"div",9),ua(23,"select",10),ya("change",function(t){return e.setRange(t)}),ra(24,wP,2,2,"option",11),function(t,e){const n=fn();let i;n.firstCreatePass?(i=function(t,e){if(e)for(let n=e.length-1;n>=0;n--){const i=e[n];if(t===i.name)return i}throw new Le("302",`The pipe '${t}' could not be found!`)}("sortNumbers",n.pipeRegistry),n.data[45]=i,i.onDestroy&&(n.destroyHooks||(n.destroyHooks=[])).push(45,i.onDestroy)):i=n.data[45];const r=i.factory||(i.factory=_e(i.type)),s=Kt(oa);try{const t=li(!1),e=r();li(t),function(t,e,n,i){45>=t.data.length&&(t.data[45]=null,t.blueprint[45]=null),e[45]=i}(n,dn(),0,e)}finally{Kt(s)}}(),ha(),ha(),ha(),ha(),ha(),ua(26,"div",12),ua(27,"div",13),ua(28,"div",14),ua(29,"h5",15),qa(30,"Latency"),ha(),ua(31,"small"),qa(32," (ms)"),ha(),ha(),ha(),ua(33,"div",13),ua(34,"div",14),ua(35,"h5",15),qa(36,"Rate"),ha(),ua(37,"small"),qa(38," (rpc/s)"),ha(),ha(),ha(),ha(),ua(39,"div",12),ua(40,"div",16),ra(41,SP,4,12,"div",17),ha(),ua(42,"div",16),ra(43,AP,4,12,"div",17),ha(),ha(),ua(44,"div",18),ua(45,"div",13),ua(46,"div",14),ua(47,"h5",15),qa(48,"Input"),ha(),ua(49,"small"),qa(50," (kb/s)"),ha(),ha(),ha(),ua(51,"div",13),ua(52,"div",14),ua(53,"h5",15),qa(54,"Output"),ha(),ua(55,"small"),qa(56," (kb/s)"),ha(),ha(),ha(),ha(),ua(57,"div",12),ua(58,"div",16),ra(59,RP,4,12,"div",17),ha(),ua(60,"div",16),ra(61,LP,4,12,"div",17),ha(),ha()),2&t&&(gs(2),la("ngIf",e.error),gs(14),la("ngIf",e.statusData),gs(1),la("formGroup",e.rangeForm),gs(7),la("ngForOf",function(t,e,n){const i=t+Se,r=dn(),s=en(r,i);return function(t,e){return Xo.isWrapped(e)&&(e=Xo.unwrap(e),t[Sn()]=ps),e}(r,function(t,e){return t[1].data[e].pure}(r,i)?Qc(r,Cn(),e,s.transform,n,s):s.transform(n))}(25,8,e.rangesKeys)),gs(17),la("ngIf",e.latencyGraphData.length>0),gs(2),la("ngIf",e.rateGraphData.length>0),gs(16),la("ngIf",e.inputGraphData.length>0),gs(2),la("ngIf",e.outputGraphData.length>0))},directives:function(){return[Ed,Jw,gw,tx,lk,Pw,pw,nx,Sd,QC,Bw,jw,aP,Td]},pipes:function(){return[IP]},styles:[".graph[_ngcontent-%COMP%]{height:450px;border-radius:5px;border:1px solid #dadae9}.graph-title[_ngcontent-%COMP%]{padding:.5rem .5rem .5rem 0}.table[_ngcontent-%COMP%]{table-layout:fixed}h4[_ngcontent-%COMP%]{margin-bottom:0}.status-table[_ngcontent-%COMP%]{empty-cells:hide}.status-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background-color:#fff}.status-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-weight:500}.status-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%], .status-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border:1px solid #dadae9;padding:.6em 1em}.status-table[_ngcontent-%COMP%] .total-row[_ngcontent-%COMP%]{border:2px solid #dadae9;background-color:#f5f5f5}.status-table[_ngcontent-%COMP%] .total-row[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:2px solid #dadae9}"]}),t})(),OP=(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){return this.consoleService.getStatus("").pipe(U(t=>Qg(t.nodes.map(t=>t.name)))).pipe($m(e=>(t.data=Object.assign(Object.assign({},t.data),{error:e}),Qg([]))))}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),IP=(()=>{class t{transform(t){return t.sort((t,e)=>t-e)}}return t.\u0275fac=function(e){return new(e||t)},t.\u0275pipe={type:(e={name:"sortNumbers",type:t,pure:!1}).type,name:e.name,factory:null,pure:!1!==e.pure,onDestroy:e.type.prototype.ngOnDestroy||null},t;var e})();var NP=n("ZR4k"),PP=n("Iab2");const BP=["fileSelector"];function UP(t,e){if(1&t&&(ua(0,"div",8),qa(1),ha()),2&t){const t=xa(2);gs(1),Ya(t.dropZoneLabel)}}function VP(t,e){if(1&t){const t=ga();ua(0,"div"),ua(1,"input",9),ya("click",function(e){return pn(t),xa(2).openFileSelector(e)}),ha(),ha()}if(2&t){const t=xa(2);gs(1),ka("value",t.browseBtnLabel),la("className",t.browseBtnClassName)}}function HP(t,e){if(1&t&&(ra(0,UP,2,1,"div",6),ra(1,VP,2,2,"div",7)),2&t){const t=xa();la("ngIf",t.dropZoneLabel),gs(1),la("ngIf",t.showBrowseBtn)}}function jP(t,e){}const zP=function(t){return{openFileSelector:t}};class WP{constructor(t,e){this.relativePath=t,this.fileEntry=e}}let GP=(()=>{class t{constructor(t){this.template=t}}return t.\u0275fac=function(e){return new(e||t)(oa($c))},t.\u0275dir=we({type:t,selectors:[["","ngx-file-drop-content-tmp",""]]}),t})(),KP=(()=>{class t{constructor(t,e){this.zone=t,this.renderer=e,this.accept="*",this.directory=!1,this.multiple=!0,this.dropZoneLabel="",this.dropZoneClassName="ngx-file-drop__drop-zone",this.useDragEnter=!1,this.contentClassName="ngx-file-drop__content",this.showBrowseBtn=!1,this.browseBtnClassName="btn btn-primary btn-xs ngx-file-drop__browse-btn",this.browseBtnLabel="Browse files",this.onFileDrop=new Zc,this.onFileOver=new Zc,this.onFileLeave=new Zc,this.isDraggingOverDropZone=!1,this.globalDraggingInProgress=!1,this.files=[],this.numOfActiveReadEntries=0,this.helperFormEl=null,this.fileInputPlaceholderEl=null,this.dropEventTimerSubscription=null,this._disabled=!1,this.openFileSelector=t=>{this.fileSelector&&this.fileSelector.nativeElement&&this.fileSelector.nativeElement.click()},this.globalDragStartListener=this.renderer.listen("document","dragstart",t=>{this.globalDraggingInProgress=!0}),this.globalDragEndListener=this.renderer.listen("document","dragend",t=>{this.globalDraggingInProgress=!1})}get disabled(){return this._disabled}set disabled(t){this._disabled=null!=t&&"false"!=`${t}`}ngOnDestroy(){this.dropEventTimerSubscription&&(this.dropEventTimerSubscription.unsubscribe(),this.dropEventTimerSubscription=null),this.globalDragStartListener(),this.globalDragEndListener(),this.files=[],this.helperFormEl=null,this.fileInputPlaceholderEl=null}onDragOver(t){this.useDragEnter?this.preventAndStop(t):this.isDropzoneDisabled()||this.useDragEnter||(this.isDraggingOverDropZone||(this.isDraggingOverDropZone=!0,this.onFileOver.emit(t)),this.preventAndStop(t))}onDragEnter(t){!this.isDropzoneDisabled()&&this.useDragEnter&&(this.isDraggingOverDropZone||(this.isDraggingOverDropZone=!0,this.onFileOver.emit(t)),this.preventAndStop(t))}onDragLeave(t){this.isDropzoneDisabled()||(this.isDraggingOverDropZone&&(this.isDraggingOverDropZone=!1,this.onFileLeave.emit(t)),this.preventAndStop(t))}dropFiles(t){if(!this.isDropzoneDisabled()&&(this.isDraggingOverDropZone=!1,t.dataTransfer)){let e;t.dataTransfer.dropEffect="copy",e=t.dataTransfer.items?t.dataTransfer.items:t.dataTransfer.files,this.preventAndStop(t),this.checkFiles(e)}}uploadFiles(t){!this.isDropzoneDisabled()&&t.target&&(this.checkFiles(t.target.files||[]),this.resetFileInput())}checkFiles(t){for(let e=0;e{t(n)}},e=new WP(t.name,t);this.addToQueue(e)}}this.dropEventTimerSubscription&&this.dropEventTimerSubscription.unsubscribe(),this.dropEventTimerSubscription=S_(200,200).subscribe(()=>{if(this.files.length>0&&0===this.numOfActiveReadEntries){const t=this.files;this.files=[],this.onFileDrop.emit(t)}})}traverseFileTree(t,e){if(t.isFile){const n=new WP(e,t);this.files.push(n)}else{e+="/";const n=t.createReader();let i=[];const r=()=>{this.numOfActiveReadEntries++,n.readEntries(n=>{if(n.length)i=i.concat(n),r();else if(0===i.length){const n=new WP(e,t);this.zone.run(()=>{this.addToQueue(n)})}else for(let t=0;t{this.traverseFileTree(i[t],e+i[t].name)});this.numOfActiveReadEntries--})};r()}}resetFileInput(){if(this.fileSelector&&this.fileSelector.nativeElement){const t=this.fileSelector.nativeElement,e=t.parentElement,n=this.getHelperFormElement(),i=this.getFileInputPlaceholderElement();e!==n&&(this.renderer.insertBefore(e,i,t),this.renderer.appendChild(n,t),n.reset(),this.renderer.insertBefore(e,t,i),this.renderer.removeChild(e,i))}}getHelperFormElement(){return this.helperFormEl||(this.helperFormEl=this.renderer.createElement("form")),this.helperFormEl}getFileInputPlaceholderElement(){return this.fileInputPlaceholderEl||(this.fileInputPlaceholderEl=this.renderer.createElement("div")),this.fileInputPlaceholderEl}canGetAsEntry(t){return!!t.webkitGetAsEntry}isDropzoneDisabled(){return this.globalDraggingInProgress||this.disabled}addToQueue(t){this.files.push(t)}preventAndStop(t){t.stopPropagation(),t.preventDefault()}}return t.\u0275fac=function(e){return new(e||t)(oa(ju),oa(pc))},t.\u0275cmp=pe({type:t,selectors:[["ngx-file-drop"]],contentQueries:function(t,e,n){if(1&t&&gu(n,GP,!0,$c),2&t){let t;hu(t=vu())&&(e.contentTemplate=t.first)}},viewQuery:function(t,e){if(1&t&&du(BP,!0),2&t){let t;hu(t=vu())&&(e.fileSelector=t.first)}},inputs:{accept:"accept",directory:"directory",multiple:"multiple",dropZoneLabel:"dropZoneLabel",dropZoneClassName:"dropZoneClassName",useDragEnter:"useDragEnter",contentClassName:"contentClassName",showBrowseBtn:"showBrowseBtn",browseBtnClassName:"browseBtnClassName",browseBtnLabel:"browseBtnLabel",disabled:"disabled"},outputs:{onFileDrop:"onFileDrop",onFileOver:"onFileOver",onFileLeave:"onFileLeave"},decls:7,vars:15,consts:[[3,"className","drop","dragover","dragenter","dragleave"],[3,"className"],["type","file",1,"ngx-file-drop__file-input",3,"accept","multiple","change"],["fileSelector",""],["defaultContentTemplate",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["class","ngx-file-drop__drop-zone-label",4,"ngIf"],[4,"ngIf"],[1,"ngx-file-drop__drop-zone-label"],["type","button",3,"className","value","click"]],template:function(t,e){if(1&t&&(ua(0,"div",0),ya("drop",function(t){return e.dropFiles(t)})("dragover",function(t){return e.onDragOver(t)})("dragenter",function(t){return e.onDragEnter(t)})("dragleave",function(t){return e.onDragLeave(t)}),ua(1,"div",1),ua(2,"input",2,3),ya("change",function(t){return e.uploadFiles(t)}),ha(),ra(4,HP,2,2,"ng-template",null,4,xu),ra(6,jP,0,0,"ng-template",5),ha(),ha()),2&t){const t=sa(5);Oa("ngx-file-drop__drop-zone--over",e.isDraggingOverDropZone),la("className",e.dropZoneClassName),gs(1),la("className",e.contentClassName),gs(1),la("accept",e.accept)("multiple",e.multiple),na("directory",e.directory||void 0)("webkitdirectory",e.directory||void 0)("mozdirectory",e.directory||void 0)("msdirectory",e.directory||void 0)("odirectory",e.directory||void 0),gs(4),la("ngTemplateOutlet",e.contentTemplate||t)("ngTemplateOutletContext",qc(13,zP,e.openFileSelector))}},directives:[Rd,Ed],styles:[".ngx-file-drop__drop-zone[_ngcontent-%COMP%]{border:2px dotted #0782d0;border-radius:30px;height:100px;margin:auto}.ngx-file-drop__drop-zone--over[_ngcontent-%COMP%]{background-color:hsla(0,0%,57.6%,.5)}.ngx-file-drop__content[_ngcontent-%COMP%]{align-items:center;color:#0782d0;display:flex;height:100px;justify-content:center}.ngx-file-drop__drop-zone-label[_ngcontent-%COMP%]{text-align:center}.ngx-file-drop__file-input[_ngcontent-%COMP%]{display:none}"]}),t})(),qP=(()=>{class t{}return t.\u0275mod=ye({type:t,bootstrap:function(){return[KP]}}),t.\u0275inj=ht({factory:function(e){return new(e||t)},providers:[],imports:[[Fd]]}),t})();function YP(t,e){1&t&&(ua(0,"ngb-alert",22),da(1,"img",23),ua(2,"h6",24),qa(3,"Failed to retrieve configuration."),ha(),ha()),2&t&&la("dismissible",!1)}function XP(t,e){if(1&t&&(ua(0,"span",33),qa(1),ha()),2&t){const t=xa(2).$implicit;la("id",t.name),gs(1),Ya(t.value)}}function JP(t,e){1&t&&(ua(0,"span",34),qa(1,"(empty)"),ha()),2&t&&la("id",xa(2).$implicit.name)}function QP(t,e){if(1&t&&(ua(0,"div",35),ua(1,"b"),qa(2),ha(),ua(3,"label",27),ua(4,"a",28),da(5,"img",10),ha(),ha(),ha()),2&t){const t=xa(2).index,e=xa();gs(2),Ya(e.flatConfig[t+1].name),gs(1),la("for",e.flatConfig[t+1].name),gs(1),Ea("href","https://heroiclabs.com/docs/install-configuration/#",e.flatConfig[t+1].name,"",yr)}}function ZP(t,e){if(1&t&&(ua(0,"span",33),qa(1),ha()),2&t){const t=xa(3).index,e=xa();la("id",e.flatConfig[t+1].name),gs(1),Ya(e.flatConfig[t+1].value)}}function tB(t,e){if(1&t&&(ua(0,"span",34),qa(1,"(empty)"),ha()),2&t){const t=xa(3).index;la("id",xa().flatConfig[t+1].name)}}function eB(t,e){if(1&t&&(ua(0,"div",36),ra(1,ZP,2,2,"span",29),ra(2,tB,2,1,"span",30),ha()),2&t){const t=xa(2).index,e=xa();gs(1),la("ngIf",!e.isEmpty(e.flatConfig[t+1].value)),gs(1),la("ngIf",e.isEmpty(e.flatConfig[t+1].value))}}function nB(t,e){if(1&t&&(ua(0,"div",26),ua(1,"div",7),ua(2,"b"),qa(3),ha(),ua(4,"label",27),ua(5,"a",28),da(6,"img",10),ha(),ha(),ha(),ua(7,"div",7),ra(8,XP,2,2,"span",29),ra(9,JP,2,1,"span",30),ha(),ra(10,QP,6,3,"div",31),ra(11,eB,3,2,"div",32),ha()),2&t){const t=xa(),e=t.index,n=t.$implicit,i=xa();Oa("border-top-0",e>0),gs(3),Ya(n.name),gs(1),la("for",n.name),gs(1),Ea("href","https://heroiclabs.com/docs/install-configuration/#",n.value.name,"",yr),gs(3),la("ngIf",!i.isEmpty(n.value)),gs(1),la("ngIf",i.isEmpty(n.value)),gs(1),la("ngIf",e{class t{constructor(t,e,n,i,r,s){this.config=t,this.route=e,this.httpClient=n,this.modalService=i,this.consoleService=r,this.formBuilder=s,this.configError="",this.uploadError="",this.deleteError="",this.uploading=!1,this.uploadSuccess=!1,this.deleteSuccess=!1,this.deleting=!1,this.apiConfig=t}ngOnInit(){this.route.data.subscribe(t=>{this.nakamaVersion=t[0].server_version;const e=JSON.parse(t[0].config);this.jsonConfig=e,this.flatConfig=this.flattenConfig(e)},t=>{this.configError=t}),this.confirmDeleteForm=this.formBuilder.group({delete:["",Qb.compose([Qb.required,Qb.pattern("DELETE")])]})}flattenConfig(t){const e=[];return this.traverseConfig("",t,e),e.sort((t,e)=>t.name.localeCompare(e.name))}traverseConfig(t,e,n){for(const i in e)"env"!==i&&(Array.isArray(e[i])?n.push({name:t+i,value:e[i].join(", ")}):"object"==typeof e[i]?this.traverseConfig(i+".",e[i],n):n.push({name:t+i,value:e[i]}))}isEmpty(t){return""===t||0===t}exportYaml(){const t=new Blob([Object(NP.safeDump)(this.jsonConfig)],{type:"text/yaml;charset=utf-8"});PP.saveAs(t,"config.yaml")}dropped(t){this.uploadError="",this.uploadSuccess=!1;for(const e of t)if(e.fileEntry.isFile){const t=e.fileEntry.name.split("."),n=["json","csv"];t.length>1&&n.includes(t[t.length-1].toLowerCase())?e.fileEntry.file(t=>{this.uploadFile(t)}):this.uploadError="Invalid file: must have extension .json or .csv"}}uploadFile(t){const e=new FormData;e.append(t.name,t),this.uploading=!0,this.httpClient.post(this.apiConfig.host+"/v2/console/storage/import",e,{headers:{Authorization:"Bearer "}}).subscribe(()=>{this.uploading=!1,this.uploadSuccess=!0},t=>{this.uploading=!1,this.uploadError=t})}deleteData(){this.deleteError="",this.deleting=!0,this.consoleService.deleteAccounts("").pipe(B_(2e3)).subscribe(()=>{this.deleting=!1,this.deleteError="",this.deleteSuccess=!0},t=>{this.deleting=!1,this.deleteError=t})}openDeleteDataModal(t){this.modalService.open(t,{centered:!0}).result.then(()=>{this.deleteData()},()=>{})}get f(){return this.confirmDeleteForm.controls}ngOnDestroy(){}}return t.\u0275fac=function(e){return new(e||t)(oa(Xx),oa(Jv),oa($x),oa(xk),oa(Jx),oa(ox))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:45,vars:11,consts:[["type","danger",3,"dismissible",4,"ngIf"],[1,"pb-4"],[1,"d-flex","justify-content-between","mb-4","align-items-baseline"],[1,"btn","btn-primary","btn-sm",3,"click"],[1,"config-table"],[4,"ngFor","ngForOf"],[1,"row","py-2","border","border-top-0","add-border-larger","mb-5"],[1,"col-lg-3"],[1,"pl-1"],["target","_blank","href","https://heroiclabs.com/docs/install-configuration/#runtime.env",1,"d-inline"],["src","/static/svg/hint.svg","alt","","width","16","height",""],[1,"col-lg-9"],[4,"ngIf"],[1,"section-divider","d-flex","mb-4"],["type","success",3,"dismissible","close",4,"ngIf"],["accept",".json,.csv","dropZoneClassName","drop-zone","contentClassName","drop-zone-content","dropZoneLabel","Drop CSV or JSON file here",3,"disabled","onFileDrop"],["ngx-file-drop-content-tmp",""],["role","alert",1,"alert","alert-danger","d-flex","justify-content-between","align-items-center"],["src","/static/svg/red-triangle.svg","alt","","width","16","height",""],[1,"pl-2"],["confirmDelete",""],["type","button",1,"btn","btn-danger",3,"disabled","click"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["class","row py-2 border",3,"border-top-0",4,"ngIf"],[1,"row","py-2","border"],[1,"pl-1",3,"for"],["target","_blank",1,"d-inline",3,"href"],["class","text-break-all",3,"id",4,"ngIf"],["class","text-muted",3,"id",4,"ngIf"],["class","col-md-3 left-line",4,"ngIf"],["class","col-md-3",4,"ngIf"],[1,"text-break-all",3,"id"],[1,"text-muted",3,"id"],[1,"col-md-3","left-line"],[1,"col-md-3"],["class","mb-0 text-break-all",4,"ngFor","ngForOf"],[1,"mb-0","text-break-all"],[1,"mb-0","text-muted"],[1,"mb-0","pl-4"],["type","success",3,"dismissible","close"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","button",1,"btn","btn-primary",3,"click"],[1,"modal-header"],[1,"modal-title"],["type","button","aria-describedby","modal-title",1,"close",3,"click"],["aria-hidden","true"],[1,"modal-body"],[1,"d-flex","flex-column","justify-content-center"],[1,"mt-2"],[3,"formGroup"],["type","text","id","delete-confirm","placeholder","Type 'DELETE' to confirm","formControlName","delete",1,"form-control",3,"ngClass"],[1,"modal-footer"],["type","button",1,"btn","btn-outline-secondary",3,"click"]],template:function(t,e){if(1&t){const t=ga();ra(0,YP,4,1,"ngb-alert",0),ua(1,"h2",1),qa(2,"Server Configuration"),ha(),ua(3,"div",2),ua(4,"h5"),ua(5,"b"),qa(6,"Server version:"),ha(),qa(7),ha(),ua(8,"button",3),ya("click",function(){return e.exportYaml()}),qa(9,"Export Configuration"),ha(),ha(),ua(10,"div",4),ra(11,iB,2,1,"ng-container",5),ua(12,"div",6),ua(13,"div",7),ua(14,"b"),qa(15,"runtime.env"),ha(),ua(16,"label",8),ua(17,"a",9),da(18,"img",10),ha(),ha(),ha(),ua(19,"div",11),ra(20,sB,2,1,"div",12),ra(21,oB,3,0,"div",12),ha(),ha(),ha(),ua(22,"h5",13),qa(23,"Import storage data"),ha(),ua(24,"p"),qa(25,"Import storage objects from a CSV or JSON file by dragging and dropping it below."),ha(),ra(26,aB,6,2,"ngb-alert",0),ra(27,lB,4,1,"ngb-alert",14),ua(28,"ngx-file-drop",15),ya("onFileDrop",function(t){return e.dropped(t)}),ra(29,cB,2,0,"ng-template",16),ha(),ua(30,"h5",13),qa(31,"Delete all data"),ha(),ua(32,"p"),qa(33,"Delete all user accounts and storage objects."),ha(),ra(34,uB,6,2,"ngb-alert",0),ra(35,hB,4,1,"ngb-alert",14),ua(36,"div",17),ua(37,"div"),da(38,"img",18),ua(39,"small",19),qa(40,"Warning - this operation is not reversible!"),ha(),ha(),ra(41,fB,19,5,"ng-template",null,20,xu),ua(43,"button",21),ya("click",function(){pn(t);const n=sa(42);return e.openDeleteDataModal(n)}),qa(44,"Delete all"),ha(),ha()}2&t&&(la("ngIf",e.configError),gs(7),Xa(" ",e.nakamaVersion,""),gs(4),la("ngForOf",e.flatConfig),gs(9),la("ngIf",e.jsonConfig.runtime&&e.jsonConfig.runtime.env&&e.jsonConfig.runtime.env.length>0),gs(1),la("ngIf",e.jsonConfig.runtime&&e.jsonConfig.runtime.env&&0===e.jsonConfig.runtime.env.length),gs(5),la("ngIf",e.uploadError),gs(1),la("ngIf",e.uploadSuccess),gs(1),la("disabled",e.uploading),gs(6),la("ngIf",e.deleteError),gs(1),la("ngIf",e.deleteSuccess),gs(8),la("disabled",e.deleting))},directives:[Ed,Sd,KP,GP,QC,Jw,gw,tx,Gb,pw,nx,_d],styles:["label[_ngcontent-%COMP%]{margin-bottom:0}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.text-break-all[_ngcontent-%COMP%]{word-break:break-all;word-wrap:anywhere}.config-table[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]:nth-child(2n){background-color:#fafafc}.config-table[_ngcontent-%COMP%] .left-line[_ngcontent-%COMP%]{border-left:1px solid #dadae9}"]}),t})(),gB=(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){return this.consoleService.getConfig("")}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function mB(t,e){if(1&t&&(ua(0,"ngb-alert",48),da(1,"img",49),ua(2,"h6",50),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("An error occurred: ",t.error,"")}}function vB(t,e){1&t&&(ua(0,"tr"),ua(1,"td",51),qa(2,"No additional users are setup. Create a new user below."),ha(),ha()),2&t&&(gs(1),la("colSpan",4))}function yB(t,e){if(1&t){const t=ga();ua(0,"tr"),ua(1,"td"),qa(2),ha(),ua(3,"td"),qa(4),ha(),ua(5,"td"),ua(6,"span",36),qa(7,"Administrator"),ha(),ua(8,"span",36),qa(9,"Developer"),ha(),ua(10,"span",36),qa(11,"Maintainer"),ha(),ua(12,"span",36),qa(13,"View Only"),ha(),ha(),ua(14,"td"),ua(15,"button",52),ya("click",function(){pn(t);const n=e.$implicit;return xa().deleteUser(n.username)}),qa(16,"Delete"),ha(),ha(),ha()}if(2&t){const t=e.$implicit,n=xa();gs(2),Ya(t.username),gs(2),Ya(t.email),gs(2),la("hidden",t.role!==n.adminRole),gs(2),la("hidden",t.role!==n.developerRole),gs(2),la("hidden",t.role!==n.maintainerRole),gs(2),la("hidden",t.role!==n.readonlyRole)}}function bB(t,e){if(1&t&&(ua(0,"ngb-alert",48),da(1,"img",49),ua(2,"h6",50),qa(3,"An error occurred:"),ha(),ua(4,"p",53),qa(5),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(5),Ya(t.userCreateError)}}const wB=function(t){return{"is-invalid":t}};let xB=(()=>{class t{constructor(t,e,n){this.route=t,this.consoleService=e,this.formBuilder=n,this.error="",this.userCreateError="",this.users=[],this.adminRole=Zx.USER_ROLE_ADMIN,this.developerRole=Zx.USER_ROLE_DEVELOPER,this.maintainerRole=Zx.USER_ROLE_MAINTAINER,this.readonlyRole=Zx.USER_ROLE_READONLY}ngOnInit(){this.createUserForm=this.formBuilder.group({username:["",Qb.required],email:["",[Qb.required,Qb.email]],password:["",Qb.compose([Qb.required,Qb.minLength(8)])],role:[+this.readonlyRole,Qb.required],newsletter:[!1]}),this.route.data.subscribe(t=>{const e=t[0];this.users.length=0,this.users.push(...e.users)},t=>{this.error=t})}deleteUser(t){this.error="",this.consoleService.deleteUser("",t).pipe(U(()=>this.consoleService.listUsers(""))).subscribe(t=>{this.error="",this.users.length=0,this.users.push(...t.users)},t=>{this.error=t})}addUser(){this.userCreateError="",this.createUserForm.disable();let t=Zx.USER_ROLE_READONLY;switch(this.f.role.value){case 1:t=Zx.USER_ROLE_ADMIN;break;case 2:t=Zx.USER_ROLE_DEVELOPER;break;case 3:t=Zx.USER_ROLE_MAINTAINER;break;case 4:t=Zx.USER_ROLE_READONLY}this.consoleService.addUser("",{username:this.f.username.value,email:this.f.email.value,password:this.f.password.value,role:t,newsletter_subscription:this.f.newsletter.value}).pipe(U(()=>this.consoleService.listUsers(""))).subscribe(e=>{this.userCreateError="",this.createUserForm.reset({role:+t}),this.createUserForm.enable(),this.users.length=0,this.users.push(...e.users)},t=>{this.userCreateError=t,this.createUserForm.enable()})}get f(){return this.createUserForm.controls}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(Jx),oa(ox))},t.\u0275cmp=pe({type:t,selectors:[["app-users"]],decls:121,vars:24,consts:[[1,"pb-4"],["type","danger",3,"dismissible",4,"ngIf"],[1,"user-details","mb-5","table","table-bordered","table-sm","table-striped"],[1,"thead-light"],[2,"width","400px"],[2,"width","300px"],[2,"width","90px"],[4,"ngIf"],[4,"ngFor","ngForOf"],[1,"section-divider","d-flex","mb-4"],[1,"mb-4","alert-permissions",3,"type"],[1,"alert-title","font-weight-bold"],[1,"d-flex","flex-wrap","flex-row"],[1,"col","col-md-3","p-4","flex-fill","flex-grow-1"],[1,"d-flex","align-items-center","mb-3"],["src","/static/svg/role-admin.svg","alt","","width","30","height","",1,"mr-2"],[1,"m-0","font-weight-bold"],["src","/static/svg/role-developer.svg","alt","","width","30","height","",1,"mr-2"],["src","/static/svg/role-maintainer.svg","alt","","width","30","height","",1,"mr-2"],["src","/static/svg/role-viewonly.svg","alt","","width","30","height","",1,"mr-2"],[1,"add-border","rounded"],[3,"formGroup","ngSubmit"],[1,"row","no-gutters"],[1,"col","d-flex","justify-content-between","align-items-center"],[1,"col-md-3"],["for","email",1,"d-inline"],[1,"col-md-9","ml-0","p-0"],["type","email","id","email","placeholder","email@example.com","required","","formControlName","email",1,"form-control",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","username",1,"d-inline"],["type","text","id","username","placeholder","Username","required","","formControlName","username",1,"form-control",3,"ngClass"],["for","password",1,"d-inline"],["type","password","id","password","placeholder","Password","required","","formControlName","password",1,"form-control",3,"ngClass"],[1,"d-inline"],[1,"btn-group"],["disabled","",1,"btn","btn-outline-dark","disabled"],[3,"hidden"],["ngbDropdown","","role","group",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-primary","dropdown-toggle-split"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click"],[1,"row","no-gutters","add-border-single-row-bottom","mb-4"],[1,"col","d-flex","align-items-center"],[1,"custom-control","custom-checkbox"],["type","checkbox","id","newsletter","formControlName","newsletter",1,"custom-control-input","mr-2","my-2"],["for","newsletter",1,"form-check-label","custom-control-label"],[1,""],["type","submit",1,"btn","btn-primary",3,"disabled"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[1,"text-muted",3,"colSpan"],["type","button",1,"btn","btn-danger","btn-outline-dark",3,"click"],[1,"mb-0","pl-4"]],template:function(t,e){1&t&&(ua(0,"h2",0),qa(1,"User Management"),ha(),ra(2,mB,4,2,"ngb-alert",1),ua(3,"table",2),ua(4,"thead",3),ua(5,"tr"),ua(6,"th",4),qa(7,"Username"),ha(),ua(8,"th"),qa(9,"Email"),ha(),ua(10,"th",5),qa(11,"Role"),ha(),ua(12,"th",6),qa(13,"Action"),ha(),ha(),ha(),ua(14,"tbody"),ra(15,vB,3,1,"tr",7),ra(16,yB,17,6,"tr",8),ha(),ha(),ua(17,"h5",9),qa(18,"Add new user"),ha(),ua(19,"ngb-alert",10),ua(20,"h6",11),qa(21,"User roles"),ha(),ua(22,"div",12),ua(23,"div",13),ua(24,"div",14),da(25,"img",15),ua(26,"h6",16),qa(27,"Administrator"),ha(),ha(),ua(28,"small"),qa(29," Owners have complete control over the server, its users and resources. "),ha(),ha(),ua(30,"div",13),ua(31,"div",14),da(32,"img",17),ua(33,"h6",16),qa(34,"Developer"),ha(),ha(),ua(35,"small"),qa(36," Like Administrators, Developers have complete control over the server, resources and data. However they cannot add, change or delete console users. "),ha(),ha(),ua(37,"div",13),ua(38,"div",14),da(39,"img",18),ua(40,"h6",16),qa(41,"Maintainer"),ha(),ha(),ua(42,"small"),qa(43," Maintainers have access to adding, changing and delete client resources such as accounts, storage and leaderboard records. They don't have access to the API Explorer or the console users. "),ha(),ha(),ua(44,"div",13),ua(45,"div",14),da(46,"img",19),ua(47,"h6",16),qa(48,"View Only"),ha(),ha(),ua(49,"small"),qa(50," View Only users can only view client resources but cannot make any changes to the data whatsoever. "),ha(),ha(),ha(),ha(),ra(51,bB,6,2,"ngb-alert",1),ua(52,"div",20),ua(53,"form",21),ya("ngSubmit",function(){return e.addUser()}),ua(54,"div",22),ua(55,"div",23),ua(56,"div",24),ua(57,"label",25),qa(58,"Email"),ha(),ha(),ua(59,"div",26),da(60,"input",27),ua(61,"div",28),qa(62,"Email is required"),ha(),ha(),ha(),ha(),ua(63,"div",22),ua(64,"div",23),ua(65,"div",24),ua(66,"label",29),qa(67,"Username"),ha(),ha(),ua(68,"div",26),da(69,"input",30),ua(70,"div",28),qa(71,"Username is required"),ha(),ha(),ha(),ha(),ua(72,"div",22),ua(73,"div",23),ua(74,"div",24),ua(75,"label",31),qa(76,"Password"),ha(),ha(),ua(77,"div",26),da(78,"input",32),ua(79,"div",28),qa(80,"Password is required, must be 8 chars or longer and consist of at least a capital letter, a small letter and a number."),ha(),ha(),ha(),ha(),ua(81,"div",22),ua(82,"div",23),ua(83,"div",24),ua(84,"label",33),qa(85,"Role"),ha(),ha(),ua(86,"div",26),ua(87,"div",34),ua(88,"button",35),ua(89,"span",36),qa(90,"Administrator"),ha(),ua(91,"span",36),qa(92,"Developer"),ha(),ua(93,"span",36),qa(94,"Maintainer"),ha(),ua(95,"span",36),qa(96,"View Only"),ha(),ha(),ua(97,"div",37),da(98,"button",38),ua(99,"div",39),ua(100,"button",40),ya("click",function(){return e.f.role.setValue(+e.adminRole)}),qa(101,"Administrator"),ha(),ua(102,"button",40),ya("click",function(){return e.f.role.setValue(+e.developerRole)}),qa(103,"Developer"),ha(),ua(104,"button",40),ya("click",function(){return e.f.role.setValue(+e.maintainerRole)}),qa(105,"Maintainer"),ha(),ua(106,"button",40),ya("click",function(){return e.f.role.setValue(+e.readonlyRole)}),qa(107,"View Only"),ha(),ha(),ha(),ha(),ua(108,"div",28),qa(109,"Role is required"),ha(),ha(),ha(),ha(),ua(110,"div",41),ua(111,"div",42),da(112,"div",24),ua(113,"div",26),ua(114,"div",43),da(115,"input",44),ua(116,"label",45),qa(117,"Subscribe to Heroic Labs' newsletters to receive latest updates to Nakama and other news."),ha(),ha(),ha(),ha(),ha(),ua(118,"div",46),ua(119,"button",47),qa(120,"Save"),ha(),ha(),ha(),ha()),2&t&&(gs(2),la("ngIf",e.error),gs(13),la("ngIf",0===e.users.length),gs(1),la("ngForOf",e.users),gs(3),la("type","secondary"),gs(32),la("ngIf",e.userCreateError),gs(2),la("formGroup",e.createUserForm),gs(7),la("ngClass",qc(18,wB,e.f.email.dirty&&e.f.email.errors)),gs(1),la("hidden",e.f.email.disabled||e.f.email.valid||e.f.email.pristine),gs(8),la("ngClass",qc(20,wB,e.f.username.dirty&&e.f.username.errors)),gs(1),la("hidden",e.f.username.disabled||e.f.username.valid||e.f.username.pristine),gs(8),la("ngClass",qc(22,wB,e.f.password.dirty&&e.f.password.errors)),gs(1),la("hidden",e.f.password.disabled||e.f.password.valid||e.f.password.pristine),gs(10),la("hidden",e.f.role.value!==+e.adminRole),gs(2),la("hidden",e.f.role.value!==+e.developerRole),gs(2),la("hidden",e.f.role.value!==+e.maintainerRole),gs(2),la("hidden",e.f.role.value!==+e.readonlyRole),gs(13),la("hidden",e.f.role.disabled||e.f.role.valid||e.f.role.pristine),gs(11),la("disabled",e.createUserForm.invalid))},directives:[Ed,Sd,QC,Jw,gw,tx,Gb,rx,pw,nx,_d,lk,ak,sk,rk,jb],styles:[".user-details[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background-color:#fff}.user-details[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:.6em 1em;font-weight:500}.user-details[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:.6em 1em}.alert-permissions[_ngcontent-%COMP%]{padding:0}.alert-permissions[_ngcontent-%COMP%] .alert-title[_ngcontent-%COMP%]{padding:1rem}.alert-permissions[_ngcontent-%COMP%] .flex-row[_ngcontent-%COMP%]{border-top:1px solid #dadae9;margin:0}.alert-permissions[_ngcontent-%COMP%] .flex-row[_ngcontent-%COMP%] .col[_ngcontent-%COMP%]{border-right:1px solid #dadae9}.alert-permissions[_ngcontent-%COMP%] .flex-row[_ngcontent-%COMP%] .col[_ngcontent-%COMP%]:last-child{border-right:none}"]}),t})(),_B=(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){return this.consoleService.listUsers("")}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function CB(t,e){if(1&t&&(ua(0,"ngb-alert",10),da(1,"img",11),ua(2,"h6",12),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("Failed to retrieve runtime information: ",t.error,"")}}function SB(t,e){if(1&t&&(ua(0,"tr"),ua(1,"td"),qa(2),ha(),ua(3,"td",13),qa(4),ha(),ha()),2&t){const t=e.$implicit;gs(2),Ya(t.path),gs(2),Ya(t.mod_time)}}function kB(t,e){1&t&&(ua(0,"tr"),ua(1,"td",14),qa(2,"No Go modules were found."),ha(),da(3,"td"),ha())}function EB(t,e){if(1&t&&(ua(0,"tr"),ua(1,"td"),qa(2),ha(),ua(3,"td",13),qa(4),ha(),ha()),2&t){const t=e.$implicit;gs(2),Ya(t.path),gs(2),Ya(t.mod_time)}}function AB(t,e){1&t&&(ua(0,"tr"),ua(1,"td",14),qa(2,"No Lua modules were found."),ha(),da(3,"td"),ha())}function DB(t,e){if(1&t&&(ua(0,"tr"),ua(1,"td"),qa(2),ha(),ua(3,"td",13),qa(4),ha(),ha()),2&t){const t=e.$implicit;gs(2),Ya(t.path),gs(2),Ya(t.mod_time)}}function TB(t,e){1&t&&(ua(0,"tr"),ua(1,"td",14),qa(2,"No JavaScript modules were found."),ha(),da(3,"td"),ha())}const RB=function(){return["/apiexplorer"]},FB=function(t){return{endpoint:t}};function MB(t,e){if(1&t&&(ua(0,"tr"),ua(1,"td"),ua(2,"code"),qa(3),ha(),ha(),ua(4,"td",15),ua(5,"a",16),qa(6,"API Explorer"),ha(),ha(),ha()),2&t){const t=e.$implicit;gs(3),Ya(t),gs(2),la("routerLink",Kc(3,RB))("queryParams",qc(4,FB,t))}}function LB(t,e){1&t&&(ua(0,"tr"),ua(1,"td",17),qa(2,"No Go RPC functions were found."),ha(),ha())}function $B(t,e){if(1&t&&(ua(0,"tr"),ua(1,"td"),ua(2,"code"),qa(3),ha(),ha(),ua(4,"td",15),ua(5,"a",16),qa(6,"API Explorer"),ha(),ha(),ha()),2&t){const t=e.$implicit;gs(3),Ya(t),gs(2),la("routerLink",Kc(3,RB))("queryParams",qc(4,FB,t))}}function OB(t,e){1&t&&(ua(0,"tr"),ua(1,"td",17),qa(2,"No Lua RPC functions were found."),ha(),ha())}function IB(t,e){if(1&t&&(ua(0,"tr"),ua(1,"td"),ua(2,"code"),qa(3),ha(),ha(),ua(4,"td",15),ua(5,"a",16),qa(6,"API Explorer"),ha(),ha(),ha()),2&t){const t=e.$implicit;gs(3),Ya(t),gs(2),la("routerLink",Kc(3,RB))("queryParams",qc(4,FB,t))}}function NB(t,e){1&t&&(ua(0,"tr"),ua(1,"td",17),qa(2,"No JavaScript RPC functions were found."),ha(),ha())}let PB=(()=>{class t{constructor(t,e){this.route=t,this.consoleService=e,this.error=""}ngOnInit(){this.route.data.subscribe(t=>{this.runtimeInfo=t[0]},t=>{this.error=t})}ngOnDestroy(){}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(Jx))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:51,vars:13,consts:[[1,"pb-4"],["type","danger",3,"dismissible",4,"ngIf"],[1,"runtime-table","mb-4","table","table-sm","table-bordered","mb-5"],[1,"thead-light"],[2,"width","180px"],[4,"ngFor","ngForOf"],[4,"ngIf"],["colspan","2"],[1,"mb-4","section-divider","d-flex"],[1,"runtime-table","table","table-sm","table-bordered"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","200px"],[1,"text-muted"],[2,"width","180px","text-align","center"],[1,"btn","btn-sm","btn-secondary",3,"routerLink","queryParams"],["colspan","2",1,"text-muted"]],template:function(t,e){1&t&&(ua(0,"h2",0),qa(1,"Runtime Modules"),ha(),ra(2,CB,4,2,"ngb-alert",1),ua(3,"table",2),ua(4,"thead",3),ua(5,"tr"),ua(6,"th"),qa(7,"Go Modules"),ha(),ua(8,"th",4),qa(9,"Last Modified"),ha(),ha(),ha(),ua(10,"tbody"),ra(11,SB,5,2,"tr",5),ra(12,kB,4,0,"tr",6),ha(),ua(13,"thead",3),ua(14,"tr"),ua(15,"th",7),qa(16,"Lua Modules"),ha(),ha(),ha(),ua(17,"tbody"),ra(18,EB,5,2,"tr",5),ra(19,AB,4,0,"tr",6),ha(),ua(20,"thead",3),ua(21,"tr"),ua(22,"th",7),qa(23,"JavaScript Modules"),ha(),ha(),ha(),ua(24,"tbody"),ra(25,DB,5,2,"tr",5),ra(26,TB,4,0,"tr",6),ha(),ha(),ua(27,"h4",8),qa(28,"Registered RPC Functions"),ha(),ua(29,"table",9),ua(30,"thead",3),ua(31,"tr"),ua(32,"th",7),qa(33,"Go RPC Functions"),ha(),ha(),ha(),ua(34,"tbody"),ra(35,MB,7,6,"tr",5),ra(36,LB,3,0,"tr",6),ha(),ua(37,"thead",3),ua(38,"tr"),ua(39,"th",7),qa(40,"Lua RPC Functions"),ha(),ha(),ha(),ua(41,"tbody"),ra(42,$B,7,6,"tr",5),ra(43,OB,3,0,"tr",6),ha(),ua(44,"thead",3),ua(45,"tr"),ua(46,"th",7),qa(47,"JavaScript RPC Functions"),ha(),ha(),ha(),ua(48,"tbody"),ra(49,IB,7,6,"tr",5),ra(50,NB,3,0,"tr",6),ha(),ha()),2&t&&(gs(2),la("ngIf",e.error),gs(9),la("ngForOf",e.runtimeInfo.go_modules),gs(1),la("ngIf",0===e.runtimeInfo.go_modules.length),gs(6),la("ngForOf",e.runtimeInfo.lua_modules),gs(1),la("ngIf",0===e.runtimeInfo.lua_modules.length),gs(6),la("ngForOf",e.runtimeInfo.js_modules),gs(1),la("ngIf",0===e.runtimeInfo.js_modules.length),gs(9),la("ngForOf",e.runtimeInfo.go_rpc_functions),gs(1),la("ngIf",0===e.runtimeInfo.go_rpc_functions.length),gs(6),la("ngForOf",e.runtimeInfo.lua_rpc_functions),gs(1),la("ngIf",0===e.runtimeInfo.lua_rpc_functions.length),gs(6),la("ngForOf",e.runtimeInfo.js_rpc_functions),gs(1),la("ngIf",0===e.runtimeInfo.js_rpc_functions.length))},directives:[Ed,Sd,QC,yb],styles:["label[_ngcontent-%COMP%]{margin-bottom:0}.opaque[_ngcontent-%COMP%]{opacity:1%}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}.runtime-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{background-color:#fff}.runtime-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:.6em 1em;font-weight:500}.runtime-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding-left:1em;padding-right:1em;vertical-align:middle}"]}),t})(),BB=(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){return this.consoleService.getRuntime("")}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function UB(t,e){1&t&&(ua(0,"span"),qa(1,"Filter by collection"),ha())}function VB(t,e){if(1&t&&(ua(0,"span"),qa(1),ha()),2&t){const t=xa();gs(1),Ya(t.f.collection.value)}}function HB(t,e){if(1&t){const t=ga();ua(0,"button",34),ya("click",function(){pn(t);const n=e.$implicit;return xa().f.collection.setValue(n)}),qa(1),ha()}if(2&t){const t=e.$implicit;gs(1),Ya(t)}}function jB(t,e){if(1&t&&(ua(0,"ngb-alert",35),da(1,"img",36),ua(2,"h6",37),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("Error when querying storage objects: ",t.error,"")}}function zB(t,e){1&t&&(ua(0,"th",38),qa(1,"Remove"),ha())}function WB(t,e){1&t&&(ua(0,"tr"),ua(1,"td",39),qa(2,"No storage objects found - change the filter criteria or add new objects."),ha(),ha())}function GB(t,e){if(1&t){const t=ga();ua(0,"td",42),ua(1,"button",43),ya("click",function(e){pn(t);const n=xa(),i=n.index,r=n.$implicit;return xa().deleteObject(e,i,r)}),qa(2,"Delete"),ha(),ha()}}function KB(t,e){if(1&t){const t=ga();ua(0,"tr"),ua(1,"td",40),ya("click",function(){pn(t);const n=e.$implicit;return xa().viewObject(n)}),qa(2),ha(),ua(3,"td",40),ya("click",function(){pn(t);const n=e.$implicit;return xa().viewObject(n)}),qa(4),ha(),ua(5,"td",40),ya("click",function(){pn(t);const n=e.$implicit;return xa().viewObject(n)}),qa(6),ha(),ua(7,"td",40),ya("click",function(){pn(t);const n=e.$implicit;return xa().viewObject(n)}),qa(8),ha(),ra(9,GB,3,0,"td",41),ha()}if(2&t){const t=e.$implicit,n=xa();gs(2),Ya(t.collection),gs(2),Ya(t.key),gs(2),Ya(t.user_id),gs(2),Ya(t.update_time),gs(1),la("ngIf",n.deleteAllowed())}}let qB=(()=>{class t{constructor(t,e,n,i,r){this.route=t,this.router=e,this.consoleService=n,this.authService=i,this.formBuilder=r,this.systemUserId="00000000-0000-0000-0000-000000000000",this.error="",this.collections=[],this.objects=[],this.objectCount=0,this.nextCursor="",this.prevCursor=""}ngOnInit(){this.searchForm=this.formBuilder.group({collection:[""],key:[""],user_id:[""]});const t=this.route.snapshot.queryParamMap;this.f.collection.setValue(t.get("collection")),this.f.key.setValue(t.get("key")),this.f.user_id.setValue(t.get("user_id")),this.nextCursor=t.get("cursor"),this.nextCursor&&""!==this.nextCursor?this.search(1):(this.f.collection.value||this.f.user_id.value)&&this.search(0),this.route.data.subscribe(t=>{this.collections.length=0,this.collections.push(...t[0].collections),this.objectCount=t[1].total_count,this.nextCursor=t[1].next_cursor,this.prevCursor=t[1].prev_cursor,this.objects.length=0,this.objects.push(...t[1].objects)},t=>{this.error=t})}disableSearch(){return!(!this.f.key.value||""===this.f.key.value||this.f.collection.value&&""!==this.f.collection.value)}search(t){let e="";switch(t){case-1:e=this.prevCursor;break;case 0:e="";break;case 1:e=this.nextCursor}this.consoleService.listStorage("",this.f.user_id.value,this.f.key.value,this.f.collection.value,e).subscribe(t=>{this.error="",this.objectCount=t.total_count,this.nextCursor=t.next_cursor,this.objects.length=0,this.objects.push(...t.objects),this.router.navigate([],{relativeTo:this.route,queryParams:{collection:this.f.collection.value,key:this.f.key.value,user_id:this.f.user_id.value,cursor:e},queryParamsHandling:"merge"})},t=>{this.error=t})}deleteObject(t,e,n){t.target.disabled=!0,t.preventDefault(),this.error="",this.consoleService.deleteStorageObject("",n.collection,n.key,n.user_id,n.version).subscribe(()=>{this.error="",this.objectCount--,this.objects.splice(e,1)},t=>{this.error=t})}deleteAllowed(){return this.authService.sessionRole<=Zx.USER_ROLE_DEVELOPER}viewObject(t){this.router.navigate(["/storage",t.collection,t.key,t.user_id],{relativeTo:this.route})}get f(){return this.searchForm.controls}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(mb),oa(Jx),oa(i_),oa(ox))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:50,vars:15,consts:[[1,"pb-1"],[1,"pb-4"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],[1,"input-group-prepend"],["ngbDropdown","",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-outline-secondary","dropdown-radius",3,"disabled"],[4,"ngIf"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",1,"btn","btn-secondary","text-secondary",3,"hidden","click"],[1,"dropdown-divider",3,"hidden"],["type","button","ngbDropdownItem","",3,"click",4,"ngFor","ngForOf"],["type","text","formControlName","key","placeholder","Filter by key",1,"form-control"],["type","text","formControlName","user_id","placeholder","Filter by user ID",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"input-group-text",3,"click"],["src","/static/svg/purple-cog-1.svg","alt","","width","20","height","",1,"mr-1"],["type","submit",1,"btn","btn-primary",3,"disabled","click"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Basic example",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngFor","ngForOf"],["type","button","ngbDropdownItem","",3,"click"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(t,e){1&t&&(ua(0,"h2",0),qa(1,"Storage Objects"),ha(),ua(2,"h6",1),qa(3),ha(),ua(4,"div",2),ua(5,"div",3),ua(6,"div",4),ua(7,"form",5),ya("ngSubmit",function(){return e.search(0)}),ua(8,"div",6),ua(9,"div",7),ua(10,"div",8),ua(11,"button",9),ra(12,UB,2,0,"span",10),ra(13,VB,2,1,"span",10),ha(),ua(14,"div",11),ua(15,"button",12),ya("click",function(){return e.f.collection.reset()}),qa(16,"\u2718 Deselect collection"),ha(),da(17,"div",13),ra(18,HB,2,1,"button",14),ha(),ha(),ha(),da(19,"input",15),da(20,"input",16),ua(21,"div",17),ua(22,"span",18),ya("click",function(){return e.f.user_id.setValue(e.systemUserId)}),da(23,"img",19),ha(),ha(),ua(24,"div",17),ua(25,"button",20),ya("click",function(){return e.search(0)}),qa(26,"Search"),ha(),ha(),ha(),ha(),ha(),ua(27,"div",21),ua(28,"div",22),ua(29,"button",23),ya("click",function(){return e.search(0)}),da(30,"img",24),ha(),ua(31,"button",23),ya("click",function(){return e.search(1)}),da(32,"img",25),ha(),ha(),ha(),ha(),ha(),ra(33,jB,4,2,"ngb-alert",26),ua(34,"div",27),ua(35,"table",28),ua(36,"thead",29),ua(37,"tr"),ua(38,"th"),qa(39,"Collection Name"),ha(),ua(40,"th"),qa(41,"Key Name"),ha(),ua(42,"th",30),qa(43,"User ID"),ha(),ua(44,"th",31),qa(45,"Last Update"),ha(),ra(46,zB,2,0,"th",32),ha(),ha(),ua(47,"tbody"),ra(48,WB,3,0,"tr",10),ra(49,KB,10,5,"tr",33),ha(),ha(),ha()),2&t&&(gs(3),Xa("",e.objectCount," objects found."),gs(4),la("formGroup",e.searchForm),gs(4),la("disabled",0===e.collections.length),gs(1),la("ngIf",!e.f.collection.value||""===e.f.collection.value),gs(1),la("ngIf",e.f.collection.value&&""!==e.f.collection.value),gs(2),la("hidden",!e.f.collection.value||""===e.f.collection.value),gs(2),la("hidden",!e.f.collection.value||""===e.f.collection.value),gs(1),la("ngForOf",e.collections),gs(7),la("disabled",e.disableSearch()),gs(4),la("disabled",0===e.objects.length),gs(2),la("disabled",""===e.nextCursor),gs(2),la("ngIf",e.error),gs(13),la("ngIf",e.deleteAllowed()),gs(2),la("ngIf",0===e.objects.length),gs(1),la("ngForOf",e.objects))},directives:[Jw,gw,tx,lk,ak,Ed,sk,rk,Sd,Gb,pw,nx,QC],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:initial;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]}),t})(),YB=(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){return this.consoleService.listStorageCollections("")}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})(),XB=(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){const n=t.queryParamMap.get("collection"),i=t.queryParamMap.get("key"),r=t.queryParamMap.get("user_id");return this.consoleService.listStorage("",r,i,n,null)}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();var JB=n("bU/s");const QB=["editor"];function ZB(t,e){if(1&t&&(ua(0,"ngb-alert",37),da(1,"img",38),ua(2,"h6",39),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("Error while modifying storage object: ",t.error,"")}}function tU(t,e){1&t&&(ua(0,"ngb-alert",40),da(1,"img",41),ua(2,"h6",39),qa(3,"Storage object was modified successfully."),ha(),ha()),2&t&&la("dismissible",!1)}function eU(t,e){1&t&&(ua(0,"span"),qa(1,"Save as a copy"),ha())}function nU(t,e){1&t&&qa(0,"Save")}function iU(t,e){if(1&t&&(ua(0,"button",42),ra(1,eU,2,0,"span",43),ra(2,nU,1,0,"ng-template",null,44,xu),ha()),2&t){const t=sa(3),e=xa();la("disabled",e.updating),gs(1),la("ngIf",e.object.collection!==e.f.collection.value||e.object.key!==e.f.keyname.value||e.object.user_id!==e.f.user_id.value)("ngIfElse",t)}}const rU=function(){return["/storage"]},sU=function(t){return{collection:t}},oU=function(t,e){return{collection:t,key:e}},aU=function(t,e,n){return{collection:t,key:e,user_id:n}},lU=function(t){return{"is-invalid":t}};let cU=(()=>{class t{constructor(t,e,n,i,r){this.route=t,this.router=e,this.consoleService=n,this.authService=i,this.formBuilder=r,this.error="",this.updating=!1,this.updated=!1}ngOnInit(){this.objectForm=this.formBuilder.group({collection:["",Qb.required],keyname:["",Qb.required],user_id:["",Qb.required],permission_read:[0,Qb.required],permission_write:[0,Qb.required]}),this.route.data.subscribe(t=>{this.object=t[0],this.f.collection.setValue(this.object.collection),this.f.keyname.setValue(this.object.key),this.f.user_id.setValue(this.object.user_id),this.f.permission_read.setValue(this.object.permission_read),this.f.permission_write.setValue(this.object.permission_write),this.updateAllowed()||this.objectForm.disable()},t=>{this.error=t})}ngAfterViewInit(){JB.config.set("fontSize","14px"),JB.config.set("printMarginColumn",0),JB.config.set("useWorker",!0),JB.config.set("highlightSelectedWord",!0),JB.config.set("fontFamily",'"Courier New", Courier, monospace'),this.aceEditor=JB.edit(this.editor.nativeElement),this.aceEditor.setReadOnly(!this.updateAllowed());const t=JSON.stringify(JSON.parse(this.object.value),null,2);this.aceEditor.session.setValue(t)}updateObject(){this.error="",this.updated=!1,this.updating=!0;let t="";try{t=JSON.stringify(JSON.parse(this.aceEditor.session.getValue()))}catch(n){return this.error=n,void(this.updating=!1)}let e=this.object.version;this.object.collection===this.f.collection.value&&this.object.key===this.f.keyname.value&&this.object.user_id===this.f.user_id.value||(e=""),this.consoleService.writeStorageObject("",this.f.collection.value,this.f.keyname.value,this.f.user_id.value,{version:e,value:t,permission_read:this.f.permission_read.value,permission_write:this.f.permission_write.value}).subscribe(t=>{this.updated=!0,this.updating=!1,this.object.version=t.version,""===e&&(this.object.collection=this.f.collection.value,this.object.key=this.f.keyname.value,this.object.user_id=this.f.user_id.value,this.object.permission_read=this.f.permission_read.value,this.object.permission_write=this.f.permission_write.value)},t=>{this.error=t,this.updating=!1})}deleteObject(){this.error="",this.updated=!1,this.updating=!1;const t=this.object;this.consoleService.deleteStorageObject("",t.collection,t.key,t.user_id,t.version).subscribe(()=>{this.router.navigate(["/storage"],{relativeTo:this.route,queryParams:{collection:this.f.collection.value,key:this.f.key.value,user_id:this.f.user_id.value}})},t=>{this.error=t})}updateAllowed(){return this.authService.sessionRole<=Zx.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=Zx.USER_ROLE_MAINTAINER}get f(){return this.objectForm.controls}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(mb),oa(Jx),oa(i_),oa(ox))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){if(1&t&&fu(QB,!0),2&t){let t;hu(t=vu())&&(e.editor=t.first)}},decls:88,vars:50,consts:[[1,"pb-1"],[1,"storage-top-nav","d-flex","justify-content-between","align-items-baseline","mb-3"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink","queryParams"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","collection",1,"d-inline"],["type","text","id","collection","placeholder","Collection","required","","formControlName","collection",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","key",1,"d-inline"],["type","text","id","key","placeholder","Key","required","","formControlName","keyname",1,"form-control","form-control-sm","my-2",3,"ngClass"],["for","user_id",1,"d-inline"],["type","text","id","user_id","placeholder","User ID","required","","formControlName","user_id",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","permission_read",1,"d-inline"],["ngbRadioGroup","","id","permission_read","name","permission_read","formControlName","permission_read",1,"btn-group","btn-group-toggle"],["ngbButtonLabel","",1,"btn-outline-secondary"],["ngbButton","","type","radio",3,"disabled","value"],["for","version",1,"d-inline"],["type","text","id","version","placeholder","Version","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","permission_write",1,"d-inline"],["ngbRadioGroup","","id","permission_write","name","permission_write","formControlName","permission_write",1,"btn-group","btn-group-toggle"],[1,"row","add-border-single-row-bottom","mb-3"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","update_time",1,"d-inline"],["type","text","id","update_time","placeholder","Update Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"card","p-2","mt-3","mb-3",2,"height","500px"],[2,"height","500px"],["editor",""],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","submit",1,"btn","btn-primary",3,"disabled"],[4,"ngIf","ngIfElse"],["elseBlock",""]],template:function(t,e){1&t&&(ua(0,"h2",0),qa(1,"Storage Object"),ha(),ua(2,"div",1),ua(3,"nav",2),ua(4,"ol",3),ua(5,"li",4),qa(6,"Storage"),ha(),ua(7,"li",4),ua(8,"a",5),qa(9),ha(),ha(),ua(10,"li",4),ua(11,"a",5),qa(12),ha(),ha(),ua(13,"li",4),ua(14,"a",5),qa(15),ha(),ha(),ha(),ha(),ha(),ra(16,ZB,4,2,"ngb-alert",6),ra(17,tU,4,1,"ngb-alert",7),ua(18,"form",8),ya("ngSubmit",function(){return e.updateObject()}),ua(19,"div",9),ua(20,"div",10),ua(21,"div",11),ua(22,"label",12),qa(23,"Collection"),ha(),ha(),da(24,"input",13),ua(25,"div",14),qa(26,"Collection is required"),ha(),ha(),ua(27,"div",10),ua(28,"div",11),ua(29,"label",15),qa(30,"Key"),ha(),ha(),da(31,"input",16),ua(32,"div",14),qa(33,"Key is required"),ha(),ha(),ha(),ua(34,"div",9),ua(35,"div",10),ua(36,"div",11),ua(37,"label",17),qa(38,"User ID"),ha(),ha(),da(39,"input",18),ua(40,"div",14),qa(41,"User ID is required"),ha(),ha(),ua(42,"div",19),ua(43,"div",11),ua(44,"label",20),qa(45,"Read Permission"),ha(),ha(),ua(46,"div",21),ua(47,"label",22),da(48,"input",23),qa(49," No Read "),ha(),ua(50,"label",22),da(51,"input",23),qa(52," Owner Read "),ha(),ua(53,"label",22),da(54,"input",23),qa(55," Public Read "),ha(),ha(),ha(),ha(),ua(56,"div",9),ua(57,"div",10),ua(58,"div",11),ua(59,"label",24),qa(60,"Version"),ha(),ha(),da(61,"input",25),ha(),ua(62,"div",19),ua(63,"div",11),ua(64,"label",26),qa(65,"Write Permission"),ha(),ha(),ua(66,"div",27),ua(67,"label",22),da(68,"input",23),qa(69," No Write "),ha(),ua(70,"label",22),da(71,"input",23),qa(72," Owner Write "),ha(),ha(),ha(),ha(),ua(73,"div",28),ua(74,"div",10),ua(75,"div",11),ua(76,"label",29),qa(77,"Create Time"),ha(),ha(),da(78,"input",30),ha(),ua(79,"div",10),ua(80,"div",11),ua(81,"label",31),qa(82,"Update Time"),ha(),ha(),da(83,"input",32),ha(),ha(),ua(84,"div",33),da(85,"div",34,35),ha(),ra(87,iU,4,3,"button",36),ha()),2&t&&(gs(8),la("routerLink",Kc(32,rU))("queryParams",qc(33,sU,e.object.collection)),gs(1),Ya(e.object.collection),gs(2),la("routerLink",Kc(35,rU))("queryParams",Yc(36,oU,e.object.collection,e.object.key)),gs(1),Ya(e.object.key),gs(2),la("routerLink",Kc(39,rU))("queryParams",Xc(40,aU,e.object.collection,e.object.key,e.object.user_id)),gs(1),Ya(e.object.user_id),gs(1),la("ngIf",e.error),gs(1),la("ngIf",e.updated),gs(1),la("formGroup",e.objectForm),gs(6),la("ngClass",qc(44,lU,e.f.collection.dirty&&e.f.collection.errors)),gs(1),la("hidden",e.f.collection.disabled||e.f.collection.valid||e.f.collection.pristine),gs(6),la("ngClass",qc(46,lU,e.f.keyname.dirty&&e.f.keyname.errors)),gs(1),la("hidden",e.f.keyname.disabled||e.f.keyname.valid||e.f.keyname.pristine),gs(7),la("ngClass",qc(48,lU,e.f.user_id.dirty&&e.f.user_id.errors)),gs(1),la("hidden",e.f.user_id.disabled||e.f.user_id.valid||e.f.user_id.pristine),gs(8),la("disabled",!e.updateAllowed())("value",0),gs(3),la("disabled",!e.updateAllowed())("value",1),gs(3),la("disabled",!e.updateAllowed())("value",2),gs(7),la("value",e.object.version),gs(7),la("disabled",!e.updateAllowed())("value",0),gs(3),la("disabled",!e.updateAllowed())("value",1),gs(7),la("value",e.object.create_time),gs(5),la("value",e.object.update_time),gs(4),la("ngIf",e.updateAllowed()))},directives:[yb,Ed,Jw,gw,tx,Gb,rx,pw,nx,_d,sS,tS,oS,QC],styles:[".storage-top-nav[_ngcontent-%COMP%]{border-bottom:1px solid #dadae9;padding-bottom:1.5em}"]}),t})(),uU=(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){const n=t.paramMap.get("collection"),i=t.paramMap.get("key"),r=t.paramMap.get("user_id");return this.consoleService.getStorage("",n,i,r)}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function hU(t,e){if(1&t&&(ua(0,"ngb-alert",10),da(1,"img",11),ua(2,"h6",12),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("Error while processing request: ",t.error,"")}}function dU(t,e){1&t&&(ua(0,"th",13),qa(1,"Remove"),ha())}function fU(t,e){if(1&t){const t=ga();ua(0,"td",17),ya("click",function(){pn(t);const e=xa().$implicit;return xa().viewLeaderboardEntries(e)}),qa(1,"Yes"),ha()}}function pU(t,e){if(1&t){const t=ga();ua(0,"td",17),ya("click",function(){pn(t);const e=xa().$implicit;return xa().viewLeaderboardEntries(e)}),qa(1,"No"),ha()}}function gU(t,e){if(1&t){const t=ga();ua(0,"td",17),ya("click",function(){pn(t);const e=xa().$implicit;return xa().viewLeaderboardEntries(e)}),qa(1,"Yes"),ha()}}function mU(t,e){if(1&t){const t=ga();ua(0,"td",17),ya("click",function(){pn(t);const e=xa().$implicit;return xa().viewLeaderboardEntries(e)}),qa(1,"No"),ha()}}function vU(t,e){if(1&t){const t=ga();ua(0,"td",18),ua(1,"button",19),ya("click",function(e){pn(t);const n=xa(),i=n.index,r=n.$implicit;return xa().deleteLeaderboard(e,i,r)}),qa(2,"Delete"),ha(),ha()}}function yU(t,e){if(1&t){const t=ga();ua(0,"tr"),ua(1,"td",14),ya("click",function(){pn(t);const n=e.$implicit;return xa().viewLeaderboardEntries(n)}),qa(2),ha(),ua(3,"td",14),ya("click",function(){pn(t);const n=e.$implicit;return xa().viewLeaderboardEntries(n)}),qa(4),ha(),ua(5,"td",14),ya("click",function(){pn(t);const n=e.$implicit;return xa().viewLeaderboardEntries(n)}),qa(6),ha(),ua(7,"td",14),ya("click",function(){pn(t);const n=e.$implicit;return xa().viewLeaderboardEntries(n)}),qa(8),ha(),ra(9,fU,2,0,"td",15),ra(10,pU,2,0,"td",15),ra(11,gU,2,0,"td",15),ra(12,mU,2,0,"td",15),ra(13,vU,3,0,"td",16),ha()}if(2&t){const t=e.$implicit,n=xa();gs(2),Ya(t.id),gs(2),Ya(n.orderString[t.sort_order]),gs(2),Ya(n.operatorString[t.operator]),gs(2),Ya(""===t.reset_schedule?"-":t.reset_schedule),gs(1),la("ngIf",t.authoritative),gs(1),la("ngIf",!t.authoritative),gs(1),la("ngIf",t.tournament),gs(1),la("ngIf",!t.tournament),gs(1),la("ngIf",n.deleteAllowed())}}function bU(t,e){1&t&&(ua(0,"tr"),ua(1,"td",20),qa(2,"No leaderboards were found."),ha(),ha())}let wU=(()=>{class t{constructor(t,e,n,i){this.route=t,this.router=e,this.authService=n,this.consoleService=i,this.error="",this.leaderboards=[],this.orderString={0:"Ascending",1:"Descending"},this.operatorString={0:"Best",1:"Set",2:"Increment",3:"Decrement"}}ngOnInit(){this.route.data.subscribe(t=>{this.leaderboards.length=0,this.leaderboards.push(...t[0].leaderboards)},t=>{this.error=t})}deleteAllowed(){return this.authService.sessionRole<=Zx.USER_ROLE_DEVELOPER}deleteLeaderboard(t,e,n){t.target.disabled=!0,t.preventDefault(),this.error="",this.consoleService.deleteLeaderboard("",n.id).subscribe(()=>{this.error="",this.leaderboards.splice(e,1)},t=>{this.error=t})}viewLeaderboardEntries(t){this.router.navigate(["/leaderboards",t.id],{relativeTo:this.route})}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(mb),oa(i_),oa(Jx))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:24,vars:5,consts:[[1,"pb-1"],[1,"pb-4"],["type","danger",3,"dismissible",4,"ngIf"],[1,"table","table-sm","table-bordered","table-hover"],[1,"thead-light"],[2,"width","130px"],[2,"width","100px"],["style","width: 90px",4,"ngIf"],[4,"ngFor","ngForOf"],[4,"ngIf"],["type","danger",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],[3,"click"],["class","text-center",3,"click",4,"ngIf"],["class","text-center",4,"ngIf"],[1,"text-center",3,"click"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],["colspan","7",1,"text-muted"]],template:function(t,e){1&t&&(ua(0,"h2",0),qa(1,"Leaderboards"),ha(),ua(2,"h6",1),qa(3),ha(),ra(4,hU,4,2,"ngb-alert",2),ua(5,"table",3),ua(6,"thead",4),ua(7,"tr"),ua(8,"th"),qa(9,"Leaderboard ID"),ha(),ua(10,"th",5),qa(11,"Sort Order"),ha(),ua(12,"th",5),qa(13,"Operator"),ha(),ua(14,"th",5),qa(15,"Reset Schedule"),ha(),ua(16,"th",6),qa(17,"Authoritative"),ha(),ua(18,"th",6),qa(19,"Tournament"),ha(),ra(20,dU,2,0,"th",7),ha(),ha(),ua(21,"tbody"),ra(22,yU,14,9,"tr",8),ra(23,bU,3,0,"tr",9),ha(),ha()),2&t&&(gs(3),Xa("",e.leaderboards.length," leaderboards found."),gs(1),la("ngIf",e.error),gs(16),la("ngIf",e.deleteAllowed()),gs(2),la("ngForOf",e.leaderboards),gs(1),la("ngIf",0===e.leaderboards.length))},directives:[Ed,Sd,QC],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}"]}),t})(),xU=(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){return this.consoleService.listLeaderboards("")}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function _U(t,e){if(1&t&&(ua(0,"ngb-alert",31),da(1,"img",32),ua(2,"h6",33),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("Error when querying accounts: ",t.error,"")}}function CU(t,e){1&t&&(ua(0,"th",34),qa(1,"Remove"),ha())}function SU(t,e){1&t&&(ua(0,"tr"),ua(1,"td",35),qa(2,"No users found - change the filter criteria or add new user accounts."),ha(),ha())}function kU(t,e){1&t&&da(0,"td")}function EU(t,e){if(1&t){const t=ga();ua(0,"td",38),ua(1,"button",39),ya("click",function(e){pn(t);const n=xa(),i=n.index,r=n.$implicit;return xa().deleteAccount(e,i,r)}),qa(2,"Delete"),ha(),ha()}}function AU(t,e){if(1&t){const t=ga();ua(0,"tr"),ua(1,"td",36),ya("click",function(){pn(t);const n=e.$implicit;return xa().viewAccount(n)}),qa(2),ha(),ua(3,"td",36),ya("click",function(){pn(t);const n=e.$implicit;return xa().viewAccount(n)}),qa(4),ha(),ua(5,"td",36),ya("click",function(){pn(t);const n=e.$implicit;return xa().viewAccount(n)}),qa(6),ha(),ua(7,"td",36),ya("click",function(){pn(t);const n=e.$implicit;return xa().viewAccount(n)}),qa(8),ha(),ra(9,kU,1,0,"td",29),ra(10,EU,3,0,"td",37),ha()}if(2&t){const t=e.$implicit,n=xa();gs(2),Ya(t.id),gs(2),Ya(t.username),gs(2),Ya(t.display_name),gs(2),Ya(t.update_time),gs(1),la("ngIf",n.deleteAllowed()&&t.id===n.systemUserId),gs(1),la("ngIf",n.deleteAllowed()&&t.id!==n.systemUserId)}}let DU=(()=>{class t{constructor(t,e,n,i,r){this.route=t,this.router=e,this.consoleService=n,this.authService=i,this.formBuilder=r,this.systemUserId="00000000-0000-0000-0000-000000000000",this.error="",this.accountsCount=0,this.accounts=[],this.nextCursor="",this.prevCursor=""}ngOnInit(){this.searchForm=this.formBuilder.group({filter:[""],filter_type:[0]});const t=this.route.snapshot.queryParamMap;this.f.filter.setValue(t.get("filter")),this.f.filter_type.setValue(+t.get("filter_type")),this.nextCursor=t.get("cursor"),this.nextCursor&&""!==this.nextCursor?this.search(1):(this.f.filter.value||this.f.filter_type.value)&&this.search(0),this.route.data.subscribe(t=>{this.accounts.length=0,t&&(this.accounts.push(...t[0].users),this.accountsCount=t[0].total_count,this.nextCursor=t[0].next_cursor,this.prevCursor=t[0].prev_cursor)},t=>{this.error=t})}search(t){let e="";switch(t){case-1:e=this.prevCursor;break;case 0:e="";break;case 1:e=this.nextCursor}this.consoleService.listAccounts("",this.f.filter.value,this.f.filter_type.value&&1===this.f.filter_type.value,e).subscribe(t=>{this.error="",this.accounts.length=0,this.accounts.push(...t.users),this.accountsCount=t.total_count,this.nextCursor=t.next_cursor,this.router.navigate([],{relativeTo:this.route,queryParams:{filter:this.f.filter.value,filter_type:this.f.filter_type.value,cursor:e},queryParamsHandling:"merge"})},t=>{this.error=t})}deleteAccount(t,e,n){t.target.disabled=!0,t.preventDefault(),this.error="",this.consoleService.deleteAccount("",n.id,!1).subscribe(()=>{this.error="",this.accounts.splice(e,1),this.accountsCount--},t=>{this.error=t})}deleteAllowed(){return this.authService.sessionRole<=Zx.USER_ROLE_DEVELOPER}viewAccount(t){this.router.navigate(["/accounts",t.id],{relativeTo:this.route})}get f(){return this.searchForm.controls}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(mb),oa(Jx),oa(i_),oa(ox))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:45,vars:9,consts:[[1,"pb-1"],[1,"pb-3"],[1,"row","no-gutters","mb-4"],[1,"col","d-flex","justify-content-between","no-gutters","align-items-center"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],["type","text","formControlName","filter","placeholder","Filter by user ID or username (use '%' for wildcard search)",1,"form-control","border-right-0"],[1,"input-group-append"],[1,"input-group-text",3,"click"],["src","/static/svg/purple-cog-1.svg","alt","","width","20","height","",1,"mr-1"],[1,"btn-group"],["type","button",1,"btn","btn-primary","dropdown-radius",3,"click"],["ngbDropdown","","role","group","aria-label","Button group with nested dropdown",1,"btn-group"],["type","button","ngbDropdownToggle","",1,"btn","btn-primary","dropdown-toggle-split",3,"disabled"],["ngbDropdownMenu","",1,"dropdown-menu"],["type","button","ngbDropdownItem","",3,"click"],[1,"col-md-3","justify-content-end","text-right"],["role","group","aria-label","Basic example",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[3,"click"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(t,e){1&t&&(ua(0,"h2",0),qa(1,"User Accounts"),ha(),ua(2,"h6",1),qa(3),ha(),ua(4,"div",2),ua(5,"div",3),ua(6,"div",4),ua(7,"form",5),ya("ngSubmit",function(){return e.search(0)}),ua(8,"div",6),da(9,"input",7),ua(10,"div",8),ua(11,"span",9),ya("click",function(){return e.f.filter.setValue(e.systemUserId)}),da(12,"img",10),ha(),ha(),ua(13,"div",8),ua(14,"div",11),ua(15,"button",12),ya("click",function(){return e.f.filter_type.setValue(0),e.search(0)}),qa(16,"Search"),ha(),ua(17,"div",13),da(18,"button",14),ua(19,"div",15),ua(20,"button",16),ya("click",function(){return e.f.filter_type.setValue(1),e.search(0)}),qa(21,"Tombstones"),ha(),ha(),ha(),ha(),ha(),ha(),ha(),ha(),ua(22,"div",17),ua(23,"div",18),ua(24,"button",19),ya("click",function(){return e.search(0)}),da(25,"img",20),ha(),ua(26,"button",19),ya("click",function(){return e.search(1)}),da(27,"img",21),ha(),ha(),ha(),ha(),ha(),ra(28,_U,4,2,"ngb-alert",22),ua(29,"div",23),ua(30,"table",24),ua(31,"thead",25),ua(32,"tr"),ua(33,"th",26),qa(34,"User ID"),ha(),ua(35,"th"),qa(36,"Username"),ha(),ua(37,"th"),qa(38,"Display Name"),ha(),ua(39,"th",27),qa(40,"Last Update"),ha(),ra(41,CU,2,0,"th",28),ha(),ha(),ua(42,"tbody"),ra(43,SU,3,0,"tr",29),ra(44,AU,11,6,"tr",30),ha(),ha(),ha()),2&t&&(gs(3),Xa("",e.accountsCount," accounts found."),gs(4),la("formGroup",e.searchForm),gs(11),la("disabled",!e.f.filter.value||""===e.f.filter.value),gs(6),la("disabled",0===e.accounts.length),gs(2),la("disabled",""===e.nextCursor),gs(2),la("ngIf",e.error),gs(13),la("ngIf",e.deleteAllowed()),gs(2),la("ngIf",0===e.accounts.length),gs(1),la("ngForOf",e.accounts))},directives:[Jw,gw,tx,Gb,pw,nx,lk,ak,sk,rk,Ed,Sd,QC],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:initial;cursor:pointer}.table-hover[_ngcontent-%COMP%]{cursor:pointer}"]}),t})(),TU=(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){const n=t.queryParamMap.get("filter"),i=t.queryParamMap.get("tombstones");return this.consoleService.listAccounts("",n,"true"===i,null)}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function RU(t,e){if(1&t){const t=ga();ua(0,"button",15),ya("click",function(e){return pn(t),xa().exportAccount(e)}),da(1,"img",16),qa(2,"Export"),ha()}}function FU(t,e){1&t&&(ua(0,"span"),qa(1,"Unban"),ha())}function MU(t,e){1&t&&(ua(0,"span"),qa(1,"Ban"),ha())}function LU(t,e){if(1&t){const t=ga();ua(0,"button",15),ya("click",function(e){return pn(t),xa().banUnbanAccount(e)}),da(1,"img",17),ra(2,FU,2,0,"span",18),ra(3,MU,2,0,"span",18),ha()}if(2&t){const t=xa();gs(2),la("ngIf",t.account.disable_time),gs(1),la("ngIf",!t.account.disable_time)}}function $U(t,e){if(1&t){const t=ga();ua(0,"button",19),ya("click",function(e){return pn(t),xa().deleteAccount(e,!1)}),da(1,"img",20),qa(2,"Delete"),ha()}}function OU(t,e){if(1&t){const t=ga();ua(0,"button",19),ya("click",function(e){return pn(t),xa().deleteAccount(e,!0)}),da(1,"img",21),qa(2,"Recorded delete"),ha()}}function IU(t,e){if(1&t&&(ua(0,"ngb-alert",22),da(1,"img",23),ua(2,"h6",24),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("An error occurred: ",t.error,"")}}const NU=function(t,e){return["/accounts",t,e]};function PU(t,e){if(1&t&&(ua(0,"div"),fa(1,25),ua(2,"a",26),qa(3),ha(),pa(),ha()),2&t){const t=e.$implicit,n=xa();gs(1),la("ngbNavItem",t.path),gs(1),la("routerLink",Yc(3,NU,n.account.user.id,t.path)),gs(1),Ya(t.label)}}const BU=function(){return["/accounts"]},UU=function(){return["/storage"]},VU=function(t){return{user_id:t}};let HU=(()=>{class t{constructor(t,e,n,i){this.route=t,this.router=e,this.consoleService=n,this.authService=i,this.error="",this.views=[{label:"Profile",path:"profile"},{label:"Authentication",path:"authentication"},{label:"Friends",path:"friends"},{label:"Groups",path:"groups"},{label:"Wallet",path:"wallet"},{label:"Purchases",path:"purchases"}]}ngOnInit(){this.route.data.subscribe(t=>{this.account=t[0].account},t=>{this.error=t})}deleteAccount(t,e){t.target.disabled=!0,this.error="",this.consoleService.deleteAccount("",this.account.user.id,e).subscribe(()=>{this.error="",this.router.navigate(["/accounts"])},t=>{this.error=t})}banUnbanAccount(t){t.target.disabled=!0,this.error="",this.account.disable_time?this.consoleService.unbanAccount("",this.account.user.id).subscribe(()=>{this.error="",this.account.disable_time=null,t.target.disabled=!1},e=>{this.error=e,t.target.disabled=!1}):this.consoleService.banAccount("",this.account.user.id).subscribe(()=>{this.error="",this.account.disable_time=Date.now().toString(),t.target.disabled=!1},e=>{this.error=e,t.target.disabled=!1})}exportAccount(t){t.target.disabled=!0,this.error="",this.consoleService.exportAccount("",this.account.user.id).subscribe(e=>{this.error="";const n=this.account.user.id+"-export.json",i=JSON.stringify(e,null,2),r=(new TextEncoder).encode(i),s=new Blob([r],{type:"application/json;charset=utf-8"});Object(PP.saveAs)(s,n),t.target.disabled=!1},e=>{t.target.disabled=!1,this.error=e})}updateAllowed(){return this.authService.sessionRole<=Zx.USER_ROLE_MAINTAINER}exportAllowed(){return this.authService.sessionRole<=Zx.USER_ROLE_DEVELOPER}banAllowed(){return this.authService.sessionRole<=Zx.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=Zx.USER_ROLE_DEVELOPER}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(mb),oa(Jx),oa(i_))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:24,vars:14,consts:[[1,"pb-1"],[1,"account-top-nav","d-flex","justify-content-between","align-items-baseline","mb-4"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink"],[1,"breadcrumb-item","active"],["type","button","class","btn btn-outline-secondary mr-2",3,"click",4,"ngIf"],["type","button","class","btn btn-danger btn-danger-icon mr-2",3,"click",4,"ngIf"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["ngbNav","",1,"navbar-expand-sm","p-0","mb-3"],["accountNav","ngbNav"],[4,"ngFor","ngForOf"],["ngbNavItem","storage"],["ngbNavLink","",3,"routerLink","queryParams"],["type","button",1,"btn","btn-outline-secondary","mr-2",3,"click"],["src","/static/svg/export.svg","alt","","width","13","height","13",1,"mr-2"],["src","/static/svg/ban.svg","alt","","width","13","height","13",1,"mr-2"],[4,"ngIf"],["type","button",1,"btn","btn-danger","btn-danger-icon","mr-2",3,"click"],["src","/static/svg/bin-red.svg","alt","","width","14","height","",1,"mr-2"],["src","/static/svg/bin-recorded.svg","alt","","width","15","height","",1,"mr-2"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"ngbNavItem"],["ngbNavLink","","routerLinkActive","account-link-active",3,"routerLink"]],template:function(t,e){1&t&&(ua(0,"h2",0),qa(1,"User Account"),ha(),ua(2,"div",1),ua(3,"nav",2),ua(4,"ol",3),ua(5,"li",4),ua(6,"a",5),qa(7,"Account"),ha(),ha(),ua(8,"li",6),qa(9),ha(),ha(),ha(),ua(10,"div"),ra(11,RU,3,0,"button",7),ra(12,LU,4,2,"button",7),ra(13,$U,3,0,"button",8),ra(14,OU,3,0,"button",8),ha(),ha(),ra(15,IU,4,2,"ngb-alert",9),ua(16,"nav",10,11),ra(18,PU,4,6,"div",12),ua(19,"div"),fa(20,13),ua(21,"a",14),qa(22," Storage "),ha(),pa(),ha(),ha(),da(23,"router-outlet")),2&t&&(gs(6),la("routerLink",Kc(10,BU)),gs(3),Ya(e.account.user.id),gs(2),la("ngIf",e.exportAllowed()),gs(1),la("ngIf",e.banAllowed()),gs(1),la("ngIf",e.deleteAllowed()),gs(1),la("ngIf",e.deleteAllowed()),gs(1),la("ngIf",e.error),gs(3),la("ngForOf",e.views),gs(3),la("routerLink",Kc(11,UU))("queryParams",qc(12,VU,e.account.user.id)))},directives:[yb,Ed,Dk,Sd,Ak,Tk,xb,QC,wb],styles:[".nav-link[_ngcontent-%COMP%]{font-size:12px;font-family:Montserrat,sans-serif;text-transform:uppercase;letter-spacing:.1em;color:#000;opacity:.5;padding:0 0 1.6em;margin-right:3em;margin-bottom:-2px;font-weight:600}.nav-link[_ngcontent-%COMP%]:hover{opacity:1}.nav-link.account-link-active[_ngcontent-%COMP%]{opacity:1;border-bottom:2px solid #7668ed}.account-top-nav[_ngcontent-%COMP%], .navbar-expand-sm[_ngcontent-%COMP%]{border-bottom:1px solid #dadae9}.account-top-nav[_ngcontent-%COMP%]{padding-bottom:1.5em}"]}),t})(),jU=(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){const n=t.paramMap.get("id");return this.consoleService.getAccount("",n)}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const zU=["editor"];function WU(t,e){if(1&t&&(ua(0,"ngb-alert",29),da(1,"img",30),ua(2,"h6",31),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("An error occurred: ",t.error,"")}}function GU(t,e){1&t&&(ua(0,"ngb-alert",32),da(1,"img",33),ua(2,"h6",31),qa(3,"Account was modified successfully."),ha(),ha()),2&t&&la("dismissible",!1)}function KU(t,e){1&t&&(ua(0,"button",34),qa(1,"Save"),ha()),2&t&&la("disabled",xa().updating)}const qU=function(t){return{"is-invalid":t}};let YU=(()=>{class t{constructor(t,e,n,i,r){this.route=t,this.router=e,this.consoleService=n,this.authService=i,this.formBuilder=r,this.error="",this.updating=!1,this.updated=!1}ngOnInit(){this.accountForm=this.formBuilder.group({username:["",Qb.required],display_name:[""],avatar_url:[""],location:[""],timezone:[""]}),this.route.parent.data.subscribe(t=>{this.account=t[0].account,this.f.username.setValue(this.account.user.username),this.f.display_name.setValue(this.account.user.display_name),this.f.avatar_url.setValue(this.account.user.avatar_url),this.f.location.setValue(this.account.user.location),this.f.timezone.setValue(this.account.user.timezone),this.updateAllowed()||this.accountForm.disable()},t=>{this.error=t})}ngAfterViewInit(){JB.config.set("fontSize","14px"),JB.config.set("printMarginColumn",0),JB.config.set("useWorker",!0),JB.config.set("highlightSelectedWord",!0),JB.config.set("fontFamily",'"Courier New", Courier, monospace'),this.aceEditor=JB.edit(this.editor.nativeElement),this.aceEditor.setReadOnly(!this.updateAllowed());const t=JSON.stringify(JSON.parse(this.account.user.metadata),null,2);this.aceEditor.session.setValue(t)}updateAccount(){this.error="",this.updated=!1,this.updating=!0;let t="";try{t=JSON.stringify(JSON.parse(this.aceEditor.session.getValue()))}catch(e){return this.error=e,void(this.updating=!1)}this.consoleService.updateAccount("",this.account.user.id,{username:this.f.username.value,display_name:this.f.display_name.value,avatar_url:this.f.avatar_url.value,location:this.f.location.value,timezone:this.f.timezone.value,metadata:t}).subscribe(t=>{this.updated=!0,this.updating=!1},t=>{this.error=t,this.updating=!1})}updateAllowed(){return this.authService.sessionRole<=Zx.USER_ROLE_MAINTAINER}get f(){return this.accountForm.controls}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(mb),oa(Jx),oa(i_),oa(ox))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){if(1&t&&fu(zU,!0),2&t){let t;hu(t=vu())&&(e.editor=t.first)}},decls:53,vars:11,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","user_id",1,"d-inline"],["type","text","id","user_id","placeholder","User ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","username",1,"d-inline"],["type","text","id","username","placeholder","Username","required","","formControlName","username",1,"form-control","form-control-sm","my-2",3,"ngClass"],[1,"invalid-tooltip",3,"hidden"],["for","display_name",1,"d-inline"],["type","text","id","display_name","placeholder","Display Name","formControlName","display_name",1,"form-control","form-control-sm","my-2"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","avatar_url",1,"d-inline"],["type","text","id","avatar_url","placeholder","Avatar URL","formControlName","avatar_url",1,"form-control","form-control-sm","my-2"],["for","location",1,"d-inline"],["type","text","id","location","placeholder","Location","formControlName","location",1,"form-control","form-control-sm","my-2"],["for","timezone",1,"d-inline"],["type","text","id","timezone","placeholder","Timezone","formControlName","timezone",1,"form-control","form-control-sm","my-2"],[1,"row","mb-3","add-border-single-row-bottom"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","update_time",1,"d-inline"],["type","text","id","update_time","placeholder","Update Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"card","p-2","mb-3",2,"height","400px"],[2,"height","400px"],["editor",""],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(t,e){1&t&&(ra(0,WU,4,2,"ngb-alert",0),ra(1,GU,4,1,"ngb-alert",1),ua(2,"form",2),ya("ngSubmit",function(){return e.updateAccount()}),ua(3,"div",3),ua(4,"div",4),ua(5,"div",5),ua(6,"label",6),qa(7,"User ID"),ha(),ha(),da(8,"input",7),ha(),ua(9,"div",4),ua(10,"div",5),ua(11,"label",8),qa(12,"Username"),ha(),ha(),da(13,"input",9),ua(14,"div",10),qa(15,"Username is required"),ha(),ha(),ha(),ua(16,"div",3),ua(17,"div",4),ua(18,"div",5),ua(19,"label",11),qa(20,"Display Name"),ha(),ha(),da(21,"input",12),ha(),ua(22,"div",13),ua(23,"div",5),ua(24,"label",14),qa(25,"Avatar URL"),ha(),ha(),da(26,"input",15),ha(),ha(),ua(27,"div",3),ua(28,"div",4),ua(29,"div",5),ua(30,"label",16),qa(31,"Location"),ha(),ha(),da(32,"input",17),ha(),ua(33,"div",13),ua(34,"div",5),ua(35,"label",18),qa(36,"Timezone"),ha(),ha(),da(37,"input",19),ha(),ha(),ua(38,"div",20),ua(39,"div",4),ua(40,"div",5),ua(41,"label",21),qa(42,"Create Time"),ha(),ha(),da(43,"input",22),ha(),ua(44,"div",4),ua(45,"div",5),ua(46,"label",23),qa(47,"Update Time"),ha(),ha(),da(48,"input",24),ha(),ha(),ua(49,"div",25),da(50,"div",26,27),ha(),ra(52,KU,2,1,"button",28),ha()),2&t&&(la("ngIf",e.error),gs(1),la("ngIf",e.updated),gs(1),la("formGroup",e.accountForm),gs(6),la("value",e.account.user.id),gs(5),la("ngClass",qc(9,qU,e.f.username.dirty&&e.f.username.errors)),gs(1),la("hidden",e.f.username.disabled||e.f.username.valid||e.f.username.pristine),gs(29),la("value",e.account.user.create_time),gs(5),la("value",e.account.user.create_time),gs(4),la("ngIf",e.updateAllowed()))},directives:[Ed,Jw,gw,tx,Gb,rx,pw,nx,_d,QC],styles:[""]}),t})();function XU(t,e){if(1&t&&(ua(0,"ngb-alert",34),da(1,"img",35),ua(2,"h6",36),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("An error occurred: ",t.error,"")}}function JU(t,e){1&t&&(ua(0,"ngb-alert",37),da(1,"img",38),ua(2,"h6",36),qa(3,"Account was modified successfully."),ha(),ha()),2&t&&la("dismissible",!1)}function QU(t,e){if(1&t&&(ua(0,"option",39),qa(1),ha()),2&t){const t=e.$implicit,n=e.index;ka("value",n),la("selected",0===n),gs(1),Ya(t.id)}}function ZU(t,e){1&t&&(ua(0,"button",40),qa(1,"Save"),ha()),2&t&&la("disabled",xa().updating)}let tV=(()=>{class t{constructor(t,e,n,i,r){this.route=t,this.router=e,this.consoleService=n,this.authService=i,this.formBuilder=r,this.error="",this.updating=!1,this.updated=!1}ngOnInit(){this.accountForm=this.formBuilder.group({email:[""],password:[""],selected_device_id_index:[""]}),this.route.parent.data.subscribe(t=>{this.account=t[0].account,this.f.email.setValue(this.account.email),this.f.password.setValue(""),this.f.selected_device_id_index.setValue(0),0===this.account.devices.length&&this.f.selected_device_id_index.disable(),this.updateAllowed()||this.accountForm.disable()},t=>{this.error=t})}updateAccount(){this.error="",this.updated=!1,this.updating=!0;const t={email:this.f.email.value};this.f.password.dirty&&(t.password=this.f.password.value),this.consoleService.updateAccount("",this.account.user.id,t).subscribe(t=>{this.updated=!0,this.updating=!1,this.f.password.reset()},t=>{this.error=t,this.updating=!1})}unlinkDeviceId(t){t.target.disabled=!0,this.error="",this.consoleService.unlinkDevice("",this.account.user.id,{device_id:this.account.devices[this.f.selected_device_id_index.value].id}).subscribe(()=>{this.error="",this.account.devices.splice(this.f.selected_device_id_index.value,1),this.f.selected_device_id_index.setValue(0)},t=>{this.error=t})}unlinkCustomID(t){t.target.disabled=!0,this.error="",this.consoleService.unlinkCustom("",this.account.user.id).subscribe(()=>{this.error="",this.account.custom_id=null},t=>{this.error=t})}unlinkFacebook(t){t.target.disabled=!0,this.error="",this.consoleService.unlinkFacebook("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.facebook_id=null},t=>{this.error=t})}unlinkFacebookInstantGames(t){t.target.disabled=!0,this.error="",this.consoleService.unlinkFacebookInstantGame("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.facebook_instant_game_id=null},t=>{this.error=t})}unlinkApple(t){t.target.disabled=!0,this.error="",this.consoleService.unlinkApple("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.apple_id=null},t=>{this.error=t})}unlinkGameCenter(t){t.target.disabled=!0,this.error="",this.consoleService.unlinkGameCenter("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.gamecenter_id=null},t=>{this.error=t})}unlinkGoogle(t){t.target.disabled=!0,this.error="",this.consoleService.unlinkGoogle("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.google_id=null},t=>{this.error=t})}unlinkSteam(t){t.target.disabled=!0,this.error="",this.consoleService.unlinkSteam("",this.account.user.id).subscribe(()=>{this.error="",this.account.user.steam_id=null},t=>{this.error=t})}updateAllowed(){return this.authService.sessionRole<=Zx.USER_ROLE_MAINTAINER}get f(){return this.accountForm.controls}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(mb),oa(Jx),oa(i_),oa(ox))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:99,vars:21,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border",3,"formGroup","ngSubmit"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","selected_device_id_index",1,"d-inline"],[1,"input-group"],["id","selected_device_id_index","formControlName","selected_device_id_index",1,"form-control","custom-select","custom-select-sm"],[3,"value","selected",4,"ngFor","ngForOf"],[1,"input-group-append"],["type","button",1,"btn","btn-sm","btn-outline-danger",3,"disabled","click"],["for","custom_id",1,"d-inline"],["type","text","id","custom_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","facebook_id",1,"d-inline"],["type","text","id","facebook_id","disabled","",1,"form-control","form-control-sm",3,"value"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline","align-self-center"],["for","facebook_instant_game_id",1,"d-inline"],["type","text","id","facebook_instant_game_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","apple_id",1,"d-inline"],["type","text","id","apple_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","gamecenter_id",1,"d-inline"],["type","text","id","gamecenter_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","google_id",1,"d-inline"],["type","text","id","google_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","steam_id",1,"d-inline"],["type","text","id","steam_id","disabled","",1,"form-control","form-control-sm",3,"value"],["for","email",1,"d-inline"],["type","text","id","email","placeholder","Email","formControlName","email",1,"form-control","form-control-sm"],["for","password",1,"d-inline"],["type","text","id","password","placeholder","Password","formControlName","password",1,"form-control","form-control-sm"],[1,"row","remove-sides"],[1,"small"],["type","submit","class","btn btn-primary",3,"disabled",4,"ngIf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],[3,"value","selected"],["type","submit",1,"btn","btn-primary",3,"disabled"]],template:function(t,e){1&t&&(ra(0,XU,4,2,"ngb-alert",0),ra(1,JU,4,1,"ngb-alert",1),ua(2,"form",2),ya("ngSubmit",function(){return e.updateAccount()}),ua(3,"div",3),ua(4,"div",4),ua(5,"div",5),ua(6,"label",6),qa(7,"Device IDs"),ha(),ha(),ua(8,"div",7),ua(9,"select",8),ra(10,QU,2,3,"option",9),ha(),ua(11,"div",10),ua(12,"button",11),ya("click",function(t){return e.unlinkDeviceId(t)}),qa(13,"Unlink"),ha(),ha(),ha(),ha(),ua(14,"div",4),ua(15,"div",5),ua(16,"label",12),qa(17,"Custom ID"),ha(),ha(),ua(18,"div",7),da(19,"input",13),ua(20,"div",10),ua(21,"button",11),ya("click",function(t){return e.unlinkCustomID(t)}),qa(22,"Unlink"),ha(),ha(),ha(),ha(),ha(),ua(23,"div",3),ua(24,"div",4),ua(25,"div",5),ua(26,"label",14),qa(27,"Facebook ID"),ha(),ha(),ua(28,"div",7),da(29,"input",15),ua(30,"div",10),ua(31,"button",11),ya("click",function(t){return e.unlinkFacebook(t)}),qa(32,"Unlink"),ha(),ha(),ha(),ha(),ua(33,"div",16),ua(34,"div",5),ua(35,"label",17),qa(36,"FB Instant Game ID"),ha(),ha(),ua(37,"div",7),da(38,"input",18),ua(39,"div",10),ua(40,"button",11),ya("click",function(t){return e.unlinkFacebookInstantGames(t)}),qa(41,"Unlink"),ha(),ha(),ha(),ha(),ha(),ua(42,"div",3),ua(43,"div",4),ua(44,"div",5),ua(45,"label",19),qa(46,"Apple ID"),ha(),ha(),ua(47,"div",7),da(48,"input",20),ua(49,"div",10),ua(50,"button",11),ya("click",function(t){return e.unlinkApple(t)}),qa(51,"Unlink"),ha(),ha(),ha(),ha(),ua(52,"div",16),ua(53,"div",5),ua(54,"label",21),qa(55,"GameCenter ID"),ha(),ha(),ua(56,"div",7),da(57,"input",22),ua(58,"div",10),ua(59,"button",11),ya("click",function(t){return e.unlinkGameCenter(t)}),qa(60,"Unlink"),ha(),ha(),ha(),ha(),ha(),ua(61,"div",3),ua(62,"div",4),ua(63,"div",5),ua(64,"label",23),qa(65,"Google ID"),ha(),ha(),ua(66,"div",7),da(67,"input",24),ua(68,"div",10),ua(69,"button",11),ya("click",function(t){return e.unlinkGoogle(t)}),qa(70,"Unlink"),ha(),ha(),ha(),ha(),ua(71,"div",4),ua(72,"div",5),ua(73,"label",25),qa(74,"Steam ID"),ha(),ha(),ua(75,"div",7),da(76,"input",26),ua(77,"div",10),ua(78,"button",11),ya("click",function(t){return e.unlinkGoogle(t)}),qa(79,"Unlink"),ha(),ha(),ha(),ha(),ha(),ua(80,"div",3),ua(81,"div",4),ua(82,"div",5),ua(83,"label",27),qa(84,"Email"),ha(),da(85,"br"),ha(),da(86,"input",28),ha(),ua(87,"div",4),ua(88,"div",5),ua(89,"label",29),qa(90,"password"),ha(),ha(),da(91,"input",30),ha(),ha(),ua(92,"div",31),ua(93,"div",4),da(94,"div",5),ua(95,"span",32),qa(96),ha(),ha(),da(97,"div",4),ha(),ra(98,ZU,2,1,"button",33),ha()),2&t&&(la("ngIf",e.error),gs(1),la("ngIf",e.updated),gs(1),la("formGroup",e.accountForm),gs(8),la("ngForOf",e.account.devices),gs(2),la("disabled",!e.updateAllowed()||0===e.account.devices.length),gs(7),la("value",e.account.custom_id),gs(2),la("disabled",!e.updateAllowed()||!e.account.custom_id||""===e.account.custom_id),gs(8),la("value",e.account.user.facebook_id),gs(2),la("disabled",!e.updateAllowed()||!e.account.user.facebook_id||""===e.account.user.facebook_id),gs(7),la("value",e.account.user.facebook_instant_game_id),gs(2),la("disabled",!e.updateAllowed()||!e.account.user.facebook_instant_game_id||""===e.account.user.facebook_instant_game_id),gs(8),la("value",e.account.user.apple_id),gs(2),la("disabled",!e.updateAllowed()||!e.account.user.apple_id||""===e.account.user.apple_id),gs(7),la("value",e.account.user.gamecenter_id),gs(2),la("disabled",!e.updateAllowed()||!e.account.user.gamecenter_id||""===e.account.user.gamecenter_id),gs(8),la("value",e.account.user.google_id),gs(2),la("disabled",!e.updateAllowed()||!e.account.user.google_id||""===e.account.user.google_id),gs(7),la("value",e.account.user.steam_id),gs(2),la("disabled",!e.updateAllowed()||!e.account.user.steam_id||""===e.account.user.steam_id),gs(18),Xa("Verification Status: ",null===e.account.verify_time?"Not Verified":"Verified",""),gs(2),la("ngIf",e.updateAllowed()))},directives:[Ed,Jw,gw,tx,Pw,pw,nx,Sd,Gb,QC,Bw,jw],styles:[""]}),t})();const eV=["editor"];function nV(t,e){if(1&t&&(ua(0,"ngb-alert",15),da(1,"img",16),ua(2,"h6",17),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("An error occurred: ",t.error,"")}}function iV(t,e){1&t&&(ua(0,"ngb-alert",18),da(1,"img",19),ua(2,"h6",17),qa(3,"Account was modified successfully."),ha(),ha()),2&t&&la("dismissible",!1)}function rV(t,e){if(1&t){const t=ga();ua(0,"button",20),ya("click",function(){return pn(t),xa().updateWallet()}),qa(1,"Save"),ha()}2&t&&la("disabled",xa().updating)}function sV(t,e){1&t&&(ua(0,"th",21),qa(1,"Remove"),ha())}function oV(t,e){1&t&&(ua(0,"tr"),ua(1,"td",22),qa(2,"No wallet ledger items found."),ha(),ha())}function aV(t,e){1&t&&da(0,"div",28)}function lV(t,e){1&t&&da(0,"div",29)}function cV(t,e){if(1&t){const t=ga();ua(0,"td"),ua(1,"button",30),ya("click",function(e){pn(t);const n=xa(),i=n.index,r=n.$implicit;return xa().deleteLedgerItem(e,i,r)}),qa(2,"Delete"),ha(),ha()}}function uV(t,e){if(1&t&&(ua(0,"tr"),ua(1,"td",31),ua(2,"pre",32),ua(3,"small"),qa(4),ha(),ha(),ha(),ha()),2&t){const t=xa().$implicit;gs(4),Ya(t.metadata)}}function hV(t,e){if(1&t){const t=ga();ua(0,"tr"),ua(1,"td"),ua(2,"div",23),ya("click",function(){pn(t);const n=e.index,i=xa();return i.walletLedgerMetadataOpen[n]=!i.walletLedgerMetadataOpen[n]}),ra(3,aV,1,0,"div",24),ra(4,lV,1,0,"div",25),ha(),qa(5),ha(),ua(6,"td",26),ua(7,"pre",27),qa(8),ha(),ha(),ua(9,"td"),qa(10),ha(),ra(11,cV,3,0,"td",13),ha(),ra(12,uV,5,1,"tr",13)}if(2&t){const t=e.index,n=e.$implicit,i=xa();gs(3),la("ngIf",!i.walletLedgerMetadataOpen[t]),gs(1),la("ngIf",i.walletLedgerMetadataOpen[t]),gs(1),Xa(" ",n.id," "),gs(3),Ya(n.changeset),gs(2),Ya(n.update_time),gs(1),la("ngIf",i.deleteAllowed()),gs(1),la("ngIf",i.walletLedgerMetadataOpen[t])}}let dV=(()=>{class t{constructor(t,e,n,i){this.route=t,this.router=e,this.consoleService=n,this.authService=i,this.error="",this.walletLedger=[],this.walletLedgerMetadataOpen=[],this.updating=!1,this.updated=!1}ngOnInit(){this.route.data.subscribe(t=>{this.walletLedger.length=0,this.walletLedger.push(...t[0].items),this.walletLedgerMetadataOpen.length=this.walletLedger.length},t=>{this.error=t}),this.route.parent.data.subscribe(t=>{this.account=t[0].account},t=>{this.error=t})}ngAfterViewInit(){JB.config.set("fontSize","14px"),JB.config.set("printMarginColumn",0),JB.config.set("useWorker",!0),JB.config.set("highlightSelectedWord",!0),JB.config.set("fontFamily",'"Courier New", Courier, monospace'),this.aceEditor=JB.edit(this.editor.nativeElement),this.aceEditor.setReadOnly(!this.updateAllowed());const t=JSON.stringify(JSON.parse(this.account.wallet),null,2);this.aceEditor.session.setValue(t)}updateWallet(){this.error="",this.updated=!1,this.updating=!0;let t="";try{t=JSON.stringify(JSON.parse(this.aceEditor.session.getValue()))}catch(e){return this.error=e,void(this.updating=!1)}this.consoleService.updateAccount("",this.account.user.id,{wallet:t}).subscribe(t=>{this.updated=!0,this.updating=!1},t=>{this.error=t,this.updating=!1})}updateAllowed(){return this.authService.sessionRole<=Zx.USER_ROLE_MAINTAINER}deleteAllowed(){return this.authService.sessionRole<=Zx.USER_ROLE_MAINTAINER}deleteLedgerItem(t,e,n){t.target.disabled=!0,t.preventDefault(),this.error="",this.consoleService.deleteWalletLedger("",this.account.user.id,n.id).subscribe(()=>{this.error="",this.walletLedger.splice(e,1),this.walletLedgerMetadataOpen.splice(e,1)},t=>{this.error=t})}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(mb),oa(Jx),oa(i_))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){if(1&t&&fu(eV,!0),2&t){let t;hu(t=vu())&&(e.editor=t.first)}},decls:21,vars:6,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["type","success","class","mb-3",3,"dismissible",4,"ngIf"],[1,"card","p-2","mb-3",2,"height","400px"],[2,"height","400px"],["editor",""],["type","button","class","btn btn-primary",3,"disabled","click",4,"ngIf"],[1,"my-4"],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered"],[1,"thead-light"],[2,"width","315px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],["ngFor","",3,"ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["type","success",1,"mb-3",3,"dismissible"],["src","/static/svg/green-tick.svg","alt","","width","16","height","",1,"mr-2"],["type","button",1,"btn","btn-primary",3,"disabled","click"],[2,"width","90px"],["colSpan","5",1,"text-muted"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],[1,"align-middle"],[1,"m-0","p-0"],[1,"arrow-right"],[1,"arrow-down"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],["colspan","5",1,"align-middle"],[1,"pre-wrap","m-0","p-0"]],template:function(t,e){1&t&&(ra(0,nV,4,2,"ngb-alert",0),ra(1,iV,4,1,"ngb-alert",1),ua(2,"div",2),da(3,"div",3,4),ha(),ra(5,rV,2,1,"button",5),da(6,"hr",6),ua(7,"div",7),ua(8,"table",8),ua(9,"thead",9),ua(10,"tr"),ua(11,"th",10),qa(12,"ID"),ha(),ua(13,"th"),qa(14,"Changeset"),ha(),ua(15,"th",11),qa(16,"Update Time"),ha(),ra(17,sV,2,0,"th",12),ha(),ha(),ua(18,"tbody"),ra(19,oV,3,0,"tr",13),ra(20,hV,13,7,"ng-template",14),ha(),ha(),ha()),2&t&&(la("ngIf",e.error),gs(1),la("ngIf",e.updated),gs(4),la("ngIf",e.updateAllowed()),gs(12),la("ngIf",e.deleteAllowed()),gs(2),la("ngIf",0===e.walletLedger.length),gs(1),la("ngForOf",e.walletLedger))},directives:[Ed,Sd,QC],styles:[".pre-wrap[_ngcontent-%COMP%]{word-wrap:anywhere;word-break:break-all;white-space:pre-wrap}"]}),t})(),fV=(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){const n=t.parent.paramMap.get("id");return this.consoleService.getWalletLedger("",n)}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function pV(t,e){if(1&t&&(ua(0,"ngb-alert",10),da(1,"img",11),ua(2,"h6",12),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("An error occurred: ",t.error,"")}}function gV(t,e){1&t&&(ua(0,"th",13),qa(1,"Remove"),ha())}function mV(t,e){1&t&&(ua(0,"tr"),ua(1,"td",14),qa(2,"No friends found."),ha(),ha())}function vV(t,e){1&t&&(ua(0,"span"),qa(1,"Friend (0)"),ha())}function yV(t,e){1&t&&(ua(0,"span"),qa(1,"Invite Sent (1)"),ha())}function bV(t,e){1&t&&(ua(0,"span"),qa(1,"Invite Received (2)"),ha())}function wV(t,e){1&t&&(ua(0,"span"),qa(1,"Blocked (3)"),ha())}function xV(t,e){if(1&t){const t=ga();ua(0,"td",16),ua(1,"button",17),ya("click",function(e){pn(t);const n=xa(),i=n.index,r=n.$implicit;return xa().deleteFriend(e,i,r)}),qa(2,"Delete"),ha(),ha()}}function _V(t,e){if(1&t&&(ua(0,"tr"),ua(1,"td"),qa(2),ha(),ua(3,"td"),qa(4),ha(),ua(5,"td"),ra(6,vV,2,0,"span",8),ra(7,yV,2,0,"span",8),ra(8,bV,2,0,"span",8),ra(9,wV,2,0,"span",8),ha(),ua(10,"td"),qa(11),ha(),ra(12,xV,3,0,"td",15),ha()),2&t){const t=e.$implicit,n=xa();gs(2),Ya(t.user.id),gs(2),Ya(t.user.username),gs(2),la("ngIf",0===t.state),gs(1),la("ngIf",1===t.state),gs(1),la("ngIf",2===t.state),gs(1),la("ngIf",3===t.state),gs(2),Ya(t.update_time),gs(1),la("ngIf",n.deleteAllowed())}}let CV=(()=>{class t{constructor(t,e,n,i){this.route=t,this.router=e,this.consoleService=n,this.authService=i,this.error="",this.friends=[]}ngOnInit(){this.route.data.subscribe(t=>{this.friends.length=0,this.friends.push(...t[0].friends)},t=>{this.error=t}),this.route.parent.data.subscribe(t=>{this.account=t[0].account},t=>{this.error=t})}deleteAllowed(){return this.authService.sessionRole<=Zx.USER_ROLE_MAINTAINER}deleteFriend(t,e,n){t.target.disabled=!0,t.preventDefault(),this.error="",this.consoleService.deleteFriend("",this.account.user.id,n.user.id).subscribe(()=>{this.error="",this.friends.splice(e,1)},t=>{this.error=t})}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(mb),oa(Jx),oa(i_))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:17,vars:4,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-hover","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","300px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],["class","text-center",4,"ngIf"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(t,e){1&t&&(ra(0,pV,4,2,"ngb-alert",0),ua(1,"div",1),ua(2,"table",2),ua(3,"thead",3),ua(4,"tr"),ua(5,"th",4),qa(6,"User ID"),ha(),ua(7,"th"),qa(8,"Username"),ha(),ua(9,"th",5),qa(10,"State"),ha(),ua(11,"th",6),qa(12,"Update Time"),ha(),ra(13,gV,2,0,"th",7),ha(),ha(),ua(14,"tbody"),ra(15,mV,3,0,"tr",8),ra(16,_V,13,8,"tr",9),ha(),ha(),ha()),2&t&&(la("ngIf",e.error),gs(13),la("ngIf",e.deleteAllowed()),gs(2),la("ngIf",0===e.friends.length),gs(1),la("ngForOf",e.friends))},directives:[Ed,Sd,QC],styles:[".table-hover[_ngcontent-%COMP%]{cursor:pointer}"]}),t})(),SV=(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){const n=t.parent.paramMap.get("id");return this.consoleService.getFriends("",n)}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function kV(t,e){if(1&t&&(ua(0,"ngb-alert",10),da(1,"img",11),ua(2,"h6",12),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("An error occurred: ",t.error,"")}}function EV(t,e){1&t&&(ua(0,"th",13),qa(1,"Remove"),ha())}function AV(t,e){1&t&&(ua(0,"tr"),ua(1,"td",14),qa(2,"No group membership found."),ha(),ha())}function DV(t,e){1&t&&(ua(0,"span"),qa(1,"Superadmin (0)"),ha())}function TV(t,e){1&t&&(ua(0,"span"),qa(1,"Admin (1)"),ha())}function RV(t,e){1&t&&(ua(0,"span"),qa(1,"Member (2)"),ha())}function FV(t,e){1&t&&(ua(0,"span"),qa(1,"Join Request (3)"),ha())}function MV(t,e){1&t&&(ua(0,"span"),qa(1,"Banned (4)"),ha())}function LV(t,e){if(1&t){const t=ga();ua(0,"td"),ua(1,"button",15),ya("click",function(e){pn(t);const n=xa(),i=n.index,r=n.$implicit;return xa().deleteGroupUser(e,i,r)}),qa(2,"Delete"),ha(),ha()}}function $V(t,e){if(1&t&&(ua(0,"tr"),ua(1,"td"),qa(2),ha(),ua(3,"td"),qa(4),ha(),ua(5,"td"),ra(6,DV,2,0,"span",8),ra(7,TV,2,0,"span",8),ra(8,RV,2,0,"span",8),ra(9,FV,2,0,"span",8),ra(10,MV,2,0,"span",8),ha(),ua(11,"td"),qa(12),ha(),ra(13,LV,3,0,"td",8),ha()),2&t){const t=e.$implicit,n=xa();gs(2),Ya(t.group.id),gs(2),Ya(t.group.name),gs(2),la("ngIf",0===t.state),gs(1),la("ngIf",1===t.state),gs(1),la("ngIf",2===t.state),gs(1),la("ngIf",3===t.state),gs(1),la("ngIf",4===t.state),gs(2),Ya(t.group.update_time),gs(1),la("ngIf",n.deleteAllowed())}}let OV=(()=>{class t{constructor(t,e,n,i){this.route=t,this.router=e,this.consoleService=n,this.authService=i,this.error="",this.groups=[]}ngOnInit(){this.route.data.subscribe(t=>{this.groups.length=0,this.groups.push(...t[0].user_groups)},t=>{this.error=t}),this.route.parent.data.subscribe(t=>{this.account=t[0].account},t=>{this.error=t})}deleteAllowed(){return this.authService.sessionRole<=Zx.USER_ROLE_MAINTAINER}deleteGroupUser(t,e,n){t.target.disabled=!0,t.preventDefault(),this.error="",this.consoleService.deleteGroupUser("",this.account.user.id,n.group.id).subscribe(()=>{this.error="",this.groups.splice(e,1)},t=>{this.error=t})}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(mb),oa(Jx),oa(i_))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:17,vars:4,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered"],[1,"thead-light"],[2,"width","320px"],[2,"width","300px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","5",1,"text-muted"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"]],template:function(t,e){1&t&&(ra(0,kV,4,2,"ngb-alert",0),ua(1,"div",1),ua(2,"table",2),ua(3,"thead",3),ua(4,"tr"),ua(5,"th",4),qa(6,"Group ID"),ha(),ua(7,"th"),qa(8,"Name"),ha(),ua(9,"th",5),qa(10,"State"),ha(),ua(11,"th",6),qa(12,"Update Time"),ha(),ra(13,EV,2,0,"th",7),ha(),ha(),ua(14,"tbody"),ra(15,AV,3,0,"tr",8),ra(16,$V,14,9,"tr",9),ha(),ha(),ha()),2&t&&(la("ngIf",e.error),gs(13),la("ngIf",e.deleteAllowed()),gs(2),la("ngIf",0===e.groups.length),gs(1),la("ngForOf",e.groups))},directives:[Ed,Sd,QC],styles:[""]}),t})(),IV=(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){const n=t.parent.paramMap.get("id");return this.consoleService.getGroups("",n)}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function NV(t,e){if(1&t&&(ua(0,"ngb-alert",12),da(1,"img",13),ua(2,"h6",14),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("An error occurred: ",t.error,"")}}function PV(t,e){1&t&&(ua(0,"tr"),ua(1,"td",15),qa(2,"No realtime matches were found."),ha(),ha())}function BV(t,e){1&t&&da(0,"div",23)}function UV(t,e){1&t&&da(0,"div",24)}function VV(t,e){if(1&t){const t=ga();ua(0,"div",20),ya("click",function(){pn(t);const e=xa(),n=e.index,i=e.$implicit,r=xa();return r.getMatchState(n,i),r.matchStatesOpen[n]=!r.matchStatesOpen[n]}),ra(1,BV,1,0,"div",21),ra(2,UV,1,0,"div",22),ha()}if(2&t){const t=xa().index,e=xa();gs(1),la("ngIf",!e.matchStatesOpen[t]),gs(1),la("ngIf",e.matchStatesOpen[t])}}function HV(t,e){1&t&&da(0,"div",25)}function jV(t,e){1&t&&(ua(0,"span"),qa(1,"Yes"),ha())}function zV(t,e){1&t&&(ua(0,"span"),qa(1,"No"),ha())}function WV(t,e){1&t&&da(0,"img",34)}function GV(t,e){if(1&t&&(ua(0,"div"),ua(1,"small"),ua(2,"b"),qa(3,"Current Tick"),ha(),ha(),ua(4,"pre",30),ua(5,"small"),qa(6),ha(),ha(),ua(7,"small"),ua(8,"b"),qa(9,"Match State"),ha(),ha(),ua(10,"pre",30),ua(11,"small"),qa(12),ha(),ha(),ha()),2&t){const t=xa(2).index,e=xa();gs(6),Ya(e.matchStates[t].tick),gs(6),Ya(e.matchStates[t].state)}}function KV(t,e){1&t&&da(0,"img",34)}function qV(t,e){if(1&t&&(ua(0,"pre",30),ua(1,"small"),qa(2),ha(),ha()),2&t){const t=xa(2).index,e=xa();gs(2),Ya(e.getMatchPresencesString(e.matchStates[t].presences))}}function YV(t,e){if(1&t&&(ua(0,"tr",26),ua(1,"td",27),ua(2,"div",28),ua(3,"div",29),ua(4,"small"),ua(5,"b"),qa(6,"Match Label"),ha(),ha(),ua(7,"pre",30),ua(8,"small"),qa(9),ha(),ha(),ha(),ua(10,"div",31),ra(11,WV,1,0,"img",32),ra(12,GV,13,2,"div",10),ha(),ua(13,"div",31),ua(14,"small"),ua(15,"b"),qa(16,"Match Presences"),ha(),ha(),ra(17,KV,1,0,"img",32),ra(18,qV,3,1,"pre",33),ha(),ha(),ha(),ha()),2&t){const t=xa(),e=t.$implicit,n=t.index,i=xa();gs(9),Ya(e.label),gs(2),la("ngIf",!i.matchStates[n]||null===i.matchStates[n]),gs(1),la("ngIf",null!==i.matchStates[n]),gs(5),la("ngIf",!i.matchStates[n]||null===i.matchStates[n]),gs(1),la("ngIf",null!==i.matchStates[n])}}function XV(t,e){if(1&t&&(ua(0,"tr"),ua(1,"td"),ra(2,VV,3,2,"div",16),ra(3,HV,1,0,"div",17),qa(4),ha(),ua(5,"td"),qa(6),ha(),ua(7,"td",18),ra(8,jV,2,0,"span",10),ra(9,zV,2,0,"span",10),ha(),ua(10,"td"),qa(11),ha(),ua(12,"td"),qa(13),ha(),ha(),ra(14,YV,19,5,"tr",19)),2&t){const t=e.index,n=e.$implicit,i=xa();gs(2),la("ngIf",n.authoritative),gs(1),la("ngIf",!n.authoritative),gs(1),Xa(" ",n.match_id," "),gs(2),Ya(n.size),gs(2),la("ngIf",n.authoritative),gs(1),la("ngIf",!n.authoritative),gs(2),Ya(n.handler_name),gs(2),Ya(n.authoritative?n.tick_rate:"-"),gs(1),la("ngIf",i.matchStatesOpen[t])}}let JV=(()=>{class t{constructor(t,e){this.route=t,this.consoleService=e,this.error="",this.matches=[],this.matchStates=[],this.matchStatesOpen=[],this.updated=!1}ngOnInit(){this.route.data.subscribe(t=>{this.matches.length=0,this.matches.push(...t[0].matches),this.matchStates.length=this.matches.length,this.matchStatesOpen.length=this.matches.length},t=>{this.error=t})}getMatchState(t,e){this.matchStatesOpen[t]||(this.matchStates[t]=null,this.error="",this.consoleService.getMatchState("",e.match_id).subscribe(e=>{this.matchStatesOpen[t]=!0,this.matchStates[t]=e},e=>{this.matchStatesOpen[t]=!1,this.matchStates[t]=null,this.error=e}))}getMatchPresencesString(t){return JSON.stringify(t)}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(Jx))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:23,vars:6,consts:[[1,"pb-1"],[1,"pb-4"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered"],[1,"thead-light"],[2,"width","140px"],[2,"width","100px"],[2,"width","130px"],[2,"width","90px"],[4,"ngIf"],["ngFor","",3,"ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],["colSpan","7",1,"text-muted"],["class","arrow",3,"click",4,"ngIf"],["class","d-inline-block mr-3",4,"ngIf"],[1,"text-center"],["class","open-row",4,"ngIf"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"d-inline-block","mr-3"],[1,"open-row"],["colspan","5",1,"align-middle"],[1,"d-flex","p-0"],[1,"p-3","w-33","border"],[1,"pre-wrap","m-0","p-0"],[1,"p-3","w-33","border","border-left-0"],["src","/static/spinner.svg","class","d-block","width","16",4,"ngIf"],["class","pre-wrap m-0 p-0",4,"ngIf"],["src","/static/spinner.svg","width","16",1,"d-block"]],template:function(t,e){1&t&&(ua(0,"h2",0),qa(1,"Active Matches"),ha(),ua(2,"h6",1),qa(3),ha(),ra(4,NV,4,2,"ngb-alert",2),ua(5,"div",3),ua(6,"table",4),ua(7,"thead",5),ua(8,"tr"),ua(9,"th"),ua(10,"span"),qa(11,"Match ID"),ha(),ha(),ua(12,"th",6),qa(13,"Presence Count"),ha(),ua(14,"th",7),qa(15,"Authoritative"),ha(),ua(16,"th",8),qa(17,"Handler Name"),ha(),ua(18,"th",9),qa(19,"Tick Rate"),ha(),ha(),ha(),ua(20,"tbody"),ra(21,PV,3,0,"tr",10),ra(22,XV,15,9,"ng-template",11),ha(),ha(),ha()),2&t&&(gs(3),Xa("",e.matches.length," running matches found."),gs(1),la("ngIf",e.error),gs(6),Oa("pl-3",e.matches.length>0),gs(11),la("ngIf",0===e.matches.length),gs(1),la("ngForOf",e.matches))},directives:[Ed,Sd,QC],styles:[".pre-wrap[_ngcontent-%COMP%]{word-wrap:anywhere;word-break:break-all;white-space:pre-wrap}.open-row[_ngcontent-%COMP%]{background:#fafafc}.w-33[_ngcontent-%COMP%]{width:33.3333%!important}"]}),t})(),QV=(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){return this.consoleService.listMatches("",null,null,null,null,null,null)}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function ZV(t,e){if(1&t){const t=ga();ua(0,"button",12),ya("click",function(e){return pn(t),xa().deleteLeaderboard(e)}),da(1,"img",13),qa(2,"Delete Leaderboard"),ha()}}function tH(t,e){if(1&t&&(ua(0,"ngb-alert",14),da(1,"img",15),ua(2,"h6",16),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("An error occurred: ",t.error,"")}}const eH=function(t,e){return["/leaderboards",t,e]};function nH(t,e){if(1&t&&(ua(0,"div"),fa(1,17),ua(2,"a",18),qa(3),ha(),pa(),ha()),2&t){const t=e.$implicit,n=xa();gs(1),la("ngbNavItem",t.path),gs(1),la("routerLink",Yc(3,eH,n.leaderboard.id,t.path)),gs(1),Ya(t.label)}}const iH=function(){return["/leaderboards"]};let rH=(()=>{class t{constructor(t,e,n,i){this.route=t,this.router=e,this.consoleService=n,this.authService=i,this.error="",this.views=[{label:"Details",path:"details"},{label:"Records",path:"records"}]}ngOnInit(){this.route.data.subscribe(t=>{this.leaderboard=t[0]},t=>{this.error=t})}deleteLeaderboard(t){t.target.disabled=!0,this.error="",this.consoleService.deleteLeaderboard("",this.leaderboard.id).subscribe(()=>{this.error="",this.router.navigate(["/leaderboards"])},t=>{this.error=t})}deleteAllowed(){return this.authService.sessionRole<=Zx.USER_ROLE_DEVELOPER}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(mb),oa(Jx),oa(i_))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:17,vars:6,consts:[[1,"pb-1"],[1,"leaderboard-top-nav","d-flex","justify-content-between","align-items-baseline","mb-3"],["aria-label","breadcrumb"],[1,"breadcrumb"],[1,"breadcrumb-item"],[3,"routerLink"],[1,"breadcrumb-item","active"],["type","button","class","btn btn-danger btn-danger-icon",3,"click",4,"ngIf"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],["ngbNav","",1,"navbar-expand-sm","p-0","mb-3"],["leaderboardNav","ngbNav"],[4,"ngFor","ngForOf"],["type","button",1,"btn","btn-danger","btn-danger-icon",3,"click"],["src","/static/svg/bin-red.svg","alt","","width","13","height","13",1,"mr-2"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"ngbNavItem"],["ngbNavLink","","routerLinkActive","account-link-active",3,"routerLink"]],template:function(t,e){1&t&&(ua(0,"h2",0),qa(1,"Leaderboard"),ha(),ua(2,"div",1),ua(3,"nav",2),ua(4,"ol",3),ua(5,"li",4),ua(6,"a",5),qa(7,"Leaderboards"),ha(),ha(),ua(8,"li",6),qa(9),ha(),ha(),ha(),ua(10,"div"),ra(11,ZV,3,0,"button",7),ha(),ha(),ra(12,tH,4,2,"ngb-alert",8),ua(13,"nav",9,10),ra(15,nH,4,6,"div",11),ha(),da(16,"router-outlet")),2&t&&(gs(6),la("routerLink",Kc(5,iH)),gs(3),Ya(e.leaderboard.id),gs(2),la("ngIf",e.deleteAllowed()),gs(1),la("ngIf",e.error),gs(3),la("ngForOf",e.views))},directives:[yb,Ed,Dk,Sd,xb,QC,Ak,Tk,wb],styles:[".nav-link[_ngcontent-%COMP%]{font-size:12px;font-family:Montserrat,sans-serif;text-transform:uppercase;letter-spacing:.1em;color:#000;opacity:.5;padding:0 0 1.6em;margin-right:3em;margin-bottom:-2px;font-weight:600}.nav-link[_ngcontent-%COMP%]:hover{opacity:1}.nav-link.account-link-active[_ngcontent-%COMP%]{opacity:1;border-bottom:2px solid #7668ed}.leaderboard-top-nav[_ngcontent-%COMP%], .navbar-expand-sm[_ngcontent-%COMP%]{border-bottom:1px solid #dadae9}.leaderboard-top-nav[_ngcontent-%COMP%]{padding-bottom:1.5em}"]}),t})(),sH=(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){const n=t.paramMap.get("id");return this.consoleService.getLeaderboard("",n)}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const oH=["editor"];function aH(t,e){if(1&t&&(ua(0,"ngb-alert",22),da(1,"img",23),ua(2,"h6",24),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("An error occurred: ",t.error,"")}}function lH(t,e){if(1&t&&(ua(0,"div",25),ua(1,"h6"),qa(2,"Tournaments"),ha(),da(3,"hr",26),ua(4,"div",2),ua(5,"div",3),ua(6,"div",4),ua(7,"label",27),qa(8,"Title"),ha(),ha(),da(9,"input",28),ha(),ua(10,"div",3),ua(11,"div",4),ua(12,"label",29),qa(13,"Description"),ha(),ha(),da(14,"input",30),ha(),ha(),ua(15,"div",2),ua(16,"div",3),ua(17,"div",4),ua(18,"label",31),qa(19,"Category"),ha(),ha(),da(20,"input",32),ha(),ua(21,"div",3),ua(22,"div",4),ua(23,"label",33),qa(24,"Max Num Score"),ha(),ha(),da(25,"input",34),ha(),ha(),ua(26,"div",2),ua(27,"div",3),ua(28,"div",4),ua(29,"label",35),qa(30,"Size"),ha(),ha(),da(31,"input",36),ha(),ua(32,"div",3),ua(33,"div",4),ua(34,"label",37),qa(35,"Max Size"),ha(),ha(),da(36,"input",38),ha(),ha(),ua(37,"div",2),ua(38,"div",3),ua(39,"div",4),ua(40,"label",39),qa(41,"Duration"),ha(),ha(),da(42,"input",40),ha(),ua(43,"div",3),ua(44,"div",4),ua(45,"label",41),qa(46,"Join Required"),ha(),ha(),da(47,"input",42),ha(),ha(),ua(48,"div",2),ua(49,"div",3),ua(50,"div",4),ua(51,"label",43),qa(52,"Start Time"),ha(),ha(),da(53,"input",44),ha(),ua(54,"div",3),ua(55,"div",4),ua(56,"label",45),qa(57,"End Time"),ha(),ha(),da(58,"input",46),ha(),ha(),ua(59,"div",2),ua(60,"div",3),ua(61,"div",4),ua(62,"label",47),qa(63,"Start Active"),ha(),ha(),da(64,"input",48),ha(),ua(65,"div",3),ua(66,"div",4),ua(67,"label",49),qa(68,"End Active"),ha(),ha(),da(69,"input",50),ha(),ha(),ha()),2&t){const t=xa();gs(9),la("value",t.leaderboard.title),gs(5),la("value",t.leaderboard.description),gs(6),la("value",t.leaderboard.category),gs(5),la("value",t.leaderboard.max_num_score),gs(6),la("value",t.leaderboard.size),gs(5),la("value",t.leaderboard.max_size),gs(6),la("value",t.leaderboard.duration),gs(5),la("value",t.leaderboard.join_required),gs(6),la("value",t.leaderboard.start_time),gs(5),la("value",t.leaderboard.end_time),gs(6),la("value",t.leaderboard.start_active),gs(5),la("value",t.leaderboard.end_active)}}let cH=(()=>{class t{constructor(t){this.route=t,this.orderString={0:"Ascending",1:"Descending"},this.operatorString={0:"Best",1:"Set",2:"Increment",3:"Decrement"},this.error=""}ngOnInit(){this.route.parent.data.subscribe(t=>{this.leaderboard=t[0]},t=>{this.error=t})}ngAfterViewInit(){if(JB.config.set("fontSize","14px"),JB.config.set("printMarginColumn",0),JB.config.set("useWorker",!0),JB.config.set("highlightSelectedWord",!0),JB.config.set("fontFamily",'"Courier New", Courier, monospace'),this.aceEditor=JB.edit(this.editor.nativeElement),this.aceEditor.setReadOnly(!0),this.leaderboard.metadata){const t=JSON.stringify(JSON.parse(this.leaderboard.metadata),null,2);this.aceEditor.session.setValue(t)}}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){if(1&t&&fu(oH,!0),2&t){let t;hu(t=vu())&&(e.editor=t.first)}},decls:39,vars:8,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"add-border","mb-3"],[1,"row"],[1,"col-md-6","d-flex","justify-content-start","align-items-baseline"],[1,"col-3","pl-0"],["for","id",1,"d-inline"],["type","text","id","id","placeholder","ID","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","authoritative",1,"d-inline"],["type","text","id","authoritative","placeholder","Authoritative","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","sortorder",1,"d-inline"],["type","text","id","sortorder","placeholder","Sort Order","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","operator",1,"d-inline"],["type","text","id","operator","placeholder","Operator","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],[1,"row","add-border-single-row-bottom"],["for","reset",1,"d-inline"],["type","text","id","reset","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","create_time",1,"d-inline"],["type","text","id","create_time","placeholder","Create Time","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["class","mt-4",4,"ngIf"],[1,"card","p-2","mb-3",2,"height","400px"],[2,"height","400px"],["editor",""],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[1,"mt-4"],[1,"mb-4"],["for","title",1,"d-inline"],["type","text","id","title","placeholder","Title","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","description",1,"d-inline"],["type","text","id","description","placeholder","Description","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","category",1,"d-inline"],["type","text","id","category","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","max_num_score",1,"d-inline"],["type","text","id","max_num_score","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","size",1,"d-inline"],["type","text","id","size","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","max_size",1,"d-inline"],["type","text","id","max_size","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","duration",1,"d-inline"],["type","text","id","duration","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","join_required",1,"d-inline"],["type","text","id","join_required","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","start_time",1,"d-inline"],["type","text","id","start_time","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","end_time",1,"d-inline"],["type","text","id","end_time","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","start_active",1,"d-inline"],["type","text","id","start_active","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"],["for","end_active",1,"d-inline"],["type","text","id","end_active","placeholder","Not Set","disabled","","readonly","",1,"form-control-plaintext","form-control-sm","my-2",3,"value"]],template:function(t,e){1&t&&(ra(0,aH,4,2,"ngb-alert",0),ua(1,"div",1),ua(2,"div",2),ua(3,"div",3),ua(4,"div",4),ua(5,"label",5),qa(6,"User ID"),ha(),ha(),da(7,"input",6),ha(),ua(8,"div",3),ua(9,"div",4),ua(10,"label",7),qa(11,"Authoritative"),ha(),ha(),da(12,"input",8),ha(),ha(),ua(13,"div",2),ua(14,"div",3),ua(15,"div",4),ua(16,"label",9),qa(17,"Sort Order"),ha(),ha(),da(18,"input",10),ha(),ua(19,"div",3),ua(20,"div",4),ua(21,"label",11),qa(22,"Operator"),ha(),ha(),da(23,"input",12),ha(),ha(),ua(24,"div",13),ua(25,"div",3),ua(26,"div",4),ua(27,"label",14),qa(28,"Reset Schedule"),ha(),ha(),da(29,"input",15),ha(),ua(30,"div",3),ua(31,"div",4),ua(32,"label",16),qa(33,"Create Time"),ha(),ha(),da(34,"input",17),ha(),ha(),ha(),ra(35,lH,70,12,"div",18),ua(36,"div",19),da(37,"div",20,21),ha()),2&t&&(la("ngIf",e.error),gs(7),la("value",e.leaderboard.id),gs(5),la("value",e.leaderboard.authoritative),gs(6),la("value",e.orderString[e.leaderboard.sort_order]),gs(5),la("value",e.operatorString[e.leaderboard.operator]),gs(6),la("value",e.leaderboard.reset_schedule),gs(5),la("value",e.leaderboard.create_time),gs(1),la("ngIf",e.leaderboard.tournament))},directives:[Ed,QC],styles:[".leaderboard-top-nav[_ngcontent-%COMP%]{border-bottom:1px solid #dadae9;padding-bottom:1.5em}"]}),t})();function uH(t,e){if(1&t&&(ua(0,"ngb-alert",19),da(1,"img",20),ua(2,"h6",21),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("An error occurred: ",t.error,"")}}function hH(t,e){1&t&&(ua(0,"th",22),qa(1,"Remove"),ha())}function dH(t,e){1&t&&(ua(0,"tr"),ua(1,"td",23),qa(2,"No records found."),ha(),ha())}function fH(t,e){1&t&&da(0,"div",28)}function pH(t,e){1&t&&da(0,"div",29)}function gH(t,e){if(1&t){const t=ga();ua(0,"td",30),ua(1,"button",31),ya("click",function(e){pn(t);const n=xa(),i=n.index,r=n.$implicit;return xa().deleteRecord(e,i,r)}),qa(2,"Delete"),ha(),ha()}}function mH(t,e){if(1&t&&(ua(0,"tr"),ua(1,"td",32),ua(2,"pre",33),ua(3,"small"),qa(4),ha(),ha(),ha(),ha()),2&t){const t=xa().$implicit;gs(4),Ya(t.metadata)}}function vH(t,e){if(1&t){const t=ga();ua(0,"tr"),ua(1,"td"),ua(2,"div",24),ya("click",function(){pn(t);const n=e.index,i=xa();return i.recordsMetadataOpen[n]=!i.recordsMetadataOpen[n]}),ra(3,fH,1,0,"div",25),ra(4,pH,1,0,"div",26),ha(),qa(5),ha(),ua(6,"td"),qa(7),ha(),ua(8,"td"),qa(9),ha(),ua(10,"td"),qa(11),ha(),ua(12,"td"),qa(13),ha(),ua(14,"td"),qa(15),ha(),ua(16,"td"),qa(17),ha(),ra(18,gH,3,0,"td",27),ha(),ra(19,mH,5,1,"tr",17)}if(2&t){const t=e.index,n=e.$implicit,i=xa();gs(3),la("ngIf",!i.recordsMetadataOpen[t]),gs(1),la("ngIf",i.recordsMetadataOpen[t]),gs(1),Xa(" ",n.owner_id," "),gs(2),Ya(n.username),gs(2),Ya(n.score),gs(2),Ya(n.subscore),gs(2),Ya(n.rank),gs(2),Ya(n.num_score),gs(2),Ya(n.expiry_time?n.expiry_time:"-"),gs(1),la("ngIf",i.deleteAllowed()),gs(1),la("ngIf",i.recordsMetadataOpen[t])}}let yH=(()=>{class t{constructor(t,e,n){this.route=t,this.consoleService=e,this.authService=n,this.error="",this.records=[],this.recordsMetadataOpen=[],this.nextCursor="",this.prevCursor=""}ngOnInit(){this.route.data.subscribe(t=>{this.records.length=0,this.records.push(...t[0].records),this.nextCursor=t[0].next_cursor,this.prevCursor=t[0].prev_cursor,this.recordsMetadataOpen.length=this.records.length},t=>{this.error=t}),this.route.parent.data.subscribe(t=>{this.leaderboard=t[0]},t=>{this.error=t})}loadRecords(t){let e="";switch(t){case-1:e=this.prevCursor;break;case 0:e="";break;case 1:e=this.nextCursor}this.consoleService.listLeaderboardRecords("",this.leaderboard.id,null,100,e,null).subscribe(t=>{this.error="",this.nextCursor=t.next_cursor,this.prevCursor=t.prev_cursor,this.records.length=0,this.records.push(...t.records),this.recordsMetadataOpen.length=0,this.recordsMetadataOpen.length=this.records.length},t=>{this.error=t})}deleteRecord(t,e,n){t.target.disabled=!0,t.preventDefault(),this.error="",this.consoleService.deleteLeaderboardRecord("",n.leaderboard_id,n.owner_id).subscribe(()=>{this.error="",this.records.splice(e,1),this.recordsMetadataOpen.splice(e,1)},t=>{this.error=t})}deleteAllowed(){return this.authService.sessionRole<=Zx.USER_ROLE_DEVELOPER}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(Jx),oa(i_))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],decls:34,vars:7,consts:[["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[1,"col-md-3","justify-content-end","text-right"],["role","group",1,"btn-group","page-btns"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["src","/static/svg/page-first.svg","alt","","width","20","height",""],["src","/static/svg/page-prev.svg","alt","","width","20","height",""],["src","/static/svg/page-next.svg","alt","","width","20","height",""],[1,"row","no-gutters"],[1,"table","table-sm","table-bordered"],[1,"thead-light"],[2,"width","380px"],[2,"width","150px"],[2,"width","180px"],["style","width: 90px",4,"ngIf"],[4,"ngIf"],["ngFor","",3,"ngForOf"],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[2,"width","90px"],["colSpan","8",1,"text-muted"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],["class","text-center",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"text-center"],["type","button",1,"btn","btn-sm","btn-danger",3,"click"],["colspan","7",1,"align-middle"],[1,"pre-wrap","m-0","p-0"]],template:function(t,e){1&t&&(ra(0,uH,4,2,"ngb-alert",0),ua(1,"div",1),ua(2,"div",2),da(3,"div",3),ua(4,"div",4),ua(5,"div",5),ua(6,"button",6),ya("click",function(){return e.loadRecords(0)}),da(7,"img",7),ha(),ua(8,"button",6),ya("click",function(){return e.loadRecords(-1)}),da(9,"img",8),ha(),ua(10,"button",6),ya("click",function(){return e.loadRecords(1)}),da(11,"img",9),ha(),ha(),ha(),ha(),ha(),ua(12,"div",10),ua(13,"table",11),ua(14,"thead",12),ua(15,"tr"),ua(16,"th",13),qa(17,"Owner ID"),ha(),ua(18,"th"),qa(19,"Username"),ha(),ua(20,"th",14),qa(21,"Score"),ha(),ua(22,"th",14),qa(23,"Subscore"),ha(),ua(24,"th",14),qa(25,"Rank"),ha(),ua(26,"th",14),qa(27,"No. of scores"),ha(),ua(28,"th",15),qa(29,"Expiry Time"),ha(),ra(30,hH,2,0,"th",16),ha(),ha(),ua(31,"tbody"),ra(32,dH,3,0,"tr",17),ra(33,vH,20,11,"ng-template",18),ha(),ha(),ha()),2&t&&(la("ngIf",e.error),gs(6),la("disabled",0===e.records.length),gs(2),la("disabled",""===e.prevCursor),gs(2),la("disabled",""===e.nextCursor),gs(20),la("ngIf",e.deleteAllowed()),gs(2),la("ngIf",0===e.records.length),gs(1),la("ngForOf",e.records))},directives:[Ed,Sd,QC],styles:[""]}),t})(),bH=(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){const n=t.parent.paramMap.get("id");return this.consoleService.listLeaderboardRecords("",n,null,100,null,null)}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();const wH=["editor"],xH=["editorResponse"];function _H(t,e){if(1&t&&(ua(0,"ngb-alert",23),da(1,"img",24),ua(2,"h6",25),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("Error whilst making RPC call: ",t.error,"")}}function CH(t,e){if(1&t&&(ua(0,"option",26),qa(1),ha()),2&t){const t=e.$implicit;ka("value",t.method),gs(1),Ya(t.method)}}function SH(t,e){if(1&t&&(ua(0,"option",26),qa(1),ha()),2&t){const t=e.$implicit;ka("value",t.method),gs(1),Ya(t.method)}}let kH=(()=>{class t{constructor(t,e,n,i){this.route=t,this.router=e,this.consoleService=n,this.formBuilder=i,this.error="",this.rpcEndpoints=[],this.endpoints=[]}ngOnInit(){this.endpointCallForm=this.formBuilder.group({method:["",Qb.required],user_id:[""]}),this.f.method.valueChanges.subscribe(t=>{const e=this.endpoints.concat(this.rpcEndpoints).find(e=>e.method===t?e:null);this.updateQueryParam(e.method),this.setupRequestBody(e.body_template)}),this.route.data.subscribe(t=>{const e=t[0];this.endpoints.length=0,this.endpoints.push(...e.endpoints),this.rpcEndpoints.length=0,this.rpcEndpoints.push(...e.rpc_endpoints)},t=>{this.error=t});const t=this.endpoints.concat(this.rpcEndpoints).find(t=>t.method===this.route.snapshot.queryParamMap.get("endpoint")?t:null);null!=t&&this.f.method.setValue(t.method)}ngAfterViewInit(){JB.config.set("fontSize","14px"),JB.config.set("printMarginColumn",0),JB.config.set("useWorker",!0),JB.config.set("highlightSelectedWord",!0),JB.config.set("fontFamily",'"Courier New", Courier, monospace'),this.aceEditor=JB.edit(this.editor.nativeElement),this.aceEditor.setReadOnly(!0),this.aceEditorResponse=JB.edit(this.editorResponse.nativeElement),this.aceEditorResponse.setReadOnly(!0)}sendRequest(){this.error="";let t=this.aceEditor.session.getValue();if(""!==t)try{t=JSON.stringify(JSON.parse(t))}catch(i){return void(this.error=i)}const e={user_id:this.f.user_id.value,body:t};let n=null;n=this.isRpcEndpoint(this.f.method.value)?this.consoleService.callRpcEndpoint("",this.f.method.value,e):this.consoleService.callApiEndpoint("",this.f.method.value,e),n.subscribe(e=>{if(e.error_message&&""!==e.error_message)this.aceEditorResponse.session.setValue(e.error_message);else{t="";try{t=JSON.stringify(JSON.parse(e.body),null,2)}catch(i){return void(this.error=i)}this.aceEditorResponse.session.setValue(t)}},t=>{this.aceEditorResponse.session.setValue(""),this.error=t})}isRpcEndpoint(t){return null!=this.rpcEndpoints.find(e=>e.method===t?e:null)}setupRequestBody(t){if(null!=this.aceEditor){if(!t||""===t)return this.aceEditor.session.setValue(""),void this.aceEditor.setReadOnly(!this.isRpcEndpoint(this.f.method.value));try{const e=JSON.stringify(JSON.parse(t),null,2);this.aceEditor.session.setValue(e),this.aceEditor.setReadOnly(!1)}catch(e){return void(this.error=e)}}else console.log("problem?")}updateQueryParam(t){this.router.navigate([],{relativeTo:this.route,queryParams:{endpoint:t},queryParamsHandling:"merge"})}get f(){return this.endpointCallForm.controls}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(mb),oa(Jx),oa(ox))},t.\u0275cmp=pe({type:t,selectors:[["ng-component"]],viewQuery:function(t,e){if(1&t&&(fu(wH,!0),fu(xH,!0)),2&t){let t;hu(t=vu())&&(e.editor=t.first),hu(t=vu())&&(e.editorResponse=t.first)}},decls:35,vars:6,consts:[[1,"pb-4"],["type","danger","class","mb-3",3,"dismissible",4,"ngIf"],[1,"row","no-gutters","mb-3"],[1,"col","d-flex","justify-content-between","no-gutters"],[1,"col-md-9"],[3,"formGroup","ngSubmit"],[1,"input-group"],[1,"input-group-prepend"],["id","method","formControlName","method",1,"form-control","custom-select","dropdown-radius"],["disabled","",3,"value"],[3,"value",4,"ngFor","ngForOf"],["disabled","",1,"text-muted"],["type","text","formControlName","user_id","placeholder","set user ID as request context",1,"form-control","border-right-0"],[1,"input-group-append"],["type","submit",1,"btn","btn-primary",3,"disabled"],[1,"d-flex"],[1,"w-50","py-3"],[1,"mb-4"],[1,"card","p-2","mb-3"],[2,"height","500px"],["editor",""],[1,"w-50","pl-3","py-3"],["editorResponse",""],["type","danger",1,"mb-3",3,"dismissible"],["src","/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[3,"value"]],template:function(t,e){1&t&&(ua(0,"h2",0),qa(1,"API Explorer"),ha(),ra(2,_H,4,2,"ngb-alert",1),ua(3,"div",2),ua(4,"div",3),ua(5,"div",4),ua(6,"form",5),ya("ngSubmit",function(){return e.sendRequest()}),ua(7,"div",6),ua(8,"div",7),ua(9,"select",8),ua(10,"option",9),qa(11,"Select Endpoint"),ha(),ra(12,CH,2,2,"option",10),ua(13,"option",11),qa(14,"----"),ha(),ra(15,SH,2,2,"option",10),ha(),ha(),da(16,"input",12),ua(17,"div",13),ua(18,"button",14),qa(19,"Send Request"),ha(),ha(),ha(),ha(),ha(),ha(),ha(),ua(20,"div",15),ua(21,"div",16),ua(22,"h5"),qa(23,"Request Body"),ha(),da(24,"hr",17),ua(25,"div",18),da(26,"div",19,20),ha(),ha(),ua(28,"div",21),ua(29,"h5"),qa(30,"Response"),ha(),da(31,"hr",17),ua(32,"div",18),da(33,"div",19,22),ha(),ha(),ha()),2&t&&(gs(2),la("ngIf",e.error),gs(4),la("formGroup",e.endpointCallForm),gs(4),la("value",""),gs(2),la("ngForOf",e.rpcEndpoints),gs(3),la("ngForOf",e.endpoints),gs(3),la("disabled",e.f.method.invalid))},directives:[Ed,Jw,gw,tx,Pw,pw,nx,Bw,jw,Sd,Gb,QC],styles:[".dropdown-radius[_ngcontent-%COMP%]{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-text[_ngcontent-%COMP%]{background-color:initial;cursor:pointer}"]}),t})(),EH=(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){return this.consoleService.listApiEndpoints("")}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})();function AH(t,e){if(1&t&&(ua(0,"ngb-alert",7),da(1,"img",8),ua(2,"h6",9),qa(3),ha(),ha()),2&t){const t=xa();la("dismissible",!1),gs(3),Xa("Error while processing request: ",t.error,"")}}function DH(t,e){1&t&&da(0,"div",14)}function TH(t,e){1&t&&da(0,"div",15)}function RH(t,e){if(1&t&&(ua(0,"tr",16),ua(1,"td",17),ua(2,"div",18),ua(3,"div"),ua(4,"small"),ua(5,"b"),qa(6,"Provider Response"),ha(),ha(),ha(),ua(7,"div"),ua(8,"pre",19),ua(9,"small"),qa(10),ha(),ha(),ha(),ha(),ha(),ha()),2&t){const t=xa().$implicit;gs(10),Ya(t.provider_response)}}function FH(t,e){if(1&t){const t=ga();ua(0,"tr"),ua(1,"td"),ua(2,"div",10),ya("click",function(){pn(t);const n=e.index,i=xa();return i.purchasesRowsOpen[n]=!i.purchasesRowsOpen[n]}),ra(3,DH,1,0,"div",11),ra(4,TH,1,0,"div",12),ha(),qa(5),ha(),ua(6,"td"),qa(7),ha(),ua(8,"td"),qa(9),ha(),ua(10,"td"),qa(11),ha(),ua(12,"td"),qa(13),ha(),ha(),ra(14,RH,11,1,"tr",13)}if(2&t){const t=e.index,n=e.$implicit,i=xa();gs(3),la("ngIf",!i.purchasesRowsOpen[t]),gs(1),la("ngIf",i.purchasesRowsOpen[t]),gs(1),Xa(" ",n.product_id," "),gs(2),Ya(n.transaction_id),gs(2),Ya(i.getStoreText(n.store)),gs(2),Ya(n.purchase_time),gs(2),Ya(n.create_time),gs(1),la("ngIf",i.purchasesRowsOpen[t])}}function MH(t,e){1&t&&(ua(0,"tr"),ua(1,"td",20),qa(2,"No purchases were found."),ha(),ha())}function LH(t,e){if(1&t){const t=ga();ua(0,"div",21),ua(1,"button",22),ya("click",function(){return pn(t),xa().loadOlderPurchases()}),qa(2,"Load more entries"),ha(),ha()}}const $H=[{path:"",component:SE,canActivate:[c_],canActivateChild:[kE],children:[{path:"",redirectTo:"status",pathMatch:"full"},{path:"status",component:$P,resolve:[OP]},{path:"config",component:pB,resolve:[gB]},{path:"users",component:xB,resolve:[_B]},{path:"modules",component:PB,resolve:[BB]},{path:"storage",component:qB,resolve:[YB,XB],pathMatch:"full"},{path:"storage/:collection/:key/:user_id",component:cU,resolve:[uU],pathMatch:"full"},{path:"leaderboards",component:wU,resolve:[xU]},{path:"leaderboards/:id",component:rH,resolve:[sH],children:[{path:"",redirectTo:"details",pathMatch:"full"},{path:"details",component:cH,resolve:[]},{path:"records",component:yH,resolve:[bH]}]},{path:"matches",component:JV,resolve:[QV]},{path:"accounts",component:DU,resolve:[TU]},{path:"accounts/:id",component:HU,resolve:[jU],children:[{path:"",redirectTo:"profile",pathMatch:"full"},{path:"profile",component:YU,resolve:[]},{path:"authentication",component:tV,resolve:[]},{path:"wallet",component:dV,resolve:[fV]},{path:"friends",component:CV,resolve:[SV]},{path:"groups",component:OV,resolve:[IV]},{path:"purchases",component:(()=>{class t{constructor(t,e,n){this.route=t,this.router=e,this.consoleService=n,this.purchases=[],this.purchasesRowsOpen=[],this.error="",this.nextCursor="",this.limit=100}ngOnInit(){this.userID=this.route.parent.snapshot.paramMap.get("id"),this.route.data.subscribe(t=>{this.purchases.push(...t[0].validated_purchases),this.nextCursor=t[0].cursor})}loadOlderPurchases(){this.consoleService.listPurchases("",this.userID,this.limit,this.nextCursor).subscribe(t=>{this.purchases.push(...t.validated_purchases),this.purchasesRowsOpen.push(...Array(t.validated_purchases.length).fill(!1)),this.nextCursor=t.cursor},t=>{this.error=t})}getStoreText(t){return this.formatStoreText(Qx[t])}formatStoreText(t){return t.split("_").map(t=>t[0]+t.slice(1).toLowerCase()).join(" ")}}return t.\u0275fac=function(e){return new(e||t)(oa(Jv),oa(mb),oa(Jx))},t.\u0275cmp=pe({type:t,selectors:[["app-purchases"]],decls:18,vars:4,consts:[["type","danger",3,"dismissible",4,"ngIf"],[1,"table","table-sm","table-bordered","table-hover"],[1,"thead-light"],[2,"width","180px"],["ngFor","",3,"ngForOf"],[4,"ngIf"],["class","col-12 text-center",4,"ngIf"],["type","danger",3,"dismissible"],["src","/src/static/svg/red-triangle.svg","alt","","width","16","height","",1,"mr-2"],[1,"mr-2","d-inline","font-weight-bold"],[1,"arrow",3,"click"],["class","arrow-right",4,"ngIf"],["class","arrow-down",4,"ngIf"],["class","open-row",4,"ngIf"],[1,"arrow-right"],[1,"arrow-down"],[1,"open-row"],["colspan","7"],[1,"p-2"],[1,"pre-wrap","m-0","p-0"],["colspan","5",1,"text-muted"],[1,"col-12","text-center"],[1,"btn","btn-outline-primary","mt-3",3,"click"]],template:function(t,e){1&t&&(ra(0,AH,4,2,"ngb-alert",0),ua(1,"table",1),ua(2,"thead",2),ua(3,"tr"),ua(4,"th"),qa(5,"Product ID"),ha(),ua(6,"th"),qa(7,"Transaction ID"),ha(),ua(8,"th"),qa(9,"Store"),ha(),ua(10,"th",3),qa(11,"Purchase Time"),ha(),ua(12,"th",3),qa(13,"Create Time"),ha(),ha(),ha(),ua(14,"tbody"),ra(15,FH,15,8,"ng-template",4),ra(16,MH,3,0,"tr",5),ha(),ha(),ra(17,LH,3,0,"div",6)),2&t&&(la("ngIf",e.error),gs(15),la("ngForOf",e.purchases),gs(1),la("ngIf",0===e.purchases.length),gs(1),la("ngIf",e.nextCursor))},directives:[Ed,Sd,QC],styles:[""]}),t})(),resolve:[(()=>{class t{constructor(t){this.consoleService=t}resolve(t,e){const n=t.parent.paramMap.get("id");return this.consoleService.listPurchases("",n,100,"")}}return t.\u0275fac=function(e){return new(e||t)(Yt(Jx))},t.\u0275prov=ut({token:t,factory:t.\u0275fac,providedIn:"root"}),t})()]}]},{path:"apiexplorer",component:kH,resolve:[EH]}]},{path:"login",component:a_,canActivate:[l_]},{path:"**",redirectTo:""}];let OH=(()=>{class t{}return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},imports:[[Fb.forRoot($H,{useHash:!0})],Fb]}),t})(),IH=(()=>{class t{}return t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=pe({type:t,selectors:[["app-root"]],decls:1,vars:0,template:function(t,e){1&t&&da(0,"router-outlet")},directives:[xb],styles:[""]}),t})();RegExp(/[&<>"']/g.source);const NH={Tab:9,Enter:13,Esc:27,Space:32,ArrowUp:38,ArrowDown:40,Backspace:8};NH[NH.Tab]="Tab",NH[NH.Enter]="Enter",NH[NH.Esc]="Esc",NH[NH.Space]="Space",NH[NH.ArrowUp]="ArrowUp",NH[NH.ArrowDown]="ArrowDown",NH[NH.Backspace]="Backspace";const PH=new Pt("ng-select-selection-model");class BH{constructor(){this._selected=[]}get value(){return this._selected}select(t,e,n){if(t.selected=!0,(!t.children||!e&&n)&&this._selected.push(t),e)if(t.parent){const e=t.parent.children.length,n=t.parent.children.filter(t=>t.selected).length;t.parent.selected=e===n}else t.children&&(this._setChildrenSelectedState(t.children,!0),this._removeChildren(t),this._selected=n&&this._activeChildren(t)?[...this._selected.filter(e=>e.parent!==t),t]:[...this._selected,...t.children.filter(t=>!t.disabled)])}unselect(t,e){if(this._selected=this._selected.filter(e=>e!==t),t.selected=!1,e)if(t.parent&&t.parent.selected){const e=t.parent.children;this._removeParent(t.parent),this._removeChildren(t.parent),this._selected.push(...e.filter(e=>e!==t&&!e.disabled)),t.parent.selected=!1}else t.children&&(this._setChildrenSelectedState(t.children,!1),this._removeChildren(t))}clear(t){this._selected=t?this._selected.filter(t=>t.disabled):[]}_setChildrenSelectedState(t,e){for(const n of t)n.disabled||(n.selected=e)}_removeChildren(t){this._selected=[...this._selected.filter(e=>e.parent!==t),...t.children.filter(e=>e.parent===t&&e.disabled&&e.selected)]}_removeParent(t){this._selected=this._selected.filter(e=>e!==t)}_activeChildren(t){return t.children.every(t=>!t.disabled||t.selected)}}const UH=function(){return new BH};let VH=(()=>{class t{}return t.\u0275mod=ye({type:t}),t.\u0275inj=ht({factory:function(e){return new(e||t)},providers:[{provide:PH,useValue:UH}],imports:[[Fd]]}),t})(),HH=(()=>{class t{constructor(t){this.authenticationService=t}intercept(t,e){const n=this.authenticationService.currentSessionValue;return n&&n.token&&(t=t.clone({setHeaders:{Authorization:`Bearer ${n.token}`}})),e.handle(t)}}return t.\u0275fac=function(e){return new(e||t)(Yt(i_))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),jH=(()=>{class t{constructor(t,e){this.authenticationService=t,this.router=e}intercept(t,e){return e.handle(t).pipe($m(e=>(401===e.status?(this.authenticationService.logout(),t.url.includes("/v3/auth")||this.router.navigate(["/login"],{queryParams:{next:this.router.routerState.snapshot.url}})):e.status>=500&&console.log(`${e.status}: + ${e.error.message||e.statusText}`),I_(e.error.message||e.statusText))))}}return t.\u0275fac=function(e){return new(e||t)(Yt(i_),Yt(mb))},t.\u0275prov=ut({token:t,factory:t.\u0275fac}),t})(),zH=(()=>{class t{}return t.\u0275mod=ye({type:t,bootstrap:[IH]}),t.\u0275inj=ht({factory:function(e){return new(e||t)},providers:[e_,gE,{provide:Xx,useValue:{host:document.location.origin,timeout:15e3}},{provide:Ix,useClass:HH,multi:!0},{provide:Ix,useClass:jH,multi:!0}],imports:[[qP,OH,hf,Xg,Yx,cE,gP,vx.forRoot({apiKey:"dHl7FTjJ9icepBjEdOCcyMFQYL1BBiQO",debug:!1,loadOnInitialization:!0}),Jg,lx,ax,VH]]}),t})();(function(){if(ji)throw new Error("Cannot enable prod mode after platform setup.");Hi=!1})(),cf().bootstrapModule(zH).then(t=>{window.ngRef&&window.ngRef.destroy(),window.ngRef=t}).catch(t=>console.error(t))},zn8P:function(t,e){function n(t){return Promise.resolve().then(function(){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e})}n.keys=function(){return[]},n.resolve=n,t.exports=n,n.id="zn8P"}},[[0,0]]]); \ No newline at end of file diff --git a/console/ui/src/app/account/purchases/purchases.component.ts b/console/ui/src/app/account/purchases/purchases.component.ts index f3eba9082..fee110f9e 100644 --- a/console/ui/src/app/account/purchases/purchases.component.ts +++ b/console/ui/src/app/account/purchases/purchases.component.ts @@ -37,7 +37,7 @@ export class PurchasesComponent implements OnInit { ) {} ngOnInit(): void { - this.userID = this.route.snapshot.paramMap.get('id'); + this.userID = this.route.parent.snapshot.paramMap.get('id'); this.route.data.subscribe(data => { this.purchases.push(...data[0].validated_purchases); this.nextCursor = data[0].cursor; @@ -73,7 +73,7 @@ export class PurchasesResolver implements Resolve { constructor(private readonly consoleService: ConsoleService) {} resolve(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Observable { - const userId = route.paramMap.get('id'); + const userId = route.parent.paramMap.get('id'); return this.consoleService.listPurchases('', userId, 100, ''); } } diff --git a/server/core_purchase.go b/server/core_purchase.go index 0234eb11e..f023971c0 100644 --- a/server/core_purchase.go +++ b/server/core_purchase.go @@ -31,6 +31,7 @@ import ( "go.uber.org/zap" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" + "google.golang.org/protobuf/types/known/timestamppb" "net/http" "strconv" "strings" @@ -231,9 +232,9 @@ func ValidatePurchaseHuawei(ctx context.Context, logger *zap.Logger, db *sql.DB, } type purchasesListCursor struct { - transactionId string - purchaseTime int64 - userId string + TransactionId string + PurchaseTime *timestamppb.Timestamp + UserId string } func GetPurchaseByTransactionID(ctx context.Context, logger *zap.Logger, db *sql.DB, transactionID string) (string, *api.ValidatedPurchase, error) { @@ -283,7 +284,7 @@ WHERE func ListPurchases(ctx context.Context, logger *zap.Logger, db *sql.DB, userID string, limit int, cursor string) (*api.PurchaseList, error) { var incomingCursor *purchasesListCursor if cursor != "" { - cb, err := base64.StdEncoding.DecodeString(cursor) + cb, err := base64.URLEncoding.DecodeString(cursor) if err != nil { return nil, ErrPurchasesListInvalidCursor } @@ -291,7 +292,7 @@ func ListPurchases(ctx context.Context, logger *zap.Logger, db *sql.DB, userID s if err := gob.NewDecoder(bytes.NewReader(cb)).Decode(incomingCursor); err != nil { return nil, ErrPurchasesListInvalidCursor } - if userID != "" && userID != incomingCursor.userId { + if userID != "" && userID != incomingCursor.UserId { // userID filter was set and has changed, cursor is now invalid return nil, ErrPurchasesListInvalidCursor } @@ -314,13 +315,18 @@ FROM ` if incomingCursor != nil { if userID == "" { - query += " WHERE (user_id, purchase_time, transaction_id) >= ($1, to_timestamp($2), $3)" + query += " WHERE (user_id, purchase_time, transaction_id) <= ($1, $2, $3)" } else { - query += " WHERE user_id = $1 AND (purchase_time, transaction_id) >= (to_timestamp($2), $3)" + query += " WHERE user_id = $1 AND (purchase_time, transaction_id) <= ($2, $3)" + } + params = append(params, incomingCursor.UserId) + params = append(params, incomingCursor.PurchaseTime.AsTime()) + params = append(params, incomingCursor.TransactionId) + } else { + if userID != "" { + query += " WHERE user_id = $1" + params = append(params, userID) } - params = append(params, incomingCursor.userId) - params = append(params, incomingCursor.purchaseTime) - params = append(params, incomingCursor.transactionId) } query += " ORDER BY purchase_time DESC" if limit > 0 { @@ -359,14 +365,14 @@ FROM if len(purchases) >= limit { cursorBuf := new(bytes.Buffer) if err := gob.NewEncoder(cursorBuf).Encode(&purchasesListCursor{ - transactionId: transactionId, - purchaseTime: purchaseTime.Time.Unix(), - userId: userID.String(), + TransactionId: transactionId, + PurchaseTime: timestamppb.New(purchaseTime.Time), + UserId: userID.String(), }); err != nil { logger.Error("Error creating purchases list cursor", zap.Error(err)) return nil, err } - outgoingCursor = base64.StdEncoding.EncodeToString(cursorBuf.Bytes()) + outgoingCursor = base64.URLEncoding.EncodeToString(cursorBuf.Bytes()) break }