PageSourceSearch

https://ardara.ie/wp-content/plugins/visual-portfolio/build/assets…/popup-gallery.js?ver=55efef1afe2df407985b

js ardara.ie collected 2026-10-02 12:14:03 UTC 10,233 bytes, 1 lines download raw bytes

1(()=>{"use strict";var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var o in r)e.o(r,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)};const t=window.jQuery;var r=e.n(t);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=Array(t);r<t;r++)o[r]=e[r];return o}function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,o)}return r}function l(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){a(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function a(e,t,r){return(t=function(e){var t=function(e){if("object"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var p=window.VPData.settingsPopupGallery,c="content"in document.createElement("template"),u={vendor:!1,vendors:[{vendor:"youtube",embedUrl:"https://www.youtube.com/embed/{{video_id}}?{{params}}",pattern:/(https?:\/\/)?(www.)?(youtube\.com|youtu\.be|youtube-nocookie\.com)\/(?:embed\/|shorts\/|v\/|watch\?v=|watch\?list=(.*)&v=|watch\?(.*[^&]&)v=)?((\w|-){11})(&list=(\w+)&?)?(.*)/,patternIndex:6,params:{autoplay:1,autohide:1,fs:1,rel:0,hd:1,wmode:"transparent",enablejsapi:1,html5:1},paramsIndex:10,embedCallback:function(e,t){var r=!1,o=this,i=!(!t||!t[o.patternIndex])&&t[o.patternIndex];if(i){var n=/\/shorts\//.test(e),a=n?476:1920,p=n?847:1080;r=u.embedCallback(l(l({},o),{},{width:a,height:p}),i,e,t)}return r}},{vendor:"vimeo",embedUrl:"https://player.vimeo.com/video/{{video_id}}?{{params}}",pattern:/https?:\/\/(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^/]*)\/videos\/|album\/(\d+)\/video\/|video\/|)(\d+)(?:$|\/|\?)(.*)/,patternIndex:3,params:{autoplay:1,hd:1,show_title:1,show_byline:1,show_portrait:0,fullscreen:1},paramsIndex:4}],init:function(){},open:function(){},close:function(){},getQueryStringParams:function(e){return e?(/^[?#]/.test(e)?e.slice(1):e).split("&").reduce(function(e,t){var r,o,n=(r=t.split("="),o=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o,i,n,l,a=[],p=!0,c=!1;try{if(n=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;p=!1}else for(;!(p=(o=n.call(r)).done)&&(a.push(o.value),a.length!==t);p=!0);}catch(e){c=!0,i=e}finally{try{if(!p&&null!=r.return&&(l=r.return(),Object(l)!==l))return}finally{if(c)throw i}}return a}}(r,o)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(r,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=n[0],a=n[1];return e[l]=a?decodeURIComponent(a.replace(/\+/g," ")):"",e},{}):{}},prepareParams:function(e,t){var r="",i=t.params||{};if(t.paramsIndex&&e&&e[t.paramsIndex]){var n=u.getQueryStringParams(e[t.paramsIndex]);n&&"object"===o(n)&&Object.keys(n).forEach(function(e){e&&n[e]&&(i[e]=n[e])})}
1return i&&Object.keys(i).length&&Object.keys(i).forEach(function(e){e&&i[e]&&(r&&(r+="&"),r+="".concat(e,"=").concat(i[e]))}),r},embedCallback:function(e,t,r){var o=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=e.embedUrl;i=(i=(i=(i=i.replace(/{{video_id}}/g,t)).replace(/{{video_url}}/g,r)).replace(/{{video_url_encoded}}/g,encodeURIComponent(r))).replace(/{{params}}/g,o?u.prepareParams(o,e):"");var n=e.width||1920,l=e.height||1080;return{vendor:e.vendor,id:t,embed:'<iframe width="'.concat(n,'" height="').concat(l,'" src="').concat(i,'" scrolling="no" frameborder="0" allowTransparency="true" allow="accelerometer; autoplay; clipboard-write; fullscreen; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>'),embedUrl:i,url:r,width:n,height:l}},parseVideo:function(e,t){var r=!1;return u.vendors.forEach(function(o){if(!r){var i=e.match(o.pattern),n=!(!i||!i[o.patternIndex])&&i[o.patternIndex];n&&(r=o.embedCallback?o.embedCallback(e,i,t):u.embedCallback(o,n,e,i))}}),r||(r=u.embedCallback({vendor:"unknown",embedUrl:e},e,e,!1)),r},parseItem:function(e){var t,r,o=!1,i=e&&e.querySelector(".vp-portfolio__item-popup");return i&&(o={$dataElement:i,$content:i,data:i.dataset},c&&"TEMPLATE"===i.nodeName&&i.content&&(o.$content=i.content),o.$title=null===(t=o)||void 0===t||null===(t=t.$content)||void 0===t?void 0:t.querySelector(".vp-portfolio__item-popup-title"),o.$description=null===(r=o)||void 0===r||null===(r=r.$content)||void 0===r?void 0:r.querySelector(".vp-portfolio__item-popup-description")),o},parseGallery:function(e){var t,r,o,i,n=[];return e.find(".vp-portfolio__item-wrap:not(.swiper-slide-duplicate)").each(function(){var e=u.parseItem(this);if(e){var l,a,p,c,d;if(t=((null==e||null===(l=e.data)||void 0===l?void 0:l.vpPopupImgSize)||"1920x1080").split("x"),o=null==e||null===(a=e.data)||void 0===a?void 0:a.vpPopupVideo,i=!1,o&&(i=u.parseVideo(o,null==e||null===(p=e.data)||void 0===p?void 0:p.vpPopupPoster)),i)r={type:"embed",el:this,poster:i.poster,src:i.embedUrl,embed:i.embed,width:i.width||1920,height:i.height||1080};else{var s,m,f,v;r={type:"image",el:this,src:null==e||null===(s=e.data)||void 0===s?void 0:s.vpPopupImg,srcset:null==e||null===(m=e.data)||void 0===m?void 0:m.vpPopupImgSrcset,width:parseInt(t[0],10),height:parseInt(t[1],10)};var y=(null==e||null===(f=e.data)||void 0===f?void 0:f.vpPopupSmImg)||r.src;if(y){var h,b,g=((null==e||null===(h=e.data)||void 0===h?void 0:h.vpPopupSmImgSize)||(null==e||null===(b=e.data)||void 0===b?void 0:b.vpPopupImgSize)||"1920x1080").split("x");r.srcSmall=y,r.srcSmallWidth=parseInt(g[0],10),r.srcSmallHeight=parseInt(g[1],10)}var w=(null==e||null===(v=e.data)||void 0===v?void 0:v.vpPopupMdImg)||r.src;if(w){var _,P,I=((null==e||null===(_=e.data)||void 0===_?void 0:_.vpPopupMdImgSize)||(null==e||null===(P=e.data)||void 0===P?void 0:P.vpPopupImgSize)||"1920x1080").split("x");r.srcMedium=w,r.srcMediumWidth=parseInt(I[0],10),r.srcMediumHeight=parseInt(I[1],10)}}(null!=e&&e.$title||null!=e&&e.$description)&&(r.caption=((null==e||null===(c=e.$title)||void 0===c?void 0:c.outerHTML)||"")+((null==e||null===(d=e.$description)||void 0===d?void 0:d.outerHTML)||"")),n.push(r)}}),n},maybeFocusGalleryItem:function(e){p.restore_focus&&(e.linkEl?r()(e.linkEl).focus():e.el&&r()(e.el).find(".vp-portfolio__item-img > a").focus())}};function d(e){return/(.png|.jpg|.jpeg|.gif|.tiff|.tif|.jfif|.jpe|.svg|.bmp|.webp)$/.test(e.href.toLowerCase().split("?")[0].split("#")[0])}function s(e){var t=r()(e),o=e.childNodes[0],i=t.next("figcaption");return"NOSCRIPT"===o.nodeName&&e.childNodes[1]&&(o=e.childNodes[1]),!i.length&&t.parent(".gallery-icon").length&&(i=t.parent(".gallery-icon").next("figcaption")),(i=i.html())&&(i='<div class="vp-portfolio__item-popup-description">'.concat(i,"</div>")),{type:"image",el:o,linkEl:e,src:e.href,caption:i}}window.VPPopupAPI=u,r()(document).on("extendClass.vpf",function(e,t){"vpf"===e.namespace&&(t.prototype.initPopupGallery=function(){var e=this;e.options.itemsClickAction&&"url"!==e.options.itemsClickAction&&(e.isPreview()||e.$item.on("click.vpf-uid-".concat(e.uid),"\n        .vp-portfolio__item a.vp-portfolio__item-meta,\n        .vp-portfolio__item .vp-portfolio__item-img > a,\n        .vp-portfolio__item .vp-portfolio__item-meta-title > a,\n        .vp-portfolio__item a.vp-portfolio__item-overlay\n      ",function(t){if(!t.isDefaultPrevented()){var o=r()(this).closest(".vp-portfolio__item-wrap");if(o.hasClass("swiper-slide-duplicate")&&o.attr("data-swiper-slide-index")&&(o=e.$item.find('[data-swiper-slide-index="'.concat(o.attr("data-swiper-slide-index"),'"].swiper-slide:not(.swiper-slide-duplicate)'))),o.find(".vp-portfolio__item-popup").length){var i=u.parseGallery(e.$item),n=-1;
1i.forEach(function(e,t){e.el===o[0]&&(n=t)}),-1!==n&&(t.preventDefault(),u.open(i,n,e))}}}))},t.prototype.destroyPopupGallery=function(){var e=this;e.options.itemsClickAction&&"url"!==e.options.itemsClickAction&&(e.$item.off("click.vpf-uid-".concat(e.uid)),e.emitEvent("destroyPopupGallery"))})}),r()(document).on("init.vpf",function(e,t){"vpf"===e.namespace&&t.initPopupGallery()}),r()(document).on("destroy.vpf",function(e,t){"vpf"===e.namespace&&t.destroyPopupGallery()}),p.enable_on_wordpress_images&&r()(document).on("click","\n      .wp-block-image > a,\n      .wp-block-image > figure > a,\n      .wp-block-gallery .blocks-gallery-item > figure > a,\n      .wp-block-gallery .wp-block-image > a,\n      .wp-block-media-text > figure > a,\n      .gallery .gallery-icon > a,\n      figure.wp-caption > a,\n      figure.tiled-gallery__item > a,\n      p > a\n    ",function(e){if(!e.isDefaultPrevented()&&this.childNodes.length){var t=this.childNodes[0];if("NOSCRIPT"===t.nodeName&&this.childNodes[1]&&(t=this.childNodes[1]),("IMG"===t.nodeName||"PICTURE"===t.nodeName)&&d(this)){e.preventDefault();var o=r()(this),i=[],n=s(this),l=o.closest(".wp-block-gallery, .gallery, .tiled-gallery__gallery"),a=0;if(l.length){var p=l.find(".blocks-gallery-item > figure > a, .wp-block-image > a, .gallery-icon > a, figure.tiled-gallery__item > a"),c=0;p.each(function(){d(this)&&(this===n.linkEl&&(a=c),i.push(s(this)),c+=1)})}else i.push(n);u.open(i,a)}}})})();

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.