PageSourceSearch

https://aunivers.no/815d0d87/_nuxt/DAFqRQZm.js

js aunivers.no collected 2026-10-09 04:40:21 UTC 9,645 bytes, 4 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="fe5c0d98-730c-5a01-8e80-7ae76192480c")}catch(e){}}();
3import{nt as e}from"./DVU2nKuA.js";import{A as t,Ct as n,Gt as o,I as s,It as a,Jt as r,L as i,M as l,O as c,S as u,Xt as d,Zt as m,ct as f,dt as p,it as v,j as x,k as y,lt as g,o as b,st as I,ut as h,wt as C,z as k}from"./CV1VnGLa.js";import{t as w}from"./CWTB_NSG.js";import{Ut as _,b as j,c as T,gt as R,mt as N,o as F,t as L}from"./BzqjePJz.js";import{c as S}from"./o1_oaBL2.js";import{r as $}from"./7n0wwqSa.js";import{V as q}from"#entry";import{n as A}from"./d_mtT1tA2.js";import{a as P,n as E,o as B,s as K}from"./DOC6J3Zw2.js";import{t as O}from"./RZRLb6of2.js";var z=k({__name:"Card",props:{resource:{}},setup:e=>(n,o)=>(v(),t(E,{resource:e.resource},null,8,["resource"]))}),D=k({__name:"ResourceRenderer",props:{items:{},isAnchor:{type:Boolean,default:!1}},setup:e=>(o,s)=>{const a=g("ResourceRenderer",!0);return v(!0),l(u,null,I(e.items,o=>(v(),t(p(z),{key:o.locationId,resource:o,resources:[],featured:[],"is-anchor":e.isAnchor},{resource:n(({resourceItem:t})=>[i(a,{items:[t],"is-anchor":e.isAnchor},null,8,["items","is-anchor"])]),_:1},8,["resource","is-anchor"]))),128)}});var G={key:0,class:"mx-auto size-full max-w-screen-au px-4 sm:px-8"},U=["src","alt"],H={class:"flex w-full flex-col justify-center bg-white p-6 transition-colors sm:p-10"},J=["textContent"],M={class:"mb-2 text-2xl font-bold text-blue-50 sm:text-3xl"},V={class:"relative block w-fit"},W={class:"text-base text-gray-40 md:w-5/6"},X=k({__name:"Standalone",props:{section:{}},setup(t){const{buildResourceUrl:a}=j(),{getName:u}=function(){const{t:e}=$(),t=t=>{const n=e(`contentTypes.${t}`);return n.includes("contentTypes")?(console.warn(`No translation found for content type "${t}"`),e("contentTypes.default")):n};return{getName:e=>t(e.contentTypeIdentifier),getNameByContentTypeIdentifier:t}}(),{findContents:f}=T(),{getImageSrc:p,getImageAltText:I}=q(),{isAuthenticated:k}=b(L()),{isFile:_,isPdf:R}=N(),{getFavoriteList:F}=A(),{t:P}=$(),E=e(),{data:B}=w({enabled:c(()=>k.value&&!!t.section.resource?.destinationContentId),queryKey:c(()=>["section-standalone",t.section.contentId]),queryFn:async()=>(await f({contentIdCriterion:[Number(t.section.resource.destinationContentId)],mainLocationCriterion:!0},1))[0]??null,staleTime:1/0}),{data:K}=w({enabled:c(()=>k.value&&!!t.section.listId),queryKey:c(()=>["favorite-list",t.section.listId]),queryFn:()=>F(t.section.listId),staleTime:1/0}),z=c(()=>K.value?E.resolve({name:"favorite_list",params:{listId:K.value.id}}).href:""),D=c(()=>B?.value?a(B.value):z.value),X=c(()=>!D.value.startsWith("/")),Z=c(()=>!B.value||!_(B.value)&&!R(B.value)),Q=c(()=>B?.value?u(B.value):K?.value?P("favorite.list"):""),Y=c(()=>({src:Number(t.section.image?.destinationContentId)>0?p(t.section.image,"thumbnail_large"):B.value?.thumbnail,alt:Number(t.section.image?.destinationContentId)>0?I(t.section.image):""}));return(e,a)=>{const c=g("font-awesome-icon"),u=h("dompurify-html");return o(B)||o(K)?(v(),l("article",G,[i(O,{link:D.value,"is-anchor":X.value,"transition-effect":Z.value,class:r(["group flex min-h-[300px] w-full flex-col overflow-hidden rounded-2xl border-2 border-gray-10 transition-all hover:shadow-lg focus-visible:ring sm:flex-row",{"sm:flex-row-reverse":t.section.alignRight}])},{default:n(()=>[y("div",{class:"aspect-video max-h-[250px] w-full min-w-full sm:max-h-full sm:min-w-0",style:d(`background: ${t.section.color[0]?t.section.color[0]:"var(--color-gray-40)"}`)},[Y.value.src?(v(),l("img",{key:0,src:Y.value.src,class:"block size-full overflow-hidden object-cover object-center",alt:Y.value.alt},null,8,U)):x("",!0)],4),y("div",H,[Q.value?(v(),l("p",{key:0,class:"mb-4 font-semibold text-seagreen-40",textContent:m(Q.value)},null,8,J)):x("",!0),y("h2",M,[y("span",V,[s(m(t.section.title)+" ",1),i(c,{icon:o(S),class:"mb-1 ml-1 inline-block transition-all group-hover:ml-2 group-focus-visible:ml-2"},null,8,["icon"])])]),C(y("p",W,null,512),[[u,t.section.description]])])]),_:1},8,["link","is-anchor","transition-effect","class"])])):x("",!0)}}}
3),Z=["textContent"],Q={key:0,class:"m-auto mb-2 max-w-prose text-center text-base"},Y=k({__name:"Expanded",props:{section:{}},setup(e){const{findContents:s}=T(),{truthy:p,empty:g,intersect:k}=_(),{userRelevantGrades:j}=b(L()),R=a(),{backgroundStyle:N,needsDarkText:F}=P({identifier:e.section.locationId,backgroundColor:e.section.color[0],backgroundFormatter:e=>`linear-gradient(180deg, ${e}, ${e}E6)`,elementRef:R}),S=c(()=>F.value?"text-black":"text-white"),$=c(()=>(q.value??[]).filter(({grades:e})=>g(e)||!g(k(e,j.value)))),{data:q}=w({staleTime:1/0,enabled:Number(e.section.resources?.destinationContentIds?.length)>0,queryKey:["section-expanded",e.section.contentId],queryFn:async()=>{const t=await s({contentIdCriterion:e.section.resources.destinationContentIds,mainLocationCriterion:!0},e.section.resources.destinationContentIds.length);return e.section.resources.destinationContentIds.map(e=>t.find(({contentId:t})=>t===e)).filter(p)}});return(s,a)=>{const c=h("dompurify-html");return $.value.length?(v(),l("section",{key:0,ref_key:"backgroundElement",ref:R,class:"overflow-hidden py-8 sm:py-14",style:d(o(N))},[y("div",{class:r(["m-auto max-w-screen-au px-4 sm:px-8",S.value])},[y("h2",{class:"mb-2 text-center text-3xl font-bold sm:text-4xl",textContent:m(e.section.title)},null,8,Z),e.section.description?C((v(),l("p",Q,null,512)),[[c,e.section.description]]):x("",!0),i(B,null,{default:n(()=>[(v(!0),l(u,null,I($.value,(e,o)=>(v(),t(K,{key:o},{default:n(()=>[f(s.$slots,"resource",{resourceItem:e})]),_:2},1024))),128))]),_:3})],2)],4)):x("",!0)}}}),ee=k({__name:"DefaultComponent",props:{props:{},resources:{},featured:{}},setup:e=>(t,n)=>(v(!0),l(u,null,I(e.resources,e=>f(t.$slots,"resource",{resourceItem:e},void 0,void 0,e.locationId)),128))}),te={key:0,class:"mx-auto w-full overflow-hidden sm:max-w-screen-au sm:px-8"},ne=["textContent"],oe={key:0,class:"max-w-prose text-base"},se=k({__name:"Box",props:{section:{}},setup(e){const p=a(),{backgroundStyle:k,needsDarkText:N}=P({identifier:e.section.locationId,backgroundColor:e.section.color[0],backgroundFormatter:e=>`linear-gradient(180deg, ${e}, ${e}E6)`,elementRef:p}),F=c(()=>N.value?"text-black":"text-white"),{t:q}=$(),{buildResourceUrl:A}=j(),{findContents:E}=T(),{truthy:z,empty:D,intersect:G}=_(),{userRelevantGrades:U}=b(L()),H=c(()=>(W?.value?.featured??[]).filter(({grades:e})=>D(e)||!D(G(e,U.value)))),J=c(()=>W.value&&W.value.content?A(W.value.content):""),M=async()=>{if(!e.section.featured?.destinationContentIds?.length)return[];const t=await E({contentIdCriterion:e.section.featured.destinationContentIds,mainLocationCriterion:!0},e.section.featured.destinationContentIds.length);return e.section.featured.destinationContentIds.map(e=>t.find(({contentId:t})=>t===e)).filter(z)},V=async e=>await E({parentLocationIdCriterion:[e.mainLocationId],sortField:e.sortField,sortOrder:e.sortOrder,contentTypeCriterion:[R.ProductArticle,R.ProductHeader,R.LearningPath,R.ProductPackage,R.ProductPart]}),{data:W}=w({staleTime:1/0,queryKey:["section-box",e.section.contentId],queryFn:async()=>{const t=Number(e.section.package?.destinationContentId)>0?await(async()=>e.section.package?.destinationContentId?(await E({contentIdCriterion:[Number(e.section.package.destinationContentId)],mainLocationCriterion:!0},1))[0]??null:null)():null;return{content:t,featured:t&&0===Number(e.section.featured?.destinationContentIds?.length)?await V(t):await M()}}});return(a,c)=>{const b=g("font-awesome-icon"),w=h("dompurify-html");return o(W)?.content||H.value.length?(v(),l("section",te,[y("div",{ref_key:"backgroundElement",ref:p,class:r(["px-4 py-8 sm:rounded-2xl sm:p-14",F.value]),style:d(o(k))},[y("h2",{class:"mb-2 text-3xl font-bold sm:text-4xl",textContent:m(e.section.title)},null,8,ne),e.section.description?C((v(),l("p",oe,null,512)),[[w,e.section.description]]):x("",!0),o(W)?.content?(v(),t(O,{key:1,class:"mt-4 inline-flex items-center gap-2 font-medium hover:underline focus-visible:ring",link:J.value},{default:n(()=>[s(m(o(q)("links.seeAll"))+" ",1),i(b,{icon:o(S)},null,8,["icon"])]),_:1},8,["link"])):x("",!0),H.value.length?(v(),t(B,{key:2},{default:n(()=>[(v(!0),l(u,null,I(H.value,e=>(v(),t(K,{key:e.locationId},{default:n(()=>[f(a.$slots,"resource",{resourceItem:e})]),_:2},1024))),128))]),_:3})):x("",!0)],6)])):x("",!0)}}}),ae=["textContent"],re={class:"flex flex-col gap-12"},ie=k({__name:"SectionRenderer",props:{items:{}},setup(s){const{t:a}=$(),{products:r}=b(F()),{truthy:d}=_(),f=s,g={[R.SectionExpanded]:Y,[R.SectionStandalone]:X,[R.SectionBox]:se},h=e(),C=c(()=>h.currentRoute.value.name),k=c(()=>["subject"].includes(C.value)),w=c(()=>r.value.map(({aunivers:e})=>e.contentId).filter(d)),j=c(()=>f.items.filter(e=>!e.product||!e.product.destinationContentId||w.value.includes(Number(e.product.destinationContentId))));
3return(e,s)=>(v(),l(u,null,[j.value.length>0?(v(),l("h2",{key:0,class:"mx-auto mb-5 max-w-screen-au px-4 text-xl font-bold text-gray-50 sm:px-8",textContent:m(o(a)("recommendedContent"))},null,8,ae)):x("",!0),y("div",re,[(v(!0),l(u,null,I(j.value,e=>(v(),t(p((e=>g[e.contentTypeIdentifier]??ee)(e)),{key:e.locationId,section:e},{resource:n(({resourceItem:e})=>[i(D,{items:[e],"is-anchor":k.value},null,8,["items","is-anchor"])]),_:1},8,["section"]))),128))])],64))}});export{ie as t};
4//# debugId=fe5c0d98-730c-5a01-8e80-7ae76192480c

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.