1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-23 15:16:54 -05:00
denoland-deno/std/prettier/vendor/parser_markdown.js

143 lines
237 KiB
JavaScript
Raw Normal View History

2019-11-09 08:24:43 -05:00
// This file is copied from prettier@1.19.1
/**
* Copyright © James Long and contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
2019-11-09 08:24:43 -05: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.markdown={}))}(globalThis,(function(e){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function c(e,t,r){return(c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,r){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=o(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(r):i.value}})(e,t,r||e)}function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if(!(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e)))return;var r=[],n=!0,i=!1,a=void 0;try{for(var o,u=e[Symbol.iterator]();!(n=(o=u.next()).done)&&(r.push(o.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{n||null==u.return||u.return()}finally{if(i)throw a}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var p=function(){for(var e={},t=0;t<arguments.length;t++){var r=arguments[t];for(var n in r)f.call(r,n)&&(e[n]=r[n])}return e},f=Object.prototype.hasOwnProperty;function h(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function d(e,t){return e(t={exports:{}},t.exports),t.exports}function D(e){return e&&e.default||e}var g=Object.freeze({__proto__:null,default:{}}),m=d((function(e){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}})),v=D(g),b=d((function(e){try{var t=v;if("function"!=typeof t.inherits)throw"";e.exports=t.inherits}catch(t){e.exports=m}})),y=function(e){var r,n,i;for(n in b(o,e),b(a,o),r=o.prototype)(i=r[n])&&"object"===t(i)&&(r[n]="concat"in i?i.concat():p(i));return o;function a(t){return e.apply(this,t)}function o(){return this instanceof o?e.apply(this,arguments):new a(arguments)}}
/**
* @author Titus Wormer
* @copyright 2016 Titus Wormer
* @license MIT
* @module state-toggle
* @fileoverview Enter/exit a state.
*/;var E=function(e,t,r){return function(){var n=r||this,i=n[e];return n[e]=!t,function(){n[e]=i}}};var C=function(e){var t=function(e){var t=[],r=e.indexOf("\n");for(;-1!==r;)t.push(r+1),r=e.indexOf("\n",r+1);return t.push(e.length+1),t}(String(e));return{toPosition:A(t),toOffset:w(t)}};function A(e){return function(t){var r=-1,n=e.length;if(t<0)return{};for(;++r<n;)if(e[r]>t)return{line:r+1,column:t-(e[r-1]||0)+1,offset:t};return{}}}function w(e){return function(t){var r=t&&t.line,n=t&&t.column;if(!isNaN(r)&&!isNaN(n)&&r-1 in e)return(e[r-2]||0)+n-1||0;return-1}}var k=function(e,t){return function(r){var n,i=0,a=r.indexOf("\\"),o=e[t],u=[];for(;-1!==a;)u.push(r.slice(i,a)),i=a+1,(n=r.charAt(i))&&-1!==o.indexOf(n)||u.push("\\"),a=r.indexOf("\\",i);return u.push(r.slice(i)),u.join("")}};var T={AEli:"Æ",AElig:"Æ",AM:"&",AMP:"&",Aacut:"Á",Aacute:"Á",Abreve:"Ă",Acir:"Â",Acirc:"Â",Acy:"А",Afr:"𝔄",Agrav:"À",Agrave:"À",Alpha:"Α",Amacr:"Ā",And:"",Aogon:"Ą",Aopf:"𝔸",ApplyFunction:"",Arin:"Å",Aring:"Å",Ascr:"𝒜",Assign:"",Atild:"Ã",Atilde:"Ã",Aum:"Ä",Auml:"Ä",Backslash:"",Barv:"",Barwed:"",Bcy:"Б",Because:"",Bernoullis:"",Beta:"Β",Bfr:"𝔅",Bopf:"𝔹",Breve:"˘",Bscr:"",Bumpeq:"",CHcy:"Ч",COP:"©",COPY:"©",Cacute:"Ć",Cap:"",CapitalDifferentialD:"",Cayleys:"",Ccaron:"Č",Ccedi:"Ç",Ccedil:"Ç",Ccirc:"Ĉ",Cconint:"",Cdot:"Ċ",Cedilla:"¸",CenterDot:"·",Cfr:"",Chi:"Χ",CircleDot:"",CircleMinus:"",CirclePlus:"",CircleTimes:"",ClockwiseContourIntegral:"",CloseCurlyDoubleQuote:"",CloseCurlyQuote:"",Colon:"",Colone:"",Congruent:"",Conint:"",ContourIntegral:"",Copf:"",Coproduct:"",CounterClockwiseContourIntegral:"",Cross:"",Cscr:"𝒞",Cup:"",CupCap:"",DD:"",DDotrahd:"",DJcy:"Ђ",DScy:"Ѕ",DZcy:"Џ",Dagger:"",Darr:"",Dashv:"",Dcaron:"Ď",Dcy:"Д",Del:"",Delta:"Δ",Dfr:"𝔇",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",Diamond:"",DifferentialD:"",Dopf:"𝔻",Dot:"¨",DotDot:"",DotEqual:"",DoubleContourIntegral:"",DoubleDot:"¨",DoubleDownArrow:"",DoubleLeftArrow:"",DoubleLeftRightArrow:"",DoubleLeftTee:"",DoubleLongLeftArrow:"",DoubleLongLeftRightArrow:"",DoubleLongRightArrow:"",DoubleRightArrow:"",DoubleRightTee:"",DoubleUpArrow:"",DoubleUpDownArrow:"",DoubleVerticalBar:"",DownArrow:"",DownArrowBar:"",DownArrowUpArrow:"",DownBreve:"̑",DownLeftRightVector:"",DownLeftTeeVector:"",DownLeftVector:"",DownLeftVectorBar:"",DownRightTeeVector:"",DownRightVector:"",DownRightVectorBar:"",DownTee:"",DownTeeArrow:"",Downarrow:"",Dscr:"𝒟",Dstrok:"Đ",ENG:"Ŋ",ET:"Ð",ETH:"Ð",Eacut:"É",Eacute:"É",Ecaron:"Ě",Ecir:"Ê",Ecirc:"Ê",Ecy:"Э",Edot:"Ė",Efr:"𝔈",Egrav:"È",Egrave:"È",Element:"",Emacr:"Ē",EmptySmallSquare:"",EmptyVerySmallSquare:"",Eogon:"Ę",Eopf:"𝔼",Epsilon:"Ε",Equal:"",EqualTilde:"",Equilibrium:"",Escr:"",Esim:"",Eta:"Η",Eum:"Ë",Euml:"Ë",Exists:"",ExponentialE:"",Fcy:"Ф",Ffr:"𝔉",FilledSmallSquare:"",FilledVerySmallSquare:"",Fopf:"𝔽",ForAll:"",Fouriertrf:"",Fscr:"",GJcy:"Ѓ",G:">",GT:">",Gamma:"Γ",Gammad:"Ϝ",Gbreve:"Ğ",Gcedil:"Ģ",Gcirc:"Ĝ",Gcy:"Г",Gdot:"Ġ",Gfr:"𝔊",Gg:"",Gopf:"𝔾",GreaterEqual:"",GreaterEqualLess:"",GreaterFullEqual:"",GreaterGreater:"",GreaterLess:"",GreaterSlantEqual:"",GreaterTilde:"",Gscr:"𝒢",Gt:"",HARDcy:"Ъ",Hacek:"ˇ",Hat:"^",Hcirc:"Ĥ",Hfr:"",HilbertSpace:"",Hopf:"",HorizontalLine:"",Hscr:"",Hstrok:"Ħ",HumpDownHump:"",HumpEqual:"",IEcy:"Е",IJlig:"IJ",IOcy:"Ё",Iacut:"Í",Iacute:"Í",Icir:"Î",Icirc:"Î",Icy:"И",Idot:"İ",Ifr:"",Igrav:"Ì",Igrave:"Ì",Im:"",Imacr:"Ī",ImaginaryI:"",Implies:"",Int:"",Integral:"",Intersection:"",InvisibleComma:"",InvisibleTimes:"",Iogon:"Į",Iopf:"𝕀",Iota:"Ι",Iscr:"",Itilde:"Ĩ",Iukcy:"І",Ium:"Ï",Iuml:"Ï",J
/*!
* repeat-string <https://github.com/jonschlinkert/repeat-string>
*
* Copyright (c) 2014-2015, Jon Schlinkert.
* Licensed under the MIT License.
*/;var Ve,Me="",je=function(e,t){if("string"!=typeof e)throw new TypeError("expected a string");if(1===t)return e;if(2===t)return e+e;var r=e.length*t;if(Ve!==e||void 0===Ve)Ve=e,Me="";else if(Me.length>=r)return Me.substr(0,r);for(;r>Me.length&&t>1;)1&t&&(Me+=e),t>>=1,e+=e;return Me=(Me+=e).substr(0,r)};var ze=function(e){var t=String(e),r=t.length;for(;t.charAt(--r)===Ge;);return t.slice(0,r+1)},Ge="\n";var He=function(e,t,r){var n,i,a,o=-1,u=t.length,s="",c="",l="",p="";for(;++o<u;)if(n=t.charAt(o),a)if(a=!1,s+=l,c+=p,l="",p="",n===Xe)l=n,p=n;else for(s+=n,c+=n;++o<u;){if(!(n=t.charAt(o))||n===Xe){p=n,l=n;break}s+=n,c+=n}else if(n===Qe&&t.charAt(o+1)===n&&t.charAt(o+2)===n&&t.charAt(o+3)===n)l+=Ye,o+=3,a=!0;else if(n===We)l+=n,a=!0;else{for(i="";n===We||n===Qe;)i+=n,n=t.charAt(++o);if(n!==Xe)break;l+=i+n,p+=n}if(c)return!!r||e(s)({type:"code",lang:null,value:ze(c)})},Xe="\n",We="\t",Qe=" ",Ye=je(Qe,4);var Ze=function(e,t,r){var n,i,a,o,u,s,c,l,p,f,h,d=this.options,D=t.length+1,g=0,m="";if(!d.gfm)return;for(;g<D&&((a=t.charAt(g))===et||a===Ke);)m+=a,g++;if(f=g,(a=t.charAt(g))!==tt&&a!==rt)return;g++,i=a,n=1,m+=a;for(;g<D&&(a=t.charAt(g))===i;)m+=a,n++,g++;if(n<nt)return;for(;g<D&&((a=t.charAt(g))===et||a===Ke);)m+=a,g++;o="",u="";for(;g<D&&(a=t.charAt(g))!==Je&&a!==tt&&a!==rt;)a===et||a===Ke?u+=a:(o+=u+a,u=""),g++;if((a=t.charAt(g))&&a!==Je)return;if(r)return!0;(h=e.now()).column+=m.length,h.offset+=m.length,m+=o,o=this.decode.raw(this.unescape(o),h),u&&(m+=u);u="",l="",p="",s="",c="";for(;g<D;)if(a=t.charAt(g),s+=l,c+=p,l="",p="",a===Je){for(s?(l+=a,p+=a):m+=a,u="",g++;g<D&&(a=t.charAt(g))===et;)u+=a,g++;if(l+=u,p+=u.slice(f),!(u.length>=it)){for(u="";g<D&&(a=t.charAt(g))===i;)u+=a,g++;if(l+=u,p+=u,!(u.length<n)){for(u="";g<D&&((a=t.charAt(g))===et||a===Ke);)l+=a,p+=a,g++;if(!a||a===Je)break}}}else s+=a,p+=a,g++;return e(m+=s+l)({type:"code",lang:o||null,value:ze(c)})},Je="\n",Ke="\t",et=" ",tt="~",rt="`",nt=3,it=4;var at=d((function(e,t){(t=e.exports=function(e){return e.replace(/^\s*|\s*$/g,"")}).left=function(e){return e.replace(/^\s*/,"")},t.right=function(e){return e.replace(/\s*$/,"")}})),ot=(at.left,at.right,function(e,t,r,n){var i,a,o,u,s,c,l=["pedantic","commonmark"],p=l.length,f=e.length,h=-1;for(;++h<f;){for(i=e[h],a=i[1]||{},o=i[0],u=-1,c=!1;++u<p;)if(void 0!==a[s=l[u]]&&a[s]!==r.options[s]){c=!0;break}if(!c&&t[o].apply(r,n))return!0}return!1});var ut=function(e,t,r){var n,i,a,o,u,s,c,l,p,f=this.offset,h=this.blockTokenizers,d=this.interruptBlockquote,D=e.now(),g=D.line,m=t.length,v=[],b=[],y=[],E=0;for(;E<m&&((i=t.charAt(E))===lt||i===ct);)E++;if(t.charAt(E)!==pt)return;if(r)return!0;E=0;for(;E<m;){for(o=t.indexOf(st,E),c=E,l=!1,-1===o&&(o=m);E<m&&((i=t.charAt(E))===lt||i===ct);)E++;if(t.charAt(E)===pt?(E++,l=!0,t.charAt(E)===lt&&E++):E=c,u=t.slice(E,o),!l&&!at(u)){E=c;break}if(!l&&(a=t.slice(E),ot(d,h,this,[e,a,!0])))break;s=c===E?u:t.slice(c,o),y.push(E-c),v.push(s),b.push(u),E=o+1}E=-1,m=y.length,n=e(v.join(st));for(;++E<m;)f[g]=(f[g]||0)+y[E],g++;return p=this.enterBlock(),b=this.tokenizeBlock(b.join(st),D),p(),n({type:"blockquote",children:b})},st="\n",ct="\t",lt=" ",pt=">";var ft=function(e,t,r){var n,i,a,o=this.options,u=t.length+1,s=-1,c=e.now(),l="",p="";for(;++s<u;){if((n=t.charAt(s))!==Dt&&n!==dt){s--;break}l+=n}a=0;for(;++s<=u;){if((n=t.charAt(s))!==gt){s--;break}l+=n,a++}if(a>mt)return;if(!a||!o.pedantic&&t.charAt(s+1)===gt)return;u=t.length+1,i="";for(;++s<u;){if((n=t.charAt(s))!==Dt&&n!==dt){s--;break}i+=n}if(!o.pedantic&&0===i.length&&n&&n!==ht)return;if(r)return!0;l+=i,i="",p="";for(;++s<u&&(n=t.charAt(s))&&n!==ht;)if(n===Dt||n===dt||n===gt){for(;n===Dt||n===dt;)i+=n,n=t.charAt(++s);for(;n===gt;)i+=n,n=t.charAt(++s);for(;n===Dt||n===dt;)i+=n,n=t.charAt(++s);s--}else p+=i+n,i="";return c.column+=l.length,c.offset+=l.length,e(l+=p+i)({type:"heading",depth:a,children:this.tokenizeInline(p,c)})},ht="\n",dt="\t",Dt=" ",gt="#",mt=6;var vt=function(e,t,r){var n,i,a,o,u=-1,s=t.length+1,c="";for(;++u<s&&((n=t.charAt(u))===yt||n===Et);)c+=n;if(n!==Ct&&n!==wt&&n!==At)return;i=n,c+=n,a=1,o="";for
/*!
* Determine if an object is a Buffer
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/function Ma(e){var t,r,n;if(e){if("string"==typeof e||Ra(e))e={contents:e};else if("message"in e&&"messages"in e)return e}else e={};if(!(this instanceof Ma))return new Ma(e);for(this.data={},this.messages=[],this.history=[],this.cwd=Ba.cwd(),r=-1,n=Va.length;++r<n;)t=Va[r],Ua.call(e,t)&&(this[t]=e[t]);for(t in e)-1===Va.indexOf(t)&&(this[t]=e[t])}function ja(e,t){if(-1!==e.indexOf(Pa.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Pa.sep+"`")}function za(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Ga(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}$a.toString=function(e){var t=this.contents||"";return Ra(t)?t.toString(e):String(t)},Object.defineProperty($a,"path",{get:function(){return this.history[this.history.length-1]},set:function(e){za(e,"path"),e!==this.path&&this.history.push(e)}}),Object.defineProperty($a,"dirname",{get:function(){return"string"==typeof this.path?Pa.dirname(this.path):void 0},set:function(e){Ga(this.path,"dirname"),this.path=Pa.join(e||"",this.basename)}}),Object.defineProperty($a,"basename",{get:function(){return"string"==typeof this.path?Pa.basename(this.path):void 0},set:function(e){za(e,"basename"),ja(e,"basename"),this.path=Pa.join(this.dirname||"",e)}}),Object.defineProperty($a,"extname",{get:function(){return"string"==typeof this.path?Pa.extname(this.path):void 0},set:function(e){var t=e||"";if(ja(t,"extname"),Ga(this.path,"extname"),t){if("."!==t.charAt(0))throw new Error("`extname` must start with `.`");if(-1!==t.indexOf(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Oa(this.path,t)}}),Object.defineProperty($a,"stem",{get:function(){return"string"==typeof this.path?Pa.basename(this.path,this.extname):void 0},set:function(e){za(e,"stem"),ja(e,"stem"),this.path=Pa.join(this.dirname||"",e+(this.extname||""))}});var Ha=Ia,Xa=Ia.prototype;Xa.message=function(e,t,r){var n=this.path,i=new oa(e,t,r);n&&(i.name=n+":"+i.name,i.file=n);return i.fatal=!1,this.messages.push(i),i},Xa.info=function(){var e=this.message.apply(this,arguments);return e.fatal=null,e},Xa.fail=function(){var e=this.message.apply(this,arguments);throw e.fatal=!0,e};var Wa=function(){var e=[],t={};return t.run=function(){var t=-1,r=Qa.call(arguments,0,-1),n=arguments[arguments.length-1];if("function"!=typeof n)throw new Error("Expected function as last argument, not "+n);(function i(a){var o=e[++t],u=Qa.call(arguments,0).slice(1),s=r.length,c=-1;if(a)n(a);else{for(;++c<s;)null!==u[c]&&void 0!==u[c]||(u[c]=r[c]);r=u,o?function(e,t){var r;return function(){var t,a=Qa.call(arguments,0),o=e.length>a.length;o&&a.push(n);try{t=e.apply(null,a)}catch(e){if(o&&r)throw e;return n(e)}o||(t&&"function"==typeof t.then?t.then(i,n):t instanceof Error?n(t):i(t))};function n(){r||(r=!0,t.apply(null,arguments))}function i(e){n(null,e)}}(o,i).apply(null,r):n.apply(null,[null].concat(r))}}).apply(null,[null].concat(r))},t.use=function(r){if("function"!=typeof r)throw new Error("Expected `fn` to be a function, not "+r);return e.push(r),t},t},Qa=[].slice;var Ya=function(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.getPrototypeOf({})},Za=function e(){var r=[];var n=Wa();var i={};var a=!1;var o=-1;u.data=function(e,t){if("string"==typeof e)return 2===arguments.length?(io("data",a),i[e]=t,u):Ka.call(i,e)&&i[e]||null;if(e)return io("data",a),i=e,u;return i};u.freeze=s;u.attachers=r;u.use=function(e){var n;if(io("use",a),null==e);else if("function"==typeof e)l.apply(null,arguments);else{if("object"!==t(e))throw new Error("Expected usable value, not `"+e+"`");"length"in e?c(e):o(e)}n&&(i.settings=Ki(i.settings||{},n));return u;function o(e){c(e.plugins),e.settings&&(n=Ki(n||{},e.settings))}function s(e){if("function"==typeof e)l(e);else{if("object"!==t(e))throw new Error("Expected usable value, not `"+e+"`");"length"in e?l.apply(null,e):o(e)}}function c(e){var r,n;if(null==e);else{if(!("object"===t(e)&&"length"in e))throw new Error("Expected a list of plugins, not `"+e+"`");f
/**
* @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:"≔"
/**
* @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 n,a,o=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.closedByChildren,a=n.requiredParents,o=n.implicitNamespacePrefix,u=n.contentType,s=void 0===u?Dc.TagContentType.PARSABLE_DATA:u,c=n.closedByParent,l=void 0!==c&&c,p=n.isVoid,f=void 0!==p&&p,h=n.ignoreFirstLf,d=void 0!==h&&h;r(this,e),this.closedByChildren={},this.closedByParent=!1,this.canSelfClose=!1,i&&i.length>0&&i.forEach((function(e){return t.closedByChildren[e]=!0})),this.isVoid=f,this.closedByParent=l||f,a&&a.length>0&&(this.requiredParents={},this.parentToAdd=a[0],a.forEach((function(e){return t.requiredParents[e]=!0}))),this.implicitNamespacePrefix=o||null,this.contentType=s,this.ignoreFirstLf=d}return i(e,[{key:"requireExtraParent",value:function(e){if(!this.requiredParents)return!1;if(!e)return!0;var t=e.toLowerCase();return!("template"===t||"ng-template"===e)&&1!=this.requiredParents[t]}},{key:"isClosedByChild",value:function(e){return this.isVoid||e.toLowerCase()in this.closedByChildren}}]),e}();t.HtmlTagDefinition=o,t.getHtmlTagDefinition=function(e){return a||(n=new o,a={base:new o({isVoid:!0}),meta:new o({isVoid:!0}),area:new o({isVoid:!0}),embed:new o({isVoid:!0}),link:new o({isVoid:!0}),img:new o({isVoid:!0}),input:new o({isVoid:!0}),param:new o({isVoid:!0}),hr:new o({isVoid:!0}),br:new o({isVoid:!0}),source:new o({isVoid:!0}),track:new o({isVoid:!0}),wbr:new o({isVoid:!0}),p:new o({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 o({closedByChildren:["tbody","tfoot"]}),tbody:new o({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new o({closedByChildren:["tbody"],closedByParent:!0}),tr:new o({closedByChildren:["tr"],requiredParents:["tbody","tfoot","thead"],closedByParent:!0}),td:new o({closedByChildren:["td","th"],closedByParent:!0}),th:new o({closedByChildren:["td","th"],closedByParent:!0}),col:new o({requiredParents:["colgroup"],isVoid:!0}),svg:new o({implicitNamespacePrefix:"svg"}),math:new o({implicitNamespacePrefix:"math"}),li:new o({closedByChildren:["li"],closedByParent:!0}),dt:new o({closedByChildren:["dt","dd"]}),dd:new o({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new o({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new o({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new o({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new o({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new o({closedByChildren:["optgroup"],closedByParent:!0}),option:new o({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new o({ignoreFirstLf:!0}),listing:new o({ignoreFirstLf:!0}),style:new o({contentType:Dc.TagContentType.RAW_TEXT}),script:new o({contentType:Dc.TagContentType.RAW_TEXT}),title:new o({contentType:Dc.TagContentType.ESCAPABLE_RAW_TEXT}),textarea:new o({contentType:Dc.TagContentType.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),a[e]||n}}));h(gc);gc.HtmlTagDefinition,gc.getHtmlTagDefinition;var mc=d((function(e,t){
/**
* @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(var r=0;r<t.length;r+=1)if("string"!=typeof t[r])throw new Error("Expected '".concat(e,"' to be an array of strings."))}};var 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){var n=t[0],i=t[1];r.forEach((function(e){if(e.test(n)||e.test(i))throw new Error("['".concat(n,"', '").concat(i,"'] contains unusable interpolation symbol."))}))}}}));h(mc);mc.assertArrayOfStrings,mc.assertInterpolationSymbols;var vc=d((function(e,t){
/**
* @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 n=function(){function e(t,n){r(this,e),this.start=t,this.end=n}return i(e,null,[{key:"fromArray",value:function(r){return r?(mc.assertInterpolationSymbols("interpolation",r),new e(r[0],r[1])):t.DEFAULT_INTERPOLATION_CONFIG}}]),e}();t.InterpolationConfig=n,t.DEFAULT_INTERPOLATION_CONFIG=new n("{{","}}")}));h(vc);vc.InterpolationConfig,vc.DEFAULT_INTERPOLATION_CONFIG;var bc=d((function(e,t){function r(e){return t.$0<=e&&e<=t.$9}
/**
* @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.$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.$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.$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)}}));h(bc);bc.$EOF,bc.$TAB,bc.$LF,bc.$VTAB,bc.$FF,bc.$CR,bc.$SPACE,bc.$BANG,bc.$DQ,bc.$HASH,bc.$$,bc.$PERCENT,bc.$AMPERSAND,bc.$SQ,bc.$LPAREN,bc.$RPAREN,bc.$STAR,bc.$PLUS,bc.$COMMA,bc.$MINUS,bc.$PERIOD,bc.$SLASH,bc.$COLON,bc.$SEMICOLON,bc.$LT,bc.$EQ,bc.$GT,bc.$QUESTION,bc.$0,bc.$9,bc.$A,bc.$E,bc.$F,bc.$X,bc.$Z,bc.$LBRACKET,bc.$BACKSLASH,bc.$RBRACKET,bc.$CARET,bc.$_,bc.$a,bc.$e,bc.$f,bc.$n,bc.$r,bc.$t,bc.$u,bc.$v,bc.$x,bc.$z,bc.$LBRACE,bc.$BAR,bc.$RBRACE,bc.$NBSP,bc.$PIPE,bc.$TILDA,bc.$AT,bc.$BT,bc.isWhitespace,bc.isDigit,bc.isAsciiLetter,bc.isAsciiHexDigit;var yc=d((function(e,t){
/**
* @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 n=function(){function e(t,n,i){r(this,e),this.filePath=t,this.name=n,this.members=i}return i(e,[{key:"assertNoMembers",value:function(){if(this.members.length)throw new Error("Illegal state: symbol without members expected, but got ".concat(JSON.stringify(this),"."))}}]),e}();t.StaticSymbol=n;var a=function(){function e(){r(this,e),this.cache=new Map}return i(e,[{key:"get",value:function(e,t,r){var i=(r=r||[]).length?".".concat(r.join(".")):"",a='"'.concat(e,'".').concat(t).concat(i),o=this.cache.get(a);return o||(o=new n(e,t,r),this.cache.set(a,o)),o}}]),e}();t.StaticSymbolCache=a}));h(yc);yc.StaticSymbol,yc.StaticSymbolCache;var Ec=d((function(e,n){
/**
* @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(n,"__esModule",{value:!0});var a=/-+([a-z0-9])/g;function o(e,t,r){var n=e.indexOf(t);return-1==n?r:[e.slice(0,n).trim(),e.slice(n+1).trim()]}function u(e,r,n){return Array.isArray(e)?r.visitArray(e,n):"object"===t(i=e)&&null!==i&&Object.getPrototypeOf(i)===p?r.visitStringMap(e,n):null==e||"string"==typeof e||"number"==typeof e||"boolean"==typeof e?r.visitPrimitive(e,n):r.visitOther(e,n);var i}n.dashCaseToCamelCase=function(e){return e.replace(a,(function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t[1].toUpperCase()}))},n.splitAtColon=function(e,t){return o(e,":",t)},n.splitAtPeriod=function(e,t){return o(e,".",t)},n.visitValue=u,n.isDefined=function(e){return null!=e},n.noUndefined=function(e){return void 0===e?null:e};var s=function(){function e(){r(this,e)}return i(e,[{key:"visitArray",value:function(e,t){var r=this;return e.map((function(e){return u(e,r,t)}))}},{key:"visitStringMap",value:function(e,t){var r=this,n={};return Object.keys(e).forEach((function(i){n[i]=u(e[i],r,t)})),n}},{key:"visitPrimitive",value:function(e,t){return e}},{key:"visitOther",value:function(e,t){return e}}]),e}();n.ValueTransformer=s,n.SyncAsync={assertSync:function(e){if(f(e))throw new Error("Illegal state: value cannot be a promise");return e},then:function(e,t){return f(e)?e.then(t):t(e)},all:function(e){return e.some(f)?Promise.all(e):e}},n.error=function(e){throw new Error("Internal Error: ".concat(e))},n.syntaxError=function(e,t){var r=Error(e);return r[c]=!0,t&&(r[l]=t),r};var c="ngSyntaxError",l="ngParseErrors";n.isSyntaxError=function(e){return e[c]},n.getParseErrors=function(e){return e[l]||[]},n.escapeRegExp=function(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")};var p=Object.getPrototypeOf({});function f(e){return!!e&&"function"==typeof e.then}n.utf8Encode=function(e){for(var t="",r=0;r<e.length;r++){var n=e.charCodeAt(r);if(n>=55296&&n<=56319&&e.length>r+1){var i=e.charCodeAt(r+1);i>=56320&&i<=57343&&(r++,n=(n-55296<<10)+i-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},n.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);var r=t.toString();if(null==r)return""+r;var n=r.indexOf("\n");return-1===n?r:r.substring(0,n)},n.resolveForwardRef=function(e){return"function"==typeof e&&e.hasOwnProperty("__forward_ref__")?e():e},n.isPromise=f;n.Version=function e(t){r(this,e),this.full=t;var n=t.split(".");this.major=n[0],this.minor=n[1],this.patch=n.slice(2).join(".")}}));h(Ec);Ec.dashCaseToCamelCase,Ec.splitAtColon,Ec.splitAtPeriod,Ec.visitValue,Ec.isDefined,Ec.noUndefined,Ec.ValueTransformer,Ec.SyncAsync,Ec.error,Ec.syntaxError,Ec.isSyntaxError,Ec.getParseErrors,Ec.escapeRegExp,Ec.utf8Encode,Ec.stringify,Ec.resolveForwardRef,Ec.isPromise,Ec.Version;var Cc=d((function(e,t){
/**
* @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 n=/^(?:(?:\[([^\]]+)\])|(?:\(([^\)]+)\)))|(\@[-\w]+)$/;function a(e){return e.replace(/\W/g,"_")}t.sanitizeIdentifier=a;var o,u=0;function s(e){if(!e||!e.reference)return null;var t=e.reference;if(t instanceof yc.StaticSymbol)return t.name;if(t.__anonymousType)return t.__anonymousType;var r=Ec.stringify(t);return r.indexOf("(")>=0?(r="anonymous_".concat(u++),t.__anonymousType=r):r=a(r),r}t.identifierName=s,t.identifierModuleUrl=function(e){var t=e.reference;return t instanceof yc.StaticSymbol?t.filePath:"./".concat(Ec.stringify(t))},t.viewClassName=function(e,t){return"View_".concat(s({reference:e}),"_").concat(t)},t.rendererTypeName=function(e){return"RenderType_".concat(s({reference:e}))},t.hostViewClassName=function(e){return"HostView_".concat(s({reference:e}))},t.componentFactoryName=function(e){return"".concat(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"}(o=t.CompileSummaryKind||(t.CompileSummaryKind={})),t.tokenName=function(e){return null!=e.value?a(e.value):s(e.identifier)},t.tokenReference=function(e){return null!=e.identifier?e.identifier.reference:e.value};t.CompileStylesheetMetadata=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.moduleUrl,i=t.styles,a=t.styleUrls;r(this,e),this.moduleUrl=n||null,this.styles=d(i),this.styleUrls=d(a)};var c=function(){function e(t){var n=t.encapsulation,i=t.template,a=t.templateUrl,o=t.htmlAst,u=t.styles,s=t.styleUrls,c=t.externalStylesheets,l=t.animations,p=t.ngContentSelectors,f=t.interpolation,h=t.isInline,g=t.preserveWhitespaces;if(r(this,e),this.encapsulation=n,this.template=i,this.templateUrl=a,this.htmlAst=o,this.styles=d(u),this.styleUrls=d(s),this.externalStylesheets=d(c),this.animations=l?D(l):[],this.ngContentSelectors=p||[],f&&2!=f.length)throw new Error("'interpolation' should have a start and an end symbol.");this.interpolation=f,this.isInline=h,this.preserveWhitespaces=g}return i(e,[{key:"toSummary",value:function(){return{ngContentSelectors:this.ngContentSelectors,encapsulation:this.encapsulation,styles:this.styles,animations:this.animations}}}]),e}();t.CompileTemplateMetadata=c;var l=function(){function e(t){var n=t.isHost,i=t.type,a=t.isComponent,o=t.selector,u=t.exportAs,s=t.changeDetection,c=t.inputs,l=t.outputs,p=t.hostListeners,f=t.hostProperties,h=t.hostAttributes,D=t.providers,g=t.viewProviders,m=t.queries,v=t.guards,b=t.viewQueries,y=t.entryComponents,E=t.template,C=t.componentViewType,A=t.rendererType,w=t.componentFactory;r(this,e),this.isHost=!!n,this.type=i,this.isComponent=a,this.selector=o,this.exportAs=u,this.changeDetection=s,this.inputs=c,this.outputs=l,this.hostListeners=p,this.hostProperties=f,this.hostAttributes=h,this.providers=d(D),this.viewProviders=d(g),this.queries=d(m),this.guards=v,this.viewQueries=d(b),this.entryComponents=d(y),this.template=E,this.componentViewType=C,this.rendererType=A,this.componentFactory=w}return i(e,null,[{key:"create",value:function(t){var r=t.isHost,i=t.type,a=t.isComponent,o=t.selector,u=t.exportAs,s=t.changeDetection,c=t.inputs,l=t.outputs,p=t.host,f=t.providers,h=t.viewProviders,d=t.queries,D=t.guards,g=t.viewQueries,m=t.entryComponents,v=t.template,b=t.componentViewType,y=t.rendererType,E=t.componentFactory,C={},A={},w={};null!=p&&Object.keys(p).forEach((function(e){var t=p[e],r=e.match(n);null===r?w[e]=t:null!=r[1]?A[r[1]]=t:null!=r[2]&&(C[r[2]]=t)}));var k={};null!=c&&c.forEach((function(e){var t=Ec.splitAtColon(e,[e,e]);k[t[0]]=t[1]}));var T={};return null!=l&&l.forEach((function(e){var t=Ec.splitAtColon(e,[e,e]);T[t[0]]=t[1]})),new e({isHost:r,type:i,isComponent:!!a,selector:o,exportAs:u,changeDetection:s,inputs:k,outputs:T,hostListeners:C,hostProperties:A,hostAttributes:w,providers:f,viewProviders:h,queries:d,guards:D,viewQueries:g,entryComponents:m,template:v,componentViewType:b,rendererType:y,componentFactory:E})}}]),i(e,[{key:"toSummary",value:function(){return{summaryKind:o.Directive,type:this.type,isComponen
/**
* @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
*/
var n=function(){function e(t,n,i,a){r(this,e),this.file=t,this.offset=n,this.line=i,this.col=a}return i(e,[{key:"toString",value:function(){return null!=this.offset?"".concat(this.file.url,"@").concat(this.line,":").concat(this.col):this.file.url}},{key:"moveBy",value:function(t){for(var r=this.file.content,n=r.length,i=this.offset,a=this.line,o=this.col;i>0&&t<0;){if(i--,t++,r.charCodeAt(i)==bc.$LF){a--;var u=r.substr(0,i-1).lastIndexOf(String.fromCharCode(bc.$LF));o=u>0?i-u:i}else o--}for(;i<n&&t>0;){var s=r.charCodeAt(i);i++,t--,s==bc.$LF?(a++,o=0):o++}return new e(this.file,i,a,o)}},{key:"getContext",value:function(e,t){var r=this.file.content,n=this.offset;if(null!=n){n>r.length-1&&(n=r.length-1);for(var i=n,a=0,o=0;a<e&&n>0&&(a++,"\n"!=r[--n]||++o!=t););for(a=0,o=0;a<e&&i<r.length-1&&(a++,"\n"!=r[++i]||++o!=t););return{before:r.substring(n,this.offset),after:r.substring(this.offset,i+1)}}return null}}]),e}();t.ParseLocation=n;var a=function e(t,n){r(this,e),this.content=t,this.url=n};t.ParseSourceFile=a;var o,u=function(){function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;r(this,e),this.start=t,this.end=n,this.details=i}return i(e,[{key:"toString",value:function(){return this.start.file.content.substring(this.start.offset,this.end.offset)}}]),e}();t.ParseSourceSpan=u,function(e){e[e.WARNING=0]="WARNING",e[e.ERROR=1]="ERROR"}(o=t.ParseErrorLevel||(t.ParseErrorLevel={}));var s=function(){function e(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:o.ERROR;r(this,e),this.span=t,this.msg=n,this.level=i}return i(e,[{key:"contextualMessage",value:function(){var e=this.span.start.getContext(100,3);return e?"".concat(this.msg,' ("').concat(e.before,"[").concat(o[this.level]," ->]").concat(e.after,'")'):this.msg}},{key:"toString",value:function(){var e=this.span.details?", ".concat(this.span.details):"";return"".concat(this.contextualMessage(),": ").concat(this.span.start).concat(e)}}]),e}();t.ParseError=s,t.typeSourceSpan=function(e,t){var r=Cc.identifierModuleUrl(t),i=null!=r?"in ".concat(e," ").concat(Cc.identifierName(t)," in ").concat(r):"in ".concat(e," ").concat(Cc.identifierName(t)),o=new a("",i);return new u(new n(o,-1,-1,-1),new n(o,-1,-1,-1))}}));h(Ac);Ac.ParseLocation,Ac.ParseSourceFile,Ac.ParseSourceSpan,Ac.ParseErrorLevel,Ac.ParseError,Ac.typeSourceSpan;var wc=d((function(e,t){
/**
* @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 n=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;r(this,e),this.path=t,this.position=n}return i(e,[{key:"parentOf",value:function(e){return e&&this.path[this.path.indexOf(e)-1]}},{key:"childOf",value:function(e){return this.path[this.path.indexOf(e)+1]}},{key:"first",value:function(e){for(var t=this.path.length-1;t>=0;t--){var r=this.path[t];if(r instanceof e)return r}}},{key:"push",value:function(e){this.path.push(e)}},{key:"pop",value:function(){return this.path.pop()}},{key:"empty",get:function(){return!this.path||!this.path.length}},{key:"head",get:function(){return this.path[0]}},{key:"tail",get:function(){return this.path[this.path.length-1]}}]),e}();t.AstPath=n}));h(wc);wc.AstPath;var kc=d((function(e,t){
/**
* @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 n=function(){function e(t,n){r(this,e),this.value=t,this.sourceSpan=n}return i(e,[{key:"visit",value:function(e,t){return e.visitText(this,t)}}]),e}();t.Text=n;var u=function(){function e(t,n){r(this,e),this.value=t,this.sourceSpan=n}return i(e,[{key:"visit",value:function(e,t){return e.visitCdata(this,t)}}]),e}();t.CDATA=u;var c=function(){function e(t,n,i,a,o){r(this,e),this.switchValue=t,this.type=n,this.cases=i,this.sourceSpan=a,this.switchValueSourceSpan=o}return i(e,[{key:"visit",value:function(e,t){return e.visitExpansion(this,t)}}]),e}();t.Expansion=c;var l=function(){function e(t,n,i,a,o){r(this,e),this.value=t,this.expression=n,this.sourceSpan=i,this.valueSourceSpan=a,this.expSourceSpan=o}return i(e,[{key:"visit",value:function(e,t){return e.visitExpansionCase(this,t)}}]),e}();t.ExpansionCase=l;var p=function(){function e(t,n,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null;r(this,e),this.name=t,this.value=n,this.sourceSpan=i,this.valueSpan=a,this.nameSpan=o}return i(e,[{key:"visit",value:function(e,t){return e.visitAttribute(this,t)}}]),e}();t.Attribute=p;var f=function(){function e(t,n,i,a){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:null,u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;r(this,e),this.name=t,this.attrs=n,this.children=i,this.sourceSpan=a,this.startSourceSpan=o,this.endSourceSpan=u,this.nameSpan=s}return i(e,[{key:"visit",value:function(e,t){return e.visitElement(this,t)}}]),e}();t.Element=f;var h=function(){function e(t,n){r(this,e),this.value=t,this.sourceSpan=n}return i(e,[{key:"visit",value:function(e,t){return e.visitComment(this,t)}}]),e}();t.Comment=h;var d=function(){function e(t,n){r(this,e),this.value=t,this.sourceSpan=n}return i(e,[{key:"visit",value:function(e,t){return e.visitDocType(this,t)}}]),e}();function D(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=[],i=e.visit?function(t){return e.visit(t,r)||t.visit(e,r)}:function(t){return t.visit(e,r)};return t.forEach((function(e){var t=i(e);t&&n.push(t)})),n}t.DocType=d,t.visitAll=D;var g=function(){function e(){r(this,e)}return i(e,[{key:"visitElement",value:function(e,t){this.visitChildren(t,(function(t){t(e.attrs),t(e.children)}))}},{key:"visitAttribute",value:function(e,t){}},{key:"visitText",value:function(e,t){}},{key:"visitCdata",value:function(e,t){}},{key:"visitComment",value:function(e,t){}},{key:"visitDocType",value:function(e,t){}},{key:"visitExpansion",value:function(e,t){return this.visitChildren(t,(function(t){t(e.cases)}))}},{key:"visitExpansionCase",value:function(e,t){}},{key:"visitChildren",value:function(e,t){var r=[],n=this;return t((function(t){t&&r.push(D(n,t,e))})),[].concat.apply([],r)}}]),e}();t.RecursiveVisitor=g,t.findNode=function(e,t){var n=[];return D(new(function(e){function u(){return r(this,u),s(this,o(u).apply(this,arguments))}return a(u,e),i(u,[{key:"visit",value:function(e,r){var i=function e(t){var r=t.sourceSpan.start.offset,n=t.sourceSpan.end.offset;return t instanceof f&&(t.endSourceSpan?n=t.endSourceSpan.end.offset:t.children&&t.children.length&&(n=e(t.children[t.children.length-1]).end)),{start:r,end:n}}(e);if(!(i.start<=t&&t<i.end))return!0;n.push(e)}}]),u}(g)),e),new wc.AstPath(n,t)}}));h(kc);kc.Text,kc.CDATA,kc.Expansion,kc.ExpansionCase,kc.Attribute,kc.Element,kc.Comment,kc.DocType,kc.visitAll,kc.RecursiveVisitor,kc.findNode;var Tc=d((function(e,t){var n;
/**
* @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.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_VALUE=12]="ATTR_VALUE",e[e.DOC_TYPE_START=13]="DOC_TYPE_START",e[e.DOC_TYPE_END=14]="DOC_TYPE_END",e[e.EXPANSION_FORM_START=15]="EXPANSION_FORM_START",e[e.EXPANSION_CASE_VALUE=16]="EXPANSION_CASE_VALUE",e[e.EXPANSION_CASE_EXP_START=17]="EXPANSION_CASE_EXP_START",e[e.EXPANSION_CASE_EXP_END=18]="EXPANSION_CASE_EXP_END",e[e.EXPANSION_FORM_END=19]="EXPANSION_FORM_END",e[e.EOF=20]="EOF"}(n=t.TokenType||(t.TokenType={}));var u=function e(t,n,i){r(this,e),this.type=t,this.parts=n,this.sourceSpan=i};t.Token=u;var c=function(e){function t(e,n,i){var a;return r(this,t),(a=s(this,o(t).call(this,i,e))).tokenType=n,a}return a(t,e),t}(Ac.ParseError);t.TokenError=c;var l=function e(t,n){r(this,e),this.tokens=t,this.errors=n};t.TokenizeResult=l,t.tokenize=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:vc.DEFAULT_INTERPOLATION_CONFIG,a=arguments.length>5&&void 0!==arguments[5]&&arguments[5],o=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return new D(new Ac.ParseSourceFile(e,t),r,n,i,a,o).tokenize()};var p=/\r\n?/g;function f(e){var t=e===bc.$EOF?"EOF":String.fromCharCode(e);return'Unexpected character "'.concat(t,'"')}function h(e){return'Unknown entity "'.concat(e,'" - use the "&#<decimal>;" or "&#x<hex>;" syntax')}var d=function e(t){r(this,e),this.error=t},D=function(){function e(t,n,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:vc.DEFAULT_INTERPOLATION_CONFIG,o=arguments.length>4&&void 0!==arguments[4]&&arguments[4],u=arguments.length>5&&void 0!==arguments[5]&&arguments[5];r(this,e),this._file=t,this._getTagDefinition=n,this._tokenizeIcu=i,this._interpolationConfig=a,this.canSelfClose=o,this.allowHtmComponentClosingTags=u,this._peek=-1,this._nextPeek=-1,this._index=-1,this._line=0,this._column=-1,this._expansionCaseStack=[],this._inInterpolation=!1,this.tokens=[],this.errors=[],this._input=t.content,this._length=t.content.length,this._advance()}return i(e,[{key:"_processCarriageReturns",value:function(e){return e.replace(p,"\n")}},{key:"tokenize",value:function(){for(;this._peek!==bc.$EOF;){var e=this._getLocation();try{if(this._attemptCharCode(bc.$LT))if(this._attemptCharCode(bc.$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(bc.$SLASH))this._consumeTagClose(e);else{var t=this._savePosition();this._attemptCharCode(bc.$QUESTION)?(this._restorePosition(t),this._consumeBogusComment(e)):this._consumeTagOpen(e)}else this._tokenizeIcu&&this._tokenizeExpansionForm()||this._consumeText()}catch(e){if(!(e instanceof d))throw e;this.errors.push(e.error)}}return this._beginToken(n.EOF),this._endToken([]),new l(function(e){for(var t=[],r=void 0,i=0;i<e.length;i++){var a=e[i];r&&r.type==n.TEXT&&a.type==n.TEXT?(r.parts[0]+=a.parts[0],r.sourceSpan.end=a.sourceSpan.end):(r=a,t.push(r))}return t}(this.tokens),this.errors)}},{key:"_tokenizeExpansionForm",value:function(){if(y(this._input,this._index,this._interpolationConfig))return this._consumeExpansionFormStart(),!0;if(((e=this._peek)===bc.$EQ||bc.isAsciiLetter(e)||bc.isDigit(e))&&this._isInExpansionForm())return this._consumeExpansionCaseStart(),!0;var e;if(this._peek===bc.$RBRACE){if(this._isInExpansionCase())return this._consumeExpansionCaseEnd(),!0;if(this._isInExpansionForm())return this._consumeExpansionFormEnd(),!0}return!1}},{key:"_getLocation",value:function(){return new Ac.ParseLocation(this._file,this._index,this._line,this._co
/**
* @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 n=function(e){function t(e,n,i){var a;return r(this,t),(a=s(this,o(t).call(this,n,i))).elementName=e,a}return a(t,e),i(t,null,[{key:"create",value:function(e,r,n){return new t(e,r,n)}}]),t}(Ac.ParseError);t.TreeError=n;var u=function e(t,n){r(this,e),this.rootNodes=t,this.errors=n};t.ParseTreeResult=u;var c=function(){function e(t){r(this,e),this.getTagDefinition=t}return i(e,[{key:"parse",value:function(e,t){var r=this,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:vc.DEFAULT_INTERPOLATION_CONFIG,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=arguments.length>6&&void 0!==arguments[6]&&arguments[6],c=s?this.getTagDefinition:function(e){return r.getTagDefinition(e.toLowerCase())},p=Tc.tokenize(e,t,c,n,i,a,o),f=new l(p.tokens,c,a,o,s).build();return new u(f.rootNodes,p.errors.concat(f.errors))}}]),e}();t.Parser=c;var l=function(){function e(t,n,i,a,o){r(this,e),this.tokens=t,this.getTagDefinition=n,this.canSelfClose=i,this.allowHtmComponentClosingTags=a,this.isTagNameCaseSensitive=o,this._index=-1,this._rootNodes=[],this._errors=[],this._elementStack=[],this._advance()}return i(e,[{key:"build",value:function(){for(;this._peek.type!==Tc.TokenType.EOF;)this._peek.type===Tc.TokenType.TAG_OPEN_START?this._consumeStartTag(this._advance()):this._peek.type===Tc.TokenType.TAG_CLOSE?this._consumeEndTag(this._advance()):this._peek.type===Tc.TokenType.CDATA_START?(this._closeVoidElement(),this._consumeCdata(this._advance())):this._peek.type===Tc.TokenType.COMMENT_START?(this._closeVoidElement(),this._consumeComment(this._advance())):this._peek.type===Tc.TokenType.TEXT||this._peek.type===Tc.TokenType.RAW_TEXT||this._peek.type===Tc.TokenType.ESCAPABLE_RAW_TEXT?(this._closeVoidElement(),this._consumeText(this._advance())):this._peek.type===Tc.TokenType.EXPANSION_FORM_START?this._consumeExpansion(this._advance()):this._peek.type===Tc.TokenType.DOC_TYPE_START?this._consumeDocType(this._advance()):this._advance();return new u(this._rootNodes,this._errors)}},{key:"_advance",value:function(){var e=this._peek;return this._index<this.tokens.length-1&&this._index++,this._peek=this.tokens[this._index],e}},{key:"_advanceIf",value:function(e){return this._peek.type===e?this._advance():null}},{key:"_consumeCdata",value:function(e){var t=this._advance(),r=this._getText(t),n=this._advanceIf(Tc.TokenType.CDATA_END);this._addToParent(new kc.CDATA(r,new Ac.ParseSourceSpan(e.sourceSpan.start,(n||t).sourceSpan.end)))}},{key:"_consumeComment",value:function(e){var t=this._advanceIf(Tc.TokenType.RAW_TEXT),r=this._advanceIf(Tc.TokenType.COMMENT_END),n=null!=t?t.parts[0].trim():null,i=new Ac.ParseSourceSpan(e.sourceSpan.start,(r||t||e).sourceSpan.end);this._addToParent(new kc.Comment(n,i))}},{key:"_consumeDocType",value:function(e){var t=this._advanceIf(Tc.TokenType.RAW_TEXT),r=this._advanceIf(Tc.TokenType.DOC_TYPE_END),n=null!=t?t.parts[0].trim():null,i=new Ac.ParseSourceSpan(e.sourceSpan.start,(r||t||e).sourceSpan.end);this._addToParent(new kc.DocType(n,i))}},{key:"_consumeExpansion",value:function(e){for(var t=this._advance(),r=this._advance(),i=[];this._peek.type===Tc.TokenType.EXPANSION_CASE_VALUE;){var a=this._parseExpansionCase();if(!a)return;i.push(a)}if(this._peek.type===Tc.TokenType.EXPANSION_FORM_END){var o=new Ac.ParseSourceSpan(e.sourceSpan.start,this._peek.sourceSpan.end);this._addToParent(new kc.Expansion(t.parts[0],r.parts[0],i,o,t.sourceSpan)),this._advance()}else this._errors.push(n.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '}'."))}},{key:"_parseExpansionCase",value:function(){var t=this._advance();if(this._peek.type!==Tc.TokenType.EXPANSION_CASE_EXP_START)return this._errors.push(n.create(null,this._peek.sourceSpan,"Invalid ICU message. Missing '{'.")),null;var r=this._advance(),i=this._collectExpansionExpTokens(r);if(!i)return null;var a=this._advance();i.push(new Tc.Token(Tc.TokenType.EOF,[],a.sourceSpan));var o=new e(i,this.ge
/**
* @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 n=_c;t.ParseTreeResult=n.ParseTreeResult,t.TreeError=n.TreeError;var u=function(e){function t(){return r(this,t),s(this,o(t).call(this,gc.getHtmlTagDefinition))}return a(t,e),i(t,[{key:"parse",value:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:vc.DEFAULT_INTERPOLATION_CONFIG,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4],u=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=arguments.length>6&&void 0!==arguments[6]&&arguments[6];return c(o(t.prototype),"parse",this).call(this,e,r,n,i,a,u,s)}}]),t}(_c.Parser);t.HtmlParser=u}));h(Sc);Sc.ParseTreeResult,Sc.TreeError,Sc.HtmlParser;var Fc=d((function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=null,n=function(){return r||(r=new Sc.HtmlParser),r};t.parse=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.canSelfClose,i=void 0!==r&&r,a=t.allowHtmComponentClosingTags,o=void 0!==a&&a,u=t.isTagNameCaseSensitive,s=void 0!==u&&u;return n().parse(e,"angular-html-parser",!1,void 0,i,o,s)}}));h(Fc);Fc.parse;var xc=ic.HTML_ELEMENT_ATTRIBUTES,qc=ic.HTML_TAGS,Nc=ac,Lc=fc.Node,Bc=dc;function Pc(e,t){var n=t.recognizeSelfClosing,u=t.normalizeTagName,c=t.normalizeAttributeName,l=t.allowHtmComponentClosingTags,p=t.isTagNameCaseSensitive,f=Fc,h=kc.RecursiveVisitor,d=kc.visitAll,D=kc.Attribute,g=kc.CDATA,m=kc.Comment,v=kc.DocType,b=kc.Element,y=kc.Text,E=Ac.ParseSourceSpan,C=gc.getHtmlTagDefinition,A=f.parse(e,{canSelfClose:n,allowHtmComponentClosingTags:l,isTagNameCaseSensitive:p}),w=A.rootNodes,k=A.errors;if(0!==k.length){var T=k[0],_=T.msg,S=T.span.start,F=S.line,x=S.col;throw oc(_,{start:{line:F+1,column:x+1}})}var q=function(e){var t=e.name.startsWith(":")?e.name.slice(1).split(":")[0]:null,r=e.nameSpan?e.nameSpan.toString():e.name,n=r.startsWith("".concat(t,":")),i=n?r.slice(t.length+1):r;e.name=i,e.namespace=t,e.hasExplicitNamespace=n},N=function(e,t){var r=e.toLowerCase();return t(r)?r:e};return d(new(function(e){function t(){return r(this,t),s(this,o(t).apply(this,arguments))}return a(t,e),i(t,[{key:"visit",value:function(e){!function(e){if(e instanceof D)e.type="attribute";else if(e instanceof g)e.type="cdata";else if(e instanceof m)e.type="comment";else if(e instanceof v)e.type="docType";else if(e instanceof b)e.type="element";else{if(!(e instanceof y))throw new Error("Unexpected node ".concat(JSON.stringify(e)));e.type="text"}}(e),function(e){e instanceof b?(q(e),e.attrs.forEach((function(e){q(e),e.valueSpan?(e.value=e.valueSpan.toString(),/['"]/.test(e.value[0])&&(e.value=e.value.slice(1,-1))):e.value=null}))):e instanceof m?e.value=e.sourceSpan.toString().slice("\x3c!--".length,-"--\x3e".length):e instanceof y&&(e.value=e.sourceSpan.toString())}(e),function(e){if(e instanceof b){var t=C(p?e.name:e.name.toLowerCase());e.namespace&&e.namespace!==t.implicitNamespacePrefix?e.tagDefinition=C(""):e.tagDefinition=t}}(e),function(e){if(e instanceof b&&(!u||e.namespace&&e.namespace!==e.tagDefinition.implicitNamespacePrefix||(e.name=N(e.name,(function(e){return e in qc}))),c)){var t=xc[e.name]||Object.create(null);e.attrs.forEach((function(r){r.namespace||(r.name=N(r.name,(function(r){return e.name in xc&&(r in xc["*"]||r in t)})))}))}}(e),function(e){e.sourceSpan&&e.endSourceSpan&&(e.sourceSpan=new E(e.sourceSpan.start,e.endSourceSpan.end))}(e)}}]),t}(h)),w),w}function Oc(e){return e.sourceSpan.start.offset}function Rc(e){return e.sourceSpan.end.offset}function Ic(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.recognizeSelfClosing,r=void 0!==t&&t,n=e.normalizeTagName,i=void 0!==n&&n,a=e.normalizeAttributeName,o=void 0!==a&&a,u=e.allowHtmComponentClosingTags,s=void 0!==u&&u,c=e.isTagNameCaseSensitive,l=void 0!==c&&c;return{parse:function(e,t,n){return function e(t,r,n){var i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3]?lo(t):{frontMatter:null,content:t},a=i.frontMatter,o=i.content,u={type:"root",sourceSpan:{start:{offset:0},end:{offset:t.length}},childre