2021-07-27 16:54:26 +00:00
! function ( e , t ) { "object" == typeof exports && "undefined" != typeof module ? module . exports = t ( ) : "function" == typeof define && define . amd ? define ( t ) : ( ( e = "undefined" != typeof globalThis ? globalThis : e || self ) . prettierPlugins = e . prettierPlugins || { } , e . prettierPlugins . html = t ( ) ) } ( this , ( function ( ) { "use strict" ; var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : { } ; function t ( e ) { var t = { exports : { } } ; return e ( t , t . exports ) , t . exports } var r = t ( ( function ( e , t ) { function r ( e ) { return t . $0 <= e && e <= t . $9 }
2020-09-14 10:42:37 +01:00
/**
* @license
* Copyright Google Inc. 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
*/
2021-07-27 16:54:26 +00:00
Object . defineProperty ( t , "__esModule" , { value : ! 0 } ) , t . $EOF = 0 , t . $BSPACE = 8 , t . $TAB = 9 , t . $LF = 10 , t . $VTAB = 11 , t . $FF = 12 , t . $CR = 13 , t . $SPACE = 32 , t . $BANG = 33 , t . $DQ = 34 , t . $HASH = 35 , t . $$ = 36 , t . $PERCENT = 37 , t . $AMPERSAND = 38 , t . $SQ = 39 , t . $LPAREN = 40 , t . $RPAREN = 41 , t . $STAR = 42 , t . $PLUS = 43 , t . $COMMA = 44 , t . $MINUS = 45 , t . $PERIOD = 46 , t . $SLASH = 47 , t . $COLON = 58 , t . $SEMICOLON = 59 , t . $LT = 60 , t . $EQ = 61 , t . $GT = 62 , t . $QUESTION = 63 , t . $0 = 48 , t . $7 = 55 , t . $9 = 57 , t . $A = 65 , t . $E = 69 , t . $F = 70 , t . $X = 88 , t . $Z = 90 , t . $LBRACKET = 91 , t . $BACKSLASH = 92 , t . $RBRACKET = 93 , t . $CARET = 94 , t . $ _ = 95 , t . $a = 97 , t . $b = 98 , t . $e = 101 , t . $f = 102 , t . $n = 110 , t . $r = 114 , t . $t = 116 , t . $u = 117 , t . $v = 118 , t . $x = 120 , t . $z = 122 , t . $LBRACE = 123 , t . $BAR = 124 , t . $RBRACE = 125 , t . $NBSP = 160 , t . $PIPE = 124 , t . $TILDA = 126 , t . $AT = 64 , t . $BT = 96 , t . isWhitespace = function ( e ) { return e >= t . $TAB && e <= t . $SPACE || e == t . $NBSP } , t . isDigit = r , t . isAsciiLetter = function ( e ) { return e >= t . $a && e <= t . $z || e >= t . $A && e <= t . $Z } , t . isAsciiHexDigit = function ( e ) { return e >= t . $a && e <= t . $f || e >= t . $A && e <= t . $F || r ( e ) } , t . isNewLine = function ( e ) { return e === t . $LF || e === t . $CR } , t . isOctalDigit = function ( e ) { return t . $0 <= e && e <= t . $7 } } ) ) ;
2020-09-14 10:42:37 +01:00
/**
2021-07-27 16:54:26 +00:00
* @license
* Copyright Google Inc. 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 n { constructor ( e , t , r ) { this . filePath = e , this . name = t , this . members = r } assertNoMembers ( ) { if ( this . members . length ) throw new Error ( ` Illegal state: symbol without members expected, but got ${ JSON . stringify ( this ) } . ` ) } } var i = n ; var s = class { constructor ( ) { this . cache = new Map } get ( e , t , r ) { const i = ` " ${ e } ". ${ t } ${ ( r = r || [ ] ) . length ? ` . ${ r . join ( "." ) } ` : "" } ` ; let s = this . cache . get ( i ) ; return s || ( s = new n ( e , t , r ) , this . cache . set ( i , s ) ) , s } } , o = Object . defineProperty ( { StaticSymbol : i , StaticSymbolCache : s } , "__esModule" , { value : ! 0 } ) ;
2020-09-14 10:42:37 +01:00
/**
2021-07-27 16:54:26 +00:00
* @license
* Copyright Google Inc. 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 a = /-+([a-z0-9])/g ; var u = function ( e ) { return e . replace ( a , ( ( ... e ) => e [ 1 ] . toUpperCase ( ) ) ) } ; var c = function ( e , t ) { return p ( e , ":" , t ) } ; var l = function ( e , t ) { return p ( e , "." , t ) } ; function p ( e , t , r ) { const n = e . indexOf ( t ) ; return - 1 == n ? r : [ e . slice ( 0 , n ) . trim ( ) , e . slice ( n + 1 ) . trim ( ) ] } function D ( e , t , r ) { return Array . isArray ( e ) ? t . visitArray ( e , r ) : "object" == typeof ( n = e ) && null !== n && Object . getPrototypeOf ( n ) === b ? t . visitStringMap ( e , r ) : null == e || "string" == typeof e || "number" == typeof e || "boolean" == typeof e ? t . visitPrimitive ( e , r ) : t . visitOther ( e , r ) ; var n } var h = D ; var d = function ( e ) { return null != e } ; var f = function ( e ) { return void 0 === e ? null : e } ; var m = class { visitArray ( e , t ) { return e . map ( ( e => D ( e , this , t ) ) ) } visitStringMap ( e , t ) { const r = { } ; return Object . keys ( e ) . forEach ( ( n => { r [ n ] = D ( e [ n ] , this , t ) } ) ) , r } visitPrimitive ( e , t ) { return e } visitOther ( e , t ) { return e } } , g = { assertSync : e => { if ( N ( e ) ) throw new Error ( "Illegal state: value cannot be a promise" ) ; return e } , then : ( e , t ) => N ( e ) ? e . then ( t ) : t ( e ) , all : e => e . some ( N ) ? Promise . all ( e ) : e } ; var E = function ( e ) { throw new Error ( ` Internal Error: ${ e } ` ) } ; var C = function ( e , t ) { const r = Error ( e ) ; return r [ T ] = ! 0 , t && ( r [ y ] = t ) , r } ; const T = "ngSyntaxError" , y = "ngParseErrors" ; var S = function ( e ) { return e [ T ] } ; var _ = function ( e ) { return e [ y ] || [ ] } ; var v = function ( e ) { return e . replace ( /([.*+?^=!:${}()|[\]\/\\])/g , "\\$1" ) } ; const b = Object . getPrototypeOf ( { } ) ; var F = function ( e ) { let t = "" ; for ( let r = 0 ; r < e . length ; r ++ ) { let n = e . charCodeAt ( r ) ; if ( n >= 55296 && n <= 56319 && e . length > r + 1 ) { const t = e . charCodeAt ( r + 1 ) ; t >= 56320 && t <= 57343 && ( r ++ , n = ( n - 55296 << 10 ) + t - 56320 + 65536 ) } n <= 127 ? t += String . fromCharCode ( n ) : n <= 2047 ? t += String . fromCharCode ( n >> 6 & 31 | 192 , 63 & n | 128 ) : n <= 65535 ? t += String . fromCharCode ( n >> 12 | 224 , n >> 6 & 63 | 128 , 63 & n | 128 ) : n <= 2097151 && ( t += String . fromCharCode ( n >> 18 & 7 | 240 , n >> 12 & 63 | 128 , n >> 6 & 63 | 128 , 63 & n | 128 ) ) } return t } ; var A = function e ( t ) { if ( "string" == typeof t ) return t ; if ( t instanceof Array ) return "[" + t . map ( e ) . join ( ", " ) + "]" ; if ( null == t ) return "" + t ; if ( t . overriddenName ) return ` ${ t . overriddenName } ` ; if ( t . name ) return ` ${ t . name } ` ; if ( ! t . toString ) return "object" ; const r = t . toString ( ) ; if ( null == r ) return "" + r ; const n = r . indexOf ( "\n" ) ; return - 1 === n ? r : r . substring ( 0 , n ) } ; var w = function ( e ) { return "function" == typeof e && e . hasOwnProperty ( "__forward_ref__" ) ? e ( ) : e } ; function N ( e ) { return ! ! e && "function" == typeof e . then } var k = N ; var O = class { constructor ( e ) { this . full = e ; const t = e . split ( "." ) ; this . major = t [ 0 ] , this . minor = t [ 1 ] , this . patch = t . slice ( 2 ) . join ( "." ) } } ; const x = "undefined" != typeof window && window , P = "undefined" != typeof self && "undefined" != typeof WorkerGlobalScope && self instanceof WorkerGlobalScope && self ; var I = void 0 !== e && e || x || P , R = Object . defineProperty ( { dashCaseToCamelCase : u , splitAtColon : c , splitAtPeriod : l , visitValue : h , isDefined : d , noUndefined : f , ValueTransformer : m , SyncAsync : g , error : E , syntaxError : C , isSyntaxError : S , getParseErrors : _ , escapeRegExp : v , utf8Encode : F , stringify : A , resolveForwardRef : w , isPromise : k , Version : O , global : I } , "__esModule" , { value : ! 0 } ) , L = t ( ( function ( e , t ) {
2020-09-14 10:42:37 +01:00
/**
* @license
* Copyright Google Inc. 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
*/
2021-07-27 16:54:26 +00:00
Object . defineProperty ( t , "__esModule" , { value : ! 0 } ) ; const r = /^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))|(\@[-\w]+)$/ ; function n ( e ) { return e . replace ( /\W/g , "_" ) } t . sanitizeIdentifier = n ; let i = 0 ; function s ( e ) { if ( ! e || ! e . reference ) return null ; const t = e . reference ; if ( t instanceof o . StaticSymbol ) return t . name ; if ( t . _ _anonymousType ) return t . _ _anonymousType ; let r = R . stringify ( t ) ; return r . indexOf ( "(" ) >= 0 ? ( r = "anonymous_" + i ++ , t . _ _anonymousType = r ) : r = n ( r ) , r } var a ; t . identifierName = s , t . identifierModuleUrl = function ( e ) { const t = e . reference ; return t instanceof o . StaticSymbol ? t . filePath : ` ./ ${ R . stringify ( t ) } ` } , t . viewClassName = function ( e , t ) { return ` View_ ${ s ( { reference : e } )}_ ${ t } ` } , t . rendererTypeName = function ( e ) { return ` RenderType_ ${ s ( { reference : e } )} ` } , t . hostViewClassName = function ( e ) { return ` HostView_ ${ s ( { reference : e } )} ` } , t . componentFactoryName = function ( e ) { return ` ${ s ( { reference : e } )}NgFactory ` } , function ( e ) { e [ e . Pipe = 0 ] = "Pipe" , e [ e . Directive = 1 ] = "Directive" , e [ e . NgModule = 2 ] = "NgModule" , e [ e . Injectable = 3 ] = "Injectable" } ( a = t . CompileSummaryKind || ( t . CompileSummaryKind = { } ) ) , t . tokenName = function ( e ) { return null != e . value ? n ( e . value ) : s ( e . identifier ) } , t . tokenReference = function ( e ) { return null != e . identifier ? e . identifier . reference : e . value } ; t . CompileStylesheetMetadata = class { constructor ( { moduleUrl : e , styles : t , styleUrls : r } = { } ) { this . moduleUrl = e || null , this . styles = c ( t ) , this . styleUrls = c ( r ) } } ; t . CompileTemplateMetadata = class { constructor ( { encapsulation : e , template : t , templateUrl : r , htmlAst : n , styles : i , styleUrls : s , externalStylesheets : o , animations : a , ngContentSelectors : u , interpolation : p , isInline : D , preserveWhitespaces : h } ) { if ( this . encapsulation = e , this . template = t , this . templateUrl = r , this . htmlAst = n , this . styles = c ( i ) , this . styleUrls = c ( s ) , this . externalStylesheets = c ( o ) , this . animations = a ? l ( a ) : [ ] , this . ngContentSelectors = u || [ ] , p && 2 != p . length ) throw new Error ( "'interpolation' should have a start and an end symbol." ) ; this . interpolation = p , this . isInline = D , this . preserveWhitespaces = h } toSummary ( ) { return { ngContentSelectors : this . ngContentSelectors , encapsulation : this . encapsulation , styles : this . styles , animations : this . animations } } } ; class u { static create ( { isHost : e , type : t , isComponent : n , selector : i , exportAs : s , changeDetection : o , inputs : a , outputs : c , host : l , providers : p , viewProviders : D , queries : h , guards : d , viewQueries : f , entryComponents : m , template : g , componentViewType : E , rendererType : C , componentFactory : T } ) { const y = { } , S = { } , _ = { } ; null != l && Object . keys ( l ) . forEach ( ( e => { const t = l [ e ] , n = e . match ( r ) ; null === n ? _ [ e ] = t : null != n [ 1 ] ? S [ n [ 1 ] ] = t : null != n [ 2 ] && ( y [ n [ 2 ] ] = t ) } ) ) ; const v = { } ; null != a && a . forEach ( ( e => { const t = R . splitAtColon ( e , [ e , e ] ) ; v [ t [ 0 ] ] = t [ 1 ] } ) ) ; const b = { } ; return null != c && c . forEach ( ( e => { const t = R . splitAtColon ( e , [ e , e ] ) ; b [ t [ 0 ] ] = t [ 1 ] } ) ) , new u ( { isHost : e , type : t , isComponent : ! ! n , selector : i , exportAs : s , changeDetection : o , inputs : v , outputs : b , hostListeners : y , hostProperties : S , hostAttributes : _ , providers : p , viewProviders : D , queries : h , guards : d , viewQueries : f , entryComponents : m , template : g , componentViewType : E , rendererType : C , componentFactory : T } ) } constructor ( { isHost : e , type : t , isComponent : r , selector : n , exportAs : i , changeDetection : s , inputs : o , outputs : a , hostListeners : u , hostProperties : l , hostAttributes : p , providers : D , viewProviders : h , queries : d , guards : f , viewQueries : m , entryComponents : g , template : E , componentViewType : C , rendererType : T , componentFactory : y } ) { this . isHost = ! ! e , this . type = t , this . isComponent = r , this . selector = n , this . exportAs = i , this . changeDetection = s , this . inputs = o , this . outputs = a , this . hostListeners = u , this . hostProperties = l , this . hostAttributes = p , this . providers = c ( D ) , this . viewProviders = c ( h ) , this . queries = c ( d ) , this . guards = f , this . viewQueries = c ( m ) , this . entryComponents = c ( g ) , this . template = E , this . componentViewType = C , this . rendererType = T , this . componentFactory = y } toSummary ( ) { return { summaryKind : a . Directive , type : this . type , isComponent : this . isComponent , selector : this . selector , exportAs : this . exportAs , inputs : this . inputs , outputs : this . outputs , hostListeners : this . hostListeners , hostProperties : this . hostProperties , hostAttributes : this . hostAttributes , providers : this . providers , viewProviders : this . viewProviders , queries : this . queries , guards : this . guards , viewQueries : this . viewQueries , entryComponents : this . entryComponents , changeDete
2020-09-14 10:42:37 +01:00
/**
* @license
* Copyright Google Inc. 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
*/
2021-07-27 16:54:26 +00:00
class n { constructor ( e , t , r , n ) { this . file = e , this . offset = t , this . line = r , this . col = n } toString ( ) { return null != this . offset ? ` ${ this . file . url } @ ${ this . line } : ${ this . col } ` : this . file . url } moveBy ( e ) { const t = this . file . content , i = t . length ; let s = this . offset , o = this . line , a = this . col ; for ( ; s > 0 && e < 0 ; ) { s -- , e ++ ; if ( t . charCodeAt ( s ) == r . $LF ) { o -- ; const e = t . substr ( 0 , s - 1 ) . lastIndexOf ( String . fromCharCode ( r . $LF ) ) ; a = e > 0 ? s - e : s } else a -- } for ( ; s < i && e > 0 ; ) { const n = t . charCodeAt ( s ) ; s ++ , e -- , n == r . $LF ? ( o ++ , a = 0 ) : a ++ } return new n ( this . file , s , o , a ) } getContext ( e , t ) { const r = this . file . content ; let n = this . offset ; if ( null != n ) { n > r . length - 1 && ( n = r . length - 1 ) ; let i = n , s = 0 , o = 0 ; for ( ; s < e && n > 0 && ( n -- , s ++ , "\n" != r [ n ] || ++ o != t ) ; ) ; for ( s = 0 , o = 0 ; s < e && i < r . length - 1 && ( i ++ , s ++ , "\n" != r [ i ] || ++ o != t ) ; ) ; return { before : r . substring ( n , this . offset ) , after : r . substring ( this . offset , i + 1 ) } } return null } } t . ParseLocation = n ; class i { constructor ( e , t ) { this . content = e , this . url = t } } t . ParseSourceFile = i ; class s { constructor ( e , t , r = null ) { this . start = e , this . end = t , this . details = r } toString ( ) { return this . start . file . content . substring ( this . start . offset , this . end . offset ) } } var o ; t . ParseSourceSpan = s , t . EMPTY _PARSE _LOCATION = new n ( new i ( "" , "" ) , 0 , 0 , 0 ) , t . EMPTY _SOURCE _SPAN = new s ( t . EMPTY _PARSE _LOCATION , t . EMPTY _PARSE _LOCATION ) , function ( e ) { e [ e . WARNING = 0 ] = "WARNING" , e [ e . ERROR = 1 ] = "ERROR" } ( o = t . ParseErrorLevel || ( t . ParseErrorLevel = { } ) ) ; t . ParseError = class { constructor ( e , t , r = o . ERROR ) { this . span = e , this . msg = t , this . level = r } contextualMessage ( ) { const e = this . span . start . getContext ( 100 , 3 ) ; return e ? ` ${ this . msg } (" ${ e . before } [ ${ o [ this . level ] } ->] ${ e . after } ") ` : this . msg } toString ( ) { const e = this . span . details ? ` , ${ this . span . details } ` : "" ; return ` ${ this . contextualMessage ( ) } : ${ this . span . start } ${ e } ` } } , t . typeSourceSpan = function ( e , t ) { const r = L . identifierModuleUrl ( t ) , o = null != r ? ` in ${ e } ${ L . identifierName ( t ) } in ${ r } ` : ` in ${ e } ${ L . identifierName ( t ) } ` , a = new i ( "" , o ) ; return new s ( new n ( a , - 1 , - 1 , - 1 ) , new n ( a , - 1 , - 1 , - 1 ) ) } , t . r3JitTypeSourceSpan = function ( e , t , r ) { const o = new i ( "" , ` in ${ e } ${ t } in ${ r } ` ) ; return new s ( new n ( o , - 1 , - 1 , - 1 ) , new n ( o , - 1 , - 1 , - 1 ) ) } } ) ) ; const $ = new RegExp ( "^(?<startDelimiter>-{3}|\\+{3})(?<language>[^\\n]*)\\n(?:|(?<value>.*?)\\n)(?<endDelimiter>\\k<startDelimiter>|\\.{3})[^\\S\\n]*(?:\\n|$)" , "s" ) ; var q = function ( e ) { const t = e . match ( $ ) ; if ( ! t ) return { content : e } ; const { startDelimiter : r , language : n , value : i = "" , endDelimiter : s } = t . groups ; let o = n . trim ( ) || "yaml" ; if ( "+++" === r && ( o = "toml" ) , "yaml" !== o && r !== s ) return { content : e } ; const [ a ] = t ; return { frontMatter : { type : "front-matter" , lang : o , value : i , startDelimiter : r , endDelimiter : s , raw : a . replace ( /\n$/ , "" ) } , content : a . replace ( /[^\n]/g , " " ) + e . slice ( a . length ) } } ; var M = e => e [ e . length - 1 ] ; var U = function ( e , t ) { const r = new SyntaxError ( e + " (" + t . start . line + ":" + t . start . column + ")" ) ; return r . loc = t , r } , j = 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 V = 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 G = V , H = V ; G . default = H ; const X = e => { if ( "string" != typeof e || 0 === e . length ) return 0 ; if ( 0 === ( e = j ( e ) ) . length ) return 0 ; e = e . replace ( / \ u D 8 3 C \ u D F F 4 \ u D B 4 0 \ u D C 6 7 \ u D B 4 0 \ u D C 6 2 ( ? : \ u D B 4 0 \ u D C 6 5 \ u D B 4 0 \ u D C 6 E \ u D B 4 0 \ u D C 6 7 | \ u D B 4 0 \ u D C 7 3 \ u D B 4 0 \ u D C 6 3 \ u D B 4 0 \ u D C 7 4 | \ u D B 4 0 \ u D C 7 7 \ u D B 4 0 \ u D C 6 C \ u D B 4 0 \ u D C 7 3 ) \ u D B 4 0 \ u D C 7 F | \ u D 8 3 D \ u D C 6 8 ( ? : \ u D 8 3 C \ u D F F C \ u 2 0 0 D ( ? : \ u D 8 3 E \ u D D 1 D \ u 2 0 0 D \ u D 8 3 D \ u D C 6 8 \ u D 8 3 C \ u D F F B | \ u D 8 3 C [ \ u D F 3 E \ u D F 7 3 \ u D F 9 3 \ u D F A 4 \ u D F A 8 \ u D F E B \ u D F E D ] | \ u D 8 3 D [ \ u D C B B \ u D C B C \ u D D 2 7 \ u D D 2 C \ u D E 8 0 \ u D E 9 2 ] | \ u D 8 3 E [ \ u D D A F - \ u D D B 3 \ u D D B C \ u D D B D ] ) | \ u D 8 3 C \ u D F F F \ u 2 0 0 D ( ? : \ u D 8 3 E \ u D D 1 D \ u 2 0 0 D \ u D 8 3 D \ u D C 6 8 ( ? : \ u D 8 3 C [ \ u D F F B - \ u D F F E ] ) | \ u D 8 3 C [ \ u D F 3 E \ u D F 7 3 \ u D F 9 3 \ u D F A 4 \ u D F A 8 \ u D F E B \ u D F E D ] | \ u D 8 3 D [ \ u D C B B \ u D C B C \ u D D 2 7 \ u D D 2 C \ u D E 8 0 \ u D E 9 2 ] | \ u D 8 3 E [ \ u D D A F - \ u D D B 3 \ u D D B C \ u D D B D ] ) | \ u D 8 3 C \ u D F F E \ u 2 0 0 D ( ? : \ u D 8 3 E \ u D D 1 D \ u 2 0 0 D \ u D 8 3 D \ u D C 6 8 ( ? : \ u D 8 3 C [ \ u D F F B - \
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:hn},endOfLine:{since:"1.15.0",category:fn,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:pn `
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:mn,type:"path",description:"Specify the input filepath. This will be used to do parser inference.",cliName:"stdin-filepath",cliCategory:dn,cliDescription:"Path to the file to pretend that stdin comes from."},insertPragma:{since:"1.8.0",category:mn,type:"boolean",default:!1,description:"Insert @format pragma into file' s first docblock comment . ",cliCategory:dn},parser:{since:" 0.0 . 10 ",category:fn,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:fn,description:" Add a plugin . Multiple plugins can be passed as separate ` --plugin ` s . ",exception:e=>" string "==typeof e||" object "==typeof e,cliName:" plugin ",cliCategory:Dn},pluginSearchDirs:{since:" 1.13 . 0 ",type:" path ",array:!0,default:[{value:[]}],category:fn,description:pn`
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:Dn},printWidth:{since:" 0.0 . 0 ",category:fn,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:mn,type:" int ",default:Number.POSITIVE_INFINITY,range:{start:0,end:Number.POSITIVE_INFINITY,step:1},description:pn`
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:hn},rangeStart:{since:" 1.4 . 0 ",category:mn,type:" int ",default:0,range:{start:0,end:Number.POSITIVE_INFINITY,step:1},description:pn`
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:hn},requirePragma:{since:" 1.7 . 0 ",category:mn,type:" boolean ",default:!1,description:pn`
Require either '@prettier' or '@format' to be present in the file's first docblock comment
in order for it to be formatted.
`,cliCategory:dn},tabWidth:{type:" int ",category:fn,default:2,description:" Number of spaces per indentation level . ",range:{start:0,end:Number.POSITIVE_INFINITY,step:1}},useTabs:{since:" 1.0 . 0 ",category:fn,type:" boolean ",default:!1,description:" Indent with tabs instead of spaces . "},embeddedLanguageFormatting:{since:" 2.1 . 0 ",category:fn,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 En=[" cliName "," cliCategory "," cliDescription "],Cn={compare:on,lt:an,gte:un},Tn=cn,yn={CATEGORY_CONFIG:Dn,CATEGORY_EDITOR:hn,CATEGORY_FORMAT:" Format ",CATEGORY_OTHER:dn,CATEGORY_OUTPUT:" Output ",CATEGORY_GLOBAL:fn,CATEGORY_SPECIAL:mn,options:gn}.options;var Sn={getSupportInfo:function({plugins:e=[],showUnreleased:t=!1,showDeprecated:r=!1,showInternal:n=!1}={}){const i=Tn.split(" - ",1)[0],s=e.flatMap((e=>e.languages||[])).filter(a),o=((e,t)=>Object.entries(e).map((([e,r])=>Object.assign({[t]:e},r))))(Object.assign({},...e.map((({options:e})=>e)),yn)," name ").filter((e=>a(e)&&u(e))).sort(((e,t)=>e.name===t.name?0:e.name<t.name?-1:1)).map((function(e){if(n)return e;return Q(e,En)})).map((t=>{t=Object.assign({},t),Array.isArray(t.default)&&(t.default=1===t.default.length?t.default[0].value:t.default.filter(a).sort(((e,t)=>Cn.compare(t.since,e.since)))[0].value),Array.isArray(t.choices)&&(t.choices=t.choices.filter((e=>a(e)&&u(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 o=i.name;s&&s.name&&(o+=` (plugin: ${s.name})`),e.choices.push({value:t,description:o})}}(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})}));return{languages:s,options:o};function a(e){return t||!(" since "in e)||e.since&&Cn.gte(i,e.since)}function u(e){return r||!(" deprecated "in e)||e.deprecated&&Cn.lt(i,e.deprecated)}}};const{getSupportInfo:_n}=Sn,vn=/[^\x20-\x7F]/;function bn(e){return(t,r,n)=>{const i=n&&n.backwards;if(!1===r)return!1;const{length:s}=t;let o=r;for(;o>=0&&o<s;){const r=t.charAt(o);if(e instanceof RegExp){if(!e.test(r))return o}else if(!e.includes(r))return o;i?o--:o++}return(-1===o||o===s)&&o}}const Fn=bn(/\s/),An=bn(" \ t "),wn=bn(" , ; \ t "),Nn=bn(/[^\n\r]/);function kn(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 On(e,t){return!1!==t&&(" / "===e.charAt(t)&&" / "===e.charAt(t+1)?Nn(e,t):t)}function xn(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 Pn(e,t,r={}){const n=An(e,r.backwards?t-1:t,r);return n!==xn(e,n,r)}function In(e,t){let r=null,n=t;for(;n!==r;)r=n,n=wn(e,n),n=kn(e,n),n=An(e,n);return n=On(e,n),n=xn(e,n),!1!==n&&Pn(e,n)}function Rn(e,t){let r=null,n=t;for(;n!==r;)r=n,n=An(e,n),n=kn(e,n),n=On(e,n),n=xn(e,n);return n}function Ln(e,t,r){return Rn(e,r(t))}function Bn(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 $n(e,t){const r=e.slice(1,-1),n={quote:'" ',regex:/"/g},i={quote:"' ",regex:/'/g},s=" '"===t?i:n,o=s===i?n:i;let a=s.quote;if(r.includes(s.quote)||r.includes(o.quote)){a=(r.match(s.regex)||[]).length>(r.match(o.regex)||[]).length?o.quote:s.quote}return a}function qn(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 ] $ / . test ( i ) ? i : "\\" + i ) ) ) ; return t + i + t } function Mn ( e , t ) { ( e . comments |
2020-09-14 10:42:37 +01:00
/**
* @license
* Copyright Google Inc. 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
*/
2021-07-27 16:54:26 +00:00
Object . defineProperty ( t , "__esModule" , { value : ! 0 } ) , function ( e ) { e [ e . RAW _TEXT = 0 ] = "RAW_TEXT" , e [ e . ESCAPABLE _RAW _TEXT = 1 ] = "ESCAPABLE_RAW_TEXT" , e [ e . PARSABLE _DATA = 2 ] = "PARSABLE_DATA" } ( t . TagContentType || ( t . TagContentType = { } ) ) , t . splitNsName = r , t . isNgContainer = function ( e ) { return "ng-container" === r ( e ) [ 1 ] } , t . isNgContent = function ( e ) { return "ng-content" === r ( e ) [ 1 ] } , t . isNgTemplate = function ( e ) { return "ng-template" === r ( e ) [ 1 ] } , t . getNsPrefix = function ( e ) { return null === e ? null : r ( e ) [ 0 ] } , t . mergeNsAndName = function ( e , t ) { return e ? ` : ${ e } : ${ t } ` : t } , t . NAMED _ENTITIES = { Aacute : "\xc1" , aacute : "\xe1" , Abreve : "\u0102" , abreve : "\u0103" , ac : "\u223e" , acd : "\u223f" , acE : "\u223e\u0333" , Acirc : "\xc2" , acirc : "\xe2" , acute : "\xb4" , Acy : "\u0410" , acy : "\u0430" , AElig : "\xc6" , aelig : "\xe6" , af : "\u2061" , Afr : "\ud835\udd04" , afr : "\ud835\udd1e" , Agrave : "\xc0" , agrave : "\xe0" , alefsym : "\u2135" , aleph : "\u2135" , Alpha : "\u0391" , alpha : "\u03b1" , Amacr : "\u0100" , amacr : "\u0101" , amalg : "\u2a3f" , AMP : "&" , amp : "&" , And : "\u2a53" , and : "\u2227" , andand : "\u2a55" , andd : "\u2a5c" , andslope : "\u2a58" , andv : "\u2a5a" , ang : "\u2220" , ange : "\u29a4" , angle : "\u2220" , angmsd : "\u2221" , angmsdaa : "\u29a8" , angmsdab : "\u29a9" , angmsdac : "\u29aa" , angmsdad : "\u29ab" , angmsdae : "\u29ac" , angmsdaf : "\u29ad" , angmsdag : "\u29ae" , angmsdah : "\u29af" , angrt : "\u221f" , angrtvb : "\u22be" , angrtvbd : "\u299d" , angsph : "\u2222" , angst : "\xc5" , angzarr : "\u237c" , Aogon : "\u0104" , aogon : "\u0105" , Aopf : "\ud835\udd38" , aopf : "\ud835\udd52" , ap : "\u2248" , apacir : "\u2a6f" , apE : "\u2a70" , ape : "\u224a" , apid : "\u224b" , apos : "'" , ApplyFunction : "\u2061" , approx : "\u2248" , approxeq : "\u224a" , Aring : "\xc5" , aring : "\xe5" , Ascr : "\ud835\udc9c" , ascr : "\ud835\udcb6" , Assign : "\u2254" , ast : "*" , asymp : "\u2248" , asympeq : "\u224d" , Atilde : "\xc3" , atilde : "\xe3" , Auml : "\xc4" , auml : "\xe4" , awconint : "\u2233" , awint : "\u2a11" , backcong : "\u224c" , backepsilon : "\u03f6" , backprime : "\u2035" , backsim : "\u223d" , backsimeq : "\u22cd" , Backslash : "\u2216" , Barv : "\u2ae7" , barvee : "\u22bd" , Barwed : "\u2306" , barwed : "\u2305" , barwedge : "\u2305" , bbrk : "\u23b5" , bbrktbrk : "\u23b6" , bcong : "\u224c" , Bcy : "\u0411" , bcy : "\u0431" , bdquo : "\u201e" , becaus : "\u2235" , Because : "\u2235" , because : "\u2235" , bemptyv : "\u29b0" , bepsi : "\u03f6" , bernou : "\u212c" , Bernoullis : "\u212c" , Beta : "\u0392" , beta : "\u03b2" , beth : "\u2136" , between : "\u226c" , Bfr : "\ud835\udd05" , bfr : "\ud835\udd1f" , bigcap : "\u22c2" , bigcirc : "\u25ef" , bigcup : "\u22c3" , bigodot : "\u2a00" , bigoplus : "\u2a01" , bigotimes : "\u2a02" , bigsqcup : "\u2a06" , bigstar : "\u2605" , bigtriangledown : "\u25bd" , bigtriangleup : "\u25b3" , biguplus : "\u2a04" , bigvee : "\u22c1" , bigwedge : "\u22c0" , bkarow : "\u290d" , blacklozenge : "\u29eb" , blacksquare : "\u25aa" , blacktriangle : "\u25b4" , blacktriangledown : "\u25be" , blacktriangleleft : "\u25c2" , blacktriangleright : "\u25b8" , blank : "\u2423" , blk12 : "\u2592" , blk14 : "\u2591" , blk34 : "\u2593" , block : "\u2588" , bne : "=\u20e5" , bnequiv : "\u2261\u20e5" , bNot : "\u2aed" , bnot : "\u2310" , Bopf : "\ud835\udd39" , bopf : "\ud835\udd53" , bot : "\u22a5" , bottom : "\u22a5" , bowtie : "\u22c8" , boxbox : "\u29c9" , boxDL : "\u2557" , boxDl : "\u2556" , boxdL : "\u2555" , boxdl : "\u2510" , boxDR : "\u2554" , boxDr : "\u2553" , boxdR : "\u2552" , boxdr : "\u250c" , boxH : "\u2550" , boxh : "\u2500" , boxHD : "\u2566" , boxHd : "\u2564" , boxhD : "\u2565" , boxhd : "\u252c" , boxHU : "\u2569" , boxHu : "\u2567" , boxhU : "\u2568" , boxhu : "\u2534" , boxminus : "\u229f" , boxplus : "\u229e" , boxtimes : "\u22a0" , boxUL : "\u255d" , boxUl : "\u255c" , boxuL : "\u255b" , boxul : "\u2518" , boxUR : "\u255a" , boxUr : "\u2559" , boxuR : "\u2558" , boxur : "\u2514" , boxV : "\u2551" , boxv : "\u2502" , boxVH : "\u256c" , boxVh : "\u256b" , boxvH : "\u256a" , boxvh : "\u253c" , boxVL : "\u2563" , boxVl : "\u2562" , boxvL : "\u2561" , boxvl : "\u2524" , boxVR : "\u2560" , boxVr : "\u255f" , boxvR : "\u255e" , boxvr : "\u251c" , bprime : "\u2035" , Breve : "\u02d8" , breve : "\u02d8" , brvbar : "\xa6" , Bscr : "\u212c" , bscr : "\ud835\udcb7" , bsemi : "\u204f" , bsim : "\u223d" , bsime : "\u22cd" , bsol : "\\" , bsolb : "\u29c5" , bsolhsub : "\u27c8" , bull : "\u2022" , bullet : "\u2022" , bump : "\u224e" , bumpE : "\u2aae" , bumpe : "\u224f" , Bumpeq : "\u224e" , bumpeq : "\u224f" , Cacute : "\u0106" , cacute : "\u0107" , Cap : "\u22d2" , cap : "\u2229" , capand : "\u2a44" , capbrcup : "\u2a49" , capcap : "\u2a4b" , capcup : "\u2a47" , capdot : "\u2a40" , CapitalDifferentialD : "\u2145" , caps : "\u2229\ufe00" , caret : "\u2041" , caron : "\u02c7" , Cayleys : "\u212d" , ccaps : "\u2a4d" , Ccaron : "\u010c" , ccaron : "\u010d" , Ccedil : "\
2020-09-14 10:42:37 +01:00
/**
2021-07-27 16:54:26 +00:00
* @license
* Copyright Google Inc. 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 xi{constructor({closedByChildren:e,implicitNamespacePrefix:t,contentType:r=Oi.TagContentType.PARSABLE_DATA,closedByParent:n=!1,isVoid:i=!1,ignoreFirstLf:s=!1}={}){this.closedByChildren={},this.closedByParent=!1,this.canSelfClose=!1,e&&e.length>0&&e.forEach((e=>this.closedByChildren[e]=!0)),this.isVoid=i,this.closedByParent=n||i,this.implicitNamespacePrefix=t||null,this.contentType=r,this.ignoreFirstLf=s}isClosedByChild(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}}var Pi=xi;let Ii,Ri;var Li=function(e){return Ri||(Ii=new xi,Ri={base:new xi({isVoid:!0}),meta:new xi({isVoid:!0}),area:new xi({isVoid:!0}),embed:new xi({isVoid:!0}),link:new xi({isVoid:!0}),img:new xi({isVoid:!0}),input:new xi({isVoid:!0}),param:new xi({isVoid:!0}),hr:new xi({isVoid:!0}),br:new xi({isVoid:!0}),source:new xi({isVoid:!0}),track:new xi({isVoid:!0}),wbr:new xi({isVoid:!0}),p:new xi({closedByChildren:[" address "," article "," aside "," blockquote "," div "," dl "," fieldset "," footer "," form "," h1 "," h2 "," h3 "," h4 "," h5 "," h6 "," header "," hgroup "," hr "," main "," nav "," ol "," p "," pre "," section "," table "," ul "],closedByParent:!0}),thead:new xi({closedByChildren:[" tbody "," tfoot "]}),tbody:new xi({closedByChildren:[" tbody "," tfoot "],closedByParent:!0}),tfoot:new xi({closedByChildren:[" tbody "],closedByParent:!0}),tr:new xi({closedByChildren:[" tr "],closedByParent:!0}),td:new xi({closedByChildren:[" td "," th "],closedByParent:!0}),th:new xi({closedByChildren:[" td "," th "],closedByParent:!0}),col:new xi({isVoid:!0}),svg:new xi({implicitNamespacePrefix:" svg "}),math:new xi({implicitNamespacePrefix:" math "}),li:new xi({closedByChildren:[" li "],closedByParent:!0}),dt:new xi({closedByChildren:[" dt "," dd "]}),dd:new xi({closedByChildren:[" dt "," dd "],closedByParent:!0}),rb:new xi({closedByChildren:[" rb "," rt "," rtc "," rp "],closedByParent:!0}),rt:new xi({closedByChildren:[" rb "," rt "," rtc "," rp "],closedByParent:!0}),rtc:new xi({closedByChildren:[" rb "," rtc "," rp "],closedByParent:!0}),rp:new xi({closedByChildren:[" rb "," rt "," rtc "," rp "],closedByParent:!0}),optgroup:new xi({closedByChildren:[" optgroup "],closedByParent:!0}),option:new xi({closedByChildren:[" option "," optgroup "],closedByParent:!0}),pre:new xi({ignoreFirstLf:!0}),listing:new xi({ignoreFirstLf:!0}),style:new xi({contentType:Oi.TagContentType.RAW_TEXT}),script:new xi({contentType:Oi.TagContentType.RAW_TEXT}),title:new xi({contentType:Oi.TagContentType.ESCAPABLE_RAW_TEXT}),textarea:new xi({contentType:Oi.TagContentType.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),Ri[e]||Ii},Bi=Object.defineProperty({HtmlTagDefinition:Pi,getHtmlTagDefinition:Li}," _ _esModule ",{value:!0});var $i=
2020-09-14 10:42:37 +01:00
/**
2021-07-27 16:54:26 +00:00
* @license
* Copyright Google Inc. 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{constructor(e,t=-1){this.path=e,this.position=t}get empty(){return!this.path||!this.path.length}get head(){return this.path[0]}get tail(){return this.path[this.path.length-1]}parentOf(e){return e&&this.path[this.path.indexOf(e)-1]}childOf(e){return this.path[this.path.indexOf(e)+1]}first(e){for(let t=this.path.length-1;t>=0;t--){let r=this.path[t];if(r instanceof e)return r}}push(e){this.path.push(e)}pop(){return this.path.pop()}},qi=Object.defineProperty({AstPath:$i}," _ _esModule ",{value:!0});var Mi=
2020-09-14 10:42:37 +01:00
/**
2021-07-27 16:54:26 +00:00
* @license
* Copyright Google Inc. 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{constructor(e,t,r){this.value=e,this.sourceSpan=t,this.i18n=r,this.type=" text "}visit(e,t){return e.visitText(this,t)}};var Ui=class{constructor(e,t){this.value=e,this.sourceSpan=t,this.type=" cdata "}visit(e,t){return e.visitCdata(this,t)}};var ji=class{constructor(e,t,r,n,i,s){this.switchValue=e,this.type=t,this.cases=r,this.sourceSpan=n,this.switchValueSourceSpan=i,this.i18n=s}visit(e,t){return e.visitExpansion(this,t)}};var Vi=class{constructor(e,t,r,n,i){this.value=e,this.expression=t,this.sourceSpan=r,this.valueSourceSpan=n,this.expSourceSpan=i}visit(e,t){return e.visitExpansionCase(this,t)}};var Gi=class{constructor(e,t,r,n=null,i=null,s=null){this.name=e,this.value=t,this.sourceSpan=r,this.valueSpan=n,this.nameSpan=i,this.i18n=s,this.type=" attribute "}visit(e,t){return e.visitAttribute(this,t)}};class Hi{constructor(e,t,r,n,i=null,s=null,o=null,a=null){this.name=e,this.attrs=t,this.children=r,this.sourceSpan=n,this.startSourceSpan=i,this.endSourceSpan=s,this.nameSpan=o,this.i18n=a,this.type=" element "}visit(e,t){return e.visitElement(this,t)}}var Xi=Hi;var zi=class{constructor(e,t){this.value=e,this.sourceSpan=t,this.type=" comment "}visit(e,t){return e.visitComment(this,t)}};var Wi=class{constructor(e,t){this.value=e,this.sourceSpan=t,this.type=" docType "}visit(e,t){return e.visitDocType(this,t)}};function Yi(e,t,r=null){const n=[],i=e.visit?t=>e.visit(t,r)||t.visit(e,r):t=>t.visit(e,r);return t.forEach((e=>{const t=i(e);t&&n.push(t)})),n}var Qi=Yi;class Ji{constructor(){}visitElement(e,t){this.visitChildren(t,(t=>{t(e.attrs),t(e.children)}))}visitAttribute(e,t){}visitText(e,t){}visitCdata(e,t){}visitComment(e,t){}visitDocType(e,t){}visitExpansion(e,t){return this.visitChildren(t,(t=>{t(e.cases)}))}visitExpansionCase(e,t){}visitChildren(e,t){let r=[],n=this;return t((function(t){t&&r.push(Yi(n,t,e))})),Array.prototype.concat.apply([],r)}}var Ki=Ji;function Zi(e){const t=e.sourceSpan.start.offset;let r=e.sourceSpan.end.offset;return e instanceof Hi&&(e.endSourceSpan?r=e.endSourceSpan.end.offset:e.children&&e.children.length&&(r=Zi(e.children[e.children.length-1]).end)),{start:t,end:r}}var es=function(e,t){const r=[];return Yi(new class extends Ji{visit(e,n){const i=Zi(e);if(!(i.start<=t&&t<i.end))return!0;r.push(e)}},e),new qi.AstPath(r,t)},ts=Object.defineProperty({Text:Mi,CDATA:Ui,Expansion:ji,ExpansionCase:Vi,Attribute:Gi,Element:Xi,Comment:zi,DocType:Wi,visitAll:Qi,RecursiveVisitor:Ki,findNode:es}," _ _esModule ",{value:!0});var rs=
2020-09-14 10:42:37 +01:00
/**
2021-07-27 16:54:26 +00:00
* @license
* Copyright Google Inc. 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(e,t){if(null!=t){if(!Array.isArray(t))throw new Error(`Expected '${e}' to be an array of strings.`);for(let r=0;r<t.length;r+=1)if(" string "!=typeof t[r])throw new Error(`Expected '${e}' to be an array of strings.`)}};const ns=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];var is=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];ns.forEach((t=>{if(t.test(e)||t.test(r))throw new Error(`['${e}', '${r}'] contains unusable interpolation symbol.`)}))}},ss=Object.defineProperty({assertArrayOfStrings:rs,assertInterpolationSymbols:is}," _ _esModule ",{value:!0}),os=t((function(e,t){
2020-09-14 10:42:37 +01:00
/**
* @license
* Copyright Google Inc. 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
*/
2021-07-27 16:54:26 +00:00
Object.defineProperty(t," _ _esModule ",{value:!0});class r{constructor(e,t){this.start=e,this.end=t}static fromArray(e){return e?(ss.assertInterpolationSymbols(" interpolation ",e),new r(e[0],e[1])):t.DEFAULT_INTERPOLATION_CONFIG}}t.InterpolationConfig=r,t.DEFAULT_INTERPOLATION_CONFIG=new r(" { { "," } } ")})),as=t((function(e,t){
2020-09-14 10:42:37 +01:00
/**
* @license
* Copyright Google Inc. 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
*/
2021-07-27 16:54:26 +00:00
Object.defineProperty(t," _ _esModule ",{value:!0});const n=r;var i;!function(e){e[e.TAG_OPEN_START=0]=" TAG _OPEN _START ",e[e.TAG_OPEN_END=1]=" TAG _OPEN _END ",e[e.TAG_OPEN_END_VOID=2]=" TAG _OPEN _END _VOID ",e[e.TAG_CLOSE=3]=" TAG _CLOSE ",e[e.TEXT=4]=" TEXT ",e[e.ESCAPABLE_RAW_TEXT=5]=" ESCAPABLE _RAW _TEXT ",e[e.RAW_TEXT=6]=" RAW _TEXT ",e[e.COMMENT_START=7]=" COMMENT _START ",e[e.COMMENT_END=8]=" COMMENT _END ",e[e.CDATA_START=9]=" CDATA _START ",e[e.CDATA_END=10]=" CDATA _END ",e[e.ATTR_NAME=11]=" ATTR _NAME ",e[e.ATTR_QUOTE=12]=" ATTR _QUOTE ",e[e.ATTR_VALUE=13]=" ATTR _VALUE ",e[e.DOC_TYPE_START=14]=" DOC _TYPE _START ",e[e.DOC_TYPE_END=15]=" DOC _TYPE _END ",e[e.EXPANSION_FORM_START=16]=" EXPANSION _FORM _START ",e[e.EXPANSION_CASE_VALUE=17]=" EXPANSION _CASE _VALUE ",e[e.EXPANSION_CASE_EXP_START=18]=" EXPANSION _CASE _EXP _START ",e[e.EXPANSION_CASE_EXP_END=19]=" EXPANSION _CASE _EXP _END ",e[e.EXPANSION_FORM_END=20]=" EXPANSION _FORM _END ",e[e.EOF=21]=" EOF "}(i=t.TokenType||(t.TokenType={}));class s{constructor(e,t,r){this.type=e,this.parts=t,this.sourceSpan=r}}t.Token=s;class o extends B.ParseError{constructor(e,t,r){super(r,e),this.tokenType=t}}t.TokenError=o;class a{constructor(e,t){this.tokens=e,this.errors=t}}t.TokenizeResult=a,t.tokenize=function(e,t,r,n={}){return new D(new B.ParseSourceFile(e,t),r,n).tokenize()};const u=/\r\n?/g;function c(e){return`Unexpected character " $ { e === n . $EOF ? "EOF" : String . fromCharCode ( e ) } "`}function l(e){return`Unknown entity " $ { e } " - use the " & # < decimal > ; " or " & # x < hex > ; " syntax`}class p{constructor(e){this.error=e}}class D{constructor(e,t,r){this._getTagContentType=t,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._inInterpolation=!1,this._fullNameStack=[],this.tokens=[],this.errors=[],this._tokenizeIcu=r.tokenizeExpansionForms||!1,this._interpolationConfig=r.interpolationConfig||os.DEFAULT_INTERPOLATION_CONFIG,this._leadingTriviaCodePoints=r.leadingTriviaChars&&r.leadingTriviaChars.map((e=>e.codePointAt(0)||0)),this._canSelfClose=r.canSelfClose||!1,this._allowHtmComponentClosingTags=r.allowHtmComponentClosingTags||!1;const n=r.range||{endPos:e.content.length,startPos:0,startLine:0,startCol:0};this._cursor=r.escapedString?new C(e,n):new E(e,n);try{this._cursor.init()}catch(e){this.handleError(e)}}_processCarriageReturns(e){return e.replace(u," \ n ")}tokenize(){for(;this._cursor.peek()!==n.$EOF;){const e=this._cursor.clone();try{if(this._attemptCharCode(n.$LT))if(this._attemptCharCode(n.$BANG))this._attemptStr(" [ CDATA [ ")?this._consumeCdata(e):this._attemptStr(" -- ")?this._consumeComment(e):this._attemptStrCaseInsensitive(" doctype ")?this._consumeDocType(e):this._consumeBogusComment(e);else if(this._attemptCharCode(n.$SLASH))this._consumeTagClose(e);else{const t=this._cursor.clone();this._attemptCharCode(n.$QUESTION)?(this._cursor=t,this._consumeBogusComment(e)):this._consumeTagOpen(e)}else this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeText()}catch(e){this.handleError(e)}}return this._beginToken(i.EOF),this._endToken([]),new a(function(e){const t=[];let r;for(let n=0;n<e.length;n++){const s=e[n];r&&r.type==i.TEXT&&s.type==i.TEXT?(r.parts[0]+=s.parts[0],r.sourceSpan.end=s.sourceSpan.end):(r=s,t.push(r))}return t}(this.tokens),this.errors)}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(((e=this._cursor.peek())===n.$EQ||n.isAsciiLetter(e)||n.isDigit(e))&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;var e;if(this._cursor.peek()===n.$RBRACE){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}_beginToken(e,t=this._cursor.clone()){this._currentTokenStart=t,this._currentTokenType=e}_endToken(e,t=this._cursor.clone()){if(null===this._currentTokenStart)throw new o(" Programming error - attempted to end a token when there was no start to the token ",this._currentTokenType,this._cursor.getSpan(t));if(null===this._currentTokenType)throw new o(" Programming error - attempted to end a token which has no token type ",null,this._cursor.getS
2020-09-14 10:42:37 +01:00
/**
2021-07-27 16:54:26 +00:00
* @license
* Copyright Google Inc. 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 us extends B.ParseError{constructor(e,t,r){super(t,r),this.elementName=e}static create(e,t,r){return new us(e,t,r)}}var cs=us;class ls{constructor(e,t){this.rootNodes=e,this.errors=t}}var ps=ls;var Ds=class{constructor(e){this.getTagDefinition=e}parse(e,t,r,n=!1,i){const s=e=>(t,...r)=>e(t.toLowerCase(),...r),o=n?this.getTagDefinition:s(this.getTagDefinition),a=e=>o(e).contentType,u=n?i:s(i),c=i?(e,t,r,n)=>{const i=u(e,t,r,n);return void 0!==i?i:a(e)}:a,l=as.tokenize(e,t,c,r),p=r&&r.canSelfClose||!1,D=r&&r.allowHtmComponentClosingTags||!1,h=new hs(l.tokens,o,p,D,n).build();return new ls(h.rootNodes,l.errors.concat(h.errors))}};class hs{constructor(e,t,r,n,i){this.tokens=e,this.getTagDefinition=t,this.canSelfClose=r,this.allowHtmComponentClosingTags=n,this.isTagNameCaseSensitive=i,this._index=-1,this._rootNodes=[],this._errors=[],this._elementStack=[],this._advance()}build(){for(;this._peek.type!==as.TokenType.EOF;)this._peek.type===as.TokenType.TAG_OPEN_START?this._consumeStartTag(this._advance()):this._peek.type===as.TokenType.TAG_CLOSE?(this._closeVoidElement(),this._consumeEndTag(this._advance())):this._peek.type===as.TokenType.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===as.TokenType.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===as.TokenType.TEXT||this._peek.type===as.TokenType.RAW_TEXT||this._peek.type===as.TokenType.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===as.TokenType.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._peek.type===as.TokenType.DOC_TYPE_START?this._consumeDocType(this._advance()):this._advance();return new ls(this._rootNodes,this._errors)}_advance(){const e=this._peek;return this._index<this.tokens.length-1&&this._index++,this._peek=this.tokens[this._index],e}_advanceIf(e){return this._peek.type===e?this._advance():null}_consumeCdata(e){const t=this._advance(),r=this._getText(t),n=this._advanceIf(as.TokenType.CDATA_END);this._addToParent(new ts.CDATA(r,new B.ParseSourceSpan(e.sourceSpan.start,(n||t).sourceSpan.end)))}_consumeComment(e){const t=this._advanceIf(as.TokenType.RAW_TEXT),r=this._advanceIf(as.TokenType.COMMENT_END),n=null!=t?t.parts[0].trim():null,i=new B.ParseSourceSpan(e.sourceSpan.start,(r||t||e).sourceSpan.end);this._addToParent(new ts.Comment(n,i))}_consumeDocType(e){const t=this._advanceIf(as.TokenType.RAW_TEXT),r=this._advanceIf(as.TokenType.DOC_TYPE_END),n=null!=t?t.parts[0].trim():null,i=new B.ParseSourceSpan(e.sourceSpan.start,(r||t||e).sourceSpan.end);this._addToParent(new ts.DocType(n,i))}_consumeExpansion(e){const t=this._advance(),r=this._advance(),n=[];for(;this._peek.type===as.TokenType.EXPANSION_CASE_VALUE;){const e=this._parseExpansionCase();if(!e)return;n.push(e)}if(this._peek.type!==as.TokenType.EXPANSION_FORM_END)return void this._errors.push(us.create(null,this._peek.sourceSpan," Invalid ICU message . Missing '}' . "));const i=new B.ParseSourceSpan(e.sourceSpan.start,this._peek.sourceSpan.end);this._addToParent(new ts.Expansion(t.parts[0],r.parts[0],n,i,t.sourceSpan)),this._advance()}_parseExpansionCase(){const e=this._advance();if(this._peek.type!==as.TokenType.EXPANSION_CASE_EXP_START)return this._errors.push(us.create(null,this._peek.sourceSpan," Invalid ICU message . Missing '{' . ")),null;const t=this._advance(),r=this._collectExpansionExpTokens(t);if(!r)return null;const n=this._advance();r.push(new as.Token(as.TokenType.EOF,[],n.sourceSpan));const i=new hs(r,this.getTagDefinition,this.canSelfClose,this.allowHtmComponentClosingTags,this.isTagNameCaseSensitive).build();if(i.errors.length>0)return this._errors=this._errors.concat(i.errors),null;const s=new B.ParseSourceSpan(e.sourceSpan.start,n.sourceSpan.end),o=new B.ParseSourceSpan(t.sourceSpan.start,n.sourceSpan.end);return new ts.ExpansionCase(e.parts[0],i.rootNodes,s,e.sourceSpan,o)}_collectExpansionExpTokens(e){const t=[],r=[as.TokenType.EXPANSION_CASE_EXP_START];for(;;){if(this._peek.type!==as.TokenType.EXPANSION_FORM_START&&this._peek.ty
2020-09-14 10:42:37 +01:00
/**
2021-07-27 16:54:26 +00:00
* @license
* Copyright Google Inc. 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 Cs extends fs.Parser{constructor(){super(Bi.getHtmlTagDefinition)}parse(e,t,r,n=!1,i){return super.parse(e,t,r,n,i)}}var Ts=Cs,ys=Object.defineProperty({ParseTreeResult:gs,TreeError:Es,HtmlParser:Ts}," _ _esModule ",{value:!0}),Ss=Oi.TagContentType;let _s=null;var vs=function(e,t={}){const{canSelfClose:r=!1,allowHtmComponentClosingTags:n=!1,isTagNameCaseSensitive:i=!1,getTagContentType:s}=t;return(_s||(_s=new ys.HtmlParser),_s).parse(e," angular - html - parser ",{tokenizeExpansionForms:!1,interpolationConfig:void 0,canSelfClose:r,allowHtmComponentClosingTags:n},i,s)},bs=Object.defineProperty({TagContentType:Ss,parse:vs}," _ _esModule ",{value:!0});const{ParseSourceSpan:Fs,ParseLocation:As,ParseSourceFile:ws}=B,{inferParserByLanguage:Ns}=Un,{HTML_ELEMENT_ATTRIBUTES:ks,HTML_TAGS:Os,isUnknownNamespace:xs}=Ci,{hasPragma:Ps}=Ti,{Node:Is}=Fi,{parseIeConditionalComment:Rs}=Ni,{locStart:Ls,locEnd:Bs}=ki;function $s(e,{recognizeSelfClosing:t,normalizeTagName:r,normalizeAttributeName:n,allowHtmComponentClosingTags:i,isTagNameCaseSensitive:s,getTagContentType:o},a){const u=bs,{RecursiveVisitor:c,visitAll:l}=ts,{ParseSourceSpan:p}=B,{getHtmlTagDefinition:D}=Bi;let{rootNodes:h,errors:d}=u.parse(e,{canSelfClose:t,allowHtmComponentClosingTags:i,isTagNameCaseSensitive:s,getTagContentType:o});if(" vue "===a.parser){if(h.some((e=>" docType "===e.type&&" html "===e.value||" element "===e.type&&" html "===e.name.toLowerCase()))){t=!0,r=!0,n=!0,i=!0,s=!1;const o=u.parse(e,{canSelfClose:t,allowHtmComponentClosingTags:i,isTagNameCaseSensitive:s});h=o.rootNodes,d=o.errors}else{const r=e=>{if(!e)return!1;if(" element "!==e.type||" template "!==e.name)return!1;const t=e.attrs.find((e=>" lang "===e.name)),r=t&&t.value;return!r||" html "===Ns(r,a)};if(h.some(r)){let n;const o=()=>u.parse(e,{canSelfClose:t,allowHtmComponentClosingTags:i,isTagNameCaseSensitive:s}),a=()=>n||(n=o()),c=e=>a().rootNodes.find((({startSourceSpan:t})=>t&&t.start.offset===e.startSourceSpan.start.offset));for(let e=0;e<h.length;e++){const t=h[e],{endSourceSpan:n,startSourceSpan:i}=t;if(null===n){d=a().errors,h[e]=c(t)||t}else if(r(t)){const r=a(),s=i.end.offset,o=n.start.offset;for(const e of r.errors){const{offset:t}=e.span.start;if(s<t&&t<o){d=[e];break}}h[e]=c(t)||t}}}}}if(d.length>0){const{msg:e,span:{start:t,end:r}}=d[0];throw U(e,{start:{line:t.line+1,column:t.col+1},end:{line:r.line+1,column:r.col+1}})}const f=e=>{const t=e.name.startsWith(" : ")?e.name.slice(1).split(" : ")[0]:null,r=e.nameSpan.toString(),n=null!==t&&r.startsWith(`${t}:`),i=n?r.slice(t.length+1):r;e.name=i,e.namespace=t,e.hasExplicitNamespace=n},m=(e,t)=>{const r=e.toLowerCase();return t(r)?r:e};return l(new class extends c{visit(e){(e=>{if(" element "===e.type){f(e);for(const t of e.attrs)f(t),t.valueSpan?(t.value=t.valueSpan.toString(),/[" ' ] / . test ( t . value [ 0 ] ) && ( t . value = t . value . slice ( 1 , - 1 ) ) ) : t . value = null } else "comment" === e . type ? e . value = e . sourceSpan . toString ( ) . slice ( "\x3c!--" . length , - "--\x3e" . length ) : "text" === e . type && ( e . value = e . sourceSpan . toString ( ) ) } ) ( e ) , ( e => { if ( "element" === e . type ) { const t = D ( s ? e . name : e . name . toLowerCase ( ) ) ; ! e . namespace || e . namespace === t . implicitNamespacePrefix || xs ( e ) ? e . tagDefinition = t : e . tagDefinition = D ( "" ) } } ) ( e ) , ( e => { if ( "element" === e . type && ( ! r || e . namespace && e . namespace !== e . tagDefinition . implicitNamespacePrefix && ! xs ( e ) || ( e . name = m ( e . name , ( e => e in Os ) ) ) , n ) ) { const t = ks [ e . name ] || Object . create ( null ) ; for ( const r of e . attrs ) r . namespace || ( r . name = m ( r . name , ( r => e . name in ks && ( r in ks [ "*" ] || r in t ) ) ) ) } } ) ( e ) , ( e => { e . sourceSpan && e . endSourceSpan && ( e . sourceSpan = new p ( e . sourceSpan . start , e . endSourceSpan . end ) ) } ) ( e ) } } , h ) , h } function qs ( e , t , r , n = ! 0 ) { const { frontMatter : i , content : s } = n ? q ( e ) : { frontMatter : null , content : e } , o = new ws ( e , t . filepath ) , a = new As ( o , 0 , 0 , 0 ) , u = a . moveBy ( e . length ) , c = { type : "root" , sourceSpan : new Fs ( a , u ) , children : $s ( s , r , t ) } ; if ( i ) { const e = new As ( o , 0 , 0 , 0 ) , t = e . moveBy ( i . raw . length ) ; i . sourceSpan = new Fs ( e , t ) , c . children . unshift ( i ) } const l = new Is ( c ) , p = ( n , i ) => { const { offset : s } = i , o = qs ( e . slice ( 0 , s ) . replace ( /[^\n\r]/g , " " ) + n , t , r , ! 1 ) ; o . sourceSpan = new Fs ( i , M ( o . children ) . sourceSpan . end ) ; const a = o . children [ 0 ] ; return a . length === s ? o . children . sh