"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[84158],{84158:function(e,t,r){r(67593),r(78557),r(23630),r(69177);var a=r(5898),s=r(58953),i=Object.create(HTMLDivElement.prototype);i.createdCallback=function(){this.classList.add("progressring"),this.setAttribute("dir","ltr");var e=this;if(e.innerHTML='<div class="progressring-bg"> <div class="progressring-text"></div> </div> <div class="spiner-holder-one animate-0-25-a"> <div class="spiner-holder-two animate-0-25-b"> <div class="progressring-spiner"></div> </div> </div> <div class="spiner-holder-one animate-25-50-a"> <div class="spiner-holder-two animate-25-50-b"> <div class="progressring-spiner"></div> </div> </div> <div class="spiner-holder-one animate-50-75-a"> <div class="spiner-holder-two animate-50-75-b"> <div class="progressring-spiner"></div> </div> </div> <div class="spiner-holder-one animate-75-100-a"> <div class="spiner-holder-two animate-75-100-b"> <div class="progressring-spiner"></div> </div> </div> ',window.MutationObserver){var t=new MutationObserver((function(t){t.forEach((function(){e.setProgress(parseFloat(e.getAttribute("data-progress")||"0"))}))}));t.observe(e,{attributes:!0,childList:!1,characterData:!1}),e.observer=t}e.setProgress(parseFloat(e.getAttribute("data-progress")||"0"))},i.setProgress=function(e){var t;(e=Math.floor(e))<25?(t=e/100*360-90,this.querySelector(".animate-0-25-b").style.transform="rotate("+t+"deg)",this.querySelector(".animate-25-50-b").style.transform="rotate(-90deg)",this.querySelector(".animate-50-75-b").style.transform="rotate(-90deg)",this.querySelector(".animate-75-100-b").style.transform="rotate(-90deg)"):e>=25&&e<50?(t=(e-25)/100*360-90,this.querySelector(".animate-0-25-b").style.transform="none",this.querySelector(".animate-25-50-b").style.transform="rotate("+t+"deg)",this.querySelector(".animate-50-75-b").style.transform="rotate(-90deg)",this.querySelector(".animate-75-100-b").style.transform="rotate(-90deg)"):e>=50&&e<75?(t=(e-50)/100*360-90,this.querySelector(".animate-0-25-b").style.transform="none",this.querySelector(".animate-25-50-b").style.transform="none",this.querySelector(".animate-50-75-b").style.transform="rotate("+t+"deg)",this.querySelector(".animate-75-100-b").style.transform="rotate(-90deg)"):e>=75&&e<=100&&(t=(e-75)/100*360-90,this.querySelector(".animate-0-25-b").style.transform="none",this.querySelector(".animate-25-50-b").style.transform="none",this.querySelector(".animate-50-75-b").style.transform="none",this.querySelector(".animate-75-100-b").style.transform="rotate("+t+"deg)"),this.querySelector(".progressring-text").innerHTML=(0,s.a4)(e/100,(0,a.jE)())},i.attachedCallback=function(){},i.detachedCallback=function(){var e=this.observer;e&&(e.disconnect(),this.observer=null)},document.registerElement("emby-progressring",{prototype:i,extends:"div"});var n=i,o=r(47629),l=r(10736),d=r(44797);function c(e,t,r){var a=this;if(a.itemId||(a.itemId=o.Ay.parentWithAttribute(a,"data-id").getAttribute("data-id")),r.ItemId===a.itemId){var s=parseFloat(r.Progress);s&&s<100?this.classList.remove("hide"):this.classList.add("hide"),this.setAttribute("data-progress",s)}}var h=Object.create(n);h.createdCallback=function(){var e,t;n.createdCallback&&n.createdCallback.call(this),e="RefreshProgress",t=c.bind(this),d.A.on(l.default,e,t),this[e]=t},h.attachedCallback=function(){n.attachedCallback&&n.attachedCallback.call(this)},h.detachedCallback=function(){var e,t;n.detachedCallback&&n.detachedCallback.call(this),(t=this[e="RefreshProgress"])&&(d.A.off(l.default,e,t),this[e]=null),this.itemId=null},document.registerElement("emby-itemrefreshindicator",{prototype:h,extends:"div"})}}]);