@mxtommy/kip 3.9.0 → 3.10.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -0
- package/README.md +48 -12
- package/kip-plugin/src/index.ts +45 -0
- package/kip-plugin/tsconfig.plugin.json +13 -0
- package/package.json +12 -4
- package/plugin/index.js +43 -0
- package/public/chunk-5MKWBXBX.js +1 -0
- package/public/{chunk-BYWGV2DR.js → chunk-7OMETTVK.js} +1 -1
- package/public/{chunk-2RLXZJPK.js → chunk-BZF6OYAF.js} +1 -1
- package/public/{chunk-TP7LH2BI.js → chunk-CYEX33XS.js} +10 -10
- package/public/{chunk-FYD5M4IT.js → chunk-FW2LAMAA.js} +1 -1
- package/public/{chunk-25PZU2O2.js → chunk-GJ33QBJ6.js} +1 -1
- package/public/{chunk-3IUMPTFN.js → chunk-HKUJILH7.js} +1 -1
- package/public/{chunk-6WOHGZ7K.js → chunk-HPL4WTNN.js} +1 -1
- package/public/chunk-J3WNXGAQ.js +64 -0
- package/public/{chunk-HECHZXLY.js → chunk-JFDPDIG2.js} +1 -1
- package/public/{chunk-CW3ZK4N3.js → chunk-KKNLQQ4L.js} +2 -2
- package/public/{chunk-5KVBD33V.js → chunk-LRX3XYXK.js} +1 -1
- package/public/{chunk-ZJO5PJKQ.js → chunk-MXKB5Z6M.js} +1 -1
- package/public/{chunk-RIG2POCP.js → chunk-NL52VRFS.js} +1 -1
- package/public/{chunk-TGXMWTBW.js → chunk-PTADMSJZ.js} +1 -1
- package/public/{chunk-NEYBKWJP.js → chunk-RJ4V5EXT.js} +1 -1
- package/public/{chunk-ZMNGRHMV.js → chunk-T5GXSVMN.js} +1 -1
- package/public/{chunk-DNBBDEKP.js → chunk-TDHAZ7DS.js} +1 -1
- package/public/index.html +1 -1
- package/public/main-5GWR3F7W.js +53 -0
- package/public/chunk-N6T2NRWF.js +0 -1
- package/public/chunk-NHAQWUX3.js +0 -60
- package/public/main-AQ7CLM7C.js +0 -53
package/public/chunk-N6T2NRWF.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as p,p as y}from"./chunk-3IUMPTFN.js";import{Ac as n,Fa as s,ld as a,m,ma as c,o as g,qd as d,ra as i,rd as h,yc as u}from"./chunk-FYD5M4IT.js";var b={name:"@mxtommy/kip",version:"3.9.0",description:"An advanced and versatile marine instrumentation package to display Signal K data.",license:"MIT",author:{name:"Thomas St.Pierre, David Godin"},contributors:[{name:"David Godin",email:"godind@hotmail.com"},{name:"Thomas St.Pierre",email:"thomas@samoht.ca"}],homepage:"https://github.com/mxtommy/Kip",bugs:"https://github.com/mxtommy/Kip/issues",repository:{type:"git",url:"git+https://github.com/mxtommy/Kip.git"},keywords:["signalk-webapp","signalk-category-instruments","signal k","signalk","instruments","dashboard","marine","nmea"],signalk:{appIcon:"assets/icon-72x72.png",displayName:"KIP Instrument MFD"},scripts:{dev:"ng serve --configuration=dev --serve-path=/@mxtommy/kip/","build-dev":"ng build --configuration=dev","build-prod":"ng build --configuration=production",test:"ng test",lint:"ng lint",e2e:"ng e2e"},devDependencies:{"@angular-devkit/build-angular":"^20.1.6","@angular/animations":"20.1.7","@angular/build":"^20.1.6","@angular/cdk":"20.1.6","@angular/cli":"^20.1.6","@angular/common":"20.1.7","@angular/compiler":"20.1.7","@angular/compiler-cli":"20.1.7","@angular/core":"20.1.7","@angular/forms":"20.1.7","@angular/language-service":"20.1.7","@angular/material":"20.1.6","@angular/platform-browser":"20.1.7","@angular/platform-browser-dynamic":"20.1.7","@angular/router":"20.1.7","@godind/ng-canvas-gauges":"^6.2.1","@robloche/chartjs-plugin-streaming":"^3.1.0","@types/canvas-gauges":"^2.1.8","@types/howler":"^2.2.10","@types/jasmine":"~3.6.0","@types/jasminewd2":"^2.0.9","@types/js-quantities":"^1.6.6","@types/lodash-es":"^4.17.9","@types/node":"^24.1.0","@zakj/no-sleep":"^0.13.5","angular-eslint":"20.1.1","chart.js":"^4.4.9","chartjs-adapter-date-fns":"^3.0.0","chartjs-plugin-annotation":"^3.0.1",codelyzer:"^6.0.0","compare-versions":"^6.1.1","core-js":"^3.13.1","date-fns":"^2.30.0",eslint:"^9.29.0",gridstack:"^11.4.0",howler:"^2.2.4","jasmine-core":"~4.0.1","jasmine-spec-reporter":"~5.0.0","js-quantities":"^1.8.0",karma:"^6.4.4","karma-chrome-launcher":"~3.1.0","karma-cli":"~2.0.0","karma-coverage-istanbul-reporter":"^3.0.3","karma-jasmine":"~4.0.0","karma-jasmine-html-reporter":"^1.6.0","lodash-es":"^4.17.21","ng-packagr":"^20.0.1","ngx-markdown":"^20.0.0","ngx-resize-observer":"^3.1.0",protractor:"~7.0.0","pwa-asset-generator":"^8.1.1",rxjs:"^7.8.2",sass:"^1.49.9",screenfull:"^6.0.2",steelseries:"^2.0.9","ts-node":"^10.9.2",tslib:"^2.6.2",typescript:"^5.8.3","zone.js":"^0.15.1"}};var A=(()=>{class o{MODE_PATH="self.environment.mode";configurableThemeColors=[{label:"Contrast",value:"contrast"},{label:"Blue",value:"blue"},{label:"Green",value:"green"},{label:"Orange",value:"orange"},{label:"Yellow",value:"yellow"},{label:"Pink",value:"pink"},{label:"Purple",value:"purple"},{label:"Grey",value:"grey"}];snackbarAppNotifications=new m;cssThemeColorRoles$=new g(null);_cssThemeColorRoles=null;_settings=i(p);_data=i(y);_iconRegistry=i(h);_sanitizer=i(d);isNightMode=s(!1);_useAutoNightMode=a(this._settings.getAutoNightModeAsO(),{requireSync:!0});_theme=a(this._settings.getThemeNameAsO(),{requireSync:!0});_redNightMode=a(this._settings.getRedNightModeAsO(),{requireSync:!0});_environmentMode=a(this._data.subscribePath(this.MODE_PATH,"default"));appVersion=s(b.version);browserVersion=s("Unknown");osVersion=s("Unknown");constructor(){this._iconRegistry.addSvgIconSet(this._sanitizer.bypassSecurityTrustResourceUrl("assets/svg/icons.svg")),n(()=>{this._theme()==="light-theme"?document.body.classList.toggle("light-theme",this._theme()==="light-theme"):document.body.classList.remove("light-theme")}),n(()=>{let t=this._environmentMode().data.value;this._useAutoNightMode()&&(this.isNightMode.set(t==="night"),this.toggleDayNightMode())}),n(()=>{let t=this._redNightMode();u(()=>{t?this.toggleDayNightMode():this.toggleDayNightMode()})}),this.readThemeCssRoleVariables(),this._cssThemeColorRoles=this.cssThemeColorRoles$.getValue(),this.browserVersion.set(this.getBrowserVersion()),this.osVersion.set(this.getOSVersion()),console.log("*********** KIP Version Information ***********"),console.log(`** App Version: ${this.appVersion()}`),console.log(`** Browser Version: ${this.browserVersion()}`),console.log(`** OS Version: ${this.osVersion()}`),console.log("***********************************************")}sendSnackbarNotification(t,e=1e4,r=!1,l="Dismiss"){this.snackbarAppNotifications.next({message:t,duration:e,silent:r,action:l})}getSnackbarAppNotifications(){return this.snackbarAppNotifications.asObservable()}readThemeCssRoleVariables(){let t=document.body,e=getComputedStyle(t),r={background:e.getPropertyValue("--mat-sys-background").trim(),cardColor:e.getPropertyValue("--kip-widget-card-background-color").trim(),blue:e.getPropertyValue("--kip-blue-color").trim(),blueDim:e.getPropertyValue("--kip-blue-dim-color").trim(),blueDimmer:e.getPropertyValue("--kip-blue-dimmer-color").trim(),green:e.getPropertyValue("--kip-green-color").trim(),greenDim:e.getPropertyValue("--kip-green-dim-color").trim(),greenDimmer:e.getPropertyValue("--kip-green-dimmer-color").trim(),grey:e.getPropertyValue("--kip-grey-color").trim(),greyDim:e.getPropertyValue("--kip-grey-dim-color").trim(),greyDimmer:e.getPropertyValue("--kip-grey-dimmer-color").trim(),orange:e.getPropertyValue("--kip-orange-color").trim(),orangeDim:e.getPropertyValue("--kip-orange-dim-color").trim(),orangeDimmer:e.getPropertyValue("--kip-orange-dimmer-color").trim(),pink:e.getPropertyValue("--kip-pink-color").trim(),pinkDim:e.getPropertyValue("--kip-pink-dim-color").trim(),pinkDimmer:e.getPropertyValue("--kip-pink-dimmer-color").trim(),purple:e.getPropertyValue("--kip-purple-color").trim(),purpleDim:e.getPropertyValue("--kip-purple-dim-color").trim(),purpleDimmer:e.getPropertyValue("--kip-purple-dimmer-color").trim(),contrast:e.getPropertyValue("--kip-contrast-color").trim(),contrastDim:e.getPropertyValue("--kip-contrast-dim-color").trim(),contrastDimmer:e.getPropertyValue("--kip-contrast-dimmer-color").trim(),yellow:e.getPropertyValue("--kip-yellow-color").trim(),yellowDim:e.getPropertyValue("--kip-yellow-dim-color").trim(),yellowDimmer:e.getPropertyValue("--kip-yellow-dimmer-color").trim(),port:e.getPropertyValue("--kip-port-color").trim(),starboard:e.getPropertyValue("--kip-starboard-color").trim(),zoneNominal:e.getPropertyValue("--kip-zone-nominal-color").trim(),zoneAlert:e.getPropertyValue("--kip-zone-alert-color").trim(),zoneWarn:e.getPropertyValue("--kip-zone-warn-color").trim(),zoneAlarm:e.getPropertyValue("--kip-zone-alarm-color").trim(),zoneEmergency:e.getPropertyValue("--kip-zone-emergency-color").trim()};this.cssThemeColorRoles$.next(r)}get cssThemeColors(){return this._cssThemeColorRoles}setBrightness(t,e=!1){let r=document.body;r.style.setProperty("--kip-nightModeBrightness",`${t}`);let l=e?" sepia(0.5) hue-rotate(-30deg)":"";r.style.setProperty("--kip-nightModeFilters",l)}toggleDayNightMode(){this.isNightMode()?this._redNightMode()?(document.body.classList.toggle("night-theme",!0),this.setBrightness(1,!1)):(this.setBrightness(this._settings.getNightModeBrightness(),!0),document.body.classList.remove("night-theme"),this._theme()==="light-theme"?document.body.classList.toggle("light-theme",this._theme()==="light-theme"):document.body.classList.remove("light-theme")):(document.body.classList.remove("night-theme"),this._theme()==="light-theme"&&document.body.classList.toggle("light-theme",this._theme()==="light-theme"),this.setBrightness(1,!1)),this.readThemeCssRoleVariables(),this._cssThemeColorRoles=this.cssThemeColorRoles$.getValue()}getBrowserVersion(){let t=navigator.userAgent,e="Unknown";return t.includes("Edg")?e=`Edge ${t.match(/Edg\/(\d+)/)?.[1]}`:t.includes("Chrome")&&!t.includes("Edg")&&!t.includes("Chromium")?e=`Chrome ${t.match(/Chrome\/(\d+)/)?.[1]}`:t.includes("Chromium")?e=`Chromium ${t.match(/Chromium\/(\d+)/)?.[1]}`:t.includes("Firefox")?e=`Firefox ${t.match(/Firefox\/(\d+)/)?.[1]}`:t.includes("Safari")&&!t.includes("Chrome")&&!t.includes("Chromium")?e=`Safari ${t.match(/Version\/(\d+)/)?.[1]}`:(t.includes("Opera")||t.includes("OPR"))&&(e=`Opera ${t.match(/(Opera|OPR)\/(\d+)/)?.[2]}`),e}getOSVersion(){let t=navigator.platform,e=navigator.userAgent;return t.startsWith("Mac")?"macOS":t.startsWith("Win")?"Windows":/Linux/.test(t)?e.includes("ARM")||e.includes("aarch64")||e.includes("Raspberry")||t.includes("armv7l")||t.includes("armv8l")?"Raspberry Pi":"Linux":"Unknown OS"}static \u0275fac=function(e){return new(e||o)};static \u0275prov=c({token:o,factory:o.\u0275fac,providedIn:"root"})}return o})();export{A as a};
|
package/public/chunk-NHAQWUX3.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import{$a as kt,$b as W,$d as $e,A as st,Aa as A,Ae as Zt,Ba as Te,Bb as Rt,Cb as Ie,Cd as Ae,Db as Ee,De as Ne,Eb as Pe,Ed as Bt,Ee as Gt,Fb as V,Gb as ue,He as Qt,I as ot,Ic as K,Ja as mt,Je as Wt,K as O,Kc as J,L as at,Lb as St,Ma as L,Mb as Ct,Na as ft,Nb as De,Ne as Kt,Oa as gt,Ob as he,Od as Ft,Pb as z,Pd as jt,Qa as bt,Qb as Z,R as lt,Rb as N,Rd as Ht,S as ct,Sb as pe,Tb as It,Ub as G,V as ut,Vb as Q,Vd as qt,Wa as U,Wd as Le,Xa as Re,Za as _t,_a as le,a as m,ab as X,b as S,bc as Et,ca as ht,cc as Pt,dc as Dt,dd as E,ea as oe,eb as $,ee as Ut,f as rt,fa as j,fb as Se,fd as At,fe as Xt,g as se,ga as ae,gb as ce,he as Yt,ib as xt,lb as yt,ld as Lt,m as v,ma as pt,mb as C,na as Me,nb as Ce,ne as ze,ob as wt,pa as y,pc as Oe,pe as Vt,qa as M,qd as $t,ra as f,sd as zt,t as F,tb as vt,td as Nt,ub as Y,vb as Mt,wa as H,wb as Tt,xa as q,ya as dt,zc as Ot}from"./chunk-FYD5M4IT.js";function He(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var D=He();function sn(r){D=r}var ne={exec:()=>null};function g(r,i=""){let t=typeof r=="string"?r:r.source,e={replace:(n,s)=>{let o=typeof s=="string"?s:s.source;return o=o.replace(x.caret,"$1"),t=t.replace(n,o),e},getRegex:()=>new RegExp(t,i)};return e}var x={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i")},Mn=/^(?:[ \t]*(?:\n|$))+/,Tn=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Rn=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ie=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Sn=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,qe=/(?:[*+-]|\d{1,9}[.)])/,on=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,an=g(on).replace(/bull/g,qe).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Cn=g(on).replace(/bull/g,qe).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Ue=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,In=/^[^\n]+/,Xe=/(?!\s*\])(?:\\.|[^\[\]\\])+/,En=g(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Xe).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Pn=g(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,qe).getRegex(),be="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Ye=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Dn=g("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",Ye).replace("tag",be).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ln=g(Ue).replace("hr",ie).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",be).getRegex(),On=g(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ln).getRegex(),Ve={blockquote:On,code:Tn,def:En,fences:Rn,heading:Sn,hr:ie,html:Dn,lheading:an,list:Pn,newline:Mn,paragraph:ln,table:ne,text:In},Jt=g("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ie).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",be).getRegex(),An=S(m({},Ve),{lheading:Cn,table:Jt,paragraph:g(Ue).replace("hr",ie).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Jt).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",be).getRegex()}),Ln=S(m({},Ve),{html:g(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Ye).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ne,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:g(Ue).replace("hr",ie).replace("heading",` *#{1,6} *[^
|
|
2
|
-
]`).replace("lheading",an).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()}),$n=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,zn=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,cn=/^( {2,}|\\)\n(?!\s*$)/,Nn=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,_e=/[\p{P}\p{S}]/u,Ze=/[\s\p{P}\p{S}]/u,un=/[^\s\p{P}\p{S}]/u,Bn=g(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Ze).getRegex(),hn=/(?!~)[\p{P}\p{S}]/u,Fn=/(?!~)[\s\p{P}\p{S}]/u,jn=/(?:[^\s\p{P}\p{S}]|~)/u,Hn=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,pn=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,qn=g(pn,"u").replace(/punct/g,_e).getRegex(),Un=g(pn,"u").replace(/punct/g,hn).getRegex(),dn="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Xn=g(dn,"gu").replace(/notPunctSpace/g,un).replace(/punctSpace/g,Ze).replace(/punct/g,_e).getRegex(),Yn=g(dn,"gu").replace(/notPunctSpace/g,jn).replace(/punctSpace/g,Fn).replace(/punct/g,hn).getRegex(),Vn=g("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,un).replace(/punctSpace/g,Ze).replace(/punct/g,_e).getRegex(),Zn=g(/\\(punct)/,"gu").replace(/punct/g,_e).getRegex(),Gn=g(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Qn=g(Ye).replace("(?:-->|$)","-->").getRegex(),Wn=g("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Qn).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),fe=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,Kn=g(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",fe).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),mn=g(/^!?\[(label)\]\[(ref)\]/).replace("label",fe).replace("ref",Xe).getRegex(),fn=g(/^!?\[(ref)\](?:\[\])?/).replace("ref",Xe).getRegex(),Jn=g("reflink|nolink(?!\\()","g").replace("reflink",mn).replace("nolink",fn).getRegex(),Ge={_backpedal:ne,anyPunctuation:Zn,autolink:Gn,blockSkip:Hn,br:cn,code:zn,del:ne,emStrongLDelim:qn,emStrongRDelimAst:Xn,emStrongRDelimUnd:Vn,escape:$n,link:Kn,nolink:fn,punctuation:Bn,reflink:mn,reflinkSearch:Jn,tag:Wn,text:Nn,url:ne},ei=S(m({},Ge),{link:g(/^!?\[(label)\]\((.*?)\)/).replace("label",fe).getRegex(),reflink:g(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",fe).getRegex()}),Be=S(m({},Ge),{emStrongRDelimAst:Yn,emStrongLDelim:Un,url:g(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),ti=S(m({},Be),{br:g(cn).replace("{2,}","*").getRegex(),text:g(Be.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()}),de={normal:Ve,gfm:An,pedantic:Ln},ee={normal:Ge,gfm:Be,breaks:ti,pedantic:ei},ni={"&":"&","<":"<",">":">",'"':""","'":"'"},en=r=>ni[r];function w(r,i){if(i){if(x.escapeTest.test(r))return r.replace(x.escapeReplace,en)}else if(x.escapeTestNoEncode.test(r))return r.replace(x.escapeReplaceNoEncode,en);return r}function tn(r){try{r=encodeURI(r).replace(x.percentDecode,"%")}catch{return null}return r}function nn(r,i){let t=r.replace(x.findPipe,(s,o,a)=>{let c=!1,l=o;for(;--l>=0&&a[l]==="\\";)c=!c;return c?"|":" |"}),e=t.split(x.splitPipe),n=0;if(e[0].trim()||e.shift(),e.length>0&&!e.at(-1)?.trim()&&e.pop(),i)if(e.length>i)e.splice(i);else for(;e.length<i;)e.push("");for(;n<e.length;n++)e[n]=e[n].trim().replace(x.slashPipe,"|");return e}function te(r,i,t){let e=r.length;if(e===0)return"";let n=0;for(;n<e;){let s=r.charAt(e-n-1);if(s===i&&!t)n++;else if(s!==i&&t)n++;else break}return r.slice(0,e-n)}function ii(r,i){if(r.indexOf(i[1])===-1)return-1;let t=0;for(let e=0;e<r.length;e++)if(r[e]==="\\")e++;else if(r[e]===i[0])t++;else if(r[e]===i[1]&&(t--,t<0))return e;return t>0?-2:-1}function rn(r,i,t,e,n){let s=i.href,o=i.title||null,a=r[1].replace(n.other.outputLinkReplace,"$1");e.state.inLink=!0;let c={type:r[0].charAt(0)==="!"?"image":"link",raw:t,href:s,title:o,text:a,tokens:e.inlineTokens(a)};return e.state.inLink=!1,c}function ri(r,i,t){let e=r.match(t.other.indentCodeCompensation);if(e===null)return i;let n=e[1];return i.split(`
|
|
3
|
-
`).map(s=>{let o=s.match(t.other.beginningSpace);if(o===null)return s;let[a]=o;return a.length>=n.length?s.slice(n.length):s}).join(`
|
|
4
|
-
`)}var ge=class{options;rules;lexer;constructor(r){this.options=r||D}space(r){let i=this.rules.block.newline.exec(r);if(i&&i[0].length>0)return{type:"space",raw:i[0]}}code(r){let i=this.rules.block.code.exec(r);if(i){let t=i[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:i[0],codeBlockStyle:"indented",text:this.options.pedantic?t:te(t,`
|
|
5
|
-
`)}}}fences(r){let i=this.rules.block.fences.exec(r);if(i){let t=i[0],e=ri(t,i[3]||"",this.rules);return{type:"code",raw:t,lang:i[2]?i[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):i[2],text:e}}}heading(r){let i=this.rules.block.heading.exec(r);if(i){let t=i[2].trim();if(this.rules.other.endingHash.test(t)){let e=te(t,"#");(this.options.pedantic||!e||this.rules.other.endingSpaceChar.test(e))&&(t=e.trim())}return{type:"heading",raw:i[0],depth:i[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(r){let i=this.rules.block.hr.exec(r);if(i)return{type:"hr",raw:te(i[0],`
|
|
6
|
-
`)}}blockquote(r){let i=this.rules.block.blockquote.exec(r);if(i){let t=te(i[0],`
|
|
7
|
-
`).split(`
|
|
8
|
-
`),e="",n="",s=[];for(;t.length>0;){let o=!1,a=[],c;for(c=0;c<t.length;c++)if(this.rules.other.blockquoteStart.test(t[c]))a.push(t[c]),o=!0;else if(!o)a.push(t[c]);else break;t=t.slice(c);let l=a.join(`
|
|
9
|
-
`),u=l.replace(this.rules.other.blockquoteSetextReplace,`
|
|
10
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");e=e?`${e}
|
|
11
|
-
${l}`:l,n=n?`${n}
|
|
12
|
-
${u}`:u;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(u,s,!0),this.lexer.state.top=p,t.length===0)break;let h=s.at(-1);if(h?.type==="code")break;if(h?.type==="blockquote"){let _=h,b=_.raw+`
|
|
13
|
-
`+t.join(`
|
|
14
|
-
`),k=this.blockquote(b);s[s.length-1]=k,e=e.substring(0,e.length-_.raw.length)+k.raw,n=n.substring(0,n.length-_.text.length)+k.text;break}else if(h?.type==="list"){let _=h,b=_.raw+`
|
|
15
|
-
`+t.join(`
|
|
16
|
-
`),k=this.list(b);s[s.length-1]=k,e=e.substring(0,e.length-h.raw.length)+k.raw,n=n.substring(0,n.length-_.raw.length)+k.raw,t=b.substring(s.at(-1).raw.length).split(`
|
|
17
|
-
`);continue}}return{type:"blockquote",raw:e,tokens:s,text:n}}}list(r){let i=this.rules.block.list.exec(r);if(i){let t=i[1].trim(),e=t.length>1,n={type:"list",raw:"",ordered:e,start:e?+t.slice(0,-1):"",loose:!1,items:[]};t=e?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=e?t:"[*+-]");let s=this.rules.other.listItemRegex(t),o=!1;for(;r;){let c=!1,l="",u="";if(!(i=s.exec(r))||this.rules.block.hr.test(r))break;l=i[0],r=r.substring(l.length);let p=i[2].split(`
|
|
18
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,we=>" ".repeat(3*we.length)),h=r.split(`
|
|
19
|
-
`,1)[0],_=!p.trim(),b=0;if(this.options.pedantic?(b=2,u=p.trimStart()):_?b=i[1].length+1:(b=i[2].search(this.rules.other.nonSpaceChar),b=b>4?1:b,u=p.slice(b),b+=i[1].length),_&&this.rules.other.blankLine.test(h)&&(l+=h+`
|
|
20
|
-
`,r=r.substring(h.length+1),c=!0),!c){let we=this.rules.other.nextBulletRegex(b),tt=this.rules.other.hrRegex(b),nt=this.rules.other.fencesBeginRegex(b),it=this.rules.other.headingBeginRegex(b),vn=this.rules.other.htmlBeginRegex(b);for(;r;){let ve=r.split(`
|
|
21
|
-
`,1)[0],B;if(h=ve,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),B=h):B=h.replace(this.rules.other.tabCharGlobal," "),nt.test(h)||it.test(h)||vn.test(h)||we.test(h)||tt.test(h))break;if(B.search(this.rules.other.nonSpaceChar)>=b||!h.trim())u+=`
|
|
22
|
-
`+B.slice(b);else{if(_||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||nt.test(p)||it.test(p)||tt.test(p))break;u+=`
|
|
23
|
-
`+h}!_&&!h.trim()&&(_=!0),l+=ve+`
|
|
24
|
-
`,r=r.substring(ve.length+1),p=B.slice(b)}}n.loose||(o?n.loose=!0:this.rules.other.doubleBlankLine.test(l)&&(o=!0));let k=null,ye;this.options.gfm&&(k=this.rules.other.listIsTask.exec(u),k&&(ye=k[0]!=="[ ] ",u=u.replace(this.rules.other.listReplaceTask,""))),n.items.push({type:"list_item",raw:l,task:!!k,checked:ye,loose:!1,text:u,tokens:[]}),n.raw+=l}let a=n.items.at(-1);if(a)a.raw=a.raw.trimEnd(),a.text=a.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let c=0;c<n.items.length;c++)if(this.lexer.state.top=!1,n.items[c].tokens=this.lexer.blockTokens(n.items[c].text,[]),!n.loose){let l=n.items[c].tokens.filter(p=>p.type==="space"),u=l.length>0&&l.some(p=>this.rules.other.anyLine.test(p.raw));n.loose=u}if(n.loose)for(let c=0;c<n.items.length;c++)n.items[c].loose=!0;return n}}html(r){let i=this.rules.block.html.exec(r);if(i)return{type:"html",block:!0,raw:i[0],pre:i[1]==="pre"||i[1]==="script"||i[1]==="style",text:i[0]}}def(r){let i=this.rules.block.def.exec(r);if(i){let t=i[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),e=i[2]?i[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=i[3]?i[3].substring(1,i[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):i[3];return{type:"def",tag:t,raw:i[0],href:e,title:n}}}table(r){let i=this.rules.block.table.exec(r);if(!i||!this.rules.other.tableDelimiter.test(i[2]))return;let t=nn(i[1]),e=i[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=i[3]?.trim()?i[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
25
|
-
`):[],s={type:"table",raw:i[0],header:[],align:[],rows:[]};if(t.length===e.length){for(let o of e)this.rules.other.tableAlignRight.test(o)?s.align.push("right"):this.rules.other.tableAlignCenter.test(o)?s.align.push("center"):this.rules.other.tableAlignLeft.test(o)?s.align.push("left"):s.align.push(null);for(let o=0;o<t.length;o++)s.header.push({text:t[o],tokens:this.lexer.inline(t[o]),header:!0,align:s.align[o]});for(let o of n)s.rows.push(nn(o,s.header.length).map((a,c)=>({text:a,tokens:this.lexer.inline(a),header:!1,align:s.align[c]})));return s}}lheading(r){let i=this.rules.block.lheading.exec(r);if(i)return{type:"heading",raw:i[0],depth:i[2].charAt(0)==="="?1:2,text:i[1],tokens:this.lexer.inline(i[1])}}paragraph(r){let i=this.rules.block.paragraph.exec(r);if(i){let t=i[1].charAt(i[1].length-1)===`
|
|
26
|
-
`?i[1].slice(0,-1):i[1];return{type:"paragraph",raw:i[0],text:t,tokens:this.lexer.inline(t)}}}text(r){let i=this.rules.block.text.exec(r);if(i)return{type:"text",raw:i[0],text:i[0],tokens:this.lexer.inline(i[0])}}escape(r){let i=this.rules.inline.escape.exec(r);if(i)return{type:"escape",raw:i[0],text:i[1]}}tag(r){let i=this.rules.inline.tag.exec(r);if(i)return!this.lexer.state.inLink&&this.rules.other.startATag.test(i[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(i[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(i[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(i[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:i[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:i[0]}}link(r){let i=this.rules.inline.link.exec(r);if(i){let t=i[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let s=te(t.slice(0,-1),"\\");if((t.length-s.length)%2===0)return}else{let s=ii(i[2],"()");if(s===-2)return;if(s>-1){let a=(i[0].indexOf("!")===0?5:4)+i[1].length+s;i[2]=i[2].substring(0,s),i[0]=i[0].substring(0,a).trim(),i[3]=""}}let e=i[2],n="";if(this.options.pedantic){let s=this.rules.other.pedanticHrefTitle.exec(e);s&&(e=s[1],n=s[3])}else n=i[3]?i[3].slice(1,-1):"";return e=e.trim(),this.rules.other.startAngleBracket.test(e)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?e=e.slice(1):e=e.slice(1,-1)),rn(i,{href:e&&e.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},i[0],this.lexer,this.rules)}}reflink(r,i){let t;if((t=this.rules.inline.reflink.exec(r))||(t=this.rules.inline.nolink.exec(r))){let e=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=i[e.toLowerCase()];if(!n){let s=t[0].charAt(0);return{type:"text",raw:s,text:s}}return rn(t,n,t[0],this.lexer,this.rules)}}emStrong(r,i,t=""){let e=this.rules.inline.emStrongLDelim.exec(r);if(!e||e[3]&&t.match(this.rules.other.unicodeAlphaNumeric))return;if(!(e[1]||e[2]||"")||!t||this.rules.inline.punctuation.exec(t)){let s=[...e[0]].length-1,o,a,c=s,l=0,u=e[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,i=i.slice(-1*r.length+s);(e=u.exec(i))!=null;){if(o=e[1]||e[2]||e[3]||e[4]||e[5]||e[6],!o)continue;if(a=[...o].length,e[3]||e[4]){c+=a;continue}else if((e[5]||e[6])&&s%3&&!((s+a)%3)){l+=a;continue}if(c-=a,c>0)continue;a=Math.min(a,a+c+l);let p=[...e[0]][0].length,h=r.slice(0,s+e.index+p+a);if(Math.min(s,a)%2){let b=h.slice(1,-1);return{type:"em",raw:h,text:b,tokens:this.lexer.inlineTokens(b)}}let _=h.slice(2,-2);return{type:"strong",raw:h,text:_,tokens:this.lexer.inlineTokens(_)}}}}codespan(r){let i=this.rules.inline.code.exec(r);if(i){let t=i[2].replace(this.rules.other.newLineCharGlobal," "),e=this.rules.other.nonSpaceChar.test(t),n=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return e&&n&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:i[0],text:t}}}br(r){let i=this.rules.inline.br.exec(r);if(i)return{type:"br",raw:i[0]}}del(r){let i=this.rules.inline.del.exec(r);if(i)return{type:"del",raw:i[0],text:i[2],tokens:this.lexer.inlineTokens(i[2])}}autolink(r){let i=this.rules.inline.autolink.exec(r);if(i){let t,e;return i[2]==="@"?(t=i[1],e="mailto:"+t):(t=i[1],e=t),{type:"link",raw:i[0],text:t,href:e,tokens:[{type:"text",raw:t,text:t}]}}}url(r){let i;if(i=this.rules.inline.url.exec(r)){let t,e;if(i[2]==="@")t=i[0],e="mailto:"+t;else{let n;do n=i[0],i[0]=this.rules.inline._backpedal.exec(i[0])?.[0]??"";while(n!==i[0]);t=i[0],i[1]==="www."?e="http://"+i[0]:e=i[0]}return{type:"link",raw:i[0],text:t,href:e,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(r){let i=this.rules.inline.text.exec(r);if(i){let t=this.lexer.state.inRawBlock;return{type:"text",raw:i[0],text:i[0],escaped:t}}}},T=class Fe{tokens;options;state;tokenizer;inlineQueue;constructor(i){this.tokens=[],this.tokens.links=Object.create(null),this.options=i||D,this.options.tokenizer=this.options.tokenizer||new ge,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:x,block:de.normal,inline:ee.normal};this.options.pedantic?(t.block=de.pedantic,t.inline=ee.pedantic):this.options.gfm&&(t.block=de.gfm,this.options.breaks?t.inline=ee.breaks:t.inline=ee.gfm),this.tokenizer.rules=t}static get rules(){return{block:de,inline:ee}}static lex(i,t){return new Fe(t).lex(i)}static lexInline(i,t){return new Fe(t).inlineTokens(i)}lex(i){i=i.replace(x.carriageReturn,`
|
|
27
|
-
`),this.blockTokens(i,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(i,t=[],e=!1){for(this.options.pedantic&&(i=i.replace(x.tabCharGlobal," ").replace(x.spaceLine,""));i;){let n;if(this.options.extensions?.block?.some(o=>(n=o.call({lexer:this},i,t))?(i=i.substring(n.raw.length),t.push(n),!0):!1))continue;if(n=this.tokenizer.space(i)){i=i.substring(n.raw.length);let o=t.at(-1);n.raw.length===1&&o!==void 0?o.raw+=`
|
|
28
|
-
`:t.push(n);continue}if(n=this.tokenizer.code(i)){i=i.substring(n.raw.length);let o=t.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=`
|
|
29
|
-
`+n.raw,o.text+=`
|
|
30
|
-
`+n.text,this.inlineQueue.at(-1).src=o.text):t.push(n);continue}if(n=this.tokenizer.fences(i)){i=i.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.heading(i)){i=i.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.hr(i)){i=i.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.blockquote(i)){i=i.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.list(i)){i=i.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.html(i)){i=i.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.def(i)){i=i.substring(n.raw.length);let o=t.at(-1);o?.type==="paragraph"||o?.type==="text"?(o.raw+=`
|
|
31
|
-
`+n.raw,o.text+=`
|
|
32
|
-
`+n.raw,this.inlineQueue.at(-1).src=o.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if(n=this.tokenizer.table(i)){i=i.substring(n.raw.length),t.push(n);continue}if(n=this.tokenizer.lheading(i)){i=i.substring(n.raw.length),t.push(n);continue}let s=i;if(this.options.extensions?.startBlock){let o=1/0,a=i.slice(1),c;this.options.extensions.startBlock.forEach(l=>{c=l.call({lexer:this},a),typeof c=="number"&&c>=0&&(o=Math.min(o,c))}),o<1/0&&o>=0&&(s=i.substring(0,o+1))}if(this.state.top&&(n=this.tokenizer.paragraph(s))){let o=t.at(-1);e&&o?.type==="paragraph"?(o.raw+=`
|
|
33
|
-
`+n.raw,o.text+=`
|
|
34
|
-
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):t.push(n),e=s.length!==i.length,i=i.substring(n.raw.length);continue}if(n=this.tokenizer.text(i)){i=i.substring(n.raw.length);let o=t.at(-1);o?.type==="text"?(o.raw+=`
|
|
35
|
-
`+n.raw,o.text+=`
|
|
36
|
-
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):t.push(n);continue}if(i){let o="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(o);break}else throw new Error(o)}}return this.state.top=!0,t}inline(i,t=[]){return this.inlineQueue.push({src:i,tokens:t}),t}inlineTokens(i,t=[]){let e=i,n=null;if(this.tokens.links){let a=Object.keys(this.tokens.links);if(a.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(e))!=null;)a.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(e=e.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+e.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(e))!=null;)e=e.slice(0,n.index)+"++"+e.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(n=this.tokenizer.rules.inline.blockSkip.exec(e))!=null;)e=e.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+e.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let s=!1,o="";for(;i;){s||(o=""),s=!1;let a;if(this.options.extensions?.inline?.some(l=>(a=l.call({lexer:this},i,t))?(i=i.substring(a.raw.length),t.push(a),!0):!1))continue;if(a=this.tokenizer.escape(i)){i=i.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.tag(i)){i=i.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.link(i)){i=i.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.reflink(i,this.tokens.links)){i=i.substring(a.raw.length);let l=t.at(-1);a.type==="text"&&l?.type==="text"?(l.raw+=a.raw,l.text+=a.text):t.push(a);continue}if(a=this.tokenizer.emStrong(i,e,o)){i=i.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.codespan(i)){i=i.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.br(i)){i=i.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.del(i)){i=i.substring(a.raw.length),t.push(a);continue}if(a=this.tokenizer.autolink(i)){i=i.substring(a.raw.length),t.push(a);continue}if(!this.state.inLink&&(a=this.tokenizer.url(i))){i=i.substring(a.raw.length),t.push(a);continue}let c=i;if(this.options.extensions?.startInline){let l=1/0,u=i.slice(1),p;this.options.extensions.startInline.forEach(h=>{p=h.call({lexer:this},u),typeof p=="number"&&p>=0&&(l=Math.min(l,p))}),l<1/0&&l>=0&&(c=i.substring(0,l+1))}if(a=this.tokenizer.inlineText(c)){i=i.substring(a.raw.length),a.raw.slice(-1)!=="_"&&(o=a.raw.slice(-1)),s=!0;let l=t.at(-1);l?.type==="text"?(l.raw+=a.raw,l.text+=a.text):t.push(a);continue}if(i){let l="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return t}},I=class{options;parser;constructor(r){this.options=r||D}space(r){return""}code({text:r,lang:i,escaped:t}){let e=(i||"").match(x.notSpaceStart)?.[0],n=r.replace(x.endingNewline,"")+`
|
|
37
|
-
`;return e?'<pre><code class="language-'+w(e)+'">'+(t?n:w(n,!0))+`</code></pre>
|
|
38
|
-
`:"<pre><code>"+(t?n:w(n,!0))+`</code></pre>
|
|
39
|
-
`}blockquote({tokens:r}){return`<blockquote>
|
|
40
|
-
${this.parser.parse(r)}</blockquote>
|
|
41
|
-
`}html({text:r}){return r}heading({tokens:r,depth:i}){return`<h${i}>${this.parser.parseInline(r)}</h${i}>
|
|
42
|
-
`}hr(r){return`<hr>
|
|
43
|
-
`}list(r){let i=r.ordered,t=r.start,e="";for(let o=0;o<r.items.length;o++){let a=r.items[o];e+=this.listitem(a)}let n=i?"ol":"ul",s=i&&t!==1?' start="'+t+'"':"";return"<"+n+s+`>
|
|
44
|
-
`+e+"</"+n+`>
|
|
45
|
-
`}listitem(r){let i="";if(r.task){let t=this.checkbox({checked:!!r.checked});r.loose?r.tokens[0]?.type==="paragraph"?(r.tokens[0].text=t+" "+r.tokens[0].text,r.tokens[0].tokens&&r.tokens[0].tokens.length>0&&r.tokens[0].tokens[0].type==="text"&&(r.tokens[0].tokens[0].text=t+" "+w(r.tokens[0].tokens[0].text),r.tokens[0].tokens[0].escaped=!0)):r.tokens.unshift({type:"text",raw:t+" ",text:t+" ",escaped:!0}):i+=t+" "}return i+=this.parser.parse(r.tokens,!!r.loose),`<li>${i}</li>
|
|
46
|
-
`}checkbox({checked:r}){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:r}){return`<p>${this.parser.parseInline(r)}</p>
|
|
47
|
-
`}table(r){let i="",t="";for(let n=0;n<r.header.length;n++)t+=this.tablecell(r.header[n]);i+=this.tablerow({text:t});let e="";for(let n=0;n<r.rows.length;n++){let s=r.rows[n];t="";for(let o=0;o<s.length;o++)t+=this.tablecell(s[o]);e+=this.tablerow({text:t})}return e&&(e=`<tbody>${e}</tbody>`),`<table>
|
|
48
|
-
<thead>
|
|
49
|
-
`+i+`</thead>
|
|
50
|
-
`+e+`</table>
|
|
51
|
-
`}tablerow({text:r}){return`<tr>
|
|
52
|
-
${r}</tr>
|
|
53
|
-
`}tablecell(r){let i=this.parser.parseInline(r.tokens),t=r.header?"th":"td";return(r.align?`<${t} align="${r.align}">`:`<${t}>`)+i+`</${t}>
|
|
54
|
-
`}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${w(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:i,tokens:t}){let e=this.parser.parseInline(t),n=tn(r);if(n===null)return e;r=n;let s='<a href="'+r+'"';return i&&(s+=' title="'+w(i)+'"'),s+=">"+e+"</a>",s}image({href:r,title:i,text:t,tokens:e}){e&&(t=this.parser.parseInline(e,this.parser.textRenderer));let n=tn(r);if(n===null)return w(t);r=n;let s=`<img src="${r}" alt="${t}"`;return i&&(s+=` title="${w(i)}"`),s+=">",s}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:w(r.text)}},Qe=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}},R=class je{options;renderer;textRenderer;constructor(i){this.options=i||D,this.options.renderer=this.options.renderer||new I,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Qe}static parse(i,t){return new je(t).parse(i)}static parseInline(i,t){return new je(t).parseInline(i)}parse(i,t=!0){let e="";for(let n=0;n<i.length;n++){let s=i[n];if(this.options.extensions?.renderers?.[s.type]){let a=s,c=this.options.extensions.renderers[a.type].call({parser:this},a);if(c!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(a.type)){e+=c||"";continue}}let o=s;switch(o.type){case"space":{e+=this.renderer.space(o);continue}case"hr":{e+=this.renderer.hr(o);continue}case"heading":{e+=this.renderer.heading(o);continue}case"code":{e+=this.renderer.code(o);continue}case"table":{e+=this.renderer.table(o);continue}case"blockquote":{e+=this.renderer.blockquote(o);continue}case"list":{e+=this.renderer.list(o);continue}case"html":{e+=this.renderer.html(o);continue}case"paragraph":{e+=this.renderer.paragraph(o);continue}case"text":{let a=o,c=this.renderer.text(a);for(;n+1<i.length&&i[n+1].type==="text";)a=i[++n],c+=`
|
|
55
|
-
`+this.renderer.text(a);t?e+=this.renderer.paragraph({type:"paragraph",raw:c,text:c,tokens:[{type:"text",raw:c,text:c,escaped:!0}]}):e+=c;continue}default:{let a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return e}parseInline(i,t=this.renderer){let e="";for(let n=0;n<i.length;n++){let s=i[n];if(this.options.extensions?.renderers?.[s.type]){let a=this.options.extensions.renderers[s.type].call({parser:this},s);if(a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(s.type)){e+=a||"";continue}}let o=s;switch(o.type){case"escape":{e+=t.text(o);break}case"html":{e+=t.html(o);break}case"link":{e+=t.link(o);break}case"image":{e+=t.image(o);break}case"strong":{e+=t.strong(o);break}case"em":{e+=t.em(o);break}case"codespan":{e+=t.codespan(o);break}case"br":{e+=t.br(o);break}case"del":{e+=t.del(o);break}case"text":{e+=t.text(o);break}default:{let a='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return e}},me=class{options;block;constructor(i){this.options=i||D}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(i){return i}postprocess(i){return i}processAllTokens(i){return i}provideLexer(){return this.block?T.lex:T.lexInline}provideParser(){return this.block?R.parse:R.parseInline}},si=class{defaults=He();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=R;Renderer=I;TextRenderer=Qe;Lexer=T;Tokenizer=ge;Hooks=me;constructor(...r){this.use(...r)}walkTokens(r,i){let t=[];for(let e of r)switch(t=t.concat(i.call(this,e)),e.type){case"table":{let n=e;for(let s of n.header)t=t.concat(this.walkTokens(s.tokens,i));for(let s of n.rows)for(let o of s)t=t.concat(this.walkTokens(o.tokens,i));break}case"list":{let n=e;t=t.concat(this.walkTokens(n.items,i));break}default:{let n=e;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(s=>{let o=n[s].flat(1/0);t=t.concat(this.walkTokens(o,i))}):n.tokens&&(t=t.concat(this.walkTokens(n.tokens,i)))}}return t}use(...r){let i=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach(t=>{let e=m({},t);if(e.async=this.defaults.async||e.async||!1,t.extensions&&(t.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let s=i.renderers[n.name];s?i.renderers[n.name]=function(...o){let a=n.renderer.apply(this,o);return a===!1&&(a=s.apply(this,o)),a}:i.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=i[n.level];s?s.unshift(n.tokenizer):i[n.level]=[n.tokenizer],n.start&&(n.level==="block"?i.startBlock?i.startBlock.push(n.start):i.startBlock=[n.start]:n.level==="inline"&&(i.startInline?i.startInline.push(n.start):i.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(i.childTokens[n.name]=n.childTokens)}),e.extensions=i),t.renderer){let n=this.defaults.renderer||new I(this.defaults);for(let s in t.renderer){if(!(s in n))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let o=s,a=t.renderer[o],c=n[o];n[o]=(...l)=>{let u=a.apply(n,l);return u===!1&&(u=c.apply(n,l)),u||""}}e.renderer=n}if(t.tokenizer){let n=this.defaults.tokenizer||new ge(this.defaults);for(let s in t.tokenizer){if(!(s in n))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let o=s,a=t.tokenizer[o],c=n[o];n[o]=(...l)=>{let u=a.apply(n,l);return u===!1&&(u=c.apply(n,l)),u}}e.tokenizer=n}if(t.hooks){let n=this.defaults.hooks||new me;for(let s in t.hooks){if(!(s in n))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let o=s,a=t.hooks[o],c=n[o];me.passThroughHooks.has(s)?n[o]=l=>{if(this.defaults.async)return Promise.resolve(a.call(n,l)).then(p=>c.call(n,p));let u=a.call(n,l);return c.call(n,u)}:n[o]=(...l)=>{let u=a.apply(n,l);return u===!1&&(u=c.apply(n,l)),u}}e.hooks=n}if(t.walkTokens){let n=this.defaults.walkTokens,s=t.walkTokens;e.walkTokens=function(o){let a=[];return a.push(s.call(this,o)),n&&(a=a.concat(n.call(this,o))),a}}this.defaults=m(m({},this.defaults),e)}),this}setOptions(r){return this.defaults=m(m({},this.defaults),r),this}lexer(r,i){return T.lex(r,i??this.defaults)}parser(r,i){return R.parse(r,i??this.defaults)}parseMarkdown(r){return(t,e)=>{let n=m({},e),s=m(m({},this.defaults),n),o=this.onError(!!s.silent,!!s.async);if(this.defaults.async===!0&&n.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));s.hooks&&(s.hooks.options=s,s.hooks.block=r);let a=s.hooks?s.hooks.provideLexer():r?T.lex:T.lexInline,c=s.hooks?s.hooks.provideParser():r?R.parse:R.parseInline;if(s.async)return Promise.resolve(s.hooks?s.hooks.preprocess(t):t).then(l=>a(l,s)).then(l=>s.hooks?s.hooks.processAllTokens(l):l).then(l=>s.walkTokens?Promise.all(this.walkTokens(l,s.walkTokens)).then(()=>l):l).then(l=>c(l,s)).then(l=>s.hooks?s.hooks.postprocess(l):l).catch(o);try{s.hooks&&(t=s.hooks.preprocess(t));let l=a(t,s);s.hooks&&(l=s.hooks.processAllTokens(l)),s.walkTokens&&this.walkTokens(l,s.walkTokens);let u=c(l,s);return s.hooks&&(u=s.hooks.postprocess(u)),u}catch(l){return o(l)}}}onError(r,i){return t=>{if(t.message+=`
|
|
56
|
-
Please report this to https://github.com/markedjs/marked.`,r){let e="<p>An error occurred:</p><pre>"+w(t.message+"",!0)+"</pre>";return i?Promise.resolve(e):e}if(i)return Promise.reject(t);throw t}}},P=new si;function d(r,i){return P.parse(r,i)}d.options=d.setOptions=function(r){return P.setOptions(r),d.defaults=P.defaults,sn(d.defaults),d};d.getDefaults=He;d.defaults=D;d.use=function(...r){return P.use(...r),d.defaults=P.defaults,sn(d.defaults),d};d.walkTokens=function(r,i){return P.walkTokens(r,i)};d.parseInline=P.parseInline;d.Parser=R;d.parser=R.parse;d.Renderer=I;d.TextRenderer=Qe;d.Lexer=T;d.lexer=T.lex;d.Tokenizer=ge;d.Hooks=me;d.parse=d;var zi=d.options,Ni=d.setOptions,Bi=d.use,Fi=d.walkTokens,ji=d.parseInline;var Hi=R.parse,qi=T.lex;var ai=["*"],li="Copy",ci="Copied",ui=(()=>{let i=class i{constructor(){this._buttonClick$=new v,this.copied=Lt(this._buttonClick$.pipe(j(()=>O(F(!0),ot(3e3).pipe(ct(!1)))),ut(),ht(1))),this.copiedText=Ot(()=>this.copied()?ci:li)}onCopyToClipboardClick(){this._buttonClick$.next()}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=$({type:i,selectors:[["markdown-clipboard"]],decls:2,vars:3,consts:[[1,"markdown-clipboard-button",3,"click"]],template:function(n,s){n&1&&(V(0,"button",0),he("click",function(){return s.onCopyToClipboardClick()}),Pt(1),ue()),n&2&&(W("copied",s.copied()),U(),Dt(s.copiedText()))},encapsulation:2,changeDetection:0});let r=i;return r})(),hi=new y("CLIPBOARD_OPTIONS");var We=(function(r){return r.CommandLine="command-line",r.LineHighlight="line-highlight",r.LineNumbers="line-numbers",r})(We||{}),pi=new y("MARKED_EXTENSIONS"),di=new y("MARKED_OPTIONS"),mi=new y("MERMAID_OPTIONS"),fi="[ngx-markdown] When using the `emoji` attribute you *have to* include Emoji-Toolkit files to `angular.json` or use imports. See README for more information",gi="[ngx-markdown] When using the `katex` attribute you *have to* include KaTeX files to `angular.json` or use imports. See README for more information",bi="[ngx-markdown] When using the `mermaid` attribute you *have to* include Mermaid files to `angular.json` or use imports. See README for more information",_i="[ngx-markdown] When using the `clipboard` attribute you *have to* include Clipboard files to `angular.json` or use imports. See README for more information",ki="[ngx-markdown] When using the `clipboard` attribute you *have to* provide the `viewContainerRef` parameter to `MarkdownService.render()` function",xi="[ngx-markdown] When using the `src` attribute you *have to* pass the `HttpClient` as a parameter of the `forRoot` method. See README for more information",gn=new y("SECURITY_CONTEXT");var bn=(()=>{let i=class i{get options(){return this._options}set options(e){this._options=m(m({},this.DEFAULT_MARKED_OPTIONS),e)}get renderer(){return this.options.renderer}set renderer(e){this.options.renderer=e}constructor(e,n,s,o,a,c,l,u){this.clipboardOptions=e,this.extensions=n,this.mermaidOptions=o,this.platform=a,this.securityContext=c,this.http=l,this.sanitizer=u,this.DEFAULT_MARKED_OPTIONS={renderer:new I},this.DEFAULT_KATEX_OPTIONS={delimiters:[{left:"$$",right:"$$",display:!0},{left:"$",right:"$",display:!1},{left:"\\(",right:"\\)",display:!1},{left:"\\begin{equation}",right:"\\end{equation}",display:!0},{left:"\\begin{align}",right:"\\end{align}",display:!0},{left:"\\begin{alignat}",right:"\\end{alignat}",display:!0},{left:"\\begin{gather}",right:"\\end{gather}",display:!0},{left:"\\begin{CD}",right:"\\end{CD}",display:!0},{left:"\\[",right:"\\]",display:!0}]},this.DEFAULT_MERMAID_OPTIONS={startOnLoad:!1},this.DEFAULT_CLIPBOARD_OPTIONS={buttonComponent:void 0},this.DEFAULT_PARSE_OPTIONS={decodeHtml:!1,inline:!1,emoji:!1,mermaid:!1,markedOptions:void 0,disableSanitizer:!1},this.DEFAULT_RENDER_OPTIONS={clipboard:!1,clipboardOptions:void 0,katex:!1,katexOptions:void 0,mermaid:!1,mermaidOptions:void 0},this._reload$=new v,this.reload$=this._reload$.asObservable(),this.options=s}parse(e,n=this.DEFAULT_PARSE_OPTIONS){let{decodeHtml:s,inline:o,emoji:a,mermaid:c,disableSanitizer:l}=n,u=m(m({},this.options),n.markedOptions),p=u.renderer||this.renderer||new I;this.extensions&&(this.renderer=this.extendsRendererForExtensions(p)),c&&(this.renderer=this.extendsRendererForMermaid(p));let h=this.trimIndentation(e),_=s?this.decodeHtml(h):h,b=a?this.parseEmoji(_):_,k=this.parseMarked(b,u,o);return(l?k:this.sanitizer.sanitize(this.securityContext,k))||""}render(e,n=this.DEFAULT_RENDER_OPTIONS,s){let{clipboard:o,clipboardOptions:a,katex:c,katexOptions:l,mermaid:u,mermaidOptions:p}=n;c&&this.renderKatex(e,m(m({},this.DEFAULT_KATEX_OPTIONS),l)),u&&this.renderMermaid(e,m(m(m({},this.DEFAULT_MERMAID_OPTIONS),this.mermaidOptions),p)),o&&this.renderClipboard(e,s,m(m(m({},this.DEFAULT_CLIPBOARD_OPTIONS),this.clipboardOptions),a)),this.highlight(e)}reload(){this._reload$.next()}getSource(e){if(!this.http)throw new Error(xi);return this.http.get(e,{responseType:"text"}).pipe(st(n=>this.handleExtension(e,n)))}highlight(e){if(!E(this.platform)||typeof Prism>"u"||typeof Prism.highlightAllUnder>"u")return;e||(e=document);let n=e.querySelectorAll('pre code:not([class*="language-"])');Array.prototype.forEach.call(n,s=>s.classList.add("language-none")),Prism.highlightAllUnder(e)}decodeHtml(e){if(!E(this.platform))return e;let n=document.createElement("textarea");return n.innerHTML=e,n.value}extendsRendererForExtensions(e){let n=e;return n.\u0275NgxMarkdownRendererExtendedForExtensions===!0||(this.extensions?.length>0&&d.use(...this.extensions),n.\u0275NgxMarkdownRendererExtendedForExtensions=!0),e}extendsRendererForMermaid(e){let n=e;if(n.\u0275NgxMarkdownRendererExtendedForMermaid===!0)return e;let s=e.code;return e.code=o=>o.lang==="mermaid"?`<div class="mermaid">${o.text}</div>`:s(o),n.\u0275NgxMarkdownRendererExtendedForMermaid=!0,e}handleExtension(e,n){let s=e.lastIndexOf("://"),o=s>-1?e.substring(s+4):e,a=o.lastIndexOf("/"),c=a>-1?o.substring(a+1).split("?")[0]:"",l=c.lastIndexOf("."),u=l>-1?c.substring(l+1):"";return u&&u!=="md"?"```"+u+`
|
|
57
|
-
`+n+"\n```":n}parseMarked(e,n,s=!1){if(n.renderer){let o=m({},n.renderer);delete o.\u0275NgxMarkdownRendererExtendedForExtensions,delete o.\u0275NgxMarkdownRendererExtendedForMermaid,delete n.renderer,d.use({renderer:o})}return s?d.parseInline(e,n):d.parse(e,n)}parseEmoji(e){if(!E(this.platform))return e;if(typeof joypixels>"u"||typeof joypixels.shortnameToUnicode>"u")throw new Error(fi);return joypixels.shortnameToUnicode(e)}renderKatex(e,n){if(E(this.platform)){if(typeof katex>"u"||typeof renderMathInElement>"u")throw new Error(gi);renderMathInElement(e,n)}}renderClipboard(e,n,s){if(!E(this.platform))return;if(typeof ClipboardJS>"u")throw new Error(_i);if(!n)throw new Error(ki);let{buttonComponent:o,buttonTemplate:a}=s,c=e.querySelectorAll("pre");for(let l=0;l<c.length;l++){let u=c.item(l),p=document.createElement("div");p.style.position="relative",u.parentNode.insertBefore(p,u),p.appendChild(u);let h=document.createElement("div");h.classList.add("markdown-clipboard-toolbar"),h.style.position="absolute",h.style.top=".5em",h.style.right=".5em",h.style.zIndex="1",p.insertAdjacentElement("beforeend",h),p.onmouseenter=()=>h.classList.add("hover"),p.onmouseleave=()=>h.classList.remove("hover");let _;if(o){let k=n.createComponent(o);_=k.hostView,k.changeDetectorRef.markForCheck()}else if(a)_=n.createEmbeddedView(a);else{let k=n.createComponent(ui);_=k.hostView,k.changeDetectorRef.markForCheck()}let b;_.rootNodes.forEach(k=>{h.appendChild(k),b=new ClipboardJS(k,{text:()=>u.innerText})}),_.onDestroy(()=>b.destroy())}}renderMermaid(e,n=this.DEFAULT_MERMAID_OPTIONS){if(!E(this.platform))return;if(typeof mermaid>"u"||typeof mermaid.initialize>"u")throw new Error(bi);let s=e.querySelectorAll(".mermaid");s.length!==0&&(mermaid.initialize(n),mermaid.run({nodes:s}))}trimIndentation(e){if(!e)return"";let n;return e.split(`
|
|
58
|
-
`).map(s=>{let o=n;return s.length>0&&(o=isNaN(o)?s.search(/\S|$/):Math.min(s.search(/\S|$/),o)),isNaN(n)&&(n=o),o?s.substring(o):s}).join(`
|
|
59
|
-
`)}};i.\u0275fac=function(n){return new(n||i)(M(hi,8),M(pi,8),M(di,8),M(mi,8),M(gt),M(gn),M(At,8),M($t))},i.\u0275prov=pt({token:i,factory:i.\u0275fac});let r=i;return r})(),gr=(()=>{let i=class i{get disableSanitizer(){return this._disableSanitizer}set disableSanitizer(e){this._disableSanitizer=this.coerceBooleanProperty(e)}get inline(){return this._inline}set inline(e){this._inline=this.coerceBooleanProperty(e)}get clipboard(){return this._clipboard}set clipboard(e){this._clipboard=this.coerceBooleanProperty(e)}get emoji(){return this._emoji}set emoji(e){this._emoji=this.coerceBooleanProperty(e)}get katex(){return this._katex}set katex(e){this._katex=this.coerceBooleanProperty(e)}get mermaid(){return this._mermaid}set mermaid(e){this._mermaid=this.coerceBooleanProperty(e)}get lineHighlight(){return this._lineHighlight}set lineHighlight(e){this._lineHighlight=this.coerceBooleanProperty(e)}get lineNumbers(){return this._lineNumbers}set lineNumbers(e){this._lineNumbers=this.coerceBooleanProperty(e)}get commandLine(){return this._commandLine}set commandLine(e){this._commandLine=this.coerceBooleanProperty(e)}constructor(e,n,s){this.element=e,this.markdownService=n,this.viewContainerRef=s,this.error=new C,this.load=new C,this.ready=new C,this._clipboard=!1,this._commandLine=!1,this._disableSanitizer=!1,this._emoji=!1,this._inline=!1,this._katex=!1,this._lineHighlight=!1,this._lineNumbers=!1,this._mermaid=!1,this.destroyed$=new v}ngOnChanges(){this.loadContent()}loadContent(){if(this.data!=null){this.handleData();return}if(this.src!=null){this.handleSrc();return}}ngAfterViewInit(){!this.data&&!this.src&&this.handleTransclusion(),this.markdownService.reload$.pipe(ae(this.destroyed$)).subscribe(()=>this.loadContent())}ngOnDestroy(){this.destroyed$.next(),this.destroyed$.complete()}render(e,n=!1){return rt(this,null,function*(){let s={decodeHtml:n,inline:this.inline,emoji:this.emoji,mermaid:this.mermaid,disableSanitizer:this.disableSanitizer},o={clipboard:this.clipboard,clipboardOptions:this.getClipboardOptions(),katex:this.katex,katexOptions:this.katexOptions,mermaid:this.mermaid,mermaidOptions:this.mermaidOptions},a=yield this.markdownService.parse(e,s);this.element.nativeElement.innerHTML=a,this.handlePlugins(),this.markdownService.render(this.element.nativeElement,o,this.viewContainerRef),this.ready.emit()})}coerceBooleanProperty(e){return e!=null&&`${String(e)}`!="false"}getClipboardOptions(){if(this.clipboardButtonComponent||this.clipboardButtonTemplate)return{buttonComponent:this.clipboardButtonComponent,buttonTemplate:this.clipboardButtonTemplate}}handleData(){this.render(this.data)}handleSrc(){this.markdownService.getSource(this.src).subscribe({next:e=>{this.render(e).then(()=>{this.load.emit(e)})},error:e=>this.error.emit(e)})}handleTransclusion(){this.render(this.element.nativeElement.innerHTML,!0)}handlePlugins(){this.commandLine&&(this.setPluginClass(this.element.nativeElement,We.CommandLine),this.setPluginOptions(this.element.nativeElement,{dataFilterOutput:this.filterOutput,dataHost:this.host,dataPrompt:this.prompt,dataOutput:this.output,dataUser:this.user})),this.lineHighlight&&this.setPluginOptions(this.element.nativeElement,{dataLine:this.line,dataLineOffset:this.lineOffset}),this.lineNumbers&&(this.setPluginClass(this.element.nativeElement,We.LineNumbers),this.setPluginOptions(this.element.nativeElement,{dataStart:this.start}))}setPluginClass(e,n){let s=e.querySelectorAll("pre");for(let o=0;o<s.length;o++){let a=n instanceof Array?n:[n];s.item(o).classList.add(...a)}}setPluginOptions(e,n){let s=e.querySelectorAll("pre");for(let o=0;o<s.length;o++)Object.keys(n).forEach(a=>{let c=n[a];if(c){let l=this.toLispCase(a);s.item(o).setAttribute(l,c.toString())}})}toLispCase(e){let n=e.match(/([A-Z])/g);if(!n)return e;let s=e.toString();for(let o=0,a=n.length;o<a;o++)s=s.replace(new RegExp(n[o]),"-"+n[o].toLowerCase());return s.slice(0,1)==="-"&&(s=s.slice(1)),s}};i.\u0275fac=function(n){return new(n||i)(le(L),le(bn),le(X))},i.\u0275cmp=$({type:i,selectors:[["markdown"],["","markdown",""]],inputs:{data:"data",src:"src",disableSanitizer:"disableSanitizer",inline:"inline",clipboard:"clipboard",clipboardButtonComponent:"clipboardButtonComponent",clipboardButtonTemplate:"clipboardButtonTemplate",emoji:"emoji",katex:"katex",katexOptions:"katexOptions",mermaid:"mermaid",mermaidOptions:"mermaidOptions",lineHighlight:"lineHighlight",line:"line",lineOffset:"lineOffset",lineNumbers:"lineNumbers",start:"start",commandLine:"commandLine",filterOutput:"filterOutput",host:"host",prompt:"prompt",output:"output",user:"user"},outputs:{error:"error",load:"load",ready:"ready"},features:[mt],ngContentSelectors:ai,decls:1,vars:0,template:function(n,s){n&1&&(Z(),N(0))},encapsulation:2});let r=i;return r})();function br(r){return[bn,r?.loader??[],r?.clipboardOptions??[],r?.markedOptions??[],r?.mermaidOptions??[],r?.markedExtensions??[],{provide:gn,useValue:r?.sanitize??bt.HTML}]}var Ri=["mat-menu-item",""],Si=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],Ci=["mat-icon, [matMenuItemIcon]","*"];function Ii(r,i){r&1&&(dt(),Ie(0,"svg",2),Pe(1,"polygon",3),Ee())}var Ei=["*"];function Pi(r,i){if(r&1){let t=St();V(0,"div",0),he("click",function(){H(t);let n=z();return q(n.closed.emit("click"))})("animationstart",function(n){H(t);let s=z();return q(s._onAnimationStart(n.animationName))})("animationend",function(n){H(t);let s=z();return q(s._onAnimationDone(n.animationName))})("animationcancel",function(n){H(t);let s=z();return q(s._onAnimationDone(n.animationName))}),V(1,"div",1),N(2),ue()()}if(r&2){let t=z();Et(t._classList),W("mat-menu-panel-animations-disabled",t._animationsDisabled)("mat-menu-panel-exit-animation",t._panelAnimationState==="void")("mat-menu-panel-animating",t._isAnimating),Ct("id",t.panelId),Y("aria-label",t.ariaLabel||null)("aria-labelledby",t.ariaLabelledby||null)("aria-describedby",t.ariaDescribedby||null)}}var et=new y("MAT_MENU_PANEL"),Je=(()=>{class r{_elementRef=f(L);_document=f(Te);_focusMonitor=f(Ae);_parentMenu=f(et,{optional:!0});_changeDetectorRef=f(K);role="menuitem";disabled=!1;disableRipple=!1;_hovered=new v;_focused=new v;_highlighted=!1;_triggersSubmenu=!1;constructor(){f(Bt).load(Xt),this._parentMenu?.addItem?.(this)}focus(t,e){this._focusMonitor&&t?this._focusMonitor.focusVia(this._getHostElement(),t,e):this._getHostElement().focus(e),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(t){this.disabled&&(t.preventDefault(),t.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){let t=this._elementRef.nativeElement.cloneNode(!0),e=t.querySelectorAll("mat-icon, .material-icons");for(let n=0;n<e.length;n++)e[n].remove();return t.textContent?.trim()||""}_setHighlighted(t){this._highlighted=t,this._changeDetectorRef.markForCheck()}_setTriggersSubmenu(t){this._triggersSubmenu=t,this._changeDetectorRef.markForCheck()}_hasFocus(){return this._document&&this._document.activeElement===this._getHostElement()}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=$({type:r,selectors:[["","mat-menu-item",""]],hostAttrs:[1,"mat-mdc-menu-item","mat-focus-indicator"],hostVars:8,hostBindings:function(e,n){e&1&&De("click",function(o){return n._checkDisabled(o)})("mouseenter",function(){return n._handleMouseEnter()}),e&2&&(Y("role",n.role)("tabindex",n._getTabIndex())("aria-disabled",n.disabled)("disabled",n.disabled||null),W("mat-mdc-menu-item-highlighted",n._highlighted)("mat-mdc-menu-item-submenu-trigger",n._triggersSubmenu))},inputs:{role:"role",disabled:[2,"disabled","disabled",J],disableRipple:[2,"disableRipple","disableRipple",J]},exportAs:["matMenuItem"],attrs:Ri,ngContentSelectors:Ci,decls:5,vars:3,consts:[[1,"mat-mdc-menu-item-text"],["matRipple","",1,"mat-mdc-menu-ripple",3,"matRippleDisabled","matRippleTrigger"],["viewBox","0 0 5 10","focusable","false","aria-hidden","true",1,"mat-mdc-menu-submenu-icon"],["points","0,0 5,5 0,10"]],template:function(e,n){e&1&&(Z(Si),N(0),Ie(1,"span",0),N(2,1),Ee(),Pe(3,"div",1),Mt(4,Ii,2,0,":svg:svg",2)),e&2&&(U(3),Rt("matRippleDisabled",n.disableRipple||n.disabled)("matRippleTrigger",n._getHostElement()),U(),Tt(n._triggersSubmenu?4:-1))},dependencies:[Ut],encapsulation:2,changeDetection:0})}return r})();var xn=new y("MatMenuContent"),Gr=(()=>{class r{_template=f(Re);_appRef=f(vt);_injector=f(A);_viewContainerRef=f(X);_document=f(Te);_changeDetectorRef=f(K);_portal;_outlet;_attached=new v;constructor(){}attach(t={}){this._portal||(this._portal=new ze(this._template,this._viewContainerRef)),this.detach(),this._outlet||(this._outlet=new Vt(this._document.createElement("div"),this._appRef,this._injector));let e=this._template.elementRef.nativeElement;e.parentNode.insertBefore(this._outlet.outletElement,e),this._changeDetectorRef.markForCheck(),this._portal.attach(this._outlet,t),this._attached.next()}detach(){this._portal?.isAttached&&this._portal.detach()}ngOnDestroy(){this.detach(),this._outlet?.dispose()}static \u0275fac=function(e){return new(e||r)};static \u0275dir=ce({type:r,selectors:[["ng-template","matMenuContent",""]],features:[Oe([{provide:xn,useExisting:r}])]})}return r})(),Di=new y("mat-menu-default-options",{providedIn:"root",factory:Oi});function Oi(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}var Ke="_mat-menu-enter",ke="_mat-menu-exit",xe=(()=>{class r{_elementRef=f(L);_changeDetectorRef=f(K);_injector=f(A);_keyManager;_xPosition;_yPosition;_firstItemFocusRef;_exitFallbackTimeout;_animationsDisabled=$e();_allItems;_directDescendantItems=new ft;_classList={};_panelAnimationState="void";_animationDone=new v;_isAnimating=!1;parentMenu;direction;overlayPanelClass;backdropClass;ariaLabel;ariaLabelledby;ariaDescribedby;get xPosition(){return this._xPosition}set xPosition(t){this._xPosition=t,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(t){this._yPosition=t,this.setPositionClasses()}templateRef;items;lazyContent;overlapTrigger;hasBackdrop;set panelClass(t){let e=this._previousPanelClass,n=m({},this._classList);e&&e.length&&e.split(" ").forEach(s=>{n[s]=!1}),this._previousPanelClass=t,t&&t.length&&(t.split(" ").forEach(s=>{n[s]=!0}),this._elementRef.nativeElement.className=""),this._classList=n}_previousPanelClass;get classList(){return this.panelClass}set classList(t){this.panelClass=t}closed=new C;close=this.closed;panelId=f(Ft).getId("mat-menu-panel-");constructor(){let t=f(Di);this.overlayPanelClass=t.overlayPanelClass||"",this._xPosition=t.xPosition,this._yPosition=t.yPosition,this.backdropClass=t.backdropClass,this.overlapTrigger=t.overlapTrigger,this.hasBackdrop=t.hasBackdrop}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new Ht(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(oe(this._directDescendantItems),j(t=>O(...t.map(e=>e._focused)))).subscribe(t=>this._keyManager.updateActiveItem(t)),this._directDescendantItems.changes.subscribe(t=>{let e=this._keyManager;if(this._panelAnimationState==="enter"&&e.activeItem?._hasFocus()){let n=t.toArray(),s=Math.max(0,Math.min(n.length-1,e.activeItemIndex||0));n[s]&&!n[s].disabled?e.setActiveItem(s):e.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusRef?.destroy(),clearTimeout(this._exitFallbackTimeout)}_hovered(){return this._directDescendantItems.changes.pipe(oe(this._directDescendantItems),j(e=>O(...e.map(n=>n._hovered))))}addItem(t){}removeItem(t){}_handleKeydown(t){let e=t.keyCode,n=this._keyManager;switch(e){case 27:jt(t)||(t.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&this.direction==="ltr"&&this.closed.emit("keydown");break;case 39:this.parentMenu&&this.direction==="rtl"&&this.closed.emit("keydown");break;default:(e===38||e===40)&&n.setFocusOrigin("keyboard"),n.onKeydown(t);return}}focusFirstItem(t="program"){this._firstItemFocusRef?.destroy(),this._firstItemFocusRef=wt(()=>{let e=this._resolvePanel();if(!e||!e.contains(document.activeElement)){let n=this._keyManager;n.setFocusOrigin(t).setFirstItemActive(),!n.activeItem&&e&&e.focus()}},{injector:this._injector})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(t){}setPositionClasses(t=this.xPosition,e=this.yPosition){this._classList=S(m({},this._classList),{"mat-menu-before":t==="before","mat-menu-after":t==="after","mat-menu-above":e==="above","mat-menu-below":e==="below"}),this._changeDetectorRef.markForCheck()}_onAnimationDone(t){let e=t===ke;(e||t===Ke)&&(e&&(clearTimeout(this._exitFallbackTimeout),this._exitFallbackTimeout=void 0),this._animationDone.next(e?"void":"enter"),this._isAnimating=!1)}_onAnimationStart(t){(t===Ke||t===ke)&&(this._isAnimating=!0)}_setIsOpen(t){if(this._panelAnimationState=t?"enter":"void",t){if(this._keyManager.activeItemIndex===0){let e=this._resolvePanel();e&&(e.scrollTop=0)}}else this._animationsDisabled||(this._exitFallbackTimeout=setTimeout(()=>this._onAnimationDone(ke),200));this._animationsDisabled&&setTimeout(()=>{this._onAnimationDone(t?Ke:ke)}),this._changeDetectorRef.markForCheck()}_updateDirectDescendants(){this._allItems.changes.pipe(oe(this._allItems)).subscribe(t=>{this._directDescendantItems.reset(t.filter(e=>e._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}_resolvePanel(){let t=null;return this._directDescendantItems.length&&(t=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),t}static \u0275fac=function(e){return new(e||r)};static \u0275cmp=$({type:r,selectors:[["mat-menu"]],contentQueries:function(e,n,s){if(e&1&&(pe(s,xn,5),pe(s,Je,5),pe(s,Je,4)),e&2){let o;G(o=Q())&&(n.lazyContent=o.first),G(o=Q())&&(n._allItems=o),G(o=Q())&&(n.items=o)}},viewQuery:function(e,n){if(e&1&&It(Re,5),e&2){let s;G(s=Q())&&(n.templateRef=s.first)}},hostVars:3,hostBindings:function(e,n){e&2&&Y("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},inputs:{backdropClass:"backdropClass",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:[2,"overlapTrigger","overlapTrigger",J],hasBackdrop:[2,"hasBackdrop","hasBackdrop",t=>t==null?null:J(t)],panelClass:[0,"class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"},exportAs:["matMenu"],features:[Oe([{provide:et,useExisting:r}])],ngContentSelectors:Ei,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel",3,"click","animationstart","animationend","animationcancel","id"],[1,"mat-mdc-menu-content"]],template:function(e,n){e&1&&(Z(),yt(0,Pi,3,12,"ng-template"))},styles:[`mat-menu{display:none}.mat-mdc-menu-content{margin:0;padding:8px 0;outline:0}.mat-mdc-menu-content,.mat-mdc-menu-content .mat-mdc-menu-item .mat-mdc-menu-item-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;flex:1;white-space:normal;font-family:var(--mat-menu-item-label-text-font, var(--mat-sys-label-large-font));line-height:var(--mat-menu-item-label-text-line-height, var(--mat-sys-label-large-line-height));font-size:var(--mat-menu-item-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-menu-item-label-text-tracking, var(--mat-sys-label-large-tracking));font-weight:var(--mat-menu-item-label-text-weight, var(--mat-sys-label-large-weight))}@keyframes _mat-menu-enter{from{opacity:0;transform:scale(0.8)}to{opacity:1;transform:none}}@keyframes _mat-menu-exit{from{opacity:1}to{opacity:0}}.mat-mdc-menu-panel{min-width:112px;max-width:280px;overflow:auto;box-sizing:border-box;outline:0;animation:_mat-menu-enter 120ms cubic-bezier(0, 0, 0.2, 1);border-radius:var(--mat-menu-container-shape, var(--mat-sys-corner-extra-small));background-color:var(--mat-menu-container-color, var(--mat-sys-surface-container));box-shadow:var(--mat-menu-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));will-change:transform,opacity}.mat-mdc-menu-panel.mat-menu-panel-exit-animation{animation:_mat-menu-exit 100ms 25ms linear forwards}.mat-mdc-menu-panel.mat-menu-panel-animations-disabled{animation:none}.mat-mdc-menu-panel.mat-menu-panel-animating{pointer-events:none}.mat-mdc-menu-panel.mat-menu-panel-animating:has(.mat-mdc-menu-content:empty){display:none}@media(forced-colors: active){.mat-mdc-menu-panel{outline:solid 1px}}.mat-mdc-menu-panel .mat-divider{color:var(--mat-menu-divider-color, var(--mat-sys-surface-variant));margin-bottom:var(--mat-menu-divider-bottom-spacing, 8px);margin-top:var(--mat-menu-divider-top-spacing, 8px)}.mat-mdc-menu-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;cursor:pointer;width:100%;text-align:left;box-sizing:border-box;color:inherit;font-size:inherit;background:none;text-decoration:none;margin:0;min-height:48px;padding-left:var(--mat-menu-item-leading-spacing, 12px);padding-right:var(--mat-menu-item-trailing-spacing, 12px);-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-menu-item::-moz-focus-inner{border:0}[dir=rtl] .mat-mdc-menu-item{padding-left:var(--mat-menu-item-trailing-spacing, 12px);padding-right:var(--mat-menu-item-leading-spacing, 12px)}.mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-leading-spacing, 12px);padding-right:var(--mat-menu-item-with-icon-trailing-spacing, 12px)}[dir=rtl] .mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-trailing-spacing, 12px);padding-right:var(--mat-menu-item-with-icon-leading-spacing, 12px)}.mat-mdc-menu-item,.mat-mdc-menu-item:visited,.mat-mdc-menu-item:link{color:var(--mat-menu-item-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-menu-item .mat-icon-no-color,.mat-mdc-menu-item .mat-mdc-menu-submenu-icon{color:var(--mat-menu-item-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-menu-item[disabled]{cursor:default;opacity:.38}.mat-mdc-menu-item[disabled]::after{display:block;position:absolute;content:"";top:0;left:0;bottom:0;right:0}.mat-mdc-menu-item:focus{outline:0}.mat-mdc-menu-item .mat-icon{flex-shrink:0;margin-right:var(--mat-menu-item-spacing, 12px);height:var(--mat-menu-item-icon-size, 24px);width:var(--mat-menu-item-icon-size, 24px)}[dir=rtl] .mat-mdc-menu-item{text-align:right}[dir=rtl] .mat-mdc-menu-item .mat-icon{margin-right:0;margin-left:var(--mat-menu-item-spacing, 12px)}.mat-mdc-menu-item:not([disabled]):hover{background-color:var(--mat-menu-item-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}.mat-mdc-menu-item:not([disabled]).cdk-program-focused,.mat-mdc-menu-item:not([disabled]).cdk-keyboard-focused,.mat-mdc-menu-item:not([disabled]).mat-mdc-menu-item-highlighted{background-color:var(--mat-menu-item-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent))}@media(forced-colors: active){.mat-mdc-menu-item{margin-top:1px}}.mat-mdc-menu-submenu-icon{width:var(--mat-menu-item-icon-size, 24px);height:10px;fill:currentColor;padding-left:var(--mat-menu-item-spacing, 12px)}[dir=rtl] .mat-mdc-menu-submenu-icon{padding-right:var(--mat-menu-item-spacing, 12px);padding-left:0}[dir=rtl] .mat-mdc-menu-submenu-icon polygon{transform:scaleX(-1);transform-origin:center}@media(forced-colors: active){.mat-mdc-menu-submenu-icon{fill:CanvasText}}.mat-mdc-menu-item .mat-mdc-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}
|
|
60
|
-
`],encapsulation:2,changeDetection:0})}return r})(),yn=new y("mat-menu-scroll-strategy",{providedIn:"root",factory:()=>{let r=f(A);return()=>Ne(r)}});function Ai(r){let i=f(A);return()=>Ne(i)}var Li={provide:yn,deps:[],useFactory:Ai};var re=new WeakMap,$i=(()=>{class r{_canHaveBackdrop;_element=f(L);_viewContainerRef=f(X);_menuItemInstance=f(Je,{optional:!0,self:!0});_dir=f(qt,{optional:!0});_focusMonitor=f(Ae);_ngZone=f(Ce);_injector=f(A);_scrollStrategy=f(yn);_changeDetectorRef=f(K);_animationsDisabled=$e();_portal;_overlayRef=null;_menuOpen=!1;_closingActionsSubscription=se.EMPTY;_menuCloseSubscription=se.EMPTY;_pendingRemoval;_parentMaterialMenu;_parentInnerPadding;_openedBy=void 0;get _menu(){return this._menuInternal}set _menu(t){t!==this._menuInternal&&(this._menuInternal=t,this._menuCloseSubscription.unsubscribe(),t&&(this._parentMaterialMenu,this._menuCloseSubscription=t.close.subscribe(e=>{this._destroyMenu(e),(e==="click"||e==="tab")&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(e)})),this._menuItemInstance?._setTriggersSubmenu(this._triggersSubmenu()))}_menuInternal;constructor(t){this._canHaveBackdrop=t;let e=f(et,{optional:!0});this._parentMaterialMenu=e instanceof xe?e:void 0}ngOnDestroy(){this._menu&&this._ownsMenu(this._menu)&&re.delete(this._menu),this._pendingRemoval?.unsubscribe(),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null)}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}_triggersSubmenu(){return!!(this._menuItemInstance&&this._parentMaterialMenu&&this._menu)}_closeMenu(){this._menu?.close.emit()}_openMenu(t){let e=this._menu;if(this._menuOpen||!e)return;this._pendingRemoval?.unsubscribe();let n=re.get(e);re.set(e,this),n&&n!==this&&n._closeMenu();let s=this._createOverlay(e),o=s.getConfig(),a=o.positionStrategy;this._setPosition(e,a),this._canHaveBackdrop?o.hasBackdrop=e.hasBackdrop==null?!this._triggersSubmenu():e.hasBackdrop:o.hasBackdrop=!1,s.hasAttached()||(s.attach(this._getPortal(e)),e.lazyContent?.attach(this.menuData)),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this._closeMenu()),e.parentMenu=this._triggersSubmenu()?this._parentMaterialMenu:void 0,e.direction=this.dir,t&&e.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0),e instanceof xe&&(e._setIsOpen(!0),e._directDescendantItems.changes.pipe(ae(e.close)).subscribe(()=>{a.withLockedPosition(!1).reapplyLastPosition(),a.withLockedPosition(!0)}))}focus(t,e){this._focusMonitor&&t?this._focusMonitor.focusVia(this._element,t,e):this._element.nativeElement.focus(e)}_destroyMenu(t){let e=this._overlayRef,n=this._menu;!e||!this.menuOpen||(this._closingActionsSubscription.unsubscribe(),this._pendingRemoval?.unsubscribe(),n instanceof xe&&this._ownsMenu(n)?(this._pendingRemoval=n._animationDone.pipe(lt(1)).subscribe(()=>{e.detach(),n.lazyContent?.detach()}),n._setIsOpen(!1)):(e.detach(),n?.lazyContent?.detach()),n&&this._ownsMenu(n)&&re.delete(n),this.restoreFocus&&(t==="keydown"||!this._openedBy||!this._triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,this._setIsMenuOpen(!1))}_setIsMenuOpen(t){t!==this._menuOpen&&(this._menuOpen=t,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this._triggersSubmenu()&&this._menuItemInstance._setHighlighted(t),this._changeDetectorRef.markForCheck())}_createOverlay(t){if(!this._overlayRef){let e=this._getOverlayConfig(t);this._subscribeToPositions(t,e.positionStrategy),this._overlayRef=Wt(this._injector,e),this._overlayRef.keydownEvents().subscribe(n=>{this._menu instanceof xe&&this._menu._handleKeydown(n)})}return this._overlayRef}_getOverlayConfig(t){return new Gt({positionStrategy:Qt(this._injector,this._getOverlayOrigin()).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:t.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:t.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir||"ltr",disableAnimations:this._animationsDisabled})}_subscribeToPositions(t,e){t.setPositionClasses&&e.positionChanges.subscribe(n=>{this._ngZone.run(()=>{let s=n.connectionPair.overlayX==="start"?"after":"before",o=n.connectionPair.overlayY==="top"?"below":"above";t.setPositionClasses(s,o)})})}_setPosition(t,e){let[n,s]=t.xPosition==="before"?["end","start"]:["start","end"],[o,a]=t.yPosition==="above"?["bottom","top"]:["top","bottom"],[c,l]=[o,a],[u,p]=[n,s],h=0;if(this._triggersSubmenu()){if(p=n=t.xPosition==="before"?"start":"end",s=u=n==="end"?"start":"end",this._parentMaterialMenu){if(this._parentInnerPadding==null){let _=this._parentMaterialMenu.items.first;this._parentInnerPadding=_?_._getHostElement().offsetTop:0}h=o==="bottom"?this._parentInnerPadding:-this._parentInnerPadding}}else t.overlapTrigger||(c=o==="top"?"bottom":"top",l=a==="top"?"bottom":"top");e.withPositions([{originX:n,originY:c,overlayX:u,overlayY:o,offsetY:h},{originX:s,originY:c,overlayX:p,overlayY:o,offsetY:h},{originX:n,originY:l,overlayX:u,overlayY:a,offsetY:-h},{originX:s,originY:l,overlayX:p,overlayY:a,offsetY:-h}])}_menuClosingActions(){let t=this._getOutsideClickStream(this._overlayRef),e=this._overlayRef.detachments(),n=this._parentMaterialMenu?this._parentMaterialMenu.closed:F(),s=this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(at(o=>this._menuOpen&&o!==this._menuItemInstance)):F();return O(t,n,s,e)}_getPortal(t){return(!this._portal||this._portal.templateRef!==t.templateRef)&&(this._portal=new ze(t.templateRef,this._viewContainerRef)),this._portal}_ownsMenu(t){return re.get(t)===this}static \u0275fac=function(e){kt()};static \u0275dir=ce({type:r})}return r})(),Qr=(()=>{class r extends $i{_cleanupTouchstart;_hoverSubscription=se.EMPTY;get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(t){this.menu=t}get menu(){return this._menu}set menu(t){this._menu=t}menuData;restoreFocus=!0;menuOpened=new C;onMenuOpen=this.menuOpened;menuClosed=new C;onMenuClose=this.menuClosed;constructor(){super(!0);let t=f(_t);this._cleanupTouchstart=t.listen(this._element.nativeElement,"touchstart",e=>{Nt(e)||(this._openedBy="touch")},{passive:!0})}triggersSubmenu(){return super._triggersSubmenu()}toggleMenu(){return this.menuOpen?this.closeMenu():this.openMenu()}openMenu(){this._openMenu(!0)}closeMenu(){this._closeMenu()}updatePosition(){this._overlayRef?.updatePosition()}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){super.ngOnDestroy(),this._cleanupTouchstart(),this._hoverSubscription.unsubscribe()}_getOverlayOrigin(){return this._element}_getOutsideClickStream(t){return t.backdropClick()}_handleMousedown(t){zt(t)||(this._openedBy=t.button===0?"mouse":void 0,this.triggersSubmenu()&&t.preventDefault())}_handleKeydown(t){let e=t.keyCode;(e===13||e===32)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(e===39&&this.dir==="ltr"||e===37&&this.dir==="rtl")&&(this._openedBy="keyboard",this.openMenu())}_handleClick(t){this.triggersSubmenu()?(t.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){this.triggersSubmenu()&&this._parentMaterialMenu&&(this._hoverSubscription=this._parentMaterialMenu._hovered().subscribe(t=>{t===this._menuItemInstance&&!t.disabled&&(this._openedBy="mouse",this._openMenu(!1))}))}static \u0275fac=function(e){return new(e||r)};static \u0275dir=ce({type:r,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],hostVars:3,hostBindings:function(e,n){e&1&&De("click",function(o){return n._handleClick(o)})("mousedown",function(o){return n._handleMousedown(o)})("keydown",function(o){return n._handleKeydown(o)}),e&2&&Y("aria-haspopup",n.menu?"menu":null)("aria-expanded",n.menuOpen)("aria-controls",n.menuOpen?n.menu==null?null:n.menu.panelId:null)},inputs:{_deprecatedMatMenuTriggerFor:[0,"mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:[0,"matMenuTriggerFor","menu"],menuData:[0,"matMenuTriggerData","menuData"],restoreFocus:[0,"matMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"],features:[xt]})}return r})();var Wr=(()=>{class r{static \u0275fac=function(e){return new(e||r)};static \u0275mod=Se({type:r});static \u0275inj=Me({providers:[Li],imports:[Yt,Le,Kt,Zt,Le]})}return r})(),wn={transformMenu:{type:7,name:"transformMenu",definitions:[{type:0,name:"void",styles:{type:6,styles:{opacity:0,transform:"scale(0.8)"},offset:null}},{type:1,expr:"void => enter",animation:{type:4,styles:{type:6,styles:{opacity:1,transform:"scale(1)"},offset:null},timings:"120ms cubic-bezier(0, 0, 0.2, 1)"},options:null},{type:1,expr:"* => void",animation:{type:4,styles:{type:6,styles:{opacity:0},offset:null},timings:"100ms 25ms linear"},options:null}],options:{}},fadeInItems:{type:7,name:"fadeInItems",definitions:[{type:0,name:"showing",styles:{type:6,styles:{opacity:1},offset:null}},{type:1,expr:"void => *",animation:[{type:6,styles:{opacity:0},offset:null},{type:4,styles:null,timings:"400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)"}],options:null}],options:{}}},Kr=wn.fadeInItems,Jr=wn.transformMenu;export{gr as a,br as b,Je as c,Gr as d,xe as e,Qr as f,Wr as g};
|