1"use strict";(globalThis.webpackChunk=globalThis.webpackChunk||[]).push([[65166],{33289(e,t,s){s.d(t,{A:()=>o});var a=s(20641),r=s(53934),i=s(86840);const o={props:{visible:{type:Boolean,default:!1},modalNameOverride:{type:String,required:!1},source:{type:String,required:!1,default:null},entityLocation:{type:String,required:!1,default:null},refreshKey:{type:[String,Number],default:null}},emits:["update:visible","success"],unmounted(){this.beforeEachRoute&&this.beforeEachRoute()},data:()=>({loading:!1,localHydratedEntity:null,beforeEachRoute:void 0}),computed:{computedModalName(){return this.modalNameOverride||this.modalName}},methods:{hydratedEntity(){return r.EG.get(this.entityLocation).then((e=>(this.localHydratedEntity=e.data,e.data)))},show(){this.updateVisible(!0)},hide(){this.updateVisible(!1)},updateVisible(e){this.$emit("update:visible",e)},hideWithSuccess(e){this.$emit("success",e),this.hide()}},watch:{async visible(e,t){if(e===t)return;await(0,a.dY)();const s=this.$refs[this.modalName]&&this.$refs[this.modalName].title?this.$refs[this.modalName].title:this.modalName;(0,i.A)(s+" Modal Shown",{modal_name:this.modalName,type:"modal",category:this.$route.meta.typeOfThing??null,route:this.$route.name})},refreshKey(e,t){e!==t&&"function"==typeof this.init&&this.init()}}}},79955(e,t,s){s.d(t,{Ay:()=>u,OS:()=>c,kz:()=>h,vv:()=>m});var a=s(99227),r=s.n(a),i=s(40855);const o={year:"2-digit",month:"numeric",day:"numeric"},l={...o,hour:"numeric",minute:"numeric"},n=new Intl.DateTimeFormat("en-US",o),d=new Intl.DateTimeFormat("en-US",l),u={components:{RelatedItemImage:i.default}};function h(e){return e?n.format(new Date(e)):"Not listed"}function c(e){return e?d.format(new Date(e)):"Not listed"}function m(e){return e<1e3?r()(e).format("($0a)"):r()(e).format("($0.0a)")}},80051(e,t,s){s.r(t),s.d(t,{search:()=>i});var a=s(95954),r=s(53934);const i=({commit:e,getters:t,rootGetters:s,state:i},o=[])=>{const l=i.auth?`/api/search/workspace/${s["AuthStore/selectedWorkspaceId"]}`:"/api/search";return Array.isArray(o)||(o=[o]),o=0===o.length?t.searches().map((e=>e.name)):o,e(a.oB,o),r.EG.post(l,{searches:t.searches(o),cacheFor:i.cacheFor},{headers:{}}).then((({data:t})=>(e(a.rM,t),e(a.oB,o),e(a.vx),t))).catch((t=>{throw console.trace(t),e(a.oB,[]),t}))}},90860(e,t,s){s.r(t),s.d(t,{activeFields:()=>S,aggregation:()=>n,aggregationValue:()=>l,aggregations:()=>d,builder:()=>m,fields:()=>f,firstResultSet:()=>h,loading:()=>i,resultSet:()=>u,resultSetInitialState:()=>r,resultSets:()=>c,searchId:()=>o,searches:()=>g,selectedItems:()=>p});var a=s(481);const r=function(e){return{name:e,apiUri:null,aggregations:[],count:0,countSuggests:0,from:0,hasAggregations:!1,hasSuggests:!1,hasTimedOut:!1,indexes:[],maxScore:0,mostTotalHits:0,query:{},rawInput:{},results:[],searchHash:null,searchId:null,searchRouteName:null,size:0,suggests:[],totalHits:0,totalTime:0,uri:null}},i=e=>t=>t?e.loading.includes(t):e.loading.length>0,o=(e,t)=>e=>t.resultSet(e).searchId,l=(e,t)=>
1(e,s)=>t.aggregation(e,s)?t.aggregation(e,s).value:null,n=(e,t)=>(e,s)=>t.aggregations(e)[s],d=(e,t)=>e=>t.resultSet(e).aggregations,u=(e,t)=>e=>t.resultSets.find((t=>t.name===e))||r(e);function h(e,t){return t.resultSets.length?t.resultSets[0]:r("")}const c=({resultSets:e})=>e,m=({searches:e})=>a.A.toClass({searches:e}),g=({searches:e})=>(t=[])=>t.length?e.filter((e=>t.includes(e.name))):e,p=e=>e.selectedItems,S=e=>e.fields.filter((e=>e.active)),f=e=>e.fields},5983(e,t,s){s.d(t,{u:()=>a});const a=function(){return{auth:!1,hasSearched:!1,cacheFor:0,loading:[],searches:[],resultSets:[],selectedItems:[],fields:[],availableFields:[],scratch:{tags:[]}}}},80124(e,t,s){s.r(t),s.d(t,{ADD_SELECTED_ITEMS:()=>S,REMOVE_SELECTED_ITEMS:()=>f,RESET_STORE:()=>u,SEARCH_SUCCESS:()=>d,SET_AUTH:()=>r,SET_AVAILABLE_FIELDS:()=>m,SET_BUILDER:()=>i,SET_CACHE_FOR:()=>n,SET_FIELDS:()=>c,SET_LOADING:()=>l,SET_RESULT_SETS:()=>o,SET_SCRATCH_VALUE:()=>h,SET_SELECTED_ITEMS:()=>p,UPDATE_FIELD:()=>g});var a=s(5983);const r=(e,t)=>{e.auth=t},i=(e,t)=>{t.toPlain().searches.forEach((t=>{const s=e.searches.findIndex((e=>e.name===t.name));e.searches.splice(s,-1===s?0:1,t)}))},o=(e,t)=>{Array.isArray(t)&&t.forEach((t=>{const s=e.resultSets.findIndex((e=>t.name===e.name));t.mostTotalHits=t.totalHits,s>-1&&e.resultSets[s].mostTotalHits>t.totalHits&&(t.mostTotalHits=e.resultSets[s].mostTotalHits),e.resultSets.splice(s,-1===s?0:1,t)}))},l=(e,t)=>{Array.isArray(t)||(t=[t]),0===t.length?e.loading=[]:t.forEach((t=>{const s=e.loading.findIndex((e=>e===t));-1===s?e.loading.push(t):e.loading.splice(s,1)}))},n=(e,t)=>{e.cacheFor=t},d=(e,t)=>{},u=e=>{Object.assign(e,(0,a.u)(),{auth:e.auth})},h=(e,t)=>{e.scratch[t.key]=t.value},c=(e,t)=>{e.fields=t.map((e=>Object.assign({},e)))},m=(e,t)=>{e.availableFields=t.map((e=>Object.assign({},e)))},g=(e,t)=>{const s=e.fields.findIndex((e=>e.key===t.key));e.fields.splice(s,1,t)},p=(e,t)=>{e.selectedItems=t},S=(e,t)=>{const s=[...t,...e.selectedItems];e.selectedItems=[...new Set(s)]},f=(e,t)=>{e.selectedItems=e.selectedItems.filter((e=>!t.find((t=>t._id===e._id))))}},86449(e,t,s){s.d(t,{A:()=>l});var a=s(80051),r=s(90860),i=s(80124),o=s(5983);const l={namespaced:!0,state:()=>(0,o.u)(),getters:Object.assign({},r),mutations:Object.assign({},i),actions:Object.assign({},a)}},40855(e,t,s){s.r(t),s.d(t,{default:()=>o});var a=s(20641);const r=["alt","title","src","width","height"];const i={name:"RelatedItemImage",props:{item:{type:Object,default:null},title:{type:String,default:null},size:{type:Number,default:25}},computed:{titleComputed(){return this.title||this.item.shortDisplayName||this.item.name},src(){return this.item.avatarUrl+"?size="+2*this.size}}};const o=(0,s(66262).A)(i,[["render",function(e,t,s,i,o,l){return s.item?((0,a.uX)(),(0,a.CE)("img",{key:0,alt:"Logo for "+l.titleComputed,title:l.titleComputed,src:l.src,class:"rounded",width:s.size,height:s.size,onerror:"this.style.display='none'",loading:"lazy"},null,8,r)):(0,a.Q3)("",!0)}]])},34015(e,t,s){s.d(t,{A:()=>o});var a=s(20641),r=s(90033);const i={key:0,class:"visually-hidden sr-only"},o={__name:"BSpinner",props:{type:{type:String,default:"border"},variant:{type:String,default:""},small:{type:Boolean,default:!1},label:{type:String,default:""},role:{type:String,default:"status"},tag:{type:String,default:"span"}},setup(e){const t=e,s=(0,a.Ht)(),o=(0,a.EW)((()=>"grow"===t.type?"spinner-grow":"spinner-border")),l=(0,a.EW)((()=>t.small?"grow"===t.type?"spinner-grow-sm":"spinner-border-sm":"")),n=(0,a.EW)((()=>t.variant?`text-${t.variant}`:"")),d=(0,a.EW)((()=>!!t.label||!!s.label)),u=(0,a.EW)((()=>d.value?t.role||"status":null)),h=(0,a.EW)((()=>d.value?null:"true"));return(t,s)=>((0,a.uX)(),(0,a.Wv)((0,a.$y)(e.tag),{class:(0,r.normalizeClass)([o.value,l.value,n.value,"d-inline-flex"]),role:u.value,"aria-hidden":h.value},{default:(0,a.k6)((()=>[d.value?((0,a.uX)(),(0,a.CE)("span",i,[(0,a.RG)(t.$slots,"label",{},(()=>[(0,a.eW)((0,r.toDisplayString)(e.label),1)]))])):(0,a.Q3)("",!0)])),_:3},8,["class","role","aria-hidden"]))}}},28732(e,t,s){s.r(t),s.d(t,{default:()=>C});var a=s(2916),r=s(80751),i=s(56370),o=s(73695),l=s(82742),n=s(20641),d=s(53751),u=s(90033);const h={style:{"max-width":"500px"}},c={class:"text-mute d-block"};var m=s(86449),g=s(481),p=s(34620),S=s(92601),f=s(35894),y=s(82312),b=s(27436),v=s(27078),E=s(95954),A=s(79955),w=s(86840),_=s(69430),I=s(53934),T=s(33289),k=s(34015);let M=0;const $={name:"NotInterestedManageModal",components:{BSpinner:k.A},mixins:[T.A],data:()=>({modalName:"NotInterestedManageModal",page:1,size:5,showAlert:0,storeModule:"NotInterestedManageStore"+ ++M}),computed:{builder(){return this.$store.getters[`${this.storeModule}/builder`]},offset(){return(this.page-1)*this.size},sort(){return this.builder.hasSearch("search")?this.builder.getSearch("search").getOptions().getSorts()[0]??null:null},resultSet(){let e=this.$store.getters[`${this.storeModule}
1/resultSet`]("search");return{...e,results:e.results.map((e=>e.resource))}}},created(){this.$store.registerModule(this.storeModule,m.A),this.$store.commit(`${this.storeModule}/${E.OD}`,!0)},unmounted(){this.$store.hasModule(this.storeModule)&&this.$store.unregisterModule(this.storeModule)},methods:{formatDateLong:A.OS,storeLoading(e){return this.$store.getters[`${this.storeModule}/loading`](e)},shown(){this.$store.commit(`${this.storeModule}/${E.Rv}`,this.freshBuilder()),this.search()},hidden(){this.fetchUser()},freshBuilder(){return(new g.A).addSearch(new p.A("search").setOptions(this.builderOptions().setSorts([new b.A("created_at")])).addQuery(new f.A("UserEventModel",new S.A([new v.A("type",["notInterested"])]))))},builderOptions(){let e=new y.A;return e.setSave(!1),e.setSize(this.size),e},search(){return this.$store.commit(`${this.storeModule}/${E.Rv}`,this.builder),this.$store.dispatch(`${this.storeModule}/search`)},pageChanged({first:e,rows:t}){const s=Math.floor(e/t)+1;if(s!==this.page)return this.page=s,this.builder.getSearch("search").setPage(s),this.search()},sortingChanged({sortField:e,sortOrder:t}){this.builder.getSearch("search").getOptions().setSorts([new b.A(e,1===t?"asc":"desc")]),this.search()},remove(e){this.loading=!0,I.EG.delete("/api/user-event/"+e._id).then((()=>{(0,w.A)(_.DATA_ITEM_REMOVED_FROM_BLACKLIST),this.loading=!1,this.showAlert=3,this.shown()}))}}};const C=(0,s(66262).A)($,[["render",function(e,t,s,m,g,p){const S=l.A,f=(0,n.g2)("BSpinner"),y=(0,n.g2)("RouterLink"),b=o.A,v=i.A,E=r.A,A=a.A;return(0,n.uX)(),(0,n.Wv)(A,{id:e.computedModalName,ref:e.computedModalName,visible:e.visible,style:{width:"40rem"},draggable:!1,header:"Manage Not Interested",modal:"",onShow:p.shown,onHide:p.hidden,"onUpdate:visible":e.updateVisible},{default:(0,n.k6)((()=>[(0,n.bo)((0,n.bF)(S,{severity:"info",closeable:"",onClose:t[0]||(t[0]=e=>{g.showAlert=0})},{default:(0,n.k6)((()=>[...t[2]||(t[2]=[(0,n.eW)(" Item was removed from your not interested list. ",-1)])])),_:1},512),[[d.vShow,g.showAlert]]),(0,n.bF)(E,{rows:g.size,"onUpdate:rows":t[1]||(t[1]=e=>g.size=e),"data-key":"_id",value:p.resultSet?.results,"total-records":p.resultSet?.totalHits??0,loading:p.storeLoading("search"),"rows-per-page-options":[5,10,25,50,100],first:p.offset,"always-show-paginator":!1,paginator:"",lazy:"",onSort:p.sortingChanged,onPage:p.pageChanged},{empty:(0,n.k6)((()=>[...t[3]||(t[3]=[(0,n.eW)(" Your not interested list is empty. ",-1)])])),loadingicon:(0,n.k6)((()=>[(0,n.bF)(f,{variant:"primary",label:"Spinning",dusk:"loading"})])),default:(0,n.k6)((()=>[(0,n.bF)(b,{field:"name",header:"Name"},{body:(0,n.k6)((({data:e})=>[(0,n.Lk)("div",h,[(0,n.bF)(y,{title:e.target.longDisplayName,to:e.target.showRoute,class:"word-wrap d-inline-block",dusk:"related-target"},{default:(0,n.k6)((()=>[(0,n.eW)((0,u.toDisplayString)(e.target.name),1)])),_:2},1032,["title","to"]),(0,n.Lk)("small",c,(0,u.toDisplayString)(e.target.typeOfThing),1)])])),_:1}),(0,n.bF)(b,{field:"created_at",header:"Added",sortable:!0},{body:(0,n.k6)((({data:e})=>[(0,n.eW)((0,u.toDisplayString)(p.formatDateLong(e.created_at)),1)])),_:1}),(0,n.bF)(b,{field:"actions",header:""},{body:(0,n.k6)((({data:t})=>[(0,n.bF)(v,{severity:"danger",variant:"outlined",size:"small",disabled:e.loading,dusk:"remove",title:"Remove this from your list of not interested items",label:"Remove",onClick:e=>{p.remove(t)}},null,8,["disabled","onClick"])])),_:1})])),_:1},8,["rows","value","total-records","loading","first","onSort","onPage"]),(0,n.bF)(v,{severity:"secondary",class:"mx-auto d-block mt-4",onClick:e.hide},{default:(0,n.k6)((()=>[...t[4]||(t[4]=[(0,n.eW)(" Close ",-1)])])),_:1},8,["onClick"])])),_:1},8,["id","visible","onShow","onHide","onUpdate:visible"])}]])}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.