(self.webpackChunk=self.webpackChunk||[]).push([[3735],{53735:function(e,t,a){"use strict";a.r(t),a.d(t,{editor:function(){return u}}),a(98010),a(95374),a(95623),a(61013),a(61514),a(55849);var i=a(53754),n=a(83094),r=a(1115),c=(a(65219),a(50447),a(30983),a(90906)),s=a.n(c);function o(e,t){return e.filter((function(e){return e.Type==t}))[0]}function l(e,t,a,i){return o(e.ImageOptions||[],a)||o(t.DefaultImageOptions||[],a)||{Type:n=a,MinWidth:0,Limit:"Primary"===n?1:0};var n}function p(e,t){t?(e.classList.remove("hide"),e.querySelector("input").setAttribute("required","required")):(e.classList.add("hide"),e.querySelector("input").setAttribute("required",""),e.querySelector("input").removeAttribute("required"))}function d(e,t,a){var c=r.default.createDialog({size:"small",removeOnClose:!0,scrollY:!1});c.classList.add("formDialog"),c.innerHTML=i.ZP.translateHtml(s()),c.addEventListener("close",(function(){!function(e,t){t.ImageOptions=Array.prototype.map.call(e.querySelectorAll(".imageType:not(.hide)"),(function(e){return{Type:e.getAttribute("data-imagetype"),Limit:e.checked?1:0,MinWidth:0}})),t.ImageOptions.push({Type:"Backdrop",Limit:e.querySelector("#txtMaxBackdrops").value,MinWidth:e.querySelector("#txtMinBackdropDownloadWidth").value}),t.ImageOptions.push({Type:"Screenshot",Limit:e.querySelector("#txtMaxScreenshots").value,MinWidth:e.querySelector("#txtMinScreenshotDownloadWidth").value})}(c,t)})),function(e,t,a,i){var r=i.SupportedImageTypes||[];p(e.querySelector(".backdropFields"),r.includes("Backdrop")),p(e.querySelector(".screenshotFields"),r.includes("Screenshot")),Array.prototype.forEach.call(e.querySelectorAll(".imageType"),(function(e){var t=e.getAttribute("data-imagetype"),c=n.ZP.parentWithTag(e,"LABEL");r.includes(t)?c.classList.remove("hide"):c.classList.add("hide"),l(a,i,t).Limit?e.checked=!0:e.checked=!1}));var c=l(a,i,"Backdrop");e.querySelector("#txtMaxBackdrops").value=c.Limit,e.querySelector("#txtMinBackdropDownloadWidth").value=c.MinWidth;var s=l(a,i,"Screenshot");e.querySelector("#txtMaxScreenshots").value=s.Limit,e.querySelector("#txtMinScreenshotDownloadWidth").value=s.MinWidth}(c,0,t,a),r.default.open(c).then((function(){})).catch((function(){})),c.querySelector(".btnCancel").addEventListener("click",(function(){r.default.close(c)}))}var u=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.show=d};t.default=u},90906:function(e){e.exports='<div class="formDialogHeader"> <button type="button" is="paper-icon-button-light" class="btnCancel autoSize" tabindex="-1"><span class="material-icons arrow_back"></span></button> <h3 class="formDialogHeaderTitle"> ${HeaderImageOptions} </h3> </div> <div class="formDialogContent scrollY"> <div class="dialogContentInner dialog-content-centered"> <form style="margin:1.5em auto 0"> <div class="verticalSection"> <h3 class="checkboxListLabel">${HeaderFetchImages}</h3> <div class="imageSelections checkboxList"> <label> <input type="checkbox" is="emby-checkbox" class="imageType" data-imagetype="Primary"/> <span>${Primary}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="imageType" data-imagetype="Art"/> <span>${Art}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="imageType" data-imagetype="BoxRear"/> <span>${Back}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="imageType" data-imagetype="Banner"/> <span>${Banner}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="imageType" data-imagetype="Box"/> <span>${Box}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="imageType" data-imagetype="Disc"/> <span>${Disc}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="imageType" data-imagetype="Logo"/> <span>${Logo}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="imageType" data-imagetype="Menu"/> <span>${Menu}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="imageType" data-imagetype="Thumb"/> <span>${Thumb}</span> </label> </div> </div> <div class="backdropFields"> <div class="inputContainer"> <input is="emby-input" type="number" id="txtMaxBackdrops" pattern="[0-9]*" required="required" min="0" label="${LabelMaxBackdropsPerItem}"/> </div> <div class="inputContainer"> <input is="emby-input" type="number" id="txtMinBackdropDownloadWidth" pattern="[0-9]*" required="required" min="0" label="${LabelMinBackdropDownloadWidth}"/> </div> </div> <div class="screenshotFields"> <div class="inputContainer"> <input is="emby-input" type="number" id="txtMaxScreenshots" pattern="[0-9]*" required="required" min="0" label="${LabelMaxScreenshotsPerItem}"/> </div> <div class="inputContainer"> <input is="emby-input" type="number" id="txtMinScreenshotDownloadWidth" pattern="[0-9]*" required="required" min="0" label="${LabelMinScreenshotDownloadWidth}"/> </div> </div> </form> </div> </div> '}}]);