(()=>{var __webpack_modules__={562:(e,t,i)=>{"use strict";i.d(t,{e:()=>n});class n extends Error{constructor(){super("[bs-player] O player não conseguiu ficar pronto para uso"),this.name="PlayerReadyFailed"}}},266:(e,t,i)=>{"use strict";i.d(t,{V:()=>o});var n=i(673),r=i(510);class o{static getOptions(e){return Object.values(e).reduce(((e,t)=>Object.assign(Object.assign({},e),t.reduce(((e,t)=>Object.assign(Object.assign({},e),t.options||{})),{}))),{})}static render(e){const t=new r.Z6;return(0,n.K0)(e,(e=>{if("string"!=typeof e)return e;const i=e.matchAll(new RegExp("{[^{}]*}","g"));return Array.from(i).reduce(((e,i)=>e.replace(i[0],t.get(i[0]))),e)}))}static extract(e){const t=this.getOptions(e);return this.render(t)}}},673:(e,t,i)=>{"use strict";i.d(t,{Cb:()=>u,FQ:()=>r,Gv:()=>s,K0:()=>c,Mp:()=>a,St:()=>p,Tx:()=>o,f0:()=>_,fm:()=>d,mp:()=>n,pX:()=>h,rL:()=>l});const n=(e,t,...i)=>{console[e](`[player-web] ${t}`,i)},r=e=>({isHoc:!0,func:e}),o=(e,t=void 0)=>{let i=e;return"default"in e&&(i=e.default),"function"==typeof i&&(t?i(...t):i())},s=e=>"object"==typeof e&&null!==e,a=e=>e in window,l=(e,...t)=>[e,...t].reduce(((e,t)=>Object.keys(t).reduce(((e,i)=>{const n=t[i];return i in e&&"object"==typeof n&&!Array.isArray(n)?e[i]=l(e[i],n):i in e&&Array.isArray(n)?e[i]=[...e[i],...n]:e[i]=n,e}),e)),{}),c=(e,t)=>{let i={};for(let n in e)e.hasOwnProperty(n)&&("object"!=typeof e[n]||Array.isArray(e[n])?i[n]=t(e[n]):i[n]=c(e[n],t));return i},u=e=>e.toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g,((e,t)=>t.toUpperCase())),d=e=>new Promise((t=>{let i=0;const r=()=>{if(i>=500)return n("warn",`A biblioteca ${e} não foi encontrada`),void t(void 0);void 0!==window[e]?t(window[e]):(i+=10,setTimeout(r,10))};r()})),p=(e,{maxTime:t=100}={})=>new Promise((i=>{let n=0;const r=()=>{n>=t?i(!1):e()?i(!0):(n+=10,setTimeout(r,10))};r()}));function h(e){return()=>class extends Clappr.ContainerPlugin{get name(){return"bs-player"}bindEvents(){this.container.playback.on("wm:videometadata:loaded",(t=>{const i=new CustomEvent("metadataLoaded",{detail:t});e.dispatchEvent(i)}))}}}const _=(e,t=void 0)=>new CustomEvent(e,{detail:t})},463:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{R:()=>PluginLoader});var _helpers__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(673),_plugins_yml__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(153),__awaiter=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class PluginLoader{constructor(e){this.plugins=_plugins_yml__WEBPACK_IMPORTED_MODULE_0__.A.plugins,this.state=Object.assign({autoPlay:!1,autoNext:!1},e)}checkCondition(evalString){if(!evalString)return!0;const{autoNext,autoPlay,pip}=this.state;return eval(evalString)}has(e){return void 0!==Object.values(this.getPluginsList()).find((t=>t.find((t=>t.name===e))))&&void 0!==window[e]}filterPlugins(e,t){return Object.fromEntries(Object.entries(e).map((([e,i])=>[e,i.filter((e=>t(e.condition)))])))}getPluginsList(){return this.filterPlugins(this.plugins,(e=>this.checkCondition(e)))}loadPlugins(){return __awaiter(this,void 0,void 0,(function*(){const e=Object.values(this.plugins).flat();yield Promise.all(e.map((e=>__awaiter(this,void 0,void 0,(function*(){if(this.checkCondition(e.condition)&&e.loadName)try{yield window.globalWebdeps(e.loadName)}catch(t){(0,_helpers__WEBPACK_IMPORTED_MODULE_1__.mp)("warn",`O seguinte plugin não foi carregado: ${e.name}`)}})))))}))}}},209:(e,t,i)=>{"use strict";i.d(t,{Nj:()=>P,aK:()=>C,ai:()=>m,S1:()=>I,Sm:()=>x});var n=i(463),r=i(510);const o=new r.Z6,s="smart"===o.get("CHANNEL"),a=o.get("SITE_ID"),l=()=>{var e;const t=null!==(e=o.get("PLAYER.PIP_OPTIONS"))&&void 0!==e?e:{},i={ge:{position:{bottom:s?80:10,left:10,right:10,top:10},width:s?260:320,height:s?146:180},default:{position:{bottom:10,left:10,right:10,top:10},width:s?260:320,height:s?146:180}},n=a&&a in i?i[a]:i.default;return Object.assign(Object.assign({},n),t)},c=".media-control-position__right",u="clappr-detach--is-detached__hidden",d="clappr-detach--is-detached__visible",p=class{constructor(e,t){this.player=e,this.wrapper="string"==typeof t?document.querySelector(t):t,this.wmPlayerContainer=this.wrapper.parentElement,this.createObserver()}setPlayerStyles(){return e=this,t=void 0,r=function*(){const e=yield i.e(782).then(i.bind(i,782));let t=this.wrapper.querySelector("style[data-pip-style]");t?t.innerHTML=e.default:(t=document.createElement("style"),t.setAttribute("data-pip-style","true"),t.innerHTML=e.default,this.wrapper.prepend(t))},new((n=void 0)||(n=Promise))((function(i,o){function s(e){try{l(r.next(e))}catch(e){o(e)}}function a(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}));var e,t,n,r}createObserver(){window.IntersectionObserver&&(this.observer=new IntersectionObserver(((e,t)=>{e.forEach((e=>{this.observerCallback(e,t)}))}),{threshold:.7}))}observerCallback(e,t){const i=this.player.isPlaying(),n=1===e.intersectionRatio&&!i,r=e.boundingClientRect.top<0;i&&e.intersectionRatio<.7&&r?this.detachPlayer():this.attachPlayer(),n&&this.isPlayerDetached()&&t.unobserve(this.wrapper)}detachPlayer(){this.getPlayerDiv().classList.add(u);const e={isDetached:!0,detachOptions:l()};this.player.configure(e),setTimeout((()=>this.stylePipIfHaveOverlappingElement()),200),this.displayCloseButton(!0),this.setPlayerStyles(),this.wmPlayerContainer.style.zIndex="101"}attachPlayer(){const e=Object.assign({isDetached:!1},(()=>{const e={default:{position:{bottom:0,left:0},width:"100%",height:"100%"}};return a&&a in e?e[a]:e.default})());this.player.configure(e);const t=this.getPlayerDiv();t.classList.remove(u),t.classList.remove(d),this.displayCloseButton(!1),this.wmPlayerContainer.style.zIndex=""}getPlayerDiv(){return this.wrapper.querySelector("div")}isADPlaybackType(){return"ad"===this.player.playback.getPlaybackType()}isPlayerDetached(){return!!this.wrapper.querySelector(".clappr-detach--is-detached")}stylePipIfHaveOverlappingElement(){const e=this.getPlayerDiv();let t=document.elementFromPoint(window.innerWidth-parseInt(e.style.width)/2,window.innerHeight-50);const i=!e.contains(t);if(i)for(;t.parentElement&&"fixed"!==window.getComputedStyle(t).position;)t=t.parentElement;if(i&&"HTML"!==t.tagName){const i=window.innerHeight-t.getBoundingClientRect().top;e.style.marginBottom=`${i+5}px`}e.classList.remove(u),e.classList.add(d)}displayCloseButton(e){const t=this.getCloseButton(),i=t.firstChild;t&&t.firstElementChild&&(t.style.display=e?"inherit":"none",t.style.opacity=e?"1":"0",t.style.pointerEvents=e?"auto":"none",i.style.opacity=e?"1":"0")}getCloseButton(){const e=this.getUpperMediaControl().querySelector(c);if(e)return e.querySelector(".clappr-detach-close-button")}getUpperMediaControl(){return this.wrapper.querySelector(".media-control-panel__upper")}bindPlayerEvents(e=0){this.player?(this.player.on(Clappr.Events.PLAYER_PLAY,(()=>{this.onPlayerPlay()})),this.observer&&this.player.on(Clappr.Events.PLAYER_PAUSE,(()=>{this.onPlayerPause()}))):e<3&&setTimeout((()=>this.bindPlayerEvents(e+1)),500)}onPlayerPlay(){this.addCloseButton(),this.displayCloseButton(this.isPlayerDetached()),window.onePlayerHasPlayed=!0,this.observer&&(WM.PlayerManager.map((e=>{this.disableViewportPlayPlugin(e),e!==this.player&&(e.pause(),e.configure({isDetached:!1}))})),this.observer.observe(this.wrapper))}onPlayerPause(){this.isPlayerDetached()||this.observer.unobserve(this.wrapper)}disableViewportPlayPlugin(e){const t=e.getPlugin("viewport_play_plugin");t&&(t.enabled=!1)}addCloseButton(){if(!this.getCloseButton()){const e=document.createElement("button");e.onclick=()=>{this.handleCloseButton()},this.styleCloseButton(e),this.getUpperMediaControl().querySelector(c).appendChild(e)}}handleCloseButton(){this.player.pause(),this.attachPlayer(),this.observer.unobserve(this.wrapper)}styleCloseButton(e){e.classList.add("clappr-detach-close-button","attach-video-button","media-control-element","codex-button","codex-button--small","codex-button--main-primary","codex-button--icon-only"),e.style.display="none",e.style.setProperty("visibility","visible","important"),e.innerHTML='<svg fill="#FFF" viewBox="0 0 24 24"> <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/> </svg>',e.querySelector("svg").classList.add("codex-button__svg-fill")}};var h=i(673);class _{constructor(e){this.props=e,this.currentOptions={width:"100%",height:"100%",persistConfig:!1}}push(e){return this.currentOptions=Object.assign(Object.assign({},this.currentOptions),e),this}get(e){return this.currentOptions[e]}toObject(){return Object.entries(this.currentOptions).reduce(((e,[t,i])=>this.props.hide.includes(t)?e:Object.assign(Object.assign({},e),{[t]:i})),{})}}var v=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};const y={memoriaglobo:"G-QPECB9XXDY",historiaglobo:"G-P03LXCRJMJ",globofilmes:"G-EMM9KQCDE9",redeglobo:"G-7D6HZKQYC8",bhfm:"G-SWDXP7GY6D",cbn:"G-66QBBBG3XB",radioglobo:"G-R8X7DFEM60",g1:"G-4DF8YFDHV7",ge:"G-K8B6Y0T4CS",gshow:"G-W1G9LMC88G",receitas:"G-GYCLBK1JRG",globoplay:"G-WLHSK1RZ32",premiere:"G-TH6ECKBNLK",combate:"G-62M5LFRF1R",cartola:"G-92SLBZ88H9",home:"G-P4F3TC8HVE",vitrine:"G-G5YX0X0P68"},g={globoId:()=>v(void 0,void 0,void 0,(function*(){if(!(yield(0,h.St)((()=>{var e;return Boolean(null===(e=window.glb)||void 0===e?void 0:e.globoIdClientMap)}))))return null;try{return{user_code:(yield window.glb.globoIdClientMap.getPreviewUser()).globoId,user_code_provider:"oidc"}}catch(e){return null}})),libAnalytics:()=>{var e;if(null===(e=window.libAnalytics)||void 0===e?void 0:e.status.dataAvailable){const e=window.libAnalytics.data.get("user_code","user_code_provider");return{user_code:e.user_code||"",user_code_provider:e.user_code_provider||""}}return null},dataLayer:()=>{var e,t;const i=null===(e=window.dataLayer)||void 0===e?void 0:e.find((e=>"bd_suser_code"in e)),n=null===(t=window.dataLayer)||void 0===t?void 0:t.find((e=>"bd_suser_provider"in e));return(null==i?void 0:i.bd_suser_code)&&(null==n?void 0:n.bd_suser_provider)?{user_code:i.bd_suser_code,user_code_provider:n.bd_suser_provider}:null}};function b(){return v(this,void 0,void 0,(function*(){const e=Object.entries(g).reduce(((e,t)=>v(this,[e,t],void 0,(function*(e,[,t]){return(yield e)||t()}))),Promise.resolve(null));return(yield e)||{user_code:"",user_code_provider:""}}))}var f=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class m{constructor(e){this.playerOptions=new _({hide:["autoPlay"]}),this.asyncIsDone=!1,this.isEnabled=!1,this.configure=e=>{this.playerOptions.push(e),this.instance.configure(this.playerOptions.toObject())},this.getGAOptions=()=>f(this,void 0,void 0,(function*(){var e;const{user_code:t,user_code_provider:i}=yield b();return{productUA:window.gaId||(null===(e=window.cdaaas)||void 0===e?void 0:e.SETTINGS.PRODUCT_UA)||"",extras:{dimension98:i,dimension99:t}}})),this.getGA4Options=()=>f(this,void 0,void 0,(function*(){const e=function(){var e,t,i;if(null===(e=window.libAnalytics)||void 0===e?void 0:e.status.dataAvailable)return window.libAnalytics.data.get("ga4MetricId").ga4MetricId||"";const n=(null===(i=null===(t=window.cdaaas)||void 0===t?void 0:t.SETTINGS)||void 0===i?void 0:i.SITE_ID)||"";return y[n]||""}();if(!e)return;const{user_code:t,user_code_provider:i}=yield b();return{user_id:t,endpoint_keys:{measurementId:e},user_properties:{user_code_provider:i,user_code:t},event_params:{pip:this.playerOptions.get("pip"),autoplay:this.playerOptions.get("autoPlay"),autonext:this.playerOptions.get("autoNext"),user_code_provider_hit:i,user_code_hit:t}}})),this.getAnalyticsOptions=()=>f(this,void 0,void 0,(function*(){return{ga:yield this.getGAOptions(),ga4:yield this.getGA4Options()}})),this.enable=()=>{if(!0===this.playerOptions.get("autoPlay")){this.isEnabled=!0;const e=this.instance.getPlugin("viewport_play_plugin");e?(e&&(e.enabled=!0),e&&e.setUpObserver()):this.instance.play()}},this.playerOptions.push(e)}attachTo(e){return f(this,void 0,void 0,(function*(){yield window.globalWebdeps("player"),yield WM.playerAvailable;const t=(new r.Z6).get(),i=(new r.Z6).get("PLAYER.OPTIONS")||{},o=this.getAsyncOptions(),s=new n.R(Object.assign(Object.assign({},i),this.playerOptions.currentOptions)),a=yield new r.nu(s,{container:[(0,h.pX)(e)]}).get();o&&(this.asyncIsDone=!0),this.playerOptions.push(i).push(a).push(this.getAsyncOptions()).push(yield this.getAnalyticsOptions()),this.instance=new WM.Player(this.playerOptions.toObject());const l=new r.Uc(null==t?void 0:t.SITE_ID,this.instance);this.instance.configure((0,h.rL)(this.playerOptions.toObject(),a,l.get())),this.asyncIsDone||this.asyncUpdate(),this.instance.attachTo(e),this.playerOptions.get("pip")&&new p(this.instance,e).bindPlayerEvents()}))}asyncUpdate(){const e=(new r.Z6).get("PLAYER");if(e&&e.getAsyncData)return new Promise((t=>{e.getAsyncData().then((e=>{this.configure({adCustomData:e.adCustomData}),this.asyncIsDone=!0,t()}))}))}getAsyncOptions(){const e=(new r.Z6).get("PLAYER.ASYNC_OPTIONS")||{},t={};let i=!1;for(let n of Object.keys(e))e[n]&&(t[n]=e[n],i=!0);return i?t:null}seek(e){this.instance&&this.instance.seek(e)}destroy(){this.instance.destroy()}getInstance(){return this.instance}}var w=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class P{constructor(){this.client=null}init(){return w(this,void 0,void 0,(function*(){yield window.globalWebdeps("globoid-js");const e=this.GetOidcCredentials();yield window.glb.globoIdClientMap.initNewGloboIdClient(e);const t=window.glb.globoIdClientMap.getGloboIdClient(e.clientId);if(this.client=t,!this.client)throw new Error("OIDC não inicializou corretamente. Verifique as chaves e as configurações respectivas");return this.client.stageQueueMap.applicationUsageStageQueue=this.client.stageQueueMap.applicationUsageStageQueue||[],this}))}GetOidcCredentials(){const e=window&&window.cdaaas&&window.cdaaas.SETTINGS&&window.cdaaas.SETTINGS.OIDC||{};return 0===Object.keys(e).length&&console.warn("Não foi encontrada nenhuma chave. Verifique se está no ambiente correto"),{clientId:e.CLIENT_ID||"client-fake@apps.globoid",resource:e.CLIENT_ID||"client-fake@apps.globoid",url:e.URL||"https://id.qa.globoi.com/auth",realm:e.REALM||"globo.com",redirectUri:e.REDIRECT_URL||"localhost",onLoad:"check-sso",legacyCompatible:!0}}getClient(){return new Promise(((e,t)=>{null!==this.client&&e(this.client.stageQueueMap.applicationUsageStageQueue),t("[bs-player] Client não resolvido")}))}login(){return w(this,void 0,void 0,(function*(){const e=yield this.getClient();return new Promise(((t,i)=>{e.push((e=>w(this,void 0,void 0,(function*(){const i=yield e.loginCustomSettings({storeState:!0});t(i)}))))}))}))}isLogged(){return w(this,void 0,void 0,(function*(){const e=yield this.getClient();return new Promise(((t,i)=>{e.push((e=>w(this,void 0,void 0,(function*(){const i=e.isLogged();t(i)}))))}))}))}loadUserInfo(){return w(this,void 0,void 0,(function*(){const e=yield this.getClient();return new Promise(((t,i)=>{e.push((e=>w(this,void 0,void 0,(function*(){const i=yield e.loadUserInfo();t(i)}))))}))}))}authorize(e){return w(this,void 0,void 0,(function*(){const t=yield this.getClient();return new Promise(((i,n)=>{t.push((t=>w(this,void 0,void 0,(function*(){const n=yield t.authorize(e);i(n)}))))}))}))}redirectToProvisioning(e){return w(this,void 0,void 0,(function*(){const t=yield this.getClient();return new Promise((i=>{t.push((t=>w(this,void 0,void 0,(function*(){yield t.redirectToProvisioning(e,window.location.href),i(!0)}))))}))}))}}var O=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class E{static getClient(){return O(this,void 0,void 0,(function*(){return E.client||(E.client=yield(0,h.fm)("HorizonClient")),E.client}))}static send(e){return O(this,void 0,void 0,(function*(){const t=yield E.getClient();t?t.send({id:"common-event",version:"0.1",contentType:"common",properties:e}):(0,h.mp)("warn","Failure to send horizon event",e)}))}}const C=E;var k=i(707),A=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class x{constructor(e,t,i,n){this.colors={g1:"#C4170C",ge:"#06AA48",gshow:"#FF6700",receitas:{background:"#FFC800",text:"#5A2864"}},this.root=e,this.videoId=t,this.tenantId=i,this.size=n,this.root.addEventListener("tapumes:show",(e=>A(this,void 0,void 0,(function*(){this.push(e.detail)}))))}setStyles(){return A(this,void 0,void 0,(function*(){if(this.styles)return;const e=yield i.e(588).then(i.bind(i,588)),t=document.createElement("style");t.innerHTML=e.default,this.root.prepend(t),this.styles=t}))}loadIcons(){return A(this,void 0,void 0,(function*(){if(this.icons)return;const{Icons:e}=yield i.e(94).then(i.bind(i,94));this.icons=new e}))}setColors(){const e=this.root.querySelector(".tapume"),t=this.colors[this.tenantId];if(!t)return;let i=t;"object"==typeof i&&(i=i.background),i&&e.style.setProperty("--background-color",i),"object"==typeof t&&t.text&&e.style.setProperty("--text-color",t.text)}getCustomFields(){const e=(new r.Z6).get("CATEGORIAS");return{CATEGORIAS:t=>e.find((e=>e.includes(t)))}}getCustomData(e){const t=this.getCustomFields(),i=Object.keys(e).find((e=>e in t));return Object.entries(e[i]).reduce(((e,[n,r])=>t[i](n)?r:e),{})}getData(e){return A(this,void 0,void 0,(function*(){const t=(new r.Z6).get("SITE_ID"),{default:n}=(yield i(699)(`./${t}.json`).catch((()=>{})))||{default:void 0};if(!n)return k[e];const o=Object.assign({custom:{}},n),{custom:s}=o,a=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(i[n[r]]=e[n[r]])}return i}(o,["custom"]);return Object.assign(Object.assign(Object.assign({},k),a),this.getCustomData(s))[e]}))}push(e){return A(this,arguments,void 0,(function*({name:e,auth:t,serviceId:n}){const r=yield this.getData(e);r.icon&&this.loadIcons(),yield this.setStyles();const{default:o}=yield i(71)(`./${r.template}`),s=yield o({auth:t,videoId:this.videoId,data:r,serviceId:n});this.root.appendChild(s),this.root.querySelector(".tapume").classList.add(`tapume--${this.size}`),this.setColors()}))}}class L extends Error{constructor(){super("[bs-player] O tapume não foi definido no momento da renderização"),this.name="TapumeNotDefined"}}i(562);class I{constructor({videoId:e,data:t,serviceId:i}){this.videoId=e,this.data=t,this.serviceId=i}start(e=`https://s02.video.glbimg.com/x720/${this.videoId}.jpg`){const t=document.createElement("div");return t.classList.add("tapume"),t.setAttribute("style",`background-image: url(${e})`),this.tapume=t,this}preProcess(e){return this.data=e(this.data),this}createInnerTexts(){if(!this.tapume)throw new L;const e=document.createElement("div");e.classList.add("tapume__texts");const t=document.createElement("h2");t.classList.add("codex-heading","codex-heading--small-1x","tapume__heading"),t.textContent=this.data.title;const i=document.createElement("p");return i.classList.add("codex-paragraph","codex-paragraph--medium","tapume__paragraph"),i.textContent=this.data.description,e.appendChild(t),e.appendChild(i),this.tapume.appendChild(e),this}createArrowButton(){if(!this.tapume)throw new L;const e=document.createElement("div");return e.classList.add("tapume__return"),this.tapume.appendChild(e),this}createIcon(){if(!this.tapume)throw new L;if(!this.data.icon)return this;const e=document.createElement("div");e.classList.add("tapume__icon");const t=document.createElement("icon-element");return t.setAttribute("name",this.data.icon),e.appendChild(t),this.tapume.appendChild(e),this}createButtons(e){if(!this.tapume)throw new L;const t=document.createElement("div");return t.classList.add("tapume__buttons"),this.data.buttons.forEach((i=>{const n=document.createElement("a");n.textContent=i.label,i.href&&(n.href=i.href),i.event&&i.event.forEach((e=>{const{trigger:t}=e,i=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);r<n.length;r++)t.indexOf(n[r])<0&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(i[n[r]]=e[n[r]])}return i}(e,["trigger"]);n.addEventListener(t,(()=>{this.tracker.send(i)}))})),i.login&&n.addEventListener("click",(()=>e.login())),i.provisioning&&n.addEventListener("click",(()=>e.redirectToProvisioning([this.serviceId]))),n.setAttribute("class",`${i.className} tapume__button`),t.appendChild(n)})),this.tapume.appendChild(t),this}setTracker(e){return this.tracker=e,this}build(){if(!this.tapume)throw new L;const e=document.createElement("div");return this.data.onShow&&this.tracker&&this.tracker.send(this.data.onShow),e.appendChild(this.tapume)}}},979:(__unused_webpack_module,__webpack_exports__,__webpack_require__)=>{"use strict";__webpack_require__.d(__webpack_exports__,{n:()=>PluginProvider});var _helpers__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(673),_handlers__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(266),__awaiter=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class PluginProvider{constructor(e,t={}){this.loader=e,this.defaultPlugins=t}getGlobalPlugins(){return window.PlayerPlugins?window.PlayerPlugins:{}}getPlugins(){return(0,_helpers__WEBPACK_IMPORTED_MODULE_1__.K0)(this.loader.getPluginsList(),(e=>e.filter((e=>!!(0,_helpers__WEBPACK_IMPORTED_MODULE_1__.Mp)(e.name)||((0,_helpers__WEBPACK_IMPORTED_MODULE_1__.mp)("warn",`O seguinte plugin não foi encontrado: ${e.name}`),!1))).map((e=>{let t=window[e.name];return"default"in t&&(t=t.default),e.params?{function:t,params:e.params}:t}))))}mountPlugins(plugins){return(0,_helpers__WEBPACK_IMPORTED_MODULE_1__.K0)(plugins,(plugins=>plugins.map((plugin=>"function"in plugin?(0,_helpers__WEBPACK_IMPORTED_MODULE_1__.Tx)(plugin.function,plugin.params.map((param=>eval(param)))):"function"==typeof plugin?(0,_helpers__WEBPACK_IMPORTED_MODULE_1__.Tx)(plugin):plugin))))}get(){return __awaiter(this,void 0,void 0,(function*(){yield this.loader.loadPlugins();const e=(0,_helpers__WEBPACK_IMPORTED_MODULE_1__.rL)(this.getGlobalPlugins(),this.getPlugins(),this.defaultPlugins),t=_handlers__WEBPACK_IMPORTED_MODULE_0__.V.extract(this.loader.getPluginsList()),i=this.mountPlugins(e);return Object.assign({plugins:Object.assign({},i)},t)}))}}},510:(e,t,i)=>{"use strict";i.d(t,{Uc:()=>l,nu:()=>n.n,Z6:()=>o});var n=i(979),r=i(673);class o{constructor(){var e;this.settings=null===(e=window.cdaaas)||void 0===e?void 0:e.SETTINGS}get(e=""){const t=e.replace(new RegExp("[{}]","g"),"");try{return-1===t.search(".")?this.settings:t.split(".").reduce(((e,t)=>{if(t in e)return e[t];throw new Error}),this.settings)}catch(e){return(0,r.mp)("warn",`A propriedade "${t}" não foi encontrada nas configurações globais`),null}}}var s=i(209);const a={g1:{onPlay:(0,r.FQ)((({player:e})=>({userInvoked:t})=>t&&s.aK.send({eventCategory:"viewportplay-videos",eventAction:"click to play",eventLabel:"viewport",eventValue:e.playback.currentVolume.toString(),eventProperty:`${e.options.source}`}))),ViewportPlayPlugin:{viewportPlayCallback:e=>s.aK.send({eventCategory:"viewportplay-videos",eventAction:"automatic play",eventLabel:"viewport",eventValue:null,eventProperty:`${e}`})}},ge:{ViewportPlayPlugin:{viewportPlayCallback:({videoId:e})=>s.aK.send({eventCategory:"autoplay",eventAction:"viewport play",eventLabel:"viewport",eventValue:null,eventProperty:`${e}`})}},gshow:{onTimeUpdate:(0,r.FQ)((({player:e})=>{const t=e=>{if(!e)return;const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)};return({current:i,total:n})=>s.aK.send({eventCategory:"autoplay",eventAction:"alternativa autoplay_autonext_pip",eventLabel:t(e.container.el)?"inside_viewport":"outside_viewport",eventValue:(i/(n/4)).toString(),eventProperty:`${e.options.source}`})}))}};class l{constructor(e,t){this.tenant=e,this.player=t}getProps(){return{player:this.player}}injectProps(e){return e(this.getProps())}get(e=a[this.tenant]){return e?Object.keys(e).reduce(((t,i)=>{const n=e[i];return(0,r.Gv)(n)?t[i]=n.isHoc?this.injectProps(n.func):this.get(n):t[i]=n,t}),{}):{}}}},153:(e,t,i)=>{"use strict";i.d(t,{A:()=>n});const n={plugins:{core:[{name:"LoginScreen",options:{loginScreenOptions:{content:{description:"Faça seu login grátis e tenha acesso ilimitado às exclusividades {SITE_NAME}"},tenantId:"{SITE_ID}"}}},{name:"AssistaNoGloboplay",loadName:"assista-no-globoplay-plugin"},{name:"VideoRecommendationPlugin",condition:"autoNext === true"},{name:"ViewportPlayPlugin",condition:"autoPlay === true",options:{enableViewportPlay:!1,ViewportPlayPlugin:{timeout:0,firstPlayThreshold:.5}}},{name:"ClapprDetachPlugin",condition:"pip === true",loadName:"clappr-detach-plugin",params:["Clappr"]},{name:"PauseAdsPlugin",loadName:"pause-ads-plugin"}],container:[{name:"ChartbeatPlugin",loadName:"chartbeat-plugin"}]}}},71:(e,t,i)=>{var n={"./AuthTapume":[381,381],"./AuthTapume.ts":[381,381],"./LinkTapume":[399,399],"./LinkTapume.ts":[399,399],"./UserTapume":[844,844],"./UserTapume.ts":[844,844]};function r(e){if(!i.o(n,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=n[e],r=t[0];return i.e(t[1]).then((()=>i(r)))}r.keys=()=>Object.keys(n),r.id=71,e.exports=r},699:(e,t,i)=>{var n={"./default.json":[707],"./dev-beta.json":[990,990],"./g1.json":[962,962],"./gshow.json":[26,26]};function r(e){if(!i.o(n,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=n[e],r=t[0];return Promise.all(t.slice(1).map(i.e)).then((()=>i.t(r,19)))}r.keys=()=>Object.keys(n),r.id=699,e.exports=r},707:e=>{"use strict";e.exports=JSON.parse('{"onError":{"template":"LinkTapume","name":"erro-reproducao","title":"Erro ao reproduzir o vídeo","description":"Para assistir, tente carregar novamente","buttons":[{"label":"Tentar novamente","href":"","className":"codex-button codex-button--brand-primary codex-button--small"},{"label":"Ajuda","labelColor":"#fff","className":"codex-button codex-button--inverse-secondary codex-button--small","href":"https://ajuda.globo.com/s/"}],"icon":"videocam"},"onSubRequired":{"template":"LinkTapume","name":"exclusivo-assinantes","title":"Conteúdo exclusivo para assinantes","description":"Para assistir, assine agora","buttons":[{"label":"Conheça os planos","href":"https://vitrine.globo.com","className":"codex-button codex-button--brand-primary codex-button--small"}],"icon":"videocam"},"onLoginRequired":{"template":"AuthTapume","name":"exige-login","title":"Esse vídeo exige login","description":"Para assistir, entre com sua Conta Globo ou faça seu cadastro","buttons":[{"label":"Fazer login","href":"","className":"codex-button codex-button--brand-primary codex-button--small","login":true},{"label":"Ajuda","className":"codex-button codex-button--inverse-secondary codex-button--small","href":"https://ajuda.globo.com/s/"}],"icon":"user"},"onTermsOfUseRequired":{"template":"AuthTapume","name":"exige-login","title":"Aceite os termos para assistir","description":"Para assistir o vídeo ao vivo você precisa aceitar os nossos Termos de Uso.","buttons":[{"label":"Continuar","href":"","className":"codex-button codex-button--brand-primary codex-button--small","provisioning":true}],"icon":"terms"}}')}},__webpack_module_cache__={},leafPrototypes,getProto,inProgress,dataWebpackPrefix;function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var i=__webpack_module_cache__[e]={id:e,exports:{}};return __webpack_modules__[e](i,i.exports,__webpack_require__),i.exports}__webpack_require__.m=__webpack_modules__,__webpack_require__.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(t,{a:t}),t},getProto=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,__webpack_require__.t=function(e,t){if(1&t&&(e=this(e)),8&t)return e;if("object"==typeof e&&e){if(4&t&&e.__esModule)return e;if(16&t&&"function"==typeof e.then)return e}var i=Object.create(null);__webpack_require__.r(i);var n={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var r=2&t&&e;"object"==typeof r&&!~leafPrototypes.indexOf(r);r=getProto(r))Object.getOwnPropertyNames(r).forEach((t=>n[t]=()=>e[t]));return n.default=()=>e,__webpack_require__.d(i,n),i},__webpack_require__.d=(e,t)=>{for(var i in t)__webpack_require__.o(t,i)&&!__webpack_require__.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},__webpack_require__.f={},__webpack_require__.e=e=>Promise.all(Object.keys(__webpack_require__.f).reduce(((t,i)=>(__webpack_require__.f[i](e,t),t)),[])),__webpack_require__.u=e=>e+".js",__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),inProgress={},dataWebpackPrefix="@ds-framework/bs-player:",__webpack_require__.l=(e,t,i,n)=>{if(inProgress[e])inProgress[e].push(t);else{var r,o;if(void 0!==i)for(var s=document.getElementsByTagName("script"),a=0;a<s.length;a++){var l=s[a];if(l.getAttribute("src")==e||l.getAttribute("data-webpack")==dataWebpackPrefix+i){r=l;break}}r||(o=!0,(r=document.createElement("script")).charset="utf-8",r.timeout=120,__webpack_require__.nc&&r.setAttribute("nonce",__webpack_require__.nc),r.setAttribute("data-webpack",dataWebpackPrefix+i),r.src=e),inProgress[e]=[t];var c=(t,i)=>{r.onerror=r.onload=null,clearTimeout(u);var n=inProgress[e];if(delete inProgress[e],r.parentNode&&r.parentNode.removeChild(r),n&&n.forEach((e=>e(i))),t)return t(i)},u=setTimeout(c.bind(null,void 0,{type:"timeout",target:r}),12e4);r.onerror=c.bind(null,r.onerror),r.onload=c.bind(null,r.onload),o&&document.head.appendChild(r)}},__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;__webpack_require__.g.importScripts&&(e=__webpack_require__.g.location+"");var t=__webpack_require__.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var i=t.getElementsByTagName("script");if(i.length)for(var n=i.length-1;n>-1&&(!e||!/^http(s?):/.test(e));)e=i[n--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),__webpack_require__.p=e})(),(()=>{__webpack_require__.b=document.baseURI||self.location.href;var e={322:0};__webpack_require__.f.j=(t,i)=>{var n=__webpack_require__.o(e,t)?e[t]:void 0;if(0!==n)if(n)i.push(n[2]);else{var r=new Promise(((i,r)=>n=e[t]=[i,r]));i.push(n[2]=r);var o=__webpack_require__.p+__webpack_require__.u(t),s=new Error;__webpack_require__.l(o,(i=>{if(__webpack_require__.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var r=i&&("load"===i.type?"missing":i.type),o=i&&i.target&&i.target.src;s.message="Loading chunk "+t+" failed.\n("+r+": "+o+")",s.name="ChunkLoadError",s.type=r,s.request=o,n[1](s)}}),"chunk-"+t,t)}};var t=(t,i)=>{var n,r,[o,s,a]=i,l=0;if(o.some((t=>0!==e[t]))){for(n in s)__webpack_require__.o(s,n)&&(__webpack_require__.m[n]=s[n]);a&&a(__webpack_require__)}for(t&&t(i);l<o.length;l++)r=o[l],__webpack_require__.o(e,r)&&e[r]&&e[r][0](),e[r]=0},i=self.webpackChunk_ds_framework_bs_player=self.webpackChunk_ds_framework_bs_player||[];i.forEach(t.bind(null,0)),i.push=t.bind(null,i.push.bind(i))})();var __webpack_exports__={};(()=>{"use strict";var e=__webpack_require__(673),t=__webpack_require__(209),i=__webpack_require__(510),n=__webpack_require__(562);var r=function(e,t,i,n){return new(i||(i=Promise))((function(r,o){function s(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}l((n=n.apply(e,t||[])).next())}))};class o extends HTMLElement{constructor(){super(),this.ready=!1,this.events={},this.state={ready:null,canPlay:null};const e=(new i.Z6).get("SITE_ID");new t.Sm(this,this.videoid,e,this.size),this.bindEvents(),this.loadStyle()}loadStyle(){return r(this,void 0,void 0,(function*(){const e=yield __webpack_require__.e(327).then(__webpack_require__.bind(__webpack_require__,327)),t=document.createElement("style");t.innerHTML=e.default,document.body.prepend(t)}))}bindEvents(){const e={canPlay:({state:e})=>{var t,i,n,r,o,s;const a=window,l=null!==(s=null!==(t=this.autoplay)&&void 0!==t?t:null===(o=null===(r=null===(n=null===(i=a.cdaaas)||void 0===i?void 0:i.SETTINGS)||void 0===n?void 0:n.PLAYER)||void 0===r?void 0:r.OPTIONS)||void 0===o?void 0:o.autoPlay)&&void 0!==s?s:null;this.state.canPlay=e,l?setTimeout((()=>{this.unsetLoading()}),2500):this.unsetLoading()},ready:({state:e})=>{this.state.ready=e},"tapumes:show":()=>{this.unsetLoading()}};for(const[t,i]of Object.entries(e))this.addEventListener(t,(({detail:e})=>i(e)))}setLoading(){this.loading=document.createElement("div"),this.loading.setAttribute("style","display:contents"),this.loading.innerHTML='<style>@keyframes bs-player-spiner{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}</style> <div style="display:flex;background:#000;justify-content:center;align-items:center;z-index:2;width:100%;height:100%;position:absolute;top:0;left:0"> <div style="position:absolute;z-index:0;top:0;left:0;width:100%;height:100%;background:url(&quot;https://s02.video.glbimg.com/x720/{videoId}.jpg&quot;);background-size:cover;opacity:.4"></div> <div style="position:absolute;top:50%;left:50%;width:48px;height:48px;margin:-24px 0 0 -24px;cursor:default;pointer-events:none;z-index:1" role="alert"> <p style="display:none">Carregando</p> <div style="line-height:100%;height:100%;width:100%;margin:0;animation:bs-player-spiner .5s linear infinite normal forwards" aria-hidden="true"> <svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> <g fill="none" fill-rule="evenodd"> <path d="M0 0h24v24H0z"></path> <path d="M2.4 12c0-5.302 4.298-9.6 9.6-9.6.663 0 1.2.537 1.2 1.2 0 .663-.537 1.2-1.2 1.2-3.976 0-7.2 3.224-7.2 7.2 0 .663-.537 1.2-1.2 1.2-.663 0-1.2-.537-1.2-1.2z" fill="#FFF"></path> </g> </svg> </div> </div> </div> '.replace("{videoId}",this.videoid),this.appendChild(this.loading)}unsetLoading(){var e;this.root.style.pointerEvents="all",null===(e=this.loading)||void 0===e||e.remove()}connectedCallback(){return r(this,void 0,void 0,(function*(){if(this.isConnected,this.parentElement){const e=document.createElement("div");e.style.width="100%",e.style.height="100%",e.style.pointerEvents="none",e.style.fontSize="1rem",this.appendChild(e),this.root=e,this.lazy&&"complete"!==document.readyState?this.setLazyAttach():this.createPlayer(),new ResizeObserver((t=>{if(t){const t=e.scrollWidth/window.innerWidth*100;this.size=t<45?"small":"default"}})).observe(e)}}))}attributeChangedCallback(e,t,i){var n;this.player&&("videoid"!==e?this.player.configure({[e]:i}):null===(n=this.WMPlayer)||void 0===n||n.load(parseInt(i)))}getPauseAdsPlugin(){if(window.PauseAdsPlugin)return window.PauseAdsPlugin()}createPlayer(){return r(this,void 0,void 0,(function*(){this.setLoading();const i=Object.fromEntries([["autoPlay",this.autoplay],["autoNext",this.autonext],["pip",this.pip],["disablePiPButton",this.disablePiPButton]].filter((([,e])=>null!==e)));this.player=new t.ai(Object.assign(Object.assign({videosIDs:this.videoid},Object.assign(i,this.getOptionsByAttributes(),this.events)),{env:this.videoEnv,adPlacement:this.adplacement,onCanPlay:()=>{this.auth||this.enablePlayer()},onError:()=>{this.dispatchEvent((0,e.f0)("tapumes:show",{name:"onError"})),this.player.destroy()},onOrientationChange:t=>{this.dispatchEvent((0,e.f0)("orientation:change",{video:t}))}})),yield this.player.attachTo(this.root),yield this.handleVideoLoad(),this.getPauseAdsPlugin(),this.dispatchEvent((0,e.f0)("ready",{state:!0}))}))}handleVideoLoad(){return r(this,void 0,void 0,(function*(){if(!this.auth)return;let e=!1;const i=(e,i)=>r(this,void 0,void 0,(function*(){if(!e)return this.enablePlayer();const n=yield(new t.Nj).init(),r=yield n.isLogged();this.handleUserLogin(r,n,i)}));void 0!==this.subscriberOnly&&(e=!0,i(this.subscriberOnly,Number(this.serviceId))),this.root.addEventListener("metadataLoaded",(({detail:{isSubscriberOnly:t,serviceId:n}})=>{e?e=!1:i(t,n)}))}))}enablePlayer(){this.player.enable(),this.dispatchEvent((0,e.f0)("canPlay",{state:!0}))}handleUserLogin(t,i,n){return r(this,void 0,void 0,(function*(){if(t)return this.handleUserSub(n,i);this.dispatchEvent((0,e.f0)("canPlay",{state:!1})),this.dispatchEvent((0,e.f0)("tapumes:show",{name:"onLoginRequired",auth:i})),this.player.destroy()}))}handleUserSub(t,i){i.authorize([t]).then((n=>r(this,void 0,void 0,(function*(){if("pending_terms_of_use"===n[0].status)return this.dispatchEvent((0,e.f0)("tapumes:show",{name:"onTermsOfUseRequired",auth:i,serviceId:t}));if("authorized"!==n[0].status)throw new Error("Usuário não autorizado");this.enablePlayer()})))).catch((()=>r(this,void 0,void 0,(function*(){this.state.canPlay=!1,this.player.destroy(),this.dispatchEvent((0,e.f0)("tapumes:show",{name:"onSubRequired",auth:i}))}))))}setLazyAttach(){window.addEventListener("load",this.onLoaded.bind(this))}onLoaded(){window.removeEventListener("load",this.onLoaded),this.createPlayer()}getOptionsByAttributes(){const{length:t}=this.attributes,i={},n="data-opt-";for(let r=0;r<t;r++){const{name:t,value:o}=this.attributes[r];if(t.startsWith(n)){const r=(0,e.Cb)(t.split(n)[1]),s=""===o||o;r&&(i[r]=s)}}return i}static get observedAttributes(){return["videoid","autoplay","adplacement"]}whenReady(){return new Promise((e=>{const t=()=>{if(null!==this.state.ready){if(!this.state.ready)throw new n.e;e(!0)}};this.addEventListener("ready",(()=>t())),t()}))}canPlay(){return new Promise((e=>{const t=()=>{null!==this.state.canPlay&&e(this.state.canPlay)};this.addEventListener("canPlay",(()=>t())),t()}))}on(e,t){this.player?this.whenReady().then((()=>{this.WMPlayer.on(e,t)})):this.events[e]=t}once(e,t){this.whenReady().then((()=>{this.WMPlayer.once(e,t)}))}getId(){var e;return null===(e=this.player.getInstance())||void 0===e?void 0:e.id}play(){this.player.isEnabled&&this.WMPlayer.play()}get WMPlayer(){var e;return null===(e=this.player)||void 0===e?void 0:e.getInstance()}get videoid(){return this.getAttribute("videoid")}get auth(){return"false"!==this.getAttribute("auth")}set auth(e){this.setAttribute("auth",String(e))}set videoid(e){this.setAttribute("videoid",e)}get autoplay(){return this.hasAttribute("autoplay")?"off"!==this.getAttribute("autoplay"):null}set autoplay(e){e?this.setAttribute("autoplay",""):this.setAttribute("autoplay","off")}get autonext(){return this.hasAttribute("autonext")?"off"!==this.getAttribute("autonext"):null}set autonext(e){e?this.setAttribute("autonext",""):this.setAttribute("autonext","off")}get videoEnv(){return this.getAttribute("videoenv")}set videoEnv(e){this.setAttribute("videoenv",e)}get pip(){return this.hasAttribute("pip")?"off"!==this.getAttribute("pip"):null}set pip(e){e?this.setAttribute("pip",""):this.setAttribute("pip","off")}get disablePiPButton(){return"true"===this.getAttribute("disable-pip-button")||!1}set disablePiPButton(e){this.setAttribute("disable-pip-button",String(e))}get lazy(){return this.hasAttribute("lazy")}set lazy(e){e?this.setAttribute("lazy",""):this.removeAttribute("lazy")}get serviceId(){return this.getAttribute("serviceid")}set serviceId(e){e?this.setAttribute("serviceid",e):this.removeAttribute("serviceid")}get adplacement(){return this.getAttribute("adplacement")}set adplacement(e){this.setAttribute("adplacement",e)}get subscriberOnly(){if(this.hasAttribute("subscriber-only"))return"false"!==this.getAttribute("subscriber-only")}set subscriberOnly(e){e?this.setAttribute("subscriber-only",""):this.removeAttribute("subscriber-only")}seek(e){this.player.seek(e)}version(){return"2.9.5"}}customElements.define("bs-player",o)})()})();