@qaecy/cue-ui 0.0.52 → 0.0.54
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/1051.js +1 -0
- package/1830.js +1 -0
- package/1837.js +1 -0
- package/2021.js +1 -0
- package/2081.js +1 -0
- package/2317.js +1 -0
- package/2399.js +1 -1
- package/2530.js +1 -0
- package/2775.js +1 -0
- package/3036.js +1 -1
- package/3288.js +1 -0
- package/329.js +1 -1
- package/3537.js +1 -0
- package/3577.js +1 -0
- package/3614.js +1 -0
- package/5041.js +1 -0
- package/5071.js +1 -0
- package/5649.js +1 -1
- package/5872.js +1 -1
- package/6233.js +1 -0
- package/6419.js +1 -1
- package/650.js +1 -0
- package/6947.js +1 -1
- package/7441.js +1 -1
- package/8791.js +1 -0
- package/9396.js +1 -1
- package/common.js +1 -1
- package/index.js +1 -1
- package/main.js +1 -1
- package/package.json +1 -1
- package/1520.js +0 -1
- package/1573.js +0 -1
- package/1931.js +0 -1
- package/2312.js +0 -1
- package/2724.js +0 -1
- package/5500.js +0 -1
- package/640.js +0 -1
- package/836.js +0 -1
- package/9004.js +0 -1
package/2081.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
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(3537),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.n,E.p,M.F,x.L,N.W,y.T,f.a,p.$,_.Kj],encapsulation:2,changeDetection:0})}return n})();var S=r(4879),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.n,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/2317.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[2317],{2317(e){e.exports=JSON.parse('{"common":{"buttons":{"back":"Back","cancel":"Cancel","close":"Close","copyLink":"Copy link","delete":"Delete","download":"Download","edit":"Edit","first":"First","last":"Last","next":"Next","previous":"Previous","reset":"Reset","rerun":"Rerun","save":"Save","share":"Share","update":"Update"},"errors":{"generic":"An error occurred.","gatewayTimeout":"The server did not respond in time. Please try again.","tooManyRequests":"Too many requests. Please wait a moment before trying again."},"infoLoading":"Loading...","languages":{"da":"Danish","de":"German","en":"English","fr":"French","it":"Italian"},"weekdaysShort":{"mon":"Mo","tue":"Tu","wed":"We","thu":"Th","fri":"Fr","sat":"Sa","sun":"Su"},"weekdaysLong":{"mon":"Monday","tue":"Tuesday","wed":"Wednesday","thu":"Thursday","fri":"Friday","sat":"Saturday","sun":"SSunday"}},"components":{"agentPlan":{"buttonShowPlan":"Show plan","buttonShowResult":"Show result","labelPlan":"Plan","labelResult":"Result","nodeAggregate":{"title":"Aggregate","labelAction":"Action","labelAvg":"Average","labelCount":"Count","labelMax":"Maximum","labelMin":"Minimum","labelOperation":"Operation","labelSum":"Sum","infoAction":"The command that the agent should execute to aggregate information from various sources"},"nodeCompose":{"title":"Compose","labelAction":"Action","labelOperationDifference":"Difference","labelOperationIntersection":"Intersection","labelOperationUnion":"Union","labelType":"Comparison","labelTypeExplicit":"Direct","labelTypeImplicit":"Loose","infoAction":"The command that the agent should execute to combine information from various sources"},"nodeLookup":{"title":"Lookup","labelQuery":"Query","labelTarget":"Target","labelTargetEntity":"Entity Category","labelTargetContent":"Document Content Category","labelTargetMime":"Document Type Category"},"nodeResponse":{"infoCtx":"The context available to the agent when preparing the response","labelCtx":"Context","labelMode":"Mode","labelModeBrief":"Brief","labelModeReport":"Report","labelModeResources":"Resources","labelModeStats":"Statistics","labelModeTable":"Table","title":"Response"},"nodeSearch":{"title":"Search","labelQuery":"Query","infoQuery":"The prompt that the agent executes. Edit to change the plan\'s behavior","labelType":"Type","labelTypeStrict":"Strict","labelTypeLoose":"Loose"}},"agGrid":{"localeText":{"contains":"Contains","notContains":"Does not contain","equals":"Equals","notEqual":"Not equal","startsWith":"Starts with","endsWith":"Ends with","blank":"Blank","notBlank":"Not blank","lessThan":"Less than","lessThanOrEqual":"Less than or equal","greaterThan":"Greater than","greaterThanOrEqual":"Greater than or equal","inRange":"In range","inRangeStart":"From","inRangeEnd":"To","filterOoo":"Filter...","applyFilter":"Apply filter","resetFilter":"Reset filter","clearFilter":"Clear filter","andCondition":"AND","orCondition":"OR","searchOoo":"Search...","noMatches":"No matches","selectAll":"Select all","noRowsToShow":"No rows to show","loadingOoo":"Loading...","of":"of","to":"to","page":"Page","nextPage":"Next page","lastPage":"Last page","firstPage":"First page","previousPage":"Previous page"}},"agGridColumnSelect":{"groupDisplay":"Display","groupData":"Data","groupBehavior":"Behavior","labelEditable":"Editable","labelFilterType":"Filter Type","labelLabel":"Label","labelMultiline":"Multiline","labelTextAlign":"Text Align","titleColumnSettings":"Column Settings","titleHidden":"Hidden","titleShown":"Shown","dragHint":"Drag columns between Shown and Hidden, or reorder within Shown by dragging up or down.","tooltipAllowEditing":"Allow the user to edit the field?","tooltipMultiline":"Allow multiple lines in the field?","tooltipSettings":"Column Settings","labelEnumValues":"Enum values (comma-separated)","tooltipEnumValues":"Comma-separated list of allowed values. Activates a select cell renderer.","filterTypeText":"Text","filterTypeNumber":"Number","filterTypeDate":"Date","filterTypeSelect":"Select","filterTypeNone":"None","filterTypeAuto":"Auto","labelDataType":"Data type","dataTypeText":"Text","dataTypeNumber":"Number","dataTypeDate":"Date","dataTypeBoolean":"Boolean","labelDateFormat":"Date format","dateFormatDateTime":"Date & time","dateFormatDate":"Date","dateFormatShortDate":"Short date","dateFormatTimeAgo":"Time ago","textFilterContains":"Contains","textFilterNotContains":"Does not contain","textFilterEquals":"Equals","textFilterNotEqual":"Not equal","textFilterStartsWith":"Starts with","textFilterEndsWith":"Ends with","textFilterBlank":"Blank","textFilterNotBlank":"Not blank","groupPostProcess":"Post-processing","labelPostProcessFormula":"Formula","tooltipPostProcessFormula":"Excel-style expression applied to the cell value. Use ?val for the current value. Examples: ROUND(?val, 2) * 100 | SUFFIX(?val, \\" km\\")","placeholderPostProcessFormula":"e.g. ROUND(?val, 2) * 100","labelPostProcessPreview":"Preview (using 42)","labelPostProcessFunctions":"Available functions"},"sparqlTable":{"panelLabel":"SPARQL","labelQuery":"SPARQL query","tooltipQuery":"Write a SELECT query that projects ?key (the row identifier) and ?val (the cell value). Additional bindings are allowed and can be used by the binding strategy. Each ?key may have multiple ?val rows. To prioritize values, add a secondary binding (e.g. ?certainty) and set it as the Priority key on the strategy.","labelTest":"Test (limit 5)","labelDiscard":"Discard","labelQueryPending":"Query has unsaved changes \u2014 run Test to apply to the table","labelTestResults":"Query results (first 5 rows):","labelStrategy":"Binding strategy","tooltipStrategy":"There can be zero, one, or multiple bindings of ?val for each ?key. The strategy defines how these should be handled to produce a single result per ?key.","labelSeparator":"Separator","labelValueKey":"Value key (binding variable)","labelPriorityKey":"Priority key (binding variable)","tooltipPriorityKey":"Optional binding variable used to rank rows before the strategy is applied. Rows with a higher value for this variable are considered first. Leave blank to use the natural result order.","labelPreProcess":"Pre-process formula","tooltipPreProcess":"Optional formula applied to each binding value before the strategy is applied. Use ?val to reference the value. Example: AFTER_LAST(?val, \\"/\\")","labelFallback":"Fallback value","tooltipFallback":"Returned when the strategy produces an empty result","labelMapJson":"Lookup map (JSON)","tooltipMapJson":"A JSON object mapping input keys to output values. Example: {\\"Hauptmietvertrag\\": \\"MV WG\\"}","validationErrorSyntax":"Query has a syntax error","validationErrorNotSelect":"Query must be a SELECT query","validationErrorMissingKey":"Query must project ?key","validationErrorMissingVal":"Query must project ?{{ var }}","strategyFirst":"First","strategyLast":"Last","strategyRandom":"Random","strategyJoin":"Concatenate","strategyCount":"Count","strategyLongest":"Longest text","strategyShortest":"Shortest text","strategyMap":"Map lookup","strategySum":"Sum","strategyAvg":"Average","strategyMin":"Minimum","strategyMax":"Maximum","strategyMostRecent":"Most recent date","strategyOldest":"Oldest date","strategyFirstDesc":"Returns the first value from the result set","strategyLastDesc":"Returns the last value from the result set","strategyRandomDesc":"Picks a random value from the result set","strategyJoinDesc":"Joins all values with a separator","strategyCountDesc":"Returns the number of results","strategyLongestDesc":"Returns the longest text value","strategyShortestDesc":"Returns the shortest text value","strategySumDesc":"Returns the sum of all numeric values","strategyAvgDesc":"Returns the average of all numeric values","strategyMinDesc":"Returns the minimum numeric value","strategyMaxDesc":"Returns the maximum numeric value","strategyMostRecentDesc":"Returns the most recent date value","strategyOldestDesc":"Returns the oldest date value","labelDatatype":"Data type","datatypeText":"Text","datatypeNumber":"Number","datatypeDate":"Date","labelColumnType":"Column type","columnTypeData":"Data column (SPARQL)","columnTypeEvaluation":"Evaluation column","labelEvalType":"Evaluation type","evalTypeTemplate":"Text template","evalTypeFormula":"Arithmetic formula","evalTypePipeline":"Binding pipeline","evalTypeTemplateDesc":"Combines formatted values from other columns using a template string, e.g. ${date} ${category} ${name}","evalTypeFormulaDesc":"Applies an arithmetic operation to the numeric values of selected columns","evalTypePipelineDesc":"Merges raw bindings from one or more columns through transform, filter, dedup, sort and limit steps, then joins them into a single value","labelEvalTemplate":"Template","tooltipEvalTemplate":"Use ${fieldName} to insert the formatted value of another column. Click a field chip below to insert it.","labelAvailableFields":"Available fields (click to insert):","labelFormulaOp":"Operation","formulaOpAdd":"Add (+)","formulaOpSubtract":"Subtract (\u2212)","formulaOpMultiply":"Multiply (\xd7)","formulaOpDivide":"Divide (\xf7)","labelFormulaFields":"Source columns:","labelEvalPreview":"Preview","labelPipelineSources":"Source columns (ordered)","tooltipPipelineSources":"Select one or more raw-data columns. Bindings are collected in order \u2014 the first column has priority.","labelPipelineSourceOrder":"Order","labelPipelineTransform":"Transform formula","tooltipPipelineTransform":"Optional formula applied to each binding value before filtering. Use ?val to reference the value. Example: AFTER_LAST(?val, \\" \\")","labelPipelineLimit":"Limit","tooltipPipelineLimit":"Maximum number of values to include (applied after sort/dedup)","labelPipelineSeparatorNote":"Separator","labelPipelineDeduplicate":"Deduplicate","labelPipelineSort":"Sort alphabetically","labelPipelineExclude":"Exclude values (JSON array)","tooltipPipelineExclude":"Values to drop after the transform step. Must be a JSON array of strings.","rowDefinitionEmpty":"Click to define row definition","rowDefinitionTooltip":"Edit row definition","rowDefinitionModalTitle":"Row Definition","rowDefinitionModalDescription":"Write a SPARQL SELECT query that returns all ?subject values for this table. Each ?subject represents one row. Column definitions bind their results to these subjects. You may use ORDER BY to control the row order.","rowDefinitionDiscard":"Discard","rowDefinitionSave":"Save","rowDefinitionErrorSyntax":"The query could not be parsed. Please check the SPARQL syntax.","rowDefinitionErrorNotSelect":"The query must be a SELECT query.","rowDefinitionErrorMissingSubject":"Query must return bindings to ?subject"},"contentBlocks":{"agentPlan":{"buttonBuildPlan":"Build plan","buttonExecutePlan":"Execute plan","downloadPDF":"Download PDF","sendEmail":"Send in e-mail","errorExecutingPlan":"An error occurred while executing the plan.","errorGeneratingPlan":"An error occurred while generating the plan.","infoNoPlan":"No plan available. Enter your prompt and Cue will generate a plan for you.","infoPlanRemoved":"Plan removed from history.","labelPrompt":"Prompt","placeholderPrompt":"Eg. Create a list of people who appear in the most documents...","removeFromHistory":"Remove from history","showPlan":"Show plan","showResults":"Show results"},"documentViewer":{"buttonAlternativeRepresentations":"Alternative representations","buttonDownload":"Download document","buttonShowDocument":"Show document","buttonShowDocumentGraph":"Show document graph","labelContentCategories":"Content Categories","labelContentCategory":"Content Category","labelSubject":"Subject","labelFilePath":"File Path","titleRankedResults":"Ranked Results"},"gis":{"instructions":{"clickDrawPolygon":"Click \'Draw geofence\' to define the geofence for the search","clickFirstPoint":"Place the first point to start the polygon","clickSecondPoint":"Place the second point to continue the polygon","clickEndPoint":"Place another point or click the first point to finish the polygon","polygonTooLarge":"The drawn area is too large. The maximum allowed area for GIS searches is {{maxPolygonAreaSqKm}} km\xb2."}},"projectDocuments":{"duplicateFilesSingular":"\u26a0\ufe0f <strong>{{ count }}</strong> duplicate","duplicateFilesPlural":"\u26a0\ufe0f <strong>{{ count }}</strong> duplicates","pctOpenFormats":"\u{1f4a1} <strong>{{percent}}%</strong> open formats"}},"dashboardGrid":{"closeBlock":"Close panel","hideBlock":"Minimise panel","tooltipSetGridSize":"Adjust the number of rows and columns in the dashboard."},"documentInfo":{"applyToAllFiles":"Apply to all files in directory","applyToNPaths":"Applied to {{count}} paths","errorSavingEntityMention":"Error saving entity mention","filePathMatched":"{{count}} file path matched","filePathsMatched":"{{count}} file paths matched","infoChangeContentCategory":"Change content category","infoLoadingFilePaths":"Loading file paths...","labelSelectedText":"Selected text"},"documentList":{"buttonDownloadCSV":"Download in CSV format","buttonHideCloudFilter":"Hide cloud filter","buttonShowCloudFilter":"Show cloud filter","infoLoading":"Loading...","labelCategories":"Categories","labelDownload":"Download","labelName":"Name","labelOpenInDocumentViewer":"Open in document viewer","labelOpenInFileManager":"Open in file manager","labelPages":"Pages","labelSize":"Size","labelSubject":"Subject","labelSummary":"Summary","labelType":"Type","tooltipColumnSettings":"Column Settings"},"documentViewer":{"infoNoViewer":"No viewer available for this file type"},"dxfViewer":{"tooltipHideLayers":"Hide layers","tooltipShowLayers":"Show layers","tooltipZoomIn":"Zoom in","tooltipZoomOut":"Zoom out","tooltipZoomFit":"Fit to width","tooltipShowLayouts":"Show layouts","tooltipHideLayouts":"Hide layouts","tooltipSetDarkBackground":"Set dark background","tooltipRemoveDarkBackground":"Remove dark background"},"entityData":{"infoLoading":"Loading...","infoNoData":"No data available","titleEntityGraph":"Entity Graph","titleRelatedDocuments":"Related Documents","titleMap":"Map"},"entityInfo":{"infoChangeEntityCategory":"Change entity category","labelEntityCategory":"Entity Category","labelEntityCategories":"Entity Categories","labelValue":"Value","categories":{"drawingSheet":{"drawingApprovedBy":"Approved by","drawingCreatedBy":"Created by","drawingHasFileReference":"File reference","drawingHasScale":"Scale","hasAssociatedDiscipline":"Discipline"},"person":{"associatedWith":"Associated with"}}},"entityList":{"labelCategories":"Categories","labelMentionCount":"Mention count","labelOpenInEntityViewer":"Open in entity viewer","labelOrderByMentionCount":"Order by mention count","labelDisableOrderByMentionCount":"Disable mention count ordering","infoOrderByMentionCount":"For each entity it will be listed how many times that entity is being mentioned somewhere across the project documentation","labelValue":"Value","tabList":"List","tabMap":"Map"},"gis":{"overlayZoomHint":"Zoom in to search GIS layers. Min zoom: {{minZoom}}, current zoom: {{currentZoom}}","categories":{"address":"Addresses","poi":"Points of Interest","railway":"Railway","natural":"Natural","manmade":"Man-made","cadastre":"Cadastre","building":"Buildings","greenspace":"Green Space","paved":"Paved Areas","zone":"Zones"}},"tunerExtractionTemplate":{"labelDropPDF":"Drop a PDF here or browse","labelBrowse":"Browse","labelTemplate":"Extraction Template (JSON)","labelContentCategory":"Content Category","placeholderNoCategory":"Let the model classify","labelRunExtraction":"Run Extraction","labelRunning":"Running\u2026","errorInvalidJson":"Invalid JSON","tabForm":"Form","tabJson":"JSON","tabGraph":"Graph","labelId":"Template ID","labelNamespaces":"Namespaces","labelCategories":"Document Types","infoCategories":"Define custom document types that can be used to scope entity extraction to specific document categories.","labelEntities":"Entities","labelRelations":"Relations","placeholderPrefix":"prefix","placeholderUri":"https://\u2026","placeholderCategory":"Category IRI","placeholderEntityId":"entity-id","placeholderRelationId":"relation-id","labelDescription":"Description","labelType":"Type","labelDtype":"Data type","labelVariants":"Variants","labelEnum":"Enum values","labelRegex":"Regex","labelSources":"Source entities","labelTargets":"Target entities","placeholderCommaList":"value1, value2, \u2026","labelClasses":"Classes","infoClasses":"Classes represent named entity types \u2014 the kinds of things that exist in your domain (e.g. Person, Building, Document).","labelLiteralAttributes":"Literal Attributes","infoLiteralAttributes":"Literal attributes are entities whose extracted value is a simple scalar \u2014 a name, date, number or free-text string rather than a linked resource.","labelRelationObjectProperties":"Object Relations","infoRelationObjectProperties":"Object relations connect two entities to each other (e.g. \\"locatedIn\\", \\"hasPart\\").","labelRelationDatatypeProperties":"Attribute Relations","infoRelationDatatypeProperties":"Attribute relations attach a literal value to an entity (e.g. \\"hasName\\", \\"hasDate\\").","processingStep1":"Sent the data to the server...","processingStep2":"Page summary and content category is being estimated...","processingStep3":"Template is being evaluated on the page image + text...","labelExtractionResult":"Extraction Result","labelBackToPdf":"Back to PDF","labelViewResult":"View Result","addCategory":"New category\u2026","labelSchemaAbbrev":"Schema abbreviation","infoContentCategory":"Select a content category to skip the classification step and constrain the extraction to that category\'s entities. Leave unset to let the model classify \u2014 all entities in the list will then be considered. Use \\"New category\u2026\\" to extend the list.","hintNoPdf":"Upload a PDF to run extraction","hintNoEntities":"Add at least one entity class, or enable the standard schema"},"tunerGIS":{"layers":{"zones":{"planType":{"land-use-plan":"Land Use Plan","local-plan":"Local Plan","design-plan":"Design Plan","development-plan":"Development Plan","special-use-plan":"Special Use Plan","open-space-zone":"Open Space Zone","overlay-regulation":"Overlay Regulation","unzoned":"Unzoned","municipal-plan-framework":"Municipal Plan Framework","neighbourhood-conservation-plan":"Neighbourhood Conservation Plan","noise-sensitivity-plan":"Noise Sensitivity Plan","water-protection-plan":"Water Protection Plan","nature-landscape-plan":"Nature & Landscape Plan"}}}},"graph":{"entityGraph":{"labelOpenEntity":"Open entity"},"rdf":{"labelFocusOnNeighbours":"Focus on neighbours","labelUnhideEdges":"Show all edge types","labelHideEdgeType":"Hide all edges of this type","labelCollapseRelationship":"Collapse by relationship","labelExpandMore":"Expand more","labelCollapseExpanded":"Collapse expanded","legendCategories":"Categories","legendRelationships":"Relationships","legendEntities":"Entities","legendTitle":"Legend"}},"input":{"multiSelect":{"itemsSelected":"{{count}} selected","placeholderSelect":"Select values"},"nestedSelect":{"itemsSelected":"{{count}} selected"},"select":{"placeholderFilter":"Filter...","placeholderSelect":"Select value"}},"keyVal":{"edited":"edited"},"map":{"tooltipDrawGeofence":"Draw geofence","tooltipEndDrawGeofence":"Finish drawing geofence","tooltipHideLayers":"Hide layer legend","tooltipShowLayers":"Show layer legend","tooltipZoomIn":"Zoom in","tooltipZoomOut":"Zoom out","tooltipZoomFit":"Fit to viewport","errors":{"addressSearchNoResults":"No results found for this address."}},"modals":{"rdfEdit":{"buttonCancel":"Cancel","buttonPlaceEntity":"Place entity","buttonSave":"Save","errorIdenticalValue":"The values are identical","errorSaving":"An error occurred while saving the changes.","labelComment":"Comment (optional)","labelExistingValue":"Existing Value","labelNewValue":"New Value","labelSetNewValue":"Set New Value"}},"paginator":{"currentDisplay":"{{startIndex}}-{{endIndex}} of {{totalItems}}","itemsPerPage":"Items per page:"},"pdfViewer":{"infoLoading":"Loading PDF...","labelPage":"Page:","tooltipPan":"Pan","tooltipRotate":"Rotate","tooltipZoomFit":"Fit Width","tooltipZoomIn":"Zoom In","tooltipZoomOut":"Zoom Out","searchPlaceholder":"Search in PDF\u2026","searchPrev":"Previous match","searchNext":"Next match","searchClose":"Close search","searchOtherPages":"{{ count }} match(es) on other pages"},"portalHeader":{"labelDarkModeOn":"Activate dark mode","labelDarkModeOff":"Deactivate dark mode","labelLanguage":"Language","labelProfile":"Profile","labelSignOut":"Sign Out","placeholderSelectProject":"Select a project","tooltipSelectLanguage":"Select language","labelCredits":"Manage credits","credits":"credits","labelNotifications":"Notifications"},"shaclClient":{"buttonValidate":"Validate","infoValidationInProgress":"Validating\u2026","tooltipViewResults":"View results","errorValidationFailed":"Validation failed. Please check your SHACL and try again.","tabRaw":"Raw","tabReport":"Report"},"sparqlClient":{"buttonExecute":"Execute","buttonReset":"Reset","buttonQueries":"Queries","buttonSaveCurrentQuery":"Save current query\u2026","buttonSetResponseMime":"Set Response MIME Type","infoQueryInProgress":"Query in progress...","labelPredefinedQueries":"Predefined queries","labelSavedQueries":"My saved queries","tooltipDeleteQuery":"Delete","tooltipViewResults":"View results"},"spatialDecomposition":{"searchPlaceholder":"Search location...","usePolygonBtn":"Use asset polygon","createModalTitle":"Name the asset","buildingNameLabel":"Asset name","createBuildingBtn":"Create asset","cancelBtn":"Cancel","saveChanges":"Save changes","discardChanges":"Discard changes","addBuiltAsset":"Add built asset","minimize":"Minimize","setShapes":"Load shapes","setShapesTooltip":"Upload a shape file to define the outline of the asset.","instructions":{"initialNoBuildings":"Search for an address or a place to find built assets in your project. Alternatively, you can manually zoom in on the area where your assets are located or upload a shape file.","getBuildingPolygon":"Click on a built asset on the map to determine its outline."},"process":{"fetchingBuildingPolygon":"Fetching asset polygon..."},"errors":{"gatewayTimeoutOverpass":"The third-party server for asset polygons did not respond in time. Please try again later.","tooManyRequests":"Too many requests. Please wait a moment before clicking again."},"addStorey":"Add Storey","addSpace":"Add Space","loadIfcModel":"Load IFC space model","tooltipLoadIfcModel":"The IFC space model is processed in the browser and the full topological structure is extracted from it.","loadCadPlan":"Load CAD plan","tooltipLoadCadPlan":"Upload a zip containing CAD plan data, DXF and RDF. This zip can be generated from a DWG using the dedicated Cue service.","tooltipActions":"Actions","addChildNameLabel":"Name","addChildConfirmBtn":"Add","breakdownDefaultTab":"Default","infoModal":{"title":"About the Topology Tool","content":"The Cue Topology tool lets you define an overall topologic representation of your built asset.\\n\\nYou can use it to express containment of entities within your project.\\n\\nFor buildings, for example, a common representation would be:\\n\u2022 site contains building\\n\u2022 building contains storey\\n\u2022 storey contains space\\n\u2022 space contains chair\\n\u2022 space adjacent to space\\n\\nThe tool lets you build this topologic representation while assigning geometric representations from map services or project material (CAD, BIM)."}},"spreadsheet":{"infoClickToLoad":"Or click here to upload a file","infoDropFiles":"Drag/drop your spreadsheet files here to view their contents","infoLoading":"Loading spreadsheet...","infoNoRows":"No rows to display","labelSheet":"Sheet"},"fileManager":{"errors":{"uploadFailed":"Upload failed.","renameFailed":"Failed to rename the file.","deleteFailed":"Failed to delete the file.","cancelUploadFailed":"Failed to cancel the upload.","creditInfoFailed":"Failed to fetch credit information.","creditCalculating":"Calculating upload cost\u2026"},"creditConfirm":{"title":"Upload credits required","columnFormat":"Format","columnFiles":"Files","columnCredits":"Credits","labelTotalSelected":"Total selected","labelAvailableCredits":"Available credits","infoInsufficientCredits":"Insufficient credits \u2014 deselect some file types to proceed.","buttonUploadSelected":"Upload selected"}},"creditOverview":{"total":"Total","available":"Available","allocated":"Distributed","consumed":"Consumed","topUp":"Top up"},"documentCharts":{"listDocumentsBySuffix":"List documents suffixed {{suffix}}","listDocumentsByType":"List documents of type {{type}}"},"logoLink":{"openProjectInCue":"Open project in Cue","openCuePortal":"Open Cue portal","showResourceInCue":"Show resource in Cue"},"documentFilter":{"loading":"Loading available filters\u2026","updating":"updating\u2026","addFilter":"Add filter","cancel":"Cancel","clear":"Clear","removeFilter":"Remove filter","filterByPlaceholder":"Filter by\u2026","selectMimePlaceholder":"Select mime\u2026","selectContentPlaceholder":"Select content\u2026","selectEntityTypePlaceholder":"Select entity type\u2026","selectEntityPlaceholder":"Select\u2026","dimMime":"Mime category","dimContent":"Content category","dimEntity":"Entity","chipMime":"Mime","chipContent":"Content","any":"Any","anyOfCategory":"Any {{category}}"}},"sdkWrapped":{"documentSearchBar":{"searchPlaceholder":"Ask anything about your documents\u2026","activeFilters":"{{count}} filter(s) active \u2014 applied to the next search."}},"views":{"acceptTerms":{"termsOfUse":"Terms of Use","description":"You have to agree to our latest terms & conditions before you can continue using Cue.","outdatedDescription":"Our terms & conditions have changed. Please review and agree to them to continue.","checkboxLabel":"I have read and accept the terms & conditions","buttonSubmit":"I agree"},"agentResult":{"created":"Generated {{dateTime}}","downloadPDF":"Download PDF","sendEmail":"Send in email"},"documentViewer":{"buttonAddEntity":"Add entity","buttonChangePlacement":"Change placement","buttonPlaceEntity":"Place on document","buttonRemoveDuplicates":"Remove duplicates","buttonRevert":"Revert","buttonSaveChanges":"Save changes","buttonDiscardChanges":"Discard changes","diffSummary":{"removedEntities_one":"Removed {{count}} entity","removedEntities_other":"Removed {{count}} entities","insertedEntities_one":"Added {{count}} entity","insertedEntities_other":"Added {{count}} entities","removedPlacements_one":"Removed {{count}} placement","removedPlacements_other":"Removed {{count}} placements","insertedPlacements_one":"Added {{count}} placement","insertedPlacements_other":"Added {{count}} placements","removedRelations_one":"Removed {{count}} relation","removedRelations_other":"Removed {{count}} relations","insertedRelations_one":"Added {{count}} relation","insertedRelations_other":"Added {{count}} relations"},"buttonShowEntities":"Show entities","buttonTextMatch":"Text match","buttonUsePlacement":"Use placement","buttonDiscardPlacement":"Discard placement","buttonHideEntities":"Hide entities","errorLoadingEntities":"An error occurred while loading entities.","hintDrawBbox":"Draw a box to place an entity","infoNoMatchesOnCurrentPage":"There are no text matches on this page, but there are on the following pages:","infoLoadingEntities":"Loading entities...","infoPlaceNamedEntity":"Place <strong>{{value}}</strong> by drawing a box around the relevant area in the document.","labelEntityPlacement":"Placement","labelEntityType":"Entity Type","labelEntityValue":"Entity Value","sectionPlaced":"Placed","sectionUnplaced":"Unplaced","titleEditEntity":"Edit Entity","titleEntities":"Entities","tooltipRemoveDuplicates":"Remove entities that were accidentally created multiple times. Defined by the same name, type, and placement (if specified).","tooltipTextMatch":"Find the entity by text matching in the document."},"documentSearchSimple":{"labelColumnSubject":"Subject","labelColumnTags":"Tags","labelColumnType":"Type","labelFast":"Fast","labelInDepth":"In Depth","labelOpenInCue":"Open in Cue","placeholderSearch":"Search...","placeholderSearchInfo":"Search your project..."},"entityViewer":{"infoEntityGraph":"The graph shows the incoming and outgoing relationships to other entities in the project.","titleEntityGraph":"Entity Graph","infoRelatedDocuments":"Documents related to this entity.","titleRelatedDocuments":"Related Documents","titleMap":"Map"},"fileBundler":{"buttonBuildBundle":"Build bundle","buttonDryRun":"Dry run","buttonUseSample":"Use sample","infoDropCSV":"Drag/drop your CSV file here to view its contents","labelFilePathColumn":"File path column","labelIdentifierColumn":"Identifier column","labelIdentifierType":"Identifier type","labelOr":"or","title":"File Bundler","tooltipDryRun":"Perform a dry run with only the first 5 files"},"filePathEnrichment":{"description":"A file path in a construction project carries valueble information about the file. What project does it belong to? What discipline? What type of document? What discipline? This tool allows you to enrich file paths with information from the Cue Knowledge Graph.","instructions":"The list below contains {{noOfPaths}} representative file paths from your project. Describe the content of the file path below or highlight a part of the path to describe the meaning of that specific part.","title":"File Path Enrichment","labelFilePath":"File Path","placeholderGeneralPrompt":"Provide instructions on what can be inferred from the file path. Be very detailed if the file name, for example, follows a special code structure where each position indicates an entity type (building, floor, discipline, or similar).","placeholderSubsetPrompt":"Provide instructions on what the highlighted text {{text}} in the file path might indicate. Please be very detailed in your instructions."},"fullThing":{"staticBlocks":{"changes":"Changes","documentOverview":"Document Overview","entities":"Entities","gis":"GIS Search","locations":"Locations","overview":"Summary"},"searchBar":{"errorCouldNotFetchEntityTypes":"Could not fetch entity types.","errorPromptFailed":"Prompt failed.","errorSearchFailed":"Search failed.","infoFetchingEntities":"Fetching entities of type {{category}}...","infoFetchingEntityTypes":"Fetching entity types...","infoFilterApplied":"Filter applied","infoFollowUpOn":"Follow-up question on <strong>{{parent}}</strong>","labelAgentMode":"Agent","labelDocSearchMode":"Document Search","labelEntity":"Entity","labelMimeCategory":"Type Category","labelContentCategory":"Content Category","infoSelectFilter":"Select a filter...","labelEquals":"equals","labelNotEquals":"differs from","labelFast":"Fast","labelInDepth":"In Depth","placeholderEntityType":"Entity Type","placeholderFilterType":"Filter Type","placeholderPrompt":"Ask me anything about the project...","placeholderLimit":"Max results","placeholderSearch":"Search...","placeholderType":"Filter type","tooltipAddFilter":"Add filter","tooltipRemoveFilter":"Remove filter","tooltipEntityFilter":"Add filters"},"searchInfoPlaceholder":"Search your project or apply a filter...","titleAgentPlan":"Agent plan","titleChanges":"Changes since last visit","titleDocuments":"Documents","titleEntities":"Entities","titleGIS":"GIS Search","titleLocations":"Locations","titleOverview":"Overview","tooltipDuplicateBlock":"Duplicate block","tooltipHide":"Hide block","tooltipMoveDown":"Move down","tooltipMoveUp":"Move up","tooltipRebuildBlock":"Rebuild block"},"newProjectWizard":{"buttonCreateProject":"Create Project","buttonNext":"Next","buttonOpenProject":"Open Project","buttonPrevious":"Previous","descriptionLanguage":"Select one or more languages that the document derived artifacts like subjects and summaries will be available in. The default language is English but by adding more languages you will get better search results in those languages.","descriptionMembers":"Add members from your organization or register external collaborators by providing their email addresses. Members will have access to the project as soon as it is created.","descriptionProjectName":"The project name is used to identify your project in the project list.","descriptionNoProjectName":"Please provide a project name.","errorCreatingProject":"An error occurred while creating the project.","errorFetchMembers":"Could not fetch organization members.","errorFetchOrgs":"Could not fetch organizations.","errorNoProjectAdmins":"Add at least one project administrator.","errorNoProjectMembers":"Add at least one project member.","infoFetchingOrgs":"Fetching organizations...","infoFetchingOrgMembers":"Fetching organization members...","infoProjectCreated":"The project has been created.","infoProjectSummary":"Project <strong>{{projectName}}</strong> will be created with the following <strong>{{memberCount}}</strong> members:","infoSelectedProjectMember":"You have selected <strong>one</strong> project member.","infoSelectedProjectMembers":"You have selected <strong>{{count}}</strong> project members.","labelEmail":"E-mail","labelMember":"{{orgName}} has only you as a member","labelMembers":"{{orgName}} has <strong>{{memberCount}} members</strong>:","labelName":"Name","labelRole":"Role","titleLanguage":"Project languages","titleMembers":"Project members","titleProjectName":"Project Name","titleSummary":"Summary"},"portalHome":{"greetingMorning":"Good morning","greetingAfternoon":"Good afternoon","greetingEvening":"Good evening","greetingSub":"{{org}} \xb7 {{activeProjects}} active projects \xb7 {{totalDocs}} documents indexed","heroTitle":"Start a new project","heroDesc":"Create a project, drop in your documents \u2014 Cue Index reads and connects everything. No tagging, no folders.","buttonNewProject":"New project","uploadTitle":"Upload documents","uploadDesc":"Add files to a project. Cue Index takes care of the rest.","uploadDrop":"Drop files here or","uploadBrowse":"browse","uploadFormats":"PDF \xb7 DWG \xb7 XLSX \xb7 DOCX \xb7 IFC","projectsTitle":"Projects","projectsSub":"Open a project to ask, search and run apps on its documents.","appsTitle":"Cue Studio apps","appsSub":"Ready-made tools and your team\'s own builds, running on the Index.","filterAll":"All","filterShelf":"Off-the-shelf","filterCustom":"Custom","modulesTitle":"Modules","modulesSub":"The foundation under every project.","indexTitle":"Cue Index","indexStat":"{{docs}} documents \xb7 {{entities}} entities","indexDesc":"The connected, searchable layer built automatically from your documents.","buttonBrowse":"Browse documents","tunerTitle":"Cue Tuner","tunerStat":"Custom entities & rules","tunerDesc":"Teach the Index your firm\'s entities, relationships and rules.","buttonDefineEntities":"Define entities"},"profile":{"buttonSignOut":"Sign Out","accountDetails":{"title":"Account Details","titleChangeEmail":"Change E-mail","titleChangePassword":"Change Password","titleSetPassword":"Set Password","errorEmailRequired":"E-mail is required","errorEmailInvalid":"Not a valid e-mail","errorEmailChangeFailed":"E-mail change failed","errorPasswordRequired":"Password is required","errorExistingPasswordRequired":"Existing Password is required","errorNewPasswordRequired":"New Password is required","errorPasswordChangeFailed":"Password change failed","errorPasswordCreateFailed":"Password creation failed","labelDisplayName":"Display name","labelEmail":"E-mail","labelNewEmail":"New E-mail","labelExistingPassword":"Existing Password","labelNewPassword":"New Password","labelPassword":"Password","labelButtonSave":"Save","messageChangingEmail":"Changing e-mail...","messageChangingPassword":"Changing password...","messageEmailChangeSuccess":"You should have received an e-mail on the new address with a confirmation link. Click the link to confirm the new e-mail address.","messageSettingPassword":"Setting password...","tooltipChange":"Change","tooltipSet":"Set"},"accountLinking":{"buttonLinkAccount":"Link an Account","infoNoLinks":"Your account is not linked to any Single sign-on providers.","title":"Account Linking","tooltipUnlink":"Unlink"},"apiKeys":{"buttonCreate":"Create API Key","buttonDownload":"Download","buttonRevoke":"Revoke","title":"API Keys","infoNoKey":"You can create an API key that lets you authenticate against the <a target=\\"_blank\\" href=\\"https://api-docs.qaecy.com/\\">Cue APIs</a>.","infoAPIKey":"Your API key can be used to authenticate against the <a target=\'_blank\' href=\'https://api-docs.qaecy.com/\'>Cue APIs</a>. Your API key expires on {{expirationDate}}."},"organizations":{"title":"Your Organizations"}},"projectFiles":{"labelCreateProvider":"Create Provider","labelButtonCancel":"Cancel","labelButtonCreate":"Create","errorProviderNameExists":"Provider name already exists","errorProviderNameRequired":"Provider name is required","infoCreateProvider":"There are no data sources in the project. A source can be a third-party cloud environment like SharePoint, but you can also create and manage your own sources here in the Cue portal.","infoLoadingFiles":"Loading files...","infoNoDataProviders":"The project has no data sources, and you do not have permission to create one. Please contact a project administrator.","infoUnprocessedEntries":"<strong>Note!</strong> Some of your uploaded files are still being processed and may not yet appear in the file manager. This process can take up to 10 minutes. Please check back shortly for the latest updates \u23f2\ufe0f\u2615","titleCreateDataProvider":"Create Data Source","titleNoDataProviders":"No Data Sources Available"},"projectSettings":{"members":{"buttonAddMember":"Add Member","buttonInviteMember":"Invite Member","buttonClose":"Close","buttonConfirm":"Confirm","buttonSave":"Save","buttonRemove":"Remove","infoAtLestOneAdmin":"There must be at least one admin in a project.<br />You cannot demote the role or remove the user<br /> unless you assign another user as admin.","infoConfirmChange":"You are about to change the role of <strong>{{name}}</strong> in the project.","infoConfirmChangeOwn":"You are about to change your own role in the project. You might lose access to some features.","infoConfirmRemove":"You are about to remove <strong>{{name}}</strong> from the project.","infoConfirmRemoveSelf":"You are about to remove yourself from the project. You will lose access to this project.","labelEmail":"E-mail","labelName":"Name","labelRole":"Role","title":"Project Members","titleEditMember":"Edit Member"},"publicKnowledgeRepos":{"buttonAddRepo":"Add Knowledge Repository","labelDescription":"Description","labelLabel":"Label","labelURL":"URL","title":"Public Knowledge Repositories (Experimental)","titleDescription":"Add public knowledge repositories that the agent should prioritize searching before searching general public knowledge repositories."},"status":{"info":"Currently <strong>{{accumulatedFilesSinceLastIdleEvent}}</strong> fact files ({{accumulatedSizeSinceLastIdleEvent}}) derived from uploaded documents have yet to be written to the store. The first write was <strong>{{timeFirstWrite}}</strong> and the last write was <strong>{{timeLastWrite}}</strong>. The maximum waiting time for files to be loaded in the databases is 10 minutes.","infoNoFiles":"There are no pending files for processing.","title":"Status"},"superAdmin":{"title":"Super Administrator Area","titleDescription":"Access to super administrator features for this project. Only available to users with a superadmin claim in their token."},"tier":{"description":"Choose the service level that best fits your project\'s needs. Each level offers different features and capacities, allowing you to select the one that best supports your goals and requirements.","title":"Tier","titleTierS":"Light","titleTierM":"Balanced","titleTierL":"Pro","descriptionTierS":"Uses a minimum of models for extracting and comparing entities, relationships, and summaries, relying instead on more traditional methods. By default, the most cost-effective models are used for queries through the agent.","descriptionTierM":"Uses more cost-effective models for extracting and comparing entities, relationships, and summaries, as well as answering questions through the agent, providing good results quickly.","descriptionTierL":"Uses the best models for extracting and comparing entities, relationships, and summaries, as well as answering questions through the agent, providing the most accurate and detailed results."},"tools":{"title":"Tools"}},"projectsOverview":{"infoLoadingProjects":"Loading projects...","infoNoMatchingProjects":"No projects match the search criteria...","infoNoProjects":"You are not assigned to any project.","labelAscending":"Ascending \u2191","labelCreated":"Created","labelDescending":"Descending \u2193","labelLastSync":"Last Sync","labelName":"Name","labelOrderBy":"Order by","placeholderFilter":"Filter...","tooltipCreateProject":"Create project","labelCreatingProject":"Creating project...","labelNewProject":"New project","successCreateProject":"Project created successfully","errorCreateProject":"Failed to create project","successDeleteProject":"Project deleted successfully","errorDeleteProject":"Failed to delete project","confirmDeleteProject":"Are you sure you want to delete this project?","confirmDeleteYes":"Delete","confirmDeleteNo":"Cancel","labelCreate":"Create","placeholderSelectOrg":"Select organisation","errorLoadingOrgs":"Failed to load organisations"},"regexMatcher":{"buttonAddMapping":"Add Mapping","buttonAddNamespace":"Add Namespace","buttonRun":"Run","errorEmptyStrings":"Entity types cannot be empty strings.","errorNamespaceMissing":"Namespace missing","errorUndefinedPrefix":"Undefined prefix \\"{{prefix}}\\" found in entity type \\"{{et}}\\"","labelEntityCategory":"Entity Category","labelEntityTypes":"Entity Types","labelIRI":"IRI","labelPrefix":"Prefix","labelRegex":"Regex","labelSampleSize":"Sample Size","title":"Regex Matcher","titleMappings":"Mappings","titleNamespaces":"Namespaces","titleSearchEntityTypes":"Search Entity Types","titleSearchExtent":"Search Extent","titleSearchPath":"Search File Path","titleSearchRawText":"Search Raw Text","titleSearchSummary":"Search Summary","titleUseSample":"Use Sample","tooltipBack":"Back to Configurator"},"rmlMapper":{"buttonListFunctions":"List functions","buttonRun":"Run","buttonToRML":"To RML","infoLoadingFunctions":"Loading functions...","labelDataFormat":"Data format","labelDelimiter":"Column delimiter","labelDescription":"Description","labelExample":"Example","labelIgnoredValues":"Ignored values","labelIgnoreEmptyStrings":"Ignore empty strings","labelMappingSerialization":"Mapping Serialization","labelParams":"Parameters","labelXPathLib":"XPath Library","title":"RML Mapper","titleInputData":"Input Data","titleMappingSchema":"Mapping Schema","titleSaturatedMapping":"Saturated Mapping Schema","tooltipIgnoredValues":"Comma-separated list of values to ignore when mapping data. For example \'-\' if the input data uses \'-\' to represent missing values.","tooltipIgnoreEmptyStrings":"When enabled (default setting), empty strings in the input data will be ignored in the mapped output.","tooltipToRML":"Convert the current YARRRML mapping schema to RML format.","tooltipViewSaturated":"View Saturated Mapping Schema"},"signIn":{"title":"Sign In to Your Account","emailLabel":"Email Address","emailRequired":"Email is required","emailInvalid":"Not a valid email","forgotPasswordLink":"Forgot your password?","forgotPasswordTitle":"Reset Password","goToSignIn":"Go to Sign In","goToSignInLink":"Go to Sign In","noAccountText":"Don\'t have an account?","passwordLabel":"Password","passwordRequired":"Password is required","passwordResetDescription":"Enter your email address and we\'ll send you instructions to reset your password.","resetSent":"A password reset link has been sent to your email. Follow the link to create a new password.","sendResetButton":"Send Reset Link","sendResetLinkButton":"Send Reset Link","signInButton":"Sign In","signInTitle":"Sign In","newUserSignUpLink":"New user? Sign up","signUpLink":"Sign Up","ssoOnly":"Sign in with SSO","ssoOr":"or sign in with SSO","welcome":"Welcome","welcomeTo":"Welcome to"},"signUp":{"alreadyHaveAccountLink":"Already have an account? Sign in","createButton":"Create Account","createTitle":"Create Account","emailInvalid":"Not a valid email","emailLabel":"Email Address","emailRequired":"Email is required","orgNotDefinedError":"It was not possible to associate your e-mail with a known organization. Please contact your organization administrator or get in touch with QAECY if your organization is not yet on Cue.","emailExistsError":"An account with this e-mail address already exists. Please sign in or use a different e-mail address.","serverError":"An error occurred. Please try again.","resendLink":"click this link to resend","resendPrompt":"If you don\'t receive an e-mail within 5 minutes,","resendSuccess":"Invitation e-mail resent.","successMessage":"User will be created under {{ orgName }}. You should have received an e-mail with instructions on how to set a password.","usernameLabel":"Username","usernameRequired":"Username is required","welcomeTo":"Welcome to"},"signInKey":{"labelAPIKey":"Cue API Key","labelButtonSignIn":"Sign In","errorApiKeyRequired":"API Key is required","titleSignIn":"Sign In"},"tunerOverview":{"tools":{"spatialDecomposition":"Spatial decomposition","spatialDecompositionTooltip":"Define a spatial decomposition that is relevant in this project. For example Site -> Building -> Storey -> Space or Building -> System -> Equipment","tables":"Tables","tablesTooltip":"Define tables for viewing and editing document and entity data in your project. For example a contract overview or drawing list","gis":"GIS","gisTooltip":"Explore AECO-curated GIS data sources and link geospatial representations to your project entities"}},"adminOverview":{"blocks":{"organizations":"Organizations","orgDetail":"Organization","projectDetail":"Project","usersWithoutOrg":"Users without organization","usersWithoutProject":"Users without project","projectsWithoutUsers":"Projects without users","projectsWithoutAdmins":"Projects without admins","orgsWithoutUsers":"Orgs without users","orgsWithoutAdmins":"Orgs without admins","orphanedItems":"Orphaned Items","graphQA":"Graph QA"},"actions":{"addOrg":"Add Organization","addCredits":"Add credits"},"orphaned":{"usersWithoutOrg":"Users, no org","usersWithoutProject":"Users, no project","projectsWithoutUsers":"Projects, no users","projectsWithoutAdmins":"Projects, no admins","orgsWithoutUsers":"Orgs, no users","orgsWithoutAdmins":"Orgs, no admins","show":"Show"},"addCreditsModal":{"title":"Add credits","label":"Credits to add","confirm":"Confirm","cancel":"Cancel","errorRequired":"Enter a positive amount"},"errors":{"createOrganization":"Failed to create organization","getOrgProjects":"Failed to load projects","getOrgMembers":"Failed to load members","getProjectConsumption":"Failed to load consumption data","addCredits":"Failed to add credits","createProject":"Failed to create project","setOrgDomains":"Failed to save domains","setOrgUserRole":"Failed to update user role","addOrgMember":"Failed to add member","removeOrgMember":"Failed to remove member","deleteOrganization":"Failed to delete organization","setProjectUserRole":"Failed to update user role","removeProjectMember":"Failed to remove user from project","getUsersWithoutOrg":"Failed to load users without organization","getUsersWithoutProject":"Failed to load users without project","getProjectsWithoutUsers":"Failed to load projects without users","getProjectsWithoutAdmins":"Failed to load projects without admins","getOrgsWithoutUsers":"Failed to load organizations without users","getOrgsWithoutAdmins":"Failed to load organizations without admins"},"users":{"colName":"Name","colEmail":"Email","loading":"Loading users\u2026"},"projects":{"colName":"Name","colOrg":"Organization","colCreated":"Created","loading":"Loading projects\u2026"},"orgs":{"empty":"No organizations yet.","members":"members","colName":"Name","colCreated":"Created","colMembers":"Members","colAdmins":"Admins","deleteOrg":"Delete organization","deleteOrgTitle":"Delete organization","deleteOrgBody":"Are you sure you want to delete \\"{{name}}\\"? This cannot be undone.","deleteOrgProjects":"Projects","deleteOrgProjectsKeep":"Keep","deleteOrgProjectsSoftDelete":"Soft delete","deleteOrgProjectsHardDelete":"Hard delete","deleteOrgUsers":"Users","deleteOrgUsersKeep":"Keep","deleteOrgUsersDelete":"Delete","deleteOrgSuccess":"Organization deleted"},"org":{"labelDomains":"Domains","labelCreated":"Created","labelMembers":"Members","labelAdmins":"Admins","labelAltIDs":"Alternative IDs","labelProjects":"Projects","addProject":"Add Project","addMember":"Add Member","addMemberTitle":"Add Member","addMemberName":"Name","addMemberEmail":"Email","tabProjects":"Projects","tabUsers":"Users","colUserName":"Name","colUserEmail":"Email","colUserRole":"Role","roleAdmin":"Admin","roleMember":"Member","tooltipLastAdmin":"Organization must have at least one admin","removeMember":"Remove member","removeMemberConfirmTitle":"Remove member","removeMemberConfirmBody":"Remove {{name}} from the organization?","removeMemberFromProjectsTitle":"Remove from projects","removeMemberFromProjectsBody":"Also remove {{name}} from all projects in this organization?","removeMemberSoleAdminTitle":"Delete project","removeMemberSoleAdminBody":"{{name}} is the only member of \\"{{project}}\\". Delete this project?","removeMemberSuccess":"Member removed"},"project":{"colName":"Name","colCreated":"Created","colLastSync":"Last sync","colPublic":"Public","labelCreated":"Created","labelLastSync":"Last sync","labelPublic":"Public","labelMembers":"Members","labelSyncers":"Syncers","labelAdmins":"Admins","labelAltIDs":"Alternative IDs","yes":"Yes","no":"No","tabUsers":"Users","colUserName":"Name","colUserEmail":"Email","colUserRole":"Role","roleAdmin":"Admin","roleMember":"Member","roleSyncer":"Syncer","tooltipLastAdmin":"Project must have at least one admin","removeUser":"Remove from project","removeUserConfirmTitle":"Remove user","removeUserConfirmBody":"Remove {{name}} from the project?","removeUserSuccess":"User removed from project","addCreditsSuccess":"Credits added to organization","consumption":{"title":"Consumption","creditsAvailable":"Credits available","creditsConsumed":"Credits consumed","filesProcessed":"Files processed","loading":"Loading consumption\u2026"}},"grid":{"columns":"Columns","rows":"Rows"},"createOrg":{"title":"New Organization","sectionOrg":"Organization details","sectionAdmin":"Admin user","labelOrgName":"Name","labelDomain":"Domains","placeholderDomain":"Add domain\u2026","adminNew":"New user","adminExisting":"Existing user","labelUserName":"Name","labelUserEmail":"Email","labelSearchUser":"Search users","searching":"Searching\u2026","noUsersFound":"No users found","labelCreate":"Create","errorRequired":"This field is required","errorDomainRequired":"Add at least one domain","errorDomainInvalid":"Enter a valid domain (e.g. example.com)","errorInvalidEmail":"Enter a valid email address","errorEmailDomainMismatch":"Email domain must match one of the org domains","sectionProject":"Create initial project","labelProjectName":"Project name"},"createProject":{"title":"New Project","labelName":"Project name","sectionMembers":"Member roles","colName":"Name","colRole":"Role","labelCreate":"Create","errorNameRequired":"Enter a project name","errorNoAdmin":"At least one member must be assigned the Admin role","roleNone":"\u2014","roleMember":"Member","roleAdmin":"Admin","roleSyncer":"Syncer"},"graphQA":{"projectId":"Project ID"}},"organizationSettings":{"title":"Organization Credits","panelOrgs":"Your Organizations","noOrgSelected":"Select an organization to manage credits","orgs":{"colName":"Name","colDomain":"Domain","colMembers":"Members"},"orgCredits":{"title":"Credit Pool","total":"Total","available":"Available","loading":"Loading credits\u2026","topUp":"Top up"},"projects":{"title":"Projects","colName":"Name","colConsumed":"Consumed","colFiles":"Files"},"errors":{"loadOrganizations":"Failed to load organizations","loadProjects":"Failed to load projects","loadOrgCredits":"Failed to load credit information","loadConsumption":"Failed to load consumption data","topUpCredits":"Failed to initiate top-up"}}}}')}}]);
|
package/2399.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[2399],{5448(L,D,l){l.d(D,{L:()=>e});var _=l(7705),c=l(2245),g=l(5547);const d=["*"];let e=(()=>{class h{fontSize=(0,_.hFB)("m");italic=(0,_.hFB)(!1);noWrap=(0,_.hFB)(!0);static \u0275fac=function(C){return new(C||h)};static \u0275cmp=g.VBU({type:h,selectors:[["cue-button-label"]],inputs:{fontSize:[1,"fontSize"],italic:[1,"italic"],noWrap:[1,"noWrap"]},ngContentSelectors:d,decls:3,vars:3,consts:[[3,"size","italic","noWrap"]],template:function(C,r){1&C&&(g.NAR(),g.j41(0,"div")(1,"cue-typography",0),g.SdG(2),g.k0s()()),2&C&&(g.R7$(),g.Y8G("size",r.fontSize())("italic",r.italic())("noWrap",r.noWrap()))},dependencies:[c.Typography],styles:["div[_ngcontent-%COMP%]{transform:translateY(.05em)}"]})}return h})()},4853(L,D,l){l.d(D,{H:()=>j});var _=l(7705),c=l(5802),g=l(7089),d=l(7023),e=l(5381),h=l(5971),v=l(3319),m=l(356),C=l(6279),r=l(5547);const M=()=>({position:"bottomleft"}),y=(E,I)=>I.label||E;function w(E,I){if(1&E){const b=r.RV6();r.j41(0,"cue-menu-item",4),r.bIt("click",function(){const P=c.eBV(b).$implicit;return c.Njj(P.action())}),r.EFF(1),r.k0s()}if(2&E){const b=I.$implicit;r.Y8G("selected",b.selected),r.R7$(),r.JRh(b.label)}}function R(E,I){if(1&E&&(r.j41(0,"cue-menu-wrap"),r.Z7z(1,w,2,2,"cue-menu-item",3,y),r.k0s()),2&E){const b=r.XpG();r.R7$(),r.Dyx(b.contextMenuItems())}}function V(E,I){if(1&E){const b=r.RV6();r.j41(0,"cue-button",5),r.bIt("click",function(P){const B=c.eBV(b).$implicit,k=r.XpG();return c.Njj(k.handleClick(P,B))}),r.nrm(1,"cue-button-icon",6),r.k0s()}if(2&E){const b=I.$implicit,x=r.XpG(),P=r.sdS(1);r.Y8G("cueTooltip",b.label)("variant",b.variant?b.variant:x.variant())("size",x.size())("cueContextMenu",P)("contextMenuData",r.lJ4(7,M))("cueContextEnabled",void 0!==b.contextMenuItems&&b.contextMenuItems.length>0),r.R7$(),r.Y8G("icon",b.icon)}}let j=(()=>{class E{items=_.hFB.required();noGap=(0,_.hFB)(!0);direction=(0,_.hFB)("row");size=(0,_.hFB)("xs");variant=(0,_.hFB)("tertiary");mouseEnter=(0,_.CGW)();mouseLeave=(0,_.CGW)();contextMenuItems=(0,c.vPA)([]);handleClick(b,x){b.stopPropagation(),x.contextMenuItems&&x.contextMenuItems.length>0?this.contextMenuItems.set(x.contextMenuItems):x.action&&(this.contextMenuItems.set([]),x.action())}static \u0275fac=function(x){return new(x||E)};static \u0275cmp=r.VBU({type:E,selectors:[["cue-entity-menu"]],inputs:{items:[1,"items"],noGap:[1,"noGap"],direction:[1,"direction"],size:[1,"size"],variant:[1,"variant"]},outputs:{mouseEnter:"mouseEnter",mouseLeave:"mouseLeave"},decls:5,vars:2,consts:[["contextMenu",""],["gap","s","justify","end",2,"width","100%",3,"mouseenter","mouseleave","direction","noGap"],["trigger","leftclick",3,"cueTooltip","variant","size","cueContextMenu","contextMenuData","cueContextEnabled"],[3,"selected"],[3,"click","selected"],["trigger","leftclick",3,"click","cueTooltip","variant","size","cueContextMenu","contextMenuData","cueContextEnabled"],[3,"icon"]],template:function(x,P){1&x&&(r.DNE(0,R,3,0,"ng-template",null,0,r.C5r),r.j41(2,"cue-flexcontainer",1),r.bIt("mouseenter",function(){return P.mouseEnter.emit()})("mouseleave",function(){return P.mouseLeave.emit()}),r.Z7z(3,V,2,8,"cue-button",2,y),r.k0s()),2&x&&(r.R7$(2),r.Y8G("direction",P.direction())("noGap",P.noGap()),r.R7$(),r.Dyx(P.items()))},dependencies:[e.n,h.$,g.d,v.a,d.Q,m.M,C.D],encapsulation:2,changeDetection:0})}return E})()},1024(L,D,l){l.d(D,{p:()=>g});var _=l(5547);const c=["*"];let g=(()=>{class d{static \u0275fac=function(v){return new(v||d)};static \u0275cmp=_.VBU({type:d,selectors:[["cue-key-val-list"]],ngContentSelectors:c,decls:2,vars:0,consts:[[1,"key-val-list"]],template:function(v,m){1&v&&(_.NAR(),_.rj2(0,"div",0),_.SdG(1),_.eux())},styles:[".key-val-list[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:var(--cue-grid-gap-s)}"]})}return d})()},9421(L,D,l){l.d(D,{F:()=>v});var _=l(7705),c=l(5802),g=l(2271),d=l(7335),e=l(2245),h=l(5547);let v=(()=>{class m{entityMenuDirective;size=(0,_.hFB)("m");key=_.hFB.required();val=_.geq.required();options=(0,_.hFB)([]);suffix=(0,_.hFB)("");valueChange=(0,_.CGW)();editModeEnabled=(0,c.vPA)(!1);valueChanged=(0,g.EW)(()=>this.val()!==this.newValue());newValue=(0,g.uu)(()=>this.val());labelSize=(0,g.EW)(()=>{switch(this.size()){case"s":return"xs";case"m":return"s";case"l":return"m";case"xl":return"l"}});onKeyPress(r){this.editModeEnabled()&&("Escape"===r.key?(this._reset(),r.stopPropagation()):"Enter"===r.key&&this._emitChange())}saveCancelMenu=(0,g.EW)(()=>{const r=[{icon:"close",label:"Cancel",action:()=>this._reset()}];return this.valueChanged()&&r.push({icon:"save",label:"Save",action:()=>this._emitChange()}),r});selectionChange(r){this.newValue.set(r?.toString()??"")}inputChange(r){this.newValue.set(r)}_emitChange(){this.valueChange.emit(this.newValue()),this.val.set(this.newValue()),this.editModeEnabled.set(!1)}_reset(){this.newValue.set(this.val()),this.editModeEnabled.set(!1)}static \u0275fac=function(M){return new(M||m)};static \u0275cmp=h.VBU({type:m,selectors:[["cue-key-val"]],viewQuery:function(M,y){if(1&M&&h.GBs(d.e,5),2&M){let w;h.mGM(w=h.lsd())&&(y.entityMenuDirective=w.first)}},hostBindings:function(M,y){1&M&&h.bIt("keydown",function(R){return y.onKeyPress(R)},h.EBC)},inputs:{size:[1,"size"],key:[1,"key"],val:[1,"val"],options:[1,"options"],suffix:[1,"suffix"]},outputs:{val:"valChange",valueChange:"valueChange"},decls:8,vars:5,consts:[[1,"key-val-container"],[3,"size"],[1,"value-content"]],template:function(M,y){1&M&&(h.j41(0,"dl",0)(1,"dt")(2,"cue-typography",1),h.EFF(3),h.k0s()(),h.j41(4,"dd")(5,"cue-typography",1)(6,"span",2),h.EFF(7),h.k0s()()()()),2&M&&(h.R7$(2),h.Y8G("size",y.labelSize()),h.R7$(),h.JRh(y.key()),h.R7$(2),h.Y8G("size",y.size()),h.R7$(2),h.Lme("",y.val()," ",y.suffix()))},dependencies:[e.Typography],styles:[".key-val-container[_ngcontent-%COMP%]{margin:0;display:flex;flex-direction:column;gap:var(--cue-grid-gap-s, 8px)}dt[_ngcontent-%COMP%], dd[_ngcontent-%COMP%]{margin:0}.read-mode-container[_ngcontent-%COMP%]{display:inline-flex;align-items:center;width:100%;position:relative}.read-mode-container.interactive[_ngcontent-%COMP%]:hover{cursor:pointer}.value-content[_ngcontent-%COMP%]{flex:1}[_nghost-%COMP%]{color:var(--cue-typography-text-color, inherit)}dt[_ngcontent-%COMP%] cue-typography[_ngcontent-%COMP%], dd[_ngcontent-%COMP%] cue-typography[_ngcontent-%COMP%], .value-content[_ngcontent-%COMP%]{color:var(--cue-typography-text-color, inherit)!important}dt[_ngcontent-%COMP%] cue-typography[_ngcontent-%COMP%] div[_ngcontent-%COMP%], dd[_ngcontent-%COMP%] cue-typography[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{color:var(--cue-typography-text-color, inherit)!important}[_ngcontent-%COMP%]:deep(cue-svg-icon), [_ngcontent-%COMP%]:deep(cue-entity-menu cue-svg-icon){color:var(--cue-icon-color, inherit)!important}.dirty-indicator[_ngcontent-%COMP%]{opacity:.8;margin-left:4px;color:var(--cue-typography-text-color, inherit)!important;font-weight:700;font-size:.4em;transform:translateY(-1em)}"]})}return m})()},7335(L,D,l){l.d(D,{e:()=>m});var _=l(7705),c=l(5547),g=l(5802),d=l(8359),e=l(6939),h=l(2444),v=l(4853);let m=(()=>{class C{_targetEl=(0,g.WQX)(c.aKT);_overlay=(0,g.WQX)(h.hJ);_overlayRef;_isOverlayHovered=!1;_subscriptions;display=(0,_.hFB)("on-hover");menuItems=_.hFB.required();menuEnabled=(0,_.hFB)(!0);onMouseEnter(){if("on-hover"===this.display()){if(!this.menuItems().length)return void this.removeOverlayMenu();this.appendOverlayMenu()}}onMouseLeave(){this._checkShouldRemoveOverlay()}appendOverlayMenu(){if(!this.menuItems().length||this._overlayRef)return;const M=this._overlay.create({positionStrategy:this._overlay.position().flexibleConnectedTo(this._targetEl).withPositions([{originX:"end",originY:"center",overlayX:"start",overlayY:"center",offsetX:2,offsetY:0}])});this._overlayRef=M;const y=window.getComputedStyle(this._targetEl.nativeElement).color;M.overlayElement.style.color=y;const w=new e.A8(v.H),R=M.attach(w);R.instance.items=this.menuItems,this._subscriptions&&this._subscriptions.unsubscribe(),this._subscriptions=new d.yU,this._subscriptions.add(R.instance.mouseEnter.subscribe(()=>{this._isOverlayHovered=!0})),this._subscriptions.add(R.instance.mouseLeave.subscribe(()=>{this._isOverlayHovered=!1,this._checkShouldRemoveOverlay()}))}removeOverlayMenu(){this._overlayRef&&(this._subscriptions&&(this._subscriptions.unsubscribe(),this._subscriptions=void 0),this._overlayRef.detach(),this._overlayRef.dispose(),this._overlayRef=void 0)}_checkShouldRemoveOverlay(){setTimeout(()=>{this._isOverlayHovered||this.removeOverlayMenu()},300)}static \u0275fac=function(y){return new(y||C)};static \u0275dir=c.FsC({type:C,selectors:[["","cueEntityMenu",""]],hostBindings:function(y,w){1&y&&c.bIt("mouseenter",function(){return w.onMouseEnter()})("mouseleave",function(){return w.onMouseLeave()})},inputs:{display:[1,"display"],menuItems:[1,"menuItems"],menuEnabled:[1,"menuEnabled"]}})}return C})()},2399(L,D,l){l.d(D,{CueDocumentViewer:()=>Oe});var _=l(467),c=l(7705),g=l(2271),d=l(5802),e=l(5547),h=l(9769),v=l(5381),m=l(2245),C=l(1024),r=l(9421),M=l(5794),y=l(9352),w=l(6117),R=l(8547),V=l(3319),j=l(5971),E=l(7573);const I=(o,f)=>t=>t.isHighlight;function b(o,f){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 x(o,f){if(1&o){const t=e.RV6();e.j41(0,"cue-button",5),e.bIt("click",function(i){d.eBV(t);const a=e.XpG(2).$implicit,s=e.XpG();return d.Njj(s.onDeleteHighlight(i,a.highlight))}),e.nrm(1,"cue-button-icon",6),e.k0s()}}function P(o,f){if(1&o){const t=e.RV6();e.j41(0,"span",2),e.bIt("click",function(){d.eBV(t);const i=e.XpG().$implicit,a=e.XpG();return d.Njj(a.onHighlightClick(i.highlight))}),e.nVh(1,b,2,1,"span",3),e.EFF(2),e.nVh(3,x,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 B(o,f){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 k(o,f){if(1&o&&e.nVh(0,P,4,4,"span",1)(1,B,2,2,"span"),2&o){const t=f.$implicit;e.vxM(t.isHighlight&&t.highlight?0:1)}}let $=(()=>{class o{path=c.hFB.required();highlights=(0,c.hFB)([]);allowDelete=(0,c.hFB)(!1);allowAdd=(0,c.hFB)(!1);size=(0,c.hFB)("m");highlightClick=(0,c.CGW)();deleteHighlight=(0,c.CGW)();textSelected=(0,c.CGW)();segments=(0,g.EW)(()=>this.parseSegments(this.path(),this.highlights()));parseSegments(t,n){const i=n.filter(p=>p.path===t);if(0===i.length)return[{text:t,isHighlight:!1,segmentStart:0}];const a=[...i].sort((p,T)=>p.start-T.start),s=[];let u=0;for(const p of a)p.start>u&&s.push({text:t.substring(u,p.start),isHighlight:!1,segmentStart:u}),s.push({text:t.substring(p.start,p.end),isHighlight:!0,highlight:p,segmentStart:p.start}),u=p.end;return u<t.length&&s.push({text:t.substring(u),isHighlight:!1,segmentStart:u}),s}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),s=t.currentTarget,u=this.getAbsoluteOffset(s,a.startContainer,a.startOffset),p=this.getAbsoluteOffset(s,a.endContainer,a.endOffset);n.removeAllRanges(),p>u&&this.textSelected.emit({path:this.path(),start:u,end:p,text:this.path().substring(u,p)})}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 T=parseInt(a.getAttribute("data-segment-start"),10);let F=0;const A=document.createTreeWalker(a,NodeFilter.SHOW_TEXT);let O=A.nextNode();for(;O&&O!==n;)F+=O.textContent?.length??0,O=A.nextNode();return T+F+i}a=a.parentElement}const s=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);let u=0,p=s.nextNode();for(;p&&p!==n;)u+=p.textContent?.length??0,p=s.nextNode();return u+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(s){return i.onMouseUp(s)}),e.Z7z(1,k,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,I,i))),e.R7$(),e.Dyx(i.segments()))},dependencies:[h.MD,j.$,V.a],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 z=l(5745),X=l(63),H=l(9695),K=l(5448),Y=l(2611);const G=o=>({count:o}),J=(o,f)=>t=>t.iri;function Q(o,f){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 Z(o,f){if(1&o){const t=e.RV6();e.j41(0,"cue-ag-grid",16),e.bIt("selectedRows",function(i){d.eBV(t);const a=e.XpG(4);return d.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 q(o,f){if(1&o){const t=e.RV6();e.j41(0,"cue-flexcontainer",12)(1,"cue-button",13),e.bIt("click",function(){d.eBV(t);const i=e.XpG(3);return d.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,Z,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 ee(o,f){if(1&o&&e.nVh(0,Q,3,3,"cue-typography",11)(1,q,10,14),2&o){const t=e.XpG(2);e.vxM(t._fileLocationsLoading()?0:null!==t._fileLocations()?1:-1)}}function te(o,f){if(1&o){const t=e.RV6();e.j41(0,"cue-flexcontainer",9)(1,"cue-input-switch",10),e.bIt("toggleChange",function(i){d.eBV(t);const a=e.XpG();return d.Njj(a.onApplyToAllChange(i))}),e.k0s(),e.j41(2,"cue-typography",11),e.EFF(3),e.nI1(4,"transloco"),e.k0s()(),e.nVh(5,ee,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 ne(o,f){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 ie=(()=>{class o{selection=c.hFB.required();availableEntityCategories=(0,c.hFB)([]);fileLocations=(0,c.hFB)([]);requestFileLocations=(0,c.hFB)(void 0);requestFilePathEntityAdd=(0,c.hFB)(void 0);confirm=(0,c.CGW)();cancel=(0,c.CGW)();_selectedEntityCategory=(0,d.vPA)("");_applyToAllFiles=(0,d.vPA)(!1);_fileLocations=(0,d.vPA)(null);_fileLocationsLoading=(0,d.vPA)(!1);_matchTableExpanded=(0,d.vPA)(!1);_selectedPaths=(0,d.vPA)([]);_saving=(0,d.vPA)(!1);_saveError=(0,d.vPA)(null);_dirPrefix=(0,g.EW)(()=>{const t=this.selection();return t.path.substring(0,t.end)});_matchedLocations=(0,g.EW)(()=>{const t=this._fileLocations();if(!t)return[];const n=this._dirPrefix();return t.filter(i=>i.path.startsWith(n))});_matchCount=(0,g.EW)(()=>this._matchedLocations().length);_matchTableRowData=(0,g.EW)(()=>this._matchedLocations().map(t=>({iri:t.iri,path:t.path,providerId:t.providerId})));_entityCategoryLabelMap=(0,g.EW)(()=>this.availableEntityCategories().reduce((t,n)=>(t[n.iri]=n.label,t),{}));_matchTableRowSelection={mode:"multiRow",selectAll:"filtered"};_filePathLabel=(0,y.Xx)("components.contentBlocks.documentViewer.labelFilePath");_matchTableColDefs=(0,g.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,_.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 s=n._dirPrefix();n._selectedPaths.set(a.filter(u=>u.path.startsWith(s)))}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,_.A)(function*(){const n=t._selectedEntityCategory();if(!n)return;const i=t.selection().path,a=t._fileLocations()?.find(p=>p.path===i)??t.fileLocations().find(p=>p.path===i)??{iri:"",path:i},s=t._applyToAllFiles()&&t._selectedPaths().length>0?t._selectedPaths():[a],u=t.requestFilePathEntityAdd();if(u){t._saving.set(!0),t._saveError.set(null);try{yield u(n,s)}catch(p){return console.error("[EntityMentionModal] Failed to save entity mention:",p),t._saveError.set(p instanceof Error?p.message:String(p)),void t._saving.set(!1)}t._saving.set(!1)}t.confirm.emit({entityCategory:n,paths:s})})()}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(s){return i.onEntityCategoryChange(s)}),e.k0s(),e.nVh(7,te,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,ne,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,J,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:[v.n,r.F,V.a,j.$,K.L,m.Typography,z.a,X.Select,H.Switch,Y.R,y.Kj],styles:[".modal-content[_ngcontent-%COMP%]{width:640px;max-width:calc(100vw - 32px)}"],changeDetection:0})}return o})();const oe=()=>[];function ae(o,f){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 se(o,f){if(1&o&&(e.j41(0,"cue-key-val-list"),e.nVh(1,ae,2,4,"cue-key-val",6),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.vxM(t.subject()?1:-1)}}function le(o,f){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 re(o,f){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 ce(o,f){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 de(o,f){if(1&o){const t=e.RV6();e.j41(0,"cue-button",19),e.bIt("click",function(){d.eBV(t);const i=e.XpG(3);return d.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 ue(o,f){if(1&o){const t=e.RV6();e.j41(0,"cue-button",19),e.bIt("click",function(){d.eBV(t);const i=e.XpG(3);return d.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,f){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,ce,2,2,"span",15),e.k0s()(),e.j41(6,"dd",16),e.nVh(7,de,2,1,"cue-button",17),e.j41(8,"cue-file-path-viewer",18),e.bIt("textSelected",function(i){d.eBV(t);const a=e.XpG(2);return d.Njj(a.onTextSelected(i))}),e.k0s(),e.nVh(9,ue,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,oe))("allowDelete",t.filePathEntitiesEditable())("allowAdd",t.filePathEntitiesEditable()),e.R7$(),e.vxM(t.fileLocations().length>1?9:-1)}}function ge(o,f){if(1&o&&(e.j41(0,"cue-key-val-list"),e.nrm(1,"hr"),e.nVh(2,re,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 _e(o,f){if(1&o){const t=e.RV6();e.j41(0,"cue-entity-mention-modal",22),e.bIt("confirm",function(i){d.eBV(t);const a=e.XpG();return d.Njj(a.onEntityMentionConfirm(i))})("cancel",function(){d.eBV(t);const i=e.XpG();return d.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 me=(()=>{class o{subject=c.hFB.required();handlers=c.hFB.required();dataChanged=(0,c.CGW)();filePathEntityAdded=(0,c.CGW)();fileLocations=(0,c.hFB)([]);_fileLocationsProvider=(0,g.EW)(()=>{const t=this.handlers().requestFileLocations;if(t)return t;const n=this.fileLocations();return n.length?()=>Promise.resolve(n):void 0});filePathEntities=(0,c.geq)([]);contentCategories=(0,c.hFB)([]);contentCategoriesEditable=(0,c.hFB)(!1);filePathEntitiesVisible=(0,c.hFB)(!1);filePathEntitiesEditable=(0,c.hFB)(!1);menuItems=(0,c.hFB)([]);availableContentCategories=(0,c.hFB)([]);availableEntityCategories=(0,c.hFB)([]);collapsed=(0,c.hFB)(!1);hasDocInfo=(0,g.EW)(()=>{const t=""!==this.subject(),n=this.fileLocations().length>0;return t||n});currentFilePathIndex=(0,d.vPA)(0);_entityCategoryModalVisible=(0,d.vPA)(!1);_pendingSelection=(0,d.vPA)(null);_requestFilePathEntityAdd=(0,g.EW)(()=>{var t=this;const n=this.handlers().requestFilePathEntityAdd;if(n)return function(){var i=(0,_.A)(function*(a,s){const u=t._pendingSelection();u&&(yield n({paths:s,start:u.start,end:u.end,text:u.text,entityCategory:a,folderPath:u.path.substring(0,u.end)}))});return function(a,s){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,g.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,g.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,g.uu)(()=>this.contentCategories());contentCategoriesString=(0,g.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,y.Xx)("components.documentInfo.infoChangeContentCategory");rdfEditConfig=(0,g.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,_.A)(function*(a){console.log(a);const s={subject:t.subject(),predicate:`${E.E.qcy}contentCategory`,objects:t._contentCategories(),newObjects:a.newValue,type:"contentCategory",comment:a.comment};yield n(s),t._contentCategories.set(a.newValue),t.dataChanged.emit({contentCategories:a.newValue})}),function(s){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,se,2,1,"cue-key-val-list"),e.k0s(),e.nVh(4,le,6,1,"cue-flexcontainer",4),e.k0s(),e.nVh(5,ge,4,2,"cue-key-val-list"),e.k0s(),e.nVh(6,_e,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:[v.n,C.p,r.F,M.L,w.W,R.T,V.a,j.$,$,m.Typography,ie,y.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 fe{requestRDFChange;requestFileLocations;requestFilePathEntityAdd}var pe=l(2065),ve=l(5187),ye=l(7293);const be=["viewerHost"];function Ce(o,f){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,f){1&o&&(e.j41(0,"cue-flexcontainer",5)(1,"cue-typography"),e.EFF(2,"Loading\u2026"),e.k0s()())}function Ee(o,f){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 xe(o,f){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,f){if(1&o&&(e.j41(0,"div",3),e.nVh(1,Ce,1,3,"cue-document-info",4),e.nVh(2,Me,3,0,"cue-flexcontainer",5)(3,Ee,3,1,"cue-flexcontainer",5),e.j41(4,"div",6),e.eu8(5,null,1),e.k0s(),e.nVh(7,xe,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,f){1&o&&e.eu8(0)}function we(o,f){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 Re(o,f){1&o&&e.eu8(0)}function Fe(o,f){if(1&o&&e.DNE(0,Re,1,0,"ng-container",9),2&o){e.XpG();const t=e.sdS(1);e.Y8G("ngTemplateOutlet",t)}}const Ie=[".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 Oe=(()=>{class o{set _viewerHostRef(t){if(this._viewerHost=t,t&&this._lastRenderArgs){const{url:n,suffix:i,page:a,viewerTypeOverride:s}=this._lastRenderArgs;this._renderViewer(n,i,a,s)}}_viewerHost;_lastRenderArgs;currentViewerRef;cue=(0,c.hFB)(void 0);uuid=(0,c.hFB)(void 0);projectId=(0,c.hFB)(void 0);showDocumentInfo=(0,c.hFB)(!0,{transform:c.L39});showLogo=(0,c.hFB)(!1,{transform:c.L39});_uuidOnly=(0,g.EW)(()=>{const t=this.uuid();return t?t.split("?")[0].trim():void 0});extraMenuItems=(0,c.hFB)([]);portalBaseURL=(0,c.hFB)("https://cue.qaecy.com");variant=(0,c.hFB)("none");_cardVariant=(0,g.EW)(()=>this.variant());state=(0,d.vPA)("idle");errorMessage=(0,d.vPA)(null);resolvedUrl=(0,d.vPA)(null);resolvedSuffix=(0,d.vPA)(null);_docSubject=(0,d.vPA)("");_alternatives=(0,d.vPA)([]);_originalUuid=(0,d.vPA)(null);_originalDocSuffix=(0,d.vPA)(null);_cueSnapshot=null;_projectIdSnapshot=null;_inputWarningTimer;_blobUrls=new Set;_docInfoHandlers=new fe;_menuItems=(0,g.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 s=this.resolvedSuffix();t.push({icon:"document",label:"Alternative representation",children:a.map(u=>({label:u.original?`Original (${u.suffix.replace(".","").toUpperCase()})`:u.suffix.replace(".","").toUpperCase(),tooltip:s===u.suffix?"Currently shown":void 0,action:()=>this._switchToAlternative(u)}))})}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,d.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,_.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:s,page:u}=function Te(o){const[f,t]=o.split("?"),n=f.trim();let i=null;if(t){const s=new URLSearchParams(t).get("page");if(null!==s){const u=parseInt(s,10);!isNaN(u)&&u>0&&(i=u)}}return{uuid:n,page:i}}(n),p=t.createProjectDocuments(i),F=(yield p.fetchDocumentData([s]))[s];if(!F)throw new Error(`Document '${s}' not found in project '${i}'.`);a._docSubject.set(F.subject??""),a._originalUuid.set(s),a._originalDocSuffix.set(F.suffix);const A=yield p.fetchAlternativeRepresentations(s);a._alternatives.set([{uuid:s,suffix:F.suffix,original:!0},...A.filter(S=>S.id!==s).map(S=>({uuid:S.id,suffix:S.suffix,original:!1,remoteRelativePath:S.remoteRelativePath}))]);const{uuid:O,suffix:N,remoteRelativePath:U}=function Le(o,f){const t=[o,...f];let n,i=1/0;for(const a of t){const s=Ie.indexOf(a.suffix);-1!==s&&s<i&&(i=s,n=a)}return n?{uuid:n.id,suffix:n.suffix,remoteRelativePath:n.remoteRelativePath}:{uuid:o.id,suffix:o.suffix}}(F,A),W=U?yield a._toBlobUrl(t,t.storage.getAltRepDownloadUrl(U),i):yield a._toBlobUrl(t,t.storage.getDownloadUrl(i,O,N),i);a.resolvedUrl.set(W),a.resolvedSuffix.set(N);const Ve=[".eml",".msg",".emlx",".mbx"].includes(F.suffix)&&".json"===N?"email":void 0;yield a._renderViewer(W,N,u,Ve),a.state.set("ready")}catch(s){const u=s instanceof Error?s.message:String(s);console.error("[CueDocumentViewerWC] Failed to load document:",u),a.errorMessage.set(u),a.state.set("error")}}else a.state.set("idle")})()}_toBlobUrl(t,n,i){var a=this;return(0,_.A)(function*(){const s=yield t.auth.authenticatedFetch(n,{headers:{"cue-project-id":i}});if(!s.ok)throw new Error(`Failed to fetch document: ${s.status} ${s.statusText}`);const u=URL.createObjectURL(yield s.blob());return a._blobUrls.add(u),u})()}_renderViewer(t,n,i,a){var s=this;return(0,_.A)(function*(){try{const{DocumentViewer:u}=yield Promise.all([l.e(3418),l.e(3036)]).then(l.bind(l,3036)),{DocumentViewerSettings:p}=yield l.e(3418).then(l.bind(l,3418));s._viewerHost?.clear(),s.currentViewerRef?.destroy();const T=new p;if(null!==i&&(T.pdf.page=String(i)),!s._viewerHost)throw new Error("viewerHost is not yet available \u2014 view has not been initialized.");s._lastRenderArgs={url:t,suffix:n,page:i,viewerTypeOverride:a},s.currentViewerRef=s._viewerHost.createComponent(u),s.currentViewerRef.setInput("url",t),s.currentViewerRef.setInput("suffix",n),s.currentViewerRef.setInput("settings",T),a&&s.currentViewerRef.setInput("viewerTypeOverride",a)}catch(u){throw new Error(`Failed to load viewer component: ${u instanceof Error?u.message:String(u)}`)}})()}_switchToAlternative(t){var n=this;return(0,_.A)(function*(){const i=n._cueSnapshot,a=n._projectIdSnapshot;if(i&&a)try{const s=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(s),n.resolvedSuffix.set(t.suffix),yield n._renderViewer(s,t.suffix,null)}catch(s){console.error("[CueDocumentViewerWC] Failed to switch to alternative:",s)}})()}_downloadOriginal(){var t=this;return(0,_.A)(function*(){const n=t._cueSnapshot,i=t._projectIdSnapshot,a=t._originalUuid(),s=t._originalDocSuffix();if(n&&i&&a&&s)try{const u=yield n.storage.downloadBlob(i,a,s);(0,pe.KE)(u,`${a}${s}`)}catch(u){console.error("[CueDocumentViewerWC] Failed to download original:",u)}})()}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(be,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,we,2,3,"cue-card",2)(3,Fe,1,1,"ng-container")),2&n&&(e.R7$(2),e.vxM("none"!==i.variant()?2:3))},dependencies:[h.MD,h.T3,v.n,m.Typography,me,ve.Card,ye.x],styles:["[_nghost-%COMP%]{display:contents}"],changeDetection:0})}return o})()},2065(L,D,l){function g(h,v,m="text/plain"){return function _(h,v="data.zip"){const m=document.createElement("a"),C=URL.createObjectURL(h);m.href=C,m.download=v,document.body.appendChild(m),m.click(),document.body.removeChild(m),URL.revokeObjectURL(C)}(new Blob([h],{type:m}),v)}function d(h,v){const m=document.createElement("a");m.style.display="hidden",m.setAttribute("href",window.URL.createObjectURL(h)),m.setAttribute("download",v),document.body.appendChild(m),m.click(),m.remove()}l.d(D,{KE:()=>d,YN:()=>g})}}]);
|
|
1
|
+
"use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[2399],{2399(I,x,d){d.d(x,{CueDocumentViewer:()=>Ve});var p=d(467),r=d(7705),f=d(2271),c=d(5802),e=d(5547),_=d(9769),m=d(5381),g=d(2245),b=d(1024),E=d(9421),L=d(5794),D=d(9352),S=d(6117),k=d(8547),F=d(3319),R=d(5971),A=d(7573);const N=(o,u)=>t=>t.isHighlight;function B(o,u){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 G(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-button",5),e.bIt("click",function(i){c.eBV(t);const a=e.XpG(2).$implicit,l=e.XpG();return c.Njj(l.onDeleteHighlight(i,a.highlight))}),e.nrm(1,"cue-button-icon",6),e.k0s()}}function $(o,u){if(1&o){const t=e.RV6();e.j41(0,"span",2),e.bIt("click",function(){c.eBV(t);const i=e.XpG().$implicit,a=e.XpG();return c.Njj(a.onHighlightClick(i.highlight))}),e.nVh(1,B,2,1,"span",3),e.EFF(2),e.nVh(3,G,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 U(o,u){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 O(o,u){if(1&o&&e.nVh(0,$,4,4,"span",1)(1,U,2,2,"span"),2&o){const t=u.$implicit;e.vxM(t.isHighlight&&t.highlight?0:1)}}let X=(()=>{class o{path=r.hFB.required();highlights=(0,r.hFB)([]);allowDelete=(0,r.hFB)(!1);allowAdd=(0,r.hFB)(!1);size=(0,r.hFB)("m");highlightClick=(0,r.CGW)();deleteHighlight=(0,r.CGW)();textSelected=(0,r.CGW)();segments=(0,f.EW)(()=>this.parseSegments(this.path(),this.highlights()));parseSegments(t,n){const i=n.filter(h=>h.path===t);if(0===i.length)return[{text:t,isHighlight:!1,segmentStart:0}];const a=[...i].sort((h,y)=>h.start-y.start),l=[];let s=0;for(const h of a)h.start>s&&l.push({text:t.substring(s,h.start),isHighlight:!1,segmentStart:s}),l.push({text:t.substring(h.start,h.end),isHighlight:!0,highlight:h,segmentStart:h.start}),s=h.end;return s<t.length&&l.push({text:t.substring(s),isHighlight:!1,segmentStart:s}),l}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),l=t.currentTarget,s=this.getAbsoluteOffset(l,a.startContainer,a.startOffset),h=this.getAbsoluteOffset(l,a.endContainer,a.endOffset);n.removeAllRanges(),h>s&&this.textSelected.emit({path:this.path(),start:s,end:h,text:this.path().substring(s,h)})}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 y=parseInt(a.getAttribute("data-segment-start"),10);let v=0;const w=document.createTreeWalker(a,NodeFilter.SHOW_TEXT);let C=w.nextNode();for(;C&&C!==n;)v+=C.textContent?.length??0,C=w.nextNode();return y+v+i}a=a.parentElement}const l=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);let s=0,h=l.nextNode();for(;h&&h!==n;)s+=h.textContent?.length??0,h=l.nextNode();return s+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(l){return i.onMouseUp(l)}),e.Z7z(1,O,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,N,i))),e.R7$(),e.Dyx(i.segments()))},dependencies:[_.MD,R.$,F.a],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 W=d(5745),H=d(63),z=d(9695),Y=d(5448),q=d(2611);const T=o=>({count:o}),J=(o,u)=>t=>t.iri;function K(o,u){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 Q(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-ag-grid",16),e.bIt("selectedRows",function(i){c.eBV(t);const a=e.XpG(4);return c.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 Z(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-flexcontainer",12)(1,"cue-button",13),e.bIt("click",function(){c.eBV(t);const i=e.XpG(3);return c.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,Q,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,T,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,T,t._selectedPaths().length)))}}function ee(o,u){if(1&o&&e.nVh(0,K,3,3,"cue-typography",11)(1,Z,10,14),2&o){const t=e.XpG(2);e.vxM(t._fileLocationsLoading()?0:null!==t._fileLocations()?1:-1)}}function te(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-flexcontainer",9)(1,"cue-input-switch",10),e.bIt("toggleChange",function(i){c.eBV(t);const a=e.XpG();return c.Njj(a.onApplyToAllChange(i))}),e.k0s(),e.j41(2,"cue-typography",11),e.EFF(3),e.nI1(4,"transloco"),e.k0s()(),e.nVh(5,ee,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 ne(o,u){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 ie=(()=>{class o{selection=r.hFB.required();availableEntityCategories=(0,r.hFB)([]);fileLocations=(0,r.hFB)([]);requestFileLocations=(0,r.hFB)(void 0);requestFilePathEntityAdd=(0,r.hFB)(void 0);confirm=(0,r.CGW)();cancel=(0,r.CGW)();_selectedEntityCategory=(0,c.vPA)("");_applyToAllFiles=(0,c.vPA)(!1);_fileLocations=(0,c.vPA)(null);_fileLocationsLoading=(0,c.vPA)(!1);_matchTableExpanded=(0,c.vPA)(!1);_selectedPaths=(0,c.vPA)([]);_saving=(0,c.vPA)(!1);_saveError=(0,c.vPA)(null);_dirPrefix=(0,f.EW)(()=>{const t=this.selection();return t.path.substring(0,t.end)});_matchedLocations=(0,f.EW)(()=>{const t=this._fileLocations();if(!t)return[];const n=this._dirPrefix();return t.filter(i=>i.path.startsWith(n))});_matchCount=(0,f.EW)(()=>this._matchedLocations().length);_matchTableRowData=(0,f.EW)(()=>this._matchedLocations().map(t=>({iri:t.iri,path:t.path,providerId:t.providerId})));_entityCategoryLabelMap=(0,f.EW)(()=>this.availableEntityCategories().reduce((t,n)=>(t[n.iri]=n.label,t),{}));_matchTableRowSelection={mode:"multiRow",selectAll:"filtered"};_filePathLabel=(0,D.Xx)("components.contentBlocks.documentViewer.labelFilePath");_matchTableColDefs=(0,f.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,p.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 l=n._dirPrefix();n._selectedPaths.set(a.filter(s=>s.path.startsWith(l)))}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,p.A)(function*(){const n=t._selectedEntityCategory();if(!n)return;const i=t.selection().path,a=t._fileLocations()?.find(h=>h.path===i)??t.fileLocations().find(h=>h.path===i)??{iri:"",path:i},l=t._applyToAllFiles()&&t._selectedPaths().length>0?t._selectedPaths():[a],s=t.requestFilePathEntityAdd();if(s){t._saving.set(!0),t._saveError.set(null);try{yield s(n,l)}catch(h){return console.error("[EntityMentionModal] Failed to save entity mention:",h),t._saveError.set(h instanceof Error?h.message:String(h)),void t._saving.set(!1)}t._saving.set(!1)}t.confirm.emit({entityCategory:n,paths:l})})()}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(l){return i.onEntityCategoryChange(l)}),e.k0s(),e.nVh(7,te,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,ne,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,J,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.n,E.F,F.a,R.$,Y.L,g.Typography,W.a,H.Select,z.Switch,q.R,D.Kj],styles:[".modal-content[_ngcontent-%COMP%]{width:640px;max-width:calc(100vw - 32px)}"],changeDetection:0})}return o})();const oe=()=>[];function ae(o,u){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 le(o,u){if(1&o&&(e.j41(0,"cue-key-val-list"),e.nVh(1,ae,2,4,"cue-key-val",6),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.vxM(t.subject()?1:-1)}}function se(o,u){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 ce(o,u){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 re(o,u){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 de(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-button",19),e.bIt("click",function(){c.eBV(t);const i=e.XpG(3);return c.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 ue(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-button",19),e.bIt("click",function(){c.eBV(t);const i=e.XpG(3);return c.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,u){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,re,2,2,"span",15),e.k0s()(),e.j41(6,"dd",16),e.nVh(7,de,2,1,"cue-button",17),e.j41(8,"cue-file-path-viewer",18),e.bIt("textSelected",function(i){c.eBV(t);const a=e.XpG(2);return c.Njj(a.onTextSelected(i))}),e.k0s(),e.nVh(9,ue,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,oe))("allowDelete",t.filePathEntitiesEditable())("allowAdd",t.filePathEntitiesEditable()),e.R7$(),e.vxM(t.fileLocations().length>1?9:-1)}}function ge(o,u){if(1&o&&(e.j41(0,"cue-key-val-list"),e.nrm(1,"hr"),e.nVh(2,ce,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,u){if(1&o){const t=e.RV6();e.j41(0,"cue-entity-mention-modal",22),e.bIt("confirm",function(i){c.eBV(t);const a=e.XpG();return c.Njj(a.onEntityMentionConfirm(i))})("cancel",function(){c.eBV(t);const i=e.XpG();return c.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 me=(()=>{class o{subject=r.hFB.required();handlers=r.hFB.required();dataChanged=(0,r.CGW)();filePathEntityAdded=(0,r.CGW)();fileLocations=(0,r.hFB)([]);_fileLocationsProvider=(0,f.EW)(()=>{const t=this.handlers().requestFileLocations;if(t)return t;const n=this.fileLocations();return n.length?()=>Promise.resolve(n):void 0});filePathEntities=(0,r.geq)([]);contentCategories=(0,r.hFB)([]);contentCategoriesEditable=(0,r.hFB)(!1);filePathEntitiesVisible=(0,r.hFB)(!1);filePathEntitiesEditable=(0,r.hFB)(!1);menuItems=(0,r.hFB)([]);availableContentCategories=(0,r.hFB)([]);availableEntityCategories=(0,r.hFB)([]);collapsed=(0,r.hFB)(!1);hasDocInfo=(0,f.EW)(()=>{const t=""!==this.subject(),n=this.fileLocations().length>0;return t||n});currentFilePathIndex=(0,c.vPA)(0);_entityCategoryModalVisible=(0,c.vPA)(!1);_pendingSelection=(0,c.vPA)(null);_requestFilePathEntityAdd=(0,f.EW)(()=>{var t=this;const n=this.handlers().requestFilePathEntityAdd;if(n)return function(){var i=(0,p.A)(function*(a,l){const s=t._pendingSelection();s&&(yield n({paths:l,start:s.start,end:s.end,text:s.text,entityCategory:a,folderPath:s.path.substring(0,s.end)}))});return function(a,l){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,f.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,f.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,f.uu)(()=>this.contentCategories());contentCategoriesString=(0,f.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,D.Xx)("components.documentInfo.infoChangeContentCategory");rdfEditConfig=(0,f.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,p.A)(function*(a){console.log(a);const l={subject:t.subject(),predicate:`${A.E.qcy}contentCategory`,objects:t._contentCategories(),newObjects:a.newValue,type:"contentCategory",comment:a.comment};yield n(l),t._contentCategories.set(a.newValue),t.dataChanged.emit({contentCategories:a.newValue})}),function(l){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,le,2,1,"cue-key-val-list"),e.k0s(),e.nVh(4,se,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.n,b.p,E.F,L.L,S.W,k.T,F.a,R.$,X,g.Typography,ie,D.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 pe{requestRDFChange;requestFileLocations;requestFilePathEntityAdd}var _e=d(2065),ve=d(5187),be=d(7293);const ye=["viewerHost"];function Ce(o,u){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 xe(o,u){1&o&&(e.j41(0,"cue-flexcontainer",5)(1,"cue-typography"),e.EFF(2,"Loading\u2026"),e.k0s()())}function we(o,u){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 Me(o,u){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 Ee(o,u){if(1&o&&(e.j41(0,"div",3),e.nVh(1,Ce,1,3,"cue-document-info",4),e.nVh(2,xe,3,0,"cue-flexcontainer",5)(3,we,3,1,"cue-flexcontainer",5),e.j41(4,"div",6),e.eu8(5,null,1),e.k0s(),e.nVh(7,Me,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 De(o,u){1&o&&e.eu8(0)}function Pe(o,u){if(1&o&&(e.j41(0,"cue-card",2),e.DNE(1,De,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 Fe(o,u){1&o&&e.eu8(0)}function Re(o,u){if(1&o&&e.DNE(0,Fe,1,0,"ng-container",9),2&o){e.XpG();const t=e.sdS(1);e.Y8G("ngTemplateOutlet",t)}}const Ie=[".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 Ve=(()=>{class o{set _viewerHostRef(t){if(this._viewerHost=t,t&&this._lastRenderArgs){const{url:n,suffix:i,page:a,viewerTypeOverride:l}=this._lastRenderArgs;this._renderViewer(n,i,a,l)}}_viewerHost;_lastRenderArgs;currentViewerRef;cue=(0,r.hFB)(void 0);uuid=(0,r.hFB)(void 0);projectId=(0,r.hFB)(void 0);showDocumentInfo=(0,r.hFB)(!0,{transform:r.L39});showLogo=(0,r.hFB)(!1,{transform:r.L39});_uuidOnly=(0,f.EW)(()=>{const t=this.uuid();return t?t.split("?")[0].trim():void 0});extraMenuItems=(0,r.hFB)([]);portalBaseURL=(0,r.hFB)("https://cue.qaecy.com");variant=(0,r.hFB)("none");_cardVariant=(0,f.EW)(()=>this.variant());state=(0,c.vPA)("idle");errorMessage=(0,c.vPA)(null);resolvedUrl=(0,c.vPA)(null);resolvedSuffix=(0,c.vPA)(null);_docSubject=(0,c.vPA)("");_alternatives=(0,c.vPA)([]);_originalUuid=(0,c.vPA)(null);_originalDocSuffix=(0,c.vPA)(null);_cueSnapshot=null;_projectIdSnapshot=null;_inputWarningTimer;_blobUrls=new Set;_docInfoHandlers=new pe;_menuItems=(0,f.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 l=this.resolvedSuffix();t.push({icon:"document",label:"Alternative representation",children:a.map(s=>({label:s.original?`Original (${s.suffix.replace(".","").toUpperCase()})`:s.suffix.replace(".","").toUpperCase(),tooltip:l===s.suffix?"Currently shown":void 0,action:()=>this._switchToAlternative(s)}))})}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,c.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,p.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:l,page:s}=function Te(o){const[u,t]=o.split("?"),n=u.trim();let i=null;if(t){const l=new URLSearchParams(t).get("page");if(null!==l){const s=parseInt(l,10);!isNaN(s)&&s>0&&(i=s)}}return{uuid:n,page:i}}(n),h=t.createProjectDocuments(i),v=(yield h.fetchDocumentData([l]))[l];if(!v)throw new Error(`Document '${l}' not found in project '${i}'.`);a._docSubject.set(v.subject??""),a._originalUuid.set(l),a._originalDocSuffix.set(v.suffix);const w=yield h.fetchAlternativeRepresentations(l);a._alternatives.set([{uuid:l,suffix:v.suffix,original:!0},...w.filter(M=>M.id!==l).map(M=>({uuid:M.id,suffix:M.suffix,original:!1,remoteRelativePath:M.remoteRelativePath}))]);const{uuid:C,suffix:P,remoteRelativePath:j}=function je(o,u){const t=[o,...u];let n,i=1/0;for(const a of t){const l=Ie.indexOf(a.suffix);-1!==l&&l<i&&(i=l,n=a)}return n?{uuid:n.id,suffix:n.suffix,remoteRelativePath:n.remoteRelativePath}:{uuid:o.id,suffix:o.suffix}}(v,w),V=j?yield a._toBlobUrl(t,t.storage.getAltRepDownloadUrl(j),i):yield a._toBlobUrl(t,t.storage.getDownloadUrl(i,C,P),i);a.resolvedUrl.set(V),a.resolvedSuffix.set(P);const Le=[".eml",".msg",".emlx",".mbx"].includes(v.suffix)&&".json"===P?"email":void 0;yield a._renderViewer(V,P,s,Le),a.state.set("ready")}catch(l){const s=l instanceof Error?l.message:String(l);console.error("[CueDocumentViewerWC] Failed to load document:",s),a.errorMessage.set(s),a.state.set("error")}}else a.state.set("idle")})()}_toBlobUrl(t,n,i){var a=this;return(0,p.A)(function*(){const l=yield t.auth.authenticatedFetch(n,{headers:{"cue-project-id":i}});if(!l.ok)throw new Error(`Failed to fetch document: ${l.status} ${l.statusText}`);const s=URL.createObjectURL(yield l.blob());return a._blobUrls.add(s),s})()}_renderViewer(t,n,i,a){var l=this;return(0,p.A)(function*(){try{const{DocumentViewer:s}=yield Promise.all([d.e(3418),d.e(3036)]).then(d.bind(d,3036)),{DocumentViewerSettings:h}=yield d.e(3418).then(d.bind(d,3418));l._viewerHost?.clear(),l.currentViewerRef?.destroy();const y=new h;if(null!==i&&(y.pdf.page=String(i)),!l._viewerHost)throw new Error("viewerHost is not yet available \u2014 view has not been initialized.");l._lastRenderArgs={url:t,suffix:n,page:i,viewerTypeOverride:a},l.currentViewerRef=l._viewerHost.createComponent(s),l.currentViewerRef.setInput("url",t),l.currentViewerRef.setInput("suffix",n),l.currentViewerRef.setInput("settings",y),a&&l.currentViewerRef.setInput("viewerTypeOverride",a)}catch(s){throw new Error(`Failed to load viewer component: ${s instanceof Error?s.message:String(s)}`)}})()}_switchToAlternative(t){var n=this;return(0,p.A)(function*(){const i=n._cueSnapshot,a=n._projectIdSnapshot;if(i&&a)try{const l=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(l),n.resolvedSuffix.set(t.suffix),yield n._renderViewer(l,t.suffix,null)}catch(l){console.error("[CueDocumentViewerWC] Failed to switch to alternative:",l)}})()}_downloadOriginal(){var t=this;return(0,p.A)(function*(){const n=t._cueSnapshot,i=t._projectIdSnapshot,a=t._originalUuid(),l=t._originalDocSuffix();if(n&&i&&a&&l)try{const s=yield n.storage.downloadBlob(i,a,l);(0,_e.KE)(s,`${a}${l}`)}catch(s){console.error("[CueDocumentViewerWC] Failed to download original:",s)}})()}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(ye,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,Ee,8,3,"ng-template",null,0,e.C5r),e.nVh(2,Pe,2,3,"cue-card",2)(3,Re,1,1,"ng-container")),2&n&&(e.R7$(2),e.vxM("none"!==i.variant()?2:3))},dependencies:[_.MD,_.T3,m.n,g.Typography,me,ve.Card,be.x],styles:["[_nghost-%COMP%]{display:contents}"],changeDetection:0})}return o})()},2065(I,x,d){function f(_,m,g="text/plain"){return function p(_,m="data.zip"){const g=document.createElement("a"),b=URL.createObjectURL(_);g.href=b,g.download=m,document.body.appendChild(g),g.click(),document.body.removeChild(g),URL.revokeObjectURL(b)}(new Blob([_],{type:g}),m)}function c(_,m){const g=document.createElement("a");g.style.display="hidden",g.setAttribute("href",window.URL.createObjectURL(_)),g.setAttribute("download",m),document.body.appendChild(g),g.click(),g.remove()}d.d(x,{KE:()=>c,YN:()=>f})},7573(I,x,d){d.d(x,{E:()=>p});const p={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#"}}}]);
|