homeassistant/www/community/PlexMeetsHomeAssistant/plex-meets-homeassistant.js

668 lines
201 KiB
JavaScript
Raw Permalink Normal View History

2025-01-10 21:08:35 -08:00
var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var e,i=(function(e,i){(function(){var n,s="Expected a function",r="__lodash_hash_undefined__",a="__lodash_placeholder__",o=16,l=32,h=64,c=128,u=256,d=1/0,p=9007199254740991,f=NaN,y=4294967295,m=[["ary",c],["bind",1],["bindKey",2],["curry",8],["curryRight",o],["flip",512],["partial",l],["partialRight",h],["rearg",u]],g="[object Arguments]",v="[object Array]",x="[object Boolean]",E="[object Date]",b="[object Error]",w="[object Function]",S="[object GeneratorFunction]",_="[object Map]",C="[object Number]",T="[object Object]",k="[object Promise]",z="[object RegExp]",L="[object Set]",$="[object String]",P="[object Symbol]",M="[object WeakMap]",N="[object ArrayBuffer]",I="[object DataView]",A="[object Float32Array]",R="[object Float64Array]",B="[object Int8Array]",H="[object Int16Array]",D="[object Int32Array]",q="[object Uint8Array]",U="[object Uint8ClampedArray]",O="[object Uint16Array]",W="[object Uint32Array]",j=/\b__p \+= '';/g,V=/\b(__p \+=) '' \+/g,F=/(__e\(.*?\)|\b__t\)) \+\n'';/g,X=/&(?:amp|lt|gt|quot|#39);/g,Y=/[&<>"']/g,K=RegExp(X.source),G=RegExp(Y.source),Z=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,tt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,et=/^\w*$/,it=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,nt=/[\\^$.*+?()[\]{}|]/g,st=RegExp(nt.source),rt=/^\s+/,at=/\s/,ot=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,lt=/\{\n\/\* \[wrapped with (.+)\] \*/,ht=/,? & /,ct=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ut=/[()=,{}\[\]\/\s]/,dt=/\\(\\)?/g,pt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ft=/\w*$/,yt=/^[-+]0x[0-9a-f]+$/i,mt=/^0b[01]+$/i,gt=/^\[object .+?Constructor\]$/,vt=/^0o[0-7]+$/i,xt=/^(?:0|[1-9]\d*)$/,Et=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bt=/($^)/,wt=/['\n\r\u2028\u2029\\]/g,St="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",_t="\\u2700-\\u27bf",Ct="a-z\\xdf-\\xf6\\xf8-\\xff",Tt="A-Z\\xc0-\\xd6\\xd8-\\xde",kt="\\ufe0e\\ufe0f",zt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Lt="[']",$t="[\\ud800-\\udfff]",Pt="["+zt+"]",Mt="["+St+"]",Nt="\\d+",It="[\\u2700-\\u27bf]",At="["+Ct+"]",Rt="[^\\ud800-\\udfff"+zt+Nt+_t+Ct+Tt+"]",Bt="\\ud83c[\\udffb-\\udfff]",Ht="[^\\ud800-\\udfff]",Dt="(?:\\ud83c[\\udde6-\\uddff]){2}",qt="[\\ud800-\\udbff][\\udc00-\\udfff]",Ut="["+Tt+"]",Ot="(?:"+At+"|"+Rt+")",Wt="(?:"+Ut+"|"+Rt+")",jt="(?:['](?:d|ll|m|re|s|t|ve))?",Vt="(?:['](?:D|LL|M|RE|S|T|VE))?",Ft="(?:"+Mt+"|"+Bt+")?",Xt="[\\ufe0e\\ufe0f]?",Yt=Xt+Ft+"(?:\\u200d(?:"+[Ht,Dt,qt].join("|")+")"+Xt+Ft+")*",Kt="(?:"+[It,Dt,qt].join("|")+")"+Yt,Gt="(?:"+[Ht+Mt+"?",Mt,Dt,qt,$t].join("|")+")",Zt=RegExp(Lt,"g"),Jt=RegExp(Mt,"g"),Qt=RegExp(Bt+"(?="+Bt+")|"+Gt+Yt,"g"),te=RegExp([Ut+"?"+At+"+"+jt+"(?="+[Pt,Ut,"$"].join("|")+")",Wt+"+"+Vt+"(?="+[Pt,Ut+Ot,"$"].join("|")+")",Ut+"?"+Ot+"+"+jt,Ut+"+"+Vt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Nt,Kt].join("|"),"g"),ee=RegExp("[\\u200d\\ud800-\\udfff"+St+kt+"]"),ie=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ne=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],se=-1,re={};re[A]=re[R]=re[B]=re[H]=re[D]=re[q]=re[U]=re[O]=re[W]=!0,re[g]=re[v]=re[N]=re[x]=re[I]=re[E]=re[b]=re[w]=re[_]=re[C]=re[T]=re[z]=re[L]=re[$]=re[M]=!1;var ae={};ae[g]=ae[v]=ae[N]=ae[I]=ae[x]=ae[E]=ae[A]=ae[R]=ae[B]=ae[H]=ae[D]=ae[_]=ae[C]=ae[T]=ae[z]=ae[L]=ae[$]=ae[P]=ae[q]=ae[U]=ae[O]=ae[W]=!0,ae[b]=ae[w]=ae[M]=!1;var oe={"\\":"\\","'":"'","\n":"n","\
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at
* http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at
* http://polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at
* http://polymer.github.io/PATENTS.txt
*/String(Math.random()).slice(2),
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at
* http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at
* http://polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at
* http://polymer.github.io/PATENTS.txt
*/
window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:t=>t});
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at
* http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at
* http://polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at
* http://polymer.github.io/PATENTS.txt
*/
let ot=!1;(()=>{try{const t={get capture(){return ot=!0,!1}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){}})(),
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at
* http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at
* http://polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at
* http://polymer.github.io/PATENTS.txt
*/
"undefined"!=typeof window&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.4.0")
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at
* http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at
* http://polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at
* http://polymer.github.io/PATENTS.txt
*/,void 0===window.ShadyCSS||void 0===window.ShadyCSS.prepareTemplateDom&&console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1.")
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at
* http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at
* http://polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at
* http://polymer.github.io/PATENTS.txt
*/,window.JSCompiler_renameProperty=(t,e)=>t
/**
@license
Copyright (c) 2019 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
part of the polymer project is also subject to an additional IP rights grant
found at http://polymer.github.io/PATENTS.txt
*/;const lt=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ht=Symbol();class ct{constructor(t,e){if(e!==ht)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){return void 0===this._styleSheet&&(lt?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}}
/**
* @license
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
* This code may only be used under the BSD style license found at
* http://polymer.github.io/LICENSE.txt
* The complete set of authors may be found at
* http://polymer.github.io/AUTHORS.txt
* The complete set of contributors may be found at
* http://polymer.github.io/CONTRIBUTORS.txt
* Code distributed by Google as part of the polymer project is also
* subject to an additional IP rights grant found at
* http://polymer.github.io/PATENTS.txt
*/
(window.litElementVersions||(window.litElementVersions=[])).push("2.5.0");const ut=document.createElement("style");ut.textContent=((t,...e)=>{const i=e.reduce(((e,i,n)=>e+(t=>{if(t instanceof ct)return t.cssText;if("number"==typeof t)return t;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${t}. Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security.`)})(i)+t[n+1]),t[0]);return new ct(i,ht)})`
.maxZIndex {
z-index: 6 !important;
}
.transparent {
visibility: hidden !important;
}
.detailPlayAction {
color: rgb(15 17 19);
font-weight: bold;
float: left;
padding: 7px 10px;
border-radius: 5px;
cursor: pointer;
position: relative;
background: orange;
border: none;
margin-right: 10px;
}
.detailPlayAction.disabled {
cursor: default;
background-color: gray;
color: white;
}
.detailPlayTrailerAction {
color: rgb(15 17 19);
font-weight: bold;
float: left;
padding: 7px 10px;
border-radius: 5px;
cursor: pointer;
position: relative;
background: orange;
border: none;
visibility: hidden;
}
.seasons {
z-index: 5;
position: absolute;
top: ${n.expandedHeight+16}px;
width: calc(100% - 22px);
left: 0;
padding: 16px;
display: none;
}
.episodes {
z-index: 5;
position: absolute;
top: ${n.expandedHeight+16}px;
width: calc(100% - 22px);
left: 0;
padding: 16px;
display: none;
}
.additionalElem {
color: hsla(0, 0%, 100%, 0.45);
position: relative;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.ratingDetail {
background: #ffffff24;
padding: 5px 10px;
border-radius: 5px;
white-space: nowrap;
margin-bottom: 10px;
float: left;
margin-right: 10px;
}
.contentRatingDetail {
background: #ffffff24;
padding: 5px 10px;
border-radius: 5px;
margin-right: 10px;
white-space: nowrap;
float: left;
margin-bottom: 10px;
}
.clear {
clear: both;
}
.minutesDetail {
background: #ffffff24;
padding: 5px 10px;
border-radius: 5px;
margin-right: 10px;
white-space: nowrap;
float: left;
margin-bottom: 10px;
}
.detail .metaInfo {
display: block;
float: left;
}
.detail h2 {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
position: relative;
margin: 5px 0px 10px 0px;
font-size: 16px;
}
.detail h1 {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
position: relative;
padding: 5px 0px;
margin: 16px 0 10px 0;
}
.detail::-webkit-scrollbar {
display: none;
}
.detail {
-ms-overflow-style: none;
scrollbar-width: none;
}
.searchContainer {
position: relative;
z-index: 2;
padding-right: 8px;
}
.searchContainer input {
width: calc(100% - 26px);
padding: 10px;
margin-bottom: 10px;
}
.detail {
visibility: hidden;
max-height: ${n.expandedHeight+16}px;
display: block;
overflow: scroll;
text-overflow: ellipsis;
}
.detailDesc {
position: relative;
}
.lds-ring {
display: inline-block;
position: relative;
width: 80px;
height: 80px;
}
.lds-ring div {
box-sizing: border-box;
display: block;
position: absolute;
width: 64px;
height: 64px;
margin: 8px;
border: 8px solid orange;
border-radius: 50%;
animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
border-color: orange transparent transparent transparent;
}
.lds-ring div:nth-child(1) {
animation-delay: -0.45s;
}
.lds-ring div:nth-child(2) {
animation-delay: -0.3s;
}
.lds-ring div:nth-child(3) {
animation-delay: -0.15s;
}
@keyframes lds-ring {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
.trackContainer {
width: 100%;
}
.trackContainer.odd:hover,
.trackContainer.even:hover {
background-color: rgba(255, 255, 255, 0.2);
}
.trackInteractiveArea {
width: 14px;
height: 14px;
}
.trackInteractiveArea button[name='playButton'] {
width: 30px;
height: 30px;
top: inherit;
left: inherit;
margin-top: -7px;
margin-left: -3px;
}
.trackContainer.odd:hover .trackIndexElem .trackIndex,
.trackContainer.even:hover .trackIndexElem .trackIndex {
display: none;
}
.trackContainer.odd:hover .trackIndexElem .trackInteractiveArea,
.trackContainer.even:hover .trackIndexElem .trackInteractiveArea {
display: block;
}
.trackContainer.odd .trackIndexElem .trackInteractiveArea,
.trackContainer.even .trackIndexElem .trackInteractiveArea {
display: none;
}
.trackContainer.odd {
background-color: rgba(255, 255, 255, 0.08);
}
.trackContainer.even {
background-color: rgba(255, 255, 255, 0.04);
}
.trackLengthElem {
position: relative;
padding: 15px 20px 15px 10px;
}
.trackIndexElem {
position: relative;
padding: 15px 20px 15px 10px;
}
.trackTitleElem {
width: 100%;
}
.detail {
position: absolute;
left: 247px;
width: calc(100% - 267px);
z-index: 5;
transition: 0.5s;
color: rgba(255, 255, 255, 0);
}
.contentbg {
position: absolute;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0);
z-index: 0;
transition: 0.5s;
left: 0;
top: 0;
background-size: cover;
display: none;
}
.stop-scrolling {
height: 100%;
overflow: hidden;
}
.contentArt {
position: absolute;
background-color: rgba(0, 0, 0, 0);
z-index: 2;
left: 0;
top: 0;
background-size: cover;
display: none;
-webkit-animation: fadein 0.5s; /* Safari, Chrome and Opera > 12.1 */
-moz-animation: fadein 0.5s; /* Firefox < 16 */
-ms-animation: fadein 0.5s; /* Internet Explorer */
-o-animation: fadein 0.5s; /* Opera < 12.1 */
animation: fadein 0.5s;
}
.yearElem {
color: hsla(0, 0%, 100%, 0.45);
position: relative;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.viewProgress {
background: #e5a00d;
height: 3px;
bottom: 0;
position: absolute;
}
.toViewEpisode {
position: relative;
height: 28px;
width: 28px;
float: right;
display: block;
background: #e5a00d;
font-weight: bold;
color: black;
transition: 0.5s;
right: -14px;
top: -14px;
transform: rotate(45deg);
}
@keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* Firefox < 16 */
@-moz-keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* Safari, Chrome and Opera > 12.1 */
@-webkit-keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* Internet Explorer */
@-ms-keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* Opera < 12.1 */
@-o-keyframes fadein {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.toViewSeason {
position: relative;
top: 5px;
right: 5px;
float: right;
display: block;
border-radius: 5px;
background: #e5a00d;
font-weight: bold;
color: black;
padding: 1px 6px;
transition: 0.5s;
}
.seasonTitleElem {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
position: relative;
font-weight: bold;
margin-top: 5px;
transition: 0.5s;
color: white;
}
.episodeTitleElem {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
position: relative;
font-weight: bold;
margin-top: 5px;
transition: 0.5s;
color: white;
}
.seasonEpisodesCount {
transition: 0.5s;
color: white;
}
.episodeNumber {
color: white;
}
.titleElem {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
position: relative;
min-width: 100% !important;
}
.seasonContainer {
position: relative;
float: left;
margin-right: 10px;
margin-bottom: 15px;
transition: 0.5s;
}
.episodeContainer {
position: relative;
float: left;
margin-right: 10px;
margin-bottom: 15px;
transition: 0.5s;
}
.metaInfoDetails {
color: hsla(0, 0%, 98%, 0.45);
text-transform: uppercase;
margin-top: 10px;
}
.simulatedFullScreen {
background: black;
height: 100%;
}
.episodeElem {
background-repeat: no-repeat;
background-size: contain;
border-radius: 5px;
transition: 0.5s;
background: black;
overflow: hidden;
}
.seasonElem {
background-repeat: no-repeat;
background-size: contain;
border-radius: 5px;
transition: 0.5s;
}
.contentContainer {
overflow: hidden;
}
.movieElem {
margin-bottom: 5px;
background-repeat: no-repeat;
background-size: cover;
overflow: hidden;
border-radius: 5px;
transition: 0.5s;
position: relative;
z-index: 1;
}
.plexMeetsContainer {
z-index: 1;
float: left;
margin-right: 10px;
transition: 0.5s;
}
.no-transparency {
background-color: rgba(0, 0, 0, 1) !important;
}
.videobg1 {
position: absolute;
background-image: linear-gradient(rgba(0, 0, 0, 1), rgba(0, 0, 0, 0.2));
height: 50%;
top: 0;
width: 100%;
}
.videobg2 {
position: absolute;
background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 1));
height: 50%;
top: 50%;
width: 100%;
}
.video {
position: absolute;
z-index: 3;
visibility: hidden;
}
.movieExtras {
z-index: 5;
position: absolute;
top: 340px;
width: calc(100% - 32px);
left: 0;
padding: 16px;
}
.interactiveArea {
position: relative;
width: 100%;
height: 100%;
transition: 0.5s;
}
.interactiveArea:hover {
background: rgba(0, 0, 0, 0.3);
}
.movieElem .interactiveArea button[name='playButton'].touchDevice,
.seasonElem .interactiveArea button[name='playButton'].touchDevice,
button[name='playButton'].disabled {
display: none !important;
}
.episodeElem .interactiveArea button[name='playButton'].touchDevice {
display: block;
outline: 0;
background: orange !important;
border: 2px solid orange !important;
box-shadow: 0 0 0 3px orange !important;
}
button[name='playButton'] {
width: 40px;
height: 40px;
border: 2px solid white;
border-radius: 100%;
cursor: pointer;
transition: 0.2s;
margin: 0 auto;
left: calc(50% - 20px);
display: block;
top: calc(50% - 20px);
position: absolute;
}
button[name='playButton']:hover {
background: orange !important;
border: 2px solid orange !important;
}
button[name='playButton']:focus {
outline: 0;
background: orange !important;
border: 2px solid orange !important;
box-shadow: 0 0 0 3px orange !important;
}
button[name='playButton']::after {
content: '';
display: inline-block;
position: relative;
top: 1px;
left: 2px;
border-style: solid;
border-width: 6px 0 6px 12px;
border-color: transparent transparent transparent white;
transition: 0.2s;
}
.interactiveArea button[name='playButton'] {
background: rgba(0, 0, 0, 0);
border: 2px solid rgba(255, 255, 255, 0);
}
.interactiveArea:hover button[name='playButton'] {
background: rgba(0, 0, 0, 0.4);
border: 2px solid rgba(255, 255, 255, 1);
}
.interactiveArea button[name='playButton']:after {
border-color: transparent transparent transparent rgba(255, 255, 255, 0);
}
.episodeElem > .interactiveArea > button[name='playButton'].touchDevice:after {
border-color: transparent transparent transparent rgba(255, 255, 255, 1);
}
.interactiveArea:hover button[name='playButton']:after {
border-color: transparent transparent transparent rgba(255, 255, 255, 1);
}
button[name='playButton']:hover:after {
border-color: transparent transparent transparent black !important;
}
button[name='playButton']:focus:after {
border-color: transparent transparent transparent black !important;
}
`.cssText;class dt extends HTMLElement{constructor(){super(...arguments),this.renderPageRetries=0,this.searchInputElem=document.createElement("input"),this.plexProtocol="http",this.displayType=!1,this.useHorizontalScroll=!1,this.useShuffle=!1,this.displayTitleMain=!0,this.displaySubtitleMain=!0,this.plexPort=!1,this.epgData={},this.detailsShown=!1,this.entityRegistry=[],this.runBefore="",this.playTrailer=!0,this.showExtras=!0,this.isVisible=!0,this.showSearch=!0,this.previousPageWidth=0,this.runAfter="",this.columnsCount=0,this.renderedRows=0,this.renderedItems=0,this.maxRenderCount=!1,this.minWidth=n.minimumWidth,this.minEpisodeWidth=n.minimumEpisodeWidth,this.minExpandedWidth=n.expandedWidth,this.minExpandedHeight=n.expandedHeight,this.fontSize1=14,this.fontSize2=14,this.fontSize3=28,this.fontSize4=16,this.seasonContainerClickEnabled=!0,this.looseSearch=!1,this.movieElems=[],this.searchValue="",this.activeMovieElemData={},this.seasonElemFreshlyLoaded=!1,this.episodesElemFreshlyLoaded=!1,this.seasonsElemHidden=!0,this.episodesElemHidden=!0,this.data={},this.config={},this.loading=!1,this.maxCount=!1,this.maxRows=!1,this.error="",this.contentBGHeight=0,this.initialDataLoaded=!1,this.haWindow=dt.querySelectorAllShadows("hui-view")[0],this.renderNewElementsIfNeeded=()=>{const t=G(this.content);let{scrollTop:e}=this.haWindow;e<window.scrollY&&(e=window.scrollY),!this.detailsShown&&window.innerHeight+e>t-300&&this.renderedItems>0&&this.renderedItems<this.data[this.config.libraryName].length&&(!this.maxCount||this.renderedItems<this.maxCount)&&(!this.maxRows||this.renderedRows<this.config.maxRows)&&i.isEmpty(this.searchValue)&&(this.maxRenderCount=this.renderedItems+4*this.columnsCount,this.renderMovieElems(),this.calculatePositions())},this.resizeHandler=()=>{if(this.isVisible){if(!this.detailsShown){let t=!1;if(this.getElementsByClassName("videoPlayer")[0].children.length>0&&(t=J(this)),this.card&&this.movieElems.length>0&&!t&&this.previousPageWidth!==this.card.offsetWidth){this.previousPageWidth=this.card.offsetWidth,this.renderPage();const t=this.getElementsByClassName("contentbg");this.contentBGHeight=G(t[0])}}this.renderNewElementsIfNeeded()}},this.loadInitialData=async()=>{this.initialDataLoaded=!0,setInterval((()=>{const t=!i.isNull(this.offsetParent);t&&!this.isVisible&&this.renderPage(),this.isVisible=t}),100),this.hassObj&&(this.entityRegistry=await K(this.hassObj.connection));const t=()=>{if(this.detailsShown&&this.activeMovieElem&&!J(this)&&this.isVisible){const t=this.getElementsByClassName("seasonContainer"),e=this.getElementsByClassName("episodeContainer"),n=this.getElementsByClassName("seasonElem");let s=this.activeMovieElem;i.forEach(n,(t=>{if(i.isEqual(t.dataset.clicked,"true"))return s=t,!1}));const r=parseInt(Z(s).top,10)-70,a=((t,e,i)=>{const n=t[t.length-1],s=e[e.length-1];let r=!1;return t.length>0&&parseInt(i.style.top,10)>0?r=G(n)+parseInt(Z(n).top,10)+10:e.length>0&&(r=G(s)+parseInt(Z(s).top,10)+10),r})(t,e,s);this.getTop()<r?(window.scroll({top:r}),this.children[0].classList.add("stop-scrolling")):a&&(window.innerHeight<a-r?a&&this.getTop()+window.innerHeight>a&&(window.scroll({top:a-window.innerHeight}),this.children[0].classList.add("stop-scrolling")):-70!==r&&-10!==a&&(window.scroll({top:r}),this.children[0].classList.add("stop-scrolling")))}this.renderNewElementsIfNeeded()};this.haWindow.addEventListener("scroll",t),window.addEventListener("scroll",t),window.addEventListener("wheel",t),window.addEventListener("touchmove",t),window.addEventListener("resize",(()=>{this.resizeHandler()})),this.card&&(this.previousPageWidth=this.card.offsetWidth),this.resizeBackground()},this.renderInitialData=async()=>{let{entity:t}=JSON.parse(JSON.stringify(this.config));const e=(t,e)=>{let n=e,s=!1;i.startsWith(e,"plexPlayer | ")?(n=e.split(" | ")[3],s=!0):i.isPlainObject(e)?n=e[Object.keys(e)[0]]:(i.startsWith(e,"androidtv | ")||i.startsWith(e,"kodi | ")||i.startsWith(e,"cast | ")||i.startsWith(e,"input_select | ")||i.startsWith(e,"input_text | ")||i.startsWith(e,"vlc_telnet | ")||i.startsWith(e,"sonos | "))&&
//# sourceMappingURL=plex-meets-homeassistant.js.map