PageSourceSearch

https://www.bistrotpierre.co.uk/propeller/themes/propeller/assets/HTML5.d074109d609499b75b02.js

js bistrotpierre.co.uk collected 2026-09-26 10:39:31 UTC 7,158 bytes, 1 lines download raw bytes

1(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{170:function(e,t,i){"use strict";i.d(t,"a",function(){return r});var n=i(153),o=i.n(n);function a(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var r=function(){function e(t,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.siteManager=t,this.element=i,this.element.VideoInstance=this,this.autoplay=parseInt(i.getAttribute("data-autoplay"),10)||0,this.checkInViewport=!0,this.delayAutoplay=i.getAttribute("data-delay-autoplay")||!1,this.loopVideo=parseInt(i.getAttribute("data-loop-video"),10)||0,this.overlayElements=[],this.canResetVideo=parseInt(i.getAttribute("data-reset-video"),10)||0,this.standalone=i.getAttribute("data-standalone")||!1,this.subscribeResize=i.getAttribute("data-subscribe-resize")||!1,this.videoContainer=i.querySelector(".js-video-container"),this.videoEl=void 0,this.videoReady=!1,this.videoStatus=this.autoplay?"playing":"paused",this.waitForVideo=parseInt(i.getAttribute("data-wait-for-video"),10)||0,this.videoWidth=void 0,this.videoHeight=void 0,this.videoEndedCallback=void 0;var n=[];this.autoplay||(n=["js-content","js-overlay"]),this.findOverlayElements(n)}var t,i,n;return t=e,(i=[{key:"playerReady",value:function(){var e=this;this.element.classList.contains("js-video-cover")&&this.updateSize(),this.subscribeResize&&this.siteManager.addSubscriber("resize",function(){return e.updateSize()}),this.videoReady=!0,this.autoplay&&(this.delayAutoplay||this.playVideo(),this.delayAutoplay&&(this.delayAutoplay=!1)),this.standalone&&(this.isInViewport(this.element,!1),this.siteManager.addSubscriber("scroll",function(){return e.isInViewport(e.element)}))}},{key:"playVideo",value:function(){this.videoStatus="playing",this.hideOverlayElements()}},{key:"pauseVideo",value:function(){this.videoStatus="paused",this.showOverlayElements()}},{key:"findOverlayElements",value:function(e){var t=this.element.querySelectorAll(".js-video-image"),i=this.element.getAttribute("data-scope-id");if(t.length>0)for(var n=0;n<t.length;n++)this.overlayElements.push(t[n]);if(i)for(var o=0;o<e.length;o++){var a=document.querySelector(".".concat(e[o],'[data-scope-id="').concat(i,'"]'));a&&this.overlayElements.push(a)}}},{key:"hideOverlayElements",value:function(){var e=this;this.videoContainer.classList.remove("is-hidden"),setTimeout(function(){if("playing"===e.videoStatus)for(var t=0;t<e.overlayElements.length;t++){e.overlayElements[t].classList.add("is-hidden");var i=e.overlayElements[t].querySelector(".js-video-trigger");i&&i.classList.add("is-playing")}},1e3)}},{key:"showOverlayElements",value:function(){for(var e=0;e<this.overlayElements.length;e++){this.overlayElements[e].classList.remove("is-hidden");var t=this.overlayElements[e].querySelector(".js-video-trigger");t&&t.classList.remove("is-playing")}this.videoContainer.classList.add("is-hidden")}},{key:"updateSize",value:function(){if(this.videoWidth&&this.videoHeight){var e=this.element.clientWidth/this.videoWidth,t=this.element.clientHeight/this.videoHeight,i=1;e>=t?(i=t,this.element.clientWidth>this.videoWidth*t&&(i=e)):(i=e,this.element.clientHeight>this.videoHeight*e&&(i=t)),this.videoEl.style.width="".concat(this.videoWidth*i,"px"),this.videoEl.style.height="".concat(this.videoHeight*i,"px")}}},{key:"isInViewport",value:function(e){var t=this,i=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.checkInViewport){var n;this.checkInViewport=!1;var a=function(){var e="playing"!==t.videoStatus;n?e&&t.autoplay&&t.playVideo():e||t.pauseVideo()};i?setTimeout(function(){n=o()(e),a(),t.checkInViewport=!0},300):(n=o()(e),a(),this.checkInViewport=!0)}}}])&&a(t.prototype,i),n&&a(t,n),e}()},65:function(e,t,i){"use strict";i.r(t),i.d(t,"default",function(){return c});var n=i(170);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})(e)}function a(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function r(e,t,i){return(r="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,i){var n=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=u(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(i):o.value}})(e,t,i||e)}
1function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function l(e){return function(){var t,i=u(e);if(function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}()){var n=u(this).constructor;t=Reflect.construct(i,arguments,n)}else t=i.apply(this,arguments);return function(e,t){if(t&&("object"===o(t)||"function"==typeof t))return t;return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(this,t)}}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var c=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(d,n["a"]);var t,i,o,c=l(d);function d(e,t){var i;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,d),(i=c.call(this,e,t)).createPlayer(),i}return t=d,(i=[{key:"createPlayer",value:function(){var e=this;this.videoContainer&&(this.videoEl=this.videoContainer.querySelector("video"),this.player=this.videoEl,this.player&&(this.player.readyState<=3?this.player.addEventListener("canplay",function(){return r(u(d.prototype),"playerReady",e).call(e)}):r(u(d.prototype),"playerReady",this).call(this),this.player.addEventListener("ended",function(){e.videoEndedCallback?e.videoEndedCallback():e.loopVideo?(e.player.currentTime=1,e.player.play()):e.autoplay||"paused"!==e.videoStatus&&(e.videoStatus="paused",e.showOverlayElements())}),this.player.addEventListener("click",function(){"paused"!==e.videoStatus&&(e.videoStatus="paused",e.showOverlayElements())})))}},{key:"playVideo",value:function(){this.autoplay&&(this.player.muted=!0),this.player.play(),r(u(d.prototype),"playVideo",this).call(this)}},{key:"pauseVideo",value:function(){r(u(d.prototype),"pauseVideo",this).call(this),this.player.pause()}},{key:"resetVideo",value:function(){this.pauseVideo(),this.player.currentTime=0}},{key:"updateSize",value:function(){this.videoWidth&&this.videoHeight||(this.videoWidth=this.player.videoWidth,this.videoHeight=this.player.videoHeight),r(u(d.prototype),"updateSize",this).call(this)}}])&&a(t.prototype,i),o&&a(t,o),d}()}}]);

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.