← Back
Editing: view.js
(()=>{var e={58203(){},94107(e,t,n){"use strict";var i=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var n=-1;return e.some(function(e,i){return e[0]===t&&(n=i,!0)}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),i=this.__entries__[n];return i&&i[1]},t.prototype.set=function(t,n){var i=e(this.__entries__,t);~i?this.__entries__[i][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,i=e(n,t);~i&&n.splice(i,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,i=this.__entries__;n<i.length;n++){var r=i[n];e.call(t,r[1],r[0])}},t}()}(),r="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,o="undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),s="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(o):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)};var a=["top","right","bottom","left","width","height","size","weight"],c="undefined"!=typeof MutationObserver,l=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e,t){var n=!1,i=!1,r=0;function o(){n&&(n=!1,e()),i&&c()}function a(){s(o)}function c(){var e=Date.now();if(n){if(e-r<2)return;i=!0}else n=!0,i=!1,setTimeout(a,t);r=e}return c}(this.refresh.bind(this),20)}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},e.prototype.connect_=function(){r&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),c?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){r&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;a.some(function(e){return!!~n.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),u=function(e,t){for(var n=0,i=Object.keys(t);n<i.length;n++){var r=i[n];Object.defineProperty(e,r,{value:t[r],enumerable:!1,writable:!1,configurable:!0})}return e},d=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||o},h=_(0,0,0,0);function p(e){return parseFloat(e)||0}function f(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(t,n){return t+p(e["border-"+n+"-width"])},0)}function w(e){var t=e.clientWidth,n=e.clientHeight;if(!t&&!n)return h;var i=d(e).getComputedStyle(e),r=function(e){for(var t={},n=0,i=["top","right","bottom","left"];n<i.length;n++){var r=i[n],o=e["padding-"+r];t[r]=p(o)}return t}(i),o=r.left+r.right,s=r.top+r.bottom,a=p(i.width),c=p(i.height);if("border-box"===i.boxSizing&&(Math.round(a+o)!==t&&(a-=f(i,"left","right")+o),Math.round(c+s)!==n&&(c-=f(i,"top","bottom")+s)),!function(e){return e===d(e).document.documentElement}(e)){var l=Math.round(a+o)-t,u=Math.round(c+s)-n;1!==Math.abs(l)&&(a-=l),1!==Math.abs(u)&&(c-=u)}return _(r.left,r.top,a,c)}var b="undefined"!=typeof SVGGraphicsElement?function(e){return e instanceof d(e).SVGGraphicsElement}:function(e){return e instanceof d(e).SVGElement&&"function"==typeof e.getBBox};function v(e){return r?b(e)?function(e){var t=e.getBBox();return _(0,0,t.width,t.height)}(e):w(e):h}function _(e,t,n,i){return{x:e,y:t,width:n,height:i}}var m=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=_(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=v(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),y=function(e,t){var n,i,r,o,s,a,c,l=(i=(n=t).x,r=n.y,o=n.width,s=n.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,c=Object.create(a.prototype),u(c,{x:i,y:r,width:o,height:s,top:r,right:i+o,bottom:s+r,left:i}),c);u(this,{target:e,contentRect:l})},g=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new i,"function"!=typeof e)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof d(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new m(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(e instanceof d(e).Element))throw new TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new y(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),k="undefined"!=typeof WeakMap?new WeakMap:new i,E=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=l.getInstance(),i=new g(t,n,this);k.set(this,i)};["observe","unobserve","disconnect"].forEach(function(e){E.prototype[e]=function(){var t;return(t=k.get(this))[e].apply(t,arguments)}});const A=void 0!==o.ResizeObserver?o.ResizeObserver:E;n.d(t,["A",0,A])},33170(e,t,n){"use strict";n.d(t,{A:()=>i});n(58203);async function i(e=".wp-block-jetpack-slideshow_container",t={},n={}){const i={a11y:{slideRole:"listitem"},effect:"slide",grabCursor:!0,init:!0,initialSlide:0,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{bulletElement:"button",clickable:!0,el:".swiper-pagination",type:"bullets"},preventClicks:!1,preventClicksPropagation:!1,releaseFormElements:!1,setWrapperSize:!0,threshold:5,touchStartPreventDefault:!1,on:Object.fromEntries(Object.entries(n||{}).map(([e,t])=>[e,function(){t(this)}]))};let r;if(window.JetpackSwiper)r=window.JetpackSwiper;else{const e=window.Jetpack_Block_Assets_Base_Url+"swiper.css";if(!document.querySelector(`link[href="${e}"]`)){const t=document.createElement("link");t.rel="stylesheet",t.href=e,document.head.appendChild(t)}if(await(import(window.Jetpack_Block_Assets_Base_Url+"swiper.js")),!window.JetpackSwiper)throw new Error("Failed to load Jetpack Swiper bundle");r=window.JetpackSwiper}return new r(e,{...i,...t})}},30889(e,t,n){"use strict";n.d(t,{y:()=>r});var i=n(27723);const __=i.__;function r(e,t,n){let r="";if(n<=5)for(let e=1;e<=n;e++){r+='<button class="'+`swiper-pagination-bullet${e===t?" swiper-pagination-bullet-active":""}`+'" tab-index="0" role="button" aria-label="'+(0,i.sprintf)(/* translators: %s: the slide number to navigate to */ __("Go to slide %s","jetpack"),e)+'"></button>'}else r+=`<div class="swiper-pagination-simple">${t} / ${n}</div>`;return r}},34308(e,t,n){"use strict";n.d(t,{WF:()=>c,bz:()=>a,n7:()=>l,rQ:()=>s});var i=n(89877);const r=16/9,o="wp-block-jetpack-slideshow_autoplay-paused";function s(e){e.slides.length>1&&(e.loopDestroy(),e.params.loop=!0,e.loopCreate(),e.update()),a(e),c(e),e.el.querySelector(".wp-block-jetpack-slideshow_button-pause").addEventListener("click",function(){e.el&&(e.el.classList.contains(o)?(e.el.classList.remove(o),e.autoplay.start(),this.setAttribute("aria-label","Pause Slideshow")):(e.el.classList.add(o),e.autoplay.stop(),this.setAttribute("aria-label","Play Slideshow")))})}function a(e){if(!e||!e.el)return;const t=e.params.loop?e.el.querySelector('.swiper-slide[data-swiper-slide-index="0"] img'):e.el.querySelector(".swiper-slide img");if(!t)return;let n;if(t.naturalWidth>0&&t.naturalHeight>0)n=t.naturalWidth/t.naturalHeight;else if(t.dataset.aspectRatio){const e=t.dataset.aspectRatio.match(/(\d+) \/ (\d+)/);e&&e[1]&&e[2]&&(n=parseInt(e[1],10)/parseInt(e[2],10))}else t.getAttribute("width")&&t.getAttribute("height")&&(n=parseInt(t.getAttribute("width"),10)/parseInt(t.getAttribute("height"),10));n||(n=r,t.complete||t.addEventListener("load",()=>a(e),{once:!0}));const i=Math.max(Math.min(n,r),1),o="undefined"!=typeof window?.8*window.innerHeight:600,s=Math.min(e.width/i,o),c=`${Math.floor(s)}px`,l=`${Math.floor(s/2)}px`;e.el.classList.add("wp-swiper-initialized"),e.wrapperEl.style.height=c,e.el.querySelector(".wp-block-jetpack-slideshow_button-prev").style.top=l,e.el.querySelector(".wp-block-jetpack-slideshow_button-next").style.top=l}function c(e){(e.slides||[]).forEach((t,n)=>{t.setAttribute("aria-hidden",n===e.activeIndex?"false":"true"),n===e.activeIndex?t.setAttribute("tabindex","-1"):t.removeAttribute("tabindex")}),function(e){const t=e.slides[e.activeIndex];if(!t)return;const n=t.getElementsByTagName("FIGCAPTION")[0],r=t.getElementsByTagName("IMG")[0];e.a11y.liveRegion&&(e.a11y.liveRegion[0].innerHTML=n?n.innerHTML:(0,i.escapeHTML)(r.alt))}(e)}function l(e){(e.pagination.bullets||[]).forEach(t=>{t.addEventListener("click",()=>{const t=e.slides[e.realIndex];setTimeout(()=>{t.focus()},500)})})}},63728(e,t,n){"use strict";function i(){const e=(e,t)=>{const n=e.querySelector(".wp-site-blocks");if(!n)return;const{paddingLeft:i,paddingRight:r}=window.getComputedStyle(n),o=parseFloat(i)+parseFloat(r);e.querySelectorAll(t?".wp-block-group.is-vertical:not(.is-layout-constrained) .wp-block-jetpack-slideshow":".wp-block-group.is-vertical:not(.is-layout-constrained) .wp-block-jetpack-slideshow:not(.entry-content .wp-block-jetpack-slideshow)").forEach(e=>{e.style.maxWidth=`calc(100vw - ${o}px)`})};e(document,!1);document.querySelectorAll("iframe").forEach(t=>{const n=t.contentDocument,i=t.closest("#editor");if(n&&i){n.querySelectorAll(".wp-block-group.is-vertical:not(.is-layout-constrained) .wp-block-jetpack-slideshow").forEach(e=>{e.style.maxWidth="inherit"})}else n&&e(n,!0)})}n.d(t,{A:()=>i})},79366(e,t,n){"object"==typeof window&&window.Jetpack_Block_Assets_Base_Url&&(n.p=window.Jetpack_Block_Assets_Base_Url)},98490(e){"use strict";e.exports=window.wp.domReady},89877(e){"use strict";e.exports=window.wp.escapeHtml},27723(e){"use strict";e.exports=window.wp.i18n}};const t={};function n(i){const r=t[i];if(void 0!==r)return r.exports;const o=t[i]={exports:{}};return e[i](o,o.exports,n),o.exports}n.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{if(Array.isArray(t))for(var i=0;i<t.length;){var r=t[i++],o=t[i++],s=0===o?{enumerable:!0,value:t[i++]}:{enumerable:!0,get:o};n.o(e,r)||Object.defineProperty(e,r,s)}else for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.hasOwn(e,t),(()=>{"use strict";n(79366)})(),(()=>{"use strict";var e=n(98490),t=n.n(e),i=n(94107),r=n(33170),o=n(30889),s=n(34308),a=n(63728);"undefined"!=typeof window&&t()(function(){(0,a.A)();const e=document.getElementsByClassName("wp-block-jetpack-slideshow");Array.from(e).forEach(e=>{if("true"===e.getAttribute("data-jetpack-block-initialized"))return;const{autoplay:t,delay:n,effect:a}=e.dataset,c=window.matchMedia("(prefers-reduced-motion: reduce)").matches,l=t&&!c,u=e.querySelector(".wp-block-jetpack-slideshow_container");let d=null;(0,r.A)(u,{autoplay:!!l&&{delay:1e3*n,disableOnInteraction:!1},effect:a,init:!0,initialSlide:0,loop:!1,keyboard:{enabled:!0,onlyInViewport:!0},pagination:{el:".swiper-pagination",clickable:!0,type:"custom",renderCustom:o.y}},{init:s.rQ,imagesReady:s.bz,paginationRender:s.n7,transitionEnd:s.WF}).then(e=>{new i.A(()=>{d&&(cancelAnimationFrame(d),d=null),d=requestAnimationFrame(()=>{(0,s.bz)(e),e.update()})}).observe(e.el)}).catch(()=>{e.querySelector(".wp-block-jetpack-slideshow_container").classList.add("wp-swiper-initialized")}),e.setAttribute("data-jetpack-block-initialized","true")})})})()})();
Save File
Cancel