parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c=t.length&&(t=void 0),{value:t&&t[s++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(exports,"__esModule",{value:!0});var i=function(){function t(t,e,i){this.diameter=100,this.diameter2=0,this.thickness=6,this.playing=!1,this.progress=0,this.progressOffset=1,this.container=null,this.progressCheck=null,this.diameter2=this.diameter/2,this.requestAnimationFrameMethod=i,this.container=t,this.progressCheck=e,this.canvas=document.createElement("canvas"),this.canvas.className="playback",this.canvas.width=this.diameter,this.canvas.height=this.diameter,this.canvas.style.width=this.diameter2+"px",this.canvas.style.height=this.diameter2+"px",this.context=this.canvas.getContext("2d"),this.container.appendChild(this.canvas),this.render()}return t.prototype.setPlaying=function(t){var e=this.playing;this.playing=t,!e&&this.playing?this.animate():this.render()},t.prototype.animate=function(){var t=this.progress;this.progress=this.progressCheck(),t>.8&&this.progress<.2&&(this.progressOffset=this.progress),this.render(),this.playing&&this.requestAnimationFrameMethod.call(window,this.animate.bind(this))},t.prototype.render=function(){var t=this.playing?this.progress:0,e=this.diameter2-this.thickness,i=this.diameter2,s=this.diameter2;this.progressOffset+=.1*(1-this.progressOffset);var o=-Math.PI/2+t*(2*Math.PI),r=-Math.PI/2+this.progressOffset*(2*Math.PI);this.context.save(),this.context.clearRect(0,0,this.diameter,this.diameter),this.context.beginPath(),this.context.arc(i,s,e+4,0,2*Math.PI,!1),this.context.fillStyle="rgba( 0, 0, 0, 0.4 )",this.context.fill(),this.context.beginPath(),this.context.arc(i,s,e,0,2*Math.PI,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="rgba( 255, 255, 255, 0.2 )",this.context.stroke(),this.playing&&(this.context.beginPath(),this.context.arc(i,s,e,r,o,!1),this.context.lineWidth=this.thickness,this.context.strokeStyle="#fff",this.context.stroke()),this.context.translate(i-14,s-14),this.playing?(this.context.fillStyle="#fff",this.context.fillRect(0,0,10,28),this.context.fillRect(18,0,10,28)):(this.context.beginPath(),this.context.translate(4,0),this.context.moveTo(0,0),this.context.lineTo(24,14),this.context.lineTo(0,28),this.context.fillStyle="#fff",this.context.fill()),this.context.restore()},t.prototype.on=function(t,e){this.canvas.addEventListener(t,e,!1)},t.prototype.off=function(t,e){this.canvas.removeEventListener(t,e,!1)},t.prototype.destroy=function(){this.playing=!1,this.canvas.parentNode&&this.container.removeChild(this.canvas)},t}();exports.Playback=i;var s=function(){function s(){var e=this;this.config={width:1920,height:1080,margin:.04,minScale:.2,maxScale:2,controls:!0,controlsTutorial:!0,controlsLayout:"bottom-right",controlsBackArrows:"faded",progress:!0,slideNumber:!1,showSlideNumber:"all",hashOneBasedIndex:!1,hash:!1,history:!1,keyboard:!0,keyboardCondition:null,overview:!0,disableLayout:!1,center:!0,touch:!0,loop:!1,rtl:!1,navigationMode:"default",shuffle:!1,fragments:!0,fragmentInURL:!1,embedded:!1,help:!0,pause:!0,showNotes:!1,autoPlayMedia:null,preloadIframes:null,autoSlide:0,autoSlideStoppable:!0,autoSlideMethod:null,defaultTiming:null,mouseWheel:!1,rollingLinks:!1,hideAddressBar:!0,previewLinks:!1,postMessage:!0,postMessageEvents:!1,focusBodyOnPageVisibilityChange:!0,transition:"slide",transitionSpeed:"default",backgroundTransition:"fade",parallaxBackgroundImage:"",parallaxBackgroundSize:"",parallaxBackgroundRepeat:"repeat",parallaxBackgroundPosition:"",parallaxBackgroundHorizontal:null,parallaxBackgroundVertical:null,pdfMaxPagesPerSlide:Number.POSITIVE_INFINITY,pdfSeparateFragments:!0,pdfPageHeightOffset:-1,viewDistance:3,display:"block",hideInactiveCursor:!0,hideCursorTime:5e3,dependencies:[]},this.initialized=!1,this.loaded=!1,this.overview=!1,this.overviewSlideWidth=null,this.overviewSlideHeight=null,this.hasNavigatedRight=!1,this.hasNavigatedDown=!1,this.state=[],this.scale=1,this.slidesTransform={layout:"",overview:""},this.dom={wrapper:void 0,slides:void 0,background:void 0,progress:void 0,progressbar:void 0,controls:void 0,slideNumber:void 0,speakerNotes:void 0,pauseOverlay:void 0,controlsLeft:void 0,controlsRight:void 0,controlsUp:void 0,controlsDown:void 0,controlsPrev:void 0,controlsNext:void 0,controlsRightArrow:void 0,controlsDownArrow:void 0,statusDiv:void 0,overlay:void 0},this.plugins={},this.asyncDependencies=[],this.features={transforms2d:!1,transforms3d:!1,requestAnimationFrameMethod:null,requestAnimationFrame:!1,canvas:!1,overviewTransitions:!1,zoom:!1},this.lastMouseWheelStep=0,this.cursorHidden=!1,this.eventsAreBound=!1,this.autoSlide=0,this.autoSlideStartTime=-1,this.autoSlidePaused=!1,this.touch={startX:0,startY:0,startCount:0,captured:!1,threshold:40},this.keyboardShortcuts={},this.registeredKeyBindings={},this.resume=function(){var t=e.dom.wrapper.classList.contains("paused");e.dom.wrapper.classList.remove("paused"),e.cueAutoSlide(),t&&e.dispatchEvent("resumed")},this.startEmbeddedMedia=function(t){var i=!!e.closestParent(t.target,"html"),s=!!e.closestParent(t.target,".present");i&&s&&(t.target.currentTime=0,t.target.play()),t.target.removeEventListener("loadeddata",e.startEmbeddedMedia)},this.startEmbeddedIframe=function(t){var i=t.target;if(i&&i.contentWindow){var s=!!e.closestParent(t.target,"html"),o=!!e.closestParent(t.target,".present");if(s&&o){var r=e.config.autoPlayMedia;"boolean"!=typeof r&&(r=i.hasAttribute("data-autoplay")||!!e.closestParent(i,".slide-background")),/youtube\.com\/embed\//.test(i.getAttribute("src"))&&r?i.contentWindow.postMessage('{"event":"command","func":"playVideo","args":""}',"*"):/player\.vimeo\.com\//.test(i.getAttribute("src"))&&r?i.contentWindow.postMessage('{"method":"play"}',"*"):i.contentWindow.postMessage("slide:start","*")}}},this.onUserInput=function(){e.config.autoSlideStoppable&&e.pauseAutoSlide()},this.onDocumentCursorActive=function(){e.showCursor(),clearTimeout(e.cursorInactiveTimeout),e.cursorInactiveTimeout=setTimeout(function(){return e.hideCursor()},e.config.hideCursorTime)},this.onDocumentKeyPress=function(t){t.shiftKey&&63===t.charCode&&e.toggleHelp()},this.onDocumentKeyDown=function(i){if("function"==typeof e.config.keyboardCondition&&!1===e.config.keyboardCondition(i))return!0;var s=i.keyCode,o=e.autoSlidePaused;e.onUserInput();var r=document.activeElement&&"inherit"!==document.activeElement.contentEditable,n=document.activeElement&&document.activeElement.tagName&&/input|textarea/i.test(document.activeElement.tagName),a=document.activeElement&&document.activeElement.className&&/speaker-notes/i.test(document.activeElement.className),d=i.shiftKey&&32===i.keyCode,l=(i.metaKey||i.ctrlKey)&&37===s,c=(i.metaKey||i.ctrlKey)&&39===s,h=!d&&!l&&!c&&(i.shiftKey||i.altKey||i.ctrlKey||i.metaKey);if(!(r||n||a||h)){var u,p=[66,86,190,191];if("object"===t(e.config.keyboard))for(u in e.config.keyboard)"togglePause"===e.config.keyboard[u]&&p.push(parseInt(u,10));if(e.isPaused()&&-1===p.indexOf(s))return!1;var v=!1;if("object"===t(e.config.keyboard))for(u in e.config.keyboard)if(parseInt(u,10)===s){var g=e.config.keyboard[u];"function"==typeof g?g.apply(null,[i]):"string"==typeof g&&"function"==typeof window.Reveal[g]&&window.Reveal[g].call(),v=!0}if(!1===v)for(u in e.registeredKeyBindings)if(parseInt(u,10)===s){var f=e.registeredKeyBindings[u].callback;"function"==typeof f?f.apply(null,[i]):"string"==typeof f&&"function"==typeof window.Reveal[f]&&window.Reveal[f].call(),v=!0}!1===v&&(v=!0,80===s||33===s?e.navigatePrev():78===s||34===s?e.navigateNext():72===s||37===s?l?e.slide(0):e.isOverview()||"linear"!==e.config.navigationMode?e.navigateLeft():e.navigatePrev():76===s||39===s?c?e.slide(Number.MAX_VALUE):e.isOverview()||"linear"!==e.config.navigationMode?e.navigateRight():e.navigateNext():75===s||38===s?e.isOverview()||"linear"!==e.config.navigationMode?e.navigateUp():e.navigatePrev():74===s||40===s?e.isOverview()||"linear"!==e.config.navigationMode?e.navigateDown():e.navigateNext():36===s?e.slide(0):35===s?e.slide(Number.MAX_VALUE):32===s?(e.isOverview()&&e.deactivateOverview(),i.shiftKey?e.navigatePrev():e.navigateNext()):58===s||59===s||66===s||86===s||190===s||191===s?e.togglePause():70===s?e.enterFullscreen():65===s?e.config.autoSlideStoppable&&e.toggleAutoSlide(o):v=!1),v?i.preventDefault&&i.preventDefault():27!==s&&79!==s||!e.features.transforms3d||(e.dom.overlay?e.closeOverlay():e.toggleOverview(),i.preventDefault&&i.preventDefault()),e.cueAutoSlide()}},this.onTouchStart=function(t){if(e.isSwipePrevented(t.target))return!0;e.touch.startX=t.touches[0].clientX,e.touch.startY=t.touches[0].clientY,e.touch.startCount=t.touches.length},this.onTouchMove=function(t){if(e.isSwipePrevented(t.target))return!0;if(e.touch.captured)s.UA.match(/android/gi)&&t.preventDefault();else{e.onUserInput();var i=t.touches[0].clientX,o=t.touches[0].clientY;if(1===t.touches.length&&2!==e.touch.startCount){var r=i-e.touch.startX,n=o-e.touch.startY;r>e.touch.threshold&&Math.abs(r)>Math.abs(n)?(e.touch.captured=!0,e.navigateLeft()):r<-e.touch.threshold&&Math.abs(r)>Math.abs(n)?(e.touch.captured=!0,e.navigateRight()):n>e.touch.threshold?(e.touch.captured=!0,e.navigateUp()):n<-e.touch.threshold&&(e.touch.captured=!0,e.navigateDown()),e.config.embedded?(e.touch.captured||e.isVerticalSlide(e.currentSlide))&&t.preventDefault():t.preventDefault()}}},this.onTouchEnd=function(t){e.touch.captured=!1},this.onPointerDown=function(t){t.pointerType!==t.MSPOINTER_TYPE_TOUCH&&"touch"!==t.pointerType||(t.touches=[{clientX:t.clientX,clientY:t.clientY}],e.onTouchStart(t))},this.onPointerMove=function(t){t.pointerType!==t.MSPOINTER_TYPE_TOUCH&&"touch"!==t.pointerType||(t.touches=[{clientX:t.clientX,clientY:t.clientY}],e.onTouchMove(t))},this.onPointerUp=function(t){t.pointerType!==t.MSPOINTER_TYPE_TOUCH&&"touch"!==t.pointerType||(t.touches=[{clientX:t.clientX,clientY:t.clientY}],e.onTouchEnd(t))},this.onDocumentMouseScroll=function(t){if(Date.now()-e.lastMouseWheelStep>600){e.lastMouseWheelStep=Date.now();var i=t.detail||-t.wheelDelta;i>0?e.navigateNext():i<0&&e.navigatePrev()}},this.onProgressClicked=function(t){e.onUserInput(),t.preventDefault();var i=e.dom.wrapper.querySelectorAll(s.HORIZONTAL_SLIDES_SELECTOR).length,o=Math.floor(t.clientX/e.dom.wrapper.offsetWidth*i);e.config.rtl&&(o=i-o),e.slide(o)},this.onNavigateLeftClicked=function(t){t.preventDefault(),e.onUserInput(),"linear"===e.config.navigationMode?e.navigatePrev():e.navigateLeft()},this.onNavigateRightClicked=function(t){t.preventDefault(),e.onUserInput(),"linear"===e.config.navigationMode?e.navigateNext():e.navigateRight()},this.onNavigateUpClicked=function(t){t.preventDefault(),e.onUserInput(),e.navigateUp()},this.onNavigateDownClicked=function(t){t.preventDefault(),e.onUserInput(),e.navigateDown()},this.onNavigatePrevClicked=function(t){t.preventDefault(),e.onUserInput(),e.navigatePrev()},this.onNavigateNextClicked=function(t){t.preventDefault(),e.onUserInput(),e.navigateNext()},this.onWindowHashChange=function(t){e.readURL()},this.onWindowResize=function(t){e.layout()},this.onPageVisibilityChange=function(t){!1===(document.webkitHidden||document.msHidden||document.hidden)&&document.activeElement!==document.body&&("function"==typeof document.activeElement.blur&&document.activeElement.blur(),document.body.focus())},this.onOverviewSlideClicked=function(t){if(e.eventsAreBound&&e.isOverview()){t.preventDefault();for(var i=t.target;i&&!i.nodeName.match(/section/gi);)i=i.parentNode;if(i&&!i.classList.contains("disabled")&&(e.deactivateOverview(),i.nodeName.match(/section/gi))){var s=parseInt(i.getAttribute("data-index-h"),10),o=parseInt(i.getAttribute("data-index-v"),10);e.slide(s,o)}}},this.onPreviewLinkClicked=function(t){if(t.currentTarget&&t.currentTarget.hasAttribute("href")){var i=t.currentTarget.getAttribute("href");i&&(e.showPreview(i),t.preventDefault())}},this.onAutoSlidePlayerClick=function(t){e.isLastSlide()&&!1===e.config.loop?(e.slide(0,0),e.resumeAutoSlide()):e.autoSlidePaused?e.resumeAutoSlide():e.pauseAutoSlide()}}return s.prototype.initialize=function(t){var e=this;if(!0!==this.initialized)if(this.initialized=!0,this.checkCapabilities(),this.features.transforms2d||this.features.transforms3d){this.dom.wrapper=document.querySelector(".reveal"),this.dom.slides=document.querySelector(".reveal .slides"),window.addEventListener("load",function(){return e.layout()},!1);var i=this.getQueryHash();i.dependencies&&delete i.dependencies,this.extend(this.config,t),this.extend(this.config,i),this.hideAddressBar(),this.load()}else{document.body.setAttribute("class","no-transforms");for(var s=this.toArray(document.getElementsByTagName("img")),o=this.toArray(document.getElementsByTagName("iframe")),r=s.concat(o),n=0,a=r.length;n1&&this.config.autoSlide&&this.config.autoSlideStoppable&&this.features.canvas&&this.features.requestAnimationFrame&&(this.autoSlidePlayer=new i(this.dom.wrapper,function(){return Math.min(Math.max((Date.now()-o.autoSlideStartTime)/o.autoSlide,0),1)},this.features.requestAnimationFrameMethod),this.autoSlidePlayer.on("click",this.onAutoSlidePlayerClick),this.autoSlidePaused=!1),!1===this.config.fragments&&this.dom.slides.querySelectorAll(".fragment").forEach(function(t){t.classList.add("visible"),t.classList.remove("current-fragment")});var a="none";this.config.slideNumber&&!this.isPrintingPDF()&&("all"===this.config.showSlideNumber?a="block":"speaker"===this.config.showSlideNumber&&this.isSpeakerNotes()&&(a="block")),this.dom.slideNumber.style.display=a,"default"!==this.config.navigationMode?this.dom.wrapper.setAttribute("data-navigation-mode",this.config.navigationMode):this.dom.wrapper.removeAttribute("data-navigation-mode"),"linear"===this.config.navigationMode?(this.keyboardShortcuts["→ , ↓ , SPACE , N , L , J"]="Next slide",this.keyboardShortcuts["← , ↑ , P , H , K"]="Previous slide"):(this.keyboardShortcuts["N , SPACE"]="Next slide",this.keyboardShortcuts.P="Previous slide",this.keyboardShortcuts["← , H"]="Navigate left",this.keyboardShortcuts["→ , L"]="Navigate right",this.keyboardShortcuts["↑ , K"]="Navigate up",this.keyboardShortcuts["↓ , J"]="Navigate down"),this.keyboardShortcuts["Home , ⌘/CTRL ←"]="First slide",this.keyboardShortcuts["End , ⌘/CTRL →"]="Last slide",this.keyboardShortcuts["B , ."]="Pause",this.keyboardShortcuts.F="Fullscreen",this.keyboardShortcuts["ESC, O"]="Slide overview",this.sync()}},s.prototype.addEventListeners=function(){var t=this;if(this.eventsAreBound=!0,window.addEventListener("hashchange",this.onWindowHashChange,!1),window.addEventListener("resize",this.onWindowResize,!1),this.config.touch&&("onpointerdown"in window?(this.dom.wrapper.addEventListener("pointerdown",this.onPointerDown,!1),this.dom.wrapper.addEventListener("pointermove",this.onPointerMove,!1),this.dom.wrapper.addEventListener("pointerup",this.onPointerUp,!1)):window.navigator.msPointerEnabled?(this.dom.wrapper.addEventListener("MSPointerDown",this.onPointerDown,!1),this.dom.wrapper.addEventListener("MSPointerMove",this.onPointerMove,!1),this.dom.wrapper.addEventListener("MSPointerUp",this.onPointerUp,!1)):(this.dom.wrapper.addEventListener("touchstart",this.onTouchStart,!1),this.dom.wrapper.addEventListener("touchmove",this.onTouchMove,!1),this.dom.wrapper.addEventListener("touchend",this.onTouchEnd,!1))),this.config.keyboard&&(document.addEventListener("keydown",this.onDocumentKeyDown,!1),document.addEventListener("keypress",this.onDocumentKeyPress,!1)),this.config.progress&&this.dom.progress&&this.dom.progress.addEventListener("click",this.onProgressClicked,!1),this.dom.pauseOverlay.addEventListener("click",this.resume,!1),this.config.focusBodyOnPageVisibilityChange){var e=void 0;"hidden"in document?e="visibilitychange":"msHidden"in document?e="msvisibilitychange":"webkitHidden"in document&&(e="webkitvisibilitychange"),e&&document.addEventListener(e,this.onPageVisibilityChange,!1)}var i=["touchstart","click"];s.UA.match(/android/gi)&&(i=["touchstart"]),i.forEach(function(e){t.dom.controlsLeft.forEach(function(i){i.addEventListener(e,t.onNavigateLeftClicked,!1)}),t.dom.controlsRight.forEach(function(i){i.addEventListener(e,t.onNavigateRightClicked,!1)}),t.dom.controlsUp.forEach(function(i){i.addEventListener(e,t.onNavigateUpClicked,!1)}),t.dom.controlsDown.forEach(function(i){i.addEventListener(e,t.onNavigateDownClicked,!1)}),t.dom.controlsPrev.forEach(function(i){i.addEventListener(e,t.onNavigatePrevClicked,!1)}),t.dom.controlsNext.forEach(function(i){i.addEventListener(e,t.onNavigateNextClicked,!1)})})},s.prototype.removeEventListeners=function(){var t=this;this.eventsAreBound=!1,document.removeEventListener("keydown",this.onDocumentKeyDown,!1),document.removeEventListener("keypress",this.onDocumentKeyPress,!1),window.removeEventListener("hashchange",this.onWindowHashChange,!1),window.removeEventListener("resize",this.onWindowResize,!1),this.dom.wrapper.removeEventListener("pointerdown",this.onPointerDown,!1),this.dom.wrapper.removeEventListener("pointermove",this.onPointerMove,!1),this.dom.wrapper.removeEventListener("pointerup",this.onPointerUp,!1),this.dom.wrapper.removeEventListener("MSPointerDown",this.onPointerDown,!1),this.dom.wrapper.removeEventListener("MSPointerMove",this.onPointerMove,!1),this.dom.wrapper.removeEventListener("MSPointerUp",this.onPointerUp,!1),this.dom.wrapper.removeEventListener("touchstart",this.onTouchStart,!1),this.dom.wrapper.removeEventListener("touchmove",this.onTouchMove,!1),this.dom.wrapper.removeEventListener("touchend",this.onTouchEnd,!1),this.dom.pauseOverlay.removeEventListener("click",this.resume,!1),this.config.progress&&this.dom.progress&&this.dom.progress.removeEventListener("click",this.onProgressClicked,!1),["touchstart","click"].forEach(function(e){t.dom.controlsLeft.forEach(function(i){i.removeEventListener(e,t.onNavigateLeftClicked,!1)}),t.dom.controlsRight.forEach(function(i){i.removeEventListener(e,t.onNavigateRightClicked,!1)}),t.dom.controlsUp.forEach(function(i){i.removeEventListener(e,t.onNavigateUpClicked,!1)}),t.dom.controlsDown.forEach(function(i){i.removeEventListener(e,t.onNavigateDownClicked,!1)}),t.dom.controlsPrev.forEach(function(i){i.removeEventListener(e,t.onNavigatePrevClicked,!1)}),t.dom.controlsNext.forEach(function(i){i.removeEventListener(e,t.onNavigateNextClicked,!1)})})},s.prototype.registerPlugin=function(t,e){void 0===this.plugins[t]?(this.plugins[t]=e,this.loaded&&"function"==typeof e.init&&e.init()):console.warn('reveal.js: "'+t+'" plugin has already been registered')},s.prototype.layout=function(){if(this.dom.wrapper&&!this.isPrintingPDF()){if(!this.config.disableLayout){this.isMobileDevice&&document.documentElement.style.setProperty("--vh",.01*window.innerHeight+"px");var t=this.getComputedSlideSize(),e=this.scale;this.layoutSlideContents(this.config.width,this.config.height),this.dom.slides.style.width=t.width+"px",this.dom.slides.style.height=t.height+"px",this.scale=Math.min(t.presentationWidth/t.width,t.presentationHeight/t.height),this.scale=Math.max(this.scale,this.config.minScale),this.scale=Math.min(this.scale,this.config.maxScale),1===this.scale?(this.dom.slides.style.zoom="",this.dom.slides.style.left="",this.dom.slides.style.top="",this.dom.slides.style.bottom="",this.dom.slides.style.right="",this.transformSlides({layout:""})):this.scale>1&&this.features.zoom?(this.dom.slides.style.zoom=""+this.scale,this.dom.slides.style.left="",this.dom.slides.style.top="",this.dom.slides.style.bottom="",this.dom.slides.style.right="",this.transformSlides({layout:""})):(this.dom.slides.style.zoom="",this.dom.slides.style.left="50%",this.dom.slides.style.top="50%",this.dom.slides.style.bottom="auto",this.dom.slides.style.right="auto",this.transformSlides({layout:"translate(-50%, -50%) scale("+this.scale+")"}));for(var i=this.dom.wrapper.querySelectorAll(s.SLIDES_SELECTOR),o=0,r=i.length;o0&&t.load()});var s=t.slideBackgroundElement;if(s){s.style.display="block";var o=t.slideBackgroundContentElement;if(!1===s.hasAttribute("data-loaded")){s.setAttribute("data-loaded","true");var r=t.getAttribute("data-background-image"),n=t.getAttribute("data-background-video"),a=t.hasAttribute("data-background-video-loop"),d=t.hasAttribute("data-background-video-muted"),l=t.getAttribute("data-background-iframe");if(r)o.style.backgroundImage="url("+encodeURI(r)+")";else if(n&&!this.isSpeakerNotes()){var c=document.createElement("video");a&&c.setAttribute("loop",""),d&&(c.muted=!0),this.isMobileDevice&&(c.muted=!0,c.autoplay=!0,c.setAttribute("playsinline","")),n.split(",").forEach(function(t){c.innerHTML+=''}),o.appendChild(c)}else if(l&&!0!==e.excludeIframes){var h=document.createElement("iframe");h.setAttribute("allowfullscreen",""),h.setAttribute("mozallowfullscreen",""),h.setAttribute("webkitallowfullscreen",""),/autoplay=(1|true|yes)/gi.test(l)?h.setAttribute("data-src",l):h.setAttribute("src",l),h.style.width="100%",h.style.height="100%",h.style.maxHeight="100%",h.style.maxWidth="100%",o.appendChild(h)}}}},s.prototype.unloadSlide=function(t){t.style.display="none";var e=this.getSlideBackground(t);e&&(e.style.display="none"),t.querySelectorAll("video[data-lazy-loaded][src], audio[data-lazy-loaded][src], iframe[data-lazy-loaded][src]").forEach(function(t){t.setAttribute("data-src",t.getAttribute("src")),t.removeAttribute("src")}),t.querySelectorAll("video[data-lazy-loaded] source[src], audio source[src]").forEach(function(t){t.setAttribute("data-src",t.getAttribute("src")),t.removeAttribute("src")})},s.prototype.availableRoutes=function(){var t=this.dom.wrapper.querySelectorAll(s.HORIZONTAL_SLIDES_SELECTOR),e=this.dom.wrapper.querySelectorAll(s.VERTICAL_SLIDES_SELECTOR),i={left:this.indexh>0,right:this.indexh0,down:this.indexv1&&(i.left=!0,i.right=!0),e.length>1&&(i.up=!0,i.down=!0)),this.config.rtl){var o=i.left;i.left=i.right,i.right=o}return i},s.prototype.availableFragments=function(){if(this.currentSlide&&this.config.fragments){var t=this.currentSlide.querySelectorAll(".fragment"),e=this.currentSlide.querySelectorAll(".fragment:not(.visible)");return{prev:t.length-e.length>0,next:!!e.length}}return{prev:!1,next:!1}},s.prototype.getSlidePastCount=function(){var t=this.dom.wrapper.querySelectorAll(s.HORIZONTAL_SLIDES_SELECTOR),e=0;t:for(var i=0;i0){e+=this.currentSlide.querySelectorAll(".fragment.visible").length/i.length*.9}}return Math.min(e/(t-1),1)},s.prototype.isSpeakerNotes=function(){return!!window.location.search.match(/receiver/gi)},s.prototype.getIndices=function(t){var e,i=this.indexh,o=this.indexv;if(t){var r=this.isVerticalSlide(t),n=r?t.parentNode:t,a=this.toArray(this.dom.wrapper.querySelectorAll(s.HORIZONTAL_SLIDES_SELECTOR));i=Math.max(a.indexOf(n),0),o=void 0,r&&(o=Math.max(this.toArray(t.parentNode.querySelectorAll("section")).indexOf(t),0))}if(!t&&this.currentSlide&&this.currentSlide.querySelectorAll(".fragment").length>0){var d=this.currentSlide.querySelector(".current-fragment");e=d&&d.hasAttribute("data-fragment-index")?parseInt(d.getAttribute("data-fragment-index"),10):this.currentSlide.querySelectorAll(".fragment.visible").length-1}return{h:i,v:o,f:e}},s.prototype.getSlides=function(){return this.toArray(this.dom.wrapper.querySelectorAll(s.SLIDES_SELECTOR+":not(.stack)"))},s.prototype.getSlidesAttributes=function(){return this.getSlides().map(function(t){for(var e={},i=0;i"),this.dom.progressbar=this.dom.progress.querySelector("span"),this.dom.controls=this.createSingletonNode(this.dom.wrapper,"aside","controls",''),this.dom.slideNumber=this.createSingletonNode(this.dom.wrapper,"div","slide-number",""),this.dom.speakerNotes=this.createSingletonNode(this.dom.wrapper,"div","speaker-notes",null),this.dom.speakerNotes.setAttribute("data-prevent-swipe",""),this.dom.speakerNotes.setAttribute("tabindex","0"),this.dom.pauseOverlay=this.createSingletonNode(this.dom.wrapper,"div","pause-overlay",this.config.controls?'':null),this.dom.wrapper.setAttribute("role","application"),this.dom.controlsLeft=this.toArray(document.querySelectorAll(".navigate-left")),this.dom.controlsRight=this.toArray(document.querySelectorAll(".navigate-right")),this.dom.controlsUp=this.toArray(document.querySelectorAll(".navigate-up")),this.dom.controlsDown=this.toArray(document.querySelectorAll(".navigate-down")),this.dom.controlsPrev=this.toArray(document.querySelectorAll(".navigate-prev")),this.dom.controlsNext=this.toArray(document.querySelectorAll(".navigate-next")),this.dom.controlsRightArrow=this.dom.controls.querySelector(".navigate-right"),this.dom.controlsDownArrow=this.dom.controls.querySelector(".navigate-down"),this.dom.statusDiv=this.createStatusDiv()},s.prototype.createStatusDiv=function(){var t=document.getElementById("aria-status-div");return t||((t=document.createElement("div")).style.position="absolute",t.style.height="1px",t.style.width="1px",t.style.overflow="hidden",t.style.clip="rect( 1px, 1px, 1px, 1px )",t.setAttribute("id","aria-status-div"),t.setAttribute("aria-live","polite"),t.setAttribute("aria-atomic","true"),this.dom.wrapper.appendChild(t)),t},s.prototype.getStatusText=function(t){var e=this,i="";if(3===t.nodeType)i+=t.textContent;else if(1===t.nodeType){var s=t.getAttribute("aria-hidden"),o="none"===window.getComputedStyle(t).display;"true"===s||o||t.childNodes.forEach(function(t){i+=e.getStatusText(t)})}return i},s.prototype.setupPDF=function(){var t=this,e=this.getComputedSlideSize(window.innerWidth,window.innerHeight);e.height/=1+this.config.margin;var i=Math.floor(e.width*(1+this.config.margin)),o=Math.floor(e.height*(1+this.config.margin)),r=e.width,n=e.height;this.injectStyleSheet("@page{size:"+i+"px "+o+"px; margin: 0px;}"),this.injectStyleSheet(".reveal section>img, .reveal section>video, .reveal section>iframe{max-width: "+r+"px; max-height: "+n+"px}"),document.body.classList.add("print-pdf"),document.body.style.width=i+"px",document.body.style.height=o+"px",this.layoutSlideContents(r,n),this.dom.wrapper.querySelectorAll(s.HORIZONTAL_SLIDES_SELECTOR).forEach(function(t,e){t.setAttribute("data-index-h",""+e),t.classList.contains("stack")&&t.querySelectorAll("section").forEach(function(t,i){t.setAttribute("data-index-h",""+e),t.setAttribute("data-index-v",""+i)})}),this.dom.wrapper.querySelectorAll(s.SLIDES_SELECTOR).forEach(function(e){if(!1===e.classList.contains("stack")){var s=(i-r)/2,a=(o-n)/2,d=e.scrollHeight,l=Math.max(Math.ceil(d/o),1);(1===(l=Math.min(l,t.config.pdfMaxPagesPerSlide))&&t.config.center||e.classList.contains("center"))&&(a=Math.max((o-d)/2,0));var c=document.createElement("div");if(c.className="pdf-page",c.style.height=(o+t.config.pdfPageHeightOffset)*l+"px",e.parentNode.insertBefore(c,e),c.appendChild(e),e.style.left=s+"px",e.style.top=a+"px",e.style.width=r+"px",e.slideBackgroundElement&&c.insertBefore(e.slideBackgroundElement,e),t.config.showNotes){var h=t.getSlideNotes(e);if(h){var u="string"==typeof t.config.showNotes?t.config.showNotes:"inline",p=document.createElement("div");p.classList.add("speaker-notes"),p.classList.add("speaker-notes-pdf"),p.setAttribute("data-layout",u),p.innerHTML=h,"separate-page"===u?c.parentNode.insertBefore(p,c.nextSibling):(p.style.left="8px",p.style.bottom="8px",p.style.width=i-16+"px",c.appendChild(p))}}if(t.config.slideNumber&&/all|print/i.test(t.config.showSlideNumber)){var v=parseInt(e.getAttribute("data-index-h"),10)+1,g=parseInt(e.getAttribute("data-index-v"),10)+1,f=document.createElement("div");f.classList.add("slide-number"),f.classList.add("slide-number-pdf"),f.innerHTML=t.formatSlideNumber(v,".",g),c.appendChild(f)}if(t.config.pdfSeparateFragments){var m,y,b=t.sortFragments(c.querySelectorAll(".fragment"),!0);b.forEach(function(t){m&&m.forEach(function(t){t.classList.remove("current-fragment")}),t.forEach(function(t){t.classList.add("visible","current-fragment")});var e=c.cloneNode(!0);c.parentNode.insertBefore(e,(y||c).nextSibling),m=t,y=e}),b.forEach(function(t){t.forEach(function(t){t.classList.remove("visible","current-fragment")})})}else c.querySelectorAll(".fragment:not(.fade-out)").forEach(function(t){t.classList.add("visible")})}}),this.dispatchEvent("pdf-ready")},s.prototype.setupScrollPrevention=function(){var t=this;setInterval(function(){0===t.dom.wrapper.scrollTop&&0===t.dom.wrapper.scrollLeft||(t.dom.wrapper.scrollTop=0,t.dom.wrapper.scrollLeft=0)},1e3)},s.prototype.createSingletonNode=function(t,e,i,s){for(var o=t.querySelectorAll("."+i),r=0;r",'','',"",'
','
','','','Unable to load iframe. This is likely due to the site\'s policy (x-frame-options).',"","
"].join(""),this.dom.overlay.querySelector("iframe").addEventListener("load",function(t){e.dom.overlay.classList.add("loaded")},!1),this.dom.overlay.querySelector(".close").addEventListener("click",function(t){e.closeOverlay(),t.preventDefault()},!1),this.dom.overlay.querySelector(".external").addEventListener("click",function(t){e.closeOverlay()},!1),setTimeout(function(){e.dom.overlay.classList.add("visible")},1)},s.prototype.showHelp=function(){var t,i,s=this;if(this.config.help){this.closeOverlay(),this.dom.overlay=document.createElement("div"),this.dom.overlay.classList.add("overlay"),this.dom.overlay.classList.add("overlay-help"),this.dom.wrapper.appendChild(this.dom.overlay);var o='

Keyboard Shortcuts


';o+="";try{for(var r=e(Object.keys(this.keyboardShortcuts)),n=r.next();!n.done;n=r.next()){var a=n.value;o+=""}}catch(l){t={error:l}}finally{try{n&&!n.done&&(i=r.return)&&i.call(r)}finally{if(t)throw t.error}}for(var d in this.registeredKeyBindings)this.registeredKeyBindings[d].key&&this.registeredKeyBindings[d].description&&(o+="");o+="
KEYACTION
"+a+""+this.keyboardShortcuts[a]+"
"+this.registeredKeyBindings[d].key+""+this.registeredKeyBindings[d].description+"
",this.dom.overlay.innerHTML=["
",'',"
",'
','
'+o+"
","
"].join(""),this.dom.overlay.querySelector(".close").addEventListener("click",function(t){s.closeOverlay(),t.preventDefault()},!1),setTimeout(function(){s.dom.overlay.classList.add("visible")},1)}},s.prototype.closeOverlay=function(){this.dom.overlay&&(this.dom.overlay.parentNode.removeChild(this.dom.overlay),this.dom.overlay=null)},s.prototype.layoutSlideContents=function(t,e){var i=this;this.dom.slides.querySelectorAll("section > .stretch").forEach(function(s){var o=i.getRemainingHeight(s,e);if(/(img|video)/gi.test(s.nodeName)){var r=s,n=r.naturalWidth||r.videoWidth,a=r.naturalHeight||r.videoHeight,d=Math.min(t/n,o/a);s.style.width=n*d+"px",s.style.height=a*d+"px"}else s.style.width=t+"px",s.style.height=o+"px"})},s.prototype.getComputedSlideSize=function(t,e){var i={width:this.config.width,height:this.config.height,presentationWidth:t||this.dom.wrapper.offsetWidth,presentationHeight:e||this.dom.wrapper.offsetHeight};return i.presentationWidth-=i.presentationWidth*this.config.margin,i.presentationHeight-=i.presentationHeight*this.config.margin,"string"==typeof i.width&&/%$/.test(i.width)&&(i.width=parseInt(i.width,10)/100*i.presentationWidth),"string"==typeof i.height&&/%$/.test(i.height)&&(i.height=parseInt(i.height,10)/100*i.presentationHeight),i},s.prototype.setPreviousVerticalIndex=function(e,i){"object"===t(e)&&"function"==typeof e.setAttribute&&e.setAttribute("data-previous-indexv",""+i||"0")},s.prototype.getPreviousVerticalIndex=function(e){if("object"===t(e)&&"function"==typeof e.setAttribute&&e.classList.contains("stack")){var i=e.hasAttribute("data-start-indexv")?"data-start-indexv":"data-previous-indexv";return parseInt(e.getAttribute(i)||"0",10)}return 0},s.prototype.activateOverview=function(){var t=this;if(this.config.overview&&!this.isOverview()){this.overview=!0,this.dom.wrapper.classList.add("overview"),this.dom.wrapper.classList.remove("overview-deactivating"),this.features.overviewTransitions&&setTimeout(function(){t.dom.wrapper.classList.add("overview-animated")},1),this.cancelAutoSlide(),this.dom.slides.appendChild(this.dom.background),this.dom.wrapper.querySelectorAll(s.SLIDES_SELECTOR).forEach(function(e){e.classList.contains("stack")||e.addEventListener("click",t.onOverviewSlideClicked,!0)});var e=this.getComputedSlideSize();this.overviewSlideWidth=e.width+70,this.overviewSlideHeight=e.height+70,this.config.rtl&&(this.overviewSlideWidth=-this.overviewSlideWidth),this.updateSlidesVisibility(),this.layoutOverview(),this.updateOverview(),this.layout(),this.dispatchEvent("overviewshown",{indexh:this.indexh,indexv:this.indexv,currentSlide:this.currentSlide})}},s.prototype.layoutOverview=function(){var t=this;this.dom.wrapper.querySelectorAll(s.HORIZONTAL_SLIDES_SELECTOR).forEach(function(e,i){e.setAttribute("data-index-h",""+i),t.transformElement(e,"translate3d("+i*t.overviewSlideWidth+"px, 0, 0)"),e.classList.contains("stack")&&e.querySelectorAll("section").forEach(function(e,s){e.setAttribute("data-index-h",""+i),e.setAttribute("data-index-v",""+s),t.transformElement(e,"translate3d(0, "+s*t.overviewSlideHeight+"px, 0)")})}),this.dom.background.childNodes.forEach(function(e,i){t.transformElement(e,"translate3d("+i*t.overviewSlideWidth+"px, 0, 0)"),e.querySelectorAll(".slide-background").forEach(function(e,i){t.transformElement(e,"translate3d(0, "+i*t.overviewSlideHeight+"px, 0)")})})},s.prototype.updateOverview=function(){var t=Math.min(window.innerWidth,window.innerHeight),e=Math.max(t/5,150)/t;this.transformSlides({overview:["scale("+e+")","translateX("+-this.indexh*this.overviewSlideWidth+"px)","translateY("+-this.indexv*this.overviewSlideHeight+"px)"].join(" ")})},s.prototype.deactivateOverview=function(){var t=this;this.config.overview&&(this.overview=!1,this.dom.wrapper.classList.remove("overview"),this.dom.wrapper.classList.remove("overview-animated"),this.dom.wrapper.classList.add("overview-deactivating"),setTimeout(function(){t.dom.wrapper.classList.remove("overview-deactivating")},1),this.dom.wrapper.appendChild(this.dom.background),this.dom.wrapper.querySelectorAll(s.SLIDES_SELECTOR).forEach(function(e){t.transformElement(e,""),e.removeEventListener("click",t.onOverviewSlideClicked,!0)}),this.dom.background.querySelectorAll(".slide-background").forEach(function(e){t.transformElement(e,"")}),this.transformSlides({overview:""}),this.slide(this.indexh,this.indexv),this.layout(),this.cueAutoSlide(),this.dispatchEvent("overviewhidden",{indexh:this.indexh,indexv:this.indexv,currentSlide:this.currentSlide}))},s.prototype.locationHash=function(){var t,e="/",i=this.currentSlide?this.currentSlide.getAttribute("id"):null;if(i&&(i=encodeURIComponent(i)),this.config.fragmentInURL&&(t=this.getIndices().f),"string"==typeof i&&i.length&&void 0===t)e="/"+i;else{var s=this.config.hashOneBasedIndex?1:0;(this.indexh>0||this.indexv>0||void 0!==t)&&(e+=this.indexh+s),(this.indexv>0||void 0!==t)&&(e+="/"+(this.indexv+s)),void 0!==t&&(e+="/"+t)}return e},s.prototype.isVerticalSlide=function(t){return(t=t||this.currentSlide)&&t.parentNode&&!!t.parentNode.nodeName.match(/section/i)},s.prototype.enterFullscreen=function(){var t=document.documentElement,e=t.requestFullscreen||t.webkitRequestFullscreen||t.webkitRequestFullScreen||t.mozRequestFullScreen||t.msRequestFullscreen;e&&e.apply(t)},s.prototype.showCursor=function(){this.cursorHidden&&(this.cursorHidden=!1,this.dom.wrapper.style.cursor="")},s.prototype.hideCursor=function(){!1===this.cursorHidden&&(this.cursorHidden=!0,this.dom.wrapper.style.cursor="none")},s.prototype.pause=function(){if(this.config.pause){var t=this.dom.wrapper.classList.contains("paused");this.cancelAutoSlide(),this.dom.wrapper.classList.add("paused"),!1===t&&this.dispatchEvent("paused")}},s.prototype.resetVerticalSlides=function(){this.dom.wrapper.querySelectorAll(s.HORIZONTAL_SLIDES_SELECTOR).forEach(function(t){t.querySelectorAll("section").forEach(function(t,e){e>0&&(t.classList.remove("present"),t.classList.remove("past"),t.classList.add("future"),t.setAttribute("aria-hidden","true"))})})},s.prototype.sortAllFragments=function(){var t=this;this.dom.wrapper.querySelectorAll(s.HORIZONTAL_SLIDES_SELECTOR).forEach(function(e){var i=e.querySelectorAll("section");i.forEach(function(e,i){t.sortFragments(e.querySelectorAll(".fragment"))}),0===i.length&&t.sortFragments(e.querySelectorAll(".fragment"))})},s.prototype.updateSlides=function(t,e){var i=this.dom.wrapper.querySelectorAll(t),s=i.length,o=this.isPrintingPDF();if(s){this.config.loop&&(e%=s)<0&&(e=s+e),e=Math.max(Math.min(e,s-1),0);for(var r=0;re&&(n.classList.add(a?"past":"future"),this.config.fragments&&n.querySelectorAll(".fragment.visible").forEach(function(t){t.classList.remove("visible"),t.classList.remove("current-fragment")}))}i[e].classList.add("present"),i[e].removeAttribute("hidden"),i[e].removeAttribute("aria-hidden");var d=i[e].getAttribute("data-state");d&&(this.state=this.state.concat(d.split(" ")))}else e=0;return e},s.prototype.updateSlidesVisibility=function(){var t,e=this.dom.wrapper.querySelectorAll(s.HORIZONTAL_SLIDES_SELECTOR),i=e.length;if(i&&null!=this.indexh){var o=this.isOverview()?10:this.config.viewDistance;this.isMobileDevice&&(o=this.isOverview()?6:2),this.isPrintingPDF()&&(o=Number.MAX_VALUE);for(var r=0;rsection>section").length?this.dom.wrapper.classList.add("has-vertical-slides"):this.dom.wrapper.classList.remove("has-vertical-slides"),this.dom.wrapper.querySelectorAll(".slides>section").length>1?this.dom.wrapper.classList.add("has-horizontal-slides"):this.dom.wrapper.classList.remove("has-horizontal-slides")}},s.prototype.updateNotes=function(){this.config.showNotes&&this.dom.speakerNotes&&this.currentSlide&&!this.isPrintingPDF()&&(this.dom.speakerNotes.innerHTML=this.getSlideNotes()||'No notes on this slide.')},s.prototype.updateNotesVisibility=function(){this.config.showNotes&&this.hasNotes()?this.dom.wrapper.classList.add("show-notes"):this.dom.wrapper.classList.remove("show-notes")},s.prototype.hasNotes=function(){return this.dom.slides.querySelectorAll("[data-notes], aside.notes").length>0},s.prototype.updateProgress=function(){this.config.progress&&this.dom.progressbar&&(this.dom.progressbar.style.width=this.getProgress()*this.dom.wrapper.offsetWidth+"px")},s.prototype.updateSlideNumber=function(){if(this.config.slideNumber&&this.dom.slideNumber){var t=void 0,e="h.v";if("function"==typeof this.config.slideNumber)t=this.config.slideNumber();else switch("string"==typeof this.config.slideNumber&&(e=this.config.slideNumber),/c/.test(e)||1!==this.dom.wrapper.querySelectorAll(s.HORIZONTAL_SLIDES_SELECTOR).length||(e="c"),t=[],e){case"c":t.push(this.getSlidePastCount()+1);break;case"c/t":t.push(this.getSlidePastCount()+1,"/",this.getTotalSlides());break;case"h/v":t.push(this.indexh+1),this.isVerticalSlide()&&t.push("/",this.indexv+1);break;default:t.push(this.indexh+1),this.isVerticalSlide()&&t.push(".",this.indexv+1)}this.dom.slideNumber.innerHTML=this.formatSlideNumber(t[0],t[1],t[2])}},s.prototype.formatSlideNumber=function(t,e,i){var s="#"+this.locationHash();return"number"!=typeof i||isNaN(i)?''+t+"":''+t+''+e+''+i+""},s.prototype.updateControls=function(){var t=this.availableRoutes(),e=this.availableFragments();this.dom.controlsLeft.concat(this.dom.controlsRight).concat(this.dom.controlsUp).concat(this.dom.controlsDown).concat(this.dom.controlsPrev).concat(this.dom.controlsNext).forEach(function(t){t.classList.remove("enabled"),t.classList.remove("fragmented"),t.setAttribute("disabled","disabled")}),t.left&&this.dom.controlsLeft.forEach(function(t){t.classList.add("enabled"),t.removeAttribute("disabled")}),t.right&&this.dom.controlsRight.forEach(function(t){t.classList.add("enabled"),t.removeAttribute("disabled")}),t.up&&this.dom.controlsUp.forEach(function(t){t.classList.add("enabled"),t.removeAttribute("disabled")}),t.down&&this.dom.controlsDown.forEach(function(t){t.classList.add("enabled"),t.removeAttribute("disabled")}),(t.left||t.up)&&this.dom.controlsPrev.forEach(function(t){t.classList.add("enabled"),t.removeAttribute("disabled")}),(t.right||t.down)&&this.dom.controlsNext.forEach(function(t){t.classList.add("enabled"),t.removeAttribute("disabled")}),this.currentSlide&&(e.prev&&this.dom.controlsPrev.forEach(function(t){t.classList.add("fragmented","enabled"),t.removeAttribute("disabled")}),e.next&&this.dom.controlsNext.forEach(function(t){t.classList.add("fragmented","enabled"),t.removeAttribute("disabled")}),this.isVerticalSlide(this.currentSlide)?(e.prev&&this.dom.controlsUp.forEach(function(t){t.classList.add("fragmented","enabled"),t.removeAttribute("disabled")}),e.next&&this.dom.controlsDown.forEach(function(t){t.classList.add("fragmented","enabled"),t.removeAttribute("disabled")})):(e.prev&&this.dom.controlsLeft.forEach(function(t){t.classList.add("fragmented","enabled"),t.removeAttribute("disabled")}),e.next&&this.dom.controlsRight.forEach(function(t){t.classList.add("fragmented","enabled"),t.removeAttribute("disabled")}))),this.config.controlsTutorial&&(!this.hasNavigatedDown&&t.down?this.dom.controlsDownArrow.classList.add("highlight"):(this.dom.controlsDownArrow.classList.remove("highlight"),!this.hasNavigatedRight&&t.right&&0===this.indexv?this.dom.controlsRightArrow.classList.add("highlight"):this.dom.controlsRightArrow.classList.remove("highlight")))},s.prototype.updateBackground=function(t){var e=this;void 0===t&&(t=!1);var i=null,s=this.config.rtl?"future":"past",o=this.config.rtl?"past":"future";if(this.dom.background.childNodes.forEach(function(r,n){r.classList.remove("past"),r.classList.remove("present"),r.classList.remove("future"),ne.indexh?r.classList.add(o):(r.classList.add("present"),i=r),(t||n===e.indexh)&&r.querySelectorAll(".slide-background").forEach(function(t,s){t.classList.remove("past"),t.classList.remove("present"),t.classList.remove("future"),se.indexv?t.classList.add("future"):(t.classList.add("present"),n===e.indexh&&(i=t))})}),this.previousBackground&&this.stopEmbeddedContent(this.previousBackground),i){this.startEmbeddedContent(i);var r=i.querySelector(".slide-background-content");if(r){var n=r.style.backgroundImage||"";/\.gif/i.test(n)&&(r.style.backgroundImage="",window.getComputedStyle(r).opacity,r.style.backgroundImage=n)}var a=this.previousBackground?this.previousBackground.getAttribute("data-background-hash"):null,d=i.getAttribute("data-background-hash");d&&d===a&&i!==this.previousBackground&&this.dom.background.classList.add("no-transition"),this.previousBackground=i}this.currentSlide&&["has-light-background","has-dark-background"].forEach(function(t){e.currentSlide.classList.contains(t)?e.dom.wrapper.classList.add(t):e.dom.wrapper.classList.remove(t)}),setTimeout(function(){e.dom.background.classList.remove("no-transition")},1)},s.prototype.updateParallax=function(){if(this.config.parallaxBackgroundImage){var t=this.dom.wrapper.querySelectorAll(s.HORIZONTAL_SLIDES_SELECTOR),e=this.dom.wrapper.querySelectorAll(s.VERTICAL_SLIDES_SELECTOR),i=this.dom.background.style.backgroundSize.split(" "),o=void 0,r=void 0;1===i.length?o=r=parseInt(i[0],10):(o=parseInt(i[0],10),r=parseInt(i[1],10));var n,a=this.dom.background.offsetWidth,d=t.length;n=("number"==typeof this.config.parallaxBackgroundHorizontal?this.config.parallaxBackgroundHorizontal:d>1?(o-a)/(d-1):0)*this.indexh*-1;var l,c=this.dom.background.offsetHeight,h=e.length,u=void 0;u="number"==typeof this.config.parallaxBackgroundVertical?this.config.parallaxBackgroundVertical:(r-c)/(h-1),l=h>0?u*this.indexv:0,this.dom.background.style.backgroundPosition=n+"px "+-l+"px"}},s.prototype.shouldPreload=function(t){var e=this.config.preloadIframes;return"boolean"!=typeof e&&(e=t.hasAttribute("data-preload")),e},s.prototype.formatEmbeddedContent=function(){var t=this,e=function(e,i,s){t.dom.slides.querySelectorAll("iframe["+e+'*="'+i+'"]').forEach(function(t){var i=t.getAttribute(e);i&&-1===i.indexOf(s)&&t.setAttribute(e,i+(/\?/.test(i)?"&":"?")+s)})};e("src","youtube.com/embed/","enablejsapi=1"),e("data-src","youtube.com/embed/","enablejsapi=1"),e("src","player.vimeo.com/","api=1"),e("data-src","player.vimeo.com/","api=1")},s.prototype.startEmbeddedContent=function(t){var e=this;t&&!this.isSpeakerNotes()&&(t.querySelectorAll('img[src$=".gif"]').forEach(function(t){t.setAttribute("src",t.getAttribute("src"))}),t.querySelectorAll("video, audio").forEach(function(t){if(!e.closestParent(t,".fragment")||e.closestParent(t,".fragment.visible")){var i=e.config.autoPlayMedia;if("boolean"!=typeof i&&(i=t.hasAttribute("data-autoplay")||!!e.closestParent(t,".slide-background")),i&&"function"==typeof t.play)if(t.readyState>1)e.startEmbeddedMedia({target:t});else if(e.isMobileDevice){var s=t.play();s&&"function"==typeof s.catch&&!1===t.controls&&s.catch(function(){t.controls=!0,t.addEventListener("play",function(){t.controls=!1})})}else t.removeEventListener("loadeddata",e.startEmbeddedMedia),t.addEventListener("loadeddata",e.startEmbeddedMedia)}}),t.querySelectorAll("iframe[src]").forEach(function(t){e.closestParent(t,".fragment")&&!e.closestParent(t,".fragment.visible")||e.startEmbeddedIframe({target:t})}),t.querySelectorAll("iframe[data-src]").forEach(function(t){e.closestParent(t,".fragment")&&!e.closestParent(t,".fragment.visible")||t.getAttribute("src")!==t.getAttribute("data-src")&&(t.removeEventListener("load",e.startEmbeddedIframe),t.addEventListener("load",e.startEmbeddedIframe),t.setAttribute("src",t.getAttribute("data-src")))}))},s.prototype.stopEmbeddedContent=function(t,e){var i=this;e=this.extend({unloadIframes:!0},e||{}),t&&t.parentNode&&(t.querySelectorAll("video, audio").forEach(function(t){t.hasAttribute("data-ignore")||"function"!=typeof t.pause||(t.setAttribute("data-paused-by-reveal",""),t.pause())}),t.querySelectorAll("iframe").forEach(function(t){t.contentWindow&&t.contentWindow.postMessage("slide:stop","*"),t.removeEventListener("load",i.startEmbeddedIframe)}),t.querySelectorAll('iframe[src*="youtube.com/embed/"]').forEach(function(t){!t.hasAttribute("data-ignore")&&t.contentWindow&&"function"==typeof t.contentWindow.postMessage&&t.contentWindow.postMessage('{"event":"command","func":"pauseVideo","args":""}',"*")}),t.querySelectorAll('iframe[src*="player.vimeo.com/"]').forEach(function(t){!t.hasAttribute("data-ignore")&&t.contentWindow&&"function"==typeof t.contentWindow.postMessage&&t.contentWindow.postMessage('{"method":"pause"}',"*")}),!0===e.unloadIframes&&t.querySelectorAll("iframe[data-src]").forEach(function(t){t.setAttribute("src","about:blank"),t.removeAttribute("src")}))},s.prototype.readURL=function(){var t=window.location.hash,e=t.slice(2).split("/"),i=t.replace(/#|\//gi,"");if(!/^[0-9]*$/.test(e[0])&&i.length){var s=void 0;try{s=document.getElementById(decodeURIComponent(i))}catch(c){console.error(c)}var o=!!this.currentSlide&&this.currentSlide.getAttribute("id")===i;if(s){if(!o){var r=this.getIndices(s);this.slide(r.h,r.v)}}else this.slide(this.indexh||0,this.indexv||0)}else{var n=this.config.hashOneBasedIndex?1:0,a=parseInt(e[0],10)-n||0,d=parseInt(e[1],10)-n||0,l=void 0;this.config.fragmentInURL&&(l=parseInt(e[2],10),isNaN(l)&&(l=void 0)),a===this.indexh&&d===this.indexv&&void 0===l||this.slide(a,d,l)}},s.prototype.writeURL=function(t){var e=this;clearTimeout(this.writeURLTimeout),t?this.writeURLTimeout=setTimeout(function(){return e.writeURL()},t):this.currentSlide&&(this.config.history||!window.history?window.location.hash=this.locationHash():this.config.hash?window.history.replaceState(null,null,"#"+this.locationHash()):window.history.replaceState(null,null,window.location.pathname+window.location.search))},s.prototype.sortFragments=function(t,e){var i=this.toArray(t),s=[],o=[],r=[];i.forEach(function(t,e){if(t.hasAttribute("data-fragment-index")){var i=parseInt(t.getAttribute("data-fragment-index"),10);s[i]||(s[i]=[]),s[i].push(t)}else o.push([t])}),s=s.concat(o);var n=0;return s.forEach(function(t){t.forEach(function(t){r.push(t),t.setAttribute("data-fragment-index",""+n)}),n++}),!0===e?s:r},s.prototype.updateFragments=function(t,e){var i=this,s={shown:[],hidden:[]};if(this.currentSlide&&this.config.fragments&&(e=e||this.sortFragments(this.currentSlide.querySelectorAll(".fragment"))).length){if("number"!=typeof t){var o=this.sortFragments(this.currentSlide.querySelectorAll(".fragment.visible")).pop();o&&(t=parseInt(o.getAttribute("data-fragment-index")||"0",10))}e.forEach(function(e,o){e.hasAttribute("data-fragment-index")&&(o=parseInt(e.getAttribute("data-fragment-index"),10)),o<=t?(e.classList.contains("visible")||s.shown.push(e),e.classList.add("visible"),e.classList.remove("current-fragment"),i.dom.statusDiv.textContent=i.getStatusText(e),o===t&&(e.classList.add("current-fragment"),i.startEmbeddedContent(e))):(e.classList.contains("visible")&&s.hidden.push(e),e.classList.remove("visible"),e.classList.remove("current-fragment"))})}return s},s.prototype.cueAutoSlide=function(){var t=this;if(this.cancelAutoSlide(),this.currentSlide&&!1!==this.config.autoSlide){var e=this.currentSlide.querySelector(".current-fragment");e||(e=this.currentSlide.querySelector(".fragment"));var i=e?e.getAttribute("data-autoslide"):null,s=this.currentSlide.parentNode?this.currentSlide.parentNode.getAttribute("data-autoslide"):null,o=this.currentSlide.getAttribute("data-autoslide");this.autoSlide=i?parseInt(i,10):o?parseInt(o,10):s?parseInt(s,10):this.config.autoSlide,0===this.currentSlide.querySelectorAll(".fragment").length&&this.currentSlide.querySelectorAll("video, audio").forEach(function(e){e.hasAttribute("data-autoplay")&&t.autoSlide&&1e3*e.duration/e.playbackRate>t.autoSlide&&(t.autoSlide=1e3*e.duration/e.playbackRate+1e3)}),!this.autoSlide||this.autoSlidePaused||this.isPaused()||this.isOverview()||this.isLastSlide()&&!this.availableFragments().next&&!0!==this.config.loop||(this.autoSlideTimeout=setTimeout(function(){"function"==typeof t.config.autoSlideMethod?t.config.autoSlideMethod():t.navigateNext(),t.cueAutoSlide()},this.autoSlide),this.autoSlideStartTime=Date.now()),this.autoSlidePlayer&&this.autoSlidePlayer.setPlaying(-1!==this.autoSlideTimeout)}},s.prototype.cancelAutoSlide=function(){clearTimeout(this.autoSlideTimeout),this.autoSlideTimeout=-1},s.prototype.pauseAutoSlide=function(){this.autoSlide&&!this.autoSlidePaused&&(this.autoSlidePaused=!0,this.dispatchEvent("autoslidepaused"),clearTimeout(this.autoSlideTimeout),this.autoSlidePlayer&&this.autoSlidePlayer.setPlaying(!1))},s.prototype.resumeAutoSlide=function(){this.autoSlide&&this.autoSlidePaused&&(this.autoSlidePaused=!1,this.dispatchEvent("autoslideresumed"),this.cueAutoSlide())},s.prototype.isSwipePrevented=function(t){for(;t&&"function"==typeof t.hasAttribute;){if(t.hasAttribute("data-prevent-swipe"))return!0;t=t.parentNode}return!1},s.prototype.getQueryHash=function(){var t,i,s={};location.search.replace(/[A-Z0-9]+?=([\w\.%-]*)/gi,function(t){return s[t.split("=").shift()]=t.split("=").pop()});try{for(var o=e(Object.keys(s)),r=o.next();!r.done;r=o.next()){var n=r.value,a=s[n];s[n]=this.deserialize(unescape(a))}}catch(d){t={error:d}}finally{try{r&&!r.done&&(i=o.return)&&i.call(o)}finally{if(t)throw t.error}}return s},s.prototype.isLastSlide=function(){return!!this.currentSlide&&(!this.currentSlide.nextElementSibling&&(!this.isVerticalSlide(this.currentSlide)||!this.currentSlide.parentNode.nextElementSibling))},s.prototype.isLastVerticalSlide=function(){return!(!this.currentSlide||!this.isVerticalSlide(this.currentSlide))&&!this.currentSlide.nextElementSibling},s.VERSION="3.8.0",s.SLIDES_SELECTOR=".slides section",s.HORIZONTAL_SLIDES_SELECTOR=".slides>section",s.VERTICAL_SLIDES_SELECTOR=".slides>section.present>section",s.HOME_SLIDE_SELECTOR=".slides>section:first-of-type",s.UA=navigator.userAgent,s}(),o=new s;window.Reveal=o,exports.default=o; },{}],"cLXB":[function(require,module,exports) { "use strict";var e=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("../../libs/revealjs/revealjs"));exports.initPixiWatcher=function(){for(var e=[],r=0;r0?1:-1}),Number.isInteger||(Number.isInteger=function(n){return"number"==typeof n&&isFinite(n)&&Math.floor(n)===n}),window.ArrayBuffer||(window.ArrayBuffer=Array),window.Float32Array||(window.Float32Array=Array),window.Uint32Array||(window.Uint32Array=Array),window.Uint16Array||(window.Uint16Array=Array),window.Uint8Array||(window.Uint8Array=Array),window.Int32Array||(window.Int32Array=Array); },{"es6-promise-polyfill":"aj4z","object-assign":"J4Nk"}],"nSZq":[function(require,module,exports) { var define; var e;!function(i){var o=/iPhone/i,d=/iPod/i,n=/iPad/i,t=/\bAndroid(?:.+)Mobile\b/i,r=/Android/i,a=/\bAndroid(?:.+)SD4930UR\b/i,p=/\bAndroid(?:.+)(?:KF[A-Z]{2,4})\b/i,b=/Windows Phone/i,l=/\bWindows(?:.+)ARM\b/i,s=/BlackBerry/i,u=/BB10/i,f=/Opera Mini/i,c=/\b(CriOS|Chrome)(?:.+)Mobile/i,v=/Mobile(?:.+)Firefox\b/i;function h(e,i){return e.test(i)}function w(e){var i=e||("undefined"!=typeof navigator?navigator.userAgent:""),w=i.split("[FBAN");void 0!==w[1]&&(i=w[0]),void 0!==(w=i.split("Twitter"))[1]&&(i=w[0]);var m={apple:{phone:h(o,i)&&!h(b,i),ipod:h(d,i),tablet:!h(o,i)&&h(n,i)&&!h(b,i),device:(h(o,i)||h(d,i)||h(n,i))&&!h(b,i)},amazon:{phone:h(a,i),tablet:!h(a,i)&&h(p,i),device:h(a,i)||h(p,i)},android:{phone:!h(b,i)&&h(a,i)||!h(b,i)&&h(t,i),tablet:!h(b,i)&&!h(a,i)&&!h(t,i)&&(h(p,i)||h(r,i)),device:!h(b,i)&&(h(a,i)||h(p,i)||h(t,i)||h(r,i))||h(/\bokhttp\b/i,i)},windows:{phone:h(b,i),tablet:h(l,i),device:h(b,i)||h(l,i)},other:{blackberry:h(s,i),blackberry10:h(u,i),opera:h(f,i),firefox:h(v,i),chrome:h(c,i),device:h(s,i)||h(u,i)||h(f,i)||h(v,i)||h(c,i)}};return m.any=m.apple.device||m.android.device||m.windows.device||m.other.device,m.phone=m.apple.phone||m.android.phone||m.windows.phone,m.tablet=m.apple.tablet||m.android.tablet||m.windows.tablet,m}"undefined"!=typeof module&&module.exports&&"undefined"==typeof window?module.exports=w:"undefined"!=typeof module&&module.exports&&"undefined"!=typeof window?(module.exports=w(),module.exports.isMobile=w):"function"==typeof e&&e.amd?e([],i.isMobile=w()):i.isMobile=w()}(this); },{}],"t4Uo":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"isMobile",{enumerable:!0,get:function(){return e.default}}),exports.settings=void 0;var e=t(require("ismobilejs"));function t(e){return e&&e.__esModule?e:{default:e}}function r(t){var r=!0;if(e.default.tablet||e.default.phone){if(r=!1,e.default.apple.device){var a=navigator.userAgent.match(/OS (\d+)_(\d+)?/);if(a)parseInt(a[1],10)>=11&&(r=!0)}if(e.default.android.device){var i=navigator.userAgent.match(/Android\s([0-9.]*)/);if(i)parseInt(i[1],10)>=7&&(r=!0)}}return r?t:4}function a(){return!e.default.apple.device}var i={MIPMAP_TEXTURES:1,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,SPRITE_MAX_TEXTURES:r(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,antialias:!1,forceFXAA:!1,autoDensity:!1,transparent:!1,backgroundColor:0,clearBeforeRender:!0,preserveDrawingBuffer:!1,width:800,height:600,legacy:!1},GC_MODE:0,GC_MAX_IDLE:3600,GC_MAX_CHECK_COUNT:600,WRAP_MODE:33071,SCALE_MODE:1,PRECISION_VERTEX:"highp",PRECISION_FRAGMENT:e.default.apple.device?"highp":"mediump",CAN_UPLOAD_SAME_BUFFER:a(),CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};exports.settings=i; },{"ismobilejs":"nSZq"}],"JJlS":[function(require,module,exports) { "use strict";var e=Object.prototype.hasOwnProperty,t="~";function n(){}function r(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function o(e,n,o,s,i){if("function"!=typeof o)throw new TypeError("The listener must be a function");var c=new r(o,s||e,i),f=t?t+n:n;return e._events[f]?e._events[f].fn?e._events[f]=[e._events[f],c]:e._events[f].push(c):(e._events[f]=c,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new n:delete e._events[t]}function i(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(t=!1)),i.prototype.eventNames=function(){var n,r,o=[];if(0===this._eventsCount)return o;for(r in n=this._events)e.call(n,r)&&o.push(t?r.slice(1):r);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(n)):o},i.prototype.listeners=function(e){var n=t?t+e:e,r=this._events[n];if(!r)return[];if(r.fn)return[r.fn];for(var o=0,s=r.length,i=new Array(s);o80*x){i=v=e[0],u=y=e[1];for(var Z=x;Zv&&(v=o),p>y&&(y=p);a=0!==(a=Math.max(v-i,y-u))?1/a:0}return r(s,c,x,i,u,a),c}function n(e,n,t,r,x){var i,u;if(x===D(e,n,t,r)>0)for(i=n;i=n;i-=r)u=A(i,e[i],e[i+1],u);return u&&w(u,u.next)&&(B(u),u=u.next),u}function t(e,n){if(!e)return e;n||(n=e);var t,r=e;do{if(t=!1,r.steiner||!w(r,r.next)&&0!==g(r.prev,r,r.next))r=r.next;else{if(B(r),(r=n=r.prev)===r.next)break;t=!0}}while(t||r!==n);return n}function r(e,n,f,y,o,p,a){if(e){!a&&p&&l(e,y,o,p);for(var h,s,c=e;e.prev!==e.next;)if(h=e.prev,s=e.next,p?i(e,y,o,p):x(e))n.push(h.i/f),n.push(e.i/f),n.push(s.i/f),B(e),e=s.next,c=s.next;else if((e=s)===c){a?1===a?r(e=u(t(e),n,f),n,f,y,o,p,2):2===a&&v(e,n,f,y,o,p):r(t(e),n,f,y,o,p,1);break}}}function x(e){var n=e.prev,t=e,r=e.next;if(g(n,t,r)>=0)return!1;for(var x=e.next.next;x!==e.prev;){if(Z(n.x,n.y,t.x,t.y,r.x,r.y,x.x,x.y)&&g(x.prev,x,x.next)>=0)return!1;x=x.next}return!0}function i(e,n,t,r){var x=e.prev,i=e,u=e.next;if(g(x,i,u)>=0)return!1;for(var v=x.xi.x?x.x>u.x?x.x:u.x:i.x>u.x?i.x:u.x,o=x.y>i.y?x.y>u.y?x.y:u.y:i.y>u.y?i.y:u.y,p=s(v,f,n,t,r),a=s(y,o,n,t,r),l=e.prevZ,h=e.nextZ;l&&l.z>=p&&h&&h.z<=a;){if(l!==e.prev&&l!==e.next&&Z(x.x,x.y,i.x,i.y,u.x,u.y,l.x,l.y)&&g(l.prev,l,l.next)>=0)return!1;if(l=l.prevZ,h!==e.prev&&h!==e.next&&Z(x.x,x.y,i.x,i.y,u.x,u.y,h.x,h.y)&&g(h.prev,h,h.next)>=0)return!1;h=h.nextZ}for(;l&&l.z>=p;){if(l!==e.prev&&l!==e.next&&Z(x.x,x.y,i.x,i.y,u.x,u.y,l.x,l.y)&&g(l.prev,l,l.next)>=0)return!1;l=l.prevZ}for(;h&&h.z<=a;){if(h!==e.prev&&h!==e.next&&Z(x.x,x.y,i.x,i.y,u.x,u.y,h.x,h.y)&&g(h.prev,h,h.next)>=0)return!1;h=h.nextZ}return!0}function u(e,n,r){var x=e;do{var i=x.prev,u=x.next.next;!w(i,u)&&M(i,x,x.next,u)&&k(i,u)&&k(u,i)&&(n.push(i.i/r),n.push(x.i/r),n.push(u.i/r),B(x),B(x.next),x=e=u),x=x.next}while(x!==e);return t(x)}function v(e,n,x,i,u,v){var f=e;do{for(var y=f.next.next;y!==f.prev;){if(f.i!==y.i&&d(f,y)){var o=q(f,y);return f=t(f,f.next),o=t(o,o.next),r(f,n,x,i,u,v),void r(o,n,x,i,u,v)}y=y.next}f=f.next}while(f!==e)}function f(e,r,x,i){var u,v,f,p=[];for(u=0,v=r.length;u=r.next.y&&r.next.y!==r.y){var v=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(v<=x&&v>u){if(u=v,v===x){if(i===r.y)return r;if(i===r.next.y)return r.next}t=r.x=r.x&&r.x>=o&&x!==r.x&&Z(it.x||r.x===t.x&&a(t,r)))&&(t=r,l=f)),r=r.next}while(r!==y);return t}function a(e,n){return g(e.prev,e,n.prev)<0&&g(n.next,e,e.next)<0}function l(e,n,t,r){var x=e;do{null===x.z&&(x.z=s(x.x,x.y,n,t,r)),x.prevZ=x.prev,x.nextZ=x.next,x=x.next}while(x!==e);x.prevZ.nextZ=null,x.prevZ=null,h(x)}function h(e){var n,t,r,x,i,u,v,f,y=1;do{for(t=e,e=null,i=null,u=0;t;){for(u++,r=t,v=0,n=0;n0||f>0&&r;)0!==v&&(0===f||!r||t.z<=r.z)?(x=t,t=t.nextZ,v--):(x=r,r=r.nextZ,f--),i?i.nextZ=x:e=x,x.prevZ=i,i=x;t=r}i.nextZ=null,y*=2}while(u>1);return e}function s(e,n,t,r,x){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-t)*x)|e<<8))|e<<4))|e<<2))|e<<1))|(n=1431655765&((n=858993459&((n=252645135&((n=16711935&((n=32767*(n-r)*x)|n<<8))|n<<4))|n<<2))|n<<1))<<1}function c(e){var n=e,t=e;do{(n.x=0&&(e-u)*(r-v)-(t-u)*(n-v)>=0&&(t-u)*(i-v)-(x-u)*(r-v)>=0}function d(e,n){return e.next.i!==n.i&&e.prev.i!==n.i&&!b(e,n)&&(k(e,n)&&k(n,e)&&j(e,n)&&(g(e.prev,e,n.prev)||g(e,n.prev,n))||w(e,n)&&g(e.prev,e,e.next)>0&&g(n.prev,n,n.next)>0)}function g(e,n,t){return(n.y-e.y)*(t.x-n.x)-(n.x-e.x)*(t.y-n.y)}function w(e,n){return e.x===n.x&&e.y===n.y}function M(e,n,t,r){var x=m(g(e,n,t)),i=m(g(e,n,r)),u=m(g(t,r,e)),v=m(g(t,r,n));return x!==i&&u!==v||(!(0!==x||!z(e,t,n))||(!(0!==i||!z(e,r,n))||(!(0!==u||!z(t,e,r))||!(0!==v||!z(t,n,r)))))}function z(e,n,t){return n.x<=Math.max(e.x,t.x)&&n.x>=Math.min(e.x,t.x)&&n.y<=Math.max(e.y,t.y)&&n.y>=Math.min(e.y,t.y)}function m(e){return e>0?1:e<0?-1:0}function b(e,n){var t=e;do{if(t.i!==e.i&&t.next.i!==e.i&&t.i!==n.i&&t.next.i!==n.i&&M(t,t.next,e,n))return!0;t=t.next}while(t!==e);return!1}function k(e,n){return g(e.prev,e,e.next)<0?g(e,n,e.next)>=0&&g(e,e.prev,n)>=0:g(e,n,e.prev)<0||g(e,e.next,n)<0}function j(e,n){var t=e,r=!1,x=(e.x+n.x)/2,i=(e.y+n.y)/2;do{t.y>i!=t.next.y>i&&t.next.y!==t.y&&x<(t.next.x-t.x)*(i-t.y)/(t.next.y-t.y)+t.x&&(r=!r),t=t.next}while(t!==e);return r}function q(e,n){var t=new C(e.i,e.x,e.y),r=new C(n.i,n.x,n.y),x=e.next,i=n.prev;return e.next=n,n.prev=e,t.next=x,x.prev=t,r.next=t,t.prev=r,i.next=r,r.prev=i,r}function A(e,n,t,r){var x=new C(e,n,t);return r?(x.next=r.next,x.prev=r,r.next.prev=x,r.next=x):(x.prev=x,x.next=x),x}function B(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function C(e,n,t){this.i=e,this.x=n,this.y=t,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function D(e,n,t,r){for(var x=0,i=n,u=t-r;i0&&(r+=e[x-1].length,t.holes.push(r))}return t}; },{}],"FIMm":[function(require,module,exports) { var global = arguments[3]; var define; var o,e=arguments[3];!function(n){var r="object"==typeof exports&&exports&&!exports.nodeType&&exports,t="object"==typeof module&&module&&!module.nodeType&&module,u="object"==typeof e&&e;u.global!==u&&u.window!==u&&u.self!==u||(n=u);var i,f,c=2147483647,l=36,s=1,p=26,a=38,d=700,h=72,v=128,g="-",w=/^xn--/,x=/[^\x20-\x7E]/,y=/[\x2E\u3002\uFF0E\uFF61]/g,m={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},C=l-s,b=Math.floor,j=String.fromCharCode;function A(o){throw RangeError(m[o])}function I(o,e){for(var n=o.length,r=[];n--;)r[n]=e(o[n]);return r}function E(o,e){var n=o.split("@"),r="";return n.length>1&&(r=n[0]+"@",o=n[1]),r+I((o=o.replace(y,".")).split("."),e).join(".")}function F(o){for(var e,n,r=[],t=0,u=o.length;t=55296&&e<=56319&&t65535&&(e+=j((o-=65536)>>>10&1023|55296),o=56320|1023&o),e+=j(o)}).join("")}function S(o,e){return o+22+75*(o<26)-((0!=e)<<5)}function T(o,e,n){var r=0;for(o=n?b(o/d):o>>1,o+=b(o/e);o>C*p>>1;r+=l)o=b(o/C);return b(r+(C+1)*o/(o+a))}function L(o){var e,n,r,t,u,i,f,a,d,w,x,y=[],m=o.length,C=0,j=v,I=h;for((n=o.lastIndexOf(g))<0&&(n=0),r=0;r=128&&A("not-basic"),y.push(o.charCodeAt(r));for(t=n>0?n+1:0;t=m&&A("invalid-input"),((a=(x=o.charCodeAt(t++))-48<10?x-22:x-65<26?x-65:x-97<26?x-97:l)>=l||a>b((c-C)/i))&&A("overflow"),C+=a*i,!(a<(d=f<=I?s:f>=I+p?p:f-I));f+=l)i>b(c/(w=l-d))&&A("overflow"),i*=w;I=T(C-u,e=y.length+1,0==u),b(C/e)>c-j&&A("overflow"),j+=b(C/e),C%=e,y.splice(C++,0,j)}return O(y)}function M(o){var e,n,r,t,u,i,f,a,d,w,x,y,m,C,I,E=[];for(y=(o=F(o)).length,e=v,n=0,u=h,i=0;i=e&&xb((c-n)/(m=r+1))&&A("overflow"),n+=(f-e)*m,e=f,i=0;ic&&A("overflow"),x==e){for(a=n,d=l;!(a<(w=d<=u?s:d>=u+p?p:d-u));d+=l)I=a-w,C=l-w,E.push(j(S(w+I%C,0))),a=b(I/C);E.push(j(S(a,0))),u=T(n,m,r==t),n=0,++r}++n,++e}return E.join("")}if(i={version:"1.3.2",ucs2:{decode:F,encode:O},decode:L,encode:M,toASCII:function(o){return E(o,function(o){return x.test(o)?"xn--"+M(o):o})},toUnicode:function(o){return E(o,function(o){return w.test(o)?L(o.slice(4).toLowerCase()):o})}},"function"==typeof o&&"object"==typeof o.amd&&o.amd)o("punycode",function(){return i});else if(r&&t)if(module.exports==r)t.exports=i;else for(f in i)i.hasOwnProperty(f)&&(r[f]=i[f]);else n.punycode=i}(this); },{}],"YsIc":[function(require,module,exports) { "use strict";module.exports={isString:function(n){return"string"==typeof n},isObject:function(n){return"object"==typeof n&&null!==n},isNull:function(n){return null===n},isNullOrUndefined:function(n){return null==n}}; },{}],"J6GP":[function(require,module,exports) { "use strict";function r(r,e){return Object.prototype.hasOwnProperty.call(r,e)}module.exports=function(t,n,o,a){n=n||"&",o=o||"=";var s={};if("string"!=typeof t||0===t.length)return s;var p=/\+/g;t=t.split(n);var u=1e3;a&&"number"==typeof a.maxKeys&&(u=a.maxKeys);var c=t.length;u>0&&c>u&&(c=u);for(var i=0;i=0?(y=b.substr(0,d),l=b.substr(d+1)):(y=b,l=""),f=decodeURIComponent(y),v=decodeURIComponent(l),r(s,f)?e(s[f])?s[f].push(v):s[f]=[s[f],v]:s[f]=v}return s};var e=Array.isArray||function(r){return"[object Array]"===Object.prototype.toString.call(r)}; },{}],"bvhO":[function(require,module,exports) { "use strict";var n=function(n){switch(typeof n){case"string":return n;case"boolean":return n?"true":"false";case"number":return isFinite(n)?n:"";default:return""}};module.exports=function(o,u,c,a){return u=u||"&",c=c||"=",null===o&&(o=void 0),"object"==typeof o?r(t(o),function(t){var a=encodeURIComponent(n(t))+c;return e(o[t])?r(o[t],function(e){return a+encodeURIComponent(n(e))}).join(u):a+encodeURIComponent(n(o[t]))}).join(u):a?encodeURIComponent(n(a))+c+encodeURIComponent(n(o)):""};var e=Array.isArray||function(n){return"[object Array]"===Object.prototype.toString.call(n)};function r(n,e){if(n.map)return n.map(e);for(var r=[],t=0;t",'"',"`"," ","\r","\n","\t"],n=["{","}","|","\\","^","`"].concat(o),i=["'"].concat(n),l=["%","/","?",";","#"].concat(i),p=["/","?","#"],c=255,u=/^[+a-z0-9A-Z_-]{0,63}$/,f=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,m={javascript:!0,"javascript:":!0},v={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},y=require("querystring");function b(t,e,a){if(t&&s.isObject(t)&&t instanceof h)return t;var r=new h;return r.parse(t,e,a),r}function q(t){return s.isString(t)&&(t=b(t)),t instanceof h?t.format():h.prototype.format.call(t)}function O(t,s){return b(t,!1,!0).resolve(s)}function d(t,s){return t?b(t,!1,!0).resolveObject(s):s}h.prototype.parse=function(h,a,o){if(!s.isString(h))throw new TypeError("Parameter 'url' must be a string, not "+typeof h);var n=h.indexOf("?"),b=-1!==n&&n127?z+="x":z+=$[H];if(!z.match(u)){var Z=R.slice(0,U),_=R.slice(U+1),E=$.match(f);E&&(Z.push(E[1]),_.unshift(E[2])),_.length&&(O="/"+_.join(".")+O),this.hostname=Z.join(".");break}}}this.hostname.length>c?this.hostname="":this.hostname=this.hostname.toLowerCase(),N||(this.hostname=t.toASCII(this.hostname));var P=this.port?":"+this.port:"",T=this.hostname||"";this.host=T+P,this.href+=this.host,N&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==O[0]&&(O="/"+O))}if(!m[x])for(U=0,S=i.length;U0)&&a.host.split("@"))&&(a.auth=k.shift(),a.host=a.hostname=k.shift());return a.search=t.search,a.query=t.query,s.isNull(a.pathname)&&s.isNull(a.search)||(a.path=(a.pathname?a.pathname:"")+(a.search?a.search:"")),a.href=a.format(),a}if(!x.length)return a.pathname=null,a.search?a.path="/"+a.search:a.path=null,a.href=a.format(),a;for(var C=x.slice(-1)[0],I=(a.host||t.host||x.length>1)&&("."===C||".."===C)||""===C,w=0,U=x.length;U>=0;U--)"."===(C=x[U])?x.splice(U,1):".."===C?(x.splice(U,1),w++):w&&(x.splice(U,1),w--);if(!d&&!j)for(;w--;w)x.unshift("..");!d||""===x[0]||x[0]&&"/"===x[0].charAt(0)||x.unshift(""),I&&"/"!==x.join("/").substr(-1)&&x.push("");var k,N=""===x[0]||x[0]&&"/"===x[0].charAt(0);A&&(a.hostname=a.host=N?"":x.length?x.shift():"",(k=!!(a.host&&a.host.indexOf("@")>0)&&a.host.split("@"))&&(a.auth=k.shift(),a.host=a.hostname=k.shift()));return(d=d||a.host&&x.length)&&!N&&x.unshift(""),x.length?a.pathname=x.join("/"):(a.pathname=null,a.path=null),s.isNull(a.pathname)&&s.isNull(a.search)||(a.path=(a.pathname?a.pathname:"")+(a.search?a.search:"")),a.auth=t.auth||a.auth,a.slashes=a.slashes||t.slashes,a.href=a.format(),a},h.prototype.parseHost=function(){var t=this.host,s=a.exec(t);s&&(":"!==(s=s[0])&&(this.port=s.substr(1)),t=t.substr(0,t.length-s.length)),t&&(this.hostname=t)}; },{"punycode":"FIMm","./util":"YsIc","querystring":"fk5h"}],"LQBK":[function(require,module,exports) { "use strict";var E,_,T,A,R,N,S,O,P,I,L,M,D,U;Object.defineProperty(exports,"__esModule",{value:!0}),exports.WRAP_MODES=exports.TYPES=exports.TARGETS=exports.SCALE_MODES=exports.RENDERER_TYPE=exports.PRECISION=exports.MIPMAP_MODES=exports.MASK_TYPES=exports.GC_MODES=exports.FORMATS=exports.ENV=exports.DRAW_MODES=exports.BLEND_MODES=exports.ALPHA_MODES=void 0,exports.ENV=E,function(E){E[E.WEBGL_LEGACY=0]="WEBGL_LEGACY",E[E.WEBGL=1]="WEBGL",E[E.WEBGL2=2]="WEBGL2"}(E||(exports.ENV=E={})),exports.RENDERER_TYPE=_,function(E){E[E.UNKNOWN=0]="UNKNOWN",E[E.WEBGL=1]="WEBGL",E[E.CANVAS=2]="CANVAS"}(_||(exports.RENDERER_TYPE=_={})),exports.BLEND_MODES=T,function(E){E[E.NORMAL=0]="NORMAL",E[E.ADD=1]="ADD",E[E.MULTIPLY=2]="MULTIPLY",E[E.SCREEN=3]="SCREEN",E[E.OVERLAY=4]="OVERLAY",E[E.DARKEN=5]="DARKEN",E[E.LIGHTEN=6]="LIGHTEN",E[E.COLOR_DODGE=7]="COLOR_DODGE",E[E.COLOR_BURN=8]="COLOR_BURN",E[E.HARD_LIGHT=9]="HARD_LIGHT",E[E.SOFT_LIGHT=10]="SOFT_LIGHT",E[E.DIFFERENCE=11]="DIFFERENCE",E[E.EXCLUSION=12]="EXCLUSION",E[E.HUE=13]="HUE",E[E.SATURATION=14]="SATURATION",E[E.COLOR=15]="COLOR",E[E.LUMINOSITY=16]="LUMINOSITY",E[E.NORMAL_NPM=17]="NORMAL_NPM",E[E.ADD_NPM=18]="ADD_NPM",E[E.SCREEN_NPM=19]="SCREEN_NPM",E[E.NONE=20]="NONE",E[E.SRC_OVER=0]="SRC_OVER",E[E.SRC_IN=21]="SRC_IN",E[E.SRC_OUT=22]="SRC_OUT",E[E.SRC_ATOP=23]="SRC_ATOP",E[E.DST_OVER=24]="DST_OVER",E[E.DST_IN=25]="DST_IN",E[E.DST_OUT=26]="DST_OUT",E[E.DST_ATOP=27]="DST_ATOP",E[E.ERASE=26]="ERASE",E[E.SUBTRACT=28]="SUBTRACT",E[E.XOR=29]="XOR"}(T||(exports.BLEND_MODES=T={})),exports.DRAW_MODES=A,function(E){E[E.POINTS=0]="POINTS",E[E.LINES=1]="LINES",E[E.LINE_LOOP=2]="LINE_LOOP",E[E.LINE_STRIP=3]="LINE_STRIP",E[E.TRIANGLES=4]="TRIANGLES",E[E.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",E[E.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(A||(exports.DRAW_MODES=A={})),exports.FORMATS=R,function(E){E[E.RGBA=6408]="RGBA",E[E.RGB=6407]="RGB",E[E.ALPHA=6406]="ALPHA",E[E.LUMINANCE=6409]="LUMINANCE",E[E.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",E[E.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",E[E.DEPTH_STENCIL=34041]="DEPTH_STENCIL"}(R||(exports.FORMATS=R={})),exports.TARGETS=N,function(E){E[E.TEXTURE_2D=3553]="TEXTURE_2D",E[E.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",E[E.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",E[E.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",E[E.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",E[E.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",E[E.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",E[E.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",E[E.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"}(N||(exports.TARGETS=N={})),exports.TYPES=S,function(E){E[E.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",E[E.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",E[E.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",E[E.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",E[E.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",E[E.FLOAT=5126]="FLOAT",E[E.HALF_FLOAT=36193]="HALF_FLOAT"}(S||(exports.TYPES=S={})),exports.SCALE_MODES=O,function(E){E[E.NEAREST=0]="NEAREST",E[E.LINEAR=1]="LINEAR"}(O||(exports.SCALE_MODES=O={})),exports.WRAP_MODES=P,function(E){E[E.CLAMP=33071]="CLAMP",E[E.REPEAT=10497]="REPEAT",E[E.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(P||(exports.WRAP_MODES=P={})),exports.MIPMAP_MODES=I,function(E){E[E.OFF=0]="OFF",E[E.POW2=1]="POW2",E[E.ON=2]="ON"}(I||(exports.MIPMAP_MODES=I={})),exports.ALPHA_MODES=L,function(E){E[E.NPM=0]="NPM",E[E.UNPACK=1]="UNPACK",E[E.PMA=2]="PMA",E[E.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",E[E.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",E[E.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA"}(L||(exports.ALPHA_MODES=L={})),exports.GC_MODES=M,function(E){E[E.AUTO=0]="AUTO",E[E.MANUAL=1]="MANUAL"}(M||(exports.GC_MODES=M={})),exports.PRECISION=D,function(E){E.LOW="lowp",E.MEDIUM="mediump",E.HIGH="highp"}(D||(exports.PRECISION=D={})),exports.MASK_TYPES=U,function(E){E[E.NONE=0]="NONE",E[E.SCISSOR=1]="SCISSOR",E[E.STENCIL=2]="STENCIL",E[E.SPRITE=3]="SPRITE"}(U||(exports.MASK_TYPES=U={})); },{}],"G5Tu":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.clearTextureCache=T,exports.correctBlendMode=E,exports.createIndicesForQuads=D,exports.decomposeDataUri=J,exports.deprecation=G,exports.destroyTextureCache=S,exports.determineCrossOrigin=U,exports.getResolutionOfUrl=W,exports.hex2rgb=f,exports.hex2string=d,exports.isPow2=A,exports.isWebGLSupported=p,exports.log2=y,exports.nextPow2=N,exports.premultiplyRgba=w,exports.premultiplyTint=b,exports.premultiplyTintToRgba=m,exports.removeItems=_,exports.rgb2hex=x,exports.sayHello=l,exports.sign=M,exports.skipHello=u,exports.string2hex=g,exports.trimCanvas=B,exports.uid=O,Object.defineProperty(exports,"isMobile",{enumerable:!0,get:function(){return e.isMobile}}),Object.defineProperty(exports,"EventEmitter",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(exports,"earcut",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(exports,"url",{enumerable:!0,get:function(){return n.default}}),exports.premultiplyBlendMode=exports.TextureCache=exports.ProgramCache=exports.DATA_URI=exports.CanvasRenderTarget=exports.BaseTextureCache=void 0;var e=require("@pixi/settings"),t=i(require("eventemitter3")),r=i(require("earcut")),n=i(require("url")),o=require("@pixi/constants");function i(e){return e&&e.__esModule?e:{default:e}}e.settings.RETINA_PREFIX=/@([0-9\.]+)x/,e.settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!0;var a,s=!1,c="5.2.0";function u(){s=!0}function l(e){if(!s){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var t=["\n %c %c %c PixiJS "+c+" - ✰ "+e+" ✰ %c %c http://www.pixijs.com/ %c %c ♥%c♥%c♥ \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];window.console.log.apply(console,t)}else window.console&&window.console.log("PixiJS "+c+" - "+e+" - http://www.pixijs.com/");s=!0}}function p(){return void 0===a&&(a=function(){var t={stencil:!0,failIfMajorPerformanceCaveat:e.settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!window.WebGLRenderingContext)return!1;var r=document.createElement("canvas"),n=r.getContext("webgl",t)||r.getContext("experimental-webgl",t),o=!(!n||!n.getContextAttributes().stencil);if(n){var i=n.getExtension("WEBGL_lose_context");i&&i.loseContext()}return n=null,o}catch(a){return!1}}()),a}function f(e,t){return(t=t||[])[0]=(e>>16&255)/255,t[1]=(e>>8&255)/255,t[2]=(255&e)/255,t}function d(e){return e=e.toString(16),"#"+(e="000000".substr(0,6-e.length)+e)}function g(e){return"string"==typeof e&&"#"===e[0]&&(e=e.substr(1)),parseInt(e,16)}function x(e){return(255*e[0]<<16)+(255*e[1]<<8)+(255*e[2]|0)}function h(){for(var e=[],t=[],r=0;r<32;r++)e[r]=r,t[r]=r;e[o.BLEND_MODES.NORMAL_NPM]=o.BLEND_MODES.NORMAL,e[o.BLEND_MODES.ADD_NPM]=o.BLEND_MODES.ADD,e[o.BLEND_MODES.SCREEN_NPM]=o.BLEND_MODES.SCREEN,t[o.BLEND_MODES.NORMAL]=o.BLEND_MODES.NORMAL_NPM,t[o.BLEND_MODES.ADD]=o.BLEND_MODES.ADD_NPM,t[o.BLEND_MODES.SCREEN]=o.BLEND_MODES.SCREEN_NPM;var n=[];return n.push(t),n.push(e),n}var v=h();function E(e,t){return v[t?1:0][e]}function w(e,t,r,n){return r=r||new Float32Array(4),n||void 0===n?(r[0]=e[0]*t,r[1]=e[1]*t,r[2]=e[2]*t):(r[0]=e[0],r[1]=e[1],r[2]=e[2]),r[3]=t,r}function b(e,t){if(1===t)return(255*t<<24)+e;if(0===t)return 0;var r=e>>16&255,n=e>>8&255,o=255&e;return(255*t<<24)+((r=r*t+.5|0)<<16)+((n=n*t+.5|0)<<8)+(o=o*t+.5|0)}function m(e,t,r,n){return(r=r||new Float32Array(4))[0]=(e>>16&255)/255,r[1]=(e>>8&255)/255,r[2]=(255&e)/255,(n||void 0===n)&&(r[0]*=t,r[1]*=t,r[2]*=t),r[3]=t,r}function D(e,t){void 0===t&&(t=null);var r=6*e;if((t=t||new Uint16Array(r)).length!==r)throw new Error("Out buffer length is incorrect, got "+t.length+" and expected "+r);for(var n=0,o=0;n=o||0===r)){var i=o-(r=t+r>o?o-t:r);for(n=t;n>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)+1}function A(e){return!(e&e-1||!e)}function y(e){var t=(e>65535)<<4,r=((e>>>=t)>255)<<3;return t|=r,t|=r=((e>>>=r)>15)<<2,(t|=r=((e>>>=r)>3)<<1)|(e>>>=r)>>1}var R={};exports.ProgramCache=R;var L=Object.create(null);exports.TextureCache=L;var P=Object.create(null);function S(){var e;for(e in L)L[e].destroy();for(e in P)P[e].destroy()}function T(){var e;for(e in L)delete L[e];for(e in P)delete P[e]}function B(e){var t,r,n,o=e.width,i=e.height,a=e.getContext("2d"),s=a.getImageData(0,0,o,i).data,c=s.length,u={top:null,left:null,right:null,bottom:null},l=null;for(t=0;t=0?f.S:f.N:2*Math.abs(i)<=Math.abs(t)?t>0?f.E:f.W:i>0?t>0?f.SE:f.SW:t>0?f.NE:f.NW},matrixAppendRotationInv:function(t,i,s,h){void 0===s&&(s=0),void 0===h&&(h=0);var o=y[f.inv(i)];o.tx=s,o.ty=h,t.append(o)}};exports.groupD8=f;var l=function(){function t(){this.worldTransform=new e,this.localTransform=new e,this.position=new i(this.onChange,this,0,0),this.scale=new i(this.onChange,this,1,1),this.pivot=new i(this.onChange,this,0,0),this.skew=new i(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}return t.prototype.onChange=function(){this._localID++},t.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++},t.prototype.updateLocalTransform=function(){var t=this.localTransform;this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1)},t.prototype.updateTransform=function(t){var i=this.localTransform;if(this._localID!==this._currentLocalID&&(i.a=this._cx*this.scale.x,i.b=this._sx*this.scale.x,i.c=this._cy*this.scale.y,i.d=this._sy*this.scale.y,i.tx=this.position.x-(this.pivot.x*i.a+this.pivot.y*i.c),i.ty=this.position.y-(this.pivot.x*i.b+this.pivot.y*i.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==t._worldID){var s=t.worldTransform,h=this.worldTransform;h.a=i.a*s.a+i.b*s.c,h.b=i.a*s.b+i.b*s.d,h.c=i.c*s.a+i.d*s.c,h.d=i.c*s.b+i.d*s.d,h.tx=i.tx*s.a+i.ty*s.c+s.tx,h.ty=i.tx*s.b+i.ty*s.d+s.ty,this._parentID=t._worldID,this._worldID++}},t.prototype.setFromMatrix=function(t){t.decompose(this),this._localID++},Object.defineProperty(t.prototype,"rotation",{get:function(){return this._rotation},set:function(t){this._rotation!==t&&(this._rotation=t,this.updateSkew())},enumerable:!0,configurable:!0}),t.IDENTITY=new t,t}();exports.Transform=l;var v=function(){function t(t,i,s,h){void 0===t&&(t=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===h&&(h=0),this.x=Number(t),this.y=Number(i),this.width=Number(s),this.height=Number(h),this.type=o.RECT}return Object.defineProperty(t.prototype,"left",{get:function(){return this.x},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x+this.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!0,configurable:!0}),Object.defineProperty(t,"EMPTY",{get:function(){return new t(0,0,0,0)},enumerable:!0,configurable:!0}),t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copyFrom=function(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this},t.prototype.copyTo=function(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t},t.prototype.contains=function(t,i){return!(this.width<=0||this.height<=0)&&(t>=this.x&&t=this.y&&ii!=c>i&&t<(i-n)/(c-n)*(a-e)+e&&(s=!s)}return s},i}();exports.Polygon=w;var g=function(){function t(t,i,s,h,r){void 0===t&&(t=0),void 0===i&&(i=0),void 0===s&&(s=0),void 0===h&&(h=0),void 0===r&&(r=20),this.x=t,this.y=i,this.width=s,this.height=h,this.radius=r,this.type=o.RREC}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height,this.radius)},t.prototype.contains=function(t,i){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&i>=this.y&&i<=this.y+this.height){if(i>=this.y+this.radius&&i<=this.y+this.height-this.radius||t>=this.x+this.radius&&t<=this.x+this.width-this.radius)return!0;var s=t-(this.x+this.radius),h=i-(this.y+this.radius),o=this.radius*this.radius;if(s*s+h*h<=o)return!0;if((s=t-(this.x+this.width-this.radius))*s+h*h<=o)return!0;if(s*s+(h=i-(this.y+this.height-this.radius))*h<=o)return!0;if((s=t-(this.x+this.radius))*s+h*h<=o)return!0}return!1},t}();exports.RoundedRectangle=g; },{}],"nL3p":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DisplayObject=exports.Container=exports.Bounds=void 0;var t=require("@pixi/settings"),i=require("@pixi/math"),e=require("@pixi/utils");t.settings.SORTABLE_CHILDREN=!1;var s=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null};exports.Bounds=s,s.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},s.prototype.clear=function(){this.updateID++,this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},s.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?i.Rectangle.EMPTY:((t=t||new i.Rectangle(0,0,1,1)).x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},s.prototype.addPoint=function(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)},s.prototype.addQuad=function(t){var i=this.minX,e=this.minY,s=this.maxX,n=this.maxY,r=t[0],o=t[1];i=rs?r:s,n=o>n?o:n,i=(r=t[2])s?r:s,n=o>n?o:n,i=(r=t[4])s?r:s,n=o>n?o:n,i=(r=t[6])s?r:s,n=o>n?o:n,this.minX=i,this.minY=e,this.maxX=s,this.maxY=n},s.prototype.addFrame=function(t,i,e,s,n){this.addFrameMatrix(t.worldTransform,i,e,s,n)},s.prototype.addFrameMatrix=function(t,i,e,s,n){var r=t.a,o=t.b,h=t.c,a=t.d,l=t.tx,d=t.ty,m=this.minX,p=this.minY,u=this.maxX,c=this.maxY,f=r*i+h*e+l,x=o*i+a*e+d;m=fu?f:u,c=x>c?x:c,m=(f=r*s+h*e+l)u?f:u,c=x>c?x:c,m=(f=r*i+h*n+l)u?f:u,c=x>c?x:c,m=(f=r*s+h*n+l)u?f:u,c=x>c?x:c,this.minX=m,this.minY=p,this.maxX=u,this.maxY=c},s.prototype.addVertexData=function(t,i,e){for(var s=this.minX,n=this.minY,r=this.maxX,o=this.maxY,h=i;hr?a:r,o=l>o?l:o}this.minX=s,this.minY=n,this.maxX=r,this.maxY=o},s.prototype.addVertices=function(t,i,e,s){this.addVerticesMatrix(t.worldTransform,i,e,s)},s.prototype.addVerticesMatrix=function(t,i,e,s,n,r){var o=t.a,h=t.b,a=t.c,l=t.d,d=t.tx,m=t.ty;n=n||0,r=r||0;for(var p=this.minX,u=this.minY,c=this.maxX,f=this.maxY,x=e;xs?t.maxX:s,this.maxY=t.maxY>n?t.maxY:n},s.prototype.addBoundsMask=function(t,i){var e=t.minX>i.minX?t.minX:i.minX,s=t.minY>i.minY?t.minY:i.minY,n=t.maxXa?n:a,this.maxY=r>l?r:l}},s.prototype.addBoundsMatrix=function(t,i){this.addFrameMatrix(i,t.minX,t.minY,t.maxX,t.maxY)},s.prototype.addBoundsArea=function(t,i){var e=t.minX>i.x?t.minX:i.x,s=t.minY>i.y?t.minY:i.y,n=t.maxXa?n:a,this.maxY=r>l?r:l}},s.prototype.pad=function(t,i){t=t||0,i=i||(0!==i?t:0),this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=i,this.maxY+=i)},s.prototype.addFramePad=function(t,i,e,s,n,r){t-=n,i-=r,e+=n,s+=r,this.minX=this.minXe?this.maxX:e,this.minY=this.minYs?this.maxY:s};var n=function(t){function e(){t.call(this),this.tempDisplayObjectParent=null,this.transform=new i.Transform,this.alpha=1,this.visible=!0,this.renderable=!0,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new s,this._boundsID=0,this._lastBoundsID=-1,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={_tempDisplayObjectParent:{configurable:!0},x:{configurable:!0},y:{configurable:!0},worldTransform:{configurable:!0},localTransform:{configurable:!0},position:{configurable:!0},scale:{configurable:!0},pivot:{configurable:!0},skew:{configurable:!0},rotation:{configurable:!0},angle:{configurable:!0},zIndex:{configurable:!0},worldVisible:{configurable:!0},mask:{configurable:!0}};return e.mixin=function(t){for(var i=Object.keys(t),s=0;s1)for(var s=0;sthis.children.length)throw new Error(t+"addChildAt: The index "+i+" supplied is out of bounds "+this.children.length);return t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.splice(i,0,t),this._boundsID++,this.onChildrenChange(i),t.emit("added",this),this.emit("childAdded",t,this,i),t},s.prototype.swapChildren=function(t,i){if(t!==i){var e=this.getChildIndex(t),s=this.getChildIndex(i);this.children[e]=i,this.children[s]=t,this.onChildrenChange(e=this.children.length)throw new Error("The index "+i+" supplied is out of bounds "+this.children.length);var s=this.getChildIndex(t);(0,e.removeItems)(this.children,s,1),this.children.splice(i,0,t),this.onChildrenChange(i)},s.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Index ("+t+") does not exist.");return this.children[t]},s.prototype.removeChild=function(t){var i=arguments,s=arguments.length;if(s>1)for(var n=0;n0&&r<=n){e=this.children.splice(s,r);for(var o=0;o1&&this.children.sort(r),this.sortDirty=!1},s.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var t=0,i=this.children.length;t title : "+e.title+"
tabIndex: "+e.tabIndex},p.prototype.capHitArea=function(e){e.x<0&&(e.width+=e.x,e.x=0),e.y<0&&(e.height+=e.y,e.y=0),e.x+e.width>this.renderer.width&&(e.width=this.renderer.width-e.x),e.y+e.height>this.renderer.height&&(e.height=this.renderer.height-e.y)},p.prototype.addChild=function(e){var t=this.pool.pop();t||((t=document.createElement("button")).style.width=n+"px",t.style.height=n+"px",t.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",t.style.position="absolute",t.style.zIndex=l,t.style.borderStyle="none",navigator.userAgent.toLowerCase().indexOf("chrome")>-1?t.setAttribute("aria-live","off"):t.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?t.setAttribute("aria-relevant","additions"):t.setAttribute("aria-relevant","text"),t.addEventListener("click",this._onClick.bind(this)),t.addEventListener("focus",this._onFocus.bind(this)),t.addEventListener("focusout",this._onFocusOut.bind(this))),t.style.pointerEvents=e.accessiblePointerEvents,t.type=e.accessibleType,e.accessibleTitle&&null!==e.accessibleTitle?t.title=e.accessibleTitle:e.accessibleHint&&null!==e.accessibleHint||(t.title="displayObject "+e.tabIndex),e.accessibleHint&&null!==e.accessibleHint&&t.setAttribute("aria-label",e.accessibleHint),this.debug&&this.updateDebugHTML(t),e._accessibleActive=!0,e._accessibleDiv=t,t.displayObject=e,this.children.push(e),this.div.appendChild(e._accessibleDiv),e._accessibleDiv.tabIndex=e.tabIndex},p.prototype._onClick=function(e){var t=this.renderer.plugins.interaction;t.dispatchEvent(e.target.displayObject,"click",t.eventData),t.dispatchEvent(e.target.displayObject,"pointertap",t.eventData),t.dispatchEvent(e.target.displayObject,"tap",t.eventData)},p.prototype._onFocus=function(e){e.target.getAttribute("aria-live","off")||e.target.setAttribute("aria-live","assertive");var t=this.renderer.plugins.interaction;t.dispatchEvent(e.target.displayObject,"mouseover",t.eventData)},p.prototype._onFocusOut=function(e){e.target.getAttribute("aria-live","off")||e.target.setAttribute("aria-live","polite");var t=this.renderer.plugins.interaction;t.dispatchEvent(e.target.displayObject,"mouseout",t.eventData)},p.prototype._onKeyDown=function(e){e.keyCode===s&&this.activate()},p.prototype._onMouseMove=function(e){0===e.movementX&&0===e.movementY||this.deactivate()},p.prototype.destroy=function(){this.destroyTouchHook(),this.div=null;for(var e=0;e8)throw new Error("max arguments reached");var h=this.name,a=this.items;this._aliasCount++;for(var m=0,p=a.length;m0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))},t.prototype.add=function(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this},t.prototype.remove=function(t){var e=this.items.indexOf(t);return-1!==e&&(this.ensureNonAliasedItems(),this.items.splice(e,1)),this},t.prototype.contains=function(t){return-1!==this.items.indexOf(t)},t.prototype.removeAll=function(){return this.ensureNonAliasedItems(),this.items.length=0,this},t.prototype.destroy=function(){this.removeAll(),this.items=null,this._name=null},Object.defineProperty(t.prototype,"empty",{get:function(){return 0===this.items.length},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),t}();exports.Runner=t,Object.defineProperties(t.prototype,{dispatch:{value:t.prototype.emit},run:{value:t.prototype.emit}}); },{}],"F3Q6":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.UPDATE_PRIORITY=exports.TickerPlugin=exports.Ticker=void 0;var t,e=require("@pixi/settings");e.settings.TARGET_FPMS=.06,exports.UPDATE_PRIORITY=t,function(t){t[t.INTERACTION=50]="INTERACTION",t[t.HIGH=25]="HIGH",t[t.NORMAL=0]="NORMAL",t[t.LOW=-25]="LOW",t[t.UTILITY=-50]="UTILITY"}(t||(exports.UPDATE_PRIORITY=t={}));var i=function(){function t(t,e,i,s){void 0===e&&(e=null),void 0===i&&(i=0),void 0===s&&(s=!1),this.fn=t,this.context=e,this.priority=i,this.once=s,this.next=null,this.previous=null,this._destroyed=!1}return t.prototype.match=function(t,e){return void 0===e&&(e=null),this.fn===t&&this.context===e},t.prototype.emit=function(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));var e=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),e},t.prototype.connect=function(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this},t.prototype.destroy=function(t){void 0===t&&(t=!1),this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var e=this.next;return this.next=t?null:e,this.previous=null,e},t}(),s=function(){function s(){var t=this;this._head=new i(null,null,1/0),this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this.autoStart=!1,this.deltaTime=1,this.deltaMS=1/e.settings.TARGET_FPMS,this.elapsedMS=1/e.settings.TARGET_FPMS,this.lastTime=-1,this.speed=1,this.started=!1,this._protected=!1,this._lastFrame=-1,this._tick=function(e){t._requestId=null,t.started&&(t.update(e),t.started&&null===t._requestId&&t._head.next&&(t._requestId=requestAnimationFrame(t._tick)))}}return s.prototype._requestIfNeeded=function(){null===this._requestId&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))},s.prototype._cancelIfNeeded=function(){null!==this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=null)},s.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},s.prototype.add=function(e,s,n){return void 0===n&&(n=t.NORMAL),this._addListener(new i(e,s,n))},s.prototype.addOnce=function(e,s,n){return void 0===n&&(n=t.NORMAL),this._addListener(new i(e,s,n,!0))},s.prototype._addListener=function(t){var e=this._head.next,i=this._head;if(e){for(;e;){if(t.priority>e.priority){t.connect(i);break}i=e,e=e.next}t.previous||t.connect(i)}else t.connect(i);return this._startIfPossible(),this},s.prototype.remove=function(t,e){for(var i=this._head.next;i;)i=i.match(t,e)?i.destroy():i.next;return this._head.next||this._cancelIfNeeded(),this},s.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},s.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},s.prototype.destroy=function(){if(!this._protected){this.stop();for(var t=this._head.next;t;)t=t.destroy(!0);this._head.destroy(),this._head=null}},s.prototype.update=function(t){var i;if(void 0===t&&(t=performance.now()),t>this.lastTime){if((i=this.elapsedMS=t-this.lastTime)>this._maxElapsedMS&&(i=this._maxElapsedMS),i*=this.speed,this._minElapsedMS){var s=t-this._lastFrame|0;if(s=0;--n){var o=c[n];if(o.test&&o.test(t,r))return new o(t,e)}return new l(t,e)}var p=function(t){function e(e,r){var i=r||{},n=i.width,o=i.height;if(!n||!o)throw new Error("BufferResource width or height invalid");t.call(this,n,o),this.data=e}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.upload=function(t,e,i){var n=t.gl;return n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.alphaMode===r.ALPHA_MODES.UNPACK),i.width===e.width&&i.height===e.height?n.texSubImage2D(e.target,0,0,0,e.width,e.height,e.format,e.type,this.data):(i.width=e.width,i.height=e.height,n.texImage2D(e.target,0,i.internalFormat,e.width,e.height,0,e.format,i.type,this.data)),!0},e.prototype.dispose=function(){this.data=null},e.test=function(t){return t instanceof Float32Array||t instanceof Uint8Array||t instanceof Uint32Array},e}(a),f={scaleMode:r.SCALE_MODES.NEAREST,format:r.FORMATS.RGBA,alphaMode:r.ALPHA_MODES.NPM},v=function(t){function n(n,o){void 0===n&&(n=null),void 0===o&&(o=null),t.call(this);var s=(o=o||{}).alphaMode,h=o.mipmap,u=o.anisotropicLevel,l=o.scaleMode,c=o.width,p=o.height,f=o.wrapMode,v=o.format,_=o.type,g=o.target,y=o.resolution,m=o.resourceOptions;!n||n instanceof a||((n=d(n,m)).internal=!0),this.width=c||0,this.height=p||0,this.resolution=y||i.settings.RESOLUTION,this.mipmap=void 0!==h?h:i.settings.MIPMAP_TEXTURES,this.anisotropicLevel=void 0!==u?u:i.settings.ANISOTROPIC_LEVEL,this.wrapMode=f||i.settings.WRAP_MODE,this.scaleMode=void 0!==l?l:i.settings.SCALE_MODE,this.format=v||r.FORMATS.RGBA,this.type=_||r.TYPES.UNSIGNED_BYTE,this.target=g||r.TARGETS.TEXTURE_2D,this.alphaMode=void 0!==s?s:r.ALPHA_MODES.UNPACK,void 0!==o.premultiplyAlpha&&(this.premultiplyAlpha=o.premultiplyAlpha),this.uid=(0,e.uid)(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=c>0&&p>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.setResource(n)}t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n;var o={realWidth:{configurable:!0},realHeight:{configurable:!0}};return o.realWidth.get=function(){return Math.ceil(this.width*this.resolution-1e-4)},o.realHeight.get=function(){return Math.ceil(this.height*this.resolution-1e-4)},n.prototype.setStyle=function(t,e){var r;return void 0!==t&&t!==this.scaleMode&&(this.scaleMode=t,r=!0),void 0!==e&&e!==this.mipmap&&(this.mipmap=e,r=!0),r&&this.dirtyStyleId++,this},n.prototype.setSize=function(t,e,r){return this.resolution=r||this.resolution,this.width=t,this.height=e,this._refreshPOT(),this.update(),this},n.prototype.setRealSize=function(t,e,r){return this.resolution=r||this.resolution,this.width=t/this.resolution,this.height=e/this.resolution,this._refreshPOT(),this.update(),this},n.prototype._refreshPOT=function(){this.isPowerOfTwo=(0,e.isPow2)(this.realWidth)&&(0,e.isPow2)(this.realHeight)},n.prototype.setResolution=function(t){var e=this.resolution;return e===t?this:(this.resolution=t,this.valid&&(this.width=this.width*e/t,this.height=this.height*e/t,this.emit("update",this)),this._refreshPOT(),this)},n.prototype.setResource=function(t){if(this.resource===t)return this;if(this.resource)throw new Error("Resource can be set only once");return t.bind(this),this.resource=t,this},n.prototype.update=function(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))},n.prototype.onError=function(t){this.emit("error",this,t)},n.prototype.destroy=function(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete e.BaseTextureCache[this.cacheId],delete e.TextureCache[this.cacheId],this.cacheId=null),this.dispose(),n.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0},n.prototype.dispose=function(){this.emit("dispose",this)},n.from=function(t,r,o){void 0===o&&(o=i.settings.STRICT_TEXTURE_CACHE);var s="string"==typeof t,a=null;s?a=t:(t._pixiId||(t._pixiId="pixiid_"+(0,e.uid)()),a=t._pixiId);var h=e.BaseTextureCache[a];if(s&&o&&!h)throw new Error('The cacheId "'+a+'" does not exist in BaseTextureCache.');return h||((h=new n(t,r)).cacheId=a,n.addToCache(h,a)),h},n.fromBuffer=function(t,e,i,o){t=t||new Float32Array(e*i*4);var s=new p(t,{width:e,height:i}),a=t instanceof Float32Array?r.TYPES.FLOAT:r.TYPES.UNSIGNED_BYTE;return new n(s,Object.assign(f,o||{width:e,height:i,type:a}))},n.addToCache=function(t,r){r&&(-1===t.textureCacheIds.indexOf(r)&&t.textureCacheIds.push(r),e.BaseTextureCache[r]&&console.warn("BaseTexture added to the cache with an id ["+r+"] that already had an entry"),e.BaseTextureCache[r]=t)},n.removeFromCache=function(t){if("string"==typeof t){var r=e.BaseTextureCache[t];if(r){var i=r.textureCacheIds.indexOf(t);return i>-1&&r.textureCacheIds.splice(i,1),delete e.BaseTextureCache[t],r}}else if(t&&t.textureCacheIds){for(var n=0;n]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;var x=function(t){function e(e,r){if(r=r||{},!(e instanceof HTMLVideoElement)){var i=document.createElement("video");i.setAttribute("preload","auto"),i.setAttribute("webkit-playsinline",""),i.setAttribute("playsinline",""),"string"==typeof e&&(e=[e]),t.crossOrigin(i,e[0].src||e[0],r.crossorigin);for(var n=0;n0&&!1===t.paused&&!1===t.ended&&t.readyState>2},e.prototype._isSourceReady=function(){return 3===this.source.readyState||4===this.source.readyState},e.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),!this._isAutoUpdating&&this.autoUpdate&&(n.Ticker.shared.add(this.update,this),this._isAutoUpdating=!0)},e.prototype._onPlayStop=function(){this._isAutoUpdating&&(n.Ticker.shared.remove(this.update,this),this._isAutoUpdating=!1)},e.prototype._onCanPlay=function(){var t=this.source;t.removeEventListener("canplay",this._onCanPlay),t.removeEventListener("canplaythrough",this._onCanPlay);var e=this.valid;this.resize(t.videoWidth,t.videoHeight),!e&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&t.play()},e.prototype.dispose=function(){this._isAutoUpdating&&n.Ticker.shared.remove(this.update,this),this.source&&(this.source.removeEventListener("error",this._onError,!0),this.source.pause(),this.source.src="",this.source.load()),t.prototype.dispose.call(this)},r.autoUpdate.get=function(){return this._autoUpdate},r.autoUpdate.set=function(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isAutoUpdating?(n.Ticker.shared.remove(this.update,this),this._isAutoUpdating=!1):this._autoUpdate&&!this._isAutoUpdating&&(n.Ticker.shared.add(this.update,this),this._isAutoUpdating=!0))},r.updateFPS.get=function(){return this._updateFPS},r.updateFPS.set=function(t){t!==this._updateFPS&&(this._updateFPS=t)},e.test=function(t,r){return t instanceof HTMLVideoElement||e.TYPES.indexOf(r)>-1},Object.defineProperties(e.prototype,r),e}(u);x.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"];var E=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.test=function(t){return!!window.createImageBitmap&&t instanceof ImageBitmap},e}(u);c.push(l,E,g,x,m,p,y,_);var T={INSTALLED:c,autoDetectResource:d,ArrayResource:_,BufferResource:p,CanvasResource:g,CubeResource:y,ImageResource:l,ImageBitmapResource:E,SVGResource:m,VideoResource:x,Resource:a,BaseImageResource:u};exports.resources=T;var b=function(t){this.renderer=t};exports.System=b,b.prototype.destroy=function(){this.renderer=null};var S=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.upload=function(t,e,i){var n=t.gl;return n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.alphaMode===r.ALPHA_MODES.UNPACK),i.width===e.width&&i.height===e.height?n.texSubImage2D(e.target,0,0,0,e.width,e.height,e.format,e.type,this.data):(i.width=e.width,i.height=e.height,n.texImage2D(e.target,0,n.DEPTH_COMPONENT16,e.width,e.height,0,e.format,e.type,this.data)),!0},e}(p),w=function(e,r){this.width=Math.ceil(e||100),this.height=Math.ceil(r||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new t.Runner("disposeFramebuffer",2)};exports.Framebuffer=w;var A={colorTexture:{configurable:!0}};A.colorTexture.get=function(){return this.colorTextures[0]},w.prototype.addColorTexture=function(t,e){return void 0===t&&(t=0),this.colorTextures[t]=e||new v(null,{scaleMode:0,resolution:1,mipmap:!1,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},w.prototype.addDepthTexture=function(t){return this.depthTexture=t||new v(new S(null,{width:this.width,height:this.height}),{scaleMode:0,resolution:1,width:this.width,height:this.height,mipmap:!1,format:r.FORMATS.DEPTH_COMPONENT,type:r.TYPES.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this},w.prototype.enableDepth=function(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this},w.prototype.enableStencil=function(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this},w.prototype.resize=function(t,e){if(t=Math.ceil(t),e=Math.ceil(e),t!==this.width||e!==this.height){this.width=t,this.height=e,this.dirtyId++,this.dirtySize++;for(var r=0;r-1&&r.textureCacheIds.splice(i,1),delete e.TextureCache[t],r}}else if(t&&t.textureCacheIds){for(var n=0;nthis.baseTexture.width,s=r+n>this.baseTexture.height;if(o||s){var a=o&&s?"and":"or",h="X: "+e+" + "+i+" = "+(e+i)+" > "+this.baseTexture.width,u="Y: "+r+" + "+n+" = "+(r+n)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+h+" "+a+" "+u)}this.valid=i&&n&&this.baseTexture.valid,this.trim||this.rotate||(this.orig=t),this.valid&&this.updateUvs()},n.rotate.get=function(){return this._rotate},n.rotate.set=function(t){this._rotate=t,this.valid&&this.updateUvs()},n.width.get=function(){return this.orig.width},n.height.get=function(){return this.orig.height},Object.defineProperties(r.prototype,n),r}(e.EventEmitter);function P(){var t=document.createElement("canvas");t.width=16,t.height=16;var e=t.getContext("2d");return e.fillStyle="white",e.fillRect(0,0,16,16),new O(new v(new g(t)))}function M(t){t.destroy=function(){},t.on=function(){},t.once=function(){},t.emit=function(){}}exports.Texture=O,O.EMPTY=new O(new v),M(O.EMPTY),M(O.EMPTY.baseTexture),O.WHITE=P(),M(O.WHITE),M(O.WHITE.baseTexture);var D=function(t){function e(e,r){var i=null;if(!(e instanceof C)){var n=arguments[1],o=arguments[2],s=arguments[3],a=arguments[4];console.warn("Please use RenderTexture.create("+n+", "+o+") instead of the ctor directly."),i=arguments[0],r=null,e=new C({width:n,height:o,scaleMode:s,resolution:a})}t.call(this,e,r),this.legacyRenderer=i,this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.resize=function(t,e,r){void 0===r&&(r=!0),t=Math.ceil(t),e=Math.ceil(e),this.valid=t>0&&e>0,this._frame.width=this.orig.width=t,this._frame.height=this.orig.height=e,r&&this.baseTexture.resize(t,e),this.updateUvs()},e.prototype.setResolution=function(t){var e=this.baseTexture;e.resolution!==t&&(e.setResolution(t),this.resize(e.width,e.height,!1))},e.create=function(t){return"number"==typeof t&&(t={width:t,height:arguments[1],scaleMode:arguments[2],resolution:arguments[3]}),new e(new C(t))},e}(O);exports.RenderTexture=D;var F=function(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0};exports.RenderTexturePool=F,F.prototype.createTexture=function(t,e){var r=new C(Object.assign({width:t,height:e,resolution:1},this.textureOptions));return new D(r)},F.prototype.getOptimalTexture=function(t,r,i){void 0===i&&(i=1);var n=F.SCREEN_KEY;t*=i,r*=i,this.enableFullScreen&&t===this._pixelsWidth&&r===this._pixelsHeight||(n=(65535&(t=(0,e.nextPow2)(t)))<<16|65535&(r=(0,e.nextPow2)(r))),this.texturePool[n]||(this.texturePool[n]=[]);var o=this.texturePool[n].pop();return o||(o=this.createTexture(t,r)),o.filterPoolKey=n,o.setResolution(i),o},F.prototype.getFilterTexture=function(t,e){var r=this.getOptimalTexture(t.width,t.height,e||t.resolution);return r.filterFrame=t.filterFrame,r},F.prototype.returnTexture=function(t){var e=t.filterPoolKey;t.filterFrame=null,this.texturePool[e].push(t)},F.prototype.returnFilterTexture=function(t){this.returnTexture(t)},F.prototype.clear=function(t){if(t=!1!==t)for(var e in this.texturePool){var r=this.texturePool[e];if(r)for(var i=0;i0&&t.height>0,r)for(var i=0;i1){for(var u=0;u=0;--i)t[i]=r[i]||null,t[i]&&(t[i]._batchLocation=i)},e.prototype.boundArray=function(t,e,r,i){for(var n=t.elements,o=t.ids,s=t.count,a=0,h=0;h=0&&l=r.ENV.WEBGL2&&(n=t.getContext("webgl2",e)),n)this.webGLVersion=2;else if(this.webGLVersion=1,!(n=t.getContext("webgl",e)||t.getContext("experimental-webgl",e)))throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=n,this.getExtensions(),n},e.prototype.getExtensions=function(){var t=this.gl;1===this.webGLVersion?Object.assign(this.extensions,{drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBKIT_WEBGL_depth_texture"),loseContext:t.getExtension("WEBGL_lose_context"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_half_float_linear")}):2===this.webGLVersion&&Object.assign(this.extensions,{anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),colorBufferFloat:t.getExtension("EXT_color_buffer_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear")})},e.prototype.handleContextLost=function(t){t.preventDefault()},e.prototype.handleContextRestored=function(){this.renderer.runners.contextChange.run(this.gl)},e.prototype.destroy=function(){var t=this.renderer.view;t.removeEventListener("webglcontextlost",this.handleContextLost),t.removeEventListener("webglcontextrestored",this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()},e.prototype.postrender=function(){this.renderer.renderingToScreen&&this.gl.flush()},e.prototype.validateContext=function(t){t.getContextAttributes().stencil||console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly")},Object.defineProperties(e.prototype,n),e}(b),et=function(t){function e(e){t.call(this,e),this.managedFramebuffers=[],this.unknownFramebuffer=new w(10,10)}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var n={size:{configurable:!0}};return e.prototype.contextChange=function(){var t=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new o.Rectangle,this.hasMRT=!0,this.writeDepthTexture=!0,this.disposeAll(!0),1===this.renderer.context.webGLVersion){var e=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;i.settings.PREFER_ENV===r.ENV.WEBGL_LEGACY&&(e=null,n=null),e?t.drawBuffers=function(t){return e.drawBuffersWEBGL(t)}:(this.hasMRT=!1,t.drawBuffers=function(){}),n||(this.writeDepthTexture=!1)}},e.prototype.bind=function(t,e){var r=this.gl;if(t){var i=t.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(t);this.current!==t&&(this.current=t,r.bindFramebuffer(r.FRAMEBUFFER,i.framebuffer)),i.dirtyId!==t.dirtyId&&(i.dirtyId=t.dirtyId,i.dirtyFormat!==t.dirtyFormat?(i.dirtyFormat=t.dirtyFormat,this.updateFramebuffer(t)):i.dirtySize!==t.dirtySize&&(i.dirtySize=t.dirtySize,this.resizeFramebuffer(t)));for(var n=0;n1&&e.drawBuffers(n),t.depthTexture)&&this.writeDepthTexture){var a=t.depthTexture;this.renderer.texture.bind(a,0),e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,a._glTextures[this.CONTEXT_UID].texture,0)}r.stencil||!t.stencil&&!t.depth||(r.stencil=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,r.stencil),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,t.width,t.height),t.depthTexture||e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,r.stencil))},e.prototype.disposeFramebuffer=function(t,e){var r=t.glFramebuffers[this.CONTEXT_UID],i=this.gl;if(r){delete t.glFramebuffers[this.CONTEXT_UID];var n=this.managedFramebuffers.indexOf(t);n>=0&&this.managedFramebuffers.splice(n,1),t.disposeRunner.remove(this),e||(i.deleteFramebuffer(r.framebuffer),r.stencil&&i.deleteRenderbuffer(r.stencil))}},e.prototype.disposeAll=function(t){var e=this.managedFramebuffers;this.managedFramebuffers=[];for(var r=0;r=i.data.byteLength)e.bufferSubData(o,0,i.data);else{var s=i.static?e.STATIC_DRAW:e.DYNAMIC_DRAW;n.byteLength=i.data.byteLength,e.bufferData(o,i.data,s)}}}},e.prototype.checkCompatibility=function(t,e){var r=t.attributes,i=e.attributeData;for(var n in i)if(!r[n])throw new Error('shader and geometry incompatible, geometry missing the "'+n+'" attribute')},e.prototype.getSignature=function(t,e){var r=t.attributes,i=e.attributeData,n=["g",t.id];for(var o in r)i[o]&&n.push(o);return n.join("-")},e.prototype.initGeometryVao=function(t,e){this.checkCompatibility(t,e);var r=this.gl,i=this.CONTEXT_UID,n=this.getSignature(t,e),o=t.glVertexArrayObjects[this.CONTEXT_UID],s=o[n];if(s)return o[e.id]=s,s;var a=t.buffers,h=t.attributes,u={},l={};for(var c in a)u[c]=0,l[c]=0;for(var d in h)!h[d].size&&e.attributeData[d]?h[d].size=e.attributeData[d].size:h[d].size||console.warn("PIXI Geometry attribute '"+d+"' size cannot be determined (likely the bound shader does not have the attribute)"),u[h[d].buffer]+=h[d].size*it[h[d].type];for(var p in h){var f=h[p],v=f.size;void 0===f.stride&&(u[f.buffer]===v*it[f.type]?f.stride=0:f.stride=u[f.buffer]),void 0===f.start&&(f.start=l[f.buffer],l[f.buffer]+=v*it[f.type])}s=r.createVertexArray(),r.bindVertexArray(s);for(var _=0;_=r.ENV.WEBGL2&&(t=e.getContext("webgl2",{})),t||((t=e.getContext("webgl",{})||e.getContext("experimental-webgl",{}))?t.getExtension("WEBGL_draw_buffers"):t=null),dt=t}return dt}function ft(){if(!lt){lt=r.PRECISION.MEDIUM;var t=pt();if(t&&t.getShaderPrecisionFormat){var e=t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT);lt=e.precision?r.PRECISION.HIGH:r.PRECISION.MEDIUM}}return lt}function vt(t,e,i){if("precision"!==t.substring(0,9)){var n=e;return e===r.PRECISION.HIGH&&i!==r.PRECISION.HIGH&&(n=r.PRECISION.MEDIUM),"precision "+n+" float;\n"+t}return i!==r.PRECISION.HIGH&&"precision highp"===t.substring(0,15)?t.replace("precision highp","precision mediump"):t}var _t={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function gt(t){return _t[t]}var yt=null,mt={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray"};function xt(t,e){if(!yt){var r=Object.keys(mt);yt={};for(var i=0;i0&&(e+="\nelse "),re.name?1:-1});for(var u=0;u0?this._useCurrent():t.disable(t.SCISSOR_TEST)},e.prototype._useCurrent=function(){var t=this.maskStack[this.maskStack.length-1]._scissorRect,e=this.renderer.renderTexture.current,r=this.renderer.projection,i=r.transform,n=r.sourceFrame,o=r.destinationFrame,s=e?e.resolution:this.renderer.resolution,a=(t.x-n.x)*s+o.x,h=(t.y-n.y)*s+o.y,u=t.width*s,l=t.height*s;i&&(a+=i.tx*s,h+=i.ty*s),e||(h=this.renderer.height-l-h),this.renderer.gl.scissor(a,h,u,l)},e}(te),re=function(t){function e(e){t.call(this,e),this.glConst=WebGLRenderingContext.STENCIL_TEST}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.getStackLength=function(){var t=this.maskStack[this.maskStack.length-1];return t?t._stencilCounter:0},e.prototype.push=function(t){var e=t.maskObject,r=this.renderer.gl,i=t._stencilCounter;0===i&&(this.renderer.framebuffer.forceStencil(),r.enable(r.STENCIL_TEST)),t._stencilCounter++,r.colorMask(!1,!1,!1,!1),r.stencilFunc(r.EQUAL,i,this._getBitwiseMask()),r.stencilOp(r.KEEP,r.KEEP,r.INCR),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,this._useCurrent()},e.prototype.pop=function(t){var e=this.renderer.gl;0===this.getStackLength()?(e.disable(e.STENCIL_TEST),e.clear(e.STENCIL_BUFFER_BIT),e.clearStencil(0)):(e.colorMask(!1,!1,!1,!1),e.stencilOp(e.KEEP,e.KEEP,e.DECR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,this._useCurrent())},e.prototype._useCurrent=function(){var t=this.renderer.gl;t.colorMask(!0,!0,!0,!0),t.stencilFunc(t.EQUAL,this.getStackLength(),this._getBitwiseMask()),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)},e.prototype._getBitwiseMask=function(){return(1<>=1,r++;this.stateId=t.data}for(var i=0;ithis.checkCountMax&&(this.checkCount=0,this.run())))},e.prototype.run=function(){for(var t=this.renderer.texture,e=t.managedTextures,r=!1,i=0;ithis.maxIdle&&(t.destroyTexture(n,!0),e[i]=null,r=!0)}if(r){for(var o=0,s=0;s=0;r--)this.unload(t.children[r])},e}(b),ge=function(t){this.texture=t,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=6408,this.internalFormat=5121};exports.GLTexture=ge;var ye=function(t){function i(e){t.call(this,e),this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new v}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.contextChange=function(){var t=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion;var e=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=e;for(var r=0;r=1:e.mipmap=0,2===this.webGLVersion||t.isPowerOfTwo?e.wrapMode=t.wrapMode:e.wrapMode=r.WRAP_MODES.CLAMP,t.resource&&t.resource.style(this.renderer,t,e)||this.setStyle(t,e),e.dirtyStyleId=t.dirtyStyleId)},i.prototype.setStyle=function(t,e){var i=this.gl;if(e.mipmap&&i.generateMipmap(t.target),i.texParameteri(t.target,i.TEXTURE_WRAP_S,e.wrapMode),i.texParameteri(t.target,i.TEXTURE_WRAP_T,e.wrapMode),e.mipmap){i.texParameteri(t.target,i.TEXTURE_MIN_FILTER,t.scaleMode?i.LINEAR_MIPMAP_LINEAR:i.NEAREST_MIPMAP_NEAREST);var n=this.renderer.context.extensions.anisotropicFiltering;if(n&&t.anisotropicLevel>0&&t.scaleMode===r.SCALE_MODES.LINEAR){var o=Math.min(t.anisotropicLevel,i.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT));i.texParameterf(t.target,n.TEXTURE_MAX_ANISOTROPY_EXT,o)}}else i.texParameteri(t.target,i.TEXTURE_MIN_FILTER,t.scaleMode?i.LINEAR:i.NEAREST);i.texParameteri(t.target,i.TEXTURE_MAG_FILTER,t.scaleMode?i.LINEAR:i.NEAREST)},i}(b),me={FilterSystem:Z,BatchSystem:$,ContextSystem:tt,FramebufferSystem:et,GeometrySystem:nt,MaskSystem:Jt,ScissorSystem:ee,StencilSystem:re,ProjectionSystem:ie,RenderTextureSystem:oe,ShaderSystem:he,StateSystem:ve,TextureGCSystem:_e,TextureSystem:ye};exports.systems=me;var xe=new o.Matrix,Ee=function(t){function n(n,a){t.call(this),(a=Object.assign({},i.settings.RENDER_OPTIONS,a)).roundPixels&&(i.settings.ROUND_PIXELS=a.roundPixels,(0,e.deprecation)("5.0.0","Renderer roundPixels option is deprecated, please use PIXI.settings.ROUND_PIXELS",2)),this.options=a,this.type=r.RENDERER_TYPE.UNKNOWN,this.screen=new o.Rectangle(0,0,a.width,a.height),this.view=a.view||document.createElement("canvas"),this.resolution=a.resolution||i.settings.RESOLUTION,this.transparent=a.transparent,this.autoDensity=a.autoDensity||a.autoResize||!1,this.preserveDrawingBuffer=a.preserveDrawingBuffer,this.clearBeforeRender=a.clearBeforeRender,this._backgroundColor=0,this._backgroundColorRgba=[0,0,0,0],this._backgroundColorString="#000000",this.backgroundColor=a.backgroundColor||this._backgroundColor,this._tempDisplayObjectParent=new s.Container,this._lastObjectRendered=this._tempDisplayObjectParent,this.plugins={}}t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n;var a={width:{configurable:!0},height:{configurable:!0},backgroundColor:{configurable:!0}};return n.prototype.initPlugins=function(t){for(var e in t)this.plugins[e]=new t[e](this)},a.width.get=function(){return this.view.width},a.height.get=function(){return this.view.height},n.prototype.resize=function(t,e){this.screen.width=t,this.screen.height=e,this.view.width=t*this.resolution,this.view.height=e*this.resolution,this.autoDensity&&(this.view.style.width=t+"px",this.view.style.height=e+"px")},n.prototype.generateTexture=function(t,e,r,i){0===(i=i||t.getLocalBounds()).width&&(i.width=1),0===i.height&&(i.height=1);var n=D.create(0|i.width,0|i.height,e,r);return xe.tx=-i.x,xe.ty=-i.y,this.render(t,n,!1,xe,!!t.parent),n},n.prototype.destroy=function(t){for(var e in this.plugins)this.plugins[e].destroy(),this.plugins[e]=null;t&&this.view.parentNode&&this.view.parentNode.removeChild(this.view),this.plugins=null,this.type=r.RENDERER_TYPE.UNKNOWN,this.view=null,this.screen=null,this.resolution=0,this.transparent=!1,this.autoDensity=!1,this.blendModes=null,this.options=null,this.preserveDrawingBuffer=!1,this.clearBeforeRender=!1,this._backgroundColor=0,this._backgroundColorRgba=null,this._backgroundColorString=null,this._tempDisplayObjectParent=null,this._lastObjectRendered=null},a.backgroundColor.get=function(){return this._backgroundColor},a.backgroundColor.set=function(t){this._backgroundColor=t,this._backgroundColorString=(0,e.hex2string)(t),(0,e.hex2rgb)(t,this._backgroundColorRgba)},Object.defineProperties(n.prototype,a),n}(e.EventEmitter);exports.AbstractRenderer=Ee;var Te=function(i){function n(s){void 0===s&&(s={}),i.call(this,"WebGL",s),s=this.options,this.type=r.RENDERER_TYPE.WEBGL,this.gl=null,this.CONTEXT_UID=0,this.runners={destroy:new t.Runner("destroy"),contextChange:new t.Runner("contextChange",1),reset:new t.Runner("reset"),update:new t.Runner("update"),postrender:new t.Runner("postrender"),prerender:new t.Runner("prerender"),resize:new t.Runner("resize",2)},this.globalUniforms=new K({projectionMatrix:new o.Matrix},!0),this.addSystem(Jt,"mask").addSystem(tt,"context").addSystem(ve,"state").addSystem(he,"shader").addSystem(ye,"texture").addSystem(nt,"geometry").addSystem(et,"framebuffer").addSystem(ee,"scissor").addSystem(re,"stencil").addSystem(ie,"projection").addSystem(_e,"textureGC").addSystem(Z,"filter").addSystem(oe,"renderTexture").addSystem($,"batch"),this.initPlugins(n.__plugins),s.context?this.context.initFromContext(s.context):this.context.initFromOptions({alpha:this.transparent,antialias:s.antialias,premultipliedAlpha:this.transparent&&"notMultiplied"!==this.transparent,stencil:!0,preserveDrawingBuffer:s.preserveDrawingBuffer,powerPreference:this.options.powerPreference}),this.renderingToScreen=!0,(0,e.sayHello)(2===this.context.webGLVersion?"WebGL 2":"WebGL 1"),this.resize(this.options.width,this.options.height)}return i&&(n.__proto__=i),n.prototype=Object.create(i&&i.prototype),n.prototype.constructor=n,n.create=function(t){if((0,e.isWebGLSupported)())return new n(t);throw new Error('WebGL unsupported in this browser, use "pixi.js-legacy" for fallback canvas2d support.')},n.prototype.addSystem=function(t,e){e||(e=t.name);var r=new t(this);if(this[e])throw new Error('Whoops! The name "'+e+'" is already in use');for(var i in this[e]=r,this.runners)this.runners[i].add(r);return this},n.prototype.render=function(t,e,r,i,n){if(this.renderingToScreen=!e,this.runners.prerender.run(),this.emit("prerender"),this.projection.transform=i,!this.context.isLost){if(e||(this._lastObjectRendered=t),!n){var o=t.parent;t.parent=this._tempDisplayObjectParent,t.updateTransform(),t.parent=o}this.renderTexture.bind(e),this.batch.currentRenderer.start(),(void 0!==r?r:this.clearBeforeRender)&&this.renderTexture.clear(),t.render(this),this.batch.currentRenderer.flush(),e&&e.baseTexture.update(),this.runners.postrender.run(),this.projection.transform=null,this.emit("postrender")}},n.prototype.resize=function(t,e){i.prototype.resize.call(this,t,e),this.runners.resize.run(t,e)},n.prototype.reset=function(){return this.runners.reset.run(),this},n.prototype.clear=function(){this.framebuffer.bind(),this.framebuffer.clear()},n.prototype.destroy=function(t){for(var e in this.runners.destroy.run(),this.runners)this.runners[e].destroy();i.prototype.destroy.call(this,t),this.gl=null},n.registerPlugin=function(t,e){n.__plugins=n.__plugins||{},n.__plugins[t]=e},n}(Ee);function be(t){return Te.create(t)}exports.Renderer=Te;var Se="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n}";exports.defaultVertex=Se;var we="attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n gl_Position = filterVertexPosition();\n vTextureCoord = filterTextureCoord();\n}\n";exports.defaultFilterVertex=we;var Ae=function(t){function e(){t.apply(this,arguments)}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.from=function(t,r){return new e(new y(t,r))},e}(v);exports.CubeTexture=Ae;var Ce=function(){this.texArray=null,this.blend=0,this.type=r.DRAW_MODES.TRIANGLES,this.start=0,this.size=0,this.data=null};exports.BatchDrawCall=Ce;var Re=function(){this.elements=[],this.ids=[],this.count=0};exports.BatchTextureArray=Re,Re.prototype.clear=function(){for(var t=0;tthis.size&&this.flush(),this._vertexCount+=t.vertexData.length/2,this._indexCount+=t.indices.length,this._bufferedTextures[this._bufferSize]=t._texture.baseTexture,this._bufferedElements[this._bufferSize++]=t)},n.prototype.buildTexturesAndDrawCalls=function(){var t=this._bufferedTextures,e=this.MAX_TEXTURES,r=n._textureArrayPool,i=this.renderer.batch,o=this._tempBoundTextures,s=this.renderer.textureGC.count,a=++v._globalBatch,h=0,u=r[0],l=0;i.copyBoundTextures(o,e);for(var c=0;c=e&&(i.boundArray(u,o,a,e),this.buildDrawCalls(u,l,c),l=c,u=r[++h],++a),d._batchEnabled=a,d.touched=s,u.elements[u.count++]=d)}u.count>0&&(i.boundArray(u,o,a,e),this.buildDrawCalls(u,l,this._bufferSize),++h,++a);for(var p=0;p0&&(e+="\nelse "),r=0;p--){var u=c[p],l=this.recursiveFindHit(t,u,i,n,a);if(l){if(!u.parent)continue;a=!1,l&&(t.target&&(n=!1),s=!0)}}return o&&(n&&!t.target&&!e.hitArea&&e.containsPoint&&e.containsPoint(r)&&(s=!0),e.interactive&&(s&&!t.target&&(t.target=e),i&&i(t,e,!!s))),s},c.prototype.findHit=function(t,e,i,n){this.recursiveFindHit(t,e,i,n,!1)};var p={interactive:!1,interactiveChildren:!0,hitArea:null,get buttonMode(){return"pointer"===this.cursor},set buttonMode(t){t?this.cursor="pointer":"pointer"===this.cursor&&(this.cursor=null)},cursor:null,get trackedPointers(){return void 0===this._trackedPointers&&(this._trackedPointers={}),this._trackedPointers},_trackedPointers:void 0};exports.interactiveTarget=p,i.DisplayObject.mixin(p);var u=1,l={target:null,data:{global:null}},v=function(t){function i(e,i){t.call(this),i=i||{},this.renderer=e,this.autoPreventDefault=void 0===i.autoPreventDefault||i.autoPreventDefault,this.interactionFrequency=i.interactionFrequency||10,this.mouse=new o,this.mouse.identifier=u,this.mouse.global.set(-999999),this.activeInteractionData={},this.activeInteractionData[u]=this.mouse,this.interactionDataPool=[],this.eventData=new s,this.interactionDOMElement=null,this.moveWhenInside=!1,this.eventsAdded=!1,this.mouseOverRenderer=!1,this.supportsTouchEvents="ontouchstart"in window,this.supportsPointerEvents=!!window.PointerEvent,this.onPointerUp=this.onPointerUp.bind(this),this.processPointerUp=this.processPointerUp.bind(this),this.onPointerCancel=this.onPointerCancel.bind(this),this.processPointerCancel=this.processPointerCancel.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.processPointerDown=this.processPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.processPointerMove=this.processPointerMove.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.processPointerOverOut=this.processPointerOverOut.bind(this),this.onPointerOver=this.onPointerOver.bind(this),this.cursorStyles={default:"inherit",pointer:"pointer"},this.currentCursorMode=null,this.cursor=null,this.resolution=1,this.delayedEvents=[],this.search=new c,this.setTargetElement(this.renderer.view,this.renderer.resolution)}return t&&(i.__proto__=t),i.prototype=Object.create(t&&t.prototype),i.prototype.constructor=i,i.prototype.hitTest=function(t,e){return l.target=null,l.data.global=t,e||(e=this.renderer._lastObjectRendered),this.processInteractive(l,e,null,!0),l.target},i.prototype.setTargetElement=function(t,e){void 0===e&&(e=1),this.removeEvents(),this.interactionDOMElement=t,this.resolution=e,this.addEvents()},i.prototype.addEvents=function(){this.interactionDOMElement&&(e.Ticker.system.add(this.update,this,e.UPDATE_PRIORITY.INTERACTION),window.navigator.msPointerEnabled?(this.interactionDOMElement.style["-ms-content-zooming"]="none",this.interactionDOMElement.style["-ms-touch-action"]="none"):this.supportsPointerEvents&&(this.interactionDOMElement.style["touch-action"]="none"),this.supportsPointerEvents?(window.document.addEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("pointerover",this.onPointerOver,!0),window.addEventListener("pointercancel",this.onPointerCancel,!0),window.addEventListener("pointerup",this.onPointerUp,!0)):(window.document.addEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.addEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.addEventListener("mouseover",this.onPointerOver,!0),window.addEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.addEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.addEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.addEventListener("touchmove",this.onPointerMove,!0)),this.eventsAdded=!0)},i.prototype.removeEvents=function(){this.interactionDOMElement&&(e.Ticker.system.remove(this.update,this),window.navigator.msPointerEnabled?(this.interactionDOMElement.style["-ms-content-zooming"]="",this.interactionDOMElement.style["-ms-touch-action"]=""):this.supportsPointerEvents&&(this.interactionDOMElement.style["touch-action"]=""),this.supportsPointerEvents?(window.document.removeEventListener("pointermove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("pointerdown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("pointerleave",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("pointerover",this.onPointerOver,!0),window.removeEventListener("pointercancel",this.onPointerCancel,!0),window.removeEventListener("pointerup",this.onPointerUp,!0)):(window.document.removeEventListener("mousemove",this.onPointerMove,!0),this.interactionDOMElement.removeEventListener("mousedown",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("mouseout",this.onPointerOut,!0),this.interactionDOMElement.removeEventListener("mouseover",this.onPointerOver,!0),window.removeEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener("touchstart",this.onPointerDown,!0),this.interactionDOMElement.removeEventListener("touchcancel",this.onPointerCancel,!0),this.interactionDOMElement.removeEventListener("touchend",this.onPointerUp,!0),this.interactionDOMElement.removeEventListener("touchmove",this.onPointerMove,!0)),this.interactionDOMElement=null,this.eventsAdded=!1)},i.prototype.update=function(t){if(this._deltaTime+=t,!(this._deltaTimethis.maxSegments&&(i=this.maxSegments),i}};exports.GRAPHICS_CURVES=n;var h=function(){this.reset()};exports.FillStyle=h,h.prototype.clone=function(){var t=new h;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t},h.prototype.reset=function(){this.color=16777215,this.alpha=1,this.texture=t.Texture.WHITE,this.matrix=null,this.visible=!1},h.prototype.destroy=function(){this.texture=null,this.matrix=null};var a={build:function(t){t.points=t.shape.points.slice()},triangulate:function(t,e){var r=t.points,s=t.holes,n=e.points,h=e.indices;if(r.length>=6){for(var a=[],o=0;o196*v*v?(A=P-D,C=M-T,A/=E=Math.sqrt(A*A+C*C),C/=E,A*=v,C*=v,d.push(m-A*B,S-C*B),d.push(m+A*R,S+C*R),d.push(m-A*R*B,S-C*B),y++):(d.push(m+(j-m)*B,S+(k-S)*B),d.push(m-(j-m)*R,S-(k-S)*R))}}b=s[2*(f-2)],x=s[2*(f-2)+1],m=s[2*(f-1)],P=-(x-(S=s[2*(f-1)+1])),M=b-m,P/=E=Math.sqrt(P*P+M*M),M/=E,P*=v,M*=v,d.push(m-P*B,S-M*B),d.push(m+P*R,S+M*R);for(var N=i.indices,W=0;Wh?l:h,a=(u=r[p+1])o?u:o;r.push(n,a,h,a,h,o,n,o);for(var c=r.length/2,d=0;du*a}},x.arc=function(t,i,r,s,h,a,o,l,u){for(var p=o-a,c=n._segmentsCount(Math.abs(p)*h,40*Math.ceil(Math.abs(p)/e.PI_2)),d=p/(2*c),f=2*d,y=Math.cos(d),g=Math.sin(d),v=c-1,b=v%1/v,x=0;x<=v;++x){var m=d+a+f*(x+b*x),S=Math.cos(m),_=-Math.sin(m);u.push((y*S+g*_)*h+r,(y*-_+g*S)*h+s)}};var m=function(){};m.curveLength=function(t,e,i,r,s,n,h,a){for(var o=0,l=0,u=0,p=0,c=0,d=0,f=0,y=0,g=0,v=0,b=0,x=t,m=e,S=1;S<=10;++S)v=x-(y=(f=(d=(c=1-(l=S/10))*c)*c)*t+3*d*l*i+3*c*(u=l*l)*s+(p=u*l)*h),b=m-(g=f*e+3*d*l*r+3*c*u*n+p*a),x=y,m=g,o+=Math.sqrt(v*v+b*b);return o},m.curveTo=function(t,e,i,r,s,h,a){var o=a[a.length-2],l=a[a.length-1];a.length-=2;var u=n._segmentsCount(m.curveLength(o,l,t,e,i,r,s,h)),p=0,c=0,d=0,f=0,y=0;a.push(o,l);for(var g=1,v=0;g<=u;++g)d=(c=(p=1-(v=g/u))*p)*p,y=(f=v*v)*v,a.push(d*o+3*c*v*t+3*p*f*i+y*s,d*l+3*c*v*e+3*p*f*r+y*h)};var S=function(){};S.curveLength=function(t,e,i,r,s,n){var h=t-2*i+s,a=e-2*r+n,o=2*i-2*t,l=2*r-2*e,u=4*(h*h+a*a),p=4*(h*o+a*l),c=o*o+l*l,d=2*Math.sqrt(u+p+c),f=Math.sqrt(u),y=2*u*f,g=2*Math.sqrt(c),v=p/f;return(y*d+f*p*(d-g)+(4*c*u-p*p)*Math.log((2*f+v+d)/(v+g)))/(4*y)},S.curveTo=function(t,e,i,r,s){for(var h=s[s.length-2],a=s[s.length-1],o=n._segmentsCount(S.curveLength(h,a,t,e,i,r)),l=0,u=0,p=1;p<=o;++p){var c=p/o;l=h+(t-h)*c,u=a+(e-a)*c,s.push(l+(t+(i-t)*c-l)*c,u+(e+(r-e)*c-u)*c)}};var _=function(){this.reset()};_.prototype.begin=function(t,e,i){this.reset(),this.style=t,this.start=e,this.attribStart=i},_.prototype.end=function(t,e){this.attribSize=e-this.attribStart,this.size=t-this.start},_.prototype.reset=function(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0};var w={};w[e.SHAPES.POLY]=a,w[e.SHAPES.CIRC]=o,w[e.SHAPES.ELIP]=o,w[e.SHAPES.RECT]=l,w[e.SHAPES.RREC]=u;var P=[],M=[],D={buildPoly:a,buildCircle:o,buildRectangle:l,buildRoundedRectangle:u,FILL_COMMANDS:w,BATCH_POOL:P,DRAW_CALL_POOL:M,buildLine:d,buildComplexPoly:g,bezierCurveTo:v,Star:b,ArcUtils:x,BezierUtils:m,QuadraticUtils:S,BatchPart:_};exports.graphicsUtils=D;var T=function(t,e,i,r){void 0===e&&(e=null),void 0===i&&(i=null),void 0===r&&(r=null),this.shape=t,this.lineStyle=i,this.fillStyle=e,this.matrix=r,this.type=t.type,this.points=[],this.holes=[]};exports.GraphicsData=T,T.prototype.clone=function(){return new T(this.shape,this.fillStyle,this.lineStyle,this.matrix)},T.prototype.destroy=function(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null};var A=new e.Point,C=new s.Bounds,E=function(n){function h(){n.call(this),this.points=[],this.colors=[],this.uvs=[],this.indices=[],this.textureIds=[],this.graphicsData=[],this.dirty=0,this.batchDirty=-1,this.cacheDirty=-1,this.clearDirty=0,this.drawCalls=[],this.batches=[],this.shapeIndex=0,this._bounds=new s.Bounds,this.boundsDirty=-1,this.boundsPadding=0,this.batchable=!1,this.indicesUint16=null,this.uvsFloat32=null,this.closePointEps=1e-4}n&&(h.__proto__=n),h.prototype=Object.create(n&&n.prototype),h.prototype.constructor=h;var o={bounds:{configurable:!0}};return o.bounds.get=function(){return this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds},h.prototype.invalidate=function(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(var t=0;t0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this},h.prototype.drawShape=function(t,e,i,r){var s=new T(t,e,i,r);return this.graphicsData.push(s),this.dirty++,this},h.prototype.drawHole=function(t,e){if(!this.graphicsData.length)return null;var i=new T(t,null,null,e),r=this.graphicsData[this.graphicsData.length-1];return i.lineStyle=r.lineStyle,r.holes.push(i),this.dirty++,this},h.prototype.destroy=function(t){n.prototype.destroy.call(this,t);for(var e=0;e0&&(s=(i=this.batches[this.batches.length-1]).style);for(var n=this.shapeIndex;n0&&(i=null)),i||((i=P.pop()||new _).begin(u,c,d),this.batches.push(i),s=u);var f=this.points.length/2;0===l?this.processFill(h):this.processLine(h);var y=this.points.length/2-f;this.addUvs(this.points,t,u.texture,f,y,u.matrix)}}}if(i){var g=this.indices.length,v=this.points.length/2;i.end(g,v),this.indicesUint16=new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}else this.batchable=!0}}else this.batchable=!0},h.prototype._compareStyles=function(t,e){return!(!t||!e)&&(t.texture.baseTexture===e.texture.baseTexture&&(t.color+t.alpha===e.color+e.alpha&&!!t.native==!!e.native))},h.prototype.validateBatching=function(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(var t=0,e=this.graphicsData.length;t0&&((h=M.pop())||((h=new t.BatchDrawCall).textures=new t.BatchTextureArray),this.drawCalls.push(h)),h.start=c,h.size=0,h.textures.count=0,h.type=p),g.touched=1,g._batchEnabled=e,g._batchLocation=a,g.wrapMode=10497,h.textures.elements[h.textures.count++]=g,a++)),h.size+=f.size,c+=f.size,l=g._batchLocation,this.addColors(s,y.color,y.alpha,f.attribSize),this.addTextureIds(n,l,f.attribSize)}t.BaseTexture._globalBatch=e,this.packAttributes()},h.prototype.packAttributes=function(){for(var t=this.points,e=this.uvs,i=this.colors,r=this.textureIds,s=new ArrayBuffer(3*t.length*4),n=new Float32Array(s),h=new Uint32Array(s),a=0,o=0;o>16)+(65280&e)+((255&e)<<16),h=(0,i.premultiplyTint)(n,r);s-- >0;)t.push(h)},h.prototype.addTextureIds=function(t,e,i){for(;i-- >0;)t.push(e)},h.prototype.addUvs=function(t,e,i,r,s,n){for(var h=0,a=e.length,o=i.frame;h0&&e.alpha>0;return u?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._lineStyle,{visible:u},e)):this._lineStyle.reset(),this},n.prototype.startPoly=function(){if(this.currentPath){var t=this.currentPath.points,i=this.currentPath.points.length;i>2&&(this.drawShape(this.currentPath),this.currentPath=new e.Polygon,this.currentPath.closeStroke=!1,this.currentPath.points.push(t[i-2],t[i-1]))}else this.currentPath=new e.Polygon,this.currentPath.closeStroke=!1},n.prototype.finishPoly=function(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)},n.prototype.moveTo=function(t,e){return this.startPoly(),this.currentPath.points[0]=t,this.currentPath.points[1]=e,this},n.prototype.lineTo=function(t,e){this.currentPath||this.moveTo(0,0);var i=this.currentPath.points,r=i[i.length-2],s=i[i.length-1];return r===t&&s===e||i.push(t,e),this},n.prototype._initCurve=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.currentPath?0===this.currentPath.points.length&&(this.currentPath.points=[t,e]):this.moveTo(t,e)},n.prototype.quadraticCurveTo=function(t,e,i,r){this._initCurve();var s=this.currentPath.points;return 0===s.length&&this.moveTo(0,0),S.curveTo(t,e,i,r,s),this},n.prototype.bezierCurveTo=function(t,e,i,r,s,n){return this._initCurve(),m.curveTo(t,e,i,r,s,n,this.currentPath.points),this},n.prototype.arcTo=function(t,e,i,r,s){this._initCurve(t,e);var n=this.currentPath.points,h=x.curveTo(t,e,i,r,s,n);if(h){var a=h.cx,o=h.cy,l=h.radius,u=h.startAngle,p=h.endAngle,c=h.anticlockwise;this.arc(a,o,l,u,p,c)}return this},n.prototype.arc=function(t,i,r,s,n,h){if(void 0===h&&(h=!1),s===n)return this;if(!h&&n<=s?n+=e.PI_2:h&&s<=n&&(s+=e.PI_2),0===n-s)return this;var a=t+Math.cos(s)*r,o=i+Math.sin(s)*r,l=this.geometry.closePointEps,u=this.currentPath?this.currentPath.points:null;if(u){var p=Math.abs(u[u.length-2]-a),c=Math.abs(u[u.length-1]-o);p0;return a?(e.matrix&&(e.matrix=e.matrix.clone(),e.matrix.invert()),Object.assign(this._fillStyle,{visible:a},e)):this._fillStyle.reset(),this},n.prototype.endFill=function(){return this.finishPoly(),this._fillStyle.reset(),this},n.prototype.drawRect=function(t,i,r,s){return this.drawShape(new e.Rectangle(t,i,r,s))},n.prototype.drawRoundedRect=function(t,i,r,s,n){return this.drawShape(new e.RoundedRectangle(t,i,r,s,n))},n.prototype.drawCircle=function(t,i,r){return this.drawShape(new e.Circle(t,i,r))},n.prototype.drawEllipse=function(t,i,r,s){return this.drawShape(new e.Ellipse(t,i,r,s))},n.prototype.drawPolygon=function(t){var i=arguments,r=t,s=!0;if(r.points&&(s=r.closeStroke,r=r.points),!Array.isArray(r)){r=new Array(arguments.length);for(var n=0;n>16&255)/255*s,n.tint[1]=(r>>8&255)/255*s,n.tint[2]=(255&r)/255*s,n.tint[3]=s,t.shader.bind(e),t.geometry.bind(i,e),t.state.set(this.state);for(var a=0,o=h.length;a>16)+(65280&n)+((255&n)<<16)}}},n.prototype.calculateVertices=function(){if(this._transformID!==this.transform._worldID){this._transformID=this.transform._worldID;for(var t=this.transform.worldTransform,e=t.a,i=t.b,r=t.c,s=t.d,n=t.tx,h=t.ty,a=this.geometry.points,o=this.vertexData,l=0,u=0;u=r&&n.x=s&&n.y>16)+(65280&t)+((255&t)<<16)},a.texture.get=function(){return this._texture},a.texture.set=function(t){this._texture!==t&&(this._texture&&this._texture.off("update",this._onTextureUpdate,this),this._texture=t||i.Texture.EMPTY,this._cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,t&&(t.baseTexture.valid?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))},Object.defineProperties(u.prototype,a),u}(s.Container);exports.Sprite=u; },{"@pixi/math":"oNQC","@pixi/utils":"G5Tu","@pixi/core":"p2j5","@pixi/constants":"LQBK","@pixi/display":"nL3p","@pixi/settings":"t4Uo"}],"T62s":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TextStyle=exports.TextMetrics=exports.Text=exports.TEXT_GRADIENT=void 0;var t=require("@pixi/sprite"),e=require("@pixi/core"),i=require("@pixi/settings"),n=require("@pixi/math"),r=require("@pixi/utils"),o={LINEAR_VERTICAL:0,LINEAR_HORIZONTAL:1};exports.TEXT_GRADIENT=o;var s={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:o.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100,leading:0},a=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],h=function(t){this.styleID=0,this.reset(),u(this,t,t)};exports.TextStyle=h;var l={align:{configurable:!0},breakWords:{configurable:!0},dropShadow:{configurable:!0},dropShadowAlpha:{configurable:!0},dropShadowAngle:{configurable:!0},dropShadowBlur:{configurable:!0},dropShadowColor:{configurable:!0},dropShadowDistance:{configurable:!0},fill:{configurable:!0},fillGradientType:{configurable:!0},fillGradientStops:{configurable:!0},fontFamily:{configurable:!0},fontSize:{configurable:!0},fontStyle:{configurable:!0},fontVariant:{configurable:!0},fontWeight:{configurable:!0},letterSpacing:{configurable:!0},lineHeight:{configurable:!0},leading:{configurable:!0},lineJoin:{configurable:!0},miterLimit:{configurable:!0},padding:{configurable:!0},stroke:{configurable:!0},strokeThickness:{configurable:!0},textBaseline:{configurable:!0},trim:{configurable:!0},whiteSpace:{configurable:!0},wordWrap:{configurable:!0},wordWrapWidth:{configurable:!0}};function f(t){return"number"==typeof t?(0,r.hex2string)(t):("string"==typeof t&&0===t.indexOf("0x")&&(t=t.replace("0x","#")),t)}function d(t){if(Array.isArray(t)){for(var e=0;e=0;i--){var n=e[i].trim();!/([\"\'])[^\'\"]+\1/.test(n)&&a.indexOf(n)<0&&(n='"'+n+'"'),e[i]=n}return this.fontStyle+" "+this.fontVariant+" "+this.fontWeight+" "+t+" "+e.join(",")},Object.defineProperties(h.prototype,l);var g=function(t,e,i,n,r,o,s,a,h){this.text=t,this.style=e,this.width=i,this.height=n,this.lines=r,this.lineWidths=o,this.lineHeight=s,this.maxLineWidth=a,this.fontProperties=h};exports.TextMetrics=g,g.measureText=function(t,e,i,n){void 0===n&&(n=g._canvas),i=null==i?e.wordWrap:i;var r=e.toFontString(),o=g.measureFont(r);0===o.fontSize&&(o.fontSize=e.fontSize,o.ascent=e.fontSize);var s=n.getContext("2d");s.font=r;for(var a=(i?g.wordWrap(t,e,n):t).split(/(?:\r\n|\r|\n)/),h=new Array(a.length),l=0,f=0;fu)if(""!==o&&(s+=g.addLine(o),o="",r=0),g.canBreakWords(S,e.breakWords))for(var v=S.split(""),m=0;mu&&(s+=g.addLine(o),c=!1,o="",r=0),o+=b,r+=D}else{o.length>0&&(s+=g.addLine(o),o="",r=0);var W=_===p.length-1;s+=g.addLine(S,!W),c=!1,o="",r=0}else x+r>u&&(c=!1,s+=g.addLine(o),o="",r=0),(o.length>0||!g.isBreakingSpace(S)||c)&&(o+=S,r+=x)}return s+=g.addLine(o,!1)},g.addLine=function(t,e){return void 0===e&&(e=!0),t=g.trimRight(t),t=e?t+"\n":t},g.getFromCache=function(t,e,i,n){var r=i[t];if(void 0===r){var o=t.length*e;r=n.measureText(t).width+o,i[t]=r}return r},g.collapseSpaces=function(t){return"normal"===t||"pre-line"===t},g.collapseNewlines=function(t){return"normal"===t},g.trimRight=function(t){if("string"!=typeof t)return"";for(var e=t.length-1;e>=0;e--){var i=t[e];if(!g.isBreakingSpace(i))break;t=t.slice(0,-1)}return t},g.isNewline=function(t){return"string"==typeof t&&g._newlines.indexOf(t.charCodeAt(0))>=0},g.isBreakingSpace=function(t){return"string"==typeof t&&g._breakingSpaces.indexOf(t.charCodeAt(0))>=0},g.tokenize=function(t){var e=[],i="";if("string"!=typeof t)return e;for(var n=0;ns;--d){for(var _=0;_0};var u=function(t){var i=this;this.limiter=new n(e.settings.UPLOADS_PER_FRAME),this.renderer=t,this.uploadHookHelper=null,this.queue=[],this.addHooks=[],this.uploadHooks=[],this.completes=[],this.ticking=!1,this.delayedTick=function(){i.queue&&i.prepareItems()},this.registerFindHook(d),this.registerFindHook(f),this.registerFindHook(a),this.registerFindHook(h),this.registerFindHook(p),this.registerUploadHook(l),this.registerUploadHook(c)};function a(e,i){var r=!1;if(e&&e._textures&&e._textures.length)for(var s=0;s=0;r--)this.add(e.children[r]);return this},u.prototype.destroy=function(){this.ticking&&r.Ticker.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null};var x=function(e){function t(t){e.call(this,t),this.uploadHookHelper=this.renderer,this.registerFindHook(g),this.registerUploadHook(k),this.registerUploadHook(m)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(u);function k(e,i){return i instanceof t.BaseTexture&&(i._glTextures[e.CONTEXT_UID]||e.texture.bind(i),!0)}function m(e,t){if(!(t instanceof i.Graphics))return!1;var r=t.geometry;t.finishPoly(),r.updateBatches();for(var s=r.batches,o=0;o0||t.responseType===r.XHR_RESPONSE_TYPE.BUFFER)?i=f:i===T&&(i=p),(i/100|0)===O){if(this.xhrType===r.XHR_RESPONSE_TYPE.TEXT)this.data=e,this.type=r.TYPE.TEXT;else if(this.xhrType===r.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(e),this.type=r.TYPE.JSON}catch(o){return void this.abort("Error trying to parse loaded json: "+o)}else if(this.xhrType===r.XHR_RESPONSE_TYPE.DOCUMENT)try{if(window.DOMParser){var s=new DOMParser;this.data=s.parseFromString(e,"text/xml")}else{var n=document.createElement("div");n.innerHTML=e,this.data=n}this.type=r.TYPE.XML}catch(o){return void this.abort("Error trying to parse loaded xml: "+o)}else this.data=t.response||e;this.complete()}else this.abort("["+t.status+"] "+t.statusText+": "+t.responseURL)},i._determineCrossOrigin=function(e,r){if(0===e.indexOf("data:"))return"";if(window.origin!==window.location.origin)return"anonymous";r=r||window.location,_||(_=document.createElement("a")),_.href=e;var i=!(e=(0,t.default)(_.href,{strictMode:!0})).port&&""===r.port||e.port===r.port,s=e.protocol?e.protocol+":":"";return e.host===r.hostname&&i&&s===r.protocol?"":"anonymous"},i._determineXhrType=function(){return r._xhrTypeMap[this.extension]||r.XHR_RESPONSE_TYPE.TEXT},i._determineLoadType=function(){return r._loadTypeMap[this.extension]||r.LOAD_TYPE.XHR},i._getExtension=function(){var t=this.url,e="";if(this.isDataUrl){var r=t.indexOf("/");e=t.substring(r+1,t.indexOf(";",r))}else{var i=t.indexOf("?"),s=t.indexOf("#"),n=Math.min(i>-1?i:t.length,s>-1?s:t.length);e=(t=t.substring(0,n)).substring(t.lastIndexOf(".")+1)}return e.toLowerCase()},i._getMimeFromXhrType=function(t){switch(t){case r.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case r.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case r.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case r.XHR_RESPONSE_TYPE.JSON:return"application/json";case r.XHR_RESPONSE_TYPE.DEFAULT:case r.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},l(r,[{key:"isDataUrl",get:function(){return this._hasFlag(r.STATUS_FLAGS.DATA_URL)}},{key:"isComplete",get:function(){return this._hasFlag(r.STATUS_FLAGS.COMPLETE)}},{key:"isLoading",get:function(){return this._hasFlag(r.STATUS_FLAGS.LOADING)}}]),r}();function P(t,e,r){e&&0===e.indexOf(".")&&(e=e.substring(1)),e&&(t[e]=r)}function S(t){return t.toString().replace("object ","")}exports.Resource=m,m.STATUS_FLAGS={NONE:0,DATA_URL:1,COMPLETE:2,LOADING:4},m.TYPE={UNKNOWN:0,JSON:1,XML:2,IMAGE:3,AUDIO:4,VIDEO:5,TEXT:6},m.LOAD_TYPE={XHR:1,IMAGE:2,AUDIO:3,VIDEO:4},m.XHR_RESPONSE_TYPE={DEFAULT:"text",BUFFER:"arraybuffer",BLOB:"blob",DOCUMENT:"document",JSON:"json",TEXT:"text"},m._loadTypeMap={gif:m.LOAD_TYPE.IMAGE,png:m.LOAD_TYPE.IMAGE,bmp:m.LOAD_TYPE.IMAGE,jpg:m.LOAD_TYPE.IMAGE,jpeg:m.LOAD_TYPE.IMAGE,tif:m.LOAD_TYPE.IMAGE,tiff:m.LOAD_TYPE.IMAGE,webp:m.LOAD_TYPE.IMAGE,tga:m.LOAD_TYPE.IMAGE,svg:m.LOAD_TYPE.IMAGE,"svg+xml":m.LOAD_TYPE.IMAGE,mp3:m.LOAD_TYPE.AUDIO,ogg:m.LOAD_TYPE.AUDIO,wav:m.LOAD_TYPE.AUDIO,mp4:m.LOAD_TYPE.VIDEO,webm:m.LOAD_TYPE.VIDEO},m._xhrTypeMap={xhtml:m.XHR_RESPONSE_TYPE.DOCUMENT,html:m.XHR_RESPONSE_TYPE.DOCUMENT,htm:m.XHR_RESPONSE_TYPE.DOCUMENT,xml:m.XHR_RESPONSE_TYPE.DOCUMENT,tmx:m.XHR_RESPONSE_TYPE.DOCUMENT,svg:m.XHR_RESPONSE_TYPE.DOCUMENT,tsx:m.XHR_RESPONSE_TYPE.DOCUMENT,gif:m.XHR_RESPONSE_TYPE.BLOB,png:m.XHR_RESPONSE_TYPE.BLOB,bmp:m.XHR_RESPONSE_TYPE.BLOB,jpg:m.XHR_RESPONSE_TYPE.BLOB,jpeg:m.XHR_RESPONSE_TYPE.BLOB,tif:m.XHR_RESPONSE_TYPE.BLOB,tiff:m.XHR_RESPONSE_TYPE.BLOB,webp:m.XHR_RESPONSE_TYPE.BLOB,tga:m.XHR_RESPONSE_TYPE.BLOB,json:m.XHR_RESPONSE_TYPE.JSON,text:m.XHR_RESPONSE_TYPE.TEXT,txt:m.XHR_RESPONSE_TYPE.TEXT,ttf:m.XHR_RESPONSE_TYPE.BUFFER,otf:m.XHR_RESPONSE_TYPE.BUFFER},m.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==";var A="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function b(t){for(var e="",r=0;r>2,s[1]=(3&i[0])<<4|i[1]>>4,s[2]=(15&i[1])<<2|i[2]>>6,s[3]=63&i[2],r-(t.length-1)){case 2:s[3]=64,s[2]=64;break;case 1:s[3]=64}for(var o=0;o16384&&(o=16384),this._properties=[!1,!0,!1,!1,!1],this._maxSize=e,this._batchSize=o,this._buffers=null,this._bufferUpdateIDs=[],this._updateID=0,this.interactiveChildren=!1,this.blendMode=t.BLEND_MODES.NORMAL,this.autoResize=s,this.roundPixels=!0,this.baseTexture=null,this.setProperties(r),this._tint=0,this.tintRgb=new Float32Array(4),this.tint=16777215}i&&(r.__proto__=i),r.prototype=Object.create(i&&i.prototype),r.prototype.constructor=r;var o={tint:{configurable:!0}};return r.prototype.setProperties=function(t){t&&(this._properties[0]="vertices"in t||"scale"in t?!!t.vertices||!!t.scale:this._properties[0],this._properties[1]="position"in t?!!t.position:this._properties[1],this._properties[2]="rotation"in t?!!t.rotation:this._properties[2],this._properties[3]="uvs"in t?!!t.uvs:this._properties[3],this._properties[4]="tint"in t||"alpha"in t?!!t.tint||!!t.alpha:this._properties[4])},r.prototype.updateTransform=function(){this.displayObjectUpdateTransform()},o.tint.get=function(){return this._tint},o.tint.set=function(t){this._tint=t,(0,e.hex2rgb)(t,this.tintRgb)},r.prototype.render=function(t){var e=this;this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable&&(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.valid||this.baseTexture.once("update",function(){return e.onChildrenChange(0)})),t.batch.setObjectRenderer(t.plugins.particle),t.plugins.particle.render(this))},r.prototype.onChildrenChange=function(t){for(var e=Math.floor(t/this._batchSize);this._bufferUpdateIDs.lengthr&&!t.autoResize&&(a=r);var n=t._buffers;n||(n=t._buffers=this.generateBuffers(t));var h=i[0]._texture.baseTexture;this.renderer.state.setBlendMode((0,e.correctBlendMode)(t.blendMode,h.alphaMode));var u=s.gl,p=t.worldTransform.copyTo(this.tempMatrix);p.prepend(s.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=p.toArray(!0),this.shader.uniforms.uColor=(0,e.premultiplyRgba)(t.tintRgb,t.worldAlpha,this.shader.uniforms.uColor,h.alphaMode),this.shader.uniforms.uSampler=h,this.renderer.shader.bind(this.shader);for(var d=!1,l=0,c=0;lo&&(f=o),c>=n.length&&n.push(this._generateOneMoreBuffer(t));var y=n[c];y.uploadDynamic(i,l,f);var v=t._bufferUpdateIDs[c]||0;(d=d||y._updateID0,p=h.alpha,d=p<1&&u?(0,e.premultiplyTint)(h._tintRGB,p):h._tintRGB+(255*p<<24);o[a]=d,o[a+s]=d,o[a+2*s]=d,o[a+3*s]=d,a+=4*s}},s.prototype.destroy=function(){i.prototype.destroy.call(this),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null},s}(r.ObjectRenderer);exports.ParticleRenderer=u; },{"@pixi/constants":"LQBK","@pixi/utils":"G5Tu","@pixi/display":"nL3p","@pixi/core":"p2j5","@pixi/math":"oNQC"}],"LQzI":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SpritesheetLoader=exports.Spritesheet=void 0;var e=require("@pixi/math"),t=require("@pixi/core"),s=require("@pixi/utils"),r=require("@pixi/loaders"),i=function(e,t,s){void 0===s&&(s=null),this.baseTexture=e,this.textures={},this.animations={},this.data=t,this.resolution=this._updateResolution(s||(this.baseTexture.resource?this.baseTexture.resource.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null};exports.Spritesheet=i;var o={BATCH_SIZE:{configurable:!0}};o.BATCH_SIZE.get=function(){return 1e3},i.prototype._updateResolution=function(e){var t=this.data.meta.scale,r=(0,s.getResolutionOfUrl)(e,null);return null===r&&(r=void 0!==t?parseFloat(t):1),1!==r&&this.baseTexture.setResolution(r),r},i.prototype.parse=function(e){this._batchIndex=0,this._callback=e,this._frameKeys.length<=i.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()},i.prototype._processFrames=function(s){for(var r=s,o=i.BATCH_SIZE;r-s=i&&n.x=o&&n.y0&&n.x>l&&(++_,(0,a.removeItems)(o,1+d-_,1+b-d),b=d,d=-1,h.push(m),p=Math.max(p,m),x++,n.x=0,n.y+=t.lineHeight,f=null))}else h.push(c),p=Math.max(p,c),++x,++_,n.x=0,n.y+=t.lineHeight,f=null}var O=g.charAt(g.length-1);"\r"!==O&&"\n"!==O&&(/(?:\s)/.test(O)&&(c=m),h.push(c),p=Math.max(p,c));for(var E=[],I=0;I<=x;I++){var H=0;"right"===this._font.align?H=p-h[I]:"center"===this._font.align&&(H=(p-h[I])/2),E.push(H)}for(var L=o.length,B=this.tint,S=0;S=0?t:16777215,this.dirty=!0},o.align.get=function(){return this._font.align},o.align.set=function(t){this._font.align=t||"left",this.dirty=!0},o.anchor.get=function(){return this._anchor},o.anchor.set=function(t){"number"==typeof t?this._anchor.set(t):this._anchor.copyFrom(t)},o.font.get=function(){return this._font},o.font.set=function(t){t&&("string"==typeof t?(t=t.split(" "),this._font.name=1===t.length?t[0]:t.slice(1).join(" "),this._font.size=t.length>=2?parseInt(t[0],10):s.fonts[this._font.name].size):(this._font.name=t.name,this._font.size="number"==typeof t.size?t.size:parseInt(t.size,10)),this.dirty=!0)},o.text.get=function(){return this._text},o.text.set=function(t){t=String(null==t?"":t),this._text!==t&&(this._text=t,this.dirty=!0)},o.maxWidth.get=function(){return this._maxWidth},o.maxWidth.set=function(t){this._maxWidth!==t&&(this._maxWidth=t,this.dirty=!0)},o.maxLineHeight.get=function(){return this.validate(),this._maxLineHeight},o.textWidth.get=function(){return this.validate(),this._textWidth},o.letterSpacing.get=function(){return this._letterSpacing},o.letterSpacing.set=function(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.dirty=!0)},o.textHeight.get=function(){return this.validate(),this._textHeight},s.registerFont=function(e,r){var o={},h=e.getElementsByTagName("info")[0],g=e.getElementsByTagName("common")[0],u=e.getElementsByTagName("page"),l=(0,a.getResolutionOfUrl)(u[0].getAttribute("file"),n.settings.RESOLUTION),f={};o.font=h.getAttribute("face"),o.size=parseInt(h.getAttribute("size"),10),o.lineHeight=parseInt(g.getAttribute("lineHeight"),10)/l,o.chars={},r instanceof t.Texture&&(r=[r]);for(var c=0;c=i&&(e=t-o-1),u+=a=a.replace("%value%",r[e]),u+="\n"}return s=(s=s.replace("%blur%",u)).replace("%size%",t)}var u=function(t){function r(r,n,l,u,o){var a=i(o=o||5,r),h=s(o);t.call(this,a,h),this.horizontal=r,this.resolution=u||e.settings.RESOLUTION,this._quality=0,this.quality=l||4,this.blur=n||8}t&&(r.__proto__=t),r.prototype=Object.create(t&&t.prototype),r.prototype.constructor=r;var n={blur:{configurable:!0},quality:{configurable:!0}};return r.prototype.apply=function(t,e,r,i){if(r?this.horizontal?this.uniforms.strength=1/r.width*(r.width/e.width):this.uniforms.strength=1/r.height*(r.height/e.height):this.horizontal?this.uniforms.strength=1/t.renderer.width*(t.renderer.width/e.width):this.uniforms.strength=1/t.renderer.height*(t.renderer.height/e.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,1===this.passes)t.applyFilter(this,e,r,i);else{var n=t.getFilterTexture(),l=t.renderer,s=e,u=n;this.state.blend=!1,t.applyFilter(this,s,u,!1);for(var o=1;o 0.0) {\n c.rgb /= c.a;\n }\n\n vec4 result;\n\n result.r = (m[0] * c.r);\n result.r += (m[1] * c.g);\n result.r += (m[2] * c.b);\n result.r += (m[3] * c.a);\n result.r += m[4];\n\n result.g = (m[5] * c.r);\n result.g += (m[6] * c.g);\n result.g += (m[7] * c.b);\n result.g += (m[8] * c.a);\n result.g += m[9];\n\n result.b = (m[10] * c.r);\n result.b += (m[11] * c.g);\n result.b += (m[12] * c.b);\n result.b += (m[13] * c.a);\n result.b += m[14];\n\n result.a = (m[15] * c.r);\n result.a += (m[16] * c.g);\n result.a += (m[17] * c.b);\n result.a += (m[18] * c.a);\n result.a += m[19];\n\n vec3 rgb = mix(c.rgb, result.rgb, uAlpha);\n\n // Premultiply alpha again.\n rgb *= result.a;\n\n gl_FragColor = vec4(rgb, result.a);\n}\n",o=function(o){function n(){var n={m:new Float32Array([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]),uAlpha:1};o.call(this,t.defaultFilterVertex,r,n),this.alpha=1}o&&(n.__proto__=o),n.prototype=Object.create(o&&o.prototype),n.prototype.constructor=n;var e={matrix:{configurable:!0},alpha:{configurable:!0}};return n.prototype._loadMatrix=function(t,r){void 0===r&&(r=!1);var o=t;r&&(this._multiply(o,this.uniforms.m,t),o=this._colorMatrix(o)),this.uniforms.m=o},n.prototype._multiply=function(t,r,o){return t[0]=r[0]*o[0]+r[1]*o[5]+r[2]*o[10]+r[3]*o[15],t[1]=r[0]*o[1]+r[1]*o[6]+r[2]*o[11]+r[3]*o[16],t[2]=r[0]*o[2]+r[1]*o[7]+r[2]*o[12]+r[3]*o[17],t[3]=r[0]*o[3]+r[1]*o[8]+r[2]*o[13]+r[3]*o[18],t[4]=r[0]*o[4]+r[1]*o[9]+r[2]*o[14]+r[3]*o[19]+r[4],t[5]=r[5]*o[0]+r[6]*o[5]+r[7]*o[10]+r[8]*o[15],t[6]=r[5]*o[1]+r[6]*o[6]+r[7]*o[11]+r[8]*o[16],t[7]=r[5]*o[2]+r[6]*o[7]+r[7]*o[12]+r[8]*o[17],t[8]=r[5]*o[3]+r[6]*o[8]+r[7]*o[13]+r[8]*o[18],t[9]=r[5]*o[4]+r[6]*o[9]+r[7]*o[14]+r[8]*o[19]+r[9],t[10]=r[10]*o[0]+r[11]*o[5]+r[12]*o[10]+r[13]*o[15],t[11]=r[10]*o[1]+r[11]*o[6]+r[12]*o[11]+r[13]*o[16],t[12]=r[10]*o[2]+r[11]*o[7]+r[12]*o[12]+r[13]*o[17],t[13]=r[10]*o[3]+r[11]*o[8]+r[12]*o[13]+r[13]*o[18],t[14]=r[10]*o[4]+r[11]*o[9]+r[12]*o[14]+r[13]*o[19]+r[14],t[15]=r[15]*o[0]+r[16]*o[5]+r[17]*o[10]+r[18]*o[15],t[16]=r[15]*o[1]+r[16]*o[6]+r[17]*o[11]+r[18]*o[16],t[17]=r[15]*o[2]+r[16]*o[7]+r[17]*o[12]+r[18]*o[17],t[18]=r[15]*o[3]+r[16]*o[8]+r[17]*o[13]+r[18]*o[18],t[19]=r[15]*o[4]+r[16]*o[9]+r[17]*o[14]+r[18]*o[19]+r[19],t},n.prototype._colorMatrix=function(t){var r=new Float32Array(t);return r[4]/=255,r[9]/=255,r[14]/=255,r[19]/=255,r},n.prototype.brightness=function(t,r){var o=[t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0];this._loadMatrix(o,r)},n.prototype.greyscale=function(t,r){var o=[t,t,t,0,0,t,t,t,0,0,t,t,t,0,0,0,0,0,1,0];this._loadMatrix(o,r)},n.prototype.blackAndWhite=function(t){this._loadMatrix([.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],t)},n.prototype.hue=function(t,r){t=(t||0)/180*Math.PI;var o=Math.cos(t),n=Math.sin(t),e=1/3,a=(0,Math.sqrt)(e),i=[o+(1-o)*e,e*(1-o)-a*n,e*(1-o)+a*n,0,0,e*(1-o)+a*n,o+e*(1-o),e*(1-o)-a*n,0,0,e*(1-o)-a*n,e*(1-o)+a*n,o+e*(1-o),0,0,0,0,0,1,0];this._loadMatrix(i,r)},n.prototype.contrast=function(t,r){var o=(t||0)+1,n=-.5*(o-1),e=[o,0,0,0,n,0,o,0,0,n,0,0,o,0,n,0,0,0,1,0];this._loadMatrix(e,r)},n.prototype.saturate=function(t,r){void 0===t&&(t=0);var o=2*t/3+1,n=-.5*(o-1),e=[o,n,n,0,0,n,o,n,0,0,n,n,o,0,0,0,0,0,1,0];this._loadMatrix(e,r)},n.prototype.desaturate=function(){this.saturate(-1)},n.prototype.negative=function(t){this._loadMatrix([-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],t)},n.prototype.sepia=function(t){this._loadMatrix([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],t)},n.prototype.technicolor=function(t){this._loadMatrix([1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],t)},n.prototype.polaroid=function(t){this._loadMatrix([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],t)},n.prototype.toBGR=function(t){this._loadMatrix([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],t)},n.prototype.kodachrome=function(t){this._loadMatrix([1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],t)},n.prototype.browni=function(t){this._loadMatrix([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],t)},n.prototype.vintage=function(t){this._loadMatrix([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],t)},n.prototype.colorTone=function(t,r,o,n,e){var a=((o=o||16770432)>>16&255)/255,i=(o>>8&255)/255,l=(255&o)/255,u=((n=n||3375104)>>16&255)/255,p=(n>>8&255)/255,s=(255&n)/255,c=[.3,.59,.11,0,0,a,i,l,t=t||.2,0,u,p,s,r=r||.15,0,a-u,i-p,l-s,0,0];this._loadMatrix(c,e)},n.prototype.night=function(t,r){var o=[-2*(t=t||.1),-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0];this._loadMatrix(o,r)},n.prototype.predator=function(t,r){var o=[11.224130630493164*t,-4.794486999511719*t,-2.8746118545532227*t,0*t,.40342438220977783*t,-3.6330697536468506*t,9.193157196044922*t,-2.951810836791992*t,0*t,-1.316135048866272*t,-3.2184197902679443*t,-4.2375030517578125*t,7.476448059082031*t,0*t,.8044459223747253*t,0,0,0,1,0];this._loadMatrix(o,r)},n.prototype.lsd=function(t){this._loadMatrix([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],t)},n.prototype.reset=function(){this._loadMatrix([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],!1)},e.matrix.get=function(){return this.uniforms.m},e.matrix.set=function(t){this.uniforms.m=t},e.alpha.get=function(){return this.uniforms.uAlpha},e.alpha.set=function(t){this.uniforms.uAlpha=t},Object.defineProperties(n.prototype,e),n}(t.Filter);exports.ColorMatrixFilter=o,o.prototype.grayscale=o.prototype.greyscale; },{"@pixi/core":"p2j5"}],"rpU2":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DisplacementFilter=void 0;var t=require("@pixi/core"),r=require("@pixi/math"),e="attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\nuniform mat3 filterMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vFilterCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n\tgl_Position = filterVertexPosition();\n\tvTextureCoord = filterTextureCoord();\n\tvFilterCoord = ( filterMatrix * vec3( vTextureCoord, 1.0) ).xy;\n}\n",i="varying vec2 vFilterCoord;\nvarying vec2 vTextureCoord;\n\nuniform vec2 scale;\nuniform mat2 rotation;\nuniform sampler2D uSampler;\nuniform sampler2D mapSampler;\n\nuniform highp vec4 inputSize;\nuniform vec4 inputClamp;\n\nvoid main(void)\n{\n vec4 map = texture2D(mapSampler, vFilterCoord);\n\n map -= 0.5;\n map.xy = scale * inputSize.zw * (rotation * map.xy);\n\n gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), inputClamp.xy, inputClamp.zw));\n}\n",n=function(t){function n(n,o){var a=new r.Matrix;n.renderable=!1,t.call(this,e,i,{mapSampler:n._texture,filterMatrix:a,scale:{x:1,y:1},rotation:new Float32Array([1,0,0,1])}),this.maskSprite=n,this.maskMatrix=a,null==o&&(o=20),this.scale=new r.Point(o,o)}t&&(n.__proto__=t),n.prototype=Object.create(t&&t.prototype),n.prototype.constructor=n;var o={map:{configurable:!0}};return n.prototype.apply=function(t,r,e,i){this.uniforms.filterMatrix=t.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y;var n=this.maskSprite.transform.worldTransform,o=Math.sqrt(n.a*n.a+n.b*n.b),a=Math.sqrt(n.c*n.c+n.d*n.d);0!==o&&0!==a&&(this.uniforms.rotation[0]=n.a/o,this.uniforms.rotation[1]=n.b/o,this.uniforms.rotation[2]=n.c/a,this.uniforms.rotation[3]=n.d/a),t.applyFilter(this,r,e,i)},o.map.get=function(){return this.uniforms.mapSampler},o.map.set=function(t){this.uniforms.mapSampler=t},Object.defineProperties(n.prototype,o),n}(t.Filter);exports.DisplacementFilter=n; },{"@pixi/core":"p2j5","@pixi/math":"oNQC"}],"zKIa":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FXAAFilter=void 0;var n=require("@pixi/core"),e="\nattribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vFragCoord;\n\nuniform vec4 inputPixel;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvoid texcoords(vec2 fragCoord, vec2 inverseVP,\n out vec2 v_rgbNW, out vec2 v_rgbNE,\n out vec2 v_rgbSW, out vec2 v_rgbSE,\n out vec2 v_rgbM) {\n v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP;\n v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP;\n v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP;\n v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP;\n v_rgbM = vec2(fragCoord * inverseVP);\n}\n\nvoid main(void) {\n\n gl_Position = filterVertexPosition();\n\n vFragCoord = aVertexPosition * outputFrame.zw;\n\n texcoords(vFragCoord, inputPixel.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n}\n",r='varying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vFragCoord;\nuniform sampler2D uSampler;\nuniform highp vec4 inputPixel;\n\n\n/**\n Basic FXAA implementation based on the code on geeks3d.com with the\n modification that the texture2DLod stuff was removed since it\'s\n unsupported by WebGL.\n\n --\n\n From:\n https://github.com/mitsuhiko/webgl-meincraft\n\n Copyright (c) 2011 by Armin Ronacher.\n\n Some rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are\n met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n\n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials provided\n with the distribution.\n\n * The names of the contributors may not be used to endorse or\n promote products derived from this software without specific\n prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#ifndef FXAA_REDUCE_MIN\n#define FXAA_REDUCE_MIN (1.0/ 128.0)\n#endif\n#ifndef FXAA_REDUCE_MUL\n#define FXAA_REDUCE_MUL (1.0 / 8.0)\n#endif\n#ifndef FXAA_SPAN_MAX\n#define FXAA_SPAN_MAX 8.0\n#endif\n\n//optimized version for mobile, where dependent\n//texture reads can be a bottleneck\nvec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 inverseVP,\n vec2 v_rgbNW, vec2 v_rgbNE,\n vec2 v_rgbSW, vec2 v_rgbSE,\n vec2 v_rgbM) {\n vec4 color;\n vec3 rgbNW = texture2D(tex, v_rgbNW).xyz;\n vec3 rgbNE = texture2D(tex, v_rgbNE).xyz;\n vec3 rgbSW = texture2D(tex, v_rgbSW).xyz;\n vec3 rgbSE = texture2D(tex, v_rgbSE).xyz;\n vec4 texColor = texture2D(tex, v_rgbM);\n vec3 rgbM = texColor.xyz;\n vec3 luma = vec3(0.299, 0.587, 0.114);\n float lumaNW = dot(rgbNW, luma);\n float lumaNE = dot(rgbNE, luma);\n float lumaSW = dot(rgbSW, luma);\n float lumaSE = dot(rgbSE, luma);\n float lumaM = dot(rgbM, luma);\n float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n\n mediump vec2 dir;\n dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n\n float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *\n (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n\n float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);\n dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n dir * rcpDirMin)) * inverseVP;\n\n vec3 rgbA = 0.5 * (\n texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz +\n texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz);\n vec3 rgbB = rgbA * 0.5 + 0.25 * (\n texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz +\n texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz);\n\n float lumaB = dot(rgbB, luma);\n if ((lumaB < lumaMin) || (lumaB > lumaMax))\n color = vec4(rgbA, texColor.a);\n else\n color = vec4(rgbB, texColor.a);\n return color;\n}\n\nvoid main() {\n\n vec4 color;\n\n color = fxaa(uSampler, vFragCoord, inputPixel.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n\n gl_FragColor = color;\n}\n',o=function(n){function o(){n.call(this,e,r)}return n&&(o.__proto__=n),o.prototype=Object.create(n&&n.prototype),o.prototype.constructor=o,o}(n.Filter);exports.FXAAFilter=o; },{"@pixi/core":"p2j5"}],"nEkq":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.NoiseFilter=void 0;var e=require("@pixi/core"),o="precision highp float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform float uNoise;\nuniform float uSeed;\nuniform sampler2D uSampler;\n\nfloat rand(vec2 co)\n{\n return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main()\n{\n vec4 color = texture2D(uSampler, vTextureCoord);\n float randomValue = rand(gl_FragCoord.xy * uSeed);\n float diff = (randomValue - 0.5) * uNoise;\n\n // Un-premultiply alpha before applying the color matrix. See issue #3539.\n if (color.a > 0.0) {\n color.rgb /= color.a;\n }\n\n color.r += diff;\n color.g += diff;\n color.b += diff;\n\n // Premultiply alpha again.\n color.rgb *= color.a;\n\n gl_FragColor = color;\n}\n",r=function(r){function n(n,i){void 0===n&&(n=.5),void 0===i&&(i=Math.random()),r.call(this,e.defaultFilterVertex,o,{uNoise:0,uSeed:0}),this.noise=n,this.seed=i}r&&(n.__proto__=r),n.prototype=Object.create(r&&r.prototype),n.prototype.constructor=n;var i={noise:{configurable:!0},seed:{configurable:!0}};return i.noise.get=function(){return this.uniforms.uNoise},i.noise.set=function(e){this.uniforms.uNoise=e},i.seed.get=function(){return this.uniforms.uSeed},i.seed.set=function(e){this.uniforms.uSeed=e},Object.defineProperties(n.prototype,i),n}(e.Filter);exports.NoiseFilter=r; },{"@pixi/core":"p2j5"}],"fh0A":[function(require,module,exports) { "use strict";var t=require("@pixi/core"),a=require("@pixi/sprite"),e=require("@pixi/display"),i=require("@pixi/math"),s=require("@pixi/utils"),r=require("@pixi/settings"),n=new i.Matrix;e.DisplayObject.prototype._cacheAsBitmap=!1,e.DisplayObject.prototype._cacheData=!1;var h=function(){this.textureCacheId=null,this.originalRender=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalHitTest=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.sprite=null};Object.defineProperties(e.DisplayObject.prototype,{cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(t){var a;this._cacheAsBitmap!==t&&(this._cacheAsBitmap=t,t?(this._cacheData||(this._cacheData=new h),(a=this._cacheData).originalRender=this.render,a.originalRenderCanvas=this.renderCanvas,a.originalUpdateTransform=this.updateTransform,a.originalCalculateBounds=this.calculateBounds,a.originalGetLocalBounds=this.getLocalBounds,a.originalDestroy=this.destroy,a.originalContainsPoint=this.containsPoint,a.originalMask=this._mask,a.originalFilterArea=this.filterArea,this.render=this._renderCached,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):((a=this._cacheData).sprite&&this._destroyCachedDisplayObject(),this.render=a.originalRender,this.renderCanvas=a.originalRenderCanvas,this.calculateBounds=a.originalCalculateBounds,this.getLocalBounds=a.originalGetLocalBounds,this.destroy=a.originalDestroy,this.updateTransform=a.originalUpdateTransform,this.containsPoint=a.originalContainsPoint,this._mask=a.originalMask,this.filterArea=a.originalFilterArea))}}}),e.DisplayObject.prototype._renderCached=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(t),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._render(t))},e.DisplayObject.prototype._initCachedDisplayObject=function(e){if(!this._cacheData||!this._cacheData.sprite){var i=this.alpha;this.alpha=1,e.batch.flush();var h=this.getLocalBounds().clone();if(this.filters){var o=this.filters[0].padding;h.pad(o)}h.ceil(r.settings.RESOLUTION);var c=e.renderTexture.current,l=e.renderTexture.sourceFrame,d=e.projection.transform,p=t.RenderTexture.create(h.width,h.height),u="cacheAsBitmap_"+(0,s.uid)();this._cacheData.textureCacheId=u,t.BaseTexture.addToCache(p.baseTexture,u),t.Texture.addToCache(p,u);var _=n;_.tx=-h.x,_.ty=-h.y,this.transform.worldTransform.identity(),this.render=this._cacheData.originalRender,e.render(this,p,!0,_,!0),e.projection.transform=d,e.renderTexture.bind(c,l),this.render=this._renderCached,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null;var D=new a.Sprite(p);D.transform.worldTransform=this.transform.worldTransform,D.anchor.x=-h.x/h.width,D.anchor.y=-h.y/h.height,D.alpha=i,D._bounds=this._bounds,this._cacheData.sprite=D,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=e._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=D.containsPoint.bind(D)}},e.DisplayObject.prototype._renderCachedCanvas=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(t),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderCanvas(t))},e.DisplayObject.prototype._initCachedDisplayObjectCanvas=function(e){if(!this._cacheData||!this._cacheData.sprite){var i=this.getLocalBounds(),h=this.alpha;this.alpha=1;var o=e.context;i.ceil(r.settings.RESOLUTION);var c=t.RenderTexture.create(i.width,i.height),l="cacheAsBitmap_"+(0,s.uid)();this._cacheData.textureCacheId=l,t.BaseTexture.addToCache(c.baseTexture,l),t.Texture.addToCache(c,l);var d=n;this.transform.localTransform.copyTo(d),d.invert(),d.tx-=i.x,d.ty-=i.y,this.renderCanvas=this._cacheData.originalRenderCanvas,e.render(this,c,!0,d,!1),e.context=o,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null;var p=new a.Sprite(c);p.transform.worldTransform=this.transform.worldTransform,p.anchor.x=-i.x/i.width,p.anchor.y=-i.y/i.height,p.alpha=h,p._bounds=this._bounds,this._cacheData.sprite=p,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=e._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=p.containsPoint.bind(p)}},e.DisplayObject.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._lastBoundsID=this._boundsID},e.DisplayObject.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds()},e.DisplayObject.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,t.BaseTexture.removeFromCache(this._cacheData.textureCacheId),t.Texture.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null},e.DisplayObject.prototype._cacheAsBitmapDestroy=function(t){this.cacheAsBitmap=!1,this.destroy(t)}; },{"@pixi/core":"p2j5","@pixi/sprite":"ueA8","@pixi/display":"nL3p","@pixi/math":"oNQC","@pixi/utils":"G5Tu","@pixi/settings":"t4Uo"}],"CSWr":[function(require,module,exports) { "use strict";var e=require("@pixi/display");e.DisplayObject.prototype.name=null,e.Container.prototype.getChildByName=function(e){for(var i=0;i>16)+(65280&t)+((255&t)<<16),this._colorDirty=!0)},a.tint.get=function(){return this._tint},i.prototype.update=function(){if(this._colorDirty){this._colorDirty=!1;var t=this.texture.baseTexture;(0,s.premultiplyTintToRgba)(this._tint,this._alpha,this.uniforms.uColor,t.alphaMode)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)},Object.defineProperties(i.prototype,a),i}(t.Shader);exports.MeshMaterial=f;var p=function(e){function i(i,a,s){e.call(this);var n=new t.Buffer(i),o=new t.Buffer(a,!0),u=new t.Buffer(s,!0,!0);this.addAttribute("aVertexPosition",n,2,!1,r.TYPES.FLOAT).addAttribute("aTextureCoord",o,2,!1,r.TYPES.FLOAT).addIndex(u),this._updateId=-1}e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i;var a={vertexDirtyId:{configurable:!0}};return a.vertexDirtyId.get=function(){return this.buffers[0]._updateID},Object.defineProperties(i.prototype,a),i}(t.Geometry);exports.MeshGeometry=p; },{"@pixi/core":"p2j5","@pixi/math":"oNQC","@pixi/constants":"LQBK","@pixi/display":"nL3p","@pixi/settings":"t4Uo","@pixi/utils":"G5Tu"}],"kDGc":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SimpleRope=exports.SimplePlane=exports.SimpleMesh=exports.RopeGeometry=exports.PlaneGeometry=exports.NineSlicePlane=void 0;var t=require("@pixi/mesh"),e=require("@pixi/constants"),i=require("@pixi/core"),r=function(t){function e(e,i,r,h){void 0===e&&(e=100),void 0===i&&(i=100),void 0===r&&(r=10),void 0===h&&(h=10),t.call(this),this.segWidth=r,this.segHeight=h,this.width=e,this.height=i,this.build()}return t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e,e.prototype.build=function(){for(var t=this.segWidth*this.segHeight,e=[],i=[],r=[],h=this.segWidth-1,o=this.segHeight-1,s=this.width/h,a=this.height/o,n=0;n0){var g=a.x-t[p].x,f=a.y-t[p].y,c=Math.sqrt(g*g+f*f);a=t[p],s+=c/n}else s=p/(u-1);h[d]=s,h[d+1]=0,h[d+2]=s,h[d+3]=1}for(var l=0,_=0;_0?this.textureScale*this.width/2:this.width/2;r/=p,h/=p,r*=d,h*=d,o[u]=n.x+r,o[u+1]=n.y+h,o[u+2]=n.x-r,o[u+3]=n.y-h,i=n}this.buffers[0].update()}},e.prototype.update=function(){this.textureScale>0?this.build():this.updateVertices()},e}(t.MeshGeometry);exports.RopeGeometry=h;var o=function(i){function r(r,o,s){void 0===s&&(s=0);var a=new h(r.height,o,s),n=new t.MeshMaterial(r);s>0&&(r.baseTexture.wrapMode=e.WRAP_MODES.REPEAT),i.call(this,a,n),this.autoUpdate=!0}return i&&(r.__proto__=i),r.prototype=Object.create(i&&i.prototype),r.prototype.constructor=r,r.prototype._render=function(t){(this.autoUpdate||this.geometry.width!==this.shader.texture.height)&&(this.geometry.width=this.shader.texture.height,this.geometry.update()),i.prototype._render.call(this,t)},r}(t.Mesh);exports.SimpleRope=o;var s=function(e){function h(h,o,s){var a=new r(h.width,h.height,o,s),n=new t.MeshMaterial(i.Texture.WHITE);e.call(this,a,n),this.texture=h}e&&(h.__proto__=e),h.prototype=Object.create(e&&e.prototype),h.prototype.constructor=h;var o={texture:{configurable:!0}};return h.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID,this.geometry.width=this.shader.texture.width,this.geometry.height=this.shader.texture.height,this.geometry.build()},o.texture.set=function(t){this.shader.texture!==t&&(this.shader.texture=t,this._textureID=-1,t.baseTexture.valid?this.textureUpdated():t.once("update",this.textureUpdated,this))},o.texture.get=function(){return this.shader.texture},h.prototype._render=function(t){this._textureID!==this.shader.texture._updateID&&this.textureUpdated(),e.prototype._render.call(this,t)},Object.defineProperties(h.prototype,o),h}(t.Mesh);exports.SimplePlane=s;var a=function(e){function r(r,h,o,s,a){void 0===r&&(r=i.Texture.EMPTY);var n=new t.MeshGeometry(h,o,s);n.getBuffer("aVertexPosition").static=!1;var u=new t.MeshMaterial(r);e.call(this,n,u,null,a),this.autoUpdate=!0}e&&(r.__proto__=e),r.prototype=Object.create(e&&e.prototype),r.prototype.constructor=r;var h={vertices:{configurable:!0}};return h.vertices.get=function(){return this.geometry.getBuffer("aVertexPosition").data},h.vertices.set=function(t){this.geometry.getBuffer("aVertexPosition").data=t},r.prototype._render=function(t){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),e.prototype._render.call(this,t)},Object.defineProperties(r.prototype,h),r}(t.Mesh);exports.SimpleMesh=a;var n=10,u=function(t){function e(e,r,h,o,s){t.call(this,i.Texture.WHITE,4,4),this._origWidth=e.orig.width,this._origHeight=e.orig.height,this._width=this._origWidth,this._height=this._origHeight,this._leftWidth=void 0!==r?r:n,this._rightWidth=void 0!==o?o:n,this._topHeight=void 0!==h?h:n,this._bottomHeight=void 0!==s?s:n,this.texture=e}t&&(e.__proto__=t),e.prototype=Object.create(t&&t.prototype),e.prototype.constructor=e;var r={vertices:{configurable:!0},width:{configurable:!0},height:{configurable:!0},leftWidth:{configurable:!0},rightWidth:{configurable:!0},topHeight:{configurable:!0},bottomHeight:{configurable:!0}};return e.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID,this._refresh()},r.vertices.get=function(){return this.geometry.getBuffer("aVertexPosition").data},r.vertices.set=function(t){this.geometry.getBuffer("aVertexPosition").data=t},e.prototype.updateHorizontalVertices=function(){var t=this.vertices,e=this._topHeight+this._bottomHeight,i=this._height>e?1:this._height/e;t[9]=t[11]=t[13]=t[15]=this._topHeight*i,t[17]=t[19]=t[21]=t[23]=this._height-this._bottomHeight*i,t[25]=t[27]=t[29]=t[31]=this._height},e.prototype.updateVerticalVertices=function(){var t=this.vertices,e=this._leftWidth+this._rightWidth,i=this._width>e?1:this._width/e;t[2]=t[10]=t[18]=t[26]=this._leftWidth*i,t[4]=t[12]=t[20]=t[28]=this._width-this._rightWidth*i,t[6]=t[14]=t[22]=t[30]=this._width},r.width.get=function(){return this._width},r.width.set=function(t){this._width=t,this._refresh()},r.height.get=function(){return this._height},r.height.set=function(t){this._height=t,this._refresh()},r.leftWidth.get=function(){return this._leftWidth},r.leftWidth.set=function(t){this._leftWidth=t,this._refresh()},r.rightWidth.get=function(){return this._rightWidth},r.rightWidth.set=function(t){this._rightWidth=t,this._refresh()},r.topHeight.get=function(){return this._topHeight},r.topHeight.set=function(t){this._topHeight=t,this._refresh()},r.bottomHeight.get=function(){return this._bottomHeight},r.bottomHeight.set=function(t){this._bottomHeight=t,this._refresh()},e.prototype._refresh=function(){var t=this.texture,e=this.geometry.buffers[1].data;this._origWidth=t.orig.width,this._origHeight=t.orig.height;var i=1/this._origWidth,r=1/this._origHeight;e[0]=e[8]=e[16]=e[24]=0,e[1]=e[3]=e[5]=e[7]=0,e[6]=e[14]=e[22]=e[30]=1,e[25]=e[27]=e[29]=e[31]=1,e[2]=e[10]=e[18]=e[26]=i*this._leftWidth,e[4]=e[12]=e[20]=e[28]=1-i*this._rightWidth,e[9]=e[11]=e[13]=e[15]=r*this._topHeight,e[17]=e[19]=e[21]=e[23]=1-r*this._bottomHeight,this.updateHorizontalVertices(),this.updateVerticalVertices(),this.geometry.buffers[0].update(),this.geometry.buffers[1].update()},Object.defineProperties(e.prototype,r),e}(s);exports.NineSlicePlane=u; },{"@pixi/mesh":"Ihaq","@pixi/constants":"LQBK","@pixi/core":"p2j5"}],"GC82":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AnimatedSprite=void 0;var t=require("@pixi/core"),e=require("@pixi/sprite"),r=require("@pixi/ticker"),i=function(e){function i(r,i){e.call(this,r[0]instanceof t.Texture?r[0]:r[0].texture),this._textures=null,this._durations=null,this.textures=r,this._autoUpdate=!1!==i,this.animationSpeed=1,this.loop=!0,this.updateAnchor=!1,this.onComplete=null,this.onFrameChange=null,this.onLoop=null,this._currentTime=0,this.playing=!1}e&&(i.__proto__=e),i.prototype=Object.create(e&&e.prototype),i.prototype.constructor=i;var s={totalFrames:{configurable:!0},textures:{configurable:!0},currentFrame:{configurable:!0}};return i.prototype.stop=function(){this.playing&&(this.playing=!1,this._autoUpdate&&r.Ticker.shared.remove(this.update,this))},i.prototype.play=function(){this.playing||(this.playing=!0,this._autoUpdate&&r.Ticker.shared.add(this.update,this,r.UPDATE_PRIORITY.HIGH))},i.prototype.gotoAndStop=function(t){this.stop();var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture()},i.prototype.gotoAndPlay=function(t){var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture(),this.play()},i.prototype.update=function(t){var e=this.animationSpeed*t,r=this.currentFrame;if(null!==this._durations){var i=this._currentTime%1*this._durations[this.currentFrame];for(i+=e/60*1e3;i<0;)this._currentTime--,i+=this._durations[this.currentFrame];var s=Math.sign(this.animationSpeed*t);for(this._currentTime=Math.floor(this._currentTime);i>=this._durations[this.currentFrame];)i-=this._durations[this.currentFrame]*s,this._currentTime+=s;this._currentTime+=i/this._durations[this.currentFrame]}else this._currentTime+=e;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):r!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFramer&&this.onLoop()),this.updateTexture())},i.prototype.updateTexture=function(){this._texture=this._textures[this.currentFrame],this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this.uvs=this._texture._uvs.uvsFloat32,this.updateAnchor&&this._anchor.copyFrom(this._texture.defaultAnchor),this.onFrameChange&&this.onFrameChange(this.currentFrame)},i.prototype.destroy=function(t){this.stop(),e.prototype.destroy.call(this,t),this.onComplete=null,this.onFrameChange=null,this.onLoop=null},i.fromFrames=function(e){for(var r=[],s=0;s10&&(t/=1e3),t||0},Object.defineProperty(n.prototype,"_enabled",{set:function(t){e.Ticker.shared.remove(this._updateListener,this),t&&e.Ticker.shared.add(this._updateListener,this)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"progress",{get:function(){return this._progress},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"paused",{get:function(){return this._paused},set:function(t){this._paused=t,this.refreshPaused()},enumerable:!0,configurable:!0}),n.prototype.destroy=function(){this.removeAllListeners(),this._internalStop(),this._gain&&(this._gain.disconnect(),this._gain=null),this._media&&(this._media.context.events.off("refresh",this.refresh,this),this._media.context.events.off("refreshPaused",this.refreshPaused,this),this._media=null),this._end=null,this._speed=1,this._volume=1,this._loop=!1,this._elapsed=0,this._duration=0,this._paused=!1,this._muted=!1,this._pausedReal=!1},n.prototype.toString=function(){return"[WebAudioInstance id="+this.id+"]"},n.prototype._now=function(){return this._media.context.audioContext.currentTime},n.prototype._updateListener=function(){this._update()},n.prototype._update=function(t){if(void 0===t&&(t=!1),this._source){var e=this._now(),n=e-this._lastUpdate;if(n>0||t){var o=this._source.playbackRate.value;this._elapsed+=n*o,this._lastUpdate=e;var i=this._duration,r=void 0;if(this._source.loopStart){var s=this._source.loopEnd-this._source.loopStart;r=(this._source.loopStart+this._elapsed%s)/i}else r=this._elapsed%i/i;this._progress=r,this.emit("progress",this._progress,i)}}},n.prototype.init=function(t){this._media=t,t.context.events.on("refresh",this.refresh,this),t.context.events.on("refreshPaused",this.refreshPaused,this)},n.prototype._internalStop=function(){this._source&&(this._enabled=!1,this._source.onended=null,this._source.stop(0),this._source.disconnect(),this._source=null)},n.prototype._onComplete=function(){this._source&&(this._enabled=!1,this._source.onended=null,this._source.disconnect()),this._source=null,this._progress=1,this.emit("progress",1,this._duration),this.emit("end",this)},n}(n.EventEmitter),g=function(t){function e(e){var n=this,o=e.audioContext,i=o.createBufferSource(),r=o.createGain(),s=o.createAnalyser();return i.connect(s),s.connect(r),r.connect(e.destination),(n=t.call(this,s,r)||this).context=e,n.bufferSource=i,n.gain=r,n.analyser=s,n}return u(e,t),Object.defineProperty(e.prototype,"script",{get:function(){return this._script||(this._script=this.context.audioContext.createScriptProcessor(e.BUFFER_SIZE),this._script.connect(this.context.destination)),this._script},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){t.prototype.destroy.call(this),this.bufferSource.disconnect(),this._script&&this._script.disconnect(),this.gain.disconnect(),this.analyser.disconnect(),this.bufferSource=null,this._script=null,this.gain=null,this.analyser=null,this.context=null},e.prototype.cloneBufferSource=function(){var t=this.bufferSource,e=this.context.audioContext.createBufferSource();e.buffer=t.buffer,_.setParamValue(e.playbackRate,t.playbackRate.value),e.loop=t.loop;var n=this.context.audioContext.createGain();return e.connect(n),n.connect(this.destination),{source:e,gain:n}},Object.defineProperty(e.prototype,"bufferSize",{get:function(){return this.script.bufferSize},enumerable:!0,configurable:!0}),e.BUFFER_SIZE=0,e}(i),b=function(){function t(){}return t.prototype.init=function(t){this.parent=t,this._nodes=new g(this.context),this._source=this._nodes.bufferSource,this.source=t.options.source},t.prototype.destroy=function(){this.parent=null,this._nodes.destroy(),this._nodes=null,this._source=null,this.source=null},t.prototype.create=function(){return new m(this)},Object.defineProperty(t.prototype,"context",{get:function(){return this.parent.context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isPlayable",{get:function(){return!!this._source&&!!this._source.buffer},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"filters",{get:function(){return this._nodes.filters},set:function(t){this._nodes.filters=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"duration",{get:function(){return this._source.buffer.duration},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"buffer",{get:function(){return this._source.buffer},set:function(t){this._source.buffer=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"nodes",{get:function(){return this._nodes},enumerable:!0,configurable:!0}),t.prototype.load=function(t){this.source?this._decode(this.source,t):this.parent.url?this._loadUrl(t):t&&t(new Error("sound.url or sound.source must be set"))},t.prototype._loadUrl=function(t){var e=this,n=new XMLHttpRequest,o=this.parent.url;n.open("GET",o,!0),n.responseType="arraybuffer",n.onload=function(){e.source=n.response,e._decode(n.response,t)},n.send()},t.prototype._decode=function(t,e){var n=this;this.parent.context.decode(t,function(t,o){if(t)e&&e(t);else{n.parent.isLoaded=!0,n.buffer=o;var i=n.parent.autoPlayStart();e&&e(null,n.parent,i)}})},t}(),v=function(t){function e(){var o=this,i=window,r=new e.AudioContext,s=r.createDynamicsCompressor(),u=r.createAnalyser();return u.connect(s),s.connect(r.destination),(o=t.call(this,u,s)||this)._ctx=r,o._offlineCtx=new e.OfflineAudioContext(1,2,i.OfflineAudioContext?r.sampleRate:44100),o._unlocked=!1,o.compressor=s,o.analyser=u,o.events=new n.EventEmitter,o.volume=1,o.speed=1,o.muted=!1,o.paused=!1,"running"!==r.state&&(o._unlock(),o._unlock=o._unlock.bind(o),document.addEventListener("mousedown",o._unlock,!0),document.addEventListener("touchstart",o._unlock,!0),document.addEventListener("touchend",o._unlock,!0)),o}return u(e,t),e.prototype._unlock=function(){this._unlocked||(this.playEmptySound(),"running"===this._ctx.state&&(document.removeEventListener("mousedown",this._unlock,!0),document.removeEventListener("touchend",this._unlock,!0),document.removeEventListener("touchstart",this._unlock,!0),this._unlocked=!0))},e.prototype.playEmptySound=function(){var t=this._ctx.createBufferSource();t.buffer=this._ctx.createBuffer(1,1,22050),t.connect(this._ctx.destination),t.start(0,0,0),"suspended"===t.context.state&&t.context.resume()},Object.defineProperty(e,"AudioContext",{get:function(){var t=window;return t.AudioContext||t.webkitAudioContext||null},enumerable:!0,configurable:!0}),Object.defineProperty(e,"OfflineAudioContext",{get:function(){var t=window;return t.OfflineAudioContext||t.webkitOfflineAudioContext||null},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){t.prototype.destroy.call(this);var e=this._ctx;void 0!==e.close&&e.close(),this.events.removeAllListeners(),this.analyser.disconnect(),this.compressor.disconnect(),this.analyser=null,this.compressor=null,this.events=null,this._offlineCtx=null,this._ctx=null},Object.defineProperty(e.prototype,"audioContext",{get:function(){return this._ctx},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"offlineContext",{get:function(){return this._offlineCtx},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paused",{get:function(){return this._paused},set:function(t){t&&"running"===this._ctx.state?this._ctx.suspend():t||"suspended"!==this._ctx.state||this._ctx.resume(),this._paused=t},enumerable:!0,configurable:!0}),e.prototype.refresh=function(){this.events.emit("refresh")},e.prototype.refreshPaused=function(){this.events.emit("refreshPaused")},e.prototype.toggleMute=function(){return this.muted=!this.muted,this.refresh(),this.muted},e.prototype.togglePause=function(){return this.paused=!this.paused,this.refreshPaused(),this._paused},e.prototype.decode=function(t,e){this._offlineCtx.decodeAudioData(t,function(t){e(null,t)},function(t){e(new Error(t.message||"Unable to decode file"))})},e}(i),P={WebAudioMedia:b,WebAudioInstance:m,WebAudioNodes:g,WebAudioContext:v,WebAudioUtils:_},x={Filter:r,EqualizerFilter:function(t){function e(n,o,i,r,s,u,a,c,h,l){void 0===n&&(n=0),void 0===o&&(o=0),void 0===i&&(i=0),void 0===r&&(r=0),void 0===s&&(s=0),void 0===u&&(u=0),void 0===a&&(a=0),void 0===c&&(c=0),void 0===h&&(h=0),void 0===l&&(l=0);var f=this;if(!p().useLegacy){var d=[{f:e.F32,type:"lowshelf",gain:n},{f:e.F64,type:"peaking",gain:o},{f:e.F125,type:"peaking",gain:i},{f:e.F250,type:"peaking",gain:r},{f:e.F500,type:"peaking",gain:s},{f:e.F1K,type:"peaking",gain:u},{f:e.F2K,type:"peaking",gain:a},{f:e.F4K,type:"peaking",gain:c},{f:e.F8K,type:"peaking",gain:h},{f:e.F16K,type:"highshelf",gain:l}].map(function(t){var e=p().context.audioContext.createBiquadFilter();return e.type=t.type,_.setParamValue(e.Q,1),e.frequency.value=t.f,_.setParamValue(e.gain,t.gain),e});(f=t.call(this,d[0],d[d.length-1])||this).bands=d,f.bandsMap={};for(var y=0;y0&&f.bands[y-1].connect(m),f.bandsMap[m.frequency.value]=m}return f}f=t.call(this,null)||this}return u(e,t),e.prototype.setGain=function(t,e){if(void 0===e&&(e=0),!this.bandsMap[t])throw new Error("No band found for frequency "+t);_.setParamValue(this.bandsMap[t].gain,e)},e.prototype.getGain=function(t){if(!this.bandsMap[t])throw new Error("No band found for frequency "+t);return this.bandsMap[t].gain.value},Object.defineProperty(e.prototype,"f32",{get:function(){return this.getGain(e.F32)},set:function(t){this.setGain(e.F32,t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"f64",{get:function(){return this.getGain(e.F64)},set:function(t){this.setGain(e.F64,t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"f125",{get:function(){return this.getGain(e.F125)},set:function(t){this.setGain(e.F125,t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"f250",{get:function(){return this.getGain(e.F250)},set:function(t){this.setGain(e.F250,t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"f500",{get:function(){return this.getGain(e.F500)},set:function(t){this.setGain(e.F500,t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"f1k",{get:function(){return this.getGain(e.F1K)},set:function(t){this.setGain(e.F1K,t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"f2k",{get:function(){return this.getGain(e.F2K)},set:function(t){this.setGain(e.F2K,t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"f4k",{get:function(){return this.getGain(e.F4K)},set:function(t){this.setGain(e.F4K,t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"f8k",{get:function(){return this.getGain(e.F8K)},set:function(t){this.setGain(e.F8K,t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"f16k",{get:function(){return this.getGain(e.F16K)},set:function(t){this.setGain(e.F16K,t)},enumerable:!0,configurable:!0}),e.prototype.reset=function(){this.bands.forEach(function(t){_.setParamValue(t.gain,0)})},e.prototype.destroy=function(){this.bands.forEach(function(t){t.disconnect()}),this.bands=null,this.bandsMap=null},e.F32=32,e.F64=64,e.F125=125,e.F250=250,e.F500=500,e.F1K=1e3,e.F2K=2e3,e.F4K=4e3,e.F8K=8e3,e.F16K=16e3,e}(r),DistortionFilter:function(t){function e(e){void 0===e&&(e=0);var n=this;if(!p().useLegacy){var o=p().context.audioContext.createWaveShaper();return(n=t.call(this,o)||this)._distortion=o,n.amount=e,n}n=t.call(this,null)||this}return u(e,t),Object.defineProperty(e.prototype,"amount",{get:function(){return this._amount},set:function(t){t*=1e3,this._amount=t;for(var e,n=new Float32Array(44100),o=Math.PI/180,i=0;i<44100;++i)e=2*i/44100-1,n[i]=(3+t)*e*20*o/(Math.PI+t*Math.abs(e));this._distortion.curve=n,this._distortion.oversample="4x"},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){this._distortion=null,t.prototype.destroy.call(this)},e}(r),StereoFilter:function(t){function e(e){void 0===e&&(e=0);var n=this;if(!p().useLegacy){var o,i,r,s=p().context.audioContext;return s.createStereoPanner?r=o=s.createStereoPanner():((i=s.createPanner()).panningModel="equalpower",r=i),(n=t.call(this,r)||this)._stereo=o,n._panner=i,n.pan=e,n}n=t.call(this,null)||this}return u(e,t),Object.defineProperty(e.prototype,"pan",{get:function(){return this._pan},set:function(t){this._pan=t,this._stereo?_.setParamValue(this._stereo.pan,t):this._panner.setPosition(t,0,1-Math.abs(t))},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){t.prototype.destroy.call(this),this._stereo=null,this._panner=null},e}(r),ReverbFilter:function(t){function e(e,n,o){void 0===e&&(e=3),void 0===n&&(n=2),void 0===o&&(o=!1);var i=this;if(!p().useLegacy)return(i=t.call(this,null)||this)._seconds=i._clamp(e,1,50),i._decay=i._clamp(n,0,100),i._reverse=o,i._rebuild(),i;i=t.call(this,null)||this}return u(e,t),e.prototype._clamp=function(t,e,n){return Math.min(n,Math.max(e,t))},Object.defineProperty(e.prototype,"seconds",{get:function(){return this._seconds},set:function(t){this._seconds=this._clamp(t,1,50),this._rebuild()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"decay",{get:function(){return this._decay},set:function(t){this._decay=this._clamp(t,0,100),this._rebuild()},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"reverse",{get:function(){return this._reverse},set:function(t){this._reverse=t,this._rebuild()},enumerable:!0,configurable:!0}),e.prototype._rebuild=function(){for(var t,e=p().context.audioContext,n=e.sampleRate,o=n*this._seconds,i=e.createBuffer(2,o,n),r=i.getChannelData(0),s=i.getChannelData(1),u=0;u=this._end&&!this._source.loop&&this._onComplete()},n.prototype._onComplete=function(){e.Ticker.shared.remove(this._onUpdate,this),this._internalStop(),this.emit("progress",1,this._duration),this.emit("end",this)},n.prototype.destroy=function(){e.Ticker.shared.remove(this._onUpdate,this),this.removeAllListeners();var t=this._source;t&&(t.onended=null,t.onplay=null,t.onpause=null,this._internalStop()),this._source=null,this._speed=1,this._volume=1,this._loop=!1,this._end=null,this._start=0,this._duration=0,this._playing=!1,this._pausedReal=!1,this._paused=!1,this._muted=!1,this._media&&(this._media.context.off("refresh",this.refresh,this),this._media.context.off("refreshPaused",this.refreshPaused,this),this._media=null)},n.prototype.toString=function(){return"[HTMLAudioInstance id="+this.id+"]"},n.PADDING=.1,n}(n.EventEmitter),E=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.init=function(t){this.parent=t,this._source=t.options.source||new Audio,t.url&&(this._source.src=t.url)},e.prototype.create=function(){return new j(this)},Object.defineProperty(e.prototype,"isPlayable",{get:function(){return!!this._source&&4===this._source.readyState},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"duration",{get:function(){return this._source.duration},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this.parent.context},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"filters",{get:function(){return null},set:function(t){},enumerable:!0,configurable:!0}),e.prototype.destroy=function(){this.removeAllListeners(),this.parent=null,this._source&&(this._source.src="",this._source.load(),this._source=null)},Object.defineProperty(e.prototype,"source",{get:function(){return this._source},enumerable:!0,configurable:!0}),e.prototype.load=function(t){var e=this._source,n=this.parent;if(4!==e.readyState){if(!n.url)return t(new Error("sound.url or sound.source must be set"));e.src=n.url;var o=function(){e.removeEventListener("canplaythrough",i),e.removeEventListener("load",i),e.removeEventListener("abort",r),e.removeEventListener("error",s)},i=function(){o(),n.isLoaded=!0;var e=n.autoPlayStart();t&&t(null,n,e)},r=function(){o(),t&&t(new Error("Sound loading has been aborted"))},s=function(){o();var n="Failed to load audio element (code: "+e.error.code+")";t&&t(new Error(n))};e.addEventListener("canplaythrough",i,!1),e.addEventListener("load",i,!1),e.addEventListener("abort",r,!1),e.addEventListener("error",s,!1),e.load()}else{n.isLoaded=!0;var u=n.autoPlayStart();t&&setTimeout(function(){t(null,n,u)},0)}},e}(n.EventEmitter),w=function(t){function e(){var e=t.call(this)||this;return e.speed=1,e.volume=1,e.muted=!1,e.paused=!1,e}return u(e,t),e.prototype.refresh=function(){this.emit("refresh")},e.prototype.refreshPaused=function(){this.emit("refreshPaused")},Object.defineProperty(e.prototype,"filters",{get:function(){return null},set:function(t){},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"audioContext",{get:function(){return null},enumerable:!0,configurable:!0}),e.prototype.toggleMute=function(){return this.muted=!this.muted,this.refresh(),this.muted},e.prototype.togglePause=function(){return this.paused=!this.paused,this.refreshPaused(),this.paused},e.prototype.destroy=function(){this.removeAllListeners()},e}(n.EventEmitter),A={HTMLAudioMedia:E,HTMLAudioInstance:j,HTMLAudioContext:w},L=["mp3","ogg","oga","opus","mpeg","wav","m4a","aiff","wma","mid"],F=(h={m4a:"mp4",oga:"ogg"},l=document.createElement("audio"),f={},d=/^no$/,L.forEach(function(t){var e=h[t]||t,n=l.canPlayType("audio/"+t).replace(d,""),o=l.canPlayType("audio/"+e).replace(d,"");f[t]=!!n||!!o}),Object.freeze(f)),C=/\.(\{([^\}]+)\})(\?.*)?$/;function S(t){var e=C,n="string"==typeof t?t:t.url;if(e.test(n)){for(var o=e.exec(n),i=o[2].split(","),r=i[i.length-1],s=0,u=i.length;s-1?t.sound=p().add(t.name,{loaded:e,preload:!0,url:t.url,source:t.data}):e()},e}(),M=function(){function t(t,e){this.parent=t,Object.assign(this,e),this.duration=this.end-this.start}return t.prototype.play=function(t){return this.parent.play({complete:t,speed:this.speed||this.parent.speed,end:this.end,start:this.start,loop:this.loop})},t.prototype.destroy=function(){this.parent=null},t}(),T=function(){function t(t,e){this.media=t,this.options=e,this._instances=[],this._sprites={},this.media.init(this);var n=e.complete;this._autoPlayOptions=n?{complete:n}:null,this.isLoaded=!1,this.isPlaying=!1,this.autoPlay=e.autoPlay,this.singleInstance=e.singleInstance,this.preload=e.preload||this.autoPlay,this.url=e.url,this.speed=e.speed,this.volume=e.volume,this.loop=e.loop,e.sprites&&this.addSprites(e.sprites),this.preload&&this._preload(e.loaded)}return t.from=function(e){var n={};return"string"==typeof e?n.url=e:e instanceof ArrayBuffer||e instanceof HTMLAudioElement?n.source=e:n=e,(n=c({autoPlay:!1,singleInstance:!1,url:null,source:null,preload:!1,volume:1,speed:1,complete:null,loaded:null,loop:!1},n)).url&&(n.url=S(n.url)),Object.freeze(n),new t(p().useLegacy?new E:new b,n)},Object.defineProperty(t.prototype,"context",{get:function(){return p().context},enumerable:!0,configurable:!0}),t.prototype.pause=function(){return this.isPlaying=!1,this.paused=!0,this},t.prototype.resume=function(){return this.isPlaying=this._instances.length>0,this.paused=!1,this},Object.defineProperty(t.prototype,"paused",{get:function(){return this._paused},set:function(t){this._paused=t,this.refreshPaused()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"speed",{get:function(){return this._speed},set:function(t){this._speed=t,this.refresh()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"filters",{get:function(){return this.media.filters},set:function(t){this.media.filters=t},enumerable:!0,configurable:!0}),t.prototype.addSprites=function(t,e){if("object"==typeof t){var n={};for(var o in t)n[o]=this.addSprites(o,t[o]);return n}if("string"==typeof t){var i=new M(this,e);return this._sprites[t]=i,i}},t.prototype.destroy=function(){this._removeInstances(),this.removeSprites(),this.media.destroy(),this.media=null,this._sprites=null,this._instances=null},t.prototype.removeSprites=function(t){if(t){var e=this._sprites[t];void 0!==e&&(e.destroy(),delete this._sprites[t])}else for(var n in this._sprites)this.removeSprites(n);return this},Object.defineProperty(t.prototype,"isPlayable",{get:function(){return this.isLoaded&&this.media&&this.media.isPlayable},enumerable:!0,configurable:!0}),t.prototype.stop=function(){if(!this.isPlayable)return this.autoPlay=!1,this._autoPlayOptions=null,this;this.isPlaying=!1;for(var t=this._instances.length-1;t>=0;t--)this._instances[t].stop();return this},t.prototype.play=function(t,e){var n,o=this;if("string"==typeof t?n={sprite:r=t,loop:this.loop,complete:e}:"function"==typeof t?(n={}).complete=t:n=t,(n=c({complete:null,loaded:null,sprite:null,end:null,start:0,volume:1,speed:1,muted:!1,loop:!1},n||{})).sprite){var i=n.sprite,r=this._sprites[i];n.start=r.start,n.end=r.end,n.speed=r.speed||1,n.loop=r.loop||n.loop,delete n.sprite}if(n.offset&&(n.start=n.offset),!this.isLoaded)return new Promise(function(t,e){o.autoPlay=!0,o._autoPlayOptions=n,o._preload(function(o,i,r){o?e(o):(n.loaded&&n.loaded(o,i,r),t(r))})});this.singleInstance&&this._removeInstances();var s=this._createInstance();return this._instances.push(s),this.isPlaying=!0,s.once("end",function(){n.complete&&n.complete(o),o._onComplete(s)}),s.once("stop",function(){o._onComplete(s)}),s.play(n),s},t.prototype.refresh=function(){for(var t=this._instances.length,e=0;e=0;t--)this._poolInstance(this._instances[t]);this._instances.length=0},t.prototype._onComplete=function(t){if(this._instances){var e=this._instances.indexOf(t);e>-1&&this._instances.splice(e,1),this.isPlaying=this._instances.length>0}this._poolInstance(t)},t.prototype._createInstance=function(){if(t._pool.length>0){var e=t._pool.pop();return e.init(this.media),e}return this.media.create()},t.prototype._poolInstance=function(e){e.destroy(),t._pool.indexOf(e)<0&&t._pool.push(e)},t._pool=[],t}(),R=function(){function t(){this.init()}return t.prototype.init=function(){return this.supported&&(this._webAudioContext=new v),this._htmlAudioContext=new w,this._sounds={},this.useLegacy=!this.supported,this},Object.defineProperty(t.prototype,"context",{get:function(){return this._context},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"filtersAll",{get:function(){return this.useLegacy?[]:this._context.filters},set:function(t){this.useLegacy||(this._context.filters=t)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"supported",{get:function(){return null!==v.AudioContext},enumerable:!0,configurable:!0}),t.prototype.add=function(t,e){if("object"==typeof t){var n={};for(var o in t){var i=this._getOptions(t[o],e);n[o]=this.add(o,i)}return n}if("string"==typeof t){if(e instanceof T)return this._sounds[t]=e,e;i=this._getOptions(e);var r=T.from(i);return this._sounds[t]=r,r}},t.prototype._getOptions=function(t,e){var n;return n="string"==typeof t?{url:t}:t instanceof ArrayBuffer||t instanceof HTMLAudioElement?{source:t}:t,c({},n,e||{})},Object.defineProperty(t.prototype,"useLegacy",{get:function(){return this._useLegacy},set:function(t){k.legacy=t,this._useLegacy=t,this._context=!t&&this.supported?this._webAudioContext:this._htmlAudioContext},enumerable:!0,configurable:!0}),t.prototype.remove=function(t){return this.exists(t,!0),this._sounds[t].destroy(),delete this._sounds[t],this},Object.defineProperty(t.prototype,"volumeAll",{get:function(){return this._context.volume},set:function(t){this._context.volume=t,this._context.refresh()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"speedAll",{get:function(){return this._context.speed},set:function(t){this._context.speed=t,this._context.refresh()},enumerable:!0,configurable:!0}),t.prototype.togglePauseAll=function(){return this._context.togglePause()},t.prototype.pauseAll=function(){return this._context.paused=!0,this._context.refreshPaused(),this},t.prototype.resumeAll=function(){return this._context.paused=!1,this._context.refreshPaused(),this},t.prototype.toggleMuteAll=function(){return this._context.toggleMute()},t.prototype.muteAll=function(){return this._context.muted=!0,this._context.refresh(),this},t.prototype.unmuteAll=function(){return this._context.muted=!1,this._context.refresh(),this},t.prototype.removeAll=function(){for(var t in this._sounds)this._sounds[t].destroy(),delete this._sounds[t];return this},t.prototype.stopAll=function(){for(var t in this._sounds)this._sounds[t].stop();return this},t.prototype.exists=function(t,e){return void 0===e&&(e=!1),!!this._sounds[t]},t.prototype.find=function(t){return this.exists(t,!0),this._sounds[t]},t.prototype.play=function(t,e){return this.find(t).play(e)},t.prototype.stop=function(t){return this.find(t).stop()},t.prototype.pause=function(t){return this.find(t).pause()},t.prototype.resume=function(t){return this.find(t).resume()},t.prototype.volume=function(t,e){var n=this.find(t);return void 0!==e&&(n.volume=e),n.volume},t.prototype.speed=function(t,e){var n=this.find(t);return void 0!==e&&(n.speed=e),n.speed},t.prototype.duration=function(t){return this.find(t).duration},t.prototype.close=function(){return this.removeAll(),this._sounds=null,this._webAudioContext&&(this._webAudioContext.destroy(),this._webAudioContext=null),this._htmlAudioContext&&(this._htmlAudioContext.destroy(),this._htmlAudioContext=null),this._context=null,this},t}(),G=0,I={get PLAY_ID(){return G},playOnce:function(t,e){var n="alias"+G++;return p().add(n,{url:t,preload:!0,autoPlay:!0,loaded:function(t){t&&(p().remove(n),e&&e(t))},complete:function(){p().remove(n),e&&e(null)}}),n},render:function(t,e){var n=document.createElement("canvas");e=c({width:512,height:128,fill:"black"},e||{}),n.width=e.width,n.height=e.height;var i=o.BaseTexture.from(n);if(!(t.media instanceof b))return i;var r=t.media,s=n.getContext("2d");s.fillStyle=e.fill;for(var u=r.buffer.getChannelData(0),a=Math.ceil(u.length/e.width),p=e.height/2,h=0;hf&&(f=_)}s.fillRect(h,(1+l)*p,1,Math.max(1,(f-l)*p))}return i},resolveUrl:S,sineTone:function(t,e){void 0===t&&(t=200),void 0===e&&(e=1);var n=T.from({singleInstance:!0});if(!(n.media instanceof b))return n;for(var o=n.media,i=n.context.audioContext.createBuffer(1,48e3*e,48e3),r=i.getChannelData(0),s=0;s=t.length&&(t=void 0),{value:t&&t[e++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")},n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var i={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(i[n]=t[n]);return i.default=t,i};Object.defineProperty(exports,"__esModule",{value:!0});var e=n(require("pixi.js")),s=function(i){function n(t,n){void 0===n&&(n=!1);var e=i.call(this,{view:t,transparent:n,backgroundColor:0,antialias:!0,resolution:1,width:t.clientWidth,height:t.clientHeight})||this;return e.init(),e.ticker.add(function(t){return e.update(t)}),e}return t(n,i),n}(e.Application),o=function(i){function n(t){var n=i.call(this,t,!0)||this;return n.tint=0,n}return t(n,i),n.prototype.init=function(){var t=e.Texture.from("./assets/lab02/sonic.png");this.sonic=new e.Sprite(t),this.sonic.position.set(this.screen.width/2,this.screen.height/2),this.sonic.anchor.set(.5),this.stage.addChild(this.sonic)},n.prototype.update=function(t){this.tint=(this.tint+5)%255;var i=this.tint>128?255-this.tint:this.tint;this.sonic.tint=65535+(2*i<<16)},n}(s);exports.DisplaySprite=o;var r=function(i){function n(t){return i.call(this,t)||this}return t(n,i),n.prototype.init=function(){var t=new e.Graphics;t.lineStyle(10,13975595,1),t.position.x=this.screen.width/2,t.position.y=this.screen.height/2,t.pivot.set(0,140),t.rotation=.785398,t.moveTo(5,0),t.lineTo(5,280),this.stage.addChild(t);var i=new e.Graphics;i.lineStyle(20,9555782,1),i.drawCircle(this.screen.width/2,this.screen.height/2,100),this.stage.addChild(i);var n=new e.Graphics;n.lineStyle(5,4874164,1),n.position.set(this.screen.width/2,this.screen.height/2),n.moveTo(20,0),n.lineTo(100,80),n.lineTo(20,80),n.lineTo(20,0),this.stage.addChild(n)},n.prototype.update=function(t){},n}(s);exports.DisplayPrimitives=r;var h=function(i){function n(t){var n=i.call(this,t)||this;return n.counter=0,n}return t(n,i),n.prototype.init=function(){var t=this;this.loader.add("myFont","./assets/lab02/dosfont.fnt").load(function(){t.text=new e.BitmapText("Pixel bitmap font",{font:{name:"PxPlus IBM VGA8",size:80},align:"center"}),t.text.position.x=t.screen.width/2,t.text.position.y=t.screen.height/2,t.text.anchor=.5,t.stage.addChild(t.text)})},n.prototype.update=function(t){this.text&&this.counter++%5==0&&(5592405===this.text.tint?this.text.tint=16777215:this.text.tint=5592405)},n}(s);exports.DisplayBitmapText=h;var a=function(i){function n(t){var n=i.call(this,t)||this;return n.directionLeft=!1,n}return t(n,i),n.prototype.init=function(){var t=new e.TextStyle({fontFamily:"Adventure",fontSize:36,fill:["#ffffff","#00ff99"],stroke:"#4a1850",strokeThickness:5});this.text=new e.Text("Regular font taken from @font-face",t),this.text.position.set(this.screen.width/2,this.screen.height/2),this.text.anchor.set(.5),this.stage.addChild(this.text)},n.prototype.update=function(t){this.directionLeft?this.text.position.x-=t:this.text.position.x+=t,this.text.getBounds().left<0?this.directionLeft=!1:this.text.getBounds().right>this.screen.width&&(this.directionLeft=!0)},n}(s);exports.DisplayRegularText=a;var c=function(n){function s(t){return n.call(this,t)||this}return t(s,n),s.prototype.init=function(){this.container=new e.ParticleContainer(s.particlesNum,{position:!0,rotation:!0});for(var t=e.Texture.from("./assets/lab02/ghost.png"),i=0;i=t.length&&(t=void 0),{value:t&&t[a++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},r=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(exports,"__esModule",{value:!0});var a=r(require("pixi.js")),i=1e3,n=20,o=function(r){function o(t){var e=r.call(this,{view:t,backgroundColor:0,antialias:!0,width:t.clientWidth,height:t.clientHeight})||this;e.cameraZ=0,e.speed=0,e.warpSpeed=0,e.stars=[],e.starTexture=a.Texture.from("./assets/lab02/star.png");for(var n=0;n0&&(s.opacity=Math.max(0,s.opacity-.05*t)),s.sprite.alpha=1-s.opacity}}catch(h){r={error:h}}finally{try{o&&!o.done&&(a=i.return)&&a.call(i)}finally{if(r)throw r.error}}},o}(a.Application);exports.ExampleStarfield=o; },{"pixi.js":"wbEC"}],"Ets9":[function(require,module,exports) { "use strict";var t=this&&this.__extends||function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])})(e,r)};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),e=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(exports,"__esModule",{value:!0});var r=e(require("pixi.js")),n=function(e){function n(t){return e.call(this,t)||this}return t(n,e),n.prototype.containsPoint=function(t){var e=new r.Point;this.worldTransform.applyInverse(t,e);var n=this._texture.orig.width,i=this._texture.orig.height,o=-n*this.anchor.x,a=-i*this.anchor.y,u=!1;if(e.x>=o&&e.x=a&&e.y0||(h[l]&1<0:(h[l]&1<0},n.prototype.genHitMap=function(t,e){if(!t.resource)return!1;var r=t.resource.source,n=null;if(!r)return!1;var i=null;if(r.getContext)i=(n=r).getContext("2d");else{if(!(r instanceof Image))return!1;(n=document.createElement("canvas")).width=r.width,n.height=r.height,(i=n.getContext("2d")).drawImage(r,0,0)}for(var o=n.width,a=n.height,u=i.getImageData(0,0,o,a),c=new Uint32Array(Math.ceil(o*a/32)),s=0;s=e&&(c[p]|=1<