1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,9804,e=>{"use strict";var t=e.i(48595);let o=async e=>(await (0,t.apiFetch)("/onemap/common/elastic/search",{params:e})).json(),r=async e=>{let{Timestamp:o,SearchResults:r}=await (await (0,t.apiFetch)("/onemap/moe/queryKindergartens",{params:e})).json();return{Timestamp:o,data:(r||[]).reduce((e,t)=>({...e,[`${t.SCH_POSTAL_CODE}-${t.DIST_CODE}`]:t}),{})}},a=async e=>{let{Timestamp:o,SearchResults:r}=await (await (0,t.apiFetch)("/onemap/moe/querySchools",{params:e})).json();return{Timestamp:o,data:(r||[]).reduce((e,t)=>({...e,[`${t.POSTAL_CODE}-${t.DIST_CODE}`]:t}),{})}},n=async e=>{let{Timestamp:o,SearchResults:r}=await (await (0,t.apiFetch)("/onemap/moe/nearbySecondarySchools",{params:e})).json();return{Timestamp:o,data:(r||[]).reduce((e,t)=>({...e,[t.POSTAL_CODE]:t}),{})}};e.s(["fetchOneMapKindergartenData",0,r,"fetchOneMapSchoolData",0,a,"fetchOneMapSearchData",0,o,"fetchOneMapSecondarySchoolData",0,n])},98499,e=>{"use strict";var t,o,r=e.i(17751),a=((t={}).MOEKindergartens="M",t.PrimarySchools="P",t.SecondarySchools="S",t.PostSecondaryJCSchool="J",t.PolySchool="PO",t.ITESchool="ITE",t.SPEDSchool="SPED",t),n=((o={}).PostingGroup1="POSTING GROUP 1",o.PostingGroup2="POSTING GROUP 2",o.PostingGroup3="POSTING GROUP 3",o.IntergratedProgramme="Integrated Programme",o);r.CollectionNames.mk_school_info,r.CollectionNames.primary_schools,r.CollectionNames.secondary_schools,r.CollectionNames.post_secondary_jc,r.CollectionNames.ite_school_info,r.CollectionNames.poly_school_info,e.s(["PSLETitle",()=>n,"SchoolCode",()=>a])},10171,(e,t,o)=>{"use strict";var r=e.r(53326),a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=r.useState,i=r.useEffect,s=r.useLayoutEffect,c=r.useDebugValue;function l(e){var t=e.getSnapshot;e=e.value;try{var o=t();return!a(e,o)}catch(e){return!0}}var u="u"<typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var o=t(),r=n({inst:{value:o,getSnapshot:t}}),a=r[0].inst,u=r[1];return s(function(){a.value=o,a.getSnapshot=t,l(a)&&u({inst:a})},[e,o,t]),i(function(){return l(a)&&u({inst:a}),e(function(){l(a)&&u({inst:a})})},[e]),c(o),o};o.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},18850,(e,t,o)=>{"use strict";t.exports=e.r(10171)},12788,e=>{"use strict";let t;var o=e.i(53326),r=e.i(18850);e.s(["ERROR_REVALIDATE_EVENT",0,3,"FOCUS_EVENT",0,0,"MUTATE_EVENT",0,2,"RECONNECT_EVENT",0,1],47493);var a=Object.prototype.hasOwnProperty;let n=new WeakMap,i=()=>{},s=i(),c=Object,l=e=>e===s,u=(e,t)=>
1({...e,...t}),_={},d={},f="undefined",m=typeof window!=f,p=typeof document!=f,h=m&&"Deno"in window,y=(e,t)=>{let o=n.get(e);return[()=>!l(t)&&e.get(t)||_,r=>{if(!l(t)){let a=e.get(t);t in d||(d[t]=a),o[5](t,u(a,r),a||_)}},o[6],()=>!l(t)&&t in d?d[t]:!l(t)&&e.get(t)||_]},g=!0,[S,E]=m&&window.addEventListener?[window.addEventListener.bind(window),window.removeEventListener.bind(window)]:[i,i],b={initFocus:e=>(p&&document.addEventListener("visibilitychange",e),S("focus",e),()=>{p&&document.removeEventListener("visibilitychange",e),E("focus",e)}),initReconnect:e=>{let t=()=>{g=!0,e()},o=()=>{g=!1};return S("online",t),S("offline",o),()=>{E("online",t),E("offline",o)}}},v=!o.default.useId,N=!m||h,O=N?o.useEffect:o.useLayoutEffect,j="u">typeof navigator&&navigator.connection,A=!N&&j&&(["slow-2g","2g"].includes(j.effectiveType)||j.saveData),k=new WeakMap,w=(e,t)=>e===`[object ${t}]`,T=0,L=e=>{let t,o,r=typeof e,a=c.prototype.toString.call(e),n=w(a,"Date"),i=w(a,"RegExp"),s=w(a,"Object");if(c(e)!==e||n||i)t=n?e.toJSON():"symbol"==r?e.toString():"string"==r?JSON.stringify(e):""+e;else{if(t=k.get(e))return t;if(t=++T+"~",k.set(e,t),Array.isArray(e)){for(o=0,t="@";o<e.length;o++)t+=L(e[o])+",";k.set(e,t)}if(s){t="#";let r=c.keys(e).sort();for(;!l(o=r.pop());)l(e[o])||(t+=o+":"+L(e[o])+",");k.set(e,t)}}return t},P=e=>{if("function"==typeof e)try{e=e()}catch(t){e=""}let t=e;return[e="string"==typeof e?e:(Array.isArray(e)?e.length:e)?L(e):"",t]},R=0,C=()=>++R;async function D(...e){let[t,o,r,a]=e,i=u({populateCache:!0,throwOnError:!0},"boolean"==typeof a?{revalidate:a}:a||{}),c=i.populateCache,_=i.rollbackOnError,d=i.optimisticData,f=i.throwOnError;if("function"==typeof o){let e=[];for(let r of t.keys())!/^\$(inf|sub)\$/.test(r)&&o(t.get(r)._k)&&e.push(r);return Promise.all(e.map(m))}return m(o);async function m(o){let a,[u]=P(o);if(!u)return;let[m,p]=y(t,u),[h,g,S,E]=n.get(t),b=()=>{let e=h[u];return("function"==typeof i.revalidate?i.revalidate(m().data,o):!1!==i.revalidate)&&(delete S[u],delete E[u],e&&e[0])?e[0](2).then(()=>m().data):m().data};if(e.length<3)return b();let v=r,N=!1,O=C();g[u]=[O,0];let j=!l(d),A=m(),k=A.data,w=A._c,T=l(w)?k:w;if(j&&p({data:d="function"==typeof d?d(T,k):d,_c:T}),"function"==typeof v)try{v=v(T)}catch(e){a=e,N=!0}if(v&&"function"==typeof v.then){let e;if(v=await v.catch(e=>{a=e,N=!0}),O!==g[u][0]){if(N)throw a;return v}N&&j&&(e=a,"function"==typeof _?_(e):!1!==_)&&(c=!0,p({data:T,_c:s}))}if(c&&!N&&("function"==typeof c?p({data:c(v,T),error:s,_c:s}):p({data:v,error:s,_c:s})),g[u][1]=C(),Promise.resolve(b()).then(()=>{p({_c:s})}),N){if(f)throw a;return}return v}}let I=(e,t)=>{for(let o in e)e[o][0]&&e[o][0](t)},B=(e,t)=>{if(!n.has(e)){let o=u(b,t),r=Object.create(null),a=D.bind(s,e),c=i,l=Object.create(null),_=(e,t)=>{let o=l[e]||[];return l[e]=o,o.push(t),()=>{let e=o.indexOf(t);e>=0&&(o[e]=o[o.length-1],o.pop())}},d=(t,o,r)=>{e.set(t,o);let a=l[t];if(a)for(let e of a)e(o,r)},f=()=>{if(!n.has(e)&&(n.set(e,[r,Object.create(null),Object.create(null),Object.create(null),a,d,_]),!N)){let t=o.initFocus(setTimeout.bind(s,I.bind(s,r,0))),a=o.initReconnect(setTimeout.bind(s,I.bind(s,r,1)));c=()=>{t&&t(),a&&a(),n.delete(e)}}};return f(),[e,a,f,c]}return[e,n.get(e)[4]]},[M,V]=B(new Map),G=u({onLoadingSlow:i,onSuccess:i,onError:i,onErrorRetry:(e,t,o,r,a)=>{let n=o.errorRetryCount,i=a.retryCount,s=~~((Math.random()+.5)*(1<<(i<8?i:8)))*o.errorRetryInterval;(l(n)||!(i>n))&&setTimeout(r,s,a)},onDiscarded:i,revalidateOnFocus:!0,revalidateOnReconnect:!0,revalidateIfStale:!0,shouldRetryOnError:!0,errorRetryInterval:A?1e4:5e3,focusThrottleInterval:5e3,dedupingInterval:2e3,loadingTimeout:A?5e3:3e3,compare:function e(t,o){var r,n;if(t===o)return!0;if(t&&o&&(r=t.constructor)===o.constructor){if(r===Date)return t.getTime()===o.getTime();if(r===RegExp)return t.toString()===o.toString();if(r===Array){if((n=t.length)===o.length)for(;n--&&e(t[n],o[n]););return -1===n}if(!r||"object"==typeof t){for(r in n=0,t)if(a.call(t,r)&&++n&&!a.call(o,r)||!(r in o)||!e(t[r],o[r]))return!1;return Object.keys(o).length===n}}return t!=t&&o!=o},isPaused:()=>!1,cache:M,mutate:V,fallback:{}},{isOnline:()=>g,isVisible:()=>{let e=p&&document.visibilityState;
1return l(e)||"hidden"!==e}}),F=(e,t)=>{let o=u(e,t);if(t){let{use:r,fallback:a}=e,{use:n,fallback:i}=t;r&&n&&(o.use=r.concat(n)),a&&i&&(o.fallback=u(a,i))}return o},K=(0,o.createContext)({});var $=e.i(47493);let Y=m&&window.__SWR_DEVTOOLS_USE__,x=(Y?window.__SWR_DEVTOOLS_USE__:[]).concat(e=>(t,o,r)=>{let a=o&&((...e)=>{let[r]=P(t),[,,,a]=n.get(M);if(r.startsWith("$inf$"))return o(...e);let i=a[r];return l(i)?o(...e):(delete a[r],i)});return e(t,a,r)});Y&&(window.__SWR_DEVTOOLS_REACT__=o.default);let U=()=>{},W=U(),H=(new WeakMap,o.default.use||(e=>{switch(e.status){case"pending":throw e;case"fulfilled":return e.value;case"rejected":throw e.reason;default:throw e.status="pending",e.then(t=>{e.status="fulfilled",e.value=t},t=>{e.status="rejected",e.reason=t}),e}})),J={dedupe:!0},q=Promise.resolve(s);q.status="fulfilled",q.value=s;let z=()=>i;c.defineProperty(e=>{let{value:t}=e,r=(0,o.useContext)(K),a="function"==typeof t,n=(0,o.useMemo)(()=>a?t(r):t,[a,r,t]),i=(0,o.useMemo)(()=>a?n:F(r,n),[a,r,n]),c=n&&n.provider,l=(0,o.useRef)(s);c&&!l.current&&(l.current=B(c(i.cache||M),n));let _=l.current;return _&&(i.cache=_[0],i.mutate=_[1]),O(()=>{if(_)return _[2]&&_[2](),_[3]},[]),(0,o.createElement)(K.Provider,u(e,{value:i}))},"defaultValue",{value:G});let Q=(t=(e,t,a)=>{let{cache:i,compare:c,suspense:_,fallbackData:d,revalidateOnMount:p,revalidateIfStale:h,refreshInterval:g,refreshWhenHidden:S,refreshWhenOffline:E,keepPreviousData:b,strictServerPrefetchWarning:j}=a,[A,k,w,T]=n.get(i),[L,R]=P(e),I=(0,o.useRef)(!1),B=(0,o.useRef)(!1),M=(0,o.useRef)(L),V=(0,o.useRef)(t),G=(0,o.useRef)(a),F=()=>G.current.isVisible()&&G.current.isOnline(),[K,Y,x,U]=y(i,L),W=(0,o.useRef)({}).current,Q=l(d)?l(a.fallback)?s:a.fallback[L]:d,X=(e,t)=>{for(let o in W)if("data"===o){if(!c(e[o],t[o])&&(!l(e[o])||!c(es,t[o])))return!1}else if(t[o]!==e[o])return!1;return!0},Z=!I.current,ee=(0,o.useMemo)(()=>{let e=K(),o=U(),r=e=>{let o=u(e);return(delete o._k,(()=>{if(!L||!t||G.current.isPaused())return!1;if(Z&&!l(p))return p;let e=l(Q)?o.data:Q;return l(e)||h})())?{isValidating:!0,isLoading:!0,...o}:o},a=r(e),n=e===o?a:r(o),i=a;return[()=>{let e=r(K());return X(e,i)?(i.data=e.data,i.isLoading=e.isLoading,i.isValidating=e.isValidating,i.error=e.error,i):(i=e,e)},()=>n]},[i,L]),et=(0,r.useSyncExternalStore)((0,o.useCallback)(e=>x(L,(t,o)=>{X(o,t)||e()}),[i,L]),ee[0],ee[1]),eo=A[L]&&A[L].length>0,er=et.data,ea=l(er)?Q&&"function"==typeof Q.then?H(Q):Q:er,en=et.error,ei=(0,o.useRef)(ea),es=b?l(er)?l(ei.current)?ea:ei.current:er:ea,ec=L&&l(ea),el=(0,o.useRef)(null);N||(0,r.useSyncExternalStore)(z,()=>(el.current=!1,el),()=>(el.current=!0,el));let eu=el.current;j&&eu&&!_&&ec&&console.warn(`Missing pre-initiated data for serialized key "${L}" during server-side rendering. Data fetching should be initiated on the server and provided to SWR via fallback data. You can set "strictServerPrefetchWarning: false" to disable this warning.`);let e_=!(!L||!t||G.current.isPaused())&&(!eo||!!l(en))&&(Z&&!l(p)?p:_?!l(ea)&&h:l(ea)||h),ed=Z&&e_,ef=l(et.isValidating)?ed:et.isValidating,em=l(et.isLoading)?ed:et.isLoading,ep=(0,o.useCallback)(async e=>{let t,o,r=V.current;if(!L||!r||B.current||G.current.isPaused())return!1;let n=!0,i=e||{},u=!w[L]||!i.dedupe,_=()=>v?!B.current&&L===M.current&&I.current:L===M.current,d={isValidating:!1,isLoading:!1},f=()=>{Y(d)},m=()=>{let e=w[L];e&&e[1]===o&&delete w[L]},p={isValidating:!0};l(K().data)&&(p.isLoading=!0);try{if(u&&(Y(p),a.loadingTimeout&&l(K().data)&&setTimeout(()=>{n&&_()&&G.current.onLoadingSlow(L,a)},a.loadingTimeout),w[L]=[r(R),C()]),[t,o]=w[L],t=await t,u&&setTimeout(m,a.dedupingInterval),!w[L]||w[L][1]!==o)return u&&_()&&G.current.onDiscarded(L),!1;d.error=s;let e=k[L];if(!l(e)&&(o<=e[0]||o<=e[1]||0===e[1]))return f(),u&&_()&&G.current.onDiscarded(L),!1;let i=K().data;d.data=c(i,t)?i:t,u&&_()&&G.current.onSuccess(t,L,a)}catch(o){m();let e=G.current,{shouldRetryOnError:t}=e;!e.isPaused()&&(d.error=o,u&&_())&&(e.onError(o,L,e),(!0===t||"function"==typeof t&&t(o))&&(!G.current.revalidateOnFocus||!G.current.revalidateOnReconnect||F())&&e.onErrorRetry(o,L,e,e=>{let t=A[L];t&&t[0]&&t[0]($.ERROR_REVALIDATE_EVENT,e)},{retryCount:(i.retryCount||0)+1,dedupe:!0}))}return n=!1,f(),!0},[L,i]),eh=(0,o.useCallback)((...e)=>D(i,M.current,...e),[]);if(O(()=>{V.current=t,G.current=a,l(er)||(ei.current=er)}),O(()=>{var e;let t;if(!L)return;let o=ep.bind(s,J),r=0;G.current.revalidateOnFocus&&(r=Date.now()+G.current.focusThrottleInterval);let a=(e=(e,t={})=>
1{if(e==$.FOCUS_EVENT){let e=Date.now();G.current.revalidateOnFocus&&e>r&&F()&&(r=e+G.current.focusThrottleInterval,o())}else if(e==$.RECONNECT_EVENT)G.current.revalidateOnReconnect&&F()&&o();else if(e==$.MUTATE_EVENT)return ep();else if(e==$.ERROR_REVALIDATE_EVENT)return ep(t)},(t=A[L]||(A[L]=[])).push(e),()=>{let o=t.indexOf(e);o>=0&&(t[o]=t[t.length-1],t.pop())});if(B.current=!1,M.current=L,I.current=!0,Y({_k:R}),e_&&!w[L])if(l(ea)||N)o();else m&&typeof window.requestAnimationFrame!=f?window.requestAnimationFrame(o):setTimeout(o,1);return()=>{B.current=!0,a()}},[L]),O(()=>{let e;function t(){let t="function"==typeof g?g(K().data):g;t&&-1!==e&&(e=setTimeout(o,t))}function o(){!K().error&&(S||G.current.isVisible())&&(E||G.current.isOnline())?ep(J).then(t):t()}return t(),()=>{e&&(clearTimeout(e),e=-1)}},[g,S,E,L]),(0,o.useDebugValue)(es),_){if(!v&&N&&ec)throw Error("Fallback data is required when using Suspense in SSR.");ec&&(V.current=t,G.current=a,B.current=!1);let e=T[L];if(H(!l(e)&&ec?eh(e):q),!l(en)&&ec)throw en;let o=ec?ep(J):q;!l(es)&&ec&&(o.status="fulfilled",o.value=!0),H(o)}return{mutate:eh,get data(){return W.data=!0,es},get error(){return W.error=!0,en},get isValidating(){return W.isValidating=!0,ef},get isLoading(){return W.isLoading=!0,em}}},function(...e){let r,a=(r=(0,o.useContext)(K),(0,o.useMemo)(()=>u(G,r),[r])),[n,i,s]="function"==typeof e[1]?[e[0],e[1],e[2]||{}]:[e[0],null,(null===e[1]?e[2]:e[1])||{}],c=F(a,s),l=t,{use:_}=c,d=(_||[]).concat(x);for(let e=d.length;e--;)l=d[e](l);return l(n,i||c.fetcher||null,c)});e.s(["default",0,Q],12788)},30696,e=>{"use strict";e.s(["ADMISSION_DSA_LABEL",()=>r,"ADMISSION_IP_LABEL",()=>a,"GROUP_ALL_LABEL",()=>o,"NO_LABEL",()=>i,"SCHOOL_OTHER_GIFTED_LABEL",()=>c,"SCHOOL_OTHER_IP_LABEL",()=>l,"YES_LABEL",()=>n,"YES_NO_OPTIONS",()=>s,"defaultSchoolFinderFilter",()=>u,"preprocessSchoolMappings",()=>_,"processedFilterMappings",()=>d]);var t=e.i(28408);let o="All categories",r="Direct School Admission (DSA)",a="Integrated programme",n="Yes",i="No",s=[n,i],c="Gifted Education Programme",l="Integrated Programme",u={reset_timestamps:0,keyword:"",suggested:!1,address:null,postal_code:null,distance:null,area:null,partner_eyc:[],special_needs_support:[],cca_category:null,cca:[],mtl:[],elective_category:null,elective:[],gender:[],affiliation:null,autonomous:null,sap:null,school_type:[],special_programme:[],admission_type:[],dsa_category:null,dsa:[],subject:[],psle_score:[0,0]},_=[{key:"_areas",getNames:e=>[(0,t.getSchoolAreaName)(e)]},{key:"_ccaGroups",getNames:t.getSchoolCcaGroupNames},{key:"_ccas",getNames:t.getSchoolCcaNames},{key:"_mtls",getNames:t.getSchoolMtlNames},{key:"_electiveProgrames",getNames:t.getSchoolElectiveProgrammeNames},{key:"_specialNeeds",getNames:t.getSchoolSpecialNeedNames},{key:"_natures",getNames:t.getSchoolNatureNames},{key:"_affiliations",getNames:e=>[(0,t.getSchoolAffiliationName)(e)]},{key:"_autonomous",getNames:e=>[(0,t.getSchoolAutonomousName)(e)]},{key:"_saps",getNames:e=>[(0,t.getSchoolSapName)(e)]},{key:"_schoolTypes",getNames:t.getSchoolTypeNames},{key:"_schoolOthers",getNames:t.getSchoolOtherNames},{key:"_subjects",getNames:t.getSchoolSubjectNames},{key:"_dsaAreaGroups",getNames:t.getSchoolDsaAreaGroupNames},{key:"_dsaAreas",getNames:t.getSchoolDsaAreaNames},{key:"_eycs",getNames:t.getMkSchoolEycNames}],d=[{key:"_areas",setKey:"area"},{key:"_ccaGroups"},{key:"_ccas",setKey:"cca"},{key:"_mtls",setKey:"mtl"},{key:"_electiveProgrames",setKey:"elective"},{key:"_specialNeeds",setKey:"special_needs_support"},{key:"_natures",setKey:"gender"},{key:"_affiliations",setKey:"affiliation"},{key:"_autonomous",setKey:"autonomous"},{key:"_saps",setKey:"sap"},{key:"_schoolTypes",setKey:"school_type"},{key:"_schoolOthers"},{key:"_subjects",setKey:"subject"},{key:"_dsaAreaGroups"},{key:"_dsaAreas",setKey:"dsa"},{key:"_eycs",setKey:"partner_eyc"}]},28408,e=>{"use strict";e.s(["getGroupElectiveProgrammeNames",()=>d,"getMkSchoolEycNames",()=>E,"getSchoolAffiliationName",()=>N,"getSchoolAreaName",()=>a,"getSchoolAutonomousName",()=>O,"getSchoolCcaGroupName",()=>n,"getSchoolCcaGroupNames",()=>i,"getSchoolCcaNames",()=>c,"getSchoolDetail",()=>k,"getSchoolDsaAreaGroupName",()=>y,"getSchoolDsaAreaGroupNames",()=>g,"getSchoolDsaAreaNames",()=>S,"getSchoolElectiveProgrammeNames",()=>_,"getSchoolJaes",()=>b,"getSchoolMtlNames",()=>l,"getSchoolNatureNames",()=>m,"getSchoolOtherNames",()=>A,"getSchoolPsleScores",()=>v,"getSchoolSapName",()=>j,"getSchoolSpecialNeedNames",()=>f,"getSchoolSubjectNames",()=>h,"getSchoolTypeNames",()=>p]);var t=e.i(75157),o=e.i(30696);let r={B:"Boys",G:"Girls",M:"Girls and Boys"};function a({school_area:e}){let t;return e&&"object"==typeof e?("name"in e&&(t=e.name),"icode_description"in e&&(t=e.icode_description)):t=e,t||""}function n(e){if("object"!=typeof e)return e;let t=e?.moe_school_cca_group;return"object"!=typeof t?t:t?.cca_grouping_desc}function i({cca_activities:e}){return Array.isArray(e)?e.map(e=>"object"==typeof e&&n("moe_school_cca_id"in e?e.moe_school_cca_id:e)||"").filter(
1Boolean):[].concat(n(e?.moe_school_cca_id)||[])}function s(e){if("object"!=typeof e)return e;let t=e?.cca_generic_name;if(!t)return t;let o=e.cca_gender?r[e.cca_gender]:null;return o?`${t} (${o})`:t}function c({cca_activities:e}){return Array.isArray(e)?e.map(e=>"object"==typeof e&&s("moe_school_cca_id"in e?e.moe_school_cca_id:e)||"").filter(Boolean):[].concat(s(e?.moe_school_cca_id)||[]).concat(s(e?.Moe_School_CCA_PolyIte_id)||[])}function l({mother_tongue_language:e}){return Array.isArray(e)?e.map(e=>{var t;return"object"==typeof e&&("object"!=typeof(t=e.moe_school_mtl_id)?t:t?.name)||""}).filter(Boolean):[]}function u(e){return"object"!=typeof e?[]:[e?.alp_title||"",e?.llp1_title||"",e?.llp2_title||""].filter(Boolean)}function _({school_distinctive_programmes:e,elective_programmes:t}){return[...u(e),...t?.map(e=>{var t;return"object"==typeof e&&("object"!=typeof(t=e?.moe_elective_programme_id)?t:t?.programme_name)||""})||[]].filter(Boolean)}function d(e){return e?.sdp_items?.flatMap(e=>"object"==typeof e?u(e.moe_school_info_sdp_id):[])||[]}function f({special_needs:e,special_needs_facilities:t}){return[...e||[],...t||[]].map(e=>{var t;return"object"==typeof e&&("object"!=typeof(t=e.moe_school_special_needs_id)?t:t?.special_need_display)||""}).filter(Boolean)}function m({nature:e}){return["object"==typeof e&&e?.school_nature_sub_name||""].filter(Boolean)}function p({school_type:e}){return["object"==typeof e&&e?.school_type_name||""].filter(Boolean)}function h({subjects:e}){return Array.isArray(e)?e.map(e=>{var t;return"object"==typeof e&&("object"!=typeof(t=e.moe_school_subject_id)?t:t?.subject_description)||""}).filter(Boolean):[]}function y(e){if("object"!=typeof e)return e;let t=e?.dsa_main_category;return"object"!=typeof t?t:t?.dsa_main_category_name}function g({dsa_offered:e}){return Array.isArray(e)?e.map(e=>"object"==typeof e&&y(e.item)||"").filter(Boolean):[]}function S({dsa_offered:e}){return Array.isArray(e)?e.map(e=>"object"==typeof e&&function(e){if("object"!=typeof e)return e;if(!e)return"";if("dsa_talent_area"in e){let t=e?.dsa_talent_area;if(!t)return t;let o="Y"===e.boys,a="Y"===e.girls,n=r[o&&a?"M":o?"B":a?"G":""];return[n?`${t} (${n})`:t,"Y"===e.ip?"IP":""].filter(Boolean).join(" - ")}if("talent_area_value"in e){let t=e?.talent_area_value;if(!t)return t;let o="Y"===e.talent_area_boys,a="Y"===e.talent_area_girls,n=r[o&&a?"M":o?"B":a?"G":""];return[n?`${t} (${n})`:t].filter(Boolean).join(" - ")}return""}(e.item)||"").filter(Boolean).sort((e,t)=>e.localeCompare(t)):[]}function E({partner_early_year_centre:e}){return Array.isArray(e)?e.map(e=>"object"==typeof e&&function(e){return"object"!=typeof e?e:e?.name.split("@")[0].trim()}(e.mk_school_eyc_id)||"").filter(Boolean):[]}function b(e=[],t){return Object.entries(e.map(e=>"object"==typeof e?e:null).map(e=>"object"==typeof e?.moe_school_jae_id?e.moe_school_jae_id:null).reduce((e,o)=>{let r=o?`${t||""} JAE ${o.group}`:null;return{...e,...r?{[r]:(e[r]||[]).concat(o)}:{}}},{}))}function v({psle:e}){let t=e=>"string"!=typeof e?[e]:e.includes(",")?e.split(",").map(e=>e.trim()):[e],o=(e,{isUpper:t=!1}={})=>{if("string"==typeof e){let o=e.trim(),r=o.match(/-?\d+(?:\.\d+)?/);if(r)return t&&o.endsWith("*")?1/0:Number(r[0])}return Number(e)};return e?.map(e=>"object"==typeof e?e:null).map(e=>"object"==typeof e?.moe_school_info_psle_id?e.moe_school_info_psle_id:null).flatMap(e=>{let r=t(e?.lower),a=t(e?.upper);return Array.from({length:Math.min(r.length,a.length)},(e,t)=>[o(r[t]),o(a[t],{isUpper:!0})])}).filter(([e,t])=>e<=t)}function N({affiliated_school:e}){return e?.length?o.YES_LABEL:o.NO_LABEL}function O({autonomous_school:e}){return"Y"===e?o.YES_LABEL:o.NO_LABEL}function j({sap_school:e}){return"Y"===e?o.YES_LABEL:o.NO_LABEL}function A({gifted_school:e,ip_school:t}){let r=[];return"Y"===e&&r.push(o.SCHOOL_OTHER_GIFTED_LABEL),"Y"===t&&r.push(o.SCHOOL_OTHER_IP_LABEL),r}function k(e){return(0,t.pickKeys)(e,["id","school_name","school_logo","school_code","school_address","school_address_url","school_address_postal_code","school_address_blk_no","date_updated","date_created","relocation_note","gifted_school","sap_school","temp_ind","autonomous_school","school_telephone_no","school_telephone_number","school_email_address","school_email","school_website_url","remarks_permanent","conditional_message","psle_additional_message","subjects_additional_message","electives_programmes_additional_message","dsa_additional_message","dsa_jc_additional_message","cca_additional_message","special_needs_additional_message","mainlevel_code.code","mainlevel_code.breadcrumbs_n
1ame","mainlevel_code.url","nature.school_nature_name","school_type.school_type_name","school_area.name","school_area.icode_description","school_mode.school_session_name","school_status.school_status_name","school_operating_hour.mk_school_operating_hour_id.name","school_operating_hour.mk_school_operating_hour_id.description","school_programmes_available.mk_school_programme_id.name","locate_within.primary_schools_id.school_name","school_jae.moe_school_jae_id.stream","school_jae.moe_school_jae_id.code","school_jae.moe_school_jae_id.lower","school_jae.moe_school_jae_id.upper","psle.moe_school_info_psle_id.ip_ind","psle.moe_school_info_psle_id.course","psle.moe_school_info_psle_id.indicator","psle.moe_school_info_psle_id.lower","psle.moe_school_info_psle_id.upper","subjects.moe_school_subject_id.subject_description","school_distinctive_programmes.alp_title","school_distinctive_programmes.domain1_alp","school_distinctive_programmes.llp1_title","school_distinctive_programmes.domain1_llp1","elective_programmes.moe_elective_programme_id.programme_name","dsa_offered.item.dsa_talent_area","dsa_offered.item.boys","dsa_offered.item.girls","cca_activities.moe_school_cca_id.cca_generic_name","cca_activities.moe_school_cca_id.cca_gender","cca_activities.Moe_School_CCA_PolyIte_id.cca_generic_name","cca_activities.Moe_School_CCA_PolyIte_id.cca_gender","special_needs.moe_school_special_needs_id.special_need_display","special_needs_facilities.moe_school_special_needs_id.special_need_display","affiliated_school.item.school_name","partner_early_year_centre.mk_school_eyc_id.name","partner_early_year_centre.mk_school_eyc_id.telephone_number","partner_early_year_centre.mk_school_eyc_id.address","partner_early_year_centre.mk_school_eyc_id.postal_code"])}}]);
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.