Son CV dans un terminal web en Javascript! https://terminal-cv.gregandev.fr
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
terminal-cv/node_modules/prettier/esm/parser-angular.mjs

67 lines
98 KiB

var e=e=>"string"==typeof e?e.replace((({onlyFirst:e=!1}={})=>{const t=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(t,e?void 0:"g")})(),""):e;const t=e=>!Number.isNaN(e)&&(e>=4352&&(e<=4447||9001===e||9002===e||11904<=e&&e<=12871&&12351!==e||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141));var r=t,n=t;r.default=n;const i=t=>{if("string"!=typeof t||0===t.length)return 0;if(0===(t=e(t)).length)return 0;t=t.replace(/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uD
Print (to stderr) where a cursor at the given position would move to after formatting.
This option cannot be used with --range-start and --range-end.
`,cliCategory:"Editor"},endOfLine:{since:"1.15.0",category:"Global",type:"choice",default:[{since:"1.15.0",value:"auto"},{since:"2.0.0",value:"lf"}],description:"Which end of line characters to apply.",choices:[{value:"lf",description:"Line Feed only (\\n), common on Linux and macOS as well as inside git repos"},{value:"crlf",description:"Carriage Return + Line Feed characters (\\r\\n), common on Windows"},{value:"cr",description:"Carriage Return character only (\\r), used very rarely"},{value:"auto",description:Ir`
Maintain existing
(mixed values within one file are normalised by looking at what's used after the first line)
`}]},filepath:{since:"1.4.0",category:"Special",type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:"Other",cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{since:"1.8.0",category:"Special",type:"boolean",default:!1,description:"Insert @format pragma into file's first docblock comment.",cliCategory:"Other"},parser:{since:"0.0.10",category:"Global",type:"choice",default:[{since:"0.0.10",value:"babylon"},{since:"1.13.0",value:void 0}],description:"Which parser to use.",exception:e=>"string"==typeof e||"function"==typeof e,choices:[{value:"flow",description:"Flow"},{value:"babel",since:"1.16.0",description:"JavaScript"},{value:"babel-flow",since:"1.16.0",description:"Flow"},{value:"babel-ts",since:"2.0.0",description:"TypeScript"},{value:"typescript",since:"1.4.0",description:"TypeScript"},{value:"espree",since:"2.2.0",description:"JavaScript"},{value:"meriyah",since:"2.2.0",description:"JavaScript"},{value:"css",since:"1.7.1",description:"CSS"},{value:"less",since:"1.7.1",description:"Less"},{value:"scss",since:"1.7.1",description:"SCSS"},{value:"json",since:"1.5.0",description:"JSON"},{value:"json5",since:"1.13.0",description:"JSON5"},{value:"json-stringify",since:"1.13.0",description:"JSON.stringify"},{value:"graphql",since:"1.5.0",description:"GraphQL"},{value:"markdown",since:"1.8.0",description:"Markdown"},{value:"mdx",since:"1.15.0",description:"MDX"},{value:"vue",since:"1.10.0",description:"Vue"},{value:"yaml",since:"1.14.0",description:"YAML"},{value:"glimmer",since:"2.3.0",description:"Ember / Handlebars"},{value:"html",since:"1.15.0",description:"HTML"},{value:"angular",since:"1.15.0",description:"Angular"},{value:"lwc",since:"1.17.0",description:"Lightning Web Components"}]},plugins:{since:"1.10.0",type:"path",array:!0,default:[{value:[]}],category:"Global",description:"Add a plugin. Multiple plugins can be passed as separate `--plugin`s.",exception:e=>"string"==typeof e||"object"==typeof e,cliName:"plugin",cliCategory:"Config"},pluginSearchDirs:{since:"1.13.0",type:"path",array:!0,default:[{value:[]}],category:"Global",description:Ir`
Custom directory that contains prettier plugins in node_modules subdirectory.
Overrides default behavior when plugins are searched relatively to the location of Prettier.
Multiple values are accepted.
`,exception:e=>"string"==typeof e||"object"==typeof e,cliName:"plugin-search-dir",cliCategory:"Config"},printWidth:{since:"0.0.0",category:"Global",type:"int",default:80,description:"The line length where Prettier will try wrap.",range:{start:0,end:Number.POSITIVE_INFINITY,step:1}},rangeEnd:{since:"1.4.0",category:"Special",type:"int",default:Number.POSITIVE_INFINITY,range:{start:0,end:Number.POSITIVE_INFINITY,step:1},description:Ir`
Format code ending at a given character offset (exclusive).
The range will extend forwards to the end of the selected statement.
This option cannot be used with --cursor-offset.
`,cliCategory:"Editor"},rangeStart:{since:"1.4.0",category:"Special",type:"int",default:0,range:{start:0,end:Number.POSITIVE_INFINITY,step:1},description:Ir`
Format code starting at a given character offset.
The range will extend backwards to the start of the first line containing the selected statement.
This option cannot be used with --cursor-offset.
`,cliCategory:"Editor"},requirePragma:{since:"1.7.0",category:"Special",type:"boolean",default:!1,description:Ir`
Require either '@prettier' or '@format' to be present in the file's first docblock comment
in order for it to be formatted.
`,cliCategory:"Other"},tabWidth:{type:"int",category:"Global",default:2,description:"Number of spaces per indentation level.",range:{start:0,end:Number.POSITIVE_INFINITY,step:1}},useTabs:{since:"1.0.0",category:"Global",type:"boolean",default:!1,description:"Indent with tabs instead of spaces."},embeddedLanguageFormatting:{since:"2.1.0",category:"Global",type:"choice",default:[{since:"2.1.0",value:"auto"}],description:"Control how Prettier formats quoted code embedded in the file.",choices:[{value:"auto",description:"Format embedded code if Prettier can automatically identify it."},{value:"off",description:"Never automatically format embedded code."}]}};const br=["cliName","cliCategory","cliDescription"],Nr={compare:xr,lt:Ar,gte:Sr},Br="2.4.1",Pr={CATEGORY_CONFIG:"Config",CATEGORY_EDITOR:"Editor",CATEGORY_FORMAT:"Format",CATEGORY_OTHER:"Other",CATEGORY_OUTPUT:"Output",CATEGORY_GLOBAL:"Global",CATEGORY_SPECIAL:"Special",options:Or}.options;var Tr={getSupportInfo:function({plugins:e=[],showUnreleased:t=!1,showDeprecated:r=!1,showInternal:n=!1}={}){const i=Br.split("-",1)[0],s=e.flatMap((e=>e.languages||[])).filter(D),u=(a=Object.assign({},...e.map((({options:e})=>e)),Pr),o="name",Object.entries(a).map((([e,t])=>Object.assign({[o]:e},t)))).filter((e=>D(e)&&l(e))).sort(((e,t)=>e.name===t.name?0:e.name<t.name?-1:1)).map((function(e){if(n)return e;return c(e,br)})).map((t=>{t=Object.assign({},t),Array.isArray(t.default)&&(t.default=1===t.default.length?t.default[0].value:t.default.filter(D).sort(((e,t)=>Nr.compare(t.since,e.since)))[0].value),Array.isArray(t.choices)&&(t.choices=t.choices.filter((e=>D(e)&&l(e))),"parser"===t.name&&function(e,t,r){const n=new Set(e.choices.map((e=>e.value)));for(const i of t)if(i.parsers)for(const t of i.parsers)if(!n.has(t)){n.add(t);const s=r.find((e=>e.parsers&&e.parsers[t]));let u=i.name;s&&s.name&&(u+=` (plugin: ${s.name})`),e.choices.push({value:t,description:u})}}(t,s,e));const r=Object.fromEntries(e.filter((e=>e.defaultOptions&&void 0!==e.defaultOptions[t.name])).map((e=>[e.name,e.defaultOptions[t.name]])));return Object.assign(Object.assign({},t),{},{pluginDefaults:r})}));var a,o;return{languages:s,options:u};function D(e){return t||!("since"in e)||e.since&&Nr.gte(i,e.since)}function l(e){return r||!("deprecated"in e)||e.deprecated&&Nr.lt(i,e.deprecated)}}};const{getSupportInfo:Lr}=Tr,Rr=/[^\x20-\x7F]/;function kr(e){return(t,r,n)=>{const i=n&&n.backwards;if(!1===r)return!1;const{length:s}=t;let u=r;for(;u>=0&&u<s;){const r=t.charAt(u);if(e instanceof RegExp){if(!e.test(r))return u}else if(!e.includes(r))return u;i?u--:u++}return(-1===u||u===s)&&u}}const $r=kr(/\s/),_r=kr(" \t"),Mr=kr(",; \t"),jr=kr(/[^\n\r]/);function Gr(e,t){if(!1===t)return!1;if("/"===e.charAt(t)&&"*"===e.charAt(t+1))for(let r=t+2;r<e.length;++r)if("*"===e.charAt(r)&&"/"===e.charAt(r+1))return r+2;return t}function Kr(e,t){return!1!==t&&("/"===e.charAt(t)&&"/"===e.charAt(t+1)?jr(e,t):t)}function Ur(e,t,r){const n=r&&r.backwards;if(!1===t)return!1;const i=e.charAt(t);if(n){if("\r"===e.charAt(t-1)&&"\n"===i)return t-2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t-1}else{if("\r"===i&&"\n"===e.charAt(t+1))return t+2;if("\n"===i||"\r"===i||"\u2028"===i||"\u2029"===i)return t+1}return t}function Wr(e,t,r={}){const n=_r(e,r.backwards?t-1:t,r);return n!==Ur(e,n,r)}function Vr(e,t){let r=null,n=t;for(;n!==r;)r=n,n=Mr(e,n),n=Gr(e,n),n=_r(e,n);return n=Kr(e,n),n=Ur(e,n),!1!==n&&Wr(e,n)}function Xr(e,t){let r=null,n=t;for(;n!==r;)r=n,n=_r(e,n),n=Gr(e,n),n=Kr(e,n),n=Ur(e,n);return n}function zr(e,t,r){return Xr(e,r(t))}function qr(e,t,r=0){let n=0;for(let i=r;i<e.length;++i)"\t"===e[i]?n=n+t-n%t:n++;return n}function Qr(e,t){const r=e.slice(1,-1),n={quote:'"',regex:/"/g},i={quote:"'",regex:/'/g},s="'"===t?i:n,u=s===i?n:i;let a=s.quote;if(r.includes(s.quote)||r.includes(u.quote)){a=(r.match(s.regex)||[]).length>(r.match(u.regex)||[]).length?u.quote:s.quote}return a}function Yr(e,t,r){const n='"'===t?"'":'"',i=e.replace(/\\(.)|(["'])/gs,((e,i,s)=>i===n?i:s===t?"\\"+s:s||(r&&/^[^\n\r"'0-7\\bfnrt-vx\u2028\u2029]$/.
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
class on{constructor(e,t,r,n){this.input=t,this.errLocation=r,this.ctxLocation=n,this.message=`Parser Error: ${e} ${r} [${t}] in ${n}`}}class cn{constructor(e,t){this.start=e,this.end=t}toAbsolute(e){return new kn(e+this.start,e+this.end)}}class Dn{constructor(e,t){this.span=e,this.sourceSpan=t}toString(){return"AST"}}class ln extends Dn{constructor(e,t,r){super(e,t),this.nameSpan=r}}class pn extends Dn{constructor(e,t,r,n,i){super(e,t),this.prefix=r,this.uninterpretedExpression=n,this.location=i}visit(e,t=null){return e.visitQuote(this,t)}toString(){return"Quote"}}class hn extends Dn{visit(e,t=null){}}class dn extends Dn{visit(e,t=null){return e.visitImplicitReceiver(this,t)}}class fn extends dn{visit(e,t=null){var r;return null===(r=e.visitThisReceiver)||void 0===r?void 0:r.call(e,this,t)}}class En extends Dn{constructor(e,t,r){super(e,t),this.expressions=r}visit(e,t=null){return e.visitChain(this,t)}}class vn extends Dn{constructor(e,t,r,n,i){super(e,t),this.condition=r,this.trueExp=n,this.falseExp=i}visit(e,t=null){return e.visitConditional(this,t)}}class Cn extends ln{constructor(e,t,r,n,i){super(e,t,r),this.receiver=n,this.name=i}visit(e,t=null){return e.visitPropertyRead(this,t)}}class gn extends ln{constructor(e,t,r,n,i,s){super(e,t,r),this.receiver=n,this.name=i,this.value=s}visit(e,t=null){return e.visitPropertyWrite(this,t)}}class Fn extends ln{constructor(e,t,r,n,i){super(e,t,r),this.receiver=n,this.name=i}visit(e,t=null){return e.visitSafePropertyRead(this,t)}}class mn extends Dn{constructor(e,t,r,n){super(e,t),this.receiver=r,this.key=n}visit(e,t=null){return e.visitKeyedRead(this,t)}}class yn extends Dn{constructor(e,t,r,n){super(e,t),this.receiver=r,this.key=n}visit(e,t=null){return e.visitSafeKeyedRead(this,t)}}class xn extends Dn{constructor(e,t,r,n,i){super(e,t),this.receiver=r,this.key=n,this.value=i}visit(e,t=null){return e.visitKeyedWrite(this,t)}}class An extends ln{constructor(e,t,r,n,i,s){super(e,t,s),this.exp=r,this.name=n,this.args=i}visit(e,t=null){return e.visitPipe(this,t)}}class Sn extends Dn{constructor(e,t,r){super(e,t),this.value=r}visit(e,t=null){return e.visitLiteralPrimitive(this,t)}}class wn extends Dn{constructor(e,t,r){super(e,t),this.expressions=r}visit(e,t=null){return e.visitLiteralArray(this,t)}}class In extends Dn{constructor(e,t,r,n){super(e,t),this.keys=r,this.values=n}visit(e,t=null){return e.visitLiteralMap(this,t)}}class On extends Dn{constructor(e,t,r,n){super(e,t),this.strings=r,this.expressions=n}visit(e,t=null){return e.visitInterpolation(this,t)}}class bn extends Dn{constructor(e,t,r,n,i){super(e,t),this.operation=r,this.left=n,this.right=i}visit(e,t=null){return e.visitBinary(this,t)}}class Nn extends bn{constructor(e,t,r,n,i,s,u){super(e,t,i,s,u),this.operator=r,this.expr=n}static createMinus(e,t,r){return new Nn(e,t,"-",r,"-",new Sn(e,t,0),r)}static createPlus(e,t,r){return new Nn(e,t,"+",r,"-",r,new Sn(e,t,0))}visit(e,t=null){return void 0!==e.visitUnary?e.visitUnary(this,t):e.visitBinary(this,t)}}class Bn extends Dn{constructor(e,t,r){super(e,t),this.expression=r}visit(e,t=null){return e.visitPrefixNot(this,t)}}class Pn extends Dn{constructor(e,t,r){super(e,t),this.expression=r}visit(e,t=null){return e.visitNonNullAssert(this,t)}}class Tn extends ln{constructor(e,t,r,n,i,s,u){super(e,t,r),this.receiver=n,this.name=i,this.args=s,this.argumentSpan=u}visit(e,t=null){return e.visitMethodCall(this,t)}}class Ln extends ln{constructor(e,t,r,n,i,s,u){super(e,t,r),this.receiver=n,this.name=i,this.args=s,this.argumentSpan=u}visit(e,t=null){return e.visitSafeMethodCall(this,t)}}class Rn extends Dn{constructor(e,t,r,n){super(e,t),this.target=r,this.args=n}visit(e,t=null){return e.visitFunctionCall(this,t)}}class kn{constructor(e,t){this.start=e,this.end=t}}class $n extends Dn{constructor(e,t,r,n,i){super(new cn(0,null===t?0:t.length),new kn(n,null===t?n:n+t.length)),this.ast=e,this.source=t,this.location=r,this.errors=i}visit(e,t=null){return e.visitASTWithSource?e.visitASTWithSource(this,t):this.ast.visit(e,t)}toString(){return`${this.source} in ${this.location}`}}class _
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/function Kn(e){return 48<=e&&e<=57}function Un(e){return 39===e||34===e||96===e}
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/var Wn;!function(e){e[e.Character=0]="Character",e[e.Identifier=1]="Identifier",e[e.PrivateIdentifier=2]="PrivateIdentifier",e[e.Keyword=3]="Keyword",e[e.String=4]="String",e[e.Operator=5]="Operator",e[e.Number=6]="Number",e[e.Error=7]="Error"}(Wn||(Wn={}));const Vn=["var","let","as","null","undefined","true","false","if","else","this"];class Xn{constructor(e,t,r,n,i){this.index=e,this.end=t,this.type=r,this.numValue=n,this.strValue=i}isCharacter(e){return this.type==Wn.Character&&this.numValue==e}isNumber(){return this.type==Wn.Number}isString(){return this.type==Wn.String}isOperator(e){return this.type==Wn.Operator&&this.strValue==e}isIdentifier(){return this.type==Wn.Identifier}isPrivateIdentifier(){return this.type==Wn.PrivateIdentifier}isKeyword(){return this.type==Wn.Keyword}isKeywordLet(){return this.type==Wn.Keyword&&"let"==this.strValue}isKeywordAs(){return this.type==Wn.Keyword&&"as"==this.strValue}isKeywordNull(){return this.type==Wn.Keyword&&"null"==this.strValue}isKeywordUndefined(){return this.type==Wn.Keyword&&"undefined"==this.strValue}isKeywordTrue(){return this.type==Wn.Keyword&&"true"==this.strValue}isKeywordFalse(){return this.type==Wn.Keyword&&"false"==this.strValue}isKeywordThis(){return this.type==Wn.Keyword&&"this"==this.strValue}isError(){return this.type==Wn.Error}toNumber(){return this.type==Wn.Number?this.numValue:-1}toString(){switch(this.type){case Wn.Character:case Wn.Identifier:case Wn.Keyword:case Wn.Operator:case Wn.PrivateIdentifier:case Wn.String:case Wn.Error:return this.strValue;case Wn.Number:return this.numValue.toString();default:return null}}}function zn(e,t,r){return new Xn(e,t,Wn.Character,r,String.fromCharCode(r))}function qn(e,t,r){return new Xn(e,t,Wn.Operator,0,r)}const Qn=new Xn(-1,-1,Wn.Character,0,"");class Yn{constructor(e){this.input=e,this.peek=0,this.index=-1,this.length=e.length,this.advance()}advance(){this.peek=++this.index>=this.length?0:this.input.charCodeAt(this.index)}scanToken(){const e=this.input,t=this.length;let r=this.peek,n=this.index;for(;r<=32;){if(++n>=t){r=0;break}r=e.charCodeAt(n)}if(this.peek=r,this.index=n,n>=t)return null;if(Hn(r))return this.scanIdentifier();if(Kn(r))return this.scanNumber(n);const i=n;switch(r){case 46:return this.advance(),Kn(this.peek)?this.scanNumber(i):zn(i,this.index,46);case 40:case 41:case 123:case 125:case 91:case 93:case 44:case 58:case 59:return this.scanCharacter(i,r);case 39:case 34:return this.scanString();case 35:return this.scanPrivateIdentifier();case 43:case 45:case 42:case 47:case 37:case 94:return this.scanOperator(i,String.fromCharCode(r));case 63:return this.scanQuestion(i);case 60:case 62:return this.scanComplexOperator(i,String.fromCharCode(r),61,"=");case 33:case 61:return this.scanComplexOperator(i,String.fromCharCode(r),61,"=",61,"=");case 38:return this.scanComplexOperator(i,"&",38,"&");case 124:return this.scanComplexOperator(i,"|",124,"|");case 160:for(;(s=this.peek)>=9&&s<=32||160==s;)this.advance();return this.scanToken()}var s;return this.advance(),this.error(`Unexpected character [${String.fromCharCode(r)}]`,0)}scanCharacter(e,t){return this.advance(),zn(e,this.index,t)}scanOperator(e,t){return this.advance(),qn(e,this.index,t)}scanComplexOperator(e,t,r,n,i,s){this.advance();let u=t;return this.peek==r&&(this.advance(),u+=n),null!=i&&this.peek==i&&(this.advance(),u+=s),qn(e,this.index,u)}scanIdentifier(){const e=this.index;for(this.advance();Zn(this.peek);)this.advance();const t=this.input.substring(e,this.index);return Vn.indexOf(t)>-1?(r=e,n=this.index,i=t,new Xn(r,n,Wn.Keyword,0,i)):function(e,t,r){return new Xn(e,t,Wn.Identifier,0,r)}(e,this.index,t);var r,n,i}scanPrivateIdentifier(){const e=this.index;if(this.advance(),!Hn(this.peek))return this.error("Invalid character [#]",-1);for(;Zn(this.peek);)this.advance();const t=this.input.substring(e,this.index);return r=e,n=this.index,i=t,new Xn(r,n,Wn.PrivateIdentifier,0,i);var r,n,i}scanNumber(e){let t=this.index===e,r=!1;for(this.advance();;){if(Kn(this.peek));else if(95===this.peek){if(!Kn(this.input.charCodeAt(this.index-1))||!Kn(this.in
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/const ni=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
class ii{constructor(e,t){this.start=e,this.end=t}static fromArray(e){return e?(function(e,t){if(!(null==t||Array.isArray(t)&&2==t.length))throw new Error(`Expected '${e}' to be an array, [start, end].`);if(null!=t){const e=t[0],r=t[1];ni.forEach((t=>{if(t.test(e)||t.test(r))throw new Error(`['${e}', '${r}'] contains unusable interpolation symbol.`)}))}}("interpolation",e),new ii(e[0],e[1])):si}}const si=new ii("{{","}}");
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/class ui{constructor(e,t,r){this.strings=e,this.expressions=t,this.offsets=r}}class ai{constructor(e,t,r){this.templateBindings=e,this.warnings=t,this.errors=r}}class oi{constructor(e){this._lexer=e,this.errors=[],this.simpleExpressionChecker=li}parseAction(e,t,r,n=si){this._checkNoInterpolation(e,t,n);const i=this._stripComments(e),s=this._lexer.tokenize(this._stripComments(e)),u=new Di(e,t,r,s,i.length,!0,this.errors,e.length-i.length).parseChain();return new $n(u,e,t,r,this.errors)}parseBinding(e,t,r,n=si){const i=this._parseBindingAst(e,t,r,n);return new $n(i,e,t,r,this.errors)}checkSimpleExpression(e){const t=new this.simpleExpressionChecker;return e.visit(t),t.errors}parseSimpleBinding(e,t,r,n=si){const i=this._parseBindingAst(e,t,r,n),s=this.checkSimpleExpression(i);return s.length>0&&this._reportError(`Host binding expression cannot contain ${s.join(" ")}`,e,t),new $n(i,e,t,r,this.errors)}_reportError(e,t,r,n){this.errors.push(new on(e,t,r,n))}_parseBindingAst(e,t,r,n){const i=this._parseQuote(e,t,r);if(null!=i)return i;this._checkNoInterpolation(e,t,n);const s=this._stripComments(e),u=this._lexer.tokenize(s);return new Di(e,t,r,u,s.length,!1,this.errors,e.length-s.length).parseChain()}_parseQuote(e,t,r){if(null==e)return null;const n=e.indexOf(":");if(-1==n)return null;const i=e.substring(0,n).trim();if(!Jn(i))return null;const s=e.substring(n+1),u=new cn(0,e.length);return new pn(u,u.toAbsolute(r),i,s,t)}parseTemplateBindings(e,t,r,n,i){const s=this._lexer.tokenize(t);return new Di(t,r,i,s,t.length,!1,this.errors,0).parseTemplateBindings({source:e,span:new kn(n,n+e.length)})}parseInterpolation(e,t,r,n=si){const{strings:i,expressions:s,offsets:u}=this.splitInterpolation(e,t,n);if(0===s.length)return null;const a=[];for(let n=0;n<s.length;++n){const i=s[n].text,o=this._stripComments(i),c=this._lexer.tokenize(o),D=new Di(e,t,r,c,o.length,!1,this.errors,u[n]+(i.length-o.length)).parseChain();a.push(D)}return this.createInterpolationAst(i.map((e=>e.text)),a,e,t,r)}parseInterpolationExpression(e,t,r){const n=this._stripComments(e),i=this._lexer.tokenize(n),s=new Di(e,t,r,i,n.length,!1,this.errors,0).parseChain();return this.createInterpolationAst(["",""],[s],e,t,r)}createInterpolationAst(e,t,r,n,i){const s=new cn(0,r.length),u=new On(s,s.toAbsolute(i),e,t);return new $n(u,r,n,i,this.errors)}splitInterpolation(e,t,r=si){const n=[],i=[],s=[];let u=0,a=!1,o=!1,{start:c,end:D}=r;for(;u<e.length;)if(a){const r=u,n=r+c.length,l=this._getInterpolationEndIndex(e,D,n);if(-1===l){a=!1,o=!0;break}const p=l+D.length,h=e.substring(n,l);0===h.trim().length&&this._reportError("Blank expressions are not allowed in interpolated strings",e,`at column ${u} in`,t),i.push({text:h,start:r,end:p}),s.push(n),u=p,a=!1}else{const t=u;u=e.indexOf(c,u),-1===u&&(u=e.length);const r=e.substring(t,u);n.push({text:r,start:t,end:u}),a=!0}if(!a)if(o){const t=n[n.length-1];t.text+=e.substring(u),t.end=e.length}else n.push({text:e.substring(u),start:u,end:e.length});return new ui(n,i,s)}wrapLiteralPrimitive(e,t,r){const n=new cn(0,null==e?0:e.length);return new $n(new Sn(n,n.toAbsolute(r),e),e,t,r,this.errors)}_stripComments(e){const t=this._commentStart(e);return null!=t?e.substring(0,t).trim():e}_commentStart(e){let t=null;for(let r=0;r<e.length-1;r++){const n=e.charCodeAt(r),i=e.charCodeAt(r+1);if(47===n&&47==i&&null==t)return r;t===n?t=null:null==t&&Un(n)&&(t=n)}return null}_checkNoInterpolation(e,t,{start:r,end:n}){let i=-1,s=-1;for(const t of this._forEachUnquotedChar(e,0))if(-1===i)e.startsWith(r)&&(i=t);else if(s=this._getInterpolationEndIndex(e,n,t),s>-1)break;i>-1&&s>-1&&this._reportError(`Got interpolation (${r}${n}) where expression was expected`,e,`at column ${i} in`,t)}_getInterpolationEndIndex(e,t,r){for(const n of this._forEachUnquotedChar(e,r)){if(e.startsWith(t,n))return n;if(e.startsWith("//",n))return e.indexOf(t,n)}return-1}*_forEachUnquotedChar(e,t){let r=null,n=0;for(let i=t;i<e.length;i++){const t=e[i];!Un(e.charCodeAt(i))||null!==r&&r!==t||n%2!=0?null===r&&(yield i):r=null===r?t:null,n="\\"===t?n+1:0}}}var ci;!function(e){e