github-pages-deploy-action/node_modules/prettier/parser-html.js

114 lines
103 KiB
JavaScript
Raw Normal View History

2020-03-31 20:40:00 +08:00
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(((e=e||self).prettierPlugins=e.prettierPlugins||{},e.prettierPlugins.html={}))}(this,(function(e){"use strict";const t=/[|\\{}()[\]^$+*?.-]/g;var r=e=>{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(t,"\\$&")};const n={"---":"yaml","+++":"toml"};var s=function(e){const t=Object.keys(n).map(r).join("|"),s=e.match(new RegExp("^(".concat(t,")[^\\n\\S]*\\n(?:([\\s\\S]*?)\\n)?\\1[^\\n\\S]*(\\n|$)")));if(null===s)return{frontMatter:null,content:e};const[i,o,a]=s;return{frontMatter:{type:n[o],value:a,raw:i.replace(/\n$/,"")},content:i.replace(/[^\n]/g," ")+e.slice(i.length)}},i=Object.freeze({__proto__:null,default:["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"]}),o=["accesskey","charset","coords","download","href","hreflang","name","ping","referrerpolicy","rel","rev","shape","tabindex","target","type"],a=["title"],c=["align","alt","archive","code","codebase","height","hspace","name","object","vspace","width"],l=["accesskey","alt","coords","download","href","hreflang","nohref","ping","referrerpolicy","rel","shape","tabindex","target","type"],p=["autoplay","controls","crossorigin","loop","muted","preload","src"],u=["href","target"],h=["color","face","size"],d=["dir"],m=["cite"],f=["alink","background","bgcolor","link","text","vlink"],g=["clear"],_=["accesskey","autofocus","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","name","tabindex","type","value"],T=["height","width"],S=["align"],y=["align","char","charoff","span","valign","width"],b=["align","char","charoff","span","valign","width"],C=["value"],E=["cite","datetime"],v=["open"],A=["title"],w=["open"],k=["compact"],N=["align"],x=["compact"],P=["height","src","type","width"],D=["disabled","form","name"],R=["color","face","size"],O=["accept","accept-charset","action","autocomplete","enctype","method","name","novalidate","target"],q=["frameborder","longdesc","marginheight","marginwidth","name","noresize","scrolling","src"],L=["cols","rows"],$=["align"],I=["align"],M=["align"],U=["align"],B=["align"],F=["align"],V=["profile"],H=["align","noshade","size","width"],G=["manifest","version"],j=["align","allow","allowfullscreen","allowpaymentrequest","allowusermedia","frameborder","height","longdesc","marginheight","marginwidth","name","referrerpolicy","sandbox","scrolling","src","srcdoc","width"],X=["align","alt","border","crossorigin","decoding","height","hspace","ismap","longdesc","name","referrerpolicy","sizes","src","srcset","usemap","vspace","width"],z=["accept","accesskey","align","alt","autocomplete","autofocus","checked","dirname","disabled","form","formaction","formenctype","formmethod","formnovalidate","formtarget","height","ismap","list","max","maxlength","min","minlength","multiple","name","pattern","placeholder","readonly","required","size","src","step","tabindex","title","type","usemap","value",
2020-01-28 13:07:56 +08:00
/**
2020-03-31 20:40:00 +08: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
*/
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?":".concat(e,":").concat(t):t},t.NAMED_ENTITIES={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"",backsim:"∽",backsimeq:"⋍",Backslash:"",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"",Bernoullis:"",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"",caps:"∩︀",caret:"",caron:"ˇ",Cayleys:"",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔"
2020-01-28 13:07:56 +08:00
/**
2020-03-31 20:40:00 +08: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
*/
Object.defineProperty(t,"__esModule",{value:!0});class r{constructor({closedByChildren:e,implicitNamespacePrefix:t,contentType:r=gt.TagContentType.PARSABLE_DATA,closedByParent:n=!1,isVoid:s=!1,ignoreFirstLf:i=!1}={}){this.closedByChildren={},this.closedByParent=!1,this.canSelfClose=!1,e&&e.length>0&&e.forEach(e=>this.closedByChildren[e]=!0),this.isVoid=s,this.closedByParent=n||s,this.implicitNamespacePrefix=t||null,this.contentType=r,this.ignoreFirstLf=i}isClosedByChild(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}}let n,s;t.HtmlTagDefinition=r,t.getHtmlTagDefinition=function(e){return s||(n=new r,s={base:new r({isVoid:!0}),meta:new r({isVoid:!0}),area:new r({isVoid:!0}),embed:new r({isVoid:!0}),link:new r({isVoid:!0}),img:new r({isVoid:!0}),input:new r({isVoid:!0}),param:new r({isVoid:!0}),hr:new r({isVoid:!0}),br:new r({isVoid:!0}),source:new r({isVoid:!0}),track:new r({isVoid:!0}),wbr:new r({isVoid:!0}),p:new r({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 r({closedByChildren:["tbody","tfoot"]}),tbody:new r({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new r({closedByChildren:["tbody"],closedByParent:!0}),tr:new r({closedByChildren:["tr"],closedByParent:!0}),td:new r({closedByChildren:["td","th"],closedByParent:!0}),th:new r({closedByChildren:["td","th"],closedByParent:!0}),col:new r({isVoid:!0}),svg:new r({implicitNamespacePrefix:"svg"}),math:new r({implicitNamespacePrefix:"math"}),li:new r({closedByChildren:["li"],closedByParent:!0}),dt:new r({closedByChildren:["dt","dd"]}),dd:new r({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new r({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new r({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new r({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new r({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new r({closedByChildren:["optgroup"],closedByParent:!0}),option:new r({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new r({ignoreFirstLf:!0}),listing:new r({ignoreFirstLf:!0}),style:new r({contentType:gt.TagContentType.RAW_TEXT}),script:new r({contentType:gt.TagContentType.RAW_TEXT}),title:new r({contentType:gt.TagContentType.ESCAPABLE_RAW_TEXT}),textarea:new r({contentType:gt.TagContentType.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),s[e]||n}}));qe(_t);_t.HtmlTagDefinition,_t.getHtmlTagDefinition;var Tt=Le((function(e,t){function r(e){return t.$0<=e&&e<=t.$9}
2020-01-28 13:07:56 +08:00
/**
2020-03-31 20:40:00 +08: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
*/
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}}));qe(Tt);Tt.$EOF,Tt.$BSPACE,Tt.$TAB,Tt.$LF,Tt.$VTAB,Tt.$FF,Tt.$CR,Tt.$SPACE,Tt.$BANG,Tt.$DQ,Tt.$HASH,Tt.$$,Tt.$PERCENT,Tt.$AMPERSAND,Tt.$SQ,Tt.$LPAREN,Tt.$RPAREN,Tt.$STAR,Tt.$PLUS,Tt.$COMMA,Tt.$MINUS,Tt.$PERIOD,Tt.$SLASH,Tt.$COLON,Tt.$SEMICOLON,Tt.$LT,Tt.$EQ,Tt.$GT,Tt.$QUESTION,Tt.$0,Tt.$7,Tt.$9,Tt.$A,Tt.$E,Tt.$F,Tt.$X,Tt.$Z,Tt.$LBRACKET,Tt.$BACKSLASH,Tt.$RBRACKET,Tt.$CARET,Tt.$_,Tt.$a,Tt.$b,Tt.$e,Tt.$f,Tt.$n,Tt.$r,Tt.$t,Tt.$u,Tt.$v,Tt.$x,Tt.$z,Tt.$LBRACE,Tt.$BAR,Tt.$RBRACE,Tt.$NBSP,Tt.$PIPE,Tt.$TILDA,Tt.$AT,Tt.$BT,Tt.isWhitespace,Tt.isDigit,Tt.isAsciiLetter,Tt.isAsciiHexDigit,Tt.isNewLine,Tt.isOctalDigit;var St=Le((function(e,t){
2020-01-28 13:07:56 +08:00
/**
2020-03-31 20:40:00 +08: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
*/
Object.defineProperty(t,"__esModule",{value:!0});class r{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 ".concat(JSON.stringify(this),"."))}}t.StaticSymbol=r;t.StaticSymbolCache=class{constructor(){this.cache=new Map}get(e,t,n){const s=(n=n||[]).length?".".concat(n.join(".")):"",i='"'.concat(e,'".').concat(t).concat(s);let o=this.cache.get(i);return o||(o=new r(e,t,n),this.cache.set(i,o)),o}}}));qe(St);St.StaticSymbol,St.StaticSymbolCache;var yt=Le((function(e,t){
2020-01-28 13:07:56 +08:00
/**
2020-03-31 20:40:00 +08: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
*/
Object.defineProperty(t,"__esModule",{value:!0});const r=/-+([a-z0-9])/g;function n(e,t,r){const n=e.indexOf(t);return-1==n?r:[e.slice(0,n).trim(),e.slice(n+1).trim()]}function s(e,t,r){return Array.isArray(e)?t.visitArray(e,r):"object"==typeof(n=e)&&null!==n&&Object.getPrototypeOf(n)===a?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}t.dashCaseToCamelCase=function(e){return e.replace(r,(...e)=>e[1].toUpperCase())},t.splitAtColon=function(e,t){return n(e,":",t)},t.splitAtPeriod=function(e,t){return n(e,".",t)},t.visitValue=s,t.isDefined=function(e){return null!=e},t.noUndefined=function(e){return void 0===e?null:e};t.ValueTransformer=class{visitArray(e,t){return e.map(e=>s(e,this,t))}visitStringMap(e,t){const r={};return Object.keys(e).forEach(n=>{r[n]=s(e[n],this,t)}),r}visitPrimitive(e,t){return e}visitOther(e,t){return e}},t.SyncAsync={assertSync:e=>{if(c(e))throw new Error("Illegal state: value cannot be a promise");return e},then:(e,t)=>c(e)?e.then(t):t(e),all:e=>e.some(c)?Promise.all(e):e},t.error=function(e){throw new Error("Internal Error: ".concat(e))},t.syntaxError=function(e,t){const r=Error(e);return r[i]=!0,t&&(r[o]=t),r};const i="ngSyntaxError",o="ngParseErrors";t.isSyntaxError=function(e){return e[i]},t.getParseErrors=function(e){return e[o]||[]},t.escapeRegExp=function(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")};const a=Object.getPrototypeOf({});function c(e){return!!e&&"function"==typeof e.then}t.utf8Encode=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},t.stringify=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"".concat(t.overriddenName);if(t.name)return"".concat(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)},t.resolveForwardRef=function(e){return"function"==typeof e&&e.hasOwnProperty("__forward_ref__")?e():e},t.isPromise=c;t.Version=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 l="undefined"!=typeof window&&window,p="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,u=void 0!==Oe&&Oe||l||p;t.global=u}));qe(yt);yt.dashCaseToCamelCase,yt.splitAtColon,yt.splitAtPeriod,yt.visitValue,yt.isDefined,yt.noUndefined,yt.ValueTransformer,yt.SyncAsync,yt.error,yt.syntaxError,yt.isSyntaxError,yt.getParseErrors,yt.escapeRegExp,yt.utf8Encode,yt.stringify,yt.resolveForwardRef,yt.isPromise,yt.Version,yt.global;var bt=Le((function(e,t){
2020-01-28 13:07:56 +08:00
/**
2020-03-31 20:40:00 +08: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
*/
Object.defineProperty(t,"__esModule",{value:!0});const r=/^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))|(\@[-\w]+)$/;function n(e){return e.replace(/\W/g,"_")}t.sanitizeIdentifier=n;let s=0;function i(e){if(!e||!e.reference)return null;const t=e.reference;if(t instanceof St.StaticSymbol)return t.name;if(t.__anonymousType)return t.__anonymousType;let r=yt.stringify(t);return r.indexOf("(")>=0?(r="anonymous_".concat(s++),t.__anonymousType=r):r=n(r),r}var o;t.identifierName=i,t.identifierModuleUrl=function(e){const t=e.reference;return t instanceof St.StaticSymbol?t.filePath:"./".concat(yt.stringify(t))},t.viewClassName=function(e,t){return"View_".concat(i({reference:e}),"_").concat(t)},t.rendererTypeName=function(e){return"RenderType_".concat(i({reference:e}))},t.hostViewClassName=function(e){return"HostView_".concat(i({reference:e}))},t.componentFactoryName=function(e){return"".concat(i({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"}(o=t.CompileSummaryKind||(t.CompileSummaryKind={})),t.tokenName=function(e){return null!=e.value?n(e.value):i(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:s,styleUrls:i,externalStylesheets:o,animations:a,ngContentSelectors:p,interpolation:u,isInline:h,preserveWhitespaces:d}){if(this.encapsulation=e,this.template=t,this.templateUrl=r,this.htmlAst=n,this.styles=c(s),this.styleUrls=c(i),this.externalStylesheets=c(o),this.animations=a?l(a):[],this.ngContentSelectors=p||[],u&&2!=u.length)throw new Error("'interpolation' should have a start and an end symbol.");this.interpolation=u,this.isInline=h,this.preserveWhitespaces=d}toSummary(){return{ngContentSelectors:this.ngContentSelectors,encapsulation:this.encapsulation,styles:this.styles,animations:this.animations}}};class a{static create({isHost:e,type:t,isComponent:n,selector:s,exportAs:i,changeDetection:o,inputs:c,outputs:l,host:p,providers:u,viewProviders:h,queries:d,guards:m,viewQueries:f,entryComponents:g,template:_,componentViewType:T,rendererType:S,componentFactory:y}){const b={},C={},E={};null!=p&&Object.keys(p).forEach(e=>{const t=p[e],n=e.match(r);null===n?E[e]=t:null!=n[1]?C[n[1]]=t:null!=n[2]&&(b[n[2]]=t)});const v={};null!=c&&c.forEach(e=>{const t=yt.splitAtColon(e,[e,e]);v[t[0]]=t[1]});const A={};return null!=l&&l.forEach(e=>{const t=yt.splitAtColon(e,[e,e]);A[t[0]]=t[1]}),new a({isHost:e,type:t,isComponent:!!n,selector:s,exportAs:i,changeDetection:o,inputs:v,outputs:A,hostListeners:b,hostProperties:C,hostAttributes:E,providers:u,viewProviders:h,queries:d,guards:m,viewQueries:f,entryComponents:g,template:_,componentViewType:T,rendererType:S,componentFactory:y})}constructor({isHost:e,type:t,isComponent:r,selector:n,exportAs:s,changeDetection:i,inputs:o,outputs:a,hostListeners:l,hostProperties:p,hostAttributes:u,providers:h,viewProviders:d,queries:m,guards:f,viewQueries:g,entryComponents:_,template:T,componentViewType:S,rendererType:y,componentFactory:b}){this.isHost=!!e,this.type=t,this.isComponent=r,this.selector=n,this.exportAs=s,this.changeDetection=i,this.inputs=o,this.outputs=a,this.hostListeners=l,this.hostProperties=p,this.hostAttributes=u,this.providers=c(h),this.viewProviders=c(d),this.queries=c(m),this.guards=f,this.viewQueries=c(g),this.entryComponents=c(_),this.template=T,this.componentViewType=S,this.rendererType=y,this.componentFactory=b}toSummary(){return{summaryKind:o.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.viewQueri
2020-01-28 13:07:56 +08:00
/**
2020-03-31 20:40:00 +08: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 r{constructor(e,t,r,n){this.file=e,this.offset=t,this.line=r,this.col=n}toString(){return null!=this.offset?"".concat(this.file.url,"@").concat(this.line,":").concat(this.col):this.file.url}moveBy(e){const t=this.file.content,n=t.length;let s=this.offset,i=this.line,o=this.col;for(;s>0&&e<0;){if(s--,e++,t.charCodeAt(s)==Tt.$LF){i--;const e=t.substr(0,s-1).lastIndexOf(String.fromCharCode(Tt.$LF));o=e>0?s-e:s}else o--}for(;s<n&&e>0;){const r=t.charCodeAt(s);s++,e--,r==Tt.$LF?(i++,o=0):o++}return new r(this.file,s,i,o)}getContext(e,t){const r=this.file.content;let n=this.offset;if(null!=n){n>r.length-1&&(n=r.length-1);let s=n,i=0,o=0;for(;i<e&&n>0&&(n--,i++,"\n"!=r[n]||++o!=t););for(i=0,o=0;i<e&&s<r.length-1&&(s++,i++,"\n"!=r[s]||++o!=t););return{before:r.substring(n,this.offset),after:r.substring(this.offset,s+1)}}return null}}t.ParseLocation=r;class n{constructor(e,t){this.content=e,this.url=t}}t.ParseSourceFile=n;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 i;t.ParseSourceSpan=s,t.EMPTY_PARSE_LOCATION=new r(new n("",""),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"}(i=t.ParseErrorLevel||(t.ParseErrorLevel={}));t.ParseError=class{constructor(e,t,r=i.ERROR){this.span=e,this.msg=t,this.level=r}contextualMessage(){const e=this.span.start.getContext(100,3);return e?"".concat(this.msg,' ("').concat(e.before,"[").concat(i[this.level]," ->]").concat(e.after,'")'):this.msg}toString(){const e=this.span.details?", ".concat(this.span.details):"";return"".concat(this.contextualMessage(),": ").concat(this.span.start).concat(e)}},t.typeSourceSpan=function(e,t){const i=bt.identifierModuleUrl(t),o=null!=i?"in ".concat(e," ").concat(bt.identifierName(t)," in ").concat(i):"in ".concat(e," ").concat(bt.identifierName(t)),a=new n("",o);return new s(new r(a,-1,-1,-1),new r(a,-1,-1,-1))},t.r3JitTypeSourceSpan=function(e,t,i){const o="in ".concat(e," ").concat(t," in ").concat(i),a=new n("",o);return new s(new r(a,-1,-1,-1),new r(a,-1,-1,-1))}}));qe(Ct);Ct.ParseLocation,Ct.ParseSourceFile,Ct.ParseSourceSpan,Ct.EMPTY_PARSE_LOCATION,Ct.EMPTY_SOURCE_SPAN,Ct.ParseErrorLevel,Ct.ParseError,Ct.typeSourceSpan,Ct.r3JitTypeSourceSpan;var Et=Le((function(e,t){
2020-01-28 13:07:56 +08:00
/**
2020-03-31 20:40:00 +08: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
*/
Object.defineProperty(t,"__esModule",{value:!0});t.AstPath=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()}}}));qe(Et);Et.AstPath;var vt=Le((function(e,t){
2020-01-28 13:07:56 +08:00
/**
2020-03-31 20:40:00 +08: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
*/
Object.defineProperty(t,"__esModule",{value:!0});t.Text=class{constructor(e,t,r){this.value=e,this.sourceSpan=t,this.i18n=r}visit(e,t){return e.visitText(this,t)}};t.CDATA=class{constructor(e,t){this.value=e,this.sourceSpan=t}visit(e,t){return e.visitCdata(this,t)}};t.Expansion=class{constructor(e,t,r,n,s,i){this.switchValue=e,this.type=t,this.cases=r,this.sourceSpan=n,this.switchValueSourceSpan=s,this.i18n=i}visit(e,t){return e.visitExpansion(this,t)}};t.ExpansionCase=class{constructor(e,t,r,n,s){this.value=e,this.expression=t,this.sourceSpan=r,this.valueSourceSpan=n,this.expSourceSpan=s}visit(e,t){return e.visitExpansionCase(this,t)}};t.Attribute=class{constructor(e,t,r,n=null,s=null,i=null){this.name=e,this.value=t,this.sourceSpan=r,this.valueSpan=n,this.nameSpan=s,this.i18n=i}visit(e,t){return e.visitAttribute(this,t)}};class r{constructor(e,t,r,n,s=null,i=null,o=null,a=null){this.name=e,this.attrs=t,this.children=r,this.sourceSpan=n,this.startSourceSpan=s,this.endSourceSpan=i,this.nameSpan=o,this.i18n=a}visit(e,t){return e.visitElement(this,t)}}t.Element=r;t.Comment=class{constructor(e,t){this.value=e,this.sourceSpan=t}visit(e,t){return e.visitComment(this,t)}};function n(e,t,r=null){const n=[],s=e.visit?t=>e.visit(t,r)||t.visit(e,r):t=>t.visit(e,r);return t.forEach(e=>{const t=s(e);t&&n.push(t)}),n}t.DocType=class{constructor(e,t){this.value=e,this.sourceSpan=t}visit(e,t){return e.visitDocType(this,t)}},t.visitAll=n;class s{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=[],s=this;return t((function(t){t&&r.push(n(s,t,e))})),Array.prototype.concat.apply([],r)}}t.RecursiveVisitor=s,t.findNode=function(e,t){const i=[];return n(new class extends s{visit(e,n){const s=function e(t){const n=t.sourceSpan.start.offset;let s=t.sourceSpan.end.offset;return t instanceof r&&(t.endSourceSpan?s=t.endSourceSpan.end.offset:t.children&&t.children.length&&(s=e(t.children[t.children.length-1]).end)),{start:n,end:s}}(e);if(!(s.start<=t&&t<s.end))return!0;i.push(e)}},e),new Et.AstPath(i,t)}}));qe(vt);vt.Text,vt.CDATA,vt.Expansion,vt.ExpansionCase,vt.Attribute,vt.Element,vt.Comment,vt.DocType,vt.visitAll,vt.RecursiveVisitor,vt.findNode;var At=Le((function(e,t){
2020-01-28 13:07:56 +08:00
/**
2020-03-31 20:40:00 +08: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
*/
Object.defineProperty(t,"__esModule",{value:!0}),t.assertArrayOfStrings=function(e,t){if(null!=t){if(!Array.isArray(t))throw new Error("Expected '".concat(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 '".concat(e,"' to be an array of strings."))}};const r=[/^\s*$/,/[<>]/,/^[{}]$/,/&(#|[a-z])/i,/^\/\//];t.assertInterpolationSymbols=function(e,t){if(!(null==t||Array.isArray(t)&&2==t.length))throw new Error("Expected '".concat(e,"' to be an array, [start, end]."));if(null!=t){const e=t[0],n=t[1];r.forEach(t=>{if(t.test(e)||t.test(n))throw new Error("['".concat(e,"', '").concat(n,"'] contains unusable interpolation symbol."))})}}}));qe(At);At.assertArrayOfStrings,At.assertInterpolationSymbols;var wt=Le((function(e,t){
2020-01-28 13:07:56 +08:00
/**
2020-03-31 20:40:00 +08: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
*/
Object.defineProperty(t,"__esModule",{value:!0});class r{constructor(e,t){this.start=e,this.end=t}static fromArray(e){return e?(At.assertInterpolationSymbols("interpolation",e),new r(e[0],e[1])):t.DEFAULT_INTERPOLATION_CONFIG}}t.InterpolationConfig=r,t.DEFAULT_INTERPOLATION_CONFIG=new r("{{","}}")}));qe(wt);wt.InterpolationConfig,wt.DEFAULT_INTERPOLATION_CONFIG;var kt=Le((function(e,t){
2020-01-28 13:07:56 +08:00
/**
2020-03-31 20:40:00 +08: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
*/
Object.defineProperty(t,"__esModule",{value:!0});const r=Tt;var n;!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"}(n=t.TokenType||(t.TokenType={}));class s{constructor(e,t,r){this.type=e,this.parts=t,this.sourceSpan=r}}t.Token=s;class i extends Ct.ParseError{constructor(e,t,r){super(r,e),this.tokenType=t}}t.TokenError=i;class o{constructor(e,t){this.tokens=e,this.errors=t}}t.TokenizeResult=o,t.tokenize=function(e,t,r,n={}){return new u(new Ct.ParseSourceFile(e,t),r,n).tokenize()};const a=/\r\n?/g;function c(e){const t=e===r.$EOF?"EOF":String.fromCharCode(e);return'Unexpected character "'.concat(t,'"')}function l(e){return'Unknown entity "'.concat(e,'" - use the "&#<decimal>;" or "&#x<hex>;" syntax')}class p{constructor(e){this.error=e}}class u{constructor(e,t,r){this._getTagDefinition=t,this._currentTokenStart=null,this._currentTokenType=null,this._expansionCaseStack=[],this._inInterpolation=!1,this.tokens=[],this.errors=[],this._tokenizeIcu=r.tokenizeExpansionForms||!1,this._interpolationConfig=r.interpolationConfig||wt.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 T(e,n):new _(e,n);try{this._cursor.init()}catch(e){this.handleError(e)}}_processCarriageReturns(e){return e.replace(a,"\n")}tokenize(){for(;this._cursor.peek()!==r.$EOF;){const e=this._cursor.clone();try{if(this._attemptCharCode(r.$LT))if(this._attemptCharCode(r.$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(r.$SLASH))this._consumeTagClose(e);else{const t=this._cursor.clone();this._attemptCharCode(r.$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(n.EOF),this._endToken([]),new o(function(e){const t=[];let r=void 0;for(let s=0;s<e.length;s++){const i=e[s];r&&r.type==n.TEXT&&i.type==n.TEXT?(r.parts[0]+=i.parts[0],r.sourceSpan.end=i.sourceSpan.end):(r=i,t.push(r))}return t}(this.tokens),this.errors)}_tokenizeExpansionForm(){if(this.isExpansionFormStart())return this._consumeExpansionFormStart(),!0;if(((e=this._cursor.peek())===r.$EQ||r.isAsciiLetter(e)||r.isDigit(e))&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;var e;if(this._cursor.peek()===r.$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 i("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 i("Programming error - attempted to end a token which has no token type",null,this.
2020-01-28 13:07:56 +08:00
/**
2020-03-31 20:40:00 +08: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
*/
Object.defineProperty(t,"__esModule",{value:!0});class r extends Ct.ParseError{constructor(e,t,r){super(t,r),this.elementName=e}static create(e,t,n){return new r(e,t,n)}}t.TreeError=r;class n{constructor(e,t){this.rootNodes=e,this.errors=t}}t.ParseTreeResult=n;t.Parser=class{constructor(e){this.getTagDefinition=e}parse(e,t,r,i=!1){const o=i?this.getTagDefinition:e=>this.getTagDefinition(e.toLowerCase()),a=kt.tokenize(e,t,o,r),c=r&&r.canSelfClose||!1,l=r&&r.allowHtmComponentClosingTags||!1,p=new s(a.tokens,o,c,l,i).build();return new n(p.rootNodes,a.errors.concat(p.errors))}};class s{constructor(e,t,r,n,s){this.tokens=e,this.getTagDefinition=t,this.canSelfClose=r,this.allowHtmComponentClosingTags=n,this.isTagNameCaseSensitive=s,this._index=-1,this._rootNodes=[],this._errors=[],this._elementStack=[],this._advance()}build(){for(;this._peek.type!==kt.TokenType.EOF;)this._peek.type===kt.TokenType.TAG_OPEN_START?this._consumeStartTag(this._advance()):this._peek.type===kt.TokenType.TAG_CLOSE?this._consumeEndTag(this._advance()):this._peek.type===kt.TokenType.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===kt.TokenType.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===kt.TokenType.TEXT||this._peek.type===kt.TokenType.RAW_TEXT||this._peek.type===kt.TokenType.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===kt.TokenType.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._peek.type===kt.TokenType.DOC_TYPE_START?this._consumeDocType(this._advance()):this._advance();return new n(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(kt.TokenType.CDATA_END);this._addToParent(new vt.CDATA(r,new Ct.ParseSourceSpan(e.sourceSpan.start,(n||t).sourceSpan.end)))}_consumeComment(e){const t=this._advanceIf(kt.TokenType.RAW_TEXT),r=this._advanceIf(kt.TokenType.COMMENT_END),n=null!=t?t.parts[0].trim():null,s=new Ct.ParseSourceSpan(e.sourceSpan.start,(r||t||e).sourceSpan.end);this._addToParent(new vt.Comment(n,s))}_consumeDocType(e){const t=this._advanceIf(kt.TokenType.RAW_TEXT),r=this._advanceIf(kt.TokenType.DOC_TYPE_END),n=null!=t?t.parts[0].trim():null,s=new Ct.ParseSourceSpan(e.sourceSpan.start,(r||t||e).sourceSpan.end);this._addToParent(new vt.DocType(n,s))}_consumeExpansion(e){const t=this._advance(),n=this._advance(),s=[];for(;this._peek.type===kt.TokenType.EXPANSION_CASE_VALUE;){const e=this._parseExpansionCase();if(!e)return;s.push(e)}if(this._peek.type!==kt.TokenType.EXPANSION_FORM_END)return void this._errors.push(r.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '}'."));const i=new Ct.ParseSourceSpan(e.sourceSpan.start,this._peek.sourceSpan.end);this._addToParent(new vt.Expansion(t.parts[0],n.parts[0],s,i,t.sourceSpan)),this._advance()}_parseExpansionCase(){const e=this._advance();if(this._peek.type!==kt.TokenType.EXPANSION_CASE_EXP_START)return this._errors.push(r.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '{'.")),null;const t=this._advance(),n=this._collectExpansionExpTokens(t);if(!n)return null;const i=this._advance();n.push(new kt.Token(kt.TokenType.EOF,[],i.sourceSpan));const o=new s(n,this.getTagDefinition,this.canSelfClose,this.allowHtmComponentClosingTags,this.isTagNameCaseSensitive).build();if(o.errors.length>0)return this._errors=this._errors.concat(o.errors),null;const a=new Ct.ParseSourceSpan(e.sourceSpan.start,i.sourceSpan.end),c=new Ct.ParseSourceSpan(t.sourceSpan.start,i.sourceSpan.end);return new vt.ExpansionCase(e.parts[0],o.rootNodes,a,e.sourceSpan,c)}_collectExpansionExpTokens(e){const t=[],n=[kt.TokenType.EXPANSION_CASE_EXP_START];for(;;){if(this._peek.type!==kt.TokenType.EXPANSION_FORM_START&&this._peek.type!==kt.TokenType.EXPANSION_CASE_EXP_START||n.push(this._peek.type),this._peek.type==
2020-01-28 13:07:56 +08:00
/**
2020-03-31 20:40:00 +08: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
*/
Object.defineProperty(t,"__esModule",{value:!0});var r=Nt;t.ParseTreeResult=r.ParseTreeResult,t.TreeError=r.TreeError;class n extends Nt.Parser{constructor(){super(_t.getHtmlTagDefinition)}parse(e,t,r,n=!1){return super.parse(e,t,r,n)}}t.HtmlParser=n}));qe(xt);xt.ParseTreeResult,xt.TreeError,xt.HtmlParser;var Pt=Le((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});let r=null;t.parse=function(e,{canSelfClose:t=!1,allowHtmComponentClosingTags:n=!1,isTagNameCaseSensitive:s=!1}={}){return(r||(r=new xt.HtmlParser),r).parse(e,"angular-html-parser",{tokenizeExpansionForms:!1,interpolationConfig:void 0,canSelfClose:t,allowHtmComponentClosingTags:n},s)}}));qe(Pt);Pt.parse;const{HTML_ELEMENT_ATTRIBUTES:Dt,HTML_TAGS:Rt,isUnknownNamespace:Ot}=ot,{hasPragma:qt}=at,{Node:Lt}=dt,{parseIeConditionalComment:$t}=ft;function It(e,{recognizeSelfClosing:t,normalizeTagName:r,normalizeAttributeName:n,allowHtmComponentClosingTags:s,isTagNameCaseSensitive:i}){const o=Pt,{RecursiveVisitor:a,visitAll:c,Attribute:l,CDATA:p,Comment:u,DocType:h,Element:d,Text:m}=vt,{ParseSourceSpan:f}=Ct,{getHtmlTagDefinition:g}=_t,{rootNodes:_,errors:T}=o.parse(e,{canSelfClose:t,allowHtmComponentClosingTags:s,isTagNameCaseSensitive:i});if(0!==T.length){const{msg:e,span:t}=T[0],{line:r,col:n}=t.start;throw ct(e,{start:{line:r+1,column:n+1}})}const S=e=>{const t=e.name.startsWith(":")?e.name.slice(1).split(":")[0]:null,r=e.nameSpan.toString(),n=r.startsWith("".concat(t,":")),s=n?r.slice(t.length+1):r;e.name=s,e.namespace=t,e.hasExplicitNamespace=n},y=(e,t)=>{const r=e.toLowerCase();return t(r)?r:e};return c(new class extends a{visit(e){(e=>{if(e instanceof l)e.type="attribute";else if(e instanceof p)e.type="cdata";else if(e instanceof u)e.type="comment";else if(e instanceof h)e.type="docType";else if(e instanceof d)e.type="element";else{if(!(e instanceof m))throw new Error("Unexpected node ".concat(JSON.stringify(e)));e.type="text"}})(e),(e=>{e instanceof d?(S(e),e.attrs.forEach(e=>{S(e),e.valueSpan?(e.value=e.valueSpan.toString(),/['"]/.test(e.value[0])&&(e.value=e.value.slice(1,-1))):e.value=null})):e instanceof u?e.value=e.sourceSpan.toString().slice("\x3c!--".length,-"--\x3e".length):e instanceof m&&(e.value=e.sourceSpan.toString())})(e),(e=>{if(e instanceof d){const t=g(i?e.name:e.name.toLowerCase());!e.namespace||e.namespace===t.implicitNamespacePrefix||Ot(e)?e.tagDefinition=t:e.tagDefinition=g("")}})(e),(e=>{if(e instanceof d&&(!r||e.namespace&&e.namespace!==e.tagDefinition.implicitNamespacePrefix&&!Ot(e)||(e.name=y(e.name,e=>e in Rt)),n)){const t=Dt[e.name]||Object.create(null);e.attrs.forEach(r=>{r.namespace||(r.name=y(r.name,r=>e.name in Dt&&(r in Dt["*"]||r in t)))})}})(e),(e=>{e.sourceSpan&&e.endSourceSpan&&(e.sourceSpan=new f(e.sourceSpan.start,e.endSourceSpan.end))})(e)}},_),_}function Mt(e){return e.sourceSpan.start.offset}function Ut(e){return e.sourceSpan.end.offset}function Bt({recognizeSelfClosing:e=!1,normalizeTagName:t=!1,normalizeAttributeName:r=!1,allowHtmComponentClosingTags:n=!1,isTagNameCaseSensitive:i=!1}={}){return{parse:(o,a,c)=>function e(t,r,n,i=!0){const{frontMatter:o,content:a}=i?s(t):{frontMatter:null,content:t},c={type:"root",sourceSpan:{start:{offset:0},end:{offset:t.length}},children:It(a,n)};o&&c.children.unshift(o);const l=new Lt(c),p=(s,i)=>{const{offset:o}=i,a=e(t.slice(0,o).replace(/[^\r\n]/g," ")+s,r,n,!1),c=a.children[0].sourceSpan.constructor;a.sourceSpan=new c(i,a.children[a.children.length-1].sourceSpan.end);const l=a.children[0];return l.length===o?a.children.shift():(l.sourceSpan=new c(l.sourceSpan.start.moveBy(o),l.sourceSpan.end),l.value=l.value.slice(o)),a};return l.map(e=>{if("comment"===e.type){const t=$t(e,p);if(t)return t}return e})}(o,c,{recognizeSelfClosing:e,normalizeTagName:t,normalizeAttributeName:r,allowHtmComponentClosingTags:n,isTagNameCaseSensitive:i}),hasPragma:qt,astFormat:"html",locStart:Mt,locEnd:Ut}}var Ft={parsers:{html:Bt({recognizeSelfClosing:!0,normalizeTagName:!0,normalizeAttributeName:!0,allowHtmComponentClosingTags:!0}),angular:Bt(),vue:Bt({recognizeSelfClosing:!0,isTagNameCase