PageSourceSearch

https://www.isaaclord.co.uk/_next/static/chunks/reactPlayerYouTube.1f228addef89196a.js

js isaaclord.co.uk collected 2026-10-05 10:29:59 UTC 13,421 bytes, 11 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4439],{66404:function(t,e,n){n.d(e,{E:function(){return i}});function i(t,e){if(e.has(t))throw TypeError("Cannot initialize the same private elements twice on an object")}},12529:function(t,e,n){n.d(e,{e:function(){return i}});function i(t,e){return e.get?e.get.call(t):e.value}},73843:function(t,e,n){n.d(e,{y:function(){return i}});function i(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw TypeError("attempted to set read only private field");e.value=n}}},274:function(t,e,n){n.d(e,{J:function(){return i}});function i(t,e,n){if(!e.has(t))throw TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}},80127:function(t,e,n){n.d(e,{_:function(){return a}});var i=n(12529),r=n(274);function a(t,e){var n=(0,r.J)(t,e,"get");return(0,i.e)(t,n)}},34781:function(t,e,n){n.d(e,{_:function(){return r}});var i=n(66404);function r(t,e,n){(0,i.E)(t,e),e.set(t,n)}},61165:function(t,e,n){n.d(e,{_:function(){return a}});var i=n(73843),r=n(274);function a(t,e,n){var a=(0,r.J)(t,e,"set");return(0,i.y)(t,a,n),n}},13229:function(t,e,n){n.d(e,{_:function(){return i}});function i(t,e,n){if(!e.has(t))throw TypeError("attempted to get private field on non-instance");return n}},87271:function(t,e,n){n.d(e,{_:function(){return r}});var i=n(66404);function r(t,e){(0,i.E)(t,e),e.add(t)}},40130:function(t,e,n){n.r(e),n.d(e,{default:function(){return H}});var i,r=n(64090),a=n(80127),s=n(34781),o=n(61165),l=n(13229),u=n(87271);let h=/(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})/,c=/(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/.*?[?&]list=)([\w_-]+)/;function d(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={src:p(t,e),frameborder:0,width:"100%",height:"100%",allow:"accelerometer; fullscreen; autoplay; encrypted-media; gyroscope; picture-in-picture"};return e.config&&(n["data-config"]=JSON.stringify(e.config)),"\n    <style>\n      :host {\n        display: inline-block;\n        line-height: 0;\n        position: relative;\n        min-width: 300px;\n        min-height: 150px;\n      }\n      iframe {\n        position: absolute;\n        top: 0;\n        left: 0;\n      }\n    </style>\n    <iframe".concat(function(t){let e="";for(let n in t){let i=t[n];""===i?e+=" ".concat(T(n)):e+=" ".concat(T(n),'="').concat(T("".concat(i)),'"')}return e}(n),"></iframe>\n  ")}function p(t,e){var n;if(!t.src)return;let i=t.src.includes("-nocookie")?"https://www.youtube-nocookie.com/embed":"https://www.youtube.com/embed",r={controls:""===t.controls?null:0,autoplay:t.autoplay,loop:t.loop,mute:t.muted,playsinline:t.playsinline,preload:null!==(n=t.preload)&&void 0!==n?n:"metadata",enablejsapi:1,showinfo:0,rel:0,iv_load_policy:3,modestbranding:1,...e.config};if(h.test(t.src)){let e=t.src.match(h),n=e&&e[1];return"".concat(i,"/").concat(n,"?").concat(L(r))}let a=t.src.match(c),s={listType:"playlist",list:a&&a[1],...r};return"".concat(i,"?").concat(L(s))}var v=new WeakMap,f=new WeakMap,m=new WeakMap,g=new WeakMap,y=new WeakMap,w=new WeakMap,b=new WeakMap,E=new WeakSet;class _ extends(null!==(i=globalThis.HTMLElement)&&void 0!==i?i:class{}){get config(){return(0,a._)(this,b)}set config(t){(0,o._)(this,b,t)}async load(){let t;if((0,a._)(this,v))return;this.shadowRoot||this.attachShadow({mode:"open"});let e=!(0,a._)(this,f);(0,a._)(this,f)&&(this.loadComplete=new P,this.isLoaded=!1),(0,o._)(this,f,!0),await (0,o._)(this,v,Promise.resolve()),(0,o._)(this,v,null),(0,o._)(this,m,0),this.dispatchEvent(new Event("emptied"));let n=this.api;if(this.api=null,!this.src){null==n||n.destroy();return}this.dispatchEvent(new Event("loadstart"));let i=this.shadowRoot.querySelector("iframe"),r=function(t){let e={};for(let n of t)e[n.name]=n.value;return e}(this.attributes);e&&i&&(0,o._)(this,b,JSON.parse(i.getAttribute("data-config")||"{}")),(null==i?void 0:i.src)&&i.src===p(r,this)||(this.shadowRoot.innerHTML=d(r,this),i=this.shadowRoot.querySelector("iframe"));let s=await C("https://www.youtube.com/iframe_api","YT","onYouTubeIframeAPIReady");this.api=new s.Player(i,{events:{onReady:()=>{(0,o._)(this,m,1),this.dispatchEvent(new Event("loadedmetadata")),this.dispatchEvent(new Event("durationchange")),this.dispatchEvent(new Event("volumechange")),this.dispatchEvent(new Event("loadcomplete")),this.isLoaded=!0,this.loadComplete.resolve()},onError:t=>{console.error(t),(0,o._)(this,w,{code:t.data,message:"YouTube iframe player error #".concat(t.data,"; visit https://developers.google.com/youtube/iframe_api_reference#onError for the full error message.")}),this.dispatchEvent(new Event("error"))}}});let l=!1;this.api.addEventListener("onStateChange",t=>{var e;let n=t.data;if(n!==s.PlayerState.PLAYING&&n!==s.PlayerState.BUFFERING||l||(l=!0,this.dispatchEvent(new Event("play"))),n===s.PlayerState.PLAYING)this.seeking&&((0,o._)(this,g,!1),null==(e=(0,a._)(this,y))||e.resolve(),this.dispatchEvent(new Event("seeked"))),(0,o._)(this,m,3),this.dispatchEvent(new Event("playing"));else if(n===s.PlayerState.PAUSED){let t=Math.abs(this.currentTime-u);!this.seeking&&t>.1&&((0,o._)(this,g,!0),this.dispatchEvent(new Event("seeking"))),l=!1,this.dispatchEvent(new Event("pause"))}n===s.PlayerState.ENDED&&(l=!1,this.dispatchEvent(new Event("pause")),this.dispatchEvent(new Event("ended")),this.loop&&this.play())}),this.api.addEventListener("onPlaybackRateChange",()=>{this.dispatchEvent(new Event("ratechange"))}),this.api.addEventListener("onVolumeChange",()=>{this.dispatchEvent(new Event("volumechange"))}),this.api.addEventListener("onVideoProgress",()=>{this.dispatchEvent(new Event("timeupdate"))}),await this.loadComplete;let u=0;setInterval(()=>{var t;let e=Math.abs(this.currentTime-u),n=this.buffered.end(this.buffered.length-1);this.seeking&&n>.1?((0,o._)(this,g,!1),null==(t=(0,a._)(this,y))||t.resolve(),this.dispatchEvent(new Event("seeked"))):!this.seeking&&e>.1&&((0,o._)(this,g,!0),this.dispatchEvent(new Event("seeking"))),u=this.currentTime},50);let h=setInterval(()=>{let e=this.buffered.end(this.buffered.length-1);e>=this.duration&&(clearInterval(h),(0,o._)(this,m,4)),t!=e&&(t=e,this.dispatchEvent(new Event("progress")))},100)}async attributeChangedCallback(t,e,n){if(e!==n)switch(t){case"src":case"auto
1play":case"controls":case"loop":case"playsinline":this.load()}}async play(){var t,e,n;return(0,o._)(this,y,null),await this.loadComplete,null==(t=this.api)||t.playVideo(),e=this,(n=(t,n)=>{let i;e.addEventListener(t,i=()=>{e.removeEventListener(t,i),n()})},function(){for(var t=arguments.length,e=Array(t),i=0;i<t;i++)e[i]=arguments[i];return new Promise(t=>{n(...e,function(){for(var e=arguments.length,n=Array(e),i=0;i<e;i++)n[i]=arguments[i];n.length>1?t(n):t(n[0])})})})("playing")}async pause(){var t;return await this.loadComplete,null==(t=this.api)?void 0:t.pauseVideo()}get seeking(){return(0,a._)(this,g)}get readyState(){return(0,a._)(this,m)}get src(){return this.getAttribute("src")}set src(t){this.src!=t&&this.setAttribute("src",t)}get error(){return(0,a._)(this,w)}get paused(){var t,e;return this.isLoaded?[-1,0,2,5].includes(null==(e=null==(t=this.api)?void 0:t.getPlayerState)?void 0:e.call(t)):!this.autoplay}get duration(){var t,e,n;return null!==(n=null==(e=null==(t=this.api)?void 0:t.getDuration)?void 0:e.call(t))&&void 0!==n?n:NaN}get autoplay(){return this.hasAttribute("autoplay")}set autoplay(t){this.autoplay!=t&&this.toggleAttribute("autoplay",!!t)}get buffered(){var t,e;if(!this.isLoaded)return S();let n=(null==(t=this.api)?void 0:t.getVideoLoadedFraction())*(null==(e=this.api)?void 0:e.getDuration());return n>0?S(0,n):S()}get controls(){return this.hasAttribute("controls")}set controls(t){this.controls!=t&&this.toggleAttribute("controls",!!t)}get currentTime(){var t,e,n;return null!==(n=null==(e=null==(t=this.api)?void 0:t.getCurrentTime)?void 0:e.call(t))&&void 0!==n?n:0}set currentTime(t){this.currentTime!=t&&((0,o._)(this,y,new P),this.loadComplete.then(()=>{var e,n;null==(e=this.api)||e.seekTo(t,!0),this.paused&&(null==(n=(0,a._)(this,y))||n.then(()=>{var t;(0,a._)(this,y)&&(null==(t=this.api)||t.pauseVideo())}))}))}set defaultMuted(t){this.defaultMuted!=t&&this.toggleAttribute("muted",!!t)}get defaultMuted(){return this.hasAttribute("muted")}get loop(){return this.hasAttribute("loop")}set loop(t){this.loop!=t&&this.toggleAttribute("loop",!!t)}set muted(t){this.muted!=t&&this.loadComplete.then(()=>{var e,n;t?null==(e=this.api)||e.mute():null==(n=this.api)||n.unMute()})}get muted(){var t,e;return this.isLoaded?null==(e=null==(t=this.api)?void 0:t.isMuted)?void 0:e.call(t):this.defaultMuted}get playbackRate(){var t,e,n;return null!==(n=null==(e=null==(t=this.api)?void 0:t.getPlaybackRate)?void 0:e.call(t))&&void 0!==n?n:1}set playbackRate(t){this.playbackRate!=t&&this.loadComplete.then(()=>{var e;null==(e=this.api)||e.setPlaybackRate(t)})}get playsInline(){return this.hasAttribute("playsinline")}set playsInline(t){this.playsInline!=t&&this.toggleAttribute("playsinline",!!t)}get poster(){return this.getAttribute("poster")}set poster(t){this.poster!=t&&this.setAttribute("poster","".concat(t))}set volume(t){this.volume!=t&&this.loadComplete.then(()=>{var e;null==(e=this.api)||e.setVolume(100*t)})}get volume(){var t;return this.isLoaded?(null==(t=this.api)?void 0:t.getVolume())/100:1}constructor(){super(),(0,u._)(this,E),(0,s._)(this,v,{writable:!0,value:void 0}),(0,s._)(this,f,{writable:!0,value:void 0}),(0,s._)(this,m,{writable:!0,value:void 0}),(0,s._)(this,g,{writable:!0,value:void 0}),(0,s._)(this,y,{writable:!0,value:void 0}),(0,s._)(this,w,{writable:!0,value:void 0}),(0,s._)(this,b,{writable:!0,value:void 0}),this.loadComplete=new P,(0,o._)(this,m,0),(0,o._)(this,g,!1),this.isLoaded=!1,(0,o._)(this,w,null),(0,o._)(this,b,null),(0,l._)(this,E,k).call(this,"config")}}function k(t){if(Object.prototype.hasOwnProperty.call(this,t)){let e=this[t];delete this[t],this[t]=e}}function T(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/`/g,"&#x60;")}function L(t){return String(new URLSearchParams(function(t){let e={};for(let n in t){let i=t[n];!0===i||""===i?e[n]=1:!1===i?e[n]=0:null!=i&&(e[n]=i)}return e}(t)))}_.getTemplateHTML=d,_.shadowRootOptions={mode:"open"},_.observedAttributes=["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src"];let A={};async function C(t,e,n){return A[t]?A[t]:e&&self[e]?(await M(0),self[e]):A[t]=new Promise(function(i,r){let a=document.createElement("script");a.src=t;let s=()=>i(self[e]);n&&(self[n]=s),a.onload=()=>!n&&s(),a.onerror=r,document.head.append(a)})}let M=t=>new Promise(e=>setTimeout(e,t));class P extends Promise{constructor(t=()=>{}){let e,n;super((i,r)=>{t(i,r),e=i,n=r}),this.resolve=e,this.reject=n}}function S(t,e){return Array.isArray(t)?R(t):null==t||null==e||0===t&&0===e?R([[0,0]]):R([[t,e]])}function R(t){return Object.defineProperties(t,{start:{value:e=>t[e][0]},end:{value:e=>t[e][1]}}),t}globalThis.customElements&&!globalThis.customElements.get("youtube-video")&&globalThis.customElements.define("youtube-video",_);var N=new Set(["style","children","ref","key","suppressContentEditableWarning","suppressHydrationWarning","dangerouslySetInnerHTML"]),I={className:"class",htmlFor:"for"};function W(t){return t.toLowerCase()}function V(t){return"boolean"==typeof t?t?"":void 0:"function"==typeof t?void 0:"object"!=typeof t||null===t?t:void 0}function j(t,e,n){var i,r;t[e]=n,null==n&&e in(null!==(r=null==(i=globalThis.HTMLElement)?void 0:i.prototype)&&void 0!==r?r:{})&&t.removeAttribute(e)}var H=function(t){let{react:e,tagName:n,elementClass:i,events:r,displayName:a,defaultProps:s,toAttributeName:o=W,toAttributeValue:l=V}=t,u=Number.parseInt(e.version)>=19,h=e.forwardRef((t,a)=>{var h,c,d,p,v;let f=e.useRef(null),m=e.useRef(new Map),g={},y={},w={},b={};for(let[e,n]of Object.entries(t)){if(N.has(e)){w[e]=n;continue}let t=o(null!==(d=I[e])&&void 0!==d?d:e);if(e in i.prototype&&!(e in(null!==(p=null==(h=globalThis.HTMLElement)?void 0:h.prototype)&&void 0!==p?p:{}))&&!(null==(c=i.observedAttributes)?void 0:c.some(e=>e===t))){b[e]=n;continue}if(e.startsWith("on")){g[e]=n;continue}let r=l(n);t&&null!=r&&(y[t]=String(r),u||(w[t]=r)),t&&u&&(r!==V(n)?w[t]=r:w[t]=n)}for(let t in g){let n=g[t],i=t.endsWith("Capture"),a=(null!==(v=null==r?void 0:r[t])&&void 0!==v?v:t.slice(2).toLowerCase()).slice(0,i?-7:void 0);e.useLayoutEffect(()=>{let t=null==f?void 0:f.current;if(t&&"function"==typeof n)return t.addEventListener(a,n,i),()=>{t.removeEventListener(a,n,i)}},[null==f?void 0:f.current,n])}return e.useLayoutEffect(()=>{if(null===f.current)return;let t=new Map;for(let e in b)j(f.current,e,b[e]),m.current.delete(e),t.set(e,b[e]);for(let[t,e]of m.current)j(f.current,t,void 0);m.current=t}),e.createElement(n,{...s,...w,ref:e.useCallback(t=>{f.current=t,"function"==typeof a?a(t):null!==a&&(a.current=t)},[a])})});return h.displayName=null!=a?a:i.name,h}({react:r,tagName:"youtube-video",elementClass:_,toAttributeName:t=>"muted"===t?"":"defaultMuted"===t?"muted":W(t)});/*! Bundled license information:
2
3ce-la-react/dist/ce-la-react.js:
4  (**
5   * @license
6   * Copyright 2018 Google LLC
7   * SPDX-License-Identifier: BSD-3-Clause
8   *
9   * Modified version of `@lit/react` for vanilla custom elements with support for SSR.
10   *)
11*/}}]);

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.