1import{d}from"./D_Mx_0Uk.js";function v(t){var c,u,m,i,l,_,y;if(!t||typeof t!="object")return null;const e=t,s=a(e.year);if(!s)return null;const o=e.published!==!1,n=g((c=e.records)!=null?c:e.list),r=(u=e.summary)!=null?u:{};return{year:s,requested_year:a(e.requested_year),published:o,notice:typeof e.notice=="string"&&e.notice.trim()?e.notice:void 0,updated_at:typeof e.updated_at=="string"?e.updated_at:void 0,source:typeof e.source=="string"?e.source:void 0,summary:{subject_count:(i=(m=a(r.subject_count))!=null?m:n.length)!=null?i:void 0,major_count:(l=a(r.major_count))!=null?l:void 0,college_count:(_=a(r.college_count))!=null?_:void 0},hot_majors:j(e,n),by_subject:f(e.by_subject),records:n,trend_map:b(e.trend_map),record_count:(y=a(e.records_count))!=null?y:void 0}}function j(t,e){const s=t.hot_majors;return Array.isArray(s)&&s.length?s.map(o=>{var r,c;const n=o;return{major_code:String((r=n.major_code)!=null?r:""),major_name:String((c=n.major_name)!=null?c:""),total_score:a(n.total_score),single_100:a(n.single_100),single_over_100:a(n.single_over_100),category:Number(n.category)===2?2:1,subject_name:typeof n.subject_name=="string"?n.subject_name:void 0}}).filter(o=>o.major_code):e.filter(o=>o.category===2&&o.major_code&&o.major_name).map(o=>{var n,r,c;return{major_code:String(o.major_code),major_name:String(o.major_name),total_score:(n=o.total_score)!=null?n:null,single_100:(r=o.single_100)!=null?r:null,single_over_100:(c=o.single_over_100)!=null?c:null,category:2,subject_name:o.subject_name}})}function f(t){if(!Array.isArray(t))return;const e=t.map(s=>{var r,c,u;const o=s,n=(r=o.items)!=null?r:[];return{subject_code:String((c=o.subject_code)!=null?c:""),subject_name:String((u=o.subject_name)!=null?u:""),items:(Array.isArray(n)?n:[]).map(m=>{var l;const i=m;return{major_name:String((l=i.major_name)!=null?l:""),total_score:a(i.total_score)}})}});return e.length?e:void 0}function b(t){if(!t||typeof t!="object"||Array.isArray(t))return;const e={};for(const[s,o]of Object.entries(t)){if(!Array.isArray(o)||!o.length)continue;const n=o.map(r=>{if(Array.isArray(r)){const c=Number(r[0]),u=r[1];return{year:c,value:u==null?null:Number(u)}}if(r&&typeof r=="object"){const c=Number(r.year),u=r.value;return{year:c,value:u==null?null:Number(u)}}return null}).filter(r=>r!==null&&Number.isFinite(r.year)).sort((r,c)=>r.year-c.year);n.length&&(e[s]=n)}return Object.keys(e).length?e:void 0}function a(t){if(t==null||t==="")return null;const e=Number(t);return Number.isFinite(e)?e:null}function g(t){var e,s;return Array.isArray(t)?t:t&&typeof t=="object"?(s=(e=d(t))==null?void 0:e.records)!=null?s:[]:[]}export{v as p};
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.