diff options
Diffstat (limited to 'plugins/jetpack/_inc/blocks/slideshow/view.js')
-rw-r--r-- | plugins/jetpack/_inc/blocks/slideshow/view.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/jetpack/_inc/blocks/slideshow/view.js b/plugins/jetpack/_inc/blocks/slideshow/view.js new file mode 100644 index 00000000..54ecab8e --- /dev/null +++ b/plugins/jetpack/_inc/blocks/slideshow/view.js @@ -0,0 +1 @@ +!function(t,e){for(var n in e)t[n]=e[n]}(window,function(t){function e(e){for(var n,r,o=e[0],s=e[1],a=0,c=[];a<o.length;a++)r=o[a],i[r]&&c.push(i[r][0]),i[r]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(t[n]=s[n]);for(u&&u(e);c.length;)c.shift()()}var n={},r={8:0},i={8:0};function o(e){if(n[e])return n[e].exports;var r=n[e]={i:e,l:!1,exports:{}};return t[e].call(r.exports,r,r.exports,o),r.l=!0,r.exports}o.e=function(t){var e=[];r[t]?e.push(r[t]):0!==r[t]&&{11:1}[t]&&e.push(r[t]=new Promise(function(e,n){for(var r="rtl"===document.dir?({11:"vendors~swiper"}[t]||t)+"."+{11:"59b62a96313990494c44"}[t]+".rtl.css":({11:"vendors~swiper"}[t]||t)+"."+{11:"59b62a96313990494c44"}[t]+".css",i=o.p+r,s=document.getElementsByTagName("link"),a=0;a<s.length;a++){var c=(f=s[a]).getAttribute("data-href")||f.getAttribute("href");if("stylesheet"===f.rel&&(c===r||c===i))return e()}var u=document.getElementsByTagName("style");for(a=0;a<u.length;a++){var f;if((c=(f=u[a]).getAttribute("data-href"))===r||c===i)return e()}var l=document.createElement("link");l.rel="stylesheet",l.type="text/css",l.setAttribute("data-webpack",!0),l.onload=e,l.onerror=function(e){var r=e&&e.target&&e.target.src||i,o=new Error("Loading CSS chunk "+t+" failed.\n("+r+")");o.request=r,n(o)},l.href=i,document.getElementsByTagName("head")[0].appendChild(l)}).then(function(){r[t]=0}));var n=i[t];if(0!==n)if(n)e.push(n[2]);else{var s=new Promise(function(e,r){n=i[t]=[e,r]});e.push(n[2]=s);var a,c=document.createElement("script");c.charset="utf-8",c.timeout=120,o.nc&&c.setAttribute("nonce",o.nc),c.src=function(t){return o.p+""+({11:"vendors~swiper"}[t]||t)+"."+{11:"59b62a96313990494c44"}[t]+".js"}(t),a=function(e){c.onerror=c.onload=null,clearTimeout(u);var n=i[t];if(0!==n){if(n){var r=e&&("load"===e.type?"missing":e.type),o=e&&e.target&&e.target.src,s=new Error("Loading chunk "+t+" failed.\n("+r+": "+o+")");s.type=r,s.request=o,n[1](s)}i[t]=void 0}};var u=setTimeout(function(){a({type:"timeout",target:c})},12e4);c.onerror=c.onload=a,document.head.appendChild(c)}return Promise.all(e)},o.m=t,o.c=n,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o.oe=function(t){throw console.error(t),t};var s=window.webpackJsonp=window.webpackJsonp||[],a=s.push.bind(s);s.push=e,s=s.slice();for(var c=0;c<s.length;c++)e(s[c]);var u=a;return o(o.s=260)}({21:function(t,e,n){var r=n(46),i=n(47),o=n(48);t.exports=function(t,e){return r(t)||i(t,e)||o()}},260:function(t,e,n){n(38),t.exports=n(261)},261:function(t,e,n){"use strict";n.r(e);var r=n(5),i=n(31),o=n(54),s=n(29);"undefined"!=typeof window&&window.addEventListener("load",function(){var t=document.getElementsByClassName("wp-block-jetpack-slideshow");Object(r.forEach)(t,function(t){var e=t.dataset,n=e.autoplay,r=e.delay,a=e.effect,c=window.matchMedia("(prefers-reduced-motion: reduce)").matches,u=n&&!c,f=t.getElementsByClassName("swiper-container")[0],l=null;Object(o.a)(f,{autoplay:!!u&&{delay:1e3*r,disableOnInteraction:!1},effect:a,init:!0,initialSlide:0,loop:!0,keyboard:{enabled:!0,onlyInViewport:!0}},{init:s.b,imagesReady:s.d,paginationRender:s.c,transitionEnd:s.a}).then(function(t){new i.a(function(){l&&(cancelAnimationFrame(l),l=null),l=requestAnimationFrame(function(){Object(s.d)(t),t.update()})}).observe(t.el)}).catch(function(){t.querySelector(".wp-block-jetpack-slideshow_container").classList.add("wp-swiper-initialized")})})})},29:function(t,e,n){"use strict";n.d(e,"a",function(){return l}),n.d(e,"b",function(){return u}),n.d(e,"c",function(){return d}),n.d(e,"d",function(){return f});var r=n(55),i=n(5),o=16/9,s=.8,a=600,c="wp-block-jetpack-slideshow_autoplay-paused";function u(t){f(t),l(t),t.el.querySelector(".wp-block-jetpack-slideshow_button-pause").addEventListener("click",function(){t.el&&(t.el.classList.contains(c)?(t.el.classList.remove(c),t.autoplay.start(),this.setAttribute("aria-label","Pause Slideshow")):(t.el.classList.add(c),t.autoplay.stop(),this.setAttribute("aria-label","Play Slideshow")))})}function f(t){if(t&&t.el){var e=t.el.querySelector('.swiper-slide[data-swiper-slide-index="0"] img');if(e){var n=e.clientWidth/e.clientHeight,r=Math.max(Math.min(n,o),1),i="undefined"!=typeof window?window.innerHeight*s:a,c=Math.min(t.width/r,i),u="".concat(Math.floor(c),"px"),f="".concat(Math.floor(c/2),"px");t.el.classList.add("wp-swiper-initialized"),t.wrapperEl.style.height=u,t.el.querySelector(".wp-block-jetpack-slideshow_button-prev").style.top=f,t.el.querySelector(".wp-block-jetpack-slideshow_button-next").style.top=f}}}function l(t){Object(i.forEach)(t.slides,function(e,n){e.setAttribute("aria-hidden",n===t.activeIndex?"false":"true"),n===t.activeIndex?e.setAttribute("tabindex","-1"):e.removeAttribute("tabindex")}),function(t){var e=t.slides[t.activeIndex];if(e){var n=e.getElementsByTagName("FIGCAPTION")[0],i=e.getElementsByTagName("IMG")[0];t.a11y.liveRegion&&(t.a11y.liveRegion[0].innerHTML=n?n.innerHTML:Object(r.escapeHTML)(i.alt))}}(t)}function d(t){Object(i.forEach)(t.pagination.bullets,function(e){e.addEventListener("click",function(){var e=t.slides[t.realIndex];setTimeout(function(){e.focus()},500)})})}},30:function(t,e,n){"object"==typeof window&&window.Jetpack_Block_Assets_Base_Url&&(n.p=window.Jetpack_Block_Assets_Base_Url)},31:function(t,e,n){"use strict";var r=function(){if("undefined"!=typeof Map)return Map;function t(t,e){var n=-1;return t.some(function(t,r){return t[0]===e&&(n=r,!0)}),n}return function(){function e(){this.__entries__=[]}return Object.defineProperty(e.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),e.prototype.get=function(e){var n=t(this.__entries__,e),r=this.__entries__[n];return r&&r[1]},e.prototype.set=function(e,n){var r=t(this.__entries__,e);~r?this.__entries__[r][1]=n:this.__entries__.push([e,n])},e.prototype.delete=function(e){var n=this.__entries__,r=t(n,e);~r&&n.splice(r,1)},e.prototype.has=function(e){return!!~t(this.__entries__,e)},e.prototype.clear=function(){this.__entries__.splice(0)},e.prototype.forEach=function(t,e){void 0===e&&(e=null);for(var n=0,r=this.__entries__;n<r.length;n++){var i=r[n];t.call(e,i[1],i[0])}},e}()}(),i="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(t){return setTimeout(function(){return t(Date.now())},1e3/60)},a=2;var c=20,u=["top","right","bottom","left","width","height","size","weight"],f="undefined"!=typeof MutationObserver,l=function(){function t(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(t,e){var n=!1,r=!1,i=0;function o(){n&&(n=!1,t()),r&&u()}function c(){s(o)}function u(){var t=Date.now();if(n){if(t-i<a)return;r=!0}else n=!0,r=!1,setTimeout(c,e);i=t}return u}(this.refresh.bind(this),c)}return t.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},t.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},t.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},t.prototype.updateObservers_=function(){var t=this.observers_.filter(function(t){return t.gatherActive(),t.hasActive()});return t.forEach(function(t){return t.broadcastActive()}),t.length>0},t.prototype.connect_=function(){i&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),f?(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)},t.prototype.disconnect_=function(){i&&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)},t.prototype.onTransitionEnd_=function(t){var e=t.propertyName,n=void 0===e?"":e;u.some(function(t){return!!~n.indexOf(t)})&&this.refresh()},t.getInstance=function(){return this.instance_||(this.instance_=new t),this.instance_},t.instance_=null,t}(),d=function(t,e){for(var n=0,r=Object.keys(e);n<r.length;n++){var i=r[n];Object.defineProperty(t,i,{value:e[i],enumerable:!1,writable:!1,configurable:!0})}return t},h=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||o},p=_(0,0,0,0);function v(t){return parseFloat(t)||0}function b(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.reduce(function(e,n){return e+v(t["border-"+n+"-width"])},0)}function m(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return p;var r=h(t).getComputedStyle(t),i=function(t){for(var e={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var i=r[n],o=t["padding-"+i];e[i]=v(o)}return e}(r),o=i.left+i.right,s=i.top+i.bottom,a=v(r.width),c=v(r.height);if("border-box"===r.boxSizing&&(Math.round(a+o)!==e&&(a-=b(r,"left","right")+o),Math.round(c+s)!==n&&(c-=b(r,"top","bottom")+s)),!function(t){return t===h(t).document.documentElement}(t)){var u=Math.round(a+o)-e,f=Math.round(c+s)-n;1!==Math.abs(u)&&(a-=u),1!==Math.abs(f)&&(c-=f)}return _(i.left,i.top,a,c)}var w="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof h(t).SVGGraphicsElement}:function(t){return t instanceof h(t).SVGElement&&"function"==typeof t.getBBox};function y(t){return i?w(t)?function(t){var e=t.getBBox();return _(0,0,e.width,e.height)}(t):m(t):p}function _(t,e,n,r){return{x:t,y:e,width:n,height:r}}var g=function(){function t(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=_(0,0,0,0),this.target=t}return t.prototype.isActive=function(){var t=y(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},t.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t},t}(),E=function(){return function(t,e){var n,r,i,o,s,a,c,u=(r=(n=e).x,i=n.y,o=n.width,s=n.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,c=Object.create(a.prototype),d(c,{x:r,y:i,width:o,height:s,top:i,right:r+o,bottom:s+i,left:r}),c);d(this,{target:t,contentRect:u})}}(),O=function(){function t(t,e,n){if(this.activeObservations_=[],this.observations_=new r,"function"!=typeof t)throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=t,this.controller_=e,this.callbackCtx_=n}return t.prototype.observe=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof h(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new g(t)),this.controller_.addObserver(this),this.controller_.refresh())}},t.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if("undefined"!=typeof Element&&Element instanceof Object){if(!(t instanceof h(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)&&(e.delete(t),e.size||this.controller_.removeObserver(this))}},t.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},t.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(e){e.isActive()&&t.activeObservations_.push(e)})},t.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map(function(t){return new E(t.target,t.broadcastRect())});this.callback_.call(t,e,t),this.clearActive()}},t.prototype.clearActive=function(){this.activeObservations_.splice(0)},t.prototype.hasActive=function(){return this.activeObservations_.length>0},t}(),x="undefined"!=typeof WeakMap?new WeakMap:new r,M=function(){return function t(e){if(!(this instanceof t))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(),r=new O(e,n,this);x.set(this,r)}}();["observe","unobserve","disconnect"].forEach(function(t){M.prototype[t]=function(){var e;return(e=x.get(this))[t].apply(e,arguments)}});var k=void 0!==o.ResizeObserver?o.ResizeObserver:M;e.a=k},37:function(t,e){function n(t,e,n,r,i,o,s){try{var a=t[o](s),c=a.value}catch(u){return void n(u)}a.done?e(c):Promise.resolve(c).then(r,i)}t.exports=function(t){return function(){var e=this,r=arguments;return new Promise(function(i,o){var s=t.apply(e,r);function a(t){n(s,i,o,a,c,"next",t)}function c(t){n(s,i,o,a,c,"throw",t)}a(void 0)})}}},38:function(t,e,n){"use strict";n.r(e);n(30)},46:function(t,e){t.exports=function(t){if(Array.isArray(t))return t}},47:function(t,e){t.exports=function(t,e){var n=[],r=!0,i=!1,o=void 0;try{for(var s,a=t[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(c){i=!0,o=c}finally{try{r||null==a.return||a.return()}finally{if(i)throw o}}return n}},48:function(t,e){t.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}},5:function(t,e){t.exports=lodash},54:function(t,e,n){"use strict";n.d(e,"a",function(){return c});var r=n(21),i=n.n(r),o=n(37),s=n.n(o),a=n(5);n(82);function c(){return u.apply(this,arguments)}function u(){return(u=s()(regeneratorRuntime.mark(function t(){var e,r,o,s,c,u,f,l=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=l.length>0&&void 0!==l[0]?l[0]:".swiper-container",r=l.length>1&&void 0!==l[1]?l[1]:{},o=l.length>2&&void 0!==l[2]?l[2]:{},s={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"},preventClicksPropagation:!1,releaseFormElements:!1,setWrapperSize:!0,touchStartPreventDefault:!1,on:Object(a.mapValues)(o,function(t){return function(){t(this)}})},t.next=6,Promise.all([n.e(11).then(n.t.bind(null,226,7)),n.e(11).then(n.t.bind(null,227,7))]);case 6:return c=t.sent,u=i()(c,1),f=u[0].default,t.abrupt("return",new f(e,Object(a.merge)({},s,r)));case 10:case"end":return t.stop()}},t)}))).apply(this,arguments)}},55:function(t,e){t.exports=wp.escapeHtml},82:function(t,e,n){}}));
\ No newline at end of file |