@qaecy/cue-ui 0.0.51 → 0.0.53

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/2516.js ADDED
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[2516],{2014(z,N,g){g.d(N,{z:()=>n});var v=g(7705),_=g(2271),F=g(5547);const d=["*"];let n=(()=>{class m{justify=(0,v.hFB)("start");size=(0,v.hFB)("l");widthStyle=(0,_.EW)(()=>`var(--cue-button-label-padding-${this.size()}-x)`);static \u0275fac=function(T){return new(T||m)};static \u0275cmp=F.VBU({type:m,selectors:[["cue-button-padder"]],inputs:{justify:[1,"justify"],size:[1,"size"]},ngContentSelectors:d,decls:2,vars:4,template:function(T,P){1&T&&(F.NAR(),F.rj2(0,"div"),F.SdG(1),F.eux()),2&T&&F.xc7("justify-content",P.justify())("min-width",P.widthStyle())},styles:["div[_ngcontent-%COMP%]{display:flex;align-items:center;min-height:1px}"]})}return m})()},7517(z,N,g){g.d(N,{P:()=>Q});var v=g(7705),_=g(2271),F=g(2245),d=g(1359),n=g(5381),m=g(5547),u=g(5802);const y=(k,A)=>A.category;function T(k,A){if(1&k){const D=m.RV6();m.j41(0,"cue-flexcontainer",1)(1,"cue-checkbox",2),m.bIt("checkedChange",function(){u.eBV(D);const M=m.XpG();return u.Njj(M.toggleAll())}),m.k0s()()}if(2&k){const D=m.XpG();m.R7$(),m.Y8G("checked",D.allVisible())}}function P(k,A){if(1&k&&(m.j41(0,"cue-typography",3),m.EFF(1),m.k0s()),2&k){const D=m.XpG().$implicit;m.R7$(),m.JRh(D.category)}}function W(k,A){if(1&k){const D=m.RV6();m.j41(0,"cue-flexcontainer",1)(1,"cue-checkbox",4),m.bIt("checkedChange",function(){const M=u.eBV(D).$implicit,I=m.XpG(2);return u.Njj(I.toggleSingle(M))}),m.k0s(),m.j41(2,"cue-typography",5),m.bIt("click",function(){const M=u.eBV(D).$implicit,I=m.XpG(2);return u.Njj(I.toggleSingle(M))}),m.EFF(3),m.k0s()()}if(2&k){const D=A.$implicit;m.R7$(),m.Y8G("checked",D.visible)("color",D.color),m.R7$(2),m.JRh(D.label)}}function j(k,A){if(1&k&&(m.nVh(0,P,2,1,"cue-typography",3),m.Z7z(1,W,4,3,"cue-flexcontainer",1,m.Vm6)),2&k){const D=A.$implicit;m.vxM(D.category?0:-1),m.R7$(),m.Dyx(D.items)}}let Q=(()=>{class k{layers=(0,v.geq)([]);visibilityChange=(0,v.CGW)();layerChange=(0,v.CGW)();visibilityAll=(0,v.CGW)();showCheckAll=(0,_.EW)(()=>this.layers().length>1);allVisible=(0,_.EW)(()=>this.layers().every(D=>D.visible));groupedLayers=(0,_.EW)(()=>{const D=[];for(const E of this.layers()){const M=E.category,I=D.find(q=>q.category===M);I?I.items.push(E):D.push({category:M,items:[E]})}return D});toggleAll(){const D=this.allVisible(),E=this.layers().map(M=>(M.visible=!D,M));this.layers.update(()=>[...E]),this.visibilityAll.emit(D),this.emitChange()}toggleSingle(D){D.visible=!D.visible,this.layerChange.emit(D),this.layers.update(()=>[...this.layers()]),this.emitChange()}emitChange(){this.visibilityChange.emit(this.layers())}static \u0275fac=function(E){return new(E||k)};static \u0275cmp=m.VBU({type:k,selectors:[["cue-layer-legend"]],inputs:{layers:[1,"layers"]},outputs:{layers:"layersChange",visibilityChange:"visibilityChange",layerChange:"layerChange",visibilityAll:"visibilityAll"},decls:4,vars:1,consts:[["direction","column"],["align","center","justify","start",2,"width","100%"],["size","s",3,"checkedChange","checked"],["variant","label",2,"margin-top","4px","opacity","0.6"],["size","s",3,"checkedChange","checked","color"],[2,"cursor","pointer",3,"click"]],template:function(E,M){1&E&&(m.j41(0,"cue-flexcontainer",0),m.nVh(1,T,2,1,"cue-flexcontainer",1),m.Z7z(2,j,3,1,null,null,y),m.k0s()),2&E&&(m.R7$(),m.vxM(M.showCheckAll()?1:-1),m.R7$(),m.Dyx(M.groupedLayers()))},dependencies:[n.n,F.Typography,d.Checkbox],encapsulation:2,changeDetection:0})}return k})()},8334(z,N,g){g.d(N,{o:()=>d});var v=g(7705),_=g(5547);const F=["*"];let d=(()=>{class n{label=v.hFB.required();active=(0,v.geq)(!1);static \u0275fac=function(y){return new(y||n)};static \u0275cmp=_.VBU({type:n,selectors:[["cue-tab"]],hostVars:1,hostBindings:function(y,T){2&y&&_.Avn("hidden",!T.active())},inputs:{label:[1,"label"],active:[1,"active"]},outputs:{active:"activeChange"},ngContentSelectors:F,decls:1,vars:0,template:function(y,T){1&y&&(_.NAR(),_.SdG(0))},styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;flex:1;min-height:0}[hidden][_nghost-%COMP%]{display:none!important}"]})}return n})()},6455(z,N,g){g.d(N,{t:()=>k});var v=g(7705),_=g(5802),F=g(2271),d=g(8334),n=g(5187),m=g(9769),u=g(5547);const y=["*"],T=(A,D)=>D.label();function P(A,D){if(1&A&&(u.j41(0,"cue-card",1),u.eu8(1,2),u.k0s()),2&A){const E=u.XpG(),M=u.sdS(3);u.Y8G("variant",E._cardVariant())("padded",!1),u.R7$(),u.Y8G("ngTemplateOutlet",M)}}function W(A,D){if(1&A&&u.eu8(0,2),2&A){u.XpG();const E=u.sdS(3);u.Y8G("ngTemplateOutlet",E)}}function j(A,D){if(1&A){const E=u.RV6();u.j41(0,"button",6),u.bIt("click",function(){const I=_.eBV(E).$index,q=u.XpG(2);return _.Njj(q.setActive(I))}),u.EFF(1),u.k0s()}if(2&A){const E=D.$implicit,M=D.$index,I=u.XpG(2);u.AVh("active",I.activeIndex()===M),u.R7$(),u.SpI(" ",E.label()," ")}}function Q(A,D){if(1&A&&(u.j41(0,"div",3),u.Z7z(1,j,2,3,"button",4,T),u.k0s(),u.j41(3,"div",5),u.SdG(4),u.k0s()),2&A){const E=u.XpG();u.R7$(),u.Dyx(E.tabs())}}let k=(()=>{class A{tabs=(0,v.tEk)(d.o);activeIndex=(0,_.vPA)(0);variant=(0,v.hFB)("none");_cardVariant=(0,F.EW)(()=>"none"===this.variant()?"default":this.variant());constructor(){(0,_.QZP)(()=>{const E=this.tabs(),M=this.activeIndex();E.forEach((I,q)=>I.active.set(q===M))})}setActive(E){this.activeIndex.set(E)}static \u0275fac=function(M){return new(M||A)};static \u0275cmp=u.VBU({type:A,selectors:[["cue-tabs"]],contentQueries:function(M,I,q){1&M&&u.C6U(q,I.tabs,d.o,4),2&M&&u.NyB()},inputs:{variant:[1,"variant"]},ngContentSelectors:y,decls:4,vars:1,consts:[["inner",""],[2,"height","100%","width","100%","display","flex","flex-direction","column","overflow","hidden",3,"variant","padded"],[3,"ngTemplateOutlet"],[1,"tabs-header"],[1,"tab-button",3,"active"],[1,"tabs-content"],[1,"tab-button",3,"click"]],template:function(M,I){1&M&&(u.NAR(),u.nVh(0,P,2,3,"cue-card",1)(1,W,1,1,"ng-container",2),u.DNE(2,Q,5,0,"ng-template",null,0,u.C5r)),2&M&&u.vxM("none"!==I.variant()?0:1)},dependencies:[n.Card,m.T3],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column;box-sizing:border-box;border-radius:var(--cue-card-border-radius);border:1px solid var(--cue-card-border-color);background-color:var(--cue-default);color:var(--cue-defaultContrast);overflow:hidden}.tabs-header[_ngcontent-%COMP%]{display:flex;border-bottom:1px solid var(--cue-card-border-color);background-color:var(--background-color, var(--cue-default))}.tab-button[_ngcontent-%COMP%]{padding:10px 16px;background:none;border:none;border-bottom:2px solid transparent;cursor:pointer;color:inherit;font-family:var(--cue-font-family);font-size:var(--cue-font-s-size);line-height:var(--cue-font-s-line-height);opacity:.6;transition:opacity .15s,border-bottom-color .15s}.tab-button[_ngcontent-%COMP%]:hover{opacity:.9}.tab-button.active[_ngcontent-%COMP%]{border-bottom-color:currentColor;opacity:1;font-weight:500}.tabs-content[_ngcontent-%COMP%]{padding:var(--cue-card-padding-y) var(--cue-card-padding-x);flex:1;min-height:0;box-sizing:border-box;display:flex;flex-direction:column}"]})}return A})()},2481(z,N,g){g.d(N,{CueSparqlClientSdk:()=>In});var v=g(7705),_=g(2271),F=g(467),d=g(5802),n=g(5547),m=g(6019),u=g(7089),y=g(7717),T=g(5661),P=g(1096),W=g(9937),j=g(6117),Q=g(356),k=g(6279);function A(e){return Array.isArray?Array.isArray(e):"[object Array]"===Re(e)}function E(e){return null==e?"":function D(e){if("string"==typeof e)return e;if("bigint"==typeof e)return e.toString();const s=e+"";return"0"==s&&1/e==-1/0?"-0":s}(e)}function M(e){return"string"==typeof e}function I(e){return"number"==typeof e}function De(e){return"object"==typeof e}function L(e){return null!=e}function Z(e){return!e.trim().length}function Re(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const ae="Invalid doc index: must be a non-negative integer within the bounds of the docs array",Ae=Object.prototype.hasOwnProperty;var Ke=class{constructor(e){this._keys=[],this._keyMap={};let s=0;e.forEach(t=>{const i=Ee(t);this._keys.push(i),this._keyMap[i.id]=i,s+=i.weight}),this._keys.forEach(t=>{t.weight/=s})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function Ee(e){let s=null,t=null,i=null,r=1,o=null;if(M(e)||A(e))i=e,s=xe(e),t=ee(e);else{if(!Ae.call(e,"name"))throw new Error("Missing name property in key");const a=e.name;if(i=a,Ae.call(e,"weight")&&void 0!==e.weight&&(r=e.weight,r<=0))throw new Error((e=>`Property 'weight' in key '${e}' must be a positive integer`)(ee(a)));s=xe(a),t=ee(a),o=e.getFn??null}return{path:s,id:t,weight:r,src:i,getFn:o}}function xe(e){return A(e)?e:e.split(".")}function ee(e){return A(e)?e.join("."):e}const b=Object.freeze({isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,s)=>e.score===s.score?e.idx<s.idx?-1:1:e.score<s.score?-1:1,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:.6,distance:100,useExtendedSearch:!1,useTokenSearch:!1,tokenize:void 0,tokenMatch:"any",getFn:function Ye(e,s){const t=[];let i=!1;const r=(o,a,c,l)=>{if(L(o))if(a[c]){const f=o[a[c]];if(!L(f))return;if(c===a.length-1&&(M(f)||I(f)||function q(e){return!0===e||!1===e||function Ge(e){return De(e)&&null!==e}(e)&&"[object Boolean]"==Re(e)}(f)||"bigint"==typeof f))t.push(void 0!==l?{v:E(f),i:l}:E(f));else if(A(f)){i=!0;for(let h=0,p=f.length;h<p;h+=1)r(f[h],a,c+1,h)}else a.length&&r(f,a,c+1,l)}else t.push(void 0!==l?{v:o,i:l}:o)};return r(e,M(s)?s.split("."):s,0),i?t:t[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1});var ce=class{constructor({getFn:e=b.getFn,fieldNormWeight:s=b.fieldNormWeight}={}){this.norm=function Je(e=1,s=3){const t=new Map,i=Math.pow(10,s);return{get(r){let o=1,a=!1;for(let l=0;l<r.length;l++)32===r.charCodeAt(l)?a||(o++,a=!0):a=!1;if(t.has(o))return t.get(o);const c=Math.round(i/Math.pow(o,.5*e))/i;return t.set(o,c),c},clear(){t.clear()}}}(s,3),this.getFn=e,this.isCreated=!1,this.docs=[],this.keys=[],this._keysMap={},this.setIndexRecords()}setSources(e=[]){this.docs=e}setIndexRecords(e=[]){this.records=e}setKeys(e=[]){this.keys=e,this._keysMap={},e.forEach((s,t)=>{this._keysMap[s.id]=t})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;const e=this.docs.length;this.records=new Array(e);let s=0;if(M(this.docs[0]))for(let t=0;t<e;t++){const i=this._createStringRecord(this.docs[t],t);i&&(this.records[s++]=i)}else for(let t=0;t<e;t++)this.records[s++]=this._createObjectRecord(this.docs[t],t);this.records.length=s,this.norm.clear()}add(e,s){if(!Number.isInteger(s)||s<0)throw new Error(ae);if(M(e)){const i=this._createStringRecord(e,s);return i&&this.records.push(i),i}const t=this._createObjectRecord(e,s);return this.records.push(t),t}removeAt(e){if(!Number.isInteger(e)||e<0)throw new Error(ae);for(let s=0,t=this.records.length;s<t;s+=1)if(this.records[s].i===e){this.records.splice(s,1);break}for(let s=0,t=this.records.length;s<t;s+=1)this.records[s].i>e&&(this.records[s].i-=1)}removeAll(e){const s=new Set;for(const i of e)Number.isInteger(i)&&i>=0&&s.add(i);if(0===s.size)return;this.records=this.records.filter(i=>!s.has(i.i));const t=Array.from(s).sort((i,r)=>i-r);for(const i of this.records){let r=0,o=t.length;for(;r<o;){const a=r+o>>>1;t[a]<i.i?r=a+1:o=a}i.i-=r}}getValueForItemAtKeyId(e,s){return e[this._keysMap[s]]}size(){return this.records.length}_createStringRecord(e,s){return!L(e)||Z(e)?null:{v:e,i:s,n:this.norm.get(e)}}_createObjectRecord(e,s){const t={i:s,$:{}};for(let i=0,r=this.keys.length;i<r;i++){const o=this.keys[i],a=o.getFn?o.getFn(e):this.getFn(e,o.path);if(L(a))if(A(a)){const c=[];for(let l=0,f=a.length;l<f;l+=1){const h=a[l];if(L(h))if(M(h)){if(!Z(h)){const p={v:h,i:l,n:this.norm.get(h)};c.push(p)}}else if(L(h.v)){const p=M(h.v)?h.v:E(h.v);if(!Z(p)){const C={v:p,i:h.i,n:this.norm.get(p)};c.push(C)}}}t.$[i]=c}else if(M(a)&&!Z(a)){const c={v:a,n:this.norm.get(a)};t.$[i]=c}}return t}toJSON(){return{keys:this.keys.map(({getFn:e,...s})=>s),records:this.records}}};function Te(e,s,{getFn:t=b.getFn,fieldNormWeight:i=b.fieldNormWeight}={}){const r=new ce({getFn:t,fieldNormWeight:i});return r.setKeys(e.map(Ee)),r.setSources(s),r.create(),r}function Ze(e,{getFn:s=b.getFn,fieldNormWeight:t=b.fieldNormWeight}={}){const{keys:i,records:r}=e,o=new ce({getFn:s,fieldNormWeight:t});return o.setKeys(i),o.setIndexRecords(r),o}function nt(e){const s={};for(let t=0,i=e.length;t<i;t+=1){const r=e.charAt(t);s[r]=(s[r]||0)|1<<i-t-1}return s}function le(e){if(e.length<=1)return e;e.sort((t,i)=>t[0]-i[0]||t[1]-i[1]);const s=[e[0]];for(let t=1,i=e.length;t<i;t+=1){const r=s[s.length-1],o=e[t];o[0]<=r[1]+1?r[1]=Math.max(r[1],o[1]):s.push(o)}return s}const Fe={\u0142:"l",\u0141:"L",\u0111:"d",\u0110:"D",\u00f8:"o",\u00d8:"O",\u0127:"h",\u0126:"H",\u0167:"t",\u0166:"T",\u0131:"i",\u00df:"ss"},st=new RegExp("["+Object.keys(Fe).join("")+"]","g"),Y="function"==typeof String.prototype.normalize?e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"").replace(st,s=>Fe[s]):e=>e;var ue=class{constructor(e,{location:s=b.location,threshold:t=b.threshold,distance:i=b.distance,includeMatches:r=b.includeMatches,findAllMatches:o=b.findAllMatches,minMatchCharLength:a=b.minMatchCharLength,isCaseSensitive:c=b.isCaseSensitive,ignoreDiacritics:l=b.ignoreDiacritics,ignoreLocation:f=b.ignoreLocation}={}){if(this.options={location:s,threshold:t,distance:i,includeMatches:r,findAllMatches:o,minMatchCharLength:a,isCaseSensitive:c,ignoreDiacritics:l,ignoreLocation:f},e=c?e:e.toLowerCase(),e=l?Y(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const h=(C,x)=>{this.chunks.push({pattern:C,alphabet:nt(C),startIndex:x})},p=this.pattern.length;if(p>32){let C=0;const x=p%32,R=p-x;for(;C<R;)h(this.pattern.substr(C,32),C),C+=32;if(x){const S=p-32;h(this.pattern.substr(S),S)}}else h(this.pattern,0)}searchIn(e){const{isCaseSensitive:s,ignoreDiacritics:t,includeMatches:i}=this.options;if(e=s?e:e.toLowerCase(),e=t?Y(e):e,this.pattern===e){const R={isMatch:!0,score:0};return i&&(R.indices=[[0,e.length-1]]),R}const{location:r,distance:o,threshold:a,findAllMatches:c,minMatchCharLength:l,ignoreLocation:f}=this.options,h=[];let p=0,C=!1;this.chunks.forEach(({pattern:R,alphabet:S,startIndex:w})=>{const{isMatch:$,score:X,indices:H}=function tt(e,s,t,{location:i=b.location,distance:r=b.distance,threshold:o=b.threshold,findAllMatches:a=b.findAllMatches,minMatchCharLength:c=b.minMatchCharLength,includeMatches:l=b.includeMatches,ignoreLocation:f=b.ignoreLocation}={}){if(s.length>32)throw new Error("Pattern length exceeds max of 32.");const h=s.length,p=e.length,C=Math.max(0,Math.min(i,p));let x=o,R=C;const S=(B,V)=>{const O=B/h;if(f)return O;const J=Math.abs(C-V);return r?O+J/r:J?1:O},w=c>1||l,$=w?Array(p):[];let X;for(;(X=e.indexOf(s,R))>-1;){const B=S(0,X);if(x=Math.min(B,x),R=X+h,w){let V=0;for(;V<h;)$[X+V]=1,V+=1}}R=-1;let H=[],re=1,$e=0,oe=h+p;const wn=1<<h-1;for(let B=0;B<h;B+=1){let V=0,O=oe;for(;V<O;)S(B,C+O)<=x?V=O:oe=O,O=Math.floor((oe-V)/2+V);oe=O;let J=Math.max(1,C-O+1);const be=a?p:Math.min(C+O,p)+h,K=Array(be+2);K[be+1]=(1<<B)-1;for(let G=be;G>=J;G-=1){const Me=G-1;if(K[G]=(K[G+1]<<1|1)&t[e[Me]],B&&(K[G]|=(H[G+1]|H[G])<<1|1|H[G+1]),K[G]&wn&&(re=S(B,Me),re<=x)){if(x=re,R=Me,$e=B,R<=C)break;J=Math.max(1,2*C-R)}}if(S(B+1,C)>x)break;H=K}if(w&&R>=0){const B=Math.min(p-1,R+h-1+$e);for(let V=R;V<=B;V+=1)t[e[V]]&&($[V]=1)}const Ce={isMatch:R>=0,score:Math.max(.001,re)};if(w){const B=function et(e=[],s=b.minMatchCharLength){const t=[];let i=-1,r=-1,o=0;for(let a=e.length;o<a;o+=1){const c=e[o];c&&-1===i?i=o:!c&&-1!==i&&(r=o-1,r-i+1>=s&&t.push([i,r]),i=-1)}return e[o-1]&&o-i>=s&&t.push([i,o-1]),t}($,c);B.length?l&&(Ce.indices=B):Ce.isMatch=!1}return Ce}(e,R,S,{location:r+w,distance:o,threshold:a,findAllMatches:c,minMatchCharLength:l,includeMatches:i,ignoreLocation:f});$&&(C=!0),p+=X,$&&H&&h.push(...H)});const x={isMatch:C,score:C?p/this.chunks.length:1};return C&&i&&(x.indices=le(h)),x}};const it=new Set(["fuzzy","include"]);function rt(e){return e.startsWith("inverse")}const de=[{type:"exact",multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:e=>({type:"exact",search(s){const t=s===e;return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}})},{type:"include",multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:e=>({type:"include",search(s){let i,t=0;const r=[],o=e.length;for(;(i=s.indexOf(e,t))>-1;)t=i+o,r.push([i,t-1]);const a=!!r.length;return{isMatch:a,score:a?0:1,indices:r}}})},{type:"prefix-exact",multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:e=>({type:"prefix-exact",search(s){const t=s.startsWith(e);return{isMatch:t,score:t?0:1,indices:[0,e.length-1]}}})},{type:"inverse-prefix-exact",multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:e=>({type:"inverse-prefix-exact",search(s){const t=!s.startsWith(e);return{isMatch:t,score:t?0:1,indices:[0,s.length-1]}}})},{type:"inverse-suffix-exact",multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:e=>({type:"inverse-suffix-exact",search(s){const t=!s.endsWith(e);return{isMatch:t,score:t?0:1,indices:[0,s.length-1]}}})},{type:"suffix-exact",multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:e=>({type:"suffix-exact",search(s){const t=s.endsWith(e);return{isMatch:t,score:t?0:1,indices:[s.length-e.length,s.length-1]}}})},{type:"inverse-exact",multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:e=>({type:"inverse-exact",search(s){const t=-1===s.indexOf(e);return{isMatch:t,score:t?0:1,indices:[0,s.length-1]}}})},{type:"fuzzy",multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(e,s={})=>{const t=new ue(e,{location:s.location??b.location,threshold:s.threshold??b.threshold,distance:s.distance??b.distance,includeMatches:s.includeMatches??b.includeMatches,findAllMatches:s.findAllMatches??b.findAllMatches,minMatchCharLength:s.minMatchCharLength??b.minMatchCharLength,isCaseSensitive:s.isCaseSensitive??b.isCaseSensitive,ignoreDiacritics:s.ignoreDiacritics??b.ignoreDiacritics,ignoreLocation:s.ignoreLocation??b.ignoreLocation});return{type:"fuzzy",search:i=>t.searchIn(i)}}}],ke=de.length;function Se(e,s){const t=e.match(s);return t?t[1]:null}const he=[];function fe(...e){he.push(...e)}function te(e,s){for(let t=0,i=he.length;t<i;t+=1){const r=he[t];if(r.condition(e,s))return new r(e,s)}return new ue(e,s)}const ne_AND="$and",me=e=>!(!e.$and&&!e.$or),Ie=e=>({[ne_AND]:Object.keys(e).map(s=>({[s]:e[s]}))});function we(e,s,{auto:t=!0}={}){const i=r=>{if(M(r)){const l={keyId:null,pattern:r};return t&&(l.searcher=te(r,s)),l}const o=Object.keys(r),a=(e=>!!e.$path)(r);if(!a&&o.length>1&&!me(r))return i(Ie(r));if((e=>!A(e)&&De(e)&&!me(e))(r)){const l=a?r.$path:o[0],f=a?r.$val:r[l];if(!M(f))throw new Error((e=>`Invalid value for key ${e}`)(l));const h={keyId:ee(l),pattern:f};return t&&(h.searcher=te(f,s)),h}const c={children:[],operator:o[0]};return o.forEach(l=>{const f=r[l];A(f)&&f.forEach(h=>{c.children.push(i(h))})}),c};return me(e)||(e=Ie(e)),i(e)}function pe(e,{ignoreFieldNorm:s=b.ignoreFieldNorm}){let t=1;return e.forEach(({key:i,norm:r,score:o})=>{const a=i?i.weight:null;t*=Math.pow(0===o&&a?Number.EPSILON:o,(a||1)*(s?1:r))}),t}var gt=class{constructor(e){this.limit=e,this.heap=[]}get size(){return this.heap.length}shouldInsert(e){return this.size<this.limit||e<this.heap[0].score}insert(e){this.size<this.limit?(this.heap.push(e),this._bubbleUp(this.size-1)):e.score<this.heap[0].score&&(this.heap[0]=e,this._sinkDown(0))}extractSorted(e){return this.heap.sort(e)}_bubbleUp(e){const s=this.heap;for(;e>0;){const t=e-1>>1;if(s[e].score<=s[t].score)break;const i=s[e];s[e]=s[t],s[t]=i,e=t}}_sinkDown(e){const s=this.heap,t=s.length;let i=e;do{const r=2*(e=i)+1,o=2*e+2;if(r<t&&s[r].score>s[i].score&&(i=r),o<t&&s[o].score>s[i].score&&(i=o),i!==e){const a=s[e];s[e]=s[i],s[i]=a}}while(i!==e)}};const _t=/[\p{L}\p{M}\p{N}_]+/gu,Be=new WeakSet;function _e({isCaseSensitive:e=!1,ignoreDiacritics:s=!1,tokenize:t}={}){const i=function vt(e){if("function"==typeof e){let s=!1;return t=>{const i=e(t);if(!s&&(s=!0,!Array.isArray(i)||i.some(r=>"string"!=typeof r)))throw new Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(i)?"array containing non-strings":typeof i}.`);return i}}return e instanceof RegExp?(e.global||function yt(e){Be.has(e)||(Be.add(e),console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))}(e),s=>s.match(e)||[]):s=>s.match(_t)||[]}(t);return{tokenize:r=>(e||(r=r.toLowerCase()),s&&(r=Y(r)),i(r))}}function ye(e,s,t,i){const r=i.tokenize(s);if(!r.length)return;e.fieldCount++,e.docFieldCount.set(t,(e.docFieldCount.get(t)||0)+1);const o=new Set(r);let a=e.docTermFieldHits.get(t);a||(a=new Map,e.docTermFieldHits.set(t,a));for(const c of o)a.set(c,(a.get(c)||0)+1),e.df.set(c,(e.df.get(c)||0)+1)}function Ne(e,s,t,i){const{i:r,v:o,$:a}=s;if(void 0===o){if(a)for(let c=0;c<t;c++){const l=a[c];if(l)if(Array.isArray(l))for(const f of l)ye(e,f.v,r,i);else ye(e,l.v,r,i)}}else ye(e,o,r,i)}function Dt(e,s){const t=e.docFieldCount.get(s);if(void 0===t)return;e.fieldCount-=t,e.docFieldCount.delete(s);const i=e.docTermFieldHits.get(s);if(i){for(const[r,o]of i){const a=(e.df.get(r)||0)-o;a<=0?e.df.delete(r):e.df.set(r,a)}e.docTermFieldHits.delete(s)}}function Pe(e,s){if(0===s.length)return;const t=Array.from(new Set(s)).sort((c,l)=>c-l);for(const c of t)Dt(e,c);const i=c=>{let l=0,f=t.length;for(;l<f;){const h=l+f>>>1;t[h]<c?l=h+1:f=h}return c-l},r=t[0],o=new Map;for(const[c,l]of e.docFieldCount)o.set(c>r?i(c):c,l);e.docFieldCount=o;const a=new Map;for(const[c,l]of e.docTermFieldHits)a.set(c>r?i(c):c,l);e.docTermFieldHits=a}var Ve=(()=>{let e=class{constructor(s,t,i){this.options={...b,...t},this._keyStore=new Ke(this.options.keys),this._docs=s,this._myIndex=null,this._invertedIndex=null,this.setCollection(s,i),this._lastQuery=null,this._lastSearcher=null}_getSearcher(s){if(this._lastQuery===s)return this._lastSearcher;const t=te(s,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=s,this._lastSearcher=t,t}setCollection(s,t){if(this._docs=s,t&&!(t instanceof ce))throw new Error("Incorrect 'index' type");if(this._myIndex=t||Te(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){const i=_e({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=function bt(e,s,t){const i={fieldCount:0,df:new Map,docFieldCount:new Map,docTermFieldHits:new Map};for(const r of e)Ne(i,r,s,t);return i}(this._myIndex.records,this._myIndex.keys.length,i)}this._invalidateSearcherCache()}add(s){if(!L(s))return;this._docs.push(s);const t=this._myIndex.add(s,this._docs.length-1);if(this._invertedIndex&&t){const i=_e({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});!function Mt(e,s,t,i){Ne(e,s,t,i)}(this._invertedIndex,t,this._myIndex.keys.length,i)}this._invalidateSearcherCache()}remove(s=()=>!1){const t=[],i=[];for(let r=0,o=this._docs.length;r<o;r+=1)s(this._docs[r],r)&&(t.push(this._docs[r]),i.push(r));if(i.length){this._invertedIndex&&Pe(this._invertedIndex,i);const r=new Set(i);this._docs=this._docs.filter((o,a)=>!r.has(a)),this._myIndex.removeAll(i),this._invalidateSearcherCache()}return t}removeAt(s){if(!Number.isInteger(s)||s<0||s>=this._docs.length)throw new Error(ae);this._invertedIndex&&Pe(this._invertedIndex,[s]);const t=this._docs.splice(s,1)[0];return this._myIndex.removeAt(s),this._invalidateSearcherCache(),t}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}search(s,t){const{limit:i=-1}=t||{},{includeMatches:r,includeScore:o,shouldSort:a,sortFn:c,ignoreFieldNorm:l}=this.options;if(M(s)&&!s.trim()){let p=this._docs.map((C,x)=>({item:C,refIndex:x}));return I(i)&&i>-1&&(p=p.slice(0,i)),p}let h;if(I(i)&&i>0&&M(s)){const p=new gt(i);M(this._docs[0])?this._searchStringList(s,{heap:p,ignoreFieldNorm:l}):this._searchObjectList(s,{heap:p,ignoreFieldNorm:l}),h=p.extractSorted(c)}else h=M(s)?M(this._docs[0])?this._searchStringList(s):this._searchObjectList(s):this._searchLogical(s),function ft(e,{ignoreFieldNorm:s=b.ignoreFieldNorm}){e.forEach(t=>{t.score=pe(t.matches,{ignoreFieldNorm:s})})}(h,{ignoreFieldNorm:l}),a&&h.sort(c),I(i)&&i>-1&&(h=h.slice(0,i));return function pt(e,s,{includeMatches:t=b.includeMatches,includeScore:i=b.includeScore}={}){return e.map(r=>{const{idx:o}=r,a={item:s[o],refIndex:o};return t&&(a.matches=function mt(e){const s=[];return e.matches.forEach(t=>{if(!L(t.indices)||!t.indices.length)return;const i={indices:t.indices,value:t.value};t.key&&(i.key=t.key.id),t.idx>-1&&(i.refIndex=t.idx),s.push(i)}),s}(r)),i&&(a.score=r.score),a})}(h,this._docs,{includeMatches:r,includeScore:o})}_searchStringList(s,{heap:t,ignoreFieldNorm:i}={}){const r=this._getSearcher(s),o=this.options.useTokenSearch&&"all"===this.options.tokenMatch,{records:a}=this._myIndex,c=t?null:[];return a.forEach(({v:l,i:f,n:h})=>{if(!L(l))return;const p=r.searchIn(l);if(p.isMatch){const C={score:p.score,value:l,norm:h,indices:p.indices};o&&(C.matchedMask=p.matchedMask,C.matchedTerms=p.matchedTerms,C.termCount=p.termCount);const x=[C];if(!o||this._coversAllTokens(x)){const R={item:l,idx:f,matches:x};t?(R.score=pe(R.matches,{ignoreFieldNorm:i}),t.shouldInsert(R.score)&&t.insert(R)):c.push(R)}}}),c}_searchLogical(s){const t=we(s,this.options),i=(c,l,f)=>{if(!("children"in c)){const{keyId:x,searcher:R}=c;let S;return null===x?(S=[],this._myIndex.keys.forEach((w,$)=>{S.push(...this._findMatches({key:w,value:l[$],searcher:R}))})):S=this._findMatches({key:this._keyStore.get(x),value:this._myIndex.getValueForItemAtKeyId(l,x),searcher:R}),S&&S.length?[{idx:f,item:l,matches:S}]:[]}const{children:h,operator:p}=c,C=[];for(let x=0,R=h.length;x<R;x+=1){const w=i(h[x],l,f);if(w.length)C.push(...w);else if("$and"===p)return[]}return C},r=this._myIndex.records,o=new Map,a=[];return r.forEach(({$:c,i:l})=>{if(L(c)){const f=i(t,c,l);f.length&&(o.has(l)||(o.set(l,{idx:l,item:c,matches:[]}),a.push(o.get(l))),f.forEach(({matches:h})=>{o.get(l).matches.push(...h)}))}}),a}_searchObjectList(s,{heap:t,ignoreFieldNorm:i}={}){const r=this._getSearcher(s),o=this.options.useTokenSearch&&"all"===this.options.tokenMatch,{keys:a,records:c}=this._myIndex,l=t?null:[];return c.forEach(({$:f,i:h})=>{if(!L(f))return;const p=[];let C=!1,x=!1;if(a.forEach((R,S)=>{const w=this._findMatches({key:R,value:f[S],searcher:r});w.length?(p.push(...w),w[0].hasInverse&&(x=!0)):C=!0}),(!x||!C)&&p.length&&(!o||this._coversAllTokens(p))){const R={idx:h,item:f,matches:p};t?(R.score=pe(R.matches,{ignoreFieldNorm:i}),t.shouldInsert(R.score)&&t.insert(R)):l.push(R)}}),l}_findMatches({key:s,value:t,searcher:i}){if(!L(t))return[];const r=[];if(A(t))t.forEach(({v:o,i:a,n:c})=>{if(!L(o))return;const l=i.searchIn(o);if(l.isMatch){const f={score:l.score,key:s,value:o,idx:a,norm:c,indices:l.indices,hasInverse:l.hasInverse};void 0!==l.termCount&&(f.matchedMask=l.matchedMask,f.matchedTerms=l.matchedTerms,f.termCount=l.termCount),r.push(f)}});else{const{v:o,n:a}=t,c=i.searchIn(o);if(c.isMatch){const l={score:c.score,key:s,value:o,norm:a,indices:c.indices,hasInverse:c.hasInverse};void 0!==c.termCount&&(l.matchedMask=c.matchedMask,l.matchedTerms=c.matchedTerms,l.termCount=c.termCount),r.push(l)}}return r}_coversAllTokens(s){const t=s.length?s[0].termCount:void 0;if(void 0===t)return!0;if(t<=31){let r=0;for(let o=0;o<s.length;o++)r|=s[o].matchedMask||0;return r===2**t-1}const i=new Set;for(let r=0;r<s.length;r++){const o=s[r].matchedTerms;if(o)for(const a of o)i.add(a)}return i.size===t}};return e.version="7.4.2",e.createIndex=Te,e.parseIndex=Ze,e.config=b,e.match=function(s,t,i){if(i&&i.useTokenSearch)throw new Error("Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.");return te(s,{...b,...i}).searchIn(t)},e.parseQuery=we,e})();fe(class{constructor(e,{isCaseSensitive:s=b.isCaseSensitive,ignoreDiacritics:t=b.ignoreDiacritics,includeMatches:i=b.includeMatches,minMatchCharLength:r=b.minMatchCharLength,ignoreLocation:o=b.ignoreLocation,findAllMatches:a=b.findAllMatches,location:c=b.location,threshold:l=b.threshold,distance:f=b.distance}={}){this.query=null,this.options={isCaseSensitive:s,ignoreDiacritics:t,includeMatches:i,minMatchCharLength:r,findAllMatches:a,ignoreLocation:o,location:c,threshold:l,distance:f},e=s?e:e.toLowerCase(),e=t?Y(e):e,this.pattern=e,this.query=function lt(e,s={}){return e.replace(/\\\|/g,"\0").split("|").map(t=>{const i=function ct(e){const s=[],t=e.length;let i=0;for(;i<t;){for(;i<t&&" "===e[i];)i++;if(i>=t)break;let r=i;for(;r<t&&" "!==e[r]&&'"'!==e[r];)r++;if(r<t&&'"'===e[r]){for(r++;r<t;){if('"'===e[r]){const o=r+1;if(o>=t||" "===e[o]){r++;break}if("$"===e[o]&&(o+1>=t||" "===e[o+1])){r+=2;break}}r++}s.push(e.substring(i,r)),i=r}else{for(;r<t&&" "!==e[r];)r++;s.push(e.substring(i,r)),i=r}}return s}(t.replace(/\u0000/g,"|").trim()).filter(o=>o&&!!o.trim()),r=[];for(let o=0,a=i.length;o<a;o+=1){const c=i[o];let l=!1,f=-1;for(;!l&&++f<ke;){const h=de[f],p=Se(c,h.multiRegex);p&&(r.push(h.create(p,s)),l=!0)}if(!l)for(f=-1;++f<ke;){const h=de[f],p=Se(c,h.singleRegex);if(p){r.push(h.create(p,s));break}}}return r})}(this.pattern,this.options)}static condition(e,s){return s.useExtendedSearch}searchIn(e){const s=this.query;if(!s)return{isMatch:!1,score:1};const{includeMatches:t,isCaseSensitive:i,ignoreDiacritics:r}=this.options;e=i?e:e.toLowerCase(),e=r?Y(e):e;let o=0;const a=[];let c=0,l=!1;for(let f=0,h=s.length;f<h;f+=1){const p=s[f];a.length=0,o=0,l=!1;for(let C=0,x=p.length;C<x;C+=1){const R=p[C],{isMatch:S,indices:w,score:$}=R.search(e);if(!S){c=0,o=0,a.length=0,l=!1;break}o+=1,c+=$,rt(R.type)&&(l=!0),t&&(it.has(R.type)?a.push(...w):a.push(w))}if(o){const C={isMatch:!0,score:c/o};return l&&(C.hasInverse=!0),t&&(C.indices=le(a)),C}}return{isMatch:!1,score:1}}}),fe(class{static condition(e,s){return s.useTokenSearch}constructor(e,s){this.options=s,this.analyzer=_e({isCaseSensitive:s.isCaseSensitive,ignoreDiacritics:s.ignoreDiacritics,tokenize:s.tokenize});const t=this.analyzer.tokenize(e),{df:i,fieldCount:r}=s._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(const o of t){this.termSearchers.push(new ue(o,{location:s.location,threshold:s.threshold,distance:s.distance,includeMatches:s.includeMatches,findAllMatches:s.findAllMatches,minMatchCharLength:s.minMatchCharLength,isCaseSensitive:s.isCaseSensitive,ignoreDiacritics:s.ignoreDiacritics,ignoreLocation:!0}));const a=i.get(o)||0,c=Math.log(1+(r-a+.5)/(a+.5));this.idfWeights.push(c)}this.combineAll="all"===s.tokenMatch,this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};const s=[];let t=0,i=0,r=0,o=0;const a=this.combineAll&&!this.useMask?new Set:null;for(let f=0;f<this.termSearchers.length;f++){const h=this.termSearchers[f].searchIn(e),p=this.idfWeights[f];i+=p,h.isMatch&&(r++,t+=p*(1-h.score),h.indices&&s.push(...h.indices),this.combineAll&&(this.useMask?o|=1<<f:a.add(f)))}if(0===r)return{isMatch:!1,score:1};const l={isMatch:!0,score:Math.max(.001,i>0?1-t/i:0)};return this.options.includeMatches&&s.length&&(l.indices=le(s)),this.combineAll&&(this.useMask?l.matchedMask=o:l.matchedTerms=a,l.termCount=this.numTerms),l}}),Ve.use=function(...e){e.forEach(s=>fe(s))};var Rt=Ve,Et=g(2065),xt=g(7284),Tt=g.n(xt);let kt=(()=>{class e{filterOptions=(0,_.uu)(()=>({isCaseSensitive:!!this.filterExactMatch(),includeScore:!1,ignoreDiacritics:!1,shouldSort:!0,includeMatches:!1,findAllMatches:!1,minMatchCharLength:1,location:0,threshold:this.filterExactMatch()?0:.3,distance:100,useExtendedSearch:!1,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1,keys:this.filterKeys()}));fuse=(0,_.EW)(()=>new Rt(this.sorted(),this.filterOptions()));columnDefs=(0,d.vPA)([]);data=(0,d.vPA)([]);sortCol=(0,d.vPA)(void 0);sortOrder=(0,d.vPA)("ASC");filterValue=(0,d.vPA)(void 0);filterOnlyVisible=(0,d.vPA)(!0);paginatorStartIndex=(0,d.vPA)(1);paginatorEndIndex=(0,d.vPA)(5);showColumnSettings=(0,d.vPA)(!1);totalRows=(0,_.EW)(()=>this.sortedAndFiltered().length);sorted=(0,_.EW)(()=>function At(e,s,t){if(void 0===e)return[...s];const i=e.split(",").map(o=>o.trim()),r=t.split(",").map(o=>o.trim());return[...s].sort((o,a)=>{for(let c=0;c<i.length;c++){const l=i[c],f=r[c]||r[0];if(!(l in o))continue;let h=o[l],p=a[l];if("object"==typeof h&&(h=o[l].value,p=a[l].value),null==h)return 1;if(null==p)return-1;let C=0;if(C="string"==typeof h&&"string"==typeof p?h.localeCompare(p):h>p?1:h<p?-1:0,"DESC"===f&&(C*=-1),0!==C)return C}return 0})}(this.sortCol(),this.data(),this.sortOrder()));filterCol=(0,d.vPA)(void 0);filterExactMatch=(0,d.vPA)(!1);filterKeys=(0,_.EW)(()=>{const t=this.filterCol();return void 0!==t?[t]:this.filterOnlyVisible()?this.columnDefs().map(i=>i.key):Object.keys(this.sorted()[0]||{})});sortedAndFiltered=(0,_.EW)(()=>{const t=this.filterValue()??"";return""===t?this.sorted():this.fuse().search(t).map(r=>r.item)});sortedFilteredAndPaginated=(0,_.EW)(()=>this.sortedAndFiltered().slice(this.paginatorStartIndex(),this.paginatorEndIndex()));downloadCSV(){!function Ft(e,s,t="table.csv"){const i=s.map(a=>a.label),r=e.map(a=>s.map(c=>c.formatter?c.formatter(a[c.key]):a[c.key])),o=Tt().unparse({fields:i,data:r});(0,Et.YN)(o,t,"text/csv")}(this.sortedFilteredAndPaginated(),this.columnDefs())}static \u0275fac=function(i){return new(i||e)};static \u0275prov=d.jDH({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})(),St=(()=>{class e{value=(0,d.vPA)("");agInit(t){const i=t.colDef?.cellRendererParams?.prefixes??{};this.value.set(this._prefixIRI(t?.value||"",i))}refresh(t){return this.value.set(t?.value||""),!0}_prefixIRI(t,i){if("http://www.w3.org/1999/02/22-rdf-syntax-ns#type"===t)return"a";if(void 0===i)return t;const r=Object.keys(i).find(o=>t.includes(i[o]));return void 0!==r?`${r}:${t.split(i[r])[1]}`:t}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=n.VBU({type:e,selectors:[["cue-iri-cell-renderer"]],decls:1,vars:1,template:function(i,r){1&i&&n.EFF(0),2&i&&n.JRh(r.value())},encapsulation:2,changeDetection:0})}return e})();var se=g(2245),It=g(2530),ie=g(5381),ve=g(5971),je=g(5448),wt=g(2014),Bt=g(2611),Le=g(3319),Oe=g(29),Nt=g(9695);const Pt=(e,s)=>s.label;function Vt(e,s){if(1&e){const t=n.RV6();n.j41(0,"cue-flexcontainer",10)(1,"cue-input-switch",11),n.mxI("checkedChange",function(r){d.eBV(t);const o=n.XpG();return n.DH7(o.collapseClasses,r)||(o.collapseClasses=r),d.Njj(r)}),n.k0s(),n.j41(2,"cue-typography",12),n.EFF(3,"Collapse classes"),n.k0s()(),n.j41(4,"cue-flexcontainer",10)(5,"cue-input-switch",11),n.mxI("checkedChange",function(r){d.eBV(t);const o=n.XpG();return n.DH7(o.collapseAttributes,r)||(o.collapseAttributes=r),d.Njj(r)}),n.k0s(),n.j41(6,"cue-typography",12),n.EFF(7,"Collapse properties"),n.k0s()()}if(2&e){const t=n.XpG();n.R7$(),n.R50("checked",t.collapseClasses),n.R7$(4),n.R50("checked",t.collapseAttributes)}}function jt(e,s){if(1&e&&n.nrm(0,"cue-svg-icon",17),2&e){const t=n.XpG().$implicit;n.Y8G("name",t.icon)}}function Lt(e,s){if(1&e){const t=n.RV6();n.j41(0,"cue-menu-item",16),n.bIt("click",function(){const r=d.eBV(t).$implicit;return d.Njj(r.action())}),n.nVh(1,jt,1,1,"cue-svg-icon",17),n.EFF(2),n.k0s()}if(2&e){const t=s.$implicit;n.R7$(),n.vxM(t.icon?1:-1),n.R7$(),n.SpI(" ",t.label)}}function Ot(e,s){if(1&e&&(n.j41(0,"cue-menu",5)(1,"cue-button",13,0),n.nrm(3,"cue-button-icon",14),n.k0s(),n.j41(4,"cue-menu-wrap",15),n.Z7z(5,Lt,3,2,"cue-menu-item",null,Pt),n.k0s()()),2&e){const t=n.XpG();n.R7$(5),n.Dyx(t.moreMenuContent())}}function Qt(e,s){if(1&e){const t=n.RV6();n.j41(0,"cue-button",18),n.bIt("click",function(){d.eBV(t);const r=n.XpG();return d.Njj(r.showColumnSettings.set(!1))}),n.nrm(1,"cue-button-icon",19),n.k0s()}}function $t(e,s){if(1&e&&(n.j41(0,"cue-typography"),n.EFF(1),n.k0s()),2&e){const t=n.XpG(2);n.R7$(),n.SpI("Result: ",t.askQueryResults().boolean)}}function Gt(e,s){if(1&e&&n.nrm(0,"cue-code-editor",20),2&e){const t=n.XpG(2);n.Y8G("content",t.askQueryResults())("variant",t.variant())}}function Wt(e,s){if(1&e&&(n.nVh(0,$t,2,1,"cue-typography"),n.nVh(1,Gt,1,2,"cue-code-editor",20)),2&e){const t=n.XpG();n.vxM("formatted"===t.selectedView()?0:-1),n.R7$(),n.vxM("raw"===t.selectedView()?1:-1)}}function qt(e,s){if(1&e&&n.nrm(0,"cue-ag-grid",21),2&e){const t=n.XpG(3);n.Y8G("rowData",t.tableData())("columnDefs",t.columnDefs())}}function Ut(e,s){if(1&e){const t=n.RV6();n.j41(0,"cue-ag-grid-column-select",23),n.mxI("columnDefsChange",function(r){d.eBV(t);const o=n.XpG(3);return n.DH7(o.columnDefs,r)||(o.columnDefs=r),d.Njj(r)}),n.k0s()}if(2&e){const t=n.XpG(3);n.R50("columnDefs",t.columnDefs),n.Y8G("columnDefsGross",t.columnDefsGross())("settings",t.columnSelectSettings())}}function zt(e,s){if(1&e&&n.nVh(0,qt,1,2,"cue-ag-grid",21)(1,Ut,1,3,"cue-ag-grid-column-select",22),2&e){const t=n.XpG(2);n.vxM(t.showColumnSettings()?1:0)}}function Ht(e,s){if(1&e&&n.nrm(0,"cue-code-editor",20),2&e){const t=n.XpG(2);n.Y8G("content",t.selectQueryResults())("variant",t.variant())}}function Xt(e,s){if(1&e&&(n.nVh(0,zt,2,1),n.nVh(1,Ht,1,2,"cue-code-editor",20)),2&e){const t=n.XpG();n.vxM("formatted"===t.selectedView()?0:-1),n.R7$(),n.vxM("raw"===t.selectedView()?1:-1)}}function Kt(e,s){if(1&e&&n.nrm(0,"cue-rdf-graph",25),2&e){const t=n.XpG(2);n.xc7("min-height",t.minGraphHeight()),n.Y8G("doc",t.rdfResult())("collapseAttributes",t.collapseAttributes())("collapseClasses",t.collapseClasses())}}function Yt(e,s){}function Jt(e,s){if(1&e&&n.nrm(0,"cue-code-editor",26),2&e){const t=n.XpG(3);n.Y8G("content",t.rdfResult())("variant",t.variant())}}function Zt(e,s){if(1&e&&n.nVh(0,Yt,0,0)(1,Jt,1,2,"cue-code-editor",26),2&e){const t=n.XpG(2);n.vxM(t.isJSON()?0:1)}}function en(e,s){if(1&e&&(n.nVh(0,Kt,1,5,"cue-rdf-graph",24),n.nVh(1,Zt,2,1)),2&e){const t=n.XpG();n.vxM("formatted"===t.selectedView()&&t.isJSON()?0:-1),n.R7$(),n.vxM("raw"===t.selectedView()?1:-1)}}let tn=(()=>{class e{_tableService=(0,d.WQX)(kt);queryResults=(0,v.hFB)();queryDetails=(0,v.hFB)(void 0);variant=(0,v.hFB)("accent");minGraphHeight=(0,v.hFB)("300px");responseMimeType=(0,v.hFB)(void 0);clickedClose=(0,v.CGW)();totalHeight=(0,d.vPA)(0);selectedView=(0,_.uu)(()=>this.isJSON()?"formatted":"raw");isJSON=(0,_.EW)(()=>{const t=this.responseMimeType();return void 0===t||t.includes("json")});collapseClasses=(0,d.vPA)(!0);collapseAttributes=(0,d.vPA)(!0);moreMenuContent=(0,_.EW)(()=>this.selectQueryResults()&&!this.showColumnSettings()?[{label:"Show column settings",icon:"settings",action:()=>this.showColumnSettings.set(!0)},{label:"Download CSV",icon:"download",action:()=>this._downloadCSV()}]:[]);showContextMenu=(0,d.vPA)(!1);showColumnSettings=(0,d.vPA)(!1);askQueryResults=(0,_.EW)(()=>{if("ASK"===this.queryDetails()?.queryType)return this.queryResults()});selectQueryResults=(0,_.EW)(()=>{const t=this.queryDetails();if(console.log(t),"SELECT"===t?.queryType)return this.queryResults()});rdfResult=(0,_.EW)(()=>{const t=this.queryDetails();if("CONSTRUCT"===t?.queryType||"DESCRIBE"===t?.queryType)return this.queryResults()});columnDefs=(0,_.uu)(()=>this._buildAgGridColumnDefs());columnDefsGross=(0,_.EW)(()=>this._buildAgGridColumnDefs());queryVariables=(0,_.EW)(()=>{const t=this._getQueryVariables();return console.log(t),t.includes("*")?this.selectQueryResults()?.head.vars??[]:t});tableData=(0,_.EW)(()=>{const t=this.selectQueryResults();if(void 0===t)return[];const i=this.queryVariables();return t?.results.bindings.map(r=>{const o={};return i.forEach(a=>{o[a]=r[a]?.value??"-"}),o})});columnSelectSettings=(0,_.EW)(()=>{const t=new P.e;return t.allowToggleEditable=!1,t});_buildAgGridColumnDefs(){return this.queryVariables().map(i=>{const r={field:i,headerName:i,sortable:!0,filter:!0,flex:1};return this._isIRICol(i)&&(r.cellRenderer=St,r.cellRendererParams={prefixes:this.queryDetails()?.prefixes}),r})}_isIRICol(t){const i=this.selectQueryResults()?.results.bindings.find(r=>void 0!==r[t]);return void 0!==i&&"uri"===i[t].type}_downloadCSV(){this._tableService.downloadCSV()}_getQueryVariables(){const t=new Set;return this.queryDetails()?.variables.map(i=>{const r=i;t.add(void 0!==r?.value?r.value:void 0!==r?.variable?r.variable.value:"*")}),Array.from(t)}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=n.VBU({type:e,selectors:[["cue-query-results"]],inputs:{queryResults:[1,"queryResults"],queryDetails:[1,"queryDetails"],variant:[1,"variant"],minGraphHeight:[1,"minGraphHeight"],responseMimeType:[1,"responseMimeType"]},outputs:{clickedClose:"clickedClose"},decls:20,vars:10,consts:[["trigger",""],["direction","column","gap","m",2,"height","100%"],["direction","row","gap","s"],["size","s",3,"click","disabled","variant"],[2,"flex","1"],["positioning","bottomright"],["variant","tertiary","size","s"],["size","s","cueTooltip","Back to query",3,"click"],["icon","arrow-back"],["direction","column",1,"result-container",2,"flex","1 1 0%","min-height","0","width","100%"],["align","center","gap","s"],["size","s",3,"checkedChange","checked"],["size","s"],["trigger","","variant","tertiary","size","s"],["icon","more-vert"],["menu",""],[3,"click"],["before","",3,"name"],["variant","tertiary","size","s",3,"click"],["icon","save"],["type","json",1,"result",3,"content","variant"],[1,"result",2,"flex","1 1 0%","min-height","0","overflow","auto",3,"rowData","columnDefs"],[2,"width","100%",3,"columnDefs","columnDefsGross","settings"],[2,"width","100%",3,"columnDefsChange","columnDefs","columnDefsGross","settings"],[1,"result",3,"doc","collapseAttributes","collapseClasses","min-height"],[1,"result",3,"doc","collapseAttributes","collapseClasses"],["type","ttl",1,"result",3,"content","variant"]],template:function(i,r){1&i&&(n.j41(0,"cue-flexcontainer",1)(1,"cue-flexcontainer",2)(2,"cue-button",3),n.bIt("click",function(){return r.selectedView.set("raw")}),n.j41(3,"cue-button-padder")(4,"cue-button-label"),n.EFF(5,"Raw"),n.k0s()()(),n.j41(6,"cue-button",3),n.bIt("click",function(){return r.selectedView.set("formatted")}),n.j41(7,"cue-button-padder")(8,"cue-button-label"),n.EFF(9,"Formatted"),n.k0s()()(),n.nVh(10,Vt,8,2),n.nrm(11,"cue-flexcontainer",4),n.nVh(12,Ot,7,0,"cue-menu",5),n.nVh(13,Qt,2,0,"cue-button",6),n.j41(14,"cue-button",7),n.bIt("click",function(){return r.clickedClose.emit()}),n.nrm(15,"cue-button-icon",8),n.k0s()(),n.j41(16,"cue-flexcontainer",9),n.nVh(17,Wt,2,2),n.nVh(18,Xt,2,2),n.nVh(19,en,2,2),n.k0s()()),2&i&&(n.R7$(2),n.Y8G("disabled","raw"===r.selectedView())("variant","raw"===r.selectedView()?"primary":"secondary"),n.R7$(4),n.Y8G("disabled","formatted"===r.selectedView())("variant","formatted"===r.selectedView()?"primary":"secondary"),n.R7$(4),n.vxM(r.rdfResult()&&"formatted"===r.selectedView()?10:-1),n.R7$(2),n.vxM(r.moreMenuContent().length?12:-1),n.R7$(),n.vxM(r.showColumnSettings()?13:-1),n.R7$(4),n.vxM(r.askQueryResults()?17:-1),n.R7$(),n.vxM(r.selectQueryResults()?18:-1),n.R7$(),n.vxM(r.rdfResult()?19:-1))},dependencies:[se.Typography,It.B,ie.n,ve.$,je.L,wt.z,Bt.R,W.t,Le.a,j.W,Q.M,k.D,T.pL,Oe.A,Nt.Switch],styles:["[_nghost-%COMP%]{display:block;height:100%}.result-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1 1 0%;min-height:0;width:100%}.result[_ngcontent-%COMP%]{flex:1 1 0%;width:100%;box-sizing:border-box;overflow:auto;min-height:0}"],changeDetection:0})}return e})(),nn=(()=>{class e{vcr;componentRef=null;setViewContainerRef(t){this.componentRef&&(this.componentRef.destroy(),this.componentRef=null),void 0!==this.vcr&&this.vcr?.clear(),this.vcr=t}static \u0275fac=function(i){return new(i||e)};static \u0275prov=d.jDH({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var sn=g(5745),rn=g(8957);const on=["*"];function an(e,s){if(1&e&&(n.j41(0,"cue-typography"),n.EFF(1),n.k0s()),2&e){const t=n.XpG(2);n.R7$(),n.JRh(t.message())}}function cn(e,s){if(1&e){const t=n.RV6();n.j41(0,"cue-modal",1),n.bIt("close",function(){d.eBV(t);const r=n.XpG();return d.Njj(r.onClose())}),n.j41(1,"cue-flexcontainer",2),n.SdG(2),n.nVh(3,an,2,1,"cue-typography"),n.j41(4,"cue-input",3),n.mxI("valueChange",function(r){d.eBV(t);const o=n.XpG();return n.DH7(o.inputValue,r)||(o.inputValue=r),d.Njj(r)}),n.k0s(),n.j41(5,"cue-typography")(6,"cue-flexcontainer",4)(7,"cue-button",5),n.bIt("click",function(){d.eBV(t);const r=n.XpG();return d.Njj(r.onConfirmed())}),n.EFF(8),n.k0s(),n.j41(9,"cue-button",6),n.bIt("click",function(){d.eBV(t);const r=n.XpG();return d.Njj(r.onClose())}),n.EFF(10),n.k0s()()()()()}if(2&e){const t=n.XpG();n.Y8G("displayCloseBtn",!1)("closeOnBackgroundClick",!1),n.R7$(3),n.vxM(t.message()?3:-1),n.R7$(),n.R50("value",t.inputValue),n.Y8G("label",t.inputLabel()),n.R7$(4),n.JRh(t.confirmText()),n.R7$(2),n.JRh(t.rejectText())}}let ln=(()=>{class e{visible=(0,v.geq)(!0);message=(0,v.hFB)("");inputLabel=(0,v.hFB)("");inputValue=(0,v.geq)("");confirmText=(0,v.hFB)("Update");rejectText=(0,v.hFB)("Cancel");valueChange=(0,v.CGW)();onConfirmed(){this.visible.set(!1),this.valueChange.emit(this.inputValue())}onClose(){this.visible.set(!1)}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=n.VBU({type:e,selectors:[["cue-modal-input"]],inputs:{visible:[1,"visible"],message:[1,"message"],inputLabel:[1,"inputLabel"],inputValue:[1,"inputValue"],confirmText:[1,"confirmText"],rejectText:[1,"rejectText"]},outputs:{visible:"visibleChange",inputValue:"inputValueChange",valueChange:"valueChange"},ngContentSelectors:on,decls:1,vars:1,consts:[[2,"font-family","var(--cue-font-family)",3,"displayCloseBtn","closeOnBackgroundClick"],[2,"font-family","var(--cue-font-family)",3,"close","displayCloseBtn","closeOnBackgroundClick"],["direction","column"],[3,"valueChange","value","label"],["direction","row"],["variant","secondary",3,"click"],[3,"click"]],template:function(i,r){1&i&&(n.NAR(),n.nVh(0,cn,11,7,"cue-modal",0)),2&i&&n.vxM(r.visible()?0:-1)},dependencies:[sn.a,ie.n,ve.$,se.Typography,rn.Input],encapsulation:2})}return e})(),un=(()=>{class e extends nn{requestInput(t){if(!this.vcr)throw new Error("No ViewContainerRef!");const i=this.vcr.createComponent(ln);return this.componentRef=i,t.message&&i.setInput("message",t.message),t.inputLabel&&i.setInput("inputLabel",t.inputLabel),t.inputValue&&i.setInput("inputValue",t.inputValue),t.confirmText&&i.setInput("confirmText",t.confirmText),t.rejectText&&i.setInput("rejectText",t.rejectText),new Promise(r=>{const o=i.instance.valueChange.subscribe(a=>{r(a),o.unsubscribe(),i.destroy()})})}static \u0275fac=(()=>{let t;return function(r){return(t||(t=n.xGo(e)))(r||e)}})();static \u0275prov=d.jDH({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})();var Qe=g(9352),dn=g(5187),hn=g(4906);const fn=["panel"];let gn=(()=>{class e{content=(0,v.geq)("");variant=(0,v.hFB)("default");contextPatterns=(0,v.hFB)([]);contentChanged=(0,v.CGW)();invalid=(0,v.CGW)();error=(0,v.CGW)();panel;_editor;_editorValue=(0,d.vPA)("");onVariantChange=(0,d.QZP)(()=>{const t=this.variant();this._editor&&(this._editor.theme=t)});onContentChange=(0,d.QZP)(()=>{const t=this.content();t!==this._editorValue()&&this._editor&&(this._editor.content=t)});onContextPatternsChange=(0,d.QZP)(()=>{const t=this.contextPatterns();this._editor&&(this._editor.contextPatterns=t)});ngAfterViewInit(){this._editor=new hn.j(this.panel.nativeElement,this.variant()),this._editor.contextPatterns=this.contextPatterns();const t=this.content();t&&(this._editor.content=t),this._editor.events.addListener("contentChanged",i=>{this._editorValue.set(i),this.content()!==i&&this.content.set(i),this.contentChanged.emit(i)}),this._editor.events.addListener("contentValid",i=>{this.invalid.emit(!i)}),this._editor.events.addListener("error",i=>{this.error.emit(i)})}ngOnDestroy(){this._editor?.dispose()}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=n.VBU({type:e,selectors:[["cue-sparql-editor"]],viewQuery:function(i,r){if(1&i&&n.GBs(fn,5),2&i){let o;n.mGM(o=n.lsd())&&(r.panel=o.first)}},inputs:{content:[1,"content"],variant:[1,"variant"],contextPatterns:[1,"contextPatterns"]},outputs:{content:"contentChange",contentChanged:"contentChanged",invalid:"invalid",error:"error"},decls:2,vars:0,consts:[["panel",""],[1,"panel"]],template:function(i,r){1&i&&n.Hgh(0,"div",1,0)},styles:["[_nghost-%COMP%]{display:contents}.panel[_ngcontent-%COMP%]{overflow-y:auto;height:100%;width:100%;border:1px solid var(--borderColor-default)}"]})}return e})();var U=g(7573),mn=g(4284);const pn=["modalContainer"],_n=(e,s)=>s.label;function yn(e,s){if(1&e){const t=n.RV6();n.j41(0,"cue-flexcontainer",7)(1,"cue-button",19),n.nI1(2,"transloco"),n.bIt("click",function(){d.eBV(t);const r=n.XpG();return d.Njj(r.showResults.set(!0))}),n.nrm(3,"cue-button-icon",20),n.k0s()()}2&e&&(n.R7$(),n.Y8G("cueTooltip",n.bMT(2,1,"components.sparqlClient.tooltipViewResults")))}function vn(e,s){if(1&e&&(n.j41(0,"div",10),n.EFF(1),n.k0s()),2&e){const t=n.XpG();n.R7$(),n.JRh(t.queryError())}}function Cn(e,s){1&e&&(n.j41(0,"cue-typography"),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&e&&(n.R7$(),n.JRh(n.bMT(2,1,"components.sparqlClient.infoQueryInProgress")))}function bn(e,s){if(1&e&&n.nrm(0,"cue-svg-icon",21),2&e){const t=n.XpG().$implicit;n.Y8G("name",t.icon)}}function Mn(e,s){if(1&e){const t=n.RV6();n.j41(0,"cue-menu-item",16),n.bIt("click",function(){const r=d.eBV(t).$implicit;return d.Njj(null==r?null:r.action())}),n.nVh(1,bn,1,1,"cue-svg-icon",21),n.EFF(2),n.k0s()}if(2&e){const t=s.$implicit;n.R7$(),n.vxM(t.icon?1:-1),n.R7$(),n.SpI(" ",t.label)}}function Dn(e,s){if(1&e){const t=n.RV6();n.j41(0,"cue-button",22),n.bIt("click",function(){d.eBV(t);const r=n.XpG();return d.Njj(r.resetQuery())}),n.j41(1,"cue-button-label"),n.EFF(2),n.nI1(3,"transloco"),n.k0s()()}2&e&&(n.R7$(2),n.JRh(n.bMT(3,1,"components.sparqlClient.buttonReset")))}function Rn(e,s){1&e&&(n.j41(0,"cue-typography"),n.EFF(1),n.nI1(2,"transloco"),n.k0s()),2&e&&(n.R7$(),n.JRh(n.bMT(2,1,"components.sparqlClient.infoQueryInProgress")))}function An(e,s){if(1&e){const t=n.RV6();n.j41(0,"cue-query-results",23),n.bIt("clickedClose",function(){d.eBV(t);const r=n.XpG();return d.Njj(r.showResults.set(!1))}),n.k0s()}if(2&e){const t=n.XpG();n.Y8G("queryDetails",t.queryDetails())("queryResults",t.resultsRaw())("responseMimeType",t.responseMimeType())("variant",t.cardVariantBack())("minGraphHeight",t.minCardHeight())}}const En=[{label:"File Content",iri:`${U.E.qcy}FileContent`},{label:"File Location",iri:`${U.E.qcy}Location`},{label:"Entity Mention",iri:`${U.E.qcy}EntityMention`},{label:"Canonical Entity",iri:`${U.E.qcy}CanonicalEntity`},{label:"Selector",iri:`${U.E.qcy}Selector`}].sort((e,s)=>e.label.localeCompare(s.label)),xn=[{label:"has entity category",iri:`${U.E.qcy}hasEntityCategory`},{label:"has content category",iri:`${U.E.qcy}hasContentCategory`},{label:"value",iri:`${U.E.qcy}value`},{label:"a",iri:`${mn.B.rdf}type`}].sort((e,s)=>e.label.localeCompare(s.label));let Tn=(()=>{class e{_inputModal=(0,d.WQX)(un);modalContainer;handlers=(0,v.hFB)();query=v.geq.required();cardVariant=(0,v.hFB)("default");cardVariantBack=(0,v.hFB)("accent");showResultsImmidiately=(0,v.hFB)(!0);showResults=(0,v.geq)(!1);flipForResults=(0,v.hFB)(!0);minCardHeight=(0,v.hFB)("300px");availableEntityCategories=(0,v.hFB)([]);availableContentCategories=(0,v.hFB)([]);availableTypes=(0,v.hFB)(En);availablePredicates=(0,v.hFB)(xn);contextPatterns=(0,_.EW)(()=>{const t=[],i=this.availableEntityCategories();i?.length>0&&t.push({predicate:"qcy:hasEntityCategory",options:i});const r=this.availableContentCategories();r?.length>0&&t.push({predicate:"qcy:hasContentCategory",options:r});const o=this.availableTypes();o?.length>0&&t.push({predicate:"a",options:o});const a=this.availablePredicates();return a?.length>0&&t.push({options:a}),t});editorQuery=(0,_.uu)(()=>this.query());userQuery=(0,d.vPA)(void 0);userHasDefinedQuery=(0,_.EW)(()=>void 0!==this.userQuery()&&this.userQuery()!==this.query());queryInProgress=(0,d.vPA)(!1);responseMimeType=(0,d.vPA)(void 0);queryDetails=(0,_.EW)(()=>{const t=this.userQuery()??this.query();try{return(0,m.t)(t)}catch{return}});resultsRaw=(0,d.vPA)(void 0);queryError=(0,d.vPA)(void 0);executedQuery=(0,d.vPA)(void 0);resultsStillValid=(0,_.EW)(()=>this.executedQuery()===JSON.stringify(this.queryDetails()));labelSetResponseMime=(0,Qe.Xx)("components.sparqlClient.buttonSetResponseMime");menuItems=(0,_.EW)(()=>{var i,t=this;return[{label:this.labelSetResponseMime(),action:(i=(0,F.A)(function*(){t._inputModal.setViewContainerRef(t.modalContainer);const r=yield t._inputModal.requestInput({inputLabel:"Response Mime Type",inputValue:"",confirmText:"Set",rejectText:"Cancel"});t.responseMimeType.set(r??void 0)}),function(){return i.apply(this,arguments)})}]});onQuery=(0,d.QZP)(()=>{this.query(),this.showResults.set(!1),this.queryError.set(void 0)});executeQuery(){var t=this;return(0,F.A)(function*(){t.queryInProgress.set(!0),t.queryError.set(void 0),t._reset();try{const i=t.userQuery()??t.query(),r=yield t.handlers()?.queryHandler(i,t.queryDetails(),t.responseMimeType());t.resultsRaw.set(r),t.executedQuery.set(JSON.stringify(t.queryDetails())),t.showResultsImmidiately()&&t.showResults.set(!0)}catch(i){t.queryError.set(i?.message??i?.error??String(i))}finally{t.queryInProgress.set(!1)}})()}resetQuery(){this.editorQuery.update(()=>this.query()+" "),setTimeout(()=>{this.editorQuery.update(()=>this.query()),this.userQuery.set(void 0)})}_reset(){this.resultsRaw.set(void 0),this.executedQuery.set(void 0)}static \u0275fac=function(i){return new(i||e)};static \u0275cmp=n.VBU({type:e,selectors:[["cue-sparql-client"]],viewQuery:function(i,r){if(1&i&&n.GBs(pn,7,n.c1b),2&i){let o;n.mGM(o=n.lsd())&&(r.modalContainer=o.first)}},inputs:{handlers:[1,"handlers"],query:[1,"query"],cardVariant:[1,"cardVariant"],cardVariantBack:[1,"cardVariantBack"],showResultsImmidiately:[1,"showResultsImmidiately"],showResults:[1,"showResults"],flipForResults:[1,"flipForResults"],minCardHeight:[1,"minCardHeight"],availableEntityCategories:[1,"availableEntityCategories"],availableContentCategories:[1,"availableContentCategories"],availableTypes:[1,"availableTypes"],availablePredicates:[1,"availablePredicates"]},outputs:{query:"queryChange",showResults:"showResultsChange"},decls:29,vars:17,consts:[["modalContainer",""],["trigger",""],[2,"height","100%","width","100%","flex","1 1"],[1,"flip-card",3,"cueFlipChange","cueFlip"],[1,"flip-content"],[1,"card-face","front",2,"height","100%","flex","1 1",3,"variant","scrollable"],["direction","column",2,"height","calc(100% - 4px)","margin","2px"],["direction","row","justify","end","align","center","gap","m"],[2,"overflow-y","auto",3,"contentChanged","content","variant","contextPatterns"],[2,"flex","1"],[2,"background","#fef2f2","border","1px solid #fecaca","border-radius","6px","padding","8px 12px","font-size","12px","color","#b91c1c","word-break","break-word","white-space","pre-wrap","max-height","120px","overflow-y","auto","margin","4px 0"],["positioning","topright"],["trigger","","variant","tertiary"],["icon","more-vert"],["menu",""],["variant","secondary"],[3,"click"],[1,"card-face","back",2,"height","100%",3,"variant"],[2,"height","100%",3,"queryDetails","queryResults","responseMimeType","variant","minGraphHeight"],["size","s",3,"click","cueTooltip"],["icon","view-active"],["before","",3,"name"],["variant","secondary",3,"click"],[2,"height","100%",3,"clickedClose","queryDetails","queryResults","responseMimeType","variant","minGraphHeight"]],template:function(i,r){if(1&i){const o=n.RV6();n.eu8(0,null,0),n.j41(2,"cue-flexcontainer",2)(3,"div",3),n.mxI("cueFlipChange",function(c){return d.eBV(o),n.DH7(r.showResults,c)||(r.showResults=c),d.Njj(c)}),n.j41(4,"div",4)(5,"cue-card",5)(6,"cue-flexcontainer",6),n.nVh(7,yn,4,3,"cue-flexcontainer",7),n.j41(8,"cue-sparql-editor",8),n.bIt("contentChanged",function(c){return r.userQuery.set(c)}),n.k0s(),n.nrm(9,"cue-flexcontainer",9),n.nVh(10,vn,2,1,"div",10),n.j41(11,"cue-flexcontainer",7),n.nVh(12,Cn,3,3,"cue-typography"),n.j41(13,"cue-menu",11)(14,"cue-button",12,1),n.nrm(16,"cue-button-icon",13),n.k0s(),n.j41(17,"cue-menu-wrap",14),n.Z7z(18,Mn,3,2,"cue-menu-item",null,_n),n.k0s()(),n.nVh(20,Dn,4,3,"cue-button",15),n.j41(21,"cue-button",16),n.bIt("click",function(){return r.executeQuery()}),n.j41(22,"cue-button-label"),n.EFF(23),n.nI1(24,"transloco"),n.k0s()()()()(),n.j41(25,"cue-card",17),n.nrm(26,"cue-flexcontainer",7),n.nVh(27,Rn,3,3,"cue-typography")(28,An,1,5,"cue-query-results",18),n.k0s()()()()}2&i&&(n.R7$(3),n.R50("cueFlip",r.showResults),n.R7$(2),n.Y8G("variant",r.cardVariant())("scrollable",!0),n.R7$(2),n.vxM(r.resultsRaw()&&r.resultsStillValid()?7:-1),n.R7$(),n.Y8G("content",r.editorQuery())("variant",r.cardVariant())("contextPatterns",r.contextPatterns()),n.R7$(2),n.vxM(r.queryError()?10:-1),n.R7$(2),n.vxM(r.queryInProgress()?12:-1),n.R7$(6),n.Dyx(r.menuItems()),n.R7$(2),n.vxM(r.userHasDefinedQuery()?20:-1),n.R7$(3),n.JRh(n.bMT(24,15,"components.sparqlClient.buttonExecute")),n.R7$(2),n.xc7("min-height",r.minCardHeight()),n.Y8G("variant",r.cardVariantBack()),n.R7$(2),n.vxM(r.queryInProgress()?27:28))},dependencies:[dn.Card,ie.n,ve.$,je.L,gn,se.Typography,Le.a,u.d,tn,y.R,j.W,Q.M,k.D,Oe.A,Qe.Kj],styles:["[_nghost-%COMP%]{display:contents}.wrapper[_ngcontent-%COMP%]{display:flex;width:100%}.flip-content[_ngcontent-%COMP%]{height:100%}.flip-card[_ngcontent-%COMP%]{height:100%;width:100%;flex:1 1}"],changeDetection:0})}return e})();function Fn(e,s){if(1&e){const t=n.RV6();n.j41(0,"cue-sparql-client",2),n.mxI("queryChange",function(r){d.eBV(t);const o=n.XpG();return n.DH7(o.query,r)||(o.query=r),d.Njj(r)}),n.k0s()}if(2&e){const t=n.XpG();n.R50("query",t.query),n.Y8G("handlers",s)("showResultsImmidiately",!0)}}function kn(e,s){1&e&&(n.j41(0,"cue-flexcontainer",1)(1,"cue-typography",3),n.EFF(2," No project connected. Pass a sdkState with cue and projectId. "),n.k0s()())}const Sn=`PREFIX qcy: <${U.E.qcy}>\n\nSELECT DISTINCT ?doc ?contentCat\nWHERE {\n ?doc a qcy:FileContent .\n FILTER NOT EXISTS { ?_alt qcy:alternativeRepresentation ?doc }\n OPTIONAL { ?doc qcy:hasContentCategory ?contentCat }\n}\nLIMIT 20`;let In=(()=>{class e{sdkState=(0,v.hFB)(void 0);query=(0,v.geq)(Sn);_handlers=(0,_.EW)(()=>{const t=this.sdkState();if(!t)return;const{cue:i,projectId:r,graphType:o="fuseki"}=t;return{queryHandler:a=>i.api.sparql(a,r,o)}});static \u0275fac=function(i){return new(i||e)};static \u0275cmp=n.VBU({type:e,selectors:[["cue-sparql-client-sdk"]],inputs:{sdkState:[1,"sdkState"],query:[1,"query"]},outputs:{query:"queryChange"},decls:2,vars:1,consts:[["cardVariant","primary","cardVariantBack","default",2,"height","100%","display","block",3,"query","handlers","showResultsImmidiately"],["direction","column","align","center","justify","center",2,"height","100%","width","100%","padding","8px"],["cardVariant","primary","cardVariantBack","default",2,"height","100%","display","block",3,"queryChange","query","handlers","showResultsImmidiately"],[2,"color","#9ca3af","font-size","13px"]],template:function(i,r){if(1&i&&n.nVh(0,Fn,1,3,"cue-sparql-client",0)(1,kn,3,0,"cue-flexcontainer",1),2&i){let o;n.vxM((o=r._handlers())?0:1,o)}},dependencies:[Tn,ie.n,se.Typography],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}"],changeDetection:0})}return e})()},2065(z,N,g){function F(m,u,y="text/plain"){return function v(m,u="data.zip"){const y=document.createElement("a"),T=URL.createObjectURL(m);y.href=T,y.download=u,document.body.appendChild(y),y.click(),document.body.removeChild(y),URL.revokeObjectURL(T)}(new Blob([m],{type:y}),u)}function d(m,u){const y=document.createElement("a");y.style.display="hidden",y.setAttribute("href",window.URL.createObjectURL(m)),y.setAttribute("download",u),document.body.appendChild(y),y.click(),y.remove()}g.d(N,{KE:()=>d,YN:()=>F})},5332(z,N,g){g.d(N,{k:()=>d});for(var _=[],F=0;F<256;++F)_.push((F+256).toString(16).slice(1));function d(u,y=0){return(_[u[y+0]]+_[u[y+1]]+_[u[y+2]]+_[u[y+3]]+"-"+_[u[y+4]]+_[u[y+5]]+"-"+_[u[y+6]]+_[u[y+7]]+"-"+_[u[y+8]]+_[u[y+9]]+"-"+_[u[y+10]]+_[u[y+11]]+_[u[y+12]]+_[u[y+13]]+_[u[y+14]]+_[u[y+15]]).toLowerCase()}},8402(z,N,g){g.d(N,{A:()=>y});const _={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var F,d=new Uint8Array(16);function n(){if(!F&&!(F=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return F(d)}var m=g(5332);const y=function u(T,P,W){if(_.randomUUID&&!P&&!T)return _.randomUUID();var j=(T=T||{}).random||(T.rng||n)();if(j[6]=15&j[6]|64,j[8]=63&j[8]|128,P){W=W||0;for(var Q=0;Q<16;++Q)P[W+Q]=j[Q];return P}return(0,m.k)(j)}}}]);