1import{C as t,D as e,E as a,G as i,Gt as r,J as s,Lt as l,N as o,Nt as n,St as u,T as c,ct as g,fn as d,gt as h,it as m,mn as p,tt as f}from"./B8XHxhss.js";import{Nt as v,U as y,h as b,m as w,y as k}from"#entry";import{t as x}from"./BDzUtjWL.js";function $(t){let e=t;const a={...b().options.screens};let i=[...new Set(Object.values(a))].map(t=>+t).filter(t=>!isNaN(t)).sort((t,e)=>t-e);if(!t)return e;const r=t.split(" ").map(t=>String(t).trim());if(r.sort((t,e)=>{const a=t=>t&&t.includes(":")?parseInt(t.split(":")[0].replace(/\D/g,""),10):0;return a(t)-a(e)}),t.includes("vw")&&i.length){const t={},s=[];r.forEach(e=>{const[r,l]=e.split(":").reverse(),o=l?+a[l]:Math.min(0,...i),n=r.includes("px")||r.includes("vw"),u=i.includes(o);n&&(u?t[l]=r:s.push(r),i.filter(t=>t>o).forEach(e=>{const i=function(t){return Object.keys(a).find(e=>a[e]===t)}(e);e?.includes?.("px")?delete t[i]:t[i]=r}))}),Object.keys(t).forEach(e=>{s.push(`${e}:${t[e]}`)}),e=s.join(" ")}else e=r.join(" ");return e}var S={__name:"NuxtPictureExt",props:{alt:{type:String,default:""},src:{type:String},sizes:{type:String,default:null},densities:{type:String,default:null},width:{type:[Number,String],default:void 0},height:{type:[Number,String],default:void 0},ratio:{type:[Number,String],default:void 0},fit:{type:String,default:""},preload:{type:[Boolean,Object],default:!1},loading:{type:String,default:"lazy",validator:t=>["lazy","eager","auto"].includes(t)},decoding:{type:String,default:"sync",validator:t=>["async","sync","auto"].includes(t)},imgAttrs:{type:Object,default:()=>({})},quality:{type:[Number,String],default:100},modifiers:{type:Object,default:()=>({})}},emits:["load"],setup(e,{expose:i,emit:s}){const o=s,n=e,u=l(null),g=l(!1),h=t(()=>{const t={};if(n.src){const e=new URL(n.src,"https://example.com");new URLSearchParams(e.search).forEach((e,a)=>{t[a]=e})}return t}),v=t(()=>{let t=null;if(n.ratio?t={aspectRatio:n.ratio}:n.width&&n.height?t={aspectRatio:`${n.width} / ${n.height}`}:h.value.width&&h.value.height&&(t={aspectRatio:`${h.value.width} / ${h.value.height}`}),n.fit&&["cover","none"].includes(n.fit)&&2===h.value.rxy?.split?.(",").length){const[e,a]=h.value.rxy.split(",");t={...t,"--object-position":`${Math.round(1e4*e)/100}% ${Math.round(1e4*a)/100}%`}}return t}),y=t(()=>{const t=["c-nuxt-picture-ext__img",n.imgAttrs.class],e=[n.imgAttrs.style];return n.fit&&"crop"!==n.fit&&e.unshift({objectFit:n.fit}),{...JSON.parse(JSON.stringify(n.imgAttrs)),class:t.filter(Boolean),style:e.filter(Boolean)}});function b(t){t=t||new Event("load"),g.value||(o("load",t),g.value=!0)}return f(()=>{(u?.value?.$el?.querySelector?.("img"))?.complete&&b()}),i({nuxtPicture:u,isLoaded:g}),(t,i)=>{const s=w;return e.src?(m(),c(s,{key:0,ref_key:"nuxtPicture",ref:u,class:d(["c-nuxt-picture-ext","c-nuxt-picture-ext--"+(r(g)?"is-loaded":"is-loading")]),style:p(r(v)),fit:e.fit,src:e.src,alt:e.alt,sizes:e.sizes?("useImageSizes"in t?t.useImageSizes:r($))(e.sizes):null,densities:e.densities,width:e.width,height:e.height,modifiers:{ratio:e.ratio,sourceWidth:e.width,sourceHeight:e.height,...e.modifiers},"img-attrs":r(y),quality:e.quality,preload:e.preload,loading:e.loading,decoding:e.decoding,onLoad:b},null,8,["class","style","fit","src","alt","sizes","densities","width","height","modifiers","img-attrs","quality","preload","loading","decoding"])):a("",!0)}}},E=["src","width","height"],N={__name:"PrintImg",props:{src:String,width:[Number,String],height:[Number,String]},setup(i){const s=i,{$isPrinting:o}=v(),n=l(o?.value??!1),c=b(),g=t(()=>{const t=s.width?Number(s.width):void 0,e=s.height?Number(s.height):void 0;return Math.min(480,t??480,480/(e??480)*(t??480))}),d=t(()=>{const t=s.width?Number(s.width):void 0,e=s.height?Number(s.height):void 0;return Math.min(480,t.value,480/(e??480)*t.value)/t.value*(e??480)}),h=t(()=>c(s.src,{width:g.value,height:d.value,quality:50,format:"webp"}));return u(o,t=>{t&&!n.value&&(n.value=!0)}),(t,i)=>r(n)?(m(),e("img",{key:0,class:"c-print-img",src:r(h),width:r(g),height:r(d),"aria-hidden":"true"},null,8,E)):a("",!0)}},_=["src","alt","img-attrs"],B={key:2,class:"c-base-image__slot-content"},j=Object.assign({inheritAttrs:!1},{__name:"BaseImage",props:{alt:{type:String,default:""},ratio:{type:[Number,String],default:null},loadColor:{type:String,default:"rgba(255, 255, 255, 0.5)"},quality:{type:[Number,String],default:void 0}
1,showBackground:{type:[Boolean,String,Object],default:!1},imgExtension:{type:String,default:"webp"},forceImgExtension:{type:Boolean,default:!1},dontCrop:{type:Boolean,default:!1},imgAttrs:Object,hoverEffect:{type:[Boolean,String],default:!1}},setup(f){const v=f,w=h(),$=l(null),E=b(),j=t(()=>"true"===String(v.hoverEffect)?"zoom":v.hoverEffect),z=t(()=>w.fit),M=t(()=>w.width),A=t(()=>v.ratio?+v.ratio:null),C=t(()=>{if(v.loadColor){if("contain"===z.value){let{height:t}=w;A.value&&(t=Math.round(M.value/A.value));const e=`<svg xmlns="http://www.w3.org/2000/svg" width="${M.value}" height="${t}" viewBox="0 0 ${M.value} ${t}"><rect width="100%" height="100%" fill="${v.loadColor}" /></svg>`;return{"--background-image":`url("data:image/svg+xml,${encodeURIComponent(e)}")`,"--background-size":z.value,"--background-position":"50% 50%"}}return{"--background-color":v.loadColor,"--background-size":"100% 100%"}}return null}),I=t(()=>{if("png"===v.imgExtension||"svg"===v.imgExtension||"gif"===v.imgExtension){if("contain"===z.value){let{height:t}=w;A.value&&"contain"!==z.value&&(t=Math.round(M.value/A.value));const e=`<svg xmlns="http://www.w3.org/2000/svg" width="${M.value}" height="${t}" viewBox="0 0 ${M.value} ${t}"><rect width="100%" height="100%" fill="#000" /></svg>`;return{"--mask-image":`url("data:image/svg+xml,${encodeURIComponent(e)}")`,"--mask-size":z.value,"--mask-position":"50% 50%","--mask-color":"var(--theme-colors-background-canvas)"}}return{"--mask-color":"var(--theme-colors-background-canvas)","--mask-size":"100% 100%"}}return null}),O=y(),q=l(!!O.value),P=l(!O.value);u(O,t=>{q.value=!!t,t||(P.value=!0)}),u(q,t=>{t||(P.value=!0)});const R=O.value?i("baseImageClimateQuality",55):i("baseImageQuality",70),U=t(()=>P.value&&O.value?"eager":w.loading??"lazy"),L=t(()=>{const t=v.imgAttrs||{};return"eager"===U.value&&(t.fetchpriority??="high"),t}),J=t(()=>{const t=["c-base-image__picture"],e=k(["class","style"],w);"high"!==L.value?.fetchpriority||v.showBackground||t.push("c-base-image__picture--high-priority");const a={...e,class:t.filter(Boolean),style:C.value,alt:v.alt||"",quality:v.quality||R,"img-attrs":L.value,format:v.forceImgExtension||["svg","gif"].includes(v.imgExtension)?v.imgExtension:"webp",ratio:A.value||null};return U.value&&(a.loading=U.value),"eager"===U.value&&(a.preload=!0,"high"===L.value.fetchpriority&&(a.preload={fetchPriority:"high"})),a}),V=t(()=>{const t={width:"100%",backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"cover"};if(M.value){const{height:e}=w;t.width=`min(${M.value}px, 100%)`,A.value?t["aspect-ratio"]=A.value:e&&(t["aspect-ratio"]=`${M.value} / ${e}`)}return w.height&&(t.height=`min(${w.height}px, 100%)`),{...t,...w?.style||{}}}),D=t(()=>{const t={src:"object"==typeof v.showBackground||v.showBackground,opacity:.2,scale:1.1,blurAmt:4},{src:e,opacity:a,scale:i,blurAmt:r}="object"==typeof v.showBackground?{...t,...v.showBackground}:t;if(e){if("string"==typeof e)return{"--background-image":`url(${e})`,"--background-image-opacity":a,"--background-image-scale":100*+i+"%","--background-image-offset":(1-1/+i)/2*-100+"%","--background-image-blur":`${r}px`};const t={width:500,height:281,quality:45,fit:z.value};return w.width&&w.height&&(t.width=Math.min(500,+w.width/+w.height*281),t.height=Math.min(281,+w.height/+w.width*500)),A.value&&(t.width=Math.min(500,Math.round(281*A.value)),t.height=Math.min(281,Math.round(500/A.value))),{"--background-image":`url(${E(w.src,t)})`,"--background-image-opacity":a,"--background-image-scale":100*+i+"%","--background-image-offset":(1-1/+i)/2*-100+"%","--background-image-blur":`${r}px`}}return{}});return(t,i)=>{const l=S,u=N,h=x;return m(),e("span",{ref_key:"$el",ref:$,class:d(["c-base-image",[r(q)&&"c-base-image--climate-hide",r(j)&&`c-base-image--hover-effect--${r(j)}`,r(w).class]]),style:p(r(V))},[f.dontCrop&&r(P)?(m(),e("img",s({key:0,class:"c-base-image__no-crop-image",src:r(w).src,alt:f.alt,"img-attrs":r(L)},("useAttrsExcept"in t?t.useAttrsExcept:r(k))(["class","style"],t.$attrs)),null,16,_)):r(P)?(m(),c(l,s({key:1,ref:"imageComponent"},r(J)),null,16)):a("",!0),o(u,{class:"absolute inset-0",src:r(J).src,alt:f.alt,width:r(J).width,height:r(J).height},null,8,["src","alt","width","height"]),t.$slots.default?(m(),e("span",B,[g(t.$slots,"default")])):a("",!0),t.$slots.attribution?g(t.$slots,"attribution",{}
1,void 0,void 0,3):a("",!0),r(P)&&f.showBackground?(m(),e("div",{key:4,class:"c-base-image__background",style:p({...r(D),...r(I)})},null,4)):a("",!0),r(q)?(m(),c(h,{key:5,modelValue:r(q),"onUpdate:modelValue":i[0]||(i[0]=t=>n(q)?q.value=t:null),class:"absolute inset-0"},null,8,["modelValue"])):a("",!0)],6)}}});export{N as n,j as 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.