@qaecy/cue-ui 0.0.58 → 0.0.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/9396.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[9396],{9396(W,x,c){c.d(x,{CueContextViewer:()=>L});var p=c(467),d=c(7705),a=c(5802),r=c(2271),g=c(1492),v=c(2283),_=c(2839),f=c(6455),C=c(8334),y=c(9352),D=c(7851),e=c(5547);function I(n,l){1&n&&(e.j41(0,"div",1),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&n&&(e.R7$(),e.JRh(e.bMT(2,1,"components.contextViewer.infoNoContext")))}function w(n,l){if(1&n){const t=e.RV6();e.j41(0,"cue-tabs",2)(1,"cue-tab",5),e.nI1(2,"transloco"),e.j41(3,"cue-doc-list",6),e.bIt("clickedDocument",function(s){a.eBV(t);const i=e.XpG();return a.Njj(i.onDocumentClicked(s))}),e.k0s()(),e.j41(4,"cue-tab",5),e.nI1(5,"transloco"),e.j41(6,"cue-ent-list-inner",7),e.bIt("rowClicked",function(s){a.eBV(t);const i=e.XpG();return a.Njj(i.onEntityRowClicked(s))}),e.k0s()()()}if(2&n){const t=e.XpG();e.R7$(),e.Y8G("label",e.bMT(2,9,"components.contextViewer.tabDocuments")),e.R7$(2),e.Y8G("documentRefs",t.documentRefs())("documentData",t.documentData())("handlers",t._docHandlers())("variant",t.variant()),e.R7$(),e.Y8G("label",e.bMT(5,11,"components.contextViewer.tabEntities")),e.R7$(2),e.Y8G("entities",t.entityIris())("entityData",t.entityData())("handlers",t._entityHandlers())}}function b(n,l){if(1&n){const t=e.RV6();e.j41(0,"cue-doc-list",6),e.bIt("clickedDocument",function(s){a.eBV(t);const i=e.XpG();return a.Njj(i.onDocumentClicked(s))}),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("documentRefs",t.documentRefs())("documentData",t.documentData())("handlers",t._docHandlers())("variant",t.variant())}}function M(n,l){if(1&n){const t=e.RV6();e.j41(0,"cue-ent-list-inner",8),e.bIt("rowClicked",function(s){a.eBV(t);const i=e.XpG();return a.Njj(i.onEntityRowClicked(s))}),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("entities",t.entityIris())("entityData",t.entityData())("handlers",t._entityHandlers())}}function R(n,l){1&n&&(e.j41(0,"div",1),e.EFF(1),e.nI1(2,"transloco"),e.k0s()),2&n&&(e.R7$(),e.JRh(e.bMT(2,1,"components.contextViewer.infoNoItems")))}let k=(()=>{class n{contextId=(0,d.hFB)(void 0);handlers=(0,d.hFB)(void 0);variant=(0,d.hFB)("none");contextDoc=(0,d.hFB)(void 0);documentData=(0,d.hFB)({});entityData=(0,d.hFB)({});itemRowClicked=(0,d.CGW)();loading=(0,r.EW)(()=>!!this.contextId()&&!this.contextDoc());_docItems=(0,r.EW)(()=>(this.contextDoc()?.items??[]).filter(t=>"document"===t.type));_entityItems=(0,r.EW)(()=>(this.contextDoc()?.items??[]).filter(t=>"entity"===t.type));hasDocuments=(0,r.EW)(()=>this._docItems().length>0);hasEntities=(0,r.EW)(()=>this._entityItems().length>0);hasBoth=(0,r.EW)(()=>this.hasDocuments()&&this.hasEntities());documentRefs=(0,r.EW)(()=>this._docItems().map(t=>({id:t.id,relevance:t.relevance})));entityIris=(0,r.EW)(()=>this._entityItems().map(t=>t.id));_docHandlers=(0,r.EW)(()=>({requestData:t=>this.handlers()?.requestDocumentData?.(t),requestDownload:t=>this.handlers()?.requestDownloadDocument?.(t),requestOpen:(t,o)=>this.handlers()?.requestOpenDocument?.(t,o),requestOpenInDir:(t,o)=>this.handlers()?.requestOpenDocumentInDir?.(t,o)}));_entityHandlers=(0,r.EW)(()=>({requestData:(t,o)=>this.handlers()?.requestEntityData?.(t,o),requestOpen:t=>this.handlers()?.requestOpenEntity?.(t)}));onEntityRowClicked({row:t}){this.itemRowClicked.emit({type:"entity",row:t,index:this._originalIndex(t.entity)})}onDocumentClicked(t){this.itemRowClicked.emit({type:"document",row:t,index:this._originalIndex(t.id)})}_originalIndex(t){return(this.contextDoc()?.items??[]).findIndex(o=>o.id===t)}constructor(){(0,a.QZP)(()=>{const t=this.contextId();t&&this.handlers()?.requestContext?.(t)})}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=e.VBU({type:n,selectors:[["cue-context-viewer-inner"]],inputs:{contextId:[1,"contextId"],handlers:[1,"handlers"],variant:[1,"variant"],contextDoc:[1,"contextDoc"],documentData:[1,"documentData"],entityData:[1,"entityData"]},outputs:{itemRowClicked:"itemRowClicked"},decls:7,vars:5,consts:[[2,"position","relative","height","100%","width","100%",3,"cueLogoLoader","cueLogoLoaderMessage"],[1,"cv-status"],[2,"height","100%"],[3,"documentRefs","documentData","handlers","variant"],[2,"height","400px",3,"entities","entityData","handlers"],[3,"label"],[3,"clickedDocument","documentRefs","documentData","handlers","variant"],[2,"height","100%",3,"rowClicked","entities","entityData","handlers"],[2,"height","400px",3,"rowClicked","entities","entityData","handlers"]],template:function(o,s){1&o&&(e.j41(0,"div",0),e.nI1(1,"transloco"),e.nVh(2,I,3,3,"div",1)(3,w,7,13,"cue-tabs",2)(4,b,1,4,"cue-doc-list",3)(5,M,1,3,"cue-ent-list-inner",4)(6,R,3,3,"div",1),e.k0s()),2&o&&(e.Y8G("cueLogoLoader",s.loading())("cueLogoLoaderMessage",e.bMT(1,3,"components.contextViewer.infoLoading")),e.R7$(2),e.vxM(s.contextDoc()?s.hasBoth()?3:s.hasDocuments()?4:s.hasEntities()?5:6:2))},dependencies:[v.g,_.u,f.t,C.o,D.k,y.Kj],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}.cv-status[_ngcontent-%COMP%]{padding:16px;color:var(--cue-color-midgray, #888);font-size:13px}"],changeDetection:0})}return n})();var V=c(5381),j=c(2245),N=c(7293);function E(n,l){if(1&n&&(e.j41(0,"cue-flexcontainer",0)(1,"cue-typography",2),e.EFF(2),e.k0s()()),2&n){const t=e.XpG();e.R7$(2),e.SpI(" ",t.errorMessage()," ")}}function T(n,l){1&n&&(e.j41(0,"cue-flexcontainer",0)(1,"cue-typography",3),e.EFF(2," No project connected. "),e.k0s()())}function F(n,l){if(1&n&&e.nrm(0,"cue-logo-link",5),2&n){const t=e.XpG(2);e.Y8G("projectId",t.projectId())}}function G(n,l){if(1&n){const t=e.RV6();e.j41(0,"div",1)(1,"cue-context-viewer-inner",4),e.bIt("itemRowClicked",function(s){a.eBV(t);const i=e.XpG();return a.Njj(i.itemRowClicked.emit(s))}),e.k0s(),e.nVh(2,F,1,1,"cue-logo-link",5),e.k0s()}if(2&n){const t=e.XpG();e.Y8G("cueLogoLoader","loading"===t.state()),e.R7$(),e.Y8G("contextDoc",t.contextDoc())("documentData",t.documentData())("entityData",t.entityData())("handlers",t._handlers())("variant",t.variant()),e.R7$(),e.vxM(t.showLogo()?2:-1)}}function B(n){return{id:n.id,contentIRI:n.contentIRI??n.id,path:n.path??"",suffix:n.suffix??"",size:n.size??0,tags:n.tags??[],summary:n.summary??"",categories:n.categories??[],subject:n.subject,providerId:n.providerId,relevance:0}}let L=(()=>{class n{cue=(0,d.hFB)(void 0);projectId=(0,d.hFB)(void 0);contextId=(0,d.hFB)(void 0);variant=(0,d.hFB)("none");showLogo=(0,d.hFB)(!1,{transform:d.L39});itemRowClicked=(0,d.CGW)();state=(0,a.vPA)("idle");errorMessage=(0,a.vPA)(null);contextDoc=(0,a.vPA)(void 0);documentData=(0,a.vPA)({});entityData=(0,a.vPA)({});_documents=(0,a.vPA)(void 0);_entities=(0,a.vPA)(void 0);_unsubDocs;_unsubEntities;_inputWarningTimer;_handlers=(0,r.EW)(()=>({requestDocumentData:t=>this._documents()?.requestDocumentData(t),requestEntityData:(t,o)=>this._entities()?.requestEntityData(t,o)}));constructor(){this._inputWarningTimer=setTimeout(()=>{this.cue()||console.warn('[cue-context-viewer] Required input "cue" is not set. Pass an authenticated Cue SDK instance.'),this.projectId()||console.warn('[cue-context-viewer] Required input "projectId" is not set.'),this.contextId()||console.warn('[cue-context-viewer] Required input "contextId" is not set.')},3e3),(0,a.QZP)(()=>{this._load(this.cue(),this.projectId(),this.contextId())})}ngOnDestroy(){clearTimeout(this._inputWarningTimer),this._teardown()}_load(t,o,s){var i=this;return(0,p.A)(function*(){if(i._teardown(),i.contextDoc.set(void 0),i.documentData.set({}),i.entityData.set({}),t&&o&&s){i.state.set("loading"),i.errorMessage.set(null);try{const u=yield t.api.contexts.getContext(o,s);i.contextDoc.set(u);const m=new g.f$(t.api,o),h=new g.g8(t.api,o);i._documents.set(m),i._entities.set(h),i._unsubDocs=m.documentInfoMap.subscribe(()=>i._syncDocumentData(m)),i._unsubEntities=h.entityInfoMap.subscribe(()=>i._syncEntityData(h)),i.state.set("ready")}catch(u){console.error("[cue-context-viewer] Failed to load context",u),i.errorMessage.set(u instanceof Error?u.message:"Failed to load context."),i.state.set("error")}}else i.state.set("idle")})()}_syncDocumentData(t){const o=t.documentInfoMap.get(),s={};for(const[i,u]of Object.entries(o))s[i]=B(u);this.documentData.set(s)}_syncEntityData(t){const o=t.entityInfoMap.get(),s={};for(const[i,u]of Object.entries(o))s[i]={value:u.value??i,categories:u.categories??[],mentionCount:u.mentionCount};this.entityData.set(s)}_teardown(){this._unsubDocs?.(),this._unsubEntities?.(),this._unsubDocs=void 0,this._unsubEntities=void 0,this._documents.set(void 0),this._entities.set(void 0)}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=e.VBU({type:n,selectors:[["cue-context-viewer"]],inputs:{cue:[1,"cue"],projectId:[1,"projectId"],contextId:[1,"contextId"],variant:[1,"variant"],showLogo:[1,"showLogo"]},outputs:{itemRowClicked:"itemRowClicked"},decls:3,vars:1,consts:[["direction","column","align","center","justify","center",2,"height","100%","width","100%","padding","8px"],[2,"position","relative","height","100%","width","100%",3,"cueLogoLoader"],[2,"color","#c44","font-size","13px"],[2,"color","#9ca3af","font-size","13px"],[2,"height","100%",3,"itemRowClicked","contextDoc","documentData","entityData","handlers","variant"],[2,"position","absolute","top","12px","left","12px","z-index","5",3,"projectId"]],template:function(o,s){1&o&&e.nVh(0,E,3,1,"cue-flexcontainer",0)(1,T,3,0,"cue-flexcontainer",0)(2,G,3,7,"div",1),2&o&&e.vxM("error"===s.state()?0:"idle"===s.state()?1:2)},dependencies:[k,V.FlexContainer,j.Typography,D.k,N.x],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}"],changeDetection:0})}return n})()}}]);
1
+ "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[9396],{9396(U,D,s){s.d(D,{CueContextViewer:()=>A});var v=s(467),r=s(7705),c=s(5802),d=s(2271),h=s(8645),w=s(3656),p=s(2839),x=s(4631),f=s(1625),y=s(6455),C=s(8334),M=s(9352),g=s(7851),t=s(5547);function I(n,u){1&n&&(t.j41(0,"div",1),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&n&&(t.R7$(),t.JRh(t.bMT(2,1,"components.contextViewer.infoNoContext")))}function k(n,u){if(1&n){const e=t.RV6();t.j41(0,"cue-tabs",2)(1,"cue-tab",5),t.nI1(2,"transloco"),t.j41(3,"cue-doc-list",6),t.bIt("clickedDocument",function(a){c.eBV(e);const i=t.XpG();return c.Njj(i.onDocumentClicked(a))})("viewMarkdown",function(a){c.eBV(e);const i=t.XpG();return c.Njj(i.onDocumentViewMarkdown(a))}),t.k0s()(),t.j41(4,"cue-tab",5),t.nI1(5,"transloco"),t.j41(6,"cue-ent-list-inner",7),t.bIt("rowClicked",function(a){c.eBV(e);const i=t.XpG();return c.Njj(i.onEntityRowClicked(a))})("viewMarkdown",function(a){c.eBV(e);const i=t.XpG();return c.Njj(i.onEntityViewMarkdown(a))}),t.k0s()()()}if(2&n){const e=t.XpG();t.R7$(),t.Y8G("label",t.bMT(2,9,"components.contextViewer.tabDocuments")),t.R7$(2),t.Y8G("documentRefs",e.documentRefs())("documentData",e.documentData())("handlers",e._docHandlers())("variant",e.variant()),t.R7$(),t.Y8G("label",t.bMT(5,11,"components.contextViewer.tabEntities")),t.R7$(2),t.Y8G("entities",e.entityIris())("entityData",e.entityData())("handlers",e._entityHandlers())}}function V(n,u){if(1&n){const e=t.RV6();t.nrm(0,"cue-document-info",8),t.j41(1,"cue-doc-list",9),t.bIt("viewMarkdown",function(a){c.eBV(e);const i=t.XpG();return c.Njj(i.onDocumentViewMarkdown(a))}),t.k0s()}if(2&n){const e=t.XpG();t.Y8G("subject",e.singleDocumentSubject())("handlers",e._docInfoHandlers)("contentCategories",e.singleDocument().categories)("fileLocations",e.singleDocumentFileLocations()),t.R7$(),t.Y8G("documentRefs",e.documentRefs())("documentData",e.documentData())("handlers",e._docHandlers())("variant",e.variant())}}function b(n,u){if(1&n){const e=t.RV6();t.j41(0,"cue-doc-list",6),t.bIt("clickedDocument",function(a){c.eBV(e);const i=t.XpG();return c.Njj(i.onDocumentClicked(a))})("viewMarkdown",function(a){c.eBV(e);const i=t.XpG();return c.Njj(i.onDocumentViewMarkdown(a))}),t.k0s()}if(2&n){const e=t.XpG();t.Y8G("documentRefs",e.documentRefs())("documentData",e.documentData())("handlers",e._docHandlers())("variant",e.variant())}}function j(n,u){if(1&n){const e=t.RV6();t.nrm(0,"cue-entity-info",10),t.j41(1,"cue-ent-list-inner",11),t.bIt("viewMarkdown",function(a){c.eBV(e);const i=t.XpG();return c.Njj(i.onEntityViewMarkdown(a))}),t.k0s()}if(2&n){const e=t.XpG();t.Y8G("entity",e.singleEntity())("handlers",e._entityInfoHandlers),t.R7$(),t.Y8G("entities",e.entityIris())("entityData",e.entityData())("handlers",e._entityHandlers())}}function E(n,u){if(1&n){const e=t.RV6();t.j41(0,"cue-ent-list-inner",12),t.bIt("rowClicked",function(a){c.eBV(e);const i=t.XpG();return c.Njj(i.onEntityRowClicked(a))})("viewMarkdown",function(a){c.eBV(e);const i=t.XpG();return c.Njj(i.onEntityViewMarkdown(a))}),t.k0s()}if(2&n){const e=t.XpG();t.Y8G("entities",e.entityIris())("entityData",e.entityData())("handlers",e._entityHandlers())}}function R(n,u){1&n&&(t.j41(0,"div",1),t.EFF(1),t.nI1(2,"transloco"),t.k0s()),2&n&&(t.R7$(),t.JRh(t.bMT(2,1,"components.contextViewer.infoNoItems")))}let N=(()=>{class n{contextId=(0,r.hFB)(void 0);handlers=(0,r.hFB)(void 0);variant=(0,r.hFB)("none");contextDoc=(0,r.hFB)(void 0);documentData=(0,r.hFB)({});entityData=(0,r.hFB)({});itemRowClicked=(0,r.CGW)();viewMarkdown=(0,r.CGW)();loading=(0,d.EW)(()=>!!this.contextId()&&!this.contextDoc());_docItems=(0,d.EW)(()=>(this.contextDoc()?.items??[]).filter(e=>"document"===e.type));_entityItems=(0,d.EW)(()=>(this.contextDoc()?.items??[]).filter(e=>"entity"===e.type));hasDocuments=(0,d.EW)(()=>this._docItems().length>0);hasEntities=(0,d.EW)(()=>this._entityItems().length>0);hasBoth=(0,d.EW)(()=>this.hasDocuments()&&this.hasEntities());documentRefs=(0,d.EW)(()=>this._docItems().map(e=>({id:e.id,relevance:e.relevance})));entityIris=(0,d.EW)(()=>this._entityItems().map(e=>e.id));singleDocument=(0,d.EW)(()=>{if(1===this._docItems().length)return this.documentData()[this._docItems()[0].id]});isSingleDocument=(0,d.EW)(()=>this.hasDocuments()&&!this.hasEntities()&&!!this.singleDocument());singleDocumentSubject=(0,d.EW)(()=>this.singleDocument()?.subject||this.singleDocument()?.path||"");singleDocumentFileLocations=(0,d.EW)(()=>{const e=this.singleDocument();return e?[{iri:e.id,path:e.path,providerId:e.providerId}]:[]});_docInfoHandlers={};singleEntity=(0,d.EW)(()=>{if(1!==this._entityItems().length)return;const e=this._entityItems()[0].id,o=this.entityData()[e];return o?{iri:e,value:o.value,categories:o.categories}:void 0});isSingleEntity=(0,d.EW)(()=>this.hasEntities()&&!this.hasDocuments()&&!!this.singleEntity());_entityInfoHandlers={};_docHandlers=(0,d.EW)(()=>({requestData:e=>this.handlers()?.requestDocumentData?.(e),requestDownload:e=>this.handlers()?.requestDownloadDocument?.(e),requestOpen:(e,o)=>this.handlers()?.requestOpenDocument?.(e,o),requestOpenInDir:(e,o)=>this.handlers()?.requestOpenDocumentInDir?.(e,o)}));_entityHandlers=(0,d.EW)(()=>({requestData:(e,o)=>this.handlers()?.requestEntityData?.(e,o),requestOpen:e=>this.handlers()?.requestOpenEntity?.(e)}));onEntityRowClicked({row:e}){this.itemRowClicked.emit({type:"entity",row:e,index:this._originalIndex(e.entity)})}onDocumentClicked(e){this.itemRowClicked.emit({type:"document",row:e,index:this._originalIndex(e.id)})}onDocumentViewMarkdown(e){this.viewMarkdown.emit({type:"document",markdown:e})}onEntityViewMarkdown(e){this.viewMarkdown.emit({type:"entity",markdown:e})}_originalIndex(e){return(this.contextDoc()?.items??[]).findIndex(o=>o.id===e)}constructor(){(0,c.QZP)(()=>{const e=this.contextId();e&&this.handlers()?.requestContext?.(e)})}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=t.VBU({type:n,selectors:[["cue-context-viewer-inner"]],inputs:{contextId:[1,"contextId"],handlers:[1,"handlers"],variant:[1,"variant"],contextDoc:[1,"contextDoc"],documentData:[1,"documentData"],entityData:[1,"entityData"]},outputs:{itemRowClicked:"itemRowClicked",viewMarkdown:"viewMarkdown"},decls:9,vars:5,consts:[[2,"position","relative","height","100%","width","100%",3,"cueLogoLoader","cueLogoLoaderMessage"],[1,"cv-status"],[2,"height","100%"],[3,"documentRefs","documentData","handlers","variant"],[2,"height","400px",3,"entities","entityData","handlers"],[3,"label"],[3,"clickedDocument","viewMarkdown","documentRefs","documentData","handlers","variant"],[2,"height","100%",3,"rowClicked","viewMarkdown","entities","entityData","handlers"],[3,"subject","handlers","contentCategories","fileLocations"],[2,"display","none",3,"viewMarkdown","documentRefs","documentData","handlers","variant"],[3,"entity","handlers"],[2,"display","none",3,"viewMarkdown","entities","entityData","handlers"],[2,"height","400px",3,"rowClicked","viewMarkdown","entities","entityData","handlers"]],template:function(o,a){1&o&&(t.j41(0,"div",0),t.nI1(1,"transloco"),t.nVh(2,I,3,3,"div",1)(3,k,7,13,"cue-tabs",2)(4,V,2,8)(5,b,1,4,"cue-doc-list",3)(6,j,2,5)(7,E,1,3,"cue-ent-list-inner",4)(8,R,3,3,"div",1),t.k0s()),2&o&&(t.Y8G("cueLogoLoader",a.loading())("cueLogoLoaderMessage",t.bMT(1,3,"components.contextViewer.infoLoading")),t.R7$(2),t.vxM(a.contextDoc()?a.hasBoth()?3:a.isSingleDocument()?4:a.hasDocuments()?5:a.isSingleEntity()?6:a.hasEntities()?7:8:2))},dependencies:[w.g,p.u,x.G,f.U,y.t,C.o,g.k,M.Kj],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}.cv-status[_ngcontent-%COMP%]{padding:16px;color:var(--cue-color-midgray, #888);font-size:13px}"],changeDetection:0})}return n})();var G=s(5381),T=s(2245),B=s(7293),L=s(7727),F=s(3202);function W(n,u){if(1&n&&(t.j41(0,"cue-flexcontainer",0)(1,"cue-typography",2),t.EFF(2),t.k0s()()),2&n){const e=t.XpG();t.R7$(2),t.SpI(" ",e.errorMessage()," ")}}function X(n,u){1&n&&(t.j41(0,"cue-flexcontainer",0)(1,"cue-typography",3),t.EFF(2," No project connected. "),t.k0s()())}function Y(n,u){if(1&n){const e=t.RV6();t.nrm(0,"cue-document-viewer-wc",4),t.j41(1,"cue-context-viewer-inner",5),t.bIt("viewMarkdown",function(a){c.eBV(e);const i=t.XpG(2);return c.Njj(i.viewMarkdown.emit(a))}),t.k0s()}if(2&n){const e=t.XpG(2);t.Y8G("cue",e.cue())("projectId",e.projectId())("uuid",u)("showLogo",e.showLogo())("variant",e.variant()),t.R7$(),t.Y8G("contextDoc",e.contextDoc())("documentData",e.documentData())("entityData",e.entityData())("handlers",e._handlers())("variant",e.variant())}}function $(n,u){if(1&n){const e=t.RV6();t.nrm(0,"cue-entity-viewer-wc",6),t.j41(1,"cue-context-viewer-inner",5),t.bIt("viewMarkdown",function(a){c.eBV(e);const i=t.XpG(2);return c.Njj(i.viewMarkdown.emit(a))}),t.k0s()}if(2&n){const e=t.XpG(2);t.Y8G("cue",e.cue())("projectId",e.projectId())("iri",u)("showLogo",e.showLogo())("variant",e.variant()),t.R7$(),t.Y8G("contextDoc",e.contextDoc())("documentData",e.documentData())("entityData",e.entityData())("handlers",e._handlers())("variant",e.variant())}}function H(n,u){if(1&n&&t.nrm(0,"cue-logo-link",8),2&n){const e=t.XpG(3);t.Y8G("projectId",e.projectId())}}function P(n,u){if(1&n){const e=t.RV6();t.j41(0,"cue-context-viewer-inner",7),t.bIt("itemRowClicked",function(a){c.eBV(e);const i=t.XpG(2);return c.Njj(i.itemRowClicked.emit(a))})("viewMarkdown",function(a){c.eBV(e);const i=t.XpG(2);return c.Njj(i.viewMarkdown.emit(a))}),t.k0s(),t.nVh(1,H,1,1,"cue-logo-link",8)}if(2&n){const e=t.XpG(2);t.Y8G("contextDoc",e.contextDoc())("documentData",e.documentData())("entityData",e.entityData())("handlers",e._handlers())("variant",e.variant()),t.R7$(),t.vxM(e.showLogo()?1:-1)}}function O(n,u){if(1&n&&(t.j41(0,"div",1),t.nVh(1,Y,2,10)(2,$,2,10)(3,P,2,6),t.k0s()),2&n){let e;const o=t.XpG();t.Y8G("cueLogoLoader","loading"===o.state()),t.R7$(),t.vxM((e=o._singleDocumentUuid())?1:(e=o._singleEntityIri())?2:3,e)}}function S(n){return{id:n.id,contentIRI:n.contentIRI??n.id,path:n.path??"",suffix:n.suffix??"",size:n.size??0,tags:n.tags??[],summary:n.summary??"",categories:n.categories??[],subject:n.subject,providerId:n.providerId,relevance:0}}let A=(()=>{class n{cue=(0,r.hFB)(void 0);projectId=(0,r.hFB)(void 0);contextId=(0,r.hFB)(void 0);variant=(0,r.hFB)("none");showLogo=(0,r.hFB)(!1,{transform:r.L39});itemRowClicked=(0,r.CGW)();viewMarkdown=(0,r.CGW)();state=(0,c.vPA)("idle");errorMessage=(0,c.vPA)(null);contextDoc=(0,c.vPA)(void 0);documentData=(0,c.vPA)({});entityData=(0,c.vPA)({});_documents=(0,c.vPA)(void 0);_entities=(0,c.vPA)(void 0);_unsubDocs;_unsubEntities;_inputWarningTimer;_singleDocumentUuid=(0,d.EW)(()=>{const e=this.contextDoc()?.items??[],o=e.filter(i=>"document"===i.type),a=e.filter(i=>"entity"===i.type);return 1===o.length&&0===a.length?o[0].id:void 0});_singleEntityIri=(0,d.EW)(()=>{const e=this.contextDoc()?.items??[],o=e.filter(i=>"document"===i.type),a=e.filter(i=>"entity"===i.type);return 1===a.length&&0===o.length?a[0].id:void 0});_handlers=(0,d.EW)(()=>({requestDocumentData:e=>this._documents()?.requestDocumentData(e),requestEntityData:(e,o)=>this._entities()?.requestEntityData(e,o)}));constructor(){this._inputWarningTimer=setTimeout(()=>{this.cue()||console.warn('[cue-context-viewer] Required input "cue" is not set. Pass an authenticated Cue SDK instance.'),this.projectId()||console.warn('[cue-context-viewer] Required input "projectId" is not set.'),this.contextId()||console.warn('[cue-context-viewer] Required input "contextId" is not set.')},3e3),(0,c.QZP)(()=>{this._load(this.cue(),this.projectId(),this.contextId())})}ngOnDestroy(){clearTimeout(this._inputWarningTimer),this._teardown()}_load(e,o,a){var i=this;return(0,v.A)(function*(){if(i._teardown(),i.contextDoc.set(void 0),i.documentData.set({}),i.entityData.set({}),e&&o&&a){i.state.set("loading"),i.errorMessage.set(null);try{const l=yield e.api.contexts.getContext(o,a);i.contextDoc.set(l);const m=new h.f$(e.api,o),_=new h.g8(e.api,o);i._documents.set(m),i._entities.set(_),i._unsubDocs=m.documentInfoMap.subscribe(()=>i._syncDocumentData(m)),i._unsubEntities=_.entityInfoMap.subscribe(()=>i._syncEntityData(_)),i.state.set("ready")}catch(l){console.error("[cue-context-viewer] Failed to load context",l),i.errorMessage.set(l instanceof Error?l.message:"Failed to load context."),i.state.set("error")}}else i.state.set("idle")})()}_syncDocumentData(e){const o=e.documentInfoMap.get(),a={};for(const[i,l]of Object.entries(o))a[i]=S(l);this.documentData.set(a)}_syncEntityData(e){const o=e.entityInfoMap.get(),a={};for(const[i,l]of Object.entries(o))a[i]={value:l.value??i,categories:l.categories??[],mentionCount:l.mentionCount};this.entityData.set(a)}_teardown(){this._unsubDocs?.(),this._unsubEntities?.(),this._unsubDocs=void 0,this._unsubEntities=void 0,this._documents.set(void 0),this._entities.set(void 0)}static \u0275fac=function(o){return new(o||n)};static \u0275cmp=t.VBU({type:n,selectors:[["cue-context-viewer"]],inputs:{cue:[1,"cue"],projectId:[1,"projectId"],contextId:[1,"contextId"],variant:[1,"variant"],showLogo:[1,"showLogo"]},outputs:{itemRowClicked:"itemRowClicked",viewMarkdown:"viewMarkdown"},decls:3,vars:1,consts:[["direction","column","align","center","justify","center",2,"height","100%","width","100%","padding","8px"],[2,"position","relative","height","100%","width","100%",3,"cueLogoLoader"],[2,"color","#c44","font-size","13px"],[2,"color","#9ca3af","font-size","13px"],[2,"height","100%","display","block",3,"cue","projectId","uuid","showLogo","variant"],[2,"display","none",3,"viewMarkdown","contextDoc","documentData","entityData","handlers","variant"],[2,"height","100%","display","block",3,"cue","projectId","iri","showLogo","variant"],[2,"height","100%",3,"itemRowClicked","viewMarkdown","contextDoc","documentData","entityData","handlers","variant"],[2,"position","absolute","top","12px","left","12px","z-index","5",3,"projectId"]],template:function(o,a){1&o&&t.nVh(0,W,3,1,"cue-flexcontainer",0)(1,X,3,0,"cue-flexcontainer",0)(2,O,4,2,"div",1),2&o&&t.vxM("error"===a.state()?0:"idle"===a.state()?1:2)},dependencies:[N,G.FlexContainer,T.Typography,g.k,B.x,L.CueDocumentViewer,F.CueEntityViewer],styles:["[_nghost-%COMP%]{display:block;width:100%;height:100%}"],changeDetection:0})}return n})()}}]);
package/9707.js ADDED
@@ -0,0 +1 @@
1
+ (self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[9695,9707],{5448(R,O,_){"use strict";_.d(O,{ButtonLabel:()=>D});var g=_(7705),x=_(2245),u=_(5547);const e=["*"];let D=(()=>{class p{fontSize=(0,g.hFB)("m");italic=(0,g.hFB)(!1);noWrap=(0,g.hFB)(!0);static \u0275fac=function(b){return new(b||p)};static \u0275cmp=u.VBU({type:p,selectors:[["cue-button-label"]],inputs:{fontSize:[1,"fontSize"],italic:[1,"italic"],noWrap:[1,"noWrap"]},ngContentSelectors:e,decls:3,vars:3,consts:[[3,"size","italic","noWrap"]],template:function(b,v){1&b&&(u.NAR(),u.j41(0,"div")(1,"cue-typography",0),u.SdG(2),u.k0s()()),2&b&&(u.R7$(),u.Y8G("size",v.fontSize())("italic",v.italic())("noWrap",v.noWrap()))},dependencies:[x.Typography],styles:["div[_ngcontent-%COMP%]{transform:translateY(.05em)}"]})}return p})()},9695(R,O,_){"use strict";_.d(O,{Switch:()=>p});var g=_(7705),x=_(29),u=_(5547);function e(d,s){if(1&d&&u.nrm(0,"cue-svg-icon",2),2&d){const b=u.XpG();u.Y8G("name",b.iconChecked())}}function D(d,s){if(1&d&&u.nrm(0,"cue-svg-icon",2),2&d){const b=u.XpG();u.Y8G("name",b.icon())}}let p=(()=>{class d{size=(0,g.hFB)("m");icon=(0,g.hFB)(void 0);iconChecked=(0,g.hFB)(void 0);disabled=(0,g.hFB)(!1);checked=(0,g.geq)(!1);toggleChange=(0,g.CGW)();toggle(){this.checked.set(!this.checked()),this.toggleChange.emit(this.checked())}static \u0275fac=function(v){return new(v||d)};static \u0275cmp=u.VBU({type:d,selectors:[["cue-input-switch"]],hostVars:5,hostBindings:function(v,M){2&v&&(u.BMQ("size",M.size()),u.AVh("checked",M.checked())("disabled",M.disabled()))},inputs:{size:[1,"size"],icon:[1,"icon"],iconChecked:[1,"iconChecked"],disabled:[1,"disabled"],checked:[1,"checked"]},outputs:{checked:"checkedChange",toggleChange:"toggleChange"},decls:4,vars:3,consts:[["type","checkbox",3,"click","checked","disabled"],[1,"indicator"],[3,"name"]],template:function(v,M){1&v&&(u.j41(0,"input",0),u.bIt("click",function(){return M.toggle()}),u.k0s(),u.j41(1,"div",1),u.nVh(2,e,1,1,"cue-svg-icon",2)(3,D,1,1,"cue-svg-icon",2),u.k0s()),2&v&&(u.Y8G("checked",M.checked())("disabled",M.disabled()),u.R7$(2),u.vxM(M.checked()&&M.iconChecked()?2:M.icon()?3:-1))},dependencies:[x.A],styles:["[_nghost-%COMP%]{--cue-input-switch-height: 18px;--cue-input-switch-width: calc(var(--cue-input-switch-height) * 1.7);--cue-input-switch-inset: 2px;--cue-input-switch-indicator-width: calc( var(--cue-input-switch-height) - (2 * var(--cue-input-switch-inset)) );--cue-input-switch-icon-width: calc( var(--cue-input-switch-indicator-width) - (2 * var(--cue-input-switch-inset)) );display:block;flex-shrink:0;position:relative;height:var(--cue-input-switch-height);width:var(--cue-input-switch-width);border-radius:var(--cue-input-switch-height);--cue-icon-width: var(--cue-input-switch-icon-width);background:var(--cue-input-switch-background);transition:background-color .4s ease}[size=xs][_nghost-%COMP%]{--cue-input-switch-height: 12px;--cue-input-switch-inset: 1px}[size=s][_nghost-%COMP%]{--cue-input-switch-height: 14px;--cue-input-switch-inset: 1px}[size=m][_nghost-%COMP%]{--cue-input-switch-height: 18px;--cue-input-switch-inset: 2px}[size=l][_nghost-%COMP%]{--cue-input-switch-height: 22px;--cue-input-switch-inset: 3px}[size=xl][_nghost-%COMP%]{--cue-input-switch-height: 28px;--cue-input-switch-inset: 3px}@container cue-container (width < 20em){[_nghost-%COMP%]{--cue-input-switch-height: 16px}[size=xs][_nghost-%COMP%]{--cue-input-switch-height: 10px}[size=s][_nghost-%COMP%]{--cue-input-switch-height: 12px}[size=m][_nghost-%COMP%]{--cue-input-switch-height: 16px}[size=l][_nghost-%COMP%]{--cue-input-switch-height: 18px}[size=xl][_nghost-%COMP%]{--cue-input-switch-height: 20px}}.checked[_nghost-%COMP%]{background:var(--cue-input-switch-checked-background)}.disabled[_nghost-%COMP%]{background:var(--cue-input-switch-disabled-background);cursor:default}[_nghost-%COMP%] .indicator[_ngcontent-%COMP%]{pointer-events:none;position:absolute;left:var(--cue-input-switch-inset);top:var(--cue-input-switch-inset);width:var(--cue-input-switch-indicator-width);aspect-ratio:1;border-radius:50%;display:flex;align-items:center;justify-content:center;background-color:var(--cue-input-switch-indicator-background);color:var(--cue-input-switch-indicator-foreground);transition:left .4s ease,background-color .4s ease,color .4s ease}.checked[_nghost-%COMP%] .indicator[_ngcontent-%COMP%]{left:calc(var(--cue-input-switch-width) - var(--cue-input-switch-inset) - var( --cue-input-switch-indicator-width ));background:var(--cue-input-switch-checked-indicator-background);color:var(--cue-input-switch-checked-indicator-foreground)}.disabled[_nghost-%COMP%] .indicator[_ngcontent-%COMP%]{background:var(--cue-input-switch-disabled-indicator-background);color:var(--cue-input-switch-disabled-indicator-foreground)}input[_ngcontent-%COMP%]{all:unset;position:absolute;inset:0;cursor:pointer;border-radius:var(--cue-input-switch-height)}input[_ngcontent-%COMP%]:focus-visible:not(:disabled) + .indicator[_ngcontent-%COMP%]{outline:1px solid var(--cue-input-switch-focus-color);outline-offset:2px}"]})}return d})()},5745(R,O,_){"use strict";_.d(O,{a:()=>I});var g=_(7705),x=_(5802),u=_(2271),e=_(5547);const D=["dialog"],p=["*",[["","modal-footer",""]]],d=["*","[modal-footer]"];function s(w,z){if(1&w&&(e.rj2(0,"h2",7),e.EFF(1),e.eux()),2&w){const l=e.XpG(3);e.R7$(),e.JRh(l.effectiveTitle())}}function b(w,z){if(1&w&&(e.rj2(0,"p",8),e.EFF(1),e.eux()),2&w){const l=e.XpG(3);e.R7$(),e.JRh(l.subtitle())}}function v(w,z){if(1&w){const l=e.RV6();e.rj2(0,"button",10),e.VwU("click",function(){x.eBV(l);const P=e.XpG(3);return x.Njj(P.onClose())}),x.qSk(),e.rj2(1,"svg",11),e.Hgh(2,"path",12),e.eux()()}}function M(w,z){if(1&w&&(e.rj2(0,"div",4)(1,"div",6),e.nVh(2,s,2,1,"h2",7),e.nVh(3,b,2,1,"p",8),e.eux(),e.nVh(4,v,3,0,"button",9),e.eux()),2&w){const l=e.XpG(2);e.R7$(2),e.vxM(l.effectiveTitle()?2:-1),e.R7$(),e.vxM(l.subtitle()?3:-1),e.R7$(),e.vxM(l.displayCloseBtn()?4:-1)}}function U(w,z){if(1&w&&(e.rj2(0,"div",3),e.VwU("click",function(S){return S.stopPropagation()}),e.nVh(1,M,5,3,"div",4),e.rj2(2,"div",5),e.SdG(3),e.eux(),e.SdG(4,1),e.eux()),2&w){const l=e.XpG();e.xc7("min-width",l.minWidth()),e.AVh("has-header",l.effectiveTitle()||l.displayCloseBtn()),e.R7$(),e.vxM(l.effectiveTitle()||l.displayCloseBtn()?1:-1)}}let I=(()=>{class w{visible=(0,g.geq)(!0);closeOnBackgroundClick=(0,g.hFB)(!0);displayCloseBtn=(0,g.hFB)(!0);label=(0,g.hFB)("");title=(0,g.hFB)("");subtitle=(0,g.hFB)("");minWidth=(0,g.hFB)();close=(0,g.CGW)();dialogRef=g.ebz.required("dialog");effectiveTitle=(0,u.EW)(()=>this.title()||this.label());constructor(){(0,x.QZP)(()=>{const l=this.dialogRef().nativeElement;this.visible()?l.open||l.showModal():l.open&&l.close()})}onBackdropClick(){this.closeOnBackgroundClick()&&this.onClose()}onClose(){this.visible.set(!1),this.close.emit()}static \u0275fac=function(S){return new(S||w)};static \u0275cmp=e.VBU({type:w,selectors:[["cue-modal"]],viewQuery:function(S,P){1&S&&e.wEZ(P.dialogRef,D,5),2&S&&e.NyB()},inputs:{visible:[1,"visible"],closeOnBackgroundClick:[1,"closeOnBackgroundClick"],displayCloseBtn:[1,"displayCloseBtn"],label:[1,"label"],title:[1,"title"],subtitle:[1,"subtitle"],minWidth:[1,"minWidth"]},outputs:{visible:"visibleChange",close:"close"},ngContentSelectors:d,decls:3,vars:1,consts:[["dialog",""],[1,"modal-dialog",3,"cancel","click"],[1,"panel",3,"has-header","minWidth"],[1,"panel",3,"click"],[1,"header"],[1,"body"],[1,"header-text"],[1,"modal-title"],[1,"modal-subtitle"],["type","button","aria-label","Close",1,"close-btn"],["type","button","aria-label","Close",1,"close-btn",3,"click"],["viewBox","0 0 256 256","xmlns","http://www.w3.org/2000/svg"],["fill","currentColor","d","M205.66 194.34a8 8 0 0 1-11.32 11.32L128 139.31l-66.34 66.35a8 8 0 0 1-11.32-11.32L116.69 128L61.34 72.66a8 8 0 0 1 11.32-11.32L128 116.69l66.34-66.35a8 8 0 0 1 11.32 11.32L139.31 128Z"]],template:function(S,P){1&S&&(e.NAR(p),e.rj2(0,"dialog",1,0),e.VwU("cancel",function(){return P.onClose()})("click",function(){return P.onBackdropClick()}),e.nVh(2,U,5,5,"div",2),e.eux()),2&S&&(e.R7$(2),e.vxM(P.visible()?2:-1))},styles:[".modal-dialog[_ngcontent-%COMP%]{padding:0;border:none;background:transparent;overflow:visible;margin:auto;outline:none;max-width:min(calc(100vw - 32px),80vw)}.modal-dialog[_ngcontent-%COMP%]::backdrop{background-color:var(--cue-modal-overlay-color, rgba(14, 24, 39, .55));-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px)}.panel[_ngcontent-%COMP%]{background:var(--cue-default);color:var(--cue-defaultContrast);border-radius:24px;border:1px solid var(--cue-border-color);box-shadow:0 12px 48px #00000047;max-height:88vh;overflow-y:auto;overflow-x:hidden;box-sizing:border-box;scrollbar-width:thin}.header[_ngcontent-%COMP%]{display:flex;align-items:flex-start;gap:12px;padding:26px 26px 0;margin-bottom:20px}.header-text[_ngcontent-%COMP%]{flex:1}.modal-title[_ngcontent-%COMP%]{margin:0;font-size:20px;font-weight:700;letter-spacing:-.01em;font-family:var(--cue-font-family);color:var(--cue-defaultContrast)}.modal-subtitle[_ngcontent-%COMP%]{margin:5px 0 0;font-size:13px;color:var(--cue-color-midgray);letter-spacing:.02em;line-height:1.5}.close-btn[_ngcontent-%COMP%]{flex:none;width:34px;height:34px;border-radius:50%;border:none;background:transparent;cursor:pointer;display:flex;align-items:center;justify-content:center;color:var(--cue-color-midgray);padding:0;margin-top:-4px;transition:background .15s,color .15s}.close-btn[_ngcontent-%COMP%]:hover{background:var(--cue-main-background);color:var(--cue-main-foreground)}.close-btn[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:18px;height:18px;display:block}.body[_ngcontent-%COMP%]{padding:26px}.has-header[_ngcontent-%COMP%] .body[_ngcontent-%COMP%]{padding-top:0}"]})}return w})()},2065(R,O,_){"use strict";function u(p,d,s="text/plain"){return function g(p,d="data.zip"){const s=document.createElement("a"),b=URL.createObjectURL(p);s.href=b,s.download=d,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(b)}(new Blob([p],{type:s}),d)}function e(p,d){const s=document.createElement("a");s.style.display="hidden",s.setAttribute("href",window.URL.createObjectURL(p)),s.setAttribute("download",d),document.body.appendChild(s),s.click(),s.remove()}_.d(O,{KE:()=>e,YN:()=>u})},7573(R,O,_){"use strict";_.d(O,{E:()=>g});const g={qcy:"https://dev.qaecy.com/ont#","qcy-e":"https://dev.qaecy.com/enum#","qcy-f":"https://dev.qaecy.com/functions#",obc:"https://w3id.org/obc#",dicc:"https://w3id.org/digitalconstruction/0.5/Contexts#",dicv:"https://w3id.org/digitalconstruction/0.5/Variables#",dice:"https://w3id.org/digitalconstruction/0.5/Entities#",dicp:"https://w3id.org/digitalconstruction/0.5/Processes#",dica:"https://w3id.org/digitalconstruction/0.5/Agents#",dici:"https://w3id.org/digitalconstruction/0.5/Information#",dicbm:"https://w3id.org/digitalconstruction/0.5/Materials#",dicob:"https://w3id.org/digitalconstruction/0.5/Occupancy#",dicl:"https://w3id.org/digitalconstruction/0.5/Lifecycle#",dices:"https://w3id.org/digitalconstruction/0.5/Energy#",dicu:"https://w3id.org/digitalconstruction/0.5/Units#",diclvl:"https://w3id.org/digitalconstruction/0.5/Levels#",dicstg:"https://w3id.org/digitalconstruction/0.5/Stages#"}},7374(R){R.exports=function(){"use strict";var _=6e4,g=36e5,x="millisecond",u="second",e="minute",D="hour",p="day",d="week",s="month",b="quarter",v="year",M="date",U="Invalid Date",I=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,z={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(c){var i=["th","st","nd","rd"],t=c%100;return"["+c+(i[(t-20)%10]||i[t]||i[0])+"]"}},l=function(c,i,t){var o=String(c);return!o||o.length>=i?c:""+Array(i+1-o.length).join(t)+c},S={s:l,z:function(c){var i=-c.utcOffset(),t=Math.abs(i),o=Math.floor(t/60),n=t%60;return(i<=0?"+":"-")+l(o,2,"0")+":"+l(n,2,"0")},m:function c(i,t){if(i.date()<t.date())return-c(t,i);var o=12*(t.year()-i.year())+(t.month()-i.month()),n=i.clone().add(o,s),r=t-n<0,a=i.clone().add(o+(r?-1:1),s);return+(-(o+(t-n)/(r?n-a:a-n))||0)},a:function(c){return c<0?Math.ceil(c)||0:Math.floor(c)},p:function(c){return{M:s,y:v,w:d,d:p,D:M,h:D,m:e,s:u,ms:x,Q:b}[c]||String(c||"").toLowerCase().replace(/s$/,"")},u:function(c){return void 0===c}},P="en",T={};T[P]=z;var H="$isDayjsObject",G=function(c){return c instanceof Y||!(!c||!c[H])},F=function c(i,t,o){var n;if(!i)return P;if("string"==typeof i){var r=i.toLowerCase();T[r]&&(n=r),t&&(T[r]=t,n=r);var a=i.split("-");if(!n&&a.length>1)return c(a[0])}else{var f=i.name;T[f]=i,n=f}return!o&&n&&(P=n),n||!o&&P},C=function(c,i){if(G(c))return c.clone();var t="object"==typeof i?i:{};return t.date=c,t.args=arguments,new Y(t)},h=S;h.l=F,h.i=G,h.w=function(c,i){return C(c,{locale:i.$L,utc:i.$u,x:i.$x,$offset:i.$offset})};var Y=function(){function c(t){this.$L=F(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[H]=!0}var i=c.prototype;return i.parse=function(t){this.$d=function(o){var n=o.date,r=o.utc;if(null===n)return new Date(NaN);if(h.u(n))return new Date;if(n instanceof Date)return new Date(n);if("string"==typeof n&&!/Z$/i.test(n)){var a=n.match(I);if(a){var f=a[2]-1||0,m=(a[7]||"0").substring(0,3);return r?new Date(Date.UTC(a[1],f,a[3]||1,a[4]||0,a[5]||0,a[6]||0,m)):new Date(a[1],f,a[3]||1,a[4]||0,a[5]||0,a[6]||0,m)}}return new Date(n)}(t),this.init()},i.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},i.$utils=function(){return h},i.isValid=function(){return this.$d.toString()!==U},i.isSame=function(t,o){var n=C(t);return this.startOf(o)<=n&&n<=this.endOf(o)},i.isAfter=function(t,o){return C(t)<this.startOf(o)},i.isBefore=function(t,o){return this.endOf(o)<C(t)},i.$g=function(t,o,n){return h.u(t)?this[o]:this.set(n,t)},i.unix=function(){return Math.floor(this.valueOf()/1e3)},i.valueOf=function(){return this.$d.getTime()},i.startOf=function(t,o){var n=this,r=!!h.u(o)||o,a=h.p(t),f=function(W,$){var E=h.w(n.$u?Date.UTC(n.$y,$,W):new Date(n.$y,$,W),n);return r?E:E.endOf(p)},m=function(W,$){return h.w(n.toDate()[W].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice($)),n)},y=this.$W,k=this.$M,B=this.$D,A="set"+(this.$u?"UTC":"");switch(a){case v:return r?f(1,0):f(31,11);case s:return r?f(1,k):f(0,k+1);case d:var L=this.$locale().weekStart||0,j=(y<L?y+7:y)-L;return f(r?B-j:B+(6-j),k);case p:case M:return m(A+"Hours",0);case D:return m(A+"Minutes",1);case e:return m(A+"Seconds",2);case u:return m(A+"Milliseconds",3);default:return this.clone()}},i.endOf=function(t){return this.startOf(t,!1)},i.$set=function(t,o){var n,r=h.p(t),a="set"+(this.$u?"UTC":""),f=(n={},n[p]=a+"Date",n[M]=a+"Date",n[s]=a+"Month",n[v]=a+"FullYear",n[D]=a+"Hours",n[e]=a+"Minutes",n[u]=a+"Seconds",n[x]=a+"Milliseconds",n)[r],m=r===p?this.$D+(o-this.$W):o;if(r===s||r===v){var y=this.clone().set(M,1);y.$d[f](m),y.init(),this.$d=y.set(M,Math.min(this.$D,y.daysInMonth())).$d}else f&&this.$d[f](m);return this.init(),this},i.set=function(t,o){return this.clone().$set(t,o)},i.get=function(t){return this[h.p(t)]()},i.add=function(t,o){var n,r=this;t=Number(t);var a=h.p(o),f=function(k){var B=C(r);return h.w(B.date(B.date()+Math.round(k*t)),r)};if(a===s)return this.set(s,this.$M+t);if(a===v)return this.set(v,this.$y+t);if(a===p)return f(1);if(a===d)return f(7);var m=(n={},n[e]=_,n[D]=g,n[u]=1e3,n)[a]||1,y=this.$d.getTime()+t*m;return h.w(y,this)},i.subtract=function(t,o){return this.add(-1*t,o)},i.format=function(t){var o=this,n=this.$locale();if(!this.isValid())return n.invalidDate||U;var r=t||"YYYY-MM-DDTHH:mm:ssZ",a=h.z(this),f=this.$H,m=this.$m,y=this.$M,k=n.weekdays,B=n.months,L=function($,E,N,V){return $&&($[E]||$(o,r))||N[E].slice(0,V)},j=function($){return h.s(f%12||12,$,"0")},W=n.meridiem||function($,E,N){var V=$<12?"AM":"PM";return N?V.toLowerCase():V};return r.replace(w,function($,E){return E||function(N){switch(N){case"YY":return String(o.$y).slice(-2);case"YYYY":return h.s(o.$y,4,"0");case"M":return y+1;case"MM":return h.s(y+1,2,"0");case"MMM":return L(n.monthsShort,y,B,3);case"MMMM":return L(B,y);case"D":return o.$D;case"DD":return h.s(o.$D,2,"0");case"d":return String(o.$W);case"dd":return L(n.weekdaysMin,o.$W,k,2);case"ddd":return L(n.weekdaysShort,o.$W,k,3);case"dddd":return k[o.$W];case"H":return String(f);case"HH":return h.s(f,2,"0");case"h":return j(1);case"hh":return j(2);case"a":return W(f,m,!0);case"A":return W(f,m,!1);case"m":return String(m);case"mm":return h.s(m,2,"0");case"s":return String(o.$s);case"ss":return h.s(o.$s,2,"0");case"SSS":return h.s(o.$ms,3,"0");case"Z":return a}return null}($)||a.replace(":","")})},i.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},i.diff=function(t,o,n){var r,a=this,f=h.p(o),m=C(t),y=(m.utcOffset()-this.utcOffset())*_,k=this-m,B=function(){return h.m(a,m)};switch(f){case v:r=B()/12;break;case s:r=B();break;case b:r=B()/3;break;case d:r=(k-y)/6048e5;break;case p:r=(k-y)/864e5;break;case D:r=k/g;break;case e:r=k/_;break;case u:r=k/1e3;break;default:r=k}return n?r:h.a(r)},i.daysInMonth=function(){return this.endOf(s).$D},i.$locale=function(){return T[this.$L]},i.locale=function(t,o){if(!t)return this.$L;var n=this.clone(),r=F(t,o,!0);return r&&(n.$L=r),n},i.clone=function(){return h.w(this.$d,this)},i.toDate=function(){return new Date(this.valueOf())},i.toJSON=function(){return this.isValid()?this.toISOString():null},i.toISOString=function(){return this.$d.toISOString()},i.toString=function(){return this.$d.toUTCString()},c}(),K=Y.prototype;return C.prototype=K,[["$ms",x],["$s",u],["$m",e],["$H",D],["$W",p],["$M",s],["$y",v],["$D",M]].forEach(function(c){K[c[1]]=function(i){return this.$g(i,c[0],c[1])}}),C.extend=function(c,i){return c.$i||(c(i,Y,C),c.$i=!0),C},C.locale=F,C.isDayjs=G,C.unix=function(c){return C(1e3*c)},C.en=T[P],C.Ls=T,C.p={},C}()}}]);
package/992.js CHANGED
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[992],{4152(ue,x,k){k.d(x,{B:()=>P});var w=k(2065),_=k(7284),F=k.n(_);function P(R,A,M="table.csv"){const p=A.map(v=>v.label),b=R.map(v=>A.map(O=>O.formatter?O.formatter(v[O.key]):v[O.key])),$=F().unparse({fields:p,data:b});(0,w.YN)($,M,"text/csv")}},992(ue,x,k){k.d(x,{a:()=>ct});var w=k(2271),_=k(5802);function F(e){return Array.isArray?Array.isArray(e):"[object Array]"===ae(e)}function R(e){return null==e?"":function P(e){if("string"==typeof e)return e;if("bigint"==typeof e)return e.toString();const t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}function A(e){return"string"==typeof e}function M(e){return"number"==typeof e}function b(e){return"object"==typeof e}function v(e){return null!=e}function O(e){return!e.trim().length}function ae(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const Y="Invalid doc index: must be a non-negative integer within the bounds of the docs array",he=Object.prototype.hasOwnProperty;var Ie=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(s=>{const n=le(s);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(s=>{s.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function le(e){let t=null,s=null,n=null,i=1,r=null;if(A(e)||F(e))n=e,t=de(e),s=K(e);else{if(!he.call(e,"name"))throw new Error("Missing name property in key");const c=e.name;if(n=c,he.call(e,"weight")&&void 0!==e.weight&&(i=e.weight,i<=0))throw new Error((e=>`Property 'weight' in key '${e}' must be a positive integer`)(K(c)));t=de(c),s=K(c),r=e.getFn??null}return{path:t,id:s,weight:i,src:n,getFn:r}}function de(e){return F(e)?e:e.split(".")}function K(e){return F(e)?e.join("."):e}const f=Object.freeze({isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.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 Be(e,t){const s=[];let n=!1;const i=(r,c,u,o)=>{if(v(r))if(c[u]){const h=r[c[u]];if(!v(h))return;if(u===c.length-1&&(A(h)||M(h)||function p(e){return!0===e||!1===e||function $(e){return b(e)&&null!==e}(e)&&"[object Boolean]"==ae(e)}(h)||"bigint"==typeof h))s.push(void 0!==o?{v:R(h),i:o}:R(h));else if(F(h)){n=!0;for(let a=0,l=h.length;a<l;a+=1)i(h[a],c,u+1,a)}else c.length&&i(h,c,u+1,o)}else s.push(void 0!==o?{v:r,i:o}:r)};return i(e,A(t)?t.split("."):t,0),n?s:s[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1});var Q=class{constructor({getFn:e=f.getFn,fieldNormWeight:t=f.fieldNormWeight}={}){this.norm=function Oe(e=1,t=3){const s=new Map,n=Math.pow(10,t);return{get(i){let r=1,c=!1;for(let o=0;o<i.length;o++)32===i.charCodeAt(o)?c||(r++,c=!0):c=!1;if(s.has(r))return s.get(r);const u=Math.round(n/Math.pow(r,.5*e))/n;return s.set(r,u),u},clear(){s.clear()}}}(t,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((t,s)=>{this._keysMap[t.id]=s})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;const e=this.docs.length;this.records=new Array(e);let t=0;if(A(this.docs[0]))for(let s=0;s<e;s++){const n=this._createStringRecord(this.docs[s],s);n&&(this.records[t++]=n)}else for(let s=0;s<e;s++)this.records[t++]=this._createObjectRecord(this.docs[s],s);this.records.length=t,this.norm.clear()}add(e,t){if(!Number.isInteger(t)||t<0)throw new Error(Y);if(A(e)){const n=this._createStringRecord(e,t);return n&&this.records.push(n),n}const s=this._createObjectRecord(e,t);return this.records.push(s),s}removeAt(e){if(!Number.isInteger(e)||e<0)throw new Error(Y);for(let t=0,s=this.records.length;t<s;t+=1)if(this.records[t].i===e){this.records.splice(t,1);break}for(let t=0,s=this.records.length;t<s;t+=1)this.records[t].i>e&&(this.records[t].i-=1)}removeAll(e){const t=new Set;for(const n of e)Number.isInteger(n)&&n>=0&&t.add(n);if(0===t.size)return;this.records=this.records.filter(n=>!t.has(n.i));const s=Array.from(t).sort((n,i)=>n-i);for(const n of this.records){let i=0,r=s.length;for(;i<r;){const c=i+r>>>1;s[c]<n.i?i=c+1:r=c}n.i-=i}}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_createStringRecord(e,t){return!v(e)||O(e)?null:{v:e,i:t,n:this.norm.get(e)}}_createObjectRecord(e,t){const s={i:t,$:{}};for(let n=0,i=this.keys.length;n<i;n++){const r=this.keys[n],c=r.getFn?r.getFn(e):this.getFn(e,r.path);if(v(c))if(F(c)){const u=[];for(let o=0,h=c.length;o<h;o+=1){const a=c[o];if(v(a))if(A(a)){if(!O(a)){const l={v:a,i:o,n:this.norm.get(a)};u.push(l)}}else if(v(a.v)){const l=A(a.v)?a.v:R(a.v);if(!O(l)){const d={v:l,i:a.i,n:this.norm.get(l)};u.push(d)}}}s.$[n]=u}else if(A(c)&&!O(c)){const u={v:c,n:this.norm.get(c)};s.$[n]=u}}return s}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function fe(e,t,{getFn:s=f.getFn,fieldNormWeight:n=f.fieldNormWeight}={}){const i=new Q({getFn:s,fieldNormWeight:n});return i.setKeys(e.map(le)),i.setSources(t),i.create(),i}function Te(e,{getFn:t=f.getFn,fieldNormWeight:s=f.fieldNormWeight}={}){const{keys:n,records:i}=e,r=new Q({getFn:t,fieldNormWeight:s});return r.setKeys(n),r.setIndexRecords(i),r}function Ne(e){const t={};for(let s=0,n=e.length;s<n;s+=1){const i=e.charAt(s);t[i]=(t[i]||0)|1<<n-s-1}return t}function G(e){if(e.length<=1)return e;e.sort((s,n)=>s[0]-n[0]||s[1]-n[1]);const t=[e[0]];for(let s=1,n=e.length;s<n;s+=1){const i=t[t.length-1],r=e[s];r[0]<=i[1]+1?i[1]=Math.max(i[1],r[1]):t.push(r)}return t}const ge={\u0142:"l",\u0141:"L",\u0111:"d",\u0110:"D",\u00f8:"o",\u00d8:"O",\u0127:"h",\u0126:"H",\u0167:"t",\u0166:"T",\u0131:"i",\u00df:"ss"},xe=new RegExp("["+Object.keys(ge).join("")+"]","g"),z="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(xe,t=>ge[t]):e=>e;var J=class{constructor(e,{location:t=f.location,threshold:s=f.threshold,distance:n=f.distance,includeMatches:i=f.includeMatches,findAllMatches:r=f.findAllMatches,minMatchCharLength:c=f.minMatchCharLength,isCaseSensitive:u=f.isCaseSensitive,ignoreDiacritics:o=f.ignoreDiacritics,ignoreLocation:h=f.ignoreLocation}={}){if(this.options={location:t,threshold:s,distance:n,includeMatches:i,findAllMatches:r,minMatchCharLength:c,isCaseSensitive:u,ignoreDiacritics:o,ignoreLocation:h},e=u?e:e.toLowerCase(),e=o?z(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const a=(d,m)=>{this.chunks.push({pattern:d,alphabet:Ne(d),startIndex:m})},l=this.pattern.length;if(l>32){let d=0;const m=l%32,g=l-m;for(;d<g;)a(this.pattern.substr(d,32),d),d+=32;if(m){const C=l-32;a(this.pattern.substr(C),C)}}else a(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,ignoreDiacritics:s,includeMatches:n}=this.options;if(e=t?e:e.toLowerCase(),e=s?z(e):e,this.pattern===e){const g={isMatch:!0,score:0};return n&&(g.indices=[[0,e.length-1]]),g}const{location:i,distance:r,threshold:c,findAllMatches:u,minMatchCharLength:o,ignoreLocation:h}=this.options,a=[];let l=0,d=!1;this.chunks.forEach(({pattern:g,alphabet:C,startIndex:E})=>{const{isMatch:I,score:L,indices:T}=function Le(e,t,s,{location:n=f.location,distance:i=f.distance,threshold:r=f.threshold,findAllMatches:c=f.findAllMatches,minMatchCharLength:u=f.minMatchCharLength,includeMatches:o=f.includeMatches,ignoreLocation:h=f.ignoreLocation}={}){if(t.length>32)throw new Error("Pattern length exceeds max of 32.");const a=t.length,l=e.length,d=Math.max(0,Math.min(n,l));let m=r,g=d;const C=(D,y)=>{const S=D/a;if(h)return S;const j=Math.abs(d-y);return i?S+j/i:j?1:S},E=u>1||o,I=E?Array(l):[];let L;for(;(L=e.indexOf(t,g))>-1;){const D=C(0,L);if(m=Math.min(D,m),g=L+a,E){let y=0;for(;y<a;)I[L+y]=1,y+=1}}g=-1;let T=[],U=1,_e=0,V=a+l;const ut=1<<a-1;for(let D=0;D<a;D+=1){let y=0,S=V;for(;y<S;)C(D,d+S)<=m?y=S:V=S,S=Math.floor((V-y)/2+y);V=S;let j=Math.max(1,d-S+1);const oe=c?l:Math.min(d+S,l)+a,N=Array(oe+2);N[oe+1]=(1<<D)-1;for(let B=oe;B>=j;B-=1){const ce=B-1;if(N[B]=(N[B+1]<<1|1)&s[e[ce]],D&&(N[B]|=(T[B+1]|T[B])<<1|1|T[B+1]),N[B]&ut&&(U=C(D,ce),U<=m)){if(m=U,g=ce,_e=D,g<=d)break;j=Math.max(1,2*d-g)}}if(C(D+1,d)>m)break;T=N}if(E&&g>=0){const D=Math.min(l-1,g+a-1+_e);for(let y=g;y<=D;y+=1)s[e[y]]&&(I[y]=1)}const re={isMatch:g>=0,score:Math.max(.001,U)};if(E){const D=function Re(e=[],t=f.minMatchCharLength){const s=[];let n=-1,i=-1,r=0;for(let c=e.length;r<c;r+=1){const u=e[r];u&&-1===n?n=r:!u&&-1!==n&&(i=r-1,i-n+1>=t&&s.push([n,i]),n=-1)}return e[r-1]&&r-n>=t&&s.push([n,r-1]),s}(I,u);D.length?o&&(re.indices=D):re.isMatch=!1}return re}(e,g,C,{location:i+E,distance:r,threshold:c,findAllMatches:u,minMatchCharLength:o,includeMatches:n,ignoreLocation:h});I&&(d=!0),l+=L,I&&T&&a.push(...T)});const m={isMatch:d,score:d?l/this.chunks.length:1};return d&&n&&(m.indices=G(a)),m}};const Pe=new Set(["fuzzy","include"]);function $e(e){return e.startsWith("inverse")}const X=[{type:"exact",multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:e=>({type:"exact",search(t){const s=t===e;return{isMatch:s,score:s?0:1,indices:[0,e.length-1]}}})},{type:"include",multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:e=>({type:"include",search(t){let n,s=0;const i=[],r=e.length;for(;(n=t.indexOf(e,s))>-1;)s=n+r,i.push([n,s-1]);const c=!!i.length;return{isMatch:c,score:c?0:1,indices:i}}})},{type:"prefix-exact",multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:e=>({type:"prefix-exact",search(t){const s=t.startsWith(e);return{isMatch:s,score:s?0:1,indices:[0,e.length-1]}}})},{type:"inverse-prefix-exact",multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:e=>({type:"inverse-prefix-exact",search(t){const s=!t.startsWith(e);return{isMatch:s,score:s?0:1,indices:[0,t.length-1]}}})},{type:"inverse-suffix-exact",multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:e=>({type:"inverse-suffix-exact",search(t){const s=!t.endsWith(e);return{isMatch:s,score:s?0:1,indices:[0,t.length-1]}}})},{type:"suffix-exact",multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:e=>({type:"suffix-exact",search(t){const s=t.endsWith(e);return{isMatch:s,score:s?0:1,indices:[t.length-e.length,t.length-1]}}})},{type:"inverse-exact",multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:e=>({type:"inverse-exact",search(t){const s=-1===t.indexOf(e);return{isMatch:s,score:s?0:1,indices:[0,t.length-1]}}})},{type:"fuzzy",multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(e,t={})=>{const s=new J(e,{location:t.location??f.location,threshold:t.threshold??f.threshold,distance:t.distance??f.distance,includeMatches:t.includeMatches??f.includeMatches,findAllMatches:t.findAllMatches??f.findAllMatches,minMatchCharLength:t.minMatchCharLength??f.minMatchCharLength,isCaseSensitive:t.isCaseSensitive??f.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics??f.ignoreDiacritics,ignoreLocation:t.ignoreLocation??f.ignoreLocation});return{type:"fuzzy",search:n=>s.searchIn(n)}}}],me=X.length;function Ae(e,t){const s=e.match(t);return s?s[1]:null}const Z=[];function q(...e){Z.push(...e)}function W(e,t){for(let s=0,n=Z.length;s<n;s+=1){const i=Z[s];if(i.condition(e,t))return new i(e,t)}return new J(e,t)}const H_AND="$and",te=e=>!(!e.$and&&!e.$or),pe=e=>({[H_AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function Ce(e,t,{auto:s=!0}={}){const n=i=>{if(A(i)){const o={keyId:null,pattern:i};return s&&(o.searcher=W(i,t)),o}const r=Object.keys(i),c=(e=>!!e.$path)(i);if(!c&&r.length>1&&!te(i))return n(pe(i));if((e=>!F(e)&&b(e)&&!te(e))(i)){const o=c?i.$path:r[0],h=c?i.$val:i[o];if(!A(h))throw new Error((e=>`Invalid value for key ${e}`)(o));const a={keyId:K(o),pattern:h};return s&&(a.searcher=W(h,t)),a}const u={children:[],operator:r[0]};return r.forEach(o=>{const h=i[o];F(h)&&h.forEach(a=>{u.children.push(n(a))})}),u};return te(e)||(e=pe(e)),n(e)}function se(e,{ignoreFieldNorm:t=f.ignoreFieldNorm}){let s=1;return e.forEach(({key:n,norm:i,score:r})=>{const c=n?n.weight:null;s*=Math.pow(0===r&&c?Number.EPSILON:r,(c||1)*(t?1:i))}),s}var Qe=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 t=this.heap;for(;e>0;){const s=e-1>>1;if(t[e].score<=t[s].score)break;const n=t[e];t[e]=t[s],t[s]=n,e=s}}_sinkDown(e){const t=this.heap,s=t.length;let n=e;do{const i=2*(e=n)+1,r=2*e+2;if(i<s&&t[i].score>t[n].score&&(n=i),r<s&&t[r].score>t[n].score&&(n=r),n!==e){const c=t[e];t[e]=t[n],t[n]=c}}while(n!==e)}};const Xe=/[\p{L}\p{M}\p{N}_]+/gu,Me=new WeakSet;function ne({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:s}={}){const n=function qe(e){if("function"==typeof e){let t=!1;return s=>{const n=e(s);if(!t&&(t=!0,!Array.isArray(n)||n.some(i=>"string"!=typeof i)))throw new Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(n)?"array containing non-strings":typeof n}.`);return n}}return e instanceof RegExp?(e.global||function Ze(e){Me.has(e)||(Me.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),t=>t.match(e)||[]):t=>t.match(Xe)||[]}(s);return{tokenize:i=>(e||(i=i.toLowerCase()),t&&(i=z(i)),n(i))}}function ie(e,t,s,n){const i=n.tokenize(t);if(!i.length)return;e.fieldCount++,e.docFieldCount.set(s,(e.docFieldCount.get(s)||0)+1);const r=new Set(i);let c=e.docTermFieldHits.get(s);c||(c=new Map,e.docTermFieldHits.set(s,c));for(const u of r)c.set(u,(c.get(u)||0)+1),e.df.set(u,(e.df.get(u)||0)+1)}function ve(e,t,s,n){const{i,v:r,$:c}=t;if(void 0===r){if(c)for(let u=0;u<s;u++){const o=c[u];if(o)if(Array.isArray(o))for(const h of o)ie(e,h.v,i,n);else ie(e,o.v,i,n)}}else ie(e,r,i,n)}function nt(e,t){const s=e.docFieldCount.get(t);if(void 0===s)return;e.fieldCount-=s,e.docFieldCount.delete(t);const n=e.docTermFieldHits.get(t);if(n){for(const[i,r]of n){const c=(e.df.get(i)||0)-r;c<=0?e.df.delete(i):e.df.set(i,c)}e.docTermFieldHits.delete(t)}}function Ee(e,t){if(0===t.length)return;const s=Array.from(new Set(t)).sort((u,o)=>u-o);for(const u of s)nt(e,u);const n=u=>{let o=0,h=s.length;for(;o<h;){const a=o+h>>>1;s[a]<u?o=a+1:h=a}return u-o},i=s[0],r=new Map;for(const[u,o]of e.docFieldCount)r.set(u>i?n(u):u,o);e.docFieldCount=r;const c=new Map;for(const[u,o]of e.docTermFieldHits)c.set(u>i?n(u):u,o);e.docTermFieldHits=c}var De=(()=>{let e=class{constructor(t,s,n){this.options={...f,...s},this._keyStore=new Ie(this.options.keys),this._docs=t,this._myIndex=null,this._invertedIndex=null,this.setCollection(t,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(t){if(this._lastQuery===t)return this._lastSearcher;const s=W(t,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=t,this._lastSearcher=s,s}setCollection(t,s){if(this._docs=t,s&&!(s instanceof Q))throw new Error("Incorrect 'index' type");if(this._myIndex=s||fe(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){const n=ne({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=function tt(e,t,s){const n={fieldCount:0,df:new Map,docFieldCount:new Map,docTermFieldHits:new Map};for(const i of e)ve(n,i,t,s);return n}(this._myIndex.records,this._myIndex.keys.length,n)}this._invalidateSearcherCache()}add(t){if(!v(t))return;this._docs.push(t);const s=this._myIndex.add(t,this._docs.length-1);if(this._invertedIndex&&s){const n=ne({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});!function st(e,t,s,n){ve(e,t,s,n)}(this._invertedIndex,s,this._myIndex.keys.length,n)}this._invalidateSearcherCache()}remove(t=()=>!1){const s=[],n=[];for(let i=0,r=this._docs.length;i<r;i+=1)t(this._docs[i],i)&&(s.push(this._docs[i]),n.push(i));if(n.length){this._invertedIndex&&Ee(this._invertedIndex,n);const i=new Set(n);this._docs=this._docs.filter((r,c)=>!i.has(c)),this._myIndex.removeAll(n),this._invalidateSearcherCache()}return s}removeAt(t){if(!Number.isInteger(t)||t<0||t>=this._docs.length)throw new Error(Y);this._invertedIndex&&Ee(this._invertedIndex,[t]);const s=this._docs.splice(t,1)[0];return this._myIndex.removeAt(t),this._invalidateSearcherCache(),s}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}search(t,s){const{limit:n=-1}=s||{},{includeMatches:i,includeScore:r,shouldSort:c,sortFn:u,ignoreFieldNorm:o}=this.options;if(A(t)&&!t.trim()){let l=this._docs.map((d,m)=>({item:d,refIndex:m}));return M(n)&&n>-1&&(l=l.slice(0,n)),l}let a;if(M(n)&&n>0&&A(t)){const l=new Qe(n);A(this._docs[0])?this._searchStringList(t,{heap:l,ignoreFieldNorm:o}):this._searchObjectList(t,{heap:l,ignoreFieldNorm:o}),a=l.extractSorted(u)}else a=A(t)?A(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t),function Ye(e,{ignoreFieldNorm:t=f.ignoreFieldNorm}){e.forEach(s=>{s.score=se(s.matches,{ignoreFieldNorm:t})})}(a,{ignoreFieldNorm:o}),c&&a.sort(u),M(n)&&n>-1&&(a=a.slice(0,n));return function Je(e,t,{includeMatches:s=f.includeMatches,includeScore:n=f.includeScore}={}){return e.map(i=>{const{idx:r}=i,c={item:t[r],refIndex:r};return s&&(c.matches=function Ge(e){const t=[];return e.matches.forEach(s=>{if(!v(s.indices)||!s.indices.length)return;const n={indices:s.indices,value:s.value};s.key&&(n.key=s.key.id),s.idx>-1&&(n.refIndex=s.idx),t.push(n)}),t}(i)),n&&(c.score=i.score),c})}(a,this._docs,{includeMatches:i,includeScore:r})}_searchStringList(t,{heap:s,ignoreFieldNorm:n}={}){const i=this._getSearcher(t),r=this.options.useTokenSearch&&"all"===this.options.tokenMatch,{records:c}=this._myIndex,u=s?null:[];return c.forEach(({v:o,i:h,n:a})=>{if(!v(o))return;const l=i.searchIn(o);if(l.isMatch){const d={score:l.score,value:o,norm:a,indices:l.indices};r&&(d.matchedMask=l.matchedMask,d.matchedTerms=l.matchedTerms,d.termCount=l.termCount);const m=[d];if(!r||this._coversAllTokens(m)){const g={item:o,idx:h,matches:m};s?(g.score=se(g.matches,{ignoreFieldNorm:n}),s.shouldInsert(g.score)&&s.insert(g)):u.push(g)}}}),u}_searchLogical(t){const s=Ce(t,this.options),n=(u,o,h)=>{if(!("children"in u)){const{keyId:m,searcher:g}=u;let C;return null===m?(C=[],this._myIndex.keys.forEach((E,I)=>{C.push(...this._findMatches({key:E,value:o[I],searcher:g}))})):C=this._findMatches({key:this._keyStore.get(m),value:this._myIndex.getValueForItemAtKeyId(o,m),searcher:g}),C&&C.length?[{idx:h,item:o,matches:C}]:[]}const{children:a,operator:l}=u,d=[];for(let m=0,g=a.length;m<g;m+=1){const E=n(a[m],o,h);if(E.length)d.push(...E);else if("$and"===l)return[]}return d},i=this._myIndex.records,r=new Map,c=[];return i.forEach(({$:u,i:o})=>{if(v(u)){const h=n(s,u,o);h.length&&(r.has(o)||(r.set(o,{idx:o,item:u,matches:[]}),c.push(r.get(o))),h.forEach(({matches:a})=>{r.get(o).matches.push(...a)}))}}),c}_searchObjectList(t,{heap:s,ignoreFieldNorm:n}={}){const i=this._getSearcher(t),r=this.options.useTokenSearch&&"all"===this.options.tokenMatch,{keys:c,records:u}=this._myIndex,o=s?null:[];return u.forEach(({$:h,i:a})=>{if(!v(h))return;const l=[];let d=!1,m=!1;if(c.forEach((g,C)=>{const E=this._findMatches({key:g,value:h[C],searcher:i});E.length?(l.push(...E),E[0].hasInverse&&(m=!0)):d=!0}),(!m||!d)&&l.length&&(!r||this._coversAllTokens(l))){const g={idx:a,item:h,matches:l};s?(g.score=se(g.matches,{ignoreFieldNorm:n}),s.shouldInsert(g.score)&&s.insert(g)):o.push(g)}}),o}_findMatches({key:t,value:s,searcher:n}){if(!v(s))return[];const i=[];if(F(s))s.forEach(({v:r,i:c,n:u})=>{if(!v(r))return;const o=n.searchIn(r);if(o.isMatch){const h={score:o.score,key:t,value:r,idx:c,norm:u,indices:o.indices,hasInverse:o.hasInverse};void 0!==o.termCount&&(h.matchedMask=o.matchedMask,h.matchedTerms=o.matchedTerms,h.termCount=o.termCount),i.push(h)}});else{const{v:r,n:c}=s,u=n.searchIn(r);if(u.isMatch){const o={score:u.score,key:t,value:r,norm:c,indices:u.indices,hasInverse:u.hasInverse};void 0!==u.termCount&&(o.matchedMask=u.matchedMask,o.matchedTerms=u.matchedTerms,o.termCount=u.termCount),i.push(o)}}return i}_coversAllTokens(t){const s=t.length?t[0].termCount:void 0;if(void 0===s)return!0;if(s<=31){let i=0;for(let r=0;r<t.length;r++)i|=t[r].matchedMask||0;return i===2**s-1}const n=new Set;for(let i=0;i<t.length;i++){const r=t[i].matchedTerms;if(r)for(const c of r)n.add(c)}return n.size===s}};return e.version="7.4.2",e.createIndex=fe,e.parseIndex=Te,e.config=f,e.match=function(t,s,n){if(n&&n.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 W(t,{...f,...n}).searchIn(s)},e.parseQuery=Ce,e})();q(class{constructor(e,{isCaseSensitive:t=f.isCaseSensitive,ignoreDiacritics:s=f.ignoreDiacritics,includeMatches:n=f.includeMatches,minMatchCharLength:i=f.minMatchCharLength,ignoreLocation:r=f.ignoreLocation,findAllMatches:c=f.findAllMatches,location:u=f.location,threshold:o=f.threshold,distance:h=f.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:s,includeMatches:n,minMatchCharLength:i,findAllMatches:c,ignoreLocation:r,location:u,threshold:o,distance:h},e=t?e:e.toLowerCase(),e=s?z(e):e,this.pattern=e,this.query=function We(e,t={}){return e.replace(/\\\|/g,"\0").split("|").map(s=>{const n=function Ke(e){const t=[],s=e.length;let n=0;for(;n<s;){for(;n<s&&" "===e[n];)n++;if(n>=s)break;let i=n;for(;i<s&&" "!==e[i]&&'"'!==e[i];)i++;if(i<s&&'"'===e[i]){for(i++;i<s;){if('"'===e[i]){const r=i+1;if(r>=s||" "===e[r]){i++;break}if("$"===e[r]&&(r+1>=s||" "===e[r+1])){i+=2;break}}i++}t.push(e.substring(n,i)),n=i}else{for(;i<s&&" "!==e[i];)i++;t.push(e.substring(n,i)),n=i}}return t}(s.replace(/\u0000/g,"|").trim()).filter(r=>r&&!!r.trim()),i=[];for(let r=0,c=n.length;r<c;r+=1){const u=n[r];let o=!1,h=-1;for(;!o&&++h<me;){const a=X[h],l=Ae(u,a.multiRegex);l&&(i.push(a.create(l,t)),o=!0)}if(!o)for(h=-1;++h<me;){const a=X[h],l=Ae(u,a.singleRegex);if(l){i.push(a.create(l,t));break}}}return i})}(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:s,isCaseSensitive:n,ignoreDiacritics:i}=this.options;e=n?e:e.toLowerCase(),e=i?z(e):e;let r=0;const c=[];let u=0,o=!1;for(let h=0,a=t.length;h<a;h+=1){const l=t[h];c.length=0,r=0,o=!1;for(let d=0,m=l.length;d<m;d+=1){const g=l[d],{isMatch:C,indices:E,score:I}=g.search(e);if(!C){u=0,r=0,c.length=0,o=!1;break}r+=1,u+=I,$e(g.type)&&(o=!0),s&&(Pe.has(g.type)?c.push(...E):c.push(E))}if(r){const d={isMatch:!0,score:u/r};return o&&(d.hasInverse=!0),s&&(d.indices=G(c)),d}}return{isMatch:!1,score:1}}}),q(class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=ne({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,tokenize:t.tokenize});const s=this.analyzer.tokenize(e),{df:n,fieldCount:i}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(const r of s){this.termSearchers.push(new J(r,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));const c=n.get(r)||0,u=Math.log(1+(i-c+.5)/(c+.5));this.idfWeights.push(u)}this.combineAll="all"===t.tokenMatch,this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};const t=[];let s=0,n=0,i=0,r=0;const c=this.combineAll&&!this.useMask?new Set:null;for(let h=0;h<this.termSearchers.length;h++){const a=this.termSearchers[h].searchIn(e),l=this.idfWeights[h];n+=l,a.isMatch&&(i++,s+=l*(1-a.score),a.indices&&t.push(...a.indices),this.combineAll&&(this.useMask?r|=1<<h:c.add(h)))}if(0===i)return{isMatch:!1,score:1};const o={isMatch:!0,score:Math.max(.001,n>0?1-s/n:0)};return this.options.includeMatches&&t.length&&(o.indices=G(t)),this.combineAll&&(this.useMask?o.matchedMask=r:o.matchedTerms=c,o.termCount=this.numTerms),o}}),De.use=function(...e){e.forEach(t=>q(t))};var it=De,ot=k(4152);let ct=(()=>{class e{filterOptions=(0,w.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,w.EW)(()=>new it(this.sorted(),this.filterOptions()));columnDefs=(0,_.vPA)([]);data=(0,_.vPA)([]);sortCol=(0,_.vPA)(void 0);sortOrder=(0,_.vPA)("ASC");filterValue=(0,_.vPA)(void 0);filterOnlyVisible=(0,_.vPA)(!0);paginatorStartIndex=(0,_.vPA)(1);paginatorEndIndex=(0,_.vPA)(5);showColumnSettings=(0,_.vPA)(!1);totalRows=(0,w.EW)(()=>this.sortedAndFiltered().length);sorted=(0,w.EW)(()=>function rt(e,t,s){if(void 0===e)return[...t];const n=e.split(",").map(r=>r.trim()),i=s.split(",").map(r=>r.trim());return[...t].sort((r,c)=>{for(let u=0;u<n.length;u++){const o=n[u],h=i[u]||i[0];if(!(o in r))continue;let a=r[o],l=c[o];if("object"==typeof a&&(a=r[o].value,l=c[o].value),null==a)return 1;if(null==l)return-1;let d=0;if(d="string"==typeof a&&"string"==typeof l?a.localeCompare(l):a>l?1:a<l?-1:0,"DESC"===h&&(d*=-1),0!==d)return d}return 0})}(this.sortCol(),this.data(),this.sortOrder()));filterCol=(0,_.vPA)(void 0);filterExactMatch=(0,_.vPA)(!1);filterKeys=(0,w.EW)(()=>{const s=this.filterCol();return void 0!==s?[s]:this.filterOnlyVisible()?this.columnDefs().map(n=>n.key):Object.keys(this.sorted()[0]||{})});sortedAndFiltered=(0,w.EW)(()=>{const s=this.filterValue()??"";return""===s?this.sorted():this.fuse().search(s).map(i=>i.item)});sortedFilteredAndPaginated=(0,w.EW)(()=>this.sortedAndFiltered().slice(this.paginatorStartIndex(),this.paginatorEndIndex()));downloadCSV(){const s=this.sortedFilteredAndPaginated(),n=this.columnDefs();(0,ot.B)(s,n)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=_.jDH({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})()},2065(ue,x,k){function F(A,M,p="text/plain"){return function w(A,M="data.zip"){const p=document.createElement("a"),b=URL.createObjectURL(A);p.href=b,p.download=M,document.body.appendChild(p),p.click(),document.body.removeChild(p),URL.revokeObjectURL(b)}(new Blob([A],{type:p}),M)}function P(A,M){const p=document.createElement("a");p.style.display="hidden",p.setAttribute("href",window.URL.createObjectURL(A)),p.setAttribute("download",M),document.body.appendChild(p),p.click(),p.remove()}k.d(x,{KE:()=>P,YN:()=>F})}}]);
1
+ "use strict";(self.webpackChunkcue_ui=self.webpackChunkcue_ui||[]).push([[992],{4152(_e,K,k){k.d(K,{B:()=>H});var I=k(2065),D=k(7284),F=k.n(D);function H(N,C,b="table.csv"){const V=C.map(p=>p.label),x=N.map(p=>C.map(B=>B.formatter?B.formatter(p[B.key]):p[B.key])),U=F().unparse({fields:V,data:x});(0,I.YN)(U,b,"text/csv")}},992(_e,K,k){k.d(K,{a:()=>ct});var I=k(2271),D=k(5802);function F(e){return Array.isArray?Array.isArray(e):"[object Array]"===ue(e)}function N(e){return null==e?"":function H(e){if("string"==typeof e)return e;if("bigint"==typeof e)return e.toString();const t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(e)}function C(e){return"string"==typeof e}function b(e){return"number"==typeof e}function x(e){return"object"==typeof e}function p(e){return null!=e}function B(e){return!e.trim().length}function ue(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const Q="Invalid doc index: must be a non-negative integer within the bounds of the docs array",he=Object.prototype.hasOwnProperty;var we=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(s=>{const n=ae(s);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(s=>{s.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function ae(e){let t=null,s=null,n=null,i=1,r=null;if(C(e)||F(e))n=e,t=le(e),s=P(e);else{if(!he.call(e,"name"))throw new Error("Missing name property in key");const c=e.name;if(n=c,he.call(e,"weight")&&void 0!==e.weight&&(i=e.weight,i<=0))throw new Error((e=>`Property 'weight' in key '${e}' must be a positive integer`)(P(c)));t=le(c),s=P(c),r=e.getFn??null}return{path:t,id:s,weight:i,src:n,getFn:r}}function le(e){return F(e)?e:e.split(".")}function P(e){return F(e)?e.join("."):e}const d=Object.freeze({isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.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 be(e,t){const s=[];let n=!1;const i=(r,c,u,o)=>{if(p(r))if(c[u]){const a=r[c[u]];if(!p(a))return;if(u===c.length-1&&(C(a)||b(a)||function V(e){return!0===e||!1===e||function U(e){return x(e)&&null!==e}(e)&&"[object Boolean]"==ue(e)}(a)||"bigint"==typeof a))s.push(void 0!==o?{v:N(a),i:o}:N(a));else if(F(a)){n=!0;for(let h=0,l=a.length;h<l;h+=1)i(a[h],c,u+1,h)}else c.length&&i(a,c,u+1,o)}else s.push(void 0!==o?{v:r,i:o}:r)};return i(e,C(t)?t.split("."):t,0),n?s:s[0]},ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1});var Y=class{constructor({getFn:e=d.getFn,fieldNormWeight:t=d.fieldNormWeight}={}){this.norm=function Te(e=1,t=3){const s=new Map,n=Math.pow(10,t);return{get(i){let r=1,c=!1;for(let o=0;o<i.length;o++)32===i.charCodeAt(o)?c||(r++,c=!0):c=!1;if(s.has(r))return s.get(r);const u=Math.round(n/Math.pow(r,.5*e))/n;return s.set(r,u),u},clear(){s.clear()}}}(t,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((t,s)=>{this._keysMap[t.id]=s})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;const e=this.docs.length;this.records=new Array(e);let t=0;if(C(this.docs[0]))for(let s=0;s<e;s++){const n=this._createStringRecord(this.docs[s],s);n&&(this.records[t++]=n)}else for(let s=0;s<e;s++)this.records[t++]=this._createObjectRecord(this.docs[s],s);this.records.length=t,this.norm.clear()}add(e,t){if(!Number.isInteger(t)||t<0)throw new Error(Q);if(C(e)){const n=this._createStringRecord(e,t);return n&&this.records.push(n),n}const s=this._createObjectRecord(e,t);return this.records.push(s),s}removeAt(e){if(!Number.isInteger(e)||e<0)throw new Error(Q);for(let t=0,s=this.records.length;t<s;t+=1)if(this.records[t].i===e){this.records.splice(t,1);break}for(let t=0,s=this.records.length;t<s;t+=1)this.records[t].i>e&&(this.records[t].i-=1)}removeAll(e){const t=new Set;for(const n of e)Number.isInteger(n)&&n>=0&&t.add(n);if(0===t.size)return;this.records=this.records.filter(n=>!t.has(n.i));const s=Array.from(t).sort((n,i)=>n-i);for(const n of this.records){let i=0,r=s.length;for(;i<r;){const c=i+r>>>1;s[c]<n.i?i=c+1:r=c}n.i-=i}}getValueForItemAtKeyId(e,t){return e[this._keysMap[t]]}size(){return this.records.length}_createStringRecord(e,t){return!p(e)||B(e)?null:{v:e,i:t,n:this.norm.get(e)}}_createObjectRecord(e,t){const s={i:t,$:{}};for(let n=0,i=this.keys.length;n<i;n++){const r=this.keys[n],c=r.getFn?r.getFn(e):this.getFn(e,r.path);if(p(c))if(F(c)){const u=[];for(let o=0,a=c.length;o<a;o+=1){const h=c[o];if(p(h))if(C(h)){if(!B(h)){const l={v:h,i:o,n:this.norm.get(h)};u.push(l)}}else if(p(h.v)){const l=C(h.v)?h.v:N(h.v);if(!B(l)){const f={v:l,i:h.i,n:this.norm.get(l)};u.push(f)}}}s.$[n]=u}else if(C(c)&&!B(c)){const u={v:c,n:this.norm.get(c)};s.$[n]=u}}return s}toJSON(){return{keys:this.keys.map(({getFn:e,...t})=>t),records:this.records}}};function fe(e,t,{getFn:s=d.getFn,fieldNormWeight:n=d.fieldNormWeight}={}){const i=new Y({getFn:s,fieldNormWeight:n});return i.setKeys(e.map(ae)),i.setSources(t),i.create(),i}function Oe(e,{getFn:t=d.getFn,fieldNormWeight:s=d.fieldNormWeight}={}){const{keys:n,records:i}=e,r=new Y({getFn:t,fieldNormWeight:s});return r.setKeys(n),r.setIndexRecords(i),r}function Le(e){const t={};for(let s=0,n=e.length;s<n;s+=1){const i=e.charAt(s);t[i]=(t[i]||0)|1<<n-s-1}return t}function G(e){if(e.length<=1)return e;e.sort((s,n)=>s[0]-n[0]||s[1]-n[1]);const t=[e[0]];for(let s=1,n=e.length;s<n;s+=1){const i=t[t.length-1],r=e[s];r[0]<=i[1]+1?i[1]=Math.max(i[1],r[1]):t.push(r)}return t}const de={\u0142:"l",\u0141:"L",\u0111:"d",\u0110:"D",\u00f8:"o",\u00d8:"O",\u0127:"h",\u0126:"H",\u0167:"t",\u0166:"T",\u0131:"i",\u00df:"ss"},xe=new RegExp("["+Object.keys(de).join("")+"]","g"),R="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(xe,t=>de[t]):e=>e;var J=class{constructor(e,{location:t=d.location,threshold:s=d.threshold,distance:n=d.distance,includeMatches:i=d.includeMatches,findAllMatches:r=d.findAllMatches,minMatchCharLength:c=d.minMatchCharLength,isCaseSensitive:u=d.isCaseSensitive,ignoreDiacritics:o=d.ignoreDiacritics,ignoreLocation:a=d.ignoreLocation}={}){if(this.options={location:t,threshold:s,distance:n,includeMatches:i,findAllMatches:r,minMatchCharLength:c,isCaseSensitive:u,ignoreDiacritics:o,ignoreLocation:a},e=u?e:e.toLowerCase(),e=o?R(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;const h=(f,m)=>{this.chunks.push({pattern:f,alphabet:Le(f),startIndex:m})},l=this.pattern.length;if(l>32){let f=0;const m=l%32,g=l-m;for(;f<g;)h(this.pattern.substr(f,32),f),f+=32;if(m){const A=l-32;h(this.pattern.substr(A),A)}}else h(this.pattern,0)}searchIn(e){const{isCaseSensitive:t,ignoreDiacritics:s,includeMatches:n}=this.options;if(e=t?e:e.toLowerCase(),e=s?R(e):e,this.pattern===e){const g={isMatch:!0,score:0};return n&&(g.indices=[[0,e.length-1]]),g}const{location:i,distance:r,threshold:c,findAllMatches:u,minMatchCharLength:o,ignoreLocation:a}=this.options,h=[];let l=0,f=!1;this.chunks.forEach(({pattern:g,alphabet:A,startIndex:M})=>{const{isMatch:y,score:T,indices:w}=function Re(e,t,s,{location:n=d.location,distance:i=d.distance,threshold:r=d.threshold,findAllMatches:c=d.findAllMatches,minMatchCharLength:u=d.minMatchCharLength,includeMatches:o=d.includeMatches,ignoreLocation:a=d.ignoreLocation}={}){if(t.length>32)throw new Error("Pattern length exceeds max of 32.");const h=t.length,l=e.length,f=Math.max(0,Math.min(n,l));let m=r,g=f;const A=(v,E)=>{const _=v/h;if(a)return _;const L=Math.abs(f-E);return i?_+L/i:L?1:_},M=u>1||o,y=M?Array(l):[];let T;for(;(T=e.indexOf(t,g))>-1;){const v=A(0,T);if(m=Math.min(v,m),g=T+h,M){let E=0;for(;E<h;)y[T+E]=1,E+=1}}g=-1;let w=[],j=1,De=0,W=h+l;const ut=1<<h-1;for(let v=0;v<h;v+=1){let E=0,_=W;for(;E<_;)A(v,f+_)<=m?E=_:W=_,_=Math.floor((W-E)/2+E);W=_;let L=Math.max(1,f-_+1);const oe=c?l:Math.min(f+_,l)+h,O=Array(oe+2);O[oe+1]=(1<<v)-1;for(let S=oe;S>=L;S-=1){const ce=S-1;if(O[S]=(O[S+1]<<1|1)&s[e[ce]],v&&(O[S]|=(w[S+1]|w[S])<<1|1|w[S+1]),O[S]&ut&&(j=A(v,ce),j<=m)){if(m=j,g=ce,De=v,g<=f)break;L=Math.max(1,2*f-g)}}if(A(v+1,f)>m)break;w=O}if(M&&g>=0){const v=Math.min(l-1,g+h-1+De);for(let E=g;E<=v;E+=1)s[e[E]]&&(y[E]=1)}const re={isMatch:g>=0,score:Math.max(.001,j)};if(M){const v=function Ne(e=[],t=d.minMatchCharLength){const s=[];let n=-1,i=-1,r=0;for(let c=e.length;r<c;r+=1){const u=e[r];u&&-1===n?n=r:!u&&-1!==n&&(i=r-1,i-n+1>=t&&s.push([n,i]),n=-1)}return e[r-1]&&r-n>=t&&s.push([n,r-1]),s}(y,u);v.length?o&&(re.indices=v):re.isMatch=!1}return re}(e,g,A,{location:i+M,distance:r,threshold:c,findAllMatches:u,minMatchCharLength:o,includeMatches:n,ignoreLocation:a});y&&(f=!0),l+=T,y&&w&&h.push(...w)});const m={isMatch:f,score:f?l/this.chunks.length:1};return f&&n&&(m.indices=G(h)),m}};const Pe=new Set(["fuzzy","include"]);function $e(e){return e.startsWith("inverse")}const X=[{type:"exact",multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:e=>({type:"exact",search(t){const s=t===e;return{isMatch:s,score:s?0:1,indices:[0,e.length-1]}}})},{type:"include",multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:e=>({type:"include",search(t){let n,s=0;const i=[],r=e.length;for(;(n=t.indexOf(e,s))>-1;)s=n+r,i.push([n,s-1]);const c=!!i.length;return{isMatch:c,score:c?0:1,indices:i}}})},{type:"prefix-exact",multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:e=>({type:"prefix-exact",search(t){const s=t.startsWith(e);return{isMatch:s,score:s?0:1,indices:[0,e.length-1]}}})},{type:"inverse-prefix-exact",multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:e=>({type:"inverse-prefix-exact",search(t){const s=!t.startsWith(e);return{isMatch:s,score:s?0:1,indices:[0,t.length-1]}}})},{type:"inverse-suffix-exact",multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:e=>({type:"inverse-suffix-exact",search(t){const s=!t.endsWith(e);return{isMatch:s,score:s?0:1,indices:[0,t.length-1]}}})},{type:"suffix-exact",multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:e=>({type:"suffix-exact",search(t){const s=t.endsWith(e);return{isMatch:s,score:s?0:1,indices:[t.length-e.length,t.length-1]}}})},{type:"inverse-exact",multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:e=>({type:"inverse-exact",search(t){const s=-1===t.indexOf(e);return{isMatch:s,score:s?0:1,indices:[0,t.length-1]}}})},{type:"fuzzy",multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(e,t={})=>{const s=new J(e,{location:t.location??d.location,threshold:t.threshold??d.threshold,distance:t.distance??d.distance,includeMatches:t.includeMatches??d.includeMatches,findAllMatches:t.findAllMatches??d.findAllMatches,minMatchCharLength:t.minMatchCharLength??d.minMatchCharLength,isCaseSensitive:t.isCaseSensitive??d.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics??d.ignoreDiacritics,ignoreLocation:t.ignoreLocation??d.ignoreLocation});return{type:"fuzzy",search:n=>s.searchIn(n)}}}],ge=X.length;function me(e,t){const s=e.match(t);return s?s[1]:null}const Z=[];function q(...e){Z.push(...e)}function $(e,t){for(let s=0,n=Z.length;s<n;s+=1){const i=Z[s];if(i.condition(e,t))return new i(e,t)}return new J(e,t)}const z_AND="$and",te=e=>!(!e.$and&&!e.$or),Ae=e=>({[z_AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function Ce(e,t,{auto:s=!0}={}){const n=i=>{if(C(i)){const o={keyId:null,pattern:i};return s&&(o.searcher=$(i,t)),o}const r=Object.keys(i),c=(e=>!!e.$path)(i);if(!c&&r.length>1&&!te(i))return n(Ae(i));if((e=>!F(e)&&x(e)&&!te(e))(i)){const o=c?i.$path:r[0],a=c?i.$val:i[o];if(!C(a))throw new Error((e=>`Invalid value for key ${e}`)(o));const h={keyId:P(o),pattern:a};return s&&(h.searcher=$(a,t)),h}const u={children:[],operator:r[0]};return r.forEach(o=>{const a=i[o];F(a)&&a.forEach(h=>{u.children.push(n(h))})}),u};return te(e)||(e=Ae(e)),n(e)}function se(e,{ignoreFieldNorm:t=d.ignoreFieldNorm}){let s=1;return e.forEach(({key:n,norm:i,score:r})=>{const c=n?n.weight:null;s*=Math.pow(0===r&&c?Number.EPSILON:r,(c||1)*(t?1:i))}),s}var Ye=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 t=this.heap;for(;e>0;){const s=e-1>>1;if(t[e].score<=t[s].score)break;const n=t[e];t[e]=t[s],t[s]=n,e=s}}_sinkDown(e){const t=this.heap,s=t.length;let n=e;do{const i=2*(e=n)+1,r=2*e+2;if(i<s&&t[i].score>t[n].score&&(n=i),r<s&&t[r].score>t[n].score&&(n=r),n!==e){const c=t[e];t[e]=t[n],t[n]=c}}while(n!==e)}};const Xe=/[\p{L}\p{M}\p{N}_]+/gu,pe=new WeakSet;function ne({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:s}={}){const n=function qe(e){if("function"==typeof e){let t=!1;return s=>{const n=e(s);if(!t&&(t=!0,!Array.isArray(n)||n.some(i=>"string"!=typeof i)))throw new Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(n)?"array containing non-strings":typeof n}.`);return n}}return e instanceof RegExp?(e.global||function Ze(e){pe.has(e)||(pe.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),t=>t.match(e)||[]):t=>t.match(Xe)||[]}(s);return{tokenize:i=>(e||(i=i.toLowerCase()),t&&(i=R(i)),n(i))}}function ie(e,t,s,n){const i=n.tokenize(t);if(!i.length)return;e.fieldCount++,e.docFieldCount.set(s,(e.docFieldCount.get(s)||0)+1);const r=new Set(i);let c=e.docTermFieldHits.get(s);c||(c=new Map,e.docTermFieldHits.set(s,c));for(const u of r)c.set(u,(c.get(u)||0)+1),e.df.set(u,(e.df.get(u)||0)+1)}function Me(e,t,s,n){const{i,v:r,$:c}=t;if(void 0===r){if(c)for(let u=0;u<s;u++){const o=c[u];if(o)if(Array.isArray(o))for(const a of o)ie(e,a.v,i,n);else ie(e,o.v,i,n)}}else ie(e,r,i,n)}function nt(e,t){const s=e.docFieldCount.get(t);if(void 0===s)return;e.fieldCount-=s,e.docFieldCount.delete(t);const n=e.docTermFieldHits.get(t);if(n){for(const[i,r]of n){const c=(e.df.get(i)||0)-r;c<=0?e.df.delete(i):e.df.set(i,c)}e.docTermFieldHits.delete(t)}}function ve(e,t){if(0===t.length)return;const s=Array.from(new Set(t)).sort((u,o)=>u-o);for(const u of s)nt(e,u);const n=u=>{let o=0,a=s.length;for(;o<a;){const h=o+a>>>1;s[h]<u?o=h+1:a=h}return u-o},i=s[0],r=new Map;for(const[u,o]of e.docFieldCount)r.set(u>i?n(u):u,o);e.docFieldCount=r;const c=new Map;for(const[u,o]of e.docTermFieldHits)c.set(u>i?n(u):u,o);e.docTermFieldHits=c}var Ee=(()=>{let e=class{constructor(t,s,n){this.options={...d,...s},this._keyStore=new we(this.options.keys),this._docs=t,this._myIndex=null,this._invertedIndex=null,this.setCollection(t,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(t){if(this._lastQuery===t)return this._lastSearcher;const s=$(t,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=t,this._lastSearcher=s,s}setCollection(t,s){if(this._docs=t,s&&!(s instanceof Y))throw new Error("Incorrect 'index' type");if(this._myIndex=s||fe(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){const n=ne({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=function tt(e,t,s){const n={fieldCount:0,df:new Map,docFieldCount:new Map,docTermFieldHits:new Map};for(const i of e)Me(n,i,t,s);return n}(this._myIndex.records,this._myIndex.keys.length,n)}this._invalidateSearcherCache()}add(t){if(!p(t))return;this._docs.push(t);const s=this._myIndex.add(t,this._docs.length-1);if(this._invertedIndex&&s){const n=ne({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});!function st(e,t,s,n){Me(e,t,s,n)}(this._invertedIndex,s,this._myIndex.keys.length,n)}this._invalidateSearcherCache()}remove(t=()=>!1){const s=[],n=[];for(let i=0,r=this._docs.length;i<r;i+=1)t(this._docs[i],i)&&(s.push(this._docs[i]),n.push(i));if(n.length){this._invertedIndex&&ve(this._invertedIndex,n);const i=new Set(n);this._docs=this._docs.filter((r,c)=>!i.has(c)),this._myIndex.removeAll(n),this._invalidateSearcherCache()}return s}removeAt(t){if(!Number.isInteger(t)||t<0||t>=this._docs.length)throw new Error(Q);this._invertedIndex&&ve(this._invertedIndex,[t]);const s=this._docs.splice(t,1)[0];return this._myIndex.removeAt(t),this._invalidateSearcherCache(),s}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}search(t,s){const{limit:n=-1}=s||{},{includeMatches:i,includeScore:r,shouldSort:c,sortFn:u,ignoreFieldNorm:o}=this.options;if(C(t)&&!t.trim()){let l=this._docs.map((f,m)=>({item:f,refIndex:m}));return b(n)&&n>-1&&(l=l.slice(0,n)),l}let h;if(b(n)&&n>0&&C(t)){const l=new Ye(n);C(this._docs[0])?this._searchStringList(t,{heap:l,ignoreFieldNorm:o}):this._searchObjectList(t,{heap:l,ignoreFieldNorm:o}),h=l.extractSorted(u)}else h=C(t)?C(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t),function Qe(e,{ignoreFieldNorm:t=d.ignoreFieldNorm}){e.forEach(s=>{s.score=se(s.matches,{ignoreFieldNorm:t})})}(h,{ignoreFieldNorm:o}),c&&h.sort(u),b(n)&&n>-1&&(h=h.slice(0,n));return function Je(e,t,{includeMatches:s=d.includeMatches,includeScore:n=d.includeScore}={}){return e.map(i=>{const{idx:r}=i,c={item:t[r],refIndex:r};return s&&(c.matches=function Ge(e){const t=[];return e.matches.forEach(s=>{if(!p(s.indices)||!s.indices.length)return;const n={indices:s.indices,value:s.value};s.key&&(n.key=s.key.id),s.idx>-1&&(n.refIndex=s.idx),t.push(n)}),t}(i)),n&&(c.score=i.score),c})}(h,this._docs,{includeMatches:i,includeScore:r})}_searchStringList(t,{heap:s,ignoreFieldNorm:n}={}){const i=this._getSearcher(t),r=this.options.useTokenSearch&&"all"===this.options.tokenMatch,{records:c}=this._myIndex,u=s?null:[];return c.forEach(({v:o,i:a,n:h})=>{if(!p(o))return;const l=i.searchIn(o);if(l.isMatch){const f={score:l.score,value:o,norm:h,indices:l.indices};r&&(f.matchedMask=l.matchedMask,f.matchedTerms=l.matchedTerms,f.termCount=l.termCount);const m=[f];if(!r||this._coversAllTokens(m)){const g={item:o,idx:a,matches:m};s?(g.score=se(g.matches,{ignoreFieldNorm:n}),s.shouldInsert(g.score)&&s.insert(g)):u.push(g)}}}),u}_searchLogical(t){const s=Ce(t,this.options),n=(u,o,a)=>{if(!("children"in u)){const{keyId:m,searcher:g}=u;let A;return null===m?(A=[],this._myIndex.keys.forEach((M,y)=>{A.push(...this._findMatches({key:M,value:o[y],searcher:g}))})):A=this._findMatches({key:this._keyStore.get(m),value:this._myIndex.getValueForItemAtKeyId(o,m),searcher:g}),A&&A.length?[{idx:a,item:o,matches:A}]:[]}const{children:h,operator:l}=u,f=[];for(let m=0,g=h.length;m<g;m+=1){const M=n(h[m],o,a);if(M.length)f.push(...M);else if("$and"===l)return[]}return f},i=this._myIndex.records,r=new Map,c=[];return i.forEach(({$:u,i:o})=>{if(p(u)){const a=n(s,u,o);a.length&&(r.has(o)||(r.set(o,{idx:o,item:u,matches:[]}),c.push(r.get(o))),a.forEach(({matches:h})=>{r.get(o).matches.push(...h)}))}}),c}_searchObjectList(t,{heap:s,ignoreFieldNorm:n}={}){const i=this._getSearcher(t),r=this.options.useTokenSearch&&"all"===this.options.tokenMatch,{keys:c,records:u}=this._myIndex,o=s?null:[];return u.forEach(({$:a,i:h})=>{if(!p(a))return;const l=[];let f=!1,m=!1;if(c.forEach((g,A)=>{const M=this._findMatches({key:g,value:a[A],searcher:i});M.length?(l.push(...M),M[0].hasInverse&&(m=!0)):f=!0}),(!m||!f)&&l.length&&(!r||this._coversAllTokens(l))){const g={idx:h,item:a,matches:l};s?(g.score=se(g.matches,{ignoreFieldNorm:n}),s.shouldInsert(g.score)&&s.insert(g)):o.push(g)}}),o}_findMatches({key:t,value:s,searcher:n}){if(!p(s))return[];const i=[];if(F(s))s.forEach(({v:r,i:c,n:u})=>{if(!p(r))return;const o=n.searchIn(r);if(o.isMatch){const a={score:o.score,key:t,value:r,idx:c,norm:u,indices:o.indices,hasInverse:o.hasInverse};void 0!==o.termCount&&(a.matchedMask=o.matchedMask,a.matchedTerms=o.matchedTerms,a.termCount=o.termCount),i.push(a)}});else{const{v:r,n:c}=s,u=n.searchIn(r);if(u.isMatch){const o={score:u.score,key:t,value:r,norm:c,indices:u.indices,hasInverse:u.hasInverse};void 0!==u.termCount&&(o.matchedMask=u.matchedMask,o.matchedTerms=u.matchedTerms,o.termCount=u.termCount),i.push(o)}}return i}_coversAllTokens(t){const s=t.length?t[0].termCount:void 0;if(void 0===s)return!0;if(s<=31){let i=0;for(let r=0;r<t.length;r++)i|=t[r].matchedMask||0;return i===2**s-1}const n=new Set;for(let i=0;i<t.length;i++){const r=t[i].matchedTerms;if(r)for(const c of r)n.add(c)}return n.size===s}};return e.version="7.4.2",e.createIndex=fe,e.parseIndex=Oe,e.config=d,e.match=function(t,s,n){if(n&&n.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 $(t,{...d,...n}).searchIn(s)},e.parseQuery=Ce,e})();q(class{constructor(e,{isCaseSensitive:t=d.isCaseSensitive,ignoreDiacritics:s=d.ignoreDiacritics,includeMatches:n=d.includeMatches,minMatchCharLength:i=d.minMatchCharLength,ignoreLocation:r=d.ignoreLocation,findAllMatches:c=d.findAllMatches,location:u=d.location,threshold:o=d.threshold,distance:a=d.distance}={}){this.query=null,this.options={isCaseSensitive:t,ignoreDiacritics:s,includeMatches:n,minMatchCharLength:i,findAllMatches:c,ignoreLocation:r,location:u,threshold:o,distance:a},e=t?e:e.toLowerCase(),e=s?R(e):e,this.pattern=e,this.query=function Ke(e,t={}){return e.replace(/\\\|/g,"\0").split("|").map(s=>{const n=function We(e){const t=[],s=e.length;let n=0;for(;n<s;){for(;n<s&&" "===e[n];)n++;if(n>=s)break;let i=n;for(;i<s&&" "!==e[i]&&'"'!==e[i];)i++;if(i<s&&'"'===e[i]){for(i++;i<s;){if('"'===e[i]){const r=i+1;if(r>=s||" "===e[r]){i++;break}if("$"===e[r]&&(r+1>=s||" "===e[r+1])){i+=2;break}}i++}t.push(e.substring(n,i)),n=i}else{for(;i<s&&" "!==e[i];)i++;t.push(e.substring(n,i)),n=i}}return t}(s.replace(/\u0000/g,"|").trim()).filter(r=>r&&!!r.trim()),i=[];for(let r=0,c=n.length;r<c;r+=1){const u=n[r];let o=!1,a=-1;for(;!o&&++a<ge;){const h=X[a],l=me(u,h.multiRegex);l&&(i.push(h.create(l,t)),o=!0)}if(!o)for(a=-1;++a<ge;){const h=X[a],l=me(u,h.singleRegex);if(l){i.push(h.create(l,t));break}}}return i})}(this.pattern,this.options)}static condition(e,t){return t.useExtendedSearch}searchIn(e){const t=this.query;if(!t)return{isMatch:!1,score:1};const{includeMatches:s,isCaseSensitive:n,ignoreDiacritics:i}=this.options;e=n?e:e.toLowerCase(),e=i?R(e):e;let r=0;const c=[];let u=0,o=!1;for(let a=0,h=t.length;a<h;a+=1){const l=t[a];c.length=0,r=0,o=!1;for(let f=0,m=l.length;f<m;f+=1){const g=l[f],{isMatch:A,indices:M,score:y}=g.search(e);if(!A){u=0,r=0,c.length=0,o=!1;break}r+=1,u+=y,$e(g.type)&&(o=!0),s&&(Pe.has(g.type)?c.push(...M):c.push(M))}if(r){const f={isMatch:!0,score:u/r};return o&&(f.hasInverse=!0),s&&(f.indices=G(c)),f}}return{isMatch:!1,score:1}}}),q(class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=ne({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,tokenize:t.tokenize});const s=this.analyzer.tokenize(e),{df:n,fieldCount:i}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(const r of s){this.termSearchers.push(new J(r,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));const c=n.get(r)||0,u=Math.log(1+(i-c+.5)/(c+.5));this.idfWeights.push(u)}this.combineAll="all"===t.tokenMatch,this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};const t=[];let s=0,n=0,i=0,r=0;const c=this.combineAll&&!this.useMask?new Set:null;for(let a=0;a<this.termSearchers.length;a++){const h=this.termSearchers[a].searchIn(e),l=this.idfWeights[a];n+=l,h.isMatch&&(i++,s+=l*(1-h.score),h.indices&&t.push(...h.indices),this.combineAll&&(this.useMask?r|=1<<a:c.add(a)))}if(0===i)return{isMatch:!1,score:1};const o={isMatch:!0,score:Math.max(.001,n>0?1-s/n:0)};return this.options.includeMatches&&t.length&&(o.indices=G(t)),this.combineAll&&(this.useMask?o.matchedMask=r:o.matchedTerms=c,o.termCount=this.numTerms),o}}),Ee.use=function(...e){e.forEach(t=>q(t))};var it=Ee,ot=k(4152);let ct=(()=>{class e{filterOptions=(0,I.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,I.EW)(()=>new it(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,I.EW)(()=>this.sortedAndFiltered().length);sorted=(0,I.EW)(()=>function rt(e,t,s){if(void 0===e)return[...t];const n=e.split(",").map(r=>r.trim()),i=s.split(",").map(r=>r.trim());return[...t].sort((r,c)=>{for(let u=0;u<n.length;u++){const o=n[u],a=i[u]||i[0];if(!(o in r))continue;let h=r[o],l=c[o];if("object"==typeof h&&(h=r[o].value,l=c[o].value),null==h)return 1;if(null==l)return-1;let f=0;if(f="string"==typeof h&&"string"==typeof l?h.localeCompare(l):h>l?1:h<l?-1:0,"DESC"===a&&(f*=-1),0!==f)return f}return 0})}(this.sortCol(),this.data(),this.sortOrder()));filterCol=(0,D.vPA)(void 0);filterExactMatch=(0,D.vPA)(!1);filterKeys=(0,I.EW)(()=>{const s=this.filterCol();return void 0!==s?[s]:this.filterOnlyVisible()?this.columnDefs().map(n=>n.key):Object.keys(this.sorted()[0]||{})});sortedAndFiltered=(0,I.EW)(()=>{const s=this.filterValue()??"";return""===s?this.sorted():this.fuse().search(s).map(i=>i.item)});sortedFilteredAndPaginated=(0,I.EW)(()=>this.sortedAndFiltered().slice(this.paginatorStartIndex(),this.paginatorEndIndex()));downloadCSV(){const s=this.sortedFilteredAndPaginated(),n=this.columnDefs();(0,ot.B)(s,n)}static \u0275fac=function(n){return new(n||e)};static \u0275prov=D.jDH({token:e,factory:e.\u0275fac,providedIn:"root"})}return e})()}}]);