1import{a as rn,b as an}from"./chunk-PZF32CPW.js";import{a as tn}from"./chunk-EAXQGX66.js";import{a as ln}from"./chunk-CNYBYD2D.js";import{a as J,b as xe}from"./chunk-MIVNAQ3O.js";import"./chunk-Y7DQBOPV.js";import{b as Y,c as Ge}from"./chunk-4CXSKW2T.js";import{a as Ye,b as nn}from"./chunk-F3RTVZ3C.js";import{a as on}from"./chunk-5P3A6NZ3.js";import"./chunk-XCJ44OO5.js";import"./chunk-EO5NRR5N.js";import"./chunk-X2H6MUL2.js";import{a as $e}from"./chunk-ZHZ6U2Y6.js";import{a as Ae}from"./chunk-HV6IG3RR.js";import{a as Ke}from"./chunk-Z33ZRDDQ.js";import{a as j}from"./chunk-XBHGPTDA.js";import"./chunk-JIK6NSNP.js";import"./chunk-SHT4PQWH.js";import{b as Ce,c as fe}from"./chunk-EKWMLMLS.js";import{a as U}from"./chunk-VDJTDOWZ.js";import{b as Xe,c as Ze,d as en}from"./chunk-I6RFF5RH.js";import{f as We}from"./chunk-BVB6HQJV.js";import{Aa as Je,E as ke,G as K,Ha as Q,J as Te,K as Le,Na as $,Q as Ne,U as De,V as qe,W as Ie,Y as Fe,Z as Re,_ as Ue,a as be,b as Me,c as Oe,d as Be,e as Pe,f as ye,g as Ee,i as A,qa as Qe,ra as je,x as we,y as Se,ya as ze,za as He}from"./chunk-GIRM45ZI.js";import{C as G,I as Ve,L as W}from"./chunk-TFUVPB4G.js";import{g as ve}from"./chunk-EL4BRMII.js";import"./chunk-ITOFIT2T.js";import{d as ge}from"./chunk-5PNH54WN.js";import{j as he,m as _e}from"./chunk-SZ3VOHWX.js";import{$ as N,$b as E,Ab as le,Da as D,E as L,Hb as se,Ib as ce,Jc as h,Kc as F,Lb as u,Mb as g,Nb as de,P as te,Pb as z,Qb as H,Rb as s,Sb as r,Tb as a,Ub as p,Vb as P,Vc as R,Wb as y,Xb as pe,Za as ie,_a as re,ac as me,cb as i,ea as m,ec as b,gc as c,l as T,la as M,m as Z,ma as O,na as oe,q as V,s as ee,sb as v,sc as ue,vc as l,w as ne,wc as I,xa as B,xb as q,xc as C,zb as ae}from"./chunk-3PDLPBFY.js";import{a as S,b as k}from"./chunk-CZC3JXXR.js";var _=(function(n){return n.default="DEFAULT",n.openLink="OPEN_LINK",n.openSendEmailDialog="OPEN_SEND_EMAIL_DIALOG",n.hidden="HIDDEN",n.showAlways="SHOW_ALWAYS",n})(_||{});var f=(function(n){return n[n.REQUEST_COLLECTION=0]="REQUEST_COLLECTION",n[n.JOIN_NETWORK=1]="JOIN_NETWORK",n[n.SEND_FEEDBACK=2]="SEND_FEEDBACK",n})(f||{});var sn=(()=>{class n{constructor(){this.formBuilder=m(Fe)}buildForm(){return this.formBuilder.group({description:[void 0,[K.required,K.maxLength(2e3)]]})}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=N({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var cn=(()=>{class n{constructor(){this.http=m(ge)}sendEmailForType(e,t,o){switch(e){case f.SEND_FEEDBACK:return this.sendFeedbackEmail(t,o);case f.JOIN_NETWORK:return this.sendJoinNetworkEmail(t,o);case f.REQUEST_COLLECTION:return this.sendRequestCollectionEmail(t,o);default:throw Z({error:"Invalid email type: "+e})}}sendRequestCollectionEmail(e,t){return this.http.post(`${U.apiUrl}/email/request-collection`,k(S({},e),{recaptchaAssessment:t}))}sendFeedbackEmail(e,t){return this.http.post(`${U.apiUrl}/email/send-feedback`,k(S({},e),{recaptchaAssessment:t}))}sendJoinNetworkEmail(e,t){return this.http.post(`${U.apiUrl}/email/join-network`,k(S({},e),{recaptchaAssessment:t}))}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=N({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var _n=()=>({success:!1,error:null});function fn(n,d){n&1&&(r(0,"span"),l(1,"Description is required"),a())}function xn(n,d){n&1&&(r(0,"span"),l(1,"Must not be longer than 2000 chars"),a())}function vn(n,d){if(n&1&&(r(0,"p",7),oe(),r(1,"svg",14),p(2,"use",15),a(),u(3,fn,2,0,"span"),u(4,xn,2,0,"span"),a()),n&2){let e=c();i(3),g(e.form.get("description").hasError("required")?3:-1),i(),g(e.form.get("description").hasError("maxlength")?4:-1)}}var dn=(()=>{class n{constructor(){this.data=m(Me),this.dialogRef=m(be),this.emailMessageFormBuilder=m(sn),this.emailMessageService=m(cn),this.googleRecaptchaService=m(xe),this.processing=!1}ngOnInit(){this.form=this.emailMessageFormBuilder.buildForm()}sendEmail(e){this.form.valid?(this.processing=!0,this.googleRecaptchaService.execute(J.submit).pipe(ee(t=>this.emailMessageService.sendEmailForType(e,this.form.value,{token:t,action:J.submit}))).subscribe(()=>this.dialogRef.close({success:!0}),t=>this.dialogRef.close({success:!1,error:t}),()=>this.processing=!1)):We(this.form)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=v({type:n,selectors:[["app-email-message-dialog"]],decls:28,vars:10,consts:[["mat-dialog-title",""],[1,"body-14-regular","form-prompt"],["novalidate","",3,"formGroup"],[1,"row"],[1,"form-control-wrapper","col","stretch"],[1,"label-text","required"],["formControlName","description","rows","5","required","","data-se","inp-description",1,"resizable",3,"placeholder"],[1,"message","invali
1d"],[1,"recaptcha-legal"],["href","https://policies.google.com/privacy"],["href","https://policies.google.com/terms"],["align","end"],["data-se","cancel-btn",1,"outlined-btn",3,"matDialogClose"],["data-se","send-btn","type","submit","cdkFocusInitial","",1,"primary-btn",3,"click","disabled"],[1,"feather-icon"],[0,"xlink","href","/assets/icons/feather-sprite.svg#alert-circle"]],template:function(t,o){t&1&&(r(0,"h6",0),l(1),a(),p(2,"mat-divider"),r(3,"mat-dialog-content")(4,"p",1),l(5),a(),r(6,"form",2)(7,"div",3)(8,"div",4)(9,"div",5),l(10),a(),r(11,"textarea",6),l(12," "),a(),u(13,vn,5,2,"p",7),a()()(),r(14,"p",8),l(15," This site is protected by reCAPTCHA and the Google "),r(16,"a",9),l(17,"Privacy Policy"),a(),l(18," and "),r(19,"a",10),l(20,"Terms of Service"),a(),l(21," apply. "),a()(),p(22,"mat-divider"),r(23,"mat-dialog-actions",11)(24,"button",12),l(25," Cancel "),a(),r(26,"button",13),b("click",function(){return o.sendEmail(o.data.emailType)}),l(27),a()()),t&2&&(i(),I(o.data.title),i(4),I(o.data.message),i(),s("formGroup",o.form),i(4),I(o.data.descriptionLabel),i(),s("placeholder",o.data.descriptionPlaceholder),i(2),g(o.form.get("description").touched&&o.form.get("description").invalid?13:-1),i(11),s("matDialogClose",h(9,_n)),i(2),s("disabled",o.processing),i(),C(" ",o.data.sendEmailBtnText," "))},dependencies:[Pe,Ae,ye,Re,Ne,ke,Te,Le,Ie,Ue,qe,De,Ee,Be],encapsulation:2})}}return n})();function bn(n,d){if(n&1&&(P(0,"p",2),l(1,"You do not have access to any collections. Try logging in."),y(),P(2,"a",3)(3,"button",4),l(4,"Log in with Passport"),y()()),n&2){let e=c();i(2),me("href",e.getLoginUrl(),re)}}function Mn(n,d){n&1&&(P(0,"p",2),l(1,"You do not have access to any collections."),y())}var pn=(()=>{class n extends A{constructor(){super(...arguments),this.userService=m(j),this.userInfoUnavailable=!1}ngOnInit(){this.user?this.userInfoUnavailable=!0:this.userService.getLoggedInUser().subscribe(e=>{e||(this.userInfoUnavailable=!0),this.user={displayName:e?.name,imgUrl:void 0}},()=>{this.userInfoUnavailable=!0,this.user=void 0})}getLoginUrl(){let e=this.userService.getLoginUrl(),t=new URL(window.location.origin+e);return t.searchParams.set("origin",window.location.href),t.toString()}static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=D(n)))(o||n)}})()}static{this.\u0275cmp=v({type:n,selectors:[["app-no-collections-splash"]],features:[q],decls:6,vars:1,consts:[[1,"no-collections"],["src","/assets/images/empty-state.png","alt","no collections",1,"no-collections-img"],[1,"body-14-regular"],["data-se","no-collections-login-button",1,"no-collections-login-button",3,"href"],[1,"primary-btn"]],template:function(t,o){t&1&&(P(0,"div",0),pe(1,"img",1),P(2,"h4"),l(3,"No Collections"),y(),u(4,bn,5,1)(5,Mn,2,0,"p",2),y()),t&2&&(i(4),g(o.userInfoUnavailable?4:5))},styles:[".no-collections[_ngcontent-%COMP%]{background-color:var(--empty-state-splash-background);padding-block:30px;margin:24px;display:flex;flex-direction:column;flex-grow:1;align-items:center}.no-collections[_ngcontent-%COMP%] .no-collections-img[_ngcontent-%COMP%]{max-width:400px;width:100%}.no-collections[_ngcontent-%COMP%] h4[_ngcontent-%COMP%]{margin-block:-10px}.no-collections[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{text-align:center}.no-collections[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{margin-block:15px}"]})}}return n})();var mn=(()=>{class n{constructor(){this.skeletonLoaderConfig=Ye}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=v({type:n,selectors:[["app-question-skeleton-loader"]],decls:17,vars:8,consts:[[1,"skeleton-loader-card"],[1,"skeleton-loader-card-wrapper"],[1,"skeleton-loader-card-header"],["count","1",3,"theme"],[1,"header-line"],[1,"skeleton-loader-card-body"],["count","3",3,"theme"],[1,"short-line"],[1,"skeleton-loader-card-footer"],[1,"quarter-line"]],template:function(t,o){t&1&&(r(0,"ds-ngx-card",0)(1,"div",1)(2,"div",2),p(3,"ngx-skeleton-loader",3),r(4,"div",4),p(5,"ngx-skeleton-loader",3),a(),p(6,"ngx-skeleton-loader",3),a(),r(7,"div",5),p(8,"ngx-skeleton-loader",6),r(9,"div",7),p(10,"ngx-skeleton-loader",3),a()(),r(11,"div",8)(12,"div"),p(13,"ngx-skeleton-loader",3)(14,"ngx-skeleton-loader",3),a(),r(15,"div",9),p(16,"ngx-skeleton-loader",3),a()()()()),t&2&&(i(3),s("theme",o.skeletonLoaderConfig.CIRCLE),i(2),s("theme",o.skeletonLoaderConfig.LINE),i(),s("theme",o.skeletonLoaderConfig.CIRCLE),i(2),s("theme",o.skeletonLoaderConfig.LINE),i(2),s("theme",o.skeletonLoaderConfig.LINE),i(3),s("theme",o.skeletonLoaderConfig.RECTANGLE),i(),s("theme",o.skeletonLoaderConfig.RECTANGLE),i(2),s("theme",o.skeletonLoaderConfig.LINE))},dependencies:[Q,je,Qe],styles:[".skeleton-loader-card-wrapper[_ngcontent-%COMP%]{height:205px}.skeleton-loader-card-wrapper[_ngcontent-%COMP%] .skeleton-loader-card-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between}.skeleton-loader-card-wrapper[_ngcontent-%COMP%] .skeleton-loader-card-header[_ngcontent-%COMP%] .header-line[_ngcontent-%COMP%]{margin:0 8px;width:-webkit-fill-available}",".skeleton-loader-card[_ngcontent-%COMP%]{--cards-border-color: transparent;--cards-border-radius: 4px}.skeleton-loader-card-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:column;flex:1 1 auto;box-sizing:border-box;padding:12px;background-color:#fff}.skeleton-loader-card-wrapper[_ngcontent-%COMP%] .skeleton-loader-card-header[_ngcontent-%COMP%]{margin-bottom:12px}.skeleton-loader-card-wrapper[_ngcontent-%COMP%] .skeleton-loader-card-body[_ngcontent-%COMP%]{height:-webkit-fill-available}.skeleton-loader-card-wrapper[_ngcontent-%COMP%] .skeleton-loader-card-footer[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;border-top:1px solid #E2E6ED;margin-top:12px;padding-top:12px}.skeleton-loader-card-wrapper[_ngcontent-%COMP%] .skeleton-loader-card-footer[_ngcontent-%COMP%] ngx-skeleton-loader[_ngcontent-%COMP%]{margin-right:12px}.short-line[_ngcontent-%COMP%]{width:60%}.quarter-line[_ngcontent-%COMP%]{width:25%}"]})}}return n})();var On=()=>[W,Q,we,Je,$,import("./chunk-RNSLMHRP.js").then(n=>n.NormalizeParagraphSpacingDirective)],un=n=>({backgroundImage:n}),gn=()=>["search"],Bn=()=>[1e3,0],Pn=n=>({placement:"bottom-start",theme:"dark",delay:n}),yn=()=>({icon:"edit_square"}),En=()=>({icon:"public"}),wn=()=>[],Sn=(n,d)=>d.id;function kn(n,d){if(n&1&&p(0,"div",2),n&2){let e=c();s("appDynamicTemplate",e.heroBannerTemplate())}}function Tn(n,d){if(n&1){let e=E();
1r(0,"button",15),b("click",function(){M(e);let o=c(2);return O(o.joinNetwork())}),l(1," Join Network "),a()}if(n&2){let e=c(2);s("ngClass",!(e.joinNetworkBtn==null||e.joinNetworkBtn.properties==null)&&e.joinNetworkBtn.properties["css-class"]?e.joinNetworkBtn==null||e.joinNetworkBtn.properties==null?null:e.joinNetworkBtn.properties["css-class"]:"accent-btn")}}function Ln(n,d){if(n&1){let e=E();r(0,"button",15),b("click",function(){M(e);let o=c(2);return O(o.heroBannerLogin())}),l(1),a()}if(n&2){let e=c(2);s("ngClass",!(e.heroBannerLoginBtn==null||e.heroBannerLoginBtn.properties==null)&&e.heroBannerLoginBtn.properties["css-class"]?e.heroBannerLoginBtn==null||e.heroBannerLoginBtn.properties==null?null:e.heroBannerLoginBtn.properties["css-class"]:"accent-btn"),i(),C(" ",!(e.heroBannerLoginBtn==null||e.heroBannerLoginBtn.properties==null)&&e.heroBannerLoginBtn.properties.text?e.heroBannerLoginBtn==null||e.heroBannerLoginBtn.properties==null?null:e.heroBannerLoginBtn.properties.text:"Login"," ")}}function Nn(n,d){if(n&1&&(r(0,"button",13),l(1," Explore Collections "),a()),n&2){let e=c(2);s("routerLink",h(2,gn))("ngClass",!(e.exploreCollectionsBtn==null||e.exploreCollectionsBtn.properties==null)&&e.exploreCollectionsBtn.properties["css-class"]?e.exploreCollectionsBtn==null||e.exploreCollectionsBtn.properties==null?null:e.exploreCollectionsBtn.properties["css-class"]:"secondary-btn")}}function Dn(n,d){if(n&1){let e=E();r(0,"button",15),b("click",function(){M(e);let o=c(2);return O(o.heroBannerCustomBtnClick())}),l(1),a()}if(n&2){let e=c(2);s("ngClass",!(e.heroBannerCustomBtn==null||e.heroBannerCustomBtn.properties==null)&&e.heroBannerCustomBtn.properties["css-class"]?e.heroBannerCustomBtn==null||e.heroBannerCustomBtn.properties==null?null:e.heroBannerCustomBtn.properties["css-class"]:"secondary-btn"),i(),C(" ",e.heroBannerCustomBtn==null||e.heroBannerCustomBtn.properties==null?null:e.heroBannerCustomBtn.properties.text," ")}}function qn(n,d){if(n&1&&(r(0,"div",3)(1,"div",7)(2,"div",8)(3,"div",9)(4,"h1",10),l(5),a(),r(6,"div",11),u(7,Tn,2,1,"button",12),u(8,Ln,2,2,"button",12),u(9,Nn,2,3,"button",13),u(10,Dn,2,2,"button",12),a()()(),p(11,"div",14),a()()),n&2){let e,t=c();s("ngStyle",t.heroImageUrl?F(6,un,"url("+t.heroImageUrl+")"):null),i(5),C(" ",t.landingMessage," "),i(2),g(t.joinNetworkBtn&&t.ButtonAction.hidden!==(t.joinNetworkBtn==null?null:t.joinNetworkBtn.action)?7:-1),i(),g(t.heroBannerLoginBtn&&t.ButtonAction.hidden!==(t.heroBannerLoginBtn==null?null:t.heroBannerLoginBtn.action)&&!t.isUserLoggedIn()?8:-1),i(),g(t.showAlwaysExploreCollectionsBtn||((e=t.collections())==null?null:e.length)>t.maxDisplayedCollections?9:-1),i(),g(t.heroBannerCustomBtn&&t.ButtonAction.hidden!==(t.heroBannerCustomBtn==null?null:t.heroBannerCustomBtn.action)?10:-1)}}function In(n,d){if(n&1&&p(0,"div",4),n&2){let e=c();s("appDynamicTemplate",e.adTemplate())}}function Fn(n,d){if(n&1&&p(0,"div",5),n&2){let e=c();s("appDynamicTemplate",e.membersTemplate())}}function Rn(n,d){if(n&1&&(r(0,"ds-ngx-badge",26),l(1),a()),n&2){let e=c().$implicit,t=c(3);s("appearance",t.BadgeAppearance.Default)("theme",t.BadgeTheme.Light)("prefixIcon",h(4,En)),i(),C(" ",t.getCollectionCountText(e.collectionCount)," ")}}function Un(n,d){if(n&1&&(r(0,"a",19)(1,"ds-ngx-card")(2,"div",20)(3,"div",21)(4,"div",22),l(5,"chat"),a(),r(6,"span",23),l(7),a()(),p(8,"div",24)(9,"ds-ngx-divider"),r(10,"div",25),u(11,Rn,2,5,"ds-ngx-badge",26),r(12,"ds-ngx-badge",27),l(13),a()()()()()),n&2){let e=d.$implicit,t=c(3);s("routerLink",e.routerLink),i(6),s("ngxTippy",e.name)("tippyProps",F(11,Pn,h(10,Bn))),i(),C(" ",e.name," "),i(),s("innerHTML",e.description,ie),i(3),g(e.collectionCount?11:-1),i(),s("appearance",t.BadgeAppearance.Default)("theme",t.BadgeTheme.Light)("prefixIcon",h(13,yn)),i(),C(" ",t.getInputCountText(e.inputCount)," ")}}function An(n,d){if(n&1&&(r(0,"div",16)(1,"h2",17),l(2,"Featured Questions"),a(),p(3,"ds-ngx-divider"),r(4,"div",18),z(5,Un,14,14,"a",19,Sn),a()()),n&2){let e=c(2);i(5),H(e.allQuestions())}}function Qn(n,d){if(n&1&&u(0,An,7,0,"div",16),n&2){let e=c();g(e.allQuestions().length>0?0:-1)}}function jn(n,d){n&1&&p(0,"app-question-skeleton-loader")}function Vn(n,d){if(n&1&&(r(0,"div",16)(1,"h2",17),l(2,"Featured Questions"),a(),p(3,"ds-ngx-divider"),r(4,"div",18),z(5,jn,1,0,"app-question-skeleton-loader",null,de),a()()),n&2){let e=c();i(5),H(h(0,wn).constructor(e.questionsSkeletonLoaderCount))}}function zn(n,d){n&1&&p(0,"app-no-collections-splash")}function Hn(n,d){if(n&1&&(r(0,"div",29)(1,"button",13),l(2," View All Collections "),a()()),n&2){let e=c(2);i(),s("routerLink",h(2,gn))("ngClass",!(e.viewAllCollectionsBtn==null||e.viewAllCollectionsBtn.properties==null)&&e.viewAllCollectionsBtn.properties["css-class"]?e.viewAllCollectionsBtn==null||e.viewAllCollectionsBtn.properties==null?null:e.viewAllCollectionsBtn.properties["css-class"]:"primary-btn")}}function Jn(n,d){if(n&1&&(p(0,"app-collection-list",28),u(1,Hn,3,3,"div",29)),n&2){let e,t=c();s("isLoading",t.isLoadingCollections())("collections",t.collections())("featuredCollections",t.featuredCollections)("maxDisplayedCollections",t.maxDisplayedCollections)("showFeaturedCollectionsHeader",!0),i(),g(((e=t.collections())==null?null:e.length)>t.maxDisplayedCollections?1:-1)}}function Gn(n,d){if(n&1){let e=E();
1r(0,"button",15),b("click",function(){M(e);let o=c(2);return O(o.requestCollection())}),l(1," Request Collection "),a()}if(n&2){let e=c(2);s("ngClass",!(e.requestCollectionBtn==null||e.requestCollectionBtn.properties==null)&&e.requestCollectionBtn.properties["css-class"]?e.requestCollectionBtn==null||e.requestCollectionBtn.properties==null?null:e.requestCollectionBtn.properties["css-class"]:"secondary-btn")}}function Kn(n,d){if(n&1){let e=E();r(0,"button",15),b("click",function(){M(e);let o=c(2);return O(o.ctaBannerCustomBtnClick())}),l(1),a()}if(n&2){let e=c(2);s("ngClass",!(e.ctaBannerCustomBtn==null||e.ctaBannerCustomBtn.properties==null)&&e.ctaBannerCustomBtn.properties["css-class"]?e.ctaBannerCustomBtn==null||e.ctaBannerCustomBtn.properties==null?null:e.ctaBannerCustomBtn.properties["css-class"]:"secondary-btn"),i(),C(" ",e.ctaBannerCustomBtn==null||e.ctaBannerCustomBtn.properties==null?null:e.ctaBannerCustomBtn.properties.text," ")}}function Wn(n,d){if(n&1&&(r(0,"div",6)(1,"h2",30),l(2),a(),r(3,"div"),u(4,Gn,2,1,"button",12),u(5,Kn,2,2,"button",12),a()()),n&2){let e=c();s("ngStyle",e.ctaImageUrl?F(4,un,"url("+e.ctaImageUrl+")"):null),i(2),C(" ",e.ctaBannerMessage?e.ctaBannerMessage:"Can\u2019t find what you\u2019re looking for?"," "),i(2),g(e.requestCollectionBtn&&e.ButtonAction.hidden!==(e.requestCollectionBtn==null?null:e.requestCollectionBtn.action)?4:-1),i(),g(e.ctaBannerCustomBtn&&e.ButtonAction.hidden!==(e.ctaBannerCustomBtn==null?null:e.ctaBannerCustomBtn.action)?5:-1)}}var mo=(()=>{class n extends A{constructor(){super(...arguments),this.dialog=m(Oe),this.collectionsService=m(Ke),this.appConfigStore=m(Ce),this.appTitleService=m(fe),this.toastMessageService=m(Ge),this.userService=m(j),this.activatedRoute=m(Ve),this.questionService=m(rn),this.appSearchService=m(ln),this.ButtonAction=_,this.BadgeAppearance=ze,this.BadgeTheme=He,this.questionsSkeletonLoaderCount=2,this.federatedQuestions=G(this.questionService.getFederatedQuestions().pipe(te("questions"),V(e=>e.sort((t,o)=>t.name.localeCompare(o.name,void 0,{numeric:!0}))),L(()=>T([])))),this.featuredCollectionQuestions=B(null),this.heroBannerTemplate=B(null),this.adTemplate=B(null),this.membersTemplate=B(null),this.isUserLoggedIn=B(!1),this.collections=G(this.collectionsService.getCollections().pipe(L(()=>[]))),this.isLoadingCollections=R(()=>!this.collections()),this.isLoadingQuestions=R(()=>!this.federatedQuestions()&&!this.featuredCollectionQuestions()),this.allQuestions=R(()=>[...(this.federatedQuestions()||[]).map(t=>({id:t.id,name:t.name,description:t.description,routerLink:["/questions",t.id],collectionCount:t.collections?.length||0,inputCount:t.params?.length||0})),...this.featuredCollectionQuestions()||[]]),this.maxDisplayedCollections=12,this.featuredQuestions=[],this.OPEN_REQUEST_COLLECTION="request_collection",this.OPEN_JOIN_NETWORK="join_network",this.OPEN_SEND_EMAIL="send_email"}ngOnInit(){this.appConfigStore.state$.subscribe(e=>{this.appTitleService.clearAppName(),this.appTitleService.clearCollectionName(),this.landingMessage=e.ui?.landingMessage,this.title=e.ui?.title,this.ctaBannerMessage=e.ui?.ctaBannerMessage,this.heroImageUrl=e.ui?.images?.heroBannerUrl,this.ctaImageUrl=e.ui?.images?.ctaImageUrl,this.showCtaBanner=e.ui?.showCtaBanner??!!this.ctaImageUrl,this.heroBannerTemplate.set(e.ui?.templates?.heroBannerTemplate),this.adTemplate.set(e.ui?.templates?.adBannerTemplate),this.membersTemplate.set(e.ui?.members?.template),this.joinNetworkBtn=e.ui?.buttons?.joinNetwork,this.exploreCollectionsBtn=e.ui?.buttons?.exploreCollections,this.heroBannerCustomBtn=e.ui?.buttons?.heroBannerCustomBtn,this.heroBannerLoginBtn=e.ui?.buttons?.heroBannerLoginBtn,this.viewAllCollectionsBtn=e.ui?.buttons?.viewAllCollections,this.requestCollectionBtn=e.ui?.buttons?.requestCollection,this.ctaBannerCustomBtn=e.ui?.buttons?.ctaBannerCustomBtn,this.showAlwaysExploreCollectionsBtn=_.showAlways===e.ui?.buttons?.exploreCollections?.action,this.maxDisplayedCollections=e.ui?.maxDisplayedFeaturedCollections,this.featuredCollections=e.ui?.featuredCollections,this.featuredQuestions=e.ui?.featuredQuestions||[],this.loadFeaturedCollectionQuestions(),this.processRequestParam
1s()}),this.userService.isUserLoggedIn().subscribe(e=>this.isUserLoggedIn.set(!!e))}heroBannerLogin(){this.userService.login()}joinNetwork(){_.openLink===this.joinNetworkBtn?.action?window.open(this.joinNetworkBtn.properties.uri,"_blank"):this.joinNetworkBtn?.action===_.openSendEmailDialog&&this.userService.isUserLoggedIn().subscribe(e=>{e?this.openSendEmailDialog({title:"Join the Network",message:"Are you a data custodian who would like to add a collection to the network? Let us know.",descriptionLabel:"Describe the Collection",descriptionPlaceholder:"E.g. collection name, study name, number of samples, data types, URL",sendEmailBtnText:"Send",toastSuccessMessage:"Your request has been sent.",toastFailureMessage:"Unable to send your request at the moment. Please try again later.",emailType:f.JOIN_NETWORK}):this.userService.openAfterLogin(this.OPEN_JOIN_NETWORK)})}heroBannerCustomBtnClick(){_.openLink===this.heroBannerCustomBtn?.action&&window.open(this.heroBannerCustomBtn?.properties?.uri,"_blank")}ctaBannerCustomBtnClick(){_.openLink===this.ctaBannerCustomBtn?.action?window.open(this.ctaBannerCustomBtn.properties.uri,"_blank"):_.openSendEmailDialog===this.ctaBannerCustomBtn?.action&&this.userService.isUserLoggedIn().subscribe(e=>{e?this.openSendEmailDialog({title:this.ctaBannerCustomBtn.properties["send-email-dialog-title"],message:this.ctaBannerCustomBtn.properties["send-email-dialog-message"],descriptionLabel:this.ctaBannerCustomBtn.properties["send-email-dialog-description-label"],descriptionPlaceholder:this.ctaBannerCustomBtn.properties["send-email-dialog-description-placeholder"],sendEmailBtnText:this.ctaBannerCustomBtn.properties["send-email-dialog-send-btn-text"],toastSuccessMessage:this.ctaBannerCustomBtn?.properties?.["send-email-dialog-toast-success-message"],toastFailureMessage:this.ctaBannerCustomBtn?.properties?.["send-email-dialog-toast-failure-message"],emailType:f[this.ctaBannerCustomBtn?.properties?.["email-type"]]}):this.userService.openAfterLogin(this.OPEN_SEND_EMAIL)})}requestCollection(){this.userService.isUserLoggedIn().subscribe(e=>{e?this.openSendEmailDialog({title:"Request a Collection",message:"Is there a data collection you need for your research? Tell us about it and we'll add it.",descriptionLabel:"Describe the Collection",descriptionPlaceholder:"E.g. collection name, study name, number of samples, data types, URL",sendEmailBtnText:"Send Request",toastSuccessMessage:"Your request has been sent.",toastFailureMessage:"Unable to send your request at the moment. Please try again later.",emailType:f.REQUEST_COLLECTION}):this.userService.openAfterLogin(this.OPEN_REQUEST_COLLECTION)})}getCollectionCountText(e){return`${e} ${e<=1?"Collection":"Collections"}`}getInputCountText(e){return`${e} ${e<=1?"Input":"Inputs"}`}loadFeaturedCollectionQuestions(){if(this.featuredQuestions.length===0){this.featuredCollectionQuestions.set([]);return}let e=this.featuredQuestions.map(t=>{let[o,x]=this.parseQuestionRef(t);return!o||!x?T(null):this.appSearchService.getQuestions({collectionSlug:o}).pipe(V(Cn=>{let X=Cn.find(hn=>hn.name===x);return X?{question:X,collectionSlug:o}:null}),L(()=>T(null)))});ne(e).subscribe(t=>{this.featuredCollectionQuestions.set(t.filter(o=>o!==null).map(({question:o,collectionSlug:x})=>({id:o.id,name:o.name,description:o.description,routerLink:["/collections",x,"questions",o.id],collectionCount:0,inputCount:o.parameters?.length||0})))})}parseQuestionRef(e){let t=e.split(":");return t.length!==2?[null,null]:[t[0],t[1]]}openSendEmailDialog(e){this.dialog.open(dn,{data:e,id:"send-email-dialog",height:this.isScreenMobile()?"380px":"350px",minHeight:this.isScreenMobile()?"380px":"350px",maxHeight:this.isScreenMobile()?"380px":"350px",width:this.isScreenMobile()?"340px":"720px",maxWidth:this.isScreenMobile()?"340px":"720px"}).afterClosed().subscribe(t=>{t.success?this.toastMessageService.openToast(e.toastSuccessMessage,Y.SUCCESS):t.error&&this.toastMessageService.openToast(e.toastFailureMessage,Y.ERROR)})}processRequestParams(){this.activatedRoute.queryParams.subscribe(e=>{this.OPEN_REQUEST_COLLECTION===e.open?this.requestCollection():this.OPEN_JOIN_NETWORK===e.open&&this.joinNetwork()})}static{this.\u0275fac=(()=>{let e;return function(o){return(e||(e=D(n)))(o||n)}})()}static{this.\u0275cmp=v({type:n,selectors:[["app-collections"]],features:[q],decls:15,vars:8,consts:[[150],["cdkScrollable","",1,"container"],["data-se","hero-banner",1,"hero-banner",3,"appDynamicTemplate"],["data-se","hero-banner",1,"hero-box-container",3,"ngStyle"],[1,"ad-banner",3,"appDynamicTemplate"],[1,"members-carousel-container",3,"appDynamicTemplate"],["data-se","cta-banner",1,"cta-banner",3,"ngStyle"],[1,"hero-banner-inner"],[1,"hero-box"],[1,"landing-message"],["data-se","landing-message",1,"type-h2"],[1,"cta-buttons"],[3,"ngClass"],[3,"routerLink","ngClass"],[1,"empty-div"],[3,"click","ngClass"],[1,"federated-questions-container"],[1,"type-h4","section-title"],[1,"section-content"],[1,"question-card-container",3,"routerLink"],[1,"question-card"],[1,"question-card-header"],[1,"material-symbols-outlined"],["ngxTippy","",1,"question-card-title",3,"ngxTippy","tippyProps"],["appNormalizeParagraphSpacing","",1,"question-description","line-clamp","line-clamp-4",3,"innerHTML"],[1,"question-card-footer"],["id","collection-count-badge",3,"appearance","theme","prefixIcon"],["id","input-count-badge",3,"appearance","theme","prefixIcon"],[3,"isLoading","collections","featuredCollections","maxDisplayedCollections","showFeaturedCollectionsHeader"],[1,"view-all-button"],["data-se","cta-banner-message",1,"type-h3"]],template:function(t,o){if(t&1&&(p(0,"app-layout-header"),r(1,"app-layout-main")(2,"div",1),u(3,kn,1,1,"div",2)(4,qn,12,8,"div",3),u(5,In,1,1,"div",4),u(6,Fn,1,1,"div",5),ae(7,Qn,1,1)(8,Vn,7,1),se(9,7,On,null,8,null,null,0,le),u(11,zn,1,0,"app-no-collections-splash")(12,Jn,2,6),u(13,Wn,6,6,"div",6),p(14,"app-layout-footer"),a()()),t&2){let x;i(3),g(o.heroBannerTemplate()?3:4),i(2),g(o.adTemplate()?5:-1),i(),g(o.membersTemplate()?6:-1),i(3),ce(!o.isLoadingQuestions()),i(2),g(!o.isLoadingCollections()&&!((x=o.collections())!=null&&x.length)?11:12),i(2),g(o.showCtaBanner?13:-1),i(),ue("pin-to-bottom",!o.showCtaBanner)}},dependencies:[on,tn,ve,_e,en,Xe,Ze,he,W,nn,pn,$e,an,mn,Se,$],styles:['[_nghost-%COMP%]{overflow:auto;width:100%;display:grid;grid-template-columns:repeat(10,1fr);grid-template-rows:auto 1fr auto;grid-column-gap:var(--spacing-6)}.container[_ngcontent-%COMP%]{display:flex;flex-direction:column;overflow-y:auto;background-color:var(--lander-background-color);flex-grow:1}.container[_ngcontent-%COMP%] .hero-box-container[_ngcontent-%COMP%]{position:relative;min-height:var(--lander-hero-img-height);padding:var(--spacing-6);display:flex;flex-direction:column;justify-content:center;align-items:center;background:var(--lander-hero-img-background)}.container[_ngcontent-%COMP%] .hero-box-container[_ngcontent-%COMP%] .hero-banner-inner[_ngcontent-%COMP%]{z-index:2;display:flex;flex-direction:row;width:100%;max-width:var(--lander-hero-max-width);margin:var(--spacing-0) auto}.container[_ngcontent-%COMP%] .hero-box-container[_ngcontent-%COMP%] .hero-banner-inner[_ngcontent-%COMP%] .hero-box[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:70%;padding-inline:var(--landing-message-padding-inline);padding-left:var(--landing-message-padding-left);max-width:var(--landing-message-max-width)}.container[_ngcontent-%COMP%] .hero-box-container[_ngcontent-%COMP%] .hero-banner-inner[_ngcontent-%COMP%] .hero-box[_ngcontent-%COMP%] .landing-message[_ngcontent-%COMP%] .type-h2[_ngcontent-%COMP%]{color:var(--lander-font-color);font-family:var(--font-family-heading);font-weight:var(--font-weight-heading, var(--font-weight-bold));font-size:var(--lander-landing-message-font-size);line-height:140%;text-align:left;margin:0 0 25px}.container[_ngcontent-%COMP%] .hero-box-container[_ngcontent-%COMP%] .hero-banner-inner[_ngcontent-%COMP%] .hero-box[_ngcontent-%COMP%] .landing-message[_ngcontent-%COMP%] .cta-buttons[_ngcontent-%COMP%]{display:flex}.container[_ngcontent-%COMP%] .hero-box-container[_ngcontent-%COMP%] .hero-banner-inner[_ngcontent-%COMP%] .hero-box[_ngcontent-%COMP%] .landing-message[_ngcontent-%COMP%] .cta-buttons[_ngcontent-%COMP%] > button[_ngcontent-%COMP%]{margin-right:var(--spacing-2)}.container[_ngcontent-%COMP%] .hero-box-container[_ngcontent-%COMP%] .hero-banner-inner[_ngcontent-%COMP%] .empty-div[_ngcontent-%COMP%]{width:30%}.container[_ngcontent-%COMP%] app-collection-list[_ngcontent-%COMP%]{flex-grow:0}.container[_ngcontent-%COMP%] .pin-to-bottom[_ngcontent-%COMP%]{margin-top:auto}.container[_ngcontent-%COMP%] .view-all-button[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;margin-top:var(--spacing-6);margin-bottom:var(--spacing-12)}.container[_ngcontent-%COMP%] .cta-banner[_ngcontent-%COMP%]{margin-top:auto;min-height:280px;background:var(--lander-cta-banner-background);margin-inline:var(--spacing-6);display:flex;flex-direction:column;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .cta-banner[_ngcontent-%COMP%] .type-h3[_ngcontent-%COMP%]{color:var(--color-white);font-size:var(--lander-cta-banner-message-font-size);margin-top:var(--spacing-0);margin-bottom:var(--spacing-7);margin-inline:var(--spacing-10)}.container[_ngcontent-%COMP%] .cta-banner[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:not(:first-child){margin-left:var(--spacing-4)}[_nghost-%COMP%] app-collection-search-bar{width:85%}[_nghost-%COMP%] app-collection-search-bar .search-box{background-color:var(--lander-search-input-background-color)}.federated-questions-container[_ngcontent-%COMP%]{margin:var(--spacing-6) var(--spacing-6) var(--spacing-0)}.federated-questions-container[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{padding:var(--spacing-1_5) var(--spacing-2_5);margin:0;color:var(--color-ui-1000)}.federated-questions-container[_ngcontent-%COMP%] .section-content[_ngcontent-%COMP%]{flex-grow:1;display:grid;grid-template-columns:repeat(auto-fill,minmax(360px,3fr));align-items:stretch;gap:var(--spacing-6);padding:var(--spacing-6) var(--spacing-0) var(--spacing-0)}@media(max-width:599.98px){.federated-questions-container[_ngcontent-%COMP%] .section-content[_ngcontent-%COMP%]{grid-template-columns:1fr}}.federated-questions-container[_ngcontent-%COMP%] .question-card-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%}.federated-questions-container[_ngcontent-%COMP%] .question-card-container[_ngcontent-%COMP%] ds-ngx-card[_ngcontent-%COMP%]{flex-grow:1;display:flex;flex-direction:column;border-radius:var(--border-radius-base);
1transition:box-shadow cubic-bezier(1,0,0,1) .35s;box-shadow:none}.federated-questions-container[_ngcontent-%COMP%] .question-card-container[_ngcontent-%COMP%] ds-ngx-card[_ngcontent-%COMP%]:hover{box-shadow:var(--shadow-xs)}.federated-questions-container[_ngcontent-%COMP%] .question-card[_ngcontent-%COMP%]{height:100%;width:100%;display:flex;flex-direction:column;cursor:pointer;background:var(--color-white)}.federated-questions-container[_ngcontent-%COMP%] .question-card[_ngcontent-%COMP%] .question-card-header[_ngcontent-%COMP%]{display:flex;align-items:center}.federated-questions-container[_ngcontent-%COMP%] .question-card[_ngcontent-%COMP%] .question-card-header[_ngcontent-%COMP%] .question-card-title[_ngcontent-%COMP%]{flex-grow:1;margin:var(--spacing-0) var(--spacing-2);font-size:var(--font-size-large);font-weight:var(--font-weight-medium);color:var(--color-ui-1000)}.federated-questions-container[_ngcontent-%COMP%] .question-card[_ngcontent-%COMP%] .question-description[_ngcontent-%COMP%]{flex-grow:1;margin:var(--spacing-3) var(--spacing-0);font-size:var(--font-size-base);font-weight:var(--font-weight-regular);color:var(--color-ui-700)}.federated-questions-container[_ngcontent-%COMP%] .question-card[_ngcontent-%COMP%] .question-card-footer[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-3);margin-top:var(--spacing-3)}.federated-questions-container[_ngcontent-%COMP%] .question-card[_ngcontent-%COMP%] .question-card-footer[_ngcontent-%COMP%] .table-count[_ngcontent-%COMP%]{box-sizing:border-box;height:25px}.federated-questions-container[_ngcontent-%COMP%] .question-card[_ngcontent-%COMP%] .question-card-footer[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex;flex-direction:row;align-content:center}.federated-questions-container[_ngcontent-%COMP%] .question-card[_ngcontent-%COMP%] .question-card-footer[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] .browsers-icon[_ngcontent-%COMP%]{height:var(--spacing-5);width:var(--spacing-5)}.federated-questions-container[_ngcontent-%COMP%] .question-card[_ngcontent-%COMP%] .question-card-footer[_ngcontent-%COMP%] > div[_ngcontent-%COMP%] > span[_ngcontent-%COMP%]{line-height:140%;margin-left:var(--spacing-1)}@media only screen and (max-width:767px){[_nghost-%COMP%]{overflow-y:scroll}.container[_ngcontent-%COMP%] .hero-box-container[_ngcontent-%COMP%]{flex-direction:column;background:var(--lander-hero-img-mobile-background)}.container[_ngcontent-%COMP%] .hero-box-container[_ngcontent-%COMP%]:before{position:absolute;display:block;content:"";top:0;left:0;z-index:0;height:100%;width:100%;background:var(--lander-hero-img-mobile-art) var(--lander-hero-img-mobile-background)}.container[_ngcontent-%COMP%] .hero-box-container[_ngcontent-%COMP%]:after{position:absolute;display:block;content:"";top:0;left:0;z-index:1;height:100%;width:100%;background-color:var(--lander-hero-img-overlay)}.container[_ngcontent-%COMP%] .hero-box-container[_ngcontent-%COMP%] .hero-banner-inner[_ngcontent-%COMP%]{flex-direction:column}.container[_ngcontent-%COMP%] .hero-box-container[_ngcontent-%COMP%] .hero-banner-inner[_ngcontent-%COMP%] .hero-box[_ngcontent-%COMP%]{box-sizing:border-box;width:100%;max-width:100%;padding-inline:var(--landing-message-padding-inline-mobile);padding-left:var(--landing-message-padding-left-mobile)}.container[_ngcontent-%COMP%] .hero-box-container[_ngcontent-%COMP%] .hero-banner-inner[_ngcontent-%COMP%] .hero-box[_ngcontent-%COMP%] .landing-message[_ngcontent-%COMP%] .type-h2[_ngcontent-%COMP%]{text-align:center}.container[_ngcontent-%COMP%] .hero-box-container[_ngcontent-%COMP%] .hero-banner-inner[_ngcontent-%COMP%] .hero-box[_ngcontent-%COMP%] .landing-message[_ngcontent-%COMP%] .cta-buttons[_ngcontent-%COMP%]{justify-content:center}.container[_ngcontent-%COMP%] .hero-box-container[_ngcontent-%COMP%] .hero-banner-inner[_ngcontent-%COMP%] .empty-div[_ngcontent-%COMP%]{flex-grow:0}.container[_ngcontent-%COMP%] .cta-banner[_ngcontent-%COMP%]{background:var(--lander-cta-banner-mobile-background)}.container[_ngcontent-%COMP%] .cta-banner[_ngcontent-%COMP%] .type-h3[_ngcontent-%COMP%]{text-align:center}.container[_ngcontent-%COMP%] .cta-banner[_ngcontent-%COMP%] button.accent-btn[_ngcontent-%COMP%]{margin-left:0;margin-top:var(--spacing-4)}.container[_ngcontent-%COMP%] .cta-banner[_ngcontent-%COMP%] > div[_ngcontent-%COMP%]{display:flex;align-items:center;flex-direction:column}}@media only screen and (min-width:768px)and (max-width:1024px){.container[_ngcontent-%COMP%] .hero-box-container[_ngcontent-%COMP%] .hero-banner-inner[_ngcontent-%COMP%] .hero-box[_ngcontent-%COMP%]{padding-inline:var(--landing-message-padding-inline)}}']})}}return n})();export{mo as CollectionsComponent};
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.