@qaecy/cue-ui 0.0.38 → 0.0.39

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/493.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[493],{3183(N,S,s){s.d(S,{A:()=>E});var x=s(7705),g=s(5802),o=s(9417),y=s(1359),P=s(8957),C=s(2245),B=s(5381),c=s(5547);const p=(v,f)=>f.value;function k(v,f){if(1&v){const r=c.RV6();c.j41(0,"cue-input",6),c.bIt("valueChange",function(d){g.eBV(r);const _=c.XpG();return _.searchText=d,g.Njj(_.onSearchChange())}),c.k0s()}if(2&v){const r=c.XpG();c.Y8G("value",r.searchText)}}function F(v,f){if(1&v){const r=c.RV6();c.j41(0,"cue-checkbox",7),c.bIt("checkedChange",function(d){const _=g.eBV(r).$implicit,T=c.XpG();return _.selected=d,g.Njj(T.onSelectionChange())}),c.k0s()}if(2&v){const r=f.$implicit;c.Y8G("label",r.value||"(blank)")("checked",r.selected)}}function L(v,f){1&v&&(c.j41(0,"cue-typography",5),c.EFF(1,"No results"),c.k0s())}let E=(()=>{class v{_cdr=(0,g.WQX)(x.gRc);_params;options=[];filteredOptions=[];searchText="";agInit(r){this._params=r}afterGuiAttached(r){this._refreshOptions(),this._cdr.markForCheck()}onNewRowsLoaded(){this._refreshOptions(),this._cdr.markForCheck()}isFilterActive(){return this.options.some(r=>!r.selected)}doesFilterPass(r){const h=new Set(this.options.filter(M=>M.selected).map(M=>M.value)),d=this._params.getValue(r.node),_=null==d?"":String(d);return"..."===_||"Loading..."===_||(""===_?h.has(""):_.split(", ").map(M=>M.trim()).some(M=>h.has(M)))}getModel(){return this.isFilterActive()?{selectedValues:this.options.filter(r=>r.selected).map(r=>r.value)}:null}setModel(r){if(r){const h=new Set(r.selectedValues);this.options.forEach(d=>d.selected=h.has(d.value))}else this.options.forEach(h=>h.selected=!0);this._applySearch(),this._cdr.markForCheck()}onSelectionChange(){this._params.filterChangedCallback(),this._cdr.markForCheck()}onSearchChange(){this._applySearch(),this._cdr.markForCheck()}get allSelected(){return this.options.length>0&&this.options.every(r=>r.selected)}toggleAll(r){this.options.forEach(h=>h.selected=r),this._applySearch(),this._params.filterChangedCallback(),this._cdr.markForCheck()}_refreshOptions(){const r=new Set;this._params.api.forEachNode(d=>{const _=this._params.getValue(d);if(null==_||""===_)r.add("");else{const T=String(_);if("..."===T||"Loading..."===T)return;const M=T.split(", ").map(R=>R.trim());for(const R of M)r.add(R)}});const h=new Map(this.options.map(d=>[d.value,d.selected]));this.options=Array.from(r).sort((d,_)=>d.localeCompare(_)).map(d=>({value:d,selected:h.get(d)??!0})),this._applySearch()}_applySearch(){const r=this.searchText.toLowerCase().trim();this.filteredOptions=r?this.options.filter(h=>h.value.toLowerCase().includes(r)):this.options}static \u0275fac=function(h){return new(h||v)};static \u0275cmp=c.VBU({type:v,selectors:[["cue-multi-select-filter"]],decls:7,vars:3,consts:[["direction","column","gap","s"],["placeholder","Search...","size","s",3,"value"],["size","s","label","Select all",3,"checkedChange","checked"],[1,"msf-list"],["size","s",3,"label","checked"],["size","s"],["placeholder","Search...","size","s",3,"valueChange","value"],["size","s",3,"checkedChange","label","checked"]],template:function(h,d){1&h&&(c.j41(0,"cue-flexcontainer",0),c.nVh(1,k,1,1,"cue-input",1),c.j41(2,"cue-checkbox",2),c.bIt("checkedChange",function(T){return d.toggleAll(T)}),c.k0s(),c.j41(3,"div",3),c.Z7z(4,F,1,2,"cue-checkbox",4,p),c.nVh(6,L,2,0,"cue-typography",5),c.k0s()()),2&h&&(c.R7$(),c.vxM(d.options.length>10?1:-1),c.R7$(),c.Y8G("checked",d.allSelected),c.R7$(2),c.Dyx(d.filteredOptions),c.R7$(2),c.vxM(0===d.filteredOptions.length?6:-1))},dependencies:[o.YN,y.S,P.p,C.Typography,B.n],styles:["[_nghost-%COMP%]{display:block;padding:var(--cue-card-padding-y) var(--cue-card-padding-x);min-width:200px;max-width:300px;box-sizing:border-box}.msf-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;max-height:200px;overflow-y:auto}"],changeDetection:0})}return v})()},5902(N,S,s){s.d(S,{U:()=>L});var x=s(7705),g=s(5802),o=s(2271),y=s(9352),P=s(8957),C=s(2444),B=s(2245),c=s(5381),p=s(5547);function k(E,v){if(1&E){const f=p.RV6();p.j41(0,"cue-input",4),p.bIt("valueChange",function(h){g.eBV(f);const d=p.XpG();return g.Njj(d.onValueChange(h))}),p.k0s()}if(2&E){const f=p.XpG();p.Y8G("value",f.filterText)}}function F(E,v){if(1&E){const f=p.RV6();p.j41(0,"cue-typography",5),p.bIt("click",function(){g.eBV(f);const h=p.XpG();return g.Njj(h.clear())}),p.EFF(1,"Clear"),p.k0s()}}let L=(()=>{class E{_cdr=(0,g.WQX)(x.gRc);_params;filterText="";filterType="contains";filterTypeOptions=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"];_labelContains=(0,y.Xx)("components.agGridColumnSelect.textFilterContains");_labelNotContains=(0,y.Xx)("components.agGridColumnSelect.textFilterNotContains");_labelEquals=(0,y.Xx)("components.agGridColumnSelect.textFilterEquals");_labelNotEqual=(0,y.Xx)("components.agGridColumnSelect.textFilterNotEqual");_labelStartsWith=(0,y.Xx)("components.agGridColumnSelect.textFilterStartsWith");_labelEndsWith=(0,y.Xx)("components.agGridColumnSelect.textFilterEndsWith");_labelBlank=(0,y.Xx)("components.agGridColumnSelect.textFilterBlank");_labelNotBlank=(0,y.Xx)("components.agGridColumnSelect.textFilterNotBlank");filterTypeLabelMap=(0,o.EW)(()=>({contains:this._labelContains(),notContains:this._labelNotContains(),equals:this._labelEquals(),notEqual:this._labelNotEqual(),startsWith:this._labelStartsWith(),endsWith:this._labelEndsWith(),blank:this._labelBlank(),notBlank:this._labelNotBlank()}));showTextInput=(0,o.EW)(()=>!["blank","notBlank"].includes(this.filterType));agInit(f){this._params=f}afterGuiAttached(f){this._cdr.markForCheck()}isFilterActive(){return!!["blank","notBlank"].includes(this.filterType)||this.filterText.trim().length>0}doesFilterPass(f){const r=this._params.getValue(f.node),h=null==r?"":String(r),d=this.filterText.toLowerCase().trim(),_=h.toLowerCase();switch(this.filterType){case"contains":default:return _.includes(d);case"notContains":return!_.includes(d);case"equals":return _===d;case"notEqual":return _!==d;case"startsWith":return _.startsWith(d);case"endsWith":return _.endsWith(d);case"blank":return""===h;case"notBlank":return""!==h}}getModel(){return this.isFilterActive()?{filterType:"text",type:this.filterType,filter:this.filterText}:null}setModel(f){this.filterText=f?.filter??"",this.filterType=f?.type??"contains",this._cdr.markForCheck()}onValueChange(f){this.filterText=f,this._params.filterChangedCallback(),this._cdr.markForCheck()}onFilterTypeChange(f){this.filterType=String(f||"contains"),["blank","notBlank"].includes(this.filterType)&&(this.filterText=""),this._params.filterChangedCallback(),this._cdr.markForCheck()}clear(){this.filterText="",this.filterType="contains",this._params.filterChangedCallback(),this._cdr.markForCheck()}static \u0275fac=function(r){return new(r||E)};static \u0275cmp=p.VBU({type:E,selectors:[["cue-text-filter"]],decls:4,vars:5,consts:[["direction","column","gap","s"],["size","s",3,"valueChange","value","options","labelMap"],["placeholder","Filter...","size","s",3,"value"],["size","s",2,"cursor","pointer","text-align","right"],["placeholder","Filter...","size","s",3,"valueChange","value"],["size","s",2,"cursor","pointer","text-align","right",3,"click"]],template:function(r,h){1&r&&(p.j41(0,"cue-flexcontainer",0)(1,"cue-select",1),p.bIt("valueChange",function(_){return h.onFilterTypeChange(_)}),p.k0s(),p.nVh(2,k,1,1,"cue-input",2),p.nVh(3,F,2,0,"cue-typography",3),p.k0s()),2&r&&(p.R7$(),p.Y8G("value",h.filterType)("options",h.filterTypeOptions)("labelMap",h.filterTypeLabelMap()),p.R7$(),p.vxM(h.showTextInput()?2:-1),p.R7$(),p.vxM(h.filterText||"contains"!==h.filterType?3:-1))},dependencies:[P.p,C.l,B.Typography,c.n],styles:["[_nghost-%COMP%]{display:block;padding:var(--cue-card-padding-y) var(--cue-card-padding-x);min-width:180px;max-width:280px;box-sizing:border-box}"],changeDetection:0})}return E})()},5448(N,S,s){s.d(S,{L:()=>P});var x=s(7705),g=s(2245),o=s(5547);const y=["*"];let P=(()=>{class C{fontSize=(0,x.hFB)("m");italic=(0,x.hFB)(!1);noWrap=(0,x.hFB)(!0);static \u0275fac=function(p){return new(p||C)};static \u0275cmp=o.VBU({type:C,selectors:[["cue-button-label"]],inputs:{fontSize:[1,"fontSize"],italic:[1,"italic"],noWrap:[1,"noWrap"]},ngContentSelectors:y,decls:3,vars:3,consts:[[3,"size","italic","noWrap"]],template:function(p,k){1&p&&(o.NAR(),o.j41(0,"div")(1,"cue-typography",0),o.SdG(2),o.k0s()()),2&p&&(o.R7$(),o.Y8G("size",k.fontSize())("italic",k.italic())("noWrap",k.noWrap()))},dependencies:[g.Typography],styles:["div[_ngcontent-%COMP%]{transform:translateY(.05em)}"]})}return C})()},8493(N,S,s){s.d(S,{CueEntityList:()=>Q});var x=s(467),g=s(7705),o=s(5802),y=s(2271),P=s(6950),C=s(9352),B=s(1951),c=s(6455),p=s(8334),k=s(5949),F=s(2843),L=s(3646),E=s(8017),v=s(2306),f=s(6103);let r=(()=>{class u{mapboxToken=(0,o.vPA)(void 0);entityData=(0,o.vPA)({});availableEntityRelationships=(0,o.vPA)([]);settings=(0,y.EW)(()=>{const e=this.mapboxToken();if(!e)return;const t=new v.yY;return t.mapboxToken=e,t.contextMenu.showFlyTo=!1,t.contextMenu.showProperties=!1,t});layers=(0,y.EW)(()=>{const e=this.entityData(),t=this.availableEntityRelationships();return(0,f.N)({entityData:e,availableEntityRelationships:t})});static \u0275fac=function(t){return new(t||u)};static \u0275prov=o.jDH({token:u,factory:u.\u0275fac,providedIn:"root"})}return u})();var h=s(3183),d=s(5902);let _=(()=>{class u{entities=(0,o.vPA)([]);entityData=(0,o.vPA)({});orderByMentionCount=(0,o.vPA)(!1);availableEntityCategories=(0,o.vPA)(void 0);labelValue=(0,C.Xx)("components.entityList.labelValue");labelCategories=(0,C.Xx)("components.entityList.labelCategories");labelMentions=(0,C.Xx)("components.entityList.labelMentionCount");_filterChangeCounter=(0,o.vPA)(0);filterChangeCounter=this._filterChangeCounter.asReadonly();onFilterChanged(){this._filterChangeCounter.update(e=>e+1)}columnDefs=(0,y.EW)(()=>{const e=[{field:"value",headerName:this.labelValue(),flex:2,filter:d.U,valueGetter:t=>!t.data?.value&&t.data?.loading?"Loading...":t.data?.value||t.data?.entity},{field:"categories",headerName:this.labelCategories(),flex:1.5,filter:h.A,valueGetter:t=>{const i=t.data?.categories;if(!i)return t.data?.loading?"...":"";const a=Array.isArray(i)?i:[i],l=this._leafEntityCategoryIris();return(l?a.filter(b=>l.has(b)):a).map(b=>this._getEntityCategoryLabel(b)).join(", ")}}];return this.orderByMentionCount()&&e.push({field:"mentionCount",headerName:this.labelMentions(),flex:1,filter:"agNumberColumnFilter",valueGetter:t=>{const i=t.data;if(i?.loading)return"...";const a=i?.mentionCount??0;return a>0?a:""},cellStyle:{textAlign:"center"}}),e});rows=(0,y.EW)(()=>{const e=this.entities()||[],t=this.entityData()||{},i=e.map(a=>{const l=t[a];return{entity:a,value:l?.value,categories:l?.categories,mentionCount:l?.mentionCount,loading:!l}});return this.orderByMentionCount()?i.sort((a,l)=>(l.mentionCount||0)-(a.mentionCount||0)):i});_leafEntityCategoryIris=(0,y.EW)(()=>{const e=this.availableEntityCategories();if(!e)return null;const t=new Set(e.map(i=>i.parent).filter(i=>!!i));return new Set(e.filter(i=>!t.has(i.iri)).map(i=>i.iri))});_getEntityCategoryLabel(e){const t=this.availableEntityCategories();if(void 0!==t){const i=t.find(a=>a.iri===e);if(i)return i.label}return this._prettifyCategory(e)}_prettifyCategory(e){if(!e)return"";const t=e.split("#");return(t[t.length-1]||e).replace(/([A-Z])/g," $1").trim()}static \u0275fac=function(t){return new(t||u)};static \u0275prov=o.jDH({token:u,factory:u.\u0275fac,providedIn:"root"})}return u})();var T=s(5971),M=s(5448),R=s(2014),G=s(5381),n=s(5547);function j(u,I){if(1&u){const e=n.RV6();n.j41(0,"cue-flexcontainer",2)(1,"cue-button",5),n.bIt("click",function(){o.eBV(e);const i=n.XpG();return o.Njj(i.onOrderByMentionCountClick())}),n.nrm(2,"cue-button-padder"),n.j41(3,"cue-button-label"),n.EFF(4),n.nI1(5,"transloco"),n.k0s(),n.nrm(6,"cue-button-padder"),n.k0s()()}if(2&u){const e=n.XpG();n.R7$(),n.Y8G("tooltip",e.infoOrderByMentionCount()),n.R7$(3),n.JRh(n.bMT(5,2,"components.entityList.labelOrderByMentionCount"))}}function V(u,I){if(1&u){const e=n.RV6();n.j41(0,"cue-tab",1),n.nI1(1,"transloco"),n.j41(2,"cue-map",6),n.bIt("clickedFeature",function(i){o.eBV(e);const a=n.XpG();return o.Njj(a.onMapFeatureClick(i))}),n.k0s()()}if(2&u){n.XpG();const e=n.r8f(6),t=n.r8f(7);n.Y8G("label",n.bMT(1,3,"components.entityList.tabMap")),n.R7$(2),n.Y8G("layers",t)("settings",e)}}let z=(()=>{class u{map=(0,o.WQX)(r);table=(0,o.WQX)(_);entities=g.hFB.required();mapboxToken=(0,g.hFB)(void 0);handlers=g.hFB.required();availableEntityCategories=(0,g.hFB)(void 0);availableEntityRelationships=(0,g.hFB)();entityData=(0,g.hFB)({});paginationPageSize=(0,g.hFB)(10);prefetchPages=(0,g.hFB)(3);variant=(0,g.hFB)("none");rowClicked=(0,g.CGW)();clickedOpen=(0,g.CGW)();_gridApi=null;_requestedIris=new Set;_requestedLocationIris=new Set;_isSorted=!1;_pendingMapClickIri=(0,o.vPA)(null);_bufferedUntilIndex=(0,o.vPA)(0);_locationBufferedUntilIndex=0;_lastEntitiesKey="";_destroyed=!1;labelOpenInEntityViewer=(0,C.Xx)("components.entityList.labelOpenInEntityViewer");infoOrderByMentionCount=(0,C.Xx)("components.entityList.infoOrderByMentionCount");overlaySettings={...new B.K,mode:"row"};overlayActions=(0,y.EW)(()=>[{label:this.labelOpenInEntityViewer(),icon:"info",action:e=>{this.handlers().requestOpen?.(e.rowData),this.clickedOpen.emit(e.rowData)}}]);constructor(){(0,o.QZP)(()=>this.map.mapboxToken.set(this.mapboxToken())),(0,o.QZP)(()=>{const e=this.entityData();this.map.entityData.update(t=>{let i=!1;const a={...t};for(const[l,m]of Object.entries(e))(m.directMapGeometries?.length||m.indirectMapGeometries?.length)&&(a[l]={value:"",categories:[],directMapGeometries:m.directMapGeometries,indirectMapGeometries:m.indirectMapGeometries},i=!0);return i?a:t})}),(0,o.QZP)(()=>this.map.availableEntityRelationships.set(this.availableEntityRelationships()??[])),(0,o.QZP)(()=>this.table.availableEntityCategories.set(this.availableEntityCategories())),(0,o.QZP)(()=>this.table.entities.set(this.entities())),(0,o.QZP)(()=>this.table.entityData.set(this.entityData())),(0,o.QZP)(()=>{const e=this._pendingMapClickIri();if(!e)return;const t=this.entityData()[e];t&&(this._pendingMapClickIri.set(null),this.rowClicked.emit({entity:e,value:t.value,categories:t.categories,mentionCount:t.mentionCount,loading:!1}))}),(0,o.QZP)(()=>{const t=this.entities().join("|");if(t!==this._lastEntitiesKey)if(this._lastEntitiesKey=t,this._requestedIris.clear(),this._requestedLocationIris.clear(),this._bufferedUntilIndex.set(0),this._locationBufferedUntilIndex=0,this.handlers().checkHasLocations&&this.handlers().requestLocations){const i=(this.availableEntityCategories()??[]).map(a=>a.iri);this.handlers().checkHasLocations(i).then(a=>{a&&!this._destroyed&&this._requestLocationBatch()})}else this.handlers().requestLocations&&setTimeout(()=>this._requestLocationBatch())}),(0,o.QZP)(()=>{const e=this.table.orderByMentionCount(),t=this.table.filterChangeCounter();if(e||t>0){const l=this.entities().filter(m=>!this._requestedIris.has(m));l.length>0&&(l.forEach(m=>this._requestedIris.add(m)),this.handlers().requestData(l,e))}})}rowSelection={mode:"singleRow",checkboxes:!1,enableClickSelection:!0};onGridReady(e){this._gridApi=e,e.addEventListener("viewportChanged",()=>this._checkViewport()),e.addEventListener("modelUpdated",()=>this._checkViewport()),e.addEventListener("paginationChanged",()=>this._checkViewport()),e.addEventListener("sortChanged",()=>{const t=e.getColumnState();this._isSorted=t.some(i=>null!=i.sort),this._isSorted&&this._requestAllUnloaded()}),e.addEventListener("filterChanged",()=>{this.table.onFilterChanged()}),setTimeout(()=>this._checkViewport(),100)}onMapFeatureClick(e){var t=this;return(0,x.A)(function*(){const a=e.feature.properties?.iri;a&&(t._pendingMapClickIri.set(a),yield t.handlers().requestData?.([a],t.table.orderByMentionCount()))})()}_checkViewport(){if(!this._gridApi||this._gridApi.isDestroyed?.())return;if(this._isSorted)return void this._requestAllUnloaded();const e=this.entities(),t=e.length;if(!t)return;const i=Math.max(1,this._gridApi.paginationGetPageSize?.()??this.paginationPageSize()),l=Math.max(0,this._gridApi.paginationGetCurrentPage?.()??0)*i,m=Math.min(t,l+i),b=this._bufferedUntilIndex();let D=null;if(0===b?D=0:(l>=Math.max(0,b-i)||m>b)&&(D=b),null===D||D>=t)return;const A=i*Math.max(1,this.prefetchPages()),w=Math.min(t,D+A),W=e.slice(D,w).filter(O=>!this._requestedIris.has(O));this._bufferedUntilIndex.set(Math.max(b,w)),W.length&&(W.forEach(O=>this._requestedIris.add(O)),setTimeout(()=>this.handlers().requestData(W,this.table.orderByMentionCount())))}_requestLocationBatch(){if(!this.handlers().requestLocations)return;const e=this.entities(),t=e.length;if(this._locationBufferedUntilIndex>=t)return;const a=Math.min(t,this._locationBufferedUntilIndex+500),l=e.slice(this._locationBufferedUntilIndex,a).filter(m=>!this._requestedLocationIris.has(m));this._locationBufferedUntilIndex=a,l.length>0&&(l.forEach(m=>this._requestedLocationIris.add(m)),setTimeout(()=>this.handlers().requestLocations(l))),a<t&&!this._destroyed&&setTimeout(()=>this._requestLocationBatch(),200)}ngOnDestroy(){this._destroyed=!0,this._gridApi=null}_requestAllUnloaded(){if(!this._gridApi)return;const e=[];if(this._gridApi.forEachNode(t=>{const i=t.data;i?.loading&&!this._requestedIris.has(i.entity)&&e.push(i.entity)}),e.length>0){const t=Array.from(new Set(e));t.forEach(i=>this._requestedIris.add(i)),this.handlers().requestData(t,this.table.orderByMentionCount())}}onOrderByMentionCountClick(){this.table.orderByMentionCount.set(!this.table.orderByMentionCount())}static \u0275fac=function(t){return new(t||u)};static \u0275cmp=n.VBU({type:u,selectors:[["cue-ent-list-inner"]],inputs:{entities:[1,"entities"],mapboxToken:[1,"mapboxToken"],handlers:[1,"handlers"],availableEntityCategories:[1,"availableEntityCategories"],availableEntityRelationships:[1,"availableEntityRelationships"],entityData:[1,"entityData"],paginationPageSize:[1,"paginationPageSize"],prefetchPages:[1,"prefetchPages"],variant:[1,"variant"]},outputs:{rowClicked:"rowClicked",clickedOpen:"clickedOpen"},features:[n.Jv_([k.u,F.M,L.B,r,_])],decls:9,vars:14,consts:[[2,"position","relative","width","100%","height","100%","display","flex","flex-direction","column","gap","12px",3,"variant"],[3,"label"],["direction","row","justify","end",2,"width","100%","padding-bottom","6px"],[2,"flex","1","min-height","0","position","relative","display","flex","flex-direction","column"],["height","100%",2,"flex","1","min-height","0",3,"gridApiReady","selectedRows","columnDefs","rowData","rowSelection","paginationPageSize","overlaySettings","overlayActions"],["size","xs","variant","secondary",3,"click","tooltip"],[3,"clickedFeature","layers","settings"]],template:function(t,i){if(1&t&&(n.j41(0,"cue-tabs",0)(1,"cue-tab",1),n.nI1(2,"transloco"),n.nVh(3,j,7,4,"cue-flexcontainer",2),n.j41(4,"div",3)(5,"cue-ag-grid",4),n.bIt("gridApiReady",function(l){return i.onGridReady(l)})("selectedRows",function(l){return l[0]&&i.rowClicked.emit(l[0])}),n.k0s()()(),n.SS7(6)(7),n.nVh(8,V,3,5,"cue-tab",1),n.k0s()),2&t){n.Y8G("variant",i.variant()),n.R7$(),n.Y8G("label",n.bMT(2,10,"components.entityList.tabList")),n.R7$(2),n.vxM(i.table.orderByMentionCount()?-1:3),n.R7$(2),n.Y8G("columnDefs",i.table.columnDefs())("rowData",i.table.rows())("rowSelection",i.rowSelection)("paginationPageSize",i.paginationPageSize())("overlaySettings",i.overlaySettings)("overlayActions",i.overlayActions()),n.R7$();const a=n.bH3(i.map.settings());n.R7$();const l=n.bH3(i.map.layers());n.R7$(),n.vxM(l.length>0&&a?8:-1)}},dependencies:[P.R,c.t,p.o,E.T,T.$,M.L,R.z,G.n,C.Kj],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}"],changeDetection:0})}return u})();var U=s(2245),X=s(9769);function K(u,I){if(1&u&&(n.j41(0,"cue-flexcontainer",2)(1,"cue-typography",4),n.EFF(2),n.k0s()()),2&u){const e=n.XpG(2);n.R7$(2),n.SpI(" ",e.errorMessage()," ")}}function $(u,I){if(1&u){const e=n.RV6();n.j41(0,"cue-ent-list-inner",5),n.bIt("rowClicked",function(i){o.eBV(e);const a=n.XpG(2);return o.Njj(a.rowClicked.emit(i))})("clickedOpen",function(i){o.eBV(e);const a=n.XpG(2);return o.Njj(a.clickedOpen.emit(i))}),n.k0s()}if(2&u){const e=n.XpG(2);n.Y8G("entities",e.iris())("entityData",e.entityData())("handlers",e.handlers())("mapboxToken",e.mapboxToken())("paginationPageSize",e.paginationPageSize())("variant",e.variant())}}function q(u,I){1&u&&(n.j41(0,"cue-flexcontainer",2)(1,"cue-typography",6),n.EFF(2," No project connected. "),n.k0s()())}function Y(u,I){if(1&u&&n.nVh(0,K,3,1,"cue-flexcontainer",2)(1,$,1,6,"cue-ent-list-inner",3)(2,q,3,0,"cue-flexcontainer",2),2&u){const e=n.XpG();n.vxM("error"===e.state()?0:e.handlers()?1:2)}}let Q=(()=>{class u{iris=(0,g.hFB)([]);sdkState=(0,g.hFB)(void 0);mapboxToken=(0,g.hFB)(void 0);paginationPageSize=(0,g.hFB)(10);variant=(0,g.hFB)("none");rowClicked=(0,g.CGW)();clickedOpen=(0,g.CGW)();state=(0,o.vPA)("idle");errorMessage=(0,o.vPA)(null);entityData=(0,o.vPA)({});_entities=(0,o.vPA)(void 0);_unsubscribe;_inputWarningTimer;handlers=(0,y.EW)(()=>{var e=this;const t=this._entities();if(t)return{requestData:(i,a)=>{const l=i.map(m=>m.split("/").pop()).filter(Boolean);t.requestEntityData(l,a)},requestLocations:i=>{if(!this.mapboxToken())return void console.warn("[cue-entity-list] No mapboxToken provided \u2014 skipping map location fetch.");const a=i.map(l=>l.split("/").pop()).filter(Boolean);t.requestEntityLocations(a)},checkHasLocations:(i=(0,x.A)(function*(a){const l=e.sdkState()?.cue,m=e.sdkState()?.projectId;if(!(e.mapboxToken()&&l&&m&&a.length))return!1;const D=`PREFIX qcy: <https://dev.qaecy.com/ont#>\nASK WHERE {\n ?entity qcy:hasEntityCategory ?cat .\n FILTER(?cat IN (${a.map(A=>`<${A}>`).join(" ")}))\n { ?entity qcy:similarTo ?osm . FILTER(STRSTARTS(STR(?osm), "https://www.openstreetmap.org/")) }\n UNION\n { ?entity qcy:relatedEntity ?loc . ?loc qcy:similarTo ?osm . FILTER(STRSTARTS(STR(?osm), "https://www.openstreetmap.org/")) }\n}`;try{return!0===(yield l.api.sparql(D,m))?.boolean}catch{return!1}}),function(l){return i.apply(this,arguments)})};var i});constructor(){this._inputWarningTimer=setTimeout(()=>{this.sdkState()||console.warn('[cue-entity-list] Required input "sdkState" is not set. Pass a { entities: CueProjectEntities } (or include a `cue` instance) object to load entity data.')},3e3),(0,o.QZP)(()=>{this._setupEntities(this.sdkState()?.entities)})}ngOnDestroy(){clearTimeout(this._inputWarningTimer),this._teardown()}_setupEntities(e){if(this._teardown(),!e)return this._entities.set(void 0),this.entityData.set({}),void this.state.set("idle");this._entities.set(e),this.state.set("ready"),this._syncEntityData(e),this._unsubscribe=e.entityInfoMap.subscribe(()=>{this._syncEntityData(e)})}_syncEntityData(e){const t=e.entityInfoMap.get(),i={};for(const a of Object.keys(t)){const l=t[a],m=Array.isArray(l.documentRefs)?l.documentRefs.map(b=>"string"==typeof b?{id:b}:b):l.documentRefs;i[e.entityIri(a)]={...l,documentRefs:m}}this.entityData.set(i)}_teardown(){this._unsubscribe?.(),this._unsubscribe=void 0}static \u0275fac=function(t){return new(t||u)};static \u0275cmp=n.VBU({type:u,selectors:[["cue-entity-list"]],inputs:{iris:[1,"iris"],sdkState:[1,"sdkState"],mapboxToken:[1,"mapboxToken"],paginationPageSize:[1,"paginationPageSize"],variant:[1,"variant"]},outputs:{rowClicked:"rowClicked",clickedOpen:"clickedOpen"},decls:3,vars:1,consts:[["body",""],[3,"ngTemplateOutlet"],["direction","column","align","center","justify","center",2,"height","100%","width","100%","padding","8px"],[2,"height","100%",3,"entities","entityData","handlers","mapboxToken","paginationPageSize","variant"],[2,"color","#c44","font-size","13px"],[2,"height","100%",3,"rowClicked","clickedOpen","entities","entityData","handlers","mapboxToken","paginationPageSize","variant"],[2,"color","#9ca3af","font-size","13px"]],template:function(t,i){if(1&t&&(n.DNE(0,Y,3,1,"ng-template",null,0,n.C5r),n.eu8(2,1)),2&t){const a=n.sdS(1);n.R7$(2),n.Y8G("ngTemplateOutlet",a)}},dependencies:[z,G.n,U.Typography,X.T3],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}"],changeDetection:0})}return u})()}}]);
1
+ "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[493],{3183(N,S,s){s.d(S,{A:()=>E});var M=s(7705),g=s(5802),o=s(9417),y=s(1359),B=s(8957),C=s(2245),P=s(5381),c=s(5547);const p=(v,f)=>f.value;function k(v,f){if(1&v){const r=c.RV6();c.j41(0,"cue-input",6),c.bIt("valueChange",function(u){g.eBV(r);const _=c.XpG();return _.searchText=u,g.Njj(_.onSearchChange())}),c.k0s()}if(2&v){const r=c.XpG();c.Y8G("value",r.searchText)}}function F(v,f){if(1&v){const r=c.RV6();c.j41(0,"cue-checkbox",7),c.bIt("checkedChange",function(u){const _=g.eBV(r).$implicit,T=c.XpG();return _.selected=u,g.Njj(T.onSelectionChange())}),c.k0s()}if(2&v){const r=f.$implicit;c.Y8G("label",r.value||"(blank)")("checked",r.selected)}}function R(v,f){1&v&&(c.j41(0,"cue-typography",5),c.EFF(1,"No results"),c.k0s())}let E=(()=>{class v{_cdr=(0,g.WQX)(M.gRc);_params;options=[];filteredOptions=[];searchText="";agInit(r){this._params=r}afterGuiAttached(r){this._refreshOptions(),this._cdr.markForCheck()}onNewRowsLoaded(){this._refreshOptions(),this._cdr.markForCheck()}isFilterActive(){return this.options.some(r=>!r.selected)}doesFilterPass(r){const h=new Set(this.options.filter(x=>x.selected).map(x=>x.value)),u=this._params.getValue(r.node),_=null==u?"":String(u);return"..."===_||"Loading..."===_||(""===_?h.has(""):_.split(", ").map(x=>x.trim()).some(x=>h.has(x)))}getModel(){return this.isFilterActive()?{selectedValues:this.options.filter(r=>r.selected).map(r=>r.value)}:null}setModel(r){if(r){const h=new Set(r.selectedValues);this.options.forEach(u=>u.selected=h.has(u.value))}else this.options.forEach(h=>h.selected=!0);this._applySearch(),this._cdr.markForCheck()}onSelectionChange(){this._params.filterChangedCallback(),this._cdr.markForCheck()}onSearchChange(){this._applySearch(),this._cdr.markForCheck()}get allSelected(){return this.options.length>0&&this.options.every(r=>r.selected)}toggleAll(r){this.options.forEach(h=>h.selected=r),this._applySearch(),this._params.filterChangedCallback(),this._cdr.markForCheck()}_refreshOptions(){const r=new Set;this._params.api.forEachNode(u=>{const _=this._params.getValue(u);if(null==_||""===_)r.add("");else{const T=String(_);if("..."===T||"Loading..."===T)return;const x=T.split(", ").map(L=>L.trim());for(const L of x)r.add(L)}});const h=new Map(this.options.map(u=>[u.value,u.selected]));this.options=Array.from(r).sort((u,_)=>u.localeCompare(_)).map(u=>({value:u,selected:h.get(u)??!0})),this._applySearch()}_applySearch(){const r=this.searchText.toLowerCase().trim();this.filteredOptions=r?this.options.filter(h=>h.value.toLowerCase().includes(r)):this.options}static \u0275fac=function(h){return new(h||v)};static \u0275cmp=c.VBU({type:v,selectors:[["cue-multi-select-filter"]],decls:7,vars:3,consts:[["direction","column","gap","s"],["placeholder","Search...","size","s",3,"value"],["size","s","label","Select all",3,"checkedChange","checked"],[1,"msf-list"],["size","s",3,"label","checked"],["size","s"],["placeholder","Search...","size","s",3,"valueChange","value"],["size","s",3,"checkedChange","label","checked"]],template:function(h,u){1&h&&(c.j41(0,"cue-flexcontainer",0),c.nVh(1,k,1,1,"cue-input",1),c.j41(2,"cue-checkbox",2),c.bIt("checkedChange",function(T){return u.toggleAll(T)}),c.k0s(),c.j41(3,"div",3),c.Z7z(4,F,1,2,"cue-checkbox",4,p),c.nVh(6,R,2,0,"cue-typography",5),c.k0s()()),2&h&&(c.R7$(),c.vxM(u.options.length>10?1:-1),c.R7$(),c.Y8G("checked",u.allSelected),c.R7$(2),c.Dyx(u.filteredOptions),c.R7$(2),c.vxM(0===u.filteredOptions.length?6:-1))},dependencies:[o.YN,y.S,B.p,C.Typography,P.n],styles:["[_nghost-%COMP%]{display:block;padding:var(--cue-card-padding-y) var(--cue-card-padding-x);min-width:200px;max-width:300px;box-sizing:border-box}.msf-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;max-height:200px;overflow-y:auto}"],changeDetection:0})}return v})()},5902(N,S,s){s.d(S,{U:()=>R});var M=s(7705),g=s(5802),o=s(2271),y=s(9352),B=s(8957),C=s(2444),P=s(2245),c=s(5381),p=s(5547);function k(E,v){if(1&E){const f=p.RV6();p.j41(0,"cue-input",4),p.bIt("valueChange",function(h){g.eBV(f);const u=p.XpG();return g.Njj(u.onValueChange(h))}),p.k0s()}if(2&E){const f=p.XpG();p.Y8G("value",f.filterText)}}function F(E,v){if(1&E){const f=p.RV6();p.j41(0,"cue-typography",5),p.bIt("click",function(){g.eBV(f);const h=p.XpG();return g.Njj(h.clear())}),p.EFF(1,"Clear"),p.k0s()}}let R=(()=>{class E{_cdr=(0,g.WQX)(M.gRc);_params;filterText="";filterType="contains";filterTypeOptions=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"];_labelContains=(0,y.Xx)("components.agGridColumnSelect.textFilterContains");_labelNotContains=(0,y.Xx)("components.agGridColumnSelect.textFilterNotContains");_labelEquals=(0,y.Xx)("components.agGridColumnSelect.textFilterEquals");_labelNotEqual=(0,y.Xx)("components.agGridColumnSelect.textFilterNotEqual");_labelStartsWith=(0,y.Xx)("components.agGridColumnSelect.textFilterStartsWith");_labelEndsWith=(0,y.Xx)("components.agGridColumnSelect.textFilterEndsWith");_labelBlank=(0,y.Xx)("components.agGridColumnSelect.textFilterBlank");_labelNotBlank=(0,y.Xx)("components.agGridColumnSelect.textFilterNotBlank");filterTypeLabelMap=(0,o.EW)(()=>({contains:this._labelContains(),notContains:this._labelNotContains(),equals:this._labelEquals(),notEqual:this._labelNotEqual(),startsWith:this._labelStartsWith(),endsWith:this._labelEndsWith(),blank:this._labelBlank(),notBlank:this._labelNotBlank()}));showTextInput=(0,o.EW)(()=>!["blank","notBlank"].includes(this.filterType));agInit(f){this._params=f}afterGuiAttached(f){this._cdr.markForCheck()}isFilterActive(){return!!["blank","notBlank"].includes(this.filterType)||this.filterText.trim().length>0}doesFilterPass(f){const r=this._params.getValue(f.node),h=null==r?"":String(r),u=this.filterText.toLowerCase().trim(),_=h.toLowerCase();switch(this.filterType){case"contains":default:return _.includes(u);case"notContains":return!_.includes(u);case"equals":return _===u;case"notEqual":return _!==u;case"startsWith":return _.startsWith(u);case"endsWith":return _.endsWith(u);case"blank":return""===h;case"notBlank":return""!==h}}getModel(){return this.isFilterActive()?{filterType:"text",type:this.filterType,filter:this.filterText}:null}setModel(f){this.filterText=f?.filter??"",this.filterType=f?.type??"contains",this._cdr.markForCheck()}onValueChange(f){this.filterText=f,this._params.filterChangedCallback(),this._cdr.markForCheck()}onFilterTypeChange(f){this.filterType=String(f||"contains"),["blank","notBlank"].includes(this.filterType)&&(this.filterText=""),this._params.filterChangedCallback(),this._cdr.markForCheck()}clear(){this.filterText="",this.filterType="contains",this._params.filterChangedCallback(),this._cdr.markForCheck()}static \u0275fac=function(r){return new(r||E)};static \u0275cmp=p.VBU({type:E,selectors:[["cue-text-filter"]],decls:4,vars:5,consts:[["direction","column","gap","s"],["size","s",3,"valueChange","value","options","labelMap"],["placeholder","Filter...","size","s",3,"value"],["size","s",2,"cursor","pointer","text-align","right"],["placeholder","Filter...","size","s",3,"valueChange","value"],["size","s",2,"cursor","pointer","text-align","right",3,"click"]],template:function(r,h){1&r&&(p.j41(0,"cue-flexcontainer",0)(1,"cue-select",1),p.bIt("valueChange",function(_){return h.onFilterTypeChange(_)}),p.k0s(),p.nVh(2,k,1,1,"cue-input",2),p.nVh(3,F,2,0,"cue-typography",3),p.k0s()),2&r&&(p.R7$(),p.Y8G("value",h.filterType)("options",h.filterTypeOptions)("labelMap",h.filterTypeLabelMap()),p.R7$(),p.vxM(h.showTextInput()?2:-1),p.R7$(),p.vxM(h.filterText||"contains"!==h.filterType?3:-1))},dependencies:[B.p,C.l,P.Typography,c.n],styles:["[_nghost-%COMP%]{display:block;padding:var(--cue-card-padding-y) var(--cue-card-padding-x);min-width:180px;max-width:280px;box-sizing:border-box}"],changeDetection:0})}return E})()},5448(N,S,s){s.d(S,{L:()=>B});var M=s(7705),g=s(2245),o=s(5547);const y=["*"];let B=(()=>{class C{fontSize=(0,M.hFB)("m");italic=(0,M.hFB)(!1);noWrap=(0,M.hFB)(!0);static \u0275fac=function(p){return new(p||C)};static \u0275cmp=o.VBU({type:C,selectors:[["cue-button-label"]],inputs:{fontSize:[1,"fontSize"],italic:[1,"italic"],noWrap:[1,"noWrap"]},ngContentSelectors:y,decls:3,vars:3,consts:[[3,"size","italic","noWrap"]],template:function(p,k){1&p&&(o.NAR(),o.j41(0,"div")(1,"cue-typography",0),o.SdG(2),o.k0s()()),2&p&&(o.R7$(),o.Y8G("size",k.fontSize())("italic",k.italic())("noWrap",k.noWrap()))},dependencies:[g.Typography],styles:["div[_ngcontent-%COMP%]{transform:translateY(.05em)}"]})}return C})()},8493(N,S,s){s.d(S,{CueEntityList:()=>Z});var M=s(467),g=s(7705),o=s(5802),y=s(2271),B=s(2611),C=s(9352),P=s(1951),c=s(6455),p=s(8334),k=s(5949),F=s(2843),R=s(3646),E=s(8017),v=s(2306),f=s(6103);let r=(()=>{class d{mapboxToken=(0,o.vPA)(void 0);entityData=(0,o.vPA)({});availableEntityRelationships=(0,o.vPA)([]);settings=(0,y.EW)(()=>{const e=this.mapboxToken();if(!e)return;const t=new v.yY;return t.mapboxToken=e,t.contextMenu.showFlyTo=!1,t.contextMenu.showProperties=!1,t});layers=(0,y.EW)(()=>{const e=this.entityData(),t=this.availableEntityRelationships();return(0,f.N)({entityData:e,availableEntityRelationships:t})});static \u0275fac=function(t){return new(t||d)};static \u0275prov=o.jDH({token:d,factory:d.\u0275fac,providedIn:"root"})}return d})();var h=s(3183),u=s(5902);let _=(()=>{class d{entities=(0,o.vPA)([]);entityData=(0,o.vPA)({});orderByMentionCount=(0,o.vPA)(!1);availableEntityCategories=(0,o.vPA)(void 0);labelValue=(0,C.Xx)("components.entityList.labelValue");labelCategories=(0,C.Xx)("components.entityList.labelCategories");labelMentions=(0,C.Xx)("components.entityList.labelMentionCount");_filterChangeCounter=(0,o.vPA)(0);filterChangeCounter=this._filterChangeCounter.asReadonly();onFilterChanged(){this._filterChangeCounter.update(e=>e+1)}columnDefs=(0,y.EW)(()=>{const e=[{field:"value",headerName:this.labelValue(),flex:2,filter:u.U,valueGetter:t=>!t.data?.value&&t.data?.loading?"Loading...":t.data?.value||t.data?.entity},{field:"categories",headerName:this.labelCategories(),flex:1.5,filter:h.A,valueGetter:t=>{const i=t.data?.categories;if(!i)return t.data?.loading?"...":"";const a=Array.isArray(i)?i:[i],l=this._leafEntityCategoryIris();return(l?a.filter(b=>l.has(b)):a).map(b=>this._getEntityCategoryLabel(b)).join(", ")}}];return this.orderByMentionCount()&&e.push({field:"mentionCount",headerName:this.labelMentions(),flex:1,filter:"agNumberColumnFilter",valueGetter:t=>{const i=t.data;if(i?.loading)return"...";const a=i?.mentionCount??0;return a>0?a:""},cellStyle:{textAlign:"center"}}),e});rows=(0,y.EW)(()=>{const e=this.entities()||[],t=this.entityData()||{},i=e.map(a=>{const l=t[a];return{entity:a,value:l?.value,categories:l?.categories,mentionCount:l?.mentionCount,loading:!l}});return this.orderByMentionCount()?i.sort((a,l)=>(l.mentionCount||0)-(a.mentionCount||0)):i});_leafEntityCategoryIris=(0,y.EW)(()=>{const e=this.availableEntityCategories();if(!e)return null;const t=new Set(e.map(i=>i.parent).filter(i=>!!i));return new Set(e.filter(i=>!t.has(i.iri)).map(i=>i.iri))});_getEntityCategoryLabel(e){const t=this.availableEntityCategories();if(void 0!==t){const i=t.find(a=>a.iri===e);if(i)return i.label}return this._prettifyCategory(e)}_prettifyCategory(e){if(!e)return"";const t=e.split("#");return(t[t.length-1]||e).replace(/([A-Z])/g," $1").trim()}static \u0275fac=function(t){return new(t||d)};static \u0275prov=o.jDH({token:d,factory:d.\u0275fac,providedIn:"root"})}return d})();var T=s(5971),x=s(5448),L=s(2014),G=s(5381),n=s(5547);function j(d,I){if(1&d){const e=n.RV6();n.j41(0,"cue-flexcontainer",2)(1,"cue-button",5),n.bIt("click",function(){o.eBV(e);const i=n.XpG();return o.Njj(i.onOrderByMentionCountClick())}),n.nrm(2,"cue-button-padder"),n.j41(3,"cue-button-label"),n.EFF(4),n.nI1(5,"transloco"),n.k0s(),n.nrm(6,"cue-button-padder"),n.k0s()()}if(2&d){const e=n.XpG();n.R7$(),n.Y8G("tooltip",e.infoOrderByMentionCount()),n.R7$(3),n.JRh(n.bMT(5,2,"components.entityList.labelOrderByMentionCount"))}}function V(d,I){if(1&d){const e=n.RV6();n.j41(0,"cue-tab",1),n.nI1(1,"transloco"),n.j41(2,"cue-map",6),n.bIt("clickedFeature",function(i){o.eBV(e);const a=n.XpG();return o.Njj(a.onMapFeatureClick(i))}),n.k0s()()}if(2&d){n.XpG();const e=n.r8f(6),t=n.r8f(7);n.Y8G("label",n.bMT(1,3,"components.entityList.tabMap")),n.R7$(2),n.Y8G("layers",t)("settings",e)}}let z=(()=>{class d{map=(0,o.WQX)(r);table=(0,o.WQX)(_);entities=g.hFB.required();mapboxToken=(0,g.hFB)(void 0);handlers=g.hFB.required();availableEntityCategories=(0,g.hFB)(void 0);availableEntityRelationships=(0,g.hFB)();entityData=(0,g.hFB)({});paginationPageSize=(0,g.hFB)(10);prefetchPages=(0,g.hFB)(3);variant=(0,g.hFB)("none");rowClicked=(0,g.CGW)();clickedOpen=(0,g.CGW)();_gridApi=null;_requestedIris=new Set;_requestedLocationIris=new Set;_isSorted=!1;_pendingMapClickIri=(0,o.vPA)(null);_bufferedUntilIndex=(0,o.vPA)(0);_locationBufferedUntilIndex=0;_lastEntitiesKey="";_destroyed=!1;labelOpenInEntityViewer=(0,C.Xx)("components.entityList.labelOpenInEntityViewer");infoOrderByMentionCount=(0,C.Xx)("components.entityList.infoOrderByMentionCount");overlaySettings={...new P.K,mode:"row"};overlayActions=(0,y.EW)(()=>[{label:this.labelOpenInEntityViewer(),icon:"info",action:e=>{this.handlers().requestOpen?.(e.rowData),this.clickedOpen.emit(e.rowData)}}]);constructor(){(0,o.QZP)(()=>this.map.mapboxToken.set(this.mapboxToken())),(0,o.QZP)(()=>{const e=this.entityData();this.map.entityData.update(t=>{let i=!1;const a={...t};for(const[l,m]of Object.entries(e))(m.directMapGeometries?.length||m.indirectMapGeometries?.length)&&(a[l]={value:"",categories:[],directMapGeometries:m.directMapGeometries,indirectMapGeometries:m.indirectMapGeometries},i=!0);return i?a:t})}),(0,o.QZP)(()=>this.map.availableEntityRelationships.set(this.availableEntityRelationships()??[])),(0,o.QZP)(()=>this.table.availableEntityCategories.set(this.availableEntityCategories())),(0,o.QZP)(()=>this.table.entities.set(this.entities())),(0,o.QZP)(()=>this.table.entityData.set(this.entityData())),(0,o.QZP)(()=>{const e=this._pendingMapClickIri();if(!e)return;const t=this.entityData()[e];t&&(this._pendingMapClickIri.set(null),this.rowClicked.emit({entity:e,value:t.value,categories:t.categories,mentionCount:t.mentionCount,loading:!1}))}),(0,o.QZP)(()=>{const t=this.entities().join("|");if(t!==this._lastEntitiesKey)if(this._lastEntitiesKey=t,this._requestedIris.clear(),this._requestedLocationIris.clear(),this._bufferedUntilIndex.set(0),this._locationBufferedUntilIndex=0,this.handlers().checkHasLocations&&this.handlers().requestLocations){const i=(this.availableEntityCategories()??[]).map(a=>a.iri);this.handlers().checkHasLocations(i).then(a=>{a&&!this._destroyed&&this._requestLocationBatch()})}else this.handlers().requestLocations&&setTimeout(()=>this._requestLocationBatch())}),(0,o.QZP)(()=>{const e=this.table.orderByMentionCount(),t=this.table.filterChangeCounter();if(e||t>0){const l=this.entities().filter(m=>!this._requestedIris.has(m));l.length>0&&(l.forEach(m=>this._requestedIris.add(m)),this.handlers().requestData(l,e))}})}rowSelection={mode:"singleRow",checkboxes:!1,enableClickSelection:!0};onGridReady(e){this._gridApi=e,e.addEventListener("viewportChanged",()=>this._checkViewport()),e.addEventListener("modelUpdated",()=>this._checkViewport()),e.addEventListener("paginationChanged",()=>this._checkViewport()),e.addEventListener("sortChanged",()=>{const t=e.getColumnState();this._isSorted=t.some(i=>null!=i.sort),this._isSorted&&this._requestAllUnloaded()}),e.addEventListener("filterChanged",()=>{this.table.onFilterChanged()}),setTimeout(()=>this._checkViewport(),100)}onMapFeatureClick(e){var t=this;return(0,M.A)(function*(){const a=e.feature.properties?.iri;a&&(t._pendingMapClickIri.set(a),yield t.handlers().requestData?.([a],t.table.orderByMentionCount()))})()}_checkViewport(){if(!this._gridApi||this._gridApi.isDestroyed?.())return;if(this._isSorted)return void this._requestAllUnloaded();const e=this.entities(),t=e.length;if(!t)return;const i=Math.max(1,this._gridApi.paginationGetPageSize?.()??this.paginationPageSize()),l=Math.max(0,this._gridApi.paginationGetCurrentPage?.()??0)*i,m=Math.min(t,l+i),b=this._bufferedUntilIndex();let D=null;if(0===b?D=0:(l>=Math.max(0,b-i)||m>b)&&(D=b),null===D||D>=t)return;const A=i*Math.max(1,this.prefetchPages()),w=Math.min(t,D+A),W=e.slice(D,w).filter(O=>!this._requestedIris.has(O));this._bufferedUntilIndex.set(Math.max(b,w)),W.length&&(W.forEach(O=>this._requestedIris.add(O)),setTimeout(()=>this.handlers().requestData(W,this.table.orderByMentionCount())))}_requestLocationBatch(){if(!this.handlers().requestLocations)return;const e=this.entities(),t=e.length;if(this._locationBufferedUntilIndex>=t)return;const a=Math.min(t,this._locationBufferedUntilIndex+500),l=e.slice(this._locationBufferedUntilIndex,a).filter(m=>!this._requestedLocationIris.has(m));this._locationBufferedUntilIndex=a,l.length>0&&(l.forEach(m=>this._requestedLocationIris.add(m)),setTimeout(()=>this.handlers().requestLocations(l))),a<t&&!this._destroyed&&setTimeout(()=>this._requestLocationBatch(),200)}ngOnDestroy(){this._destroyed=!0,this._gridApi=null}_requestAllUnloaded(){if(!this._gridApi)return;const e=[];if(this._gridApi.forEachNode(t=>{const i=t.data;i?.loading&&!this._requestedIris.has(i.entity)&&e.push(i.entity)}),e.length>0){const t=Array.from(new Set(e));t.forEach(i=>this._requestedIris.add(i)),this.handlers().requestData(t,this.table.orderByMentionCount())}}onOrderByMentionCountClick(){this.table.orderByMentionCount.set(!this.table.orderByMentionCount())}static \u0275fac=function(t){return new(t||d)};static \u0275cmp=n.VBU({type:d,selectors:[["cue-ent-list-inner"]],inputs:{entities:[1,"entities"],mapboxToken:[1,"mapboxToken"],handlers:[1,"handlers"],availableEntityCategories:[1,"availableEntityCategories"],availableEntityRelationships:[1,"availableEntityRelationships"],entityData:[1,"entityData"],paginationPageSize:[1,"paginationPageSize"],prefetchPages:[1,"prefetchPages"],variant:[1,"variant"]},outputs:{rowClicked:"rowClicked",clickedOpen:"clickedOpen"},features:[n.Jv_([k.u,F.M,R.B,r,_])],decls:9,vars:14,consts:[[2,"position","relative","width","100%","height","100%","display","flex","flex-direction","column","gap","12px",3,"variant"],[3,"label"],["direction","row","justify","end",2,"width","100%","padding-bottom","6px"],[2,"flex","1","min-height","0","position","relative","display","flex","flex-direction","column"],["height","100%",2,"flex","1","min-height","0",3,"gridApiReady","selectedRows","columnDefs","rowData","rowSelection","paginationPageSize","overlaySettings","overlayActions"],["size","xs","variant","secondary",3,"click","tooltip"],[3,"clickedFeature","layers","settings"]],template:function(t,i){if(1&t&&(n.j41(0,"cue-tabs",0)(1,"cue-tab",1),n.nI1(2,"transloco"),n.nVh(3,j,7,4,"cue-flexcontainer",2),n.j41(4,"div",3)(5,"cue-ag-grid",4),n.bIt("gridApiReady",function(l){return i.onGridReady(l)})("selectedRows",function(l){return l[0]&&i.rowClicked.emit(l[0])}),n.k0s()()(),n.SS7(6)(7),n.nVh(8,V,3,5,"cue-tab",1),n.k0s()),2&t){n.Y8G("variant",i.variant()),n.R7$(),n.Y8G("label",n.bMT(2,10,"components.entityList.tabList")),n.R7$(2),n.vxM(i.table.orderByMentionCount()?-1:3),n.R7$(2),n.Y8G("columnDefs",i.table.columnDefs())("rowData",i.table.rows())("rowSelection",i.rowSelection)("paginationPageSize",i.paginationPageSize())("overlaySettings",i.overlaySettings)("overlayActions",i.overlayActions()),n.R7$();const a=n.bH3(i.map.settings());n.R7$();const l=n.bH3(i.map.layers());n.R7$(),n.vxM(l.length>0&&a?8:-1)}},dependencies:[B.R,c.t,p.o,E.T,T.$,x.L,L.z,G.n,C.Kj],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}"],changeDetection:0})}return d})();var U=s(2245),X=s(9769);function K(d,I){if(1&d&&(n.j41(0,"cue-flexcontainer",2)(1,"cue-typography",4),n.EFF(2),n.k0s()()),2&d){const e=n.XpG(2);n.R7$(2),n.SpI(" ",e.errorMessage()," ")}}function $(d,I){1&d&&(n.j41(0,"cue-flexcontainer",2)(1,"cue-typography",5),n.EFF(2," Loading entities\u2026 "),n.k0s()())}function q(d,I){if(1&d){const e=n.RV6();n.j41(0,"cue-ent-list-inner",6),n.bIt("rowClicked",function(i){o.eBV(e);const a=n.XpG(2);return o.Njj(a.rowClicked.emit(i))})("clickedOpen",function(i){o.eBV(e);const a=n.XpG(2);return o.Njj(a.clickedOpen.emit(i))}),n.k0s()}if(2&d){const e=n.XpG(2);n.Y8G("entities",e._displayIris())("entityData",e.entityData())("handlers",e.handlers())("mapboxToken",e.mapboxToken())("paginationPageSize",e.paginationPageSize())("variant",e.variant())}}function Y(d,I){1&d&&(n.j41(0,"cue-flexcontainer",2)(1,"cue-typography",5),n.EFF(2," No project connected. "),n.k0s()())}function Q(d,I){if(1&d&&n.nVh(0,K,3,1,"cue-flexcontainer",2)(1,$,3,0,"cue-flexcontainer",2)(2,q,1,6,"cue-ent-list-inner",3)(3,Y,3,0,"cue-flexcontainer",2),2&d){const e=n.XpG();n.vxM("error"===e.state()?0:"loading"===e.state()?1:e.handlers()?2:3)}}let Z=(()=>{class d{iris=(0,g.hFB)([]);categoryIris=(0,g.hFB)(void 0);sdkState=(0,g.hFB)(void 0);mapboxToken=(0,g.hFB)(void 0);paginationPageSize=(0,g.hFB)(10);variant=(0,g.hFB)("none");rowClicked=(0,g.CGW)();clickedOpen=(0,g.CGW)();state=(0,o.vPA)("idle");errorMessage=(0,o.vPA)(null);entityData=(0,o.vPA)({});_entities=(0,o.vPA)(void 0);_categoryResolvedIris=(0,o.vPA)([]);_displayIris=(0,y.EW)(()=>void 0!==this.categoryIris()?this._categoryResolvedIris():this.iris());_unsubscribe;_inputWarningTimer;handlers=(0,y.EW)(()=>{var e=this;const t=this._entities();if(t)return{requestData:(i,a)=>{const l=i.map(m=>m.split("/").pop()).filter(Boolean);t.requestEntityData(l,a)},requestLocations:i=>{if(!this.mapboxToken())return void console.warn("[cue-entity-list] No mapboxToken provided \u2014 skipping map location fetch.");const a=i.map(l=>l.split("/").pop()).filter(Boolean);t.requestEntityLocations(a)},checkHasLocations:(i=(0,M.A)(function*(a){const l=e.sdkState()?.cue,m=e.sdkState()?.projectId;if(!(e.mapboxToken()&&l&&m&&a.length))return!1;const D=`PREFIX qcy: <https://dev.qaecy.com/ont#>\nASK WHERE {\n ?entity qcy:hasEntityCategory ?cat .\n FILTER(?cat IN (${a.map(A=>`<${A}>`).join(" ")}))\n { ?entity qcy:similarTo ?osm . FILTER(STRSTARTS(STR(?osm), "https://www.openstreetmap.org/")) }\n UNION\n { ?entity qcy:relatedEntity ?loc . ?loc qcy:similarTo ?osm . FILTER(STRSTARTS(STR(?osm), "https://www.openstreetmap.org/")) }\n}`;try{return!0===(yield l.api.sparql(D,m))?.boolean}catch{return!1}}),function(l){return i.apply(this,arguments)})};var i});constructor(){this._inputWarningTimer=setTimeout(()=>{this.sdkState()||console.warn('[cue-entity-list] Required input "sdkState" is not set. Pass a { entities: CueProjectEntities } (or include a `cue` instance) object to load entity data.')},3e3),(0,o.QZP)(()=>{this._setupEntities(this.sdkState()?.entities)}),(0,o.QZP)(()=>{const e=this.categoryIris(),t=this._entities();void 0!==e&&this._fetchByCategories(e,t)})}ngOnDestroy(){clearTimeout(this._inputWarningTimer),this._teardown()}_setupEntities(e){if(this._teardown(),!e)return this._entities.set(void 0),this.entityData.set({}),void this.state.set("idle");this._entities.set(e),this.state.set("ready"),this._syncEntityData(e),this._unsubscribe=e.entityInfoMap.subscribe(()=>{this._syncEntityData(e)})}_syncEntityData(e){const t=e.entityInfoMap.get(),i={};for(const a of Object.keys(t)){const l=t[a],m=Array.isArray(l.documentRefs)?l.documentRefs.map(b=>"string"==typeof b?{id:b}:b):l.documentRefs;i[e.entityIri(a)]={...l,documentRefs:m}}this.entityData.set(i)}_fetchByCategories(e,t){var i=this;return(0,M.A)(function*(){if(t&&e.length){i.state.set("loading");try{const a=yield t.entitiesByCategory(e);i._categoryResolvedIris.set(a.map(l=>l.iri)),i.state.set("ready")}catch(a){console.error("[cue-entity-list] Failed to fetch entities by category",a),i.errorMessage.set("Failed to load entities for the given categories."),i.state.set("error")}}else i._categoryResolvedIris.set([])})()}_teardown(){this._unsubscribe?.(),this._unsubscribe=void 0}static \u0275fac=function(t){return new(t||d)};static \u0275cmp=n.VBU({type:d,selectors:[["cue-entity-list"]],inputs:{iris:[1,"iris"],categoryIris:[1,"categoryIris"],sdkState:[1,"sdkState"],mapboxToken:[1,"mapboxToken"],paginationPageSize:[1,"paginationPageSize"],variant:[1,"variant"]},outputs:{rowClicked:"rowClicked",clickedOpen:"clickedOpen"},decls:3,vars:1,consts:[["body",""],[3,"ngTemplateOutlet"],["direction","column","align","center","justify","center",2,"height","100%","width","100%","padding","8px"],[2,"height","100%",3,"entities","entityData","handlers","mapboxToken","paginationPageSize","variant"],[2,"color","#c44","font-size","13px"],[2,"color","#9ca3af","font-size","13px"],[2,"height","100%",3,"rowClicked","clickedOpen","entities","entityData","handlers","mapboxToken","paginationPageSize","variant"]],template:function(t,i){if(1&t&&(n.DNE(0,Q,4,1,"ng-template",null,0,n.C5r),n.eu8(2,1)),2&t){const a=n.sdS(1);n.R7$(2),n.Y8G("ngTemplateOutlet",a)}},dependencies:[z,G.n,U.Typography,X.T3],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}"],changeDetection:0})}return d})()}}]);
package/586.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[586],{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)}}}]);
package/613.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[613],{4613(v,p,a){a.d(p,{Logo:()=>u});var r=a(7705),n=a(5802),o=a(5547),M=a(2271),_=a(6170);let u=(()=>{class m{size=(0,r.hFB)("m");sizeMap={xs:"40px",s:"80px",m:"160px",l:"222px"};active=(0,r.hFB)(!0,{transform:r.L39});continuous=(0,r.hFB)(!1,{transform:r.L39});mode=(0,r.hFB)("default");isDarkMode=(0,r.geq)(!1);handleDarkModeChange(e){this.isDarkMode.set(e),-1===this.raf&&this.animate()}colorA=(0,M.EW)(()=>this.isDarkMode()?[221,246,18]:[18,28,43]);colorB=[0,202,204];paths=[];raf=-1;appearTime=0;disappearTime=0;tip=0;toe=0;mix=[0,0,0];norm=0;animate=e=>{if(void 0!==e){const s=5e-4*(e-this.appearTime);"glow"===this.mode()?this.tip=s%1:(this.tip=Math.min(1,s),this.active()||(this.toe=Math.min(1,6e-4*(e-this.disappearTime))))}if("glow"===this.mode()){const s=.06666666666666667,t=this.rgbToSvg(this.colorA());return this.paths.forEach((d,g)=>{this.norm=1/this.paths.length*g;let i=this.tip-this.norm;if(i<-(1-s)&&(i+=1),i>=0&&i<s){const c=1-i/s;d.setAttribute("stroke",this.rgbToSvg(this.colorB)),d.setAttribute("stroke-opacity",c.toFixed(3))}else d.setAttribute("stroke",t),d.setAttribute("stroke-opacity","0.005")}),void(this.raf=requestAnimationFrame(this.animate))}if(this.paths.forEach((s,t)=>{this.norm=1/this.paths.length*t,this.mix=this.mixRgb(this.colorA(),this.colorB,Math.max(0,Math.min(1,15*(this.tip-this.norm)))),s.setAttribute("stroke",this.tip*this.paths.length>t&&(this.active()||this.toe*this.paths.length<t)?this.rgbToSvg(this.mix):"transparent")}),this.tip>=1&&(this.active()||this.toe>=1))return this.continuous()?void setTimeout(()=>{this.appearTime=performance.now(),this.tip=0,this.toe=0,this.raf=requestAnimationFrame(this.animate)},500):void(this.raf=-1);this.raf=requestAnimationFrame(this.animate)};activate(){this.appearTime=performance.now(),this.animate(this.appearTime)}deactivate(){this.disappearTime=performance.now(),-1===this.raf&&this.animate(this.disappearTime)}mixChannel(e,s,t){return parseInt((e*t+s*(1-t)).toFixed())}mixRgb(e,s,t){return[this.mixChannel(e[0],s[0],t),this.mixChannel(e[1],s[1],t),this.mixChannel(e[2],s[2],t)]}rgbToSvg(e){return`rgb(${e[0]},${e[1]},${e[2]})`}constructor(){(0,n.QZP)(()=>{"glow"===this.mode()||this.active()?this.activate():this.deactivate()}),(0,n.QZP)(()=>{this.isDarkMode(),this.animate()});const e=(0,n.WQX)(o.aKT);(0,o.mal)({read:()=>{if(this.paths.length)return;const s=e.nativeElement.querySelector("svg"),t=e.nativeElement.querySelector("#original-path");if(!t)return;const d=t.getTotalLength(),i=[];for(let c=0;c<400;c++){const h=t.getPointAtLength(d/400*c);i.push({x:parseFloat(h.x.toFixed(2)),y:parseFloat(h.y.toFixed(2))})}i.push(t.getPointAtLength(d)),i.reverse(),i.forEach((c,h)=>{if(0===h||1===h)return;const l=document.createElementNS("http://www.w3.org/2000/svg","path");l.setAttribute("d",`M${i[h-2].x},${i[h-2].y}L${i[h-1].x},${i[h-1].y}L${c.x},${c.y}`),l.setAttribute("fill","none"),l.setAttribute("stroke","transparent"),l.setAttribute("stroke-width",t?.getAttribute("stroke-width")||"1"),l.setAttribute("stroke-miterlimit",t?.getAttribute("stroke-miterlimit")||"1"),s.appendChild(l),this.paths.push(l)})}})}ngOnDestroy(){this.paths=[],cancelAnimationFrame(this.raf),this.raf=-1}static \u0275fac=function(s){return new(s||m)};static \u0275cmp=o.VBU({type:m,selectors:[["cue-logo"]],hostVars:2,hostBindings:function(s,t){2&s&&o.xc7("width",t.sizeMap[t.size()])},inputs:{size:[1,"size"],active:[1,"active"],continuous:[1,"continuous"],mode:[1,"mode"],isDarkMode:[1,"isDarkMode"]},outputs:{isDarkMode:"isDarkModeChange"},decls:2,vars:0,consts:[["cueDarkMode","","xmlns","http://www.w3.org/2000/svg","viewBox","0 0 221.545 86.191","width","222","height","86","overflow","visible",3,"darkModeChange"],["id","original-path","fill","none","stroke","transparent","stroke-miterlimit","10","stroke-width","12","d","M216.046 56.638s-10.561 24.201-36.192 22.991c-25.631-1.21-22.771-24.751-20.351-37.622 2.42-12.871 10.451-20.351 16.831-18.041 6.283 2.275 8.03 9.68 2.09 21.891-5.94 12.211-21.341 37.567-35.862 33.992-12.413-3.056-13.281-23.162-13.281-23.162V29.762v26.925c0 14.471-12.47 23.212-24.672 23.212s-24.672-8.301-24.672-23.212V29.829l-.006.105v13.031c0 20.416-16.55 36.966-36.966 36.966S6 63.381 6 42.966 22.55 6 42.966 6c6.91 0 13.377 1.896 18.91 5.196"]],template:function(s,t){1&s&&(n.qSk(),o.j41(0,"svg",0),o.bIt("darkModeChange",function(g){return t.handleDarkModeChange(g)}),o.nrm(1,"path",1),o.k0s())},dependencies:[_.R],styles:["[_nghost-%COMP%]{display:block}svg[_ngcontent-%COMP%]{flex:1;display:block;width:100%;height:auto}"]})}return m})()},6170(v,p,a){a.d(p,{R:()=>_});var r=a(7705),n=a(5802),o=a(2271),M=a(5547);let _=(()=>{class u{destroyRef=(0,n.WQX)(n.abz);_isDarkMode=(0,n.vPA)(this.hasDarkClass());isDarkMode=(0,o.EW)(()=>this._isDarkMode());darkModeChange=(0,r.CGW)();constructor(){const f=new MutationObserver(e=>{e.forEach(s=>{if("attributes"===s.type&&"class"===s.attributeName){const t=this.hasDarkClass();t!==this._isDarkMode()&&this._isDarkMode.set(t)}})});f.observe(document.body,{attributes:!0,attributeFilter:["class"]}),this.destroyRef.onDestroy(()=>f.disconnect()),(0,n.QZP)(()=>{this.darkModeChange.emit(this._isDarkMode()),document.documentElement.style.colorScheme=this._isDarkMode()?"dark":"light"})}hasDarkClass(){return document.body.classList.contains("dark")}toggleDarkMode(){document.body.classList.toggle("dark")}static \u0275fac=function(e){return new(e||u)};static \u0275dir=M.FsC({type:u,selectors:[["","cueDarkMode",""]],outputs:{darkModeChange:"darkModeChange"},exportAs:["darkModeDetector"]})}return u})()}}]);
package/614.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[614],{2614(x,g,i){i.d(g,{CueDocumentCharts:()=>w});var c=i(7705),s=i(5802),r=i(2271),h=i(3615),m=i(7993),d=i(1519),l=i(9811),C=i(5381),f=i(2245),n=i(5547);function p(a,u){if(1&a&&(n.j41(0,"cue-flexcontainer",0)(1,"cue-typography",2),n.EFF(2),n.k0s()()),2&a){const t=n.XpG();n.R7$(2),n.SpI(" ",t.errorMessage()," ")}}function b(a,u){1&a&&(n.j41(0,"cue-flexcontainer",0)(1,"cue-typography",3),n.EFF(2," Loading\u2026 "),n.k0s()())}function D(a,u){if(1&a){const t=n.RV6();n.j41(0,"div",5)(1,"cue-block-documents-by-suffix",6),n.bIt("navigated",function(o){s.eBV(t);const _=n.XpG(2);return s.Njj(_.handleNavigated(o,"suffix"))}),n.k0s()()}if(2&a){const t=n.XpG(2);n.xc7("height",t.chartHeight(),"px"),n.R7$(),n.Y8G("data",u)("config",t.blockConfig())}}function v(a,u){if(1&a){const t=n.RV6();n.j41(0,"div",5)(1,"cue-block-documents-by-content-category",6),n.bIt("navigated",function(o){s.eBV(t);const _=n.XpG(2);return s.Njj(_.handleNavigated(o,"content-category"))}),n.k0s()()}if(2&a){const t=n.XpG(2);n.xc7("height",t.chartHeight(),"px"),n.R7$(),n.Y8G("data",u)("config",t.blockConfig())}}function y(a,u){if(1&a&&(n.j41(0,"cue-flexcontainer",1),n.nVh(1,D,2,4,"div",4),n.nVh(2,v,2,4,"div",4),n.k0s()),2&a){let t,e;const o=n.XpG();n.Y8G("direction",o.stackCharts()?"column":"row"),n.R7$(),n.vxM((t="content-category"!==o.mode()&&o.bySuffix())?1:-1,t),n.R7$(),n.vxM((e="suffix"!==o.mode()&&o.byContentCategory())?2:-1,e)}}let w=(()=>{class a{_blockCtx=(0,s.WQX)(l.z);projectId=(0,c.hFB)(void 0);sdkState=(0,c.hFB)(void 0);mode=(0,c.hFB)("both");stackCharts=(0,c.hFB)(!1);chartHeight=(0,c.hFB)(400);selected=(0,c.CGW)();selectionCleared=(0,c.CGW)();state=(0,s.vPA)("idle");errorMessage=(0,s.vPA)(null);_rawData=(0,s.vPA)(void 0);bySuffix=(0,r.EW)(()=>{const t=this._rawData();if(t?.documentsBySuffix&&0!==Object.keys(t.documentsBySuffix).length)return{documents:t.documentsBySuffix}});byContentCategory=(0,r.EW)(()=>{const t=this._rawData();if(t?.documentsByContentCategory&&0!==Object.keys(t.documentsByContentCategory).length)return{documents:t.documentsByContentCategory}});blockConfig=(0,r.EW)(()=>({projectId:this.projectId()??"",portalBaseURL:"",resourceBaseURL:"",graphIsSaturated:!1,privileges:new d.c,handlers:new d.$}));_ownedView;_unsubscribeCategories;_unsubscribeDocumentsData;_lastSetupSignature;constructor(){(0,s.QZP)(()=>{const t=this.projectId(),e=this.sdkState();if(!e)return this._clearRuntimeState(),void this.state.set("idle");const o={projectId:t,cue:e.cue,view:e.view,documents:e.documents,language:e.language};this._isSameSetupSignature(o)||(this._setupFromSdkState(t,e),this._lastSetupSignature=o)})}ngOnDestroy(){this._cleanupSubscriptions(),this._cleanupOwnedView()}handleNavigated(t,e){t?this.selected.emit({filterBy:"suffix"===t.filterBy?"suffix":"content-category",values:t.values,label:t.label}):this.selectionCleared.emit({chart:e})}_setupFromSdkState(t,e){if(this._cleanupSubscriptions(),this._cleanupOwnedView(),this._rawData.set(void 0),e.availableContentCategories&&this._blockCtx.availableContentCategories.set(e.availableContentCategories),e.documents)return e.documents.setLanguage(e.language??"en"),void this._bindDocumentsData(e.documents);if(e.view)return e.view.setLanguage(e.language??"en"),this._bindDocumentsData(e.view.documents),void(e.availableContentCategories||this._bindCategoriesFromView(e.view));if(e.cue&&t){const o=e.cue.createProjectView(t,{language:e.language??"en"});return this._ownedView=o,this._bindDocumentsData(o.documents),void(e.availableContentCategories||this._bindCategoriesFromView(o))}this.errorMessage.set("sdkState must include cue, view, or documents to load data."),this.state.set("error")}_bindDocumentsData(t){this.state.set("loading");const e=()=>{const o=t.projectDocumentsData.get();o&&Object.keys(o.documentsBySuffix).length>0&&(0,r.O8)(()=>{this._rawData.set(o),this.state.set("ready")})};e(),this._unsubscribeDocumentsData=t.projectDocumentsData.subscribe(()=>e())}_bindCategoriesFromView(t){const e=()=>{this._blockCtx.availableContentCategories.set(t.availableContentCategories.get())};e(),this._unsubscribeCategories=t.availableContentCategories.subscribe(e)}_clearRuntimeState(){this._cleanupSubscriptions(),this._cleanupOwnedView(),this._rawData.set(void 0),this._blockCtx.availableContentCategories.set(void 0),this.errorMessage.set(null),this._lastSetupSignature=void 0}_cleanupSubscriptions(){this._unsubscribeCategories?.(),this._unsubscribeCategories=void 0,this._unsubscribeDocumentsData?.(),this._unsubscribeDocumentsData=void 0}_cleanupOwnedView(){this._ownedView&&(this._ownedView.destroy(),this._ownedView=void 0)}_isSameSetupSignature(t){const e=this._lastSetupSignature;return!!e&&e.projectId===t.projectId&&e.cue===t.cue&&e.view===t.view&&e.documents===t.documents&&e.language===t.language}static \u0275fac=function(e){return new(e||a)};static \u0275cmp=n.VBU({type:a,selectors:[["cue-document-charts"]],inputs:{projectId:[1,"projectId"],sdkState:[1,"sdkState"],mode:[1,"mode"],stackCharts:[1,"stackCharts"],chartHeight:[1,"chartHeight"]},outputs:{selected:"selected",selectionCleared:"selectionCleared"},features:[n.Jv_([l.z])],decls:3,vars:1,consts:[["direction","column","align","center","justify","center",2,"height","100%","width","100%","padding","8px"],["align","stretch",2,"width","100%",3,"direction"],[2,"color","#c44","font-size","13px"],[2,"color","#9ca3af","font-size","13px"],[1,"chart-wrapper",3,"height"],[1,"chart-wrapper"],[3,"navigated","data","config"]],template:function(e,o){1&e&&n.nVh(0,p,3,1,"cue-flexcontainer",0)(1,b,3,0,"cue-flexcontainer",0)(2,y,3,3,"cue-flexcontainer",1),2&e&&n.vxM("error"===o.state()?0:"loading"===o.state()?1:2)},dependencies:[h.Y,m.o,C.n,f.Typography],styles:["[_nghost-%COMP%]{display:block;width:100%}.chart-wrapper[_ngcontent-%COMP%]{flex:1;min-width:0;position:relative}cue-block-documents-by-suffix[_ngcontent-%COMP%], cue-block-documents-by-content-category[_ngcontent-%COMP%]{display:block;width:100%;height:100%}"],changeDetection:0})}return a})()}}]);