PageSourceSearch

https://assets-thesaurus.ie.edu/pro-ie-edu/template---src-EpicAwardList-b00397a183b6a1612a21.js

js ie.edu collected 2026-10-01 08:48:05 UTC 8,249 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_griddo_cx=self.webpackChunk_griddo_cx||[]).push([[5939],{8096:function(e,t,l){l.r(t);var n=l(18134),a=l(26322),o=l(70278),s=l(37447),i=l(32356),r=l(74904),u=l(94584),d=l(60218),c=l(47988),m=l(73991),f=l(37411);const{Module:p}=s.A,g={unitsFilter:"UNIT",schoolsFilter:"SCHOOLS",pathwaysFilter:"PATHWAYS",subpathwaysExecutiveFilter:"SUBPATHWAYS_EXECUTIVE",programsFilter:"PROGRAMS",awardCategoryFilter:"AWARD_CATEGORY",classificationFilter:"CLASSIFICATION_TYPE",yearFilter:"YEAR"},h=!0;t.default=e=>{var t,l,E,b,y;const{heroSection:v,titleContent:A,subtitleContent:S,detailContent:w,additionalContent:C,relatedContent:L,data:O,templateOptions:T,unitsLabel:x,schoolsLabel:I,pathwaysLabel:R,subpathwaysExecutiveLabel:P,programsLabel:j,awardsCategoriesLabel:_,classificationTypeLabel:N,yearLabel:k,searchbarPlaceholder:B,linkText:F,filtersType:U}=e,Y=e.itemsPerPage,{getNestedTranslation:M}=(0,i.s9)(),H=M("filters.noResultsTextLists","Can’t find what you need? Try refining your search."),W=(0,a.useRef)(null),q=a.useRef(null),D={titleContent:A,subtitleContent:S,detailContent:w,additionalContent:C},G="undefined"!=typeof window&&(null===(t=window)||void 0===t||null===(l=t.location)||void 0===l?void 0:l.search),$=new URLSearchParams(G),X=(()=>{let e=1;if("undefined"!=typeof window){const t=$.get("page");t&&(e=t)}return e})(),{0:J,1:V}=(0,a.useState)(X),{0:Q,1:z}=(0,a.useState)([]),{0:K,1:Z}=(0,a.useState)([]),{0:ee,1:te}=(0,a.useState)(""),[le,ne]=a.useState({}),[ae,oe]=a.useState(null),[se,ie]=a.useState(null),[{query:re,isLoading:ue,isError:de,msg:ce},me]=(0,i.UH)(),[{query:fe,isLoading:pe,isError:ge,msg:he},Ee]=(0,i.jA)(),[{query:be,isLoading:ye},ve]=(0,i.jA)(),Ae={UNIT:x,SCHOOLS:I,PATHWAYS:R,SUBPATHWAYS_EXECUTIVE:P,PROGRAMS:j,AWARD_CATEGORY:_,CLASSIFICATION_TYPE:N,YEAR:k},Se=e=>{const t=new Set,l=e=>{if(e)if("number"!=typeof e){if("string"==typeof e){const l=parseInt(e);return void(isNaN(l)||l.toString()!==e||t.add(l))}if(Array.isArray(e))e.forEach(e=>l(e));else if("object"==typeof e){const n=e;if(void 0!==n.id){const e="string"==typeof n.id?parseInt(n.id):n.id;isNaN(e)||t.add(e)}Object.values(n).forEach(e=>l(e))}}else t.add(e)};return l(e),Array.from(t)},we=(e,t,l)=>{if(!e)return[];let a=(0,n.A)(e);if(l&&(a=a.filter(e=>Object.values(e).filter(e=>"string"==typeof e).map(e=>e.toLowerCase()).some(e=>e.includes(l.toLowerCase())))),t&&t.length>0&&le){const e={};Object.keys(le).forEach(l=>{var n;const a=l;e[a]=[],null===(n=le[l].items)||void 0===n||n.forEach(l=>{const n="string"==typeof l.id?parseInt(l.id):l.id;t.map(e=>"string"==typeof e?parseInt(e):e).includes(n)&&e[a].push(n)}),0===e[a].length&&delete e[a]}),a=a.filter(t=>Object.entries(e).map(([e,l])=>{const n=Se(t);return l.some(e=>n.includes(e))}).every(e=>!0===e))}return a},Ce=a.useMemo(()=>{const e="manual"===O.mode?ae:se,t=we(e,K,ee);return Math.max(1,Math.ceil(t.length/Y))},[O.mode,ae,se,K,ee,Y]);(0,a.useEffect)(()=>{ve({data:{...O,related:[],allLanguages:O.allLanguages,order:"title-asc"}}),void 0!==typeof window&&window.scrollTo({top:0,left:0,behavior:"smooth"})},[]);const Le=()=>{const e="manual"===O.mode?ae:se;if((null==e?void 0:e.length)>0&&fe&&Object.keys(fe).length>0){const t=new Set;e.forEach(e=>{Se(e).forEach(e=>t.add(e))});const l={};Object.keys(fe).forEach(e=>{var n;const a=fe[e],o=null===(n=a.items)||void 0===n?void 0:n.filter(e=>{const l="string"==typeof e.id?parseInt(e.id):e.id;return t.has(l)});o&&o.length>0&&(l[e]={...a,items:o})}),ne(l)}else fe&&ne(fe)};(0,a.useEffect)(()=>{if(!ye&&be&&"auto"===O.mode){const e={data:{...O,sources:O.sources?O.sources.map(e=>({...e,filters:(0,m._j)([],e.filters,be)})):null},items:999,page:1,relations:h};me(e)}},[O,be,O.mode]),a.useEffect(()=>{"manual"===O.mode&&be&&(()=>{if(O&&"manual"===O.mode){const e={data:{...O,sources:O.sources?O.sources.map(e=>{const t=e.filters&&Array.isArray(e.filters)?e.filters.map(e=>"number"==typeof e?{id:e,label:""}:e):[];return{...e,filters:(0,m._j)([],t,be)}}):null},items:void 0,relations:h};me(e)}})()},[O,be]);(0,a.useEffect)(()=>{var e;const t=[];O.sources&&O.sources.map(e=>{if(e.filters){e.filters.map(e=>t.push(e.id))}}),Ee({data:{...O,sources:null!=O&&O.sources?null==O||null===(e=O.sources)||void 0===e?void 0:e.map(e=>({...e,filterOperator:"OR",globalOperator:e.globalOperator||"AND"})):null,allLanguages:O.allLanguages,related:t,order:"title-asc"},groupingCategories:!0}),Le()},[O]),(0,a.useEffect)(()=>{Le()},[fe,ae,se]),(0,a.useEffect)(()=>{"undefined"!=typeof window&&($.set("page",String(J)),window.history.replaceState({},"",`${window.location.pathname}?${$}`))},[J]),(0,i.pX)(J,[q,W]),a.useEffect(()=>{de&&ce&&console.error(JSON.stringify(ce,null,2)),"manual"!==O.mode&&ge&&he&&console.error(JSON.stringify(he,null,2))},[de,ge]),(0,a.useEffect)(()=>{T&&z(T.map(e=>g[e]||e))},[null==T?void 0:T.length]),(0,a.useEffect)(()=>{var e;null!=re&&null!==(e=re.items)&&void 0!==e&&e.length&&("manual"===O.mode?oe(re.items):ie(re.items))},[re,O.mode]),(0,a.useEffect)(()=>{const e=Math.max(1,Math.ceil((null==re?void 0:re.totalItems)/Y));J>e&&V(e)},[null==re?void 0:re.totalItems,Y,J]),a.useEffect(()=>{oe(null),ie(null),Z([]),te(""),V(1)},[null==O?void 0:O.mode]);const Oe=a.useMemo(()=>{const e="manual"===O.mode?ae:se,t=we(e,K,ee);if(t){const e=(J-1)*Y,l=e+Y;return t.slice(e,l)}return[]},[ae,se,K,ee,J,Y,O.mode,le]);return a.createElement(d.A,null,a.createElement(o.Box,{bg:"ui02",id:"EpicAwardList_Hero"},null==v?void 0:v.modules.map((e,t)=>a.createElement(s.B,Object.assign({},e,{key:t,altbg:!0})))),D&&a.createElement(s.B,{component:"IntroTextCard",title:D.titleContent,subtitle:D.subtitleContent,detail
1:D.detailContent,card:D.additionalContent,layout:"L004",theme:"defaultAlt",pt:"xs",pb:"m"}),(null==Q?void 0:Q.length)>0&&!ge&&!pe&&le&&a.createElement(o.Box,{bg:"ui02",ref:q},a.createElement(u.A,null,a.createElement(c.default,{showSearchBar:Q.includes("searchbar"),searchbarPlaceholder:B,filters:Q.filter(e=>{var t,l;return"searchbar"!==e&&(null===(t=le[e])||void 0===t||null===(l=t.items)||void 0===l?void 0:l.length)}),options:le,labels:Ae,onFiltersUpdate:e=>(e=>{e.filter(e=>!K.includes(e)).concat(K.filter(t=>!e.includes(t))).length&&(Z(e),V(1))})(e),onSearchUpdate:e=>(e=>{ee!==e&&(te(e),V(1))})(e),resetPagination:e=>e&&V(1),addAllOption:!0,filtersType:U,results:"manual"===O.mode&&ae||"auto"===O.mode&&se?we(ae||se,K,ee).length:(null==re?void 0:re.totalItems)||0,initialSelected:()=>(()=>{const e={};for(const[t,l]of $)if("page"!==t&&"QUERY"!==t&&be){const t=l.split(",").map(e=>Number(e.trim()));Object.keys(be).forEach(l=>{var n;if(null!==(n=be[l])&&void 0!==n&&n.items){const n=be[l].items.filter(e=>t.includes("string"==typeof e.id?parseInt(e.id):e.id));n&&n.length&&(e[l]=n)}})}return e})()}))),!ue&&!ye&&"global"!==O.site&&(null!=re&&null!==(E=re.items)&&void 0!==E&&E.length||null!=ae&&ae.length||null!=se&&se.length)&&null!=K&&K.length?a.createElement(p,{bg:"ui02",pb:"s",pt:"xxs"},a.createElement(o.Text,{color:"text01",textStyle:"subtitle01","aria-live":"polite"},`${M("templates.results","Results")}: ${"manual"===O.mode&&ae||"auto"===O.mode&&se?we(ae||se,K,ee).length:(null==re?void 0:re.totalItems)||0}`)):null,!de&&!ue&&!ye&&("manual"===(null==O?void 0:O.mode)&&ae&&we(ae,K,ee).length>0||"auto"===(null==O?void 0:O.mode)&&se&&we(se,K,ee).length>0||!ae&&!se&&!(null==re||null===(b=re.items)||void 0===b||!b.length))&&a.createElement(o.Box,{ref:W,id:"EpicAwardList_EpicAwardsDistributor"},a.createElement(s.B,{component:"EpicAwardsDistributor",title:null,subtitle:null,queriedItems:Oe,isTemplate:!0,linkText:F,theme:"defaultAlt"})),!ue&&!ye&&("manual"===O.mode&&ae&&0===we(ae,K,ee).length||"auto"===O.mode&&se&&0===we(se,K,ee).length||!ae&&!se&&!(null!=re&&null!==(y=re.items)&&void 0!==y&&y.length))&&a.createElement(o.Box,{bg:"ui02"},a.createElement(u.A,{py:"m"},a.createElement(o.Text,{color:"text01",textStyle:"quote"},H))),(ue||ye)&&a.createElement(o.Flex,{justifyContent:"center",width:"100%",bg:"ui02",py:"s"},a.createElement(f.A,null)),!de&&Ce>1&&J&&a.createElement(r.default,{totalPages:Ce,activePage:J,onSetPage:V,disabled:ue||ye}),a.createElement(o.Box,{id:"EpicAwardList_RelatedContent"},null==L?void 0:L.modules.map((e,t)=>a.createElement(s.B,Object.assign({},e,{key:t})))))}}}]);

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.