PageSourceSearch

https://villamedici.it/_nuxt/JHV-DZsr.js

js villamedici.it collected 2026-09-24 18:19:57 UTC 18,684 bytes, 4 lines download raw bytes

1import{D as z,k as E,X as A,o as c,c as I,q as _,g as u,t as v,i as m,n as C,F as M,m as P,l as S,h as O,v as T,s as F}from"./T5N87QHF.js";import R from"./DsyMrGjc.js";/*!
2  * PhotoSwipe Lightbox 5.4.4 - https://photoswipe.com
3  * (c) 2024 Dmytro Semenov
4  */function g(n,e,i){const t=document.createElement(e);return n&&(t.className=n),i&&i.appendChild(t),t}function N(n,e,i){let t=`translate3d(${n}px,0px,0)`;return i!==void 0&&(t+=` scale3d(${i},${i},1)`),t}function L(n,e,i){n.style.width=typeof e=="number"?`${e}px`:e,n.style.height=typeof i=="number"?`${i}px`:i}const d={IDLE:"idle",LOADING:"loading",LOADED:"loaded",ERROR:"error"};function $(n){return"button"in n&&n.button===1||n.ctrlKey||n.metaKey||n.altKey||n.shiftKey}function y(n,e,i=document){let t=[];if(n instanceof Element)t=[n];else if(n instanceof NodeList||Array.isArray(n))t=Array.from(n);else{const s=typeof n=="string"?n:e;s&&(t=Array.from(i.querySelectorAll(s)))}return t}function H(n){return typeof n=="function"&&n.prototype&&n.prototype.goTo}function D(){return!!(navigator.vendor&&navigator.vendor.match(/apple/i))}class W{constructor(e,i){this.type=e,this.defaultPrevented=!1,i&&Object.assign(this,i)}preventDefault(){this.defaultPrevented=!0}}class V{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(e,i,t=100){var s,l,r;this._filters[e]||(this._filters[e]=[]),(s=this._filters[e])===null||s===void 0||s.push({fn:i,priority:t}),(l=this._filters[e])===null||l===void 0||l.sort((o,h)=>o.priority-h.priority),(r=this.pswp)===null||r===void 0||r.addFilter(e,i,t)}removeFilter(e,i){this._filters[e]&&(this._filters[e]=this._filters[e].filter(t=>t.fn!==i)),this.pswp&&this.pswp.removeFilter(e,i)}applyFilters(e,...i){var t;return(t=this._filters[e])===null||t===void 0||t.forEach(s=>{i[0]=s.fn.apply(this,i)}),i[0]}on(e,i){var t,s;this._listeners[e]||(this._listeners[e]=[]),(t=this._listeners[e])===null||t===void 0||t.push(i),(s=this.pswp)===null||s===void 0||s.on(e,i)}off(e,i){var t;this._listeners[e]&&(this._listeners[e]=this._listeners[e].filter(s=>i!==s)),(t=this.pswp)===null||t===void 0||t.off(e,i)}dispatch(e,i){var t;if(this.pswp)return this.pswp.dispatch(e,i);
4const s=new W(e,i);return(t=this._listeners[e])===null||t===void 0||t.forEach(l=>{l.call(this,s)}),s}}class q{constructor(e,i){if(this.element=g("pswp__img pswp__img--placeholder",e?"img":"div",i),e){const t=this.element;t.decoding="async",t.alt="",t.src=e,t.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(e,i){this.element&&(this.element.tagName==="IMG"?(L(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=N(0,0,e/250)):L(this.element,e,i))}destroy(){var e;(e=this.element)!==null&&e!==void 0&&e.parentNode&&this.element.remove(),this.element=null}}class B{constructor(e,i,t){this.instance=i,this.data=e,this.index=t,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=d.IDLE,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout(()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)},1e3)}load(e,i){if(this.slide&&this.usePlaceholder())if(this.placeholder){const t=this.placeholder.element;t&&!t.parentElement&&this.slide.container.prepend(t)}else{const t=this.instance.applyFilters("placeholderSrc",this.data.msrc&&this.slide.isFirstSlide?this.data.msrc:!1,this);this.placeholder=new q(t,this.slide.container)}this.element&&!i||this.instance.dispatch("contentLoad",{content:this,isLazy:e}).defaultPrevented||(this.isImageContent()?(this.element=g("pswp__img","img"),this.displayedImageWidth&&this.loadImage(e)):(this.element=g("pswp__content","div"),this.element.innerHTML=this.data.html||""),i&&this.slide&&this.slide.updateContentSize(!0))}loadImage(e){var i,t;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:e}).defaultPrevented)return;const s=this.element;this.updateSrcsetSizes(),this.data.srcset&&(s.srcset=this.data.srcset),s.src=(i=this.data.src)!==null&&i!==void 0?i:"",s.alt=(t=this.data.alt)!==null&&t!==void 0?t:"",this.state=d.LOADING,s.complete?this.onLoaded():(s.onload=()=>{this.onLoaded()},s.onerror=()=>{this.onError()})}setSlide(e){this.slide=e,this.hasSlide=!0,this.instance=e.pswp}onLoaded(){this.state=d.LOADED,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),(this.state===d.LOADED||this.state===d.ERROR)&&this.removePlaceholder())}onError(){this.state=d.ERROR,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===d.LOADING,this)}isError(){return this.state===d.ERROR}isImageContent(){return this.type==="image"}setDisplayedSize(e,i){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(e,i),!this.instance.dispatch("contentResize",{content:this,width:e,height:i}).defaultPrevented&&(L(this.element,e,i),this.isImageContent()&&!this.isError()))){const t=!this.displayedImageWidth&&e;this.displayedImageWidth=e,this.displayedImageHeight=i,t?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:e,height:i,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==d.ERROR,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const e=this.element,i=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!e.dataset.largestUsedSize||i>parseInt(e.dataset.largestUsedSize,10))&&(e.sizes=i+"px",e.dataset.largestUsedSize=String(i))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,!this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented&&(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var e,i;let t=g("pswp__error-msg","div");t.innerText=(e=(i=this.instance.options)===null||i===void 0?void 0:i.errorMsg)!==null&&e!==void 0?e:"",t=this.instance.applyFilters("contentErrorElement",t,this),this.element=g("pswp__content pswp__error-msg-container","div"),this.element.appendChild(t),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===d.ERROR){this.displayError();return}if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const e="decode"in this.element;this.isImageContent()?e&&this.slide&&(!this.slide.isActive||D())?(this.isDecoding=!0,this.element.decode().catch(()=>{}).finally(()=>{this.isDecoding=!1,this.appendImage()})):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){this.instance.dispatch("contentActivate",{content:this}).defaultPrevented||!this.slide||(this.isImageContent()&&this.isDecoding&&!D()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,!this.instance.dispatch("contentRemove",{content:this}).defaultPrevented&&(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),(this.state===d.LOADED||this.state===d.ERROR)&&this.removePlaceholder()))}}function G(n,e){if(n.getViewportSizeFn){const i=n.getViewportSizeFn(n,e);if(i)return i}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function w(n,e,i,t,s){let l=0;if(e.paddingFn)l=e.paddingFn(i,t,s)[n];else if(e.padding)l=e.padding[n];else{const r="padding"+n[0].toUpperCase()+n.slice(1);e[r]&&(l=e[r])}return Number(l)||0}function Z(n,e,i,t){return{x:e.x-w("left",n,e,i,t)-w("right",n,e,i,t),y:e.y-w("top",n,e,i,t)-w("bottom",n,e,i,t)}}const x=4e3;class U{constructor(e,i,t,s){this.pswp=s,this.options=e,this.itemData=i,this.index=t,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(e,i,t){const s={x:e,y:i};this.elementSize=s,this.panAreaSize=t;const l=t.x/s.x,r=t.y/s.y;this.fit=Math.min(1,l<r?l:r),this.fill=Math.min(1,l>r?l:r),this.vFill=Math.min(1,r),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(e){const i=e+"ZoomLevel",t=this.options[i];if(t)return typeof t=="function"?t(this):t==="fill"?this.fill:t==="fit"?this.fit:Number(t)}_getSecondary(){let e=this._parseZoomLevelOption("secondary");return e||(e=Math.min(1,this.fit*3),this.elementSize&&e*this.elementSize.x>x&&(e=x/this.elementSize.x),e)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,this.fit*4)}}function k(n,e,i){const t=e.createContentFromData(n,i);let s;const{options:l}=e;if(l){s=new U(l,n,-1);let r;e.pswp?r=e.pswp.viewportSize:r=G(l,e);const o=Z(l,r,n,i);s.update(t.width,t.height,o)}return t.lazyLoad(),s&&t.setDisplayedSize(Math.ceil(t.width*s.initial),Math.ceil(t.height*s.initial)),t}function K(n,e){const i=e.getItemData(n);if(!e.dispatch("lazyLoadSlide",{index:n,itemData:i}).defaultPrevented)return k(i,e,n)}class j extends V{getNumItems(){var e;let i=0;const t=(e=this.options)===null||e===void 0?void 0:e.dataSource;t&&"length"in t?i=t.length:t&&"gallery"in t&&(t.items||(t.items=this._getGalleryDOMElements(t.gallery)),t.items&&(i=t.items.length));const s=this.dispatch("numItems",{dataSource:t,numItems:i});return this.applyFilters("numItems",s.numItems,t)}createContentFromData(e,i){return new B(e,this,i)}getItemData(e){var i;const t=(i=this.options)===null||i===void 0?void 0:i.dataSource;let s={};Array.isArray(t)?s=t[e]:t&&"gallery"in t&&(t.items||(t.items=this._getGalleryDOMElements(t.gallery)),s=t.items[e]);let l=s;l instanceof Element&&(l=this._domElementToItemData(l));const r=this.dispatch("itemData",{itemData:l||{},index:e});return this.applyFilters("itemData",r.itemData,e)}_getGalleryDOMElements(e){var i,t;return(i=this.options)!==null&&i!==void 0&&i.children||(t=this.options)!==null&&t!==void 0&&t.childSelector?y(this.options.children,this.options.childSelector,e)||[]:[e]}_domElementToItemData(e){const i={element:e},t=e.tagName==="A"?e:e.querySelector("a");if(t){i.src=t.dataset.pswpSrc||t.href,t.dataset.pswpSrcset&&(i.srcset=t.dataset.pswpSrcset),i.width=t.dataset.pswpWidth?parseInt(t.dataset.pswpWidth,10):0,i.height=t.dataset.pswpHeight?parseInt(t.dataset.pswpHeight,10):0,i.w=i.width,i.h=i.height,t.dataset.pswpType&&(i.type=t.dataset.pswpType);const l=e.querySelector("img");if(l){var s;i.msrc=l.currentSrc||l.src,i.alt=(s=l.getAttribute("alt"))!==null&&s!==void 0?s:""}(t.dataset.pswpCropped||t.dataset.cropped)&&(i.thumbCropped=!0)}return this.applyFilters("domItemData",i,e,t)}lazyLoadData(e,i){return k(e,this,i)}}class X extends j{constructor(e){super(),this.options=e||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){y(this.options.gallery,this.options.gallerySelector).forEach(e
4=>{e.addEventListener("click",this.onThumbnailsClick,!1)})}onThumbnailsClick(e){if($(e)||window.pswp)return;let i={x:e.clientX,y:e.clientY};!i.x&&!i.y&&(i=null);let t=this.getClickedIndex(e);t=this.applyFilters("clickedIndex",t,e,this);const s={gallery:e.currentTarget};t>=0&&(e.preventDefault(),this.loadAndOpen(t,s,i))}getClickedIndex(e){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,e);const i=e.target,s=y(this.options.children,this.options.childSelector,e.currentTarget).findIndex(l=>l===i||l.contains(i));return s!==-1?s:this.options.children||this.options.childSelector?-1:0}loadAndOpen(e,i,t){if(window.pswp||!this.options)return!1;if(!i&&this.options.gallery&&this.options.children){const s=y(this.options.gallery);s[0]&&(i={gallery:s[0]})}return this.options.index=e,this.options.initialPointerPos=t,this.shouldOpen=!0,this.preload(e,i),!0}preload(e,i){const{options:t}=this;i&&(t.dataSource=i);const s=[],l=typeof t.pswpModule;if(H(t.pswpModule))s.push(Promise.resolve(t.pswpModule));else{if(l==="string")throw new Error("pswpModule as string is no longer supported");if(l==="function")s.push(t.pswpModule());else throw new Error("pswpModule is not valid")}typeof t.openPromise=="function"&&s.push(t.openPromise()),t.preloadFirstSlide!==!1&&e>=0&&(this._preloadedContent=K(e,this));const r=++this._uid;Promise.all(s).then(o=>{if(this.shouldOpen){const h=o[0];this._openPhotoswipe(h,r)}})}_openPhotoswipe(e,i){if(i!==this._uid&&this.shouldOpen||(this.shouldOpen=!1,window.pswp))return;const t=typeof e=="object"?new e.default(this.options):new e(this.options);this.pswp=t,window.pswp=t,Object.keys(this._listeners).forEach(s=>{var l;(l=this._listeners[s])===null||l===void 0||l.forEach(r=>{t.on(s,r)})}),Object.keys(this._filters).forEach(s=>{var l;(l=this._filters[s])===null||l===void 0||l.forEach(r=>{t.addFilter(s,r.fn,r.priority)})}),this._preloadedContent&&(t.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=void 0),t.on("destroy",()=>{this.pswp=void 0,delete window.pswp}),t.init()}destroy(){var e;(e=this.pswp)===null||e===void 0||e.destroy(),this.shouldOpen=!1,this._listeners={},y(this.options.gallery,this.options.gallerySelector).forEach(i=>{i.removeEventListener("click",this.onThumbnailsClick,!1)})}}const Y={key:0},J={key:1,class:"h-title-3"},Q=["href","data-pswp-height","data-pswp-width","description"],ee=S("button",null,[S("span",{class:"icon-pan"})],-1),te=["innerHTML"],ie=["innerHTML"],se=["innerHTML"],ne={class:"has-link"},ae={__name:"BlockSliderImages",props:{titre:{type:String,required:!1},sous_titre:{type:String,required:!1},texte_lien_externe:{type:String,required:!1},lien_externe:{type:String,required:!1},elements:{type:Array,required:!0}},setup(n){function e(r){return r.replace(/<[^>]*>/g,"")}z(()=>{i.value&&l()});const i=E(null),t=E(null),s=E(!1),l=()=>{t.value=new X({gallery:i.value.$el.querySelector(".slider__list"),children:".slide__img",arrowPrevSVG:'<span class="pswp__left">←</span>',arrowNextSVG:'<span class="pswp__right">→</span>',closeSVG:'<span class="icon icon-close"></span>',pswpModule:()=>A(()=>import("./GXRgw7eJ.js"),[],import.meta.url),padding:{top:48,bottom:48,left:24,right:24},bgOpacity:.9}),t.value.on("uiRegister",()=>{t.value.pswp.ui.registerElement({name:"zoom",className:"pswp__container-zoom",appendTo:"wrapper",onInit:(r,o)=>{const h=document.createElement("button");h.className="pswp__button pswp__button-czoom",h.innerHTML="+",h.addEventListener("click",()=>{o.currSlide.zoomTo(1,{x:o.currSlide.prevDisplayedWidth/2,y:o.currSlide.prevDisplayedHeight/2},400,!1)});const p=document.createElement("button");p.className="pswp__button pswp__button-czoom",p.innerHTML="-",p.addEventListener("click",()=>{o.currSlide.zoomTo(.1,{x:o.currSlide.prevDisplayedWidth/2,y:o.currSlide.prevDisplayedHeight/2},400,!1)}),r.appendChild(p),r.appendChild(h)}}),t.value.pswp.ui.registerElement({name:"custom-caption",order:-1,isButton:!1,appendTo:"wrapper",html:"",onInit:(r,o)=>{const h=document.createElement("div");r.appendChild(h),t.value.pswp.on("change",()=>{const p=t.value.pswp.currSlide.data.element;let f="";if(p){const a=p.querySelector(".hidden-caption-content");a?f=a.innerHTML:f=p.getAttribute("description")}h.innerHTML=f||""})}})}),t.value.on("openingAnimationStart",()=>{s.value=!0}),t.value.on("closingAnimationEnd",()=>{s.value=!1}),t.value.on("change",()=>{s.value}
4),t.value.init()};return(r,o)=>{const h=T,p=F,f=R;return c(),I(f,{ref_key:"sliderRef",ref:i,class:"block-slider-images wrapper","item-name":"__('Image')","is-item-name-female":"","is-snap":""},{header:_(()=>[n.titre?(c(),u("h2",Y,v(n.titre),1)):m("",!0),n.sous_titre?(c(),u("p",J,v(n.sous_titre),1)):m("",!0),n.texte_lien_externe&&n.lien_externe?(c(),I(h,{key:2,type:"external",url:n.lien_externe,link_class:"secondary"},{default:_(()=>[C(v(n.texte_lien_externe),1)]),_:1},8,["url"])):m("",!0)]),items:_(()=>[(c(!0),u(M,null,P(n.elements,(a,b)=>(c(),u("li",{key:b,class:"slider__slide"},[S("a",{class:"slide__img",href:a.image.url,"data-cropped":"true","data-pswp-height":a.image.height,"data-pswp-width":a.image.width,description:e(a.titre)},[O(p,{image:a.image},null,8,["image"]),ee],8,Q),a.titre?(c(),u("div",{key:0,class:"h-title-5",innerHTML:a.titre},null,8,te)):m("",!0),a.description?(c(),u("div",{key:1,innerHTML:a.description},null,8,ie)):m("",!0),a.date?(c(),u("div",{key:2,class:"h-small",innerHTML:a.date},null,8,se)):m("",!0),S("div",ne,[a.has_link&&a.lien.text&&(a.lien.type==="internal"&&a.lien.link||a.lien.type==="external"&&a.lien.url)?(c(),I(h,{key:0,link_class:"secondary",type:a.lien.type,link:a.lien.link,url:a.lien.url,id_ancre:a.lien.type==="internal"?a.lien.id_ancre:null},{default:_(()=>[C(v(a.lien.text),1)]),_:2},1032,["type","link","url","id_ancre"])):m("",!0)])]))),128))]),_:1},512)}}};export{ae as default};

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.