@qaecy/cue-ui 0.0.49 → 0.0.51

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.
Files changed (106) hide show
  1. package/1138.js +1 -0
  2. package/1153.js +1 -0
  3. package/{247.js → 1247.js} +1 -1
  4. package/1338.js +1 -0
  5. package/1359.js +1 -0
  6. package/1573.js +1 -0
  7. package/1931.js +1 -0
  8. package/1985.js +1 -0
  9. package/2245.js +1 -0
  10. package/2269.js +1 -0
  11. package/2312.js +1 -0
  12. package/2399.js +1 -0
  13. package/2724.js +1 -0
  14. package/2839.js +1 -0
  15. package/29.js +1 -0
  16. package/3036.js +1 -0
  17. package/3039.js +1 -0
  18. package/{418.js → 3418.js} +1 -1
  19. package/3523.js +1 -0
  20. package/3910.js +1 -0
  21. package/4031.js +1 -0
  22. package/4283.js +1 -0
  23. package/4284.js +1 -0
  24. package/4311.js +1 -0
  25. package/4613.js +1 -0
  26. package/4687.js +1 -0
  27. package/4879.js +1 -0
  28. package/503.js +1 -0
  29. package/5041.js +1 -0
  30. package/5137.js +1 -0
  31. package/5187.js +1 -0
  32. package/5559.js +1 -0
  33. package/5740.js +1 -0
  34. package/5872.js +1 -0
  35. package/617.js +1 -0
  36. package/63.js +1 -0
  37. package/6376.js +1 -0
  38. package/6419.js +1 -0
  39. package/6423.js +1 -0
  40. package/6586.js +1 -0
  41. package/6911.js +1 -0
  42. package/7056.js +1 -0
  43. package/7247.js +1 -0
  44. package/7284.js +1 -0
  45. package/7427.js +1 -0
  46. package/7598.js +1 -0
  47. package/7719.js +1 -0
  48. package/8336.js +1 -0
  49. package/836.js +1 -1
  50. package/8560.js +1 -0
  51. package/8791.js +1 -0
  52. package/8855.js +1 -0
  53. package/8957.js +1 -0
  54. package/9004.js +1 -0
  55. package/906.js +1 -0
  56. package/928.js +1 -1
  57. package/9396.js +1 -0
  58. package/9417.js +1 -0
  59. package/9443.js +1 -0
  60. package/9495.js +1 -0
  61. package/9695.js +1 -0
  62. package/9769.js +1 -0
  63. package/README.md +135 -0
  64. package/common.js +1 -1
  65. package/index.js +1 -1
  66. package/main.js +1 -1
  67. package/package.json +1 -1
  68. package/runtime.js +1 -1
  69. package/149.js +0 -1
  70. package/153.js +0 -1
  71. package/245.js +0 -1
  72. package/269.js +0 -1
  73. package/284.js +0 -1
  74. package/311.js +0 -1
  75. package/336.js +0 -1
  76. package/36.js +0 -1
  77. package/376.js +0 -1
  78. package/393.js +0 -1
  79. package/396.js +0 -1
  80. package/399.js +0 -1
  81. package/4.js +0 -1
  82. package/41.js +0 -1
  83. package/419.js +0 -1
  84. package/423.js +0 -1
  85. package/494.js +0 -1
  86. package/523.js +0 -1
  87. package/560.js +0 -1
  88. package/586.js +0 -1
  89. package/598.js +0 -1
  90. package/613.js +0 -1
  91. package/628.js +0 -1
  92. package/7.js +0 -1
  93. package/719.js +0 -1
  94. package/724.js +0 -1
  95. package/740.js +0 -1
  96. package/773.js +0 -1
  97. package/791.js +0 -1
  98. package/799.js +0 -1
  99. package/802.js +0 -1
  100. package/839.js +0 -1
  101. package/855.js +0 -1
  102. package/872.js +0 -1
  103. package/879.js +0 -1
  104. package/903.js +0 -1
  105. package/911.js +0 -1
  106. package/931.js +0 -1
package/719.js DELETED
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[719],{5448(p,g,a){a.d(g,{L:()=>m});var s=a(7705),u=a(2245),c=a(5547);const h=["*"];let m=(()=>{class _{fontSize=(0,s.hFB)("m");italic=(0,s.hFB)(!1);noWrap=(0,s.hFB)(!0);static \u0275fac=function(r){return new(r||_)};static \u0275cmp=c.VBU({type:_,selectors:[["cue-button-label"]],inputs:{fontSize:[1,"fontSize"],italic:[1,"italic"],noWrap:[1,"noWrap"]},ngContentSelectors:h,decls:3,vars:3,consts:[[3,"size","italic","noWrap"]],template:function(r,d){1&r&&(c.NAR(),c.j41(0,"div")(1,"cue-typography",0),c.SdG(2),c.k0s()()),2&r&&(c.R7$(),c.Y8G("size",d.fontSize())("italic",d.italic())("noWrap",d.noWrap()))},dependencies:[u.Typography],styles:["div[_ngcontent-%COMP%]{transform:translateY(.05em)}"]})}return _})()},2014(p,g,a){a.d(g,{z:()=>m});var s=a(7705),u=a(2271),c=a(5547);const h=["*"];let m=(()=>{class _{justify=(0,s.hFB)("start");size=(0,s.hFB)("l");widthStyle=(0,u.EW)(()=>`var(--cue-button-label-padding-${this.size()}-x)`);static \u0275fac=function(r){return new(r||_)};static \u0275cmp=c.VBU({type:_,selectors:[["cue-button-padder"]],inputs:{justify:[1,"justify"],size:[1,"size"]},ngContentSelectors:h,decls:2,vars:4,template:function(r,d){1&r&&(c.NAR(),c.rj2(0,"div"),c.SdG(1),c.eux()),2&r&&c.xc7("justify-content",d.justify())("min-width",d.widthStyle())},styles:["div[_ngcontent-%COMP%]{display:flex;align-items:center;min-height:1px}"]})}return _})()},7719(p,g,a){a.d(g,{CueDocumentCharts:()=>W});var s=a(7705),u=a(5802),c=a(2271),h=a(3615),m=a(7993),_=a(1519),D=a(9811),f=a(5381),r=a(2245),d=a(5971),b=a(9352),v=a(3319),y=a(5448),M=a(2014),E=a(7851),B=a(7293),t=a(5547);const x=i=>({suffix:i}),O=i=>({type:i});function P(i,l){if(1&i&&(t.j41(0,"cue-flexcontainer",1)(1,"cue-typography",3),t.EFF(2),t.k0s()()),2&i){const e=t.XpG();t.R7$(2),t.SpI(" ",e.errorMessage()," ")}}function w(i,l){if(1&i){const e=t.RV6();t.j41(0,"div",7)(1,"cue-block-documents-by-suffix",8),t.bIt("navigated",function(o){u.eBV(e);const C=t.XpG(2);return u.Njj(C.handleNavigated(o,"suffix"))}),t.k0s()()}if(2&i){const e=t.XpG(2);t.xc7("height",e.chartHeight(),"px"),t.R7$(),t.Y8G("data",l)("config",e.blockConfig())}}function L(i,l){if(1&i){const e=t.RV6();t.j41(0,"div",7)(1,"cue-block-documents-by-content-category",8),t.bIt("navigated",function(o){u.eBV(e);const C=t.XpG(2);return u.Njj(C.handleNavigated(o,"content-category"))}),t.k0s()()}if(2&i){const e=t.XpG(2);t.xc7("height",e.chartHeight(),"px"),t.R7$(),t.Y8G("data",l)("config",e.blockConfig())}}function S(i,l){if(1&i&&(t.EFF(0),t.nI1(1,"transloco")),2&i){const e=t.XpG(3);t.SpI(" ",t.i5U(1,1,"components.documentCharts.listDocumentsBySuffix",t.eq3(4,x,e._activeSelection().label))," ")}}function I(i,l){if(1&i&&(t.EFF(0),t.nI1(1,"transloco")),2&i){const e=t.XpG(3);t.SpI(" ",t.i5U(1,1,"components.documentCharts.listDocumentsByType",t.eq3(4,O,e._activeSelection().label))," ")}}function j(i,l){if(1&i){const e=t.RV6();t.j41(0,"cue-flexcontainer",6)(1,"cue-button",9),t.bIt("click",function(){u.eBV(e);const o=t.XpG(2);return u.Njj(o.onShowListButtonClick())}),t.nrm(2,"cue-button-padder")(3,"cue-button-icon",10),t.j41(4,"cue-button-label"),t.nVh(5,S,2,6)(6,I,2,6),t.k0s(),t.nrm(7,"cue-button-padder"),t.k0s()()}if(2&i){const e=t.XpG(2);t.R7$(5),t.vxM("suffix"===e._activeSelection().filterBy&&e._activeSelection().label.startsWith(".")?5:6)}}function R(i,l){if(1&i&&(t.j41(0,"cue-flexcontainer",4),t.nVh(1,w,2,4,"div",5),t.nVh(2,L,2,4,"div",5),t.k0s(),t.nVh(3,j,8,1,"cue-flexcontainer",6)),2&i){let e,n;const o=t.XpG();t.Y8G("direction",o.stackCharts()?"column":"row"),t.R7$(),t.vxM((e="content-category"!==o.mode()&&o.bySuffix())?1:-1,e),t.R7$(),t.vxM((n="suffix"!==o.mode()&&o.byContentCategory())?2:-1,n),t.R7$(),t.vxM(o.showDocumentListButton()&&o._activeSelection()?3:-1)}}function T(i,l){if(1&i&&t.nrm(0,"cue-logo-link",2),2&i){const e=t.XpG();t.Y8G("projectId",e.projectId())}}let W=(()=>{class i{_blockCtx=(0,u.WQX)(D.z);projectId=(0,s.hFB)(void 0);sdkState=(0,s.hFB)(void 0);mode=(0,s.hFB)("both");stackCharts=(0,s.hFB)(!1);chartHeight=(0,s.hFB)(400);selected=(0,s.CGW)();selectionCleared=(0,s.CGW)();showDocumentListButton=(0,s.hFB)(!1,{transform:s.L39});showLogo=(0,s.hFB)(!1,{transform:s.L39});showInDocumentList=(0,s.CGW)();state=(0,u.vPA)("idle");errorMessage=(0,u.vPA)(null);_activeSelection=(0,u.vPA)(null);_rawData=(0,u.vPA)(void 0);bySuffix=(0,c.EW)(()=>{const e=this._rawData();if(e?.documentsBySuffix&&0!==Object.keys(e.documentsBySuffix).length)return{documents:e.documentsBySuffix}});byContentCategory=(0,c.EW)(()=>{const e=this._rawData();if(e?.documentsByContentCategory&&0!==Object.keys(e.documentsByContentCategory).length)return{documents:e.documentsByContentCategory}});blockConfig=(0,c.EW)(()=>({projectId:this.projectId()??"",portalBaseURL:"",resourceBaseURL:"",graphIsSaturated:!1,privileges:new _.c,handlers:new _.$}));_ownedView;_unsubscribeCategories;_unsubscribeDocumentsData;_lastSetupSignature;constructor(){(0,u.QZP)(()=>{const e=this.projectId(),n=this.sdkState();if(!n)return this._clearRuntimeState(),void this.state.set("idle");const o={projectId:e,cue:n.cue,view:n.view,documents:n.documents,language:n.language,mode:this.mode()};this._isSameSetupSignature(o)||(this._setupFromSdkState(e,n),this._lastSetupSignature=o)})}ngOnDestroy(){this._cleanupSubscriptions(),this._cleanupOwnedView()}handleNavigated(e,n){if(!e)return this._activeSelection.set(null),void this.selectionCleared.emit({chart:n});const o={filterBy:"suffix"===e.filterBy?"suffix":"content-category",values:e.values.filter(C=>"__grouped_small__"!==C),label:e.label};this._activeSelection.set(o),this.selected.emit(o)}onShowListButtonClick(){const e=this._activeSelection();e&&this.showInDocumentList.emit(e)}_setupFromSdkState(e,n){if(this._cleanupSubscriptions(),this._cleanupOwnedView(),this._rawData.set(void 0),n.availableContentCategories&&this._blockCtx.availableContentCategories.set(n.availableContentCategories),n.documents)return n.documents.setLanguage(n.language??"en"),void this._bindDocumentsData(n.documents);if(n.view)return n.view.setLanguage(n.language??"en"),this._bindDocumentsData(n.view.documents),void(n.availableContentCategories||this._bindCategoriesFromView(n.view));if(n.cue&&e){const o=n.cue.createProjectView(e,{language:n.language??"en"});return this._ownedView=o,this._bindDocumentsData(o.documents),void("suffix"!==this.mode()&&!n.availableContentCategories&&this._bindCategoriesFromView(o))}this.errorMessage.set("sdkState must include cue, view, or documents to load data."),this.state.set("error")}_bindDocumentsData(e){this.state.set("loading");const n=()=>{const o=e.projectDocumentsData.get();o&&Object.keys(o.documentsBySuffix).length>0&&(0,c.O8)(()=>{this._rawData.set(o),this.state.set("ready")})};n(),this._unsubscribeDocumentsData=e.projectDocumentsData.subscribe(()=>n())}_bindCategoriesFromView(e){const n=()=>{this._blockCtx.availableContentCategories.set(e.availableContentCategories.get())};n(),this._unsubscribeCategories=e.availableContentCategories.subscribe(n)}_clearRuntimeState(){this._cleanupSubscriptions(),this._cleanupOwnedView(),this._rawData.set(void 0),this._blockCtx.availableContentCategories.set(void 0),this.errorMessage.set(null),this._lastSetupSignature=void 0}_cleanupSubscriptions(){this._unsubscribeCategories?.(),this._unsubscribeCategories=void 0,this._unsubscribeDocumentsData?.(),this._unsubscribeDocumentsData=void 0}_cleanupOwnedView(){this._ownedView&&(this._ownedView.destroy(),this._ownedView=void 0)}_isSameSetupSignature(e){const n=this._lastSetupSignature;return!!n&&n.projectId===e.projectId&&n.cue===e.cue&&n.view===e.view&&n.documents===e.documents&&n.language===e.language&&n.mode===e.mode}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=t.VBU({type:i,selectors:[["cue-document-charts"]],inputs:{projectId:[1,"projectId"],sdkState:[1,"sdkState"],mode:[1,"mode"],stackCharts:[1,"stackCharts"],chartHeight:[1,"chartHeight"],showDocumentListButton:[1,"showDocumentListButton"],showLogo:[1,"showLogo"]},outputs:{selected:"selected",selectionCleared:"selectionCleared",showInDocumentList:"showInDocumentList"},features:[t.Jv_([D.z])],decls:4,vars:5,consts:[[3,"cueLogoLoader"],["direction","column","align","center","justify","center",2,"height","100%","width","100%","padding","8px"],[2,"position","absolute","bottom","8px","right","8px","z-index","5",3,"projectId"],[2,"color","#c44","font-size","13px"],["align","stretch",2,"width","100%",3,"direction"],[1,"chart-wrapper",3,"height"],["justify","center"],[1,"chart-wrapper"],[3,"navigated","data","config"],["size","s","variant","secondary",3,"click"],["icon","filter"]],template:function(n,o){1&n&&(t.j41(0,"div",0),t.nVh(1,P,3,1,"cue-flexcontainer",1)(2,R,4,4),t.nVh(3,T,1,1,"cue-logo-link",2),t.k0s()),2&n&&(t.xc7("min-height",o.chartHeight(),"px"),t.Y8G("cueLogoLoader","loading"===o.state()),t.R7$(),t.vxM("error"===o.state()?1:"ready"===o.state()?2:-1),t.R7$(2),t.vxM(o.showLogo()?3:-1))},dependencies:[h.Y,m.o,f.n,r.Typography,d.$,y.L,M.z,v.a,E.k,B.x,b.Kj],styles:["[_nghost-%COMP%]{display:block;width:100%}.chart-wrapper[_ngcontent-%COMP%]{flex:1;min-width:0;position:relative}cue-block-documents-by-suffix[_ngcontent-%COMP%], cue-block-documents-by-content-category[_ngcontent-%COMP%]{display:block;width:100%;height:100%}"],changeDetection:0})}return i})()}}]);
package/724.js DELETED
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[724],{2014(ae,N,g){g.d(N,{z:()=>C});var m=g(7705),s=g(2271),_=g(5547);const L=["*"];let C=(()=>{class j{justify=(0,m.hFB)("start");size=(0,m.hFB)("l");widthStyle=(0,s.EW)(()=>`var(--cue-button-label-padding-${this.size()}-x)`);static \u0275fac=function(E){return new(E||j)};static \u0275cmp=_.VBU({type:j,selectors:[["cue-button-padder"]],inputs:{justify:[1,"justify"],size:[1,"size"]},ngContentSelectors:L,decls:2,vars:4,template:function(E,B){1&E&&(_.NAR(),_.rj2(0,"div"),_.SdG(1),_.eux()),2&E&&_.xc7("justify-content",B.justify())("min-width",B.widthStyle())},styles:["div[_ngcontent-%COMP%]{display:flex;align-items:center;min-height:1px}"]})}return j})()},2724(ae,N,g){g.d(N,{CueSparqlTable:()=>en});var m=g(7705),s=g(5802),_=g(2271),L=g(494),C=g(467),j=g(7374),G=g.n(j),x=g(7400);function E(i,u,t=""){const a=u.valueKey??"val",n=u.priorityKey,o=u.fallback??t,l=u.preProcess?i.map(p=>{const c=p[a];return null==c?p:{...p,[a]:(0,x.w9)(u.preProcess,c)}}):i,r=(n?[...l].sort((p,c)=>{const f=p[n],h=c[n],y=Number(f),T=Number(h);return isNaN(y)||isNaN(T)?(h??"").localeCompare(f??""):T-y}):l).map(p=>p[a]).filter(p=>null!=p);if(0===r.length)return o;switch(u.type){case"first":default:return r[0];case"last":return r[r.length-1];case"random":return r[Math.floor(Math.random()*r.length)];case"count":return String(r.length);case"join":return r.join(u.separator??", ");case"longest":return r.reduce((p,c)=>c.length>p.length?c:p);case"shortest":return r.reduce((p,c)=>c.length<p.length?c:p);case"sum":{const p=r.map(Number).filter(c=>!isNaN(c));return p.length?String(p.reduce((c,f)=>c+f,0)):t}case"avg":{const p=r.map(Number).filter(c=>!isNaN(c));return p.length?String(p.reduce((c,f)=>c+f,0)/p.length):t}case"min":{const p=r.map(Number).filter(c=>!isNaN(c));return p.length?String(Math.min(...p)):t}case"max":{const p=r.map(Number).filter(c=>!isNaN(c));return p.length?String(Math.max(...p)):t}case"mostRecent":return[...r].sort((c,f)=>G()(f).valueOf()-G()(c).valueOf())[0];case"oldest":return[...r].sort((c,f)=>G()(c).valueOf()-G()(f).valueOf())[0];case"map":{const{map:p}=u;return p[r[0]]??o}}}const oe=Object.keys({first:"First",last:"Last",random:"Random",join:"Concatenate",count:"Count",longest:"Longest text",shortest:"Shortest text",map:"Map lookup",sum:"Sum",avg:"Average",min:"Minimum",max:"Maximum",mostRecent:"Most recent date",oldest:"Oldest date"}),X=["first","last","random","join","count"],ie={text:[...X,"longest","shortest","map"],number:[...X,"sum","avg","min","max"],date:[...X,"mostRecent","oldest"]},ve={first:"components.sparqlTable.strategyFirst",last:"components.sparqlTable.strategyLast",random:"components.sparqlTable.strategyRandom",join:"components.sparqlTable.strategyJoin",count:"components.sparqlTable.strategyCount",longest:"components.sparqlTable.strategyLongest",shortest:"components.sparqlTable.strategyShortest",map:"components.sparqlTable.strategyMap",sum:"components.sparqlTable.strategySum",avg:"components.sparqlTable.strategyAvg",min:"components.sparqlTable.strategyMin",max:"components.sparqlTable.strategyMax",mostRecent:"components.sparqlTable.strategyMostRecent",oldest:"components.sparqlTable.strategyOldest"},De={first:"components.sparqlTable.strategyFirstDesc",last:"components.sparqlTable.strategyLastDesc",random:"components.sparqlTable.strategyRandomDesc",join:"components.sparqlTable.strategyJoinDesc",count:"components.sparqlTable.strategyCountDesc",longest:"components.sparqlTable.strategyLongestDesc",shortest:"components.sparqlTable.strategyShortestDesc",map:"components.sparqlTable.strategyMapDesc",sum:"components.sparqlTable.strategySumDesc",avg:"components.sparqlTable.strategyAvgDesc",min:"components.sparqlTable.strategyMinDesc",max:"components.sparqlTable.strategyMaxDesc",mostRecent:"components.sparqlTable.strategyMostRecentDesc",oldest:"components.sparqlTable.strategyOldestDesc"};var z=g(7573);const K=`PREFIX qcy: <${z.E.qcy}>\nPREFIX qcy-e: <${z.E["qcy-e"]}>\n\nSELECT ?subject\nWHERE {\n ?subject a qcy:CanonicalEntity ;\n qcy:hasEntityCategory qcy-e:Person .\n}`;class le{field;headerName;sortable;filter;editable;hide;minWidth;cellStyle;headerClass;query="";defType="data";calculatedFrom;evaluation;datatype;postProcess;strategy;valueKey;labelKey;formatter=void 0;constructor(u="",t=""){this.field=u,this.headerName=t}getFormatter=()=>{if(this.formatter)return this.formatter;if(this.strategy){const u=this.strategy;return t=>E(t,u,"")}return u=>Array.isArray(u)?u.map(t=>t?.val??"").filter(Boolean).join(", "):String(u??"")}}var Ce=g(4284);class Se{menuDisplaySettings=new Me;columnSelectSettings=new Re}class Me{hide=!0;buttonVariant="tertiary";buttonSize="s";showColumnSelect=!0;showDownload=!0}class Re{allowEditing=!0;allowToggleEditable=!0;allowToggleHideOnHover=!0;allowSettingTextAlign=!0;allowSettingLabel=!0}var Pe=g(222),A=g(6593);function w(i){const u=new A.Parser({sparqlStar:!0});try{return u.parse(i)}catch(t){if(-1!=t.toString().indexOf("SPARQL*"))return{type:"query",queryType:"CONSTRUCT",sparqlStar:!0};throw"Couldn't get query details: "+t.toString()}}class Ee{queryHandler=(0,C.A)(function*(){throw new Error("No query handler defined")})}var re=g(7089),e=g(5547);function Fe(i,u){if(1&i&&(e.j41(0,"span",1),e.EFF(1),e.k0s()),2&i){const t=e.XpG();e.Y8G("cueTooltip",t._tooltip()),e.R7$(),e.SpI("\xd7",t._allValues().length)}}let je=(()=>{class i{_displayValue=(0,s.vPA)("");_allValues=(0,s.vPA)([]);_tooltip=(0,s.vPA)("");agInit(t){this._apply(t)}refresh(t){return this._apply(t),!0}_apply(t){const a=t.value,n=Array.isArray(a)?a:null!=a?[a]:[],o=t.colDef?.cellRendererParams?.strategy,l=t.colDef?.cellRendererParams?.valueKey??"val",r=t.colDef?.cellRendererParams?.labelKey??l,p=n.map(f=>f[r]).filter(Boolean);this._allValues.set(p);const c=t.colDef?.cellRendererParams?.postProcess;this._displayValue.set((0,x.g4)(o?E(n,o):p[0]??"",c)),this._tooltip.set(p.map(f=>(0,x.g4)(f,c)).join("\n"))}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=e.VBU({type:i,selectors:[["cue-multi-binding-cell-renderer"]],decls:3,vars:2,consts:[[1,"cell-value"],["cueTooltipPosition","bottomleft",1,"badge",3,"cueTooltip"]],template:function(a,n){1&a&&(e.j41(0,"span",0),e.EFF(1),e.k0s(),e.nVh(2,Fe,2,2,"span",1)),2&a&&(e.R7$(),e.JRh(n._displayValue()),e.R7$(),e.vxM(n._allValues().length>1?2:-1))},dependencies:[re.d],styles:["[_nghost-%COMP%]{display:flex;align-items:center;gap:4px;overflow:hidden;width:100%}.cell-value[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.badge[_ngcontent-%COMP%]{flex-shrink:0;font-size:10px;font-weight:600;background:var(--cue-color-blue, #2563eb);color:#fff;border-radius:8px;padding:0 5px;line-height:16px;cursor:default}"],changeDetection:0})}return i})();const ce=["template","formula","pipeline"],ue=["add","subtract","multiply","divide"],Ne={template:"components.sparqlTable.evalTypeTemplate",formula:"components.sparqlTable.evalTypeFormula",pipeline:"components.sparqlTable.evalTypePipeline"},ke={template:"components.sparqlTable.evalTypeTemplateDesc",formula:"components.sparqlTable.evalTypeFormulaDesc",pipeline:"components.sparqlTable.evalTypePipelineDesc"},qe={add:"components.sparqlTable.formulaOpAdd",subtract:"components.sparqlTable.formulaOpSubtract",multiply:"components.sparqlTable.formulaOpMultiply",divide:"components.sparqlTable.formulaOpDivide"};let V=(()=>{class i{_requestedColumns=[];_columnQueries={};emptyTableText=(0,s.vPA)("Building table");_columns=(0,s.vPA)([]);_columnsGross=(0,s.vPA)(void 0);_dataColumns=(0,s.vPA)(void 0);columnDefsGross=(0,_.EW)(()=>void 0===this._columnsGross()?this._columns():this._columnsGross());keyVals={};_handlers=(0,s.vPA)(new Ee);destroy(){this.keyVals={},this._requestedColumns=[],this._columnQueries={},this.fetchedColumns.update(()=>[])}resetData(){this.keyVals={},this._requestedColumns=[],this._columnQueries={},this.fetchedColumns.update(()=>[])}mergeColumnData(t,a,n){Object.entries(a).forEach(([o,l])=>{this.keyVals[o]||(this.keyVals[o]={}),void 0===this.keyVals[o][t]&&(this.keyVals[o][t]=l)}),this._requestedColumns.includes(t)||this._requestedColumns.push(t),this._columnQueries[t]=n,this.fetchedColumns.update(o=>[...o,t])}injectPreloadedData(t,a,n){this.keyVals=t,this._requestedColumns=[...a],this._columnQueries={...n},this.fetchedColumns.update(()=>[...a])}fetchedColumns=(0,s.vPA)([],{equal:(t,a)=>t.length===a.length});isLoading=(0,_.EW)(()=>this._columns().length>0&&this.fetchedColumns().length<this.totalQueryCount());totalQueryCount=(0,_.EW)(()=>{const t=new Set;for(const a of this._columns())"data"===a.defType&&!a.hide&&a.query&&t.add(a.field);return t.size});columnDefsAG=(0,_.EW)(()=>{const t=[];return this._columns().forEach(a=>{const n=a.getFormatter();if("calculated"===a.defType){const o=this._columns().filter(r=>"data"===r.defType).map(r=>r.field);if(Array.from(new Set(o)).every(r=>this.fetchedColumns().includes(r))){const r=a.formatter??n;t.push({colId:a.field,headerName:a.headerName,sortable:!0,filter:!0,...a.minWidth?{minWidth:a.minWidth}:{},valueGetter:p=>r(null,p.data)})}}else if("evaluation"===a.defType){const o=this._columns().filter(r=>"data"===r.defType).map(r=>r.field);if(Array.from(new Set(o)).every(r=>this.fetchedColumns().includes(r))&&a.evaluation){const r=a.evaluation,p=this._columns();t.push({colId:a.field,headerName:a.headerName,hide:a.hide,flex:1,sortable:!0,filter:!0,valueGetter:c=>{const f=c.data??{},h={};for(const y of p)if("data"===y.defType){const T=y.getFormatter();h[y.field]=(0,x.g4)(T(f[y.field]??[]),y.postProcess)}return function Ae(i,u,t="",a){switch(i.type){case"template":return i.template.replace(/\$\{([\w.-]+)\}/g,(n,o)=>u[o]??"").trim();case"formula":{const n=i.fields.map(o=>parseFloat(u[o])).filter(o=>!isNaN(o));if(0===n.length)return t;switch(i.op){case"add":return String(n.reduce((o,l)=>o+l,0));case"subtract":return String(n.reduce((o,l)=>o-l));case"multiply":return String(n.reduce((o,l)=>o*l,1));case"divide":return n.length<2||0===n[1]?t:String(n[0]/n[1])}return t}case"pipeline":{const{sources:n,transform:o,exclude:l,deduplicate:d,sort:r,limit:p,valueKey:c="val"}=i,f=i.separator??", ",h=i.fallback??t,y=new Set,T=[];for(const M of n){let D=(a?.[M]??[]).map(v=>v[c]??"").filter(v=>""!==v);o&&(D=D.map(v=>(0,x.w9)(o,v))),l?.length&&(D=D.filter(v=>!l.includes(v)));for(const v of D)d&&y.has(v)||(y.add(v),T.push(v))}r&&T.sort();const b=void 0!==p?T.slice(0,p):T;return 0===b.length?h:b.join(f)}}}(r,h,"",f)}})}}else{const o=!!a.strategy;t.push({field:a.field,headerName:a.headerName,hide:a.hide,flex:1,sortable:!0,filter:!0,...a.minWidth?{minWidth:a.minWidth}:{},...a.cellStyle?{cellStyle:a.cellStyle}:{},...a.headerClass?{headerClass:a.headerClass}:{},valueGetter:o?l=>l.data?.[a.field]??[]:l=>(0,x.g4)(n(l.data?.[a.field]??[]),a.postProcess),...o?{comparator:(l,d)=>{const r=Array.isArray(l)?l:[],p=Array.isArray(d)?d:[],c=(0,x.g4)(E(r,a.strategy,""),a.postProcess),f=(0,x.g4)(E(p,a.strategy,""),a.postProcess);return c.localeCompare(f)},cellRenderer:je,cellRendererParams:{strategy:a.strategy,valueKey:a.valueKey??"val",labelKey:a.labelKey,postProcess:a.postProcess}}:{}})}}),t});set columns(t){t.forEach(a=>{a.field&&void 0!==this._columnQueries[a.field]&&this._columnQueries[a.field]!==a.query&&(this._requestedColumns=this._requestedColumns.filter(n=>n!==a.field),Object.values(this.keyVals).forEach(n=>delete n[a.field]),this.fetchedColumns.update(n=>n.filter(o=>o!==a.field))),this._columnQueries[a.field]=a.query}),this._columns.set(t),this.buildTable()}set columnsGross(t){this._columnsGross.set(t)}set dataColumns(t){this._dataColumns.set(t)}set handlers(t){this._handlers.set(t)}get visibleColumns(){return this._columns}buildTable(){var t=this;return(0,C.A)(function*(){const a=t._columns(),n=t._dataColumns(),o=a.filter(r=>"data"===r.defType&&!r.hide),l=n?.filter(r=>"data"===r.defType&&!r.hide);if(!o.length&&!l?.length)return void((a.length>0||(n?.length??0)>0)&&t.emptyTableText.set("No data columns defined"));t.emptyTableText.set("Building table...");const d=[];o.forEach(r=>{d.push(t.fetchColumnData(r))}),l?.forEach(r=>{d.push(t.fetchColumnData(r))}),yield Promise.all(d),t.emptyTableText.set("Table data downloaded")})()}fetchColumnData(t){var a=this;return(0,C.A)(function*(){if(a._requestedColumns.includes(t.field))return;a._requestedColumns.push(t.field);const n=w(t.query),o=yield a._handlers().queryHandler(t.query,n),l=new Set;o.results.bindings.forEach(d=>{const r=d.subject?.value,p=Object.keys(d).filter(f=>"subject"!==f),c={};p.forEach(f=>{const h=d[f]?.value;Object.keys(a.keyVals).includes(r)||(a.keyVals[r]={}),void 0===a.keyVals[r][t.field]&&(a.keyVals[r][t.field]=[]),c[f]=h}),a.keyVals[r][t.field].push(c),l.add(r)}),a.fetchedColumns.update(d=>[...d,t.field])})()}static \u0275fac=function(a){return new(a||i)};static \u0275prov=s.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),W=(()=>{class i{_isUpdating=!1;_pendingUpdate=!1;_dataFetchService=(0,s.WQX)(V);tableData=(0,s.vPA)([]);destroy(){this.tableData.update(()=>[])}onProcessedColumn=(0,s.QZP)((()=>{var t=this;return(0,C.A)(function*(){t._dataFetchService.fetchedColumns(),yield t._debouncedUpdateTableData()})})());_debouncedUpdateTableData(){var t=this;return(0,C.A)(function*(){t._isUpdating?t._pendingUpdate=!0:(t._isUpdating=!0,yield t._updateTableData(),t._isUpdating=!1,t._pendingUpdate&&(t._pendingUpdate=!1,yield t._debouncedUpdateTableData()))})()}_updateTableData(){var t=this;return(0,C.A)(function*(){return new Promise(a=>{const n={},o=Object.keys(t._dataFetchService.keyVals),l=[],d=t._dataFetchService.visibleColumns().map(p=>p.field);let r=!1;for(let p=0;p<o.length;p++){const c=o[p],f={};if(f.id=c,Object.keys(t._dataFetchService.keyVals[c]).forEach(h=>{Object.keys(n).includes(h)||(n[h]=0),f[h]=t._dataFetchService.keyVals[c][h]??[],""!==f[h]&&n[h]++}),l.push(f),!r&&9===p){let h=!0;for(const y of d)if(typeof f[y]>"u"){h=!1;break}h&&(t.tableData.update(()=>[...l]),r=!0)}}t.tableData.update(()=>l),a()})})()}static \u0275fac=function(a){return new(a||i)};static \u0275prov=s.jDH({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var k=g(2245),q=g(5381),Ie=g(2611);function Le(i,u){if(1&i&&e.nrm(0,"cue-typography",1),2&i){const t=e.XpG();e.Y8G("innerHTML",t.instructions(),e.npT)}}let Ge=(()=>{class i{tableService=(0,s.WQX)(W);dataFetchService=(0,s.WQX)(V);handlers=m.hFB.required();columns=(0,m.geq)([]);columnsGross=(0,m.hFB)();dataColumns=(0,m.hFB)();showInstructions=(0,m.hFB)(!1);showPaginator=(0,m.hFB)(!0);paginationPageSize=(0,m.hFB)(10);settings=(0,m.hFB)(new Se);emptyTableText=(0,m.geq)("Building table");loading=(0,m.hFB)(!1);clickableRows=(0,m.hFB)(!1);useAGGrid=(0,m.hFB)(!1);size=(0,m.hFB)("m");clickedRow=(0,m.CGW)();hoveredRow=(0,m.CGW)();tableDataUpdated=(0,m.CGW)();gridApi=(0,m.CGW)();visibleRows=(0,m.CGW)();columnDefsAG=(0,m.CGW)();onAGColumnDefs=(0,s.QZP)(()=>{const t=this.dataFetchService.columnDefsAG();this.columnDefsAG.emit(t)});onTableDataChange=(0,s.QZP)(()=>{this.tableDataUpdated.emit(this.tableService.tableData())});onHandlersChange=(0,s.QZP)(()=>{this.dataFetchService.handlers=this.handlers()});onColumnsChange=(0,s.QZP)(()=>{this.dataFetchService.columns=this.columns()});onColumnsGrossChange=(0,s.QZP)(()=>{this.dataFetchService.columnsGross=this.columnsGross()});onDataColumnsChange=(0,s.QZP)(()=>{this.dataFetchService.dataColumns=this.dataColumns()});onEmptyTableTextChange=(0,s.QZP)(()=>{this.emptyTableText.set(this.emptyTableText())});_onGridApiReady(t){this.gridApi.emit(t),t.addEventListener("columnVisible",a=>{a.visible&&(a.columns??(a.column?[a.column]:[])).forEach(o=>{const l=o.getColId(),d=this.columns().find(r=>r.field===l);d&&this.dataFetchService.fetchColumnData(d)})})}instructions=(0,s.vPA)("");buildInstructions=(0,s.QZP)((()=>{var t=this;return(0,C.A)(function*(){if(t.showInstructions()){const a=yield(0,Pe.xI)('The component takes an array of SPARQL table columns. It is an extension of the regular table that adds a query to the column definition and restricts the formatter to always start with an array of values that should be converted to a string value (per default by comma joining).\n\nThere are some requirements for the SPARQL query:\n\n- Must be a SELECT query \n- Must use variable `?subject` to bind to the row identifier\n- No grouping needed since the component automatically groups by key and returns the remaining bindings as an array\n\nExample query:\n\n```sparql\nSELECT ?subject ?val \nWHERE { \n ?subject qcy:entityCategory qcy-e:Space ;\n qcy:hasProperty [\n qcy:label "LongName" ;\n qcy:value ?val\n ]\n}\n```\n\nThis query will outputs for the formatter in the following form (in this case with two bindings to the key/val):\n\n```json\n[{"val": "Room 101"}, {"val": "Room 01"}]\n```\n\nThese can then be used in a simple formatter that simply returns the first value or a - in case there are no bindings:\n\n```typescript\n(row) => row[0]?.val ?? \'-\'\n```\n\nLet\'s imagine that we instead had a query that would return bindings on the variables *?val* and *?score* and return bindings like this:\n\n```json\n[{"val": "Room 101", "score": "1"}, {"val": "Room 01", "score": "0.9"}]\n```\n\nA formatter could then take the highest score value:\n\n```typescript\n(row) => {\n const maxScore = 0;\n let val = "";\n row.forEach(r => {\n if(parseFloat(r.score) > maxScore) {\n maxScore = parseFloat(r.score);\n val = r.val;\n }\n });\n return val;\n}\n```\n\nThe formatter can also be more advanced and for example first format the values as dates using a library like DayJS before taking the most recent.\n');t.instructions.set(a)}})})());ngOnDestroy(){this.tableService.destroy(),this.dataFetchService.destroy()}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=e.VBU({type:i,selectors:[["cue-sparql-table-inner"]],inputs:{handlers:[1,"handlers"],columns:[1,"columns"],columnsGross:[1,"columnsGross"],dataColumns:[1,"dataColumns"],showInstructions:[1,"showInstructions"],showPaginator:[1,"showPaginator"],paginationPageSize:[1,"paginationPageSize"],settings:[1,"settings"],emptyTableText:[1,"emptyTableText"],loading:[1,"loading"],clickableRows:[1,"clickableRows"],useAGGrid:[1,"useAGGrid"],size:[1,"size"]},outputs:{columns:"columnsChange",emptyTableText:"emptyTableTextChange",clickedRow:"clickedRow",hoveredRow:"hoveredRow",tableDataUpdated:"tableDataUpdated",gridApi:"gridApi",visibleRows:"visibleRows",columnDefsAG:"columnDefsAG"},decls:3,vars:8,consts:[["direction","column","gap","xl"],[3,"innerHTML"],[3,"gridApiReady","visibleRows","size","rowData","columnDefs","showPaginator","paginationPageSize","noRowsText","loading"]],template:function(a,n){1&a&&(e.j41(0,"cue-flexcontainer",0),e.nVh(1,Le,1,1,"cue-typography",1),e.j41(2,"cue-ag-grid",2),e.bIt("gridApiReady",function(l){return n._onGridApiReady(l)})("visibleRows",function(l){return n.visibleRows.emit(l)}),e.k0s()()),2&a&&(e.R7$(),e.vxM(n.showInstructions()?1:-1),e.R7$(),e.Y8G("size",n.size())("rowData",n.tableService.tableData())("columnDefs",n.dataFetchService.columnDefsAG())("showPaginator",n.showPaginator())("paginationPageSize",n.paginationPageSize())("noRowsText",n.dataFetchService.emptyTableText())("loading",n.loading()||n.dataFetchService.isLoading()))},dependencies:[k.Typography,q.n,Ie.R],encapsulation:2,changeDetection:0})}return i})();var Ve=g(9079),Q=g(9352),de=g(2444),pe=g(8957),Y=g(5971),_e=g(3319),fe=g(836),U=g(1096),me=g(5448),Qe=g(2014);const H=(i,u)=>u.field;function $e(i,u){if(1&i&&(e.j41(0,"cue-typography",6),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.SpI(" ",t._queryError()," ")}}function Be(i,u){if(1&i){const t=e.RV6();e.j41(0,"cue-button",17),e.bIt("click",function(){s.eBV(t);const n=e.XpG(2);return s.Njj(n.discardQuery())}),e.nrm(1,"cue-button-padder"),e.j41(2,"cue-button-label"),e.EFF(3),e.nI1(4,"transloco"),e.k0s(),e.nrm(5,"cue-button-padder"),e.k0s()}2&i&&(e.R7$(3),e.JRh(e.bMT(4,1,"components.sparqlTable.labelDiscard")))}function Xe(i,u){1&i&&(e.j41(0,"cue-typography",11),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&i&&(e.R7$(),e.SpI(" ",e.bMT(2,1,"components.sparqlTable.labelQueryPending")," "))}function ze(i,u){if(1&i&&(e.j41(0,"cue-typography",6),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.SpI(" ",t._testError()," ")}}function Ke(i,u){if(1&i&&(e.j41(0,"cue-typography",19),e.EFF(1),e.k0s()),2&i){const t=u.$implicit;e.R7$(),e.JRh(t)}}function We(i,u){if(1&i&&(e.j41(0,"cue-typography",18),e.EFF(1),e.nI1(2,"transloco"),e.k0s(),e.Z7z(3,Ke,2,1,"cue-typography",19,e.Vm6)),2&i){const t=e.XpG(2);e.R7$(),e.JRh(e.bMT(2,1,"components.sparqlTable.labelTestResults")),e.R7$(2),e.Dyx(t._testRows())}}function Ye(i,u){if(1&i){const t=e.RV6();e.j41(0,"cue-input",20),e.nI1(1,"transloco"),e.bIt("valueChange",function(n){s.eBV(t);const o=e.XpG(2);return s.Njj(o._strategySeparator.set(n))}),e.k0s()}if(2&i){const t=e.XpG(2);e.Y8G("label",e.bMT(1,2,"components.sparqlTable.labelSeparator"))("value",t._strategySeparator())}}function Ue(i,u){if(1&i){const t=e.RV6();e.j41(0,"cue-input",20),e.nI1(1,"transloco"),e.bIt("valueChange",function(n){s.eBV(t);const o=e.XpG(2);return s.Njj(o._strategyValueKey.set(n))}),e.k0s()}if(2&i){const t=e.XpG(2);e.Y8G("label",e.bMT(1,2,"components.sparqlTable.labelValueKey"))("value",t._strategyValueKey())}}function He(i,u){if(1&i){const t=e.RV6();e.j41(0,"cue-input",16),e.nI1(1,"transloco"),e.nI1(2,"transloco"),e.bIt("valueChange",function(n){s.eBV(t);const o=e.XpG(2);return o._strategyPriorityKey.set(n),s.Njj(o._applyStrategyChange())}),e.k0s()}if(2&i){const t=e.XpG(2);e.Y8G("label",e.bMT(1,3,"components.sparqlTable.labelPriorityKey"))("info",e.bMT(2,5,"components.sparqlTable.tooltipPriorityKey"))("value",t._strategyPriorityKey())}}function Je(i,u){if(1&i&&(e.j41(0,"cue-typography",6),e.EFF(1),e.k0s()),2&i){const t=e.XpG(3);e.R7$(),e.SpI(" ",t._strategyMapError()," ")}}function Ze(i,u){if(1&i){const t=e.RV6();e.j41(0,"cue-typography",3),e.nI1(1,"transloco"),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.j41(4,"div",21)(5,"cue-code-editor",22),e.bIt("contentChanged",function(n){s.eBV(t);const o=e.XpG(2);return s.Njj(o._onMapJsonChanged(n))}),e.k0s()(),e.nVh(6,Je,2,1,"cue-typography",6)}if(2&i){const t=e.XpG(2);e.Y8G("info",e.bMT(1,4,"components.sparqlTable.tooltipMapJson")),e.R7$(2),e.SpI(" ",e.bMT(3,6,"components.sparqlTable.labelMapJson")," "),e.R7$(3),e.Y8G("content",t._strategyMapJson()),e.R7$(),e.vxM(t._strategyMapError()?6:-1)}}function et(i,u){if(1&i&&(e.j41(0,"cue-typography",6),e.EFF(1),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.SpI(" ",t._strategyPreProcessError()," ")}}function tt(i,u){if(1&i){const t=e.RV6();e.j41(0,"cue-typography",3),e.nI1(1,"transloco"),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.j41(4,"div",4)(5,"cue-code-editor",5),e.bIt("contentChanged",function(n){s.eBV(t);const o=e.XpG();return s.Njj(o.onQueryChanged(n))}),e.k0s()(),e.nVh(6,$e,2,1,"cue-typography",6),e.j41(7,"cue-flexcontainer",7),e.nVh(8,Be,6,3,"cue-button",8),e.j41(9,"cue-button",9),e.bIt("click",function(){s.eBV(t);const n=e.XpG();return s.Njj(n.testQuery())}),e.nrm(10,"cue-button-padder")(11,"cue-button-icon",10),e.j41(12,"cue-button-label"),e.EFF(13),e.nI1(14,"transloco"),e.k0s(),e.nrm(15,"cue-button-padder"),e.k0s()(),e.nVh(16,Xe,3,3,"cue-typography",11),e.nVh(17,ze,2,1,"cue-typography",6),e.nVh(18,We,5,3),e.j41(19,"cue-select",2),e.nI1(20,"transloco"),e.bIt("valueChange",function(n){s.eBV(t);const o=e.XpG();return s.Njj(o.setDatatype(n))}),e.k0s(),e.j41(21,"cue-select",12),e.nI1(22,"transloco"),e.nI1(23,"transloco"),e.bIt("valueChange",function(n){s.eBV(t);const o=e.XpG();return s.Njj(o.setStrategyType(n))}),e.k0s(),e.j41(24,"cue-typography",13),e.EFF(25),e.k0s(),e.nVh(26,Ye,2,4,"cue-input",14),e.nVh(27,Ue,2,4,"cue-input",14),e.nVh(28,He,3,7,"cue-input",15),e.nVh(29,Ze,7,8),e.j41(30,"cue-input",16),e.nI1(31,"transloco"),e.nI1(32,"transloco"),e.bIt("valueChange",function(n){s.eBV(t);const o=e.XpG();return o._strategyPreProcess.set(n),s.Njj(o._applyStrategyChange())}),e.k0s(),e.nVh(33,et,2,1,"cue-typography",6),e.j41(34,"cue-input",16),e.nI1(35,"transloco"),e.nI1(36,"transloco"),e.bIt("valueChange",function(n){s.eBV(t);const o=e.XpG();return o._strategyFallback.set(n),s.Njj(o._applyStrategyChange())}),e.k0s()}if(2&i){const t=e.XpG();e.Y8G("info",e.bMT(1,31,"components.sparqlTable.tooltipQuery")),e.R7$(2),e.JRh(e.bMT(3,33,"components.sparqlTable.labelQuery")),e.R7$(3),e.Y8G("content",t.query()),e.R7$(),e.vxM(t._queryError()?6:-1),e.R7$(2),e.vxM(t._queryDirty()?8:-1),e.R7$(),e.Y8G("disabled",!!t._queryError()),e.R7$(4),e.JRh(e.bMT(14,35,"components.sparqlTable.labelTest")),e.R7$(3),e.vxM(t._queryDirty()&&!t._queryError()?16:-1),e.R7$(),e.vxM(t._testError()?17:-1),e.R7$(),e.vxM(t._testRows().length>0?18:-1),e.R7$(),e.Y8G("label",e.bMT(20,37,"components.sparqlTable.labelDatatype"))("value",t._datatype()??"")("options",t.datatypeOptions)("labelMap",t.datatypeLabelMap()),e.R7$(2),e.Y8G("label",e.bMT(22,39,"components.sparqlTable.labelStrategy"))("info",e.bMT(23,41,"components.sparqlTable.tooltipStrategy"))("value",t._strategyType())("options",t.availableStrategyTypes())("labelMap",t.strategyLabelMap()),e.R7$(4),e.JRh(t._strategyDescription()),e.R7$(),e.vxM(t._strategyNeedsSeparator()?26:-1),e.R7$(),e.vxM(t._strategyNeedsValueKey()?27:-1),e.R7$(),e.vxM(t._strategyNeedsPriorityKey()?28:-1),e.R7$(),e.vxM(t._strategyNeedsMap()?29:-1),e.R7$(),e.Y8G("label",e.bMT(31,43,"components.sparqlTable.labelPreProcess"))("info",e.bMT(32,45,"components.sparqlTable.tooltipPreProcess"))("value",t._strategyPreProcess()),e.R7$(3),e.vxM(t._strategyPreProcessError()?33:-1),e.R7$(),e.Y8G("label",e.bMT(35,47,"components.sparqlTable.labelFallback"))("info",e.bMT(36,49,"components.sparqlTable.tooltipFallback"))("value",t._strategyFallback())}}function nt(i,u){if(1&i){const t=e.RV6();e.j41(0,"span",26),e.bIt("click",function(){const n=s.eBV(t).$implicit,o=e.XpG(4);return s.Njj(o._insertFieldIntoTemplate(n.field))}),e.EFF(1),e.k0s()}if(2&i){const t=u.$implicit;e.Y8G("title",t.headerName),e.R7$(),e.JRh(t.token)}}function at(i,u){if(1&i&&(e.j41(0,"cue-typography",13),e.EFF(1),e.nI1(2,"transloco"),e.k0s(),e.j41(3,"cue-flexcontainer",24),e.Z7z(4,nt,2,2,"span",25,H),e.k0s()),2&i){const t=e.XpG(3);e.R7$(),e.SpI(" ",e.bMT(2,1,"components.sparqlTable.labelAvailableFields")," "),e.R7$(3),e.Dyx(t._dataColumnFields())}}function ot(i,u){if(1&i){const t=e.RV6();e.j41(0,"cue-input",16),e.nI1(1,"transloco"),e.nI1(2,"transloco"),e.bIt("valueChange",function(n){s.eBV(t);const o=e.XpG(2);return o._evalTemplate.set(n),s.Njj(o._applyEvaluation())}),e.k0s(),e.nVh(3,at,6,3)}if(2&i){const t=e.XpG(2);e.Y8G("label",e.bMT(1,4,"components.sparqlTable.labelEvalTemplate"))("info",e.bMT(2,6,"components.sparqlTable.tooltipEvalTemplate"))("value",t._evalTemplate()),e.R7$(3),e.vxM(t._dataColumnFields().length?3:-1)}}function it(i,u){if(1&i){const t=e.RV6();e.j41(0,"span",26),e.bIt("click",function(){const n=s.eBV(t).$implicit,o=e.XpG(3);return s.Njj(o._toggleFormulaField(n.field))}),e.EFF(1),e.k0s()}if(2&i){const t=u.$implicit,a=e.XpG(3);e.AVh("field-chip--active",a._formulaFields().includes(t.field)),e.Y8G("title",t.field),e.R7$(),e.JRh(t.headerName)}}function lt(i,u){if(1&i&&(e.j41(0,"span",30),e.EFF(1),e.k0s()),2&i){const t=e.XpG(5);e.R7$(),e.JRh(t._formulaOpSymbol())}}function st(i,u){if(1&i&&(e.j41(0,"span",29),e.EFF(1),e.k0s(),e.nVh(2,lt,2,1,"span",30)),2&i){const t=u.$implicit,a=u.$index,n=u.$count,o=e.XpG(4);e.R7$(),e.JRh(o._fieldLabel(t)),e.R7$(),e.vxM(a!==n-1?2:-1)}}function rt(i,u){if(1&i&&(e.j41(0,"cue-flexcontainer",28),e.Z7z(1,st,3,2,null,null,e.fX1),e.k0s()),2&i){const t=e.XpG(3);e.R7$(),e.Dyx(t._formulaFields())}}function ct(i,u){if(1&i){const t=e.RV6();e.j41(0,"cue-select",2),e.nI1(1,"transloco"),e.bIt("valueChange",function(n){s.eBV(t);const o=e.XpG(2);return s.Njj(o.setFormulaOp(n))}),e.k0s(),e.j41(2,"cue-typography",13),e.EFF(3),e.nI1(4,"transloco"),e.k0s(),e.j41(5,"cue-flexcontainer",24),e.Z7z(6,it,2,4,"span",27,H),e.k0s(),e.nVh(8,rt,3,0,"cue-flexcontainer",28)}if(2&i){const t=e.XpG(2);e.Y8G("label",e.bMT(1,6,"components.sparqlTable.labelFormulaOp"))("value",t._formulaOp())("options",t.formulaOpOptions)("labelMap",t.formulaOpLabelMap()),e.R7$(3),e.SpI(" ",e.bMT(4,8,"components.sparqlTable.labelFormulaFields")," "),e.R7$(3),e.Dyx(t._dataColumnFields()),e.R7$(2),e.vxM(t._formulaFields().length?8:-1)}}function ut(i,u){if(1&i&&(e.j41(0,"cue-typography",23),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&i){const t=e.XpG(2);e.R7$(),e.Lme(" ",e.bMT(2,2,"components.sparqlTable.labelEvalPreview"),": ",t._evalPreview()," ")}}function dt(i,u){if(1&i){const t=e.RV6();e.j41(0,"span",26),e.bIt("click",function(){const n=s.eBV(t).$implicit,o=e.XpG(3);return s.Njj(o._togglePipelineSource(n.field))}),e.EFF(1),e.k0s()}if(2&i){const t=u.$implicit,a=e.XpG(3);e.AVh("field-chip--active",a._pipelineSources().includes(t.field)),e.Y8G("title",t.field),e.R7$(),e.JRh(t.headerName)}}function pt(i,u){if(1&i&&(e.j41(0,"cue-typography",11),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&i){const t=e.XpG(3);e.R7$(),e.Lme(" ",e.bMT(2,2,"components.sparqlTable.labelPipelineSourceOrder"),": ",t._pipelineSources().join(" \u2192 ")," ")}}function _t(i,u){if(1&i&&(e.j41(0,"cue-typography",6),e.EFF(1),e.k0s()),2&i){const t=e.XpG(3);e.R7$(),e.JRh(t._pipelineTransformError())}}function ft(i,u){if(1&i&&(e.j41(0,"cue-typography",6),e.EFF(1),e.k0s()),2&i){const t=e.XpG(3);e.R7$(),e.JRh(t._pipelineExcludeError())}}function mt(i,u){if(1&i){const t=e.RV6();e.j41(0,"cue-typography",3),e.nI1(1,"transloco"),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.j41(4,"cue-flexcontainer",24),e.Z7z(5,dt,2,4,"span",27,H),e.k0s(),e.nVh(7,pt,3,4,"cue-typography",11),e.j41(8,"cue-input",16),e.nI1(9,"transloco"),e.nI1(10,"transloco"),e.bIt("valueChange",function(n){s.eBV(t);const o=e.XpG(2);return o._pipelineTransform.set(n),s.Njj(o._applyEvaluation())}),e.k0s(),e.nVh(11,_t,2,1,"cue-typography",6),e.j41(12,"cue-input",16),e.nI1(13,"transloco"),e.nI1(14,"transloco"),e.bIt("valueChange",function(n){s.eBV(t);const o=e.XpG(2);return o._pipelineLimit.set(n),s.Njj(o._applyEvaluation())}),e.k0s(),e.j41(15,"cue-input",20),e.nI1(16,"transloco"),e.bIt("valueChange",function(n){s.eBV(t);const o=e.XpG(2);return o._pipelineSeparator.set(n),s.Njj(o._applyEvaluation())}),e.k0s(),e.j41(17,"cue-input",16),e.nI1(18,"transloco"),e.nI1(19,"transloco"),e.bIt("valueChange",function(n){s.eBV(t);const o=e.XpG(2);return o._pipelineFallback.set(n),s.Njj(o._applyEvaluation())}),e.k0s(),e.j41(20,"cue-flexcontainer",31)(21,"label",32)(22,"input",33),e.bIt("change",function(){s.eBV(t);const n=e.XpG(2);return n._pipelineDeduplicate.set(!n._pipelineDeduplicate()),s.Njj(n._applyEvaluation())}),e.k0s(),e.EFF(23),e.nI1(24,"transloco"),e.k0s(),e.j41(25,"label",32)(26,"input",33),e.bIt("change",function(){s.eBV(t);const n=e.XpG(2);return n._pipelineSort.set(!n._pipelineSort()),s.Njj(n._applyEvaluation())}),e.k0s(),e.EFF(27),e.nI1(28,"transloco"),e.k0s()(),e.j41(29,"cue-typography",3),e.nI1(30,"transloco"),e.EFF(31),e.nI1(32,"transloco"),e.k0s(),e.j41(33,"div",34)(34,"cue-code-editor",22),e.bIt("contentChanged",function(n){s.eBV(t);const o=e.XpG(2);return s.Njj(o._onPipelineExcludeChanged(n))}),e.k0s()(),e.nVh(35,ft,2,1,"cue-typography",6)}if(2&i){const t=e.XpG(2);e.Y8G("info",e.bMT(1,23,"components.sparqlTable.tooltipPipelineSources")),e.R7$(2),e.SpI(" ",e.bMT(3,25,"components.sparqlTable.labelPipelineSources")," "),e.R7$(3),e.Dyx(t._dataColumnFields()),e.R7$(2),e.vxM(t._pipelineSources().length>1?7:-1),e.R7$(),e.Y8G("label",e.bMT(9,27,"components.sparqlTable.labelPipelineTransform"))("info",e.bMT(10,29,"components.sparqlTable.tooltipPipelineTransform"))("value",t._pipelineTransform()),e.R7$(3),e.vxM(t._pipelineTransformError()?11:-1),e.R7$(),e.Y8G("label",e.bMT(13,31,"components.sparqlTable.labelPipelineLimit"))("info",e.bMT(14,33,"components.sparqlTable.tooltipPipelineLimit"))("value",t._pipelineLimit()),e.R7$(3),e.Y8G("label",e.bMT(16,35,"components.sparqlTable.labelSeparator"))("value",t._pipelineSeparator()),e.R7$(2),e.Y8G("label",e.bMT(18,37,"components.sparqlTable.labelFallback"))("info",e.bMT(19,39,"components.sparqlTable.tooltipFallback"))("value",t._pipelineFallback()),e.R7$(5),e.Y8G("checked",t._pipelineDeduplicate()),e.R7$(),e.SpI(" ",e.bMT(24,41,"components.sparqlTable.labelPipelineDeduplicate")," "),e.R7$(3),e.Y8G("checked",t._pipelineSort()),e.R7$(),e.SpI(" ",e.bMT(28,43,"components.sparqlTable.labelPipelineSort")," "),e.R7$(2),e.Y8G("info",e.bMT(30,45,"components.sparqlTable.tooltipPipelineExclude")),e.R7$(2),e.SpI(" ",e.bMT(32,47,"components.sparqlTable.labelPipelineExclude")," "),e.R7$(3),e.Y8G("content",t._pipelineExcludeJson()),e.R7$(),e.vxM(t._pipelineExcludeError()?35:-1)}}function gt(i,u){if(1&i){const t=e.RV6();e.j41(0,"cue-select",2),e.nI1(1,"transloco"),e.bIt("valueChange",function(n){s.eBV(t);const o=e.XpG();return s.Njj(o.setEvalType(n))}),e.k0s(),e.j41(2,"cue-typography",13),e.EFF(3),e.k0s(),e.nVh(4,ot,4,8),e.nVh(5,ct,9,10),e.nVh(6,ut,3,4,"cue-typography",23),e.nVh(7,mt,36,49)}if(2&i){const t=e.XpG();e.Y8G("label",e.bMT(1,9,"components.sparqlTable.labelEvalType"))("value",t._evalType())("options",t.evaluationTypeOptions)("labelMap",t.evaluationTypeLabelMap()),e.R7$(3),e.JRh(t._evalTypeDescription()),e.R7$(),e.vxM("template"===t._evalType()?4:-1),e.R7$(),e.vxM("formula"===t._evalType()?5:-1),e.R7$(),e.vxM(t._evalPreview()?6:-1),e.R7$(),e.vxM("pipeline"===t._evalType()?7:-1)}}const ht=["join"],ge=["sum","avg","min","max","mostRecent","oldest","longest","shortest"],he=["first","last","sum","avg","min","max","mostRecent","oldest","longest","shortest"],yt=["map"],ye=["text","number","date"],bt=Object.assign(new U.e,{});let vt=(()=>{class i{columnDef=m.geq.required();handlers=(0,m.hFB)();columns=(0,m.hFB)([]);close=(0,m.CGW)();updateColumnDef=(0,m.CGW)();agGridSettings=bt;_transloco=(0,s.WQX)(Q.JO);_lang=(0,Ve.ot)(this._transloco.langChanges$,{initialValue:this._transloco.getActiveLang()});columnTypeOptions=["data","evaluation"];columnTypeLabelMap=(0,_.EW)(()=>(this._lang(),{data:this._transloco.translate("components.sparqlTable.columnTypeData"),evaluation:this._transloco.translate("components.sparqlTable.columnTypeEvaluation")}));_defType=(0,_.uu)(()=>"evaluation"===this.columnDef().defType?"evaluation":"data");setDefType(t){const a=t;if(this._defType.set(a),"evaluation"===a){const o=this.columnDef().evaluation??{type:"template",template:""};this.updateColumnDef.emit({defType:"evaluation",evaluation:o})}else this.updateColumnDef.emit({defType:"data"})}_evalType=(0,_.uu)(()=>this.columnDef().evaluation?.type??"template");_evalTemplate=(0,_.uu)(()=>{const t=this.columnDef().evaluation;return"template"===t?.type?t.template:""});_formulaOp=(0,_.uu)(()=>{const t=this.columnDef().evaluation;return"formula"===t?.type?t.op:"add"});_formulaFields=(0,_.uu)(()=>{const t=this.columnDef().evaluation;return"formula"===t?.type?[...t.fields]:[]});_pipelineSources=(0,_.uu)(()=>{const t=this.columnDef().evaluation;return"pipeline"===t?.type?[...t.sources]:[]});_pipelineTransform=(0,_.uu)(()=>{const t=this.columnDef().evaluation;return"pipeline"===t?.type?t.transform??"":""});_pipelineLimit=(0,_.uu)(()=>{const t=this.columnDef().evaluation;return"pipeline"===t?.type?String(t.limit??""):""});_pipelineSeparator=(0,_.uu)(()=>{const t=this.columnDef().evaluation;return"pipeline"===t?.type?t.separator??", ":", "});_pipelineFallback=(0,_.uu)(()=>{const t=this.columnDef().evaluation;return"pipeline"===t?.type?t.fallback??"":""});_pipelineDeduplicate=(0,_.uu)(()=>{const t=this.columnDef().evaluation;return"pipeline"===t?.type&&(t.deduplicate??!1)});_pipelineSort=(0,_.uu)(()=>{const t=this.columnDef().evaluation;return"pipeline"===t?.type&&(t.sort??!1)});_pipelineExcludeJson=(0,_.uu)(()=>{const t=this.columnDef().evaluation,a="pipeline"===t?.type?t.exclude??[]:[];try{return JSON.stringify(a,null,2)}catch{return"[]"}});_pipelineExcludeError=(0,s.vPA)("");_pipelineExcludeParsed=(0,s.vPA)([]);_pipelineTransformError=(0,_.EW)(()=>{const t=this._pipelineTransform();if(t)return(0,x.NF)(t)??void 0});evaluationTypeOptions=ce;evaluationTypeLabelMap=(0,_.EW)(()=>(this._lang(),Object.fromEntries(ce.map(t=>[t,this._transloco.translate(Ne[t])]))));_evalTypeDescription=(0,_.EW)(()=>(this._lang(),this._transloco.translate(ke[this._evalType()])));formulaOpOptions=ue;formulaOpLabelMap=(0,_.EW)(()=>(this._lang(),Object.fromEntries(ue.map(t=>[t,this._transloco.translate(qe[t])]))));_dataColumnFields=(0,_.EW)(()=>this.columns().filter(t=>"data"===t.defType&&t.field!==this.columnDef().field).map(t=>({field:t.field,headerName:t.headerName??t.field,token:"${"+t.field+"}"})));_evalPreview=(0,_.EW)(()=>{if("template"===this._evalType()){const t=this._evalTemplate();return t?t.replace(/\$\{([\w.-]+)\}/g,(a,n)=>`[${n}]`):""}if("formula"===this._evalType()){const t=this._formulaFields(),a=this._formulaOp();return 0===t.length?"":t.join(` ${{add:"+",subtract:"\u2212",multiply:"\xd7",divide:"\xf7"}[a]} `)}if("pipeline"===this._evalType()){const t=this._pipelineSources(),a=this._pipelineTransform(),n=this._pipelineLimit();if(0===t.length)return"";const o=[`sources: [${t.join(", ")}]`];return a&&o.push(`transform: ${a}`),this._pipelineDeduplicate()&&o.push("deduplicate"),this._pipelineSort()&&o.push("sort"),n&&o.push(`limit: ${n}`),o.join(" | ")}return""});setEvalType(t){if(t){if(this._evalType.set(t),"pipeline"===t&&0===this._pipelineSources().length){const a=this._dataColumnFields()[0];a&&this._pipelineSources.set([a.field])}this._applyEvaluation()}}setFormulaOp(t){t&&(this._formulaOp.set(t),this._applyEvaluation())}_toggleFormulaField(t){const a=this._formulaFields(),n=a.includes(t)?a.filter(o=>o!==t):[...a,t];this._formulaFields.set(n),this._applyEvaluation()}_fieldLabel(t){return this._dataColumnFields().find(a=>a.field===t)?.headerName??t}_formulaOpSymbol=(0,_.EW)(()=>({add:"+",subtract:"\u2212",multiply:"\xd7",divide:"\xf7"}[this._formulaOp()]));_insertFieldIntoTemplate(t){const a=this._evalTemplate();this._evalTemplate.set(a+`\${${t}}`),this._applyEvaluation()}_togglePipelineSource(t){const a=this._pipelineSources(),n=a.includes(t)?a.filter(o=>o!==t):[...a,t];this._pipelineSources.set(n),this._applyEvaluation()}_applyEvaluation(){let t;if("template"===this._evalType())t={type:"template",template:this._evalTemplate()};else if("pipeline"===this._evalType()){const a={type:"pipeline",sources:this._pipelineSources(),deduplicate:this._pipelineDeduplicate()||void 0,sort:this._pipelineSort()||void 0,separator:this._pipelineSeparator()||void 0,fallback:this._pipelineFallback()||void 0,transform:this._pipelineTransform()||void 0,exclude:this._pipelineExcludeParsed().length?this._pipelineExcludeParsed():void 0},n=parseInt(this._pipelineLimit(),10);!isNaN(n)&&n>0&&(a.limit=n),t=a}else t={type:"formula",fields:this._formulaFields(),op:this._formulaOp()};this.updateColumnDef.emit({evaluation:t})}_onPipelineExcludeChanged(t){this._pipelineExcludeJson.set(t);try{const a=JSON.parse(t);if(!Array.isArray(a))throw new Error("Must be a JSON array of strings");this._pipelineExcludeError.set(""),this._pipelineExcludeParsed.set(a),this._applyEvaluation()}catch(a){this._pipelineExcludeError.set(a?.message??"Invalid JSON")}}datatypeOptions=ye;datatypeLabelMap=(0,_.EW)(()=>(this._lang(),Object.fromEntries(ye.map(t=>[t,this._transloco.translate(`components.sparqlTable.datatype${t.charAt(0).toUpperCase()+t.slice(1)}`)]))));availableStrategyTypes=(0,_.EW)(()=>{const t=this._datatype();return t?ie[t]:oe});strategyLabelMap=(0,_.EW)(()=>(this._lang(),Object.fromEntries(oe.map(t=>[t,this._transloco.translate(ve[t])]))));_strategyDescription=(0,_.EW)(()=>(this._lang(),this._transloco.translate(De[this._strategyType()])));query=(0,_.EW)(()=>this.columnDef().query??"");_editedQuery=(0,_.uu)(()=>this.query());_queryError=(0,_.EW)(()=>{this._lang();const t=function Oe(i,u="val"){if(!i?.trim())return null;let t;try{t=new A.Parser({sparqlStar:!0}).parse(i)}catch{return"validationErrorSyntax"}if("query"!==t?.type||"SELECT"!==t?.queryType)return"validationErrorNotSelect";const n=t.variables;if(1===n.length&&"*"===n[0])return null;const o=n.map(l=>l?.value??l?.variable?.value??"");return o.includes("subject")?o.includes(u)?null:"validationErrorMissingVal":"validationErrorMissingKey"}(this._editedQuery(),this._strategyValueKey()||"val");if(!t)return;const a=`components.sparqlTable.${t}`;return"validationErrorMissingVal"===t?this._transloco.translate(a,{var:this._strategyValueKey()||"val"}):this._transloco.translate(a)});_datatype=(0,_.uu)(()=>this.columnDef().datatype);_strategyType=(0,_.uu)(()=>this.columnDef().strategy?.type??"join");_strategySeparator=(0,_.uu)(()=>this.columnDef().strategy?.separator??", ");_strategyValueKey=(0,_.uu)(()=>this.columnDef().strategy?.valueKey??"val");_strategyPriorityKey=(0,_.uu)(()=>this.columnDef().strategy?.priorityKey??"");_strategyPreProcess=(0,_.uu)(()=>this.columnDef().strategy?.preProcess??"");_strategyFallback=(0,_.uu)(()=>this.columnDef().strategy?.fallback??"");_strategyMapJson=(0,_.uu)(()=>{const t=this.columnDef().strategy;if("map"!==t?.type)return"{}";try{return JSON.stringify(t.map,null,2)}catch{return"{}"}});_strategyMapError=(0,s.vPA)("");_strategyNeedsSeparator=(0,_.EW)(()=>ht.includes(this._strategyType()));_strategyNeedsValueKey=(0,_.EW)(()=>ge.includes(this._strategyType()));_strategyNeedsPriorityKey=(0,_.EW)(()=>he.includes(this._strategyType())&&this._queryExtraBindings().length>0);_strategyNeedsMap=(0,_.EW)(()=>yt.includes(this._strategyType()));_strategyPreProcessError=(0,_.EW)(()=>{const t=this._strategyPreProcess();return t?(0,x.NF)(t)??void 0:void 0});_queryExtraBindings=(0,_.EW)(()=>{const t=this._editedQuery(),a=this._strategyValueKey()||"val";if(!t?.trim())return[];try{const n=new A.Parser({sparqlStar:!0}).parse(t);if("SELECT"!==n?.queryType)return[];const o=n.variables;return 1===o.length&&"*"===o[0]?[]:o.map(d=>d?.value??d?.variable?.value??"").filter(Boolean).filter(d=>"subject"!==d&&d!==a)}catch{return[]}});setDatatype(t){const a=t||void 0;if(this._datatype.set(a),a&&!ie[a].includes(this._strategyType()))return this._strategyType.set("first"),void this.updateColumnDef.emit({strategy:{type:"first"},datatype:a});this.updateColumnDef.emit({datatype:a})}setStrategyType(t){if(!t)return;this._strategyType.set(t);const a=this._buildStrategy(t);this.updateColumnDef.emit({strategy:a})}_applyStrategyChange(){const t=this._buildStrategy(this._strategyType());this.updateColumnDef.emit({strategy:t})}_buildStrategy(t){const a=this._strategyValueKey()||"val",n=this._strategyPriorityKey()||void 0,d={preProcess:this._strategyPreProcess()||void 0,fallback:this._strategyFallback()||void 0};if("join"===t)return{type:t,separator:this._strategySeparator(),...d};if("map"===t){let r={};try{r=JSON.parse(this._strategyMapJson())}catch{}return{type:t,map:r,...d}}return ge.includes(t)?{type:t,valueKey:a,priorityKey:n,...d}:he.includes(t)?{type:t,priorityKey:n,...d}:{type:t,...d}}_onMapJsonChanged(t){this._strategyMapJson.set(t);try{const a=JSON.parse(t);if("object"!=typeof a||Array.isArray(a))throw new Error("Must be a JSON object");this._strategyMapError.set(""),this._applyStrategyChange()}catch(a){this._strategyMapError.set(a?.message??"Invalid JSON")}}_queryDirty=(0,_.EW)(()=>this._editedQuery()!==this.query());onQueryChanged(t){this._editedQuery.set(t)}discardQuery(){this._editedQuery.set(this.query()),this._testRows.set([]),this._testError.set("")}_testRows=(0,s.vPA)([]);_testError=(0,s.vPA)("");_testLoading=(0,s.vPA)(!1);testQuery(){var t=this;return(0,C.A)(function*(){const a=t.handlers()?.queryHandler;if(!a)return void t._testError.set("No query handler available.");t._testRows.set([]),t._testError.set(""),t._testLoading.set(!0);const o=t._editedQuery().trim().replace(/\s*LIMIT\s+\d+\s*$/i,"")+"\nLIMIT 5";try{const d=((yield a(o,{}))?.results?.bindings??[]).map(r=>JSON.stringify(Object.fromEntries(Object.entries(r).map(([p,c])=>[p,c.value])),null,2));t._testRows.set(d),t.updateColumnDef.emit({query:t._editedQuery()})}catch(l){t._testError.set(l?.message??String(l))}finally{t._testLoading.set(!1)}})()}_onColDefUpdate(t){this.updateColumnDef.emit(t)}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=e.VBU({type:i,selectors:[["cue-declarative-sparql-column-settings-modal"]],inputs:{columnDef:[1,"columnDef"],handlers:[1,"handlers"],columns:[1,"columns"]},outputs:{columnDef:"columnDefChange",close:"close",updateColumnDef:"updateColumnDef"},decls:7,vars:13,consts:[["minWidth","800px",3,"updateColumn","close","columnDef","settings","extraPanelLabel"],["cueExtraContent","","direction","column"],[3,"valueChange","label","value","options","labelMap"],["size","s",3,"info"],[2,"height","200px","min-height","120px"],["type","sparql",3,"contentChanged","content"],["size","s",2,"color","var(--cue-error)"],["direction","row","justify","end","gap","s"],["variant","ghost","size","s"],["variant","secondary","size","s",3,"click","disabled"],["icon","go"],["size","xs",2,"opacity","0.6","font-style","italic"],[3,"valueChange","label","info","value","options","labelMap"],["size","xs",2,"opacity","0.7"],[3,"label","value"],[3,"label","info","value"],[3,"valueChange","label","info","value"],["variant","ghost","size","s",3,"click"],["size","s"],["size","xs",2,"font-family","monospace","white-space","pre-wrap"],[3,"valueChange","label","value"],[2,"height","200px","min-height","120px","text-align","left"],["type","json",3,"contentChanged","content"],["size","xs",2,"opacity","0.7","font-style","italic"],["direction","row","wrap","wrap","gap","xs"],[1,"field-chip",3,"title"],[1,"field-chip",3,"click","title"],[1,"field-chip",3,"field-chip--active","title"],["direction","row","wrap","wrap","gap","xs",2,"align-items","center"],[1,"formula-token"],[1,"formula-op"],["direction","row","gap","m"],[2,"display","flex","align-items","center","gap","4px","font-size","0.85rem","cursor","pointer"],["type","checkbox",3,"change","checked"],[2,"height","160px","min-height","80px","text-align","left"]],template:function(a,n){1&a&&(e.j41(0,"cue-table-column-settings-modal",0),e.nI1(1,"transloco"),e.bIt("updateColumn",function(l){return n._onColDefUpdate(l)})("close",function(){return n.close.emit()}),e.j41(2,"cue-flexcontainer",1)(3,"cue-select",2),e.nI1(4,"transloco"),e.bIt("valueChange",function(l){return n.setDefType(l)}),e.k0s(),e.nVh(5,tt,37,51),e.nVh(6,gt,8,11),e.k0s()()),2&a&&(e.Y8G("columnDef",n.columnDef())("settings",n.agGridSettings)("extraPanelLabel",e.bMT(1,9,"components.sparqlTable.panelLabel")),e.R7$(3),e.Y8G("label",e.bMT(4,11,"components.sparqlTable.labelColumnType"))("value",n._defType())("options",n.columnTypeOptions)("labelMap",n.columnTypeLabelMap()),e.R7$(2),e.vxM("data"===n._defType()?5:-1),e.R7$(),e.vxM("evaluation"===n._defType()?6:-1))},dependencies:[U.T,q.n,k.Typography,de.l,pe.p,Y.$,_e.a,fe.B,me.L,Qe.z,Q.Kj],styles:[".field-chip[_ngcontent-%COMP%]{display:inline-block;padding:2px 8px;border-radius:4px;background:var(--cue-surface-2, #eee);font-family:monospace;font-size:.75rem;cursor:pointer;-webkit-user-select:none;user-select:none;transition:background .12s,outline .12s;outline:2px solid transparent}.field-chip[_ngcontent-%COMP%]:hover{background:var(--cue-primary-light, #c8e6c9)}.field-chip--active[_ngcontent-%COMP%]{background:var(--cue-primary, #4caf50);color:#fff;outline-color:var(--cue-primary, #4caf50)}.formula-token[_ngcontent-%COMP%]{display:inline-block;padding:2px 8px;border-radius:4px;background:var(--cue-primary, #4caf50);color:#fff;font-family:monospace;font-size:.75rem}.formula-op[_ngcontent-%COMP%]{font-size:1rem;font-weight:700;opacity:.6;padding:0 2px}"],changeDetection:0})}return i})();var Dt=g(5187),Tt=g(7717),J=g(5661),Ct=g(6117),St=g(356),Mt=g(6279),Rt=g(29),Pt=g(5821),xt=g(5745);const Et=(i,u)=>u.key;function wt(i,u){if(1&i){const t=e.RV6();e.j41(0,"cue-input",12),e.bIt("valueChange",function(n){s.eBV(t);const o=e.XpG().$implicit,l=e.XpG(2);return s.Njj(l._setVar(o.key,n))}),e.k0s()}if(2&i){const t=e.XpG().$implicit,a=e.XpG(2);e.Y8G("label",t.label)("value",a._varValues()[t.key]??a._filePathPlaceholder())}}function Ft(i,u){if(1&i){const t=e.RV6();e.j41(0,"cue-select",13),e.bIt("valueChange",function(n){s.eBV(t);const o=e.XpG().$implicit,l=e.XpG(2);return s.Njj(l._setVar(o.key,n))}),e.k0s()}if(2&i){const t=e.XpG().$implicit,a=e.XpG(2);e.Y8G("label",t.label)("options",a._categoryOptions())("labelMap",a._categoryLabelMap())("value",a._varValues()[t.key]??void 0)("disabled",a._categoriesLoading())("placeholder",a._categoriesLoading()?"Loading\u2026":"Select a category\u2026")}}function jt(i,u){if(1&i&&e.nVh(0,wt,1,2,"cue-input",10)(1,Ft,1,6,"cue-select",11),2&i){const t=u.$implicit;e.vxM("text"===t.type?0:"select"===t.type?1:-1)}}function At(i,u){1&i&&e.Z7z(0,jt,2,1,null,null,Et),2&i&&e.Dyx(u.variables)}function Nt(i,u){1&i&&(e.j41(0,"div",6),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&i&&(e.R7$(),e.JRh(e.bMT(2,1,u)))}const kt=new A.Parser({sparqlStar:!0}),be=`PREFIX qcy: <${z.E.qcy}>`,Z=[{id:"files-in-directory",label:"Files in a specific directory",template:`${be}\n\nSELECT DISTINCT ?subject\nWHERE {\n ?subject a qcy:FileContent ;\n qcy:hasFileLocation ?fl .\n ?fl qcy:filePath ?path .\n FILTER(STRSTARTS(STR(?path), "\${THE_FILE_PATH}"))\n\n # EXCLUDE DERIVED FILES\n FILTER NOT EXISTS {?x qcy:alternativeRepresentation ?subject}\n}`,variables:[{key:"THE_FILE_PATH",label:"File path",type:"text"}]},{id:"entities-of-category",label:"Entities of a specific category",template:`${be}\n\nSELECT DISTINCT ?subject\nWHERE {\n ?subject a qcy:CanonicalEntity ;\n qcy:hasEntityCategory <\${CATEGORY_IRI}> .\n}`,variables:[{key:"CATEGORY_IRI",label:"Category",type:"select"}]}];let qt=(()=>{class i{rowDefinitionQuery=(0,m.geq)(null);handlers=(0,m.hFB)(void 0);close=(0,m.CGW)();saved=(0,m.CGW)();_draft=(0,_.uu)(()=>this.rowDefinitionQuery()||K);_selectedPredefinedId=(0,s.vPA)(null);_varValues=(0,s.vPA)({});_categories=(0,s.vPA)([]);_categoriesLoading=(0,s.vPA)(!1);_filePathPlaceholder=(0,s.vPA)("");_selectedPredefined=(0,_.EW)(()=>{const t=this._selectedPredefinedId();return t?Z.find(a=>a.id===t)??null:null});_predefinedOptions=Z.map(t=>t.id);_predefinedLabelMap=Object.fromEntries(Z.map(t=>[t.id,t.label]));_categoryOptions=(0,_.EW)(()=>this._categories().map(t=>t.iri));_categoryLabelMap=(0,_.EW)(()=>Object.fromEntries(this._categories().map(t=>[t.iri,t.label])));_resolvedTemplate=(0,_.EW)(()=>{const t=this._selectedPredefined();if(!t)return null;const a=this._varValues();let n=t.template;for(const o of t.variables)n=n.replaceAll(`\${${o.key}}`,a[o.key]??"");return n});constructor(){(0,s.QZP)(()=>{const t=this._selectedPredefined(),a=this.handlers();this._varValues.set({}),this._categories.set([]),this._filePathPlaceholder.set(""),t?.variables.some(n=>"select"===n.type)&&this._loadCategories(a),t?.variables.some(n=>"THE_FILE_PATH"===n.key)&&this._loadFilePathPlaceholder(a)}),(0,s.QZP)(()=>{const t=this._resolvedTemplate();null!==t&&this._draft.set(t)})}_loadCategories(t){var a=this;return(0,C.A)(function*(){const n=t?.contentCategoriesInProject;if(n){a._categoriesLoading.set(!0);try{const o=yield n();a._categories.set(o)}catch(o){console.error("[RowDefModal] _loadCategories \u2014 error:",o)}finally{a._categoriesLoading.set(!1)}}})()}_loadFilePathPlaceholder(t){var a=this;return(0,C.A)(function*(){const n=t?.randomFilePath;if(!n)return;const o=yield n();if(o){const l=o.replace(/\/?[^\/]*$/,"/");a._filePathPlaceholder.set(l),a._setVar("THE_FILE_PATH",l)}})()}_onPredefinedChange(t){this._selectedPredefinedId.set(null!=t?String(t):null)}_setVar(t,a){null!=a&&this._varValues.update(n=>({...n,[t]:String(a)}))}_validationError=(0,_.EW)(()=>{const t=this._draft().trim();if(!t)return null;try{const a=kt.parse(t);if("SELECT"!==a?.queryType)return"components.sparqlTable.rowDefinitionErrorNotSelect";if(!a.variables.filter(l=>"*"!==l).map(l=>l?.value??l?.variable?.value??"").includes("subject"))return"components.sparqlTable.rowDefinitionErrorMissingSubject"}catch{return"components.sparqlTable.rowDefinitionErrorSyntax"}return null});_isSaveDisabled=(0,_.EW)(()=>!!this._draft().trim()&&!!this._validationError());_save(){this._draft()&&this._validationError()||(this.rowDefinitionQuery.set(this._draft()),this.saved.emit(),this.close.emit())}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=e.VBU({type:i,selectors:[["cue-sparql-row-definition-modal"]],inputs:{rowDefinitionQuery:[1,"rowDefinitionQuery"],handlers:[1,"handlers"]},outputs:{rowDefinitionQuery:"rowDefinitionQueryChange",close:"close",saved:"saved"},decls:20,vars:20,consts:[[3,"close","label","minWidth"],["direction","column","gap","m",2,"padding","4px 0"],["size","s","color","secondary"],["label","Predefined query","placeholder","Custom query\u2026",3,"valueChange","options","labelMap","value"],[2,"height","200px","display","flex","flex-direction","column"],["type","sparql",2,"flex","1",3,"contentChange","content"],[1,"row-def-error"],["direction","row","gap","s","justify","end"],["variant","tertiary","size","s",3,"click"],["variant","primary","size","s",3,"click","disabled"],[3,"label","value"],[3,"label","options","labelMap","value","disabled","placeholder"],[3,"valueChange","label","value"],[3,"valueChange","label","options","labelMap","value","disabled","placeholder"]],template:function(a,n){if(1&a&&(e.j41(0,"cue-modal",0),e.nI1(1,"transloco"),e.bIt("close",function(){return n.close.emit()}),e.j41(2,"cue-flexcontainer",1)(3,"cue-typography",2),e.EFF(4),e.nI1(5,"transloco"),e.k0s(),e.j41(6,"cue-select",3),e.bIt("valueChange",function(l){return n._onPredefinedChange(l)}),e.k0s(),e.nVh(7,At,2,0),e.j41(8,"div",4)(9,"cue-code-editor",5),e.bIt("contentChange",function(l){return n._draft.set(l)}),e.k0s()(),e.nVh(10,Nt,3,3,"div",6),e.j41(11,"cue-flexcontainer",7)(12,"cue-button",8),e.bIt("click",function(){return n.close.emit()}),e.j41(13,"cue-button-label"),e.EFF(14),e.nI1(15,"transloco"),e.k0s()(),e.j41(16,"cue-button",9),e.bIt("click",function(){return n._save()}),e.j41(17,"cue-button-label"),e.EFF(18),e.nI1(19,"transloco"),e.k0s()()()()()),2&a){let o,l;e.Y8G("label",e.bMT(1,12,"components.sparqlTable.rowDefinitionModalTitle"))("minWidth","620px"),e.R7$(4),e.SpI(" ",e.bMT(5,14,"components.sparqlTable.rowDefinitionModalDescription")," "),e.R7$(2),e.Y8G("options",n._predefinedOptions)("labelMap",n._predefinedLabelMap)("value",n._selectedPredefinedId()??void 0),e.R7$(),e.vxM((o=n._selectedPredefined())?7:-1,o),e.R7$(2),e.Y8G("content",n._draft()),e.R7$(),e.vxM((l=n._draft()&&n._validationError())?10:-1,l),e.R7$(4),e.SpI(" ",e.bMT(15,16,"components.sparqlTable.rowDefinitionDiscard")," "),e.R7$(2),e.Y8G("disabled",n._isSaveDisabled()),e.R7$(2),e.SpI(" ",e.bMT(19,18,"components.sparqlTable.rowDefinitionSave")," ")}},dependencies:[xt.a,q.n,k.Typography,Y.$,me.L,fe.B,de.l,pe.p,Q.Kj],styles:[".row-def-error[_ngcontent-%COMP%]{color:var(--cue-color-error, #ef4444);font-size:12px;padding:2px 0}"],changeDetection:0})}return i})();var It=g(7284);function Lt(i,u){if(1&i&&(e.j41(0,"div",13),e.nrm(1,"span",26),e.EFF(2),e.k0s()),2&i){const t=u;e.R7$(2),e.Lme(" ",t.done," / ",t.total," queries ")}}function Gt(i,u){1&i&&(e.j41(0,"div",13),e.nrm(1,"span",26),e.EFF(2," Building table for download\u2026 "),e.k0s())}function Vt(i,u){if(1&i){const t=e.RV6();e.j41(0,"div",27),e.bIt("click",function(){s.eBV(t);const n=e.XpG();return s.Njj(n._openRowDefModal())}),e.j41(1,"cue-typography",28),e.EFF(2),e.nI1(3,"transloco"),e.k0s()()}2&i&&(e.R7$(2),e.SpI(" ",e.bMT(3,1,"components.sparqlTable.rowDefinitionEmpty")," "))}function Qt(i,u){if(1&i){const t=e.RV6();e.j41(0,"cue-paginator",29),e.bIt("currentPage",function(n){s.eBV(t);const o=e.XpG();return s.Njj(o._onPaginateEvent(n))}),e.k0s()}if(2&i){const t=e.XpG();e.Y8G("size",t._totalKeys())("pageSize",t.pageSize())}}function Ot(i,u){if(1&i){const t=e.RV6();e.j41(0,"cue-button",30),e.bIt("click",function(){const n=s.eBV(t),o=n.$implicit,l=n.index,d=e.XpG();return s.Njj(d._openSettings(o,l))}),e.nrm(1,"cue-button-icon",11),e.k0s(),e.j41(2,"cue-button",31),e.bIt("click",function(){const n=s.eBV(t).$implicit,o=e.XpG();return s.Njj(o._deleteColumn(n.field))}),e.nrm(3,"cue-button-icon",32),e.k0s()}}function $t(i,u){if(1&i){const t=e.RV6();e.j41(0,"div",33),e.bIt("click",function(){s.eBV(t);const n=e.XpG();return s.Njj(n._addColumn())}),e.nrm(1,"cue-button-icon",34),e.k0s()}}function Bt(i,u){if(1&i){const t=e.RV6();e.j41(0,"cue-declarative-sparql-column-settings-modal",35),e.mxI("columnDefChange",function(n){const o=s.eBV(t);return e.DH7(o.col,n)||(o.col=n),s.Njj(n)}),e.bIt("close",function(){s.eBV(t);const n=e.XpG();return s.Njj(n._activeColumn.set(void 0))})("updateColumnDef",function(n){const o=s.eBV(t),l=e.XpG();return s.Njj(l._applyColumnUpdate(o.index,n))}),e.k0s()}if(2&i){const t=e.XpG();e.R50("columnDef",u.col),e.Y8G("handlers",t.handlers())("columns",t.columns())}}function Xt(i,u){if(1&i){const t=e.RV6();e.j41(0,"cue-sparql-row-definition-modal",36),e.mxI("rowDefinitionQueryChange",function(n){s.eBV(t);const o=e.XpG();return e.DH7(o.rowDefinition,n)||(o.rowDefinition=n),s.Njj(n)}),e.bIt("saved",function(){s.eBV(t);const n=e.XpG();return s.Njj(n._onRowDefSaved())})("close",function(){s.eBV(t);const n=e.XpG();return s.Njj(n._showRowDefModal.set(!1))}),e.k0s()}if(2&i){const t=e.XpG();e.R50("rowDefinitionQuery",t.rowDefinition),e.Y8G("handlers",t.rowDefinitionHandlers())}}const zt=new A.Parser({sparqlStar:!0}),Kt=new A.Generator;function $(i,u){return ee.apply(this,arguments)}function ee(){return ee=(0,C.A)(function*(i,u){const t=new Array(i.length);let a=0;function o(){return(o=(0,C.A)(function*(){for(;a<i.length;){const d=a++;t[d]=yield i[d]()}})).apply(this,arguments)}const l=Array.from({length:Math.min(u,i.length)},()=>function n(){return o.apply(this,arguments)}());return yield Promise.all(l),t}),ee.apply(this,arguments)}function te(i,u){if(u.length>200)return i;try{const t=zt.parse(i),a={type:"values",values:u.map(n=>({"?subject":{termType:"NamedNode",value:n}}))};return Array.isArray(t.where)&&(t.where=[a,...t.where]),Kt.stringify(t)}catch{const t=`VALUES ?subject { ${u.map(a=>`<${a}>`).join(" ")} }`;return i.replace(/WHERE\s*\{/i,`WHERE {\n ${t}`)}}let Yt=(()=>{class i{visibleRows=(0,m.CGW)();columnDefsAG=(0,m.CGW)();columns=m.geq.required();handlers=m.hFB.required();rowDefinitionHandlers=(0,m.hFB)(void 0);rowDefinition=(0,m.geq)(K);pageSize=(0,m.hFB)(10);bufferFactor=(0,m.hFB)(5);_bufferSize=(0,_.EW)(()=>this.pageSize()*this.bufferFactor());_noRowDef=(0,_.EW)(()=>null!==this.rowDefinition()&&!this.rowDefinition()&&!this._showSettings());_showSettings=(0,s.vPA)(!1);_activeColumn=(0,s.vPA)(void 0);_showRowDefModal=(0,s.vPA)(!1);_dataFetchService=(0,s.WQX)(V);_tableService=(0,s.WQX)(W);_allKeys=(0,s.vPA)([]);_totalKeys=(0,_.EW)(()=>this._allKeys().length);_bufferKeys=(0,s.vPA)([]);_bufferOffset=(0,s.vPA)(0);_rowDefLoading=(0,s.vPA)(!1);_rowDefError=(0,s.vPA)("");_gridApi=null;_fullDataMode=(0,s.vPA)(!1);_fetchingFullData=(0,s.vPA)(!1);_fullDataFetchVersion=0;_exporting=(0,s.vPA)(!1);_prefetchCache=new Map;_currentlyPrefetching=new Set;_displayColumns=(0,_.EW)(()=>{const t=this._bufferKeys();return null===this.rowDefinition()||t.length?this._patchColumns(this.columns(),t):[]});_queryProgress=(0,_.EW)(()=>{const t=!!this.rowDefinition(),a=t?1:0;if(this._fetchingFullData()){const p=this._dataFetchService.totalQueryCount(),c=a+Math.max(p,1);return 0===c?null:{done:0,total:c}}const n=t&&!this._rowDefLoading()&&this._allKeys().length>0?1:0,o=this._dataFetchService.totalQueryCount(),d=n+this._dataFetchService.fetchedColumns().length,r=a+o;return 0===r||d>=r?null:{done:d,total:r}});_handlers=(0,_.EW)(()=>({queryHandler:this.handlers().queryHandler}));constructor(){(0,s.QZP)(()=>{const t=this.rowDefinition(),a=this.handlers();t&&a&&this._fetchRowDef(t,a)})}_openRowDefModal(){this._showRowDefModal.set(!0)}_onGridApi(t){this._gridApi=t,null!==this.rowDefinition()&&(t.addEventListener("sortChanged",()=>this._checkSortFilterState(t)),t.addEventListener("filterChanged",()=>this._checkSortFilterState(t)))}_checkSortFilterState(t){if(!this.rowDefinition())return;const a=t.getColumnState().some(l=>null!=l.sort),n=Object.keys(t.getFilterModel()??{}).length>0,o=a||n;!o||this._fullDataMode()||this._fetchingFullData()?o&&this._fullDataMode()?this._fillVisibleRows():!o&&(this._fullDataMode()||this._fetchingFullData())&&this._exitFullDataMode():this._enterFullDataMode()}_fillingVisibleRows=!1;_fillVisibleRows(){var t=this;return(0,C.A)(function*(){if(!t._fillingVisibleRows&&t._gridApi){t._fillingVisibleRows=!0;try{const a=t._gridApi.paginationGetPageSize?.()??t.pageSize(),o=(t._gridApi.paginationGetCurrentPage?.()??0)*a,l=[];for(let p=o;p<o+a;p++){const c=t._gridApi.getDisplayedRowAtIndex(p);if(!c?.data?.id)break;l.push(c.data.id)}if(!l.length)return;const d=t.columns().filter(p=>"data"===p.defType&&p.query&&!p.hide),r=t._dataFetchService.keyVals;yield $(d.map(p=>(0,C.A)(function*(){const c=l.filter(h=>void 0===r[h]?.[p.field]);if(!c.length)return;const f=te(p.query,c);try{const h=yield t.handlers().queryHandler(f,w(f)),y={};h.results.bindings.forEach(T=>{const b=T.subject?.value;if(!b)return;y[b]||(y[b]=[]);const M={};Object.keys(T).filter(S=>"subject"!==S).forEach(S=>{M[S]=T[S]?.value}),y[b].push(M)}),t._dataFetchService.mergeColumnData(p.field,y,p.query)}catch{}})),3)}finally{t._fillingVisibleRows=!1}}})()}_onPaginateEvent(t){const a=t.startIndex,n=this._bufferSize(),o=Math.floor(a/n)*n;this._loadBuffer(o);const l=Math.floor((a-o)/this.pageSize());if(this._gridApi)try{this._gridApi.paginationGoToPage(l)}catch{}if(l>=Math.ceil(n/this.pageSize())-1){const r=o+n;r<this._allKeys().length&&this._prefetchBuffer(r)}}_fetchRowDef(t,a){var n=this;return(0,C.A)(function*(){n._rowDefLoading.set(!0),n._rowDefError.set(""),n._dataFetchService.emptyTableText.set("Loading\u2026"),n._allKeys.set([]),n._bufferKeys.set([]),n._bufferOffset.set(0),n._prefetchCache.clear(),n._currentlyPrefetching.clear();try{const o=w(t),l=yield a.queryHandler(t,o),d=l.results.bindings.map(r=>r.subject?.value).filter(Boolean);console.log("[ROWDEF] _fetchRowDef received",l.results.bindings.length,"bindings,",d.length,"valid keys. meta=",l.meta),n._allKeys.set(d),n._loadBuffer(0)}catch(o){n._rowDefError.set(String(o?.message??o))}finally{n._rowDefLoading.set(!1)}})()}_loadBuffer(t,a=!1){const n=this._allKeys().slice(t,t+this._bufferSize()),o=this._bufferKeys();if(!a&&n.length===o.length&&n.every((d,r)=>d===o[r]))return;const l=this._prefetchCache.get(t);if(this._prefetchCache.delete(t),this._dataFetchService.resetData(),l?this._dataFetchService.injectPreloadedData(l.keyVals,l.fetchedColumnFields,l.columnQueries):this._tableService.destroy(),this._bufferOffset.set(t),this._bufferKeys.set(n),this._gridApi)try{this._gridApi.paginationGoToPage(0)}catch{}}_enterFullDataMode(){var t=this;return(0,C.A)(function*(){if(console.log("[FDM] _enterFullDataMode called. _fetchingFullData=",t._fetchingFullData(),"_fullDataMode=",t._fullDataMode(),"_allKeys=",t._allKeys().length),t._fetchingFullData())return;t._fetchingFullData.set(!0);const a=++t._fullDataFetchVersion;let n;t._gridApi&&(n=t._gridApi.getColumnState().find(r=>null!=r.sort)?.colId,n||(n=Object.keys(t._gridApi.getFilterModel()??{})[0]));const o=n?.replace(/_\d+$/,""),l=o?t.columns().find(d=>d.field===o&&"data"===d.defType&&d.query):void 0;if(!l)return t._fullDataMode.set(!0),void t._fetchingFullData.set(!1);try{if(a!==t._fullDataFetchVersion)return;const d=yield t.handlers().queryHandler(l.query,w(l.query));if(a!==t._fullDataFetchVersion)return;const r={};Object.entries(t._dataFetchService.keyVals).forEach(([b,M])=>{r[b]={...M}});const p=t._allKeys();p.forEach(b=>{r[b]||(r[b]={})}),console.log("[DeclarativeSPARQLTable] keyVals pre-seed: allKeys=",p.length,"keyVals size=",Object.keys(r).length);const c=[...t._dataFetchService.fetchedColumns()],f={...t._dataFetchService._columnQueries},h=[];if(d.results.bindings.forEach(b=>{const M=b.subject?.value;if(!M)return;r[M]||(r[M]={}),r[M][l.field]=[];const S={};Object.keys(b).filter(D=>"subject"!==D).forEach(D=>{S[D]=b[D]?.value}),r[M][l.field].push(S),h.push(M)}),c.includes(l.field)||c.push(l.field),f[l.field]=l.query,console.log("[FDM] after sort-col fetch: keyVals size=",Object.keys(r).length,"allKeys from sort col=",h.length),console.log("[FDM] calling resetData()"),t._dataFetchService.resetData(),t._tableService.destroy(),console.log("[FDM] calling injectPreloadedData with",Object.keys(r).length,"rows"),t._dataFetchService.injectPreloadedData(r,c,f),console.log("[FDM] injectPreloadedData done. Service keyVals size=",Object.keys(t._dataFetchService.keyVals).length),t._fullDataMode.set(!0),a!==t._fullDataFetchVersion)return;const y=t.columns().filter(b=>"data"===b.defType&&b.query&&b.field!==l.field&&!b.hide),T=new Set(t._bufferKeys());yield $(y.map(b=>(0,C.A)(function*(){const M=h.filter(D=>T.has(D)&&void 0===r[D]?.[b.field]);if(!M.length||a!==t._fullDataFetchVersion)return;const S=te(b.query,M);try{const D=yield t.handlers().queryHandler(S,w(S));if(a!==t._fullDataFetchVersion)return;const v={};D.results.bindings.forEach(R=>{const P=R.subject?.value;if(!P)return;v[P]||(v[P]=[]);const I={};Object.keys(R).filter(F=>"subject"!==F).forEach(F=>{I[F]=R[F]?.value}),v[P].push(I)}),Object.entries(v).forEach(([R,P])=>{r[R]&&(r[R][b.field]=P)}),t._dataFetchService.mergeColumnData(b.field,v,b.query)}catch{}})),3)}catch(d){console.error("[DeclarativeSPARQLTable] Error in _enterFullDataMode:",d)}finally{a===t._fullDataFetchVersion&&t._fetchingFullData.set(!1)}})()}_exitFullDataMode(){if(console.log("[FDM] _exitFullDataMode called"),this._fullDataFetchVersion++,this._fetchingFullData.set(!1),this._fullDataMode.set(!1),this._dataFetchService.resetData(),this._tableService.destroy(),this._loadBuffer(this._bufferOffset(),!0),this._gridApi)try{this._gridApi.paginationGoToPage(0)}catch{}}_prefetchBuffer(t){var a=this;return(0,C.A)(function*(){if(a._prefetchCache.has(t)||a._currentlyPrefetching.has(t))return;const n=a._allKeys().slice(t,t+a._bufferSize());if(!n.length)return;a._currentlyPrefetching.add(t);const l=a._patchColumns(a.columns(),n).filter(c=>"data"===c.defType&&!c.hide&&c.query),d={},r=[],p={};try{yield $(l.map(c=>(0,C.A)(function*(){try{(yield a.handlers().queryHandler(c.query,w(c.query))).results.bindings.forEach(h=>{const y=h.subject?.value;if(!y)return;d[y]||(d[y]={}),d[y][c.field]||(d[y][c.field]=[]);const T={};Object.keys(h).filter(b=>"subject"!==b).forEach(b=>{T[b]=h[b]?.value}),d[y][c.field].push(T)}),r.push(c.field),p[c.field]=c.query}catch{}})),3),a._prefetchCache.set(t,{keyVals:d,fetchedColumnFields:r,columnQueries:p})}finally{a._currentlyPrefetching.delete(t)}})()}_patchColumns(t,a){return a.length?t.map(n=>n.query&&"data"===n.defType?{...n,query:te(n.query,a)}:n):t}_columnSelectSettings=Object.assign(new U.e,{allowEditing:!1});_shownColumns=(0,_.EW)(()=>this.columns().filter(t=>!t.hide));_openSettings(t,a){const n=this.columns().findIndex(o=>o.field===t.field);this._activeColumn.set({col:{...t},index:n})}_onShownChanged(t){const a=new Set(t.map(d=>d.field)),n=this.columns(),o=t.map(d=>({...n.find(p=>p.field===d.field)??d,hide:!1})),l=n.filter(d=>!a.has(d.field)).map(d=>({...d,hide:!0}));this.columns.set([...o,...l])}_applyColumnUpdate(t,a){const n=this.columns().map((o,l)=>l===t?Object.assign(Object.create(Object.getPrototypeOf(o)),o,a):o);this.columns.set(n)}_addColumn(){const t=this.columns();let a;if(t.length>0)a=t[t.length-1];else{const l=this.rowDefinition();a=Object.assign(new le,{query:l?this._seedQueryFromRowDef(l):"",strategy:{type:"first"}})}const n=Object.assign(Object.create(Object.getPrototypeOf(a)),a,{field:`column_${Date.now()}`,headerName:`${a.headerName??a.field??"Column"} Copy`,hide:!1}),o=t.length;this.columns.update(l=>[...l,n]),this._activeColumn.set({col:{...n},index:o})}_deleteColumn(t){this.columns.update(a=>a.filter(n=>n.field!==t))}_onRowDefSaved(){if(this.columns().length>0)return;this._showSettings.set(!0);const t=this.rowDefinition(),a=t?this._seedQueryFromRowDef(t):"",n=Object.assign(new le,{field:`column_${Date.now()}`,headerName:"Column 1",query:a,strategy:{type:"first"}});this.columns.set([n]),this._activeColumn.set({col:{...n},index:0})}_seedQueryFromRowDef(t){try{if(/qcy:FileContent\b/.test(t)){let n=t.replace(/SELECT\s+(?:DISTINCT\s+)?\?subject\b/i,"SELECT ?subject ?value");n=n.replace(/\s*ORDER\s+BY\s+[^\n{}]*/gi,""),/PREFIX\s+skos:/i.test(n)||(n=`PREFIX skos: <${Ce.B.skos}>\n`+n);const o=n.lastIndexOf("}");return-1!==o&&(n=n.slice(0,o)+" ?subject qcy:hasContentCategory ?cat .\n ?cat skos:prefLabel ?value .\n}"),n.trim()}{let n=t.replace(/SELECT\s+(?:DISTINCT\s+)?\?subject\b/i,"SELECT ?subject ?val");n=n.replace(/\s*ORDER\s+BY\s+[^\n{}]*/gi,"");const o=n.lastIndexOf("}");return-1!==o&&(n=n.slice(0,o)+" ?subject qcy:value ?val .\n}"),n.trim()}}catch{return t}}_getFormattedData(t=!1,a){const n=t?this.columns().filter(c=>"data"===c.defType&&c.query).map(c=>this._dataFetchService.columnDefsAG().find(h=>h.colId===c.field||h.field===c.field)??{colId:c.field,headerName:c.headerName??c.field,cellRendererParams:{strategy:c.strategy,postProcess:c.postProcess}}):this._dataFetchService.columnDefsAG().filter(c=>!c.hide),o=this._allKeys(),l=a?(o.length>0?o:Object.keys(a)).map(c=>({id:c,...a[c]??{}})):this._tableService.tableData(),d=["Key",...n.map(c=>c.headerName??c.field??"")],r=["",...n.map(c=>{const f=c.cellStyle;return f&&"object"==typeof f?String(f.textAlign??f["text-align"]??"").toLowerCase():""})];return{headers:d,rows:l.map(c=>[String(c.id??""),...n.map(f=>{const h=f.colId??f.field??"",y=f.valueGetter;let T="function"==typeof y?y({data:c,colDef:f}):c[h];if(void 0===T&&a&&(T=(a[c.id]??{})[h]??[]),Array.isArray(T)){const b=f.cellRendererParams?.strategy,M=f.cellRendererParams?.postProcess,S=b?E(T,b,""):T.map(D=>D?.val??"").filter(Boolean).join(", ");return(0,x.g4)(S,M)}return String(T??"")})]),alignments:r}}_fetchAllColumnsForExport(t){var a=this;return(0,C.A)(function*(){const n=a._allKeys();console.log("[EXPORT] _fetchAllColumnsForExport called for",t.length,"columns. allKeys=",n.length);const o=t.filter(r=>"data"===r.defType&&r.query);if(!o.length)return{};const l=n.length?a._patchColumns(o,n):o,d={};return yield $(l.map(r=>(0,C.A)(function*(){try{(yield a.handlers().queryHandler(r.query,w(r.query))).results.bindings.forEach(c=>{const f=c.subject?.value;if(!f)return;d[f]||(d[f]={}),d[f][r.field]||(d[f][r.field]=[]);const h={};Object.keys(c).filter(y=>"subject"!==y).forEach(y=>{h[y]=c[y]?.value}),d[f][r.field].push(h)})}catch{}})),3),d})()}_downloadCsv(){var t=this;return(0,C.A)(function*(a=!1){if(!t._exporting()){t._exporting.set(!0);try{const n=a?t.columns():t.columns().filter(c=>!c.hide),o=yield t._fetchAllColumnsForExport(n),{headers:l,rows:d}=t._getFormattedData(a,o),r=It.unparse([l,...d]),p=new Blob([r],{type:"text/csv;charset=utf-8;"});t._triggerDownload(p,"export.csv")}finally{t._exporting.set(!1)}}}).apply(this,arguments)}_downloadXlsx(){var t=this;return(0,C.A)(function*(a=!1){if(!t._exporting()){t._exporting.set(!0);try{const n=a?t.columns():t.columns().filter(c=>!c.hide),o=yield t._fetchAllColumnsForExport(n),{headers:l,rows:d,alignments:r}=t._getFormattedData(a,o),p=yield t._buildStyledXlsxBlob(l,d,r);t._triggerDownload(p,"export.xlsx")}finally{t._exporting.set(!1)}}}).apply(this,arguments)}_buildStyledXlsxBlob(t,a,n){return(0,C.A)(function*(){const d=(D,v)=>D?"center"===v?2:"right"===v?3:1:"center"===v?4:"right"===v?5:0,r=(D,v,R,P)=>{const I=`${(D=>{let v="",R=D+1;for(;R>0;)v=String.fromCharCode(65+(R-1)%26)+v,R=Math.floor((R-1)/26);return v})(D)}${v}`,F=P>0?` s="${P}"`:"",ne=Number(R);return 0===P&&""!==R&&!isNaN(ne)&&isFinite(ne)?`<c r="${I}"${F}><v>${ne}</v></c>`:`<c r="${I}"${F} t="inlineStr"><is><t>${(D=>D.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"))(R)}</t></is></c>`},p=[];p.push(`<row r="1">${t.map((D,v)=>r(v,1,D,d(!0,n[v]??""))).join("")}</row>`),a.forEach((D,v)=>{p.push(`<row r="${v+2}">${D.map((R,P)=>r(P,v+2,R,d(!1,n[P]??""))).join("")}</row>`)});const c=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">\n <cols><col min="1" max="1" hidden="1"/></cols>\n <sheetData>${p.join("")}</sheetData>\n</worksheet>`,S=new(0,(yield g.e(628).then(g.t.bind(g,7247,23))).default);return S.file("[Content_Types].xml",'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types">\n <Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/>\n <Default Extension="xml" ContentType="application/xml"/>\n <Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/>\n <Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/>\n <Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/>\n</Types>'),S.file("_rels/.rels",'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">\n <Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/>\n</Relationships>'),S.file("xl/workbook.xml",'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships">\n <sheets><sheet name="Data" sheetId="1" r:id="rId1"/></sheets>\n</workbook>'),S.file("xl/_rels/workbook.xml.rels",'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">\n <Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/>\n <Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/>\n</Relationships>'),S.file("xl/worksheets/sheet1.xml",c),S.file("xl/styles.xml",'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>\n<styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">\n <fonts count="2">\n <font><sz val="11"/><name val="Calibri"/></font>\n <font><b/><color rgb="FFFFFFFF"/><sz val="11"/><name val="Poppins"/></font>\n </fonts>\n <fills count="3">\n <fill><patternFill patternType="none"/></fill>\n <fill><patternFill patternType="gray125"/></fill>\n <fill><patternFill patternType="solid"><fgColor rgb="FF2859E1"/><bgColor indexed="64"/></patternFill></fill>\n </fills>\n <borders count="1">\n <border><left/><right/><top/><bottom/><diagonal/></border>\n </borders>\n <cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs>\n <cellXfs count="6">\n <xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/>\n <xf numFmtId="0" fontId="1" fillId="2" borderId="0" xfId="0" applyFont="1" applyFill="1"/>\n <xf numFmtId="0" fontId="1" fillId="2" borderId="0" xfId="0" applyFont="1" applyFill="1" applyAlignment="1"><alignment horizontal="center"/></xf>\n <xf numFmtId="0" fontId="1" fillId="2" borderId="0" xfId="0" applyFont="1" applyFill="1" applyAlignment="1"><alignment horizontal="right"/></xf>\n <xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0" applyAlignment="1"><alignment horizontal="center"/></xf>\n <xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0" applyAlignment="1"><alignment horizontal="right"/></xf>\n </cellXfs>\n</styleSheet>'),S.generateAsync({type:"blob",mimeType:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"})})()}_triggerDownload(t,a){const n=URL.createObjectURL(t),o=document.createElement("a");o.href=n,o.download=a,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(n)}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=e.VBU({type:i,selectors:[["cue-declarative-sparql-table"]],inputs:{columns:[1,"columns"],handlers:[1,"handlers"],rowDefinitionHandlers:[1,"rowDefinitionHandlers"],rowDefinition:[1,"rowDefinition"],pageSize:[1,"pageSize"],bufferFactor:[1,"bufferFactor"]},outputs:{visibleRows:"visibleRows",columnDefsAG:"columnDefsAG",columns:"columnsChange",rowDefinition:"rowDefinitionChange"},features:[e.Jv_([V,W])],decls:39,vars:26,consts:[[1,"flip-card",3,"cueFlipChange","cueFlip"],[1,"flip-content"],[1,"card-face","front"],["direction","row","justify","end",2,"padding","2px"],["positioning","bottomleft"],["trigger","","variant","tertiary","size","s","cueTooltip","Export",3,"disabled"],["icon","more-vert"],["menu",""],[3,"click","disabled"],["before","","name","download"],["variant","accent","size","s","cueTooltip","Column settings",3,"click"],["icon","settings"],[3,"gridApi","visibleRows","columnDefsAG","handlers","columns","showPaginator","paginationPageSize","loading"],[1,"query-status"],[1,"row-def-empty"],[3,"size","pageSize"],[1,"card-face","back",2,"min-height","var(--cue-table-m-height)",3,"maxHeight"],["variant","tertiary","size","s",3,"click","cueTooltip"],["icon","filter"],["variant","accent","size","s","cueTooltip","Back to table",3,"click"],["icon","arrow-back"],[3,"shown","columnDefs","columnDefsGross","settings"],["cueColumnItem",""],["cueColumnListFooter",""],[3,"columnDef","handlers","columns"],[3,"rowDefinitionQuery","handlers"],[1,"query-status-spinner"],[1,"row-def-empty",3,"click"],["size","s","color","muted"],[3,"currentPage","size","pageSize"],["variant","tertiary","size","s","cueTooltip","Edit column",3,"click"],["variant","tertiary","size","s","cueTooltip","Delete column",3,"click"],["icon","delete"],["cueTooltip","Add column definition",1,"add-column-row",3,"click"],["icon","add"],[3,"columnDefChange","close","updateColumnDef","columnDef","handlers","columns"],[3,"rowDefinitionQueryChange","saved","close","rowDefinitionQuery","handlers"]],template:function(a,n){if(1&a&&(e.j41(0,"div",0),e.mxI("cueFlipChange",function(l){return e.DH7(n._showSettings,l)||(n._showSettings=l),l}),e.j41(1,"div",1)(2,"cue-card",2)(3,"cue-flexcontainer",3)(4,"cue-menu",4)(5,"cue-button",5),e.nrm(6,"cue-button-icon",6),e.k0s(),e.j41(7,"cue-menu-wrap",7)(8,"cue-menu-item",8),e.bIt("click",function(){return n._downloadCsv()}),e.nrm(9,"cue-svg-icon",9),e.EFF(10," Download CSV "),e.k0s(),e.j41(11,"cue-menu-item",8),e.bIt("click",function(){return n._downloadCsv(!0)}),e.nrm(12,"cue-svg-icon",9),e.EFF(13," Download CSV (incl. hidden columns) "),e.k0s(),e.j41(14,"cue-menu-item",8),e.bIt("click",function(){return n._downloadXlsx()}),e.nrm(15,"cue-svg-icon",9),e.EFF(16," Download XLSX "),e.k0s(),e.j41(17,"cue-menu-item",8),e.bIt("click",function(){return n._downloadXlsx(!0)}),e.nrm(18,"cue-svg-icon",9),e.EFF(19," Download XLSX (incl. hidden columns) "),e.k0s()()(),e.j41(20,"cue-button",10),e.bIt("click",function(){return n._showSettings.set(!0)}),e.nrm(21,"cue-button-icon",11),e.k0s()(),e.j41(22,"cue-sparql-table-inner",12),e.bIt("gridApi",function(l){return n._onGridApi(l)})("visibleRows",function(l){return n.visibleRows.emit(l)})("columnDefsAG",function(l){return n.columnDefsAG.emit(l)}),e.k0s(),e.nVh(23,Lt,3,2,"div",13),e.nVh(24,Gt,3,0,"div",13),e.nVh(25,Vt,4,3,"div",14),e.nVh(26,Qt,1,2,"cue-paginator",15),e.k0s(),e.j41(27,"cue-card",16)(28,"cue-flexcontainer",3)(29,"cue-button",17),e.nI1(30,"transloco"),e.bIt("click",function(){return n._openRowDefModal()}),e.nrm(31,"cue-button-icon",18),e.k0s(),e.j41(32,"cue-button",19),e.bIt("click",function(){return n._showSettings.set(!1)}),e.nrm(33,"cue-button-icon",20),e.k0s()(),e.j41(34,"cue-ag-grid-column-select",21),e.bIt("shown",function(l){return n._onShownChanged(l)}),e.DNE(35,Ot,4,0,"ng-template",22)(36,$t,2,0,"ng-template",23),e.k0s()()()(),e.nVh(37,Bt,1,3,"cue-declarative-sparql-column-settings-modal",24),e.nVh(38,Xt,1,2,"cue-sparql-row-definition-modal",25)),2&a){let o,l;e.R50("cueFlip",n._showSettings),e.R7$(5),e.Y8G("disabled",n._exporting()),e.R7$(3),e.Y8G("disabled",n._exporting()),e.R7$(3),e.Y8G("disabled",n._exporting()),e.R7$(3),e.Y8G("disabled",n._exporting()),e.R7$(3),e.Y8G("disabled",n._exporting()),e.R7$(5),e.AVh("hidden",n._showSettings()||n._noRowDef()),e.Y8G("handlers",n._handlers())("columns",n._displayColumns())("showPaginator",n._fullDataMode())("paginationPageSize",n.pageSize())("loading",n._rowDefLoading()),e.R7$(),e.vxM((o=n._queryProgress())?23:-1,o),e.R7$(),e.vxM(n._exporting()?24:-1),e.R7$(),e.vxM(n._noRowDef()?25:-1),e.R7$(),e.vxM(n.rowDefinition()&&!n._fullDataMode()?26:-1),e.R7$(),e.Y8G("maxHeight","var(--cue-table-m-height)"),e.R7$(2),e.Y8G("cueTooltip",e.bMT(30,24,"components.sparqlTable.rowDefinitionTooltip")),e.R7$(5),e.Y8G("columnDefs",n._shownColumns())("columnDefsGross",n.columns())("settings",n._columnSelectSettings),e.R7$(3),e.vxM((l=n._activeColumn())?37:-1,l),e.R7$(),e.vxM(n._showRowDefModal()?38:-1)}},dependencies:[Ge,vt,qt,J.pL,J.pC,J.rx,Dt.Z,q.n,k.Typography,Y.$,_e.a,Tt.R,re.d,Ct.W,St.M,Mt.D,Rt.A,Pt.m,Q.Kj],styles:[".flip-card[_ngcontent-%COMP%]{width:100%}.flip-content[_ngcontent-%COMP%]{position:relative;width:100%}.card-face[_ngcontent-%COMP%]{width:100%}.hidden[_ngcontent-%COMP%]{display:none}.row-def-empty[_ngcontent-%COMP%]{flex:1;min-height:160px;display:flex;align-items:center;justify-content:center;padding:32px 16px;border:2px dashed var(--cue-color-border, #d1d5db);border-radius:8px;cursor:pointer;margin-top:8px;transition:border-color .15s}.row-def-empty[_ngcontent-%COMP%]:hover{border-color:var(--cue-color-accent, #4f46e5)}.query-status[_ngcontent-%COMP%]{display:flex;align-items:center;gap:8px;padding:6px 10px;font-size:12px;color:var(--cue-color-text-muted, #6b7280);background:var(--cue-color-surface-subtle, #f9fafb);border:1px solid var(--cue-color-border, #e5e7eb);border-radius:6px;margin-top:6px}@keyframes _ngcontent-%COMP%_spin{to{transform:rotate(360deg)}}.query-status-spinner[_ngcontent-%COMP%]{display:inline-block;width:11px;height:11px;border:2px solid currentColor;border-top-color:transparent;border-radius:50%;animation:_ngcontent-%COMP%_spin .7s linear infinite;flex-shrink:0}.add-column-row[_ngcontent-%COMP%]{padding:20px 10px;border-top:solid 1px #ccc;display:flex;align-items:center;justify-content:center;opacity:.4;cursor:pointer;transition:opacity .15s ease}.add-column-row[_ngcontent-%COMP%]:hover{opacity:.75}"],changeDetection:0})}return i})();var Ut=g(7293);function Ht(i,u){if(1&i){const t=e.RV6();e.j41(0,"cue-declarative-sparql-table",3),e.mxI("columnsChange",function(n){s.eBV(t);const o=e.XpG();return e.DH7(o.columns,n)||(o.columns=n),s.Njj(n)})("rowDefinitionChange",function(n){s.eBV(t);const o=e.XpG();return e.DH7(o.rowDefinition,n)||(o.rowDefinition=n),s.Njj(n)}),e.bIt("visibleRows",function(n){s.eBV(t);const o=e.XpG();return s.Njj(o.visibleRows.emit(n))})("columnDefsAG",function(n){s.eBV(t);const o=e.XpG();return s.Njj(o.columnDefsAG.emit(n))}),e.k0s()}if(2&i){const t=e.XpG();e.Y8G("handlers",u)("rowDefinitionHandlers",t._rowDefinitionHandlers()),e.R50("columns",t.columns)("rowDefinition",t.rowDefinition),e.Y8G("pageSize",t.pageSize())("bufferFactor",t.bufferFactor())}}function Jt(i,u){1&i&&(e.j41(0,"cue-flexcontainer",1)(1,"cue-typography",4),e.EFF(2," No project connected. Pass a sdkState with cue and projectId. "),e.k0s()())}function Zt(i,u){if(1&i&&e.nrm(0,"cue-logo-link",2),2&i){let t;const a=e.XpG();e.Y8G("projectId",null==(t=a.sdkState())?null:t.projectId)}}let en=(()=>{class i{sdkState=(0,m.hFB)(void 0);columns=m.geq.required();rowDefinition=(0,m.geq)(K);pageSize=(0,m.hFB)(10,{transform:m.Udg});showLogo=(0,m.hFB)(!1,{transform:m.L39});bufferFactor=(0,m.hFB)(5,{transform:m.Udg});visibleRows=(0,m.CGW)();columnDefsAG=(0,m.CGW)();_entities=(0,s.vPA)(void 0);_documents=(0,s.vPA)(void 0);_handlers=(0,_.EW)(()=>{const t=this.sdkState();if(!t)return;const{cue:a,projectId:n,graphType:o="fuseki"}=t;return{queryHandler:l=>a.api.sparql(l,n,o)}});_rowDefinitionHandlers=(0,_.EW)(()=>{const t=this._entities(),a=this._documents();if(t&&a)return{contentCategoriesInProject:()=>t.contentCategoriesInProject(),randomFilePath:()=>a.randomFilePath()}});constructor(){(0,s.QZP)(()=>{const t=this.sdkState();t?.cue&&t?.projectId?(this._entities.set(new L.g8(t.cue.api,t.projectId)),this._documents.set(new L.f$(t.cue.api,t.projectId))):(this._entities.set(void 0),this._documents.set(void 0))})}static \u0275fac=function(a){return new(a||i)};static \u0275cmp=e.VBU({type:i,selectors:[["cue-sparql-table"]],inputs:{sdkState:[1,"sdkState"],columns:[1,"columns"],rowDefinition:[1,"rowDefinition"],pageSize:[1,"pageSize"],showLogo:[1,"showLogo"],bufferFactor:[1,"bufferFactor"]},outputs:{columns:"columnsChange",rowDefinition:"rowDefinitionChange",visibleRows:"visibleRows",columnDefsAG:"columnDefsAG"},decls:3,vars:2,consts:[[3,"handlers","rowDefinitionHandlers","columns","rowDefinition","pageSize","bufferFactor"],["direction","column","align","center","justify","center",2,"height","100%","width","100%","padding","8px"],[2,"position","absolute","top","26px","left","26px","z-index","5",3,"projectId"],[3,"columnsChange","rowDefinitionChange","visibleRows","columnDefsAG","handlers","rowDefinitionHandlers","columns","rowDefinition","pageSize","bufferFactor"],[2,"color","#9ca3af","font-size","13px"]],template:function(a,n){if(1&a&&(e.nVh(0,Ht,1,6,"cue-declarative-sparql-table",0)(1,Jt,3,0,"cue-flexcontainer",1),e.nVh(2,Zt,1,1,"cue-logo-link",2)),2&a){let o;e.vxM((o=n._handlers())?0:1,o),e.R7$(2),e.vxM(n.showLogo()?2:-1)}},dependencies:[Yt,q.n,k.Typography,Ut.x],styles:["[_nghost-%COMP%]{display:block;width:100%;position:relative}"],changeDetection:0})}return i})()},7573(ae,N,g){g.d(N,{E:()=>m});const m={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#"}}}]);
package/740.js DELETED
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[740],{5740(O,m,l){l.d(m,{EmailViewer:()=>R});var _=l(467),d=l(7705),r=l(5802),p=l(345),f=l(9769),u=l(2245),e=l(5547);const g=(t,i)=>i.name;function h(t,i){if(1&t&&(e.j41(0,"div",5)(1,"span",11),e.EFF(2,"From"),e.k0s(),e.j41(3,"cue-typography",12),e.EFF(4),e.k0s()()),2&t){const n=e.XpG(2);e.R7$(4),e.JRh(n.from())}}function x(t,i){if(1&t&&(e.j41(0,"div",5)(1,"span",11),e.EFF(2,"To"),e.k0s(),e.j41(3,"cue-typography",12),e.EFF(4),e.k0s()()),2&t){const n=e.XpG(2);e.R7$(4),e.JRh(n.to())}}function v(t,i){if(1&t&&(e.j41(0,"div",5)(1,"span",11),e.EFF(2,"Cc"),e.k0s(),e.j41(3,"cue-typography",12),e.EFF(4),e.k0s()()),2&t){const n=e.XpG(2);e.R7$(4),e.JRh(n.cc())}}function y(t,i){if(1&t&&(e.j41(0,"div",5)(1,"span",11),e.EFF(2,"Date"),e.k0s(),e.j41(3,"cue-typography",12),e.EFF(4),e.k0s()()),2&t){const n=e.XpG(2);e.R7$(4),e.JRh(n.date())}}function E(t,i){if(1&t&&(e.j41(0,"span",13),e.EFF(1),e.k0s()),2&t){const n=e.XpG().$implicit;e.R7$(),e.SpI("\u{1f4ce} ",n.filename??n.name)}}function C(t,i){1&t&&e.nVh(0,E,2,1,"span",13),2&t&&e.vxM(i.$implicit.inline?-1:0)}function M(t,i){if(1&t&&(e.j41(0,"div",6)(1,"span",11),e.EFF(2,"Attachments"),e.k0s(),e.Z7z(3,C,1,1,null,null,g),e.k0s()),2&t){const n=e.XpG();e.R7$(3),e.Dyx(n.attachments)}}function b(t,i){if(1&t&&e.nrm(0,"iframe",8),2&t){const n=e.XpG(2);e.Y8G("srcdoc",n.safeHtml(),e.npT)}}function w(t,i){if(1&t&&(e.j41(0,"pre",9),e.EFF(1),e.k0s()),2&t){const n=e.XpG();e.R7$(),e.JRh(n.text)}}function F(t,i){1&t&&(e.j41(0,"cue-typography",10),e.EFF(1,"(No body)"),e.k0s())}function P(t,i){if(1&t&&(e.j41(0,"div",0)(1,"div",1)(2,"div",2)(3,"cue-typography",3),e.EFF(4),e.k0s()(),e.j41(5,"div",4),e.nVh(6,h,5,1,"div",5),e.nVh(7,x,5,1,"div",5),e.nVh(8,v,5,1,"div",5),e.nVh(9,y,5,1,"div",5),e.k0s(),e.nVh(10,M,5,0,"div",6),e.k0s(),e.j41(11,"div",7),e.nVh(12,b,1,1,"iframe",8)(13,w,2,1,"pre",9)(14,F,2,0,"cue-typography",10),e.k0s()()),2&t){const n=i,a=e.XpG();e.R7$(4),e.JRh(n.subject??"(No subject)"),e.R7$(2),e.vxM(a.from()?6:-1),e.R7$(),e.vxM(a.to()?7:-1),e.R7$(),e.vxM(a.cc()?8:-1),e.R7$(),e.vxM(a.date()?9:-1),e.R7$(),e.vxM(null!=n.attachments&&n.attachments.length?10:-1),e.R7$(2),e.vxM(a.safeHtml()?12:n.text?13:14)}}function s(t){return t?(Array.isArray(t)?t:[t]).map(n=>n.name?`${n.name} <${n.email??""}>`:n.email??"").join(", "):""}let R=(()=>{class t{_sanitizer=(0,r.WQX)(p.up);fileURL=d.hFB.required();email=(0,r.vPA)(null);safeHtml=(0,r.vPA)(null);from=(0,r.vPA)("");to=(0,r.vPA)("");cc=(0,r.vPA)("");date=(0,r.vPA)("");onFile=(0,r.QZP)((()=>{var n=this;return(0,_.A)(function*(){const a=n.fileURL();n.email.set(null),n.safeHtml.set(null);try{const o=yield(yield fetch(a)).json();n.email.set(o),n.from.set(s(o.from)),n.to.set(s(o.to)),n.cc.set(s(o.cc)),n.date.set(function D(t){if(!t)return"";try{return new Date(t).toLocaleString()}catch{return String(t)}}(o.date)),o.html&&n.safeHtml.set(n._sanitizer.bypassSecurityTrustHtml(o.html))}catch(c){console.error("[EmailViewer] Failed to load email data:",c)}})})());static \u0275fac=function(a){return new(a||t)};static \u0275cmp=e.VBU({type:t,selectors:[["cue-email-viewer"]],inputs:{fileURL:[1,"fileURL"]},decls:1,vars:1,consts:[[1,"email-viewer"],[1,"email-header"],[1,"subject"],["size","l","weight","semibold"],[1,"meta"],[1,"meta-row"],[1,"attachments"],[1,"email-body"],["sandbox","allow-same-origin","title","Email body",1,"email-iframe",3,"srcdoc"],[1,"email-text"],[2,"opacity","0.5"],[1,"meta-label"],["size","s"],[1,"attachment-chip"]],template:function(a,c){if(1&a&&e.nVh(0,P,15,7,"div",0),2&a){let o;e.vxM((o=c.email())?0:-1,o)}},dependencies:[f.MD,u.Typography],styles:["[_nghost-%COMP%]{display:block;height:100%;overflow:hidden}.email-viewer[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;overflow:hidden}.email-header[_ngcontent-%COMP%]{flex:0 0 auto;padding:16px 20px;border-bottom:1px solid var(--cue-border-color, #e5e7eb);background:var(--cue-surface-color, transparent)}.subject[_ngcontent-%COMP%]{margin-bottom:12px}.meta[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;margin-bottom:8px}.meta-row[_ngcontent-%COMP%]{display:flex;align-items:baseline;gap:8px}.meta-label[_ngcontent-%COMP%]{font-family:var(--cue-font-family, sans-serif);font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;opacity:.5;min-width:52px;flex:0 0 auto}.attachments[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-top:8px}.attachment-chip[_ngcontent-%COMP%]{font-family:var(--cue-font-family, sans-serif);font-size:12px;padding:2px 8px;border-radius:12px;background:var(--cue-border-color, #e5e7eb);color:var(--cue-main-foreground, #111)}.email-body[_ngcontent-%COMP%]{flex:1 1 auto;overflow:hidden;min-height:0}.email-iframe[_ngcontent-%COMP%]{width:100%;height:100%;border:none;display:block}.email-text[_ngcontent-%COMP%]{padding:20px;margin:0;font-family:var(--cue-font-family, sans-serif);font-size:14px;line-height:1.6;white-space:pre-wrap;word-break:break-word;height:100%;box-sizing:border-box;overflow:auto}"],changeDetection:0})}return t})()}}]);
package/773.js DELETED
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[773],{5903(j,O,r){r.d(O,{L:()=>Ae});var s=r(7705),a=r(5802),p=r(2271),E=r(4853),F=r(9495),c=r(467),f=r(9352),R=r(5745),C=r(5381),D=r(5971),b=r(2245),w=r(9421),y=r(8957),V=r(5448),z=r(2444),_=r(9417),M=r(7374),d=r.n(M),h=r(3319),e=r(5547);const H=(o,u)=>u.date;function $(o,u){if(1&o&&(e.j41(0,"cue-typography",11),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&o){const t=u.$implicit,i=e.XpG();e.Y8G("size",i.size()),e.R7$(),e.JRh(e.bMT(2,2,t))}}function X(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-button",13),e.bIt("click",function(){const n=a.eBV(t).$implicit,l=e.XpG();return a.Njj(l.selectDay(n))}),e.j41(1,"cue-button-label"),e.EFF(2),e.k0s()()}if(2&o){const t=u.$implicit,i=e.XpG();e.AVh("other-month",!t.isCurrentMonth)("today",t.isToday),e.Y8G("selected",t.isSelected)("size",i.size()),e.R7$(2),e.JRh(t.day)}}let L=(()=>{class o{date=s.geq.required();size=(0,s.hFB)("m");weekdays=["mon","tue","wed","thu","fri","sat","sun"].map(t=>`common.weekdaysShort.${t}`);yearOptions=Array.from({length:101},(t,i)=>(d()().year()-50+i).toString()).reverse();monthOptions=Array.from({length:12},(t,i)=>(i+1).toString());chevronSize=(0,p.EW)(()=>{const t=this.size();return"l"===t?"m":"m"===t?"s":"s"===t?"xs":"s"});monthLabels={1:"January",2:"February",3:"March",4:"April",5:"May",6:"June",7:"July",8:"August",9:"September",10:"October",11:"November",12:"December"};today=(0,p.EW)(()=>d()().format("YYYY-MM-DD"));calendarDays=(0,p.EW)(()=>{const t=this.year(),i=this.month(),n=d()(this.date()),l=this.today(),g=d()(`${t}-${i}-01`),m=g.endOf("month"),x=0===g.day()?g.subtract(6,"day"):g.subtract(g.day()-1,"day"),k=0===m.day()?m:m.add(7-m.day(),"day"),P=[];let v=x;for(;v.isBefore(k)||v.isSame(k);){const A=v.format("YYYY-MM-DD");P.push({date:A,day:v.date(),isCurrentMonth:v.month()+1===i,isSelected:v.isSame(n,"day"),isToday:A===l,dayjs:v}),v=v.add(1,"day")}return P});jsDate=(0,p.EW)(()=>d()(this.date()));year=(0,p.uu)(()=>this.jsDate().year());month=(0,p.uu)(()=>this.jsDate().month()+1);day=(0,p.uu)(()=>this.jsDate().date());updateDate(){const t=d()(new Date(this.year(),this.month()-1,this.day())).format("YYYY-MM-DD");this.date.set(t)}navigateMonth(t="next"){const i=d()(this.date()),n="next"===t?i.add(1,"month"):i.subtract(1,"month");this.date.set(n.format("YYYY-MM-DD"))}navigateYear(t="next"){const i=d()(this.date()),n="next"===t?i.add(1,"year"):i.subtract(1,"year");this.date.set(n.format("YYYY-MM-DD"))}selectDay(t){this.date.set(t.date),t.isCurrentMonth||(this.year.set(t.dayjs.year()),this.month.set(t.dayjs.month()+1))}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-datepicker"]],inputs:{date:[1,"date"],size:[1,"size"]},outputs:{date:"dateChange"},decls:17,vars:10,consts:[["direction","column"],["gap","m","justify","center","align","center",2,"width","100%"],["variant","ghost",3,"size"],["icon","paginator-first",3,"click"],["icon","paginator-back",3,"click"],["justify","center",2,"width","200px"],["label","Month",3,"valueChange","size","options","labelMap","value"],["label","Year",3,"valueChange","size","options","value"],["icon","paginator-next",3,"click"],["icon","paginator-last",3,"click"],[1,"calendar-grid"],[3,"size"],["variant","ghost",3,"other-month","today","selected","size"],["variant","ghost",3,"click","selected","size"]],template:function(i,n){1&i&&(e.j41(0,"cue-flexcontainer",0)(1,"cue-flexcontainer",1)(2,"cue-button",2)(3,"cue-button-icon",3),e.bIt("click",function(){return n.navigateYear("prev")}),e.k0s(),e.j41(4,"cue-button-icon",4),e.bIt("click",function(){return n.navigateMonth("prev")}),e.k0s()(),e.j41(5,"cue-flexcontainer",5)(6,"cue-select",6),e.mxI("valueChange",function(g){return e.DH7(n.month,g)||(n.month=g),g}),e.bIt("valueChange",function(){return n.updateDate()}),e.k0s(),e.j41(7,"cue-select",7),e.mxI("valueChange",function(g){return e.DH7(n.year,g)||(n.year=g),g}),e.bIt("valueChange",function(){return n.updateDate()}),e.k0s()(),e.j41(8,"cue-button",2)(9,"cue-button-icon",8),e.bIt("click",function(){return n.navigateMonth("next")}),e.k0s()(),e.j41(10,"cue-button",2)(11,"cue-button-icon",9),e.bIt("click",function(){return n.navigateYear("next")}),e.k0s()()(),e.j41(12,"div",10),e.Z7z(13,$,3,4,"cue-typography",11,e.Vm6),e.Z7z(15,X,3,7,"cue-button",12,H),e.k0s()()),2&i&&(e.R7$(2),e.Y8G("size",n.chevronSize()),e.R7$(4),e.Y8G("size",n.size())("options",n.monthOptions)("labelMap",n.monthLabels),e.R50("value",n.month),e.R7$(),e.Y8G("size",n.size())("options",n.yearOptions),e.R50("value",n.year),e.R7$(),e.Y8G("size",n.chevronSize()),e.R7$(2),e.Y8G("size",n.chevronSize()),e.R7$(3),e.Dyx(n.weekdays),e.R7$(2),e.Dyx(n.calendarDays()))},dependencies:[C.n,z.l,D.$,V.L,b.Typography,h.a,f.Kj],styles:[".calendar-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(7,1fr);gap:2px;margin-top:12px}.other-month[_ngcontent-%COMP%]{opacity:.4}"],changeDetection:0})}return o})();var W=r(7023),K=r(5187);const Q=["inputField"];function J(o,u){1&o&&e.EFF(0," * ")}function Z(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-card",8)(1,"cue-datepicker",9),e.mxI("dateChange",function(n){a.eBV(t);const l=e.XpG();return e.DH7(l.internalDateValue,n)||(l.internalDateValue=n),a.Njj(n)}),e.bIt("dateChange",function(n){a.eBV(t);const l=e.XpG();return a.Njj(l.onDateChange(n))})("click",function(n){return n.stopPropagation()}),e.k0s()()}if(2&o){const t=e.XpG();e.R7$(),e.R50("date",t.internalDateValue)}}function U(o,u){if(1&o&&(e.j41(0,"cue-typography",7),e.EFF(1),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.JRh(t.error())}}let q=(()=>{class o{value=(0,s.geq)("");label=(0,s.hFB)("");placeholder=(0,s.hFB)("");error=(0,s.hFB)(void 0);required=(0,s.hFB)(!1);size=(0,s.hFB)("m");datePickerPositioning=(0,s.hFB)(void 0);isFocused=!1;disabled=!1;iconSize=(0,p.EW)(()=>{switch(this.size()){case"l":return"m";case"m":default:return"s";case"s":case"xs":return"xs"}});contextMenuRef=null;inputField;internalDateValue=(0,p.uu)(()=>{const t=this.value();if(t){if(d()(t,"YYYY-MM-DD",!0).isValid())return t;const i=d()(t);return i.isValid()?i.format("YYYY-MM-DD"):d()().format("YYYY-MM-DD")}return d()().format("YYYY-MM-DD")});formattedDateValue=(0,p.EW)(()=>{const t=this.value();if(t){const i=d()(t);return i.isValid()?i.format("MMM D, YYYY"):t}return""});onValueChange=(0,a.QZP)(()=>this.valueChange.emit(this.value()));valueChange=(0,s.CGW)();onChange=t=>{};onTouched=()=>{};writeValue(t){this.value.set(t||"")}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t}emitValue(t){const i=t.target.value;this.value.set(i),this.onChange(i)}focus(){this.isFocused=!0,this.inputField?.nativeElement&&this.inputField.nativeElement.focus()}onBlur(){this.isFocused=!1,this.onTouched()}onDateChange(t){this.value.set(t),this.onChange(t)}onDatePickerOpen(t){this.contextMenuRef=t}onDatePickerClose(){this.contextMenuRef=null}closeDatePicker(){this.contextMenuRef&&document.dispatchEvent(new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window}))}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-input-date"]],viewQuery:function(i,n){if(1&i&&e.GBs(Q,5),2&i){let l;e.mGM(l=e.lsd())&&(n.inputField=l.first)}},inputs:{value:[1,"value"],label:[1,"label"],placeholder:[1,"placeholder"],error:[1,"error"],required:[1,"required"],size:[1,"size"],datePickerPositioning:[1,"datePickerPositioning"]},outputs:{value:"valueChange",valueChange:"valueChange"},features:[e.Jv_([{provide:_.kq,useExisting:(0,a.Rfq)(()=>o),multi:!0}])],decls:11,vars:15,consts:[["inputField",""],["datePickerTemplate",""],[1,"form-field"],["size","s",1,"label"],["type","text","readonly","","trigger","leftclick",1,"input",3,"focus","blur","contextMenuOpen","contextMenuClose","value","placeholder","disabled","cueContextMenu","positioning"],["variant","ghost","trigger","leftclick",1,"calendar-button",3,"size","cueContextMenu","positioning"],["icon","calendar"],["size","s",1,"error-text"],[1,"date-picker-overlay","clickoutside-ignore"],["size","s",1,"clickoutside-ignore",3,"dateChange","click","date"]],template:function(i,n){if(1&i&&(e.j41(0,"div",2)(1,"cue-typography",3),e.EFF(2),e.nVh(3,J,1,0),e.k0s(),e.j41(4,"input",4,0),e.bIt("focus",function(){return n.isFocused=!0})("blur",function(){return n.onBlur()})("contextMenuOpen",function(g){return n.onDatePickerOpen(g)})("contextMenuClose",function(){return n.onDatePickerClose()}),e.k0s(),e.j41(6,"cue-button",5),e.nrm(7,"cue-button-icon",6),e.k0s(),e.DNE(8,Z,2,1,"ng-template",null,1,e.C5r),e.nVh(10,U,2,1,"cue-typography",7),e.k0s()),2&i){const l=e.sdS(9);e.HbH("size-"+n.size()),e.AVh("focused",n.isFocused||n.value()),e.R7$(2),e.SpI(" ",n.label()," "),e.R7$(),e.vxM(n.required()?3:-1),e.R7$(),e.Y8G("value",n.formattedDateValue())("placeholder",n.placeholder())("disabled",n.disabled)("cueContextMenu",l)("positioning",n.datePickerPositioning()??"bottomright"),e.R7$(2),e.Y8G("size",n.iconSize())("cueContextMenu",l)("positioning",n.datePickerPositioning()??"bottomright"),e.R7$(4),e.vxM(n.error()?10:-1)}},dependencies:[b.Typography,L,W.Q,K.Z,h.a,D.$],styles:['.form-field[_ngcontent-%COMP%]{position:relative}.input[_ngcontent-%COMP%]{color:var(--cue-input-value-color);width:100%;border:none;border-bottom:1px solid var(--cue-input-border-bottom-color);background:none;outline:none;font-family:var(--cue-font-family)}.size-xs[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]{padding:var(--cue-input-xs-padding);font-size:var(--cue-input-xs-font-size)}.size-s[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]{padding:var(--cue-input-s-padding);font-size:var(--cue-input-s-font-size)}.size-m[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]{padding:var(--cue-input-m-padding);font-size:var(--cue-input-m-font-size)}.size-l[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]{padding:var(--cue-input-l-padding);font-size:var(--cue-input-l-font-size)}.input[_ngcontent-%COMP%]::placeholder{color:var(--cue-input-placeholder-color);font-family:var(--cue-font-family)}.input[_ngcontent-%COMP%]:-webkit-autofill, .input[_ngcontent-%COMP%]:-webkit-autofill:hover, .input[_ngcontent-%COMP%]:-webkit-autofill:focus{-webkit-box-shadow:0 0 0px 1000px transparent inset;-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s;-webkit-text-fill-color:var(--cue-input-value-color)}.label[_ngcontent-%COMP%]{position:absolute;pointer-events:none;transition:all .2s ease}.size-xs[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-xs-label-top);left:var(--cue-input-xs-label-left)}.size-s[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-s-label-top);left:var(--cue-input-s-label-left)}.size-m[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-m-label-top);left:var(--cue-input-m-label-left)}.size-l[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-l-label-top);left:var(--cue-input-l-label-left)}.form-field.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .form-field[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .form-field[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{color:var(--cue-input-value-color)}.size-xs.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-xs[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-xs[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{top:var(--cue-input-xs-label-focused-top);font-size:var(--cue-input-xs-label-focused-font-size)}.size-s.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-s[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-s[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{top:var(--cue-input-s-label-focused-top);font-size:var(--cue-input-s-label-focused-font-size)}.size-m.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-m[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-m[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{top:var(--cue-input-m-label-focused-top);font-size:var(--cue-input-m-label-focused-font-size)}.size-l.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-l[_ngcontent-%COMP%] .input[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-l[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{top:var(--cue-input-l-label-focused-top);font-size:var(--cue-input-l-label-focused-font-size)}.underline[_ngcontent-%COMP%]{content:"";position:absolute;bottom:0;left:0;height:1px;width:0;background-color:var(--cue-input-border-bottom-color);transition:width .3s ease}.form-field.focused[_ngcontent-%COMP%] .underline[_ngcontent-%COMP%]{width:100%}.error-text[_ngcontent-%COMP%]{color:var(--cue-error);margin-top:4px;min-height:18px}.date-picker-overlay[_ngcontent-%COMP%]{box-shadow:0 4px 12px #00000026;min-width:320px;position:relative;z-index:10001}.date-picker-overlay[_ngcontent-%COMP%] [_ngcontent-%COMP%]:deep(cue-menu){z-index:10002!important}.date-picker-overlay[_ngcontent-%COMP%] [_ngcontent-%COMP%]:deep(.clickoutside-ignore){pointer-events:auto}.calendar-button[_ngcontent-%COMP%]{position:absolute;right:8px;top:50%;transform:translateY(-50%);z-index:10;opacity:.7;transition:opacity .2s ease}.calendar-button[_ngcontent-%COMP%]:hover{opacity:1}.input[_ngcontent-%COMP%]{padding-right:40px;box-sizing:border-box}.form-field[_ngcontent-%COMP%]{width:100%;max-width:none;box-sizing:border-box}'],changeDetection:0})}return o})();var ee=r(9695),N=r(1413),te=r(7421),ne=r(3293),I=r(7384),ie=r(3798);let oe=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["ng-component"]],hostAttrs:["cdk-text-field-style-loader",""],decls:0,vars:0,template:function(i,n){},styles:["textarea.cdk-textarea-autosize {\n resize: none;\n}\n\ntextarea.cdk-textarea-autosize-measuring {\n padding: 2px 0 !important;\n box-sizing: content-box !important;\n height: auto !important;\n overflow: hidden !important;\n}\n\ntextarea.cdk-textarea-autosize-measuring-firefox {\n padding: 2px 0 !important;\n box-sizing: content-box !important;\n height: 0 !important;\n}\n\n@keyframes cdk-text-field-autofill-start { /*!*/ }\n@keyframes cdk-text-field-autofill-end { /*!*/ }\n.cdk-text-field-autofill-monitored:-webkit-autofill {\n animation: cdk-text-field-autofill-start 0s 1ms;\n}\n\n.cdk-text-field-autofill-monitored:not(:-webkit-autofill) {\n animation: cdk-text-field-autofill-end 0s 1ms;\n}\n"],encapsulation:2,changeDetection:0})}return o})(),le=(()=>{class o{_elementRef=(0,a.WQX)(e.aKT);_platform=(0,a.WQX)(te.O);_ngZone=(0,a.WQX)(a.SKi);_renderer=(0,a.WQX)(e.sFG);_resizeEvents=new N.B;_previousValue;_initialHeight;_destroyed=new N.B;_listenerCleanups;_minRows;_maxRows;_enabled=!0;_previousMinRows=-1;_textareaElement;get minRows(){return this._minRows}set minRows(t){this._minRows=(0,I.OE)(t),this._setMinHeight()}get maxRows(){return this._maxRows}set maxRows(t){this._maxRows=(0,I.OE)(t),this._setMaxHeight()}get enabled(){return this._enabled}set enabled(t){this._enabled!==t&&((this._enabled=t)?this.resizeToFitContent(!0):this.reset())}get placeholder(){return this._textareaElement.placeholder}set placeholder(t){this._cachedPlaceholderHeight=void 0,t?this._textareaElement.setAttribute("placeholder",t):this._textareaElement.removeAttribute("placeholder"),this._cacheTextareaPlaceholderHeight()}_cachedLineHeight;_cachedPlaceholderHeight;_document=(0,a.WQX)(a.qQL);_hasFocus=!1;_isViewInited=!1;constructor(){(0,a.WQX)(ne.l).load(oe),this._textareaElement=this._elementRef.nativeElement}_setMinHeight(){const t=this.minRows&&this._cachedLineHeight?this.minRows*this._cachedLineHeight+"px":null;t&&(this._textareaElement.style.minHeight=t)}_setMaxHeight(){const t=this.maxRows&&this._cachedLineHeight?this.maxRows*this._cachedLineHeight+"px":null;t&&(this._textareaElement.style.maxHeight=t)}ngAfterViewInit(){this._platform.isBrowser&&(this._initialHeight=this._textareaElement.style.height,this.resizeToFitContent(),this._ngZone.runOutsideAngular(()=>{this._listenerCleanups=[this._renderer.listen("window","resize",()=>this._resizeEvents.next()),this._renderer.listen(this._textareaElement,"focus",this._handleFocusEvent),this._renderer.listen(this._textareaElement,"blur",this._handleFocusEvent)],this._resizeEvents.pipe((0,ie.Z)(16)).subscribe(()=>{this._cachedLineHeight=this._cachedPlaceholderHeight=void 0,this.resizeToFitContent(!0)})}),this._isViewInited=!0,this.resizeToFitContent(!0))}ngOnDestroy(){this._listenerCleanups?.forEach(t=>t()),this._resizeEvents.complete(),this._destroyed.next(),this._destroyed.complete()}_cacheTextareaLineHeight(){if(this._cachedLineHeight)return;const t=this._textareaElement.cloneNode(!1),i=t.style;t.rows=1,i.position="absolute",i.visibility="hidden",i.border="none",i.padding="0",i.height="",i.minHeight="",i.maxHeight="",i.top=i.bottom=i.left=i.right="auto",i.overflow="hidden",this._textareaElement.parentNode.appendChild(t),this._cachedLineHeight=t.clientHeight,t.remove(),this._setMinHeight(),this._setMaxHeight()}_measureScrollHeight(){const t=this._textareaElement,i=t.style.marginBottom||"",l=this._hasFocus,g=this._platform.FIREFOX?"cdk-textarea-autosize-measuring-firefox":"cdk-textarea-autosize-measuring";l&&(t.style.marginBottom=`${t.clientHeight}px`),t.classList.add(g);const m=t.scrollHeight-4;return t.classList.remove(g),l&&(t.style.marginBottom=i),m}_cacheTextareaPlaceholderHeight(){if(!this._isViewInited||null!=this._cachedPlaceholderHeight)return;if(!this.placeholder)return void(this._cachedPlaceholderHeight=0);const t=this._textareaElement.value;this._textareaElement.value=this._textareaElement.placeholder,this._cachedPlaceholderHeight=this._measureScrollHeight(),this._textareaElement.value=t}_handleFocusEvent=t=>{this._hasFocus="focus"===t.type};ngDoCheck(){this._platform.isBrowser&&this.resizeToFitContent()}resizeToFitContent(t=!1){if(!this._enabled||(this._cacheTextareaLineHeight(),this._cacheTextareaPlaceholderHeight(),!this._cachedLineHeight))return;const i=this._elementRef.nativeElement,n=i.value;if(!t&&this._minRows===this._previousMinRows&&n===this._previousValue)return;const l=this._measureScrollHeight(),g=Math.max(l,this._cachedPlaceholderHeight||0);i.style.height=`${g}px`,this._ngZone.runOutsideAngular(()=>{typeof requestAnimationFrame<"u"?requestAnimationFrame(()=>this._scrollToCaretPosition(i)):setTimeout(()=>this._scrollToCaretPosition(i))}),this._previousValue=n,this._previousMinRows=this._minRows}reset(){void 0!==this._initialHeight&&(this._textareaElement.style.height=this._initialHeight)}_noopInputHandler(){}_scrollToCaretPosition(t){const{selectionStart:i,selectionEnd:n}=t;!this._destroyed.isStopped&&this._hasFocus&&t.setSelectionRange(i,n)}static \u0275fac=function(i){return new(i||o)};static \u0275dir=e.FsC({type:o,selectors:[["textarea","cdkTextareaAutosize",""]],hostAttrs:["rows","1",1,"cdk-textarea-autosize"],hostBindings:function(i,n){1&i&&e.bIt("input",function(){return n._noopInputHandler()})},inputs:{minRows:[0,"cdkAutosizeMinRows","minRows"],maxRows:[0,"cdkAutosizeMaxRows","maxRows"],enabled:[2,"cdkTextareaAutosize","enabled",s.L39],placeholder:"placeholder"},exportAs:["cdkTextareaAutosize"]})}return o})(),ae=(()=>{class o{static \u0275fac=function(i){return new(i||o)};static \u0275mod=e.$C({type:o});static \u0275inj=a.G2t({})}return o})();var G=r(29);const se=["inputField"];function ce(o,u){1&o&&e.EFF(0," * ")}function re(o,u){if(1&o&&(e.j41(0,"span",5),e.nrm(1,"cue-svg-icon",8),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.Y8G("name",t.icon())}}function ue(o,u){if(1&o&&(e.j41(0,"cue-typography",7),e.EFF(1),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.JRh(t.error())}}let de=(()=>{class o{value=(0,s.geq)("");_displayValue=(0,a.vPA)("");label=(0,s.hFB)("");info=(0,s.hFB)("");placeholder=(0,s.hFB)("");error=(0,s.hFB)(void 0);required=(0,s.hFB)(!1);icon=(0,s.hFB)(void 0);size=(0,s.hFB)("m");isFocused=!1;disabled=!1;inputField;valueChange=(0,s.CGW)();_syncDisplay=(0,a.QZP)(()=>{const t=this.value()||"";!this.isFocused&&t!==this._displayValue()&&this._displayValue.set(t)});onChange=t=>{};onTouched=()=>{};writeValue(t){const i=t||"";this.value.set(i),this.isFocused||this._displayValue.set(i)}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t}emitValue(t){const i=t.target.value;this.valueChange.emit(i),this.onChange(i)}focus(){this.isFocused=!0,this._displayValue.set(this.value()||""),this.inputField?.nativeElement&&this.inputField.nativeElement.focus()}onBlur(){this.isFocused=!1;const t=this.inputField?.nativeElement.value??this._displayValue();this._displayValue.set(t),this.onTouched()}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-input-multiline"]],viewQuery:function(i,n){if(1&i&&e.GBs(se,5),2&i){let l;e.mGM(l=e.lsd())&&(n.inputField=l.first)}},inputs:{value:[1,"value"],label:[1,"label"],info:[1,"info"],placeholder:[1,"placeholder"],error:[1,"error"],required:[1,"required"],icon:[1,"icon"],size:[1,"size"]},outputs:{value:"valueChange",valueChange:"valueChange"},features:[e.Jv_([{provide:_.kq,useExisting:(0,a.Rfq)(()=>o),multi:!0}])],decls:10,vars:14,consts:[["inputField",""],[1,"form-field"],["size","s",1,"label",3,"info"],[1,"input-container"],["align","center","gap","s"],[2,"height","12px"],["cdkTextareaAutosize","",1,"input","textarea",2,"resize","none","overflow","hidden",3,"input","focus","blur","cdkAutosizeMinRows","cdkAutosizeMaxRows","placeholder","value","disabled"],["size","s",1,"error-text"],[3,"name"]],template:function(i,n){1&i&&(e.j41(0,"div",1)(1,"cue-typography",2),e.EFF(2),e.nVh(3,ce,1,0),e.k0s(),e.j41(4,"div",3)(5,"cue-flexcontainer",4),e.nVh(6,re,2,1,"span",5),e.j41(7,"textarea",6,0),e.bIt("input",function(g){return n.emitValue(g)})("focus",function(){return n.isFocused=!0})("blur",function(){return n.onBlur()}),e.k0s()()(),e.nVh(9,ue,2,1,"cue-typography",7),e.k0s()),2&i&&(e.HbH("size-"+n.size()),e.AVh("focused",n.isFocused||n._displayValue()),e.R7$(),e.Y8G("info",n.info()),e.R7$(),e.SpI(" ",n.label()," "),e.R7$(),e.vxM(n.required()?3:-1),e.R7$(3),e.vxM(n.icon()?6:-1),e.R7$(),e.Y8G("cdkAutosizeMinRows",1)("cdkAutosizeMaxRows",8)("placeholder",n.placeholder())("value",n._displayValue())("disabled",n.disabled),e.R7$(2),e.vxM(n.error()?9:-1))},dependencies:[b.Typography,C.n,G.A,ae,le],styles:[".form-field[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column}.input-container[_ngcontent-%COMP%]{position:relative;z-index:2}.input.textarea[_ngcontent-%COMP%]{width:100%;min-height:32px;border:none;border-bottom:1px solid var(--cue-input-border-bottom-color);background:none;outline:none;font-family:var(--cue-font-family);resize:none;overflow:hidden;color:var(--cue-input-value-color);position:relative;z-index:2;padding-bottom:8px}.size-xs[_ngcontent-%COMP%] .input.textarea[_ngcontent-%COMP%]{padding:var(--cue-input-xs-padding);font-size:var(--cue-input-xs-font-size)}.size-s[_ngcontent-%COMP%] .input.textarea[_ngcontent-%COMP%]{padding:var(--cue-input-s-padding);font-size:var(--cue-input-s-font-size)}.size-m[_ngcontent-%COMP%] .input.textarea[_ngcontent-%COMP%]{padding:var(--cue-input-m-padding);font-size:var(--cue-input-m-font-size)}.size-l[_ngcontent-%COMP%] .input.textarea[_ngcontent-%COMP%]{padding:var(--cue-input-l-padding);font-size:var(--cue-input-l-font-size)}.input.textarea[_ngcontent-%COMP%]::placeholder{color:var(--cue-input-placeholder-color);font-family:var(--cue-font-family)}.input[_ngcontent-%COMP%]:-webkit-autofill, .input[_ngcontent-%COMP%]:-webkit-autofill:hover, .input[_ngcontent-%COMP%]:-webkit-autofill:focus{-webkit-box-shadow:0 0 0px 1000px transparent inset;-webkit-transition:background-color 5000s ease-in-out 0s;transition:background-color 5000s ease-in-out 0s;-webkit-text-fill-color:var(--cue-input-value-color)}.label[_ngcontent-%COMP%]{position:absolute;pointer-events:none;transition:all .2s ease;z-index:1;padding:0 4px;left:0}.size-xs[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-xs-label-top);left:var(--cue-input-xs-label-left)}.size-s[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-s-label-top);left:var(--cue-input-s-label-left)}.size-m[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-m-label-top);left:var(--cue-input-m-label-left)}.size-l[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-l-label-top);left:var(--cue-input-l-label-left)}.form-field.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:var(--cue-input-value-color)}.size-xs.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-xs-label-focused-top);font-size:var(--cue-input-xs-label-focused-font-size)}.size-s.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-s-label-focused-top);font-size:var(--cue-input-s-label-focused-font-size)}.size-m.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-m-label-focused-top);font-size:var(--cue-input-m-label-focused-font-size)}.size-l.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-l-label-focused-top);font-size:var(--cue-input-l-label-focused-font-size)}.error-text[_ngcontent-%COMP%]{color:var(--cue-error);margin-top:4px;min-height:18px}.form-field[_ngcontent-%COMP%]:not(.focused) .input-container[_ngcontent-%COMP%]{margin-top:24px}.form-field.focused[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]{margin-top:12px}"],changeDetection:0})}return o})();var T=r(6117),ge=r(356),pe=r(6279),_e=r(1359),me=r(7851);function he(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-typography",11),e.bIt("click",function(){a.eBV(t);const n=e.XpG();return a.Njj(!n.disabled()&&n.openMenu())}),e.EFF(1),e.k0s()}if(2&o){const t=e.XpG();e.Y8G("info",t.info()),e.R7$(),e.JRh(t.label())}}function fe(o,u){if(1&o&&e.nrm(0,"cue-svg-icon",12),2&o){const t=e.XpG();e.xc7("--cue-icon-width",t.iconSize()),e.Y8G("name",u)}}function ve(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-input",13),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){a.eBV(t);const l=e.XpG();return e.DH7(l.filterValue,n)||(l.filterValue=n),a.Njj(n)}),e.k0s(),e.nrm(2,"div",14)}if(2&o){const t=e.XpG();e.R50("value",t.filterValue),e.Y8G("placeholder",e.bMT(1,2,"components.input.select.placeholderFilter"))}}function Me(o,u){1&o&&e.nrm(0,"cue-svg-icon",17),2&o&&e.Y8G("name",u)}function be(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-menu-item",15),e.bIt("click",function(n){const l=a.eBV(t).$implicit,g=e.XpG();return a.Njj(g.handleSelect(n,l.value))})("mousedown",function(n){a.eBV(t);const l=e.XpG();return a.Njj(l.preventEventBubbling(n))}),e.j41(1,"cue-checkbox",16),e.bIt("mousedown",function(n){a.eBV(t);const l=e.XpG();return a.Njj(l.preventEventBubbling(n))}),e.k0s(),e.nVh(2,Me,1,1,"cue-svg-icon",17),e.EFF(3),e.k0s()}if(2&o){let t;const i=u.$implicit,n=e.XpG();e.Y8G("size",n.size())("disabled",n.isFixedValue(i.value)&&n.isSelected(i.value))("selected",n.isSelected(i.value)),e.R7$(),e.Y8G("checked",n.isSelected(i.value))("disabled",n.isFixedValue(i.value)&&n.isSelected(i.value)),e.R7$(),e.vxM((t=n.icon(i.value))?2:-1,t),e.R7$(),e.SpI(" ",i.label," ")}}function Ce(o,u){if(1&o&&(e.j41(0,"cue-typography",10),e.EFF(1),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.JRh(t.error())}}let ye=(()=>{class o{label=(0,s.hFB)("");info=(0,s.hFB)("");placeholder=(0,s.hFB)(void 0);menuPosition=(0,s.hFB)(void 0);options=(0,s.hFB)();labelMap=(0,s.hFB)({});iconMap=(0,s.hFB)({});value=(0,s.geq)([]);fixedValues=(0,s.hFB)([]);size=(0,s.hFB)("xs");disabled=(0,s.hFB)(!1);showFilter=(0,s.hFB)(!1);underline=(0,s.hFB)(!0);error=(0,s.hFB)(void 0);maxHeight=(0,s.hFB)(void 0);loading=(0,s.hFB)(!1);optionLabels=(0,p.EW)(()=>{const t=this.labelMap();return(this.options()??[]).map(n=>t[n]?t[n]:n.toString())});_multiSelectCount=(0,p.EW)(()=>(this.value()||[]).length);_multiSelectTranslated=(0,f.Xx)("components.input.multiSelect.itemsSelected",(0,p.EW)(()=>({count:this._multiSelectCount()})));_defaultPlaceholder=(0,f.Xx)("components.input.multiSelect.placeholderSelect");_placeholder=(0,p.EW)(()=>this.placeholder()??this._defaultPlaceholder());valueLabel=(0,p.EW)(()=>{const t=this.labelMap(),i=this.value()||[],n=this._multiSelectTranslated();let l;if(0===i.length)l="";else if(1===i.length){const g=i[0];l=t[g]?t[g]:g.toString()}else l=n;return l});menuIsOpen=(0,a.vPA)(void 0);filterInputEl=(0,s.ebz)(y.p);menuEl=(0,s.ebz)(T.W);filterValue=(0,a.vPA)("");optionsFiltered=(0,p.EW)(()=>this._appendFilter(this.options()??[],this.filterValue(),this.labelMap()));iconSize=(0,p.EW)(()=>`var(--cue-input-${this.size()}-font-size)`);handleSelect(t,i){const l=t.target.closest("cue-multi-select");(null!==l?.closest(".ag-filter-wrapper")||null!==l?.closest(".ag-popup")||null!==l?.closest(".ag-filter-apply-panel")||null!==l?.closest('[class*="ag-"]')||null!==document.querySelector(".ag-filter-wrapper"))&&t.stopPropagation(),t.preventDefault();const m=this.value()||[],x=m.includes(i),k=this.fixedValues().includes(i);if(x&&k)return;let P;P=x?m.filter(v=>v!==i):[...m,i],this.value.update(()=>[...P])}preventEventBubbling(t){const n=t.target.closest("cue-multi-select");(null!==n?.closest(".ag-filter-wrapper")||null!==n?.closest(".ag-popup")||null!==n?.closest(".ag-filter-apply-panel")||null!==n?.closest('[class*="ag-"]')||null!==document.querySelector(".ag-filter-wrapper"))&&(t.stopPropagation(),t.stopImmediatePropagation())}onMenuClosed(){this.menuIsOpen.set(!1)}openMenu(){this.menuIsOpen.set(!0),this.filterValue.set("")}handleSpace(t){t.preventDefault(),this.openMenu()}isSelected(t){return(this.value()||[]).includes(t)}isFixedValue(t){return this.fixedValues().includes(t)}constructor(){(0,a.QZP)(()=>{this.showFilter()&&this.menuIsOpen()&&setTimeout(()=>this.filterInputEl()?.focus(),20)}),(0,a.QZP)(()=>{const t=this.value()||[],n=this.fixedValues().filter(l=>!t.includes(l));if(n.length>0){const l=[...t,...n];this.value.set(l)}})}icon(t){if(void 0!==t)return this.iconMap()[t]}_appendFilter(t,i,n){const l=i.toLowerCase();return(""===i?t:t.filter(m=>(n[m]?n[m].toLowerCase():m.toString().toLowerCase()).startsWith(l))).map(m=>({value:m,label:n[m]?n[m]:m.toString()}))}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-multi-select"]],viewQuery:function(i,n){1&i&&e.wEZ(n.filterInputEl,y.p,5)(n.menuEl,T.W,5),2&i&&e.NyB(2)},inputs:{label:[1,"label"],info:[1,"info"],placeholder:[1,"placeholder"],menuPosition:[1,"menuPosition"],options:[1,"options"],labelMap:[1,"labelMap"],iconMap:[1,"iconMap"],value:[1,"value"],fixedValues:[1,"fixedValues"],size:[1,"size"],disabled:[1,"disabled"],showFilter:[1,"showFilter"],underline:[1,"underline"],error:[1,"error"],maxHeight:[1,"maxHeight"],loading:[1,"loading"]},outputs:{value:"valueChange"},decls:15,vars:23,consts:[["trigger",""],[1,"form-field"],["size","s",1,"label",3,"info"],[3,"menuClosed","positioning","contextEnabled"],["trigger","","tabindex","0",1,"select-trigger",3,"click","keydown.enter","keydown.space"],["align","center","gap","s",1,"select-value"],[3,"--cue-icon-width","name"],["name","arrow-dropdown",1,"select-arrow"],["menu","",1,"menu",3,"maxHeight","cueLogoLoader"],[3,"size","disabled","selected"],["size","s",1,"error-text"],["size","s",1,"label",3,"click","info"],[3,"name"],[3,"valueChange","value","placeholder"],[2,"height","6px"],[3,"click","mousedown","size","disabled","selected"],["before","",3,"mousedown","checked","disabled"],["before","",3,"name"]],template:function(i,n){if(1&i&&(e.j41(0,"div",1),e.nVh(1,he,2,2,"cue-typography",2),e.j41(2,"cue-menu",3),e.bIt("menuClosed",function(){return n.onMenuClosed()}),e.EFF(3,"> "),e.j41(4,"div",4,0),e.bIt("click",function(){return!n.disabled()&&n.openMenu()})("keydown.enter",function(){return!n.disabled()&&n.openMenu()})("keydown.space",function(g){return!n.disabled()&&n.handleSpace(g)}),e.j41(6,"cue-flexcontainer",5),e.nVh(7,fe,1,3,"cue-svg-icon",6),e.EFF(8),e.k0s(),e.nrm(9,"cue-svg-icon",7),e.k0s(),e.j41(10,"cue-menu-wrap",8),e.nVh(11,ve,3,4),e.Z7z(12,be,4,7,"cue-menu-item",9,e.Vm6),e.k0s()(),e.nVh(14,Ce,2,1,"cue-typography",10),e.k0s()),2&i){let l;e.HbH("size-"+n.size()),e.AVh("focused",n.value()&&n.value().length>0||""!==n.placeholder())("menu-open",n.menuIsOpen())("underline",n.underline())("no-label",!n.label()),e.R7$(),e.vxM(n.label()?1:-1),e.R7$(),e.Y8G("positioning",n.menuPosition())("contextEnabled",!n.disabled()),e.R7$(2),e.AVh("disabled",n.disabled()),e.R7$(3),e.vxM((l=n.icon(1===n.value().length?n.value()[0]:void 0))?7:-1,l),e.R7$(),e.SpI(" ",n.value()&&n.value().length>0?n.valueLabel():n._placeholder()," "),e.R7$(2),e.xc7("min-height",n.loading()?"200px":null),e.Y8G("maxHeight",n.maxHeight())("cueLogoLoader",n.loading()),e.R7$(),e.vxM(n.showFilter()?11:-1),e.R7$(),e.Dyx(n.optionsFiltered()),e.R7$(2),e.vxM(n.error()?14:-1)}},dependencies:[T.W,ge.M,pe.D,b.Typography,y.p,_e.S,G.A,C.n,me.k,f.Kj],styles:[".form-field[_ngcontent-%COMP%]{position:relative}.select-trigger[_ngcontent-%COMP%]{color:var(--cue-input-value-color);width:100%;border:none;background:none;outline:none;font-family:var(--cue-font-family);display:flex;justify-content:space-between;align-items:center;cursor:pointer;box-sizing:border-box}.form-field.underline[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]{border-bottom:1px solid var(--cue-input-border-bottom-color)}.form-field[_ngcontent-%COMP%]:not(.underline) .select-trigger[_ngcontent-%COMP%]{align-items:flex-start;padding-top:2px;padding-bottom:1px}.select-trigger.disabled[_ngcontent-%COMP%]{cursor:not-allowed;opacity:.6}.select-trigger[_ngcontent-%COMP%]:focus{outline:none}.size-xs[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]{padding:var(--cue-input-xs-padding);font-size:var(--cue-input-xs-font-size)}.size-s[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]{padding:var(--cue-input-s-padding);font-size:var(--cue-input-s-font-size)}.size-m[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]{padding:var(--cue-input-m-padding);font-size:var(--cue-input-m-font-size)}.size-l[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]{padding:var(--cue-input-l-padding);font-size:var(--cue-input-l-font-size)}.form-field.no-label.size-xs[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%], .form-field.no-label.size-s[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%], .form-field.no-label.size-m[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%], .form-field.no-label.size-l[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]{padding-top:0}.select-value[_ngcontent-%COMP%]{color:var(--cue-input-value-color);font-family:var(--cue-font-family);flex:1;text-align:left}.form-field[_ngcontent-%COMP%]:not(.focused) .select-value[_ngcontent-%COMP%]{color:var(--cue-input-placeholder-color)}.select-arrow[_ngcontent-%COMP%]{color:var(--cue-input-value-color);margin-left:8px;display:inline-block;transition:transform .2s ease}.form-field.menu-open[_ngcontent-%COMP%] .select-arrow[_ngcontent-%COMP%]{transform:rotate(180deg)}.label[_ngcontent-%COMP%]{position:absolute;pointer-events:auto;transition:all .2s ease;cursor:pointer}.size-xs[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-xs-label-top);left:var(--cue-input-xs-label-left)}.size-s[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-s-label-top);left:var(--cue-input-s-label-left)}.size-m[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-m-label-top);left:var(--cue-input-m-label-left)}.size-l[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{top:var(--cue-input-l-label-top);left:var(--cue-input-l-label-left)}.form-field.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .form-field.menu-open[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .form-field[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .form-field[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{color:var(--cue-input-value-color)}.size-xs.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-xs.menu-open[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-xs[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-xs[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{top:var(--cue-input-xs-label-focused-top);font-size:var(--cue-input-xs-label-focused-font-size)}.size-s.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-s.menu-open[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-s[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-s[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{top:var(--cue-input-s-label-focused-top);font-size:var(--cue-input-s-label-focused-font-size)}.size-m.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-m.menu-open[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-m[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-m[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{top:var(--cue-input-m-label-focused-top);font-size:var(--cue-input-m-label-focused-font-size)}.size-l.focused[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-l.menu-open[_ngcontent-%COMP%] .label[_ngcontent-%COMP%], .size-l[_ngcontent-%COMP%] .select-trigger[_ngcontent-%COMP%]:not(:placeholder-shown) + .label[_ngcontent-%COMP%], .size-l[_ngcontent-%COMP%] select[_ngcontent-%COMP%]:valid + .label[_ngcontent-%COMP%]{top:var(--cue-input-l-label-focused-top);font-size:var(--cue-input-l-label-focused-font-size)}cue-menu[_ngcontent-%COMP%]{width:100%}.error-text[_ngcontent-%COMP%]{color:var(--cue-error);margin-top:4px;min-height:18px}"],changeDetection:0})}return o})();const xe=["*"],B=()=>[],S=()=>({});function Pe(o,u){if(1&o&&(e.j41(0,"cue-typography"),e.EFF(1),e.k0s()),2&o){const t=e.XpG(2);e.R7$(),e.JRh(t.config().message)}}function Oe(o,u){if(1&o&&(e.nrm(0,"cue-key-val",4),e.nI1(1,"transloco")),2&o){const t=e.XpG(2);e.Y8G("key",e.mNQ(e.bMT(1,3,"components.modals.rdfEdit.labelExistingValue")))("val",t.existingValue())}}function De(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-input",15),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){a.eBV(t);const l=e.XpG(2);return e.DH7(l.newValue,n)||(l.newValue=n),a.Njj(n)}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,4,"components.modals.rdfEdit.labelNewValue"))),e.R50("value",t.newValue),e.Y8G("error",t.valueError())}}function ze(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-input",16),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){a.eBV(t);const l=e.XpG(2);return e.DH7(l.newValue,n)||(l.newValue=n),a.Njj(n)}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,4,"components.modals.rdfEdit.labelNewValue"))),e.R50("value",t.newValue),e.Y8G("error",t.valueError())}}function ke(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-input-date",17),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){a.eBV(t);const l=e.XpG(2);return e.DH7(l.newValue,n)||(l.newValue=n),a.Njj(n)}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,4,"components.modals.rdfEdit.labelNewValue"))),e.R50("value",t.newValue),e.Y8G("error",t.valueError())}}function Ve(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-flexcontainer",8)(1,"cue-typography"),e.EFF(2),e.nI1(3,"transloco"),e.k0s(),e.j41(4,"cue-input-switch",18),e.bIt("checkedChange",function(n){a.eBV(t);const l=e.XpG(2);return a.Njj(l.onBooleanChange(n))}),e.k0s()()}if(2&o){const t=e.XpG(2);e.R7$(2),e.JRh(e.bMT(3,2,"components.modals.rdfEdit.labelSetNewValue")),e.R7$(2),e.Y8G("checked","true"===t.newValue())}}function Ee(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-select",19),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){a.eBV(t);const l=e.XpG(2);return e.DH7(l.newValue,n)||(l.newValue=n),a.Njj(n)}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,7,"components.modals.rdfEdit.labelNewValue"))),e.R50("value",t.newValue),e.Y8G("options",t.config().options||e.lJ4(9,B))("labelMap",t.config().optionLabelMap||e.lJ4(10,S))("showFilter",t.optionsCount()>5)("error",t.valueError())}}function Fe(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-multi-select",19),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){a.eBV(t);const l=e.XpG(2);return e.DH7(l.newValue,n)||(l.newValue=n),a.Njj(n)}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,7,"components.modals.rdfEdit.labelNewValue"))),e.R50("value",t.newValue),e.Y8G("options",t.config().options||e.lJ4(9,B))("labelMap",t.config().optionLabelMap||e.lJ4(10,S))("showFilter",t.optionsCount()>5)("error",t.valueError())}}function Re(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-input-multiline",20),e.nI1(1,"transloco"),e.mxI("valueChange",function(n){a.eBV(t);const l=e.XpG(2);return e.DH7(l.comment,n)||(l.comment=n),a.Njj(n)}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("label",e.mNQ(e.bMT(1,3,"components.modals.rdfEdit.labelComment"))),e.R50("value",t.comment)}}function we(o,u){if(1&o&&(e.j41(0,"cue-typography",11),e.EFF(1),e.k0s()),2&o){const t=e.XpG(2);e.R7$(),e.JRh(t.error())}}function Te(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-modal",1),e.bIt("close",function(){a.eBV(t);const n=e.XpG();return a.Njj(n.onClose())}),e.j41(1,"cue-flexcontainer",2),e.SdG(2),e.nVh(3,Pe,2,1,"cue-typography"),e.j41(4,"cue-flexcontainer",3),e.nVh(5,Oe,2,5,"cue-key-val",4),e.nVh(6,De,2,6,"cue-input",5),e.nVh(7,ze,2,6,"cue-input",6),e.nVh(8,ke,2,6,"cue-input-date",7),e.nVh(9,Ve,5,4,"cue-flexcontainer",8),e.nVh(10,Ee,2,11,"cue-select",9),e.nVh(11,Fe,2,11,"cue-multi-select",9),e.k0s(),e.nVh(12,Re,2,5,"cue-input-multiline",10),e.nVh(13,we,2,1,"cue-typography",11),e.j41(14,"cue-flexcontainer",12)(15,"cue-button",13),e.bIt("click",function(){a.eBV(t);const n=e.XpG();return a.Njj(n.onClose())}),e.j41(16,"cue-button-label"),e.EFF(17),e.nI1(18,"transloco"),e.k0s()(),e.j41(19,"cue-button",14),e.bIt("click",function(){a.eBV(t);const n=e.XpG();return a.Njj(n.onSave())}),e.j41(20,"cue-button-label"),e.EFF(21),e.nI1(22,"transloco"),e.k0s()()()()()}if(2&o){const t=e.XpG();e.Y8G("displayCloseBtn",!1)("closeOnBackgroundClick",!1),e.R7$(3),e.vxM(t.config().message?3:-1),e.R7$(2),e.vxM("boolean"!==t.config().dataType?5:-1),e.R7$(),e.vxM("string"===t.config().dataType?6:-1),e.R7$(),e.vxM("number"===t.config().dataType?7:-1),e.R7$(),e.vxM("date"===t.config().dataType?8:-1),e.R7$(),e.vxM("boolean"===t.config().dataType?9:-1),e.R7$(),e.vxM("select"===t.config().dataType?10:-1),e.R7$(),e.vxM("multiselect"===t.config().dataType?11:-1),e.R7$(),e.vxM(t.identical()?-1:12),e.R7$(),e.vxM(t.error()?13:-1),e.R7$(2),e.Y8G("disabled",t.saving()),e.R7$(2),e.JRh(e.bMT(18,17,"components.modals.rdfEdit.buttonCancel")),e.R7$(2),e.Y8G("disabled",t.saving()||t.identical())("loading",t.saving()),e.R7$(2),e.JRh(e.bMT(22,19,"components.modals.rdfEdit.buttonSave"))}}let je=(()=>{class o{visible=(0,s.geq)(!0);config=s.hFB.required();close=(0,s.CGW)();existingValue=(0,p.EW)(()=>{let t="";return t=Array.isArray(this.config().existingValue)?this.config().existingValue.map(n=>this._getLabel(n)).join(", "):this._getLabel(this.config().existingValue),t});newValue=(0,p.uu)(()=>this.config().existingValue);comment=(0,a.vPA)("");errorID=(0,s.geq)("");error=(0,f.Xx)(this.errorID);saving=(0,a.vPA)(!1);pristine=(0,a.vPA)(!0);identical=(0,p.EW)(()=>!this.config().hasExternalChanges&&this.newValue()===this.config().existingValue);valueErrorID=(0,p.EW)(()=>this.pristine()?"":this.identical()?"components.modals.rdfEdit.errorIdenticalValue":"");valueError=(0,f.Xx)(this.valueErrorID);optionsCount=(0,p.EW)(()=>this.config().options?.length||0);constructor(){(0,a.QZP)(()=>{this.pristine()&&this.newValue()!==this.config().existingValue&&this.pristine.set(!1)})}onSave(){var t=this;return(0,c.A)(function*(){t.saving.set(!0),t.errorID.set("");try{const i=t.config();yield i.requestSave({newValue:t.newValue(),comment:t.comment(),previousValue:i.existingValue}),t.visible.set(!1),t.close.emit(t.newValue())}catch(i){console.error("Error saving RDF edit:",i),t.errorID.set("components.modals.rdfEdit.errorSaving")}t.saving.set(!1)})()}onClose(){this.visible.set(!1),this.close.emit(null)}onBooleanChange(t){this.newValue.set(t?"true":"false")}_getLabel(t){const i=this.config().optionLabelMap;return void 0!==i&&i[t]||t}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-modal-rdf-edit"]],inputs:{visible:[1,"visible"],config:[1,"config"],errorID:[1,"errorID"]},outputs:{visible:"visibleChange",close:"close",errorID:"errorIDChange"},ngContentSelectors:xe,decls:1,vars:1,consts:[[3,"displayCloseBtn","closeOnBackgroundClick"],[3,"close","displayCloseBtn","closeOnBackgroundClick"],["direction","column","align","center"],["direction","column","gap","m"],[3,"key","val"],["type","text",3,"label","value","error"],["type","number",3,"label","value","error"],[3,"label","value","error"],["direction","row","align","center","justify","space-between","gap","l"],[3,"value","options","labelMap","label","showFilter","error"],[2,"width","100%",3,"label","value"],[2,"color","var(--cue-error)"],["direction","row","justify","center",2,"width","100%"],[3,"click","disabled"],["variant","secondary",3,"click","disabled","loading"],["type","text",3,"valueChange","label","value","error"],["type","number",3,"valueChange","label","value","error"],[3,"valueChange","label","value","error"],[3,"checkedChange","checked"],[3,"valueChange","value","options","labelMap","label","showFilter","error"],[2,"width","100%",3,"valueChange","label","value"]],template:function(i,n){1&i&&(e.NAR(),e.nVh(0,Te,23,21,"cue-modal",0)),2&i&&e.vxM(n.visible()?0:-1)},dependencies:[R.a,C.n,D.$,b.Typography,w.F,y.p,V.L,z.l,ye,q,ee.d,de,f.Kj],styles:[".col[_ngcontent-%COMP%]{flex:1;min-width:0;height:100%}"]})}return o})();var Y=r(7335);function Ne(o,u){1&o&&(e.j41(0,"span",7),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&o&&(e.R7$(),e.SpI("(",e.bMT(2,1,"components.keyVal.edited"),")"))}function Ie(o,u){if(1&o){const t=e.RV6();e.j41(0,"span",5),e.bIt("click",function(){a.eBV(t);const n=e.XpG();return a.Njj(n.onReadClick())}),e.j41(1,"span",6),e.EFF(2),e.k0s(),e.nVh(3,Ne,3,3,"span",7),e.k0s()}if(2&o){const t=e.XpG();e.AVh("interactive",!t.editDisabled()),e.Y8G("menuItems",t.hoverMenu()),e.R7$(2),e.Lme("",t.valueFormatted()," ",t.suffix()),e.R7$(),e.vxM(t.isDirty()?3:-1)}}function Ge(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-select",10),e.bIt("valueChange",function(n){a.eBV(t);const l=e.XpG(2);return a.Njj(l.selectionChange(n))}),e.k0s()}if(2&o){const t=e.XpG(2);e.Y8G("value",t.newValue())("options",t.options())}}function Be(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-inline-input",11),e.bIt("valueChange",function(n){a.eBV(t);const l=e.XpG(2);return a.Njj(l.inputChange(n))}),e.k0s(),e.EFF(1)}if(2&o){const t=e.XpG(2);e.Y8G("value",t.valueFormatted()),e.R7$(),e.SpI(" ",t.suffix()," ")}}function Se(o,u){if(1&o&&(e.j41(0,"cue-flexcontainer",3),e.nVh(1,Ge,1,2,"cue-select",8)(2,Be,2,2),e.nrm(3,"cue-entity-menu",9),e.k0s()),2&o){const t=e.XpG();e.R7$(),e.vxM(void 0!==t.options()&&t.options().length?1:2),e.R7$(2),e.Y8G("items",t.saveCancelMenu())}}function Ye(o,u){if(1&o){const t=e.RV6();e.j41(0,"cue-modal-rdf-edit",12),e.mxI("visibleChange",function(n){a.eBV(t);const l=e.XpG();return e.DH7(l.rdfModalVisible,n)||(l.rdfModalVisible=n),a.Njj(n)}),e.bIt("close",function(n){a.eBV(t);const l=e.XpG();return a.Njj(l.onRdfModalClose(n))}),e.k0s()}if(2&o){const t=e.XpG();e.Y8G("config",u),e.R50("visible",t.rdfModalVisible)}}let Ae=(()=>{class o{entityMenuDirective;size=(0,s.hFB)("m");key=s.hFB.required();val=s.geq.required();originalValue=(0,s.hFB)(void 0);options=(0,s.hFB)([]);suffix=(0,s.hFB)("");rdfConfig=(0,s.hFB)();editDisabled=(0,s.hFB)(!1);valueChange=(0,s.CGW)();editModeEnabled=(0,a.vPA)(!1);isDirty=(0,p.EW)(()=>{const t=this.originalValue();return void 0!==t&&this.val()!==t});valueChanged=(0,p.EW)(()=>this.val()!==this.newValue());newValue=(0,p.uu)(()=>this.val());rdfModalVisible=(0,a.vPA)(!1);valueFormatted=(0,p.EW)(()=>this._idToString(this.val()));hoverMenu=(0,p.EW)(()=>{if(this.editModeEnabled()||this.editDisabled())return[];const t=[{icon:"edit",label:"Edit",action:()=>this.onReadClick()}];return this.isDirty()&&t.push({icon:"close",label:"Revert to original",action:()=>this._revert()}),t});onReadClick(){this.editDisabled()||(this.rdfConfig()?this.rdfModalVisible.set(!0):this.editModeEnabled.set(!0),this.entityMenuDirective?.removeOverlayMenu())}labelSize=(0,p.EW)(()=>{switch(this.size()){case"s":return"xs";case"m":return"s";case"l":return"m";case"xl":return"l"}});onKeyPress(t){this.editModeEnabled()&&("Escape"===t.key?(this._reset(),t.stopPropagation()):"Enter"===t.key&&this._emitChange())}saveCancelMenu=(0,p.EW)(()=>{const t=[{icon:"close",label:"Cancel",action:()=>this._reset()}];return this.valueChanged()&&t.push({icon:"save",label:"Save",action:()=>this._emitChange()}),t});selectionChange(t){this.newValue.set(t?.toString()??"")}inputChange(t){this.newValue.set(t)}_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)}_revert(){const t=this.originalValue();void 0!==t&&(this.val.set(t),this.newValue.set(t),this.valueChange.emit(t),this.entityMenuDirective?.removeOverlayMenu())}_idToString(t){const i=this.rdfConfig()?.optionLabelMap;return i?i[t]??t:t}onRdfModalClose(t){if(this.rdfModalVisible.set(!1),null===t)return;const i=Array.isArray(t)?t.join(", "):t;this.val.set(i)}static \u0275fac=function(i){return new(i||o)};static \u0275cmp=e.VBU({type:o,selectors:[["cue-key-val-editable"]],viewQuery:function(i,n){if(1&i&&e.GBs(Y.e,5),2&i){let l;e.mGM(l=e.lsd())&&(n.entityMenuDirective=l.first)}},hostBindings:function(i,n){1&i&&e.bIt("keydown",function(g){return n.onKeyPress(g)},e.EBC)},inputs:{size:[1,"size"],key:[1,"key"],val:[1,"val"],originalValue:[1,"originalValue"],options:[1,"options"],suffix:[1,"suffix"],rdfConfig:[1,"rdfConfig"],editDisabled:[1,"editDisabled"]},outputs:{val:"valChange",valueChange:"valueChange"},decls:9,vars:5,consts:[[1,"key-val-container"],[3,"size"],["cueEntityMenu","",1,"read-mode-container",3,"interactive","menuItems"],["direction","row","align","center"],[3,"config","visible"],["cueEntityMenu","",1,"read-mode-container",3,"click","menuItems"],[1,"value-content"],[1,"dirty-indicator"],[3,"value","options"],[3,"items"],[3,"valueChange","value","options"],[3,"valueChange","value"],[3,"visibleChange","close","config","visible"]],template:function(i,n){if(1&i&&(e.j41(0,"dl",0)(1,"dt")(2,"cue-typography",1),e.EFF(3),e.k0s()(),e.j41(4,"dd")(5,"cue-typography",1),e.nVh(6,Ie,4,6,"span",2)(7,Se,4,2,"cue-flexcontainer",3),e.k0s()()(),e.nVh(8,Ye,1,2,"cue-modal-rdf-edit",4)),2&i){let l;e.R7$(2),e.Y8G("size",n.labelSize()),e.R7$(),e.JRh(n.key()),e.R7$(2),e.Y8G("size",n.size()),e.R7$(),e.vxM(n.editModeEnabled()?n.rdfConfig()?-1:7:6),e.R7$(2),e.vxM((l=n.rdfConfig())?8:-1,l)}},dependencies:[b.Typography,Y.e,z.l,E.H,C.n,F.I,je,f.Kj],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 o})()},8547(j,O,r){r.d(O,{T:()=>z});var s=r(7705),a=r(29),p=r(6117),E=r(6279),F=r(356),c=r(5547),f=r(5802);const R=(_,M)=>M.label;function C(_,M){if(1&_&&c.nrm(0,"cue-svg-icon",4),2&_){const d=c.XpG(2).$implicit;c.Y8G("name",d.icon)}}function D(_,M){if(1&_&&c.nrm(0,"cue-menu-nested",6),2&_){const d=c.XpG(2).$implicit,h=c.XpG();c.Y8G("items",d.children)("size",h.size())}}function b(_,M){if(1&_&&(c.j41(0,"cue-menu",1)(1,"cue-menu-item",3),c.nVh(2,C,1,1,"cue-svg-icon",4),c.EFF(3),c.nrm(4,"cue-svg-icon",5),c.k0s(),c.nVh(5,D,1,2,"cue-menu-nested",6),c.k0s()),2&_){const d=c.XpG().$implicit,h=c.XpG();c.Y8G("size",h.size()),c.R7$(),c.Y8G("title",d.tooltip),c.R7$(),c.vxM(d.icon?2:-1),c.R7$(),c.SpI(" ",d.label," "),c.R7$(2),c.vxM(d.children?5:-1)}}function w(_,M){if(1&_&&c.nrm(0,"cue-svg-icon",4),2&_){const d=c.XpG(2).$implicit;c.Y8G("name",d.icon)}}function y(_,M){if(1&_){const d=c.RV6();c.j41(0,"cue-menu-item",7),c.bIt("click",function(){f.eBV(d);const e=c.XpG().$implicit;return f.Njj(null==e.action?null:e.action())}),c.nVh(1,w,1,1,"cue-svg-icon",4),c.EFF(2),c.k0s()}if(2&_){const d=c.XpG().$implicit;c.Y8G("title",d.tooltip),c.R7$(),c.vxM(d.icon?1:-1),c.R7$(),c.SpI(" ",d.label," ")}}function V(_,M){if(1&_&&c.nVh(0,b,6,5,"cue-menu",1)(1,y,3,3,"cue-menu-item",2),2&_){const d=M.$implicit;c.vxM(null!=d.children&&d.children.length?0:1)}}let z=(()=>{class _{items=s.hFB.required();size=(0,s.hFB)("m");static \u0275fac=function(h){return new(h||_)};static \u0275cmp=c.VBU({type:_,selectors:[["cue-menu-nested"]],inputs:{items:[1,"items"],size:[1,"size"]},decls:3,vars:1,consts:[[3,"size"],["trigger","hover",3,"size"],[3,"title"],["trigger","",3,"title"],["before","",3,"name"],["after","","name","paginator-next"],["menu","",3,"items","size"],[3,"click","title"]],template:function(h,e){1&h&&(c.j41(0,"cue-menu-wrap",0),c.Z7z(1,V,2,1,null,null,R),c.k0s()),2&h&&(c.Y8G("size",e.size()),c.R7$(),c.Dyx(e.items()))},dependencies:[_,p.W,E.D,F.M,a.A],encapsulation:2})}return _})()},7573(j,O,r){r.d(O,{E:()=>s});const s={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#"}}}]);
package/791.js DELETED
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[791],{8791(R,v,l){l.d(v,{CueDocumentList:()=>j});var h=l(467),o=l(7705),u=l(5802),p=l(2271),C=l(4879),w=l(2065),b=l(4372),M=l(5381),O=l(2245),I=l(7851),y=l(7293),i=l(5547);function E(c,D){if(1&c&&(i.j41(0,"cue-flexcontainer",0)(1,"cue-typography",2),i.EFF(2),i.k0s()()),2&c){const t=i.XpG();i.R7$(2),i.SpI(" ",t.errorMessage()," ")}}function L(c,D){if(1&c&&i.nrm(0,"cue-logo-link",4),2&c){const t=i.XpG(2);i.Y8G("projectId",t.projectId())}}function P(c,D){if(1&c){const t=i.RV6();i.j41(0,"div",1)(1,"cue-doc-list",3),i.bIt("clickedDocument",function(s){u.eBV(t);const n=i.XpG();return u.Njj(n.clickedDocument.emit(s))})("clickedDownloadDocument",function(s){u.eBV(t);const n=i.XpG();return u.Njj(n.clickedDownloadDocument.emit(s))})("clickedOpenInDir",function(s){u.eBV(t);const n=i.XpG();return u.Njj(n.clickedOpenInDir.emit(s))})("clickedOpen",function(s){u.eBV(t);const n=i.XpG();return u.Njj(n.clickedOpen.emit(s))}),i.k0s(),i.nVh(2,L,1,1,"cue-logo-link",4),i.k0s()}if(2&c){const t=i.XpG();i.Y8G("cueLogoLoader","loading"===t.state()),i.R7$(),i.Y8G("documentRefs",t.documentRefs())("documentData",t.documentData())("handlers",t.handlers())("availableContentCategories",t.availableContentCategories())("detailedView",t.detailedView())("simple",t.simple())("pageSize",t.pageSize())("prefetchPages",t.prefetchPages())("showOpenInDocumentViewerAction",t.showOpenInDocumentViewerAction())("showOpenInFileManagerAction",t.showOpenInFileManagerAction())("customOverlayActions",t.customOverlayActions())("variant",t.variant()),i.R7$(),i.vxM(t.showLogo()?2:-1)}}function f(c){return c.split("?")[0].trim()}let j=(()=>{class c{projectId=(0,o.hFB)(void 0);uuids=(0,o.hFB)([]);suffixes=(0,o.hFB)(void 0);mimeTypes=(0,o.hFB)(void 0);contentCategories=(0,o.hFB)(void 0);sdkState=(0,o.hFB)(void 0);detailedView=(0,o.hFB)(!1,{transform:o.L39});simple=(0,o.hFB)(!1,{transform:o.L39});pageSize=(0,o.hFB)(10,{transform:o.Udg});prefetchPages=(0,o.hFB)(3,{transform:o.Udg});showOpenInDocumentViewerAction=(0,o.hFB)(!1,{transform:o.L39});showOpenInFileManagerAction=(0,o.hFB)(!1,{transform:o.L39});customMenuItems=(0,o.hFB)([]);showLogo=(0,o.hFB)(!1,{transform:o.L39});variant=(0,o.hFB)("none");clickedDocument=(0,o.CGW)();clickedDownloadDocument=(0,o.CGW)();clickedOpenInDir=(0,o.CGW)();clickedOpen=(0,o.CGW)();state=(0,u.vPA)("idle");errorMessage=(0,u.vPA)(null);documentData=(0,u.vPA)({});availableContentCategories=(0,u.vPA)(void 0);_filterResolvedUuids=(0,u.vPA)(void 0);documentRefs=(0,p.EW)(()=>{const t=new Set;return(void 0!==this._filterResolvedUuids()?this._filterResolvedUuids()??[]:this.uuids()??[]).map(f).filter(s=>!!s).filter(s=>!t.has(s)&&(t.add(s),!0)).map(s=>({id:s}))});customOverlayActions=(0,p.EW)(()=>{const t=this.projectId();return[...t?[{label:"Open in Cue",icon:"external-link",action:n=>{const a=n.rowData;window.open(`https://cue.qaecy.com/r/${encodeURIComponent(t)}/${encodeURIComponent(a.id)}`,"_blank","noopener,noreferrer")}}]:[],...(this.customMenuItems()||[]).map(n=>({label:n.label,icon:n.icon,action:a=>{n.action(a.rowData,a)}}))]});handlers=(0,p.EW)(()=>{var t=this;const e=this._docs();if(e)return{requestData:(s=(0,h.A)(function*(n){const a=n.map(f).filter(d=>!!d),r=a.filter(d=>!t.documentData()[d]);if(console.debug("[CueDocumentListWC] requestData",{requestedCount:a.length,missingCount:r.length,missing:r}),r.length)try{const d=e,m=t.simple()&&d.fetchDocumentDataSimple?yield d.fetchDocumentDataSimple(r):yield e.fetchDocumentData(r);console.debug("[CueDocumentListWC] fetchDocumentData resolved",{fetchedCount:Object.keys(m).length,ids:Object.keys(m)});const g={};Object.values(m).forEach(_=>{g[_.id]=function A(c){return{id:c.id,path:c.path,suffix:c.suffix,size:c.size,contentIRI:c.contentIRI,providerId:c.providerId,tags:c.tags??[],summary:c.summary??"",categories:c.categories??[],subject:c.subject,relevance:0}}(_)}),Object.keys(g).length>0&&t.documentData.update(_=>({..._,...g}))}catch(d){console.error("[CueDocumentListWC] Failed to fetch document data:",d),t.errorMessage.set(d instanceof Error?d.message:String(d)),t.state.set("error")}}),function(a){return s.apply(this,arguments)}),requestDownload:function(){var s=(0,h.A)(function*(n){const a=t._cue(),r=t.projectId();if(a&&r)try{const d=yield a.storage.getDownloadUrl(r,n.id,n.suffix,"raw"),m=yield fetch(d);if(!m.ok)throw new Error(`Download failed: ${m.status} ${m.statusText}`);const g=yield m.blob(),_=(0,b.M)(n.path)||`${n.id}${n.suffix||""}`;(0,w.KE)(g,_)}catch(d){console.error("[CueDocumentListWC] Failed to download document:",d)}});return function(a){return s.apply(this,arguments)}}(),requestOpen:(s,n)=>{console.log("[CueDocumentListWC] requestOpen",{documentUUID:s,document:n})},requestOpenInDir:(s,n)=>{console.log("[CueDocumentListWC] requestOpenInDir",{documentUUID:s,document:n})}};var s});_cue=(0,u.vPA)(void 0);_docs=(0,u.vPA)(void 0);_ownedView;_inputWarningTimer;_unsubscribeCategories;_lastSetupSignature;constructor(){this._inputWarningTimer=setTimeout(()=>{this.projectId()||console.warn('[cue-document-list] Required input "projectId" is not set. Pass the Cue project ID to load documents.'),this.sdkState()||console.warn('[cue-document-list] Required input "sdkState" is not set. Pass a { cue, view, or documents } object to enable document loading.')},3e3),(0,u.QZP)(()=>{const t=this.projectId(),e=this.sdkState(),s=e?.language??"en";if(console.debug("[CueDocumentListWC] input state changed",{projectId:t,uuids:this.uuids().length,hasSdkState:!!e,hasCue:!!e?.cue,hasView:!!e?.view,hasDocuments:!!e?.documents}),!t||!e)return this._clearRuntimeState(),void this.state.set("idle");const n={projectId:t,cue:e.cue,view:e.view,documents:e.documents,language:s,simple:this.simple()};if(this._isSameSetupSignature(n))return this.state.set("ready"),void this.errorMessage.set(null);this._setupFromSdkState(t,e),this._lastSetupSignature=n,this.state.set("ready"),this.errorMessage.set(null)}),(0,u.QZP)(()=>{const t=this.suffixes(),e=this.mimeTypes(),s=this.contentCategories(),n=this._docs();void 0!==t||void 0!==e||void 0!==s?this._fetchByFilter(t,e,s,n):this._filterResolvedUuids.set(void 0)}),(0,u.QZP)(()=>{const t=new Set(this.documentRefs().map(e=>e.id));this.documentData.update(e=>Object.fromEntries(Object.entries(e).filter(([n])=>t.has(n))))})}ngOnDestroy(){clearTimeout(this._inputWarningTimer),this._cleanupOwnedView(),this._unsubscribeCategories?.(),this._unsubscribeCategories=void 0}_setupFromSdkState(t,e){const s=e.language??"en";if(this.documentData.set({}),this._cleanupOwnedView(),this._unsubscribeCategories?.(),this._unsubscribeCategories=void 0,this.availableContentCategories.set(e.availableContentCategories?e.availableContentCategories:void 0),e.documents)return e.documents.setLanguage(s),this._docs.set(e.documents),void this._cue.set(e.cue);if(e.view)return e.view.setLanguage(s),this._docs.set(e.view.documents),this._cue.set(e.cue),void(this.simple()||this._bindCategoriesFromView(e.view));if(e.cue){if(this.simple())return this._docs.set(e.cue.createProjectDocuments(t)),this._cue.set(e.cue),void this.availableContentCategories.set(void 0);const n=e.cue.createProjectView(t,{language:s});return this._ownedView=n,this._docs.set(n.documents),this._cue.set(e.cue),void this._bindCategoriesFromView(n)}this._docs.set(void 0),this._cue.set(void 0),this.errorMessage.set("sdkState must include cue, view, or documents to load data."),this.state.set("error")}_bindCategoriesFromView(t){const e=()=>{this.availableContentCategories.set(t.availableContentCategories.get())};e(),this._unsubscribeCategories=t.availableContentCategories.subscribe(e)}_clearRuntimeState(){this._cleanupOwnedView(),this._unsubscribeCategories?.(),this._unsubscribeCategories=void 0,this._docs.set(void 0),this._cue.set(void 0),this.documentData.set({}),this.availableContentCategories.set(void 0),this.errorMessage.set(null),this._lastSetupSignature=void 0}_cleanupOwnedView(){this._ownedView&&(this._ownedView.destroy(),this._ownedView=void 0)}_fetchByFilter(t,e,s,n){var a=this;return(0,h.A)(function*(){if(n){a.state.set("loading");try{let r;if(void 0!==t&&t.length>0)r=yield n.documentsBySuffix(t);else if(void 0!==e&&e.length>0)r=yield n.documentsByMime(e);else{if(!(void 0!==s&&s.length>0))return a._filterResolvedUuids.set([]),void a.state.set("ready");r=yield n.documentsByContentCategory(s)}a._filterResolvedUuids.set(r.map(d=>d.uuid)),a.state.set("ready")}catch(r){console.error("[CueDocumentListWC] Failed to fetch documents by filter",r),a.errorMessage.set(r instanceof Error?r.message:"Failed to load documents."),a.state.set("error")}}else a._filterResolvedUuids.set([])})()}_isSameSetupSignature(t){const e=this._lastSetupSignature;return!!e&&e.projectId===t.projectId&&e.cue===t.cue&&e.view===t.view&&e.documents===t.documents&&e.language===t.language&&e.simple===t.simple}static \u0275fac=function(e){return new(e||c)};static \u0275cmp=i.VBU({type:c,selectors:[["cue-document-list"]],inputs:{projectId:[1,"projectId"],uuids:[1,"uuids"],suffixes:[1,"suffixes"],mimeTypes:[1,"mimeTypes"],contentCategories:[1,"contentCategories"],sdkState:[1,"sdkState"],detailedView:[1,"detailedView"],simple:[1,"simple"],pageSize:[1,"pageSize"],prefetchPages:[1,"prefetchPages"],showOpenInDocumentViewerAction:[1,"showOpenInDocumentViewerAction"],showOpenInFileManagerAction:[1,"showOpenInFileManagerAction"],customMenuItems:[1,"customMenuItems"],showLogo:[1,"showLogo"],variant:[1,"variant"]},outputs:{clickedDocument:"clickedDocument",clickedDownloadDocument:"clickedDownloadDocument",clickedOpenInDir:"clickedOpenInDir",clickedOpen:"clickedOpen"},decls:2,vars:1,consts:[["direction","column","align","center","justify","center",2,"height","100%","width","100%","padding","8px"],[2,"position","relative","width","100%",3,"cueLogoLoader"],[2,"color","#c44","font-size","13px"],[3,"clickedDocument","clickedDownloadDocument","clickedOpenInDir","clickedOpen","documentRefs","documentData","handlers","availableContentCategories","detailedView","simple","pageSize","prefetchPages","showOpenInDocumentViewerAction","showOpenInFileManagerAction","customOverlayActions","variant"],[2,"position","absolute","top","8px","left","8px","z-index","5",3,"projectId"]],template:function(e,s){1&e&&i.nVh(0,E,3,1,"cue-flexcontainer",0)(1,P,3,14,"div",1),2&e&&i.vxM("error"===s.state()?0:1)},dependencies:[C.g,M.n,O.Typography,I.k,y.x],styles:["[_nghost-%COMP%]{display:block;width:100%}"],changeDetection:0})}return c})()}}]);
package/799.js DELETED
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[613,799],{7293(M,p,a){a.d(p,{x:()=>e});var h=a(7705),s=a(5802),c=a(2271),m=a(4613),f=a(9352),d=a(7089),n=a(5547);function _(o,t){1&o&&n.nrm(0,"cue-logo",4)}let e=(()=>{class o{projectId=(0,h.hFB)(void 0);resourceId=(0,h.hFB)(void 0);_active=(0,s.vPA)(!0);onHover(){this._active.set(!1),requestAnimationFrame(()=>this._active.set(!0))}_title=(0,c.EW)(()=>this.projectId()&&this.resourceId()?"components.logoLink.showResourceInCue":this.projectId()?"components.logoLink.openProjectInCue":"components.logoLink.openCuePortal");_href=(0,c.EW)(()=>{const i=this.projectId(),r=this.resourceId();return i&&r?`https://cue.qaecy.com/r/${encodeURIComponent(i)}/${encodeURIComponent(r)}`:i?`https://cue.qaecy.com/home/projects?p=${encodeURIComponent(i)}`:"https://cue.qaecy.com/home/projects"});static \u0275fac=function(r){return new(r||o)};static \u0275cmp=n.VBU({type:o,selectors:[["cue-logo-link"]],inputs:{projectId:[1,"projectId"],resourceId:[1,"resourceId"]},decls:6,vars:5,consts:[["target","_blank","rel","noopener noreferrer",1,"link",3,"mouseenter","href"],[1,"logo-stack",3,"cueTooltip"],["size","xs",1,"logo-bg"],[1,"logo-fg"],["size","xs"]],template:function(r,l){1&r&&(n.j41(0,"a",0),n.bIt("mouseenter",function(){return l.onHover()}),n.j41(1,"div",1),n.nI1(2,"transloco"),n.nrm(3,"cue-logo",2),n.j41(4,"div",3),n.nVh(5,_,1,0,"cue-logo",4),n.k0s()()()),2&r&&(n.Y8G("href",l._href(),n.B4B),n.R7$(),n.Y8G("cueTooltip",n.bMT(2,3,l._title())),n.R7$(4),n.vxM(l._active()?5:-1))},dependencies:[m.Logo,d.d,f.Kj],styles:["[_nghost-%COMP%]{display:inline-block;line-height:0}.link[_ngcontent-%COMP%]{display:block;text-decoration:none;cursor:pointer}.logo-stack[_ngcontent-%COMP%]{position:relative;display:inline-block;line-height:0}.logo-bg[_ngcontent-%COMP%]{display:block;opacity:.3;transition:opacity .2s ease}.link[_ngcontent-%COMP%]:hover .logo-bg[_ngcontent-%COMP%]{opacity:.15}.logo-fg[_ngcontent-%COMP%]{position:absolute;inset:0;opacity:0;transition:opacity .15s ease}.link[_ngcontent-%COMP%]:hover .logo-fg[_ngcontent-%COMP%]{opacity:1}"],changeDetection:0})}return o})()},4613(M,p,a){a.d(p,{Logo:()=>d});var h=a(7705),s=a(5547),c=a(5802),m=a(2271),f=a(6170);let d=(()=>{class n{size=(0,h.hFB)("m");sizeMap={xs:"40px",s:"80px",m:"160px",l:"222px",xl:"320px"};active=(0,h.hFB)(!0,{transform:h.L39});continuous=(0,h.hFB)(!1,{transform:h.L39});mode=(0,h.hFB)("default");isDarkMode=(0,h.geq)(!1);handleDarkModeChange(e){this.isDarkMode.set(e),-1===this.raf&&this.animate()}colorA=(0,m.EW)(()=>this.isDarkMode()?[221,246,18]:[18,28,43]);colorB=[0,202,204];paths=[];raf=-1;playfulPhase="idle";playfulIdleUntil=0;playfulAnimStart=0;playfulAnimDuration=2e3;playfulRetractAmount=.3;appearTime=0;disappearTime=0;tip=0;toe=0;mix=[0,0,0];norm=0;animate=e=>{if(void 0!==e){const o=5e-4*(e-this.appearTime);"glow"===this.mode()?this.tip=o%1:"playful"!==this.mode()&&(this.tip=Math.min(1,o),this.active()||(this.toe=Math.min(1,6e-4*(e-this.disappearTime))))}if("playful"===this.mode())return void 0!==e&&("idle"===this.playfulPhase?e>=this.playfulIdleUntil&&(this.playfulPhase="animating",this.playfulAnimStart=e,this.playfulRetractAmount=.2+.75*Math.random(),this.playfulAnimDuration=2*this.playfulRetractAmount/5e-4):(e-this.playfulAnimStart)/this.playfulAnimDuration>=1&&(this.playfulPhase="idle",this.playfulIdleUntil=e+1e3+4e3*Math.random())),this.renderPlayful(e),void(void 0!==e&&(this.raf=requestAnimationFrame(this.animate)));if("glow"===this.mode()){const o=.06666666666666667,t=this.rgbToSvg(this.colorA());return this.paths.forEach((i,r)=>{this.norm=1/this.paths.length*r;let l=this.tip-this.norm;if(l<-(1-o)&&(l+=1),l>=0&&l<o){const u=1-l/o;i.setAttribute("stroke",this.rgbToSvg(this.colorB)),i.setAttribute("stroke-opacity",u.toFixed(3))}else i.setAttribute("stroke",t),i.setAttribute("stroke-opacity","0.005")}),void(this.raf=requestAnimationFrame(this.animate))}if(this.paths.forEach((o,t)=>{this.norm=1/this.paths.length*t,this.mix=this.mixRgb(this.colorA(),this.colorB,Math.max(0,Math.min(1,15*(this.tip-this.norm)))),o.setAttribute("stroke",this.tip*this.paths.length>t&&(this.active()||this.toe*this.paths.length<t)?this.rgbToSvg(this.mix):"transparent")}),this.tip>=1&&(this.active()||this.toe>=1))return this.continuous()?void setTimeout(()=>{this.appearTime=performance.now(),this.tip=0,this.toe=0,this.raf=requestAnimationFrame(this.animate)},500):void(this.raf=-1);this.raf=requestAnimationFrame(this.animate)};activate(){this.appearTime=performance.now(),"playful"===this.mode()&&(this.playfulPhase="intro",this.playfulAnimStart=this.appearTime),this.animate(this.appearTime)}deactivate(){this.disappearTime=performance.now(),-1===this.raf&&this.animate(this.disappearTime)}renderPlayful(e){if(void 0===e)return void this.renderPlayfulDraw(1);const o=Math.min(1,5e-4*(e-this.playfulAnimStart));if("intro"===this.playfulPhase)this.renderPlayfulDraw(o),o>=1&&(this.playfulPhase="idle",this.playfulIdleUntil=e+1e3+4e3*Math.random());else if("idle"===this.playfulPhase)this.renderPlayfulDraw(1);else{const t=Math.min(1,(e-this.playfulAnimStart)/this.playfulAnimDuration),r=1-this.playfulRetractAmount*(1-Math.cos(2*t*Math.PI))/2;this.renderPlayfulDraw(r)}}renderPlayfulDraw(e){const o=this.paths.length,t=this.colorA();this.paths.forEach((i,r)=>{if(this.norm=r/o,e*o>r){const l=Math.max(0,Math.min(1,15*(e-this.norm)));this.mix=this.mixRgb(t,this.colorB,l),i.setAttribute("stroke",this.rgbToSvg(this.mix)),i.setAttribute("stroke-opacity","1")}else i.setAttribute("stroke","transparent")})}mixChannel(e,o,t){return parseInt((e*t+o*(1-t)).toFixed())}mixRgb(e,o,t){return[this.mixChannel(e[0],o[0],t),this.mixChannel(e[1],o[1],t),this.mixChannel(e[2],o[2],t)]}rgbToSvg(e){return`rgb(${e[0]},${e[1]},${e[2]})`}constructor(){(0,c.QZP)(()=>{"glow"===this.mode()||"playful"===this.mode()||this.active()?this.activate():this.deactivate()}),(0,c.QZP)(()=>{this.isDarkMode(),this.animate()});const e=(0,c.WQX)(s.aKT);(0,s.mal)({read:()=>{if(this.paths.length)return;const o=e.nativeElement.querySelector("svg"),t=e.nativeElement.querySelector("#original-path");if(!t)return;const i=t.getTotalLength(),l=[];for(let u=0;u<400;u++){const g=t.getPointAtLength(i/400*u);l.push({x:parseFloat(g.x.toFixed(2)),y:parseFloat(g.y.toFixed(2))})}l.push(t.getPointAtLength(i)),l.reverse(),l.forEach((u,g)=>{if(0===g||1===g)return;const v=document.createElementNS("http://www.w3.org/2000/svg","path");v.setAttribute("d",`M${l[g-2].x},${l[g-2].y}L${l[g-1].x},${l[g-1].y}L${u.x},${u.y}`),v.setAttribute("fill","none"),v.setAttribute("stroke","transparent"),v.setAttribute("stroke-width",t?.getAttribute("stroke-width")||"1"),v.setAttribute("stroke-miterlimit",t?.getAttribute("stroke-miterlimit")||"1"),o.appendChild(v),this.paths.push(v)})}})}ngOnDestroy(){this.paths=[],cancelAnimationFrame(this.raf),this.raf=-1}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=s.VBU({type:n,selectors:[["cue-logo"]],hostVars:2,hostBindings:function(o,t){2&o&&s.xc7("width",t.sizeMap[t.size()])},inputs:{size:[1,"size"],active:[1,"active"],continuous:[1,"continuous"],mode:[1,"mode"],isDarkMode:[1,"isDarkMode"]},outputs:{isDarkMode:"isDarkModeChange"},decls:2,vars:0,consts:[["cueDarkMode","","xmlns","http://www.w3.org/2000/svg","viewBox","0 0 221.545 86.191","width","222","height","86","overflow","visible",3,"darkModeChange"],["id","original-path","fill","none","stroke","transparent","stroke-miterlimit","10","stroke-width","12","d","M216.046 56.638s-10.561 24.201-36.192 22.991c-25.631-1.21-22.771-24.751-20.351-37.622 2.42-12.871 10.451-20.351 16.831-18.041 6.283 2.275 8.03 9.68 2.09 21.891-5.94 12.211-21.341 37.567-35.862 33.992-12.413-3.056-13.281-23.162-13.281-23.162V29.762v26.925c0 14.471-12.47 23.212-24.672 23.212s-24.672-8.301-24.672-23.212V29.829l-.006.105v13.031c0 20.416-16.55 36.966-36.966 36.966S6 63.381 6 42.966 22.55 6 42.966 6c6.91 0 13.377 1.896 18.91 5.196"]],template:function(o,t){1&o&&(c.qSk(),s.j41(0,"svg",0),s.bIt("darkModeChange",function(r){return t.handleDarkModeChange(r)}),s.nrm(1,"path",1),s.k0s())},dependencies:[f.R],styles:["[_nghost-%COMP%]{display:block}svg[_ngcontent-%COMP%]{flex:1;display:block;width:100%;height:auto}"]})}return n})()},6170(M,p,a){a.d(p,{R:()=>f});var h=a(7705),s=a(5802),c=a(2271),m=a(5547);let f=(()=>{class d{destroyRef=(0,s.WQX)(s.abz);_isDarkMode=(0,s.vPA)(this.hasDarkClass());isDarkMode=(0,c.EW)(()=>this._isDarkMode());darkModeChange=(0,h.CGW)();constructor(){const _=new MutationObserver(e=>{e.forEach(o=>{if("attributes"===o.type&&"class"===o.attributeName){const t=this.hasDarkClass();t!==this._isDarkMode()&&this._isDarkMode.set(t)}})});_.observe(document.body,{attributes:!0,attributeFilter:["class"]}),this.destroyRef.onDestroy(()=>_.disconnect()),(0,s.QZP)(()=>{this.darkModeChange.emit(this._isDarkMode()),document.documentElement.style.colorScheme=this._isDarkMode()?"dark":"light"})}hasDarkClass(){return document.body.classList.contains("dark")}toggleDarkMode(){document.body.classList.toggle("dark")}static \u0275fac=function(e){return new(e||d)};static \u0275dir=m.FsC({type:d,selectors:[["","cueDarkMode",""]],outputs:{darkModeChange:"darkModeChange"},exportAs:["darkModeDetector"]})}return d})()},7851(M,p,a){a.d(p,{k:()=>_});var h=a(7705),s=a(5547),c=a(5802),m=a(4613),f=a(2245);function d(e,o){if(1&e&&(s.j41(0,"cue-typography",1),s.EFF(1),s.k0s()),2&e){const t=s.XpG();s.R7$(),s.JRh(t.message)}}let n=(()=>{class e{message="";static \u0275fac=function(i){return new(i||e)};static \u0275cmp=s.VBU({type:e,selectors:[["cue-logo-loader-overlay"]],decls:2,vars:1,consts:[["size","m","mode","glow"],["size","s",1,"message"]],template:function(i,r){1&i&&(s.nrm(0,"cue-logo",0),s.nVh(1,d,2,1,"cue-typography",1)),2&i&&(s.R7$(),s.vxM(r.message?1:-1))},dependencies:[m.Logo,f.Typography],styles:["[_nghost-%COMP%]{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.75rem;z-index:1000;pointer-events:none}.message[_ngcontent-%COMP%]{color:var(--color-text-secondary)}"],changeDetection:0})}return e})(),_=(()=>{class e{cueLogoLoader=(0,h.hFB)(!1);cueLogoLoaderMessage=(0,h.hFB)("");el=(0,c.WQX)(s.aKT);appRef=(0,c.WQX)(s.o8S);envInjector=(0,c.WQX)(c.uvJ);renderer=(0,c.WQX)(s.sFG);overlayRef;constructor(){(0,c.QZP)(()=>{const t=this.cueLogoLoader(),i=this.cueLogoLoaderMessage();t?(this.overlayRef||this.createOverlay(),this.overlayRef&&(this.overlayRef.instance.message=i,this.overlayRef.changeDetectorRef.markForCheck())):this.destroyOverlay()})}createOverlay(){this.overlayRef=(0,h.a0P)(n,{environmentInjector:this.envInjector}),this.appRef.attachView(this.overlayRef.hostView),this.renderer.appendChild(this.el.nativeElement,this.overlayRef.hostView.rootNodes[0])}destroyOverlay(){this.overlayRef&&(this.appRef.detachView(this.overlayRef.hostView),this.overlayRef.destroy(),this.overlayRef=void 0)}ngOnDestroy(){this.destroyOverlay()}static \u0275fac=function(i){return new(i||e)};static \u0275dir=s.FsC({type:e,selectors:[["","cueLogoLoader",""]],hostVars:2,hostBindings:function(i,r){2&i&&s.xc7("position","relative")},inputs:{cueLogoLoader:[1,"cueLogoLoader"],cueLogoLoaderMessage:[1,"cueLogoLoaderMessage"]}})}return e})()}}]);
package/802.js DELETED
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[802],{5137(R,v,a){a.d(v,{BlockProjectDocuments:()=>G});var _=a(467),d=a(7705),u=a(5802),r=a(2271),D=a(6114),g=a(7993),M=a(3615),h=a(1493),k=a(9352),B=a(2245),S=a(5381),t=a(5547);const E=i=>({percent:i}),z=i=>({count:i});function O(i,m){if(1&i){const e=t.RV6();t.j41(0,"cue-block-documents-by-suffix",11),t.bIt("navigated",function(c){u.eBV(e);const s=t.XpG();return u.Njj(s.handleNavigated(c))}),t.k0s()}if(2&i){t.XpG();const e=t.r8f(2),n=t.r8f(4);t.Y8G("data",e)("config",n)}}function T(i,m){if(1&i){const e=t.RV6();t.j41(0,"cue-block-documents-by-content-category",11),t.bIt("navigated",function(c){u.eBV(e);const s=t.XpG();return u.Njj(s.handleNavigated(c))}),t.k0s()}if(2&i){t.XpG();const e=t.r8f(3),n=t.r8f(4);t.Y8G("data",e)("config",n)}}function N(i,m){if(1&i&&(t.nrm(0,"cue-typography",7),t.nI1(1,"transloco")),2&i){const e=t.XpG();t.Y8G("innerHTML",t.i5U(1,1,"components.contentBlocks.projectDocuments.pctOpenFormats",t.eq3(4,E,e.openFormatPct())),t.npT)}}function A(i,m){if(1&i){const e=t.RV6();t.j41(0,"cue-typography",12),t.nI1(1,"transloco"),t.bIt("click",function(){u.eBV(e);const c=t.XpG();return u.Njj(c.getDuplicates())}),t.k0s()}2&i&&t.Y8G("innerHTML",t.i5U(1,1,1===m?"components.contentBlocks.projectDocuments.duplicateFilesSingular":"components.contentBlocks.projectDocuments.duplicateFilesPlural",t.eq3(4,z,m)),t.npT)}function W(i,m){if(1&i&&(t.j41(0,"cue-typography",10),t.EFF(1),t.k0s()),2&i){const e=t.XpG();t.R7$(),t.SpI("\u2696\ufe0f ",e.humanSize()," ")}}function L(i,m){if(1&i&&(t.j41(0,"cue-typography",10),t.EFF(1),t.k0s()),2&i){const e=t.XpG();t.R7$(),t.E5c("",e.filterKey(),": ",e.humanSizeFiltered()," (",e.countFiltered(),")")}}let G=(()=>{class i{data=(0,d.hFB)(void 0);_data=(0,u.vPA)(void 0);constructor(){let e=null;(0,u.QZP)(()=>{const n=this.data();null!==e&&clearTimeout(e),(0,r.O8)(()=>this._data.set(n)),e=setTimeout(()=>{e=null,(0,r.O8)(()=>this._data.set(this.data()))},100)})}config=d.hFB.required();handlers=(0,r.EW)(()=>this.config().handlers);filterKey=(0,u.vPA)("");bySuffix=(0,r.EW)(()=>{const e=this._data();if(e?.documentsBySuffix&&0!==Object.keys(e.documentsBySuffix).length)return{documents:e.documentsBySuffix}});byContentCategory=(0,r.EW)(()=>{const e=this._data();if(e?.documentsByContentCategory&&0!==Object.keys(e.documentsByContentCategory).length)return{documents:e.documentsByContentCategory}});duplicateCount=(0,r.EW)(()=>this._data()?.duplicateCount??0);size=(0,r.EW)(()=>{const e=this._data();if(!e)return 0;const n=Object.values(e.documentsBySuffix||{}).reduce((s,o)=>s+(o?.size||0),0),c=Object.values(e.documentsByContentCategory||{}).reduce((s,o)=>s+(o?.size||0),0);return Math.max(n,c)});documentCount=(0,r.EW)(()=>{const e=this._data();if(!e)return 0;const n=Object.values(e.documentsBySuffix||{}).reduce((s,o)=>s+(o?.count||0),0),c=Object.values(e.documentsByContentCategory||{}).reduce((s,o)=>s+(o?.count||0),0);return Math.max(n,c)});sizeFiltered=(0,u.vPA)(0);countFiltered=(0,u.vPA)(0);humanSize=(0,r.EW)(()=>(0,h.b)(this.size()));humanSizeFiltered=(0,r.EW)(()=>(0,h.b)(this.sizeFiltered()));openFormatPct=(0,r.EW)(()=>{const e=this._data();if(!e?.documentsBySuffix)return 0;let n=0,c=0;for(const[o,l]of Object.entries(e.documentsBySuffix)){if(!l)continue;const p=Number(l.count||0);n+=p;const x=o.toLowerCase().trim(),F=x.startsWith(".")?x:`.${x}`;D.V[F]?.open&&(c+=p)}return n>0?Math.round(c/n*100):null});configWithFilterResolver=(0,r.EW)(()=>{var e=this;const n=this.config();return{...n,handlers:{...n.handlers,docListFilterRequest:(c=(0,_.A)(function*(s,o){if(console.log("[ProjectDocuments] docListFilterRequest",s,o),!o||0===o.length)return;const l="contentCat"===s?(i=>{const m=i.split("#").pop()??i,e={AgreementDocument:"Agreement",ArchitecturalDesignDocument:"Architectural Design",AsBuiltDocument:"As-Built",BudgetEstimateDocument:"Budget Estimate",CertificationDocument:"Certification",ComplianceDocument:"Compliance",CorrespondenceDocument:"Correspondence",ConstructionContract:"Construction Contract",ConstructionProcessDocument:"Construction Process",ContractCondition:"Contract Condition",ContractRole:"Contract Role",ContractualDocument:"Contract",CostControlDocument:"Cost Control",DesignDocument:"Design Document",EmailAddress:"Email Address",EngineeringDesignDocument:"Engineering Design",FinancialAdministrativeDocument:"Financial/Administrative",FunctionalRequirementsDocument:"Functional Requirements",InspectionDocument:"Inspection",InsuranceBondDocument:"Insurance/Bond",InteriorDesignDocument:"Interior Design",MarketingCloseoutDocument:"Marketing Closeout",MiscDocument:"Miscellaneous",OperationManual:"Operation Manual",OperationsMaintenanceDocument:"Operations & Maintenance",OperationsManualDocument:"Operations Manual",OtherDocument:"Other",OtherContent:"Other Content",ProgressStatusReport:"Progress Status Report",QualityAssuranceDocument:"Quality Assurance",QualityControlDocument:"Quality Control",RegulatoryComplianceDocument:"Regulatory Compliance",SafetyDocument:"Safety",ScheduleDocument:"Schedule",SiteAssessmentDocument:"Site Assessment",TechnicalRequirementsDocument:"Technical Requirements",TechnicalSpecificationDocument:"Technical Specification",TenderingDocument:"Tendering Document",TermsAndConditionsDocument:"Terms & Conditions"};return void 0===e[m]&&console.log(`No pretty label for category: ${m}`),e[m]??m})(o[0]):o[0];if(e.filterKey.set(l),"suffix"===s){const f=e._data()?.documentsBySuffix;if(f){const j=o.reduce((C,y)=>C+(f[y.toLowerCase()]?.size||0),0),P=o.reduce((C,y)=>C+(f[y.toLowerCase()]?.count||0),0);e.sizeFiltered.set(j),e.countFiltered.set(P)}}else if("contentCat"===s){const f=e._data()?.documentsByContentCategory;if(f){const j=o.reduce((C,y)=>C+(f[y]?.size||0),0),P=o.reduce((C,y)=>C+(f[y]?.count||0),0);e.sizeFiltered.set(j),e.countFiltered.set(P)}}const p=n.handlers?.requestDocumentsByFilter;if(!p)return void console.warn("No requestDocumentsByFilter handler defined");const F=yield p([{type:"suffix"===s?"suffix":"content",included:o,excluded:[]}]);return{ids:F.map(f=>({id:f})),totalCount:F.length}}),function(o,l){return c.apply(this,arguments)})}};var c});handleNavigated(e){if(!e)return this.sizeFiltered.set(0),this.countFiltered.set(0),void this.filterKey.set("");this.filterKey.set(e.label);const n=this._data();if(!n)return;let c=0,s=0;if("suffix"===e.filterBy){const o=n.documentsBySuffix;e.values.forEach(l=>{const p=l.toLowerCase();c+=o[p]?.size||0,s+=o[p]?.count||0})}else if("contentCat"===e.filterBy){const o=n.documentsByContentCategory;e.values.forEach(l=>{c+=o[l]?.size||0,s+=o[l]?.count||0})}this.sizeFiltered.set(c),this.countFiltered.set(s)}handleCanvasClick(){this.sizeFiltered.set(0),this.countFiltered.set(0)}getDuplicates(){var e=this;return(0,_.A)(function*(){const n=e.handlers()?.subsequentBlockRequest;if(void 0===n)return void console.warn("No handler for subsequent block request");const c=e.handlers()?.documentDuplicatesRequest;if(!c)return void console.warn("No documentDuplicatesRequest handler defined");const s=yield c();n({id:"document-duplicates",config:e.config(),data:s,focusOnAdd:!0},"Duplicates",!0)})()}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=t.VBU({type:i,selectors:[["cue-block-project-documents"]],inputs:{data:[1,"data"],config:[1,"config"]},decls:19,vars:13,consts:[["direction","column"],[1,"container",3,"click"],["id","chart-1",1,"chart"],[3,"data","config"],["id","chart-2",1,"chart"],["direction","column","align","center",1,"stats"],[1,"stat-line"],["size","l",3,"innerHTML"],["size","l",1,"clickable",3,"innerHTML"],["direction","column","align","center",1,"sizes"],["size","l"],[3,"navigated","data","config"],["size","l",1,"clickable",3,"click","innerHTML"]],template:function(n,c){if(1&n&&(t.j41(0,"cue-flexcontainer",0)(1,"div",1),t.bIt("click",function(){return c.handleCanvasClick()}),t.SS7(2)(3)(4),t.j41(5,"div",2),t.nVh(6,O,1,2,"cue-block-documents-by-suffix",3),t.k0s(),t.j41(7,"div",4),t.nVh(8,T,1,2,"cue-block-documents-by-content-category",3),t.k0s(),t.j41(9,"cue-flexcontainer",5)(10,"div",6),t.nVh(11,N,2,6,"cue-typography",7),t.k0s(),t.j41(12,"div",6),t.nVh(13,A,2,6,"cue-typography",8),t.k0s()(),t.j41(14,"cue-flexcontainer",9)(15,"div",6),t.nVh(16,W,2,1,"cue-typography",10),t.k0s(),t.j41(17,"div",6),t.nVh(18,L,2,3,"cue-typography",10),t.k0s()()()()),2&n){let s;t.R7$(2);const o=t.bH3(c.bySuffix());t.R7$();const l=t.bH3(c.byContentCategory());t.R7$(),t.bH3(c.configWithFilterResolver()),t.R7$(),t.xc7("opacity",o?1:0),t.R7$(),t.vxM(o?6:-1),t.R7$(),t.xc7("opacity",l?1:0),t.R7$(),t.vxM(l?8:-1),t.R7$(3),t.vxM(null!==c.openFormatPct()?11:-1),t.R7$(2),t.vxM((s=c.duplicateCount())?13:-1,s),t.R7$(3),t.vxM(c.size()>0?16:-1),t.R7$(2),t.vxM(c.sizeFiltered()>0?18:-1)}},dependencies:[B.Typography,S.n,g.o,M.Y,k.Kj],styles:[".container[_ngcontent-%COMP%]{height:700px;width:100%;position:relative;overflow:hidden}.chart[_ngcontent-%COMP%]{position:absolute;width:470px;height:350px;transition:opacity .5s ease-in-out}#chart-1[_ngcontent-%COMP%]{top:20px;left:0}#chart-2[_ngcontent-%COMP%]{bottom:50px;right:0}.stats[_ngcontent-%COMP%]{position:absolute;right:230px;top:180px;transform:translate(50%);min-height:80px;justify-content:center}.sizes[_ngcontent-%COMP%]{position:absolute;left:230px;bottom:180px;transform:translate(-50%);min-height:80px;justify-content:center}.stat-line[_ngcontent-%COMP%]{height:32px;display:flex;align-items:center;justify-content:center}.clickable[_ngcontent-%COMP%]:hover{cursor:pointer;transform:scale(1.05)}"],changeDetection:0})}return i})()},6170(R,v,a){a.d(v,{R:()=>D});var _=a(7705),d=a(5802),u=a(2271),r=a(5547);let D=(()=>{class g{destroyRef=(0,d.WQX)(d.abz);_isDarkMode=(0,d.vPA)(this.hasDarkClass());isDarkMode=(0,u.EW)(()=>this._isDarkMode());darkModeChange=(0,_.CGW)();constructor(){const h=new MutationObserver(b=>{b.forEach(k=>{if("attributes"===k.type&&"class"===k.attributeName){const B=this.hasDarkClass();B!==this._isDarkMode()&&this._isDarkMode.set(B)}})});h.observe(document.body,{attributes:!0,attributeFilter:["class"]}),this.destroyRef.onDestroy(()=>h.disconnect()),(0,d.QZP)(()=>{this.darkModeChange.emit(this._isDarkMode()),document.documentElement.style.colorScheme=this._isDarkMode()?"dark":"light"})}hasDarkClass(){return document.body.classList.contains("dark")}toggleDarkMode(){document.body.classList.toggle("dark")}static \u0275fac=function(b){return new(b||g)};static \u0275dir=r.FsC({type:g,selectors:[["","cueDarkMode",""]],outputs:{darkModeChange:"darkModeChange"},exportAs:["darkModeDetector"]})}return g})()},1493(R,v,a){function _(d,u=!1,r=1){const D=u?1e3:1024;if(Math.abs(d)<D)return d+" B";const g=u?["kB","MB","GB","TB","PB","EB","ZB","YB"]:["KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let M=-1;const h=10**r;do{d/=D,++M}while(Math.round(Math.abs(d)*h)/h>=D&&M<g.length-1);return d.toFixed(r)+" "+g[M]}a.d(v,{b:()=>_})}}]);
package/839.js DELETED
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[839],{2014(k,D,o){o.d(D,{z:()=>_});var C=o(7705),s=o(2271),d=o(5547);const m=["*"];let _=(()=>{class h{justify=(0,C.hFB)("start");size=(0,C.hFB)("l");widthStyle=(0,s.EW)(()=>`var(--cue-button-label-padding-${this.size()}-x)`);static \u0275fac=function(f){return new(f||h)};static \u0275cmp=d.VBU({type:h,selectors:[["cue-button-padder"]],inputs:{justify:[1,"justify"],size:[1,"size"]},ngContentSelectors:m,decls:2,vars:4,template:function(f,b){1&f&&(d.NAR(),d.rj2(0,"div"),d.SdG(1),d.eux()),2&f&&d.xc7("justify-content",b.justify())("min-width",b.widthStyle())},styles:["div[_ngcontent-%COMP%]{display:flex;align-items:center;min-height:1px}"]})}return h})()},2839(k,D,o){o.d(D,{u:()=>F});var C=o(467),s=o(5802),d=o(7705),m=o(2271),_=o(2611),h=o(9352),L=o(1951),M=o(6455),f=o(8334),b=o(5949),x=o(2843),P=o(3646),g=o(8017),y=o(2306),u=o(6103);let p=(()=>{class l{mapboxToken=(0,s.vPA)(void 0);entityData=(0,s.vPA)({});availableEntityRelationships=(0,s.vPA)([]);settings=(0,m.EW)(()=>{const t=this.mapboxToken();if(!t)return;const e=new y.yY;return e.mapboxToken=t,e.contextMenu.showFlyTo=!1,e.contextMenu.showProperties=!1,e});layers=(0,m.EW)(()=>{const t=this.entityData(),e=this.availableEntityRelationships();return(0,u.N)({entityData:t,availableEntityRelationships:e})});static \u0275fac=function(e){return new(e||l)};static \u0275prov=s.jDH({token:l,factory:l.\u0275fac,providedIn:"root"})}return l})();var A=o(3183),R=o(5902);let B=(()=>{class l{entities=(0,s.vPA)([]);entityData=(0,s.vPA)({});orderByMentionCount=(0,s.vPA)(!1);availableEntityCategories=(0,s.vPA)(void 0);labelValue=(0,h.Xx)("components.entityList.labelValue");labelCategories=(0,h.Xx)("components.entityList.labelCategories");labelMentions=(0,h.Xx)("components.entityList.labelMentionCount");_filterChangeCounter=(0,s.vPA)(0);filterChangeCounter=this._filterChangeCounter.asReadonly();onFilterChanged(){this._filterChangeCounter.update(t=>t+1)}columnDefs=(0,m.EW)(()=>{const t=[{field:"value",headerName:this.labelValue(),flex:2,filter:R.U,valueGetter:e=>!e.data?.value&&e.data?.loading?"Loading...":e.data?.value||e.data?.entity},{field:"categories",headerName:this.labelCategories(),flex:1.5,filter:A.A,valueGetter:e=>{const n=e.data?.categories;if(!n)return e.data?.loading?"...":"";const a=Array.isArray(n)?n:[n],r=this._leafEntityCategoryIris();return(r?a.filter(v=>r.has(v)):a).map(v=>this._getEntityCategoryLabel(v)).join(", ")}}];return this.orderByMentionCount()&&t.push({field:"mentionCount",headerName:this.labelMentions(),flex:1,filter:"agNumberColumnFilter",valueGetter:e=>{const n=e.data;if(n?.loading)return"...";const a=n?.mentionCount??0;return a>0?a:""},cellStyle:{textAlign:"center"}}),t});rows=(0,m.EW)(()=>{const t=this.entities()||[],e=this.entityData()||{},n=t.map(a=>{const r=e[a];return{entity:a,value:r?.value,categories:r?.categories,mentionCount:r?.mentionCount,loading:!r}});return this.orderByMentionCount()?n.sort((a,r)=>(r.mentionCount||0)-(a.mentionCount||0)):n});_leafEntityCategoryIris=(0,m.EW)(()=>{const t=this.availableEntityCategories();if(!t)return null;const e=new Set(t.map(n=>n.parent).filter(n=>!!n));return new Set(t.filter(n=>!e.has(n.iri)).map(n=>n.iri))});_getEntityCategoryLabel(t){const e=this.availableEntityCategories();if(void 0!==e){const n=e.find(a=>a.iri===t);if(n)return n.label}return this._prettifyCategory(t)}_prettifyCategory(t){if(!t)return"";const e=t.split("#");return(e[e.length-1]||t).replace(/([A-Z])/g," $1").trim()}static \u0275fac=function(e){return new(e||l)};static \u0275prov=s.jDH({token:l,factory:l.\u0275fac,providedIn:"root"})}return l})();var T=o(5971),w=o(5448),O=o(2014),G=o(5381),i=o(5547);function U(l,z){if(1&l){const t=i.RV6();i.j41(0,"cue-flexcontainer",2)(1,"cue-button",5),i.bIt("click",function(){s.eBV(t);const n=i.XpG();return s.Njj(n.onOrderByMentionCountClick())}),i.nrm(2,"cue-button-padder"),i.j41(3,"cue-button-label"),i.EFF(4),i.nI1(5,"transloco"),i.k0s(),i.nrm(6,"cue-button-padder"),i.k0s()()}if(2&l){const t=i.XpG();i.R7$(),i.Y8G("tooltip",t.infoOrderByMentionCount()),i.R7$(3),i.JRh(i.bMT(5,2,"components.entityList.labelOrderByMentionCount"))}}function j(l,z){if(1&l){const t=i.RV6();i.j41(0,"cue-tab",1),i.nI1(1,"transloco"),i.j41(2,"cue-map",6),i.bIt("clickedFeature",function(n){s.eBV(t);const a=i.XpG();return s.Njj(a.onMapFeatureClick(n))}),i.k0s()()}if(2&l){i.XpG();const t=i.r8f(6),e=i.r8f(7);i.Y8G("label",i.bMT(1,3,"components.entityList.tabMap")),i.R7$(2),i.Y8G("layers",e)("settings",t)}}let F=(()=>{class l{map=(0,s.WQX)(p);table=(0,s.WQX)(B);entities=d.hFB.required();mapboxToken=(0,d.hFB)(void 0);handlers=d.hFB.required();availableEntityCategories=(0,d.hFB)(void 0);availableEntityRelationships=(0,d.hFB)();entityData=(0,d.hFB)({});paginationPageSize=(0,d.hFB)(10);prefetchPages=(0,d.hFB)(3);variant=(0,d.hFB)("none");rowClicked=(0,d.CGW)();clickedOpen=(0,d.CGW)();_gridApi=null;_requestedIris=new Set;_requestedLocationIris=new Set;_isSorted=!1;_pendingMapClickIri=(0,s.vPA)(null);_bufferedUntilIndex=(0,s.vPA)(0);_locationBufferedUntilIndex=0;_lastEntitiesKey="";_destroyed=!1;labelOpenInEntityViewer=(0,h.Xx)("components.entityList.labelOpenInEntityViewer");infoOrderByMentionCount=(0,h.Xx)("components.entityList.infoOrderByMentionCount");overlaySettings={...new L.K,mode:"row"};overlayActions=(0,m.EW)(()=>[{label:this.labelOpenInEntityViewer(),icon:"info",action:t=>{this.handlers().requestOpen?.(t.rowData),this.clickedOpen.emit(t.rowData)}}]);constructor(){(0,s.QZP)(()=>this.map.mapboxToken.set(this.mapboxToken())),(0,s.QZP)(()=>{const t=this.entityData();this.map.entityData.update(e=>{let n=!1;const a={...e};for(const[r,c]of Object.entries(t))(c.directMapGeometries?.length||c.indirectMapGeometries?.length)&&(a[r]={value:"",categories:[],directMapGeometries:c.directMapGeometries,indirectMapGeometries:c.indirectMapGeometries},n=!0);return n?a:e})}),(0,s.QZP)(()=>this.map.availableEntityRelationships.set(this.availableEntityRelationships()??[])),(0,s.QZP)(()=>this.table.availableEntityCategories.set(this.availableEntityCategories())),(0,s.QZP)(()=>this.table.entities.set(this.entities())),(0,s.QZP)(()=>this.table.entityData.set(this.entityData())),(0,s.QZP)(()=>{const t=this._pendingMapClickIri();if(!t)return;const e=this.entityData()[t];e&&(this._pendingMapClickIri.set(null),this.rowClicked.emit({entity:t,value:e.value,categories:e.categories,mentionCount:e.mentionCount,loading:!1}))}),(0,s.QZP)(()=>{const e=this.entities().join("|");if(e!==this._lastEntitiesKey)if(this._lastEntitiesKey=e,this._requestedIris.clear(),this._requestedLocationIris.clear(),this._bufferedUntilIndex.set(0),this._locationBufferedUntilIndex=0,this.handlers().checkHasLocations&&this.handlers().requestLocations){const n=(this.availableEntityCategories()??[]).map(a=>a.iri);this.handlers().checkHasLocations(n).then(a=>{a&&!this._destroyed&&this._requestLocationBatch()})}else this.handlers().requestLocations&&setTimeout(()=>this._requestLocationBatch())}),(0,s.QZP)(()=>{const t=this.table.orderByMentionCount(),e=this.table.filterChangeCounter();if(t||e>0){const r=this.entities().filter(c=>!this._requestedIris.has(c));r.length>0&&(r.forEach(c=>this._requestedIris.add(c)),this.handlers().requestData(r,t))}})}rowSelection={mode:"singleRow",checkboxes:!1,enableClickSelection:!0};onGridReady(t){this._gridApi=t,t.addEventListener("viewportChanged",()=>this._checkViewport()),t.addEventListener("modelUpdated",()=>this._checkViewport()),t.addEventListener("paginationChanged",()=>this._checkViewport()),t.addEventListener("sortChanged",()=>{const e=t.getColumnState();this._isSorted=e.some(n=>null!=n.sort),this._isSorted&&this._requestAllUnloaded()}),t.addEventListener("filterChanged",()=>{this.table.onFilterChanged()}),setTimeout(()=>this._checkViewport(),100)}onMapFeatureClick(t){var e=this;return(0,C.A)(function*(){const a=t.feature.properties?.iri;a&&(e._pendingMapClickIri.set(a),yield e.handlers().requestData?.([a],e.table.orderByMentionCount()))})()}_checkViewport(){if(!this._gridApi||this._gridApi.isDestroyed?.())return;if(this._isSorted)return void this._requestAllUnloaded();const t=this.entities(),e=t.length;if(!e)return;const n=Math.max(1,this._gridApi.paginationGetPageSize?.()??this.paginationPageSize()),r=Math.max(0,this._gridApi.paginationGetCurrentPage?.()??0)*n,c=Math.min(e,r+n),v=this._bufferedUntilIndex();let E=null;if(0===v?E=0:(r>=Math.max(0,v-n)||c>v)&&(E=v),null===E||E>=e)return;const V=n*Math.max(1,this.prefetchPages()),N=Math.min(e,E+V),S=t.slice(E,N).filter(I=>!this._requestedIris.has(I));this._bufferedUntilIndex.set(Math.max(v,N)),S.length&&(S.forEach(I=>this._requestedIris.add(I)),setTimeout(()=>this.handlers().requestData(S,this.table.orderByMentionCount())))}_requestLocationBatch(){if(!this.handlers().requestLocations)return;const t=this.entities(),e=t.length;if(this._locationBufferedUntilIndex>=e)return;const a=Math.min(e,this._locationBufferedUntilIndex+500),r=t.slice(this._locationBufferedUntilIndex,a).filter(c=>!this._requestedLocationIris.has(c));this._locationBufferedUntilIndex=a,r.length>0&&(r.forEach(c=>this._requestedLocationIris.add(c)),setTimeout(()=>this.handlers().requestLocations(r))),a<e&&!this._destroyed&&setTimeout(()=>this._requestLocationBatch(),200)}ngOnDestroy(){this._destroyed=!0,this._gridApi=null}_requestAllUnloaded(){if(!this._gridApi)return;const t=[];if(this._gridApi.forEachNode(e=>{const n=e.data;n?.loading&&!this._requestedIris.has(n.entity)&&t.push(n.entity)}),t.length>0){const e=Array.from(new Set(t));e.forEach(n=>this._requestedIris.add(n)),this.handlers().requestData(e,this.table.orderByMentionCount())}}onOrderByMentionCountClick(){this.table.orderByMentionCount.set(!this.table.orderByMentionCount())}static \u0275fac=function(e){return new(e||l)};static \u0275cmp=i.VBU({type:l,selectors:[["cue-ent-list-inner"]],inputs:{entities:[1,"entities"],mapboxToken:[1,"mapboxToken"],handlers:[1,"handlers"],availableEntityCategories:[1,"availableEntityCategories"],availableEntityRelationships:[1,"availableEntityRelationships"],entityData:[1,"entityData"],paginationPageSize:[1,"paginationPageSize"],prefetchPages:[1,"prefetchPages"],variant:[1,"variant"]},outputs:{rowClicked:"rowClicked",clickedOpen:"clickedOpen"},features:[i.Jv_([b.u,x.M,P.B,p,B])],decls:9,vars:14,consts:[[2,"position","relative","width","100%","height","100%","display","flex","flex-direction","column","gap","12px",3,"variant"],[3,"label"],["direction","row","justify","end",2,"width","100%","padding-bottom","6px"],[2,"flex","1","min-height","0","position","relative","display","flex","flex-direction","column"],["height","100%",2,"flex","1","min-height","0",3,"gridApiReady","selectedRows","columnDefs","rowData","rowSelection","paginationPageSize","overlaySettings","overlayActions"],["size","xs","variant","secondary",3,"click","tooltip"],[3,"clickedFeature","layers","settings"]],template:function(e,n){if(1&e&&(i.j41(0,"cue-tabs",0)(1,"cue-tab",1),i.nI1(2,"transloco"),i.nVh(3,U,7,4,"cue-flexcontainer",2),i.j41(4,"div",3)(5,"cue-ag-grid",4),i.bIt("gridApiReady",function(r){return n.onGridReady(r)})("selectedRows",function(r){return r[0]&&n.rowClicked.emit(r[0])}),i.k0s()()(),i.SS7(6)(7),i.nVh(8,j,3,5,"cue-tab",1),i.k0s()),2&e){i.Y8G("variant",n.variant()),i.R7$(),i.Y8G("label",i.bMT(2,10,"components.entityList.tabList")),i.R7$(2),i.vxM(n.table.orderByMentionCount()?-1:3),i.R7$(2),i.Y8G("columnDefs",n.table.columnDefs())("rowData",n.table.rows())("rowSelection",n.rowSelection)("paginationPageSize",n.paginationPageSize())("overlaySettings",n.overlaySettings)("overlayActions",n.overlayActions()),i.R7$();const a=i.bH3(n.map.settings());i.R7$();const r=i.bH3(n.map.layers());i.R7$(),i.vxM(r.length>0&&a?8:-1)}},dependencies:[_.R,M.t,f.o,g.T,T.$,w.L,O.z,G.n,h.Kj],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}"],changeDetection:0})}return l})()},6103(k,D,o){o.d(D,{N:()=>m});var C=o(2306),s=o(140),d=o(58);function m({entityData:_,availableEntityRelationships:h}){const L=g=>h.find(y=>y.iri===g)?.label??g.split("#").pop()??g,M=[],f={};for(const[g,y]of Object.entries(_)){for(const u of y.directMapGeometries??[])M.push({iri:g,wkt:u.wkt});for(const u of y.indirectMapGeometries??[]){f[u.rel]||(f[u.rel]=[]);for(const p of u.geometries)f[u.rel].push({iri:u.entityUUID,wkt:p.wkt})}}const b=(g,y,u)=>{if(!y.length)return null;const p=new C.ux(g,g);return p.category=u,p.collection=new s.o(y.flatMap(({iri:A,wkt:R})=>{const B=(0,d.S)(R);return B?[{type:"Feature",geometry:(0,d.n)(B),properties:{iri:A}}]:[]})),p},x=[],P=b("direct",M,"Direct");P&&x.push(P);for(const[g,y]of Object.entries(f)){const u=L(g),p=b(u,y,u);p&&x.push(p)}return x}}}]);