"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[84158],{84158:function(e,t,r){r(14382),r(86584),r(78557),r(67593),r(23630),r(69177);var s=r(5898),a=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,a.a4)(e/100,(0,s.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(36300),l=r(67430),c=r(4935),d=Object.create(n);d.createdCallback=function(){var e=this;n.createdCallback&&n.createdCallback.call(this);var t=function(t){var r=t.Data;return function(e,t){if(e.itemId||(e.itemId=o.Ay.parentWithAttribute(e,"data-id").getAttribute("data-id")),(null==t?void 0:t.ItemId)===e.itemId){var r=parseFloat(t.Progress);r&&r<100?e.classList.remove("hide"):e.classList.add("hide"),e.dataset.progress=r}}(e,r)};this._wsApiClientCreatedHandler=function(r,s){var a=s.subscribe([c.De.RefreshProgress],t);a&&e._wsUnsubscribers.push(a)},this._wsUnsubscribers=l.tF.getApiClients().map((function(e){return e.subscribe([c.De.RefreshProgress],t)})).filter(Boolean)},d.attachedCallback=function(){n.attachedCallback&&n.attachedCallback.call(this)},d.detachedCallback=function(){var e;n.detachedCallback&&n.detachedCallback.call(this),null===(e=this._wsUnsubscribers)||void 0===e||e.forEach((function(e){e()})),this._wsUnsubscribers=[],this._wsApiClientCreatedHandler&&(this._wsApiClientCreatedHandler=null),this.itemId=null},document.registerElement("emby-itemrefreshindicator",{prototype:d,extends:"div"})}}]);