text: var e=require("typescript"),t=require("@typescript-eslint/experimental-utils"),n=require("@angular/compiler"),r=require("aria-query");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=a(e);function s(e,t){const n=(e=e.replace(/\r\n/g,"\n")).indexOf(t);return[n,n+t.length]}const i=new Map;var c={"extract-inline-html":{preprocess:function(e,t){const n=[e];if(!function(e,t){return!![".component.ts",".page.ts",".dialog.ts",".modal.ts",".popover.ts",".bottomsheet.ts",".snackbar.ts"].some(e=>t.endsWith(e))||!(!e.includes("Component")||!e.includes("@angular/core"))}(e,t))return n;try{const r=o.default.createSourceFile(t,e,o.default.ScriptTarget.Latest,!0),a=r.statements.filter(e=>o.default.isClassDeclaration(e));if(!a||!a.length)return n;const c=[];for(const e of a)if(e.decorators)for(const t of e.decorators)o.default.isCallExpression(t.expression)&&o.default.isIdentifier(t.expression.expression)&&"Component"===t.expression.expression.text&&c.push(t);if(!c||!c.length)return n;const l=[e];let u=0;for(const t of c){if(!o.default.isDecorator(t)||!o.default.isCallExpression(t.expression)||1!==t.expression.arguments.length)continue;const n=t.expression.arguments[0];if(!o.default.isObjectLiteralExpression(n))continue;const a=n.properties.find(e=>e&&e.name&&"template"===e.name.getText());if(n.properties.find(e=>e&&e.name&&"templateUrl"===e.name.getText())||!a)continue;if(!o.default.isPropertyAssignment(a)||!o.default.isStringLiteralLike(a.initializer))continue;const c=a.initializer.text,p=s(e,c),m=`inline-template-${++u}.component.html`;i.set(m,{range:p,lineAndCharacter:{start:r.getLineAndCharacterOfPosition(p[0]),end:r.getLineAndCharacterOfPosition(p[1])}}),l.push({text:c,filename:m})}return l}catch(e){return console.log(e),console.error("preprocess: ERROR could not parse @Component() metadata",t),n}},postprocess:function(e,t){const n=e[0];if(1===e.length)return n;const r=e.slice(1);return[...n,...[].concat(...r.map((e,t)=>{const n=`inline-template-${++t}.component.html`,r=i.get(n);return r?e.map(e=>{if(e.line=e.line+r.lineAndCharacter.start.line,e.endLine=e.endLine+r.lineAndCharacter.start.line,e.fix){const t=r.range[0];e.fix.range=[t+e.fix.range[0],t+e.fix.range[1]]}return e}):[]}))]},supportsAutofix:!0}};const l=t.ESLintUtils.RuleCreator(e=>"https://github.com/angular-eslint/angular-eslint");function u(e){return p(e),e.parserServices}function p(e){var t,n;if(null==(t=e.parserServices)||!t.convertNodeSourceSpanToLoc||null==(n=e.parserServices)||!n.convertElementSourceSpanToLoc)throw new Error("You have used a rule which requires '@angular-eslint/template-parser' to be used as the 'parser' in your ESLint config.")}const m=Symbol("PROPERTY");function d(e,t){const r=e.attributes.find(e=>e.name===t);if(r)return r.value;const a=e.inputs.find(e=>e.name===t);return a&&a.value instanceof n.ASTWithSource?a.value.ast instanceof n.LiteralPrimitive?a.value.ast.value:m:null}var g=l({name:"accessibility-alt-text",meta:{type:"suggestion",docs:{description:"Enforces alternate text for elements which require the alt, aria-label, aria-labelledby attributes.",category:"Best Practices",recommended:!1},schema:[],messages:{accessibilityAltText:"<{{element}}/> element must have a text alternative."}},defaultOptions:[],create(e){const t=u(e);return{"Element[name=/^(img|area|object|input)$/]"(n){if(!function(e){return"img"===e.name?function(e){return e.attributes.some(({name:e})=>S(e))||e.inputs.some(({name:e})=>S(e))}(e):"object"===e.name?function(e){let t=!1,n=!1;for(const r of e.attributes)t="title"===r.name,n=y(r.name);if(t||n)return!0;let r=!1,a=!1;for(const t of e.inputs)r="title"===t.name,a=y(t.name);return!(!r&&!a)||e.children.length>0&&!!e.children[0].value}(e):"area"===e.name?f(e):function(e){return"image"!==d(e,"type")||f(e)}(e)}(n)){const r=t.convertElementSourceSpanToLoc(e,n);e.report({loc:r,messageId:"accessibilityAltText",data:{element:n.name}})}}}}});function f(e){let t=!1,n=!1;for(const r of e.attributes)t=S(r.name),n=y(r.name);if(t||n)return!0;let r=!1,a=!1;for(const t of e.inputs)r=S(t.name),a=y(t.name);return r||a}function y(e){return"aria-label"===e||"aria-labelledby"===e}function S(e){return"alt"===e}function T(e){if("string"==typeof e){if("true"===e)return!0;if("false"===e)return!1}return e}function b(e){if("INPUT"===e.name.toUpperCase()){const t=d(e,"type");if("string"==typeof t&&"HIDDEN"===t.toUpperCase())return!0}const t=T(d(e,"aria-hidden"));return""===t||t===m||!0===t}const x=new Set(["aria-label","innerHtml","innerHTML","innerText","outerHTML","title"]);var h=l({name:"accessibility-elements-content",meta:{type:"suggestion",docs:{description:"Ensures that the heading, anchor and button elements have content in it",category:"Best Practices",recommended:!1},schema:[],messages:{accessibilityElementsContent:"<{{element}}> should have content"}},defaultOptions:[],create(e){const t=u(e);return{"Element[name=/^(a|button|h1|h2|h3|h4|h5|h6)$/][children.length=0]"(n){if(b(n))return;const{attributes:r,inputs:a,name:o,sourceSpan:s}=n;if([...r,...a].map(({name:e})=>e).some(e=>x.has(e)))return;const i=t.convertNodeSourceSpanToLoc(s);e.report({loc:i,messageId:"accessibilityElementsContent",data:{element:o}})}}}});function v(e,t){return function e({children:r}){return r.some(r=>r instanceof n.TmplAstElement&&(r.name===t||e(r)))}(e)}const E={items:{type:"string"},type:"array",uniqueItems:!0},A=["button","input","meter","output","progress","select","textarea"],I=["for","htmlFor"],w=["label"];var C=l({name:"accessibility-label-for",meta:{deprecated:!0,replacedBy:["accessibility-label-has-associated-control"],type:"suggestion",docs:{description:"Ensures that a label element/component is associated with a form element",category:"Best Practices",recommended:!1},schema:[{additionalProperties:!1,properties:{controlComponents:E,labelAttributes:E,labelComponents:E},type:"object"}],messages:{accessibilityLabelFor:"A label element/component must be associated with a form element"}},defaultOptions:[{controlComponents:A,labelAttributes:I,labelComponents:w}],create(e,[t]){const n=u(e),{controlComponents:r,labelAttributes:a,labelComponents:o}=function({controlComponents:e,labelAttributes:t,labelComponents:n}){return{controlComponents:new Set([...A,...null!=e?e:[]]),labelAttributes:new Set([...I,...null!=t?t:[]]),labelComponents:new Set([...w,...null!=n?n:[]])}}(t);var s;return{[`Element[name=${s=[...o],RegExp(`^(${s.join("|")})$`)}]`](t){const o=new Set([...t.attributes,...t.inputs].map(({name:e})=>e));if([...a].some(e=>o.has(e))||function(e,t){return Boolean([...e].some(e=>v(t,e)))}(r,t))return;const s=n.convertNodeSourceSpanToLoc(t.sourceSpan);e.report({loc:s,messageId:"accessibilityLabelFor"})}}}});const P="accessibility-label-has-associated-control",N=["input","meter","output","progress","select","textarea"],O=[{inputs:["for","htmlFor"],selector:"label"}];var B=l({name:P,meta:{type:"suggestion",docs:{description:"Ensures that a label element/component is associated with a form element",category:"Best Practices",recommended:!1},schema:[{additionalProperties:!1,properties:{controlComponents:{items:{type:"string"},type:"array",uniqueItems:!0},labelComponents:{items:{additionalProperties:!1,properties:{inputs:{items:{type:"string"},type:"array",uniqueItems:!0},selector:{type:"string"}},required:["selector"],type:"object"},type:"array",uniqueItems:!0}},type:"object"}],messages:{accessibilityLabelHasAssociatedControl:"A label component must be associated with a form element"}},defaultOptions:[{controlComponents:N,labelComponents:O}],create(e,[{controlComponents:t,labelComponents:n}]){const r=u(e),a=new Set([...N,...null!=t?t:[]]),o=[...O,...null!=n?n:[]],s=o.map(({selector:e})=>e);return{[`Element[name=${RegExp(`^(${s.join("|")})$`)}]`](t){var n;const s=o.find(({selector:e})=>e===t.name);if(!s)return;const i=new Set([...t.attributes,...t.inputs].map(({name:e})=>e));if((null==(n=s.inputs)?void 0:n.some(e=>i.has(e)))||function(e,t){return Boolean([...e].some(e=>v(t,e)))}(a,t))return;const c=r.convertNodeSourceSpanToLoc(t.sourceSpan);e.report({loc:c,messageId:"accessibilityLabelHasAssociatedControl"})}}}});let D=null;function L(){var e;return null!=(e=D)?e:D=new Set(r.dom.keys())}function k(e){return RegExp(`^(${e.join("|")})$`)}var _=l({name:"accessibility-table-scope",meta:{type:"suggestion",docs:{description:"Ensures that the `scope` attribute is only used on the `<th>` element",category:"Best Practices",recommended:!1},fixable:"code",schema:[],messages:{accessibilityTableScope:"The `scope` attribute should only be on the `<th>` element"}},defaultOptions:[],create(e){const t=u(e);return{[`Element[name=${k([...L()].filter(e=>"th"!==e))}] > :matches(BoundAttribute, TextAttribute)[name='scope']`]({sourceSpan:n}){const r=t.convertNodeSourceSpanToLoc(n);e.report({loc:r,messageId:"accessibilityTableScope",fix:e=>e.removeRange([n.start.offset-1,n.end.offset])})}}}}),F=l({name:"accessibility-valid-aria",meta:{type:"suggestion",docs:{description:"Ensures that correct ARIA attributes and respective values are used",category:"Best Practices",recommended:!1,suggestion:!0},schema:[],messages:{accessibilityValidAria:"The `{{attribute}}` is an invalid ARIA attribute",accessibilityValidAriaValue:"The `{{attribute}}` has an invalid value. Check the valid values at https://raw.githack.com/w3c/aria/stable/#roles",suggestRemoveInvalidAria:"Remove attribute `{{attribute}}`"}},defaultOptions:[],create(e){const t=u(e);return{[`Element[name=${k([...L()])}] > :matches(BoundAttribute, TextAttribute)[name=/^aria-.+/]`](a){const{name:o,sourceSpan:s}=a,i=r.aria.get(o),c=t.convertNodeSourceSpanToLoc(s);if(!i)return void e.report({loc:c,messageId:"accessibilityValidAria",data:{attribute:o},suggest:[{messageId:"suggestRemoveInvalidAria",data:{attribute:o},fix:e=>e.removeRange([s.start.offset-1,s.end.offset])}]});const l=function(e){return e instanceof n.TmplAstBoundAttribute&&e.value instanceof n.ASTWithSource?e.value.ast:e}(a);(function(e){return!function(e){return e instanceof n.LiteralArray||e instanceof n.LiteralMap}(e)&&!function(e){return e instanceof n.LiteralPrimitive||e instanceof n.TmplAstTextAttribute}(e)})(l)||function({allowundefined:e,type:t,values:n},r){if(e&&R(r))return!0;switch(t){case"boolean":return K(r);case"tristate":return K(r)||R(r);case"id":case"idlist":return!0;case"integer":return a=r,!Number.isNaN(a)&&parseInt(Number(a))==a&&!Number.isNaN(parseInt(a,10));case"number":return function(e){return!Number.isNaN(Number.parseFloat(e))&&Number.isFinite(e)}(r);case"string":return function(e){return"string"==typeof e}(r);case"token":case"tokenlist":{const e=K(r)?JSON.parse(r):r;return Boolean(null==n?void 0:n.includes(e))}}var a}(i,l.value)||e.report({loc:c,messageId:"accessibilityValidAriaValue",data:{attribute:o}})}}}});function K(e){return"boolean"==typeof e||"false"===e||"true"===e}function R(e){return null==e}const j=/\[(.*)\]/;var M=l({name:"banana-in-box",meta:{type:"suggestion",docs:{description:"Ensures that the two-way data binding syntax is correct",category:"Best Practices",recommended:"error"},fixable:"code",schema:[],messages:{bananaInBox:"Invalid binding syntax. Use [(expr)] instead"}},defaultOptions:[],create(e){const t=u(e),n=e.getSourceCode();return{BoundEvent({name:r,sourceSpan:a}){const o=r.match(j);if(!o)return;const s=t.convertNodeSourceSpanToLoc(a);e.report({messageId:"bananaInBox",loc:s,fix:e=>{const[,t]=o,a=`[(${t})]`,i=n.getIndexFromLoc(s.start);return e.replaceTextRange([i,i+r.length+2],a)}})}}}});const q=new Set(["presentation","none",m]);let $=null,X=null,J=null;var U=l({name:"click-events-have-key-events",meta:{type:"suggestion",docs:{description:"Ensures that the click event is accompanied with at least one key event keyup, keydown or keypress.",category:"Best Practices",recommended:!1},schema:[],messages:{clickEventsHaveKeyEvents:"click must be accompanied by either keyup, keydown or keypress event for accessibility."}},defaultOptions:[],create:e=>({Element(t){if(!L().has(t.name))return;if(function(e){const t=d(e,"role");return null!==t&&q.has(t)}(t)||b(t)||function(e){return L().has(e.name)&&function(e){function t({attributes:t,name:n}){return e.name===n&&function(e=[],t){const n=[...t.attributes,...t.inputs];return e.every(e=>n.some(n=>"a"===t.name&&"routerLink"===n.name||e.name===n.name&&(!e.value||e.value===T(d(t,e.name)))))}(t,e)}return!!function(){if(null===X){const e=[...r.roles.keys()],t=[...r.elementRoles],n=new Set(e.filter(e=>{const t=r.roles.get(e);return t&&!t.abstract&&"progressbar"!==e&&t.superClass.some(e=>e.includes("widget"))}).concat("toolbar"));X=t.reduce((e,[t,r])=>e.concat([...r].every(e=>n.has(e))?t:[]),[])}return X}().some(t)||!function(){if(null===J){const e=[...r.roles.keys()],t=[...r.elementRoles],n=new Set(e.filter(e=>{const t=r.roles.get(e);return t&&!t.abstract&&"toolbar"!==e&&!t.superClass.some(e=>e.includes("widget"))}).concat("progressbar"));J=t.reduce((e,[t,r])=>e.concat([...r].every(e=>n.has(e))?t:[]),[])}return J}().some(t)&&function(){if(null===$){const{AXObjects:e,elementAXObjects:t}=require("axobject-query"),n=new Set(Array.from(e.keys()).filter(t=>"widget"===e.get(t).type));$=[...t].reduce((e,[t,r])=>e.concat([...r].every(e=>n.has(e))?t:[]),[])}return $}().some(t)}(e)}(t))return;let n=!1,a=!1;for(const e of t.outputs)n="click"===e.name,a=e.name.startsWith("keyup")||e.name.startsWith("keydown")||e.name.startsWith("keypress");if(!n||a)return;const o=u(e).convertNodeSourceSpanToLoc(t.sourceSpan);e.report({loc:o,messageId:"clickEventsHaveKeyEvents"})}})}),W=l({name:"conditional-complexity",meta:{type:"suggestion",docs:{description:"The conditional complexity should not exceed a rational limit",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{maxComplexity:{minimum:1,type:"number"}},additionalProperties:!1}],messages:{"conditionalСomplexity":"The conditional complexity {{totalComplexity}} exceeds the defined limit {{maxComplexity}}"}},defaultOptions:[{maxComplexity:5}],create(e,[{maxComplexity:t}]){p(e);const r=e.getSourceCode();return{BoundAttribute(a){if(!a.value.source)return;const o=V(Y((H||(H=new n.Parser(new n.Lexer))).parseBinding(a.value.source,"",0).ast));if(o<=t)return;const{sourceSpan:{start:s,end:i}}=a.value;e.report({loc:{start:r.getLocFromIndex(s),end:r.getLocFromIndex(i)},messageId:"conditionalСomplexity",data:{maxComplexity:t,totalComplexity:o}})},Interpolation({expressions:n}){for(const a of n){const n=V(a);if(n<=t)continue;const{sourceSpan:{start:o,end:s}}=a;e.report({loc:{start:r.getLocFromIndex(o),end:r.getLocFromIndex(s)},messageId:"conditionalСomplexity",data:{maxComplexity:t,totalComplexity:n}})}}}}});function Y(e){return e instanceof n.BindingPipe?e.exp:e}let H=null;function V(e){const t=Y(e);if(!(t instanceof n.Binary||t instanceof n.Conditional))return 0;let r=1;return t instanceof n.Binary&&(t.left instanceof n.Binary&&(r+=V(t.left)),t.right instanceof n.Binary&&(r+=V(t.right))),t instanceof n.Conditional&&(r+=V(t.condition)+V(t.trueExp)+V(t.falseExp)),r}var z=l({name:"cyclomatic-complexity",meta:{type:"suggestion",docs:{description:"Checks cyclomatic complexity against a specified limit. It is a quantitative measure of the number of linearly independent paths through a program's source code",category:"Best Practices",recommended:!1},schema:[{type:"object",properties:{maxComplexity:{type:"number",minimum:1}},additionalProperties:!1}],messages:{cyclomaticComplexity:"The cyclomatic complexity {{totalComplexity}} exceeds the defined limit {{maxComplexity}}"}},defaultOptions:[{maxComplexity:5}],create(e,[{maxComplexity:t}]){let n=0;const r=u(e);return{'BoundAttribute[name=/^(ngForOf|ngIf|ngSwitchCase)$/], TextAttribute[name="ngSwitchDefault"]'({sourceSpan:a}){if(n+=1,n<=t)return;const o=r.convertNodeSourceSpanToLoc(a);e.report({messageId:"cyclomaticComplexity",loc:o,data:{maxComplexity:t,totalComplexity:n}})}}}});function Q(){return(Q=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var G="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Z(e){var t={exports:{}};return e(t,t.exports),t.exports}var ee=Z(function(e,t){var n,r;Object.defineProperty(t,"__esModule",{value:!0}),t.AST_TOKEN_TYPES=t.AST_NODE_TYPES=void 0,(n=t.AST_NODE_TYPES||(t.AST_NODE_TYPES={})).ArrayExpression="ArrayExpression",n.ArrayPattern="ArrayPattern",n.ArrowFunctionExpression="ArrowFunctionExpression",n.AssignmentExpression="AssignmentExpression",n.AssignmentPattern="AssignmentPattern",n.AwaitExpression="AwaitExpression",n.BinaryExpression="BinaryExpression",n.BlockStatement="BlockStatement",n.BreakStatement="BreakStatement",n.CallExpression="CallExpression",n.CatchClause="CatchClause",n.ChainExpression="ChainExpression",n.ClassBody="ClassBody",n.ClassDeclaration="ClassDeclaration",n.ClassExpression="ClassExpression",n.ClassProperty="ClassProperty",n.ConditionalExpression="ConditionalExpression",n.ContinueStatement="ContinueStatement",n.DebuggerStatement="DebuggerStatement",n.Decorator="Decorator",n.DoWhileStatement="DoWhileStatement",n.EmptyStatement="EmptyStatement",n.ExportAllDeclaration="ExportAllDeclaration",n.ExportDefaultDeclaration="ExportDefaultDeclaration",n.ExportNamedDeclaration="ExportNamedDeclaration",n.ExportSpecifier="ExportSpecifier",n.ExpressionStatement="ExpressionStatement",n.ForInStatement="ForInStatement",n.ForOfStatement="ForOfStatement",n.ForStatement="ForStatement",n.FunctionDeclaration="FunctionDeclaration",n.FunctionExpression="FunctionExpression",n.Identifier="Identifier",n.IfStatement="IfStatement",n.ImportDeclaration="ImportDeclaration",n.ImportDefaultSpecifier="ImportDefaultSpecifier",n.ImportExpression="ImportExpression",n.ImportNamespaceSpecifier="ImportNamespaceSpecifier",n.ImportSpecifier="ImportSpecifier",n.JSXAttribute="JSXAttribute",n.JSXClosingElement="JSXClosingElement",n.JSXClosingFragment="JSXClosingFragment",n.JSXElement="JSXElement",n.JSXEmptyExpression="JSXEmptyExpression",n.JSXExpressionContainer="JSXExpressionContainer",n.JSXFragment="JSXFragment",n.JSXIdentifier="JSXIdentifier",n.JSXMemberExpression="JSXMemberExpression",n.JSXNamespacedName="JSXNamespacedName",n.JSXOpeningElement="JSXOpeningElement",n.JSXOpeningFragment="JSXOpeningFragment",n.JSXSpreadAttribute="JSXSpreadAttribute",n.JSXSpreadChild="JSXSpreadChild",n.JSXText="JSXText",n.LabeledStatement="LabeledStatement",n.Literal="Literal",n.LogicalExpression="LogicalExpression",n.MemberExpression="MemberExpression",n.MetaProperty="MetaProperty",n.MethodDefinition="MethodDefinition",n.NewExpression="NewExpression",n.ObjectExpression="ObjectExpression",n.ObjectPattern="ObjectPattern",n.Program="Program",n.Property="Property",n.RestElement="RestElement",n.ReturnStatement="ReturnStatement",n.SequenceExpression="SequenceExpression",n.SpreadElement="SpreadElement",n.Super="Super",n.SwitchCase="SwitchCase",n.SwitchStatement="SwitchStatement",n.TaggedTemplateExpression="TaggedTemplateExpression",n.TemplateElement="TemplateElement",n.TemplateLiteral="TemplateLiteral",n.ThisExpression="ThisExpression",n.ThrowStatement="ThrowStatement",n.TryStatement="TryStatement",n.UnaryExpression="UnaryExpression",n.UpdateExpression="UpdateExpression",n.VariableDeclaration="VariableDeclaration",n.VariableDeclarator="VariableDeclarator",n.WhileStatement="WhileStatement",n.WithStatement="WithStatement",n.YieldExpression="YieldExpression",n.TSAbstractClassProperty="TSAbstractClassProperty",n.TSAbstractKeyword="TSAbstractKeyword",n.TSAbstractMethodDefinition="TSAbstractMethodDefinition",n.TSAnyKeyword="TSAnyKeyword",n.TSArrayType="TSArrayType",n.TSAsExpression="TSAsExpression",n.TSAsyncKeyword="TSAsyncKeyword",n.TSBigIntKeyword="TSBigIntKeyword",n.TSBooleanKeyword="TSBooleanKeyword",n.TSCallSignatureDeclaration="TSCallSignatureDeclaration",n.TSClassImplements="TSClassImplements",n.TSConditionalType="TSConditionalType",n.TSConstructorType="TSConstructorType",n.TSConstructSignatureDeclaration="TSConstructSignatureDeclaration",n.TSDeclareFunction="TSDeclareFunction",n.TSDeclareKeyword="TSDeclareKeyword",n.TSEmptyBodyFunctionExpression="TSEmptyBodyFunctionExpression",n.TSEnumDeclaration="TSEnumDeclaration",n.TSEnumMember="TSEnumMember",n.TSExportAssignment="TSExportAssignment",n.TSExportKeyword="TSExportKeyword",n.TSExternalModuleReference="TSExternalModuleReference",n.TSFunctionType="TSFunctionType",n.TSImportEqualsDeclaration="TSImportEqualsDeclaration",n.TSImportType="TSImportType",n.TSIndexedAccessType="TSIndexedAccessType",n.TSIndexSignature="TSIndexSignature",n.TSInferType="TSInferType",n.TSInterfaceBody="TSInterfaceBody",n.TSInterfaceDeclaration="TSInterfaceDeclaration",n.TSInterfaceHeritage="TSInterfaceHeritage",n.TSIntersectionType="TSIntersectionType",n.TSIntrinsicKeyword="TSIntrinsicKeyword",n.TSLiteralType="TSLiteralType",n.TSMappedType="TSMappedType",n.TSMethodSignature="TSMethodSignature",n.TSModuleBlock="TSModuleBlock",n.TSModuleDeclaration="TSModuleDeclaration",n.TSNamedTupleMember="TSNamedTupleMember",n.TSNamespaceExportDeclaration="TSNamespaceExportDeclaration",n.TSNeverKeyword="TSNeverKeyword",n.TSNonNullExpression="TSNonNullExpression",n.TSNullKeyword="TSNullKeyword",n.TSNumberKeyword="TSNumberKeyword",n.TSObjectKeyword="TSObjectKeyword",n.TSOptionalType="TSOptionalType",n.TSParameterProperty="TSParameterProperty",n.TSParenthesizedType="TSParenthesizedType",n.TSPrivateKeyword="TSPrivateKeyword",n.TSPropertySignature="TSPropertySignature",n.TSProtectedKeyword="TSProtectedKeyword",n.TSPublicKeyword="TSPublicKeyword",n.TSQualifiedName="TSQualifiedName",n.TSReadonlyKeyword="TSReadonlyKeyword",n.TSRestType="TSRestType",n.TSStaticKeyword="TSStaticKeyword",n.TSStringKeyword="TSStringKeyword",n.TSSymbolKeyword="TSSymbolKeyword",n.TSTemplateLiteralType="TSTemplateLiteralType",n.TSThisType="TSThisType",n.TSTupleType="TSTupleType",n.TSTypeAliasDeclaration="TSTypeAliasDeclaration",n.TSTypeAnnotation="TSTypeAnnotation",n.TSTypeAssertion="TSTypeAssertion",n.TSTypeLiteral="TSTypeLiteral",n.TSTypeOperator="TSTypeOperator",n.TSTypeParameter="TSTypeParameter",n.TSTypeParameterDeclaration="TSTypeParameterDeclaration",n.TSTypeParameterInstantiation="TSTypeParameterInstantiation",n.TSTypePredicate="TSTypePredicate",n.TSTypeQuery="TSTypeQuery",n.TSTypeReference="TSTypeReference",n.TSUndefinedKeyword="TSUndefinedKeyword",n.TSUnionType="TSUnionType",n.TSUnknownKeyword="TSUnknownKeyword",n.TSVoidKeyword="TSVoidKeyword",(r=t.AST_TOKEN_TYPES||(t.AST_TOKEN_TYPES={})).Boolean="Boolean",r.Identifier="Identifier",r.JSXIdentifier="JSXIdentifier",r.JSXText="JSXText",r.Keyword="Keyword",r.Null="Null",r.Numeric="Numeric",r.Punctuator="Punctuator",r.RegularExpression="RegularExpression",r.String="String",r.Template="Template",r.Block="Block",r.Line="Line"});Object.defineProperty(exports,"__esModule",{value:!0});var te={__proto__:null};Object.defineProperty(exports,"__esModule",{value:!0});var ne={__proto__:null},re=Z(function(e,t){var n=G&&G.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=G&&G.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),a=G&&G.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)"default"!==a&&Object.prototype.hasOwnProperty.call(e,a)&&n(t,e,a);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.TSESTree=void 0,t.TSESTree=a(ee)}),ae=Z(function(e,t){var n=G&&G.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),r=G&&G.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.AST_TOKEN_TYPES=t.AST_NODE_TYPES=void 0,Object.defineProperty(t,"AST_NODE_TYPES",{enumerable:!0,get:function(){return ee.AST_NODE_TYPES}});var a=ee;Object.defineProperty(t,"AST_TOKEN_TYPES",{enumerable:!0,get:function(){return a.AST_TOKEN_TYPES}}),r(te,t),r(ne,t),r(re,t)});function oe({parent:e},t){for(;e&&e.type!==ae.AST_NODE_TYPES.Program;){if(t(e))return e;e=e.parent}return null}const se={allowNullOrUndefined:!1};var ie=l({name:"eqeqeq",meta:{type:"suggestion",docs:{description:"Requires `===` and `!==` in place of `==` and `!=`",category:"Best Practices",recommended:"error",suggestion:!0},fixable:"code",schema:[{type:"object",properties:{allowNullOrUndefined:{type:"boolean",default:se.allowNullOrUndefined}},additionalProperties:!1}],messages:{eqeqeq:"Expected `{{expectedOperation}}` but received `{{actualOperation}}`",suggestStrictEquality:"Replace `{{expectedOperation}}` with `{{actualOperation}}`"}},defaultOptions:[se],create(e,[{allowNullOrUndefined:t}]){p(e);const n=e.getSourceCode();return{"Binary[operation=/^(==|!=)$/]"(r){const{left:a,operation:o,right:s,sourceSpan:{start:i,end:c}}=r;if(t&&(de(a)||de(s)))return;const l={actualOperation:o,expectedOperation:`${o}=`};e.report(Q({loc:{start:n.getLocFromIndex(i),end:n.getLocFromIndex(c)},messageId:"eqeqeq",data:l},me(a)||me(s)?{fix:e=>le({node:r,left:a,right:s,start:i,end:c,fixer:e})}:{suggest:[{messageId:"suggestStrictEquality",fix:e=>le({node:r,left:a,right:s,start:i,end:c,fixer:e}),data:l}]}))}}}});function ce({span:{start:e,end:t}}){return t-e}const le=({node:e,left:t,right:n,start:r,end:a,fixer:o})=>{var s;const{source:i}=null!=(s=oe(e,ue))?s:{};return i?o.insertTextAfterRange([r+ce(t)+1,a-ce(n)-1],"="):null};function ue(e){return e instanceof n.ASTWithSource}function pe(e){return e instanceof n.LiteralPrimitive}function me(e){return pe(e)&&"string"==typeof e.value&&(t=e.value,!(!Number.isNaN(Number.parseFloat(String(t)))&&Number.isFinite(Number(t))));var t}function de(e){return pe(e)&&null==e.value}const ge=/[a-z]/i,fe=new Set(["charset","class","color","colspan","fill","formControlName","height","href","id","lang","ngClass","routerLink","src","stroke","stroke-width","style","svgIcon","tabindex","target","type","viewBox","width","xmlns"]),ye={checkAttributes:!0,checkId:!0,checkText:!0,ignoreAttributes:[...fe]};var Se=l({name:"i18n",meta:{type:"suggestion",docs:{description:"Helps to ensure following best practices for i18n. Checks for missing i18n attributes on elements and non-ignored attributes containing text. Can also highlight tags that do not use custom ID (@@) feature. ",category:"Best Practices",recommended:!1,suggestion:!0},fixable:"code",schema:[{type:"object",properties:{boundTextAllowedPattern:{type:"string"},checkId:{type:"boolean",default:ye.checkId},checkText:{type:"boolean",default:ye.checkText},checkAttributes:{type:"boolean",default:ye.checkAttributes},ignoreAttributes:{type:"array",items:{type:"string"},default:[...fe]},ignoreTags:{type:"array",items:{type:"string"}}},additionalProperties:!1}],messages:{i18nAttribute:'Attribute "{{attributeName}}" has no corresponding i18n attribute. See more at https://angular.io/guide/i18n#translate-attributes',i18nId:"Missing custom message identifier. See more at https://angular.io/guide/i18n#use-a-custom-id-with-a-description",i18nIdOnAttribute:'Missing custom message identifier on attribute "{{attributeName}}". See more at https://angular.io/guide/i18n#use-a-custom-id-with-a-description',i18nSuggestIgnore:'Add the attribute name "{{attributeName}}" to the `ignoreAttributes` option in the eslint config',i18nText:"Each element containing text node should have an i18n attribute. See more at https://angular.io/guide/i18n"}},defaultOptions:[ye],create(e,[{boundTextAllowedPattern:t,checkAttributes:r,checkId:a,checkText:o,ignoreAttributes:s,ignoreTags:i}]){const c=u(e),l=e.getSourceCode(),p=RegExp(null!=t?t:ge),m=new Set([...fe,...null!=s?s:[]]),d=new Set(i);function g(e){return e.customId}function f(e){return e instanceof n.TmplAstText&&/\S/.test(e.value)||e instanceof n.TmplAstBoundText&&e.value instanceof n.ASTWithSource&&e.value.ast instanceof n.Interpolation&&p.test(e.value.ast.strings.join("").trim())}function y(e,t,n){return m.has(t)||m.has(`${e}[${t}]`)||0===n.trim().length||"true"===n||"false"===n}function S({attributes:t,children:s,i18n:i,parent:u,sourceSpan:p},m){const d=c.convertNodeSourceSpanToLoc(p);for(const{i18n:n,name:o,value:s}of t)n?a&&!g(n)&&e.report({messageId:"i18nIdOnAttribute",loc:d,data:{attributeName:o}}):r&&!y(m,o,s)&&e.report({messageId:"i18nAttribute",loc:d,data:{attributeName:o},fix:e=>{const t=l.getIndexFromLoc(d.start)+1+m.length;return e.replaceTextRange([t,t],` i18n-${o}`)},suggest:[{messageId:"i18nSuggestIgnore",data:{attributeName:o},fix:e=>e.insertTextBeforeRange([0,0],"")}]});i?a&&!function(e,t){return!((e instanceof n.TmplAstElement||e instanceof n.TmplAstTemplate)&&(null==e||!e.i18n)&&!g(t))}(u,i)&&e.report({messageId:"i18nId",loc:d}):o&&s.some(f)&&e.report({messageId:"i18nText",loc:d})}return{Element(e){d.has(e.name)||S(e,e.name)},Template(e){S(e,e.tagName)}}}}),Te=l({name:"mouse-events-have-key-events",meta:{type:"suggestion",docs:{description:"Ensures that the Mouse Events mouseover and mouseout are accompanied with Key Events focus and blur.",category:"Best Practices",recommended:!1},schema:[],messages:{mouseOverEventHasFocusEvent:"mouseover must be accompanied by focus event for accessibility.",mouseOutEventHasBlurEvent:"mouseout must be accompanied by blur event for accessibility"}},defaultOptions:[],create(e){const t=u(e);return{Element(n){let r=!1,a=!1,o=!1,s=!1;for(const e of n.outputs)r="mouseover"===e.name,a="mouseout"===e.name,o="focus"===e.name,s="blur"===e.name;if(!r&&!a)return;const i=t.convertNodeSourceSpanToLoc(n.sourceSpan);r&&!o&&e.report({loc:i,messageId:"mouseOverEventHasFocusEvent"}),a&&!s&&e.report({loc:i,messageId:"mouseOutEventHasBlurEvent"})}}}}),be=l({name:"no-any",meta:{type:"suggestion",docs:{description:'The use of "$any" nullifies the compile-time benefits of Angular\'s type system',category:"Best Practices",recommended:!1,suggestion:!0},schema:[],messages:{noAny:'Avoid using "$any" in templates',suggestRemoveAny:"Remove $any"}},defaultOptions:[],create(e){p(e);const t=e.getSourceCode();return{'MethodCall[name="$any"]:not([receiver.expression]):not([receiver.name])'({nameSpan:n,sourceSpan:{end:r,start:a}}){e.report({messageId:"noAny",loc:{start:t.getLocFromIndex(a),end:t.getLocFromIndex(r)},suggest:[{messageId:"suggestRemoveAny",fix:e=>[e.removeRange([n.start,n.end+1]),e.removeRange([r-1,r])]}]})}}}}),xe=l({name:"no-autofocus",meta:{type:"suggestion",docs:{description:"Ensures that the `autofocus` attribute is not used",category:"Best Practices",recommended:!1},fixable:"code",schema:[],messages:{noAutofocus:"The `autofocus` attribute should not be used, as it reduces usability and accessibility for users"}},defaultOptions:[],create(e){const t=u(e);return{[`Element[name=${k([...L()])}] > :matches(BoundAttribute, TextAttribute)[name="autofocus"]`]({sourceSpan:n}){const r=t.convertNodeSourceSpanToLoc(n);e.report({loc:r,messageId:"noAutofocus",fix:e=>e.removeRange([n.start.offset-1,n.end.offset])})}}}}),he=l({name:"no-call-expression",meta:{type:"suggestion",docs:{description:"Disallows calling expressions in templates, except for output handlers",category:"Best Practices",recommended:!1},schema:[],messages:{noCallExpression:"Avoid calling expressions in templates"}},defaultOptions:[],create(e){p(e);const t=e.getSourceCode();return{'MethodCall[name!="$any"], SafeMethodCall'(n){if(oe(n,ve))return;const{sourceSpan:{start:r,end:a}}=n;e.report({messageId:"noCallExpression",loc:{start:t.getLocFromIndex(r),end:t.getLocFromIndex(a)}})}}}});function ve(e){return e instanceof n.TmplAstBoundEvent}var Ee=l({name:"no-distracting-elements",meta:{type:"suggestion",docs:{description:"Enforces that no distracting elements are used",category:"Best Practices",recommended:!1},fixable:"code",schema:[],messages:{noDistractingElements:"Do not use <{{element}}> elements as they can create visual accessibility issues and are deprecated"}},defaultOptions:[],create(e){const t=u(e);return{"Element[name=/^(blink|marquee)$/]"({name:n,sourceSpan:r}){const a=t.convertNodeSourceSpanToLoc(r);e.report({loc:a,messageId:"noDistractingElements",data:{element:n},fix:e=>e.removeRange([r.start.offset,r.end.offset])})}}}});const Ae={allowTwoWayDataBinding:!0};var Ie=l({name:"no-duplicate-attributes",meta:{type:"problem",docs:{description:"Ensures that there are no duplicate input properties or output event listeners",category:"Possible Errors",recommended:!1,suggestion:!0},schema:[{type:"object",properties:{allowTwoWayDataBinding:{type:"boolean",default:Ae.allowTwoWayDataBinding}},additionalProperties:!1}],messages:{noDuplicateAttributes:"Duplicate attribute `{{attributeName}}`",suggestRemoveAttribute:"Remove attribute `{{attributeName}}`"}},defaultOptions:[Ae],create(e,[{allowTwoWayDataBinding:t}]){const n=u(e);return{Element({inputs:r,outputs:a,attributes:o}){[...Ce([...r,...o]),...Ce(t?a.filter(e=>!r.some(t=>t.sourceSpan.start===e.sourceSpan.start&&t.sourceSpan.end===e.sourceSpan.end)):a)].forEach(t=>{const r=n.convertNodeSourceSpanToLoc(t.sourceSpan),a={attributeName:we(t)};e.report({messageId:"noDuplicateAttributes",loc:r,data:a,suggest:[{messageId:"suggestRemoveAttribute",fix:e=>e.removeRange([r.start.column,r.end.column+1]),data:a}]})})}}}});function we(e){if("type"in e)if("BoundAttribute"===e.type)switch(e.__originalType){case 2:return`class.${e.name}`;case 3:return`style.${e.name}${e.unit?"."+e.unit:""}`;case 4:return`@${e.name}`}else if("BoundEvent"===e.type){if(1===e.__originalType)return`@${e.name}${e.phase?"."+e.phase:""}`;if(e.target)return`${e.target}:${e.name}`}return e.name}function Ce(e){return e.filter(t=>e.some(e=>e!==t&&we(e)===we(t)))}var Pe=l({name:"no-negated-async",meta:{type:"suggestion",docs:{description:"Ensures that async pipe results are not negated",category:"Best Practices",recommended:"error",suggestion:!0},schema:[],messages:{noNegatedAsync:"Async pipe results should not be negated. Use `(observable | async) === false`, `(observable | async) === null`, or `(observable | async) === undefined` to check its value instead",suggestFalseComparison:"Compare with `false`",suggestNullComparison:"Compare with `null`",suggestUndefinedComparison:"Compare with `undefined`"}},defaultOptions:[],create(e){p(e);const t=e.getSourceCode();return{':not(PrefixNot) > PrefixNot > BindingPipe[name="async"]'({parent:{sourceSpan:{end:n,start:r}}}){e.report({messageId:"noNegatedAsync",loc:{start:t.getLocFromIndex(r),end:t.getLocFromIndex(n)},suggest:[{messageId:"suggestFalseComparison",textToInsert:" === false"},{messageId:"suggestNullComparison",textToInsert:" === null"},{messageId:"suggestUndefinedComparison",textToInsert:" === undefined"}].map(({messageId:e,textToInsert:t})=>({messageId:e,fix:e=>[e.removeRange([r,r+1]),e.insertTextAfterRange([n,n],t)]}))})}}}}),Ne=l({name:"no-positive-tabindex",meta:{type:"suggestion",docs:{description:"Ensures that the `tabindex` attribute is not positive",category:"Best Practices",recommended:!1},schema:[],messages:{noPositiveTabindex:"The `tabindex` attribute should not be positive",suggestNonNegativeTabindex:'Use `tabindex="{{tabindex}}"`'}},defaultOptions:[],create(e){const t=u(e);return{[`Element[name=${k([...L()])}] > BoundAttribute[name="tabindex"][value.ast.value>0], TextAttribute[name="tabindex"][value>0]`]({valueSpan:n}){const r=t.convertNodeSourceSpanToLoc(n);e.report({loc:r,messageId:"noPositiveTabindex",suggest:["-1","0"].map(e=>({messageId:"suggestNonNegativeTabindex",fix:t=>t.replaceTextRange([n.start.offset,n.end.offset],e),data:{tabindex:e}}))})}}}}),Oe=l({name:"use-track-by-function",meta:{type:"suggestion",docs:{description:"Ensures trackBy function is used",category:"Best Practices",recommended:!1},schema:[],messages:{useTrackByFunction:"Missing trackBy function in ngFor directive"}},defaultOptions:[],create(e){const t=u(e);return{'BoundAttribute.inputs[name="ngForOf"]'({parent:{inputs:n},sourceSpan:r}){if(n.some(Be))return;const a=t.convertNodeSourceSpanToLoc(r);e.report({messageId:"useTrackByFunction",loc:a})},'BoundAttribute.templateAttrs[name="ngForOf"]'({parent:{templateAttrs:n}}){if(n.some(Be))return;const{start:r}=t.convertNodeSourceSpanToLoc(n[0].sourceSpan),{end:a}=t.convertNodeSourceSpanToLoc(n[n.length-1].sourceSpan),o={start:Q({},r,{column:r.column-1}),end:Q({},a,{column:a.column+1})};e.report({messageId:"useTrackByFunction",loc:o})}}}});function Be(e){return e instanceof n.TmplAstBoundAttribute&&"ngForTrackBy"===e.name}module.exports={configs:{all:{extends:"./configs/base.json",rules:{"@angular-eslint/template/accessibility-alt-text":"error","@angular-eslint/template/accessibility-elements-content":"error","@angular-eslint/template/accessibility-label-for":"error","@angular-eslint/template/accessibility-label-has-associated-control":"error","@angular-eslint/template/accessibility-table-scope":"error","@angular-eslint/template/accessibility-valid-aria":"error","@angular-eslint/template/banana-in-box":"error","@angular-eslint/template/click-events-have-key-events":"error","@angular-eslint/template/conditional-complexity":"error","@angular-eslint/template/cyclomatic-complexity":"error","@angular-eslint/template/eqeqeq":"error","@angular-eslint/template/i18n":"error","@angular-eslint/template/mouse-events-have-key-events":"error","@angular-eslint/template/no-any":"error","@angular-eslint/template/no-autofocus":"error","@angular-eslint/template/no-call-expression":"error","@angular-eslint/template/no-distracting-elements":"error","@angular-eslint/template/no-duplicate-attributes":"error","@angular-eslint/template/no-negated-async":"error","@angular-eslint/template/no-positive-tabindex":"error","@angular-eslint/template/use-track-by-function":"error"}},base:{parser:"@angular-eslint/template-parser",plugins:["@angular-eslint/template"]},recommended:{extends:"./configs/base.json",rules:{"@angular-eslint/template/banana-in-box":"error","@angular-eslint/template/eqeqeq":"error","@angular-eslint/template/no-negated-async":"error"}},"process-inline-templates":{parser:"@typescript-eslint/parser",parserOptions:{ecmaVersion:2020,sourceType:"module"},plugins:["@angular-eslint/template"],processor:"@angular-eslint/template/extract-inline-html"}},processors:c,rules:{"accessibility-alt-text":g,"accessibility-elements-content":h,"accessibility-label-for":C,[P]:B,"accessibility-table-scope":_,"accessibility-valid-aria":F,"banana-in-box":M,"conditional-complexity":W,"click-events-have-key-events":U,"cyclomatic-complexity":z,eqeqeq:ie,i18n:Se,"mouse-events-have-key-events":Te,"no-any":be,"no-autofocus":xe,"no-call-expression":he,"no-distracting-elements":Ee,"no-duplicate-attributes":Ie,"no-negated-async":Pe,"no-positive-tabindex":Ne,"use-track-by-function":Oe}};
  