@bentoproject/dailymotion
Advanced tools
Comparing version 1.2205120110.0 to 1.2205120110.1
; | ||
var n=Object.create,r=Object.defineProperty,e=Object.getOwnPropertyDescriptor,t=Object.getOwnPropertyNames,o=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,i=function(n){return r(n,"__esModule",{value:!0})},a=function(a){return function(n,o,i){if(o&&"object"==typeof o||"function"==typeof o)for(var a,c=t(o),l=0,f=c.length;l<f;l++)a=c[l],u.call(n,a)||"default"===a||r(n,a,{get:function(n){return o[n]}.bind(null,a),enumerable:!(i=e(o,a))||i.enumerable});return n}(i(r(null!=a?n(o(a)):{},"default",a&&a.__esModule&&"default"in a?{get:function(){return a.default},enumerable:!0}:{value:a,enumerable:!0})),a)};function c(n,r,e){return r in n?Object.defineProperty(n,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[r]=e,n}function l(n,r){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),e.push.apply(e,t)}return e}function f(n){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?l(Object(e),!0).forEach((function(r){c(n,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):l(Object(e)).forEach((function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))}))}return n}function v(n,r){if(null==n)return{};var e,t,o={},u=Object.keys(n);for(t=0;t<u.length;t++)e=u[t],r.indexOf(e)>=0||(o[e]=n[e]);return o}!function(n,e){for(var t in i(n),e)r(n,t,{get:e[t],enumerable:!0})}(exports,{BentoDailymotion:function(){return yn},BentoDailymotionWithRef:function(){return mn}});var s=Array.isArray;function d(n){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function p(n,r){(null==r||r>n.length)&&(r=n.length);for(var e=0,t=new Array(r);e<r;e++)t[e]=n[e];return t}function b(n,r){if(n){if("string"==typeof n)return p(n,r);var e=Object.prototype.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?p(n,r):void 0}}function m(n,r){var e="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(e)return(e=e.call(n)).next.bind(e);if(Array.isArray(n)||(e=b(n))||r&&n&&"number"==typeof n.length){e&&(n=e);var t=0;return function(){return t>=n.length?{done:!0}:{done:!1,value:n[t++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var y=Object.prototype;function g(n){var r=Object.create(null);return n&&Object.assign(r,n),r}y.hasOwnProperty,y.toString;var j,w=function(){var n=this;this.promise=new Promise((function(r,e){n.resolve=r,n.reject=e}))};function h(n){return new Promise((function(r){r(n())}))}function O(n){var r=Object.getOwnPropertyDescriptor(n,"message");if(null!=r&&r.writable)return n;var e=n.message,t=n.stack,o=new Error(e);for(var u in n)o[u]=n[u];return o.stack=t,o}function S(n){for(var r,e=null,t="",o=m(arguments,!0);!(r=o()).done;){var u=r.value;u instanceof Error&&!e?e=O(u):(t&&(t+=" "),t+=u)}return e?t&&(e.message=t+": "+e.message):e=new Error(t),e}function q(n){var r,e;null===(r=(e=self).__AMP_REPORT_ERROR)||void 0===r||r.call(e,n)}function I(n){var r=S.apply(null,arguments);return r.expected=!0,r}var k=["Webkit","webkit","Moz","moz","ms","O","o"];function C(n,r,e,t,o){var u=function(n,r,e){if(r.startsWith("--"))return r;j||(j=g());var t=j[r];if(!t||e){if(t=r,void 0===n[r]){var o=function(n){return n.charAt(0).toUpperCase()+n.slice(1)}(r),u=function(n,r){for(var e=0;e<k.length;e++){var t=k[e]+r;if(void 0!==n[t])return t}return""}(n,o);void 0!==n[u]&&(t=u)}e||(j[r]=t)}return t}(n.style,r,o);if(u){var i,a=t?e+t:e;n.style.setProperty((i=u.replace(/[A-Z]/g,(function(n){return"-"+n.toLowerCase()})),k.some((function(n){return i.startsWith(n+"-")}))?"-".concat(i):i),a)}}function E(n){return null==n.__AMP_AUTOPLAY&&(n.__AMP_AUTOPLAY=function(n){var r,e=n.document.createElement("video");return e.setAttribute("muted",""),e.setAttribute("playsinline",""),e.setAttribute("webkit-playsinline",""),e.setAttribute("height","0"),e.setAttribute("width","0"),e.muted=!0,e.playsInline=!0,e.playsinline=!0,e.webkitPlaysinline=!0,function(n,r){for(var e in r)C(n,e,r[e])}(e,{position:"fixed",top:"0",width:"0",height:"0",opacity:"0"}),r=e,h((function(){return r.play()})).catch((function(){})),Promise.resolve(!e.paused)}(n)),n.__AMP_AUTOPLAY}var P=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function A(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";try{return decodeURIComponent(n)}catch(n){return r}}var M={bubbles:!0,cancelable:!0};function R(n,r,e,t){var o=e||{};n.ownerDocument;var u=n.ownerDocument.createEvent("Event");u.data=o;var i=t||M,a=i.bubbles,c=i.cancelable;u.initEvent(r,a,c),n.dispatchEvent(u)}function N(n,r){return function(n,r,e){if(!r)return n;var t=n.split("#",2),o=t[0].split("?",2);return o[0]+(o[1]?"?".concat(o[1],"&").concat(r):"?".concat(r))+(t[1]?"#".concat(t[1]):"")}(n,function(n){var r,e,t,o=[];for(var u in n){var i=n[u];if(null!=i){i=s(t=i)?t:[t];for(var a=0;a<i.length;a++)o.push((r=u,e=i[a],"".concat(encodeURIComponent(r),"=").concat(encodeURIComponent(e))))}}return o.join("&")}(r))}function T(n,r){return JSON.stringify({"command":n,"parameters":r})}self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null},self.__AMP_LOG,new Set(["c","v","a","ad"]);var x,U=a(require("@bentoproject/core/preact")),L=a(require("@bentoproject/core/preact")),z=a(require("@bentoproject/core/preact"));function F(n,r){return function(n){if(Array.isArray(n))return n}(n)||function(n,r){var e=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=e){var t,o,u=[],i=!0,a=!1;try{for(e=e.call(n);!(i=(t=e.next()).done)&&(u.push(t.value),!r||u.length!==r);i=!0);}catch(n){a=!0,o=n}finally{try{i||null==e.return||e.return()}finally{if(a)throw o}}return u}}(n,r)||b(n,r)||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.")}()}function B(n){var r=function(n,r){if("object"!==d(n)||null===n)return n;var e=n[Symbol.toPrimitive];if(void 0!==e){var t=e.call(n,"string");if("object"!==d(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===d(r)?r:String(r)}var D=(c(x={},"auto",0),c(x,"lazy",1),c(x,"eager",2),c(x,"unload",3),"loading"),V=a(require("@bentoproject/core/preact")),W=a(require("@bentoproject/core/preact")),J=a(require("@bentoproject/core/preact")),Y=a(require("@bentoproject/core/preact")),_=a(require("@bentoproject/core/preact")),H=a(require("@bentoproject/core/preact")),Z=a(require("@bentoproject/core/preact")),$={"title":"","artist":"","album":"","artwork":[{"src":""}]};function G(n){var r=n.querySelector('script[type="application/ld+json"]');if(r){var e=function(n,r){try{return function(n){return JSON.parse(n)}(n)}catch(n){return null}}(r.textContent);if(e&&e.image)return"string"==typeof e.image?e.image:e.image["@list"]&&"string"==typeof e.image["@list"][0]?e.image["@list"][0]:"string"==typeof e.image.url?e.image.url:"string"==typeof e.image[0]?e.image[0]:void 0}}function K(n){var r=n.querySelector('link[rel="shortcut icon"]')||n.querySelector('link[rel="icon"]');return r?r.getAttribute("href"):void 0}function Q(n){var r=n.displayIcon,e=n.displayOverlay,t=n.metadata,o=n.onOverlayClick,u=n.pause,i=n.play,a=n.playing,c=n.wrapperRef,l=(0,_.useAmpContext)().playable;return(0,W.useEffect)((function(){if(l){var n=new IntersectionObserver((function(n){n[n.length-1].isIntersecting?i().catch((function(){})):u()}),{threshold:.5});return n.observe(c.current),function(){n.disconnect()}}u()}),[c,i,u,l]),V.createElement(V.Fragment,null,r&&V.createElement("div",{class:"eq-9e7199f"+(a?" eq-playing-9e7199f":"")},V.createElement(en,null)),e&&V.createElement("button",{"aria-label":t&&t.title||"Unmute video",tabindex:"0",class:"autoplay-mask-button-9e7199f fill-content-overlay-fc551a7",onClick:o}))}var X,nn,rn,en=(X=!1,nn=null,rn=function(){return[1,2,3,4].map((function(n){return V.createElement("div",{class:"eq-col-9e7199f",key:n})}))},function(){if(!X){for(var n=arguments.length,r=new Array(n),e=0;e<n;e++)r[e]=arguments[e];nn=rn.apply(self,r),X=!0,rn=null}return nn}),tn=(0,J.forwardRef)((function(n,r){var e,t="class",o=n.autoplay,u=void 0!==o&&o,i=n.component,a=void 0===i?"video":i,c=n.controls,l=void 0!==c&&c,s=n.loading,d=n.loop,p=void 0!==d&&d,b=n.mediasession,m=void 0===b||b,y=n.noaudio,g=void 0!==y&&y,j=n.onPlayingState,O=n.onReadyState,S=n.poster,k=n.sources,C=n.src,E=n.style,P=n[t],A=v(n,["autoplay","component","controls","loading","loop","mediasession","noaudio","onPlayingState","onReadyState","poster","sources","src","style",t].map(B));e=(0,Z.useAmpContext)().notify,(0,H.useLayoutEffect)((function(){e&&e()}));var M=(0,_.useAmpContext)().playable,R=(0,_.useLoading)(s),N="unload"!==R,T=F((0,W.useState)(u),2),x=T[0],U=T[1],L=F((0,W.useState)(!1),2),z=L[0],J=L[1],X=F((0,W.useState)(null),2),nn=X[0],rn=X[1],en=F((0,W.useState)(!u),2),tn=en[0],on=en[1],un=(0,W.useRef)(null),an=(0,W.useRef)(null),cn=(0,W.useMemo)((function(){return new w}),[]),ln=(0,W.useRef)(D),fn=(0,Y.useValueRef)(O),vn=(0,W.useCallback)((function(n,r){if(n!==ln.current){ln.current=n;var e=fn.current;e&&e(n,r)}}),[fn]),sn=(0,Y.useValueRef)(j),dn=(0,W.useCallback)((function(n){J(n);var r=sn.current;r&&r(n)}),[sn]);(0,W.useLayoutEffect)((function(){N||dn(!1)}),[N,dn]);var pn=(0,W.useCallback)((function(){return cn.promise.then((function(){return n=an.current,(r=h((function(){return n.play(!1)}))).catch((function(n){!function(n){for(var r=arguments.length,e=new Array(r>1?r-1:0),t=1;t<r;t++)e[t-1]=arguments[t];q(I.apply(null,e))}("TRYPLAY",n)})),r;var n,r}))}),[cn]),bn=(0,W.useCallback)((function(){cn.promise.then((function(){var n;return null===(n=an.current)||void 0===n?void 0:n.pause()}))}),[cn]),mn=(0,W.useCallback)((function(){return cn.promise.then((function(){return an.current.requestFullscreen()}))}),[cn]),yn=(0,W.useCallback)((function(){U(!1),on(!0)}),[]);return(0,W.useLayoutEffect)((function(){var n,r=null===(n=an.current)||void 0===n?void 0:n.readyState;null!=r&&vn(r>0?"complete":D)}),[vn]),(0,W.useLayoutEffect)((function(){return m&&z&&nn&&function(n,r,e,t){var o=n.navigator;"mediaSession"in o&&n.MediaMetadata&&(o.mediaSession.metadata=new n.MediaMetadata($),o.mediaSession.metadata=new n.MediaMetadata(r),o.mediaSession.setActionHandler("play",e),o.mediaSession.setActionHandler("pause",t))}(window,nn,pn,bn),function(){}}),[m,z,nn,pn,bn]),(0,W.useEffect)((function(){M||bn()}),[M,bn]),(0,W.useImperativeHandle)(r,(function(){return{get readyState(){return ln.current},play:pn,pause:bn,requestFullscreen:mn,get currentTime(){return an.current?an.current.currentTime:0},get duration(){return an.current?an.current.duration:NaN},get autoplay(){return u},get controls(){return l},get loop(){return p},userInteracted:yn,mute:function(){return U(!0)},unmute:function(){tn&&U(!1)}}}),[pn,bn,mn,yn,tn,u,l,p]),V.createElement(Y.ContainWrapper,{contentRef:un,class:P,style:E,size:!0,layout:!0,paint:!0},N&&V.createElement(a,f(f({},A),{},{ref:an,loading:R,muted:x,loop:p,controls:l&&(!u||tn),onCanPlay:function(){cn.resolve(),vn("complete")},onLoadedMetadata:function(){m&&cn.promise.then((function(){var n,r,e,t;rn((n=an.current,f({"title":(r=A).title||r["aria-label"]||document.title,"artist":r.artist||"","album":r.album||"","artwork":[{"src":r.artwork||r.poster||G(document)||(e=document,t=e.querySelector('meta[property="og:image"]'),t?t.getAttribute("content"):void 0)||K(document)||""}]},n&&n.getMetadata?n.getMetadata():Object.create(null))))})),vn("complete")},onPlaying:function(){return dn(!0)},onPause:function(){return dn(!1)},onEnded:function(){return dn(!1)},onError:function(n){vn("error",n),cn.reject(n)},class:"fill-stretch-fc551a7",src:C,poster:S}),k),u&&!tn&&V.createElement(Q,{metadata:nn,playing:z,displayIcon:!g&&x,wrapperRef:un,play:pn,pause:bn,displayOverlay:l,onOverlayClick:yn}))}));tn.displayName="VideoWrapper";var on=["loading","unloadOnPause","sandbox","muted","controls","origin","onCanPlay","onMessage","playerStateRef","makeMethodMessage","makeFullscreenMessage","onIframeLoad"],un=["allow-scripts","allow-same-origin","allow-popups","allow-popups-to-escape-sandbox","allow-top-navigation-by-user-activation"].join(" ");function an(n,r,e){n&&n.contentWindow&&r.then((function(){n.contentWindow.postMessage(e(),"*")}))}var cn=(0,z.forwardRef)((function(n,r){var e=n.loading,t=n.unloadOnPause,o=void 0!==t&&t,u=n.sandbox,i=void 0===u?un:u,a=n.muted,c=void 0!==a&&a,l=n.controls,s=void 0!==l&&l,d=n.origin,p=n.onCanPlay,b=n.onMessage,m=n.playerStateRef,y=n.makeMethodMessage,g=n.makeFullscreenMessage,j=n.onIframeLoad,h=v(n,on),O=(0,L.useRef)(null),S=(0,L.useMemo)((function(){return new w}),[]),q=(0,L.useRef)(y),I=(0,L.useCallback)((function(n){an(null==O?void 0:O.current,S.promise,(function(){return q.current(n)}))}),[S.promise]),k=(0,L.useRef)(g),C=(0,L.useCallback)((function(){return an(null==O?void 0:O.current,S.promise,k.current)}),[S.promise]);(0,L.useImperativeHandle)(r,(function(){return{get currentTime(){var n,r;return null!==(n=null==m||null===(r=m.current)||void 0===r?void 0:r.currentTime)&&void 0!==n?n:NaN},get duration(){var n,r;return null!==(n=null==m||null===(r=m.current)||void 0===r?void 0:r.duration)&&void 0!==n?n:NaN},requestFullscreen:function(){if(!k.current)return S.promise.then((function(){O.current.requestFullscreen()}));C()},play:function(){return I("play")},pause:function(){if(o){var n=O.current;n&&(n.src=n.src)}else I("pause")}}}),[m,I,C,S.promise,o]);var E=function(n){var r=(0,L.useRef)(null);return r.current=n,r}(b);return(0,L.useLayoutEffect)((function(){if(O.current){var n=O.current.ownerDocument.defaultView;return n.addEventListener("message",r),function(){return n.removeEventListener("message",r)}}function r(n){E.current&&(d&&!d.test(n.origin)||n.source!=O.current.contentWindow||E.current({currentTarget:O.current,target:O.current,data:n.data}))}}),[d,E]),(0,L.useLayoutEffect)((function(){I(c?"mute":"unmute")}),[c,I]),(0,L.useLayoutEffect)((function(){I(s?"showControls":"hideControls")}),[s,I]),U.createElement("iframe",f(f({},h),{},{ref:O,allowfullscreen:!0,frameborder:"0",sandbox:i,loading:e,onCanPlay:function(){p&&S.promise.then(p),S.resolve()},onLoad:function(n){null==j||j(n)}}))}));cn.displayName="VideoIframeInternal";var ln=(0,z.forwardRef)((function(n,r){return U.createElement(tn,f(f({ref:r},n),{},{component:cn}))}));ln.displayName="VideoIframe";var fn=a(require("@bentoproject/core/preact")),vn=a(require("@bentoproject/core/preact")),sn=a(require("@bentoproject/core/preact")),dn=["autoplay","endscreenEnable","info","mute","sharingEnable","start","uiHighlight","uiLogo","videoId"];function pn(n){switch(n){case"mute":return T("muted",[!0]);case"unmute":return T("muted",[!1]);case"showControls":return T("controls",[!0]);case"hideControls":return T("controls",[!1]);default:return T(n)}}function bn(n){var r=n.currentTarget,e=function(n){var r,e=g();if(!n)return e;for(;r=P.exec(n);){var t=A(r[1],r[1]),o=r[2]?A(r[2].replace(/\+/g," "),r[2]):"";e[t]=o}return e}(n.data),t=null==e?void 0:e.event;"pause"===t?R(r,"pause"):"play"===t?R(r,"playing"):"end"===t?(R(r,"pause"),R(r,"end")):"apiready"===t&&R(r,"canplay")}function mn(n,r){var e=n.autoplay,t=n.endscreenEnable,o=n.info,u=n.mute,i=n.sharingEnable,a=n.start,c=n.uiHighlight,l=n.uiLogo,s=n.videoId,d=v(n,dn),p=(0,vn.useMemo)((function(){return function(n,r){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],t=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],u=arguments.length>5&&void 0!==arguments[5]&&arguments[5],i=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],a=arguments.length>7?arguments[7]:void 0,c=arguments.length>8?arguments[8]:void 0,l=!(arguments.length>9&&void 0!==arguments[9])||arguments[9],v=arguments.length>10?arguments[10]:void 0;return N("https://www.dailymotion.com/embed/video/".concat(encodeURIComponent(r),"?api=1&html=1&app=amp"),f({"endscreen-enable":t?void 0:t,"info":o?void 0:o,"mute":u||e&&E(n)?1:void 0,"sharing-enable":i?void 0:i,"start":a,"ui-highlight":c,"ui-logo":l?void 0:l},v))}(window,s,e,t,o,u,i,a,c,l)}),[s,e,t,o,u,i,a,c,l]);return fn.createElement(ln,f(f({autoplay:e,controls:!0,ref:r},d),{},{src:p,makeMethodMessage:pn,onMessage:bn}))}var yn=(0,sn.forwardRef)(mn);yn.displayName="BentoDailymotion"; | ||
var n=Object.create,r=Object.defineProperty,e=Object.getOwnPropertyDescriptor,t=Object.getOwnPropertyNames,o=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,i=function(n){return r(n,"__esModule",{value:!0})},a=function(a){return function(n,o,i){if(o&&"object"==typeof o||"function"==typeof o)for(var a,c=t(o),l=0,f=c.length;l<f;l++)a=c[l],u.call(n,a)||"default"===a||r(n,a,{get:function(n){return o[n]}.bind(null,a),enumerable:!(i=e(o,a))||i.enumerable});return n}(i(r(null!=a?n(o(a)):{},"default",a&&a.__esModule&&"default"in a?{get:function(){return a.default},enumerable:!0}:{value:a,enumerable:!0})),a)};function c(n,r,e){return r in n?Object.defineProperty(n,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[r]=e,n}function l(n,r){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),e.push.apply(e,t)}return e}function f(n){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?l(Object(e),!0).forEach((function(r){c(n,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):l(Object(e)).forEach((function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))}))}return n}function v(n,r){if(null==n)return{};var e,t,o={},u=Object.keys(n);for(t=0;t<u.length;t++)e=u[t],r.indexOf(e)>=0||(o[e]=n[e]);return o}!function(n,e){for(var t in i(n),e)r(n,t,{get:e[t],enumerable:!0})}(exports,{BentoDailymotion:function(){return yn},BentoDailymotionWithRef:function(){return mn}});var s=Array.isArray;function d(n,r){(null==r||r>n.length)&&(r=n.length);for(var e=0,t=new Array(r);e<r;e++)t[e]=n[e];return t}function p(n,r){if(n){if("string"==typeof n)return d(n,r);var e=Object.prototype.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?d(n,r):void 0}}function b(n,r){var e="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(e)return(e=e.call(n)).next.bind(e);if(Array.isArray(n)||(e=p(n))||r&&n&&"number"==typeof n.length){e&&(n=e);var t=0;return function(){return t>=n.length?{done:!0}:{done:!1,value:n[t++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function m(n){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}var y=Object.prototype;function g(n){var r=Object.create(null);return n&&Object.assign(r,n),r}y.hasOwnProperty,y.toString;var j,w=function(){var n=this;this.promise=new Promise((function(r,e){n.resolve=r,n.reject=e}))};function h(n){return new Promise((function(r){r(n())}))}function O(n){var r=Object.getOwnPropertyDescriptor(n,"message");if(null!=r&&r.writable)return n;var e=n.message,t=n.stack,o=new Error(e);for(var u in n)o[u]=n[u];return o.stack=t,o}function S(n){for(var r,e=null,t="",o=b(arguments,!0);!(r=o()).done;){var u=r.value;u instanceof Error&&!e?e=O(u):(t&&(t+=" "),t+=u)}return e?t&&(e.message=t+": "+e.message):e=new Error(t),e}function q(n){var r,e;null===(r=(e=self).__AMP_REPORT_ERROR)||void 0===r||r.call(e,n)}function I(n){var r=S.apply(null,arguments);return r.expected=!0,r}var k=["Webkit","webkit","Moz","moz","ms","O","o"];function C(n,r,e,t,o){var u=function(n,r,e){if(r.startsWith("--"))return r;j||(j=g());var t=j[r];if(!t||e){if(t=r,void 0===n[r]){var o=function(n){return n.charAt(0).toUpperCase()+n.slice(1)}(r),u=function(n,r){for(var e=0;e<k.length;e++){var t=k[e]+r;if(void 0!==n[t])return t}return""}(n,o);void 0!==n[u]&&(t=u)}e||(j[r]=t)}return t}(n.style,r,o);if(u){var i,a=t?e+t:e;n.style.setProperty((i=u.replace(/[A-Z]/g,(function(n){return"-"+n.toLowerCase()})),k.some((function(n){return i.startsWith(n+"-")}))?"-".concat(i):i),a)}}function E(n){return null==n.__AMP_AUTOPLAY&&(n.__AMP_AUTOPLAY=function(n){var r,e=n.document.createElement("video");return e.setAttribute("muted",""),e.setAttribute("playsinline",""),e.setAttribute("webkit-playsinline",""),e.setAttribute("height","0"),e.setAttribute("width","0"),e.muted=!0,e.playsInline=!0,e.playsinline=!0,e.webkitPlaysinline=!0,function(n,r){for(var e in r)C(n,e,r[e])}(e,{position:"fixed",top:"0",width:"0",height:"0",opacity:"0"}),r=e,h((function(){return r.play()})).catch((function(){})),Promise.resolve(!e.paused)}(n)),n.__AMP_AUTOPLAY}var P=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function A(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";try{return decodeURIComponent(n)}catch(n){return r}}var M={bubbles:!0,cancelable:!0};function R(n,r,e,t){var o=e||{};n.ownerDocument;var u=n.ownerDocument.createEvent("Event");u.data=o;var i=t||M,a=i.bubbles,c=i.cancelable;u.initEvent(r,a,c),n.dispatchEvent(u)}function N(n,r){return function(n,r,e){if(!r)return n;var t=n.split("#",2),o=t[0].split("?",2);return o[0]+(o[1]?"?".concat(o[1],"&").concat(r):"?".concat(r))+(t[1]?"#".concat(t[1]):"")}(n,function(n){var r,e,t,o=[];for(var u in n){var i=n[u];if(null!=i){i=s(t=i)?t:[t];for(var a=0;a<i.length;a++)o.push((r=u,e=i[a],"".concat(encodeURIComponent(r),"=").concat(encodeURIComponent(e))))}}return o.join("&")}(r))}function T(n,r){return JSON.stringify({"command":n,"parameters":r})}self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null},self.__AMP_LOG,new Set(["c","v","a","ad"]);var x,U=a(require("@bentoproject/core/preact")),L=a(require("@bentoproject/core/preact")),z=a(require("@bentoproject/core/preact"));function F(n,r){return function(n){if(Array.isArray(n))return n}(n)||function(n,r){var e=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=e){var t,o,u=[],i=!0,a=!1;try{for(e=e.call(n);!(i=(t=e.next()).done)&&(u.push(t.value),!r||u.length!==r);i=!0);}catch(n){a=!0,o=n}finally{try{i||null==e.return||e.return()}finally{if(a)throw o}}return u}}(n,r)||p(n,r)||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.")}()}function B(n){var r=function(n,r){if("object"!==m(n)||null===n)return n;var e=n[Symbol.toPrimitive];if(void 0!==e){var t=e.call(n,"string");if("object"!==m(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===m(r)?r:String(r)}var D=(c(x={},"auto",0),c(x,"lazy",1),c(x,"eager",2),c(x,"unload",3),"loading"),V=a(require("@bentoproject/core/preact")),W=a(require("@bentoproject/core/preact")),J=a(require("@bentoproject/core/preact")),Y=a(require("@bentoproject/core/preact")),_=a(require("@bentoproject/core/preact")),H=a(require("@bentoproject/core/preact")),Z=a(require("@bentoproject/core/preact")),$={"title":"","artist":"","album":"","artwork":[{"src":""}]};function G(n){var r=n.querySelector('script[type="application/ld+json"]');if(r){var e=function(n,r){try{return function(n){return JSON.parse(n)}(n)}catch(n){return null}}(r.textContent);if(e&&e.image)return"string"==typeof e.image?e.image:e.image["@list"]&&"string"==typeof e.image["@list"][0]?e.image["@list"][0]:"string"==typeof e.image.url?e.image.url:"string"==typeof e.image[0]?e.image[0]:void 0}}function K(n){var r=n.querySelector('link[rel="shortcut icon"]')||n.querySelector('link[rel="icon"]');return r?r.getAttribute("href"):void 0}function Q(n){var r=n.displayIcon,e=n.displayOverlay,t=n.metadata,o=n.onOverlayClick,u=n.pause,i=n.play,a=n.playing,c=n.wrapperRef,l=(0,_.useAmpContext)().playable;return(0,W.useEffect)((function(){if(l){var n=new IntersectionObserver((function(n){n[n.length-1].isIntersecting?i().catch((function(){})):u()}),{threshold:.5});return n.observe(c.current),function(){n.disconnect()}}u()}),[c,i,u,l]),V.createElement(V.Fragment,null,r&&V.createElement("div",{class:"eq-9e7199f"+(a?" eq-playing-9e7199f":"")},V.createElement(en,null)),e&&V.createElement("button",{"aria-label":t&&t.title||"Unmute video",tabindex:"0",class:"autoplay-mask-button-9e7199f fill-content-overlay-fc551a7",onClick:o}))}var X,nn,rn,en=(X=!1,nn=null,rn=function(){return[1,2,3,4].map((function(n){return V.createElement("div",{class:"eq-col-9e7199f",key:n})}))},function(){if(!X){for(var n=arguments.length,r=new Array(n),e=0;e<n;e++)r[e]=arguments[e];nn=rn.apply(self,r),X=!0,rn=null}return nn}),tn=(0,J.forwardRef)((function(n,r){var e,t="class",o=n.autoplay,u=void 0!==o&&o,i=n.component,a=void 0===i?"video":i,c=n.controls,l=void 0!==c&&c,s=n.loading,d=n.loop,p=void 0!==d&&d,b=n.mediasession,m=void 0===b||b,y=n.noaudio,g=void 0!==y&&y,j=n.onPlayingState,O=n.onReadyState,S=n.poster,k=n.sources,C=n.src,E=n.style,P=n[t],A=v(n,["autoplay","component","controls","loading","loop","mediasession","noaudio","onPlayingState","onReadyState","poster","sources","src","style",t].map(B));e=(0,Z.useAmpContext)().notify,(0,H.useLayoutEffect)((function(){e&&e()}));var M=(0,_.useAmpContext)().playable,R=(0,_.useLoading)(s),N="unload"!==R,T=F((0,W.useState)(u),2),x=T[0],U=T[1],L=F((0,W.useState)(!1),2),z=L[0],J=L[1],X=F((0,W.useState)(null),2),nn=X[0],rn=X[1],en=F((0,W.useState)(!u),2),tn=en[0],on=en[1],un=(0,W.useRef)(null),an=(0,W.useRef)(null),cn=(0,W.useMemo)((function(){return new w}),[]),ln=(0,W.useRef)(D),fn=(0,Y.useValueRef)(O),vn=(0,W.useCallback)((function(n,r){if(n!==ln.current){ln.current=n;var e=fn.current;e&&e(n,r)}}),[fn]),sn=(0,Y.useValueRef)(j),dn=(0,W.useCallback)((function(n){J(n);var r=sn.current;r&&r(n)}),[sn]);(0,W.useLayoutEffect)((function(){N||dn(!1)}),[N,dn]);var pn=(0,W.useCallback)((function(){return cn.promise.then((function(){return n=an.current,(r=h((function(){return n.play(!1)}))).catch((function(n){!function(n){for(var r=arguments.length,e=new Array(r>1?r-1:0),t=1;t<r;t++)e[t-1]=arguments[t];q(I.apply(null,e))}("TRYPLAY",n)})),r;var n,r}))}),[cn]),bn=(0,W.useCallback)((function(){cn.promise.then((function(){var n;return null===(n=an.current)||void 0===n?void 0:n.pause()}))}),[cn]),mn=(0,W.useCallback)((function(){return cn.promise.then((function(){return an.current.requestFullscreen()}))}),[cn]),yn=(0,W.useCallback)((function(){U(!1),on(!0)}),[]);return(0,W.useLayoutEffect)((function(){var n,r=null===(n=an.current)||void 0===n?void 0:n.readyState;null!=r&&vn(r>0?"complete":D)}),[vn]),(0,W.useLayoutEffect)((function(){return m&&z&&nn&&function(n,r,e,t){var o=n.navigator;"mediaSession"in o&&n.MediaMetadata&&(o.mediaSession.metadata=new n.MediaMetadata($),o.mediaSession.metadata=new n.MediaMetadata(r),o.mediaSession.setActionHandler("play",e),o.mediaSession.setActionHandler("pause",t))}(window,nn,pn,bn),function(){}}),[m,z,nn,pn,bn]),(0,W.useEffect)((function(){M||bn()}),[M,bn]),(0,W.useImperativeHandle)(r,(function(){return{get readyState(){return ln.current},play:pn,pause:bn,requestFullscreen:mn,get currentTime(){return an.current?an.current.currentTime:0},get duration(){return an.current?an.current.duration:NaN},get autoplay(){return u},get controls(){return l},get loop(){return p},userInteracted:yn,mute:function(){return U(!0)},unmute:function(){tn&&U(!1)}}}),[pn,bn,mn,yn,tn,u,l,p]),V.createElement(Y.ContainWrapper,{contentRef:un,class:P,style:E,size:!0,layout:!0,paint:!0},N&&V.createElement(a,f(f({},A),{},{ref:an,loading:R,muted:x,loop:p,controls:l&&(!u||tn),onCanPlay:function(){cn.resolve(),vn("complete")},onLoadedMetadata:function(){m&&cn.promise.then((function(){var n,r,e,t;rn((n=an.current,f({"title":(r=A).title||r["aria-label"]||document.title,"artist":r.artist||"","album":r.album||"","artwork":[{"src":r.artwork||r.poster||G(document)||(e=document,t=e.querySelector('meta[property="og:image"]'),t?t.getAttribute("content"):void 0)||K(document)||""}]},n&&n.getMetadata?n.getMetadata():Object.create(null))))})),vn("complete")},onPlaying:function(){return dn(!0)},onPause:function(){return dn(!1)},onEnded:function(){return dn(!1)},onError:function(n){vn("error",n),cn.reject(n)},class:"fill-stretch-fc551a7",src:C,poster:S}),k),u&&!tn&&V.createElement(Q,{metadata:nn,playing:z,displayIcon:!g&&x,wrapperRef:un,play:pn,pause:bn,displayOverlay:l,onOverlayClick:yn}))}));tn.displayName="VideoWrapper";var on=["loading","unloadOnPause","sandbox","muted","controls","origin","onCanPlay","onMessage","playerStateRef","makeMethodMessage","makeFullscreenMessage","onIframeLoad"],un=["allow-scripts","allow-same-origin","allow-popups","allow-popups-to-escape-sandbox","allow-top-navigation-by-user-activation"].join(" ");function an(n,r,e){n&&n.contentWindow&&r.then((function(){n.contentWindow.postMessage(e(),"*")}))}var cn=(0,z.forwardRef)((function(n,r){var e=n.loading,t=n.unloadOnPause,o=void 0!==t&&t,u=n.sandbox,i=void 0===u?un:u,a=n.muted,c=void 0!==a&&a,l=n.controls,s=void 0!==l&&l,d=n.origin,p=n.onCanPlay,b=n.onMessage,m=n.playerStateRef,y=n.makeMethodMessage,g=n.makeFullscreenMessage,j=n.onIframeLoad,h=v(n,on),O=(0,L.useRef)(null),S=(0,L.useMemo)((function(){return new w}),[]),q=(0,L.useRef)(y),I=(0,L.useCallback)((function(n){an(null==O?void 0:O.current,S.promise,(function(){return q.current(n)}))}),[S.promise]),k=(0,L.useRef)(g),C=(0,L.useCallback)((function(){return an(null==O?void 0:O.current,S.promise,k.current)}),[S.promise]);(0,L.useImperativeHandle)(r,(function(){return{get currentTime(){var n,r;return null!==(n=null==m||null===(r=m.current)||void 0===r?void 0:r.currentTime)&&void 0!==n?n:NaN},get duration(){var n,r;return null!==(n=null==m||null===(r=m.current)||void 0===r?void 0:r.duration)&&void 0!==n?n:NaN},requestFullscreen:function(){if(!k.current)return S.promise.then((function(){O.current.requestFullscreen()}));C()},play:function(){return I("play")},pause:function(){if(o){var n=O.current;n&&(n.src=n.src)}else I("pause")}}}),[m,I,C,S.promise,o]);var E=function(n){var r=(0,L.useRef)(null);return r.current=n,r}(b);return(0,L.useLayoutEffect)((function(){if(O.current){var n=O.current.ownerDocument.defaultView;return n.addEventListener("message",r),function(){return n.removeEventListener("message",r)}}function r(n){E.current&&(d&&!d.test(n.origin)||n.source!=O.current.contentWindow||E.current({currentTarget:O.current,target:O.current,data:n.data}))}}),[d,E]),(0,L.useLayoutEffect)((function(){I(c?"mute":"unmute")}),[c,I]),(0,L.useLayoutEffect)((function(){I(s?"showControls":"hideControls")}),[s,I]),U.createElement("iframe",f(f({},h),{},{ref:O,allowfullscreen:!0,frameborder:"0",sandbox:i,loading:e,onCanPlay:function(){p&&S.promise.then(p),S.resolve()},onLoad:function(n){null==j||j(n)}}))}));cn.displayName="VideoIframeInternal";var ln=(0,z.forwardRef)((function(n,r){return U.createElement(tn,f(f({ref:r},n),{},{component:cn}))}));ln.displayName="VideoIframe";var fn=a(require("@bentoproject/core/preact")),vn=a(require("@bentoproject/core/preact")),sn=a(require("@bentoproject/core/preact")),dn=["autoplay","endscreenEnable","info","mute","sharingEnable","start","uiHighlight","uiLogo","videoId"];function pn(n){switch(n){case"mute":return T("muted",[!0]);case"unmute":return T("muted",[!1]);case"showControls":return T("controls",[!0]);case"hideControls":return T("controls",[!1]);default:return T(n)}}function bn(n){var r=n.currentTarget,e=function(n){var r,e=g();if(!n)return e;for(;r=P.exec(n);){var t=A(r[1],r[1]),o=r[2]?A(r[2].replace(/\+/g," "),r[2]):"";e[t]=o}return e}(n.data),t=null==e?void 0:e.event;"pause"===t?R(r,"pause"):"play"===t?R(r,"playing"):"end"===t?(R(r,"pause"),R(r,"end")):"apiready"===t&&R(r,"canplay")}function mn(n,r){var e=n.autoplay,t=n.endscreenEnable,o=n.info,u=n.mute,i=n.sharingEnable,a=n.start,c=n.uiHighlight,l=n.uiLogo,s=n.videoId,d=v(n,dn),p=(0,vn.useMemo)((function(){return function(n,r){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],t=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],u=arguments.length>5&&void 0!==arguments[5]&&arguments[5],i=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],a=arguments.length>7?arguments[7]:void 0,c=arguments.length>8?arguments[8]:void 0,l=!(arguments.length>9&&void 0!==arguments[9])||arguments[9],v=arguments.length>10?arguments[10]:void 0;return N("https://www.dailymotion.com/embed/video/".concat(encodeURIComponent(r),"?api=1&html=1&app=amp"),f({"endscreen-enable":t?void 0:t,"info":o?void 0:o,"mute":u||e&&E(n)?1:void 0,"sharing-enable":i?void 0:i,"start":a,"ui-highlight":c,"ui-logo":l?void 0:l},v))}(window,s,e,t,o,u,i,a,c,l)}),[s,e,t,o,u,i,a,c,l]);return fn.createElement(ln,f(f({autoplay:e,controls:!0,ref:r},d),{},{src:p,makeMethodMessage:pn,onMessage:bn}))}var yn=(0,sn.forwardRef)(mn);yn.displayName="BentoDailymotion"; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ | ||
//# sourceMappingURL=component-preact.js.map |
; | ||
var n=Object.create,e=Object.defineProperty,r=Object.getOwnPropertyDescriptor,t=Object.getOwnPropertyNames,o=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,i=function(n){return e(n,"__esModule",{value:!0})},a=function(a){return function(n,o,i){if(o&&"object"==typeof o||"function"==typeof o)for(var a,c=t(o),l=0,f=c.length;l<f;l++)a=c[l],u.call(n,a)||"default"===a||e(n,a,{get:function(n){return o[n]}.bind(null,a),enumerable:!(i=r(o,a))||i.enumerable});return n}(i(e(null!=a?n(o(a)):{},"default",a&&a.__esModule&&"default"in a?{get:function(){return a.default},enumerable:!0}:{value:a,enumerable:!0})),a)};function c(n,e,r){return e in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function l(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.push.apply(r,t)}return r}function f(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l(Object(r),!0).forEach((function(e){c(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function v(n,e){if(null==n)return{};var r,t,o={},u=Object.keys(n);for(t=0;t<u.length;t++)r=u[t],e.indexOf(r)>=0||(o[r]=n[r]);return o}!function(n,r){for(var t in i(n),r)e(n,t,{get:r[t],enumerable:!0})}(exports,{BentoDailymotion:function(){return yn},BentoDailymotionWithRef:function(){return bn}});var s=Array.isArray;function d(n){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function p(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}function m(n,e){if(n){if("string"==typeof n)return p(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(n,e):void 0}}function b(n,e){var r="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(r)return(r=r.call(n)).next.bind(r);if(Array.isArray(n)||(r=m(n))||e&&n&&"number"==typeof n.length){r&&(n=r);var t=0;return function(){return t>=n.length?{done:!0}:{done:!1,value:n[t++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var y=Object.prototype;function g(n){var e=Object.create(null);return n&&Object.assign(e,n),e}y.hasOwnProperty,y.toString;var j,w=function(){var n=this;this.promise=new Promise((function(e,r){n.resolve=e,n.reject=r}))};function h(n){return new Promise((function(e){e(n())}))}function O(n){var e=Object.getOwnPropertyDescriptor(n,"message");if(null!=e&&e.writable)return n;var r=n.message,t=n.stack,o=new Error(r);for(var u in n)o[u]=n[u];return o.stack=t,o}function S(n){for(var e,r=null,t="",o=b(arguments,!0);!(e=o()).done;){var u=e.value;u instanceof Error&&!r?r=O(u):(t&&(t+=" "),t+=u)}return r?t&&(r.message=t+": "+r.message):r=new Error(t),r}function q(n){var e,r;null===(e=(r=self).__AMP_REPORT_ERROR)||void 0===e||e.call(r,n)}function I(n){var e=S.apply(null,arguments);return e.expected=!0,e}var k=["Webkit","webkit","Moz","moz","ms","O","o"];function C(n,e,r,t,o){var u=function(n,e,r){if(e.startsWith("--"))return e;j||(j=g());var t=j[e];if(!t||r){if(t=e,void 0===n[e]){var o=function(n){return n.charAt(0).toUpperCase()+n.slice(1)}(e),u=function(n,e){for(var r=0;r<k.length;r++){var t=k[r]+e;if(void 0!==n[t])return t}return""}(n,o);void 0!==n[u]&&(t=u)}r||(j[e]=t)}return t}(n.style,e,o);if(u){var i,a=t?r+t:r;n.style.setProperty((i=u.replace(/[A-Z]/g,(function(n){return"-"+n.toLowerCase()})),k.some((function(n){return i.startsWith(n+"-")}))?"-".concat(i):i),a)}}function N(n){return null==n.__AMP_AUTOPLAY&&(n.__AMP_AUTOPLAY=function(n){var e,r=n.document.createElement("video");return r.setAttribute("muted",""),r.setAttribute("playsinline",""),r.setAttribute("webkit-playsinline",""),r.setAttribute("height","0"),r.setAttribute("width","0"),r.muted=!0,r.playsInline=!0,r.playsinline=!0,r.webkitPlaysinline=!0,function(n,e){for(var r in e)C(n,r,e[r])}(r,{position:"fixed",top:"0",width:"0",height:"0",opacity:"0"}),e=r,h((function(){return e.play()})).catch((function(){})),Promise.resolve(!r.paused)}(n)),n.__AMP_AUTOPLAY}var E=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function P(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";try{return decodeURIComponent(n)}catch(n){return e}}var A={bubbles:!0,cancelable:!0};function M(n,e,r,t){var o=r||{};n.ownerDocument;var u=n.ownerDocument.createEvent("Event");u.data=o;var i=t||A,a=i.bubbles,c=i.cancelable;u.initEvent(e,a,c),n.dispatchEvent(u)}function R(n,e){return function(n,e,r){if(!e)return n;var t=n.split("#",2),o=t[0].split("?",2);return o[0]+(o[1]?"?".concat(o[1],"&").concat(e):"?".concat(e))+(t[1]?"#".concat(t[1]):"")}(n,function(n){var e,r,t,o=[];for(var u in n){var i=n[u];if(null!=i){i=s(t=i)?t:[t];for(var a=0;a<i.length;a++)o.push((e=u,r=i[a],"".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(r))))}}return o.join("&")}(e))}function T(n,e){return JSON.stringify({"command":n,"parameters":e})}self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null},self.__AMP_LOG,new Set(["c","v","a","ad"]);var x,U=a(require("@bentoproject/core/react")),L=a(require("@bentoproject/core/react")),z=a(require("@bentoproject/core/react"));function F(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var r=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=r){var t,o,u=[],i=!0,a=!1;try{for(r=r.call(n);!(i=(t=r.next()).done)&&(u.push(t.value),!e||u.length!==e);i=!0);}catch(n){a=!0,o=n}finally{try{i||null==r.return||r.return()}finally{if(a)throw o}}return u}}(n,e)||m(n,e)||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.")}()}function B(n){var e=function(n,e){if("object"!==d(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==d(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===d(e)?e:String(e)}var D=(c(x={},"auto",0),c(x,"lazy",1),c(x,"eager",2),c(x,"unload",3),"loading"),V=a(require("@bentoproject/core/react")),W=a(require("@bentoproject/core/react")),J=a(require("@bentoproject/core/react")),Y=a(require("@bentoproject/core/react")),_=a(require("@bentoproject/core/react")),H=a(require("@bentoproject/core/react")),Z=a(require("@bentoproject/core/react")),$={"title":"","artist":"","album":"","artwork":[{"src":""}]};function G(n){var e=n.querySelector('script[type="application/ld+json"]');if(e){var r=function(n,e){try{return function(n){return JSON.parse(n)}(n)}catch(n){return null}}(e.textContent);if(r&&r.image)return"string"==typeof r.image?r.image:r.image["@list"]&&"string"==typeof r.image["@list"][0]?r.image["@list"][0]:"string"==typeof r.image.url?r.image.url:"string"==typeof r.image[0]?r.image[0]:void 0}}function K(n){var e=n.querySelector('link[rel="shortcut icon"]')||n.querySelector('link[rel="icon"]');return e?e.getAttribute("href"):void 0}function Q(n){var e=n.displayIcon,r=n.displayOverlay,t=n.metadata,o=n.onOverlayClick,u=n.pause,i=n.play,a=n.playing,c=n.wrapperRef,l=(0,_.useAmpContext)().playable;return(0,W.useEffect)((function(){if(l){var n=new IntersectionObserver((function(n){n[n.length-1].isIntersecting?i().catch((function(){})):u()}),{threshold:.5});return n.observe(c.current),function(){n.disconnect()}}u()}),[c,i,u,l]),V.createElement(V.Fragment,null,e&&V.createElement("div",{className:"eq-9e7199f"+(a?" eq-playing-9e7199f":"")},V.createElement(rn,null)),r&&V.createElement("button",{"aria-label":t&&t.title||"Unmute video",tabIndex:"0",className:"autoplay-mask-button-9e7199f fill-content-overlay-fc551a7",onClick:o}))}var X,nn,en,rn=(X=!1,nn=null,en=function(){return[1,2,3,4].map((function(n){return V.createElement("div",{className:"eq-col-9e7199f",key:n})}))},function(){if(!X){for(var n=arguments.length,e=new Array(n),r=0;r<n;r++)e[r]=arguments[r];nn=en.apply(self,e),X=!0,en=null}return nn}),tn=(0,J.forwardRef)((function(n,e){var r,t="className",o=n.autoplay,u=void 0!==o&&o,i=n.component,a=void 0===i?"video":i,c=n.controls,l=void 0!==c&&c,s=n.loading,d=n.loop,p=void 0!==d&&d,m=n.mediasession,b=void 0===m||m,y=n.noaudio,g=void 0!==y&&y,j=n.onPlayingState,O=n.onReadyState,S=n.poster,k=n.sources,C=n.src,N=n.style,E=n[t],P=v(n,["autoplay","component","controls","loading","loop","mediasession","noaudio","onPlayingState","onReadyState","poster","sources","src","style",t].map(B));r=(0,Z.useAmpContext)().notify,(0,H.useLayoutEffect)((function(){r&&r()}));var A=(0,_.useAmpContext)().playable,M=(0,_.useLoading)(s),R="unload"!==M,T=F((0,W.useState)(u),2),x=T[0],U=T[1],L=F((0,W.useState)(!1),2),z=L[0],J=L[1],X=F((0,W.useState)(null),2),nn=X[0],en=X[1],rn=F((0,W.useState)(!u),2),tn=rn[0],on=rn[1],un=(0,W.useRef)(null),an=(0,W.useRef)(null),cn=(0,W.useMemo)((function(){return new w}),[]),ln=(0,W.useRef)(D),fn=(0,Y.useValueRef)(O),vn=(0,W.useCallback)((function(n,e){if(n!==ln.current){ln.current=n;var r=fn.current;r&&r(n,e)}}),[fn]),sn=(0,Y.useValueRef)(j),dn=(0,W.useCallback)((function(n){J(n);var e=sn.current;e&&e(n)}),[sn]);(0,W.useLayoutEffect)((function(){R||dn(!1)}),[R,dn]);var pn=(0,W.useCallback)((function(){return cn.promise.then((function(){return n=an.current,(e=h((function(){return n.play(!1)}))).catch((function(n){!function(n){for(var e=arguments.length,r=new Array(e>1?e-1:0),t=1;t<e;t++)r[t-1]=arguments[t];q(I.apply(null,r))}("TRYPLAY",n)})),e;var n,e}))}),[cn]),mn=(0,W.useCallback)((function(){cn.promise.then((function(){var n;return null===(n=an.current)||void 0===n?void 0:n.pause()}))}),[cn]),bn=(0,W.useCallback)((function(){return cn.promise.then((function(){return an.current.requestFullscreen()}))}),[cn]),yn=(0,W.useCallback)((function(){U(!1),on(!0)}),[]);return(0,W.useLayoutEffect)((function(){var n,e=null===(n=an.current)||void 0===n?void 0:n.readyState;null!=e&&vn(e>0?"complete":D)}),[vn]),(0,W.useLayoutEffect)((function(){return b&&z&&nn&&function(n,e,r,t){var o=n.navigator;"mediaSession"in o&&n.MediaMetadata&&(o.mediaSession.metadata=new n.MediaMetadata($),o.mediaSession.metadata=new n.MediaMetadata(e),o.mediaSession.setActionHandler("play",r),o.mediaSession.setActionHandler("pause",t))}(window,nn,pn,mn),function(){}}),[b,z,nn,pn,mn]),(0,W.useEffect)((function(){A||mn()}),[A,mn]),(0,W.useImperativeHandle)(e,(function(){return{get readyState(){return ln.current},play:pn,pause:mn,requestFullscreen:bn,get currentTime(){return an.current?an.current.currentTime:0},get duration(){return an.current?an.current.duration:NaN},get autoplay(){return u},get controls(){return l},get loop(){return p},userInteracted:yn,mute:function(){return U(!0)},unmute:function(){tn&&U(!1)}}}),[pn,mn,bn,yn,tn,u,l,p]),V.createElement(Y.ContainWrapper,{contentRef:un,className:E,style:N,size:!0,layout:!0,paint:!0},R&&V.createElement(a,f(f({},P),{},{ref:an,loading:M,muted:x,loop:p,controls:l&&(!u||tn),onCanPlay:function(){cn.resolve(),vn("complete")},onLoadedMetadata:function(){b&&cn.promise.then((function(){var n,e,r,t;en((n=an.current,f({"title":(e=P).title||e["aria-label"]||document.title,"artist":e.artist||"","album":e.album||"","artwork":[{"src":e.artwork||e.poster||G(document)||(r=document,t=r.querySelector('meta[property="og:image"]'),t?t.getAttribute("content"):void 0)||K(document)||""}]},n&&n.getMetadata?n.getMetadata():Object.create(null))))})),vn("complete")},onPlaying:function(){return dn(!0)},onPause:function(){return dn(!1)},onEnded:function(){return dn(!1)},onError:function(n){vn("error",n),cn.reject(n)},className:"fill-stretch-fc551a7",src:C,poster:S}),k),u&&!tn&&V.createElement(Q,{metadata:nn,playing:z,displayIcon:!g&&x,wrapperRef:un,play:pn,pause:mn,displayOverlay:l,onOverlayClick:yn}))}));tn.displayName="VideoWrapper";var on=["loading","unloadOnPause","sandbox","muted","controls","origin","onCanPlay","onMessage","playerStateRef","makeMethodMessage","makeFullscreenMessage","onIframeLoad"],un=["allow-scripts","allow-same-origin","allow-popups","allow-popups-to-escape-sandbox","allow-top-navigation-by-user-activation"].join(" ");function an(n,e,r){n&&n.contentWindow&&e.then((function(){n.contentWindow.postMessage(r(),"*")}))}var cn=(0,z.forwardRef)((function(n,e){var r=n.loading,t=n.unloadOnPause,o=void 0!==t&&t,u=n.sandbox,i=void 0===u?un:u,a=n.muted,c=void 0!==a&&a,l=n.controls,s=void 0!==l&&l,d=n.origin,p=n.onCanPlay,m=n.onMessage,b=n.playerStateRef,y=n.makeMethodMessage,g=n.makeFullscreenMessage,j=n.onIframeLoad,h=v(n,on),O=(0,L.useRef)(null),S=(0,L.useMemo)((function(){return new w}),[]),q=(0,L.useRef)(y),I=(0,L.useCallback)((function(n){an(null==O?void 0:O.current,S.promise,(function(){return q.current(n)}))}),[S.promise]),k=(0,L.useRef)(g),C=(0,L.useCallback)((function(){return an(null==O?void 0:O.current,S.promise,k.current)}),[S.promise]);(0,L.useImperativeHandle)(e,(function(){return{get currentTime(){var n,e;return null!==(n=null==b||null===(e=b.current)||void 0===e?void 0:e.currentTime)&&void 0!==n?n:NaN},get duration(){var n,e;return null!==(n=null==b||null===(e=b.current)||void 0===e?void 0:e.duration)&&void 0!==n?n:NaN},requestFullscreen:function(){if(!k.current)return S.promise.then((function(){O.current.requestFullscreen()}));C()},play:function(){return I("play")},pause:function(){if(o){var n=O.current;n&&(n.src=n.src)}else I("pause")}}}),[b,I,C,S.promise,o]);var N=function(n){var e=(0,L.useRef)(null);return e.current=n,e}(m);return(0,L.useLayoutEffect)((function(){if(O.current){var n=O.current.ownerDocument.defaultView;return n.addEventListener("message",e),function(){return n.removeEventListener("message",e)}}function e(n){N.current&&(d&&!d.test(n.origin)||n.source!=O.current.contentWindow||N.current({currentTarget:O.current,target:O.current,data:n.data}))}}),[d,N]),(0,L.useLayoutEffect)((function(){I(c?"mute":"unmute")}),[c,I]),(0,L.useLayoutEffect)((function(){I(s?"showControls":"hideControls")}),[s,I]),U.createElement("iframe",f(f({},h),{},{ref:O,allowfullscreen:!0,frameborder:"0",sandbox:i,loading:r,onCanPlay:function(){p&&S.promise.then(p),S.resolve()},onLoad:function(n){null==j||j(n)}}))}));cn.displayName="VideoIframeInternal";var ln=(0,z.forwardRef)((function(n,e){return U.createElement(tn,f(f({ref:e},n),{},{component:cn}))}));ln.displayName="VideoIframe";var fn=a(require("@bentoproject/core/react")),vn=a(require("@bentoproject/core/react")),sn=a(require("@bentoproject/core/react")),dn=["autoplay","endscreenEnable","info","mute","sharingEnable","start","uiHighlight","uiLogo","videoId"];function pn(n){switch(n){case"mute":return T("muted",[!0]);case"unmute":return T("muted",[!1]);case"showControls":return T("controls",[!0]);case"hideControls":return T("controls",[!1]);default:return T(n)}}function mn(n){var e=n.currentTarget,r=function(n){var e,r=g();if(!n)return r;for(;e=E.exec(n);){var t=P(e[1],e[1]),o=e[2]?P(e[2].replace(/\+/g," "),e[2]):"";r[t]=o}return r}(n.data),t=null==r?void 0:r.event;"pause"===t?M(e,"pause"):"play"===t?M(e,"playing"):"end"===t?(M(e,"pause"),M(e,"end")):"apiready"===t&&M(e,"canplay")}function bn(n,e){var r=n.autoplay,t=n.endscreenEnable,o=n.info,u=n.mute,i=n.sharingEnable,a=n.start,c=n.uiHighlight,l=n.uiLogo,s=n.videoId,d=v(n,dn),p=(0,vn.useMemo)((function(){return function(n,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],t=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],u=arguments.length>5&&void 0!==arguments[5]&&arguments[5],i=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],a=arguments.length>7?arguments[7]:void 0,c=arguments.length>8?arguments[8]:void 0,l=!(arguments.length>9&&void 0!==arguments[9])||arguments[9],v=arguments.length>10?arguments[10]:void 0;return R("https://www.dailymotion.com/embed/video/".concat(encodeURIComponent(e),"?api=1&html=1&app=amp"),f({"endscreen-enable":t?void 0:t,"info":o?void 0:o,"mute":u||r&&N(n)?1:void 0,"sharing-enable":i?void 0:i,"start":a,"ui-highlight":c,"ui-logo":l?void 0:l},v))}(window,s,r,t,o,u,i,a,c,l)}),[s,r,t,o,u,i,a,c,l]);return fn.createElement(ln,f(f({autoplay:r,controls:!0,ref:e},d),{},{src:p,makeMethodMessage:pn,onMessage:mn}))}var yn=(0,sn.forwardRef)(bn);yn.displayName="BentoDailymotion"; | ||
var n=Object.create,e=Object.defineProperty,r=Object.getOwnPropertyDescriptor,t=Object.getOwnPropertyNames,o=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,i=function(n){return e(n,"__esModule",{value:!0})},a=function(a){return function(n,o,i){if(o&&"object"==typeof o||"function"==typeof o)for(var a,c=t(o),l=0,f=c.length;l<f;l++)a=c[l],u.call(n,a)||"default"===a||e(n,a,{get:function(n){return o[n]}.bind(null,a),enumerable:!(i=r(o,a))||i.enumerable});return n}(i(e(null!=a?n(o(a)):{},"default",a&&a.__esModule&&"default"in a?{get:function(){return a.default},enumerable:!0}:{value:a,enumerable:!0})),a)};function c(n,e,r){return e in n?Object.defineProperty(n,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):n[e]=r,n}function l(n,e){var r=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);e&&(t=t.filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.push.apply(r,t)}return r}function f(n){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l(Object(r),!0).forEach((function(e){c(n,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}))}return n}function v(n,e){if(null==n)return{};var r,t,o={},u=Object.keys(n);for(t=0;t<u.length;t++)r=u[t],e.indexOf(r)>=0||(o[r]=n[r]);return o}!function(n,r){for(var t in i(n),r)e(n,t,{get:r[t],enumerable:!0})}(exports,{BentoDailymotion:function(){return yn},BentoDailymotionWithRef:function(){return bn}});var s=Array.isArray;function d(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}function p(n,e){if(n){if("string"==typeof n)return d(n,e);var r=Object.prototype.toString.call(n).slice(8,-1);return"Object"===r&&n.constructor&&(r=n.constructor.name),"Map"===r||"Set"===r?Array.from(n):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(n,e):void 0}}function m(n,e){var r="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(r)return(r=r.call(n)).next.bind(r);if(Array.isArray(n)||(r=p(n))||e&&n&&"number"==typeof n.length){r&&(n=r);var t=0;return function(){return t>=n.length?{done:!0}:{done:!1,value:n[t++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function b(n){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}var y=Object.prototype;function g(n){var e=Object.create(null);return n&&Object.assign(e,n),e}y.hasOwnProperty,y.toString;var j,w=function(){var n=this;this.promise=new Promise((function(e,r){n.resolve=e,n.reject=r}))};function h(n){return new Promise((function(e){e(n())}))}function O(n){var e=Object.getOwnPropertyDescriptor(n,"message");if(null!=e&&e.writable)return n;var r=n.message,t=n.stack,o=new Error(r);for(var u in n)o[u]=n[u];return o.stack=t,o}function S(n){for(var e,r=null,t="",o=m(arguments,!0);!(e=o()).done;){var u=e.value;u instanceof Error&&!r?r=O(u):(t&&(t+=" "),t+=u)}return r?t&&(r.message=t+": "+r.message):r=new Error(t),r}function q(n){var e,r;null===(e=(r=self).__AMP_REPORT_ERROR)||void 0===e||e.call(r,n)}function I(n){var e=S.apply(null,arguments);return e.expected=!0,e}var k=["Webkit","webkit","Moz","moz","ms","O","o"];function C(n,e,r,t,o){var u=function(n,e,r){if(e.startsWith("--"))return e;j||(j=g());var t=j[e];if(!t||r){if(t=e,void 0===n[e]){var o=function(n){return n.charAt(0).toUpperCase()+n.slice(1)}(e),u=function(n,e){for(var r=0;r<k.length;r++){var t=k[r]+e;if(void 0!==n[t])return t}return""}(n,o);void 0!==n[u]&&(t=u)}r||(j[e]=t)}return t}(n.style,e,o);if(u){var i,a=t?r+t:r;n.style.setProperty((i=u.replace(/[A-Z]/g,(function(n){return"-"+n.toLowerCase()})),k.some((function(n){return i.startsWith(n+"-")}))?"-".concat(i):i),a)}}function N(n){return null==n.__AMP_AUTOPLAY&&(n.__AMP_AUTOPLAY=function(n){var e,r=n.document.createElement("video");return r.setAttribute("muted",""),r.setAttribute("playsinline",""),r.setAttribute("webkit-playsinline",""),r.setAttribute("height","0"),r.setAttribute("width","0"),r.muted=!0,r.playsInline=!0,r.playsinline=!0,r.webkitPlaysinline=!0,function(n,e){for(var r in e)C(n,r,e[r])}(r,{position:"fixed",top:"0",width:"0",height:"0",opacity:"0"}),e=r,h((function(){return e.play()})).catch((function(){})),Promise.resolve(!r.paused)}(n)),n.__AMP_AUTOPLAY}var E=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function P(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";try{return decodeURIComponent(n)}catch(n){return e}}var A={bubbles:!0,cancelable:!0};function M(n,e,r,t){var o=r||{};n.ownerDocument;var u=n.ownerDocument.createEvent("Event");u.data=o;var i=t||A,a=i.bubbles,c=i.cancelable;u.initEvent(e,a,c),n.dispatchEvent(u)}function R(n,e){return function(n,e,r){if(!e)return n;var t=n.split("#",2),o=t[0].split("?",2);return o[0]+(o[1]?"?".concat(o[1],"&").concat(e):"?".concat(e))+(t[1]?"#".concat(t[1]):"")}(n,function(n){var e,r,t,o=[];for(var u in n){var i=n[u];if(null!=i){i=s(t=i)?t:[t];for(var a=0;a<i.length;a++)o.push((e=u,r=i[a],"".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(r))))}}return o.join("&")}(e))}function T(n,e){return JSON.stringify({"command":n,"parameters":e})}self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null},self.__AMP_LOG,new Set(["c","v","a","ad"]);var x,U=a(require("@bentoproject/core/react")),L=a(require("@bentoproject/core/react")),z=a(require("@bentoproject/core/react"));function F(n,e){return function(n){if(Array.isArray(n))return n}(n)||function(n,e){var r=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=r){var t,o,u=[],i=!0,a=!1;try{for(r=r.call(n);!(i=(t=r.next()).done)&&(u.push(t.value),!e||u.length!==e);i=!0);}catch(n){a=!0,o=n}finally{try{i||null==r.return||r.return()}finally{if(a)throw o}}return u}}(n,e)||p(n,e)||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.")}()}function B(n){var e=function(n,e){if("object"!==b(n)||null===n)return n;var r=n[Symbol.toPrimitive];if(void 0!==r){var t=r.call(n,"string");if("object"!==b(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===b(e)?e:String(e)}var D=(c(x={},"auto",0),c(x,"lazy",1),c(x,"eager",2),c(x,"unload",3),"loading"),V=a(require("@bentoproject/core/react")),W=a(require("@bentoproject/core/react")),J=a(require("@bentoproject/core/react")),Y=a(require("@bentoproject/core/react")),_=a(require("@bentoproject/core/react")),H=a(require("@bentoproject/core/react")),Z=a(require("@bentoproject/core/react")),$={"title":"","artist":"","album":"","artwork":[{"src":""}]};function G(n){var e=n.querySelector('script[type="application/ld+json"]');if(e){var r=function(n,e){try{return function(n){return JSON.parse(n)}(n)}catch(n){return null}}(e.textContent);if(r&&r.image)return"string"==typeof r.image?r.image:r.image["@list"]&&"string"==typeof r.image["@list"][0]?r.image["@list"][0]:"string"==typeof r.image.url?r.image.url:"string"==typeof r.image[0]?r.image[0]:void 0}}function K(n){var e=n.querySelector('link[rel="shortcut icon"]')||n.querySelector('link[rel="icon"]');return e?e.getAttribute("href"):void 0}function Q(n){var e=n.displayIcon,r=n.displayOverlay,t=n.metadata,o=n.onOverlayClick,u=n.pause,i=n.play,a=n.playing,c=n.wrapperRef,l=(0,_.useAmpContext)().playable;return(0,W.useEffect)((function(){if(l){var n=new IntersectionObserver((function(n){n[n.length-1].isIntersecting?i().catch((function(){})):u()}),{threshold:.5});return n.observe(c.current),function(){n.disconnect()}}u()}),[c,i,u,l]),V.createElement(V.Fragment,null,e&&V.createElement("div",{className:"eq-9e7199f"+(a?" eq-playing-9e7199f":"")},V.createElement(rn,null)),r&&V.createElement("button",{"aria-label":t&&t.title||"Unmute video",tabIndex:"0",className:"autoplay-mask-button-9e7199f fill-content-overlay-fc551a7",onClick:o}))}var X,nn,en,rn=(X=!1,nn=null,en=function(){return[1,2,3,4].map((function(n){return V.createElement("div",{className:"eq-col-9e7199f",key:n})}))},function(){if(!X){for(var n=arguments.length,e=new Array(n),r=0;r<n;r++)e[r]=arguments[r];nn=en.apply(self,e),X=!0,en=null}return nn}),tn=(0,J.forwardRef)((function(n,e){var r,t="className",o=n.autoplay,u=void 0!==o&&o,i=n.component,a=void 0===i?"video":i,c=n.controls,l=void 0!==c&&c,s=n.loading,d=n.loop,p=void 0!==d&&d,m=n.mediasession,b=void 0===m||m,y=n.noaudio,g=void 0!==y&&y,j=n.onPlayingState,O=n.onReadyState,S=n.poster,k=n.sources,C=n.src,N=n.style,E=n[t],P=v(n,["autoplay","component","controls","loading","loop","mediasession","noaudio","onPlayingState","onReadyState","poster","sources","src","style",t].map(B));r=(0,Z.useAmpContext)().notify,(0,H.useLayoutEffect)((function(){r&&r()}));var A=(0,_.useAmpContext)().playable,M=(0,_.useLoading)(s),R="unload"!==M,T=F((0,W.useState)(u),2),x=T[0],U=T[1],L=F((0,W.useState)(!1),2),z=L[0],J=L[1],X=F((0,W.useState)(null),2),nn=X[0],en=X[1],rn=F((0,W.useState)(!u),2),tn=rn[0],on=rn[1],un=(0,W.useRef)(null),an=(0,W.useRef)(null),cn=(0,W.useMemo)((function(){return new w}),[]),ln=(0,W.useRef)(D),fn=(0,Y.useValueRef)(O),vn=(0,W.useCallback)((function(n,e){if(n!==ln.current){ln.current=n;var r=fn.current;r&&r(n,e)}}),[fn]),sn=(0,Y.useValueRef)(j),dn=(0,W.useCallback)((function(n){J(n);var e=sn.current;e&&e(n)}),[sn]);(0,W.useLayoutEffect)((function(){R||dn(!1)}),[R,dn]);var pn=(0,W.useCallback)((function(){return cn.promise.then((function(){return n=an.current,(e=h((function(){return n.play(!1)}))).catch((function(n){!function(n){for(var e=arguments.length,r=new Array(e>1?e-1:0),t=1;t<e;t++)r[t-1]=arguments[t];q(I.apply(null,r))}("TRYPLAY",n)})),e;var n,e}))}),[cn]),mn=(0,W.useCallback)((function(){cn.promise.then((function(){var n;return null===(n=an.current)||void 0===n?void 0:n.pause()}))}),[cn]),bn=(0,W.useCallback)((function(){return cn.promise.then((function(){return an.current.requestFullscreen()}))}),[cn]),yn=(0,W.useCallback)((function(){U(!1),on(!0)}),[]);return(0,W.useLayoutEffect)((function(){var n,e=null===(n=an.current)||void 0===n?void 0:n.readyState;null!=e&&vn(e>0?"complete":D)}),[vn]),(0,W.useLayoutEffect)((function(){return b&&z&&nn&&function(n,e,r,t){var o=n.navigator;"mediaSession"in o&&n.MediaMetadata&&(o.mediaSession.metadata=new n.MediaMetadata($),o.mediaSession.metadata=new n.MediaMetadata(e),o.mediaSession.setActionHandler("play",r),o.mediaSession.setActionHandler("pause",t))}(window,nn,pn,mn),function(){}}),[b,z,nn,pn,mn]),(0,W.useEffect)((function(){A||mn()}),[A,mn]),(0,W.useImperativeHandle)(e,(function(){return{get readyState(){return ln.current},play:pn,pause:mn,requestFullscreen:bn,get currentTime(){return an.current?an.current.currentTime:0},get duration(){return an.current?an.current.duration:NaN},get autoplay(){return u},get controls(){return l},get loop(){return p},userInteracted:yn,mute:function(){return U(!0)},unmute:function(){tn&&U(!1)}}}),[pn,mn,bn,yn,tn,u,l,p]),V.createElement(Y.ContainWrapper,{contentRef:un,className:E,style:N,size:!0,layout:!0,paint:!0},R&&V.createElement(a,f(f({},P),{},{ref:an,loading:M,muted:x,loop:p,controls:l&&(!u||tn),onCanPlay:function(){cn.resolve(),vn("complete")},onLoadedMetadata:function(){b&&cn.promise.then((function(){var n,e,r,t;en((n=an.current,f({"title":(e=P).title||e["aria-label"]||document.title,"artist":e.artist||"","album":e.album||"","artwork":[{"src":e.artwork||e.poster||G(document)||(r=document,t=r.querySelector('meta[property="og:image"]'),t?t.getAttribute("content"):void 0)||K(document)||""}]},n&&n.getMetadata?n.getMetadata():Object.create(null))))})),vn("complete")},onPlaying:function(){return dn(!0)},onPause:function(){return dn(!1)},onEnded:function(){return dn(!1)},onError:function(n){vn("error",n),cn.reject(n)},className:"fill-stretch-fc551a7",src:C,poster:S}),k),u&&!tn&&V.createElement(Q,{metadata:nn,playing:z,displayIcon:!g&&x,wrapperRef:un,play:pn,pause:mn,displayOverlay:l,onOverlayClick:yn}))}));tn.displayName="VideoWrapper";var on=["loading","unloadOnPause","sandbox","muted","controls","origin","onCanPlay","onMessage","playerStateRef","makeMethodMessage","makeFullscreenMessage","onIframeLoad"],un=["allow-scripts","allow-same-origin","allow-popups","allow-popups-to-escape-sandbox","allow-top-navigation-by-user-activation"].join(" ");function an(n,e,r){n&&n.contentWindow&&e.then((function(){n.contentWindow.postMessage(r(),"*")}))}var cn=(0,z.forwardRef)((function(n,e){var r=n.loading,t=n.unloadOnPause,o=void 0!==t&&t,u=n.sandbox,i=void 0===u?un:u,a=n.muted,c=void 0!==a&&a,l=n.controls,s=void 0!==l&&l,d=n.origin,p=n.onCanPlay,m=n.onMessage,b=n.playerStateRef,y=n.makeMethodMessage,g=n.makeFullscreenMessage,j=n.onIframeLoad,h=v(n,on),O=(0,L.useRef)(null),S=(0,L.useMemo)((function(){return new w}),[]),q=(0,L.useRef)(y),I=(0,L.useCallback)((function(n){an(null==O?void 0:O.current,S.promise,(function(){return q.current(n)}))}),[S.promise]),k=(0,L.useRef)(g),C=(0,L.useCallback)((function(){return an(null==O?void 0:O.current,S.promise,k.current)}),[S.promise]);(0,L.useImperativeHandle)(e,(function(){return{get currentTime(){var n,e;return null!==(n=null==b||null===(e=b.current)||void 0===e?void 0:e.currentTime)&&void 0!==n?n:NaN},get duration(){var n,e;return null!==(n=null==b||null===(e=b.current)||void 0===e?void 0:e.duration)&&void 0!==n?n:NaN},requestFullscreen:function(){if(!k.current)return S.promise.then((function(){O.current.requestFullscreen()}));C()},play:function(){return I("play")},pause:function(){if(o){var n=O.current;n&&(n.src=n.src)}else I("pause")}}}),[b,I,C,S.promise,o]);var N=function(n){var e=(0,L.useRef)(null);return e.current=n,e}(m);return(0,L.useLayoutEffect)((function(){if(O.current){var n=O.current.ownerDocument.defaultView;return n.addEventListener("message",e),function(){return n.removeEventListener("message",e)}}function e(n){N.current&&(d&&!d.test(n.origin)||n.source!=O.current.contentWindow||N.current({currentTarget:O.current,target:O.current,data:n.data}))}}),[d,N]),(0,L.useLayoutEffect)((function(){I(c?"mute":"unmute")}),[c,I]),(0,L.useLayoutEffect)((function(){I(s?"showControls":"hideControls")}),[s,I]),U.createElement("iframe",f(f({},h),{},{ref:O,allowfullscreen:!0,frameborder:"0",sandbox:i,loading:r,onCanPlay:function(){p&&S.promise.then(p),S.resolve()},onLoad:function(n){null==j||j(n)}}))}));cn.displayName="VideoIframeInternal";var ln=(0,z.forwardRef)((function(n,e){return U.createElement(tn,f(f({ref:e},n),{},{component:cn}))}));ln.displayName="VideoIframe";var fn=a(require("@bentoproject/core/react")),vn=a(require("@bentoproject/core/react")),sn=a(require("@bentoproject/core/react")),dn=["autoplay","endscreenEnable","info","mute","sharingEnable","start","uiHighlight","uiLogo","videoId"];function pn(n){switch(n){case"mute":return T("muted",[!0]);case"unmute":return T("muted",[!1]);case"showControls":return T("controls",[!0]);case"hideControls":return T("controls",[!1]);default:return T(n)}}function mn(n){var e=n.currentTarget,r=function(n){var e,r=g();if(!n)return r;for(;e=E.exec(n);){var t=P(e[1],e[1]),o=e[2]?P(e[2].replace(/\+/g," "),e[2]):"";r[t]=o}return r}(n.data),t=null==r?void 0:r.event;"pause"===t?M(e,"pause"):"play"===t?M(e,"playing"):"end"===t?(M(e,"pause"),M(e,"end")):"apiready"===t&&M(e,"canplay")}function bn(n,e){var r=n.autoplay,t=n.endscreenEnable,o=n.info,u=n.mute,i=n.sharingEnable,a=n.start,c=n.uiHighlight,l=n.uiLogo,s=n.videoId,d=v(n,dn),p=(0,vn.useMemo)((function(){return function(n,e){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],t=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],u=arguments.length>5&&void 0!==arguments[5]&&arguments[5],i=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],a=arguments.length>7?arguments[7]:void 0,c=arguments.length>8?arguments[8]:void 0,l=!(arguments.length>9&&void 0!==arguments[9])||arguments[9],v=arguments.length>10?arguments[10]:void 0;return R("https://www.dailymotion.com/embed/video/".concat(encodeURIComponent(e),"?api=1&html=1&app=amp"),f({"endscreen-enable":t?void 0:t,"info":o?void 0:o,"mute":u||r&&N(n)?1:void 0,"sharing-enable":i?void 0:i,"start":a,"ui-highlight":c,"ui-logo":l?void 0:l},v))}(window,s,r,t,o,u,i,a,c,l)}),[s,r,t,o,u,i,a,c,l]);return fn.createElement(ln,f(f({autoplay:r,controls:!0,ref:e},d),{},{src:p,makeMethodMessage:pn,onMessage:mn}))}var yn=(0,sn.forwardRef)(bn);yn.displayName="BentoDailymotion"; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ | ||
//# sourceMappingURL=component-react.js.map |
{ | ||
"name": "@bentoproject/dailymotion", | ||
"version": "1.2205120110.0", | ||
"version": "1.2205120110.1", | ||
"description": "Bento dailymotion Component", | ||
@@ -45,4 +45,4 @@ "author": "Bento Authors", | ||
"dependencies": { | ||
"@bentoproject/core": "0.2205120110.0" | ||
"@bentoproject/core": "0.2205120110.1" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1609980
+ Added@bentoproject/core@0.2205120110.1(transitive)
- Removed@bentoproject/core@0.2205120110.0(transitive)