/*!
 * Custom elements for Nanopore-Digital Web applications
 */
import{F as t}from"./nano-slides-DAQ7BI02.js";import"./index-BM3Om9WE.js";import"./renderer-DpNDfhNy.js";t.createMethods.push("_createFullscreen");const i=t.prototype;i._createFullscreen=function(){this.isFullscreen=!1,this.options.fullscreen&&(this.viewFullscreenButton=new n("view",this),this.exitFullscreenButton=new n("exit",this),this.on("activate",this._changeFullscreenActive),this.on("deactivate",this._changeFullscreenActive))},i._changeFullscreenActive=function(){const t=this.isActive?"appendChild":"removeChild";this.element[t](this.viewFullscreenButton.element),this.element[t](this.exitFullscreenButton.element);const i=this.isActive?"activate":"deactivate";this.viewFullscreenButton[i](),this.exitFullscreenButton[i]()},i.viewFullscreen=function(){this._changeFullscreen(!0),this.focus()},i.exitFullscreen=function(){this._changeFullscreen(!1)},i._changeFullscreen=function(t){if(this.isFullscreen==t)return;this.isFullscreen=t;const i=t?"add":"remove";document.documentElement.classList[i]("is-flickity-fullscreen"),this.element.classList[i]("is-fullscreen"),this.resize(),this.isFullscreen&&this.reposition(),this.dispatchEvent("fullscreenChange",null,[t])},i.toggleFullscreen=function(){this._changeFullscreen(!this.isFullscreen)};const s=i.setGallerySize;function n(t,i){this.name=t,this.createButton(),this.createIcon(),this.onClick=function(){i[t+"Fullscreen"]()},this.clickHandler=this.onClick.bind(this)}i.setGallerySize=function(){this.options.setGallerySize&&(this.isFullscreen?this.viewport.style.height="":s.call(this))},t.keyboardHandlers[27]=function(){this.exitFullscreen()},n.prototype.createButton=function(){const t=this.element=document.createElement("button");t.className="flickity-button flickity-fullscreen-button flickity-fullscreen-button-"+this.name,t.setAttribute("type","button");const i=(s=this.name+" full-screen")[0].toUpperCase()+s.slice(1);var s;t.setAttribute("aria-label",i),t.title=i};const h="http://www.w3.org/2000/svg",c={view:"M15,20,7,28h5v4H0V20H4v5l8-8Zm5-5,8-8v5h4V0H20V4h5l-8,8Z",exit:"M32,3l-7,7h5v4H18V2h4V7l7-7ZM3,32l7-7v5h4V18H2v4H7L0,29Z"};n.prototype.createIcon=function(){const t=document.createElementNS(h,"svg");t.setAttribute("class","flickity-button-icon"),t.setAttribute("viewBox","0 0 32 32");const i=document.createElementNS(h,"path");i.setAttribute("d",c[this.name]),t.appendChild(i),this.element.appendChild(t)},n.prototype.activate=function(){this.element.addEventListener("click",this.clickHandler)},n.prototype.deactivate=function(){this.element.removeEventListener("click",this.clickHandler)},t.FullscreenButton=n;