@qaecy/cue-ui 0.0.58 → 0.0.60
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/1520.js +1 -1
- package/{2021.js → 1701.js} +1 -1
- package/1837.js +1 -1
- package/2317.js +1 -1
- package/2775.js +1 -1
- package/2839.js +1 -1
- package/29.js +1 -1
- package/3036.js +1 -1
- package/3202.js +1 -0
- package/{5277.js → 3213.js} +1 -1
- package/3418.js +1 -1
- package/3577.js +1 -1
- package/3614.js +1 -1
- package/3656.js +1 -0
- package/{2003.js → 3842.js} +1 -1
- package/3869.js +1 -0
- package/4098.js +1 -1
- package/5381.js +1 -1
- package/5649.js +1 -1
- package/6040.js +1 -0
- package/6233.js +1 -1
- package/6947.js +1 -1
- package/7727.js +1 -0
- package/9396.js +1 -1
- package/9707.js +1 -0
- package/992.js +1 -1
- package/index.js +1 -1
- package/main.js +1 -1
- package/package.json +1 -1
- package/2081.js +0 -1
- package/2283.js +0 -1
- package/7284.js +0 -1
- package/7313.js +0 -1
- package/880.js +0 -1
- package/8855.js +0 -1
package/package.json
CHANGED
package/2081.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[2081],{6103(P,k,r){r.d(k,{N:()=>l});var I=r(2306),s=r(140),h=r(58);function l({entityData:C,availableEntityRelationships:F}){const _=y=>F.find(f=>f.iri===y)?.label??y.split("#").pop()??y,R=[],E={};for(const[y,f]of Object.entries(C)){for(const p of f.directMapGeometries??[])R.push({iri:y,wkt:p.wkt});for(const p of f.indirectMapGeometries??[]){E[p.rel]||(E[p.rel]=[]);for(const m of p.geometries)E[p.rel].push({iri:p.entityUUID,wkt:m.wkt})}}const M=(y,f,p)=>{if(!f.length)return null;const m=new I.ux(y,y);return m.category=p,m.collection=new s.o(f.flatMap(({iri:e,wkt:G})=>{const T=(0,h.S)(G);return T?[{type:"Feature",geometry:(0,h.n)(T),properties:{iri:e}}]:[]})),m},x=[],N=M("direct",R,"Direct");N&&x.push(N);for(const[y,f]of Object.entries(E)){const p=_(y),m=M(p,f,p);m&&x.push(m)}return x}},2081(P,k,r){r.d(k,{CueEntityViewer:()=>fe});var I=r(467),s=r(7705),h=r(2271),l=r(5802),C=r(1492),F=r(9769),_=r(9352),R=r(5381),E=r(1024),M=r(9421),x=r(5794),N=r(6117),y=r(8547),f=r(3319),p=r(5971),m=r(7573),e=r(5547);function G(n,u){if(1&n&&(e.nrm(0,"cue-key-val",4),e.nI1(1,"transloco")),2&n){const t=e.XpG(2);e.Y8G("key",e.bMT(1,2,"components.entityInfo.labelValue"))("val",t.entity().value)}}function T(n,u){if(1&n&&(e.nrm(0,"cue-key-val-editable",5),e.nI1(1,"transloco"),e.nI1(2,"transloco")),2&n){const t=e.XpG(3);e.Y8G("key",1===t.entityCategories().length?e.bMT(1,4,"components.entityInfo.labelEntityCategory"):e.bMT(2,6,"components.entityInfo.labelEntityCategories"))("val",t.entityCategoriesString())("rdfConfig",t.rdfEditConfig())("editDisabled",!t.entityCategoriesEditable())}}function V(n,u){if(1&n&&(e.nrm(0,"hr"),e.nVh(1,T,3,8,"cue-key-val-editable",5)),2&n){const t=e.XpG(2);e.R7$(),e.vxM(t.entityCategories()&&t.entityCategories().length>0?1:-1)}}function B(n,u){if(1&n&&(e.j41(0,"cue-key-val-list"),e.nVh(1,G,2,4,"cue-key-val",4),e.nVh(2,V,2,1),e.k0s()),2&n){const t=e.XpG();e.R7$(),e.vxM(t.entity().value?1:-1),e.R7$(),e.vxM(t.collapsed()?-1:2)}}function O(n,u){if(1&n&&(e.j41(0,"cue-flexcontainer",3)(1,"cue-menu",6)(2,"cue-button",7,0),e.nrm(4,"cue-button-icon",8),e.k0s(),e.nrm(5,"cue-menu-nested",9),e.k0s()()),2&n){e.XpG();const t=e.r8f(3);e.R7$(5),e.Y8G("items",t)}}let $=(()=>{class n{entity=s.hFB.required();handlers=s.hFB.required();entityCategoriesEditable=(0,s.hFB)(!1);menuItems=(0,s.hFB)([]);availableEntityCategories=(0,s.hFB)([]);collapsed=(0,s.hFB)(!1);dataChanged=(0,s.CGW)();_entityCategories=(0,h.uu)(()=>this.entity()?.categories||[]);entityCategories=(0,h.EW)(()=>this._entityCategories());entityCategoriesString=(0,h.EW)(()=>this._entityCategories().map(t=>this._iriToString(t)).sort().join(", "));infoChangeEntityCategory=(0,_.Xx)("components.entityInfo.infoChangeEntityCategory");rdfEditConfig=(0,h.EW)(()=>{var t=this;const i=this.handlers()?.requestRDFChange;var o;if(void 0!==i)return{message:this.infoChangeEntityCategory(),existingValue:this._entityCategories(),dataType:"multiselect",options:this.availableEntityCategories()?.map(o=>o.iri),optionLabelMap:this.availableEntityCategories()?.reduce((o,a)=>(o[a.iri]=a.label,o),{}),requestSave:(o=(0,I.A)(function*(a){console.log(a);const c={subject:t.entity()?.iri,predicate:`${m.E.qcy}entityCategory`,objects:t._entityCategories(),newObjects:a.newValue,type:"entityCategory",comment:a.comment};yield i(c),t._entityCategories.set(a.newValue),t.dataChanged.emit({entityCategories:a.newValue})}),function(c){return o.apply(this,arguments)})};console.warn("No RDF change request handler defined")});_iriToString(t){const i=this.availableEntityCategories()?.find(o=>o.iri===t);return i?i.label:t}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=e.VBU({type:n,selectors:[["cue-entity-info"]],inputs:{entity:[1,"entity"],handlers:[1,"handlers"],entityCategoriesEditable:[1,"entityCategoriesEditable"],menuItems:[1,"menuItems"],availableEntityCategories:[1,"availableEntityCategories"],collapsed:[1,"collapsed"]},outputs:{dataChanged:"dataChanged"},decls:5,vars:3,consts:[["trigger",""],["direction","row",2,"min-height","50px"],["direction","column",2,"flex","1 1"],["direction","column",2,"width","50px"],["size","l",3,"key","val"],["size","s",3,"key","val","rdfConfig","editDisabled"],["positioning","bottomleft"],["trigger","","variant","tertiary"],["icon","more-vert"],["menu","",3,"items"]],template:function(i,o){if(1&i&&(e.j41(0,"cue-flexcontainer",1)(1,"cue-flexcontainer",2),e.nVh(2,B,3,2,"cue-key-val-list"),e.k0s(),e.SS7(3),e.nVh(4,O,6,1,"cue-flexcontainer",3),e.k0s()),2&i){e.R7$(2),e.vxM(o.entity()?2:-1),e.R7$();const a=e.bH3(o.menuItems());e.R7$(),e.vxM(void 0!==a&&a.length>0?4:-1)}},dependencies:[R.FlexContainer,E.p,M.F,x.L,N.W,y.T,f.ButtonIcon,p.Button,_.Kj],encapsulation:2,changeDetection:0})}return n})();var S=r(2283),W=r(9937),X=r(4284);function A(n,u){if(1&n){const t=e.RV6();e.j41(0,"cue-rdf-graph",1),e.bIt("nodeHover",function(o){l.eBV(t);const a=e.XpG(2);return l.Njj(a.hoveredNode.set(o))}),e.k0s()}if(2&n){const t=e.XpG(),i=e.XpG();e.Y8G("doc",t)("collapseClasses",!0)("collapseAttributes",!0)("collapseRelationships",!0)("colorByCategory",!1)("categoryLabelsOnHover",!0)("showRelationshipLegend",!0)("legendPosition",i.legendPosition())("nodeMenuItems",i.nodeMenuItems())("focusNodes",i.focusNodes())("focusNodeColor",i.focusNodeColor())("zoomToFocusNodes",!1)}}function H(n,u){if(1&n&&e.nVh(0,A,1,12,"cue-rdf-graph",0),2&n){const t=e.XpG();e.vxM(t._containerReady()?0:-1)}}let Y=(()=>{class n{entity=s.hFB.required();availableEntityCategories=s.hFB.required();availableEntityRelationships=(0,s.hFB)([]);relationships=(0,s.hFB)(void 0);legendPosition=(0,s.hFB)("top-left");showOpenEntityMenuItem=(0,s.hFB)(!0);clickedOpenEntity=(0,s.CGW)();doc=(0,l.vPA)(void 0);_containerReady=(0,l.vPA)(!1);_hostElement=(0,l.WQX)(e.aKT);_resolvedEntityIRI=(0,h.EW)(()=>{const t=this.entity()?.iri;if(t){if(!t.includes("://"))throw new Error(`Expected a full IRI but got: ${t}`);return t}});focusNodes=(0,h.EW)(()=>{const t=this._resolvedEntityIRI();return t?[t]:[]});focusNodeColor=(0,l.vPA)("green");_document=(0,l.WQX)(l.qQL);hoveredNode=(0,l.vPA)(void 0);labelOpenEntity=(0,_.Xx)("components.graph.entityGraph.labelOpenEntity");nodeMenuItems=(0,h.EW)(()=>{const t=[];return this.showOpenEntityMenuItem()&&this.hoveredNode()?.id!==this._resolvedEntityIRI()&&t.push({id:"open",label:this.labelOpenEntity(),action:i=>this.clickedOpenEntity.emit(i.id)}),t});constructor(){(0,e.mal)(()=>{const t=getComputedStyle(this._document.documentElement).getPropertyValue("--cue-color-green").trim();t&&this.focusNodeColor.set(t)}),(0,l.QZP)(()=>{const t=this.entity()?.iri,i=this.relationships();void 0===t||void 0===i||this._buildDoc(i)}),(0,e.mal)(()=>{if(this._containerReady())return;const t=this._hostElement.nativeElement,i=new ResizeObserver(o=>{if(this._containerReady())return void i.disconnect();const a=o[0]?.contentRect;a&&a.width>=100&&a.height>=100&&(this._containerReady.set(!0),i.disconnect())});return i.observe(t),()=>i.disconnect()})}ngAfterViewInit(){const t=this._hostElement.nativeElement;t.clientWidth>=100&&t.clientHeight>=100&&this._containerReady.set(!0)}_buildDoc(t){const{incoming:i,outgoing:o}=t,a={"@context":{qcy:`${m.E.qcy}`,"qcy-e":`${m.E["qcy-e"]}`,skos:`${X.B.skos}`},"@graph":[]},c=this._resolvedEntityIRI(),v={"@id":c,"qcy:value":this.entity()?.value,"@type":this.entity()?.categories};a["@graph"].push(v),o.forEach(d=>{a["@graph"].push({"@id":d.nodeIRI,"qcy:value":d.nodeValue,"@type":d.nodeCategories}),a["@graph"].push({"@id":c,[d.relIRI]:{"@id":d.nodeIRI}})}),i.forEach(d=>{a["@graph"].push({"@id":d.nodeIRI,"qcy:value":d.nodeValue,"@type":d.nodeCategories}),a["@graph"].push({"@id":d.nodeIRI,[d.relIRI]:{"@id":c}})});const b=new Set;i.forEach(d=>d.nodeCategories.forEach(g=>b.add(g))),o.forEach(d=>d.nodeCategories.forEach(g=>b.add(g))),this.entity()?.categories.forEach(d=>b.add(d)),b.forEach(d=>{const g=this.availableEntityCategories().find(L=>L.iri===d)?.label;void 0!==g&&a["@graph"].push({"@id":d,"skos:prefLabel":g})}),new Set(i.map(d=>d.relIRI).concat(o.map(d=>d.relIRI))).forEach(d=>{const g=this.availableEntityRelationships().find(L=>L.iri===d)?.label;void 0!==g&&a["@graph"].push({"@id":d,"skos:prefLabel":g})}),this.doc.update(()=>a)}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=e.VBU({type:n,selectors:[["cue-entity-graph"]],inputs:{entity:[1,"entity"],availableEntityCategories:[1,"availableEntityCategories"],availableEntityRelationships:[1,"availableEntityRelationships"],relationships:[1,"relationships"],legendPosition:[1,"legendPosition"],showOpenEntityMenuItem:[1,"showOpenEntityMenuItem"]},outputs:{clickedOpenEntity:"clickedOpenEntity"},decls:1,vars:1,consts:[[3,"doc","collapseClasses","collapseAttributes","collapseRelationships","colorByCategory","categoryLabelsOnHover","showRelationshipLegend","legendPosition","nodeMenuItems","focusNodes","focusNodeColor","zoomToFocusNodes"],[3,"nodeHover","doc","collapseClasses","collapseAttributes","collapseRelationships","colorByCategory","categoryLabelsOnHover","showRelationshipLegend","legendPosition","nodeMenuItems","focusNodes","focusNodeColor","zoomToFocusNodes"]],template:function(i,o){if(1&i&&e.nVh(0,H,1,1),2&i){let a;e.vxM((a=o.doc())?0:-1,a)}},dependencies:[W.t],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;min-height:400px;min-width:100px}"]})}return n})();var z=r(8017),U=r(2306),Q=r(6103),K=r(6455),Z=r(8334),j=r(2245),q=r(7851);function J(n,u){1&n&&(e.j41(0,"cue-typography",2),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&n&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"components.entityData.infoNoData")," "))}function ee(n,u){if(1&n&&(e.j41(0,"div",0),e.nVh(1,J,3,3,"cue-typography",2),e.k0s()),2&n){e.XpG();const t=e.r8f(6);e.Y8G("cueLogoLoader",t),e.R7$(),e.vxM(t?-1:1)}}function te(n,u){if(1&n){const t=e.RV6();e.j41(0,"cue-tab",3),e.nI1(1,"transloco"),e.j41(2,"cue-entity-graph",5),e.bIt("clickedOpenEntity",function(o){let a;l.eBV(t);const c=e.XpG(2);return c.clickedOpenEntity.emit(o),l.Njj(null==(a=c.handlers())||null==a.openEntity?null:a.openEntity(o))}),e.k0s()()}if(2&n){e.XpG();const t=e.r8f(1),i=e.XpG(),o=e.r8f(0);e.Y8G("label",e.bMT(1,5,"components.entityData.titleEntityGraph")),e.R7$(2),e.Y8G("entity",t)("availableEntityCategories",i.availableEntityCategories())("availableEntityRelationships",i.availableEntityRelationships())("relationships",o)}}function ne(n,u){if(1&n){const t=e.RV6();e.j41(0,"cue-tab",4),e.nI1(1,"transloco"),e.j41(2,"cue-doc-list",6),e.bIt("clickedDocument",function(o){l.eBV(t);const a=e.XpG(2);return l.Njj(a.clickedDocument.emit(o))}),e.k0s()()}if(2&n){const t=e.XpG(2);e.Y8G("label",e.bMT(1,4,"components.entityData.titleRelatedDocuments")),e.R7$(2),e.Y8G("documentRefs",t.documentRefs())("handlers",t.internalDocumentListHandlers())("documentData",t.documentData())}}function ie(n,u){if(1&n){const t=e.RV6();e.j41(0,"cue-tab",4),e.nI1(1,"transloco"),e.j41(2,"div",7)(3,"cue-map",8),e.bIt("clickedFeature",function(o){l.eBV(t);const a=e.XpG(2);return l.Njj(a.mapFeatureClicked.emit(o))}),e.k0s()()()}if(2&n){e.XpG(2);const t=e.r8f(3),i=e.r8f(4);e.Y8G("label",e.bMT(1,3,"components.entityData.titleMap")),e.R7$(3),e.Y8G("layers",t)("settings",i)}}function ae(n,u){if(1&n&&(e.j41(0,"cue-tabs",1),e.SS7(1),e.nVh(2,te,3,7,"cue-tab",3),e.nVh(3,ne,3,6,"cue-tab",4),e.nVh(4,ie,4,5,"cue-tab",4),e.k0s()),2&n){const t=e.XpG(),i=e.r8f(1),o=e.r8f(2),a=e.r8f(5);e.Y8G("variant",t.variant()),e.R7$();const c=e.bH3(t.entity());e.R7$(),e.vxM(i&&c?2:-1),e.R7$(),e.vxM(o?3:-1),e.R7$(),e.vxM(a?4:-1)}}let oe=(()=>{class n{iri=s.hFB.required();availableEntityCategories=s.hFB.required();availableEntityRelationships=(0,s.hFB)([]);mapboxToken=s.hFB.required();handlers=(0,s.hFB)(void 0);variant=(0,s.hFB)("none");clickedOpenEntity=(0,s.CGW)();clickedDocument=(0,s.CGW)();mapFeatureClicked=(0,s.CGW)();relationshipData=(0,s.hFB)(void 0);documentRefs=(0,s.hFB)([]);documentData=(0,s.hFB)({});entityDetailedData=(0,s.hFB)(void 0);_fetchedIRIs=new Set;_mapLayers=(0,l.vPA)([]);_isLoading=(0,l.vPA)(!1);mapSettings=(0,h.EW)(()=>{const t=this.mapboxToken();if(t)return{...new U.yY,mapboxToken:t}});mapLayers=this._mapLayers.asReadonly();isEntityLoading=this._isLoading.asReadonly();entity=(0,h.EW)(()=>{const t=this.entityDetailedData();return t?{iri:this.iri(),value:t.value,categories:t.categories}:void 0});internalDocumentListHandlers=(0,h.EW)(()=>{const t=this.handlers();return{requestData:i=>{t?.requestDocumentData?.(i)},requestDownload:t?.downloadDocument,requestOpen:t?.openDocument,requestOpenInDir:t?.openDocumentInFileManager}});constructor(){(0,l.QZP)(()=>{const t=this.iri(),i=this.handlers();if(!t||!i||this._fetchedIRIs.has(t))return;this._fetchedIRIs.add(t),this._isLoading.set(!0),this._mapLayers.set([]),i.requestEntityLocations?.([t]);const o=i.requestRelationships?.(t);o?o.then(()=>this._isLoading.set(!1)).catch(()=>this._isLoading.set(!1)):this._isLoading.set(!1)}),(0,l.QZP)(()=>{const t=this.entityDetailedData();if(!t)return;const i=this.iri(),o=(0,Q.N)({entityData:{[i]:t},availableEntityRelationships:this.availableEntityRelationships()});this._mapLayers.set(o)})}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=e.VBU({type:n,selectors:[["cue-entity-data"]],inputs:{iri:[1,"iri"],availableEntityCategories:[1,"availableEntityCategories"],availableEntityRelationships:[1,"availableEntityRelationships"],mapboxToken:[1,"mapboxToken"],handlers:[1,"handlers"],variant:[1,"variant"],relationshipData:[1,"relationshipData"],documentRefs:[1,"documentRefs"],documentData:[1,"documentData"],entityDetailedData:[1,"entityDetailedData"]},outputs:{clickedOpenEntity:"clickedOpenEntity",clickedDocument:"clickedDocument",mapFeatureClicked:"mapFeatureClicked"},decls:9,vars:8,consts:[[2,"height","400px","width","100%","display","flex","align-items","center","justify-content","center","background","var(--cue-color-background-subtle, #f8f9fa)","border-radius","4px",3,"cueLogoLoader"],[2,"width","100%","flex","1","min-height","400px","height","100%",3,"variant"],[2,"text-align","center","color","var(--cue-color-text-muted, #6c757d)"],[2,"height","100%",3,"label"],[3,"label"],["legendPosition","top-right",2,"flex","1","min-height","400px","width","100%",3,"clickedOpenEntity","entity","availableEntityCategories","availableEntityRelationships","relationships"],[3,"clickedDocument","documentRefs","handlers","documentData"],[2,"display","flex","flex-direction","column","flex","1","min-height","400px","width","100%","position","relative"],[2,"width","100%",3,"clickedFeature","layers","settings"]],template:function(i,o){if(1&i&&(e.SS7(0)(1)(2)(3)(4)(5)(6),e.nVh(7,ee,2,2,"div",0)(8,ae,5,5,"cue-tabs",1)),2&i){const a=e.bH3(o.relationshipData());e.R7$();const c=e.bH3(a&&a.incoming.length+a.outgoing.length>0);e.R7$();const v=e.bH3(o.documentRefs().length>0);e.R7$();const b=e.bH3(o.mapLayers());e.R7$();const D=e.bH3(o.mapSettings());e.R7$();const d=e.bH3(void 0!==D&&b.length>0);e.R7$(),e.bH3(o.isEntityLoading()),e.R7$(),e.vxM(c||v||d?8:7)}},dependencies:[Y,S.g,K.t,Z.o,z.T,j.Typography,q.k,_.Kj],styles:["[_nghost-%COMP%]{display:contents}"],changeDetection:0})}return n})();var se=r(2403),re=r(7293);function le(n,u){if(1&n&&(e.j41(0,"cue-flexcontainer",3)(1,"cue-typography",5),e.EFF(2),e.k0s()()),2&n){const t=e.XpG(2);e.R7$(2),e.SpI(" ",t.errorMessage()," ")}}function ce(n,u){1&n&&(e.j41(0,"cue-flexcontainer",3)(1,"cue-typography",6),e.EFF(2," No project connected. "),e.k0s()())}function de(n,u){1&n&&(e.j41(0,"cue-flexcontainer",3)(1,"cue-typography",6),e.EFF(2," No entity selected. "),e.k0s()())}function ue(n,u){if(1&n&&e.nrm(0,"cue-entity-info",7),2&n){e.XpG();const t=e.r8f(0),i=e.XpG(2);e.Y8G("entity",t)("entityCategoriesEditable",!1)("availableEntityCategories",i.availableEntityCategories())("collapsed",!1)("handlers",i._entityInfoHandlers)}}function he(n,u){1&n&&(e.j41(0,"cue-typography",8),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&n&&(e.Y8G("cuePulse",!0),e.R7$(),e.JRh(e.bMT(2,2,"common.infoLoading")))}function pe(n,u){if(1&n&&(e.SS7(0),e.nVh(1,ue,1,5,"cue-entity-info",7)(2,he,3,4,"cue-typography",8),e.nrm(3,"div",9),e.j41(4,"div",10),e.nrm(5,"cue-entity-data",11),e.k0s()),2&n){const t=e.XpG(2),i=e.bH3(t._entity());e.R7$(),e.vxM(i?1:2),e.R7$(4),e.Y8G("iri",t._currentIri())("availableEntityCategories",t.availableEntityCategories())("availableEntityRelationships",t.availableEntityRelationships())("mapboxToken",t.mapboxToken()??"")("handlers",t._entityDataHandlers())("relationshipData",t.relationshipData())("documentRefs",t.documentRefs())("documentData",t.documentData())("entityDetailedData",t.entityData())}}function ge(n,u){if(1&n&&e.nrm(0,"cue-logo-link",4),2&n){const t=e.XpG(2);e.Y8G("projectId",t.projectId())("resourceId",t._resourceId())}}function ye(n,u){if(1&n&&(e.j41(0,"div",2),e.nVh(1,le,3,1,"cue-flexcontainer",3)(2,ce,3,0,"cue-flexcontainer",3)(3,de,3,0,"cue-flexcontainer",3)(4,pe,6,11),e.nVh(5,ge,1,2,"cue-logo-link",4),e.k0s()),2&n){const t=e.XpG();e.R7$(),e.vxM("error"===t.state()?1:"idle"===t.state()?2:"no-entity"===t.state()?3:t._currentIri()?4:-1),e.R7$(4),e.vxM(t.showLogo()?5:-1)}}function w(n){return n.split("/").pop()}function me(n){return{id:n.id,contentIRI:n.contentIRI??n.id,path:n.path??"",suffix:n.suffix??"",size:n.size??0,tags:n.tags??[],summary:n.summary??"",categories:n.categories??[],subject:n.subject,providerId:n.providerId,relevance:0}}let fe=(()=>{class n{cue=(0,s.hFB)(void 0);projectId=(0,s.hFB)(void 0);showLogo=(0,s.hFB)(!1,{transform:s.L39});_resourceId=(0,h.EW)(()=>{const t=this._currentIri();return t?t.split("/").pop():void 0});iri=(0,s.hFB)(void 0);mapboxToken=(0,s.hFB)(void 0);showTranslatedRelationshipLabels=(0,s.hFB)(!1,{transform:s.L39});variant=(0,s.hFB)("none");openEntity=(0,s.CGW)();state=(0,l.vPA)("idle");errorMessage=(0,l.vPA)(null);availableEntityCategories=(0,l.vPA)([]);availableEntityRelationships=(0,l.vPA)([]);relationshipData=(0,l.vPA)(void 0);documentRefs=(0,l.vPA)([]);documentData=(0,l.vPA)({});entityData=(0,l.vPA)(void 0);_entities=(0,l.vPA)(void 0);_documents=(0,l.vPA)(void 0);_unsubscribeEntities;_unsubscribeDocuments;_unsubscribeSchema;_lastIri;_inputWarningTimer;_currentIri=(0,h.EW)(()=>this.iri());_entity=(0,h.EW)(()=>{const t=this.entityData();return t?{iri:this.iri(),value:t.value,categories:t.categories}:void 0});_entityInfoHandlers={};_entityDataHandlers=(0,h.EW)(()=>{var t=this;const i=this._entities(),o=this._documents();return{requestRelationships:(a=(0,I.A)(function*(c){yield Promise.all([i?.fetchEntityRelationships(c).then(v=>t.relationshipData.set(v)),i?.fetchEntityDocuments(c).then(v=>{t.documentRefs.set(v.map(b=>({id:b}))),o&&v.length>0&&o.requestDocumentData(v)})])}),function(v){return a.apply(this,arguments)}),requestDocumentData:a=>o?.requestDocumentData(a),requestEntityLocations:a=>{if(!this.mapboxToken())return void console.warn("[cue-entity-viewer] No mapboxToken provided \u2014 skipping map location fetch.");const c=a.map(w).filter(Boolean);i?.requestEntityLocations(c)},openEntity:a=>this.openEntity.emit(a)};var a});constructor(){this._inputWarningTimer=setTimeout(()=>{this.cue()||console.warn('[cue-entity-viewer] Required input "cue" is not set. Pass an authenticated Cue SDK instance.'),this.projectId()||console.warn('[cue-entity-viewer] Required input "projectId" is not set. Pass the Cue project ID to display entity data.')},3e3),(0,l.QZP)(()=>{this._setup(this.cue(),this.projectId())}),(0,l.QZP)(()=>{const t=this._entities(),i=this.iri();t&&i&&void 0===this._entity()&&t.requestEntityData([w(i)],!1)}),(0,l.QZP)(()=>{const t=this._entities(),i=this.iri();!t||!i||(i!==this._lastIri&&(this._lastIri=i,this.relationshipData.set(void 0),this.documentRefs.set([]),this.entityData.set(void 0),this.state.set("ready")),this._syncEntityData(t,i))})}ngOnDestroy(){clearTimeout(this._inputWarningTimer),this._teardown()}_setup(t,i){if(this._teardown(),!t||!i)return this._entities.set(void 0),this._documents.set(void 0),void this.state.set("idle");const o=new C.g8(t.api,i),a=new C.f$(t.api,i);if(this._entities.set(o),this._documents.set(a),this._lastIri=void 0,this.state.set(this.iri()?"ready":"no-entity"),this._unsubscribeEntities=o.entityInfoMap.subscribe(()=>{const c=this.iri();c&&this._syncEntityData(o,c)}),this._unsubscribeDocuments=a.documentInfoMap.subscribe(()=>{this._syncDocumentData(a)}),o.contentCategoriesInProject(!0).then(c=>this.availableEntityCategories.set(c)).catch(c=>console.error("[cue-entity-viewer] Failed to fetch categories",c)),this.showTranslatedRelationshipLabels()){const c=new C.Ug(t.api,i,t.api.language);this._unsubscribeSchema=c.availableEntityRelationships.subscribe(()=>{this.availableEntityRelationships.set(c.availableEntityRelationships.get())})}}_syncEntityData(t,i){const o=w(i),a=t.entityInfoMap.get()[o];if(!a)return;const c=Array.isArray(a.documentRefs)?a.documentRefs.map(D=>"string"==typeof D?{id:D}:D):[],{documentRefs:v,...b}=a;this.entityData.set({...b,documentRefs:c}),c.length>0&&this.documentRefs.set(c)}_syncDocumentData(t){const i=t.documentInfoMap.get(),o={};for(const[a,c]of Object.entries(i))o[a]=me(c);this.documentData.set(o)}_teardown(){this._unsubscribeEntities?.(),this._unsubscribeDocuments?.(),this._unsubscribeSchema?.(),this._unsubscribeEntities=void 0,this._unsubscribeDocuments=void 0,this._unsubscribeSchema=void 0}static \u0275fac=function(i){return new(i||n)};static \u0275cmp=e.VBU({type:n,selectors:[["cue-entity-viewer-wc"]],inputs:{cue:[1,"cue"],projectId:[1,"projectId"],showLogo:[1,"showLogo"],iri:[1,"iri"],mapboxToken:[1,"mapboxToken"],showTranslatedRelationshipLabels:[1,"showTranslatedRelationshipLabels"],variant:[1,"variant"]},outputs:{openEntity:"openEntity"},decls:3,vars:1,consts:[["body",""],[3,"ngTemplateOutlet"],[2,"display","flex","flex-direction","column","height","100%","overflow","hidden","width","100%","position","relative"],["direction","column","align","center","justify","center",2,"height","100%","width","100%","padding","8px"],[2,"position","absolute","top","12px","right","12px","z-index","5",3,"projectId","resourceId"],[2,"color","#c44","font-size","13px"],[2,"color","#9ca3af","font-size","13px"],[3,"entity","entityCategoriesEditable","availableEntityCategories","collapsed","handlers"],["cuePulseMode","text",3,"cuePulse"],[2,"height","16px"],[2,"flex","1","min-height","0"],[2,"width","100%","height","100%",3,"iri","availableEntityCategories","availableEntityRelationships","mapboxToken","handlers","relationshipData","documentRefs","documentData","entityDetailedData"]],template:function(i,o){if(1&i&&(e.DNE(0,ye,6,2,"ng-template",null,0,e.C5r),e.eu8(2,1)),2&i){const a=e.sdS(1);e.R7$(2),e.Y8G("ngTemplateOutlet",a)}},dependencies:[$,oe,R.FlexContainer,j.Typography,se.V,F.T3,re.x,_.Kj],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%;overflow:hidden}"],changeDetection:0})}return n})()}}]);
|
package/2283.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[2283],{2283(N,S,c){c.d(S,{g:()=>Me});var y=c(467),l=c(7705),h=c(2271),s=c(5802),O=c(2065),D=c(7284),v=c.n(D);var t=c(5547);let z=(()=>{class a{get calculatedWidth(){let e=this.localConfig().width||this.width()||1;return this.el.nativeElement.parentNode.offsetWidth>0&&e<=1&&e>0&&(e*=this.el.nativeElement.parentNode.offsetWidth),e}get calculatedHeight(){let e=this.localConfig().height||this.height()||400;return this.el.nativeElement.parentNode.offsetHeight>0&&e<=1&&e>0&&(e*=this.el.nativeElement.parentNode.offsetHeight),e}onResize(e){this.logMessage("debug","rezisze triggered"),window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(()=>{this.options.realignOnResize&&this.reDraw()},200)}constructor(){this.data=(0,l.hFB)([]),this.width=(0,l.hFB)(),this.height=(0,l.hFB)(),this.step=(0,l.hFB)(),this.overflow=(0,l.hFB)(),this.strict=(0,l.hFB)(),this.zoomOnHover=(0,l.hFB)(),this.realignOnResize=(0,l.hFB)(),this.randomizeAngle=(0,l.hFB)(),this.background=(0,l.hFB)(),this.font=(0,l.hFB)(),this.delay=(0,l.hFB)(),this.config=(0,l.hFB)({}),this.log=(0,l.hFB)(),this.clicked=(0,l.CGW)(),this.afterInit=(0,l.CGW)(),this.afterChecked=(0,l.CGW)(),this.localConfig=(0,h.EW)(()=>{const n=this.config();return{...n,width:this.width()||n.width||500,height:this.height()||n.height||300,overflow:this.overflow()??(n.overflow||!0),strict:this.strict()??(n.strict||!1),zoomOnHover:this.zoomOnHover()||n.zoomOnHover||{transitionTime:0,scale:1,delay:0},realignOnResize:this.realignOnResize()??(n.realignOnResize||!1),randomizeAngle:this.randomizeAngle()??(n.randomizeAngle||!1),step:this.step()||n.step||2,log:this.log()||n.log||!1,delay:this.delay()||n.delay,background:this.background()||n.background,font:this.font()||n.font}}),this.cloudDataHtmlElements=[],this.dataArr=[],this.el=(0,s.WQX)(t.aKT),this.r2=(0,s.WQX)(t.sFG);const e=this.el.nativeElement;(0,s.QZP)(()=>{const n=this.localConfig();this.logMessage("warn","cloud configuration",n),n.font&&this.r2.setStyle(e,"font",n.font),n.background&&this.r2.setStyle(e,"background",n.background),this.reDraw()})}reDraw(){this.afterChecked?.emit(),this.logMessage("debug","dataChanges emitted"),this.cloudDataHtmlElements=[],this.data()?(this.el.nativeElement.innerHTML="",this.data()&&(this.dataArr=this.data()),this.options={...this.localConfig(),aspectRatio:this.calculatedWidth/this.calculatedHeight,width:this.calculatedWidth,height:this.calculatedHeight,center:{x:this.calculatedWidth/2,y:this.calculatedHeight/2}},this.r2.setStyle(this.el.nativeElement,"width",this.options.width+"px"),this.r2.setStyle(this.el.nativeElement,"height",this.options.height+"px"),this.drawWordCloud(),this.logMessage("debug","reDraw finished")):console.error("angular-tag-cloud: No data passed. Please pass an Array of CloudData")}descriptiveEntry(e){let n=e.text;return n+=e.color?`-${e.color}`:"",n+=e.external?`-${e.external}`:"",n+=e.link?`-${e.link}`:"",n+=e.rotate?`-${e.rotate}`:"",n}drawWordCloud(){this.dataArr.sort((i,o)=>this.descriptiveEntry(i).localeCompare(this.descriptiveEntry(o))),this.dataArr.sort((i,o)=>o.weight-i.weight);const e=this.dataArr.filter(i=>i.position),n=this.dataArr.filter(i=>!i.position);e.forEach((i,o)=>{this.drawWord(o,i)}),n.forEach((i,o)=>{this.drawWord(o,i)})}hitTest(e){for(const n of this.cloudDataHtmlElements)if(this.overlapping(e,n))return!0;return!1}overlapping(e,n){const{offsetLeft:i,offsetTop:o,offsetWidth:r,offsetHeight:g}=n;return!(e.right<i||e.left>i+r||e.bottom<o||e.top>o+g)}getWeightForWord(e){let n=5;return this.dataArr[0].weight>this.dataArr[this.dataArr.length-1].weight&&(this.options.strict?e.weight>10?(n=10,this.logMessage("warn",`[TagCloud strict] Weight property ${e.weight} > 10. Fallback to 10 as you are using strict mode`,e)):e.weight<1?(n=1,this.logMessage("warn",`[TagCloud strict] Given weight property ${e.weight} < 1. Fallback to 1 as you are using strict mode`,e)):e.weight%1!=0?(n=Math.round(e.weight),this.logMessage("warn",`[TagCloud strict] Given weight property ${e.weight} is not an integer. Rounded value to ${n}`,e)):n=e.weight:n=Math.round((e.weight-this.dataArr[this.dataArr.length-1].weight)/(this.dataArr[0].weight-this.dataArr[this.dataArr.length-1].weight)*9)+1),n}setWordColor(e,n){this.r2.setStyle(e,"color",n)}setTooltip(e,n){this.r2.addClass(e,"tooltip");const i=this.r2.createElement("span");i.className="tooltiptext";const o=this.r2.createText(n);i.appendChild(o),e.appendChild(i)}setWordRotation(e,n){const i=n?`rotate(${n}deg)`:"";return this.r2.setStyle(e,"transform",i),i}wrapNodeIntoAnchorElement(e,n){const i=this.r2.createElement("a");return i.href=n.link||"",void 0!==n.external&&n.external&&(i.target="_blank"),i.appendChild(e),i}applyZoomStyle(e,n,i,o){this.options.zoomOnHover&&1!==this.options.zoomOnHover.scale&&(this.options.zoomOnHover.transitionTime||(this.options.zoomOnHover.transitionTime=0),this.options.zoomOnHover.scale||(this.options.zoomOnHover.scale=1),n.onmouseover=()=>{this.options.zoomOnHover?.transitionTime&&this.r2.setStyle(n,"transition",`transform ${this.options.zoomOnHover.transitionTime}s`),this.options.zoomOnHover?.scale&&this.r2.setStyle(n,"transform",`scale(${this.options.zoomOnHover.scale}) ${o}`),this.options.zoomOnHover?.delay&&this.r2.setStyle(n,"transition-delay",`${this.options.zoomOnHover.delay}s`),this.options.zoomOnHover?.color&&this.r2.setStyle(i?e:n,"color",this.options.zoomOnHover.color)},n.onmouseout=()=>{this.r2.setStyle(n,"transform",`none ${o}`),this.options.zoomOnHover?.color&&this.r2.removeStyle(i?e:n,"color")})}setPosition(e,n,i){let o=this.options.randomizeAngle?6.28*Math.random():0,r=0;const g=e.style;g.position="absolute";const p=!!(n.position&&n.position.left&&n.position.top),u=e.offsetWidth,f=e.offsetHeight;let b=p&&n.position?.left?n.position.left:this.options.center.x-u/2,C=p&&n.position?.top?n.position.top:this.options.center.y-f/2;if(g.left=b+"px",g.top=C+"px",this.options.delay&&(e.classList.add("tag-animation-delay"),g.setProperty("--tag-animation-delay",this.options.delay*i+"ms")),!p)if(0===i)g.left=b+2*(Math.random()-.5)*(this.calculatedWidth/5)+"px",g.top=C+2*(Math.random()-.5)*(this.calculatedHeight/5)+"30px";else{for(;this.options.width&&this.options.height&&e.offsetHeight&&e.offsetWidth&&this.hitTest(new DOMRect(b,C,e.offsetWidth,e.offsetHeight));)r+=this.options.step||1,o+=(i%2==0?1:-1)*(this.options.step||1),b=this.options.center.x-u/2+r*Math.cos(o)*this.options.aspectRatio,C=this.options.center.y+r*Math.sin(o)-f/2;g.left=b+"px",g.top=C+"px"}if(!this.options.overflow&&(b<0||C<0||b+u>this.calculatedWidth||C+f>this.calculatedHeight))return this.logMessage("warn","Word did not fit into the cloud and overflow is set to 'false'. The element will be removed",e),void e.remove()}drawWord(e,n){let i;const o=this.getWeightForWord(n);i=this.r2.createElement("span"),i.className=`w${o}`,i.onclick=()=>{this.clicked?.emit(n)},i.onmouseenter=()=>{i.style.zIndex="2"},i.onmouseleave=()=>{i.style.zIndex="1"};let r=this.r2.createText(n.text);n.color&&this.setWordColor(i,n.color);const g=this.setWordRotation(i,n.rotate);n.link&&(r=this.wrapNodeIntoAnchorElement(r,n)),this.options.zoomOnHover&&1!==this.options.zoomOnHover.scale&&this.applyZoomStyle(r,i,n.link,g),i.appendChild(r),this.r2.appendChild(this.el.nativeElement,i),n.tooltip&&this.setTooltip(i,n.tooltip),i.id=`angular-tag-cloud-item-${e}`,this.setPosition(i,n,e),this.logMessage("debug","Adds new word <span>",i),this.cloudDataHtmlElements.push(i),this.logMessage("debug","Placed words",this.cloudDataHtmlElements)}logMessage(e,...n){this.localConfig()&&("debug"===this.localConfig().log?console.log(`[AngularTagCloudModule ${e}]`,...n):"warn"===this.localConfig().log&&"warn"===e&&console.warn(`[AngularTagCloudModule ${e}]`,...n))}static{this.\u0275fac=function(n){return new(n||a)}}static{this.\u0275cmp=t.VBU({type:a,selectors:[["angular-tag-cloud"],["ng-tag-cloud"],["ngtc"]],hostBindings:function(n,i){1&n&&t.bIt("resize",function(r){return i.onResize(r)},t.tSv)},inputs:{data:[1,"data"],width:[1,"width"],height:[1,"height"],step:[1,"step"],overflow:[1,"overflow"],strict:[1,"strict"],zoomOnHover:[1,"zoomOnHover"],realignOnResize:[1,"realignOnResize"],randomizeAngle:[1,"randomizeAngle"],background:[1,"background"],font:[1,"font"],delay:[1,"delay"],config:[1,"config"],log:[1,"log"]},outputs:{clicked:"clicked",afterInit:"afterInit",afterChecked:"afterChecked"},decls:0,vars:0,template:function(n,i){},styles:['[_nghost-%COMP%]{font-family:Helvetica,Arial,sans-serif;font-size:10px;line-height:normal;color:#09f;overflow:hidden;position:relative;display:block}.tag-animation-delay[_ngcontent-%COMP%]{--tag-animation-delay: .5s;animation:_ngcontent-%COMP%_fadeIn .5s;opacity:0;animation-fill-mode:forwards;animation-delay:var(--tag-animation-delay)}span[_ngcontent-%COMP%]{padding:0}span.w10[_ngcontent-%COMP%]{font-size:550%}span.w9[_ngcontent-%COMP%]{font-size:500%}span.w8[_ngcontent-%COMP%]{font-size:450%}span.w7[_ngcontent-%COMP%]{font-size:400%}span.w6[_ngcontent-%COMP%]{font-size:350%}span.w5[_ngcontent-%COMP%]{font-size:300%}span.w4[_ngcontent-%COMP%]{font-size:250%}span.w3[_ngcontent-%COMP%]{font-size:200%}span.w2[_ngcontent-%COMP%]{font-size:150%}span.w1[_ngcontent-%COMP%]{font-size:100%}a[_ngcontent-%COMP%]:hover{color:#0df}a[_ngcontent-%COMP%]:hover, span.w10[_ngcontent-%COMP%], span.w9[_ngcontent-%COMP%], span.w8[_ngcontent-%COMP%]{color:#0cf}span.w7[_ngcontent-%COMP%]{color:#39d}span.w6[_ngcontent-%COMP%]{color:#90c5f0}span.w5[_ngcontent-%COMP%]{color:#90a0dd}span.w4[_ngcontent-%COMP%]{color:#90c5f0}span.w3[_ngcontent-%COMP%]{color:#a0ddff}span.w2[_ngcontent-%COMP%]{color:#9ce}span.w1[_ngcontent-%COMP%]{color:#aab5f0}.tooltip[_ngcontent-%COMP%] .tooltiptext[_ngcontent-%COMP%]{visibility:hidden;width:inherit;background-color:#555;color:#fff;text-align:center;border-radius:6px;padding:5px 10px;position:absolute;bottom:100%;left:0;opacity:0;transition:opacity .3s}.tooltip[_ngcontent-%COMP%] .tooltiptext[_ngcontent-%COMP%]:after{content:"";position:absolute;top:100%;left:50%;margin-left:-5px;border-width:5px;border-style:solid;border-color:#555 transparent transparent transparent}.tooltip[_ngcontent-%COMP%]:hover .tooltiptext[_ngcontent-%COMP%]{visibility:visible;opacity:1}@keyframes _ngcontent-%COMP%_fadeIn{0%{opacity:0}to{opacity:1}}'],changeDetection:0})}}return a})();var F=c(5970);const T=["wordCloudContainer"];function k(a,m){if(1&a){const e=t.RV6();t.j41(0,"angular-tag-cloud",3),t.bIt("clicked",function(i){s.eBV(e);const o=t.XpG();return s.Njj(o.handleClicked(i))}),t.k0s()}if(2&a){const e=t.XpG();t.Y8G("data",e.data())("zoomOnHover",e.zoomOnHoverOptions())("width",e.containerSize().width)("height",e.containerSize().height)("overflow",e.overflow())("realignOnResize",!0)}}let B=(()=>{class a{words=(0,l.hFB)();entries=(0,l.hFB)();caseSensitive=(0,l.hFB)(!1);clickable=(0,l.hFB)(!1);multiSelect=(0,l.hFB)(!1);highlightSelection=(0,l.hFB)(!1);minWeight=(0,l.hFB)(1);maxWeight=(0,l.hFB)(5);maxWords=(0,l.hFB)(50);colorScheme=(0,l.hFB)(["var(--cue-chart-text-color)","var(--cue-chart-text-color-select)"]);overflow=(0,l.hFB)(!1);clickedWord=(0,l.CGW)();selectionChanged=(0,l.CGW)();wordCloudContainer;containerSize=(0,s.vPA)({width:0,height:0});selection=(0,s.vPA)([]);data=(0,h.EW)(()=>{const e=this.words(),n=this.entries();return n?.length||e?.length?n?.length?n:e?.length?this._buildEntriesFromWords(e):[]:[]});ngAfterViewInit(){const e=new MutationObserver(()=>{this._applySelectionStyles()});this.wordCloudContainer?.nativeElement&&e.observe(this.wordCloudContainer.nativeElement,{childList:!0,subtree:!0})}handleResize(e){0!==e.newRect.height&&this.containerSize.set({width:e.newRect.width,height:e.newRect.height})}styleSelection=(0,s.QZP)(()=>{this.selection(),this._applySelectionStyles()});zoomOnHoverOptions=(0,h.EW)(()=>({scale:1.1,transitionTime:this.clickable()?1.2:0,delay:.05}));_buildEntriesFromWords(e){const n=new Map;for(const u of e){const f=this.caseSensitive()?u:u.toLowerCase();n.set(f,(n.get(f)||0)+1)}const i=Array.from(n.entries());if(0===i.length)return[];const o=i.map(([,u])=>u),r=Math.min(...o),g=Math.max(...o);return g===r?i.map(([u])=>({text:u,weight:this.maxWeight()})):i.sort(([,u],[,f])=>f-u).slice(0,this.maxWords()).map(([u,f])=>({text:u,weight:this.minWeight()+(f-r)*(this.maxWeight()-this.minWeight())/(g-r),color:this.colorScheme()[Math.floor(Math.random()*this.colorScheme().length)]}))}_applySelectionStyles(){if(!this.highlightSelection())return;const e=this.wordCloudContainer?.nativeElement;void 0!==e&&e.querySelectorAll("span").forEach(i=>{i.textContent&&(this.selection().includes(i.textContent.trim())?i.classList.add("selected"):i.classList.remove("selected"))})}handleClicked(e){this.clickable()&&(this.clickedWord.emit(e.text),this.highlightSelection()&&(this.selection().includes(e.text)?this.selection.update(n=>n.filter(i=>i!==e.text)):this.multiSelect()?this.selection.update(n=>[...n,e.text]):this.selection.update(()=>[e.text])),this.selectionChanged.emit(this.selection()))}static \u0275fac=function(n){return new(n||a)};static \u0275cmp=t.VBU({type:a,selectors:[["cue-word-cloud"]],viewQuery:function(n,i){if(1&n&&t.GBs(T,5),2&n){let o;t.mGM(o=t.lsd())&&(i.wordCloudContainer=o.first)}},inputs:{words:[1,"words"],entries:[1,"entries"],caseSensitive:[1,"caseSensitive"],clickable:[1,"clickable"],multiSelect:[1,"multiSelect"],highlightSelection:[1,"highlightSelection"],minWeight:[1,"minWeight"],maxWeight:[1,"maxWeight"],maxWords:[1,"maxWords"],colorScheme:[1,"colorScheme"],overflow:[1,"overflow"]},outputs:{clickedWord:"clickedWord",selectionChanged:"selectionChanged"},decls:3,vars:5,consts:[["wordCloudContainer",""],["cueResized","",1,"wordcloud-container",3,"resized"],[3,"data","zoomOnHover","width","height","overflow","realignOnResize"],[3,"clicked","data","zoomOnHover","width","height","overflow","realignOnResize"]],template:function(n,i){1&n&&(t.j41(0,"div",1,0),t.bIt("resized",function(r){return i.handleResize(r)}),t.nVh(2,k,1,6,"angular-tag-cloud",2),t.k0s()),2&n&&(t.xc7("display",i.data().length?"block":"none"),t.AVh("clickable",i.clickable()),t.R7$(2),t.vxM(i.data().length?2:-1))},dependencies:[z,F.C],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%;min-height:200px}.wordcloud-container[_ngcontent-%COMP%]{width:100%;height:100%} .wordcloud-container.clickable angular-tag-cloud span{cursor:pointer} .selected{text-decoration:underline}"],changeDetection:0})}return a})();var E=c(5971),A=c(5448),G=c(3319),j=c(4372),$=c(2611),X=c(5661),U=c(1096),H=c(5764),Y=c(2217);let Q=(()=>{class a{suffix=(0,s.vPA)("");iconSize=(0,s.vPA)("xs");agInit(e){this._apply(e)}refresh(e){return this._apply(e),!0}_apply(e){this.suffix.set(e.value||"folder"),this.iconSize.set({xs:"xs",s:"xs",m:"xs",l:"s",xl:"m"}[e.colDef?.cellRendererParams?.iconSize??e.iconSize??"xs"]??"xs")}static \u0275fac=function(n){return new(n||a)};static \u0275cmp=t.VBU({type:a,selectors:[["cue-file-icon-cell-renderer"]],decls:1,vars:2,consts:[[3,"suffix","size"]],template:function(n,i){1&n&&t.nrm(0,"cue-file-icon",0),2&n&&t.Y8G("suffix",i.suffix())("size",i.iconSize())},dependencies:[Y.o],styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:center;width:100%;height:100%}"],changeDetection:0})}return a})();var K=c(6117),Z=c(29),J=c(1951),q=c(1493),w=c(9352),ee=c(5381),te=c(9769),ne=c(5187),ie=c(356),oe=c(6279),se=c(7717),ae=c(7089),le=c(2245);const ce=(a,m)=>m.id;function re(a,m){if(1&a){const e=t.RV6();t.j41(0,"li",9),t.bIt("click",function(){const i=s.eBV(e).$implicit,o=t.XpG(3);return s.Njj(o.handleSimpleRowClick(i))}),t.j41(1,"cue-typography",10),t.EFF(2),t.k0s(),t.j41(3,"cue-typography",11),t.EFF(4),t.k0s()()}if(2&a){const e=m.$implicit,n=t.XpG(3);t.AVh("active",n.selectedSimpleDocumentId()===e.id),t.R7$(),t.Y8G("noWrap",!0)("title",e.name),t.R7$(),t.SpI(" ",e.name," "),t.R7$(2),t.SpI(" ",(e.suffix||"").replace(".","").toUpperCase()," ")}}function de(a,m){if(1&a&&(t.j41(0,"ul",5),t.Z7z(1,re,5,6,"li",8,ce),t.k0s()),2&a){const e=t.XpG(2);t.R7$(),t.Dyx(e.simpleDocumentsInt())}}function ue(a,m){if(1&a&&(t.j41(0,"cue-flexcontainer",6)(1,"cue-typography",12),t.EFF(2),t.k0s()()),2&a){const e=t.XpG(2);t.R7$(2),t.SpI(" ",0===e.documentRefs().length&&0===e.documents().length&&e.handlers()?"No documents":e.infoLoading()," ")}}function he(a,m){if(1&a){const e=t.RV6();t.j41(0,"cue-flexcontainer",7)(1,"cue-typography",13),t.EFF(2),t.k0s(),t.j41(3,"cue-flexcontainer",14)(4,"cue-button",15),t.bIt("click",function(){s.eBV(e);const i=t.XpG(2);return s.Njj(i.previousSimplePage())}),t.nrm(5,"cue-button-icon",16),t.k0s(),t.j41(6,"cue-button",15),t.bIt("click",function(){s.eBV(e);const i=t.XpG(2);return s.Njj(i.nextSimplePage())}),t.nrm(7,"cue-button-icon",17),t.k0s()()()}if(2&a){const e=t.XpG(2);t.R7$(2),t.E5c(" ",e.simpleDisplayStart(),"-",e.simpleDisplayEnd()," / ",e.documentsInt().length," "),t.R7$(2),t.Y8G("disabled",!e.simpleHasPreviousPage()),t.R7$(2),t.Y8G("disabled",!e.simpleHasNextPage())}}function ge(a,m){if(1&a&&(t.j41(0,"div",3),t.nVh(1,de,3,0,"ul",5)(2,ue,3,1,"cue-flexcontainer",6),t.nVh(3,he,8,5,"cue-flexcontainer",7),t.k0s()),2&a){const e=t.XpG();t.R7$(),t.vxM(e.simpleDocumentsInt().length>0?1:2),t.R7$(2),t.vxM(e.documentsInt().length>0?3:-1)}}function me(a,m){if(1&a&&t.nrm(0,"cue-svg-icon",34),2&a){const e=t.XpG().$implicit;t.Y8G("name",e.icon)}}function pe(a,m){if(1&a){const e=t.RV6();t.j41(0,"cue-menu-item",33),t.bIt("click",function(){const i=s.eBV(e).$implicit;return s.Njj(null==i?null:i.action())}),t.nVh(1,me,1,1,"cue-svg-icon",34),t.EFF(2),t.k0s()}if(2&a){const e=m.$implicit;t.R7$(),t.vxM(e.icon?1:-1),t.R7$(),t.SpI(" ",e.label)}}function fe(a,m){if(1&a){const e=t.RV6();t.j41(0,"cue-flexcontainer",24)(1,"cue-menu",25)(2,"cue-button",26,2),t.nrm(4,"cue-button-icon",27),t.k0s(),t.j41(5,"cue-menu-wrap",28),t.Z7z(6,pe,3,2,"cue-menu-item",null,t.Vm6),t.k0s()(),t.j41(8,"cue-button",29),t.nI1(9,"transloco"),t.bIt("click",function(){s.eBV(e);const i=t.XpG(2);return s.Njj(i.flipped.set(!0))}),t.nrm(10,"cue-button-icon",30),t.k0s()(),t.j41(11,"div",31)(12,"cue-ag-grid",32),t.bIt("gridApiReady",function(i){s.eBV(e);const o=t.XpG(2);return s.Njj(o.onGridReady(i))})("selectedRows",function(i){s.eBV(e);const o=t.XpG(2);return s.Njj(o.clickedDocument.emit(i[0]))}),t.k0s()()}if(2&a){const e=t.XpG(2);t.R7$(6),t.Dyx(e.tableMenu()),t.R7$(2),t.Y8G("cueTooltip",t.bMT(9,10,"components.documentList.tooltipColumnSettings")),t.R7$(4),t.AVh("hidden",e.tableHidden()),t.Y8G("paginationPageSize",e.pageSize())("size",e.size())("rowSelection",e.rowSelection)("rowData",e.documentsInt())("columnDefs",e.columnDefs())("overlaySettings",e.overlaySettings())("overlayActions",e.overlayActions())}}function ve(a,m){if(1&a){const e=t.RV6();t.j41(0,"cue-flexcontainer",41),t.bIt("click",function(){s.eBV(e);const i=t.XpG(3);return s.Njj(i.applyTagFilter())}),t.j41(1,"cue-button",42)(2,"cue-button-label"),t.EFF(3,"Apply"),t.k0s()()()}}function _e(a,m){if(1&a){const e=t.RV6();t.j41(0,"cue-flexcontainer",24)(1,"cue-button",35),t.bIt("click",function(){s.eBV(e);const i=t.XpG(2);return s.Njj(i.showFront())}),t.nrm(2,"cue-button-icon",36),t.k0s()(),t.j41(3,"cue-flexcontainer",37)(4,"cue-word-cloud",38),t.bIt("selectionChanged",function(i){s.eBV(e);const o=t.XpG(2);return s.Njj(o.tagSelection.set(i))}),t.k0s(),t.nVh(5,ve,4,0,"cue-flexcontainer",39),t.k0s(),t.j41(6,"cue-ag-grid-column-select",40),t.mxI("columnDefsChange",function(i){s.eBV(e);const o=t.XpG(2);return t.DH7(o.columnDefs,i)||(o.columnDefs=i),s.Njj(i)}),t.k0s()}if(2&a){const e=t.XpG(2);t.R7$(3),t.AVh("hidden",!e.showTagFilterCloud()),t.R7$(),t.Y8G("words",e.tags())("clickable",!0)("overflow",!0)("multiSelect",!0)("highlightSelection",!0),t.R7$(),t.vxM(e.filterToBeApplied()?5:-1),t.R7$(),t.AVh("hidden",e.showTagFilterCloud()),t.Y8G("settings",e.columnSelectSettings),t.R50("columnDefs",e.columnDefs),t.Y8G("columnDefsGross",e.columnDefsGross())}}function Ce(a,m){if(1&a&&(t.j41(0,"cue-card",20),t.eu8(1,43),t.k0s()),2&a){t.XpG();const e=t.sdS(3),n=t.XpG();t.Y8G("variant",n._cardVariant()),t.R7$(),t.Y8G("ngTemplateOutlet",e)}}function De(a,m){if(1&a&&(t.j41(0,"div",21),t.eu8(1,43),t.k0s()),2&a){t.XpG();const e=t.sdS(3);t.R7$(),t.Y8G("ngTemplateOutlet",e)}}function be(a,m){if(1&a&&(t.j41(0,"cue-card",22),t.eu8(1,43),t.k0s()),2&a){t.XpG();const e=t.sdS(5),n=t.XpG();t.Y8G("variant",n._cardVariant()),t.R7$(),t.Y8G("ngTemplateOutlet",e)}}function we(a,m){if(1&a&&(t.j41(0,"div",23),t.eu8(1,43),t.k0s()),2&a){t.XpG();const e=t.sdS(5);t.R7$(),t.Y8G("ngTemplateOutlet",e)}}function xe(a,m){if(1&a){const e=t.RV6();t.j41(0,"div",18),t.mxI("cueFlipChange",function(i){s.eBV(e);const o=t.XpG();return t.DH7(o.flipped,i)||(o.flipped=i),s.Njj(i)}),t.j41(1,"div",19),t.DNE(2,fe,13,12,"ng-template",null,0,t.C5r)(4,_e,7,13,"ng-template",null,1,t.C5r),t.nVh(6,Ce,2,2,"cue-card",20)(7,De,2,1,"div",21),t.nVh(8,be,2,2,"cue-card",22)(9,we,2,1,"div",23),t.k0s()()}if(2&a){const e=t.XpG();t.R50("cueFlip",e.flipped),t.R7$(6),t.vxM("none"!==e.variant()?6:7),t.R7$(2),t.vxM("none"!==e.variant()?8:9)}}let Me=(()=>{class a{documents=(0,l.hFB)([]);availableContentCategories=(0,l.hFB)(void 0);detailedView=(0,l.hFB)(!1);simple=(0,l.hFB)(!1);pageSize=(0,l.hFB)(10);size=(0,l.hFB)("m");prefetchPages=(0,l.hFB)(3);privileges=(0,l.hFB)();showOpenInDocumentViewerAction=(0,l.hFB)(!0);showOpenInFileManagerAction=(0,l.hFB)(!0);customOverlayActions=(0,l.hFB)([]);variant=(0,l.hFB)("default");_cardVariant=(0,h.EW)(()=>this.variant());documentRefs=(0,l.hFB)([]);handlers=(0,l.hFB)(void 0);documentData=(0,l.hFB)({});clickedDocument=(0,l.CGW)();clickedDownloadDocument=(0,l.CGW)();clickedOpenInDir=(0,l.CGW)();clickedOpen=(0,l.CGW)();flipped=(0,s.vPA)(!1);simplePageIndex=(0,s.vPA)(0);selectedSimpleDocumentId=(0,s.vPA)(null);_simpleBufferedUntilIndex=(0,s.vPA)(0);_tableBufferedUntilIndex=(0,s.vPA)(0);_lastDocumentRefsKey="";_gridApi=null;_requestedIds=new Set;_isSorted=!1;_viewportCheckTimerId=null;_lazyMode=(0,h.EW)(()=>this.documentRefs().length>0);_leafContentCategoryIris=(0,h.EW)(()=>{const e=this.availableContentCategories();if(!e)return null;const n=new Set(e.map(i=>i.parent).filter(i=>!!i));return new Set(e.filter(i=>!n.has(i.iri)).map(i=>i.iri))});labelDownload=(0,w.Xx)("components.documentList.labelDownload");labelName=(0,w.Xx)("components.documentList.labelName");labelOpenInFileManager=(0,w.Xx)("components.documentList.labelOpenInFileManager");labelOpenInDocumentViewer=(0,w.Xx)("components.documentList.labelOpenInDocumentViewer");labelSubject=(0,w.Xx)("components.documentList.labelSubject");labelSummary=(0,w.Xx)("components.documentList.labelSummary");labelPages=(0,w.Xx)("components.documentList.labelPages");labelSize=(0,w.Xx)("components.documentList.labelSize");labelCategories=(0,w.Xx)("components.documentList.labelCategories");labelType=(0,w.Xx)("components.documentList.labelType");buttonShowCloudFilter=(0,w.Xx)("components.documentList.buttonShowCloudFilter");buttonHideCloudFilter=(0,w.Xx)("components.documentList.buttonHideCloudFilter");buttonDownloadCSV=(0,w.Xx)("components.documentList.buttonDownloadCSV");infoLoading=(0,w.Xx)("components.documentList.infoLoading");overlaySettings=(0,h.EW)(()=>({...new J.K,mode:"row",buttonVariant:"accent"===this.variant()?"primary":"accent"}));overlayActions=(0,h.EW)(()=>{const e=[{label:this.labelDownload(),icon:"download",action:n=>{this.handlers()?.requestDownload?.(n.rowData),this.clickedDownloadDocument.emit(n.rowData)}}];return this.showOpenInDocumentViewerAction()&&e.push({label:this.labelOpenInDocumentViewer(),icon:"document",action:n=>{const i=n.rowData.contentIRI.split("/").pop()??n.rowData.contentIRI;this.handlers()?.requestOpen?.(i,n.rowData),this.clickedOpen.emit(n.rowData)}}),this.showOpenInFileManagerAction()&&e.push({label:this.labelOpenInFileManager(),icon:"folder",action:n=>{const i=n.rowData.contentIRI.split("/").pop()??n.rowData.contentIRI;this.handlers()?.requestOpenInDir?.(i,n.rowData),this.clickedOpenInDir.emit(n.rowData)}}),[...e,...this.customOverlayActions()||[]]});documentsInt=(0,h.EW)(()=>{let e;if(this._lazyMode()){const n=this.documentRefs(),i=this.documentData()||{};e=n.map(o=>{const r=i[o.id];return r?{...r,pages:o.pages??r.pages,...void 0!==o.sources?{sources:o.sources}:{},...void 0!==o.relevance?{relevance:o.relevance}:{},name:(0,j.M)(r.path),loading:!1}:{id:o.id,path:o.id,suffix:"",size:0,contentIRI:o.id,tags:[],summary:"",categories:[],relevance:o.relevance??0,pages:o.pages,sources:o.sources,name:this.infoLoading(),loading:!0}})}else e=(this.documents()||[]).map(n=>({...n,name:(0,j.M)(n.path),loading:!1}));return this.tagFilter().length?e.filter(n=>n.tags?.some(i=>this.tagFilter().some(o=>o.toLowerCase()===i.toLowerCase()))):e});simplePageCount=(0,h.EW)(()=>Math.max(1,Math.ceil(this.documentsInt().length/Math.max(1,this.pageSize()))));simpleStartIndex=(0,h.EW)(()=>this.simplePageIndex()*Math.max(1,this.pageSize()));simpleEndIndex=(0,h.EW)(()=>this.simpleStartIndex()+Math.max(1,this.pageSize()));simpleDocumentsInt=(0,h.EW)(()=>this.documentsInt().slice(this.simpleStartIndex(),this.simpleEndIndex()));simpleHasPreviousPage=(0,h.EW)(()=>this.simplePageIndex()>0);simpleHasNextPage=(0,h.EW)(()=>this.simplePageIndex()<this.simplePageCount()-1);simpleDisplayStart=(0,h.EW)(()=>this.documentsInt().length?this.simpleStartIndex()+1:0);simpleDisplayEnd=(0,h.EW)(()=>Math.min(this.simpleEndIndex(),this.documentsInt().length));tags=(0,h.EW)(()=>{const e=this.documentsInt(),n=[];return e.forEach(i=>{i.tags?.forEach(o=>n.push(o))}),n});showPageColumn=(0,h.EW)(()=>this.documentsInt().some(e=>void 0!==e.pages));hasSubjects=(0,h.EW)(()=>this.documentsInt().some(e=>void 0!==e.subject&&""!==e.subject));columnSelectSettings=new U.e;columnDefs=(0,s.vPA)([]);columnDefsGross=(0,s.vPA)([]);tagSelection=(0,s.vPA)([]);tagFilter=(0,s.vPA)([]);showTagFilterCloud=(0,s.vPA)(!1);filterToBeApplied=(0,h.EW)(()=>{const e=this.tagSelection(),n=this.tagFilter();return JSON.stringify(e.sort())!==JSON.stringify(n.sort())});tableMenu=(0,h.EW)(()=>{const e=[];return this.showTagFilterCloud()?e.push({icon:"cloud-funnel",label:this.buttonHideCloudFilter(),variant:"accent",action:()=>{this.flipped.set(!1),this.showTagFilterCloud.set(!1)}}):e.push({icon:"cloud-funnel",label:this.buttonShowCloudFilter(),variant:"accent",action:()=>{this.flipped.set(!0),this.showTagFilterCloud.set(!0)}}),e.push({icon:"download",label:this.buttonDownloadCSV(),action:()=>function P(a,m,e="table.csv"){const n=function I(a,m){const e=function d(a,m){return a.map(e=>{const n={};return"id"in e&&(n.id=e.id),"key"in e&&(n.key=e.key),m.forEach(i=>{let o;"function"==typeof i.valueGetter?o=i.valueGetter({data:e,colDef:i,getValue:g=>e[g],node:void 0,column:void 0,api:void 0,context:void 0}):i.field&&(o=e[i.field]),"function"==typeof i.valueFormatter&&(o=i.valueFormatter({value:o,data:e,colDef:i,node:void 0,column:void 0,api:void 0,context:void 0}));const r=i.headerName||i.colId||i.field;void 0!==r&&(n[r]=o)}),n})}(a,m);if(0===e.length)return"";const n=e.some(r=>"id"in r),i=[];n&&i.push("id"),m.forEach(r=>{const g=r.headerName||r.colId||r.field;g&&"id"!==g&&!i.includes(g)&&i.push(g)});const o=e.map(r=>{const g={};return i.forEach(p=>{g[p]=r[p]}),g});return v().unparse(o,{columns:i})}(a,m);(0,O.YN)(n,e,"text/csv")}(this.documentsInt(),this.columnDefs())}),e});hideCloud(){this.flipped.set(!0),this.showTagFilterCloud.set(!0)}tableHidden=(0,h.EW)(()=>this.showTagFilterCloud()||this.flipped());rowSelection={mode:"singleRow",checkboxes:!1,enableClickSelection:!0};whenTableDataKnown=(0,s.QZP)(()=>{this.simple()||this._buildInitialColumnDefs(this.detailedView())});whenSimpleDataChanges=(0,s.QZP)(()=>{const e=this.documentsInt().length,n=Math.max(1,this.pageSize()),i=Math.max(0,Math.ceil(e/n)-1);this.simplePageIndex()>i&&this.simplePageIndex.set(i)});whenRefsChange=(0,s.QZP)(()=>{const n=this.documentRefs().map(i=>i.id).join("|");n!==this._lastDocumentRefsKey&&(this._lastDocumentRefsKey=n,this._requestedIds.clear(),this._simpleBufferedUntilIndex.set(0),this._tableBufferedUntilIndex.set(0),this.simplePageIndex.set(0))});whenSimpleLazyDataNeeded=(0,s.QZP)(()=>{if(!this.simple()||!this._lazyMode()||!this.handlers())return;const e=this.documentRefs();if(!e.length)return;const n=Math.max(1,this.pageSize()),o=n*Math.max(1,this.prefetchPages()),r=e.length,g=this.simpleStartIndex(),p=Math.min(r,g+n),u=this._simpleBufferedUntilIndex();let f=null;if(0===u?f=0:(g>=Math.max(0,u-n)||p>u)&&(f=u),null===f||f>=r)return;const b=Math.min(r,f+o),C=e.slice(f,b).map(_=>_.id).filter(_=>!this._requestedIds.has(_));this._simpleBufferedUntilIndex.set(Math.max(u,b)),C.length&&(C.forEach(_=>this._requestedIds.add(_)),setTimeout(()=>this.handlers()?.requestData(C)))});previousSimplePage(){this.simpleHasPreviousPage()&&this.simplePageIndex.update(e=>Math.max(0,e-1))}nextSimplePage(){this.simpleHasNextPage()&&this.simplePageIndex.update(e=>Math.min(this.simplePageCount()-1,e+1))}handleSimpleRowClick(e){this.selectedSimpleDocumentId.set(e.id),this.handleRowClick(e)}handleRowClick(e){var n=this;return(0,y.A)(function*(){n.clickedDocument.emit(e),window.cueDetachCellOverlay&&window.cueDetachCellOverlay(),n.overlayVisible&&"function"==typeof n.overlayVisible.set&&n.overlayVisible.set(!1)})()}showFront(){this.flipped.set(!1),this.showTagFilterCloud.set(!1)}applyTagFilter(){this.tagFilter.set(this.tagSelection()),this.flipped.set(!1),this.showTagFilterCloud.set(!1)}ngOnDestroy(){null!==this._viewportCheckTimerId&&(clearTimeout(this._viewportCheckTimerId),this._viewportCheckTimerId=null),this._gridApi=null}onGridReady(e){this._gridApi=e,e.addEventListener("viewportChanged",()=>this._checkViewport()),e.addEventListener("modelUpdated",()=>this._checkViewport()),e.addEventListener("paginationChanged",()=>this._checkViewport()),e.addEventListener("sortChanged",()=>{const n=e.getColumnState();this._isSorted=n.some(i=>null!=i.sort),this._isSorted&&this._requestAllUnloaded()}),this._viewportCheckTimerId=setTimeout(()=>{this._viewportCheckTimerId=null,this._checkViewport()},100)}_checkViewport(){if(!this._gridApi||this._gridApi.isDestroyed()||!this._lazyMode())return;if(this._isSorted)return void this._requestAllUnloaded();const e=this.documentRefs(),n=e.length;if(!n)return;const i=Math.max(1,this._gridApi.paginationGetPageSize?.()??10),r=Math.max(0,this._gridApi.paginationGetCurrentPage?.()??0)*i,g=Math.min(n,r+i),p=this._tableBufferedUntilIndex();let u=null;if(0===p?u=0:(r>=Math.max(0,p-i)||g>p)&&(u=p),null===u||u>=n)return;const f=i*Math.max(1,this.prefetchPages()),b=Math.min(n,u+f),C=e.slice(u,b).map(_=>_.id).filter(_=>!this._requestedIds.has(_));this._tableBufferedUntilIndex.set(Math.max(p,b)),C.length&&(C.forEach(_=>this._requestedIds.add(_)),setTimeout(()=>this.handlers()?.requestData(C)))}_requestAllUnloaded(){if(!this._gridApi||this._gridApi.isDestroyed()||!this._lazyMode())return;const e=[];if(this._gridApi.forEachNode(n=>{const i=n.data;i?.loading&&!this._requestedIds.has(i.contentIRI)&&e.push(i.contentIRI)}),e.length>0){const n=Array.from(new Set(e));n.forEach(i=>this._requestedIds.add(i)),setTimeout(()=>this.handlers()?.requestData(n))}}_buildInitialColumnDefs(e){const n=[],i=[];n.push({field:"name",headerName:this.labelName(),width:e?250:120,filter:!0,valueGetter:p=>!p.data?.name&&p.data?.loading?"Loading...":p.data?.name||p.data?.contentIRI}),this.hasSubjects()&&n.push({field:"subject",headerName:this.labelSubject(),flex:1,filter:!0,cellRenderer:H.l,cellRendererParams:{lineHeight:"1.8"},autoHeight:!0});const o={field:"summary",headerName:this.labelSummary(),flex:1,filter:!0,cellRenderer:H.l,cellRendererParams:{lineHeight:"1.8"},autoHeight:!0};this.detailedView()||(o.tooltipField="summary"),e?n.push(o):i.push(o),this.showPageColumn()&&n.push({field:"pages",headerName:this.labelPages(),width:100,filter:!0,valueGetter:p=>Array.isArray(p.data?.pages)?p.data.pages.map(u=>u.page).join(", "):""});const r={field:"size",headerName:this.labelSize(),width:100,filter:!0,valueGetter:p=>(0,q.b)(p.data?.size||0)};e?n.push(r):i.push(r);const g={field:"categories",headerName:this.labelCategories(),width:120,filter:!0,valueGetter:p=>{const u=p.data?.categories||[],f=this._leafContentCategoryIris(),b=f?u.filter(_=>f.has(_)):u,C=b.slice(0,3).map(_=>this._getContentCategoryLabel(_)).join(", ");return b.length>3?`${C}...`:C}};e?n.push(g):i.push(g),n.push({field:"suffix",headerName:this.labelType(),width:80,filter:!0,headerClass:"header-align-right",cellStyle:{display:"flex",justifyContent:"flex-end"},cellRenderer:Q}),this.columnDefs.update(()=>[...n]),this.columnDefsGross.update(()=>[...n,...i])}_getContentCategoryLabel(e){const n=this.availableContentCategories();if(void 0!==n){const i=n.find(o=>o.iri===e);if(i)return i.label;console.warn(`No label found for content category IRI: ${e}`)}else console.warn("No availableContentCategories provided to DocumentList component");return(a=>{const m=a.split("#").pop()??a,e={AgreementDocument:"Agreement",ArchitecturalDesignDocument:"Architectural Design",AsBuiltDocument:"As-Built",BudgetEstimateDocument:"Budget Estimate",CertificationDocument:"Certification",ComplianceDocument:"Compliance",CorrespondenceDocument:"Correspondence",ConstructionContract:"Construction Contract",ConstructionProcessDocument:"Construction Process",ContractCondition:"Contract Condition",ContractRole:"Contract Role",ContractualDocument:"Contract",CostControlDocument:"Cost Control",DesignDocument:"Design Document",EmailAddress:"Email Address",EngineeringDesignDocument:"Engineering Design",FinancialAdministrativeDocument:"Financial/Administrative",FunctionalRequirementsDocument:"Functional Requirements",InspectionDocument:"Inspection",InsuranceBondDocument:"Insurance/Bond",InteriorDesignDocument:"Interior Design",MarketingCloseoutDocument:"Marketing Closeout",MiscDocument:"Miscellaneous",OperationManual:"Operation Manual",OperationsMaintenanceDocument:"Operations & Maintenance",OperationsManualDocument:"Operations Manual",OtherDocument:"Other",OtherContent:"Other Content",ProgressStatusReport:"Progress Status Report",QualityAssuranceDocument:"Quality Assurance",QualityControlDocument:"Quality Control",RegulatoryComplianceDocument:"Regulatory Compliance",SafetyDocument:"Safety",ScheduleDocument:"Schedule",SiteAssessmentDocument:"Site Assessment",TechnicalRequirementsDocument:"Technical Requirements",TechnicalSpecificationDocument:"Technical Specification",TenderingDocument:"Tendering Document",TermsAndConditionsDocument:"Terms & Conditions"};return void 0===e[m]&&console.log(`No pretty label for category: ${m}`),e[m]??m})(e)}static \u0275fac=function(n){return new(n||a)};static \u0275cmp=t.VBU({type:a,selectors:[["cue-doc-list"]],inputs:{documents:[1,"documents"],availableContentCategories:[1,"availableContentCategories"],detailedView:[1,"detailedView"],simple:[1,"simple"],pageSize:[1,"pageSize"],size:[1,"size"],prefetchPages:[1,"prefetchPages"],privileges:[1,"privileges"],showOpenInDocumentViewerAction:[1,"showOpenInDocumentViewerAction"],showOpenInFileManagerAction:[1,"showOpenInFileManagerAction"],customOverlayActions:[1,"customOverlayActions"],variant:[1,"variant"],documentRefs:[1,"documentRefs"],handlers:[1,"handlers"],documentData:[1,"documentData"]},outputs:{clickedDocument:"clickedDocument",clickedDownloadDocument:"clickedDownloadDocument",clickedOpenInDir:"clickedOpenInDir",clickedOpen:"clickedOpen"},decls:2,vars:1,consts:[["frontContent",""],["backContent",""],["trigger",""],[1,"simple-container",2,"width","100%","height","auto"],[1,"flip-card",2,"width","100%","height","auto","overflow","hidden",3,"cueFlip"],[1,"simple-list"],["justify","center",1,"simple-empty"],["direction","row","justify","space-between","align","center",2,"padding","4px 8px"],[1,"simple-item",3,"active"],[1,"simple-item",3,"click"],["size","s",1,"simple-item-name",3,"noWrap","title"],["size","xs",1,"simple-item-meta"],["size","s"],["size","xs"],["direction","row","gap","s"],["size","xs","variant","tertiary",3,"click","disabled"],["icon","paginator-back"],["icon","paginator-next"],[1,"flip-card",2,"width","100%","height","auto","overflow","hidden",3,"cueFlipChange","cueFlip"],[1,"flip-content"],[1,"card-face","front",2,"width","100%","height","auto",3,"variant"],[1,"card-face","front",2,"width","100%","height","auto"],[1,"card-face","back",2,"width","100%","height","auto",3,"variant"],[1,"card-face","back",2,"width","100%","height","auto"],["direction","row","justify","end",2,"padding","2px"],["positioning","bottomleft"],["trigger","","variant","tertiary","size","s"],["icon","more-vert"],["menu",""],["variant","accent","size","s",3,"click","cueTooltip"],["icon","settings"],[2,"position","relative"],[3,"gridApiReady","selectedRows","paginationPageSize","size","rowSelection","rowData","columnDefs","overlaySettings","overlayActions"],[3,"click"],["before","",3,"name"],["variant","accent","size","s","cueTooltip","Back to table",3,"click"],["icon","arrow-back"],["justify","center",2,"height","350px"],[2,"height","100%","width","100%",3,"selectionChanged","words","clickable","overflow","multiSelect","highlightSelection"],["justify","center",1,"word-cloud-actions"],[3,"columnDefsChange","settings","columnDefs","columnDefsGross"],["justify","center",1,"word-cloud-actions",3,"click"],["variant","primary"],[3,"ngTemplateOutlet"]],template:function(n,i){1&n&&t.nVh(0,ge,4,2,"div",3)(1,xe,10,3,"div",4),2&n&&t.vxM(i.simple()?0:1)},dependencies:[ee.FlexContainer,B,E.Button,A.ButtonLabel,se.R,ne.Card,te.T3,G.ButtonIcon,$.R,X.pL,ie.M,oe.D,K.W,Z.A,ae.d,le.Typography,w.Kj],styles:[".hidden[_ngcontent-%COMP%]{display:none}.word-cloud-actions[_ngcontent-%COMP%]{position:absolute;z-index:10;right:0;left:0;bottom:10px;pointer-events:none}.word-cloud-actions[_ngcontent-%COMP%] cue-button[_ngcontent-%COMP%]{pointer-events:auto}.simple-container[_ngcontent-%COMP%]{width:100%}.simple-list[_ngcontent-%COMP%]{list-style:none;margin:0;padding:4px;max-height:420px;overflow-y:auto}.simple-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px;padding:9px 10px;border-radius:6px;cursor:pointer;transition:background .1s}.simple-item[_ngcontent-%COMP%]:hover{background:var(--cue-color-ultralightgray)}.simple-item.active[_ngcontent-%COMP%]{background:var(--cue-color-lightgray)}.simple-item-name[_ngcontent-%COMP%]{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.simple-item-meta[_ngcontent-%COMP%]{font-size:11px;color:var(--cue-color-midgray)}.simple-empty[_ngcontent-%COMP%]{padding:12px}"],changeDetection:0})}return a})()},4372(N,S,c){c.d(S,{M:()=>y});const y=l=>{const h=l.split("/");return h[h.length-1]}},2217(N,S,c){c.d(S,{o:()=>P});var y=c(7705),l=c(2271),h=c(2245),s=c(5547),O=c(5802);function D(t,R){if(1&t&&(O.qSk(),s.j41(0,"svg",0),s.nrm(1,"path",3)(2,"path",4),s.k0s()),2&t){const M=s.XpG();s.R7$(),s.BMQ("fill",M.colorDark()),s.R7$(),s.BMQ("fill",M.color())}}function v(t,R){if(1&t&&(O.qSk(),s.j41(0,"svg",1),s.nrm(1,"path",5)(2,"path",6)(3,"path",7),s.k0s()),2&t){const M=s.XpG();s.R7$(2),s.BMQ("fill",M.color())}}const d_blue="#175EBB",I={".dwg":d_blue,".dxf":d_blue,".doc":d_blue,".docx":d_blue,".ifc":"#9F388D",".pdf":"#E03833",".ppt":d_blue,".pptx":d_blue,".csv":"#0b7741",".xls":"#0b7741",".xlsx":"#0b7741",folder:"#9D9998"};let P=(()=>{class t{suffix=y.hFB.required();size=(0,y.hFB)("m");color=(0,l.EW)(()=>I[this.suffix()]??"#9D9998");label=(0,l.EW)(()=>this.suffix().startsWith(".")?this.suffix().toUpperCase().replace(/^\./,""):"");className=(0,l.EW)(()=>`size-${this.size()}`);colorDark=(0,l.EW)(()=>{const M=this.color(),x=parseInt(M.slice(1),16),F=x>>8&255,T=255&x;return`#${(Math.floor(.8*(x>>16&255))<<16|Math.floor(.8*F)<<8|Math.floor(.8*T)).toString(16).padStart(6,"0")}`});static \u0275fac=function(x){return new(x||t)};static \u0275cmp=s.VBU({type:t,selectors:[["cue-file-icon"]],hostVars:2,hostBindings:function(x,z){2&x&&s.HbH(z.className())},inputs:{suffix:[1,"suffix"],size:[1,"size"]},decls:4,vars:2,consts:[["xmlns","http://www.w3.org/2000/svg","width","100%","height","100%","viewBox","0 0 48 48"],["xmlns","http://www.w3.org/2000/svg","viewBox","0 0 24 30"],["size","xs","align","center","weight","semibold"],["d","M40 12H22l-4-4H8c-2.2 0-4 1.8-4 4v8h40v-4c0-2.2-1.8-4-4-4"],["d","M40 12H8c-2.2 0-4 1.8-4 4v20c0 2.2 1.8 4 4 4h32c2.2 0 4-1.8 4-4V16c0-2.2-1.8-4-4-4"],["fill","var(--cue-border-color)","d","M16.2.5H4.1C2.1.5.5 2.1.5 4.1v22.3c0 1.7 1.4 3.1 3.1 3.1h16.8c1.7 0 3.1-1.4 3.1-3.1V7.8h-.1c0-.1-7-7.1-7-7.1h-.1l-.1-.2Z"],["d","M4.1 1C2.4 1 1 2.4 1 4.1v22.3C1 27.8 2.2 29 3.6 29h16.8c1.4 0 2.6-1.2 2.6-2.6V8l-7-7H4.1Z"],["fill","#fff","d","M16 6c0 1.1.9 2 2 2h5l-7-7v5Z","opacity",".3"]],template:function(x,z){1&x&&(s.nVh(0,D,3,2,":svg:svg",0)(1,v,4,1,":svg:svg",1),s.j41(2,"cue-typography",2),s.EFF(3),s.k0s()),2&x&&(s.vxM("folder"===z.suffix()?0:1),s.R7$(3),s.JRh(z.label()))},dependencies:[h.Typography],styles:["[_nghost-%COMP%]{display:block;position:relative;aspect-ratio:30 / 24;width:var(--cue-dim-elem-m)}.size-xs[_nghost-%COMP%]{width:var(--cue-dim-elem-xs)}.size-s[_nghost-%COMP%]{width:var(--cue-dim-elem-s)}[_nghost-%COMP%] svg[_ngcontent-%COMP%]{display:block;width:100%;height:auto}[_nghost-%COMP%] cue-typography[_ngcontent-%COMP%]{color:#fff;text-transform:uppercase;position:absolute;left:50%;bottom:24%;transform:translate(-50%)}"]})}return t})()},2065(N,S,c){function h(D,v,d="text/plain"){return function y(D,v="data.zip"){const d=document.createElement("a"),I=URL.createObjectURL(D);d.href=I,d.download=v,document.body.appendChild(d),d.click(),document.body.removeChild(d),URL.revokeObjectURL(I)}(new Blob([D],{type:d}),v)}function s(D,v){const d=document.createElement("a");d.style.display="hidden",d.setAttribute("href",window.URL.createObjectURL(D)),d.setAttribute("download",v),document.body.appendChild(d),d.click(),d.remove()}c.d(S,{KE:()=>s,YN:()=>h})},1493(N,S,c){function y(l,h=!1,s=1){const O=h?1e3:1024;if(Math.abs(l)<O)return l+" B";const D=h?["kB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let v=-1;const d=10**s;do{l/=O,++v}while(Math.round(Math.abs(l)*d)/d>=O&&v<D.length-1);return l.toFixed(s)+" "+D[v]}c.d(S,{b:()=>y})}}]);
|
package/7284.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[7284],{7284(ge,Ce,Ee){var ae,oe;ae=function ce(){"use strict";var w=function(){return typeof self<"u"?self:typeof window<"u"?window:typeof w<"u"?w:{}}();var $=!w.document&&!!w.postMessage,fe=w.IS_PAPA_WORKER||!1,he={},be=0,l={parse:function Se(e,t){var r=(t=t||{}).dynamicTyping||!1;if(g(r)&&(t.dynamicTypingFunction=r,r={}),t.dynamicTyping=r,t.transform=!!g(t.transform)&&t.transform,t.worker&&l.WORKERS_SUPPORTED){var s=function Oe(){if(!l.WORKERS_SUPPORTED)return!1;var e=function Re(){var e=w.URL||w.webkitURL||null,t=ce.toString();return l.BLOB_URL||(l.BLOB_URL=e.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ","(",t,")();"],{type:"text/javascript"})))}(),t=new w.Worker(e);return t.onmessage=xe,t.id=be++,he[t.id]=t,t}();return s.userStep=t.step,s.userChunk=t.chunk,s.userComplete=t.complete,s.userError=t.error,t.step=g(t.step),t.chunk=g(t.chunk),t.complete=g(t.complete),t.error=g(t.error),delete t.worker,void s.postMessage({input:e,config:t,workerId:s.id})}var n=null;return e===l.NODE_STREAM_INPUT&&typeof PAPA_BROWSER_CONTEXT>"u"?(n=new re(t)).getStream():("string"==typeof e?(e=function p(h){return 65279===h.charCodeAt(0)?h.slice(1):h}(e),n=t.download?new G(t):new Y(t)):!0===e.readable&&g(e.read)&&g(e.on)?n=new te(t):(w.File&&e instanceof File||e instanceof Object)&&(n=new ee(t)),n.stream(e))},unparse:function we(e,t){var r=!1,s=!0,n=",",p="\r\n",h='"',i=h+h,y=!1,E=null,O=!1;!function L(){if("object"==typeof t){if("string"==typeof t.delimiter&&!l.BAD_DELIMITERS.filter(function(v){return-1!==t.delimiter.indexOf(v)}).length&&(n=t.delimiter),("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(r=t.quotes),("boolean"==typeof t.skipEmptyLines||"string"==typeof t.skipEmptyLines)&&(y=t.skipEmptyLines),"string"==typeof t.newline&&(p=t.newline),"string"==typeof t.quoteChar&&(h=t.quoteChar),"boolean"==typeof t.header&&(s=t.header),Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");E=t.columns}void 0!==t.escapeChar&&(i=t.escapeChar+h),t.escapeFormulae instanceof RegExp?O=t.escapeFormulae:"boolean"==typeof t.escapeFormulae&&t.escapeFormulae&&(O=/^[=+\-@\t\r].*$/)}}();var d=new RegExp(se(h),"g");if("string"==typeof e&&(e=JSON.parse(e)),Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return o(null,e,y);if("object"==typeof e[0])return o(E||Object.keys(e[0]),e,y)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields||E),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),!Array.isArray(e.data[0])&&"object"!=typeof e.data[0]&&(e.data=[e.data])),o(e.fields||[],e.data||[],y);throw new Error("Unable to serialize unrecognized input");function o(v,_,b){var S="";"string"==typeof v&&(v=JSON.parse(v)),"string"==typeof _&&(_=JSON.parse(_));var M=Array.isArray(v)&&v.length>0,A=!Array.isArray(_[0]);if(M&&s){for(var W=0;W<v.length;W++)W>0&&(S+=n),S+=c(v[W],W);_.length>0&&(S+=p)}for(var k=0;k<_.length;k++){var U=M?v.length:_[k].length,z=!1,u=M?0===Object.keys(_[k]).length:0===_[k].length;if(b&&!M&&(z="greedy"===b?""===_[k].join("").trim():1===_[k].length&&0===_[k][0].length),"greedy"===b&&M){for(var f=[],m=0;m<U;m++)f.push(_[k][A?v[m]:m]);z=""===f.join("").trim()}if(!z){for(var a=0;a<U;a++)a>0&&!u&&(S+=n),S+=c(_[k][M&&A?v[a]:a],a);k<_.length-1&&(!b||U>0&&!u)&&(S+=p)}}return S}function c(v,_){if(typeof v>"u"||null===v)return"";if(v.constructor===Date)return JSON.stringify(v).slice(1,25);var b=!1;O&&"string"==typeof v&&O.test(v)&&(v="'"+v,b=!0);var S=v.toString().replace(d,i);return(b=b||!0===r||"function"==typeof r&&r(v,_)||Array.isArray(r)&&r[_]||function Q(v,_){for(var b=0;b<_.length;b++)if(v.indexOf(_[b])>-1)return!0;return!1}(S,l.BAD_DELIMITERS)||S.indexOf(n)>-1||" "===S.charAt(0)||" "===S.charAt(S.length-1))?h+S+h:S}},RECORD_SEP:"\x1e",UNIT_SEP:"\x1f",BYTE_ORDER_MARK:"\ufeff"};if(l.BAD_DELIMITERS=["\r","\n",'"',l.BYTE_ORDER_MARK],l.WORKERS_SUPPORTED=!$&&!!w.Worker,l.NODE_STREAM_INPUT=1,l.LocalChunkSize=10485760,l.RemoteChunkSize=5242880,l.DefaultDelimiter=",",l.Parser=le,l.ParserHandle=me,l.NetworkStreamer=G,l.FileStreamer=ee,l.StringStreamer=Y,l.ReadableStreamStreamer=te,typeof PAPA_BROWSER_CONTEXT>"u"&&(l.DuplexStreamStreamer=re),w.jQuery){var V=w.jQuery;V.fn.parse=function(e){var t=e.config||{},r=[];return this.each(function(h){if("INPUT"!==V(this).prop("tagName").toUpperCase()||"file"!==V(this).attr("type").toLowerCase()||!w.FileReader||!this.files||0===this.files.length)return!0;for(var y=0;y<this.files.length;y++)r.push({file:this.files[y],inputElem:this,instanceConfig:V.extend({},t)})}),s(),this;function s(){if(0!==r.length){var h=r[0];if(g(e.before)){var i=e.before(h.file,h.inputElem);if("object"==typeof i){if("abort"===i.action)return void function n(h,i,y,E){g(e.error)&&e.error({name:h},i,y,E)}("AbortError",h.file,h.inputElem,i.reason);if("skip"===i.action)return void p();"object"==typeof i.config&&(h.instanceConfig=V.extend(h.instanceConfig,i.config))}else if("skip"===i)return void p()}var y=h.instanceConfig.complete;h.instanceConfig.complete=function(E){g(y)&&y(E,h.file,h.inputElem),p()},l.parse(h.file,h.instanceConfig)}else g(e.complete)&&e.complete()}function p(){r.splice(0,1),s()}}}function q(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function t(r){var s=ue(r);s.chunkSize=parseInt(s.chunkSize),!r.step&&!r.chunk&&(s.chunkSize=null),this._handle=new me(s),this._handle.streamer=this,this._config=s}.call(this,e),this.parseChunk=function(r,s){const n=parseInt(this._config.skipFirstNLines)||0;if(this.isFirstChunk&&n>0){let O=this._config.newline;O||(O=this._handle.guessLineEndings(r,this._config.quoteChar||'"')),r=[...r.split(O).slice(n)].join(O)}if(this.isFirstChunk&&g(this._config.beforeFirstChunk)){var p=this._config.beforeFirstChunk(r);void 0!==p&&(r=p)}this.isFirstChunk=!1,this._halted=!1;var h=this._partialLine+r;this._partialLine="";var i=this._handle.parse(h,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var y=i.meta.cursor;this._finished||(this._partialLine=h.substring(y-this._baseIndex),this._baseIndex=y),i&&i.data&&(this._rowCount+=i.data.length);var E=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(fe)w.postMessage({results:i,workerId:l.WORKER_ID,finished:E});else if(g(this._config.chunk)&&!s){if(this._config.chunk(i,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);i=void 0,this._completeResults=void 0}return!this._config.step&&!this._config.chunk&&(this._completeResults.data=this._completeResults.data.concat(i.data),this._completeResults.errors=this._completeResults.errors.concat(i.errors),this._completeResults.meta=i.meta),!this._completed&&E&&g(this._config.complete)&&(!i||!i.meta.aborted)&&(this._config.complete(this._completeResults,this._input),this._completed=!0),!E&&(!i||!i.meta.paused)&&this._nextChunk(),i}this._halted=!0},this._sendError=function(r){g(this._config.error)?this._config.error(r):fe&&this._config.error&&w.postMessage({workerId:l.WORKER_ID,error:r,finished:!1})}}function G(e){var t;(e=e||{}).chunkSize||(e.chunkSize=l.RemoteChunkSize),q.call(this,e),this._nextChunk=$?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(s){this._input=s,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(t=new XMLHttpRequest,this._config.withCredentials&&(t.withCredentials=this._config.withCredentials),$||(t.onload=F(this._chunkLoaded,this),t.onerror=F(this._chunkError,this)),t.open(this._config.downloadRequestBody?"POST":"GET",this._input,!$),this._config.downloadRequestHeaders){var s=this._config.downloadRequestHeaders;for(var n in s)t.setRequestHeader(n,s[n])}this._config.chunkSize&&t.setRequestHeader("Range","bytes="+this._start+"-"+(this._start+this._config.chunkSize-1));try{t.send(this._config.downloadRequestBody)}catch(h){this._chunkError(h.message)}$&&0===t.status&&this._chunkError()}},this._chunkLoaded=function(){if(4===t.readyState){if(t.status<200||t.status>=400)return void this._chunkError();this._start+=this._config.chunkSize?this._config.chunkSize:t.responseText.length,this._finished=!this._config.chunkSize||this._start>=function r(s){var n=s.getResponseHeader("Content-Range");return null===n?-1:parseInt(n.substring(n.lastIndexOf("/")+1))}(t),this.parseChunk(t.responseText)}},this._chunkError=function(s){this._sendError(new Error(t.statusText||s))}}function ee(e){(e=e||{}).chunkSize||(e.chunkSize=l.LocalChunkSize),q.call(this,e);var t,r,s=typeof FileReader<"u";this.stream=function(n){this._input=n,r=n.slice||n.webkitSlice||n.mozSlice,s?((t=new FileReader).onload=F(this._chunkLoaded,this),t.onerror=F(this._chunkError,this)):t=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){!this._finished&&(!this._config.preview||this._rowCount<this._config.preview)&&this._readChunk()},this._readChunk=function(){var n=this._input;if(this._config.chunkSize){var p=Math.min(this._start+this._config.chunkSize,this._input.size);n=r.call(n,this._start,p)}var h=t.readAsText(n,this._config.encoding);s||this._chunkLoaded({target:{result:h}})},this._chunkLoaded=function(n){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(n.target.result)},this._chunkError=function(){this._sendError(t.error)}}function Y(e){var t;q.call(this,e=e||{}),this.stream=function(r){return t=r,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var s,r=this._config.chunkSize;return r?(s=t.substring(0,r),t=t.substring(r)):(s=t,t=""),this._finished=!t,this.parseChunk(s)}}}function te(e){q.call(this,e=e||{});var t=[],r=!0,s=!1;this.pause=function(){q.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){q.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(n){this._input=n,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){s&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):r=!0},this._streamData=F(function(n){try{t.push("string"==typeof n?n:n.toString(this._config.encoding)),r&&(r=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(p){this._streamError(p)}},this),this._streamError=F(function(n){this._streamCleanUp(),this._sendError(n)},this),this._streamEnd=F(function(){this._streamCleanUp(),s=!0,this._streamData("")},this),this._streamCleanUp=F(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function re(e){var t=Ee(6266).Duplex,r=ue(e),s=!0,n=!1,p=[],h=null;this._onCsvData=function(i){!h.push(i.data)&&!this._handle.paused()&&this._handle.pause()},this._onCsvComplete=function(){h.push(null)},r.step=F(this._onCsvData,this),r.complete=F(this._onCsvComplete,this),q.call(this,r),this._nextChunk=function(){n&&1===p.length&&(this._finished=!0),p.length?p.shift()():s=!0},this._addToParseQueue=function(i,y){p.push(F(function(){if(this.parseChunk("string"==typeof i?i:i.toString(r.encoding)),g(y))return y()},this)),s&&(s=!1,this._nextChunk())},this._onRead=function(){this._handle.paused()&&this._handle.resume()},this._onWrite=function(i,y,E){this._addToParseQueue(i,E)},this._onWriteComplete=function(){n=!0,this._addToParseQueue("")},this.getStream=function(){return h},(h=new t({readableObjectMode:!0,decodeStrings:!1,read:F(this._onRead,this),write:F(this._onWrite,this)})).once("finish",F(this._onWriteComplete,this))}function me(e){var y,E,L,t=Math.pow(2,53),r=-t,s=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,n=/^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/,p=this,h=0,i=0,O=!1,d=!1,o=[],c={data:[],errors:[],meta:{}};if(g(e.step)){var Q=e.step;e.step=function(u){if(c=u,S())b();else{if(b(),0===c.data.length)return;h+=u.data.length,e.preview&&h>e.preview?E.abort():(c.data=c.data[0],Q(c,p))}}}function v(u){return"greedy"===e.skipEmptyLines?""===u.join("").trim():1===u.length&&0===u[0].length}function b(){return c&&L&&(z("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+l.DefaultDelimiter+"'"),L=!1),e.skipEmptyLines&&(c.data=c.data.filter(function(u){return!v(u)})),S()&&function M(){if(c)if(Array.isArray(c.data[0])){for(var f=0;S()&&f<c.data.length;f++)c.data[f].forEach(u);c.data.splice(0,1)}else c.data.forEach(u);function u(m,R){g(e.transformHeader)&&(m=e.transformHeader(m,R)),o.push(m)}}(),function k(){if(!c||!e.header&&!e.dynamicTyping&&!e.transform)return c;function u(m,R){var C,a=e.header?{}:[];for(C=0;C<m.length;C++){var T=C,x=m[C];e.header&&(T=C>=o.length?"__parsed_extra":o[C]),e.transform&&(x=e.transform(x,T)),x=W(T,x),"__parsed_extra"===T?(a[T]=a[T]||[],a[T].push(x)):a[T]=x}return e.header&&(C>o.length?z("FieldMismatch","TooManyFields","Too many fields: expected "+o.length+" fields but parsed "+C,i+R):C<o.length&&z("FieldMismatch","TooFewFields","Too few fields: expected "+o.length+" fields but parsed "+C,i+R)),a}var f=1;return!c.data.length||Array.isArray(c.data[0])?(c.data=c.data.map(u),f=c.data.length):c.data=u(c.data,0),e.header&&c.meta&&(c.meta.fields=o),i+=f,c}()}function S(){return e.header&&0===o.length}function W(u,f){return function A(u){return e.dynamicTypingFunction&&void 0===e.dynamicTyping[u]&&(e.dynamicTyping[u]=e.dynamicTypingFunction(u)),!0===(e.dynamicTyping[u]||e.dynamicTyping)}(u)?"true"===f||"TRUE"===f||"false"!==f&&"FALSE"!==f&&(function _(u){if(s.test(u)){var f=parseFloat(u);if(f>r&&f<t)return!0}return!1}(f)?parseFloat(f):n.test(f)?new Date(f):""===f?null:f):f}function z(u,f,m,R){var a={type:u,code:f,message:m};void 0!==R&&(a.row=R),c.errors.push(a)}this.parse=function(u,f,m){if(e.newline||(e.newline=this.guessLineEndings(u,e.quoteChar||'"')),L=!1,e.delimiter)g(e.delimiter)&&(e.delimiter=e.delimiter(u),c.meta.delimiter=e.delimiter);else{var a=function U(u,f,m,R,a){var C,T,x,J;a=a||[",","\t","|",";",l.RECORD_SEP,l.UNIT_SEP];for(var j=0;j<a.length;j++){var ie=a[j],X=0,K=0,I=0;x=void 0;for(var H=new le({comments:R,delimiter:ie,newline:f,preview:10}).parse(u),D=0;D<H.data.length;D++)if(m&&v(H.data[D]))I++;else{var P=H.data[D].length;K+=P,typeof x>"u"?x=P:P>0&&(X+=Math.abs(P-x),x=P)}H.data.length>0&&(K/=H.data.length-I),(typeof T>"u"||X<=T)&&(typeof J>"u"||K>J)&&K>1.99&&(T=X,C=ie,J=K)}return e.delimiter=C,{successful:!!C,bestDelimiter:C}}(u,e.newline,e.skipEmptyLines,e.comments,e.delimitersToGuess);a.successful?e.delimiter=a.bestDelimiter:(L=!0,e.delimiter=l.DefaultDelimiter),c.meta.delimiter=e.delimiter}var C=ue(e);return e.preview&&e.header&&C.preview++,y=u,E=new le(C),c=E.parse(y,f,m),b(),O?{meta:{paused:!0}}:c||{meta:{paused:!1}}},this.paused=function(){return O},this.pause=function(){O=!0,E.abort(),y=g(e.chunk)?"":y.substring(E.getCharIndex())},this.resume=function(){p.streamer._halted?(O=!1,p.streamer.parseChunk(y,!0)):setTimeout(p.resume,3)},this.aborted=function(){return d},this.abort=function(){d=!0,E.abort(),c.meta.aborted=!0,g(e.complete)&&e.complete(c),y=""},this.guessLineEndings=function(u,f){u=u.substring(0,1048576);var m=new RegExp(se(f)+"([^]*?)"+se(f),"gm"),R=(u=u.replace(m,"")).split("\r"),a=u.split("\n");if(1===R.length||a.length>1&&a[0].length<R[0].length)return"\n";for(var T=0,x=0;x<R.length;x++)"\n"===R[x][0]&&T++;return T>=R.length/2?"\r\n":"\r"}}function se(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function le(e){var i,t=(e=e||{}).delimiter,r=e.newline,s=e.comments,n=e.step,p=e.preview,h=e.fastMode,y=null,E=!1,O=i=null==e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&(O=e.escapeChar),("string"!=typeof t||l.BAD_DELIMITERS.indexOf(t)>-1)&&(t=","),s===t)throw new Error("Comment character same as delimiter");!0===s?s="#":("string"!=typeof s||l.BAD_DELIMITERS.indexOf(s)>-1)&&(s=!1),"\n"!==r&&"\r"!==r&&"\r\n"!==r&&(r="\n");var d=0,L=!1;this.parse=function(o,c,Q){if("string"!=typeof o)throw new Error("Input must be a string");var v=o.length,_=t.length,b=r.length,S=s.length,M=g(n);d=0;var A=[],W=[],k=[],U=0;if(!o)return I();if(h||!1!==h&&-1===o.indexOf(i)){for(var z=o.split(r),u=0;u<z.length;u++){if(d+=(k=z[u]).length,u!==z.length-1)d+=r.length;else if(Q)return I();if(!s||k.substring(0,S)!==s){if(M){if(A=[],j(k.split(t)),H(),L)return I()}else j(k.split(t));if(p&&u>=p)return A=A.slice(0,p),I(!0)}}return I()}for(var f=o.indexOf(t,d),m=o.indexOf(r,d),R=new RegExp(se(O)+se(i),"g"),a=o.indexOf(i,d);;)if(o[d]!==i)if(s&&0===k.length&&o.substring(d,d+S)===s){if(-1===m)return I();m=o.indexOf(r,d=m+b),f=o.indexOf(t,d)}else if(-1!==f&&(f<m||-1===m))k.push(o.substring(d,f)),f=o.indexOf(t,d=f+_);else{if(-1===m)break;if(k.push(o.substring(d,m)),K(m+b),M&&(H(),L))return I();if(p&&A.length>=p)return I(!0)}else for(a=d,d++;;){if(-1===(a=o.indexOf(i,a+1)))return Q||W.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:A.length,index:d}),X();if(a===v-1)return X(o.substring(d,a).replace(R,i));if(i!==O||o[a+1]!==O){if(i===O||0===a||o[a-1]!==O){-1!==f&&f<a+1&&(f=o.indexOf(t,a+1)),-1!==m&&m<a+1&&(m=o.indexOf(r,a+1));var x=ie(-1===m?f:Math.min(f,m));if(o.substr(a+1+x,_)===t){k.push(o.substring(d,a).replace(R,i)),d=a+1+x+_,o[a+1+x+_]!==i&&(a=o.indexOf(i,d)),f=o.indexOf(t,d),m=o.indexOf(r,d);break}var J=ie(m);if(o.substring(a+1+J,a+1+J+b)===r){if(k.push(o.substring(d,a).replace(R,i)),K(a+1+J+b),f=o.indexOf(t,d),a=o.indexOf(i,d),M&&(H(),L))return I();if(p&&A.length>=p)return I(!0);break}W.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:A.length,index:d}),a++}}else a++}return X();function j(D){A.push(D),U=d}function ie(D){var P=0;if(-1!==D){var B=o.substring(a+1,D);B&&""===B.trim()&&(P=B.length)}return P}function X(D){return Q||(typeof D>"u"&&(D=o.substring(d)),k.push(D),d=v,j(k),M&&H()),I()}function K(D){d=D,j(k),k=[],m=o.indexOf(r,d)}function I(D){if(e.header&&!c&&A.length&&!E){const P=A[0],B=Object.create(null),de=new Set(P);let _e=!1;for(let Z=0;Z<P.length;Z++){let N=P[Z];if(g(e.transformHeader)&&(N=e.transformHeader(N,Z)),B[N]){let ne,ke=B[N];do{ne=`${N}_${ke}`,ke++}while(de.has(ne));de.add(ne),P[Z]=ne,B[N]++,_e=!0,null===y&&(y={}),y[ne]=N}else B[N]=1,P[Z]=N;de.add(N)}_e&&console.warn("Duplicate headers found and renamed."),E=!0}return{data:A,errors:W,meta:{delimiter:t,linebreak:r,aborted:L,truncated:!!D,cursor:U+(c||0),renamedHeaders:y}}}function H(){n(I()),A=[],W=[]}},this.abort=function(){L=!0},this.getCharIndex=function(){return d}}function xe(e){var t=e.data,r=he[t.workerId],s=!1;if(t.error)r.userError(t.error,t.file);else if(t.results&&t.results.data){var p={abort:function(){s=!0,ye(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:ve,resume:ve};if(g(r.userStep)){for(var h=0;h<t.results.data.length&&(r.userStep({data:t.results.data[h],errors:t.results.errors,meta:t.results.meta},p),!s);h++);delete t.results}else g(r.userChunk)&&(r.userChunk(t.results,p,t.file),delete t.results)}t.finished&&!s&&ye(t.workerId,t.results)}function ye(e,t){var r=he[e];g(r.userComplete)&&r.userComplete(t),r.terminate(),delete he[e]}function ve(){throw new Error("Not implemented.")}function ue(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var r in e)t[r]=ue(e[r]);return t}function F(e,t){return function(){e.apply(t,arguments)}}function g(e){return"function"==typeof e}return fe&&(w.onmessage=function Ae(e){var t=e.data;if(typeof l.WORKER_ID>"u"&&t&&(l.WORKER_ID=t.workerId),"string"==typeof t.input)w.postMessage({workerId:l.WORKER_ID,results:l.parse(t.input,t.config),finished:!0});else if(w.File&&t.input instanceof File||t.input instanceof Object){var r=l.parse(t.input,t.config);r&&w.postMessage({workerId:l.WORKER_ID,results:r,finished:!0})}}),(G.prototype=Object.create(q.prototype)).constructor=G,(ee.prototype=Object.create(q.prototype)).constructor=ee,(Y.prototype=Object.create(Y.prototype)).constructor=Y,(te.prototype=Object.create(q.prototype)).constructor=te,typeof PAPA_BROWSER_CONTEXT>"u"&&((re.prototype=Object.create(q.prototype)).constructor=re),l},void 0!==(oe=ae.apply(Ce,[]))&&(ge.exports=oe)},6266(){}}]);
|
package/7313.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[3319,5971,7313],{3319(D,C,i){i.d(C,{ButtonIcon:()=>m});var o=i(7705),a=i(29),d=i(5547);let m=(()=>{class h{icon=(0,o.hFB)(void 0);slot=(0,o.hFB)("before");static \u0275fac=function(f){return new(f||h)};static \u0275cmp=d.VBU({type:h,selectors:[["cue-button-icon"]],inputs:{icon:[1,"icon"],slot:[1,"slot"]},decls:1,vars:2,consts:[[3,"slot","name"]],template:function(f,u){1&f&&d.nrm(0,"cue-svg-icon",0),2&f&&d.Y8G("slot",u.slot())("name",u.icon())},dependencies:[a.A],encapsulation:2})}return h})()},5971(D,C,i){i.d(C,{Button:()=>u});var o=i(9769),a=i(7705),d=i(2271),m=i(7089),h=i(2403),r=i(5547);const v=["buttonElement"],f=["*"];let u=(()=>{class e{variant=(0,a.hFB)("primary");size=(0,a.hFB)("m");tooltip=(0,a.hFB)("");disabled=(0,a.hFB)(!1);selected=(0,a.geq)(!1);toggleButton=(0,a.hFB)(!1);loading=(0,a.hFB)(!1);fitParentWidth=(0,a.hFB)(!1);noWrap=(0,a.hFB)(!0);buttonElement=a.ebz.required("buttonElement");getStyles=(0,d.EW)(()=>[`\n padding: 0 var(--cue-button-${this.size()}-padding-x);\n\n --focus-color: var(--cue-button-${this.variant()}-focus-color);\n --cue-button-border-color: var(--cue-button-${this.variant()}-border-color);\n color: var(--cue-button-${this.variant()}-foreground);\n --background-color: var(--cue-button-${this.variant()}-background);\n\n --cue-icon-width: var(--cue-button-${this.size()}-icon-width);\n --button-height: var(--cue-button-${this.size()}-height);\n --cue-button-border-radius: var(--cue-button-border-radius, 9999px);\n --button-label-padding-x: var(--cue-button-${this.size()}-label-padding-x);\n `,this.disabled()?`\n color: var(--cue-button-${this.variant()}-disabled-foreground);\n --cue-button-border-color: var(--cue-button-${this.variant()}-disabled-border-color);\n --background-color: var(--cue-button-${this.variant()}-disabled-background);\n `:""].join(""));handleClick(_){_.detail>0&&this.buttonElement().nativeElement.blur(),this.toggleButton()&&(_.stopPropagation(),this.selected.set(!this.selected()))}static \u0275fac=function(g){return new(g||e)};static \u0275cmp=r.VBU({type:e,selectors:[["cue-button"]],viewQuery:function(g,R){1&g&&r.wEZ(R.buttonElement,v,5),2&g&&r.NyB()},inputs:{variant:[1,"variant"],size:[1,"size"],tooltip:[1,"tooltip"],disabled:[1,"disabled"],selected:[1,"selected"],toggleButton:[1,"toggleButton"],loading:[1,"loading"],fitParentWidth:[1,"fitParentWidth"],noWrap:[1,"noWrap"]},outputs:{selected:"selectedChange"},ngContentSelectors:f,decls:3,vars:18,consts:[["buttonElement",""],["tooltipSize","small",3,"click","disabled","cueTooltip","tooltipPlacement","cuePulse"]],template:function(g,R){1&g&&(r.NAR(),r.j41(0,"button",1,0),r.bIt("click",function(P){return R.handleClick(P)}),r.SdG(2),r.k0s()),2&g&&(r.Aen(R.getStyles()),r.xc7("white-space",R.noWrap()?"nowrap":"normal")("flex-basis",R.noWrap()?null:"auto")("min-width",R.noWrap()?null:"fit-content"),r.AVh("selected",R.selected())("ghost","ghost"===R.variant())("fit-parent-width",R.fitParentWidth()),r.Y8G("disabled",R.disabled())("cueTooltip",R.tooltip())("tooltipPlacement","top")("cuePulse",R.loading()))},dependencies:[o.MD,m.d,h.V],styles:['[_nghost-%COMP%]:has(.fit-parent-width){display:contents}@keyframes _ngcontent-%COMP%_pulse-border{0%{box-shadow:0 0 0 0 var(--focus-color)}50%{box-shadow:0 0 0 8px transparent}to{box-shadow:0 0 0 0 transparent}}button[_ngcontent-%COMP%]{min-width:0;pulse-border-radius:var(--cue-button-border-radius);appearance:none;padding:0;font:inherit;border:var(--cue-button-border-width) var(--cue-button-border-style) var(--cue-button-border-color);display:flex;justify-content:space-between;align-items:center;gap:var(--cue-button-gap);min-height:var(--button-height);height:auto;background-color:var(--background-color);border-radius:var(--cue-button-border-radius, 9999px);margin:3px;position:relative}button[style*="white-space: normal"][_ngcontent-%COMP%]{border-radius:30px!important;padding:10px!important}button.fit-parent-width[_ngcontent-%COMP%]{width:100%;min-width:0;margin-inline:0}button[_ngcontent-%COMP%]:not(.fit-parent-width){min-width:fit-content;width:auto}button[_ngcontent-%COMP%]:focus{outline:none}button[_ngcontent-%COMP%]:hover:not(:disabled), button[_ngcontent-%COMP%]:focus-within:not(:disabled){outline:1px solid var(--focus-color);outline-offset:2px;cursor:pointer}button.selected[_ngcontent-%COMP%]{outline:1px solid currentColor!important;outline-offset:2px;margin:3px}button.ghost[_ngcontent-%COMP%]:not(.selected){border:none}']})}return e})()},5821(D,C,i){i.d(C,{m:()=>P});var o=i(7705),a=i(5802),d=i(2271),m=i(9352),h=i(5381),r=i(2245),v=i(5971),f=i(3319),u=i(63),e=i(5547);const S=(y,T,p)=>({startIndex:y,endIndex:T,totalItems:p});function _(y,T){if(1&y){const p=e.RV6();e.j41(0,"cue-flexcontainer",3)(1,"cue-typography",4),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.j41(4,"cue-select",5),e.mxI("valueChange",function(w){a.eBV(p);const k=e.XpG(2);return e.DH7(k.pageSize,w)||(k.pageSize=w),a.Njj(w)}),e.k0s()(),e.nrm(5,"span",6)}if(2&y){const p=e.XpG(2);e.R7$(),e.Y8G("noWrap",!0),e.R7$(),e.JRh(e.bMT(3,5,"components.paginator.itemsPerPage")),e.R7$(2),e.R50("value",p.pageSize),e.Y8G("options",p.pageSizeOptions())("underline",!1)}}function g(y,T){if(1&y&&e.nVh(0,_,6,7),2&y){const p=e.XpG();e.vxM(p.pageSizeOptions().length>1?0:-1)}}function R(y,T){if(1&y){const p=e.RV6();e.j41(0,"cue-button",7),e.bIt("click",function(){a.eBV(p);const w=e.XpG();return a.Njj(w.first())}),e.nrm(1,"cue-button-icon",8),e.k0s(),e.j41(2,"cue-button",7),e.bIt("click",function(){a.eBV(p);const w=e.XpG();return a.Njj(w.back())}),e.nrm(3,"cue-button-icon",9),e.k0s()}}function z(y,T){if(1&y){const p=e.RV6();e.j41(0,"cue-button",7),e.bIt("click",function(){a.eBV(p);const w=e.XpG();return a.Njj(w.next())}),e.nrm(1,"cue-button-icon",10),e.k0s(),e.j41(2,"cue-button",7),e.bIt("click",function(){a.eBV(p);const w=e.XpG();return a.Njj(w.last())}),e.nrm(3,"cue-button-icon",11),e.k0s()}}let P=(()=>{class y{pageSizeOptions=(0,o.hFB)([5,10,25,100]);size=(0,o.hFB)(111);pageSize=(0,o.geq)(10);menuPosition=(0,o.hFB)("topright");autoAdjust=(0,o.hFB)(!0);currentPage=(0,o.CGW)();_startIndex=(0,a.vPA)(0);_endIndex=(0,a.vPA)(0);anythingToPaginate=(0,d.EW)(()=>{const p=this.adjustedPageSizeOptions()[this.adjustedPageSizeOptions().length-1];return this.size()>p});startIndex=(0,d.EW)(()=>this._startIndex()+1);endIndex=(0,d.EW)(()=>Math.min(this._endIndex(),this.size()));isFirstPage=(0,d.EW)(()=>0===this._startIndex());isLastPage=(0,d.EW)(()=>this._endIndex()>=this.size());adjustedPageSizeOptions=(0,d.EW)(()=>{let p=this.pageSizeOptions();if(!this.autoAdjust())return p;const x=p[p.length-1],w=this.size();return w<x&&(p=p.filter(k=>k<=w),p.length||(p=[w])),p});constructor(){(0,a.QZP)(()=>{this._resetPagination()}),(0,a.QZP)(()=>{this.currentPage.emit({startIndex:this._startIndex(),endIndex:this._endIndex(),pageSize:this.pageSize()})})}setSize(p){this.pageSize.set(p),this._resetPagination()}next(){const p=this._endIndex();this._startIndex.set(p),this._endIndex.set(p+this.pageSize())}back(){const p=Math.max(0,this._startIndex()-this.pageSize());this._startIndex.set(p),this._endIndex.set(p+this.pageSize())}first(){this._startIndex.set(0),this._endIndex.set(this.pageSize())}last(){const p=Math.max(0,this.size()-(this.size()%this.pageSize()||this.pageSize()));this._startIndex.set(p),this._endIndex.set(this.size())}_resetPagination(){this._startIndex.set(0),this._endIndex.set(Math.min(this.pageSize(),this.size()))}static \u0275fac=function(x){return new(x||y)};static \u0275cmp=e.VBU({type:y,selectors:[["cue-paginator"]],inputs:{pageSizeOptions:[1,"pageSizeOptions"],size:[1,"size"],pageSize:[1,"pageSize"],menuPosition:[1,"menuPosition"],autoAdjust:[1,"autoAdjust"]},outputs:{pageSize:"pageSizeChange",currentPage:"currentPage"},decls:8,vars:11,consts:[["direction","row","justify","end","align","center",1,"paginator",2,"width","calc(100% - 4px)","padding","0 2px"],["size","s"],["direction","row","gap","s"],["direction","row","gap","s","align","center"],["size","s",3,"noWrap"],["size","xs","menuPosition","topright",3,"valueChange","value","options","underline"],[2,"flex","1"],["size","xs","variant","tertiary",3,"click"],["icon","paginator-first"],["icon","paginator-back"],["icon","paginator-next"],["icon","paginator-last"]],template:function(x,w){1&x&&(e.j41(0,"cue-flexcontainer",0),e.nVh(1,g,1,1),e.j41(2,"cue-typography",1),e.EFF(3),e.nI1(4,"transloco"),e.k0s(),e.j41(5,"cue-flexcontainer",2),e.nVh(6,R,4,0),e.nVh(7,z,4,0),e.k0s()()),2&x&&(e.R7$(),e.vxM(!w.autoAdjust()||w.anythingToPaginate()?1:-1),e.R7$(2),e.JRh(e.i5U(4,4,"components.paginator.currentDisplay",e.sMw(7,S,w.startIndex(),w.endIndex(),w.size()))),e.R7$(3),e.vxM(w.isFirstPage()?-1:6),e.R7$(),e.vxM(w.isLastPage()?-1:7))},dependencies:[h.FlexContainer,r.Typography,v.Button,f.ButtonIcon,u.Select,m.Kj],styles:[".paginator[_ngcontent-%COMP%]{color:var(--cue-paginator-text-color);padding-top:3px;padding-bottom:3px}"],changeDetection:0})}return y})()},2403(D,C,i){i.d(C,{V:()=>m});var o=i(7705),a=i(5547),d=i(5802);let m=(()=>{class h{el=(0,d.WQX)(a.aKT);renderer=(0,d.WQX)(a.sFG);cuePulse=(0,o.hFB)(!1);cuePulseColor=(0,o.hFB)("");cuePulseMode=(0,o.hFB)("border");activeClass="";constructor(){this.ensureGlobalStyles()}onPulseChanged=(0,d.QZP)(()=>{const v=this.cuePulse(),f=this.cuePulseColor(),u=this.cuePulseMode(),e=this.el.nativeElement;if(this.activeClass&&(this.renderer.removeClass(e,this.activeClass),this.activeClass=""),this.renderer.removeStyle(e,"--cue-pulse-color"),this.renderer.removeStyle(e,"border-radius"),v){const S="text"===u?"cue-pulse-text":"cue-pulse-border";this.renderer.addClass(e,S),this.activeClass=S,f&&this.renderer.setStyle(e,"--cue-pulse-color",f),"border"===u&&setTimeout(()=>{const _=e.firstElementChild;if(_){const g=getComputedStyle(_).borderRadius;g&&"0px"!==g&&this.renderer.setStyle(e,"border-radius",g)}})}});ngOnDestroy(){const v=this.el.nativeElement;this.activeClass&&this.renderer.removeClass(v,this.activeClass),this.renderer.removeStyle(v,"border-radius")}ensureGlobalStyles(){const v="cue-pulse-global-styles";if(document.getElementById(v))return;const f=document.createElement("style");f.id=v,f.textContent="\n @keyframes cue-pulse-border-anim {\n 0% {\n box-shadow: 0 0 0 0 var(--cue-pulse-color, currentColor);\n }\n 70% {\n box-shadow: 0 0 0 8px transparent;\n }\n 100% {\n box-shadow: 0 0 0 0 transparent;\n }\n }\n\n @keyframes cue-pulse-text-anim {\n 0%, 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.4;\n }\n }\n\n .cue-pulse-border {\n animation: cue-pulse-border-anim 1.5s infinite ease-in-out;\n }\n\n .cue-pulse-text {\n animation: cue-pulse-text-anim 1.5s infinite ease-in-out;\n }\n ",document.head.appendChild(f)}static \u0275fac=function(f){return new(f||h)};static \u0275dir=a.FsC({type:h,selectors:[["","cuePulse",""]],inputs:{cuePulse:[1,"cuePulse"],cuePulseColor:[1,"cuePulseColor"],cuePulseMode:[1,"cuePulseMode"]}})}return h})()},3798(D,C,i){i.d(C,{Z:()=>v});var o=i(3236),a=i(9974),d=i(8750),m=i(4360),r=i(1584);function v(f,u=o.E){return function h(f){return(0,a.N)((u,e)=>{let S=!1,_=null,g=null,R=!1;const z=()=>{if(g?.unsubscribe(),g=null,S){S=!1;const y=_;_=null,e.next(y)}R&&e.complete()},P=()=>{g=null,R&&e.complete()};u.subscribe((0,m._)(e,y=>{S=!0,_=y,g||(0,d.Tg)(f(y)).subscribe(g=(0,m._)(e,z,P))},()=>{R=!0,(!S||!g||g.closed)&&e.complete()}))})}(()=>(0,r.O)(f,u))}},5964(D,C,i){i.d(C,{p:()=>d});var o=i(9974),a=i(4360);function d(m,h){return(0,o.N)((r,v)=>{let f=0;r.subscribe((0,a._)(v,u=>m.call(h,u,f++)&&v.next(u)))})}},536(D,C,i){i.d(C,{X:()=>v});var o=i(6780),a=i(8359);const d={schedule(u){let e=requestAnimationFrame,S=cancelAnimationFrame;const{delegate:_}=d;_&&(e=_.requestAnimationFrame,S=_.cancelAnimationFrame);const g=e(R=>{S=void 0,u(R)});return new a.yU(()=>S?.(g))},requestAnimationFrame(...u){const{delegate:e}=d;return(e?.requestAnimationFrame||requestAnimationFrame)(...u)},cancelAnimationFrame(...u){const{delegate:e}=d;return(e?.cancelAnimationFrame||cancelAnimationFrame)(...u)},delegate:void 0};var h=i(9687);const v=new class r extends h.q{flush(e){let S;this._active=!0,e?S=e.id:(S=this._scheduled,this._scheduled=void 0);const{actions:_}=this;let g;e=e||_.shift();do{if(g=e.execute(e.state,e.delay))break}while((e=_[0])&&e.id===S&&_.shift());if(this._active=!1,g){for(;(e=_[0])&&e.id===S&&_.shift();)e.unsubscribe();throw g}}}(class m extends o.R{constructor(e,S){super(e,S),this.scheduler=e,this.work=S}requestAsyncId(e,S,_=0){return null!==_&&_>0?super.requestAsyncId(e,S,_):(e.actions.push(this),e._scheduled||(e._scheduled=d.requestAnimationFrame(()=>e.flush(void 0))))}recycleAsyncId(e,S,_=0){var g;if(null!=_?_>0:this.delay>0)return super.recycleAsyncId(e,S,_);const{actions:R}=e;null!=S&&S===e._scheduled&&(null===(g=R[R.length-1])||void 0===g?void 0:g.id)!==S&&(d.cancelAnimationFrame(S),e._scheduled=void 0)}})},7523(D,C,i){function o(a){return Array.isArray(a)?a:[a]}i.d(C,{F:()=>o})},9752(D,C,i){i.d(C,{dS:()=>h});var o=i(5802);const a=new o.nKC("cdk-dir-doc",{providedIn:"root",factory:()=>(0,o.WQX)(o.qQL)}),d=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;let h=(()=>{class r{get value(){return this.valueSignal()}valueSignal=(0,o.vPA)("ltr");change=new o.bkB;constructor(){const f=(0,o.WQX)(a,{optional:!0});f&&this.valueSignal.set(function m(r){const v=r?.toLowerCase()||"";return"auto"===v&&typeof navigator<"u"&&navigator?.language?d.test(navigator.language)?"rtl":"ltr":"rtl"===v?"rtl":"ltr"}((f.body?f.body.dir:null)||(f.documentElement?f.documentElement.dir:null)||"ltr"))}ngOnDestroy(){this.change.complete()}static \u0275fac=function(u){return new(u||r)};static \u0275prov=o.jDH({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})()},7384(D,C,i){i.d(C,{OE:()=>a,i8:()=>m});var o=i(5547);function a(h,r=0){return function d(h){return!isNaN(parseFloat(h))&&!isNaN(Number(h))}(h)?Number(h):2===arguments.length?r:0}function m(h){return h instanceof o.aKT?h.nativeElement:h}},3531(D,C,i){i.d(C,{g:()=>m});var o=i(5802),a=i(5547);const d={};class m{_appId=(0,o.WQX)(a.sZ2);static _infix=`a${Math.floor(1e5*Math.random()).toString()}`;getId(r,v=!1){return"ng"!==this._appId&&(r+=this._appId),d.hasOwnProperty(r)||(d[r]=0),`${r}${v?m._infix+"-":""}${d[r]++}`}static \u0275fac=function(v){return new(v||m)};static \u0275prov=o.jDH({token:m,factory:m.\u0275fac,providedIn:"root"})}},7421(D,C,i){i.d(C,{O:()=>h});var o=i(5802),a=i(5547),d=i(177);let m;try{m=typeof Intl<"u"&&Intl.v8BreakIterator}catch{m=!1}let h=(()=>{class r{_platformId=(0,o.WQX)(a.Agw);isBrowser=this._platformId?(0,d.UE)(this._platformId):"object"==typeof document&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!(!window.chrome&&!m)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;constructor(){}static \u0275fac=function(u){return new(u||r)};static \u0275prov=o.jDH({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})()},9867(D,C,i){let o;function d(r){if(function a(){if(null==o){const r=typeof document<"u"?document.head:null;o=!(!r||!r.createShadowRoot&&!r.attachShadow)}return o}()){const v=r.getRootNode?r.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&v instanceof ShadowRoot)return v}return null}function h(r){return r.composedPath?r.composedPath()[0]:r.target}i.d(C,{Fb:()=>h,KT:()=>d})},3293(D,C,i){i.d(C,{l:()=>h});var o=i(5802),a=i(7705),d=i(5547);const m=new WeakMap;let h=(()=>{class r{_appRef;_injector=(0,o.WQX)(o.zZn);_environmentInjector=(0,o.WQX)(o.uvJ);load(f){const u=this._appRef=this._appRef||this._injector.get(d.o8S);let e=m.get(u);e||(e={loaders:new Set,refs:[]},m.set(u,e),u.onDestroy(()=>{m.get(u)?.refs.forEach(S=>S.destroy()),m.delete(u)})),e.loaders.has(f)||(e.loaders.add(f),e.refs.push((0,a.a0P)(f,{environmentInjector:this._environmentInjector})))}static \u0275fac=function(u){return new(u||r)};static \u0275prov=o.jDH({token:r,factory:r.\u0275fac,providedIn:"root"})}return r})()},8203(D,C,i){i.d(C,{jI:()=>u});var r=i(5547),v=i(5802);let u=(()=>{class e{static \u0275fac=function(g){return new(g||e)};static \u0275mod=r.$C({type:e});static \u0275inj=v.G2t({})}return e})()},5272(D,C,i){i.d(C,{R:()=>U,E9:()=>H,Xj:()=>G});var o=i(5802),a=i(5547),d=i(1413),m=i(7673),h=i(4226),v=(i(536),i(6780));let u,f=1;const e={};function S(c){return c in e&&(delete e[c],!0)}const _={setImmediate(c){const s=f++;return e[s]=!0,u||(u=Promise.resolve()),u.then(()=>S(s)&&c()),s},clearImmediate(c){S(c)}},{setImmediate:R,clearImmediate:z}=_,P={setImmediate(...c){const{delegate:s}=P;return(s?.setImmediate||R)(...c)},clearImmediate(c){const{delegate:s}=P;return(s?.clearImmediate||z)(c)},delegate:void 0};var T=i(9687);new class p extends T.q{flush(s){this._active=!0;const t=this._scheduled;this._scheduled=void 0;const{actions:n}=this;let l;s=s||n.shift();do{if(l=s.execute(s.state,s.delay))break}while((s=n[0])&&s.id===t&&n.shift());if(this._active=!1,l){for(;(s=n[0])&&s.id===t&&n.shift();)s.unsubscribe();throw l}}}(class y extends v.R{constructor(s,t){super(s,t),this.scheduler=s,this.work=t}requestAsyncId(s,t,n=0){return null!==n&&n>0?super.requestAsyncId(s,t,n):(s.actions.push(this),s._scheduled||(s._scheduled=P.setImmediate(s.flush.bind(s,void 0))))}recycleAsyncId(s,t,n=0){var l;if(null!=n?n>0:this.delay>0)return super.recycleAsyncId(s,t,n);const{actions:b}=s;null!=t&&(null===(l=b[b.length-1])||void 0===l?void 0:l.id)!==t&&(P.clearImmediate(t),s._scheduled===t&&(s._scheduled=void 0))}});var k=i(3798),F=i(5964),A=i(7421),L=i(7384),V=i(8203);let U=(()=>{class c{_ngZone=(0,o.WQX)(o.SKi);_platform=(0,o.WQX)(A.O);_renderer=(0,o.WQX)(a._9s).createRenderer(null,null);_cleanupGlobalListener;constructor(){}_scrolled=new d.B;_scrolledCount=0;scrollContainers=new Map;register(t){this.scrollContainers.has(t)||this.scrollContainers.set(t,t.elementScrolled().subscribe(()=>this._scrolled.next(t)))}deregister(t){const n=this.scrollContainers.get(t);n&&(n.unsubscribe(),this.scrollContainers.delete(t))}scrolled(t=20){return this._platform.isBrowser?new h.c(n=>{this._cleanupGlobalListener||(this._cleanupGlobalListener=this._ngZone.runOutsideAngular(()=>this._renderer.listen("document","scroll",()=>this._scrolled.next())));const l=t>0?this._scrolled.pipe((0,k.Z)(t)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{l.unsubscribe(),this._scrolledCount--,this._scrolledCount||(this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0)}}):(0,m.of)()}ngOnDestroy(){this._cleanupGlobalListener?.(),this._cleanupGlobalListener=void 0,this.scrollContainers.forEach((t,n)=>this.deregister(n)),this._scrolled.complete()}ancestorScrolled(t,n){const l=this.getAncestorScrollContainers(t);return this.scrolled(n).pipe((0,F.p)(b=>!b||l.indexOf(b)>-1))}getAncestorScrollContainers(t){const n=[];return this.scrollContainers.forEach((l,b)=>{this._scrollableContainsElement(b,t)&&n.push(b)}),n}_scrollableContainsElement(t,n){let l=(0,L.i8)(n),b=t.getElementRef().nativeElement;do{if(l==b)return!0}while(l=l.parentElement);return!1}static \u0275fac=function(n){return new(n||c)};static \u0275prov=o.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}return c})(),G=(()=>{class c{_platform=(0,o.WQX)(A.O);_listeners;_viewportSize=null;_change=new d.B;_document=(0,o.WQX)(o.qQL);constructor(){const t=(0,o.WQX)(o.SKi),n=(0,o.WQX)(a._9s).createRenderer(null,null);t.runOutsideAngular(()=>{if(this._platform.isBrowser){const l=b=>this._change.next(b);this._listeners=[n.listen("window","resize",l),n.listen("window","orientationchange",l)]}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){this._listeners?.forEach(t=>t()),this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();const t={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),t}getViewportRect(){const t=this.getViewportScrollPosition(),{width:n,height:l}=this.getViewportSize();return{top:t.top,left:t.left,bottom:t.top+l,right:t.left+n,height:l,width:n}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};const t=this._document,n=this._getWindow(),l=t.documentElement,b=l.getBoundingClientRect();return{top:-b.top||t.body?.scrollTop||n.scrollY||l.scrollTop||0,left:-b.left||t.body?.scrollLeft||n.scrollX||l.scrollLeft||0}}change(t=20){return t>0?this._change.pipe((0,k.Z)(t)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){const t=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:t.innerWidth,height:t.innerHeight}:{width:0,height:0}}static \u0275fac=function(n){return new(n||c)};static \u0275prov=o.jDH({token:c,factory:c.\u0275fac,providedIn:"root"})}return c})(),B=(()=>{class c{static \u0275fac=function(n){return new(n||c)};static \u0275mod=a.$C({type:c});static \u0275inj=o.G2t({})}return c})(),H=(()=>{class c{static \u0275fac=function(n){return new(n||c)};static \u0275mod=a.$C({type:c});static \u0275inj=o.G2t({imports:[V.jI,B,V.jI,B]})}return c})()}}]);
|
package/880.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[880,9695],{5448(J,V,u){"use strict";u.d(V,{ButtonLabel:()=>e});var C=u(7705),p=u(2245),h=u(5547);const s=["*"];let e=(()=>{class D{fontSize=(0,C.hFB)("m");italic=(0,C.hFB)(!1);noWrap=(0,C.hFB)(!0);static \u0275fac=function(F){return new(F||D)};static \u0275cmp=h.VBU({type:D,selectors:[["cue-button-label"]],inputs:{fontSize:[1,"fontSize"],italic:[1,"italic"],noWrap:[1,"noWrap"]},ngContentSelectors:s,decls:3,vars:3,consts:[[3,"size","italic","noWrap"]],template:function(F,k){1&F&&(h.NAR(),h.j41(0,"div")(1,"cue-typography",0),h.SdG(2),h.k0s()()),2&F&&(h.R7$(),h.Y8G("size",k.fontSize())("italic",k.italic())("noWrap",k.noWrap()))},dependencies:[p.Typography],styles:["div[_ngcontent-%COMP%]{transform:translateY(.05em)}"]})}return D})()},9695(J,V,u){"use strict";u.d(V,{Switch:()=>D});var C=u(7705),p=u(29),h=u(5547);function s(M,_){if(1&M&&h.nrm(0,"cue-svg-icon",2),2&M){const F=h.XpG();h.Y8G("name",F.iconChecked())}}function e(M,_){if(1&M&&h.nrm(0,"cue-svg-icon",2),2&M){const F=h.XpG();h.Y8G("name",F.icon())}}let D=(()=>{class M{size=(0,C.hFB)("m");icon=(0,C.hFB)(void 0);iconChecked=(0,C.hFB)(void 0);disabled=(0,C.hFB)(!1);checked=(0,C.geq)(!1);toggleChange=(0,C.CGW)();toggle(){this.checked.set(!this.checked()),this.toggleChange.emit(this.checked())}static \u0275fac=function(k){return new(k||M)};static \u0275cmp=h.VBU({type:M,selectors:[["cue-input-switch"]],hostVars:5,hostBindings:function(k,R){2&k&&(h.BMQ("size",R.size()),h.AVh("checked",R.checked())("disabled",R.disabled()))},inputs:{size:[1,"size"],icon:[1,"icon"],iconChecked:[1,"iconChecked"],disabled:[1,"disabled"],checked:[1,"checked"]},outputs:{checked:"checkedChange",toggleChange:"toggleChange"},decls:4,vars:3,consts:[["type","checkbox",3,"click","checked","disabled"],[1,"indicator"],[3,"name"]],template:function(k,R){1&k&&(h.j41(0,"input",0),h.bIt("click",function(){return R.toggle()}),h.k0s(),h.j41(1,"div",1),h.nVh(2,s,1,1,"cue-svg-icon",2)(3,e,1,1,"cue-svg-icon",2),h.k0s()),2&k&&(h.Y8G("checked",R.checked())("disabled",R.disabled()),h.R7$(2),h.vxM(R.checked()&&R.iconChecked()?2:R.icon()?3:-1))},dependencies:[p.A],styles:["[_nghost-%COMP%]{--cue-input-switch-height: 18px;--cue-input-switch-width: calc(var(--cue-input-switch-height) * 1.7);--cue-input-switch-inset: 2px;--cue-input-switch-indicator-width: calc( var(--cue-input-switch-height) - (2 * var(--cue-input-switch-inset)) );--cue-input-switch-icon-width: calc( var(--cue-input-switch-indicator-width) - (2 * var(--cue-input-switch-inset)) );display:block;flex-shrink:0;position:relative;height:var(--cue-input-switch-height);width:var(--cue-input-switch-width);border-radius:var(--cue-input-switch-height);--cue-icon-width: var(--cue-input-switch-icon-width);background:var(--cue-input-switch-background);transition:background-color .4s ease}[size=xs][_nghost-%COMP%]{--cue-input-switch-height: 12px;--cue-input-switch-inset: 1px}[size=s][_nghost-%COMP%]{--cue-input-switch-height: 14px;--cue-input-switch-inset: 1px}[size=m][_nghost-%COMP%]{--cue-input-switch-height: 18px;--cue-input-switch-inset: 2px}[size=l][_nghost-%COMP%]{--cue-input-switch-height: 22px;--cue-input-switch-inset: 3px}[size=xl][_nghost-%COMP%]{--cue-input-switch-height: 28px;--cue-input-switch-inset: 3px}@container cue-container (width < 20em){[_nghost-%COMP%]{--cue-input-switch-height: 16px}[size=xs][_nghost-%COMP%]{--cue-input-switch-height: 10px}[size=s][_nghost-%COMP%]{--cue-input-switch-height: 12px}[size=m][_nghost-%COMP%]{--cue-input-switch-height: 16px}[size=l][_nghost-%COMP%]{--cue-input-switch-height: 18px}[size=xl][_nghost-%COMP%]{--cue-input-switch-height: 20px}}.checked[_nghost-%COMP%]{background:var(--cue-input-switch-checked-background)}.disabled[_nghost-%COMP%]{background:var(--cue-input-switch-disabled-background);cursor:default}[_nghost-%COMP%] .indicator[_ngcontent-%COMP%]{pointer-events:none;position:absolute;left:var(--cue-input-switch-inset);top:var(--cue-input-switch-inset);width:var(--cue-input-switch-indicator-width);aspect-ratio:1;border-radius:50%;display:flex;align-items:center;justify-content:center;background-color:var(--cue-input-switch-indicator-background);color:var(--cue-input-switch-indicator-foreground);transition:left .4s ease,background-color .4s ease,color .4s ease}.checked[_nghost-%COMP%] .indicator[_ngcontent-%COMP%]{left:calc(var(--cue-input-switch-width) - var(--cue-input-switch-inset) - var( --cue-input-switch-indicator-width ));background:var(--cue-input-switch-checked-indicator-background);color:var(--cue-input-switch-checked-indicator-foreground)}.disabled[_nghost-%COMP%] .indicator[_ngcontent-%COMP%]{background:var(--cue-input-switch-disabled-indicator-background);color:var(--cue-input-switch-disabled-indicator-foreground)}input[_ngcontent-%COMP%]{all:unset;position:absolute;inset:0;cursor:pointer;border-radius:var(--cue-input-switch-height)}input[_ngcontent-%COMP%]:focus-visible:not(:disabled) + .indicator[_ngcontent-%COMP%]{outline:1px solid var(--cue-input-switch-focus-color);outline-offset:2px}"]})}return M})()},5745(J,V,u){"use strict";u.d(V,{a:()=>ie});var C=u(7705),p=u(5802),h=u(2271),s=u(5547);const e=["dialog"],D=["*",[["","modal-footer",""]]],M=["*","[modal-footer]"];function _($,U){if(1&$&&(s.rj2(0,"h2",7),s.EFF(1),s.eux()),2&$){const w=s.XpG(3);s.R7$(),s.JRh(w.effectiveTitle())}}function F($,U){if(1&$&&(s.rj2(0,"p",8),s.EFF(1),s.eux()),2&$){const w=s.XpG(3);s.R7$(),s.JRh(w.subtitle())}}function k($,U){if(1&$){const w=s.RV6();s.rj2(0,"button",10),s.VwU("click",function(){p.eBV(w);const L=s.XpG(3);return p.Njj(L.onClose())}),p.qSk(),s.rj2(1,"svg",11),s.Hgh(2,"path",12),s.eux()()}}function R($,U){if(1&$&&(s.rj2(0,"div",4)(1,"div",6),s.nVh(2,_,2,1,"h2",7),s.nVh(3,F,2,1,"p",8),s.eux(),s.nVh(4,k,3,0,"button",9),s.eux()),2&$){const w=s.XpG(2);s.R7$(2),s.vxM(w.effectiveTitle()?2:-1),s.R7$(),s.vxM(w.subtitle()?3:-1),s.R7$(),s.vxM(w.displayCloseBtn()?4:-1)}}function G($,U){if(1&$&&(s.rj2(0,"div",3),s.VwU("click",function(B){return B.stopPropagation()}),s.nVh(1,R,5,3,"div",4),s.rj2(2,"div",5),s.SdG(3),s.eux(),s.SdG(4,1),s.eux()),2&$){const w=s.XpG();s.xc7("min-width",w.minWidth()),s.AVh("has-header",w.effectiveTitle()||w.displayCloseBtn()),s.R7$(),s.vxM(w.effectiveTitle()||w.displayCloseBtn()?1:-1)}}let ie=(()=>{class ${visible=(0,C.geq)(!0);closeOnBackgroundClick=(0,C.hFB)(!0);displayCloseBtn=(0,C.hFB)(!0);label=(0,C.hFB)("");title=(0,C.hFB)("");subtitle=(0,C.hFB)("");minWidth=(0,C.hFB)();close=(0,C.CGW)();dialogRef=C.ebz.required("dialog");effectiveTitle=(0,h.EW)(()=>this.title()||this.label());constructor(){(0,p.QZP)(()=>{const w=this.dialogRef().nativeElement;this.visible()?w.open||w.showModal():w.open&&w.close()})}onBackdropClick(){this.closeOnBackgroundClick()&&this.onClose()}onClose(){this.visible.set(!1),this.close.emit()}static \u0275fac=function(B){return new(B||$)};static \u0275cmp=s.VBU({type:$,selectors:[["cue-modal"]],viewQuery:function(B,L){1&B&&s.wEZ(L.dialogRef,e,5),2&B&&s.NyB()},inputs:{visible:[1,"visible"],closeOnBackgroundClick:[1,"closeOnBackgroundClick"],displayCloseBtn:[1,"displayCloseBtn"],label:[1,"label"],title:[1,"title"],subtitle:[1,"subtitle"],minWidth:[1,"minWidth"]},outputs:{visible:"visibleChange",close:"close"},ngContentSelectors:M,decls:3,vars:1,consts:[["dialog",""],[1,"modal-dialog",3,"cancel","click"],[1,"panel",3,"has-header","minWidth"],[1,"panel",3,"click"],[1,"header"],[1,"body"],[1,"header-text"],[1,"modal-title"],[1,"modal-subtitle"],["type","button","aria-label","Close",1,"close-btn"],["type","button","aria-label","Close",1,"close-btn",3,"click"],["viewBox","0 0 256 256","xmlns","http://www.w3.org/2000/svg"],["fill","currentColor","d","M205.66 194.34a8 8 0 0 1-11.32 11.32L128 139.31l-66.34 66.35a8 8 0 0 1-11.32-11.32L116.69 128L61.34 72.66a8 8 0 0 1 11.32-11.32L128 116.69l66.34-66.35a8 8 0 0 1 11.32 11.32L139.31 128Z"]],template:function(B,L){1&B&&(s.NAR(D),s.rj2(0,"dialog",1,0),s.VwU("cancel",function(){return L.onClose()})("click",function(){return L.onBackdropClick()}),s.nVh(2,G,5,5,"div",2),s.eux()),2&B&&(s.R7$(2),s.vxM(L.visible()?2:-1))},styles:[".modal-dialog[_ngcontent-%COMP%]{padding:0;border:none;background:transparent;overflow:visible;margin:auto;outline:none;max-width:min(calc(100vw - 32px),80vw)}.modal-dialog[_ngcontent-%COMP%]::backdrop{background-color:var(--cue-modal-overlay-color, rgba(14, 24, 39, .55));-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.panel[_ngcontent-%COMP%]{background:var(--cue-default);color:var(--cue-defaultContrast);border-radius:24px;border:1px solid var(--cue-border-color);box-shadow:0 12px 48px #00000047;max-height:88vh;overflow-y:auto;overflow-x:hidden;box-sizing:border-box;scrollbar-width:thin}.header[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:12px;padding:26px 26px 0;margin-bottom:20px}.header-text[_ngcontent-%COMP%]{flex:1}.modal-title[_ngcontent-%COMP%]{margin:0;font-size:20px;font-weight:700;letter-spacing:-.01em;font-family:var(--cue-font-family);color:var(--cue-defaultContrast)}.modal-subtitle[_ngcontent-%COMP%]{margin:5px 0 0;font-size:13px;color:var(--cue-color-midgray);letter-spacing:.02em;line-height:1.5}.close-btn[_ngcontent-%COMP%]{flex:none;width:34px;height:34px;border-radius:50%;border:none;background:transparent;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--cue-color-midgray);padding:0;margin-top:-4px;transition:background .15s,color .15s}.close-btn[_ngcontent-%COMP%]:hover{background:var(--cue-main-background);color:var(--cue-main-foreground)}.close-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:18px;height:18px;display:block}.body[_ngcontent-%COMP%]{padding:26px}.has-header[_ngcontent-%COMP%] .body[_ngcontent-%COMP%]{padding-top:0}"]})}return $})()},2399(J,V,u){"use strict";u.d(V,{CueDocumentViewer:()=>Se});var C=u(467),p=u(7705),h=u(2271),s=u(5802),e=u(5547),D=u(9769),M=u(5381),_=u(2245),F=u(1024),k=u(9421),R=u(5794),G=u(9352),ie=u(6117),$=u(8547),U=u(3319),w=u(5971),B=u(7573);const L=(o,y)=>t=>t.isHighlight;function A(o,y){if(1&o&&(e.j41(0,"span",3),e.EFF(1),e.k0s()),2&o){const t=e.XpG(2).$implicit;e.R7$(),e.JRh(t.highlight.label)}}function ce(o,y){if(1&o){const t=e.RV6();e.j41(0,"cue-button",5),e.bIt("click",function(i){s.eBV(t);const a=e.XpG(2).$implicit,c=e.XpG();return s.Njj(c.onDeleteHighlight(i,a.highlight))}),e.nrm(1,"cue-button-icon",6),e.k0s()}}function oe(o,y){if(1&o){const t=e.RV6();e.j41(0,"span",2),e.bIt("click",function(){s.eBV(t);const i=e.XpG().$implicit,a=e.XpG();return s.Njj(a.onHighlightClick(i.highlight))}),e.nVh(1,A,2,1,"span",3),e.EFF(2),e.nVh(3,ce,2,0,"cue-button",4),e.k0s()}if(2&o){const t=e.XpG().$implicit,n=e.XpG();e.BMQ("data-segment-start",t.segmentStart),e.R7$(),e.vxM(t.highlight.label?1:-1),e.R7$(),e.SpI(" ",t.text," "),e.R7$(),e.vxM(n.allowDelete()?3:-1)}}function Z(o,y){if(1&o&&(e.j41(0,"span"),e.EFF(1),e.k0s()),2&o){const t=e.XpG().$implicit;e.BMQ("data-segment-start",t.segmentStart),e.R7$(),e.JRh(t.text)}}function S(o,y){if(1&o&&e.nVh(0,oe,4,4,"span",1)(1,Z,2,2,"span"),2&o){const t=y.$implicit;e.vxM(t.isHighlight&&t.highlight?0:1)}}let P=(()=>{class o{path=p.hFB.required();highlights=(0,p.hFB)([]);allowDelete=(0,p.hFB)(!1);allowAdd=(0,p.hFB)(!1);size=(0,p.hFB)("m");highlightClick=(0,p.CGW)();deleteHighlight=(0,p.CGW)();textSelected=(0,p.CGW)();segments=(0,h.EW)(()=>this.parseSegments(this.path(),this.highlights()));parseSegments(t,n){const i=n.filter(x=>x.path===t);if(0===i.length)return[{text:t,isHighlight:!1,segmentStart:0}];const a=[...i].sort((x,q)=>x.start-q.start),c=[];let f=0;for(const x of a)x.start>f&&c.push({text:t.substring(f,x.start),isHighlight:!1,segmentStart:f}),c.push({text:t.substring(x.start,x.end),isHighlight:!0,highlight:x,segmentStart:x.start}),f=x.end;return f<t.length&&c.push({text:t.substring(f),isHighlight:!1,segmentStart:f}),c}onHighlightClick(t){const n=this.path().substring(t.start,t.end);this.highlightClick.emit({path:this.path(),highlight:t,text:n})}onDeleteHighlight(t,n){t.stopPropagation(),this.deleteHighlight.emit({path:this.path(),highlight:n})}onMouseUp(t){if(!this.allowAdd())return;const n=window.getSelection();if(!n||n.isCollapsed||!n.rangeCount||!n.toString().trim())return;const a=n.getRangeAt(0),c=t.currentTarget,f=this.getAbsoluteOffset(c,a.startContainer,a.startOffset),x=this.getAbsoluteOffset(c,a.endContainer,a.endOffset);n.removeAllRanges(),x>f&&this.textSelected.emit({path:this.path(),start:f,end:x,text:this.path().substring(f,x)})}getAbsoluteOffset(t,n,i){let a=n.nodeType===Node.TEXT_NODE?n.parentElement:n;for(;a&&a!==t;){if(a instanceof HTMLElement&&a.hasAttribute("data-segment-start")){const q=parseInt(a.getAttribute("data-segment-start"),10);let X=0;const ae=document.createTreeWalker(a,NodeFilter.SHOW_TEXT);let ne=ae.nextNode();for(;ne&&ne!==n;)X+=ne.textContent?.length??0,ne=ae.nextNode();return q+X+i}a=a.parentElement}const c=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);let f=0,x=c.nextNode();for(;x&&x!==n;)f+=x.textContent?.length??0,x=c.nextNode();return f+i}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-file-path-viewer"]],inputs:{path:[1,"path"],highlights:[1,"highlights"],allowDelete:[1,"allowDelete"],allowAdd:[1,"allowAdd"],size:[1,"size"]},outputs:{highlightClick:"highlightClick",deleteHighlight:"deleteHighlight",textSelected:"textSelected"},decls:3,vars:7,consts:[[1,"path-content",3,"mouseup"],[1,"highlight-segment"],[1,"highlight-segment",3,"click"],[1,"highlight-label"],["size","xs","aria-label","Remove highlight",1,"delete-button"],["size","xs","aria-label","Remove highlight",1,"delete-button",3,"click"],["icon","close"]],template:function(n,i){1&n&&(e.j41(0,"div",0),e.bIt("mouseup",function(c){return i.onMouseUp(c)}),e.Z7z(1,S,2,1,null,null,e.Vm6),e.k0s()),2&n&&(e.AVh("size-s","s"===i.size())("allow-add",i.allowAdd())("has-highlights",i.segments().some(e._m7(6,L,i))),e.R7$(),e.Dyx(i.segments()))},dependencies:[D.MD,w.Button,U.ButtonIcon],styles:["[_nghost-%COMP%]{display:contents}.path-content[_ngcontent-%COMP%]{display:block;flex:1;min-width:0;word-break:break-all;text-align:start;font-family:var(--cue-font-family);font-size:var(--cue-font-m-size);line-height:var(--cue-font-m-line-height);letter-spacing:var(--cue-font-m-letter-spacing);font-weight:var(--cue-font-weight-regular)}.path-content.size-s[_ngcontent-%COMP%]{font-size:var(--cue-font-s-size);line-height:var(--cue-font-s-line-height);letter-spacing:var(--cue-font-s-letter-spacing)}.path-content.allow-add[_ngcontent-%COMP%]{cursor:text;-webkit-user-select:text;user-select:text}.path-content.has-highlights[_ngcontent-%COMP%]{padding-top:.8rem;line-height:2.3rem}.highlight-segment[_ngcontent-%COMP%]{display:inline-block;vertical-align:text-bottom;position:relative;line-height:normal;font-weight:var(--cue-font-weight-medium);cursor:pointer;padding:0 .2rem;border-radius:3px;border:1px solid currentColor;transition:all .2s ease}.highlight-segment[_ngcontent-%COMP%] .highlight-label[_ngcontent-%COMP%]{font-family:var(--cue-font-family);position:absolute;bottom:100%;left:0;font-size:.5rem;line-height:1;opacity:.7;margin-bottom:.15rem;white-space:nowrap;pointer-events:none}.highlight-segment[_ngcontent-%COMP%] .delete-button[_ngcontent-%COMP%]{position:absolute;top:-12px;right:-12px;z-index:10;opacity:0;transition:opacity .2s ease;pointer-events:none}.highlight-segment[_ngcontent-%COMP%]:hover{background:color-mix(in srgb,currentColor 12%,transparent)}.highlight-segment[_ngcontent-%COMP%]:hover .delete-button[_ngcontent-%COMP%]{opacity:1;pointer-events:all}"],changeDetection:0})}return o})();var ee=u(5745),le=u(63),m=u(9695),d=u(5448),l=u(2611);const g=o=>({count:o}),r=(o,y)=>t=>t.iri;function v(o,y){1&o&&(e.j41(0,"cue-typography",11),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&o&&(e.R7$(),e.JRh(e.bMT(2,1,"components.documentInfo.infoLoadingFilePaths")))}function b(o,y){if(1&o){const t=e.RV6();e.j41(0,"cue-ag-grid",16),e.bIt("selectedRows",function(i){s.eBV(t);const a=e.XpG(4);return s.Njj(a.onMatchedPathsSelectionChange(i))}),e.k0s()}if(2&o){const t=e.XpG(4);e.Y8G("rowData",t._matchTableRowData())("columnDefs",t._matchTableColDefs())("rowSelection",t._matchTableRowSelection)}}function E(o,y){if(1&o){const t=e.RV6();e.j41(0,"cue-flexcontainer",12)(1,"cue-button",13),e.bIt("click",function(){s.eBV(t);const i=e.XpG(3);return s.Njj(i._matchTableExpanded.set(!i._matchTableExpanded()))}),e.nrm(2,"cue-button-icon",14),e.j41(3,"cue-button-label"),e.EFF(4),e.nI1(5,"transloco"),e.k0s()(),e.nVh(6,b,1,3,"cue-ag-grid",15),e.k0s(),e.j41(7,"cue-typography",11),e.EFF(8),e.nI1(9,"transloco"),e.k0s()}if(2&o){const t=e.XpG(3);e.R7$(2),e.Y8G("icon",t._matchTableExpanded()?"arrow-up":"arrow-dropdown"),e.R7$(2),e.JRh(e.i5U(5,4,1===t._matchCount()?"components.documentInfo.filePathMatched":"components.documentInfo.filePathsMatched",e.eq3(10,g,t._matchCount()))),e.R7$(2),e.vxM(t._matchTableExpanded()?6:-1),e.R7$(2),e.JRh(e.i5U(9,7,"components.documentInfo.applyToNPaths",e.eq3(12,g,t._selectedPaths().length)))}}function T(o,y){if(1&o&&e.nVh(0,v,3,3,"cue-typography",11)(1,E,10,14),2&o){const t=e.XpG(2);e.vxM(t._fileLocationsLoading()?0:null!==t._fileLocations()?1:-1)}}function I(o,y){if(1&o){const t=e.RV6();e.j41(0,"cue-flexcontainer",9)(1,"cue-input-switch",10),e.bIt("toggleChange",function(i){s.eBV(t);const a=e.XpG();return s.Njj(a.onApplyToAllChange(i))}),e.k0s(),e.j41(2,"cue-typography",11),e.EFF(3),e.nI1(4,"transloco"),e.k0s()(),e.nVh(5,T,2,1)}if(2&o){const t=e.XpG();e.R7$(),e.Y8G("checked",t._applyToAllFiles()),e.R7$(2),e.JRh(e.bMT(4,3,"components.documentInfo.applyToAllFiles")),e.R7$(2),e.vxM(t._applyToAllFiles()?5:-1)}}function O(o,y){if(1&o&&(e.j41(0,"cue-typography",8),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.Lme("",e.bMT(2,2,"components.documentInfo.errorSavingEntityMention"),": ",t._saveError())}}let N=(()=>{class o{selection=p.hFB.required();availableEntityCategories=(0,p.hFB)([]);fileLocations=(0,p.hFB)([]);requestFileLocations=(0,p.hFB)(void 0);requestFilePathEntityAdd=(0,p.hFB)(void 0);confirm=(0,p.CGW)();cancel=(0,p.CGW)();_selectedEntityCategory=(0,s.vPA)("");_applyToAllFiles=(0,s.vPA)(!1);_fileLocations=(0,s.vPA)(null);_fileLocationsLoading=(0,s.vPA)(!1);_matchTableExpanded=(0,s.vPA)(!1);_selectedPaths=(0,s.vPA)([]);_saving=(0,s.vPA)(!1);_saveError=(0,s.vPA)(null);_dirPrefix=(0,h.EW)(()=>{const t=this.selection();return t.path.substring(0,t.end)});_matchedLocations=(0,h.EW)(()=>{const t=this._fileLocations();if(!t)return[];const n=this._dirPrefix();return t.filter(i=>i.path.startsWith(n))});_matchCount=(0,h.EW)(()=>this._matchedLocations().length);_matchTableRowData=(0,h.EW)(()=>this._matchedLocations().map(t=>({iri:t.iri,path:t.path,providerId:t.providerId})));_entityCategoryLabelMap=(0,h.EW)(()=>this.availableEntityCategories().reduce((t,n)=>(t[n.iri]=n.label,t),{}));_matchTableRowSelection={mode:"multiRow",selectAll:"filtered"};_filePathLabel=(0,G.Xx)("components.contentBlocks.documentViewer.labelFilePath");_matchTableColDefs=(0,h.EW)(()=>[{headerName:this._filePathLabel(),field:"path",flex:1,filter:!0,sortable:!0}]);onEntityCategoryChange(t){this._selectedEntityCategory.set("string"==typeof t?t:String(t??""))}onApplyToAllChange(t){var n=this;return(0,C.A)(function*(){if(n._applyToAllFiles.set(t),n._matchTableExpanded.set(!1),!t)return n._fileLocations.set(null),void n._selectedPaths.set([]);const i=n.requestFileLocations();if(i){n._fileLocationsLoading.set(!0);try{const a=yield i();n._fileLocations.set(a);const c=n._dirPrefix();n._selectedPaths.set(a.filter(f=>f.path.startsWith(c)))}finally{n._fileLocationsLoading.set(!1)}}})()}onMatchedPathsSelectionChange(t){const n=this._fileLocations()??[];this._selectedPaths.set(t.map(i=>n.find(a=>a.path===i.path)??{iri:"",path:i.path}))}onConfirm(){var t=this;return(0,C.A)(function*(){const n=t._selectedEntityCategory();if(!n)return;const i=t.selection().path,a=t._fileLocations()?.find(x=>x.path===i)??t.fileLocations().find(x=>x.path===i)??{iri:"",path:i},c=t._applyToAllFiles()&&t._selectedPaths().length>0?t._selectedPaths():[a],f=t.requestFilePathEntityAdd();if(f){t._saving.set(!0),t._saveError.set(null);try{yield f(n,c)}catch(x){return console.error("[EntityMentionModal] Failed to save entity mention:",x),t._saveError.set(x instanceof Error?x.message:String(x)),void t._saving.set(!1)}t._saving.set(!1)}t.confirm.emit({entityCategory:n,paths:c})})()}onCancel(){this.cancel.emit()}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-entity-mention-modal"]],inputs:{selection:[1,"selection"],availableEntityCategories:[1,"availableEntityCategories"],fileLocations:[1,"fileLocations"],requestFileLocations:[1,"requestFileLocations"],requestFilePathEntityAdd:[1,"requestFilePathEntityAdd"]},outputs:{confirm:"confirm",cancel:"cancel"},decls:18,vars:24,consts:[[3,"close","displayCloseBtn","closeOnBackgroundClick"],[1,"modal-content"],["direction","column","gap","m"],[3,"key","val"],[3,"valueChange","value","options","labelMap","label","showFilter"],["direction","row","justify","center"],[3,"click","disabled"],["variant","secondary",3,"click","disabled"],["size","s",2,"color","var(--cue-error)"],["direction","row","gap","s","align","center"],[3,"toggleChange","checked"],["size","s"],["direction","column","gap","xs"],["variant","ghost","size","xs",3,"click"],[3,"icon"],["size","s","height","220px",3,"rowData","columnDefs","rowSelection"],["size","s","height","220px",3,"selectedRows","rowData","columnDefs","rowSelection"]],template:function(n,i){1&n&&(e.j41(0,"cue-modal",0),e.bIt("close",function(){return i.onCancel()}),e.j41(1,"div",1)(2,"cue-flexcontainer",2),e.nrm(3,"cue-key-val",3),e.nI1(4,"transloco"),e.j41(5,"cue-select",4),e.nI1(6,"transloco"),e.bIt("valueChange",function(c){return i.onEntityCategoryChange(c)}),e.k0s(),e.nVh(7,I,6,5),e.j41(8,"cue-flexcontainer",5)(9,"cue-button",6),e.bIt("click",function(){return i.onCancel()}),e.j41(10,"cue-button-label"),e.EFF(11),e.nI1(12,"transloco"),e.k0s()(),e.j41(13,"cue-button",7),e.bIt("click",function(){return i.onConfirm()}),e.j41(14,"cue-button-label"),e.EFF(15),e.nI1(16,"transloco"),e.k0s()()(),e.nVh(17,O,3,4,"cue-typography",8),e.k0s()()()),2&n&&(e.Y8G("displayCloseBtn",!1)("closeOnBackgroundClick",!1),e.R7$(3),e.Y8G("key",e.bMT(4,15,"components.documentInfo.labelSelectedText"))("val",i.selection().text),e.R7$(2),e.Y8G("value",i._selectedEntityCategory())("options",i.availableEntityCategories().map(e._m7(17,r,i)))("labelMap",i._entityCategoryLabelMap())("label",e.bMT(6,18,"components.entityInfo.labelEntityCategory"))("showFilter",i.availableEntityCategories().length>5),e.R7$(2),e.vxM(i.requestFileLocations()?7:-1),e.R7$(2),e.Y8G("disabled",i._saving()),e.R7$(2),e.JRh(e.bMT(12,20,"components.modals.rdfEdit.buttonCancel")),e.R7$(2),e.Y8G("disabled",!i._selectedEntityCategory()||i._saving()),e.R7$(2),e.JRh(e.bMT(16,22,"components.modals.rdfEdit.buttonSave")),e.R7$(2),e.vxM(i._saveError()?17:-1))},dependencies:[M.FlexContainer,k.F,U.ButtonIcon,w.Button,d.ButtonLabel,_.Typography,ee.a,le.Select,m.Switch,l.R,G.Kj],styles:[".modal-content[_ngcontent-%COMP%]{width:640px;max-width:calc(100vw - 32px)}"],changeDetection:0})}return o})();const Y=()=>[];function z(o,y){if(1&o&&(e.nrm(0,"cue-key-val",6),e.nI1(1,"transloco")),2&o){const t=e.XpG(2);e.Y8G("key",e.bMT(1,2,"components.contentBlocks.documentViewer.labelSubject"))("val",t.subject())}}function K(o,y){if(1&o&&(e.j41(0,"cue-key-val-list"),e.nVh(1,z,2,4,"cue-key-val",6),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.vxM(t.subject()?1:-1)}}function H(o,y){if(1&o&&(e.j41(0,"cue-flexcontainer",4)(1,"cue-menu",7)(2,"cue-button",8,0),e.nrm(4,"cue-button-icon",9),e.k0s(),e.nrm(5,"cue-menu-nested",10),e.k0s()()),2&o){const t=e.XpG();e.R7$(5),e.Y8G("items",t.menuItems())}}function j(o,y){if(1&o&&(e.nrm(0,"cue-key-val-editable",11),e.nI1(1,"transloco"),e.nI1(2,"transloco")),2&o){const t=e.XpG(2);e.Y8G("key",1===t.contentCategories().length?e.bMT(1,4,"components.contentBlocks.documentViewer.labelContentCategory"):e.bMT(2,6,"components.contentBlocks.documentViewer.labelContentCategories"))("val",t.contentCategoriesString())("rdfConfig",t.rdfEditConfig())("editDisabled",!t.contentCategoriesEditable())}}function W(o,y){if(1&o&&(e.j41(0,"span",15),e.EFF(1),e.k0s()),2&o){const t=e.XpG(3);e.R7$(),e.Lme("(",t.currentFilePathIndex()+1,"/",t.fileLocations().length,")")}}function Q(o,y){if(1&o){const t=e.RV6();e.j41(0,"cue-button",19),e.bIt("click",function(){s.eBV(t);const i=e.XpG(3);return s.Njj(i.prevFilePath())}),e.nrm(1,"cue-button-icon",20),e.k0s()}if(2&o){const t=e.XpG(3);e.Y8G("disabled",0===t.currentFilePathIndex())}}function te(o,y){if(1&o){const t=e.RV6();e.j41(0,"cue-button",19),e.bIt("click",function(){s.eBV(t);const i=e.XpG(3);return s.Njj(i.nextFilePath())}),e.nrm(1,"cue-button-icon",21),e.k0s()}if(2&o){const t=e.XpG(3);e.Y8G("disabled",t.currentFilePathIndex()===t.fileLocations().length-1)}}function he(o,y){if(1&o){const t=e.RV6();e.j41(0,"dl",12)(1,"dt",13)(2,"cue-typography",14),e.EFF(3),e.nI1(4,"transloco"),e.nVh(5,W,2,2,"span",15),e.k0s()(),e.j41(6,"dd",16),e.nVh(7,Q,2,1,"cue-button",17),e.j41(8,"cue-file-path-viewer",18),e.bIt("textSelected",function(i){s.eBV(t);const a=e.XpG(2);return s.Njj(a.onTextSelected(i))}),e.k0s(),e.nVh(9,te,2,1,"cue-button",17),e.k0s()()}if(2&o){const t=e.XpG(2);e.R7$(3),e.SpI(" ",e.bMT(4,8,"components.contentBlocks.documentViewer.labelFilePath")," "),e.R7$(2),e.vxM(t.fileLocations().length>1?5:-1),e.R7$(2),e.vxM(t.fileLocations().length>1?7:-1),e.R7$(),e.Y8G("path",t.fileLocations()[t.currentFilePathIndex()].path)("highlights",t.filePathEntitiesVisible()?t.filePathHighlights():e.lJ4(10,Y))("allowDelete",t.filePathEntitiesEditable())("allowAdd",t.filePathEntitiesEditable()),e.R7$(),e.vxM(t.fileLocations().length>1?9:-1)}}function ge(o,y){if(1&o&&(e.j41(0,"cue-key-val-list"),e.nrm(1,"hr"),e.nVh(2,j,3,8,"cue-key-val-editable",11),e.nVh(3,he,10,11,"dl",12),e.k0s()),2&o){const t=e.XpG();e.R7$(2),e.vxM(t.contentCategories()&&t.contentCategories().length>0?2:-1),e.R7$(),e.vxM(t.fileLocations().length>0?3:-1)}}function fe(o,y){if(1&o){const t=e.RV6();e.j41(0,"cue-entity-mention-modal",22),e.bIt("confirm",function(i){s.eBV(t);const a=e.XpG();return s.Njj(a.onEntityMentionConfirm(i))})("cancel",function(){s.eBV(t);const i=e.XpG();return s.Njj(i.onEntityMentionCancel())}),e.k0s()}if(2&o){const t=e.XpG();e.Y8G("selection",t._pendingSelection())("availableEntityCategories",t.availableEntityCategories())("fileLocations",t.fileLocations())("requestFileLocations",t._fileLocationsProvider())("requestFilePathEntityAdd",t._requestFilePathEntityAdd())}}let pe=(()=>{class o{subject=p.hFB.required();handlers=p.hFB.required();dataChanged=(0,p.CGW)();filePathEntityAdded=(0,p.CGW)();fileLocations=(0,p.hFB)([]);_fileLocationsProvider=(0,h.EW)(()=>{const t=this.handlers().requestFileLocations;if(t)return t;const n=this.fileLocations();return n.length?()=>Promise.resolve(n):void 0});filePathEntities=(0,p.geq)([]);contentCategories=(0,p.hFB)([]);contentCategoriesEditable=(0,p.hFB)(!1);filePathEntitiesVisible=(0,p.hFB)(!1);filePathEntitiesEditable=(0,p.hFB)(!1);menuItems=(0,p.hFB)([]);availableContentCategories=(0,p.hFB)([]);availableEntityCategories=(0,p.hFB)([]);collapsed=(0,p.hFB)(!1);hasDocInfo=(0,h.EW)(()=>{const t=""!==this.subject(),n=this.fileLocations().length>0;return t||n});currentFilePathIndex=(0,s.vPA)(0);_entityCategoryModalVisible=(0,s.vPA)(!1);_pendingSelection=(0,s.vPA)(null);_requestFilePathEntityAdd=(0,h.EW)(()=>{var t=this;const n=this.handlers().requestFilePathEntityAdd;if(n)return function(){var i=(0,C.A)(function*(a,c){const f=t._pendingSelection();f&&(yield n({paths:c,start:f.start,end:f.end,text:f.text,entityCategory:a,folderPath:f.path.substring(0,f.end)}))});return function(a,c){return i.apply(this,arguments)}}()});prevFilePath(){this.currentFilePathIndex()>0&&this.currentFilePathIndex.update(t=>t-1)}nextFilePath(){this.currentFilePathIndex()<this.fileLocations().length-1&&this.currentFilePathIndex.update(t=>t+1)}filePathHighlights=(0,h.EW)(()=>this.filePathEntities().map(t=>({path:t.path,start:t.startIndex,end:t.endIndex,label:this.availableEntityCategories().find(n=>n.iri===t.entityCategory)?.label??t.entityCategory.split("/").pop()??t.entityCategory})));entityCategoryLabelMap=(0,h.EW)(()=>this.availableEntityCategories().reduce((t,n)=>(t[n.iri]=n.label,t),{}));onTextSelected(t){this._pendingSelection.set(t),this._entityCategoryModalVisible.set(!0)}onEntityMentionConfirm(t){const n=this._pendingSelection();n&&(this.filePathEntities.update(i=>[...i,...t.paths.map(a=>({path:a.path,entityCategory:t.entityCategory,startIndex:n.start,endIndex:n.end}))]),this.filePathEntityAdded.emit({paths:t.paths,start:n.start,end:n.end,text:n.text,entityCategory:t.entityCategory,folderPath:n.path.substring(0,n.end)}),this._entityCategoryModalVisible.set(!1),this._pendingSelection.set(null))}onEntityMentionCancel(){this._entityCategoryModalVisible.set(!1),this._pendingSelection.set(null)}_contentCategories=(0,h.uu)(()=>this.contentCategories());contentCategoriesString=(0,h.EW)(()=>this._contentCategories().map(t=>this._iriToString(t)).sort().join(", "));_iriToString(t){const n=this.availableContentCategories()?.find(i=>i.iri===t);return n?n.label:t}infoChangeContentCategory=(0,G.Xx)("components.documentInfo.infoChangeContentCategory");rdfEditConfig=(0,h.EW)(()=>{var t=this;const n=this.handlers()?.requestRDFChange;var i;if(void 0!==n)return{message:this.infoChangeContentCategory(),existingValue:this._contentCategories(),dataType:"multiselect",options:this.availableContentCategories()?.map(i=>i.iri),optionLabelMap:this.availableContentCategories()?.reduce((i,a)=>(i[a.iri]=a.label,i),{}),requestSave:(i=(0,C.A)(function*(a){console.log(a);const c={subject:t.subject(),predicate:`${B.E.qcy}contentCategory`,objects:t._contentCategories(),newObjects:a.newValue,type:"contentCategory",comment:a.comment};yield n(c),t._contentCategories.set(a.newValue),t.dataChanged.emit({contentCategories:a.newValue})}),function(c){return i.apply(this,arguments)})};console.warn("No RDF change request handler defined")});static \u0275fac=function(n){return new(n||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-document-info"]],inputs:{subject:[1,"subject"],handlers:[1,"handlers"],fileLocations:[1,"fileLocations"],filePathEntities:[1,"filePathEntities"],contentCategories:[1,"contentCategories"],contentCategoriesEditable:[1,"contentCategoriesEditable"],filePathEntitiesVisible:[1,"filePathEntitiesVisible"],filePathEntitiesEditable:[1,"filePathEntitiesEditable"],menuItems:[1,"menuItems"],availableContentCategories:[1,"availableContentCategories"],availableEntityCategories:[1,"availableEntityCategories"],collapsed:[1,"collapsed"]},outputs:{dataChanged:"dataChanged",filePathEntityAdded:"filePathEntityAdded",filePathEntities:"filePathEntitiesChange"},decls:7,vars:4,consts:[["trigger",""],["direction","column",2,"min-height","50px"],["direction","row"],["direction","column",2,"flex","1 1"],["direction","column",2,"width","50px"],[3,"selection","availableEntityCategories","fileLocations","requestFileLocations","requestFilePathEntityAdd"],["size","l",3,"key","val"],["positioning","bottomleft"],["trigger","","variant","tertiary"],["icon","more-vert"],["menu","",3,"items"],["size","s",3,"key","val","rdfConfig","editDisabled"],[1,"file-path-nav-container"],[1,"file-path-label"],["size","xs"],[1,"path-counter"],[1,"file-path-row"],["variant","tertiary","size","xs",3,"disabled"],["size","s",3,"textSelected","path","highlights","allowDelete","allowAdd"],["variant","tertiary","size","xs",3,"click","disabled"],["icon","paginator-back"],["icon","paginator-next"],[3,"confirm","cancel","selection","availableEntityCategories","fileLocations","requestFileLocations","requestFilePathEntityAdd"]],template:function(n,i){1&n&&(e.j41(0,"cue-flexcontainer",1)(1,"cue-flexcontainer",2)(2,"cue-flexcontainer",3),e.nVh(3,K,2,1,"cue-key-val-list"),e.k0s(),e.nVh(4,H,6,1,"cue-flexcontainer",4),e.k0s(),e.nVh(5,ge,4,2,"cue-key-val-list"),e.k0s(),e.nVh(6,fe,1,5,"cue-entity-mention-modal",5)),2&n&&(e.R7$(3),e.vxM(i.fileLocations().length>0||i.subject()?3:-1),e.R7$(),e.vxM(i.menuItems().length>0?4:-1),e.R7$(),e.vxM(!i.collapsed()&&i.hasDocInfo()?5:-1),e.R7$(),e.vxM(i._entityCategoryModalVisible()&&i._pendingSelection()?6:-1))},dependencies:[M.FlexContainer,F.p,k.F,R.L,ie.W,$.T,U.ButtonIcon,w.Button,P,_.Typography,N,G.Kj],styles:[".file-path-nav-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.file-path-label[_ngcontent-%COMP%]{display:block;margin:0}.file-path-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px;margin:0;overflow:visible;padding:1px}.file-path-row[_ngcontent-%COMP%] cue-file-path-viewer[_ngcontent-%COMP%]{flex:1;overflow:visible;min-width:0}.path-counter[_ngcontent-%COMP%]{opacity:.6}"],changeDetection:0})}return o})();class me{requestRDFChange;requestFileLocations;requestFilePathEntityAdd}var _e=u(2065),ve=u(5187),be=u(7293);const Ce=["viewerHost"];function ye(o,y){if(1&o&&e.nrm(0,"cue-document-info",4),2&o){const t=e.XpG(2);e.Y8G("subject",t._docSubject())("handlers",t._docInfoHandlers)("menuItems",t._menuItems())}}function Me(o,y){1&o&&(e.j41(0,"cue-flexcontainer",5)(1,"cue-typography"),e.EFF(2,"Loading\u2026"),e.k0s()())}function xe(o,y){if(1&o&&(e.j41(0,"cue-flexcontainer",5)(1,"cue-typography",8),e.EFF(2),e.k0s()()),2&o){const t=e.XpG(2);e.R7$(2),e.JRh(t.errorMessage())}}function we(o,y){if(1&o&&e.nrm(0,"cue-logo-link",7),2&o){const t=e.XpG(2);e.Y8G("projectId",t.projectId())("resourceId",t._uuidOnly())}}function De(o,y){if(1&o&&(e.j41(0,"div",3),e.nVh(1,ye,1,3,"cue-document-info",4),e.nVh(2,Me,3,0,"cue-flexcontainer",5)(3,xe,3,1,"cue-flexcontainer",5),e.j41(4,"div",6),e.eu8(5,null,1),e.k0s(),e.nVh(7,we,1,2,"cue-logo-link",7),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.vxM(t.showDocumentInfo()&&"ready"===t.state()?1:-1),e.R7$(),e.vxM("loading"===t.state()?2:"error"===t.state()?3:-1),e.R7$(5),e.vxM(t.showLogo()?7:-1)}}function Pe(o,y){1&o&&e.eu8(0)}function Ee(o,y){if(1&o&&(e.j41(0,"cue-card",2),e.DNE(1,Pe,1,0,"ng-container",9),e.k0s()),2&o){const t=e.XpG(),n=e.sdS(1);e.Y8G("variant",t._cardVariant())("padded",!0),e.R7$(),e.Y8G("ngTemplateOutlet",n)}}function ke(o,y){1&o&&e.eu8(0)}function Fe(o,y){if(1&o&&e.DNE(0,ke,1,0,"ng-container",9),2&o){e.XpG();const t=e.sdS(1);e.Y8G("ngTemplateOutlet",t)}}const Te=[".fragments",".dxf",".pdf",".png",".jpg",".jpeg",".svg",".gif",".webp",".bmp",".avif",".apng",".xlsx",".xls",".csv",".json",".jsonld",".xml",".css",".js",".html",".htm",".sh",".txt",".rst",".md"];let Se=(()=>{class o{set _viewerHostRef(t){if(this._viewerHost=t,t&&this._lastRenderArgs){const{url:n,suffix:i,page:a,viewerTypeOverride:c}=this._lastRenderArgs;this._renderViewer(n,i,a,c)}}_viewerHost;_lastRenderArgs;currentViewerRef;cue=(0,p.hFB)(void 0);uuid=(0,p.hFB)(void 0);projectId=(0,p.hFB)(void 0);showDocumentInfo=(0,p.hFB)(!0,{transform:p.L39});showLogo=(0,p.hFB)(!1,{transform:p.L39});_uuidOnly=(0,h.EW)(()=>{const t=this.uuid();return t?t.split("?")[0].trim():void 0});extraMenuItems=(0,p.hFB)([]);portalBaseURL=(0,p.hFB)("https://cue.qaecy.com");variant=(0,p.hFB)("none");_cardVariant=(0,h.EW)(()=>this.variant());state=(0,s.vPA)("idle");errorMessage=(0,s.vPA)(null);resolvedUrl=(0,s.vPA)(null);resolvedSuffix=(0,s.vPA)(null);_docSubject=(0,s.vPA)("");_alternatives=(0,s.vPA)([]);_originalUuid=(0,s.vPA)(null);_originalDocSuffix=(0,s.vPA)(null);_cueSnapshot=null;_projectIdSnapshot=null;_inputWarningTimer;_blobUrls=new Set;_docInfoHandlers=new me;_menuItems=(0,h.EW)(()=>{const t=[],n=this._originalUuid(),i=this._originalDocSuffix();n&&i&&t.push({icon:"download",label:"Download file",action:()=>this._downloadOriginal()});const a=this._alternatives();if(a.length>1){const c=this.resolvedSuffix();t.push({icon:"document",label:"Alternative representation",children:a.map(f=>({label:f.original?`Original (${f.suffix.replace(".","").toUpperCase()})`:f.suffix.replace(".","").toUpperCase(),tooltip:c===f.suffix?"Currently shown":void 0,action:()=>this._switchToAlternative(f)}))})}return t.push(...this.extraMenuItems()),t});constructor(){this._inputWarningTimer=setTimeout(()=>{this.cue()||console.warn('[cue-document-viewer] Required input "cue" is not set. Pass an authenticated Cue SDK instance.'),this.uuid()||console.warn('[cue-document-viewer] Required input "uuid" is not set. Pass the document UUID to display.'),this.projectId()||console.warn('[cue-document-viewer] Required input "projectId" is not set. Pass the Cue project ID the document belongs to.')},3e3),(0,s.QZP)(()=>{const t=this.cue(),n=this.uuid(),i=this.projectId();t&&n&&i?this._load(t,n,i):this.state.set("idle")})}ngOnDestroy(){clearTimeout(this._inputWarningTimer),this._blobUrls.forEach(t=>URL.revokeObjectURL(t))}_load(t,n,i){var a=this;return(0,C.A)(function*(){if(t&&n&&i){a.state.set("loading"),a.resolvedUrl.set(null),a.resolvedSuffix.set(null),a.errorMessage.set(null),a._docSubject.set(""),a._originalUuid.set(null),a._originalDocSuffix.set(null),a._alternatives.set([]),a._viewerHost?.clear(),a.currentViewerRef?.destroy(),a.currentViewerRef=void 0,a._lastRenderArgs=void 0;try{a._cueSnapshot=t,a._projectIdSnapshot=i;const{uuid:c,page:f}=function $e(o){const[y,t]=o.split("?"),n=y.trim();let i=null;if(t){const c=new URLSearchParams(t).get("page");if(null!==c){const f=parseInt(c,10);!isNaN(f)&&f>0&&(i=f)}}return{uuid:n,page:i}}(n),x=t.createProjectDocuments(i),X=(yield x.fetchDocumentData([c]))[c];if(!X)throw new Error(`Document '${c}' not found in project '${i}'.`);a._docSubject.set(X.subject??""),a._originalUuid.set(c),a._originalDocSuffix.set(X.suffix);const ae=yield x.fetchAlternativeRepresentations(c);a._alternatives.set([{uuid:c,suffix:X.suffix,original:!0},...ae.filter(se=>se.id!==c).map(se=>({uuid:se.id,suffix:se.suffix,original:!1,remoteRelativePath:se.remoteRelativePath}))]);const{uuid:ne,suffix:re,remoteRelativePath:de}=function Re(o,y){const t=[o,...y];let n,i=1/0;for(const a of t){const c=Te.indexOf(a.suffix);-1!==c&&c<i&&(i=c,n=a)}return n?{uuid:n.id,suffix:n.suffix,remoteRelativePath:n.remoteRelativePath}:{uuid:o.id,suffix:o.suffix}}(X,ae),ue=de?yield a._toBlobUrl(t,t.storage.getAltRepDownloadUrl(de),i):yield a._toBlobUrl(t,t.storage.getDownloadUrl(i,ne,re),i);a.resolvedUrl.set(ue),a.resolvedSuffix.set(re);const Ie=[".eml",".msg",".emlx",".mbx"].includes(X.suffix)&&".json"===re?"email":void 0;yield a._renderViewer(ue,re,f,Ie),a.state.set("ready")}catch(c){const f=c instanceof Error?c.message:String(c);console.error("[CueDocumentViewerWC] Failed to load document:",f),a.errorMessage.set(f),a.state.set("error")}}else a.state.set("idle")})()}_toBlobUrl(t,n,i){var a=this;return(0,C.A)(function*(){const c=yield t.auth.authenticatedFetch(n,{headers:{"cue-project-id":i}});if(!c.ok)throw new Error(`Failed to fetch document: ${c.status} ${c.statusText}`);const f=URL.createObjectURL(yield c.blob());return a._blobUrls.add(f),f})()}_renderViewer(t,n,i,a){var c=this;return(0,C.A)(function*(){try{const{DocumentViewer:f}=yield Promise.all([u.e(3418),u.e(3036)]).then(u.bind(u,3036)),{DocumentViewerSettings:x}=yield u.e(3418).then(u.bind(u,3418));c._viewerHost?.clear(),c.currentViewerRef?.destroy();const q=new x;if(null!==i&&(q.pdf.page=String(i)),!c._viewerHost)throw new Error("viewerHost is not yet available \u2014 view has not been initialized.");c._lastRenderArgs={url:t,suffix:n,page:i,viewerTypeOverride:a},c.currentViewerRef=c._viewerHost.createComponent(f),c.currentViewerRef.setInput("url",t),c.currentViewerRef.setInput("suffix",n),c.currentViewerRef.setInput("settings",q),a&&c.currentViewerRef.setInput("viewerTypeOverride",a)}catch(f){throw new Error(`Failed to load viewer component: ${f instanceof Error?f.message:String(f)}`)}})()}_switchToAlternative(t){var n=this;return(0,C.A)(function*(){const i=n._cueSnapshot,a=n._projectIdSnapshot;if(i&&a)try{const c=t.remoteRelativePath?yield n._toBlobUrl(i,i.storage.getAltRepDownloadUrl(t.remoteRelativePath),a):yield n._toBlobUrl(i,i.storage.getDownloadUrl(a,t.uuid,t.suffix),a);n.resolvedUrl.set(c),n.resolvedSuffix.set(t.suffix),yield n._renderViewer(c,t.suffix,null)}catch(c){console.error("[CueDocumentViewerWC] Failed to switch to alternative:",c)}})()}_downloadOriginal(){var t=this;return(0,C.A)(function*(){const n=t._cueSnapshot,i=t._projectIdSnapshot,a=t._originalUuid(),c=t._originalDocSuffix();if(n&&i&&a&&c)try{const f=yield n.storage.downloadBlob(i,a,c);(0,_e.KE)(f,`${a}${c}`)}catch(f){console.error("[CueDocumentViewerWC] Failed to download original:",f)}})()}static \u0275fac=function(n){return new(n||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-document-viewer-wc"]],viewQuery:function(n,i){if(1&n&&e.GBs(Ce,5,e.c1b),2&n){let a;e.mGM(a=e.lsd())&&(i._viewerHostRef=a.first)}},inputs:{cue:[1,"cue"],uuid:[1,"uuid"],projectId:[1,"projectId"],showDocumentInfo:[1,"showDocumentInfo"],showLogo:[1,"showLogo"],extraMenuItems:[1,"extraMenuItems"],portalBaseURL:[1,"portalBaseURL"],variant:[1,"variant"]},decls:4,vars:1,consts:[["body",""],["viewerHost",""],[2,"height","100%","width","100%",3,"variant","padded"],[2,"display","flex","flex-direction","column","height","100%","width","100%","position","relative"],[3,"subject","handlers","menuItems"],["direction","column","align","center","justify","center",2,"flex","1","width","100%"],[2,"flex","1","min-height","0","overflow","hidden"],[2,"position","absolute","bottom","12px","right","12px","z-index","5",3,"projectId","resourceId"],[2,"color","#c44","font-size","13px"],[4,"ngTemplateOutlet"]],template:function(n,i){1&n&&(e.DNE(0,De,8,3,"ng-template",null,0,e.C5r),e.nVh(2,Ee,2,3,"cue-card",2)(3,Fe,1,1,"ng-container")),2&n&&(e.R7$(2),e.vxM("none"!==i.variant()?2:3))},dependencies:[D.MD,D.T3,M.FlexContainer,_.Typography,pe,ve.Card,be.x],styles:["[_nghost-%COMP%]{display:contents}"],changeDetection:0})}return o})()},2065(J,V,u){"use strict";function h(D,M,_="text/plain"){return function C(D,M="data.zip"){const _=document.createElement("a"),F=URL.createObjectURL(D);_.href=F,_.download=M,document.body.appendChild(_),_.click(),document.body.removeChild(_),URL.revokeObjectURL(F)}(new Blob([D],{type:_}),M)}function s(D,M){const _=document.createElement("a");_.style.display="hidden",_.setAttribute("href",window.URL.createObjectURL(D)),_.setAttribute("download",M),document.body.appendChild(_),_.click(),_.remove()}u.d(V,{KE:()=>s,YN:()=>h})},7573(J,V,u){"use strict";u.d(V,{E:()=>C});const C={qcy:"https://dev.qaecy.com/ont#","qcy-e":"https://dev.qaecy.com/enum#","qcy-f":"https://dev.qaecy.com/functions#",obc:"https://w3id.org/obc#",dicc:"https://w3id.org/digitalconstruction/0.5/Contexts#",dicv:"https://w3id.org/digitalconstruction/0.5/Variables#",dice:"https://w3id.org/digitalconstruction/0.5/Entities#",dicp:"https://w3id.org/digitalconstruction/0.5/Processes#",dica:"https://w3id.org/digitalconstruction/0.5/Agents#",dici:"https://w3id.org/digitalconstruction/0.5/Information#",dicbm:"https://w3id.org/digitalconstruction/0.5/Materials#",dicob:"https://w3id.org/digitalconstruction/0.5/Occupancy#",dicl:"https://w3id.org/digitalconstruction/0.5/Lifecycle#",dices:"https://w3id.org/digitalconstruction/0.5/Energy#",dicu:"https://w3id.org/digitalconstruction/0.5/Units#",diclvl:"https://w3id.org/digitalconstruction/0.5/Levels#",dicstg:"https://w3id.org/digitalconstruction/0.5/Stages#"}},7374(J){J.exports=function(){"use strict";var u=6e4,C=36e5,p="millisecond",h="second",s="minute",e="hour",D="day",M="week",_="month",F="quarter",k="year",R="date",G="Invalid Date",ie=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,$=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,U={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(m){var d=["th","st","nd","rd"],l=m%100;return"["+m+(d[(l-20)%10]||d[l]||d[0])+"]"}},w=function(m,d,l){var g=String(m);return!g||g.length>=d?m:""+Array(d+1-g.length).join(l)+m},B={s:w,z:function(m){var d=-m.utcOffset(),l=Math.abs(d),g=Math.floor(l/60),r=l%60;return(d<=0?"+":"-")+w(g,2,"0")+":"+w(r,2,"0")},m:function m(d,l){if(d.date()<l.date())return-m(l,d);var g=12*(l.year()-d.year())+(l.month()-d.month()),r=d.clone().add(g,_),v=l-r<0,b=d.clone().add(g+(v?-1:1),_);return+(-(g+(l-r)/(v?r-b:b-r))||0)},a:function(m){return m<0?Math.ceil(m)||0:Math.floor(m)},p:function(m){return{M:_,y:k,w:M,d:D,D:R,h:e,m:s,s:h,ms:p,Q:F}[m]||String(m||"").toLowerCase().replace(/s$/,"")},u:function(m){return void 0===m}},L="en",A={};A[L]=U;var ce="$isDayjsObject",oe=function(m){return m instanceof ee||!(!m||!m[ce])},Z=function m(d,l,g){var r;if(!d)return L;if("string"==typeof d){var v=d.toLowerCase();A[v]&&(r=v),l&&(A[v]=l,r=v);var b=d.split("-");if(!r&&b.length>1)return m(b[0])}else{var E=d.name;A[E]=d,r=E}return!g&&r&&(L=r),r||!g&&L},S=function(m,d){if(oe(m))return m.clone();var l="object"==typeof d?d:{};return l.date=m,l.args=arguments,new ee(l)},P=B;P.l=Z,P.i=oe,P.w=function(m,d){return S(m,{locale:d.$L,utc:d.$u,x:d.$x,$offset:d.$offset})};var ee=function(){function m(l){this.$L=Z(l.locale,null,!0),this.parse(l),this.$x=this.$x||l.x||{},this[ce]=!0}var d=m.prototype;return d.parse=function(l){this.$d=function(g){var r=g.date,v=g.utc;if(null===r)return new Date(NaN);if(P.u(r))return new Date;if(r instanceof Date)return new Date(r);if("string"==typeof r&&!/Z$/i.test(r)){var b=r.match(ie);if(b){var E=b[2]-1||0,T=(b[7]||"0").substring(0,3);return v?new Date(Date.UTC(b[1],E,b[3]||1,b[4]||0,b[5]||0,b[6]||0,T)):new Date(b[1],E,b[3]||1,b[4]||0,b[5]||0,b[6]||0,T)}}return new Date(r)}(l),this.init()},d.init=function(){var l=this.$d;this.$y=l.getFullYear(),this.$M=l.getMonth(),this.$D=l.getDate(),this.$W=l.getDay(),this.$H=l.getHours(),this.$m=l.getMinutes(),this.$s=l.getSeconds(),this.$ms=l.getMilliseconds()},d.$utils=function(){return P},d.isValid=function(){return this.$d.toString()!==G},d.isSame=function(l,g){var r=S(l);return this.startOf(g)<=r&&r<=this.endOf(g)},d.isAfter=function(l,g){return S(l)<this.startOf(g)},d.isBefore=function(l,g){return this.endOf(g)<S(l)},d.$g=function(l,g,r){return P.u(l)?this[g]:this.set(r,l)},d.unix=function(){return Math.floor(this.valueOf()/1e3)},d.valueOf=function(){return this.$d.getTime()},d.startOf=function(l,g){var r=this,v=!!P.u(g)||g,b=P.p(l),E=function(H,j){var W=P.w(r.$u?Date.UTC(r.$y,j,H):new Date(r.$y,j,H),r);return v?W:W.endOf(D)},T=function(H,j){return P.w(r.toDate()[H].apply(r.toDate("s"),(v?[0,0,0,0]:[23,59,59,999]).slice(j)),r)},I=this.$W,O=this.$M,N=this.$D,Y="set"+(this.$u?"UTC":"");switch(b){case k:return v?E(1,0):E(31,11);case _:return v?E(1,O):E(0,O+1);case M:var z=this.$locale().weekStart||0,K=(I<z?I+7:I)-z;return E(v?N-K:N+(6-K),O);case D:case R:return T(Y+"Hours",0);case e:return T(Y+"Minutes",1);case s:return T(Y+"Seconds",2);case h:return T(Y+"Milliseconds",3);default:return this.clone()}},d.endOf=function(l){return this.startOf(l,!1)},d.$set=function(l,g){var r,v=P.p(l),b="set"+(this.$u?"UTC":""),E=(r={},r[D]=b+"Date",r[R]=b+"Date",r[_]=b+"Month",r[k]=b+"FullYear",r[e]=b+"Hours",r[s]=b+"Minutes",r[h]=b+"Seconds",r[p]=b+"Milliseconds",r)[v],T=v===D?this.$D+(g-this.$W):g;if(v===_||v===k){var I=this.clone().set(R,1);I.$d[E](T),I.init(),this.$d=I.set(R,Math.min(this.$D,I.daysInMonth())).$d}else E&&this.$d[E](T);return this.init(),this},d.set=function(l,g){return this.clone().$set(l,g)},d.get=function(l){return this[P.p(l)]()},d.add=function(l,g){var r,v=this;l=Number(l);var b=P.p(g),E=function(O){var N=S(v);return P.w(N.date(N.date()+Math.round(O*l)),v)};if(b===_)return this.set(_,this.$M+l);if(b===k)return this.set(k,this.$y+l);if(b===D)return E(1);if(b===M)return E(7);var T=(r={},r[s]=u,r[e]=C,r[h]=1e3,r)[b]||1,I=this.$d.getTime()+l*T;return P.w(I,this)},d.subtract=function(l,g){return this.add(-1*l,g)},d.format=function(l){var g=this,r=this.$locale();if(!this.isValid())return r.invalidDate||G;var v=l||"YYYY-MM-DDTHH:mm:ssZ",b=P.z(this),E=this.$H,T=this.$m,I=this.$M,O=r.weekdays,N=r.months,z=function(j,W,Q,te){return j&&(j[W]||j(g,v))||Q[W].slice(0,te)},K=function(j){return P.s(E%12||12,j,"0")},H=r.meridiem||function(j,W,Q){var te=j<12?"AM":"PM";return Q?te.toLowerCase():te};return v.replace($,function(j,W){return W||function(Q){switch(Q){case"YY":return String(g.$y).slice(-2);case"YYYY":return P.s(g.$y,4,"0");case"M":return I+1;case"MM":return P.s(I+1,2,"0");case"MMM":return z(r.monthsShort,I,N,3);case"MMMM":return z(N,I);case"D":return g.$D;case"DD":return P.s(g.$D,2,"0");case"d":return String(g.$W);case"dd":return z(r.weekdaysMin,g.$W,O,2);case"ddd":return z(r.weekdaysShort,g.$W,O,3);case"dddd":return O[g.$W];case"H":return String(E);case"HH":return P.s(E,2,"0");case"h":return K(1);case"hh":return K(2);case"a":return H(E,T,!0);case"A":return H(E,T,!1);case"m":return String(T);case"mm":return P.s(T,2,"0");case"s":return String(g.$s);case"ss":return P.s(g.$s,2,"0");case"SSS":return P.s(g.$ms,3,"0");case"Z":return b}return null}(j)||b.replace(":","")})},d.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},d.diff=function(l,g,r){var v,b=this,E=P.p(g),T=S(l),I=(T.utcOffset()-this.utcOffset())*u,O=this-T,N=function(){return P.m(b,T)};switch(E){case k:v=N()/12;break;case _:v=N();break;case F:v=N()/3;break;case M:v=(O-I)/6048e5;break;case D:v=(O-I)/864e5;break;case e:v=O/C;break;case s:v=O/u;break;case h:v=O/1e3;break;default:v=O}return r?v:P.a(v)},d.daysInMonth=function(){return this.endOf(_).$D},d.$locale=function(){return A[this.$L]},d.locale=function(l,g){if(!l)return this.$L;var r=this.clone(),v=Z(l,g,!0);return v&&(r.$L=v),r},d.clone=function(){return P.w(this.$d,this)},d.toDate=function(){return new Date(this.valueOf())},d.toJSON=function(){return this.isValid()?this.toISOString():null},d.toISOString=function(){return this.$d.toISOString()},d.toString=function(){return this.$d.toUTCString()},m}(),le=ee.prototype;return S.prototype=le,[["$ms",p],["$s",h],["$m",s],["$H",e],["$W",D],["$M",_],["$y",k],["$D",R]].forEach(function(m){le[m[1]]=function(d){return this.$g(d,m[0],m[1])}}),S.extend=function(m,d){return m.$i||(m(d,ee,S),m.$i=!0),S},S.locale=Z,S.isDayjs=oe,S.unix=function(m){return S(1e3*m)},S.en=A[L],S.Ls=A,S.p={},S}()}}]);
|
package/8855.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[8855],{3183(P,x,o){o.d(x,{A:()=>C});var E=o(7705),_=o(5802),u=o(9417),m=o(1359),M=o(8957),T=o(2245),D=o(5381),a=o(5547);const r=(g,c)=>c.value;function v(g,c){if(1&g){const n=a.RV6();a.j41(0,"cue-input",6),a.bIt("valueChange",function(s){_.eBV(n);const t=a.XpG();return t.searchText=s,_.Njj(t.onSearchChange())}),a.k0s()}if(2&g){const n=a.XpG();a.Y8G("value",n.searchText)}}function i(g,c){if(1&g){const n=a.RV6();a.j41(0,"cue-checkbox",7),a.bIt("checkedChange",function(s){const t=_.eBV(n).$implicit,f=a.XpG();return t.selected=s,_.Njj(f.onSelectionChange())}),a.k0s()}if(2&g){const n=c.$implicit;a.Y8G("label",n.value||"(blank)")("checked",n.selected)}}function b(g,c){1&g&&(a.j41(0,"cue-typography",5),a.EFF(1,"No results"),a.k0s())}let C=(()=>{class g{_cdr=(0,_.WQX)(E.gRc);_params;options=[];filteredOptions=[];searchText="";agInit(n){this._params=n}afterGuiAttached(n){this._refreshOptions(),this._cdr.markForCheck()}onNewRowsLoaded(){this._refreshOptions(),this._cdr.markForCheck()}isFilterActive(){return this.options.some(n=>!n.selected)}doesFilterPass(n){const l=new Set(this.options.filter(e=>e.selected).map(e=>e.value)),s=this._params.getValue(n.node),t=null==s?"":String(s);return"..."===t||"Loading..."===t||(""===t?l.has(""):t.split(", ").map(e=>e.trim()).some(e=>l.has(e)))}getModel(){return this.isFilterActive()?{selectedValues:this.options.filter(n=>n.selected).map(n=>n.value)}:null}setModel(n){if(n){const l=new Set(n.selectedValues);this.options.forEach(s=>s.selected=l.has(s.value))}else this.options.forEach(l=>l.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(n=>n.selected)}toggleAll(n){this.options.forEach(l=>l.selected=n),this._applySearch(),this._params.filterChangedCallback(),this._cdr.markForCheck()}_refreshOptions(){const n=new Set;this._params.api.forEachNode(s=>{const t=this._params.getValue(s);if(null==t||""===t)n.add("");else{const f=String(t);if("..."===f||"Loading..."===f)return;const e=f.split(", ").map(p=>p.trim());for(const p of e)n.add(p)}});const l=new Map(this.options.map(s=>[s.value,s.selected]));this.options=Array.from(n).sort((s,t)=>s.localeCompare(t)).map(s=>({value:s,selected:l.get(s)??!0})),this._applySearch()}_applySearch(){const n=this.searchText.toLowerCase().trim();this.filteredOptions=n?this.options.filter(l=>l.value.toLowerCase().includes(n)):this.options}static \u0275fac=function(l){return new(l||g)};static \u0275cmp=a.VBU({type:g,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(l,s){1&l&&(a.j41(0,"cue-flexcontainer",0),a.nVh(1,v,1,1,"cue-input",1),a.j41(2,"cue-checkbox",2),a.bIt("checkedChange",function(f){return s.toggleAll(f)}),a.k0s(),a.j41(3,"div",3),a.Z7z(4,i,1,2,"cue-checkbox",4,r),a.nVh(6,b,2,0,"cue-typography",5),a.k0s()()),2&l&&(a.R7$(),a.vxM(s.options.length>10?1:-1),a.R7$(),a.Y8G("checked",s.allSelected),a.R7$(2),a.Dyx(s.filteredOptions),a.R7$(2),a.vxM(0===s.filteredOptions.length?6:-1))},dependencies:[u.YN,m.Checkbox,M.Input,T.Typography,D.FlexContainer],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 g})()},5902(P,x,o){o.d(x,{U:()=>b});var E=o(7705),_=o(5802),u=o(2271),m=o(9352),M=o(8957),T=o(63),D=o(2245),a=o(5381),r=o(5547);function v(C,g){if(1&C){const c=r.RV6();r.j41(0,"cue-input",4),r.bIt("valueChange",function(l){_.eBV(c);const s=r.XpG();return _.Njj(s.onValueChange(l))}),r.k0s()}if(2&C){const c=r.XpG();r.Y8G("value",c.filterText)}}function i(C,g){if(1&C){const c=r.RV6();r.j41(0,"cue-typography",5),r.bIt("click",function(){_.eBV(c);const l=r.XpG();return _.Njj(l.clear())}),r.EFF(1,"Clear"),r.k0s()}}let b=(()=>{class C{_cdr=(0,_.WQX)(E.gRc);_params;filterText="";filterType="contains";filterTypeOptions=["contains","notContains","equals","notEqual","startsWith","endsWith","blank","notBlank"];_labelContains=(0,m.Xx)("components.agGridColumnSelect.textFilterContains");_labelNotContains=(0,m.Xx)("components.agGridColumnSelect.textFilterNotContains");_labelEquals=(0,m.Xx)("components.agGridColumnSelect.textFilterEquals");_labelNotEqual=(0,m.Xx)("components.agGridColumnSelect.textFilterNotEqual");_labelStartsWith=(0,m.Xx)("components.agGridColumnSelect.textFilterStartsWith");_labelEndsWith=(0,m.Xx)("components.agGridColumnSelect.textFilterEndsWith");_labelBlank=(0,m.Xx)("components.agGridColumnSelect.textFilterBlank");_labelNotBlank=(0,m.Xx)("components.agGridColumnSelect.textFilterNotBlank");filterTypeLabelMap=(0,u.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,u.EW)(()=>!["blank","notBlank"].includes(this.filterType));agInit(c){this._params=c}afterGuiAttached(c){this._cdr.markForCheck()}isFilterActive(){return!!["blank","notBlank"].includes(this.filterType)||this.filterText.trim().length>0}doesFilterPass(c){const n=this._params.getValue(c.node),l=null==n?"":String(n),s=this.filterText.toLowerCase().trim(),t=l.toLowerCase();switch(this.filterType){case"contains":default:return t.includes(s);case"notContains":return!t.includes(s);case"equals":return t===s;case"notEqual":return t!==s;case"startsWith":return t.startsWith(s);case"endsWith":return t.endsWith(s);case"blank":return""===l;case"notBlank":return""!==l}}getModel(){return this.isFilterActive()?{filterType:"text",type:this.filterType,filter:this.filterText}:null}setModel(c){this.filterText=c?.filter??"",this.filterType=c?.type??"contains",this._cdr.markForCheck()}onValueChange(c){this.filterText=c,this._params.filterChangedCallback(),this._cdr.markForCheck()}onFilterTypeChange(c){this.filterType=String(c||"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(n){return new(n||C)};static \u0275cmp=r.VBU({type:C,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(n,l){1&n&&(r.j41(0,"cue-flexcontainer",0)(1,"cue-select",1),r.bIt("valueChange",function(t){return l.onFilterTypeChange(t)}),r.k0s(),r.nVh(2,v,1,1,"cue-input",2),r.nVh(3,i,2,0,"cue-typography",3),r.k0s()),2&n&&(r.R7$(),r.Y8G("value",l.filterType)("options",l.filterTypeOptions)("labelMap",l.filterTypeLabelMap()),r.R7$(),r.vxM(l.showTextInput()?2:-1),r.R7$(),r.vxM(l.filterText||"contains"!==l.filterType?3:-1))},dependencies:[M.Input,T.Select,D.Typography,a.FlexContainer],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 C})()},5448(P,x,o){o.d(x,{ButtonLabel:()=>M});var E=o(7705),_=o(2245),u=o(5547);const m=["*"];let M=(()=>{class T{fontSize=(0,E.hFB)("m");italic=(0,E.hFB)(!1);noWrap=(0,E.hFB)(!0);static \u0275fac=function(r){return new(r||T)};static \u0275cmp=u.VBU({type:T,selectors:[["cue-button-label"]],inputs:{fontSize:[1,"fontSize"],italic:[1,"italic"],noWrap:[1,"noWrap"]},ngContentSelectors:m,decls:3,vars:3,consts:[[3,"size","italic","noWrap"]],template:function(r,v){1&r&&(u.NAR(),u.j41(0,"div")(1,"cue-typography",0),u.SdG(2),u.k0s()()),2&r&&(u.R7$(),u.Y8G("size",v.fontSize())("italic",v.italic())("noWrap",v.noWrap()))},dependencies:[_.Typography],styles:["div[_ngcontent-%COMP%]{transform:translateY(.05em)}"]})}return T})()},7643(P,x,o){o.d(x,{CueEntityList:()=>s});var E=o(467),_=o(7705),u=o(5802),m=o(2271),M=o(2839),T=o(5381),D=o(2245),a=o(9769),r=o(7851),v=o(7293),i=o(5547);function b(t,f){if(1&t&&(i.j41(0,"cue-flexcontainer",2)(1,"cue-typography",4),i.EFF(2),i.k0s()()),2&t){const e=i.XpG(2);i.R7$(2),i.SpI(" ",e.errorMessage()," ")}}function C(t,f){if(1&t){const e=i.RV6();i.j41(0,"cue-ent-list-inner",7),i.bIt("rowClicked",function(d){u.eBV(e);const h=i.XpG(3);return u.Njj(h.rowClicked.emit(d))})("clickedOpen",function(d){u.eBV(e);const h=i.XpG(3);return u.Njj(h.clickedOpen.emit(d))}),i.k0s()}if(2&t){const e=i.XpG(3);i.Y8G("entities",e._displayIris())("entityData",e.entityData())("handlers",e.handlers())("mapboxToken",e.mapboxToken())("paginationPageSize",e.paginationPageSize())("size",e.size())("variant",e.variant())}}function g(t,f){1&t&&(i.j41(0,"cue-flexcontainer",2)(1,"cue-typography",8),i.EFF(2," No project connected. "),i.k0s()())}function c(t,f){if(1&t&&i.nrm(0,"cue-logo-link",6),2&t){let e;const p=i.XpG(3);i.Y8G("projectId",null==(e=p.sdkState())?null:e.projectId)}}function n(t,f){if(1&t&&(i.j41(0,"div",3),i.nVh(1,C,1,7,"cue-ent-list-inner",5)(2,g,3,0,"cue-flexcontainer",2),i.nVh(3,c,1,1,"cue-logo-link",6),i.k0s()),2&t){const e=i.XpG(2);i.Y8G("cueLogoLoader","loading"===e.state()),i.R7$(),i.vxM(e.handlers()?1:"loading"!==e.state()?2:-1),i.R7$(2),i.vxM(e.showLogo()?3:-1)}}function l(t,f){if(1&t&&i.nVh(0,b,3,1,"cue-flexcontainer",2)(1,n,4,3,"div",3),2&t){const e=i.XpG();i.vxM("error"===e.state()?0:1)}}let s=(()=>{class t{iris=(0,_.hFB)([]);categoryIris=(0,_.hFB)(void 0);sdkState=(0,_.hFB)(void 0);mapboxToken=(0,_.hFB)(void 0);paginationPageSize=(0,_.hFB)(10,{transform:_.Udg});size=(0,_.hFB)("m");variant=(0,_.hFB)("none");showLogo=(0,_.hFB)(!1,{transform:_.L39});rowClicked=(0,_.CGW)();clickedOpen=(0,_.CGW)();state=(0,u.vPA)("idle");errorMessage=(0,u.vPA)(null);entityData=(0,u.vPA)({});_entities=(0,u.vPA)(void 0);_categoryResolvedIris=(0,u.vPA)([]);_displayIris=(0,m.EW)(()=>void 0!==this.categoryIris()?this._categoryResolvedIris():this.iris());_unsubscribe;_inputWarningTimer;handlers=(0,m.EW)(()=>{var e=this;const p=this._entities();if(p)return{requestData:(d,h)=>{const y=d.map(k=>k.split("/").pop()).filter(Boolean);p.requestEntityData(y,h)},requestLocations:d=>{if(!this.mapboxToken())return void console.warn("[cue-entity-list] No mapboxToken provided \u2014 skipping map location fetch.");const h=d.map(y=>y.split("/").pop()).filter(Boolean);p.requestEntityLocations(h)},checkHasLocations:(d=(0,E.A)(function*(h){const y=e.sdkState()?.cue,k=e.sdkState()?.projectId;if(!(e.mapboxToken()&&y&&k&&h.length))return!1;const F=`PREFIX qcy: <https://dev.qaecy.com/ont#>\nASK WHERE {\n ?entity qcy:hasEntityCategory ?cat .\n FILTER(?cat IN (${h.map(S=>`<${S}>`).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 y.api.sparql(F,k))?.boolean}catch{return!1}}),function(y){return d.apply(this,arguments)})};var d});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,u.QZP)(()=>{this._setupEntities(this.sdkState()?.entities)}),(0,u.QZP)(()=>{const e=this.categoryIris(),p=this._entities();void 0!==e&&this._fetchByCategories(e,p)})}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 p=e.entityInfoMap.get(),d={};for(const h of Object.keys(p)){const y=p[h],k=Array.isArray(y.documentRefs)?y.documentRefs.map(O=>"string"==typeof O?{id:O}:O):y.documentRefs;d[e.entityIri(h)]={...y,documentRefs:k}}this.entityData.set(d)}_fetchByCategories(e,p){var d=this;return(0,E.A)(function*(){if(p&&e.length){d.state.set("loading");try{const h=yield p.entitiesByCategory(e);d._categoryResolvedIris.set(h.map(y=>y.iri)),d.state.set("ready")}catch(h){console.error("[cue-entity-list] Failed to fetch entities by category",h),d.errorMessage.set("Failed to load entities for the given categories."),d.state.set("error")}}else d._categoryResolvedIris.set([])})()}_teardown(){this._unsubscribe?.(),this._unsubscribe=void 0}static \u0275fac=function(p){return new(p||t)};static \u0275cmp=i.VBU({type:t,selectors:[["cue-entity-list"]],inputs:{iris:[1,"iris"],categoryIris:[1,"categoryIris"],sdkState:[1,"sdkState"],mapboxToken:[1,"mapboxToken"],paginationPageSize:[1,"paginationPageSize"],size:[1,"size"],variant:[1,"variant"],showLogo:[1,"showLogo"]},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,"position","relative","height","100%","width","100%",3,"cueLogoLoader"],[2,"color","#c44","font-size","13px"],[2,"height","100%",3,"entities","entityData","handlers","mapboxToken","paginationPageSize","size","variant"],[2,"position","absolute","top","12px","right","12px","z-index","5",3,"projectId"],[2,"height","100%",3,"rowClicked","clickedOpen","entities","entityData","handlers","mapboxToken","paginationPageSize","size","variant"],[2,"color","#9ca3af","font-size","13px"]],template:function(p,d){if(1&p&&(i.DNE(0,l,2,1,"ng-template",null,0,i.C5r),i.eu8(2,1)),2&p){const h=i.sdS(1);i.R7$(2),i.Y8G("ngTemplateOutlet",h)}},dependencies:[M.u,T.FlexContainer,D.Typography,a.T3,r.k,v.x],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}"],changeDetection:0})}return t})()}}]);
|