@qaecy/cue-ui 0.0.62 → 0.0.63

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/3036.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[2014,3036],{2014(V,M,n){n.d(M,{ButtonPadder:()=>R});var f=n(7705),e=n(2271),a=n(5547);const t=["*"];let R=(()=>{class u{justify=(0,f.hFB)("start");size=(0,f.hFB)("l");widthStyle=(0,e.EW)(()=>`var(--cue-button-label-padding-${this.size()}-x)`);static \u0275fac=function(g){return new(g||u)};static \u0275cmp=a.VBU({type:u,selectors:[["cue-button-padder"]],inputs:{justify:[1,"justify"],size:[1,"size"]},ngContentSelectors:t,decls:2,vars:4,template:function(g,D){1&g&&(a.NAR(),a.rj2(0,"div"),a.SdG(1),a.eux()),2&g&&a.xc7("justify-content",D.justify())("min-width",D.widthStyle())},styles:["div[_ngcontent-%COMP%]{display:flex;align-items:center;min-height:1px}"]})}return u})()},3036(V,M,n){n.r(M),n.d(M,{DocumentViewer:()=>b});var f=n(467),e=n(9769),a=n(5802),t=n(7705),R=n(2271),u=n(5547),h=n(3418),c=n(6114);const g={bim:()=>Promise.all([n.e(7598),n.e(6419)]).then(n.bind(n,6419)).then(r=>r.BIMFragmentsViewer),cad:()=>Promise.all([n.e(7598),n.e(8560),n.e(1051)]).then(n.bind(n,1051)).then(r=>r.DXFViewer),image:()=>n.e(8560).then(n.bind(n,8560)).then(r=>r.ImageViewer),markdown:()=>Promise.all([n.e(222),n.e(6586)]).then(n.bind(n,6586)).then(r=>r.MarkdownViewer),pdf:()=>Promise.all([n.e(8560),n.e(1842)]).then(n.bind(n,1842)).then(r=>r.PDFViewer),text:()=>n.e(3523).then(n.bind(n,3523)).then(r=>r.TextViewer),spreadsheet:()=>Promise.all([n.e(2076),n.e(4791)]).then(n.bind(n,4791)).then(r=>r.Spreadsheet),code:()=>Promise.all([n.e(4284),n.e(2538),n.e(7193)]).then(n.bind(n,329)).then(r=>r.CodeViewer),email:()=>n.e(5740).then(n.bind(n,5740)).then(r=>r.EmailViewer)},D=new Map([[c.N.DXF,"cad"],[c.N.FRAG,"bim"],[c.N.PDF,"pdf"],[c.N.PNG,"image"],[c.N.JPG,"image"],[c.N.JPEG,"image"],[c.N.SVG,"image"],[c.N.GIF,"image"],[c.N.WEBP,"image"],[c.N.BMP,"image"],[c.N.AVIF,"image"],[c.N.APNG,"image"],[c.N.CSV,"spreadsheet"],[c.N.XLSX,"spreadsheet"],[c.N.XLS,"spreadsheet"],[c.N.JSON,"code"],[c.N.JSONLD,"code"],[c.N.XML,"code"],[c.N.CSS,"code"],[c.N.JS,"code"],[c.N.HTML,"code"],[c.N.HTM,"code"],[c.N.SH,"code"],[c.N.TXT,"text"],[c.N.RST,"text"],[c.N.MD,"markdown"]]);var A=n(8807),E=n(2065);const C=["*"];let w=(()=>{class r{width=(0,t.hFB)("auto");height=(0,t.hFB)("auto");style=(0,t.hFB)("");getStyles=(0,R.EW)(()=>this.style());static \u0275fac=function(s){return new(s||r)};static \u0275cmp=u.VBU({type:r,selectors:[["cue-container"]],hostVars:6,hostBindings:function(s,d){2&s&&(u.Aen(d.getStyles()),u.xc7("max-width",d.width())("max-height",d.height()))},inputs:{width:[1,"width"],height:[1,"height"],style:[1,"style"]},ngContentSelectors:C,decls:1,vars:0,template:function(s,d){1&s&&(u.NAR(),u.SdG(0))},styles:["[_nghost-%COMP%]{display:flex;align-items:stretch;container-name:cue-container;container-type:inline-size}[_nghost-%COMP%] > *[_ngcontent-%COMP%]{flex:1;max-width:100%}"]})}return r})();var H=n(2245),X=n(5381),J=n(5971),U=n(3319),B=n(5448),y=n(2014),W=n(7851),v=n(3191);let P=(()=>{class r{searchService=(0,a.WQX)(v.g);entityBeingPlaced=(0,a.vPA)(void 0);confirmedPlacement=(0,a.vPA)(void 0);rdfBaseURL=(0,a.vPA)("");contentUUID=(0,a.vPA)("");activePdfDoc=(0,a.vPA)(null);currentPage=(0,a.vPA)(1);requestedPage=(0,a.vPA)(null);navigateToPage(p){this.currentPage.set(p),this.requestedPage.set(p)}entityTextSearchResults=(0,a.vPA)([]);entityTextSearchResultsOnCurrentPage=(0,R.EW)(()=>this.entityTextSearchResults().filter(p=>p.page===this.currentPage()));currentPlacementBbox=(0,a.vPA)(null);categoryPreviewBoxes=(0,a.vPA)([]);_lastMatchIndex=(0,a.vPA)(null);matchCycleDisplay=(0,R.EW)(()=>{const p=this._lastMatchIndex(),s=this.entityTextSearchResultsOnCurrentPage().length;return null===p||0===s?"":`${p+1}/${s}`});cycleTextMatch(){const p=this.entityTextSearchResultsOnCurrentPage();if(!p.length)return;const s=this._lastMatchIndex(),d=null===s?0:(s+1)%p.length;this._lastMatchIndex.set(d);const o=p[d].xywhStr.replace("percent:",""),[I,T,i,m]=o.split(",").map(Number),j=Math.max(0,I-.5),G=Math.max(0,T-.5),x=Math.min(100-j,i+1),N=Math.min(100-G,m+1);this.currentPlacementBbox.set({xywhStr:`percent:${j.toFixed(2)},${G.toFixed(2)},${x.toFixed(2)},${N.toFixed(2)}`,color:"rgba(255, 160, 0, 0.9)",allowRemove:!1})}setManualBbox(p){this._lastMatchIndex.set(null),this.currentPlacementBbox.set({...p,allowRemove:!1})}clearPlacement(){this.currentPlacementBbox.set(null),this._lastMatchIndex.set(null)}constructor(){(0,a.QZP)(()=>{const p=this.entityBeingPlaced(),s=this.activePdfDoc();p?.value&&s?this.searchService.searchAll(s,p.value).then(d=>{this.entityTextSearchResults.set(d)}):this.entityTextSearchResults.set([])}),(0,a.QZP)(()=>{this.currentPage(),this._lastMatchIndex.set(null),this.currentPlacementBbox.set(null)}),(0,a.QZP)(()=>{const p=this.entityBeingPlaced();this._lastMatchIndex.set(null),void 0===p&&this.currentPlacementBbox.set(null)})}static \u0275fac=function(s){return new(s||r)};static \u0275prov=a.jDH({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var S=n(9352);const O=["viewerTarget"];function L(r,$){if(1&r){const p=u.RV6();u.j41(0,"cue-flexcontainer",2)(1,"cue-typography"),u.EFF(2),u.nI1(3,"transloco"),u.k0s(),u.j41(4,"cue-button",3),u.bIt("click",function(){a.eBV(p);const d=u.XpG();return a.Njj(d.downloadFile())}),u.j41(5,"cue-button-padder"),u.nrm(6,"cue-button-icon",4),u.k0s(),u.j41(7,"cue-button-label"),u.EFF(8),u.nI1(9,"transloco"),u.k0s()()()}2&r&&(u.R7$(2),u.JRh(u.bMT(3,2,"components.documentViewer.infoNoViewer")),u.R7$(6),u.JRh(u.bMT(9,4,"common.buttons.download")))}let b=(()=>{class r{_eps=(0,a.WQX)(P);_destroyed=!1;url=t.hFB.required();pdfBytes=(0,t.hFB)(void 0);suffix=(0,t.hFB)();settings=(0,t.hFB)(new h.DocumentViewerSettings);viewerTypeOverride=(0,t.hFB)(void 0);interactions=(0,t.CGW)();viewerType=(0,R.EW)(()=>{const p=this.viewerTypeOverride();if(p)return p;const s=this.url(),d=void 0!==this.suffix()?this.suffix()?.trim():`.${s.split(".").pop()?.trim()}`,o=d?D.get(d):void 0;return console.log("[DocumentViewer] viewerType resolved",{url:s?.substring(0,80),suffix:d,viewerType:o}),void 0!==d?o:void 0});currentComponent=(0,a.vPA)(null);noViewer=(0,R.EW)(()=>null===this.currentComponent());isLoading=(0,a.vPA)(!1);viewerTarget;currentRef;_interactionsState=(0,a.vPA)(new h.DocumentViewerInteractions);constructor(){(0,a.QZP)(()=>{const p=this.viewerType(),s=this.url();console.log("[DocumentViewer] url/viewerType effect \u2014",{viewerType:p,url:s?.substring(0,80),destroyed:this._destroyed}),p?("pdf"!==p&&this._eps.activePdfDoc.set(null),this.isLoading.set(!0),this.loadViewerComponent(p,s,this.settings())):(this.viewerTarget.clear(),this.currentRef?.destroy(),this.currentRef=void 0,console.info("No viewer available for this file type"),this.currentComponent.set(null),this.isLoading.set(!1),this._eps.activePdfDoc.set(null))}),(0,a.QZP)(()=>{this.interactions.emit(this._interactionsState())}),(0,a.QZP)(()=>{const p=this.settings().pdf,s=this.currentRef;s&&s.setInput("settings",p)})}ngOnDestroy(){this._destroyed=!0,this.viewerTarget.clear(),this.currentRef?.destroy(),this.currentRef=void 0}loadViewerComponent(p,s,d){var o=this;return(0,f.A)(function*(){console.log("[DocumentViewer] loadViewerComponent",{viewerType:p,url:s?.substring(0,100)});try{const I=g[p],T=yield I();if(o._destroyed)return;if(o.currentComponent.set(T),o.isLoading.set(!1),o.viewerTarget.clear(),o.currentRef?.destroy(),o.currentRef=o.viewerTarget.createComponent(T),"pdf"===p)o.currentRef.setInput("src",o.pdfBytes()??s),void 0!==d?.pdf&&o.currentRef.setInput("settings",d.pdf),o.currentRef.instance.pdfLoaded&&o.currentRef.instance.pdfLoaded.subscribe(i=>{o._eps.currentPage.set(1),o._eps.activePdfDoc.set(i)}),o.currentRef.instance.settingsChange&&o.currentRef.instance.settingsChange.subscribe(i=>{const m=parseInt(i?.page,10);!isNaN(m)&&m>0&&o._eps.currentPage.set(m)}),o.currentRef.instance.artefactDrawn&&o.currentRef.instance.artefactDrawn.subscribe(i=>{"xywh"===i.type&&o._eps.setManualBbox(i.def)}),o.currentRef.instance.artefactEdited&&o.currentRef.instance.artefactEdited.subscribe(i=>{"bbox"===i.type&&o._eps.setManualBbox(i.after)});else if("bim"===p){const i=new A.di("model","Model",s,!0,o.pdfBytes());i.visible=!0,o.currentRef.setInput("data",{models:[i]}),void 0!==d?.bim&&o.currentRef.setInput("settings",d.bim),o.currentRef.instance.selectedElements&&o.currentRef.instance.selectedElements.subscribe(m=>{o._interactionsState.update(l=>(l.bim.selectedElements=m,Object.assign({},l)))}),o.currentRef.instance.clickedElement&&o.currentRef.instance.clickedElement.subscribe(m=>{o._interactionsState.update(l=>(l.bim.clickedElement=m,Object.assign({},l)))})}else if("cad"===p)o.currentRef.setInput("fileURL",s),void 0!==d?.cad&&o.currentRef.setInput("settings",d.cad);else if("image"===p)o.currentRef.setInput("src",s);else if("markdown"===p)o.currentRef.setInput("fileURL",s);else if("text"===p)o.currentRef.setInput("fileURL",s);else if("spreadsheet"===p){const i=o.suffix()?.split(".").pop()||s.split(".").pop()||"csv";o.currentRef.setInput("data",{url:s,format:i})}else if("code"===p){const l={".json":"json",".jsonld":"jsonld",".xml":"xml",".html":"xml",".htm":"xml",".css":"text",".js":"text",".sh":"text"}[o.suffix()??`.${s.split(".").pop()??""}`]??"text";o.currentRef.setInput("fileURL",s),o.currentRef.setInput("codeType",l)}else"email"===p&&o.currentRef.setInput("fileURL",s)}catch(I){console.error("Failed to load viewer component:",I),o.currentComponent.set(null)}})()}downloadFile(){var p=this;return(0,f.A)(function*(){const d=yield(yield fetch(p.url())).blob();(0,E.KE)(d,`document${p.suffix()??""}`)})()}static \u0275fac=function(s){return new(s||r)};static \u0275cmp=u.VBU({type:r,selectors:[["cue-doc-viewer"]],viewQuery:function(s,d){if(1&s&&u.GBs(O,7,u.c1b),2&s){let o;u.mGM(o=u.lsd())&&(d.viewerTarget=o.first)}},inputs:{url:[1,"url"],pdfBytes:[1,"pdfBytes"],suffix:[1,"suffix"],settings:[1,"settings"],viewerTypeOverride:[1,"viewerTypeOverride"]},outputs:{interactions:"interactions"},decls:4,vars:2,consts:[["viewerTarget",""],[2,"height","100%","width","100%",3,"cueLogoLoader"],["direction","column","align","center","justify","center",2,"height","100%","width","100%"],[3,"click"],["icon","download"]],template:function(s,d){1&s&&(u.j41(0,"cue-container",1),u.eu8(1,null,0),u.nVh(3,L,10,6,"cue-flexcontainer",2),u.k0s()),2&s&&(u.Y8G("cueLogoLoader",d.isLoading()),u.R7$(3),u.vxM(!d.isLoading()&&d.noViewer()?3:-1))},dependencies:[e.MD,w,H.Typography,X.FlexContainer,J.Button,U.ButtonIcon,B.ButtonLabel,y.ButtonPadder,W.k,S.Kj],styles:["[_nghost-%COMP%]{display:contents}"],changeDetection:0})}return r})()},3191(V,M,n){n.d(M,{g:()=>a});var f=n(467),e=n(5802);let a=(()=>{class t{searchPage(u,h,c){return(0,f.A)(function*(){if(!c||!c.trim())return[];const g=c.toLowerCase(),D=yield u.getPage(h),A=D.getViewport({scale:1}),C=(yield D.getTextContent()).items,w=[];let H="";const X=[],J=[];for(let y=0;y<C.length;y++){const v=C[y].str??"";for(let P=0;P<v.length;P++)H+=v[P],X.push(y),J.push(P)}const U=H.toLowerCase();let B=0;for(;B<U.length;){const y=U.indexOf(g,B);if(-1===y)break;const W=y+g.length-1;B=y+1;const v=new Set;for(let T=y;T<=W;T++)v.add(X[T]);let P=1/0,S=1/0,O=-1/0,L=-1/0;for(const T of v){const i=C[T],[m,l,j,G,x,N]=i.transform,K=i.width??0,z=i.height??Math.abs(m||G||12),Z=Math.sqrt(m*m+l*l)||1,Q=m/Z,Y=l/Z,k=j/Z,q=G/Z,fe=[[x,N],[x+Q*K,N+Y*K],[x+Q*K+k*z,N+Y*K+q*z],[x+k*z,N+q*z]];for(const[ne,pe]of fe){const[F,_]=A.convertToViewportPoint(ne,pe);P=Math.min(P,F),S=Math.min(S,_),O=Math.max(O,F),L=Math.max(L,_)}}const b=A.width,r=A.height,$=.005*b,p=.005*r,d=(S-p)/r*100,o=(O-P+2*$)/b*100,I=(L-S+2*p)/r*100;o>0&&I>0&&w.push({page:h,xywhStr:`percent:${((P-$)/b*100).toFixed(2)},${d.toFixed(2)},${o.toFixed(2)},${I.toFixed(2)}`})}return w})()}searchAll(u,h){var c=this;return(0,f.A)(function*(){if(!h||!h.trim())return[];const g=u.numPages,D=[];for(let A=1;A<=g;A++){const E=yield c.searchPage(u,A,h);D.push(...E)}return D})()}static \u0275fac=function(h){return new(h||t)};static \u0275prov=e.jDH({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})()},6114(V,M,n){n.d(M,{N:()=>e,V:()=>a});var f=n(4820),e=function(t){return t.AAC=".aac",t.ABW=".abw",t.ARC=".arc",t.AVIF=".avif",t.AVI=".avi",t.APNG=".apng",t.BAK=".bak",t.BIN=".bin",t.BMC=".bmc",t.BMP=".bmp",t.BZ=".bz",t.BZ2=".bz2",t.C3D=".c3d",t.CPG=".cpg",t.CSS=".css",t.CSV=".csv",t.DAT=".dat",t.DOC=".doc",t.DOCX=".docx",t.E57=".e57",t.EPUB=".epub",t.EXE=".exe",t.FFS=".ffs",t.FME=".fme",t.FMW=".fmw",t.FRAG=".fragments",t.GH=".gh",t.GZ=".gz",t.GIF=".gif",t.HTML=".html",t.HTM=".htm",t.ICO=".ico",t.ICS=".ics",t.JAR=".jar",t.JPG=".jpg",t.JPEG=".jpeg",t.JSON=".json",t.JSONLD=".jsonld",t.JS=".js",t.MOV=".mov",t.MP3=".mp3",t.MP4=".mp4",t.MPEG=".mpeg",t.MSI=".msi",t.MTL=".mtl",t.ODP=".odp",t.ODS=".ods",t.ODT=".odt",t.OGA=".oga",t.OGG=".ogg",t.OGV=".ogv",t.OGX=".ogx",t.OTF=".otf",t.PNG=".png",t.PDF=".pdf",t.PHP=".php",t.PKG=".pkg",t.PPT=".ppt",t.PPTX=".pptx",t.PS=".ps",t.RAR=".rar",t.RCP=".rcp",t.RTF=".rtf",t.SH=".sh",t.SLK=".slk",t.SVG=".svg",t.TAR=".tar",t.TIFF=".tiff",t.TIF=".tif",t.TTF=".ttf",t.TXT=".txt",t.VGL=".vgl",t.VWX=".vwx",t.WAV=".wav",t.WEBM=".webm",t.WEBP=".webp",t.WMV=".wmv",t.WOFF=".woff",t.WOFF2=".woff2",t.XLS=".xls",t.XLSX=".xlsx",t.XHTML=".xhtml",t.XML=".xml",t.XYZ=".xyz",t.ZIP=".zip",t.SEVEN_Z=".7z",t.DBF=".dbf",t.EML=".eml",t.EMLX=".emlx",t.MBX=".mbx",t.MD=".md",t.MSG=".msg",t.RST=".rst",t.HEIC=".heic",t.MPP=".mpp",t.TSV=".tsv",t.B3DM=".b3dm",t.I3DM=".i3dm",t.PNTS=".pnts",t.CMPT=".cmpt",t.GLTF=".gltf",t.GLB=".glb",t.IFC=".ifc",t.IFCZIP=".ifczip",t.IFXML=".ifcxml",t.THREEDM=".3dm",t.THREEDS=".3ds",t.GHP=".ghp",t.RVT=".rvt",t.RFA=".rfa",t.RFT=".rft",t.RTE=".rte",t.PLA=".pla",t.PLN=".pln",t.GSM=".gsm",t.SMC=".smc",t.BCF=".bcf",t.DWG=".dwg",t.DWL=".dwl",t.DXF=".dxf",t.DGN=".dgn",t.NWD=".nwd",t.OBJ=".obj",t.C4D=".c4d",t.TEKLASTRUCTURES=".teklastructures",t.PTS=".pts",t.LAS=".las",t.LAZ=".laz",t.USDZ=".usdz",t.USDA=".usda",t.USDC=".usdc",t.USD=".usd",t.PSD=".psd",t.PSP=".psp",t.AI=".ai",t.SBN=".sbn",t.SBX=".sbx",t.SHX=".shx",t.SKP=".skp",t.STL=".stl",t.FBX=".fbx",t.KML=".kml",t.SHP=".shp",t}(e||{});const a={[e.AAC]:{type:f.p.AUDIO,open:!0,suffix:".aac"},[e.ABW]:{type:f.p.TEXT,open:!0,suffix:".abw"},[e.ARC]:{type:f.p.ARCHIVE,open:!1,suffix:".arc"},[e.AVIF]:{type:f.p.IMAGE,open:!0,suffix:".avif"},[e.AVI]:{type:f.p.VIDEO,open:!0,suffix:".avi"},[e.APNG]:{type:f.p.IMAGE,open:!0,suffix:".apng"},[e.BAK]:{type:f.p.BACKUP,open:!1,suffix:".bak"},[e.BIN]:{type:f.p.BINARY,open:!1,suffix:".bin"},[e.BMC]:{type:f.p.BIM,open:!1,suffix:".bmc"},[e.BMP]:{type:f.p.IMAGE,open:!0,suffix:".bmp"},[e.BZ]:{type:f.p.ARCHIVE,open:!0,suffix:".bz"},[e.BZ2]:{type:f.p.ARCHIVE,open:!0,suffix:".bz2"},[e.C3D]:{type:f.p.THREE_D,open:!0,suffix:".c3d"},[e.CPG]:{type:f.p.GEOSPATIAL,open:!0,suffix:".cpg"},[e.CSS]:{type:f.p.MARKUP,open:!0,suffix:".css"},[e.CSV]:{type:f.p.DATA,open:!0,suffix:".csv"},[e.DAT]:{type:f.p.DATA,open:!1,suffix:".dat"},[e.DBF]:{type:f.p.DATA,open:!0,suffix:".dbf"},[e.DOC]:{type:f.p.TEXT,open:!1,suffix:".doc"},[e.DOCX]:{type:f.p.TEXT,open:!0,suffix:".docx"},[e.E57]:{type:f.p.THREE_D,open:!0,suffix:".e57"},[e.EPUB]:{type:f.p.TEXT,open:!0,suffix:".epub"},[e.EXE]:{type:f.p.INSTALLER,open:!1,suffix:".exe"},[e.FFS]:{type:f.p.AUTOMATION,open:!1,suffix:".ffs"},[e.FME]:{type:f.p.AUTOMATION,open:!1,suffix:".fme"},[e.FMW]:{type:f.p.AUTOMATION,open:!1,suffix:".fmw"},[e.FRAG]:{type:f.p.BIM,open:!0,suffix:".fragments"},[e.GH]:{type:f.p.THREE_D,open:!1,suffix:".gh"},[e.GZ]:{type:f.p.ARCHIVE,open:!0,suffix:".gz"},[e.GIF]:{type:f.p.IMAGE,open:!0,suffix:".gif"},[e.HTML]:{type:f.p.MARKUP,open:!0,suffix:".html"},[e.HTM]:{type:f.p.MARKUP,open:!0,suffix:".htm"},[e.ICO]:{type:f.p.IMAGE,open:!1,suffix:".ico"},[e.ICS]:{type:f.p.DATA,open:!0,suffix:".ics"},[e.JAR]:{type:f.p.ARCHIVE,open:!0,suffix:".jar"},[e.JPG]:{type:f.p.IMAGE,open:!0,suffix:".jpg"},[e.JPEG]:{type:f.p.IMAGE,open:!0,suffix:".jpeg"},[e.JSON]:{type:f.p.DATA,open:!0,suffix:".json"},[e.JSONLD]:{type:f.p.DATA,open:!0,suffix:".jsonld"},[e.JS]:{type:f.p.SCRIPT,open:!0,suffix:".js"},[e.MSI]:{type:f.p.INSTALLER,open:!1,suffix:".msi"},[e.MOV]:{type:f.p.VIDEO,open:!0,suffix:".mov"},[e.MP3]:{type:f.p.AUDIO,open:!0,suffix:".mp3"},[e.MP4]:{type:f.p.VIDEO,open:!0,suffix:".mp4"},[e.MPEG]:{type:f.p.VIDEO,open:!0,suffix:".mpeg"},[e.MTL]:{type:f.p.THREE_D,open:!0,suffix:".mtl"},[e.ODP]:{type:f.p.PRESENTATION,open:!0,suffix:".odp"},[e.ODS]:{type:f.p.SPREADSHEET,open:!0,suffix:".ods"},[e.ODT]:{type:f.p.TEXT,open:!0,suffix:".odt"},[e.OGA]:{type:f.p.AUDIO,open:!0,suffix:".oga"},[e.OGG]:{type:f.p.AUDIO,open:!0,suffix:".ogg"},[e.OGV]:{type:f.p.VIDEO,open:!0,suffix:".ogv"},[e.OGX]:{type:f.p.VIDEO,open:!0,suffix:".ogx"},[e.OTF]:{type:f.p.FONT,open:!0,suffix:".otf"},[e.PNG]:{type:f.p.IMAGE,open:!0,suffix:".png"},[e.PDF]:{type:f.p.TEXT,open:!0,suffix:".pdf"},[e.PHP]:{type:f.p.SCRIPT,open:!0,suffix:".php"},[e.PKG]:{type:f.p.INSTALLER,open:!1,suffix:".pkg"},[e.PPT]:{type:f.p.PRESENTATION,open:!1,suffix:".ppt"},[e.PPTX]:{type:f.p.PRESENTATION,open:!0,suffix:".pptx"},[e.PS]:{type:f.p.IMAGE,open:!1,suffix:".ps"},[e.RAR]:{type:f.p.ARCHIVE,open:!1,suffix:".rar"},[e.RCP]:{type:f.p.THREE_D,open:!1,suffix:".rcp"},[e.RTF]:{type:f.p.TEXT,open:!0,suffix:".rtf"},[e.SBN]:{type:f.p.GEOSPATIAL,open:!1,suffix:".sbn"},[e.SBX]:{type:f.p.GEOSPATIAL,open:!1,suffix:".sbx"},[e.SHX]:{type:f.p.GEOSPATIAL,open:!0,suffix:".shx"},[e.SH]:{type:f.p.SCRIPT,open:!0,suffix:".sh"},[e.SLK]:{type:f.p.DATA,open:!0,suffix:".slk"},[e.SVG]:{type:f.p.IMAGE,open:!0,suffix:".svg"},[e.TAR]:{type:f.p.ARCHIVE,open:!0,suffix:".tar"},[e.TIFF]:{type:f.p.IMAGE,open:!0,suffix:".tiff"},[e.TIF]:{type:f.p.IMAGE,open:!0,suffix:".tif"},[e.TTF]:{type:f.p.FONT,open:!0,suffix:".ttf"},[e.TXT]:{type:f.p.TEXT,open:!0,suffix:".txt"},[e.VGL]:{type:f.p.THREE_D,open:!1,suffix:".vgl"},[e.VWX]:{type:f.p.CAD,open:!1,suffix:".vwx"},[e.WAV]:{type:f.p.AUDIO,open:!0,suffix:".wav"},[e.WEBM]:{type:f.p.VIDEO,open:!0,suffix:".webm"},[e.WEBP]:{type:f.p.IMAGE,open:!0,suffix:".webp"},[e.WMV]:{type:f.p.VIDEO,open:!0,suffix:".wmv"},[e.WOFF]:{type:f.p.FONT,open:!0,suffix:".woff"},[e.WOFF2]:{type:f.p.FONT,open:!0,suffix:".woff2"},[e.XLS]:{type:f.p.SPREADSHEET,open:!1,suffix:".xls"},[e.XLSX]:{type:f.p.SPREADSHEET,open:!0,suffix:".xlsx"},[e.XHTML]:{type:f.p.MARKUP,open:!0,suffix:".xhtml"},[e.XML]:{type:f.p.DATA,open:!0,suffix:".xml"},[e.XYZ]:{type:f.p.THREE_D,open:!0,suffix:".xyz"},[e.ZIP]:{type:f.p.ARCHIVE,open:!0,suffix:".zip"},[e.SEVEN_Z]:{type:f.p.ARCHIVE,open:!0,suffix:".7z"},[e.EML]:{type:f.p.EMAIL,open:!0,suffix:".eml"},[e.EMLX]:{type:f.p.EMAIL,open:!0,suffix:".emlx"},[e.MBX]:{type:f.p.EMAIL,open:!0,suffix:".mbx"},[e.MD]:{type:f.p.TEXT,open:!0,suffix:".md"},[e.MSG]:{type:f.p.EMAIL,open:!1,suffix:".msg"},[e.RST]:{type:f.p.TEXT,open:!0,suffix:".rst"},[e.HEIC]:{type:f.p.IMAGE,open:!1,suffix:".heic"},[e.MPP]:{type:f.p.PLANNING,open:!1,suffix:".mpp"},[e.TSV]:{type:f.p.DATA,open:!0,suffix:".tsv"},[e.B3DM]:{type:f.p.THREE_D,open:!0,suffix:".b3dm"},[e.I3DM]:{type:f.p.THREE_D,open:!0,suffix:".i3dm"},[e.PNTS]:{type:f.p.THREE_D,open:!1,suffix:".pnts"},[e.CMPT]:{type:f.p.THREE_D,open:!1,suffix:".cmpt"},[e.GLTF]:{type:f.p.THREE_D,open:!0,suffix:".gltf"},[e.GLB]:{type:f.p.THREE_D,open:!0,suffix:".glb"},[e.IFC]:{type:f.p.BIM,open:!0,suffix:".ifc"},[e.IFCZIP]:{type:f.p.BIM,open:!0,suffix:".ifczip"},[e.IFXML]:{type:f.p.BIM,open:!0,suffix:".ifcxml"},[e.THREEDM]:{type:f.p.CAD,open:!1,suffix:".3dm"},[e.THREEDS]:{type:f.p.THREE_D,open:!1,suffix:".3ds"},[e.GHP]:{type:f.p.CAD,open:!1,suffix:".ghp"},[e.RVT]:{type:f.p.BIM,open:!1,suffix:".rvt"},[e.RFA]:{type:f.p.BIM,open:!1,suffix:".rfa"},[e.RFT]:{type:f.p.BIM,open:!1,suffix:".rft"},[e.RTE]:{type:f.p.BIM,open:!1,suffix:".rte"},[e.PLA]:{type:f.p.BIM,open:!1,suffix:".pla"},[e.PLN]:{type:f.p.BIM,open:!1,suffix:".pln"},[e.GSM]:{type:f.p.BIM,open:!1,suffix:".gsm"},[e.SMC]:{type:f.p.BIM,open:!1,suffix:".smc"},[e.STL]:{type:f.p.THREE_D,open:!0,suffix:".stl"},[e.BCF]:{type:f.p.BIM,open:!0,suffix:".bcf"},[e.DWG]:{type:f.p.CAD,open:!1,suffix:".dwg"},[e.DWL]:{type:f.p.CAD,open:!1,suffix:".dwl"},[e.DXF]:{type:f.p.CAD,open:!0,suffix:".dxf"},[e.DGN]:{type:f.p.CAD,open:!1,suffix:".dgn"},[e.NWD]:{type:f.p.BIM,open:!1,suffix:".nwd"},[e.OBJ]:{type:f.p.THREE_D,open:!0,suffix:".obj"},[e.C4D]:{type:f.p.THREE_D,open:!1,suffix:".c4d"},[e.TEKLASTRUCTURES]:{type:f.p.BIM,open:!1,suffix:".teklastructures"},[e.PTS]:{type:f.p.THREE_D,open:!1,suffix:".pts"},[e.LAS]:{type:f.p.THREE_D,open:!0,suffix:".las"},[e.LAZ]:{type:f.p.THREE_D,open:!0,suffix:".laz"},[e.USDZ]:{type:f.p.THREE_D,open:!0,suffix:".usdz"},[e.USDA]:{type:f.p.THREE_D,open:!0,suffix:".usda"},[e.USDC]:{type:f.p.THREE_D,open:!0,suffix:".usdc"},[e.USD]:{type:f.p.THREE_D,open:!0,suffix:".usd"},[e.PSD]:{type:f.p.IMAGE,open:!1,suffix:".psd"},[e.PSP]:{type:f.p.IMAGE,open:!1,suffix:".psp"},[e.AI]:{type:f.p.IMAGE,open:!1,suffix:".ai"},[e.SKP]:{type:f.p.THREE_D,open:!1,suffix:".skp"},[e.FBX]:{type:f.p.THREE_D,open:!0,suffix:".fbx"},[e.KML]:{type:f.p.GEOSPATIAL,open:!0,suffix:".kml"},[e.SHP]:{type:f.p.GEOSPATIAL,open:!0,suffix:".shp"}}},4820(V,M,n){n.d(M,{p:()=>f});var f=function(e){return e.AUTOMATION="automation",e.ARCHIVE="archive",e.AUDIO="audio",e.BACKUP="backup",e.BINARY="binary",e.BIM="bim",e.CAD="cad",e.DATA="data",e.EMAIL="email",e.FONT="font",e.GEOSPATIAL="geospatial",e.IMAGE="image",e.INSTALLER="installer",e.MARKUP="markup",e.MULTIMEDIA="multimedia",e.PLANNING="planning",e.PRESENTATION="presentation",e.SCRIPT="script",e.SPREADSHEET="spreadsheet",e.TEXT="text",e.THREE_D="3d",e.UNKNOWN="unknown",e.VIDEO="video",e}(f||{})}}]);
1
+ "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[2014,3036],{2014(V,M,n){n.d(M,{ButtonPadder:()=>R});var f=n(7705),e=n(2271),a=n(5547);const t=["*"];let R=(()=>{class o{justify=(0,f.hFB)("start");size=(0,f.hFB)("l");widthStyle=(0,e.EW)(()=>`var(--cue-button-label-padding-${this.size()}-x)`);static \u0275fac=function(y){return new(y||o)};static \u0275cmp=a.VBU({type:o,selectors:[["cue-button-padder"]],inputs:{justify:[1,"justify"],size:[1,"size"]},ngContentSelectors:t,decls:2,vars:4,template:function(y,D){1&y&&(a.NAR(),a.rj2(0,"div"),a.SdG(1),a.eux()),2&y&&a.xc7("justify-content",D.justify())("min-width",D.widthStyle())},styles:["div[_ngcontent-%COMP%]{display:flex;align-items:center;min-height:1px}"]})}return o})()},3036(V,M,n){n.r(M),n.d(M,{DocumentViewer:()=>b});var f=n(467),e=n(9769),a=n(5802),t=n(7705),R=n(2271),o=n(5547),h=n(3418),c=n(6114);const y={bim:()=>Promise.all([n.e(7598),n.e(6419)]).then(n.bind(n,6419)).then(r=>r.BIMFragmentsViewer),cad:()=>Promise.all([n.e(7598),n.e(8560),n.e(1051)]).then(n.bind(n,1051)).then(r=>r.DXFViewer),image:()=>n.e(8560).then(n.bind(n,8560)).then(r=>r.ImageViewer),markdown:()=>Promise.all([n.e(222),n.e(6586)]).then(n.bind(n,6586)).then(r=>r.MarkdownViewer),pdf:()=>Promise.all([n.e(8560),n.e(1842)]).then(n.bind(n,1842)).then(r=>r.PDFViewer),text:()=>n.e(3523).then(n.bind(n,3523)).then(r=>r.TextViewer),spreadsheet:()=>Promise.all([n.e(2076),n.e(4791)]).then(n.bind(n,4791)).then(r=>r.Spreadsheet),code:()=>Promise.all([n.e(4284),n.e(2538),n.e(7193)]).then(n.bind(n,329)).then(r=>r.CodeViewer),email:()=>n.e(5740).then(n.bind(n,5740)).then(r=>r.EmailViewer)},D=new Map([[c.N.DXF,"cad"],[c.N.FRAG,"bim"],[c.N.PDF,"pdf"],[c.N.PNG,"image"],[c.N.JPG,"image"],[c.N.JPEG,"image"],[c.N.SVG,"image"],[c.N.GIF,"image"],[c.N.WEBP,"image"],[c.N.BMP,"image"],[c.N.AVIF,"image"],[c.N.APNG,"image"],[c.N.CSV,"spreadsheet"],[c.N.XLSX,"spreadsheet"],[c.N.XLS,"spreadsheet"],[c.N.JSON,"code"],[c.N.JSONLD,"code"],[c.N.XML,"code"],[c.N.CSS,"code"],[c.N.JS,"code"],[c.N.HTML,"code"],[c.N.HTM,"code"],[c.N.SH,"code"],[c.N.TXT,"text"],[c.N.RST,"text"],[c.N.MD,"markdown"]]);var A=n(8807),E=n(2065);const B=["*"];let w=(()=>{class r{width=(0,t.hFB)("auto");height=(0,t.hFB)("auto");style=(0,t.hFB)("");getStyles=(0,R.EW)(()=>this.style());static \u0275fac=function(u){return new(u||r)};static \u0275cmp=o.VBU({type:r,selectors:[["cue-container"]],hostVars:6,hostBindings:function(u,d){2&u&&(o.Aen(d.getStyles()),o.xc7("max-width",d.width())("max-height",d.height()))},inputs:{width:[1,"width"],height:[1,"height"],style:[1,"style"]},ngContentSelectors:B,decls:1,vars:0,template:function(u,d){1&u&&(o.NAR(),o.SdG(0))},styles:["[_nghost-%COMP%]{display:flex;align-items:stretch;container-name:cue-container;container-type:inline-size}[_nghost-%COMP%] > *[_ngcontent-%COMP%]{flex:1;max-width:100%}"]})}return r})();var H=n(2245),X=n(5381),J=n(5971),U=n(3319),C=n(5448),g=n(2014),W=n(7851),v=n(3191);let P=(()=>{class r{searchService=(0,a.WQX)(v.g);entityBeingPlaced=(0,a.vPA)(void 0);confirmedPlacement=(0,a.vPA)(void 0);rdfBaseURL=(0,a.vPA)("");contentUUID=(0,a.vPA)("");activePdfDoc=(0,a.vPA)(null);currentPage=(0,a.vPA)(1);requestedPage=(0,a.vPA)(null);navigateToPage(s){this.currentPage.set(s),this.requestedPage.set(s)}entityTextSearchResults=(0,a.vPA)([]);entityTextSearchResultsOnCurrentPage=(0,R.EW)(()=>this.entityTextSearchResults().filter(s=>s.page===this.currentPage()));currentPlacementBbox=(0,a.vPA)(null);categoryPreviewBoxes=(0,a.vPA)([]);_lastMatchIndex=(0,a.vPA)(null);matchCycleDisplay=(0,R.EW)(()=>{const s=this._lastMatchIndex(),u=this.entityTextSearchResultsOnCurrentPage().length;return null===s||0===u?"":`${s+1}/${u}`});cycleTextMatch(){const s=this.entityTextSearchResultsOnCurrentPage();if(!s.length)return;const u=this._lastMatchIndex(),d=null===u?0:(u+1)%s.length;this._lastMatchIndex.set(d);const p=s[d].xywhStr.replace("percent:",""),[I,T,i,m]=p.split(",").map(Number),j=Math.max(0,I-.5),G=Math.max(0,T-.5),x=Math.min(100-j,i+1),N=Math.min(100-G,m+1);this.currentPlacementBbox.set({xywhStr:`percent:${j.toFixed(2)},${G.toFixed(2)},${x.toFixed(2)},${N.toFixed(2)}`,color:"rgba(255, 160, 0, 0.9)",allowRemove:!1})}setManualBbox(s){this._lastMatchIndex.set(null),this.currentPlacementBbox.set({...s,allowRemove:!1})}clearPlacement(){this.currentPlacementBbox.set(null),this._lastMatchIndex.set(null)}constructor(){(0,a.QZP)(()=>{const s=this.entityBeingPlaced(),u=this.activePdfDoc();s?.value&&u?this.searchService.searchAll(u,s.value).then(d=>{this.entityTextSearchResults.set(d)}):this.entityTextSearchResults.set([])}),(0,a.QZP)(()=>{this.currentPage(),this._lastMatchIndex.set(null),this.currentPlacementBbox.set(null)}),(0,a.QZP)(()=>{const s=this.entityBeingPlaced();this._lastMatchIndex.set(null),void 0===s&&this.currentPlacementBbox.set(null)})}static \u0275fac=function(u){return new(u||r)};static \u0275prov=a.jDH({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})();var S=n(9352);const O=["viewerTarget"];function L(r,$){if(1&r){const s=o.RV6();o.j41(0,"cue-flexcontainer",2)(1,"cue-typography"),o.EFF(2),o.nI1(3,"transloco"),o.k0s(),o.j41(4,"cue-button",3),o.bIt("click",function(){a.eBV(s);const d=o.XpG();return a.Njj(d.downloadFile())}),o.j41(5,"cue-button-padder"),o.nrm(6,"cue-button-icon",4),o.k0s(),o.j41(7,"cue-button-label"),o.EFF(8),o.nI1(9,"transloco"),o.k0s()()()}2&r&&(o.R7$(2),o.JRh(o.bMT(3,2,"components.documentViewer.infoNoViewer")),o.R7$(6),o.JRh(o.bMT(9,4,"common.buttons.download")))}let b=(()=>{class r{_eps=(0,a.WQX)(P);_destroyed=!1;url=t.hFB.required();pdfBytes=(0,t.hFB)(void 0);suffix=(0,t.hFB)();settings=(0,t.hFB)(new h.DocumentViewerSettings);viewerTypeOverride=(0,t.hFB)(void 0);interactions=(0,t.CGW)();viewerType=(0,R.EW)(()=>{const s=this.viewerTypeOverride();if(s)return s;const u=this.url(),d=void 0!==this.suffix()?this.suffix()?.trim():`.${u.split(".").pop()?.trim()}`,p=d?D.get(d):void 0;return console.log("[DocumentViewer] viewerType resolved",{url:u?.substring(0,80),suffix:d,viewerType:p}),void 0!==d?p:void 0});currentComponent=(0,a.vPA)(null);noViewer=(0,R.EW)(()=>null===this.currentComponent());isLoading=(0,a.vPA)(!1);viewerTarget;currentRef;_interactionsState=(0,a.vPA)(new h.DocumentViewerInteractions);constructor(){(0,a.QZP)(()=>{const s=this.viewerType(),u=this.url();console.log("[DocumentViewer] url/viewerType effect \u2014",{viewerType:s,url:u?.substring(0,80),destroyed:this._destroyed}),s?("pdf"!==s&&this._eps.activePdfDoc.set(null),this.isLoading.set(!0),this.loadViewerComponent(s,u,this.settings())):(this.viewerTarget.clear(),this.currentRef?.destroy(),this.currentRef=void 0,console.info("No viewer available for this file type"),this.currentComponent.set(null),this.isLoading.set(!1),this._eps.activePdfDoc.set(null))}),(0,a.QZP)(()=>{this.interactions.emit(this._interactionsState())}),(0,a.QZP)(()=>{const s=this.settings().pdf,u=this.currentRef;u&&u.setInput("settings",s)})}ngOnDestroy(){this._destroyed=!0,this.viewerTarget.clear(),this.currentRef?.destroy(),this.currentRef=void 0}loadViewerComponent(s,u,d){var p=this;return(0,f.A)(function*(){console.log("[DocumentViewer] loadViewerComponent",{viewerType:s,url:u?.substring(0,100)});try{const I=y[s],T=yield I();if(p._destroyed)return;if(p.currentComponent.set(T),p.isLoading.set(!1),p.viewerTarget.clear(),p.currentRef?.destroy(),p.currentRef=p.viewerTarget.createComponent(T),"pdf"===s)p.currentRef.setInput("src",p.pdfBytes()??u),void 0!==d?.pdf&&p.currentRef.setInput("settings",d.pdf),p.currentRef.instance.pdfLoaded&&p.currentRef.instance.pdfLoaded.subscribe(i=>{p._eps.currentPage.set(1),p._eps.activePdfDoc.set(i)}),p.currentRef.instance.settingsChange&&p.currentRef.instance.settingsChange.subscribe(i=>{const m=parseInt(i?.page,10);!isNaN(m)&&m>0&&p._eps.currentPage.set(m)}),p.currentRef.instance.artefactDrawn&&p.currentRef.instance.artefactDrawn.subscribe(i=>{"xywh"===i.type&&p._eps.setManualBbox(i.def)}),p.currentRef.instance.artefactEdited&&p.currentRef.instance.artefactEdited.subscribe(i=>{"bbox"===i.type&&p._eps.setManualBbox(i.after)});else if("bim"===s){const i=new A.di("model","Model",u,!0,p.pdfBytes());i.visible=!0,p.currentRef.setInput("data",{models:[i]}),void 0!==d?.bim&&p.currentRef.setInput("settings",d.bim),p.currentRef.instance.selectedElements&&p.currentRef.instance.selectedElements.subscribe(m=>{p._interactionsState.update(l=>(l.bim.selectedElements=m,Object.assign({},l)))}),p.currentRef.instance.clickedElement&&p.currentRef.instance.clickedElement.subscribe(m=>{p._interactionsState.update(l=>(l.bim.clickedElement=m,Object.assign({},l)))})}else if("cad"===s)p.currentRef.setInput("fileURL",u),p.currentRef.setInput("bytes",p.pdfBytes()),void 0!==d?.cad&&p.currentRef.setInput("settings",d.cad);else if("image"===s)p.currentRef.setInput("src",u);else if("markdown"===s)p.currentRef.setInput("fileURL",u),p.currentRef.setInput("bytes",p.pdfBytes());else if("text"===s)p.currentRef.setInput("fileURL",u),p.currentRef.setInput("bytes",p.pdfBytes());else if("spreadsheet"===s){const i=p.suffix()?.split(".").pop()||u.split(".").pop()||"csv";p.currentRef.setInput("data",{url:u,format:i})}else if("code"===s){const l={".json":"json",".jsonld":"jsonld",".xml":"xml",".html":"xml",".htm":"xml",".css":"text",".js":"text",".sh":"text"}[p.suffix()??`.${u.split(".").pop()??""}`]??"text";p.currentRef.setInput("fileURL",u),p.currentRef.setInput("bytes",p.pdfBytes()),p.currentRef.setInput("codeType",l)}else"email"===s&&p.currentRef.setInput("fileURL",u)}catch(I){console.error("Failed to load viewer component:",I),p.currentComponent.set(null)}})()}downloadFile(){var s=this;return(0,f.A)(function*(){const d=yield(yield fetch(s.url())).blob();(0,E.KE)(d,`document${s.suffix()??""}`)})()}static \u0275fac=function(u){return new(u||r)};static \u0275cmp=o.VBU({type:r,selectors:[["cue-doc-viewer"]],viewQuery:function(u,d){if(1&u&&o.GBs(O,7,o.c1b),2&u){let p;o.mGM(p=o.lsd())&&(d.viewerTarget=p.first)}},inputs:{url:[1,"url"],pdfBytes:[1,"pdfBytes"],suffix:[1,"suffix"],settings:[1,"settings"],viewerTypeOverride:[1,"viewerTypeOverride"]},outputs:{interactions:"interactions"},decls:4,vars:2,consts:[["viewerTarget",""],[2,"height","100%","width","100%",3,"cueLogoLoader"],["direction","column","align","center","justify","center",2,"height","100%","width","100%"],[3,"click"],["icon","download"]],template:function(u,d){1&u&&(o.j41(0,"cue-container",1),o.eu8(1,null,0),o.nVh(3,L,10,6,"cue-flexcontainer",2),o.k0s()),2&u&&(o.Y8G("cueLogoLoader",d.isLoading()),o.R7$(3),o.vxM(!d.isLoading()&&d.noViewer()?3:-1))},dependencies:[e.MD,w,H.Typography,X.FlexContainer,J.Button,U.ButtonIcon,C.ButtonLabel,g.ButtonPadder,W.k,S.Kj],styles:["[_nghost-%COMP%]{display:contents}"],changeDetection:0})}return r})()},3191(V,M,n){n.d(M,{g:()=>a});var f=n(467),e=n(5802);let a=(()=>{class t{searchPage(o,h,c){return(0,f.A)(function*(){if(!c||!c.trim())return[];const y=c.toLowerCase(),D=yield o.getPage(h),A=D.getViewport({scale:1}),B=(yield D.getTextContent()).items,w=[];let H="";const X=[],J=[];for(let g=0;g<B.length;g++){const v=B[g].str??"";for(let P=0;P<v.length;P++)H+=v[P],X.push(g),J.push(P)}const U=H.toLowerCase();let C=0;for(;C<U.length;){const g=U.indexOf(y,C);if(-1===g)break;const W=g+y.length-1;C=g+1;const v=new Set;for(let T=g;T<=W;T++)v.add(X[T]);let P=1/0,S=1/0,O=-1/0,L=-1/0;for(const T of v){const i=B[T],[m,l,j,G,x,N]=i.transform,K=i.width??0,z=i.height??Math.abs(m||G||12),Z=Math.sqrt(m*m+l*l)||1,Q=m/Z,Y=l/Z,k=j/Z,q=G/Z,fe=[[x,N],[x+Q*K,N+Y*K],[x+Q*K+k*z,N+Y*K+q*z],[x+k*z,N+q*z]];for(const[ne,pe]of fe){const[F,_]=A.convertToViewportPoint(ne,pe);P=Math.min(P,F),S=Math.min(S,_),O=Math.max(O,F),L=Math.max(L,_)}}const b=A.width,r=A.height,$=.005*b,s=.005*r,d=(S-s)/r*100,p=(O-P+2*$)/b*100,I=(L-S+2*s)/r*100;p>0&&I>0&&w.push({page:h,xywhStr:`percent:${((P-$)/b*100).toFixed(2)},${d.toFixed(2)},${p.toFixed(2)},${I.toFixed(2)}`})}return w})()}searchAll(o,h){var c=this;return(0,f.A)(function*(){if(!h||!h.trim())return[];const y=o.numPages,D=[];for(let A=1;A<=y;A++){const E=yield c.searchPage(o,A,h);D.push(...E)}return D})()}static \u0275fac=function(h){return new(h||t)};static \u0275prov=e.jDH({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})()},6114(V,M,n){n.d(M,{N:()=>e,V:()=>a});var f=n(4820),e=function(t){return t.AAC=".aac",t.ABW=".abw",t.ARC=".arc",t.AVIF=".avif",t.AVI=".avi",t.APNG=".apng",t.BAK=".bak",t.BIN=".bin",t.BMC=".bmc",t.BMP=".bmp",t.BZ=".bz",t.BZ2=".bz2",t.C3D=".c3d",t.CPG=".cpg",t.CSS=".css",t.CSV=".csv",t.DAT=".dat",t.DOC=".doc",t.DOCX=".docx",t.E57=".e57",t.EPUB=".epub",t.EXE=".exe",t.FFS=".ffs",t.FME=".fme",t.FMW=".fmw",t.FRAG=".fragments",t.GH=".gh",t.GZ=".gz",t.GIF=".gif",t.HTML=".html",t.HTM=".htm",t.ICO=".ico",t.ICS=".ics",t.JAR=".jar",t.JPG=".jpg",t.JPEG=".jpeg",t.JSON=".json",t.JSONLD=".jsonld",t.JS=".js",t.MOV=".mov",t.MP3=".mp3",t.MP4=".mp4",t.MPEG=".mpeg",t.MSI=".msi",t.MTL=".mtl",t.ODP=".odp",t.ODS=".ods",t.ODT=".odt",t.OGA=".oga",t.OGG=".ogg",t.OGV=".ogv",t.OGX=".ogx",t.OTF=".otf",t.PNG=".png",t.PDF=".pdf",t.PHP=".php",t.PKG=".pkg",t.PPT=".ppt",t.PPTX=".pptx",t.PS=".ps",t.RAR=".rar",t.RCP=".rcp",t.RTF=".rtf",t.SH=".sh",t.SLK=".slk",t.SVG=".svg",t.TAR=".tar",t.TIFF=".tiff",t.TIF=".tif",t.TTF=".ttf",t.TXT=".txt",t.VGL=".vgl",t.VWX=".vwx",t.WAV=".wav",t.WEBM=".webm",t.WEBP=".webp",t.WMV=".wmv",t.WOFF=".woff",t.WOFF2=".woff2",t.XLS=".xls",t.XLSX=".xlsx",t.XHTML=".xhtml",t.XML=".xml",t.XYZ=".xyz",t.ZIP=".zip",t.SEVEN_Z=".7z",t.DBF=".dbf",t.EML=".eml",t.EMLX=".emlx",t.MBX=".mbx",t.MD=".md",t.MSG=".msg",t.RST=".rst",t.HEIC=".heic",t.MPP=".mpp",t.TSV=".tsv",t.B3DM=".b3dm",t.I3DM=".i3dm",t.PNTS=".pnts",t.CMPT=".cmpt",t.GLTF=".gltf",t.GLB=".glb",t.IFC=".ifc",t.IFCZIP=".ifczip",t.IFXML=".ifcxml",t.THREEDM=".3dm",t.THREEDS=".3ds",t.GHP=".ghp",t.RVT=".rvt",t.RFA=".rfa",t.RFT=".rft",t.RTE=".rte",t.PLA=".pla",t.PLN=".pln",t.GSM=".gsm",t.SMC=".smc",t.BCF=".bcf",t.DWG=".dwg",t.DWL=".dwl",t.DXF=".dxf",t.DGN=".dgn",t.NWD=".nwd",t.OBJ=".obj",t.C4D=".c4d",t.TEKLASTRUCTURES=".teklastructures",t.PTS=".pts",t.LAS=".las",t.LAZ=".laz",t.USDZ=".usdz",t.USDA=".usda",t.USDC=".usdc",t.USD=".usd",t.PSD=".psd",t.PSP=".psp",t.AI=".ai",t.SBN=".sbn",t.SBX=".sbx",t.SHX=".shx",t.SKP=".skp",t.STL=".stl",t.FBX=".fbx",t.KML=".kml",t.SHP=".shp",t}(e||{});const a={[e.AAC]:{type:f.p.AUDIO,open:!0,suffix:".aac"},[e.ABW]:{type:f.p.TEXT,open:!0,suffix:".abw"},[e.ARC]:{type:f.p.ARCHIVE,open:!1,suffix:".arc"},[e.AVIF]:{type:f.p.IMAGE,open:!0,suffix:".avif"},[e.AVI]:{type:f.p.VIDEO,open:!0,suffix:".avi"},[e.APNG]:{type:f.p.IMAGE,open:!0,suffix:".apng"},[e.BAK]:{type:f.p.BACKUP,open:!1,suffix:".bak"},[e.BIN]:{type:f.p.BINARY,open:!1,suffix:".bin"},[e.BMC]:{type:f.p.BIM,open:!1,suffix:".bmc"},[e.BMP]:{type:f.p.IMAGE,open:!0,suffix:".bmp"},[e.BZ]:{type:f.p.ARCHIVE,open:!0,suffix:".bz"},[e.BZ2]:{type:f.p.ARCHIVE,open:!0,suffix:".bz2"},[e.C3D]:{type:f.p.THREE_D,open:!0,suffix:".c3d"},[e.CPG]:{type:f.p.GEOSPATIAL,open:!0,suffix:".cpg"},[e.CSS]:{type:f.p.MARKUP,open:!0,suffix:".css"},[e.CSV]:{type:f.p.DATA,open:!0,suffix:".csv"},[e.DAT]:{type:f.p.DATA,open:!1,suffix:".dat"},[e.DBF]:{type:f.p.DATA,open:!0,suffix:".dbf"},[e.DOC]:{type:f.p.TEXT,open:!1,suffix:".doc"},[e.DOCX]:{type:f.p.TEXT,open:!0,suffix:".docx"},[e.E57]:{type:f.p.THREE_D,open:!0,suffix:".e57"},[e.EPUB]:{type:f.p.TEXT,open:!0,suffix:".epub"},[e.EXE]:{type:f.p.INSTALLER,open:!1,suffix:".exe"},[e.FFS]:{type:f.p.AUTOMATION,open:!1,suffix:".ffs"},[e.FME]:{type:f.p.AUTOMATION,open:!1,suffix:".fme"},[e.FMW]:{type:f.p.AUTOMATION,open:!1,suffix:".fmw"},[e.FRAG]:{type:f.p.BIM,open:!0,suffix:".fragments"},[e.GH]:{type:f.p.THREE_D,open:!1,suffix:".gh"},[e.GZ]:{type:f.p.ARCHIVE,open:!0,suffix:".gz"},[e.GIF]:{type:f.p.IMAGE,open:!0,suffix:".gif"},[e.HTML]:{type:f.p.MARKUP,open:!0,suffix:".html"},[e.HTM]:{type:f.p.MARKUP,open:!0,suffix:".htm"},[e.ICO]:{type:f.p.IMAGE,open:!1,suffix:".ico"},[e.ICS]:{type:f.p.DATA,open:!0,suffix:".ics"},[e.JAR]:{type:f.p.ARCHIVE,open:!0,suffix:".jar"},[e.JPG]:{type:f.p.IMAGE,open:!0,suffix:".jpg"},[e.JPEG]:{type:f.p.IMAGE,open:!0,suffix:".jpeg"},[e.JSON]:{type:f.p.DATA,open:!0,suffix:".json"},[e.JSONLD]:{type:f.p.DATA,open:!0,suffix:".jsonld"},[e.JS]:{type:f.p.SCRIPT,open:!0,suffix:".js"},[e.MSI]:{type:f.p.INSTALLER,open:!1,suffix:".msi"},[e.MOV]:{type:f.p.VIDEO,open:!0,suffix:".mov"},[e.MP3]:{type:f.p.AUDIO,open:!0,suffix:".mp3"},[e.MP4]:{type:f.p.VIDEO,open:!0,suffix:".mp4"},[e.MPEG]:{type:f.p.VIDEO,open:!0,suffix:".mpeg"},[e.MTL]:{type:f.p.THREE_D,open:!0,suffix:".mtl"},[e.ODP]:{type:f.p.PRESENTATION,open:!0,suffix:".odp"},[e.ODS]:{type:f.p.SPREADSHEET,open:!0,suffix:".ods"},[e.ODT]:{type:f.p.TEXT,open:!0,suffix:".odt"},[e.OGA]:{type:f.p.AUDIO,open:!0,suffix:".oga"},[e.OGG]:{type:f.p.AUDIO,open:!0,suffix:".ogg"},[e.OGV]:{type:f.p.VIDEO,open:!0,suffix:".ogv"},[e.OGX]:{type:f.p.VIDEO,open:!0,suffix:".ogx"},[e.OTF]:{type:f.p.FONT,open:!0,suffix:".otf"},[e.PNG]:{type:f.p.IMAGE,open:!0,suffix:".png"},[e.PDF]:{type:f.p.TEXT,open:!0,suffix:".pdf"},[e.PHP]:{type:f.p.SCRIPT,open:!0,suffix:".php"},[e.PKG]:{type:f.p.INSTALLER,open:!1,suffix:".pkg"},[e.PPT]:{type:f.p.PRESENTATION,open:!1,suffix:".ppt"},[e.PPTX]:{type:f.p.PRESENTATION,open:!0,suffix:".pptx"},[e.PS]:{type:f.p.IMAGE,open:!1,suffix:".ps"},[e.RAR]:{type:f.p.ARCHIVE,open:!1,suffix:".rar"},[e.RCP]:{type:f.p.THREE_D,open:!1,suffix:".rcp"},[e.RTF]:{type:f.p.TEXT,open:!0,suffix:".rtf"},[e.SBN]:{type:f.p.GEOSPATIAL,open:!1,suffix:".sbn"},[e.SBX]:{type:f.p.GEOSPATIAL,open:!1,suffix:".sbx"},[e.SHX]:{type:f.p.GEOSPATIAL,open:!0,suffix:".shx"},[e.SH]:{type:f.p.SCRIPT,open:!0,suffix:".sh"},[e.SLK]:{type:f.p.DATA,open:!0,suffix:".slk"},[e.SVG]:{type:f.p.IMAGE,open:!0,suffix:".svg"},[e.TAR]:{type:f.p.ARCHIVE,open:!0,suffix:".tar"},[e.TIFF]:{type:f.p.IMAGE,open:!0,suffix:".tiff"},[e.TIF]:{type:f.p.IMAGE,open:!0,suffix:".tif"},[e.TTF]:{type:f.p.FONT,open:!0,suffix:".ttf"},[e.TXT]:{type:f.p.TEXT,open:!0,suffix:".txt"},[e.VGL]:{type:f.p.THREE_D,open:!1,suffix:".vgl"},[e.VWX]:{type:f.p.CAD,open:!1,suffix:".vwx"},[e.WAV]:{type:f.p.AUDIO,open:!0,suffix:".wav"},[e.WEBM]:{type:f.p.VIDEO,open:!0,suffix:".webm"},[e.WEBP]:{type:f.p.IMAGE,open:!0,suffix:".webp"},[e.WMV]:{type:f.p.VIDEO,open:!0,suffix:".wmv"},[e.WOFF]:{type:f.p.FONT,open:!0,suffix:".woff"},[e.WOFF2]:{type:f.p.FONT,open:!0,suffix:".woff2"},[e.XLS]:{type:f.p.SPREADSHEET,open:!1,suffix:".xls"},[e.XLSX]:{type:f.p.SPREADSHEET,open:!0,suffix:".xlsx"},[e.XHTML]:{type:f.p.MARKUP,open:!0,suffix:".xhtml"},[e.XML]:{type:f.p.DATA,open:!0,suffix:".xml"},[e.XYZ]:{type:f.p.THREE_D,open:!0,suffix:".xyz"},[e.ZIP]:{type:f.p.ARCHIVE,open:!0,suffix:".zip"},[e.SEVEN_Z]:{type:f.p.ARCHIVE,open:!0,suffix:".7z"},[e.EML]:{type:f.p.EMAIL,open:!0,suffix:".eml"},[e.EMLX]:{type:f.p.EMAIL,open:!0,suffix:".emlx"},[e.MBX]:{type:f.p.EMAIL,open:!0,suffix:".mbx"},[e.MD]:{type:f.p.TEXT,open:!0,suffix:".md"},[e.MSG]:{type:f.p.EMAIL,open:!1,suffix:".msg"},[e.RST]:{type:f.p.TEXT,open:!0,suffix:".rst"},[e.HEIC]:{type:f.p.IMAGE,open:!1,suffix:".heic"},[e.MPP]:{type:f.p.PLANNING,open:!1,suffix:".mpp"},[e.TSV]:{type:f.p.DATA,open:!0,suffix:".tsv"},[e.B3DM]:{type:f.p.THREE_D,open:!0,suffix:".b3dm"},[e.I3DM]:{type:f.p.THREE_D,open:!0,suffix:".i3dm"},[e.PNTS]:{type:f.p.THREE_D,open:!1,suffix:".pnts"},[e.CMPT]:{type:f.p.THREE_D,open:!1,suffix:".cmpt"},[e.GLTF]:{type:f.p.THREE_D,open:!0,suffix:".gltf"},[e.GLB]:{type:f.p.THREE_D,open:!0,suffix:".glb"},[e.IFC]:{type:f.p.BIM,open:!0,suffix:".ifc"},[e.IFCZIP]:{type:f.p.BIM,open:!0,suffix:".ifczip"},[e.IFXML]:{type:f.p.BIM,open:!0,suffix:".ifcxml"},[e.THREEDM]:{type:f.p.CAD,open:!1,suffix:".3dm"},[e.THREEDS]:{type:f.p.THREE_D,open:!1,suffix:".3ds"},[e.GHP]:{type:f.p.CAD,open:!1,suffix:".ghp"},[e.RVT]:{type:f.p.BIM,open:!1,suffix:".rvt"},[e.RFA]:{type:f.p.BIM,open:!1,suffix:".rfa"},[e.RFT]:{type:f.p.BIM,open:!1,suffix:".rft"},[e.RTE]:{type:f.p.BIM,open:!1,suffix:".rte"},[e.PLA]:{type:f.p.BIM,open:!1,suffix:".pla"},[e.PLN]:{type:f.p.BIM,open:!1,suffix:".pln"},[e.GSM]:{type:f.p.BIM,open:!1,suffix:".gsm"},[e.SMC]:{type:f.p.BIM,open:!1,suffix:".smc"},[e.STL]:{type:f.p.THREE_D,open:!0,suffix:".stl"},[e.BCF]:{type:f.p.BIM,open:!0,suffix:".bcf"},[e.DWG]:{type:f.p.CAD,open:!1,suffix:".dwg"},[e.DWL]:{type:f.p.CAD,open:!1,suffix:".dwl"},[e.DXF]:{type:f.p.CAD,open:!0,suffix:".dxf"},[e.DGN]:{type:f.p.CAD,open:!1,suffix:".dgn"},[e.NWD]:{type:f.p.BIM,open:!1,suffix:".nwd"},[e.OBJ]:{type:f.p.THREE_D,open:!0,suffix:".obj"},[e.C4D]:{type:f.p.THREE_D,open:!1,suffix:".c4d"},[e.TEKLASTRUCTURES]:{type:f.p.BIM,open:!1,suffix:".teklastructures"},[e.PTS]:{type:f.p.THREE_D,open:!1,suffix:".pts"},[e.LAS]:{type:f.p.THREE_D,open:!0,suffix:".las"},[e.LAZ]:{type:f.p.THREE_D,open:!0,suffix:".laz"},[e.USDZ]:{type:f.p.THREE_D,open:!0,suffix:".usdz"},[e.USDA]:{type:f.p.THREE_D,open:!0,suffix:".usda"},[e.USDC]:{type:f.p.THREE_D,open:!0,suffix:".usdc"},[e.USD]:{type:f.p.THREE_D,open:!0,suffix:".usd"},[e.PSD]:{type:f.p.IMAGE,open:!1,suffix:".psd"},[e.PSP]:{type:f.p.IMAGE,open:!1,suffix:".psp"},[e.AI]:{type:f.p.IMAGE,open:!1,suffix:".ai"},[e.SKP]:{type:f.p.THREE_D,open:!1,suffix:".skp"},[e.FBX]:{type:f.p.THREE_D,open:!0,suffix:".fbx"},[e.KML]:{type:f.p.GEOSPATIAL,open:!0,suffix:".kml"},[e.SHP]:{type:f.p.GEOSPATIAL,open:!0,suffix:".shp"}}},4820(V,M,n){n.d(M,{p:()=>f});var f=function(e){return e.AUTOMATION="automation",e.ARCHIVE="archive",e.AUDIO="audio",e.BACKUP="backup",e.BINARY="binary",e.BIM="bim",e.CAD="cad",e.DATA="data",e.EMAIL="email",e.FONT="font",e.GEOSPATIAL="geospatial",e.IMAGE="image",e.INSTALLER="installer",e.MARKUP="markup",e.MULTIMEDIA="multimedia",e.PLANNING="planning",e.PRESENTATION="presentation",e.SCRIPT="script",e.SPREADSHEET="spreadsheet",e.TEXT="text",e.THREE_D="3d",e.UNKNOWN="unknown",e.VIDEO="video",e}(f||{})}}]);
package/3523.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[3523],{3523(d,i,t){t.d(i,{TextViewer:()=>u});var r=t(467),l=t(7705),s=t(5802),c=t(2245),e=t(5547);let u=(()=>{class _{fileURL=l.hFB.required();html=(0,s.vPA)("");onFile=(0,s.QZP)((()=>{var a=this;return(0,r.A)(function*(){const o=yield(yield fetch(a.fileURL())).text();a.html.set(`<div class="page">\n <pre style="font-family: inherit; margin: 0;">${o}</pre>\n</div>`)})})());static \u0275fac=function(n){return new(n||_)};static \u0275cmp=e.VBU({type:_,selectors:[["cue-text-viewer"]],inputs:{fileURL:[1,"fileURL"]},decls:2,vars:1,consts:[[1,"page"],[3,"innerHTML"]],template:function(n,o){1&n&&(e.j41(0,"div",0),e.nrm(1,"cue-typography",1),e.k0s()),2&n&&(e.R7$(),e.Y8G("innerHTML",o.html(),e.npT))},dependencies:[c.Typography],styles:[".page[_ngcontent-%COMP%]{overflow-y:auto;height:100%}"],changeDetection:0})}return _})()}}]);
1
+ "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[3523],{3523(d,r,n){n.d(r,{TextViewer:()=>u});var c=n(467),a=n(7705),i=n(5802),l=n(2245),e=n(5547);let u=(()=>{class _{fileURL=a.hFB.required();bytes=(0,a.hFB)(void 0);html=(0,i.vPA)("");onFile=(0,i.QZP)((()=>{var s=this;return(0,c.A)(function*(){const t=s.bytes(),o=t?(new TextDecoder).decode(t):yield(yield fetch(s.fileURL())).text();s.html.set(`<div class="page">\n <pre style="font-family: inherit; margin: 0;">${o}</pre>\n</div>`)})})());static \u0275fac=function(t){return new(t||_)};static \u0275cmp=e.VBU({type:_,selectors:[["cue-text-viewer"]],inputs:{fileURL:[1,"fileURL"],bytes:[1,"bytes"]},decls:2,vars:1,consts:[[1,"page"],[3,"innerHTML"]],template:function(t,o){1&t&&(e.j41(0,"div",0),e.nrm(1,"cue-typography",1),e.k0s()),2&t&&(e.R7$(),e.Y8G("innerHTML",o.html(),e.npT))},dependencies:[l.Typography],styles:[".page[_ngcontent-%COMP%]{overflow-y:auto;height:100%}"],changeDetection:0})}return _})()}}]);
package/6586.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[6586],{6586(U,V,b){b.d(V,{MarkdownViewer:()=>rt});var A=b(467),d=b(5802),T=b(7705),S=b(5547),H=b(4226),M=b(2771),w=b(7673),E=b(4572),D=b(1397),j=b(8141),m=b(9437);const I=(0,b(1853).L)(c=>function(){c(this),this.name="EmptyError",this.message="no elements in sequence"});var O=b(5964),R=b(6697),W=b(9974),Z=b(4360);function Ie(c=Se){return(0,W.N)((p,e)=>{let t=!1;p.subscribe((0,Z._)(e,n=>{t=!0,e.next(n)},()=>t?e.complete():e.error(c())))})}function Se(){return new I}var Te=b(3669);function ae(c,p){const e=arguments.length>=2;return t=>t.pipe(c?(0,O.p)((n,o)=>c(n,o,t)):Te.D,(0,R.s)(1),e?function $(c){return(0,W.N)((p,e)=>{let t=!1;p.subscribe((0,Z._)(e,n=>{t=!0,e.next(n)},()=>{t||e.next(c),e.complete()}))})}(p):Ie(()=>new I))}var we=b(6354),G=b(177),Ee=b(345);const le=new d.nKC("All of the settings registered in the whole app."),Y=new d.nKC("The settings collected from all ancestor injectors"),ue=new d.nKC("The settings for the currently loaded module."),q="__ngx_dynamic_hooks_content",ee="dynamic-component-anchor",B="__ngx_dynamic_hooks_anchor_id",P="__ngx_dynamic_hooks_anchor_parsetoken",Be=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];var te=function(c){return c[c.All=0]="All",c[c.Linear=1]="Linear",c[c.None=2]="None",c}(te||{});const x={},pe="[a-zA-Z_$]+[a-zA-Z0-9_$]*",ne="[a-zA-Z$\\-_:][a-zA-Z$\\-_:0-9\\.]*";function N(c,p){if(!p.global)throw Error("TypeError: matchAll called with a non-global RegExp argument");const e=[];let t=p.exec(c);for(;null!==t;)e.push(t),t=p.exec(c);return p.lastIndex=0,e}function oe(c){return void 0!==c?.__ngContext__}x.attributeNameNoBracketsRegex="("+ne+")",x.attributeNameBracketsRegex="\\[("+ne+")\\]",x.attributeNameRoundBracketsRegex="\\(("+ne+")\\)",x.attributeNameRegex="(?:"+x.attributeNameNoBracketsRegex+"|"+x.attributeNameBracketsRegex+"|"+x.attributeNameRoundBracketsRegex+")",x.attributeValueDoubleQuotesRegex='"((?:\\\\.|[^"])*?)"',x.attributeValueSingleQuotesRegex="'((?:\\\\.|[^'])*?)'",x.variablePathDotNotation="\\."+pe,x.variableBracketsNotation="\\[[^\\]]*\\]",x.variablePathFunctionCall="\\([^\\)]*\\)",x.variablePathPartRegex="(?:"+x.variablePathDotNotation+"|"+x.variableBracketsNotation+"|"+x.variablePathFunctionCall+")",x.contextVariableRegex="context"+x.variablePathPartRegex+"*",x.placeholderVariablePathDotNotation="\\@@@cxtDot@@@"+pe,x.placeholderVariableBracketsNotation="@@@cxtOpenSquareBracket@@@[^\\]]*@@@cxtCloseSquareBracket@@@",x.placeholderVariablePathFunctionCall="@@@cxtOpenRoundBracket@@@[^\\)]*@@@cxtCloseRoundBracket@@@",x.placeholderVariablePathPartRegex="(?:"+x.placeholderVariablePathDotNotation+"|"+x.placeholderVariableBracketsNotation+"|"+x.placeholderVariablePathFunctionCall+")",x.placeholderContextVariableRegex="__CXT__"+x.placeholderVariablePathPartRegex+"*";class Ae{constructor(p,e,t,n){this.configResolver=e,this.tagHookFinder=t,this.bindingsValueManager=n,this.savedBindings={},this.config=this.configResolver.processConfig(p),this.name=this.config.name}findHooks(p,e,t){let n=this.config.enclosing?this.tagHookFinder.findEnclosingTags(p,this.config.selector,this.config.bracketStyle,t):this.tagHookFinder.findSingleTags(p,this.config.selector,this.config.bracketStyle,t);return this.config.allowSelfClosing&&(n=[...n,...this.tagHookFinder.findSelfClosingTags(p,this.config.selector,this.config.bracketStyle,t)],n.sort((o,r)=>o.openingTagStartIndex-r.openingTagStartIndex)),n}loadComponent(p,e,t,n,o){return{component:this.config.component,hostElementTag:this.config.hostElementTag||this.config.selector,injector:this.config.injector,environmentInjector:this.config.environmentInjector}}getBindings(p,e,t,n){let o=this.savedBindings[p];return void 0===o&&(o=this.createBindings(e.openingTag),this.savedBindings[p]=o),this.bindingsValueManager.checkInputBindings(o.inputs,t,this.config,n),this.bindingsValueManager.checkOutputBindings(o.outputs,this.config,n),{inputs:this.getValuesFromSavedBindings(o.inputs),outputs:this.getValuesFromSavedBindings(o.outputs)}}createBindings(p){const e=this.collectRawInputs(p),t={};for(const[r,s]of Object.entries(e))t[r]={raw:s,parsed:!1,value:null,boundContextVariables:{}};const n=this.collectRawOutputs(p),o={};for(const[r,s]of Object.entries(n))o[r]={raw:s,parsed:!1,value:null,boundContextVariables:{}};return{inputs:t,outputs:o}}collectRawInputs(p){const e=this.getBindingsFromOpeningTag(p,"noBracketInputs",this.config.inputsBlacklist||null,this.config.inputsWhitelist||null),t=this.getBindingsFromOpeningTag(p,"bracketInputs",this.config.inputsBlacklist||null,this.config.inputsWhitelist||null);for(const[n,o]of Object.entries(e))e[n]="'"+o+"'";return{...e,...t}}collectRawOutputs(p){return this.getBindingsFromOpeningTag(p,"outputs",this.config.outputsBlacklist||null,this.config.outputsWhitelist||null)}getBindingsFromOpeningTag(p,e,t,n){const o={},r="(?:"+x.attributeValueDoubleQuotesRegex+"|"+x.attributeValueSingleQuotesRegex+")";let s;switch(e){case"noBracketInputs":s=x.attributeNameNoBracketsRegex;break;case"bracketInputs":s=x.attributeNameBracketsRegex;break;case"outputs":s=x.attributeNameRoundBracketsRegex}const l=N(p,new RegExp(s+"="+r,"gim"));for(const u of l){let h=u[2]||u[3];void 0===h&&"noBracketInputs"===e&&(h=""),o[u[1]]=h}const g={};for(const[u,h]of Object.entries(o))t&&t.includes(u)||n&&!n.includes(u)||(g[u]=h);return g}getValuesFromSavedBindings(p){const e={};for(const[t,n]of Object.entries(p))e[t]=n.value;return e}}class Ne{constructor(p,e,t,n){this.configResolver=e,this.platformService=t,this.bindingsValueManager=n,this.savedBindings={},this.config=this.configResolver.processConfig(p),this.name=this.config.name}findHookElements(p,e,t){return Array.from(this.platformService.querySelectorAll(p,this.config.selector))}loadComponent(p,e,t,n,o){return this.scrubAngularBindingAttrs(e.element),{component:this.config.component,hostElementTag:this.config.hostElementTag,injector:this.config.injector,environmentInjector:this.config.environmentInjector}}getBindings(p,e,t,n){let o=this.savedBindings[p];return void 0===o&&(o=this.createBindings(e.elementSnapshot),this.savedBindings[p]=o),this.bindingsValueManager.checkInputBindings(o.inputs,t,this.config,n),this.bindingsValueManager.checkOutputBindings(o.outputs,this.config,n),{inputs:this.getValuesFromSavedBindings(o.inputs),outputs:this.getValuesFromSavedBindings(o.outputs)}}scrubAngularBindingAttrs(p){const e=Array.from(p.attributes).map(t=>t.name).filter(t=>t.startsWith("[")&&t.endsWith("]")||t.startsWith("(")&&t.endsWith(")"));for(const t of e)this.platformService.removeAttribute(p,t)}createBindings(p){const e=this.collectRawBindings(p,"inputs",this.config.inputsBlacklist||null,this.config.inputsWhitelist||null),t={};for(const[r,s]of Object.entries(e))t[r]={raw:s,parsed:!1,value:null,boundContextVariables:{}};const n=this.collectRawBindings(p,"outputs",this.config.outputsBlacklist||null,this.config.outputsWhitelist||null),o={};for(const[r,s]of Object.entries(n))o[r]={raw:s,parsed:!1,value:null,boundContextVariables:{}};return{inputs:t,outputs:o}}collectRawBindings(p,e,t,n){const o={},r=this.platformService.getAttributeNames(p);for(let i of r)if("inputs"===e&&(!i.startsWith("(")||!i.endsWith(")"))||"outputs"===e&&i.startsWith("(")&&i.endsWith(")")){let a=this.platformService.getAttribute(p,i);"inputs"===e&&i.startsWith("[")&&i.endsWith("]")&&""===a&&(a=void 0),"inputs"===e&&(!i.startsWith("[")||!i.endsWith("]"))&&(a=`'${a}'`),i=i.replace(/^\[|^\(|\]$|\)$/g,""),o[i]=a}const s={};for(const[i,a]of Object.entries(o))t&&t.includes(i)||n&&!n.includes(i)||(s[i]=a);return s}getValuesFromSavedBindings(p){const e={};for(const[t,n]of Object.entries(p))e[t]=n.value;return e}}const Pe={component:void 0,name:void 0,parseWithRegex:!1,selector:void 0,hostElementTag:void 0,injector:void 0,allowSelfClosing:!0,enclosing:!0,bracketStyle:{opening:"<",closing:">"},parseInputs:!0,unescapeStrings:!0,inputsBlacklist:void 0,inputsWhitelist:void 0,outputsBlacklist:void 0,outputsWhitelist:void 0,allowContextInBindings:!0,allowContextFunctionCalls:!0};let De=(()=>{class c{constructor(){}processConfig(e){const t=JSON.parse(JSON.stringify(Pe));if(!e||!e.hasOwnProperty("component"))throw Error('Missing the required "component" property for the SelectorHookParserConfig. Must be either the component class or a LazyLoadComponentConfig.');if(t.component=e.component,e.component.hasOwnProperty("prototype")){const n=(0,T.HJs)(e.component);t.selector=n.selector}else{if(!e.component.hasOwnProperty("importPromise")||!e.component.hasOwnProperty("importName"))throw Error('The "component" property in the SelectorHookParserConfig must either contain the component class or a LazyLoadComponentConfig.');if(!e.hasOwnProperty("selector"))throw Error('When using lazy-loaded dynamic components, you have to specify the "selector" property in the parser config, as the real selector can\'t be known before the component is loaded.')}if(e.hasOwnProperty("name")){if("string"!=typeof e.name)throw Error('The submitted "name" property in the SelectorHookParserConfig must be of type string, was '+typeof e.name);t.name=e.name}if(e.hasOwnProperty("selector")){if("string"!=typeof e.selector)throw Error('The submitted "selector" property in the SelectorHookParserConfig must be of type string, was '+typeof e.selector);t.selector=e.selector}if(e.hasOwnProperty("hostElementTag")){if("string"!=typeof e.hostElementTag)throw Error('The submitted "hostElementTag" property in the SelectorHookParserConfig must be of type string, was '+typeof e.hostElementTag);t.hostElementTag=e.hostElementTag}if(e.hasOwnProperty("parseWithRegex")){if("boolean"!=typeof e.parseWithRegex)throw Error('The submitted "parseWithRegex" property in the SelectorHookParserConfig must be of type boolean, was '+typeof e.parseWithRegex);t.parseWithRegex=e.parseWithRegex}if(e.hasOwnProperty("allowSelfClosing")){if("boolean"!=typeof e.allowSelfClosing)throw Error('The submitted "allowSelfClosing" property in the SelectorHookParserConfig must be of type boolean, was '+typeof e.allowSelfClosing);t.allowSelfClosing=e.allowSelfClosing}if(e.hasOwnProperty("enclosing")){if("boolean"!=typeof e.enclosing)throw Error('The submitted "enclosing" property in the SelectorHookParserConfig must be of type boolean, was '+typeof e.enclosing);t.enclosing=e.enclosing}if(e.hasOwnProperty("bracketStyle")){if("object"!=typeof e.bracketStyle||"string"!=typeof e.bracketStyle.opening||"string"!=typeof e.bracketStyle.closing)throw Error('The submitted "bracketStyle" property in the SelectorHookParserConfig must have the form {opening: string, closing: string}');t.bracketStyle=e.bracketStyle}if(e.hasOwnProperty("injector")&&(t.injector=e.injector),e.hasOwnProperty("environmentInjector")&&(t.environmentInjector=e.environmentInjector),e.hasOwnProperty("unescapeStrings")){if("boolean"!=typeof e.unescapeStrings)throw Error('The submitted "unescapeStrings" property in the SelectorHookParserConfig must be of type boolean, was '+typeof e.unescapeStrings);t.unescapeStrings=e.unescapeStrings}if(e.hasOwnProperty("parseInputs")){if("boolean"!=typeof e.parseInputs)throw Error('The submitted "parseInputs" property in the SelectorHookParserConfig must be of type boolean, was '+typeof e.parseInputs);t.parseInputs=e.parseInputs}if(e.hasOwnProperty("inputsBlacklist")){if(!Array.isArray(e.inputsBlacklist))throw Error('The submitted "inputsBlacklist" property in the SelectorHookParserConfig must be an array of strings.');for(const n of e.inputsBlacklist)if("string"!=typeof n)throw Error('All entries of the submitted "inputsBlacklist" property in the SelectorHookParserConfig must be of type string, '+typeof n+" found.");t.inputsBlacklist=e.inputsBlacklist}if(e.hasOwnProperty("inputsWhitelist")){if(!Array.isArray(e.inputsWhitelist))throw Error('The submitted "inputsWhitelist" property in the SelectorHookParserConfig must be an array of strings.');for(const n of e.inputsWhitelist)if("string"!=typeof n)throw Error('All entries of the submitted "inputsWhitelist" property in the SelectorHookParserConfig must be of type string, '+typeof n+" found.");t.inputsWhitelist=e.inputsWhitelist}if(e.hasOwnProperty("outputsBlacklist")){if(!Array.isArray(e.outputsBlacklist))throw Error('The submitted "outputsBlacklist" property in the SelectorHookParserConfig must be an array of strings.');for(const n of e.outputsBlacklist)if("string"!=typeof n)throw Error('All entries of the submitted "outputsBlacklist" property in the SelectorHookParserConfig must be of type string, '+typeof n+" found.");t.outputsBlacklist=e.outputsBlacklist}if(e.hasOwnProperty("outputsWhitelist")){if(!Array.isArray(e.outputsWhitelist))throw Error('The submitted "outputsWhitelist" property in the SelectorHookParserConfig must be an array of strings.');for(const n of e.outputsWhitelist)if("string"!=typeof n)throw Error('All entries of the submitted "outputsWhitelist" property in the SelectorHookParserConfig must be of type string, '+typeof n+" found.");t.outputsWhitelist=e.outputsWhitelist}if(e.hasOwnProperty("allowContextInBindings")){if("boolean"!=typeof e.allowContextInBindings)throw Error('The submitted "allowContextInBindings" property in the SelectorHookParserConfig must be of type boolean, was '+typeof e.allowContextInBindings);t.allowContextInBindings=e.allowContextInBindings}if(e.hasOwnProperty("allowContextFunctionCalls")){if("boolean"!=typeof e.allowContextFunctionCalls)throw Error('The submitted "allowContextFunctionCalls" property in the SelectorHookParserConfig must be of type boolean, was '+typeof e.allowContextFunctionCalls);t.allowContextFunctionCalls=e.allowContextFunctionCalls}return t}static{this.\u0275fac=function(t){return new(t||c)}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})();const de=new d.nKC("An injection token to retrieve an optionally user-provided PlatformService");let Ve=(()=>{class c{constructor(e,t,n){this.document=e,this.rendererFactory=t,this.sanitizer=n,this.renderer=this.rendererFactory.createRenderer(null,null)}getNgVersion(){if(typeof this.document<"u"){const t=this.querySelectorAll(this.document,"[ng-version]")?.[0]?.getAttribute("ng-version");if(t)return parseInt(t,10)}return null}sanitize(e){return this.sanitizer.sanitize(S.WPN.HTML,e)||""}createElement(e){return this.renderer.createElement(e)}sortElements(e,t){return e===t?0:e.compareDocumentPosition?2&e.compareDocumentPosition(t)?1:-1:e.sourceIndex-t.sourceIndex}cloneElement(e){return e.cloneNode(!0)}getTagName(e){return e.tagName}getOpeningTag(e){const n=e.outerHTML.length;return e.outerHTML.slice(0,"/"===e.outerHTML[n-2]?n:n-e.innerHTML.length-e.tagName.length-3)}getClosingTag(e){return e.outerHTML.slice(e.outerHTML.length-e.tagName.length-3)}getAttributeNames(e){return"function"==typeof e.getAttributeNames?e.getAttributeNames():[]}getAttribute(e,t){return"function"==typeof e.getAttribute?e.getAttribute(t):null}setAttribute(e,t,n){this.renderer.setAttribute(e,t,n)}removeAttribute(e,t){this.renderer.removeAttribute(e,t)}getParentNode(e){try{return this.renderer.parentNode(e)}catch{return null}}querySelectorAll(e,t){return Array.from(e.querySelectorAll(t))}getChildNodes(e){return Array.prototype.slice.call(e.childNodes)}appendChild(e,t){this.renderer.appendChild(e,t)}insertBefore(e,t,n){this.renderer.insertBefore(e,t,n)}clearChildNodes(e){if(e)for(;e.firstChild;)this.removeChild(e,e.firstChild)}removeChild(e,t){e.removeChild(t)}getInnerContent(e){return e.innerHTML}setInnerContent(e,t){e&&(e.innerHTML=t)}isTextNode(e){return e.nodeType===Node.TEXT_NODE}createTextNode(e){return document.createTextNode(e)}getTextContent(e){return e.textContent}dispatchEvent(e,t,n){e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0}))}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(d.qQL),d.KVO(S._9s),d.KVO(Ee.up))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),K=(()=>{class c{constructor(e,t){this.userPlatformService=e,this.defaultPlatformService=t}getFor(e){return this.userPlatformService&&"function"==typeof this.userPlatformService[e]?this.userPlatformService:this.defaultPlatformService}getNgVersion(){return this.getFor("getNgVersion").getNgVersion()}sanitize(e){return this.getFor("sanitize").sanitize(e)}createElement(e){return this.getFor("createElement").createElement(e)}sortElements(e,t){return this.getFor("sortElements").sortElements(e,t)}cloneElement(e){return this.getFor("cloneElement").cloneElement(e)}getTagName(e){return this.getFor("getTagName").getTagName(e)}getOpeningTag(e){return this.getFor("getOpeningTag").getOpeningTag(e)}getClosingTag(e){return this.getFor("getClosingTag").getClosingTag(e)}getAttributeNames(e){return this.getFor("getAttributeNames").getAttributeNames(e)}getAttribute(e,t){return this.getFor("getAttribute").getAttribute(e,t)}setAttribute(e,t,n){return this.getFor("setAttribute").setAttribute(e,t,n)}removeAttribute(e,t){return this.getFor("removeAttribute").removeAttribute(e,t)}getParentNode(e){return this.getFor("getParentNode").getParentNode(e)}querySelectorAll(e,t){return this.getFor("querySelectorAll").querySelectorAll(e,t)}getChildNodes(e){return this.getFor("getChildNodes").getChildNodes(e)}appendChild(e,t){return this.getFor("appendChild").appendChild(e,t)}insertBefore(e,t,n){return this.getFor("insertBefore").insertBefore(e,t,n)}clearChildNodes(e){return this.getFor("clearChildNodes").clearChildNodes(e)}removeChild(e,t){return this.getFor("removeChild").removeChild(e,t)}getInnerContent(e){return this.getFor("getInnerContent").getInnerContent(e)}setInnerContent(e,t){return this.getFor("setInnerContent").setInnerContent(e,t)}isTextNode(e){return this.getFor("isTextNode").isTextNode(e)}createTextNode(e){return this.getFor("createTextNode").createTextNode(e)}getTextContent(e){return this.getFor("getTextContent").getTextContent(e)}dispatchEvent(e,t,n){return this.getFor("dispatchEvent").dispatchEvent(e,t,n)}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(de,8),d.KVO(Ve))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),F=(()=>{class c{constructor(e){this.platformId=e}log(e,t){this.handleLog(e,t,"log")}warn(e,t){this.handleLog(e,t,"warn")}error(e,t){this.handleLog(e,t,"error")}handleLog(e,t,n){(t.logOptions?.dev&&this.isDevMode()&&(0,G.UE)(this.platformId)||t.logOptions?.prod&&!this.isDevMode()&&(0,G.UE)(this.platformId)||t.logOptions?.ssr&&!(0,G.UE)(this.platformId))&&console[n](...e)}isDevMode(){return(0,T.naY)()}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(S.Agw))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),Me=(()=>{class c{constructor(e){this.logger=e}find(e,t,n,o,r={sanitize:!0,convertHTMLEntities:!0,fixParagraphTags:!0,updateOnPushOnly:!1,compareInputsByValue:!1,compareOutputsByValue:!1,compareByValueDepth:5,triggerDOMEvents:!1,ignoreInputAliases:!1,ignoreOutputAliases:!1,acceptInputsForAnyProperty:!1,acceptOutputsForAnyObservable:!1,logOptions:{dev:!0,prod:!1,ssr:!1}}){return n?this.findEnclosingHooks(e,t,n,o,r):this.findSingletagHooks(e,t)}findSingletagHooks(e,t){const n=[],o=N(e,t);for(const r of o)n.push({openingTagStartIndex:r.index,openingTagEndIndex:r.index+r[0].length,closingTagStartIndex:null,closingTagEndIndex:null});return n}findEnclosingHooks(e,t,n,o,r={sanitize:!0,convertHTMLEntities:!0,fixParagraphTags:!0,updateOnPushOnly:!1,compareInputsByValue:!1,compareOutputsByValue:!1,compareByValueDepth:5,triggerDOMEvents:!1,ignoreInputAliases:!1,ignoreOutputAliases:!1,acceptInputsForAnyProperty:!1,acceptOutputsForAnyObservable:!1,logOptions:{dev:!0,prod:!1,ssr:!1}}){const s=[],i=[],a=N(e,t);for(const u of a)s.push({isOpening:!0,value:u[0],startIndex:u.index,endIndex:u.index+u[0].length});const l=N(e,n);for(const u of l)s.push({isOpening:!1,value:u[0],startIndex:u.index,endIndex:u.index+u[0].length});s.sort((u,h)=>u.startIndex-h.startIndex);const g=[];for(const[u,h]of s.entries())if(u>0&&h.startIndex<s[u-1].endIndex)this.logger.warn(['Syntax error - New tag "'+h.value+'" started at position '+h.startIndex+' before previous tag "'+s[u-1].value+'" ended at position '+s[u-1].endIndex+". Ignoring."],r);else if(h.isOpening)g.push(h);else{if(0===g.length){this.logger.warn(['Syntax error - Closing tag without preceding opening tag found: "'+h.value+'". Ignoring.'],r);continue}if(!1===o&&g.length>1){g.pop();continue}const f=g[g.length-1];i.push({openingTagStartIndex:f.startIndex,openingTagEndIndex:f.startIndex+f.value.length,closingTagStartIndex:h.startIndex,closingTagEndIndex:h.startIndex+h.value.length}),g.pop()}return g.length>0&&this.logger.warn(["Syntax error - Opening tags without corresponding closing tags found."],r),i}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),He=(()=>{class c{constructor(e){this.hookFinder=e}findSingleTags(e,t,n={opening:"<",closing:">"},o){const r=this.generateOpeningTagRegex(t,n);return this.hookFinder.find(e,r,void 0,void 0,o)}findEnclosingTags(e,t,n={opening:"<",closing:">"},o){const r=this.generateOpeningTagRegex(t,n),s=this.generateClosingTagRegex(t,n);return this.hookFinder.find(e,r,s,!0,o)}findSelfClosingTags(e,t,n={opening:"<",closing:">"},o){const r=this.generateOpeningTagRegex(t,n,!0);return this.hookFinder.find(e,r,void 0,void 0,o)}generateOpeningTagRegex(e,t={opening:"<",closing:">"},n=!1){const o=this.escapeRegex(t.opening),r=this.escapeRegex(e),s=(n?"\\/":"")+this.escapeRegex(t.closing);return new RegExp(o+r+"(?:\\s*"+s+"|(?:\\s+"+x.attributeNameRegex+"=(?:"+x.attributeValueDoubleQuotesRegex+"|"+x.attributeValueSingleQuotesRegex+"))+\\s*"+s+")","gim")}generateClosingTagRegex(e,t={opening:"<",closing:">"}){const n=this.escapeRegex(t.opening)+"/",o=this.escapeRegex(e),r=this.escapeRegex(t.closing);return new RegExp(n+o+r,"gim")}escapeRegex(e){return e.replace(new RegExp("[-\\/\\\\^$*+?.()|[\\]{}]","g"),"\\$&")}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(Me))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),Fe=(()=>{class c{encodeSubstrings(e){const r=[...N(e,/'/gm).filter(l=>0===l.index||"\\"!==e[l.index-1]),...N(e,/"/gm).filter(l=>0===l.index||"\\"!==e[l.index-1]),...N(e,/`/gm).filter(l=>0===l.index||"\\"!==e[l.index-1])];r.sort((l,g)=>l.index-g.index);const s=[];let i=null;for(const l of r)i?i[0]===l[0]&&(s.push({startIndex:i.index+1,endIndex:l.index}),i=null):i=l;if(null!==i)throw Error("Input parse error. String was opened, but not closed.");return this.encodeTextSegments(e,s,this.encodeStringSpecialChars)}encodeStringSpecialChars(e){return(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/'/g,"@@@singlequote@@@")).replace(/"/g,"@@@doublequote@@@")).replace(/`/g,"@@@gravequote@@@")).replace(/:/g,"@@@colon@@@")).replace(/;/g,"@@@semicolon@@@")).replace(/\./g,"@@@dot@@@")).replace(/,/g,"@@@comma@@@")).replace(/\\/g,"@@@backslash@@@")).replace(/\(/g,"@@@openRoundBracket@@@")).replace(/\)/g,"@@@closeRoundBracket@@@")).replace(/\[/g,"@@@openSquareBracket@@@")).replace(/\]/g,"@@@closeSquareBracket@@@")).replace(/\{/g,"@@@openCurlyBracket@@@")).replace(/\}/g,"@@@closeCurlyBracket@@@")}decodeStringSpecialChars(e){return(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/@@@singlequote@@@/g,"'")).replace(/@@@doublequote@@@/g,'"')).replace(/@@@gravequote@@@/g,"`")).replace(/@@@colon@@@/g,":")).replace(/@@@semicolon@@@/g,";")).replace(/@@@dot@@@/g,".")).replace(/@@@comma@@@/g,",")).replace(/@@@backslash@@@/g,"\\")).replace(/@@@openRoundBracket@@@/g,"(")).replace(/@@@closeRoundBracket@@@/g,")")).replace(/@@@openSquareBracket@@@/g,"[")).replace(/@@@closeSquareBracket@@@/g,"]")).replace(/@@@openCurlyBracket@@@/g,"{")).replace(/@@@closeCurlyBracket@@@/g,"}")}encodeSubfunctions(e){const o=[...N(e,/\(/gm),...N(e,/\)/gm)];o.sort((a,l)=>a.index-l.index);const r=[],s=[];for(const a of o)if("("===a[0])s.push(a);else{if(0===s.length)throw Error("Input parse error. Closed function bracket without opening it first.");1===s.length&&r.push({startIndex:s[0].index+1,endIndex:a.index}),s.pop()}if(0!==s.length)throw Error("Input parse error. Opened function bracket without closing it.");return this.encodeTextSegments(e,r,this.encodeFunctionBrackets)}encodeFunctionBrackets(e){return(e=e.replace(/\(/g,"@@@fnOpenBracket@@@")).replace(/\)/g,"@@@fnCloseBracket@@@")}decodeFunctionBrackets(e){return(e=e.replace(/@@@fnOpenBracket@@@/g,"(")).replace(/@@@fnCloseBracket@@@/g,")")}encodeVariableSubbrackets(e){const o=N(e,new RegExp("(?:[a-zA-Z_$\\])])(\\[)","gm")),r=[];for(const a of o){const l=e.substring(a.index+2),h=[...N(l,/\[/gm),...N(l,/\]/gm)];h.sort((v,C)=>v.index-C.index);let f=1;for(const v of h)if(f="]"===v[0]?f-1:f+1,0===f){r.push({startIndex:a.index+2,endIndex:a.index+2+v.index});break}if(0!==f)throw Error("Input parse error. Opened bracket without closing it.")}const s=[];for(const a of r)(0===s.length||s[s.length-1].endIndex<a.startIndex)&&s.push(a);return this.encodeTextSegments(e,s,this.encodeVariableBrackets)}encodeVariableBrackets(e){return(e=e.replace(/\[/g,"@@@variableOpeningBracket@@@")).replace(/\]/g,"@@@variableClosingBracket@@@")}decodeVariableBrackets(e){return(e=e.replace(/@@@variableOpeningBracket@@@/g,"[")).replace(/@@@variableClosingBracket@@@/g,"]")}transformContextVarIntoPlacerholder(e){return(e=(e=(e=(e=(e=(e="__CXT__"+e.substring(7)).replace(/\"/g,"@@@cxtDoubleQuote@@@")).replace(/\./g,"@@@cxtDot@@@")).replace(/\[/g,"@@@cxtOpenSquareBracket@@@")).replace(/\]/g,"@@@cxtCloseSquareBracket@@@")).replace(/\(/g,"@@@cxtOpenRoundBracket@@@")).replace(/\)/g,"@@@cxtCloseRoundBracket@@@")}transformPlaceholderIntoContextVar(e){return(e=(e=(e=(e=(e=(e="context"+e.substring(7)).replace(/@@@cxtDoubleQuote@@@/g,'"')).replace(/@@@cxtDot@@@/g,".")).replace(/@@@cxtOpenSquareBracket@@@/g,"[")).replace(/@@@cxtCloseSquareBracket@@@/g,"]")).replace(/@@@cxtOpenRoundBracket@@@/g,"(")).replace(/@@@cxtCloseRoundBracket@@@/g,")")}encodeTextSegments(e,t,n){const o=[];for(const i of t){const a=0===o.length?0:o[o.length-1].endIndex;o.push({type:"text",startIndex:a,endIndex:i.startIndex,string:e.substring(a,i.startIndex)}),o.push({type:"special",startIndex:i.startIndex,endIndex:i.endIndex,string:e.substring(i.startIndex,i.endIndex)})}const r=0===o.length?0:o[o.length-1].endIndex;o.push({type:"text",startIndex:r,endIndex:e.length-1,string:e.substring(r)});for(const i of o)"special"===i.type&&(i.string=n(i.string));let s="";for(const i of o)s+=i.string;return s}stripSlashes(e){return e.replace(/\\(.)/g,"$1")}escapeDoubleQuotes(e){return e.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')}static{this.\u0275fac=function(t){return new(t||c)}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),je=(()=>{class c{constructor(e,t){this.dataTypeEncoder=e,this.logger=t}evaluate(e,t={},n,o=!0,r={},s=!0,i={sanitize:!0,convertHTMLEntities:!0,fixParagraphTags:!0,updateOnPushOnly:!1,compareInputsByValue:!1,compareOutputsByValue:!1,compareByValueDepth:5,triggerDOMEvents:!1,ignoreInputAliases:!1,ignoreOutputAliases:!1,acceptInputsForAnyProperty:!1,acceptOutputsForAnyObservable:!1,logOptions:{dev:!0,prod:!1,ssr:!1}}){if("null"===e)return null;if("undefined"!==e){if("true"===e)return!0;if("false"===e)return!1;if(!isNaN(e))return parseInt(e,10);if(e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")||e.startsWith("`")&&e.endsWith("`")){let a=e.substring(1,e.length-1);return a=o?this.dataTypeEncoder.stripSlashes(a):a,a}if((e=this.encodeDataTypeString(e)).startsWith("{")&&e.endsWith("}")||e.startsWith("[")&&e.endsWith("]")){const a=this.parseAsJSON(e,o);return this.loadJSONVariables(a,t,n,o,r,s,i)}if("$event"===e)return n;if(e.match(new RegExp("^\\s*"+x.contextVariableRegex+"\\s*$","gm")))return this.loadContextVariable(e,t,n,o,r,s,i);throw Error('Data type for following input was not recognized and could not be parsed: "'+e+'"')}}encodeDataTypeString(e){return e=this.dataTypeEncoder.encodeSubstrings(e),e=this.dataTypeEncoder.encodeSubfunctions(e),this.dataTypeEncoder.encodeVariableSubbrackets(e)}decodeDataTypeString(e){return e=this.dataTypeEncoder.decodeStringSpecialChars(e),e=this.dataTypeEncoder.decodeFunctionBrackets(e),(e=this.dataTypeEncoder.decodeVariableBrackets(e)).trim()}parseAsJSON(e,t){if((e=(e=(e=e.replace(/\'(\\.|[^\'])*?\'/gm,i=>'"'+i.slice(1,-1)+'"')).replace(/\`(\\.|[^\`])*?\`/gm,i=>'"'+i.slice(1,-1)+'"')).replace(/"?([a-z0-9A-Z_]+)"?\s*:/g,'"$1": ')).match(/"?__proto__"?\s*:/g))throw Error('Setting the "__proto__" property in a hook input object is not allowed.');if(e.match(/"?prototype"?\s*:/g))throw Error('Setting the "prototype" property in a hook input object is not allowed.');if(e.match(/"?constructor"?\s*:/g))throw Error('Setting the "constructor" property in a hook input object is not allowed.');e=this.replaceValuesInJSONString(e,"undefined",i=>"null"),e=this.replaceValuesInJSONString(e,x.contextVariableRegex,i=>'"'+this.dataTypeEncoder.transformContextVarIntoPlacerholder(i)+'"'),e=this.replaceValuesInJSONString(e,"\\$event",i=>'"__EVENT__"');const s=JSON.parse(e);return this.decodeJSONStrings(s,t),s}replaceValuesInJSONString(e,t,n){return e.replace(new RegExp("(?:(:\\s*)("+t+")(?=\\s*[,}])|([\\[,]\\s*)("+t+")(?=\\s*[\\],]))","gm"),(s,i,a,l,g)=>(i||l)+n(a||g))}decodeJSONStrings(e,t){for(const n in e)if("string"==typeof e[n]){if('__EVENT__"'===e[n]||e[n].match(new RegExp("^\\s*"+x.placeholderContextVariableRegex+"\\s*$","gm")))continue;let o=this.decodeDataTypeString(e[n]);o=t?this.dataTypeEncoder.stripSlashes(o):o,e[n]=o}else"object"==typeof e[n]&&this.decodeJSONStrings(e[n],t)}loadJSONVariables(e,t,n,o,r,s,i){for(const a in e)if("string"==typeof e[a]){if("__EVENT__"===e[a])e[a]=n;else if(e[a].match(new RegExp("^\\s*"+x.placeholderContextVariableRegex+"\\s*$","gm"))){const l=this.dataTypeEncoder.transformPlaceholderIntoContextVar(e[a].trim());e[a]=this.loadContextVariable(l,t,n,o,r,s,i)}}else"object"==typeof e[a]&&this.loadJSONVariables(e[a],t,n,o,r,s,i);return e}loadContextVariable(e,t={},n,o=!0,r={},s=!0,i={sanitize:!0,convertHTMLEntities:!0,fixParagraphTags:!0,updateOnPushOnly:!1,compareInputsByValue:!1,compareOutputsByValue:!1,compareByValueDepth:5,triggerDOMEvents:!1,ignoreInputAliases:!1,ignoreOutputAliases:!1,acceptInputsForAnyProperty:!1,acceptOutputsForAnyObservable:!1,logOptions:{dev:!0,prod:!1,ssr:!1}}){try{const a=e.substring(7);if(""===a.trim())return t;const l=[],g=N(a,new RegExp(x.variablePathPartRegex,"gm"));for(const u of g){if(u[0].startsWith(".")&&l.push({type:"property",value:u[0].substring(1)}),u[0].startsWith("[")&&u[0].endsWith("]")){let h=u[0].substring(1,u[0].length-1);h=this.decodeDataTypeString(h),h=this.evaluate(h,t,n,o,r,s),l.push({type:"property",value:h})}if(u[0].startsWith("(")&&u[0].endsWith(")")){if(!s)throw Error("Tried to call a function in a context variable. This has been disallowed in the current config.");const h=u[0].substring(1,u[0].length-1),f=[];if(""!==h)for(const v of h.split(",")){let C=this.decodeDataTypeString(v);C=this.evaluate(C,t,n,o,r,s),f.push(C)}l.push({type:"function",value:f})}}try{const u=this.fetchContextVariable(t,l);return r[this.decodeDataTypeString(e)]=u,u}catch{throw Error('The required context variable "'+this.decodeDataTypeString(e)+'" could not be found in the context object. Returning undefined instead.')}}catch(a){return this.logger.warn([a],i),void(r[this.decodeDataTypeString(e)]=void 0)}}fetchContextVariable(e,t){if("__proto__"===t[0].value)throw Error("Accessing the __proto__ property through a context variable is not allowed.");if("prototype"===t[0].value)throw Error("Accessing the prototype property through a context variable is not allowed.");if("constructor"===t[0].value)throw Error("Accessing the constructor property through a context variable is not allowed.");if(void 0===e)throw Error("Context variable path could not be resolved. Trying to access "+("property"===t[0].type?'property "'+t[0].value+'" of undefined.':"undefined function."));let n;return"property"===t[0].type?e.hasOwnProperty(t[0].value)?(n=e[t[0].value],"function"==typeof n&&(n=n.bind(e))):e.__proto__.hasOwnProperty(t[0].value)?(n=e.__proto__[t[0].value],"function"==typeof n&&(n=n.bind(e))):n=void 0:"function"===t[0].type&&(n=e(...t[0].value)),t.shift(),t.length>0&&(n=this.fetchContextVariable(n,t)),n}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(Fe),d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),We=(()=>{class c{constructor(e,t){this.dataTypeParser=e,this.logger=t}checkInputBindings(e,t,n,o){for(const[r,s]of Object.entries(e))if(n.parseInputs)if(s.parsed)this.updateInputBindingIfStale(s,t,n);else try{s.value=this.dataTypeParser.evaluate(s.raw,n.allowContextInBindings?t:{},void 0,n.unescapeStrings,s.boundContextVariables,n.allowContextFunctionCalls,o),s.parsed=!0}catch(i){this.logger.error(["Hook input parsing error\nselector: "+n.selector+"\ninput: "+r+'\nvalue: "'+s.value+'"'],o),this.logger.error([i.stack],o),delete e[r]}else s.value=s.raw}updateInputBindingIfStale(e,t,n){if(Object.keys(e.boundContextVariables).length>0){let o=!1;for(const[r,s]of Object.entries(e.boundContextVariables)){const i=this.dataTypeParser.encodeDataTypeString(r);if(this.dataTypeParser.loadContextVariable(i,t,void 0,n.unescapeStrings,{},n.allowContextFunctionCalls)!==s){o=!0;break}}o&&(e.boundContextVariables={},e.value=this.dataTypeParser.evaluate(e.raw,n.allowContextInBindings?t:{},void 0,n.unescapeStrings,e.boundContextVariables,n.allowContextFunctionCalls))}}checkOutputBindings(e,t,n){for(const[o,r]of Object.entries(e))r.parsed||(r.value=(s,i)=>{try{this.dataTypeParser.evaluate(r.raw,t.allowContextInBindings?i:{},s,t.unescapeStrings,r.boundContextVariables,t.allowContextFunctionCalls)}catch(a){this.logger.error(["Hook output parsing error\nselector: "+t.selector+"\noutput: "+o+'\nvalue: "'+r.value+'"'],n),this.logger.error([a.stack],n)}},r.parsed=!0)}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(je),d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),$e=(()=>{class c{constructor(e,t,n,o,r,s){this.injector=e,this.parserResolver=t,this.platformService=n,this.tagHookFinder=o,this.bindingsValueManager=r,this.logger=s}resolve(e,t,n,o,r){const s=[];for(const l of e){const g=this.resolveEntry(l,t,r);g&&s.push(g)}const i=this.validateParserFunctions(s,r);if(this.checkParserNames(i,r),!n&&!o)return i;this.checkBlackAndWhitelist(i,n,o,r);const a=[];for(const l of i)l.hasOwnProperty("name")&&"string"==typeof l.name&&(n&&n.includes(l.name)||o&&!o.includes(l.name))||a.push(l);return a}resolveEntry(e,t,n){if(e.hasOwnProperty("prototype")){if((0,T.HJs)(e))return this.createSelectorHookParser({component:e});try{return t.get(e)}catch{return new e}}else if("object"==typeof e){if("Object"!==e.constructor.name)return e;try{return this.createSelectorHookParser(e)}catch(o){return this.logger.error(["Invalid parser config - "+o.message,e],n),null}}return this.logger.error(["Invalid parser config - ",e],n),null}createSelectorHookParser(e){return e.hasOwnProperty("parseWithRegex")&&e.parseWithRegex||e.hasOwnProperty("enclosing")&&!e.enclosing||e.hasOwnProperty("bracketStyle")&&e.bracketStyle?new Ae(e,this.parserResolver,this.tagHookFinder,this.bindingsValueManager):new Ne(e,this.parserResolver,this.platformService,this.bindingsValueManager)}validateParserFunctions(e,t){const n=[];for(const o of e)"function"==typeof o.findHooks||"function"==typeof o.findHookElements?"function"==typeof o.loadComponent?"function"==typeof o.getBindings?n.push(o):this.logger.error(['Submitted parser does not implement "getBindings()". Removing from list of active parsers:',o],t):this.logger.error(['Submitted parser does not implement "loadComponent()". Removing from list of active parsers:',o],t):this.logger.error(['Submitted parser neither implements "findHooks()" nor "findHookElements()". One is required. Removing from list of active parsers:',o],t);return n}checkParserNames(e,t){const n=e.map(s=>s.name).filter(s=>void 0!==s),o=[],r=[];for(const s of n)o.includes(s)&&!r.includes(s)&&(this.logger.warn(['Parser name "'+s+'" is not unique and appears multiple times in the list of active parsers.'],t),r.push(s)),o.push(s)}checkBlackAndWhitelist(e,t,n,o){const r=e.map(s=>s.name).filter(s=>void 0!==s);if(t)for(const s of t)r.includes(s)||this.logger.warn(['Blacklisted parser name "'+s+'" does not appear in the list of global parsers names. Make sure both spellings are identical.'],o);if(n)for(const s of n)r.includes(s)||this.logger.warn(['Whitelisted parser name "'+s+'" does not appear in the list of global parsers names. Make sure both spellings are identical.'],o)}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(d.zZn),d.KVO(De),d.KVO(K),d.KVO(He),d.KVO(We),d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),Le=(()=>{class c{constructor(e){this.parserEntryResolver=e}resolve(e,t,n,o,r,s=null,i=null,a=null,l=null){let g={};n=n||[],o=o||[];const u={options:{sanitize:!0,convertHTMLEntities:!0,fixParagraphTags:!0,updateOnPushOnly:!1,compareInputsByValue:!1,compareOutputsByValue:!1,compareByValueDepth:5,triggerDOMEvents:!1,ignoreInputAliases:!1,ignoreOutputAliases:!1,acceptInputsForAnyProperty:!1,acceptOutputsForAnyObservable:!1,logOptions:{dev:!0,prod:!1,ssr:!1}}};g=(r=r||{}).hasOwnProperty("inheritance")&&r.inheritance!==te.Linear?this.mergeSettings(r.inheritance===te.All?[u,...n,...o,{options:i||void 0}]:[u,r||{},{options:i||void 0}]):this.mergeSettings([u,...o,{parsers:s||void 0,options:i||void 0}]);const h=g.options;t&&"string"!=typeof t&&(h.sanitize=!1);let f=[];return s?f=this.parserEntryResolver.resolve(s,e,null,null,h):g.parsers&&(f=this.parserEntryResolver.resolve(g.parsers,e,a,l,h)),{parsers:f,options:h}}mergeSettings(e){const t={};for(const n of e){if(void 0!==n.parsers){void 0===t.parsers&&(t.parsers=[]);for(const o of n.parsers)t.parsers.includes(o)||t.parsers.push(o)}void 0!==n.options&&(void 0===t.options&&(t.options={}),t.options=this.recursiveAssign(t.options,n.options))}return t}recursiveAssign(e,t){if(Object(t)!==t)return t;Object(e)!==e&&(e={});for(const n in t)e[n]=this.recursiveAssign(e[n],t[n]);return e}static{this.\u0275fac=function(t){return new(t||c)(d.KVO($e))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})();const he="_ngx_dynamic_hooks_node_placeholder";let ze=(()=>{class c{constructor(e,t){this.platformService=e,this.logger=t}findInElement(e,t,n,o,r,s){for(const i of n)if("function"==typeof i.findHooks){this.checkElement(e,t,n,o,r,s);break}}checkElement(e,t,n,o,r,s,i={counter:0,nodes:{}}){let a=this.platformService.getChildNodes(e),l="";const g={};for(const f of a)if(this.platformService.isTextNode(f))l+=this.platformService.getTextContent(f);else{const v=i.counter++;l+=`${he}__${v}__`,g[v]=f}const u=Object.keys(s).length,h=this.find(l,t,n,o,r,s);if(Object.keys(s).length>u&&(this.platformService.clearChildNodes(e),this.platformService.setInnerContent(e,h.content),a=this.platformService.getChildNodes(e),i.nodes={...i.nodes,...g}),Object.keys(i.nodes).length)for(const f of a)if(this.platformService.isTextNode(f)){let v=this.platformService.getTextContent(f);if(v){const C=N(v,new RegExp(`${he}__(\\d*)__`,"g"));if(C.length){const k=[];let z=0;for(const _ of C){const xe=v.substring(z,_.index),X=parseInt(_[1]);xe&&k.push(this.platformService.createTextNode(xe)),X&&i.nodes[X]&&(k.push(i.nodes[X]),delete i.nodes[X]),z=_.index+_[0].length}const be=v.substring(z);be&&k.push(this.platformService.createTextNode(be));const ie=this.platformService.getParentNode(f);for(const _ of k)this.platformService.insertBefore(ie,_,f);this.platformService.removeChild(ie,f),a=this.platformService.getChildNodes(ie)}}}for(const f of a)f.nodeType!==Node.TEXT_NODE&&this.checkElement(f,t,n,o,r,s,i)}find(e,t,n,o,r,s){if(""===e)return{content:e,hookIndex:s};r.convertHTMLEntities&&(e=this.convertHTMLEntities(e));let i=[];for(const l of n)if("function"==typeof l.findHooks)for(const g of l.findHooks(e,t,r))i.push({parser:l,hookPosition:g});i.sort((l,g)=>l.hookPosition.openingTagStartIndex-g.hookPosition.openingTagStartIndex),i=this.validateHookPositions(i,e,r);const a=[];for(const l of i){const g=Object.keys(s).length+1,u=this.getHookSegments(l.hookPosition,e);if(a.push({startIndex:l.hookPosition.openingTagStartIndex,endIndex:l.hookPosition.openingTagEndIndex,replacement:`<${ee} ${B}="${g}" ${P}="${o}">`}),a.push({startIndex:u.enclosing?l.hookPosition.closingTagStartIndex:l.hookPosition.openingTagEndIndex,endIndex:u.enclosing?l.hookPosition.closingTagEndIndex:l.hookPosition.openingTagEndIndex,replacement:`</${ee}>`}),s[g]={id:g,parser:l.parser,value:{openingTag:u.openingTag,closingTag:u.closingTag,element:null,elementSnapshot:null},data:null,isLazy:!1,bindings:null,previousBindings:null,componentRef:null,dirtyInputs:new Set,outputSubscriptions:{},htmlEventSubscriptions:{}},u.enclosing&&r.fixParagraphTags){const h=this.removeTagArtifacts(u.textBefore,"<p>","</p>",u.innerValue,"</p>","<p>");u.textBefore=h.firstText,u.innerValue=h.secondText;const f=this.removeTagArtifacts(u.innerValue,"<p>","</p>",u.textAfter,"</p>","<p>");u.innerValue=f.firstText,u.textAfter=f.secondText,e=u.textBefore+u.openingTag+u.innerValue+u.closingTag+u.textAfter}}a.sort((l,g)=>{let u=g.startIndex-l.startIndex;return 0===u&&(u=g.endIndex-l.endIndex),u});for(const l of a){const g=e.substring(0,l.startIndex),u=e.substring(l.endIndex);e=g+l.replacement+u}return{content:e,hookIndex:s}}getHookSegments(e,t){const n=Number.isInteger(e.closingTagStartIndex)&&Number.isInteger(e.closingTagEndIndex);return{enclosing:n,textBefore:t.substring(0,e.openingTagStartIndex),openingTag:t.substring(e.openingTagStartIndex,e.openingTagEndIndex),innerValue:n?t.substring(e.openingTagEndIndex,e.closingTagStartIndex):null,closingTag:n?t.substring(e.closingTagStartIndex,e.closingTagEndIndex):null,textAfter:t.substring(n?e.closingTagEndIndex:e.openingTagEndIndex)}}validateHookPositions(e,t,n){const o=[];e:for(const[r,s]of e.entries()){const i=Number.isInteger(s.hookPosition.closingTagStartIndex)&&Number.isInteger(s.hookPosition.closingTagEndIndex),a=s.hookPosition;if(a.openingTagStartIndex>=a.openingTagEndIndex){this.logger.warn(["Text hook error: openingTagEndIndex has to be greater than openingTagStartIndex. Ignoring.",a],n);continue}if(i&&a.openingTagEndIndex>a.closingTagStartIndex){this.logger.warn(["Text hook error: closingTagStartIndex has to be greater than openingTagEndIndex. Ignoring.",a],n);continue}if(i&&a.closingTagStartIndex>=a.closingTagEndIndex){this.logger.warn(["Text hook error: closingTagEndIndex has to be greater than closingTagStartIndex. Ignoring.",a],n);continue}const l=e.slice(0,r);for(const g of l){const u=g.hookPosition,h=Number.isInteger(u.closingTagStartIndex)&&Number.isInteger(u.closingTagEndIndex);if(a.openingTagStartIndex===u.openingTagStartIndex&&a.openingTagEndIndex===u.openingTagEndIndex&&(!i||!h||a.closingTagStartIndex===u.closingTagStartIndex&&a.closingTagEndIndex===u.closingTagEndIndex)){this.generateHookPosWarning("A text hook with the same position as another text hook was found. There may be multiple parsers looking for the same text pattern. Ignoring duplicates.",a,u,t,n);continue e}if(a.openingTagStartIndex<u.openingTagEndIndex){this.generateHookPosWarning("Text hook error: Hook opening tag starts before previous hook opening tag ends. Ignoring.",a,u,t,n);continue e}if(h&&!(a.openingTagEndIndex<=u.closingTagStartIndex||a.openingTagStartIndex>=u.closingTagEndIndex)){this.generateHookPosWarning("Text hook error: Opening tag of hook overlaps with closing tag of previous hook. Ignoring.",a,u,t,n);continue e}if(h&&i&&!(a.closingTagEndIndex<=u.closingTagStartIndex||a.closingTagStartIndex>=u.closingTagEndIndex)){this.generateHookPosWarning("Text hook error: Closing tag of hook overlaps with closing tag of previous hook. Ignoring.",a,u,t,n);continue e}if(i&&h&&a.openingTagEndIndex<=u.closingTagStartIndex&&a.closingTagStartIndex>=u.closingTagEndIndex){this.generateHookPosWarning("Text hook error: The closing tag of a nested hook lies beyond the closing tag of the outer hook. Ignoring.",a,u,t,n);continue e}}o.push(s)}return o}generateHookPosWarning(e,t,n,o,r){const s=this.getHookSegments(n,o),i=this.getHookSegments(t,o);this.logger.warn([e+"\nFirst hook: ",{openingTag:s.openingTag,openingTagStartIndex:n.openingTagStartIndex,openingTagEndIndex:n.openingTagEndIndex,closingTag:s.closingTag,closingTagStartIndex:n.closingTagStartIndex,closingTagEndIndex:n.closingTagEndIndex},"\nSecond hook:",{openingTag:i.openingTag,openingTagStartIndex:t.openingTagStartIndex,openingTagEndIndex:t.openingTagEndIndex,closingTag:i.closingTag,closingTagStartIndex:t.closingTagStartIndex,closingTagEndIndex:t.closingTagEndIndex}],r)}removeTagArtifacts(e,t,n,o,r,s){let i=!1,a=!1;const l=e.lastIndexOf(t),g=e.lastIndexOf(n);(l>=0&&-1===g||l>g)&&(i=!0);const u=o.indexOf(r),h=o.indexOf(s);return(u>=0&&-1===h||u<h)&&(a=!0),i&&a&&(e=e.substring(0,l)+" ".repeat(t.length)+e.substring(l+t.length),o=o.substring(0,u)+" ".repeat(r.length)+o.substring(u+r.length)),{firstText:e,secondText:o}}convertHTMLEntities(e){const t=this.platformService.createElement("div");return e.replace(/&[#A-Za-z0-9]+;/gi,o=>"&nbsp;"===o?" ":(this.platformService.setInnerContent(t,o),this.platformService.getTextContent(t)))}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(K),d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),Ke=(()=>{class c{constructor(e,t){this.platformService=e,this.logger=t}find(e,t,n,o,r,s){let i=[];for(const a of n)if("function"==typeof a.findHookElements)for(const l of a.findHookElements(e,t,r))i.push({parser:a,hookElement:l});i=function Re(c,p,e){return[...c].sort(function(n,o){return"function"==typeof e&&(n=e(n),o=e(o)),p(n,o)})}(i,this.platformService.sortElements.bind(this.platformService),a=>a.hookElement),i=this.validateHookElements(i,e,r);for(const a of i){const l=Object.keys(s).length+1;s[l]={id:l,parser:a.parser,value:{openingTag:this.platformService.getOpeningTag(a.hookElement),closingTag:this.platformService.getClosingTag(a.hookElement),element:a.hookElement,elementSnapshot:this.platformService.cloneElement(a.hookElement)},data:null,isLazy:!1,bindings:null,previousBindings:null,componentRef:null,dirtyInputs:new Set,outputSubscriptions:{},htmlEventSubscriptions:{}},this.platformService.setAttribute(a.hookElement,B,l.toString()),this.platformService.setAttribute(a.hookElement,P,o)}return s}validateHookElements(e,t,n){const o=[];for(const[r,s]of e.entries())o.slice(0,r).findIndex(l=>l.hookElement===s.hookElement)>=0||this.platformService.getAttributeNames(s.hookElement).includes(B)||this.platformService.getAttributeNames(s.hookElement).includes(P)?this.logger.warn(["An element hook tried to use an element that was found by another hook before. There may be multiple parsers looking for the same elements. Ignoring duplicates.",s.hookElement],n):oe(s.hookElement)||o.push(s);return o}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(K),d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})();const re="dynamic-hooks-sanitization-placeholder",_e=new RegExp(`</?${re}.*?>`,"g");let Ue=(()=>{class c{constructor(e){this.platformService=e,this.attrWhitelist=[B,P,"class","href","src"]}sanitize(e,t,n){const o={};for(const a of Object.values(t)){const l=this.platformService.querySelectorAll(e,`[${B}="${a.id}"][${P}="${n}"]`)?.[0];if(l){o[a.id]=l;const g=this.platformService.getParentNode(l),u=this.platformService.getChildNodes(l),h=this.platformService.createElement(re);this.platformService.setAttribute(h,B,a.id.toString()),this.platformService.setAttribute(h,P,n),this.platformService.insertBefore(g,h,l),this.platformService.removeChild(g,l);for(const f of u)this.platformService.appendChild(h,f)}}let r=this.platformService.getInnerContent(e);r=this.findAndEncodeTags(r,_e);const s=console.warn;console.warn=()=>{};let i=this.platformService.sanitize(r);console.warn=s,i=this.decodeTagString(i),e.innerHTML=i||"";for(const[a,l]of Object.entries(o)){const g=this.platformService.querySelectorAll(e,`${re}[${B}="${a}"]`)?.[0];if(g){const u=this.platformService.getParentNode(g),h=this.platformService.getChildNodes(g);this.platformService.insertBefore(u,l,g),this.platformService.removeChild(u,g);for(const f of h)this.platformService.appendChild(l,f);this.sanitizeElementAttrs(l)}}return e}sanitizeElementAttrs(e){const t=this.platformService.getAttributeNames(e),n=this.platformService.createElement("div"),o=this.platformService.createElement("span");this.platformService.appendChild(n,o);for(const i of t){try{this.platformService.setAttribute(o,i,this.platformService.getAttribute(e,i))}catch{}try{i!==B&&i!==P&&this.platformService.removeAttribute(e,i)}catch{}}n.innerHTML=this.platformService.sanitize(this.platformService.getInnerContent(n));const r=this.platformService.querySelectorAll(n,"span")[0],s=this.platformService.getAttributeNames(r);for(const i of s)try{this.platformService.setAttribute(e,i,this.platformService.getAttribute(r,i))}catch{}return e}findAndEncodeTags(e,t){let n=e;const o=N(e,t);o.sort((r,s)=>s.index-r.index);for(const r of o){const s=r.index,i=r.index+r[0].length,a=n.substring(0,s),l=this.encodeTagString(n.substring(s,i)),g=n.substring(i);n=a+l+g}return n}encodeTagString(e){return(e=(e=e.replace(/</g,"@@@hook-lt@@@")).replace(/>/g,"@@@hook-gt@@@")).replace(/"/g,"@@@hook-dq@@@")}decodeTagString(e){return(e=(e=e.replace(/@@@hook-lt@@@/g,"<")).replace(/@@@hook-gt@@@/g,">")).replace(/@@@hook-dq@@@/g,'"')}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(K))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),qe=(()=>{class c{constructor(e){this.logger=e}isEqual(e,t,n,o={sanitize:!0,convertHTMLEntities:!0,fixParagraphTags:!0,updateOnPushOnly:!1,compareInputsByValue:!1,compareOutputsByValue:!1,compareByValueDepth:5,triggerDOMEvents:!1,ignoreInputAliases:!1,ignoreOutputAliases:!1,acceptInputsForAnyProperty:!1,acceptOutputsForAnyObservable:!1,logOptions:{dev:!0,prod:!1,ssr:!1}}){const r=this.detailedStringify(e,n),s=this.detailedStringify(t,n);return null===r.result||null===s.result?(this.logger.warn(["Objects could not be compared by value as one or both of them could not be stringified. Returning false. \n","Objects:",e,t],o),!1):r.result===s.result}detailedStringify(e,t){try{const n={count:0},o=this.decycle(e,[],t,n);return{result:JSON.stringify(o,(s,i)=>void 0===i?"undefined":"function"==typeof i||"symbol"==typeof i?i.toString():i),depthReachedCount:n.count}}catch{return{result:null,depthReachedCount:0}}}decycle(e,t=[],n=5,o){if(t.length>n)return o.count++,null;if(!e||"object"!=typeof e||e instanceof Date)return e;for(const s of t)if(this.objEqualsProperties(e,s))return null;const r=t.concat([e]);if(Array.isArray(e)){const s=[];for(const i of e)s.push(this.decycle(i,r,n,o));return s}{const s={};for(const i of Object.keys(e))s[i]=this.decycle(e[i],r,n,o);return s}}objEqualsProperties(e,t){const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(const r of n)if(e[r]!==t[r])return!1;return!0}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),ge=(()=>{class c{constructor(e,t){this.deepComparer=e,this.logger=t}refresh(e,t,n,o){for(const[r,s]of Object.entries(e))this.updateBindings(s,t,n);if(o)for(const r of Object.values(e)){if(!r.componentRef)return;"function"==typeof r.componentRef.instance.onDynamicChanges&&r.componentRef.instance.onDynamicChanges({context:t})}}updateBindings(e,t,n){e.componentRef&&(e.bindings=e.parser.getBindings(e.id,e.value,t,n),this.updateComponentWithNewInputs(e,n),this.updateComponentWithNewOutputs(e,t,n),e.previousBindings={inputs:this.savePreviousBindings(e,"inputs",n.compareInputsByValue,n.compareByValueDepth),outputs:this.savePreviousBindings(e,"outputs",n.compareOutputsByValue,n.compareByValueDepth)})}savePreviousBindings(e,t,n,o){const r={};if(e.bindings.hasOwnProperty(t))for(const[s,i]of Object.entries(e.bindings[t]))r[s]={reference:i,stringified:n?this.deepComparer.detailedStringify(i,o):null};return r}updateComponentWithNewInputs(e,t){const n=e.componentRef.instance,o=this.getChangedBindings(e,"inputs",t),r=[],s=(0,T.HJs)(e.componentRef.componentType);for(const[i,a]of Object.entries(o)){const l=t.ignoreInputAliases?"propName":"templateName",g=s.inputs.find(u=>i===u[l])||s.inputs.find(u=>i.toLowerCase()===u[l].toLowerCase())||s.inputs.find(u=>i.replace(/-/g,"")===u[l])||s.inputs.find(u=>i.replace(/-/g,"").toLowerCase()===u[l].toLowerCase());if(g)r.push({propName:g.propName,templateName:g.templateName,value:a});else if(t.acceptInputsForAnyProperty){const h=Object.getOwnPropertyNames(n).find(f=>i===f)||Object.getOwnPropertyNames(n).find(f=>i.toLowerCase()===f.toLowerCase())||i;if(["__proto__","prototype","constructor"].includes(h)){this.logger.error(['Tried to overwrite a __proto__, prototype or constructor property with input "'+h+'" for hook "'+e.componentRef.componentType.name+'". This is not allowed.'],t);continue}r.push({propName:h,templateName:null,value:a})}}for(const{propName:i,templateName:a,value:l}of r)a?e.componentRef?.setInput(a,l):i&&(e.componentRef.instance[i]=l);r.length&&e.componentRef?.changeDetectorRef.detectChanges()}updateComponentWithNewOutputs(e,t,n){const o=e.componentRef.instance,r=this.getChangedBindings(e,"outputs",n),s=[],i=(0,T.HJs)(e.componentRef.componentType);for(const[a,l]of Object.entries(r)){const g=n.ignoreOutputAliases?"propName":"templateName",u=i.outputs.find(h=>a===h[g])||i.outputs.find(h=>a.toLowerCase()===h[g].toLowerCase())||i.outputs.find(h=>a.replace(/-/g,"")===h[g])||i.outputs.find(h=>a.replace(/-/g,"").toLowerCase()===h[g].toLowerCase());if(u)s.push({propName:u.propName,templateName:u.templateName,value:l});else if(n.acceptOutputsForAnyObservable){let h=Object.getOwnPropertyNames(o).find(f=>o[f]instanceof H.c&&a===f)||Object.getOwnPropertyNames(o).find(f=>o[f]instanceof H.c&&a.toLowerCase()===f.toLowerCase());h&&s.push({propName:h,templateName:null,value:l})}}for(const{propName:a,value:g}of s)e.outputSubscriptions[a]&&e.outputSubscriptions[a].unsubscribe(),e.outputSubscriptions[a]=e.componentRef.instance[a].subscribe(u=>{g(u,t)})}getChangedBindings(e,t,n){const o={};if(e.bindings.hasOwnProperty(t))for(const[r,s]of Object.entries(e.bindings[t]))if(e.previousBindings&&e.previousBindings[t].hasOwnProperty(r))if("inputs"===t?n.compareInputsByValue:n.compareOutputsByValue){const i=this.deepComparer.detailedStringify(s,n.compareByValueDepth);this.checkDetailedStringifyResultPair(r,e.componentRef.componentType.name,n,e.previousBindings[t][r].stringified,i)?i.result!==e.previousBindings[t][r].stringified.result&&(o[r]=s):s!==e.previousBindings[t][r].reference&&(o[r]=s)}else s!==e.previousBindings[t][r].reference&&(o[r]=s);else o[r]=s;return o}checkDetailedStringifyResultPair(e,t,n,o,r){return null===o.result&&null===r.result?(this.logger.warn(['Could stringify neither new nor old value for hook binding "'+e+'" for component "'+t+'" to compare by value. Defaulting to comparison by reference instead.'],n),!1):null===o.result?(this.logger.warn(['Could not stringify old value for hook binding "'+e+'" for component "'+t+'" to compare by value. Defaulting to comparison by reference instead.'],n),!1):null===r.result?(this.logger.warn(['Could not stringify new value for hook binding "'+e+'" for component "'+t+'" to compare by value. Defaulting to comparison by reference instead.'],n),!1):(o.depthReachedCount>0&&r.depthReachedCount>0?this.logger.warn(["Maximum compareByValueDepth of "+n.compareByValueDepth+" reached "+r.depthReachedCount+" time(s) for new value and "+o.depthReachedCount+' time(s) for old value while comparing binding "'+e+'" for component "'+t+".\n","If this impacts performance, consider simplifying this binding, reducing comparison depth or setting compareInputsByValue/compareOutputsByValue to false."],n):o.depthReachedCount>0?this.logger.warn(["Maximum compareByValueDepth of "+n.compareByValueDepth+" reached "+o.depthReachedCount+' time(s) for old value while comparing binding "'+e+'" for component "'+t+".\n","If this impacts performance, consider simplifying this binding, reducing comparison depth or setting compareInputsByValue/compareOutputsByValue to false."],n):r.depthReachedCount>0&&this.logger.warn(["Maximum compareByValueDepth of "+n.compareByValueDepth+" reached "+r.depthReachedCount+' time(s) for new value while comparing binding "'+e+'" for component "'+t+".\n","If this impacts performance, consider simplifying this binding, reducing comparison depth or setting compareInputsByValue/compareOutputsByValue to false."],n),!0)}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(qe),d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),Qe=(()=>{class c{constructor(e,t,n,o,r){this.platformId=e,this.appRef=t,this.componentUpdater=n,this.platformService=o,this.logger=r}init(e,t,n,o,r,s,i){const a=new M.m(1),l=[],g={};if(0===Object.keys(t).length)return a.next(!0),a;for(let h of this.platformService.querySelectorAll(e,`[${B}][${P}]`)){const f=parseInt(this.platformService.getAttribute(h,B));if(0===this.platformService.querySelectorAll(e,`[${B}="${f}"][${P}="${n}"]`).length){delete t[f];continue}const v=t[f];v.data=v.parser.loadComponent(v.id,v.value,o,this.platformService.getChildNodes(h),r),v.isLazy=v.data.component.hasOwnProperty("importPromise")&&v.data.component.hasOwnProperty("importName"),(0,G.UE)(this.platformId)||!v.isLazy?(!v.data.hostElementTag&&Be.includes(this.platformService.getTagName(h).toLowerCase())&&(v.data.hostElementTag=ee),v.data.hostElementTag&&(h=this.useCustomHostElement(h,v.data.hostElementTag),v.value.element=h),this.createContentSlotElements(h,v,n),g[f]=h):delete t[f]}const u=Object.keys(g).map(h=>parseInt(h));for(const[h,f]of Object.entries(t))u.includes(parseInt(h))||(this.logger.warn(["Error when trying to load components - The anchor element for the following hook was found initially, but could not be found again for loading the component. Ignoring.",f],r),delete t[h]);for(const[h,f]of Object.entries(g)){const v=t[h];l.push((0,w.of)(!0).pipe((0,D.Z)(()=>this.loadComponentClass(v.data.component))).pipe((0,j.M)(C=>{const k=this.extractContentSlotElements(f,n);this.createComponent(v,o,f,k,r,C,s,i)})).pipe((0,m.W)(C=>(this.logger.error([C.stack],r),delete t[v.id],(0,w.of)(null)))))}return 0===l.length?(a.next(!0),a):((0,E.z)([...l]).pipe(ae()).subscribe(()=>{for(const h of Object.values(t)){const f=[];("function"==typeof h.componentRef.instance.onDynamicMount||"function"==typeof h.componentRef.instance.onDynamicChanges)&&this.findContentChildren(h.componentRef.location.nativeElement,f,t,n),"function"==typeof h.componentRef.instance.onDynamicChanges&&h.componentRef.instance.onDynamicChanges({contentChildren:f}),"function"==typeof h.componentRef.instance.onDynamicMount&&h.componentRef.instance.onDynamicMount({context:o,contentChildren:f})}for(const h of Object.values(g))this.platformService.removeAttribute(h,B),this.platformService.removeAttribute(h,P),this.platformService.removeAttribute(h,"ng-version");a.next(!0)}),a)}useCustomHostElement(e,t){const n=this.platformService.createElement(t);this.platformService.setAttribute(n,B,this.platformService.getAttribute(e,B)),this.platformService.setAttribute(n,P,this.platformService.getAttribute(e,P)),this.platformService.removeAttribute(e,B),this.platformService.removeAttribute(e,P);const o=this.platformService.getChildNodes(e);for(const r of o)this.platformService.appendChild(n,r);return this.platformService.insertBefore(this.platformService.getParentNode(e),n,e),this.platformService.removeChild(this.platformService.getParentNode(e),e),n}createContentSlotElements(e,t,n){let o;o=t.data.hasOwnProperty("content")&&Array.isArray(t.data.content)?t.data.content:[this.platformService.getChildNodes(e)],this.platformService.clearChildNodes(e);for(const[r,s]of o.entries())if(null!=s){const i=this.platformService.createElement("dynamic-component-contentslot");this.platformService.setAttribute(i,"slotIndex",r.toString()),this.platformService.setAttribute(i,"parsetoken",n);for(const a of s)this.platformService.appendChild(i,a);this.platformService.appendChild(e,i)}}extractContentSlotElements(e,t){const n=[],o=this.platformService.getChildNodes(e).filter(r=>"DYNAMIC-COMPONENT-CONTENTSLOT"===this.platformService.getTagName(r)&&this.platformService.getAttribute(r,"parsetoken")===t);for(const r of o){const s=this.platformService.getAttribute(r,"slotIndex");n[parseInt(s)]=this.platformService.getChildNodes(r)}return this.platformService.clearChildNodes(e),n}loadComponentClass(e){const t=new M.m(1);if(e.hasOwnProperty("prototype"))t.next(e);else if("function"==typeof e)e().then(n=>{t.next(n)});else{if(!e.hasOwnProperty("importPromise")||!e.hasOwnProperty("importName"))throw Error('The "component" property of a returned HookData object must either contain the component class, a function that returns a promise with the component class or an explicit LazyLoadComponentConfig');if(e.importPromise instanceof Promise)throw Error('When lazy-loading a component, the "importPromise"-field must contain a function returning the import-promise, but it contained the promise itself.');e.importPromise().then(n=>{const o=e.importName,r=Object.prototype.hasOwnProperty.call(n,o)?n[o]:n.default;t.next(r)})}return t}createComponent(e,t,n,o,r,s,i,a){const l=(0,T.a0P)(s,{hostElement:n,environmentInjector:e.data.environmentInjector||i,elementInjector:e.data.injector||a,projectableNodes:o});e.componentRef=l,this.mapOutputsToHTMLEvents(e,r),this.componentUpdater.updateBindings(e,t,r),"function"==typeof e.componentRef.instance.onDynamicChanges&&void 0!==t&&e.componentRef.instance.onDynamicChanges({context:t}),this.appRef.attachView(l.hostView),l.changeDetectorRef.detectChanges()}mapOutputsToHTMLEvents(e,t){const n=(0,T.HJs)(e.componentRef.componentType);for(const o of n.outputs){const r=t.ignoreOutputAliases?o.propName:o.templateName;e.htmlEventSubscriptions[r]=e.componentRef.instance[o.propName].subscribe(s=>{t.triggerDOMEvents&&this.platformService.dispatchEvent(e.componentRef?.location.nativeElement,r,s)})}}findContentChildren(e,t=[],n,o){const r=this.platformService.getChildNodes(e);null!=r&&r.length>0&&r.forEach((s,i)=>{let a=!1;const l=this.platformService.getAttribute(s,P);if(null!==l&&l===o&&this.platformService.getAttribute(s,B)){const u=parseInt(this.platformService.getAttribute(s,B),10);n.hasOwnProperty(u)&&(t.push({componentRef:n[u].componentRef,contentChildren:[],hookValue:n[u].value}),a=!0)}this.findContentChildren(s,a?t[t.length-1].contentChildren:t,n,o)})}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(S.Agw),d.KVO(S.o8S),d.KVO(ge),d.KVO(K),d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),fe=(()=>{class c{constructor(e,t,n,o,r,s,i,a,l,g,u){this.allSettings=e,this.ancestorSettings=t,this.moduleSettings=n,this.settingsResolver=o,this.textHookFinder=r,this.elementHookFinder=s,this.contentSanitizer=i,this.componentCreator=a,this.platformService=l,this.environmentInjector=g,this.injector=u}parse(e=null,t=null,n=null,o=null,r=null,s=null,i=null,a={},l=null,g=null){const u=l||this.environmentInjector,h=g||this.injector,{parsers:f,options:v}=this.settingsResolver.resolve(h,e,this.allSettings,this.ancestorSettings,this.moduleSettings,t,o,r,s);if(!e)return(0,w.of)({element:i||this.platformService.createElement("div"),hookIndex:a,context:n,usedParsers:f,usedOptions:v,usedInjector:h,usedEnvironmentInjector:u,destroy:()=>this.destroy(a)});const C=Math.random().toString(36).substring(2,12);let k="string"==typeof e?this.platformService.createElement("div"):e;if(this.platformService.setAttribute(k,q,"1"),"string"==typeof e){const z=this.textHookFinder.find(e,n,f,C,v,a);this.platformService.setInnerContent(k,z.content)}else this.textHookFinder.findInElement(k,n,f,C,v,a);if(a=this.elementHookFinder.find(k,n,f,C,v,a),v?.sanitize&&this.contentSanitizer.sanitize(k,a,C),i&&i!==k){this.platformService.removeAttribute(k,q),this.platformService.setAttribute(i,q,"1"),this.platformService.clearChildNodes(i);for(const z of this.platformService.getChildNodes(k))this.platformService.appendChild(i,z);k=i}return this.componentCreator.init(k,a,C,n,v,u,h).pipe(ae()).pipe((0,we.T)(z=>(this.platformService.removeAttribute(k,q),{element:k,hookIndex:a,context:n,usedParsers:f,usedOptions:v,usedInjector:h,usedEnvironmentInjector:u,destroy:()=>this.destroy(a)})))}destroy(e){if(e){for(const t of Object.values(e))t.componentRef&&t.componentRef.destroy();for(const t of Object.values(e)){for(const n of Object.values(t.outputSubscriptions))n&&n.unsubscribe();for(const n of Object.values(t.htmlEventSubscriptions))n&&n.unsubscribe()}}}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(le,8),d.KVO(Y,8),d.KVO(ue,8),d.KVO(Le),d.KVO(ze),d.KVO(Ke),d.KVO(Ue),d.KVO(Qe),d.KVO(K),d.KVO(d.uvJ),d.KVO(d.zZn))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),tt=(()=>{class c{constructor(e,t,n,o,r,s){this.hostElement=e,this.dynamicHooksService=t,this.componentUpdater=n,this.platformService=o,this.environmentInjector=r,this.injector=s,this.content=null,this.context=null,this.globalParsersBlacklist=null,this.globalParsersWhitelist=null,this.parsers=null,this.options=null,this.componentsLoaded=new d.bkB,this.hookIndex={},this.activeOptions={sanitize:!0,convertHTMLEntities:!0,fixParagraphTags:!0,updateOnPushOnly:!1,compareInputsByValue:!1,compareOutputsByValue:!1,compareByValueDepth:5,triggerDOMEvents:!1,ignoreInputAliases:!1,ignoreOutputAliases:!1,acceptInputsForAnyProperty:!1,acceptOutputsForAnyObservable:!1,logOptions:{dev:!0,prod:!1,ssr:!1}},this.activeParsers=[],this.token=Math.random().toString(36).substring(2,12),this.initialized=!1}ngDoCheck(){this.activeOptions.updateOnPushOnly||this.refresh(!1)}ngOnChanges(e){e.hasOwnProperty("content")||e.hasOwnProperty("globalParsersBlacklist")||e.hasOwnProperty("globalParsersWhitelist")||e.hasOwnProperty("parsers")||e.hasOwnProperty("options")?(this.reset(),this.parse(this.content)):e.hasOwnProperty("context")&&this.refresh(!0)}ngAfterViewInit(){}ngAfterViewChecked(){}ngOnDestroy(){this.reset()}reset(){this.dynamicHooksService.destroy(this.hookIndex),this.platformService.setInnerContent(this.hostElement.nativeElement,""),this.hookIndex={},this.activeOptions={sanitize:!0,convertHTMLEntities:!0,fixParagraphTags:!0,updateOnPushOnly:!1,compareInputsByValue:!1,compareOutputsByValue:!1,compareByValueDepth:5,triggerDOMEvents:!1,ignoreInputAliases:!1,ignoreOutputAliases:!1,acceptInputsForAnyProperty:!1,acceptOutputsForAnyObservable:!1,logOptions:{dev:!0,prod:!1,ssr:!1}},this.activeParsers=[],this.initialized=!1}parse(e){this.dynamicHooksService.parse(e,this.parsers,this.context,this.options,this.globalParsersBlacklist,this.globalParsersWhitelist,this.hostElement.nativeElement,this.hookIndex,this.environmentInjector,this.injector).subscribe(t=>{this.activeParsers=t.usedParsers,this.activeOptions=t.usedOptions,this.initialized=!0;const n=Object.values(this.hookIndex).map(o=>({hookId:o.id,hookValue:o.value,hookParser:o.parser,componentRef:o.componentRef}));this.componentsLoaded.emit(n)})}refresh(e){this.initialized&&this.componentUpdater.refresh(this.hookIndex,this.context,this.activeOptions,e)}static{this.\u0275fac=function(t){return new(t||c)(S.rXU(S.aKT),S.rXU(fe),S.rXU(ge),S.rXU(K),S.rXU(d.uvJ),S.rXU(d.zZn))}}static{this.\u0275cmp=S.VBU({type:c,selectors:[["ngx-dynamic-hooks"]],inputs:{content:"content",context:"context",globalParsersBlacklist:"globalParsersBlacklist",globalParsersWhitelist:"globalParsersWhitelist",parsers:"parsers",options:"options"},outputs:{componentsLoaded:"componentsLoaded"},features:[S.OA$],decls:0,vars:0,template:function(t,n){},encapsulation:2})}}return c})();var me=b(222),ye=b(58),ve=b(2306),nt=b(140);class ot extends me.A4{baseSize;documentListHandlers;entityListHandlers;_handlers;context={};counters={};getIndex(p){const e=this.counters[p]||0;return this.counters[p]=e+1,e}constructor(p="m",e){super(),this.baseSize=p,this._handlers=e,this.documentListHandlers=e?.documentList,this.entityListHandlers=e?.entityList,this.setupRenderers()}resetContext(){this.context={},this.counters={}}getContext(){return this.context}scaleSize(p){const e=["xs","s","m","l","xl"],t=e.indexOf(this.baseSize),n=e.indexOf(p);return e[Math.max(0,Math.min(e.length-1,n+(t-2)))]}setupRenderers(){this.heading=({tokens:p,depth:e})=>{const r=this.scaleSize({1:"xl",2:"l",3:"l",4:"m",5:"m",6:"s"}[e]),s={1:"bold",2:"semibold",3:"semibold",4:"semibold",5:"medium",6:"medium"}[e],i=this.parser?.parseInline(p)||"";return`<cue-typography size="${r}" weight="${s}"${this.getIndex("heading")>0?' style="margin-top: 24px; display: block;"':' style="display: block;"'}>${i}</cue-typography>\n`},this.paragraph=({tokens:p})=>{const e=this.scaleSize("m"),t=this.parser?.parseInline(p)||"";return/^(?:\s*,?\s*<cue-href-chip\b[^>]*><\/cue-href-chip>)+\s*$/.test(t)?`<div style="display: flex; gap: 6px; flex-wrap: wrap;">${t.replace(/(<\/cue-href-chip>)\s*,?\s*/g,"$1").trim()}</div>\n`:`<div class="cue-md-p"><cue-typography size="${e}" weight="regular">${t}</cue-typography></div>\n`},this.listitem=({tokens:p})=>{const e=this.scaleSize("m");return`<li class="cue-md-li" style="font-size: var(--cue-font-${e}-size);"><cue-typography size="${e}" weight="regular">${this.parser?.parseInline(p)||""}</cue-typography></li>`},this.tablecell=({tokens:p,header:e,align:t})=>{const n=e?"th":"td",r=e?"semibold":"regular";return`<${n}${t?` style="text-align: ${t}"`:""}><cue-typography size="${this.scaleSize("m")}" weight="${r}">${this.parser?.parseInline(p)||""}</cue-typography></${n}>`},this.blockquote=({text:p,tokens:e})=>/^\[!(NOTE|WARNING|IMPORTANT|TIP|CAUTION)\]/i.test(p.trimStart())?"":`<blockquote class="cue-md-blockquote"><cue-typography size="${this.scaleSize("m")}" weight="regular">${this.parser?.parse(e)||""}</cue-typography></blockquote>`,this.link=({href:p,title:e,tokens:t})=>{const n=this.parser?.parseInline(t)||"";if(!p){const r=this.getIndex("hrefchip"),s=`hrefchip_menuitems_${r}`,i=`hrefchip_id_${r}`,a=`hrefchip_click_${r}`,l=n.replace(/<[^>]*>/g,"");return this.context[i]=l,this.context[s]=()=>this._handlers?.hrefChip?.menuItems?.(l)??[],this.context[a]=()=>{this._handlers?.hrefChip?.clicked?.(l)},`<cue-href-chip [label]="context.${i}" [menuItems]="context.${s}()" (clicked)="context.${a}()"></cue-href-chip>`}return`<a href="${p}"${e?` title="${e}"`:""} target="_blank" rel="noopener noreferrer">${n}</a>`},this.codespan=({text:p})=>`<code class="cue-code-inline">${p}</code>`,this.code=p=>{const e="36px";if("document-list"===p.lang){const t=p.documentRefs;if(!t||0===t.length)return"";const o=`doc_refs_${this.getIndex("doc")}`;return this.context[o]=t,this._handlers?.availableContentCategories&&(this.context.availableContentCategories=this._handlers.availableContentCategories),`<cue-document-list [documentRefs]="context.${o}" [documentdata]="context.documentdata" [handlers]="context.documentlisthandlers" [availableContentCategories]="context.availableContentCategories" (clickedDocument)="context.documentclickedrow($event)" style="margin-bottom: ${e};"></cue-document-list>`}if("entity-list"===p.lang){const t=p.iris;if(!t)return"";const o=`entity_iris_${this.getIndex("entity")}`;return this.context[o]=t,this._handlers?.availableEntityCategories&&(this.context.availableEntityCategories=this._handlers.availableEntityCategories),this._handlers?.availableEntityRelationships&&(this.context.availableEntityRelationships=this._handlers.availableEntityRelationships),`<cue-ent-list-inner [entities]="context.${o}" [entitydata]="context.entitydata" [entityLocations]="context.entitylocations" [handlers]="context.entitylisthandlers" [availableEntityCategories]="context.availableEntityCategories" [availableEntityRelationships]="context.availableEntityRelationships" [mapboxToken]="context.mapboxToken" (rowClicked)="context.entityclickedrow($event)" style="margin-bottom: ${e};"></cue-ent-list-inner>`}if("map"===p.lang){const t=p.mapData;if(!t||!t.layers)return"";const n=this.getIndex("map"),o=`map_layers_${n}`,r=`map_settings_${n}`;return this.context[o]=t.layers,this.context[r]=t.settings,`<cue-card style="height: 300px; display: block; margin-bottom: ${e};" [padded]="false"><cue-map [layers]="context.${o}" [settings]="context.${r}"></cue-map></cue-card>`}return`<div style="margin-bottom: ${e};">${super.code(p)}</div>`}}walkTokens(p){return(0,A.A)(function*(){if("code"===p.type&&"document-list"===p.lang){const e=p.text.split("\n").filter(o=>o.trim().length>0),t=new Map,n=[];for(const o of e){const r=o.trim(),s=r.match(/^(.+)\?page=(\d+)$/);if(s){const i=s[1],a=s[2];t.has(i)||(t.set(i,{id:i,pages:[]}),n.push(i));const l=t.get(i);l.pages||(l.pages=[]),l.pages.push({id:r,page:a,relevance:0})}else t.has(r)||(t.set(r,{id:r}),n.push(r))}p.documentRefs=n.map(o=>t.get(o))}if("code"===p.type&&"entity-list"===p.lang){const e=p.text.split("\n").filter(t=>t.trim().length>0);p.iris=e}if("code"===p.type&&"map"===p.lang){const e=p.text.split("\n").filter(i=>i.trim().length>0),t=e[0]?.trim()||"",n=e.slice(1),o={};n.forEach(i=>{const a=i.split(";"),l=a[0]?.trim(),g=a[1]?.trim(),u=a[2]?.trim();if(!l||!g)return;const h=(0,ye.S)(g);if(!h)return;const f=(0,ye.n)(h);let v={};if(u)try{v=JSON.parse(u)}catch{}o[l]||(o[l]=[]),o[l].push({type:"Feature",properties:v,geometry:f})});const r=[];Object.keys(o).forEach(i=>{const a=new ve.ux(i);a.collection=new nt.o(o[i]),r.push(a)});const s=new ve.yY;s.mapboxToken=t,s.contextMenu.showFlyTo=!1,p.mapData={layers:r,settings:s}}})()}}let rt=(()=>{class c{envInjector=(0,d.WQX)(d.uvJ);fileURL=T.hFB.required();html=(0,d.vPA)("");hookOptions={sanitize:!1,globalParsersBlueprint:{environmentInjector:this.envInjector}};parsers=[{component:{importPromise:()=>Promise.resolve().then(b.bind(b,2245)),importName:"Typography"},selector:"cue-typography"}];onFile=(0,d.QZP)((()=>{var e=this;return(0,A.A)(function*(){const n=yield(yield fetch(e.fileURL())).text(),o=new ot("m");o.resetContext();const r=yield me.xI.parse(n,{gfm:!0,breaks:!1,renderer:o,async:!0,walkTokens:o.walkTokens.bind(o)});e.html.set(r)})})());static \u0275fac=function(t){return new(t||c)};static \u0275cmp=S.VBU({type:c,selectors:[["cue-md-viewer"]],inputs:{fileURL:[1,"fileURL"]},decls:2,vars:3,consts:[[1,"page"],[3,"parsers","content","options"]],template:function(t,n){1&t&&(S.j41(0,"div",0),S.nrm(1,"ngx-dynamic-hooks",1),S.k0s()),2&t&&(S.R7$(),S.Y8G("parsers",n.parsers)("content",n.html())("options",n.hookOptions))},dependencies:[tt],styles:[".page[_ngcontent-%COMP%]{overflow-y:auto;height:100%;padding:16px;box-sizing:border-box}[_nghost-%COMP%] cue-typography{display:inline-block}[_nghost-%COMP%] .cue-md-p{margin-bottom:24px;opacity:.9;line-height:1.6;display:block}[_nghost-%COMP%] .cue-md-p:last-child{margin-bottom:0}[_nghost-%COMP%] .cue-md-blockquote{margin-bottom:24px;opacity:.9;border-left:4px solid var(--cue-border-color);padding-left:16px}[_nghost-%COMP%] ul, [_nghost-%COMP%] ol{margin-bottom:24px;padding-left:28px;font-family:var(--cue-font-family);opacity:.9;line-height:1.6}[_nghost-%COMP%] li.cue-md-li{margin-bottom:12px}[_nghost-%COMP%] table{margin-bottom:24px;border-collapse:collapse;width:100%}[_nghost-%COMP%] th, [_nghost-%COMP%] td{padding:8px 12px;border-bottom:1px solid var(--cue-border-color, #eee);text-align:left}[_nghost-%COMP%] th cue-typography{font-weight:var(--cue-font-weight-semibold)}[_nghost-%COMP%] .cue-code-inline{background-color:var(--cue-border-color);padding:0 4px;border-radius:4px;font-family:monospace;font-size:1.1em;font-weight:500;color:var(--cue-main-foreground)}"],changeDetection:0})}return c})()},2306(U,V,b){b.d(V,{AA:()=>S,ux:()=>H,yY:()=>T});var A=b(140),d=b(8402);class T{mapboxToken;contextMenu={showProperties:!0,showFlyTo:!0};toolbar=new S}class S{hidden=!1;position="bottom";margin="20px";displayZoom=!0;displayGeofenceDraw=!1;displayLayerToggle=!0;clearGeofenceAfterDraw=!0}class H{label;id;collection=new A.o;color;visible=!0;cluster=!0;zoomToFit=!0;category;constructor(w,E=(0,d.A)()){this.label=w,this.id=E}}},140(U,V,b){b.d(V,{o:()=>A});class A{type="FeatureCollection";features=[];bbox;id;constructor(T=[]){this.features=T}addFeature(T){this.features.push(T)}removeFeature(T){return this.features.splice(T,1)[0]}getFeatureCount(){return this.features.length}clear(){this.features=[]}}},58(U,V,b){function A(m){let y=0,I=-1,O=-1;for(let R=0;R<m.length;R++)if("("===m[R])y++,1===y&&(I=R+1);else if(")"===m[R]&&(y--,0===y)){O=R;break}return-1!==I&&-1!==O?m.substring(I,O):null}b.d(V,{S:()=>D,n:()=>j});class d{x;y;z;constructor(y,I,O){this.x=y,this.y=I,this.z=O}}class T{points;constructor(y){this.points=y}}class S{lines;constructor(y){this.lines=y}}function D(m){if(m){if((m=m.trim().toUpperCase()).startsWith("POINT"))return function M(m){m=m.trim().toUpperCase();const I=A(m)?.split(" ")??[];return m.includes("POINT Z")?new d(parseFloat(I[0]),parseFloat(I[1]),parseFloat(I[2])):new d(parseFloat(I[0]),parseFloat(I[1]))}(m);if(m.startsWith("LINESTRING"))return function H(m){const y=A(m=m.trim().toUpperCase()),I=[];return y?.split(",").map(O=>O.trim().split(" ").map(R=>parseFloat(R))).map(O=>{I.push(new d(O[0],O[1],O[2]))}),new T(I)}(m);if(m.startsWith("POLYGON"))return function w(m){const y=A(m=m.trim().toUpperCase());if(!y)return new S([]);const I=y.match(/\(([^)]+)\)/g);if(!I)return new S([]);const O=I.map(R=>{const W=A(R);return W?W.split(",").map(Z=>{const $=Z.trim().split(" ");return $.length>=3?new d(parseFloat($[0]),parseFloat($[1]),parseFloat($[2])):new d(parseFloat($[0]),parseFloat($[1]))}):[]});return new S(O)}(m)}}function j(m){if(m instanceof d)return{type:"Point",coordinates:void 0!==m.z?[m.x,m.y,m.z]:[m.x,m.y]};if(m instanceof T)return{type:"LineString",coordinates:m.points.map(y=>void 0!==y.z?[y.x,y.y,y.z]:[y.x,y.y])};if(m instanceof S)return{type:"Polygon",coordinates:m.lines.map(y=>y.map(I=>void 0!==I.z?[I.x,I.y,I.z]:[I.x,I.y]))};throw new Error("Unknown WKT type")}},5332(U,V,b){b.d(V,{k:()=>S});for(var d=[],T=0;T<256;++T)d.push((T+256).toString(16).slice(1));function S(w,E=0){return(d[w[E+0]]+d[w[E+1]]+d[w[E+2]]+d[w[E+3]]+"-"+d[w[E+4]]+d[w[E+5]]+"-"+d[w[E+6]]+d[w[E+7]]+"-"+d[w[E+8]]+d[w[E+9]]+"-"+d[w[E+10]]+d[w[E+11]]+d[w[E+12]]+d[w[E+13]]+d[w[E+14]]+d[w[E+15]]).toLowerCase()}},8402(U,V,b){b.d(V,{A:()=>E});const d={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var T,S=new Uint8Array(16);function H(){if(!T&&!(T=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return T(S)}var M=b(5332);const E=function w(D,j,m){if(d.randomUUID&&!j&&!D)return d.randomUUID();var y=(D=D||{}).random||(D.rng||H)();if(y[6]=15&y[6]|64,y[8]=63&y[8]|128,j){m=m||0;for(var I=0;I<16;++I)j[m+I]=y[I];return j}return(0,M.k)(y)}}}]);
1
+ "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[6586],{6586(U,V,b){b.d(V,{MarkdownViewer:()=>rt});var A=b(467),d=b(5802),T=b(7705),S=b(5547),H=b(4226),M=b(2771),w=b(7673),E=b(4572),D=b(1397),j=b(8141),m=b(9437);const I=(0,b(1853).L)(c=>function(){c(this),this.name="EmptyError",this.message="no elements in sequence"});var O=b(5964),R=b(6697),W=b(9974),Z=b(4360);function Ie(c=Se){return(0,W.N)((p,e)=>{let t=!1;p.subscribe((0,Z._)(e,n=>{t=!0,e.next(n)},()=>t?e.complete():e.error(c())))})}function Se(){return new I}var Te=b(3669);function ae(c,p){const e=arguments.length>=2;return t=>t.pipe(c?(0,O.p)((n,o)=>c(n,o,t)):Te.D,(0,R.s)(1),e?function $(c){return(0,W.N)((p,e)=>{let t=!1;p.subscribe((0,Z._)(e,n=>{t=!0,e.next(n)},()=>{t||e.next(c),e.complete()}))})}(p):Ie(()=>new I))}var we=b(6354),G=b(177),Ee=b(345);const le=new d.nKC("All of the settings registered in the whole app."),Y=new d.nKC("The settings collected from all ancestor injectors"),ue=new d.nKC("The settings for the currently loaded module."),q="__ngx_dynamic_hooks_content",ee="dynamic-component-anchor",B="__ngx_dynamic_hooks_anchor_id",P="__ngx_dynamic_hooks_anchor_parsetoken",Be=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"];var te=function(c){return c[c.All=0]="All",c[c.Linear=1]="Linear",c[c.None=2]="None",c}(te||{});const x={},pe="[a-zA-Z_$]+[a-zA-Z0-9_$]*",ne="[a-zA-Z$\\-_:][a-zA-Z$\\-_:0-9\\.]*";function N(c,p){if(!p.global)throw Error("TypeError: matchAll called with a non-global RegExp argument");const e=[];let t=p.exec(c);for(;null!==t;)e.push(t),t=p.exec(c);return p.lastIndex=0,e}function oe(c){return void 0!==c?.__ngContext__}x.attributeNameNoBracketsRegex="("+ne+")",x.attributeNameBracketsRegex="\\[("+ne+")\\]",x.attributeNameRoundBracketsRegex="\\(("+ne+")\\)",x.attributeNameRegex="(?:"+x.attributeNameNoBracketsRegex+"|"+x.attributeNameBracketsRegex+"|"+x.attributeNameRoundBracketsRegex+")",x.attributeValueDoubleQuotesRegex='"((?:\\\\.|[^"])*?)"',x.attributeValueSingleQuotesRegex="'((?:\\\\.|[^'])*?)'",x.variablePathDotNotation="\\."+pe,x.variableBracketsNotation="\\[[^\\]]*\\]",x.variablePathFunctionCall="\\([^\\)]*\\)",x.variablePathPartRegex="(?:"+x.variablePathDotNotation+"|"+x.variableBracketsNotation+"|"+x.variablePathFunctionCall+")",x.contextVariableRegex="context"+x.variablePathPartRegex+"*",x.placeholderVariablePathDotNotation="\\@@@cxtDot@@@"+pe,x.placeholderVariableBracketsNotation="@@@cxtOpenSquareBracket@@@[^\\]]*@@@cxtCloseSquareBracket@@@",x.placeholderVariablePathFunctionCall="@@@cxtOpenRoundBracket@@@[^\\)]*@@@cxtCloseRoundBracket@@@",x.placeholderVariablePathPartRegex="(?:"+x.placeholderVariablePathDotNotation+"|"+x.placeholderVariableBracketsNotation+"|"+x.placeholderVariablePathFunctionCall+")",x.placeholderContextVariableRegex="__CXT__"+x.placeholderVariablePathPartRegex+"*";class Ae{constructor(p,e,t,n){this.configResolver=e,this.tagHookFinder=t,this.bindingsValueManager=n,this.savedBindings={},this.config=this.configResolver.processConfig(p),this.name=this.config.name}findHooks(p,e,t){let n=this.config.enclosing?this.tagHookFinder.findEnclosingTags(p,this.config.selector,this.config.bracketStyle,t):this.tagHookFinder.findSingleTags(p,this.config.selector,this.config.bracketStyle,t);return this.config.allowSelfClosing&&(n=[...n,...this.tagHookFinder.findSelfClosingTags(p,this.config.selector,this.config.bracketStyle,t)],n.sort((o,r)=>o.openingTagStartIndex-r.openingTagStartIndex)),n}loadComponent(p,e,t,n,o){return{component:this.config.component,hostElementTag:this.config.hostElementTag||this.config.selector,injector:this.config.injector,environmentInjector:this.config.environmentInjector}}getBindings(p,e,t,n){let o=this.savedBindings[p];return void 0===o&&(o=this.createBindings(e.openingTag),this.savedBindings[p]=o),this.bindingsValueManager.checkInputBindings(o.inputs,t,this.config,n),this.bindingsValueManager.checkOutputBindings(o.outputs,this.config,n),{inputs:this.getValuesFromSavedBindings(o.inputs),outputs:this.getValuesFromSavedBindings(o.outputs)}}createBindings(p){const e=this.collectRawInputs(p),t={};for(const[r,s]of Object.entries(e))t[r]={raw:s,parsed:!1,value:null,boundContextVariables:{}};const n=this.collectRawOutputs(p),o={};for(const[r,s]of Object.entries(n))o[r]={raw:s,parsed:!1,value:null,boundContextVariables:{}};return{inputs:t,outputs:o}}collectRawInputs(p){const e=this.getBindingsFromOpeningTag(p,"noBracketInputs",this.config.inputsBlacklist||null,this.config.inputsWhitelist||null),t=this.getBindingsFromOpeningTag(p,"bracketInputs",this.config.inputsBlacklist||null,this.config.inputsWhitelist||null);for(const[n,o]of Object.entries(e))e[n]="'"+o+"'";return{...e,...t}}collectRawOutputs(p){return this.getBindingsFromOpeningTag(p,"outputs",this.config.outputsBlacklist||null,this.config.outputsWhitelist||null)}getBindingsFromOpeningTag(p,e,t,n){const o={},r="(?:"+x.attributeValueDoubleQuotesRegex+"|"+x.attributeValueSingleQuotesRegex+")";let s;switch(e){case"noBracketInputs":s=x.attributeNameNoBracketsRegex;break;case"bracketInputs":s=x.attributeNameBracketsRegex;break;case"outputs":s=x.attributeNameRoundBracketsRegex}const l=N(p,new RegExp(s+"="+r,"gim"));for(const u of l){let h=u[2]||u[3];void 0===h&&"noBracketInputs"===e&&(h=""),o[u[1]]=h}const g={};for(const[u,h]of Object.entries(o))t&&t.includes(u)||n&&!n.includes(u)||(g[u]=h);return g}getValuesFromSavedBindings(p){const e={};for(const[t,n]of Object.entries(p))e[t]=n.value;return e}}class Ne{constructor(p,e,t,n){this.configResolver=e,this.platformService=t,this.bindingsValueManager=n,this.savedBindings={},this.config=this.configResolver.processConfig(p),this.name=this.config.name}findHookElements(p,e,t){return Array.from(this.platformService.querySelectorAll(p,this.config.selector))}loadComponent(p,e,t,n,o){return this.scrubAngularBindingAttrs(e.element),{component:this.config.component,hostElementTag:this.config.hostElementTag,injector:this.config.injector,environmentInjector:this.config.environmentInjector}}getBindings(p,e,t,n){let o=this.savedBindings[p];return void 0===o&&(o=this.createBindings(e.elementSnapshot),this.savedBindings[p]=o),this.bindingsValueManager.checkInputBindings(o.inputs,t,this.config,n),this.bindingsValueManager.checkOutputBindings(o.outputs,this.config,n),{inputs:this.getValuesFromSavedBindings(o.inputs),outputs:this.getValuesFromSavedBindings(o.outputs)}}scrubAngularBindingAttrs(p){const e=Array.from(p.attributes).map(t=>t.name).filter(t=>t.startsWith("[")&&t.endsWith("]")||t.startsWith("(")&&t.endsWith(")"));for(const t of e)this.platformService.removeAttribute(p,t)}createBindings(p){const e=this.collectRawBindings(p,"inputs",this.config.inputsBlacklist||null,this.config.inputsWhitelist||null),t={};for(const[r,s]of Object.entries(e))t[r]={raw:s,parsed:!1,value:null,boundContextVariables:{}};const n=this.collectRawBindings(p,"outputs",this.config.outputsBlacklist||null,this.config.outputsWhitelist||null),o={};for(const[r,s]of Object.entries(n))o[r]={raw:s,parsed:!1,value:null,boundContextVariables:{}};return{inputs:t,outputs:o}}collectRawBindings(p,e,t,n){const o={},r=this.platformService.getAttributeNames(p);for(let i of r)if("inputs"===e&&(!i.startsWith("(")||!i.endsWith(")"))||"outputs"===e&&i.startsWith("(")&&i.endsWith(")")){let a=this.platformService.getAttribute(p,i);"inputs"===e&&i.startsWith("[")&&i.endsWith("]")&&""===a&&(a=void 0),"inputs"===e&&(!i.startsWith("[")||!i.endsWith("]"))&&(a=`'${a}'`),i=i.replace(/^\[|^\(|\]$|\)$/g,""),o[i]=a}const s={};for(const[i,a]of Object.entries(o))t&&t.includes(i)||n&&!n.includes(i)||(s[i]=a);return s}getValuesFromSavedBindings(p){const e={};for(const[t,n]of Object.entries(p))e[t]=n.value;return e}}const Pe={component:void 0,name:void 0,parseWithRegex:!1,selector:void 0,hostElementTag:void 0,injector:void 0,allowSelfClosing:!0,enclosing:!0,bracketStyle:{opening:"<",closing:">"},parseInputs:!0,unescapeStrings:!0,inputsBlacklist:void 0,inputsWhitelist:void 0,outputsBlacklist:void 0,outputsWhitelist:void 0,allowContextInBindings:!0,allowContextFunctionCalls:!0};let De=(()=>{class c{constructor(){}processConfig(e){const t=JSON.parse(JSON.stringify(Pe));if(!e||!e.hasOwnProperty("component"))throw Error('Missing the required "component" property for the SelectorHookParserConfig. Must be either the component class or a LazyLoadComponentConfig.');if(t.component=e.component,e.component.hasOwnProperty("prototype")){const n=(0,T.HJs)(e.component);t.selector=n.selector}else{if(!e.component.hasOwnProperty("importPromise")||!e.component.hasOwnProperty("importName"))throw Error('The "component" property in the SelectorHookParserConfig must either contain the component class or a LazyLoadComponentConfig.');if(!e.hasOwnProperty("selector"))throw Error('When using lazy-loaded dynamic components, you have to specify the "selector" property in the parser config, as the real selector can\'t be known before the component is loaded.')}if(e.hasOwnProperty("name")){if("string"!=typeof e.name)throw Error('The submitted "name" property in the SelectorHookParserConfig must be of type string, was '+typeof e.name);t.name=e.name}if(e.hasOwnProperty("selector")){if("string"!=typeof e.selector)throw Error('The submitted "selector" property in the SelectorHookParserConfig must be of type string, was '+typeof e.selector);t.selector=e.selector}if(e.hasOwnProperty("hostElementTag")){if("string"!=typeof e.hostElementTag)throw Error('The submitted "hostElementTag" property in the SelectorHookParserConfig must be of type string, was '+typeof e.hostElementTag);t.hostElementTag=e.hostElementTag}if(e.hasOwnProperty("parseWithRegex")){if("boolean"!=typeof e.parseWithRegex)throw Error('The submitted "parseWithRegex" property in the SelectorHookParserConfig must be of type boolean, was '+typeof e.parseWithRegex);t.parseWithRegex=e.parseWithRegex}if(e.hasOwnProperty("allowSelfClosing")){if("boolean"!=typeof e.allowSelfClosing)throw Error('The submitted "allowSelfClosing" property in the SelectorHookParserConfig must be of type boolean, was '+typeof e.allowSelfClosing);t.allowSelfClosing=e.allowSelfClosing}if(e.hasOwnProperty("enclosing")){if("boolean"!=typeof e.enclosing)throw Error('The submitted "enclosing" property in the SelectorHookParserConfig must be of type boolean, was '+typeof e.enclosing);t.enclosing=e.enclosing}if(e.hasOwnProperty("bracketStyle")){if("object"!=typeof e.bracketStyle||"string"!=typeof e.bracketStyle.opening||"string"!=typeof e.bracketStyle.closing)throw Error('The submitted "bracketStyle" property in the SelectorHookParserConfig must have the form {opening: string, closing: string}');t.bracketStyle=e.bracketStyle}if(e.hasOwnProperty("injector")&&(t.injector=e.injector),e.hasOwnProperty("environmentInjector")&&(t.environmentInjector=e.environmentInjector),e.hasOwnProperty("unescapeStrings")){if("boolean"!=typeof e.unescapeStrings)throw Error('The submitted "unescapeStrings" property in the SelectorHookParserConfig must be of type boolean, was '+typeof e.unescapeStrings);t.unescapeStrings=e.unescapeStrings}if(e.hasOwnProperty("parseInputs")){if("boolean"!=typeof e.parseInputs)throw Error('The submitted "parseInputs" property in the SelectorHookParserConfig must be of type boolean, was '+typeof e.parseInputs);t.parseInputs=e.parseInputs}if(e.hasOwnProperty("inputsBlacklist")){if(!Array.isArray(e.inputsBlacklist))throw Error('The submitted "inputsBlacklist" property in the SelectorHookParserConfig must be an array of strings.');for(const n of e.inputsBlacklist)if("string"!=typeof n)throw Error('All entries of the submitted "inputsBlacklist" property in the SelectorHookParserConfig must be of type string, '+typeof n+" found.");t.inputsBlacklist=e.inputsBlacklist}if(e.hasOwnProperty("inputsWhitelist")){if(!Array.isArray(e.inputsWhitelist))throw Error('The submitted "inputsWhitelist" property in the SelectorHookParserConfig must be an array of strings.');for(const n of e.inputsWhitelist)if("string"!=typeof n)throw Error('All entries of the submitted "inputsWhitelist" property in the SelectorHookParserConfig must be of type string, '+typeof n+" found.");t.inputsWhitelist=e.inputsWhitelist}if(e.hasOwnProperty("outputsBlacklist")){if(!Array.isArray(e.outputsBlacklist))throw Error('The submitted "outputsBlacklist" property in the SelectorHookParserConfig must be an array of strings.');for(const n of e.outputsBlacklist)if("string"!=typeof n)throw Error('All entries of the submitted "outputsBlacklist" property in the SelectorHookParserConfig must be of type string, '+typeof n+" found.");t.outputsBlacklist=e.outputsBlacklist}if(e.hasOwnProperty("outputsWhitelist")){if(!Array.isArray(e.outputsWhitelist))throw Error('The submitted "outputsWhitelist" property in the SelectorHookParserConfig must be an array of strings.');for(const n of e.outputsWhitelist)if("string"!=typeof n)throw Error('All entries of the submitted "outputsWhitelist" property in the SelectorHookParserConfig must be of type string, '+typeof n+" found.");t.outputsWhitelist=e.outputsWhitelist}if(e.hasOwnProperty("allowContextInBindings")){if("boolean"!=typeof e.allowContextInBindings)throw Error('The submitted "allowContextInBindings" property in the SelectorHookParserConfig must be of type boolean, was '+typeof e.allowContextInBindings);t.allowContextInBindings=e.allowContextInBindings}if(e.hasOwnProperty("allowContextFunctionCalls")){if("boolean"!=typeof e.allowContextFunctionCalls)throw Error('The submitted "allowContextFunctionCalls" property in the SelectorHookParserConfig must be of type boolean, was '+typeof e.allowContextFunctionCalls);t.allowContextFunctionCalls=e.allowContextFunctionCalls}return t}static{this.\u0275fac=function(t){return new(t||c)}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})();const de=new d.nKC("An injection token to retrieve an optionally user-provided PlatformService");let Ve=(()=>{class c{constructor(e,t,n){this.document=e,this.rendererFactory=t,this.sanitizer=n,this.renderer=this.rendererFactory.createRenderer(null,null)}getNgVersion(){if(typeof this.document<"u"){const t=this.querySelectorAll(this.document,"[ng-version]")?.[0]?.getAttribute("ng-version");if(t)return parseInt(t,10)}return null}sanitize(e){return this.sanitizer.sanitize(S.WPN.HTML,e)||""}createElement(e){return this.renderer.createElement(e)}sortElements(e,t){return e===t?0:e.compareDocumentPosition?2&e.compareDocumentPosition(t)?1:-1:e.sourceIndex-t.sourceIndex}cloneElement(e){return e.cloneNode(!0)}getTagName(e){return e.tagName}getOpeningTag(e){const n=e.outerHTML.length;return e.outerHTML.slice(0,"/"===e.outerHTML[n-2]?n:n-e.innerHTML.length-e.tagName.length-3)}getClosingTag(e){return e.outerHTML.slice(e.outerHTML.length-e.tagName.length-3)}getAttributeNames(e){return"function"==typeof e.getAttributeNames?e.getAttributeNames():[]}getAttribute(e,t){return"function"==typeof e.getAttribute?e.getAttribute(t):null}setAttribute(e,t,n){this.renderer.setAttribute(e,t,n)}removeAttribute(e,t){this.renderer.removeAttribute(e,t)}getParentNode(e){try{return this.renderer.parentNode(e)}catch{return null}}querySelectorAll(e,t){return Array.from(e.querySelectorAll(t))}getChildNodes(e){return Array.prototype.slice.call(e.childNodes)}appendChild(e,t){this.renderer.appendChild(e,t)}insertBefore(e,t,n){this.renderer.insertBefore(e,t,n)}clearChildNodes(e){if(e)for(;e.firstChild;)this.removeChild(e,e.firstChild)}removeChild(e,t){e.removeChild(t)}getInnerContent(e){return e.innerHTML}setInnerContent(e,t){e&&(e.innerHTML=t)}isTextNode(e){return e.nodeType===Node.TEXT_NODE}createTextNode(e){return document.createTextNode(e)}getTextContent(e){return e.textContent}dispatchEvent(e,t,n){e.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0}))}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(d.qQL),d.KVO(S._9s),d.KVO(Ee.up))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),K=(()=>{class c{constructor(e,t){this.userPlatformService=e,this.defaultPlatformService=t}getFor(e){return this.userPlatformService&&"function"==typeof this.userPlatformService[e]?this.userPlatformService:this.defaultPlatformService}getNgVersion(){return this.getFor("getNgVersion").getNgVersion()}sanitize(e){return this.getFor("sanitize").sanitize(e)}createElement(e){return this.getFor("createElement").createElement(e)}sortElements(e,t){return this.getFor("sortElements").sortElements(e,t)}cloneElement(e){return this.getFor("cloneElement").cloneElement(e)}getTagName(e){return this.getFor("getTagName").getTagName(e)}getOpeningTag(e){return this.getFor("getOpeningTag").getOpeningTag(e)}getClosingTag(e){return this.getFor("getClosingTag").getClosingTag(e)}getAttributeNames(e){return this.getFor("getAttributeNames").getAttributeNames(e)}getAttribute(e,t){return this.getFor("getAttribute").getAttribute(e,t)}setAttribute(e,t,n){return this.getFor("setAttribute").setAttribute(e,t,n)}removeAttribute(e,t){return this.getFor("removeAttribute").removeAttribute(e,t)}getParentNode(e){return this.getFor("getParentNode").getParentNode(e)}querySelectorAll(e,t){return this.getFor("querySelectorAll").querySelectorAll(e,t)}getChildNodes(e){return this.getFor("getChildNodes").getChildNodes(e)}appendChild(e,t){return this.getFor("appendChild").appendChild(e,t)}insertBefore(e,t,n){return this.getFor("insertBefore").insertBefore(e,t,n)}clearChildNodes(e){return this.getFor("clearChildNodes").clearChildNodes(e)}removeChild(e,t){return this.getFor("removeChild").removeChild(e,t)}getInnerContent(e){return this.getFor("getInnerContent").getInnerContent(e)}setInnerContent(e,t){return this.getFor("setInnerContent").setInnerContent(e,t)}isTextNode(e){return this.getFor("isTextNode").isTextNode(e)}createTextNode(e){return this.getFor("createTextNode").createTextNode(e)}getTextContent(e){return this.getFor("getTextContent").getTextContent(e)}dispatchEvent(e,t,n){return this.getFor("dispatchEvent").dispatchEvent(e,t,n)}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(de,8),d.KVO(Ve))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),F=(()=>{class c{constructor(e){this.platformId=e}log(e,t){this.handleLog(e,t,"log")}warn(e,t){this.handleLog(e,t,"warn")}error(e,t){this.handleLog(e,t,"error")}handleLog(e,t,n){(t.logOptions?.dev&&this.isDevMode()&&(0,G.UE)(this.platformId)||t.logOptions?.prod&&!this.isDevMode()&&(0,G.UE)(this.platformId)||t.logOptions?.ssr&&!(0,G.UE)(this.platformId))&&console[n](...e)}isDevMode(){return(0,T.naY)()}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(S.Agw))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),Me=(()=>{class c{constructor(e){this.logger=e}find(e,t,n,o,r={sanitize:!0,convertHTMLEntities:!0,fixParagraphTags:!0,updateOnPushOnly:!1,compareInputsByValue:!1,compareOutputsByValue:!1,compareByValueDepth:5,triggerDOMEvents:!1,ignoreInputAliases:!1,ignoreOutputAliases:!1,acceptInputsForAnyProperty:!1,acceptOutputsForAnyObservable:!1,logOptions:{dev:!0,prod:!1,ssr:!1}}){return n?this.findEnclosingHooks(e,t,n,o,r):this.findSingletagHooks(e,t)}findSingletagHooks(e,t){const n=[],o=N(e,t);for(const r of o)n.push({openingTagStartIndex:r.index,openingTagEndIndex:r.index+r[0].length,closingTagStartIndex:null,closingTagEndIndex:null});return n}findEnclosingHooks(e,t,n,o,r={sanitize:!0,convertHTMLEntities:!0,fixParagraphTags:!0,updateOnPushOnly:!1,compareInputsByValue:!1,compareOutputsByValue:!1,compareByValueDepth:5,triggerDOMEvents:!1,ignoreInputAliases:!1,ignoreOutputAliases:!1,acceptInputsForAnyProperty:!1,acceptOutputsForAnyObservable:!1,logOptions:{dev:!0,prod:!1,ssr:!1}}){const s=[],i=[],a=N(e,t);for(const u of a)s.push({isOpening:!0,value:u[0],startIndex:u.index,endIndex:u.index+u[0].length});const l=N(e,n);for(const u of l)s.push({isOpening:!1,value:u[0],startIndex:u.index,endIndex:u.index+u[0].length});s.sort((u,h)=>u.startIndex-h.startIndex);const g=[];for(const[u,h]of s.entries())if(u>0&&h.startIndex<s[u-1].endIndex)this.logger.warn(['Syntax error - New tag "'+h.value+'" started at position '+h.startIndex+' before previous tag "'+s[u-1].value+'" ended at position '+s[u-1].endIndex+". Ignoring."],r);else if(h.isOpening)g.push(h);else{if(0===g.length){this.logger.warn(['Syntax error - Closing tag without preceding opening tag found: "'+h.value+'". Ignoring.'],r);continue}if(!1===o&&g.length>1){g.pop();continue}const f=g[g.length-1];i.push({openingTagStartIndex:f.startIndex,openingTagEndIndex:f.startIndex+f.value.length,closingTagStartIndex:h.startIndex,closingTagEndIndex:h.startIndex+h.value.length}),g.pop()}return g.length>0&&this.logger.warn(["Syntax error - Opening tags without corresponding closing tags found."],r),i}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),He=(()=>{class c{constructor(e){this.hookFinder=e}findSingleTags(e,t,n={opening:"<",closing:">"},o){const r=this.generateOpeningTagRegex(t,n);return this.hookFinder.find(e,r,void 0,void 0,o)}findEnclosingTags(e,t,n={opening:"<",closing:">"},o){const r=this.generateOpeningTagRegex(t,n),s=this.generateClosingTagRegex(t,n);return this.hookFinder.find(e,r,s,!0,o)}findSelfClosingTags(e,t,n={opening:"<",closing:">"},o){const r=this.generateOpeningTagRegex(t,n,!0);return this.hookFinder.find(e,r,void 0,void 0,o)}generateOpeningTagRegex(e,t={opening:"<",closing:">"},n=!1){const o=this.escapeRegex(t.opening),r=this.escapeRegex(e),s=(n?"\\/":"")+this.escapeRegex(t.closing);return new RegExp(o+r+"(?:\\s*"+s+"|(?:\\s+"+x.attributeNameRegex+"=(?:"+x.attributeValueDoubleQuotesRegex+"|"+x.attributeValueSingleQuotesRegex+"))+\\s*"+s+")","gim")}generateClosingTagRegex(e,t={opening:"<",closing:">"}){const n=this.escapeRegex(t.opening)+"/",o=this.escapeRegex(e),r=this.escapeRegex(t.closing);return new RegExp(n+o+r,"gim")}escapeRegex(e){return e.replace(new RegExp("[-\\/\\\\^$*+?.()|[\\]{}]","g"),"\\$&")}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(Me))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),Fe=(()=>{class c{encodeSubstrings(e){const r=[...N(e,/'/gm).filter(l=>0===l.index||"\\"!==e[l.index-1]),...N(e,/"/gm).filter(l=>0===l.index||"\\"!==e[l.index-1]),...N(e,/`/gm).filter(l=>0===l.index||"\\"!==e[l.index-1])];r.sort((l,g)=>l.index-g.index);const s=[];let i=null;for(const l of r)i?i[0]===l[0]&&(s.push({startIndex:i.index+1,endIndex:l.index}),i=null):i=l;if(null!==i)throw Error("Input parse error. String was opened, but not closed.");return this.encodeTextSegments(e,s,this.encodeStringSpecialChars)}encodeStringSpecialChars(e){return(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/'/g,"@@@singlequote@@@")).replace(/"/g,"@@@doublequote@@@")).replace(/`/g,"@@@gravequote@@@")).replace(/:/g,"@@@colon@@@")).replace(/;/g,"@@@semicolon@@@")).replace(/\./g,"@@@dot@@@")).replace(/,/g,"@@@comma@@@")).replace(/\\/g,"@@@backslash@@@")).replace(/\(/g,"@@@openRoundBracket@@@")).replace(/\)/g,"@@@closeRoundBracket@@@")).replace(/\[/g,"@@@openSquareBracket@@@")).replace(/\]/g,"@@@closeSquareBracket@@@")).replace(/\{/g,"@@@openCurlyBracket@@@")).replace(/\}/g,"@@@closeCurlyBracket@@@")}decodeStringSpecialChars(e){return(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/@@@singlequote@@@/g,"'")).replace(/@@@doublequote@@@/g,'"')).replace(/@@@gravequote@@@/g,"`")).replace(/@@@colon@@@/g,":")).replace(/@@@semicolon@@@/g,";")).replace(/@@@dot@@@/g,".")).replace(/@@@comma@@@/g,",")).replace(/@@@backslash@@@/g,"\\")).replace(/@@@openRoundBracket@@@/g,"(")).replace(/@@@closeRoundBracket@@@/g,")")).replace(/@@@openSquareBracket@@@/g,"[")).replace(/@@@closeSquareBracket@@@/g,"]")).replace(/@@@openCurlyBracket@@@/g,"{")).replace(/@@@closeCurlyBracket@@@/g,"}")}encodeSubfunctions(e){const o=[...N(e,/\(/gm),...N(e,/\)/gm)];o.sort((a,l)=>a.index-l.index);const r=[],s=[];for(const a of o)if("("===a[0])s.push(a);else{if(0===s.length)throw Error("Input parse error. Closed function bracket without opening it first.");1===s.length&&r.push({startIndex:s[0].index+1,endIndex:a.index}),s.pop()}if(0!==s.length)throw Error("Input parse error. Opened function bracket without closing it.");return this.encodeTextSegments(e,r,this.encodeFunctionBrackets)}encodeFunctionBrackets(e){return(e=e.replace(/\(/g,"@@@fnOpenBracket@@@")).replace(/\)/g,"@@@fnCloseBracket@@@")}decodeFunctionBrackets(e){return(e=e.replace(/@@@fnOpenBracket@@@/g,"(")).replace(/@@@fnCloseBracket@@@/g,")")}encodeVariableSubbrackets(e){const o=N(e,new RegExp("(?:[a-zA-Z_$\\])])(\\[)","gm")),r=[];for(const a of o){const l=e.substring(a.index+2),h=[...N(l,/\[/gm),...N(l,/\]/gm)];h.sort((v,C)=>v.index-C.index);let f=1;for(const v of h)if(f="]"===v[0]?f-1:f+1,0===f){r.push({startIndex:a.index+2,endIndex:a.index+2+v.index});break}if(0!==f)throw Error("Input parse error. Opened bracket without closing it.")}const s=[];for(const a of r)(0===s.length||s[s.length-1].endIndex<a.startIndex)&&s.push(a);return this.encodeTextSegments(e,s,this.encodeVariableBrackets)}encodeVariableBrackets(e){return(e=e.replace(/\[/g,"@@@variableOpeningBracket@@@")).replace(/\]/g,"@@@variableClosingBracket@@@")}decodeVariableBrackets(e){return(e=e.replace(/@@@variableOpeningBracket@@@/g,"[")).replace(/@@@variableClosingBracket@@@/g,"]")}transformContextVarIntoPlacerholder(e){return(e=(e=(e=(e=(e=(e="__CXT__"+e.substring(7)).replace(/\"/g,"@@@cxtDoubleQuote@@@")).replace(/\./g,"@@@cxtDot@@@")).replace(/\[/g,"@@@cxtOpenSquareBracket@@@")).replace(/\]/g,"@@@cxtCloseSquareBracket@@@")).replace(/\(/g,"@@@cxtOpenRoundBracket@@@")).replace(/\)/g,"@@@cxtCloseRoundBracket@@@")}transformPlaceholderIntoContextVar(e){return(e=(e=(e=(e=(e=(e="context"+e.substring(7)).replace(/@@@cxtDoubleQuote@@@/g,'"')).replace(/@@@cxtDot@@@/g,".")).replace(/@@@cxtOpenSquareBracket@@@/g,"[")).replace(/@@@cxtCloseSquareBracket@@@/g,"]")).replace(/@@@cxtOpenRoundBracket@@@/g,"(")).replace(/@@@cxtCloseRoundBracket@@@/g,")")}encodeTextSegments(e,t,n){const o=[];for(const i of t){const a=0===o.length?0:o[o.length-1].endIndex;o.push({type:"text",startIndex:a,endIndex:i.startIndex,string:e.substring(a,i.startIndex)}),o.push({type:"special",startIndex:i.startIndex,endIndex:i.endIndex,string:e.substring(i.startIndex,i.endIndex)})}const r=0===o.length?0:o[o.length-1].endIndex;o.push({type:"text",startIndex:r,endIndex:e.length-1,string:e.substring(r)});for(const i of o)"special"===i.type&&(i.string=n(i.string));let s="";for(const i of o)s+=i.string;return s}stripSlashes(e){return e.replace(/\\(.)/g,"$1")}escapeDoubleQuotes(e){return e.replace(/\\/g,"\\\\").replace(/\"/g,'\\"')}static{this.\u0275fac=function(t){return new(t||c)}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),je=(()=>{class c{constructor(e,t){this.dataTypeEncoder=e,this.logger=t}evaluate(e,t={},n,o=!0,r={},s=!0,i={sanitize:!0,convertHTMLEntities:!0,fixParagraphTags:!0,updateOnPushOnly:!1,compareInputsByValue:!1,compareOutputsByValue:!1,compareByValueDepth:5,triggerDOMEvents:!1,ignoreInputAliases:!1,ignoreOutputAliases:!1,acceptInputsForAnyProperty:!1,acceptOutputsForAnyObservable:!1,logOptions:{dev:!0,prod:!1,ssr:!1}}){if("null"===e)return null;if("undefined"!==e){if("true"===e)return!0;if("false"===e)return!1;if(!isNaN(e))return parseInt(e,10);if(e.startsWith('"')&&e.endsWith('"')||e.startsWith("'")&&e.endsWith("'")||e.startsWith("`")&&e.endsWith("`")){let a=e.substring(1,e.length-1);return a=o?this.dataTypeEncoder.stripSlashes(a):a,a}if((e=this.encodeDataTypeString(e)).startsWith("{")&&e.endsWith("}")||e.startsWith("[")&&e.endsWith("]")){const a=this.parseAsJSON(e,o);return this.loadJSONVariables(a,t,n,o,r,s,i)}if("$event"===e)return n;if(e.match(new RegExp("^\\s*"+x.contextVariableRegex+"\\s*$","gm")))return this.loadContextVariable(e,t,n,o,r,s,i);throw Error('Data type for following input was not recognized and could not be parsed: "'+e+'"')}}encodeDataTypeString(e){return e=this.dataTypeEncoder.encodeSubstrings(e),e=this.dataTypeEncoder.encodeSubfunctions(e),this.dataTypeEncoder.encodeVariableSubbrackets(e)}decodeDataTypeString(e){return e=this.dataTypeEncoder.decodeStringSpecialChars(e),e=this.dataTypeEncoder.decodeFunctionBrackets(e),(e=this.dataTypeEncoder.decodeVariableBrackets(e)).trim()}parseAsJSON(e,t){if((e=(e=(e=e.replace(/\'(\\.|[^\'])*?\'/gm,i=>'"'+i.slice(1,-1)+'"')).replace(/\`(\\.|[^\`])*?\`/gm,i=>'"'+i.slice(1,-1)+'"')).replace(/"?([a-z0-9A-Z_]+)"?\s*:/g,'"$1": ')).match(/"?__proto__"?\s*:/g))throw Error('Setting the "__proto__" property in a hook input object is not allowed.');if(e.match(/"?prototype"?\s*:/g))throw Error('Setting the "prototype" property in a hook input object is not allowed.');if(e.match(/"?constructor"?\s*:/g))throw Error('Setting the "constructor" property in a hook input object is not allowed.');e=this.replaceValuesInJSONString(e,"undefined",i=>"null"),e=this.replaceValuesInJSONString(e,x.contextVariableRegex,i=>'"'+this.dataTypeEncoder.transformContextVarIntoPlacerholder(i)+'"'),e=this.replaceValuesInJSONString(e,"\\$event",i=>'"__EVENT__"');const s=JSON.parse(e);return this.decodeJSONStrings(s,t),s}replaceValuesInJSONString(e,t,n){return e.replace(new RegExp("(?:(:\\s*)("+t+")(?=\\s*[,}])|([\\[,]\\s*)("+t+")(?=\\s*[\\],]))","gm"),(s,i,a,l,g)=>(i||l)+n(a||g))}decodeJSONStrings(e,t){for(const n in e)if("string"==typeof e[n]){if('__EVENT__"'===e[n]||e[n].match(new RegExp("^\\s*"+x.placeholderContextVariableRegex+"\\s*$","gm")))continue;let o=this.decodeDataTypeString(e[n]);o=t?this.dataTypeEncoder.stripSlashes(o):o,e[n]=o}else"object"==typeof e[n]&&this.decodeJSONStrings(e[n],t)}loadJSONVariables(e,t,n,o,r,s,i){for(const a in e)if("string"==typeof e[a]){if("__EVENT__"===e[a])e[a]=n;else if(e[a].match(new RegExp("^\\s*"+x.placeholderContextVariableRegex+"\\s*$","gm"))){const l=this.dataTypeEncoder.transformPlaceholderIntoContextVar(e[a].trim());e[a]=this.loadContextVariable(l,t,n,o,r,s,i)}}else"object"==typeof e[a]&&this.loadJSONVariables(e[a],t,n,o,r,s,i);return e}loadContextVariable(e,t={},n,o=!0,r={},s=!0,i={sanitize:!0,convertHTMLEntities:!0,fixParagraphTags:!0,updateOnPushOnly:!1,compareInputsByValue:!1,compareOutputsByValue:!1,compareByValueDepth:5,triggerDOMEvents:!1,ignoreInputAliases:!1,ignoreOutputAliases:!1,acceptInputsForAnyProperty:!1,acceptOutputsForAnyObservable:!1,logOptions:{dev:!0,prod:!1,ssr:!1}}){try{const a=e.substring(7);if(""===a.trim())return t;const l=[],g=N(a,new RegExp(x.variablePathPartRegex,"gm"));for(const u of g){if(u[0].startsWith(".")&&l.push({type:"property",value:u[0].substring(1)}),u[0].startsWith("[")&&u[0].endsWith("]")){let h=u[0].substring(1,u[0].length-1);h=this.decodeDataTypeString(h),h=this.evaluate(h,t,n,o,r,s),l.push({type:"property",value:h})}if(u[0].startsWith("(")&&u[0].endsWith(")")){if(!s)throw Error("Tried to call a function in a context variable. This has been disallowed in the current config.");const h=u[0].substring(1,u[0].length-1),f=[];if(""!==h)for(const v of h.split(",")){let C=this.decodeDataTypeString(v);C=this.evaluate(C,t,n,o,r,s),f.push(C)}l.push({type:"function",value:f})}}try{const u=this.fetchContextVariable(t,l);return r[this.decodeDataTypeString(e)]=u,u}catch{throw Error('The required context variable "'+this.decodeDataTypeString(e)+'" could not be found in the context object. Returning undefined instead.')}}catch(a){return this.logger.warn([a],i),void(r[this.decodeDataTypeString(e)]=void 0)}}fetchContextVariable(e,t){if("__proto__"===t[0].value)throw Error("Accessing the __proto__ property through a context variable is not allowed.");if("prototype"===t[0].value)throw Error("Accessing the prototype property through a context variable is not allowed.");if("constructor"===t[0].value)throw Error("Accessing the constructor property through a context variable is not allowed.");if(void 0===e)throw Error("Context variable path could not be resolved. Trying to access "+("property"===t[0].type?'property "'+t[0].value+'" of undefined.':"undefined function."));let n;return"property"===t[0].type?e.hasOwnProperty(t[0].value)?(n=e[t[0].value],"function"==typeof n&&(n=n.bind(e))):e.__proto__.hasOwnProperty(t[0].value)?(n=e.__proto__[t[0].value],"function"==typeof n&&(n=n.bind(e))):n=void 0:"function"===t[0].type&&(n=e(...t[0].value)),t.shift(),t.length>0&&(n=this.fetchContextVariable(n,t)),n}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(Fe),d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),We=(()=>{class c{constructor(e,t){this.dataTypeParser=e,this.logger=t}checkInputBindings(e,t,n,o){for(const[r,s]of Object.entries(e))if(n.parseInputs)if(s.parsed)this.updateInputBindingIfStale(s,t,n);else try{s.value=this.dataTypeParser.evaluate(s.raw,n.allowContextInBindings?t:{},void 0,n.unescapeStrings,s.boundContextVariables,n.allowContextFunctionCalls,o),s.parsed=!0}catch(i){this.logger.error(["Hook input parsing error\nselector: "+n.selector+"\ninput: "+r+'\nvalue: "'+s.value+'"'],o),this.logger.error([i.stack],o),delete e[r]}else s.value=s.raw}updateInputBindingIfStale(e,t,n){if(Object.keys(e.boundContextVariables).length>0){let o=!1;for(const[r,s]of Object.entries(e.boundContextVariables)){const i=this.dataTypeParser.encodeDataTypeString(r);if(this.dataTypeParser.loadContextVariable(i,t,void 0,n.unescapeStrings,{},n.allowContextFunctionCalls)!==s){o=!0;break}}o&&(e.boundContextVariables={},e.value=this.dataTypeParser.evaluate(e.raw,n.allowContextInBindings?t:{},void 0,n.unescapeStrings,e.boundContextVariables,n.allowContextFunctionCalls))}}checkOutputBindings(e,t,n){for(const[o,r]of Object.entries(e))r.parsed||(r.value=(s,i)=>{try{this.dataTypeParser.evaluate(r.raw,t.allowContextInBindings?i:{},s,t.unescapeStrings,r.boundContextVariables,t.allowContextFunctionCalls)}catch(a){this.logger.error(["Hook output parsing error\nselector: "+t.selector+"\noutput: "+o+'\nvalue: "'+r.value+'"'],n),this.logger.error([a.stack],n)}},r.parsed=!0)}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(je),d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),$e=(()=>{class c{constructor(e,t,n,o,r,s){this.injector=e,this.parserResolver=t,this.platformService=n,this.tagHookFinder=o,this.bindingsValueManager=r,this.logger=s}resolve(e,t,n,o,r){const s=[];for(const l of e){const g=this.resolveEntry(l,t,r);g&&s.push(g)}const i=this.validateParserFunctions(s,r);if(this.checkParserNames(i,r),!n&&!o)return i;this.checkBlackAndWhitelist(i,n,o,r);const a=[];for(const l of i)l.hasOwnProperty("name")&&"string"==typeof l.name&&(n&&n.includes(l.name)||o&&!o.includes(l.name))||a.push(l);return a}resolveEntry(e,t,n){if(e.hasOwnProperty("prototype")){if((0,T.HJs)(e))return this.createSelectorHookParser({component:e});try{return t.get(e)}catch{return new e}}else if("object"==typeof e){if("Object"!==e.constructor.name)return e;try{return this.createSelectorHookParser(e)}catch(o){return this.logger.error(["Invalid parser config - "+o.message,e],n),null}}return this.logger.error(["Invalid parser config - ",e],n),null}createSelectorHookParser(e){return e.hasOwnProperty("parseWithRegex")&&e.parseWithRegex||e.hasOwnProperty("enclosing")&&!e.enclosing||e.hasOwnProperty("bracketStyle")&&e.bracketStyle?new Ae(e,this.parserResolver,this.tagHookFinder,this.bindingsValueManager):new Ne(e,this.parserResolver,this.platformService,this.bindingsValueManager)}validateParserFunctions(e,t){const n=[];for(const o of e)"function"==typeof o.findHooks||"function"==typeof o.findHookElements?"function"==typeof o.loadComponent?"function"==typeof o.getBindings?n.push(o):this.logger.error(['Submitted parser does not implement "getBindings()". Removing from list of active parsers:',o],t):this.logger.error(['Submitted parser does not implement "loadComponent()". Removing from list of active parsers:',o],t):this.logger.error(['Submitted parser neither implements "findHooks()" nor "findHookElements()". One is required. Removing from list of active parsers:',o],t);return n}checkParserNames(e,t){const n=e.map(s=>s.name).filter(s=>void 0!==s),o=[],r=[];for(const s of n)o.includes(s)&&!r.includes(s)&&(this.logger.warn(['Parser name "'+s+'" is not unique and appears multiple times in the list of active parsers.'],t),r.push(s)),o.push(s)}checkBlackAndWhitelist(e,t,n,o){const r=e.map(s=>s.name).filter(s=>void 0!==s);if(t)for(const s of t)r.includes(s)||this.logger.warn(['Blacklisted parser name "'+s+'" does not appear in the list of global parsers names. Make sure both spellings are identical.'],o);if(n)for(const s of n)r.includes(s)||this.logger.warn(['Whitelisted parser name "'+s+'" does not appear in the list of global parsers names. Make sure both spellings are identical.'],o)}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(d.zZn),d.KVO(De),d.KVO(K),d.KVO(He),d.KVO(We),d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),Le=(()=>{class c{constructor(e){this.parserEntryResolver=e}resolve(e,t,n,o,r,s=null,i=null,a=null,l=null){let g={};n=n||[],o=o||[];const u={options:{sanitize:!0,convertHTMLEntities:!0,fixParagraphTags:!0,updateOnPushOnly:!1,compareInputsByValue:!1,compareOutputsByValue:!1,compareByValueDepth:5,triggerDOMEvents:!1,ignoreInputAliases:!1,ignoreOutputAliases:!1,acceptInputsForAnyProperty:!1,acceptOutputsForAnyObservable:!1,logOptions:{dev:!0,prod:!1,ssr:!1}}};g=(r=r||{}).hasOwnProperty("inheritance")&&r.inheritance!==te.Linear?this.mergeSettings(r.inheritance===te.All?[u,...n,...o,{options:i||void 0}]:[u,r||{},{options:i||void 0}]):this.mergeSettings([u,...o,{parsers:s||void 0,options:i||void 0}]);const h=g.options;t&&"string"!=typeof t&&(h.sanitize=!1);let f=[];return s?f=this.parserEntryResolver.resolve(s,e,null,null,h):g.parsers&&(f=this.parserEntryResolver.resolve(g.parsers,e,a,l,h)),{parsers:f,options:h}}mergeSettings(e){const t={};for(const n of e){if(void 0!==n.parsers){void 0===t.parsers&&(t.parsers=[]);for(const o of n.parsers)t.parsers.includes(o)||t.parsers.push(o)}void 0!==n.options&&(void 0===t.options&&(t.options={}),t.options=this.recursiveAssign(t.options,n.options))}return t}recursiveAssign(e,t){if(Object(t)!==t)return t;Object(e)!==e&&(e={});for(const n in t)e[n]=this.recursiveAssign(e[n],t[n]);return e}static{this.\u0275fac=function(t){return new(t||c)(d.KVO($e))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})();const he="_ngx_dynamic_hooks_node_placeholder";let ze=(()=>{class c{constructor(e,t){this.platformService=e,this.logger=t}findInElement(e,t,n,o,r,s){for(const i of n)if("function"==typeof i.findHooks){this.checkElement(e,t,n,o,r,s);break}}checkElement(e,t,n,o,r,s,i={counter:0,nodes:{}}){let a=this.platformService.getChildNodes(e),l="";const g={};for(const f of a)if(this.platformService.isTextNode(f))l+=this.platformService.getTextContent(f);else{const v=i.counter++;l+=`${he}__${v}__`,g[v]=f}const u=Object.keys(s).length,h=this.find(l,t,n,o,r,s);if(Object.keys(s).length>u&&(this.platformService.clearChildNodes(e),this.platformService.setInnerContent(e,h.content),a=this.platformService.getChildNodes(e),i.nodes={...i.nodes,...g}),Object.keys(i.nodes).length)for(const f of a)if(this.platformService.isTextNode(f)){let v=this.platformService.getTextContent(f);if(v){const C=N(v,new RegExp(`${he}__(\\d*)__`,"g"));if(C.length){const k=[];let z=0;for(const _ of C){const xe=v.substring(z,_.index),X=parseInt(_[1]);xe&&k.push(this.platformService.createTextNode(xe)),X&&i.nodes[X]&&(k.push(i.nodes[X]),delete i.nodes[X]),z=_.index+_[0].length}const be=v.substring(z);be&&k.push(this.platformService.createTextNode(be));const ie=this.platformService.getParentNode(f);for(const _ of k)this.platformService.insertBefore(ie,_,f);this.platformService.removeChild(ie,f),a=this.platformService.getChildNodes(ie)}}}for(const f of a)f.nodeType!==Node.TEXT_NODE&&this.checkElement(f,t,n,o,r,s,i)}find(e,t,n,o,r,s){if(""===e)return{content:e,hookIndex:s};r.convertHTMLEntities&&(e=this.convertHTMLEntities(e));let i=[];for(const l of n)if("function"==typeof l.findHooks)for(const g of l.findHooks(e,t,r))i.push({parser:l,hookPosition:g});i.sort((l,g)=>l.hookPosition.openingTagStartIndex-g.hookPosition.openingTagStartIndex),i=this.validateHookPositions(i,e,r);const a=[];for(const l of i){const g=Object.keys(s).length+1,u=this.getHookSegments(l.hookPosition,e);if(a.push({startIndex:l.hookPosition.openingTagStartIndex,endIndex:l.hookPosition.openingTagEndIndex,replacement:`<${ee} ${B}="${g}" ${P}="${o}">`}),a.push({startIndex:u.enclosing?l.hookPosition.closingTagStartIndex:l.hookPosition.openingTagEndIndex,endIndex:u.enclosing?l.hookPosition.closingTagEndIndex:l.hookPosition.openingTagEndIndex,replacement:`</${ee}>`}),s[g]={id:g,parser:l.parser,value:{openingTag:u.openingTag,closingTag:u.closingTag,element:null,elementSnapshot:null},data:null,isLazy:!1,bindings:null,previousBindings:null,componentRef:null,dirtyInputs:new Set,outputSubscriptions:{},htmlEventSubscriptions:{}},u.enclosing&&r.fixParagraphTags){const h=this.removeTagArtifacts(u.textBefore,"<p>","</p>",u.innerValue,"</p>","<p>");u.textBefore=h.firstText,u.innerValue=h.secondText;const f=this.removeTagArtifacts(u.innerValue,"<p>","</p>",u.textAfter,"</p>","<p>");u.innerValue=f.firstText,u.textAfter=f.secondText,e=u.textBefore+u.openingTag+u.innerValue+u.closingTag+u.textAfter}}a.sort((l,g)=>{let u=g.startIndex-l.startIndex;return 0===u&&(u=g.endIndex-l.endIndex),u});for(const l of a){const g=e.substring(0,l.startIndex),u=e.substring(l.endIndex);e=g+l.replacement+u}return{content:e,hookIndex:s}}getHookSegments(e,t){const n=Number.isInteger(e.closingTagStartIndex)&&Number.isInteger(e.closingTagEndIndex);return{enclosing:n,textBefore:t.substring(0,e.openingTagStartIndex),openingTag:t.substring(e.openingTagStartIndex,e.openingTagEndIndex),innerValue:n?t.substring(e.openingTagEndIndex,e.closingTagStartIndex):null,closingTag:n?t.substring(e.closingTagStartIndex,e.closingTagEndIndex):null,textAfter:t.substring(n?e.closingTagEndIndex:e.openingTagEndIndex)}}validateHookPositions(e,t,n){const o=[];e:for(const[r,s]of e.entries()){const i=Number.isInteger(s.hookPosition.closingTagStartIndex)&&Number.isInteger(s.hookPosition.closingTagEndIndex),a=s.hookPosition;if(a.openingTagStartIndex>=a.openingTagEndIndex){this.logger.warn(["Text hook error: openingTagEndIndex has to be greater than openingTagStartIndex. Ignoring.",a],n);continue}if(i&&a.openingTagEndIndex>a.closingTagStartIndex){this.logger.warn(["Text hook error: closingTagStartIndex has to be greater than openingTagEndIndex. Ignoring.",a],n);continue}if(i&&a.closingTagStartIndex>=a.closingTagEndIndex){this.logger.warn(["Text hook error: closingTagEndIndex has to be greater than closingTagStartIndex. Ignoring.",a],n);continue}const l=e.slice(0,r);for(const g of l){const u=g.hookPosition,h=Number.isInteger(u.closingTagStartIndex)&&Number.isInteger(u.closingTagEndIndex);if(a.openingTagStartIndex===u.openingTagStartIndex&&a.openingTagEndIndex===u.openingTagEndIndex&&(!i||!h||a.closingTagStartIndex===u.closingTagStartIndex&&a.closingTagEndIndex===u.closingTagEndIndex)){this.generateHookPosWarning("A text hook with the same position as another text hook was found. There may be multiple parsers looking for the same text pattern. Ignoring duplicates.",a,u,t,n);continue e}if(a.openingTagStartIndex<u.openingTagEndIndex){this.generateHookPosWarning("Text hook error: Hook opening tag starts before previous hook opening tag ends. Ignoring.",a,u,t,n);continue e}if(h&&!(a.openingTagEndIndex<=u.closingTagStartIndex||a.openingTagStartIndex>=u.closingTagEndIndex)){this.generateHookPosWarning("Text hook error: Opening tag of hook overlaps with closing tag of previous hook. Ignoring.",a,u,t,n);continue e}if(h&&i&&!(a.closingTagEndIndex<=u.closingTagStartIndex||a.closingTagStartIndex>=u.closingTagEndIndex)){this.generateHookPosWarning("Text hook error: Closing tag of hook overlaps with closing tag of previous hook. Ignoring.",a,u,t,n);continue e}if(i&&h&&a.openingTagEndIndex<=u.closingTagStartIndex&&a.closingTagStartIndex>=u.closingTagEndIndex){this.generateHookPosWarning("Text hook error: The closing tag of a nested hook lies beyond the closing tag of the outer hook. Ignoring.",a,u,t,n);continue e}}o.push(s)}return o}generateHookPosWarning(e,t,n,o,r){const s=this.getHookSegments(n,o),i=this.getHookSegments(t,o);this.logger.warn([e+"\nFirst hook: ",{openingTag:s.openingTag,openingTagStartIndex:n.openingTagStartIndex,openingTagEndIndex:n.openingTagEndIndex,closingTag:s.closingTag,closingTagStartIndex:n.closingTagStartIndex,closingTagEndIndex:n.closingTagEndIndex},"\nSecond hook:",{openingTag:i.openingTag,openingTagStartIndex:t.openingTagStartIndex,openingTagEndIndex:t.openingTagEndIndex,closingTag:i.closingTag,closingTagStartIndex:t.closingTagStartIndex,closingTagEndIndex:t.closingTagEndIndex}],r)}removeTagArtifacts(e,t,n,o,r,s){let i=!1,a=!1;const l=e.lastIndexOf(t),g=e.lastIndexOf(n);(l>=0&&-1===g||l>g)&&(i=!0);const u=o.indexOf(r),h=o.indexOf(s);return(u>=0&&-1===h||u<h)&&(a=!0),i&&a&&(e=e.substring(0,l)+" ".repeat(t.length)+e.substring(l+t.length),o=o.substring(0,u)+" ".repeat(r.length)+o.substring(u+r.length)),{firstText:e,secondText:o}}convertHTMLEntities(e){const t=this.platformService.createElement("div");return e.replace(/&[#A-Za-z0-9]+;/gi,o=>"&nbsp;"===o?" ":(this.platformService.setInnerContent(t,o),this.platformService.getTextContent(t)))}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(K),d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),Ke=(()=>{class c{constructor(e,t){this.platformService=e,this.logger=t}find(e,t,n,o,r,s){let i=[];for(const a of n)if("function"==typeof a.findHookElements)for(const l of a.findHookElements(e,t,r))i.push({parser:a,hookElement:l});i=function Re(c,p,e){return[...c].sort(function(n,o){return"function"==typeof e&&(n=e(n),o=e(o)),p(n,o)})}(i,this.platformService.sortElements.bind(this.platformService),a=>a.hookElement),i=this.validateHookElements(i,e,r);for(const a of i){const l=Object.keys(s).length+1;s[l]={id:l,parser:a.parser,value:{openingTag:this.platformService.getOpeningTag(a.hookElement),closingTag:this.platformService.getClosingTag(a.hookElement),element:a.hookElement,elementSnapshot:this.platformService.cloneElement(a.hookElement)},data:null,isLazy:!1,bindings:null,previousBindings:null,componentRef:null,dirtyInputs:new Set,outputSubscriptions:{},htmlEventSubscriptions:{}},this.platformService.setAttribute(a.hookElement,B,l.toString()),this.platformService.setAttribute(a.hookElement,P,o)}return s}validateHookElements(e,t,n){const o=[];for(const[r,s]of e.entries())o.slice(0,r).findIndex(l=>l.hookElement===s.hookElement)>=0||this.platformService.getAttributeNames(s.hookElement).includes(B)||this.platformService.getAttributeNames(s.hookElement).includes(P)?this.logger.warn(["An element hook tried to use an element that was found by another hook before. There may be multiple parsers looking for the same elements. Ignoring duplicates.",s.hookElement],n):oe(s.hookElement)||o.push(s);return o}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(K),d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})();const re="dynamic-hooks-sanitization-placeholder",_e=new RegExp(`</?${re}.*?>`,"g");let Ue=(()=>{class c{constructor(e){this.platformService=e,this.attrWhitelist=[B,P,"class","href","src"]}sanitize(e,t,n){const o={};for(const a of Object.values(t)){const l=this.platformService.querySelectorAll(e,`[${B}="${a.id}"][${P}="${n}"]`)?.[0];if(l){o[a.id]=l;const g=this.platformService.getParentNode(l),u=this.platformService.getChildNodes(l),h=this.platformService.createElement(re);this.platformService.setAttribute(h,B,a.id.toString()),this.platformService.setAttribute(h,P,n),this.platformService.insertBefore(g,h,l),this.platformService.removeChild(g,l);for(const f of u)this.platformService.appendChild(h,f)}}let r=this.platformService.getInnerContent(e);r=this.findAndEncodeTags(r,_e);const s=console.warn;console.warn=()=>{};let i=this.platformService.sanitize(r);console.warn=s,i=this.decodeTagString(i),e.innerHTML=i||"";for(const[a,l]of Object.entries(o)){const g=this.platformService.querySelectorAll(e,`${re}[${B}="${a}"]`)?.[0];if(g){const u=this.platformService.getParentNode(g),h=this.platformService.getChildNodes(g);this.platformService.insertBefore(u,l,g),this.platformService.removeChild(u,g);for(const f of h)this.platformService.appendChild(l,f);this.sanitizeElementAttrs(l)}}return e}sanitizeElementAttrs(e){const t=this.platformService.getAttributeNames(e),n=this.platformService.createElement("div"),o=this.platformService.createElement("span");this.platformService.appendChild(n,o);for(const i of t){try{this.platformService.setAttribute(o,i,this.platformService.getAttribute(e,i))}catch{}try{i!==B&&i!==P&&this.platformService.removeAttribute(e,i)}catch{}}n.innerHTML=this.platformService.sanitize(this.platformService.getInnerContent(n));const r=this.platformService.querySelectorAll(n,"span")[0],s=this.platformService.getAttributeNames(r);for(const i of s)try{this.platformService.setAttribute(e,i,this.platformService.getAttribute(r,i))}catch{}return e}findAndEncodeTags(e,t){let n=e;const o=N(e,t);o.sort((r,s)=>s.index-r.index);for(const r of o){const s=r.index,i=r.index+r[0].length,a=n.substring(0,s),l=this.encodeTagString(n.substring(s,i)),g=n.substring(i);n=a+l+g}return n}encodeTagString(e){return(e=(e=e.replace(/</g,"@@@hook-lt@@@")).replace(/>/g,"@@@hook-gt@@@")).replace(/"/g,"@@@hook-dq@@@")}decodeTagString(e){return(e=(e=e.replace(/@@@hook-lt@@@/g,"<")).replace(/@@@hook-gt@@@/g,">")).replace(/@@@hook-dq@@@/g,'"')}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(K))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),qe=(()=>{class c{constructor(e){this.logger=e}isEqual(e,t,n,o={sanitize:!0,convertHTMLEntities:!0,fixParagraphTags:!0,updateOnPushOnly:!1,compareInputsByValue:!1,compareOutputsByValue:!1,compareByValueDepth:5,triggerDOMEvents:!1,ignoreInputAliases:!1,ignoreOutputAliases:!1,acceptInputsForAnyProperty:!1,acceptOutputsForAnyObservable:!1,logOptions:{dev:!0,prod:!1,ssr:!1}}){const r=this.detailedStringify(e,n),s=this.detailedStringify(t,n);return null===r.result||null===s.result?(this.logger.warn(["Objects could not be compared by value as one or both of them could not be stringified. Returning false. \n","Objects:",e,t],o),!1):r.result===s.result}detailedStringify(e,t){try{const n={count:0},o=this.decycle(e,[],t,n);return{result:JSON.stringify(o,(s,i)=>void 0===i?"undefined":"function"==typeof i||"symbol"==typeof i?i.toString():i),depthReachedCount:n.count}}catch{return{result:null,depthReachedCount:0}}}decycle(e,t=[],n=5,o){if(t.length>n)return o.count++,null;if(!e||"object"!=typeof e||e instanceof Date)return e;for(const s of t)if(this.objEqualsProperties(e,s))return null;const r=t.concat([e]);if(Array.isArray(e)){const s=[];for(const i of e)s.push(this.decycle(i,r,n,o));return s}{const s={};for(const i of Object.keys(e))s[i]=this.decycle(e[i],r,n,o);return s}}objEqualsProperties(e,t){const n=Object.keys(e),o=Object.keys(t);if(n.length!==o.length)return!1;for(const r of n)if(e[r]!==t[r])return!1;return!0}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),ge=(()=>{class c{constructor(e,t){this.deepComparer=e,this.logger=t}refresh(e,t,n,o){for(const[r,s]of Object.entries(e))this.updateBindings(s,t,n);if(o)for(const r of Object.values(e)){if(!r.componentRef)return;"function"==typeof r.componentRef.instance.onDynamicChanges&&r.componentRef.instance.onDynamicChanges({context:t})}}updateBindings(e,t,n){e.componentRef&&(e.bindings=e.parser.getBindings(e.id,e.value,t,n),this.updateComponentWithNewInputs(e,n),this.updateComponentWithNewOutputs(e,t,n),e.previousBindings={inputs:this.savePreviousBindings(e,"inputs",n.compareInputsByValue,n.compareByValueDepth),outputs:this.savePreviousBindings(e,"outputs",n.compareOutputsByValue,n.compareByValueDepth)})}savePreviousBindings(e,t,n,o){const r={};if(e.bindings.hasOwnProperty(t))for(const[s,i]of Object.entries(e.bindings[t]))r[s]={reference:i,stringified:n?this.deepComparer.detailedStringify(i,o):null};return r}updateComponentWithNewInputs(e,t){const n=e.componentRef.instance,o=this.getChangedBindings(e,"inputs",t),r=[],s=(0,T.HJs)(e.componentRef.componentType);for(const[i,a]of Object.entries(o)){const l=t.ignoreInputAliases?"propName":"templateName",g=s.inputs.find(u=>i===u[l])||s.inputs.find(u=>i.toLowerCase()===u[l].toLowerCase())||s.inputs.find(u=>i.replace(/-/g,"")===u[l])||s.inputs.find(u=>i.replace(/-/g,"").toLowerCase()===u[l].toLowerCase());if(g)r.push({propName:g.propName,templateName:g.templateName,value:a});else if(t.acceptInputsForAnyProperty){const h=Object.getOwnPropertyNames(n).find(f=>i===f)||Object.getOwnPropertyNames(n).find(f=>i.toLowerCase()===f.toLowerCase())||i;if(["__proto__","prototype","constructor"].includes(h)){this.logger.error(['Tried to overwrite a __proto__, prototype or constructor property with input "'+h+'" for hook "'+e.componentRef.componentType.name+'". This is not allowed.'],t);continue}r.push({propName:h,templateName:null,value:a})}}for(const{propName:i,templateName:a,value:l}of r)a?e.componentRef?.setInput(a,l):i&&(e.componentRef.instance[i]=l);r.length&&e.componentRef?.changeDetectorRef.detectChanges()}updateComponentWithNewOutputs(e,t,n){const o=e.componentRef.instance,r=this.getChangedBindings(e,"outputs",n),s=[],i=(0,T.HJs)(e.componentRef.componentType);for(const[a,l]of Object.entries(r)){const g=n.ignoreOutputAliases?"propName":"templateName",u=i.outputs.find(h=>a===h[g])||i.outputs.find(h=>a.toLowerCase()===h[g].toLowerCase())||i.outputs.find(h=>a.replace(/-/g,"")===h[g])||i.outputs.find(h=>a.replace(/-/g,"").toLowerCase()===h[g].toLowerCase());if(u)s.push({propName:u.propName,templateName:u.templateName,value:l});else if(n.acceptOutputsForAnyObservable){let h=Object.getOwnPropertyNames(o).find(f=>o[f]instanceof H.c&&a===f)||Object.getOwnPropertyNames(o).find(f=>o[f]instanceof H.c&&a.toLowerCase()===f.toLowerCase());h&&s.push({propName:h,templateName:null,value:l})}}for(const{propName:a,value:g}of s)e.outputSubscriptions[a]&&e.outputSubscriptions[a].unsubscribe(),e.outputSubscriptions[a]=e.componentRef.instance[a].subscribe(u=>{g(u,t)})}getChangedBindings(e,t,n){const o={};if(e.bindings.hasOwnProperty(t))for(const[r,s]of Object.entries(e.bindings[t]))if(e.previousBindings&&e.previousBindings[t].hasOwnProperty(r))if("inputs"===t?n.compareInputsByValue:n.compareOutputsByValue){const i=this.deepComparer.detailedStringify(s,n.compareByValueDepth);this.checkDetailedStringifyResultPair(r,e.componentRef.componentType.name,n,e.previousBindings[t][r].stringified,i)?i.result!==e.previousBindings[t][r].stringified.result&&(o[r]=s):s!==e.previousBindings[t][r].reference&&(o[r]=s)}else s!==e.previousBindings[t][r].reference&&(o[r]=s);else o[r]=s;return o}checkDetailedStringifyResultPair(e,t,n,o,r){return null===o.result&&null===r.result?(this.logger.warn(['Could stringify neither new nor old value for hook binding "'+e+'" for component "'+t+'" to compare by value. Defaulting to comparison by reference instead.'],n),!1):null===o.result?(this.logger.warn(['Could not stringify old value for hook binding "'+e+'" for component "'+t+'" to compare by value. Defaulting to comparison by reference instead.'],n),!1):null===r.result?(this.logger.warn(['Could not stringify new value for hook binding "'+e+'" for component "'+t+'" to compare by value. Defaulting to comparison by reference instead.'],n),!1):(o.depthReachedCount>0&&r.depthReachedCount>0?this.logger.warn(["Maximum compareByValueDepth of "+n.compareByValueDepth+" reached "+r.depthReachedCount+" time(s) for new value and "+o.depthReachedCount+' time(s) for old value while comparing binding "'+e+'" for component "'+t+".\n","If this impacts performance, consider simplifying this binding, reducing comparison depth or setting compareInputsByValue/compareOutputsByValue to false."],n):o.depthReachedCount>0?this.logger.warn(["Maximum compareByValueDepth of "+n.compareByValueDepth+" reached "+o.depthReachedCount+' time(s) for old value while comparing binding "'+e+'" for component "'+t+".\n","If this impacts performance, consider simplifying this binding, reducing comparison depth or setting compareInputsByValue/compareOutputsByValue to false."],n):r.depthReachedCount>0&&this.logger.warn(["Maximum compareByValueDepth of "+n.compareByValueDepth+" reached "+r.depthReachedCount+' time(s) for new value while comparing binding "'+e+'" for component "'+t+".\n","If this impacts performance, consider simplifying this binding, reducing comparison depth or setting compareInputsByValue/compareOutputsByValue to false."],n),!0)}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(qe),d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),Qe=(()=>{class c{constructor(e,t,n,o,r){this.platformId=e,this.appRef=t,this.componentUpdater=n,this.platformService=o,this.logger=r}init(e,t,n,o,r,s,i){const a=new M.m(1),l=[],g={};if(0===Object.keys(t).length)return a.next(!0),a;for(let h of this.platformService.querySelectorAll(e,`[${B}][${P}]`)){const f=parseInt(this.platformService.getAttribute(h,B));if(0===this.platformService.querySelectorAll(e,`[${B}="${f}"][${P}="${n}"]`).length){delete t[f];continue}const v=t[f];v.data=v.parser.loadComponent(v.id,v.value,o,this.platformService.getChildNodes(h),r),v.isLazy=v.data.component.hasOwnProperty("importPromise")&&v.data.component.hasOwnProperty("importName"),(0,G.UE)(this.platformId)||!v.isLazy?(!v.data.hostElementTag&&Be.includes(this.platformService.getTagName(h).toLowerCase())&&(v.data.hostElementTag=ee),v.data.hostElementTag&&(h=this.useCustomHostElement(h,v.data.hostElementTag),v.value.element=h),this.createContentSlotElements(h,v,n),g[f]=h):delete t[f]}const u=Object.keys(g).map(h=>parseInt(h));for(const[h,f]of Object.entries(t))u.includes(parseInt(h))||(this.logger.warn(["Error when trying to load components - The anchor element for the following hook was found initially, but could not be found again for loading the component. Ignoring.",f],r),delete t[h]);for(const[h,f]of Object.entries(g)){const v=t[h];l.push((0,w.of)(!0).pipe((0,D.Z)(()=>this.loadComponentClass(v.data.component))).pipe((0,j.M)(C=>{const k=this.extractContentSlotElements(f,n);this.createComponent(v,o,f,k,r,C,s,i)})).pipe((0,m.W)(C=>(this.logger.error([C.stack],r),delete t[v.id],(0,w.of)(null)))))}return 0===l.length?(a.next(!0),a):((0,E.z)([...l]).pipe(ae()).subscribe(()=>{for(const h of Object.values(t)){const f=[];("function"==typeof h.componentRef.instance.onDynamicMount||"function"==typeof h.componentRef.instance.onDynamicChanges)&&this.findContentChildren(h.componentRef.location.nativeElement,f,t,n),"function"==typeof h.componentRef.instance.onDynamicChanges&&h.componentRef.instance.onDynamicChanges({contentChildren:f}),"function"==typeof h.componentRef.instance.onDynamicMount&&h.componentRef.instance.onDynamicMount({context:o,contentChildren:f})}for(const h of Object.values(g))this.platformService.removeAttribute(h,B),this.platformService.removeAttribute(h,P),this.platformService.removeAttribute(h,"ng-version");a.next(!0)}),a)}useCustomHostElement(e,t){const n=this.platformService.createElement(t);this.platformService.setAttribute(n,B,this.platformService.getAttribute(e,B)),this.platformService.setAttribute(n,P,this.platformService.getAttribute(e,P)),this.platformService.removeAttribute(e,B),this.platformService.removeAttribute(e,P);const o=this.platformService.getChildNodes(e);for(const r of o)this.platformService.appendChild(n,r);return this.platformService.insertBefore(this.platformService.getParentNode(e),n,e),this.platformService.removeChild(this.platformService.getParentNode(e),e),n}createContentSlotElements(e,t,n){let o;o=t.data.hasOwnProperty("content")&&Array.isArray(t.data.content)?t.data.content:[this.platformService.getChildNodes(e)],this.platformService.clearChildNodes(e);for(const[r,s]of o.entries())if(null!=s){const i=this.platformService.createElement("dynamic-component-contentslot");this.platformService.setAttribute(i,"slotIndex",r.toString()),this.platformService.setAttribute(i,"parsetoken",n);for(const a of s)this.platformService.appendChild(i,a);this.platformService.appendChild(e,i)}}extractContentSlotElements(e,t){const n=[],o=this.platformService.getChildNodes(e).filter(r=>"DYNAMIC-COMPONENT-CONTENTSLOT"===this.platformService.getTagName(r)&&this.platformService.getAttribute(r,"parsetoken")===t);for(const r of o){const s=this.platformService.getAttribute(r,"slotIndex");n[parseInt(s)]=this.platformService.getChildNodes(r)}return this.platformService.clearChildNodes(e),n}loadComponentClass(e){const t=new M.m(1);if(e.hasOwnProperty("prototype"))t.next(e);else if("function"==typeof e)e().then(n=>{t.next(n)});else{if(!e.hasOwnProperty("importPromise")||!e.hasOwnProperty("importName"))throw Error('The "component" property of a returned HookData object must either contain the component class, a function that returns a promise with the component class or an explicit LazyLoadComponentConfig');if(e.importPromise instanceof Promise)throw Error('When lazy-loading a component, the "importPromise"-field must contain a function returning the import-promise, but it contained the promise itself.');e.importPromise().then(n=>{const o=e.importName,r=Object.prototype.hasOwnProperty.call(n,o)?n[o]:n.default;t.next(r)})}return t}createComponent(e,t,n,o,r,s,i,a){const l=(0,T.a0P)(s,{hostElement:n,environmentInjector:e.data.environmentInjector||i,elementInjector:e.data.injector||a,projectableNodes:o});e.componentRef=l,this.mapOutputsToHTMLEvents(e,r),this.componentUpdater.updateBindings(e,t,r),"function"==typeof e.componentRef.instance.onDynamicChanges&&void 0!==t&&e.componentRef.instance.onDynamicChanges({context:t}),this.appRef.attachView(l.hostView),l.changeDetectorRef.detectChanges()}mapOutputsToHTMLEvents(e,t){const n=(0,T.HJs)(e.componentRef.componentType);for(const o of n.outputs){const r=t.ignoreOutputAliases?o.propName:o.templateName;e.htmlEventSubscriptions[r]=e.componentRef.instance[o.propName].subscribe(s=>{t.triggerDOMEvents&&this.platformService.dispatchEvent(e.componentRef?.location.nativeElement,r,s)})}}findContentChildren(e,t=[],n,o){const r=this.platformService.getChildNodes(e);null!=r&&r.length>0&&r.forEach((s,i)=>{let a=!1;const l=this.platformService.getAttribute(s,P);if(null!==l&&l===o&&this.platformService.getAttribute(s,B)){const u=parseInt(this.platformService.getAttribute(s,B),10);n.hasOwnProperty(u)&&(t.push({componentRef:n[u].componentRef,contentChildren:[],hookValue:n[u].value}),a=!0)}this.findContentChildren(s,a?t[t.length-1].contentChildren:t,n,o)})}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(S.Agw),d.KVO(S.o8S),d.KVO(ge),d.KVO(K),d.KVO(F))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),fe=(()=>{class c{constructor(e,t,n,o,r,s,i,a,l,g,u){this.allSettings=e,this.ancestorSettings=t,this.moduleSettings=n,this.settingsResolver=o,this.textHookFinder=r,this.elementHookFinder=s,this.contentSanitizer=i,this.componentCreator=a,this.platformService=l,this.environmentInjector=g,this.injector=u}parse(e=null,t=null,n=null,o=null,r=null,s=null,i=null,a={},l=null,g=null){const u=l||this.environmentInjector,h=g||this.injector,{parsers:f,options:v}=this.settingsResolver.resolve(h,e,this.allSettings,this.ancestorSettings,this.moduleSettings,t,o,r,s);if(!e)return(0,w.of)({element:i||this.platformService.createElement("div"),hookIndex:a,context:n,usedParsers:f,usedOptions:v,usedInjector:h,usedEnvironmentInjector:u,destroy:()=>this.destroy(a)});const C=Math.random().toString(36).substring(2,12);let k="string"==typeof e?this.platformService.createElement("div"):e;if(this.platformService.setAttribute(k,q,"1"),"string"==typeof e){const z=this.textHookFinder.find(e,n,f,C,v,a);this.platformService.setInnerContent(k,z.content)}else this.textHookFinder.findInElement(k,n,f,C,v,a);if(a=this.elementHookFinder.find(k,n,f,C,v,a),v?.sanitize&&this.contentSanitizer.sanitize(k,a,C),i&&i!==k){this.platformService.removeAttribute(k,q),this.platformService.setAttribute(i,q,"1"),this.platformService.clearChildNodes(i);for(const z of this.platformService.getChildNodes(k))this.platformService.appendChild(i,z);k=i}return this.componentCreator.init(k,a,C,n,v,u,h).pipe(ae()).pipe((0,we.T)(z=>(this.platformService.removeAttribute(k,q),{element:k,hookIndex:a,context:n,usedParsers:f,usedOptions:v,usedInjector:h,usedEnvironmentInjector:u,destroy:()=>this.destroy(a)})))}destroy(e){if(e){for(const t of Object.values(e))t.componentRef&&t.componentRef.destroy();for(const t of Object.values(e)){for(const n of Object.values(t.outputSubscriptions))n&&n.unsubscribe();for(const n of Object.values(t.htmlEventSubscriptions))n&&n.unsubscribe()}}}static{this.\u0275fac=function(t){return new(t||c)(d.KVO(le,8),d.KVO(Y,8),d.KVO(ue,8),d.KVO(Le),d.KVO(ze),d.KVO(Ke),d.KVO(Ue),d.KVO(Qe),d.KVO(K),d.KVO(d.uvJ),d.KVO(d.zZn))}}static{this.\u0275prov=d.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}}return c})(),tt=(()=>{class c{constructor(e,t,n,o,r,s){this.hostElement=e,this.dynamicHooksService=t,this.componentUpdater=n,this.platformService=o,this.environmentInjector=r,this.injector=s,this.content=null,this.context=null,this.globalParsersBlacklist=null,this.globalParsersWhitelist=null,this.parsers=null,this.options=null,this.componentsLoaded=new d.bkB,this.hookIndex={},this.activeOptions={sanitize:!0,convertHTMLEntities:!0,fixParagraphTags:!0,updateOnPushOnly:!1,compareInputsByValue:!1,compareOutputsByValue:!1,compareByValueDepth:5,triggerDOMEvents:!1,ignoreInputAliases:!1,ignoreOutputAliases:!1,acceptInputsForAnyProperty:!1,acceptOutputsForAnyObservable:!1,logOptions:{dev:!0,prod:!1,ssr:!1}},this.activeParsers=[],this.token=Math.random().toString(36).substring(2,12),this.initialized=!1}ngDoCheck(){this.activeOptions.updateOnPushOnly||this.refresh(!1)}ngOnChanges(e){e.hasOwnProperty("content")||e.hasOwnProperty("globalParsersBlacklist")||e.hasOwnProperty("globalParsersWhitelist")||e.hasOwnProperty("parsers")||e.hasOwnProperty("options")?(this.reset(),this.parse(this.content)):e.hasOwnProperty("context")&&this.refresh(!0)}ngAfterViewInit(){}ngAfterViewChecked(){}ngOnDestroy(){this.reset()}reset(){this.dynamicHooksService.destroy(this.hookIndex),this.platformService.setInnerContent(this.hostElement.nativeElement,""),this.hookIndex={},this.activeOptions={sanitize:!0,convertHTMLEntities:!0,fixParagraphTags:!0,updateOnPushOnly:!1,compareInputsByValue:!1,compareOutputsByValue:!1,compareByValueDepth:5,triggerDOMEvents:!1,ignoreInputAliases:!1,ignoreOutputAliases:!1,acceptInputsForAnyProperty:!1,acceptOutputsForAnyObservable:!1,logOptions:{dev:!0,prod:!1,ssr:!1}},this.activeParsers=[],this.initialized=!1}parse(e){this.dynamicHooksService.parse(e,this.parsers,this.context,this.options,this.globalParsersBlacklist,this.globalParsersWhitelist,this.hostElement.nativeElement,this.hookIndex,this.environmentInjector,this.injector).subscribe(t=>{this.activeParsers=t.usedParsers,this.activeOptions=t.usedOptions,this.initialized=!0;const n=Object.values(this.hookIndex).map(o=>({hookId:o.id,hookValue:o.value,hookParser:o.parser,componentRef:o.componentRef}));this.componentsLoaded.emit(n)})}refresh(e){this.initialized&&this.componentUpdater.refresh(this.hookIndex,this.context,this.activeOptions,e)}static{this.\u0275fac=function(t){return new(t||c)(S.rXU(S.aKT),S.rXU(fe),S.rXU(ge),S.rXU(K),S.rXU(d.uvJ),S.rXU(d.zZn))}}static{this.\u0275cmp=S.VBU({type:c,selectors:[["ngx-dynamic-hooks"]],inputs:{content:"content",context:"context",globalParsersBlacklist:"globalParsersBlacklist",globalParsersWhitelist:"globalParsersWhitelist",parsers:"parsers",options:"options"},outputs:{componentsLoaded:"componentsLoaded"},features:[S.OA$],decls:0,vars:0,template:function(t,n){},encapsulation:2})}}return c})();var me=b(222),ye=b(58),ve=b(2306),nt=b(140);class ot extends me.A4{baseSize;documentListHandlers;entityListHandlers;_handlers;context={};counters={};getIndex(p){const e=this.counters[p]||0;return this.counters[p]=e+1,e}constructor(p="m",e){super(),this.baseSize=p,this._handlers=e,this.documentListHandlers=e?.documentList,this.entityListHandlers=e?.entityList,this.setupRenderers()}resetContext(){this.context={},this.counters={}}getContext(){return this.context}scaleSize(p){const e=["xs","s","m","l","xl"],t=e.indexOf(this.baseSize),n=e.indexOf(p);return e[Math.max(0,Math.min(e.length-1,n+(t-2)))]}setupRenderers(){this.heading=({tokens:p,depth:e})=>{const r=this.scaleSize({1:"xl",2:"l",3:"l",4:"m",5:"m",6:"s"}[e]),s={1:"bold",2:"semibold",3:"semibold",4:"semibold",5:"medium",6:"medium"}[e],i=this.parser?.parseInline(p)||"";return`<cue-typography size="${r}" weight="${s}"${this.getIndex("heading")>0?' style="margin-top: 24px; display: block;"':' style="display: block;"'}>${i}</cue-typography>\n`},this.paragraph=({tokens:p})=>{const e=this.scaleSize("m"),t=this.parser?.parseInline(p)||"";return/^(?:\s*,?\s*<cue-href-chip\b[^>]*><\/cue-href-chip>)+\s*$/.test(t)?`<div style="display: flex; gap: 6px; flex-wrap: wrap;">${t.replace(/(<\/cue-href-chip>)\s*,?\s*/g,"$1").trim()}</div>\n`:`<div class="cue-md-p"><cue-typography size="${e}" weight="regular">${t}</cue-typography></div>\n`},this.listitem=({tokens:p})=>{const e=this.scaleSize("m");return`<li class="cue-md-li" style="font-size: var(--cue-font-${e}-size);"><cue-typography size="${e}" weight="regular">${this.parser?.parseInline(p)||""}</cue-typography></li>`},this.tablecell=({tokens:p,header:e,align:t})=>{const n=e?"th":"td",r=e?"semibold":"regular";return`<${n}${t?` style="text-align: ${t}"`:""}><cue-typography size="${this.scaleSize("m")}" weight="${r}">${this.parser?.parseInline(p)||""}</cue-typography></${n}>`},this.blockquote=({text:p,tokens:e})=>/^\[!(NOTE|WARNING|IMPORTANT|TIP|CAUTION)\]/i.test(p.trimStart())?"":`<blockquote class="cue-md-blockquote"><cue-typography size="${this.scaleSize("m")}" weight="regular">${this.parser?.parse(e)||""}</cue-typography></blockquote>`,this.link=({href:p,title:e,tokens:t})=>{const n=this.parser?.parseInline(t)||"";if(!p){const r=this.getIndex("hrefchip"),s=`hrefchip_menuitems_${r}`,i=`hrefchip_id_${r}`,a=`hrefchip_click_${r}`,l=n.replace(/<[^>]*>/g,"");return this.context[i]=l,this.context[s]=()=>this._handlers?.hrefChip?.menuItems?.(l)??[],this.context[a]=()=>{this._handlers?.hrefChip?.clicked?.(l)},`<cue-href-chip [label]="context.${i}" [menuItems]="context.${s}()" (clicked)="context.${a}()"></cue-href-chip>`}return`<a href="${p}"${e?` title="${e}"`:""} target="_blank" rel="noopener noreferrer">${n}</a>`},this.codespan=({text:p})=>`<code class="cue-code-inline">${p}</code>`,this.code=p=>{const e="36px";if("document-list"===p.lang){const t=p.documentRefs;if(!t||0===t.length)return"";const o=`doc_refs_${this.getIndex("doc")}`;return this.context[o]=t,this._handlers?.availableContentCategories&&(this.context.availableContentCategories=this._handlers.availableContentCategories),`<cue-document-list [documentRefs]="context.${o}" [documentdata]="context.documentdata" [handlers]="context.documentlisthandlers" [availableContentCategories]="context.availableContentCategories" (clickedDocument)="context.documentclickedrow($event)" style="margin-bottom: ${e};"></cue-document-list>`}if("entity-list"===p.lang){const t=p.iris;if(!t)return"";const o=`entity_iris_${this.getIndex("entity")}`;return this.context[o]=t,this._handlers?.availableEntityCategories&&(this.context.availableEntityCategories=this._handlers.availableEntityCategories),this._handlers?.availableEntityRelationships&&(this.context.availableEntityRelationships=this._handlers.availableEntityRelationships),`<cue-ent-list-inner [entities]="context.${o}" [entitydata]="context.entitydata" [entityLocations]="context.entitylocations" [handlers]="context.entitylisthandlers" [availableEntityCategories]="context.availableEntityCategories" [availableEntityRelationships]="context.availableEntityRelationships" [mapboxToken]="context.mapboxToken" (rowClicked)="context.entityclickedrow($event)" style="margin-bottom: ${e};"></cue-ent-list-inner>`}if("map"===p.lang){const t=p.mapData;if(!t||!t.layers)return"";const n=this.getIndex("map"),o=`map_layers_${n}`,r=`map_settings_${n}`;return this.context[o]=t.layers,this.context[r]=t.settings,`<cue-card style="height: 300px; display: block; margin-bottom: ${e};" [padded]="false"><cue-map [layers]="context.${o}" [settings]="context.${r}"></cue-map></cue-card>`}return`<div style="margin-bottom: ${e};">${super.code(p)}</div>`}}walkTokens(p){return(0,A.A)(function*(){if("code"===p.type&&"document-list"===p.lang){const e=p.text.split("\n").filter(o=>o.trim().length>0),t=new Map,n=[];for(const o of e){const r=o.trim(),s=r.match(/^(.+)\?page=(\d+)$/);if(s){const i=s[1],a=s[2];t.has(i)||(t.set(i,{id:i,pages:[]}),n.push(i));const l=t.get(i);l.pages||(l.pages=[]),l.pages.push({id:r,page:a,relevance:0})}else t.has(r)||(t.set(r,{id:r}),n.push(r))}p.documentRefs=n.map(o=>t.get(o))}if("code"===p.type&&"entity-list"===p.lang){const e=p.text.split("\n").filter(t=>t.trim().length>0);p.iris=e}if("code"===p.type&&"map"===p.lang){const e=p.text.split("\n").filter(i=>i.trim().length>0),t=e[0]?.trim()||"",n=e.slice(1),o={};n.forEach(i=>{const a=i.split(";"),l=a[0]?.trim(),g=a[1]?.trim(),u=a[2]?.trim();if(!l||!g)return;const h=(0,ye.S)(g);if(!h)return;const f=(0,ye.n)(h);let v={};if(u)try{v=JSON.parse(u)}catch{}o[l]||(o[l]=[]),o[l].push({type:"Feature",properties:v,geometry:f})});const r=[];Object.keys(o).forEach(i=>{const a=new ve.ux(i);a.collection=new nt.o(o[i]),r.push(a)});const s=new ve.yY;s.mapboxToken=t,s.contextMenu.showFlyTo=!1,p.mapData={layers:r,settings:s}}})()}}let rt=(()=>{class c{envInjector=(0,d.WQX)(d.uvJ);fileURL=T.hFB.required();bytes=(0,T.hFB)(void 0);html=(0,d.vPA)("");hookOptions={sanitize:!1,globalParsersBlueprint:{environmentInjector:this.envInjector}};parsers=[{component:{importPromise:()=>Promise.resolve().then(b.bind(b,2245)),importName:"Typography"},selector:"cue-typography"}];onFile=(0,d.QZP)((()=>{var e=this;return(0,A.A)(function*(){const t=e.bytes(),n=t?(new TextDecoder).decode(t):yield(yield fetch(e.fileURL())).text(),o=new ot("m");o.resetContext();const r=yield me.xI.parse(n,{gfm:!0,breaks:!1,renderer:o,async:!0,walkTokens:o.walkTokens.bind(o)});e.html.set(r)})})());static \u0275fac=function(t){return new(t||c)};static \u0275cmp=S.VBU({type:c,selectors:[["cue-md-viewer"]],inputs:{fileURL:[1,"fileURL"],bytes:[1,"bytes"]},decls:2,vars:3,consts:[[1,"page"],[3,"parsers","content","options"]],template:function(t,n){1&t&&(S.j41(0,"div",0),S.nrm(1,"ngx-dynamic-hooks",1),S.k0s()),2&t&&(S.R7$(),S.Y8G("parsers",n.parsers)("content",n.html())("options",n.hookOptions))},dependencies:[tt],styles:[".page[_ngcontent-%COMP%]{overflow-y:auto;height:100%;padding:16px;box-sizing:border-box}[_nghost-%COMP%] cue-typography{display:inline-block}[_nghost-%COMP%] .cue-md-p{margin-bottom:24px;opacity:.9;line-height:1.6;display:block}[_nghost-%COMP%] .cue-md-p:last-child{margin-bottom:0}[_nghost-%COMP%] .cue-md-blockquote{margin-bottom:24px;opacity:.9;border-left:4px solid var(--cue-border-color);padding-left:16px}[_nghost-%COMP%] ul, [_nghost-%COMP%] ol{margin-bottom:24px;padding-left:28px;font-family:var(--cue-font-family);opacity:.9;line-height:1.6}[_nghost-%COMP%] li.cue-md-li{margin-bottom:12px}[_nghost-%COMP%] table{margin-bottom:24px;border-collapse:collapse;width:100%}[_nghost-%COMP%] th, [_nghost-%COMP%] td{padding:8px 12px;border-bottom:1px solid var(--cue-border-color, #eee);text-align:left}[_nghost-%COMP%] th cue-typography{font-weight:var(--cue-font-weight-semibold)}[_nghost-%COMP%] .cue-code-inline{background-color:var(--cue-border-color);padding:0 4px;border-radius:4px;font-family:monospace;font-size:1.1em;font-weight:500;color:var(--cue-main-foreground)}"],changeDetection:0})}return c})()},2306(U,V,b){b.d(V,{AA:()=>S,ux:()=>H,yY:()=>T});var A=b(140),d=b(8402);class T{mapboxToken;contextMenu={showProperties:!0,showFlyTo:!0};toolbar=new S}class S{hidden=!1;position="bottom";margin="20px";displayZoom=!0;displayGeofenceDraw=!1;displayLayerToggle=!0;clearGeofenceAfterDraw=!0}class H{label;id;collection=new A.o;color;visible=!0;cluster=!0;zoomToFit=!0;category;constructor(w,E=(0,d.A)()){this.label=w,this.id=E}}},140(U,V,b){b.d(V,{o:()=>A});class A{type="FeatureCollection";features=[];bbox;id;constructor(T=[]){this.features=T}addFeature(T){this.features.push(T)}removeFeature(T){return this.features.splice(T,1)[0]}getFeatureCount(){return this.features.length}clear(){this.features=[]}}},58(U,V,b){function A(m){let y=0,I=-1,O=-1;for(let R=0;R<m.length;R++)if("("===m[R])y++,1===y&&(I=R+1);else if(")"===m[R]&&(y--,0===y)){O=R;break}return-1!==I&&-1!==O?m.substring(I,O):null}b.d(V,{S:()=>D,n:()=>j});class d{x;y;z;constructor(y,I,O){this.x=y,this.y=I,this.z=O}}class T{points;constructor(y){this.points=y}}class S{lines;constructor(y){this.lines=y}}function D(m){if(m){if((m=m.trim().toUpperCase()).startsWith("POINT"))return function M(m){m=m.trim().toUpperCase();const I=A(m)?.split(" ")??[];return m.includes("POINT Z")?new d(parseFloat(I[0]),parseFloat(I[1]),parseFloat(I[2])):new d(parseFloat(I[0]),parseFloat(I[1]))}(m);if(m.startsWith("LINESTRING"))return function H(m){const y=A(m=m.trim().toUpperCase()),I=[];return y?.split(",").map(O=>O.trim().split(" ").map(R=>parseFloat(R))).map(O=>{I.push(new d(O[0],O[1],O[2]))}),new T(I)}(m);if(m.startsWith("POLYGON"))return function w(m){const y=A(m=m.trim().toUpperCase());if(!y)return new S([]);const I=y.match(/\(([^)]+)\)/g);if(!I)return new S([]);const O=I.map(R=>{const W=A(R);return W?W.split(",").map(Z=>{const $=Z.trim().split(" ");return $.length>=3?new d(parseFloat($[0]),parseFloat($[1]),parseFloat($[2])):new d(parseFloat($[0]),parseFloat($[1]))}):[]});return new S(O)}(m)}}function j(m){if(m instanceof d)return{type:"Point",coordinates:void 0!==m.z?[m.x,m.y,m.z]:[m.x,m.y]};if(m instanceof T)return{type:"LineString",coordinates:m.points.map(y=>void 0!==y.z?[y.x,y.y,y.z]:[y.x,y.y])};if(m instanceof S)return{type:"Polygon",coordinates:m.lines.map(y=>y.map(I=>void 0!==I.z?[I.x,I.y,I.z]:[I.x,I.y]))};throw new Error("Unknown WKT type")}},5332(U,V,b){b.d(V,{k:()=>S});for(var d=[],T=0;T<256;++T)d.push((T+256).toString(16).slice(1));function S(w,E=0){return(d[w[E+0]]+d[w[E+1]]+d[w[E+2]]+d[w[E+3]]+"-"+d[w[E+4]]+d[w[E+5]]+"-"+d[w[E+6]]+d[w[E+7]]+"-"+d[w[E+8]]+d[w[E+9]]+"-"+d[w[E+10]]+d[w[E+11]]+d[w[E+12]]+d[w[E+13]]+d[w[E+14]]+d[w[E+15]]).toLowerCase()}},8402(U,V,b){b.d(V,{A:()=>E});const d={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var T,S=new Uint8Array(16);function H(){if(!T&&!(T=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return T(S)}var M=b(5332);const E=function w(D,j,m){if(d.randomUUID&&!j&&!D)return d.randomUUID();var y=(D=D||{}).random||(D.rng||H)();if(y[6]=15&y[6]|64,y[8]=63&y[8]|128,j){m=m||0;for(var I=0;I<16;++I)j[m+I]=y[I];return j}return(0,M.k)(y)}}}]);
package/7193.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[7193],{329(w,g,a){a.d(g,{CodeViewer:()=>f});var c=a(467),i=a(7705),s=a(5802),o=a(2538),_=a(5547);let f=(()=>{class p{fileURL=i.hFB.required();codeType=(0,i.hFB)("text");content=(0,s.vPA)("");onFile=(0,s.QZP)((()=>{var n=this;return(0,c.A)(function*(){const d=n.fileURL(),y=yield(yield fetch(d)).text();if("json"===n.codeType()||"jsonld"===n.codeType())try{return void n.content.set(JSON.parse(y))}catch{}n.content.set(y)})})());static \u0275fac=function(d){return new(d||p)};static \u0275cmp=_.VBU({type:p,selectors:[["cue-code-viewer"]],inputs:{fileURL:[1,"fileURL"],codeType:[1,"codeType"]},decls:1,vars:3,consts:[[2,"height","100%","width","100%","display","block",3,"type","content","readonly"]],template:function(d,l){1&d&&_.nrm(0,"cue-code-editor",0),2&d&&_.Y8G("type",l.codeType())("content",l.content())("readonly",!0)},dependencies:[o.B],styles:["[_nghost-%COMP%]{display:contents}"],changeDetection:0})}return p})()},639(w,g,a){a.d(g,{A:()=>o});const c="http://www.w3.org/1999/02/22-rdf-syntax-ns#",i="http://www.w3.org/2001/XMLSchema#",s="http://www.w3.org/2000/10/swap/",o={xsd:{decimal:`${i}decimal`,boolean:`${i}boolean`,double:`${i}double`,integer:`${i}integer`,string:`${i}string`},rdf:{type:`${c}type`,nil:`${c}nil`,first:`${c}first`,rest:`${c}rest`,langString:`${c}langString`},owl:{sameAs:"http://www.w3.org/2002/07/owl#sameAs"},r:{forSome:`${s}reify#forSome`,forAll:`${s}reify#forAll`},log:{implies:`${s}log#implies`,isImpliedBy:`${s}log#isImpliedBy`}}},6353(w,g,a){a.d(g,{Ay:()=>A,x1:()=>n});var c=a(639);const{rdf:i,xsd:s}=c.A;let o,_=0;const A={namedNode:$,blankNode:v,variable:D,literal:E,defaultGraph:function L(){return o},quad:m,triple:m,fromTerm:h,fromQuad:O};class n{constructor(t){this.id=t}get value(){return this.id}equals(t){return t instanceof n?this.id===t.id:!!t&&this.termType===t.termType&&this.value===t.value}hashCode(){return 0}toJSON(){return{termType:this.termType,value:this.value}}}class d extends n{get termType(){return"NamedNode"}}class l extends n{get termType(){return"Literal"}get value(){return this.id.substring(1,this.id.lastIndexOf('"'))}get language(){const t=this.id;let r=t.lastIndexOf('"')+1;return r<t.length&&"@"===t[r++]?t.substr(r).toLowerCase():""}get datatype(){return new d(this.datatypeString)}get datatypeString(){const t=this.id,r=t.lastIndexOf('"')+1,u=r<t.length?t[r]:"";return"^"===u?t.substr(r+2):"@"!==u?s.string:i.langString}equals(t){return t instanceof l?this.id===t.id:!!t&&!!t.datatype&&this.termType===t.termType&&this.value===t.value&&this.language===t.language&&this.datatype.value===t.datatype.value}toJSON(){return{termType:this.termType,value:this.value,language:this.language,datatype:{termType:"NamedNode",value:this.datatypeString}}}}class y extends n{constructor(t){super(`_:${t}`)}get termType(){return"BlankNode"}get value(){return this.id.substr(2)}}class P extends n{constructor(t){super(`?${t}`)}get termType(){return"Variable"}get value(){return this.id.substr(1)}}o=new class j extends n{constructor(){return super(""),o||this}get termType(){return"DefaultGraph"}equals(t){return this===t||!!t&&this.termType===t.termType}};class N extends n{constructor(t,r,u,S){super(""),this._subject=t,this._predicate=r,this._object=u,this._graph=S||o}get termType(){return"Quad"}get subject(){return this._subject}get predicate(){return this._predicate}get object(){return this._object}get graph(){return this._graph}toJSON(){return{termType:this.termType,subject:this._subject.toJSON(),predicate:this._predicate.toJSON(),object:this._object.toJSON(),graph:this._graph.toJSON()}}equals(t){return!!t&&this._subject.equals(t.subject)&&this._predicate.equals(t.predicate)&&this._object.equals(t.object)&&this._graph.equals(t.graph)}}function $(e){return new d(e)}function v(e){return new y(e||"n3-"+_++)}function E(e,t){if("string"==typeof t)return new l(`"${e}"@${t.toLowerCase()}`);let r=t?t.value:"";return""===r&&("boolean"==typeof e?r=s.boolean:"number"==typeof e&&(Number.isFinite(e)?r=Number.isInteger(e)?s.integer:s.double:(r=s.double,Number.isNaN(e)||(e=e>0?"INF":"-INF")))),new l(""===r||r===s.string?`"${e}"`:`"${e}"^^${r}`)}function D(e){return new P(e)}function m(e,t,r,u){return new N(e,t,r,u)}function h(e){if(e instanceof n)return e;switch(e.termType){case"NamedNode":return $(e.value);case"BlankNode":return v(e.value);case"Variable":return D(e.value);case"DefaultGraph":return o;case"Literal":return E(e.value,e.language||e.datatype);case"Quad":return O(e);default:throw new Error(`Unexpected termType: ${e.termType}`)}}function O(e){if(e instanceof N)return e;if("Quad"!==e.termType)throw new Error(`Unexpected termType: ${e.termType}`);return m(h(e.subject),h(e.predicate),h(e.object),h(e.graph))}}}]);
1
+ "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[7193],{329(w,g,u){u.d(g,{CodeViewer:()=>f});var d=u(467),i=u(7705),s=u(5802),l=u(2538),_=u(5547);let f=(()=>{class p{fileURL=i.hFB.required();codeType=(0,i.hFB)("text");bytes=(0,i.hFB)(void 0);content=(0,s.vPA)("");onFile=(0,s.QZP)((()=>{var n=this;return(0,d.A)(function*(){const c=n.bytes(),a=c?(new TextDecoder).decode(c):yield(yield fetch(n.fileURL())).text();if("json"===n.codeType()||"jsonld"===n.codeType())try{return void n.content.set(JSON.parse(a))}catch{}n.content.set(a)})})());static \u0275fac=function(c){return new(c||p)};static \u0275cmp=_.VBU({type:p,selectors:[["cue-code-viewer"]],inputs:{fileURL:[1,"fileURL"],codeType:[1,"codeType"],bytes:[1,"bytes"]},decls:1,vars:3,consts:[[2,"height","100%","width","100%","display","block",3,"type","content","readonly"]],template:function(c,a){1&c&&_.nrm(0,"cue-code-editor",0),2&c&&_.Y8G("type",a.codeType())("content",a.content())("readonly",!0)},dependencies:[l.B],styles:["[_nghost-%COMP%]{display:contents}"],changeDetection:0})}return p})()},639(w,g,u){u.d(g,{A:()=>l});const d="http://www.w3.org/1999/02/22-rdf-syntax-ns#",i="http://www.w3.org/2001/XMLSchema#",s="http://www.w3.org/2000/10/swap/",l={xsd:{decimal:`${i}decimal`,boolean:`${i}boolean`,double:`${i}double`,integer:`${i}integer`,string:`${i}string`},rdf:{type:`${d}type`,nil:`${d}nil`,first:`${d}first`,rest:`${d}rest`,langString:`${d}langString`},owl:{sameAs:"http://www.w3.org/2002/07/owl#sameAs"},r:{forSome:`${s}reify#forSome`,forAll:`${s}reify#forAll`},log:{implies:`${s}log#implies`,isImpliedBy:`${s}log#isImpliedBy`}}},6353(w,g,u){u.d(g,{Ay:()=>O,x1:()=>n});var d=u(639);const{rdf:i,xsd:s}=d.A;let l,_=0;const O={namedNode:N,blankNode:v,variable:D,literal:$,defaultGraph:function L(){return l},quad:T,triple:T,fromTerm:h,fromQuad:E};class n{constructor(t){this.id=t}get value(){return this.id}equals(t){return t instanceof n?this.id===t.id:!!t&&this.termType===t.termType&&this.value===t.value}hashCode(){return 0}toJSON(){return{termType:this.termType,value:this.value}}}class c extends n{get termType(){return"NamedNode"}}class a extends n{get termType(){return"Literal"}get value(){return this.id.substring(1,this.id.lastIndexOf('"'))}get language(){const t=this.id;let r=t.lastIndexOf('"')+1;return r<t.length&&"@"===t[r++]?t.substr(r).toLowerCase():""}get datatype(){return new c(this.datatypeString)}get datatypeString(){const t=this.id,r=t.lastIndexOf('"')+1,o=r<t.length?t[r]:"";return"^"===o?t.substr(r+2):"@"!==o?s.string:i.langString}equals(t){return t instanceof a?this.id===t.id:!!t&&!!t.datatype&&this.termType===t.termType&&this.value===t.value&&this.language===t.language&&this.datatype.value===t.datatype.value}toJSON(){return{termType:this.termType,value:this.value,language:this.language,datatype:{termType:"NamedNode",value:this.datatypeString}}}}class A extends n{constructor(t){super(`_:${t}`)}get termType(){return"BlankNode"}get value(){return this.id.substr(2)}}class P extends n{constructor(t){super(`?${t}`)}get termType(){return"Variable"}get value(){return this.id.substr(1)}}l=new class j extends n{constructor(){return super(""),l||this}get termType(){return"DefaultGraph"}equals(t){return this===t||!!t&&this.termType===t.termType}};class m extends n{constructor(t,r,o,S){super(""),this._subject=t,this._predicate=r,this._object=o,this._graph=S||l}get termType(){return"Quad"}get subject(){return this._subject}get predicate(){return this._predicate}get object(){return this._object}get graph(){return this._graph}toJSON(){return{termType:this.termType,subject:this._subject.toJSON(),predicate:this._predicate.toJSON(),object:this._object.toJSON(),graph:this._graph.toJSON()}}equals(t){return!!t&&this._subject.equals(t.subject)&&this._predicate.equals(t.predicate)&&this._object.equals(t.object)&&this._graph.equals(t.graph)}}function N(e){return new c(e)}function v(e){return new A(e||"n3-"+_++)}function $(e,t){if("string"==typeof t)return new a(`"${e}"@${t.toLowerCase()}`);let r=t?t.value:"";return""===r&&("boolean"==typeof e?r=s.boolean:"number"==typeof e&&(Number.isFinite(e)?r=Number.isInteger(e)?s.integer:s.double:(r=s.double,Number.isNaN(e)||(e=e>0?"INF":"-INF")))),new a(""===r||r===s.string?`"${e}"`:`"${e}"^^${r}`)}function D(e){return new P(e)}function T(e,t,r,o){return new m(e,t,r,o)}function h(e){if(e instanceof n)return e;switch(e.termType){case"NamedNode":return N(e.value);case"BlankNode":return v(e.value);case"Variable":return D(e.value);case"DefaultGraph":return l;case"Literal":return $(e.value,e.language||e.datatype);case"Quad":return E(e);default:throw new Error(`Unexpected termType: ${e.termType}`)}}function E(e){if(e instanceof m)return e;if("Quad"!==e.termType)throw new Error(`Unexpected termType: ${e.termType}`);return T(h(e.subject),h(e.predicate),h(e.object),h(e.graph))}}}]);