1/*! For license information please see All.min.js.LICENSE.txt */ 2(function(){var __webpack_modules__={7549:function(){var t=0;function e(t,e){var i=t.getAttribute("data-background-color"),n=t.getAttribute("data-text-color"),r=document.createElement("style");r.type="text/css";var s="";i&&(s+='.TabModule[tabindex="'+e+'"] .TabModule-tab.active { background: '+i+"; } ",s+='.TabModule[tabindex="'+e+'"] .TabModule-tab.active svg { fill: '+i+"; } ",s+='.TabModule[tabindex="'+e+'"] .TabModule-content { background: '+i+"; } ",s+='.TabModule[tabindex="'+e+'"] .TabModule-tabs-dropdown-container { background: '+i+"; } "),n&&(s+='.TabModule[tabindex="'+e+'"] .TabModule-tab.active { color: '+n+"; } ",s+='.TabModule[tabindex="'+e+'"] .TabModule-tab.active svg { fill: '+n+"; } ",s+='.TabModule[tabindex="'+e+'"] .TabModule-content { color: '+n+"; } "),r.appendChild(document.createTextNode(s)),document.head.appendChild(r)}function i(t,e){n(t);var i=e.getAttribute("data-tab-id");!function(t){var e=t.getAttribute("data-tab-id"),i=new URL(document.URL);i.hash="#".concat(e),document.location.href=i.href}(e),t.querySelector('.TabModule-panel[data-tab-content="'+i+'"]').classList.add("active"),t.querySelector('.TabsDefault-tab[data-tab-id="'+i+'"]').classList.add("active"),t.querySelector(".TabsDefault-tabs-dropdown").querySelectorAll('[data-tab-id="'.concat(i,'"]')).forEach(function(t){t.classList.add("active")})}function n(t){t.querySelector(".TabModule-tab.active")&&t.querySelector(".TabModule-tab.active").classList.remove("active"),t.querySelector(".TabModule-panel.active")&&t.querySelector(".TabModule-panel.active").classList.remove("active");var e=t.querySelectorAll(".TabModule-select-tab.active");e&&e.forEach(function(t){t.classList.remove("active")})}function r(t){var e=t.querySelectorAll(".TabModule-tab"),n=t.querySelectorAll(".TabModule-select-tab"),r=t.querySelector(".TabModule-dropdown-select");if(r&&r.addEventListener("change",function(e){var n=t.querySelector('.TabModule-tab[data-tab-id="'+r.value+'"]');i(t,n)}),e&&e.length)for(var s=function(){var n=e[o];a()===n.getAttribute("data-tab-id")&&i(t,n),n.addEventListener("click",function(){window.dispatchEvent(new Event("resize")),i(t,n)})},o=0;o<e.length;o++)s();if(n&&n.length){var l=t.querySelector(".TabsDefault-tabs-dropdown-select");l&&l.addEventListener("click",function(){l.closest(".TabsDefault-tabs-dropdown").classList.toggle("open")});for(var h=function(){var e=n[c];a()===e.getAttribute("data-tab-id")&&i(t,e),e.addEventListener("click",function(){l.closest(".TabsDefault-tabs-dropdown").classList.remove("open"),i(t,e),window.dispatchEvent(new Event("resize"))})},c=0;c<n.length;c++)h()}}function s(){var i=document.querySelectorAll(".TabModule");if(i&&i.length)for(var s=0;s<i.length;s++)i[s].setAttribute("tabindex",t),r(i[s]),e(i[s],t),i[s].getAttribute("data-tabs-closed")&&n(i[s]),t++}function a(){return document.URL.split("#").length>1?document.URL.split("#")[1]:null}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",function(){s()}):s()},6272:function(){var t=0;function e(t,e){var i=t.getAttribute("data-background-color"),n=t.getAttribute("data-text-color"),r=document.createElement("style");r.type="text/css";var s="";i&&(s+='.TabsEmbedded[tabindex="'+e+'"] .TabsEmbedded-tab.active { background: '+i+"; } ",s+='.TabsEmbedded[tabindex="'+e+'"] .TabsEmbedded-tab.active svg { fill: '+i+"; } ",s+='.TabsEmbedded[tabindex="'+e+'"] .TabsEmbedded-content { background: '+i+"; } ",s+='.TabsEmbedded[tabindex="'+e+'"] .TabsEmbedded-tabs-dropdown-container { background: '+i+"; } "),n&&(s+='.TabsEmbedded[tabindex="'+e+'"] .TabsEmbedded-tab.active { color: '+n+"; } ",s+='.TabsEmbedded[tabindex="'+e+'"] .TabsEmbedded-tab.active svg { fill: '+n+"; } ",s+='.TabsEmbedded[tabindex="'+e+'"] .TabsEmbedded-content { color: '+n+"; } "),r.appendChild(document.createTextNode(s)),document.head.appendChild(r)}function i(t,e){n(t);var i=e.getAttribute("data-tab-id");e.classList.add("active"),t.querySelector('.TabsEmbedded-panel[data-tab-content="'+i+'"]').classList.add("active"),window.dispatchEvent(new Event("resize"))}function n(t){t.querySelector(".TabsEmbedded-tab.active")&&t.querySelector(".TabsEmbedded-tab.active").classList.remove("active"),t.querySelector(".TabsEmbedded-panel.active")&&t.querySelector(".TabsEmbedded-panel.active").classList.remove("active")}function r(t){var e=t.querySelectorAll(".TabsEmbedded-tab"),n=t.querySelector(".TabsEmbedded-dropdown-select");if(n&&n.addEventListener("change",function(e){var r=t.querySelector('.TabsEmbedded-tab[data-tab-id="'+n.value+'"]');
2i(t,r)}),e&&e.length)for(var r=function(){var n=e[s];(document.URL.split("#").length>1?document.URL.split("#")[1]:null)===n.getAttribute("data-tab-id")&&i(t,n),n.addEventListener("click",function(){window.dispatchEvent(new Event("resize")),i(t,n)})},s=0;s<e.length;s++)r()}document.readyState,function(){var i=document.querySelectorAll(".TabsEmbedded");if(i&&i.length)for(var s=0;s<i.length;s++)i[s].setAttribute("tabindex",t),r(i[s]),e(i[s],t),i[s].getAttribute("data-tabs-closed")&&n(i[s]),t++}()},9261:function(t,e){var i,n;i=function(){return function(t,e){e=e||{};var i,n=window,r={clamp:e.clamp||2,useNativeClamp:void 0===e.useNativeClamp||e.useNativeClamp,splitOnChars:e.splitOnChars||[".","-","â","â"," "],animate:e.animate||!1,truncationChar:e.truncationChar||"â¦",truncationHTML:e.truncationHTML},s=t.style,a=t.innerHTML,o=void 0!==t.style.webkitLineClamp,l=r.clamp,h=l.indexOf&&(l.indexOf("px")>-1||l.indexOf("em")>-1);function c(t,e){return n.getComputedStyle||(n.getComputedStyle=function(t,e){return this.el=t,this.getPropertyValue=function(e){var i=/(\-([a-z]){1})/g;return"float"==e&&(e="styleFloat"),i.test(e)&&(e=e.replace(i,function(){return arguments[2].toUpperCase()})),t.currentStyle&&t.currentStyle[e]?t.currentStyle[e]:null},this}),n.getComputedStyle(t,null).getPropertyValue(e)}function u(e){var i=e||t.clientHeight,n=d(t);return Math.max(Math.floor(i/n),0)}function d(t){var e=c(t,"line-height");return"normal"==e&&(e=1.187*parseInt(c(t,"font-size"))),Math.ceil(parseFloat(e))}r.truncationHTML&&((i=document.createElement("span")).innerHTML=r.truncationHTML);var f,p,m,g,y=r.splitOnChars.slice(0),v=y[0];function b(e){if(e.lastChild)return e.lastChild.childNodes&&e.lastChild.childNodes.length>0?b(Array.prototype.slice.call(e.childNodes).pop()):e.lastChild&&e.lastChild.nodeValue&&""!==e.lastChild.nodeValue&&e.lastChild.nodeValue!=r.truncationChar?e.lastChild:(e.lastChild.parentNode.removeChild(e.lastChild),b(t))}function S(t,e){t.nodeValue=e+r.truncationChar}if("auto"==l?l=u():h&&(l=u(parseInt(l))),o&&r.useNativeClamp)s.overflow="hidden",s.textOverflow="ellipsis",s.webkitBoxOrient="vertical",s.display="-webkit-box",s.webkitLineClamp=l,h&&(s.height=r.clamp+"px");else{var E=(g=l,d(t)*g);
2E<t.clientHeight&&(m=function e(n,s){if(n&&s){var a=n.nodeValue.replace(r.truncationChar,"");if(f||(v=y.length>0?y.shift():"",f=a.split(v)),f.length>1?(p=f.pop(),S(n,f.join(v))):f=null,i&&(n.nodeValue=n.nodeValue.replace(r.truncationChar,""),t.innerHTML=n.nodeValue+" "+i.innerHTML+r.truncationChar),f){if(t.clientHeight<=s){if(!(y.length>=0&&""!==v))return t.innerHTML;S(n,f.join(v)+v+p),f=null}}else""===v&&(S(n,""),n=b(t),y=r.splitOnChars.slice(0),v=y[0],f=null,p=null);if(!r.animate)return e(n,s);setTimeout(function(){e(n,s)},!0===r.animate?10:r.animate)}}(b(t),E))}return{original:a,clamped:m}}},void 0===(n=i.apply(e,[]))||(t.exports=n)},9786:function(t,e,i){var n,r;!function(s,a){"use strict";void 0===(r="function"==typeof(n=a)?n.call(e,i,e,t):n)||(t.exports=r)}(window,function(){"use strict";var t=function(){var t=window.Element.prototype;if(t.matches)return"matches";if(t.matchesSelector)return"matchesSelector";for(var e=["webkit","moz","ms","o"],i=0;i<e.length;i++){var n=e[i]+"MatchesSelector";if(t[n])return n}}();return function(e,i){return e[t](i)}})},2137:function(t,e,i){var n,r;"undefined"!=typeof window&&window,void 0===(r="function"==typeof(n=function(){"use strict";function t(){}var e=t.prototype;return e.on=function(t,e){if(t&&e){var i=this._events=this._events||{},n=i[t]=i[t]||[];return-1==n.indexOf(e)&&n.push(e),this}},e.once=function(t,e){if(t&&e){this.on(t,e);var i=this._onceEvents=this._onceEvents||{};return(i[t]=i[t]||{})[e]=!0,this}},e.off=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){var n=i.indexOf(e);return-1!=n&&i.splice(n,1),this}},e.emitEvent=function(t,e){var i=this._events&&this._events[t];if(i&&i.length){i=i.slice(0),e=e||[];for(var n=this._onceEvents&&this._onceEvents[t],r=0;r<i.length;r++){var s=i[r];n&&n[s]&&(this.off(t,s),delete n[s]),s.apply(this,e)}return this}},e.allOff=function(){delete this._events,delete this._onceEvents},t})?n.call(e,i,e,t):n)||(t.exports=r)},7115:function(t){"use strict";var e=function(){function t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}return function(e,i,n){return i&&t(e.prototype,i),n&&t(e,n),e}}(),i={emitDelay:10,strictMode:!1},n=function(){function t(){var e=arguments.length<=0||void 0===arguments[0]?i:arguments[0];!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n,r;n=e.hasOwnProperty("emitDelay")?e.emitDelay:i.emitDelay,this._emitDelay=n,r=e.hasOwnProperty("strictMode")?e.strictMode:i.strictMode,this._strictMode=r,this._listeners={},this.events=[]}return e(t,[{key:"_addListenner",value:function(t,e,i){if("function"!=typeof e)throw TypeError("listener must be a function");-1===this.events.indexOf(t)?(this._listeners[t]=[{once:i,fn:e}],this.events.push(t)):this._listeners[t].push({once:i,fn:e})}},{key:"on",value:function(t,e){this._addListenner(t,e,!1)}},{key:"once",value:function(t,e){this._addListenner(t,e,!0)}},{key:"off",value:function(t,e){var i,n,r=this,s=this.events.indexOf(t);t&&-1!==s&&(e?(i=[],(n=r._listeners[t]).forEach(function(t,n){t.fn===e&&i.unshift(n)}
2),i.forEach(function(t){n.splice(t,1)}),n.length||(r.events.splice(s,1),delete r._listeners[t])):(delete this._listeners[t],this.events.splice(s,1)))}},{key:"_applyEvents",value:function(t,e){var i=this._listeners[t];if(i&&i.length){var n=[];i.forEach(function(t,i){t.fn.apply(null,e),t.once&&n.unshift(i)}),n.forEach(function(t){i.splice(t,1)})}else if(this._strictMode)throw"No listeners specified for event: "+t}},{key:"emit",value:function(t){for(var e=this,i=arguments.length,n=Array(i>1?i-1:0),r=1;r<i;r++)n[r-1]=arguments[r];this._emitDelay?setTimeout(function(){e._applyEvents.call(e,t,n)},this._emitDelay):this._applyEvents(t,n)}},{key:"emitSync",value:function(t){for(var e=arguments.length,i=Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];this._applyEvents(t,i)}},{key:"destroy",value:function(){this._listeners={},this.events=[]}}]),t}();t.exports=n},977:function(t,e,i){var n,r;!function(s){n=[i(9786)],r=function(t){return function(t,e){"use strict";var i={extend:function(t,e){for(var i in e)t[i]=e[i];return t},modulo:function(t,e){return(t%e+e)%e}},n=Array.prototype.slice;i.makeArray=function(t){return Array.isArray(t)?t:null==t?[]:"object"==typeof t&&"number"==typeof t.length?n.call(t):[t]},i.removeFrom=function(t,e){var i=t.indexOf(e);-1!=i&&t.splice(i,1)},i.getParent=function(t,i){for(;t.parentNode&&t!=document.body;)if(t=t.parentNode,e(t,i))return t},i.getQueryElement=function(t){return"string"==typeof t?document.querySelector(t):t},i.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},i.filterFindElements=function(t,n){t=i.makeArray(t);var r=[];return t.forEach(function(t){if(t instanceof HTMLElement)if(n){e(t,n)&&r.push(t);for(var i=t.querySelectorAll(n),s=0;s<i.length;s++)r.push(i[s])}else r.push(t)}),r},i.debounceMethod=function(t,e,i){i=i||100;var n=t.prototype[e],r=e+"Timeout";t.prototype[e]=function(){var t=this[r];clearTimeout(t);var e=arguments,s=this;this[r]=setTimeout(function(){n.apply(s,e),delete s[r]},i)}},i.docReady=function(t){var e=document.readyState;"complete"==e||"interactive"==e?setTimeout(t):document.addEventListener("DOMContentLoaded",t)},i.toDashed=function(t){return t.replace(/(.)([A-Z])/g,function(t,e,i){return e+"-"+i}).toLowerCase()};var r=t.console;return i.htmlInit=function(e,n){i.docReady(function(){var s=i.toDashed(n),a="data-"+s,o=document.querySelectorAll("["+a+"]"),l=document.querySelectorAll(".js-"+s),h=i.makeArray(o).concat(i.makeArray(l)),c=a+"-options",u=t.jQuery;h.forEach(function(t){var i,s=t.getAttribute(a)||t.getAttribute(c);try{i=s&&JSON.parse(s)}catch(e){return void(r&&r.error("Error parsing "+a+" on "+t.className+": "+e))}var o=new e(t,i);u&&u.data(t,n,o)})})},i}(s,t)}.apply(e,n),void 0===r||(t.exports=r)}(window)},5839:function(t,e,i){var n,r,s;window,r=[i(5298),i(977)],void 0===(s="function"==typeof(n=function(t,e){"use strict";t.createMethods.push("_createAsNavFor");var i=t.prototype;return i._createAsNavFor=function(){this.on("activate",this.activateAsNavFor),this.on("deactivate",this.deactivateAsNavFor),this.on("destroy",this.destroyAsNavFor);var t=this.options.asNavFor;if(t){var e=this;setTimeout(function(){e.setNavCompanion(t)})}},i.setNavCompanion=function(i){i=e.getQueryElement(i);var n=t.data(i);if(n&&n!=this){this.navCompanion=n;var r=this;this.onNavCompanionSelect=function(){r.navCompanionSelect()},n.on("select",this.onNavCompanionSelect),this.on("staticClick",this.onNavStaticClick),this.navCompanionSelect(!0)}},i.navCompanionSelect=function(t){if(this.navCompanion){var e=this.navCompanion.selectedCells[0],i=this.navCompanion.cells.indexOf(e),n=i+this.navCompanion.selectedCells.length-1,r=Math.floor((a=i,o=n,l=this.navCompanion.cellAlign,(o-a)*l+a));if(this.selectCell(r,!1,t),this.removeNavSelectedElements(),!(r>=this.cells.length)){var s=this.cells.slice(i,n+1);this.navSelectedElements=s.map(function(t){return t.element}),this.changeNavSelectedClass("add")}}var a,o,l},i.changeNavSelectedClass=function(t){this.navSelectedElements.forEach(function(e){e.classList[t]("is-nav-selected")})},i.activateAsNavFor=function(){this.navCompanionSelect(!0)},i.removeNavSelectedElements=function(){this.navSelectedElements&&(this.changeNavSelectedClass("remove"),delete this.navSelectedElements)}
vendor: 101,751 bytes, line 2
2,i.onNavStaticClick=function(t,e,i,n){"number"==typeof n&&this.navCompanion.selectCell(n)},i.deactivateAsNavFor=function(){this.removeNavSelectedElements()},i.destroyAsNavFor=function(){this.navCompanion&&(this.navCompanion.off("select",this.onNavCompanionSelect),this.off("staticClick",this.onNavStaticClick),delete this.navCompanion)},t})?n.apply(e,r):n)||(t.exports=s)},7967:function(t,e,i){var n,r;window,n=[i(9945),i(977)],void 0===(r=function(t,e){return function(t,e,i){"use strict";var n=e.prototype;return n.insert=function(t,e){var i=this._makeCells(t);if(i&&i.length){var n=this.cells.length;e=void 0===e?n:e;var r=function(t){var e=document.createDocumentFragment();return t.forEach(function(t){e.appendChild(t.element)}),e}(i),s=e==n;if(s)this.slider.appendChild(r);else{var a=this.cells[e].element;this.slider.insertBefore(r,a)}if(0===e)this.cells=i.concat(this.cells);else if(s)this.cells=this.cells.concat(i);else{var o=this.cells.splice(e,n-e);this.cells=this.cells.concat(i).concat(o)}this._sizeCells(i),this.cellChange(e,!0)}},n.append=function(t){this.insert(t,this.cells.length)},n.prepend=function(t){this.insert(t,0)},n.remove=function(t){var e=this.getCells(t);if(e&&e.length){var n=this.cells.length-1;e.forEach(function(t){t.remove();var e=this.cells.indexOf(t);n=Math.min(e,n),i.removeFrom(this.cells,t)},this),this.cellChange(n,!0)}},n.cellSizeChange=function(t){var e=this.getCell(t);if(e){e.getSize();var i=this.cells.indexOf(e);this.cellChange(i)}},n.cellChange=function(t,e){var i=this.selectedElement;this._positionCells(t),this._getWrapShiftCells(),this.setGallerySize();var n=this.getCell(i);n&&(this.selectedIndex=this.getCellSlideIndex(n)),this.selectedIndex=Math.min(this.slides.length-1,this.selectedIndex),this.emitEvent("cellChange",[t]),this.select(this.selectedIndex),e&&this.positionSliderAtSelected()},e}(0,t,e)}.apply(e,n))||(t.exports=r)},6209:function(t,e,i){var n,r;window,n=[i(977)],void 0===(r=function(t){return function(t,e){"use strict";return{startAnimation:function(){this.isAnimating||(this.isAnimating=!0,this.restingFrames=0,this.animate())},animate:function(){this.applyDragForce(),this.applySelectedAttraction();var t=this.x;if(this.integratePhysics(),this.positionSlider(),this.settle(t),this.isAnimating){var e=this;requestAnimationFrame(function(){e.animate()})}},positionSlider:function(){var t=this.x;this.options.wrapAround&&this.cells.length>1&&(t=e.modulo(t,this.slideableWidth),t-=this.slideableWidth,this.shiftWrapCells(t)),this.setTranslateX(t,this.isAnimating),this.dispatchScrollEvent()},setTranslateX:function(t,e){t+=this.cursorPosition,t=this.options.rightToLeft?-t:t;var i=this.getPositionValue(t);this.slider.style.transform=e?"translate3d("+i+",0,0)":"translateX("+i+")"},dispatchScrollEvent:function(){var t=this.slides[0];if(t){var e=-this.x-t.target,i=e/this.slidesWidth;this.dispatchEvent("scroll",null,[i,e])}},positionSliderAtSelected:function(){this.cells.length&&(this.x=-this.selectedSlide.target,this.velocity=0,this.positionSlider())},getPositionValue:function(t){return this.options.percentPosition?.01*Math.round(t/this.size.innerWidth*1e4)+"%":Math.round(t)+"px"},settle:function(t){!this.isPointerDown&&Math.round(100*this.x)==Math.round(100*t)&&this.restingFrames++,this.restingFrames>2&&(this.isAnimating=!1,delete this.isFreeScrolling,this.positionSlider(),this.dispatchEvent("settle",null,[this.selectedIndex]))},shiftWrapCells:function(t){var e=this.cursorPosition+t;this._shiftCells(this.beforeShiftCells,e,-1);var i=this.size.innerWidth-(t+this.slideableWidth+this.cursorPosition);this._shiftCells(this.afterShiftCells,i,1)},_shiftCells:function(t,e,i){for(var n=0;n<t.length;n++){var r=t[n],s=e>0?i:0;r.wrapShift(s),e-=r.size.outerWidth}},_unshiftCells:function(t){if(t&&t.length)for(var e=0;e<t.length;e++)t[e].wrapShift(0)},integratePhysics:function(){this.x+=this.velocity,this.velocity*=this.getFrictionFactor()},applyForce:function(t){this.velocity+=t},getFrictionFactor:function(){return 1-this.options[this.isFreeScrolling?"freeScrollFriction":"friction"]},getRestingPosition:function(){return this.x+this.velocity/(1-this.getFrictionFactor())},applyDragForce:function(){if(this.isDraggable&&this.isPointerDown){var t=this.dragX-this.x-this.velocity;this.applyForce(t)}},applySelectedAttraction:function(){if((!this.isDraggable||!this.isPointerDown)&&!this.isFreeScrolling&&this.slides.length){var t=(-1*this.selectedSlide.target-this.x)*this.options.selectedAttraction;this.applyForce(t)}}}}(0,t)}.apply(e,n))||(t.exports=r)},7828:function(t,e,i){var n,r;window,n=[i(1485)],void 0===(r=function(t){return function(t,e){"use strict";function i(t,e){this.element=t,this.parent=e,this.create()}var n=i.prototype;return n.create=function(){this.element.style.position="absolute",this.element.setAttribute("aria-hidden","true"),this.x=0,this.shift=0,this.element.style[this.parent.originSide]=0},n.destroy=function(){this.unselect(),this.element.style.position="";var t=this.parent.originSide;this.element.style[t]="",this.element.style.transform="",this.element.removeAttribute("aria-hidden")},n.getSize=function(){this.size=e(this.element)},n.setPosition=function(t){this.x=t,this.updateTarget(),this.renderPosition(t)},n.updateTarget=n.setDefaultTarget=function(){var t="left"==this.parent.originSide?"marginLeft":"marginRight";this.target=this.x+this.size[t]+this.size.width*this.parent.cellAlign},n.renderPosition=function(t){var e="left"===this.parent.originSide?1:-1,i=this.parent.options.percentPosition?t*e*(this.parent.size.innerWidth/this.size.width):t*e;this.element.style.transform="translateX("+this.parent.getPositionValue(i)+")"},n.select=function(){this.element.classList.add("is-selected"),this.element.removeAttribute("aria-hidden")},n.unselect=function(){this.element.classList.remove("is-selected"),this.element.setAttribute("aria-hidden","true")},n.wrapShift=function(t){this.shift=t,this.renderPosition(this.x+this.parent.slideableWidth*t)},n.remove=function(){this.element.parentNode.removeChild(this.element)},i}(0,t)}.apply(e,n))||(t.exports=r)},3562:function(t,e,i){var n,r;!function(s){n=[i(9945),i(6377),i(977)],r=function(t,e,i){return function(t,e,i,n){"use strict";n.extend(e.defaults,{draggable:">1",dragThreshold:3}),e.createMethods.push("_createDrag");var r=e.prototype;n.extend(r,i.prototype),r._touchActionValue="pan-y",r._createDrag=function(){this.on("activate",this.onActivateDrag),this.on("uiChange",this._uiChangeDrag),this.on("deactivate",this.onDeactivateDrag),this.on("cellChange",this.updateDraggable)},r.onActivateDrag=function(){this.handles=[this.viewport],this.bindHandles(),this.updateDraggable()},r.onDeactivateDrag=function(){this.unbindHandles(),this.element.classList.remove("is-draggable")},r.updateDraggable=function(){">1"==this.options.draggable?this.isDraggable=this.slides.length>1:this.isDraggable=this.options.draggable,this.isDraggable?this.element.classList.add("is-draggable"):this.element.classList.remove("is-draggable")},r.bindDrag=function(){this.options.draggable=!0,this.updateDraggable()},r.unbindDrag=function(){this.options.draggable=!1,this.updateDraggable()},r._uiChangeDrag=function(){delete this.isFreeScrolling},r.pointerDown=function(e,i){this.isDraggable?this.okayPointerDown(e)&&(this._pointerDownPreventDefault(e),this.pointerDownFocus(e),document.activeElement!=this.element&&this.pointerDownBlur(),this.dragX=this.x,this.viewport.classList.add("is-pointer-down"),this.pointerDownScroll=a(),t.addEventListener("scroll",this),this._pointerDownDefault(e,i)):this._pointerDownDefault(e,i)},r._pointerDownDefault=function(t,e){this.pointerDownPointer={pageX:e.pageX,pageY:e.pageY},this._bindPostStartEvents(t),this.dispatchEvent("pointerDown",t,[e])};var s={INPUT:!0,TEXTAREA:!0,SELECT:!0};function a(){return{x:t.pageXOffset,y:t.pageYOffset}}return r.pointerDownFocus=function(t){s[t.target.nodeName]||this.focus()},r._pointerDownPreventDefault=function(t){var e="touchstart"==t.type,i="touch"==t.pointerType,n=s[t.target.nodeName];e||i||n||t.preventDefault()},r.hasDragStarted=function(t){return Math.abs(t.x)>this.options.dragThreshold},r.pointerUp=function(t,e){delete this.isTouchScrolling,this.viewport.classList.remove("is-pointer-down"),this.dispatchEvent("pointerUp",t,[e]),this._dragPointerUp(t,e)},r.pointerDone=function(){t.removeEventListener("scroll",this),delete this.pointerDownScroll},r.dragStart=function(e,i){this.isDraggable&&(this.dragStartPosition=this.x,this.startAnimation(),t.removeEventListener("scroll",this),this.dispatchEvent("dragStart",e,[i]))},r.pointerMove=function(t,e){var i=this._dragPointerMove(t,e);this.dispatchEvent("pointerMove",t,[e,i]),this._dragMove(t,e,i)},r.dragMove=function(t,e,i){if(this.isDraggable){t.preventDefault(),this.previousDragX=this.dragX;var n=this.options.rightToLeft?-1:1;this.options.wrapAround&&(i.x%=this.slideableWidth);var r=this.dragStartPosition+i.x*n;if(!this.options.wrapAround&&this.slides.length){var s=Math.max(-this.slides[0].target,this.dragStartPosition);r=r>s?.5*(r+s):r;var a=Math.min(-this.getLastSlide().target,this.dragStartPosition);r=r<a?.5*(r+a):r}this.dragX=r,this.dragMoveTime=new Date,this.dispatchEvent("dragMove",t,[e,i])}},r.dragEnd=function(t,e){if(this.isDraggable){this.options.freeScroll&&(this.isFreeScrolling=!0);var i=this.dragEndRestingSelect();if(this.options.freeScroll&&!this.options.wrapAround){var n=this.getRestingPosition();this.isFreeScrolling=-n>this.slides[0].target&&-n<this.getLastSlide().target}else this.options.freeScroll||i!=this.selectedIndex||(i+=this.dragEndBoostSelect());delete this.previousDragX,this.isDragSelect=this.options.wrapAround,this.select(i),delete this.isDragSelect,this.dispatchEvent("dragEnd",t,[e])}},r.dragEndRestingSelect=function(){var t=this.getRestingPosition(),e=Math.abs(this.getSlideDistance(-t,this.selectedIndex)),i=this._getClosestResting(t,e,1),n=this._getClosestResting(t,e,-1);return i.distance<n.distance?i.index:n.index},r._getClosestResting=function(t,e,i){for(var n=this.selectedIndex,r=1/0,s=this.options.contain&&!this.options.wrapAround?function(t,e){return t<=e}:function(t,e){return t<e};s(e,r)&&(n+=i,r=e,null!==(e=this.getSlideDistance(-t,n)));)e=Math.abs(e);return{distance:r,index:n-i}},r.getSlideDistance=function(t,e){var i=this.slides.length,r=this.options.wrapAround&&i>1,s=r?n.modulo(e,i):e,a=this.slides[s];if(!a)return null;var o=r?this.slideableWidth*Math.floor(e/i):0;return t-(a.target+o)},r.dragEndBoostSelect=function(){if(void 0===this.previousDragX||!this.dragMoveTime||new Date-this.dragMoveTime>100)return 0;var t=this.getSlideDistance(-this.dragX,this.selectedIndex),e=this.previousDragX-this.dragX;return t>0&&e>0?1:t<0&&e<0?-1:0},r.staticClick=function(t,e){var i=this.getParentCell(t.target),n=i&&i.element,r=i&&this.cells.indexOf(i);this.dispatchEvent("staticClick",t,[e,n,r])},r.onscroll=function(){var t=a(),e=this.pointerDownScroll.x-t.x,i=this.pointerDownScroll.y-t.y;(Math.abs(e)>3||Math.abs(i)>3)&&this._pointerDone()},e}(s,t,e,i)}.apply(e,n),void 0===r||(t.exports=r)}(window)},9945:function(t,e,i){var n,r;!function(s){n=[i(2137),i(1485),i(977),i(7828),i(1483),i(6209)],r=function(t,e,i,n,r,a){return function(t,e,i,n,r,s,a){"use strict";var o=t.jQuery,l=t.getComputedStyle,h=t.console;function c(t,e){for(t=n.makeArray(t);t.length;)e.appendChild(t.shift())}var u=0,d={};function f(t,e){var i=n.getQueryElement(t);if(i){if(this.element=i,this.element.flickityGUID){var r=d[this.element.flickityGUID];return r&&r.option(e),r}o&&(this.$element=o(this.element)),this.options=n.extend({},this.constructor.defaults),this.option(e),this._create()}else h&&h.error("Bad element for Flickity: "+(i||t))}f.defaults={accessibility:!0,cellAlign:"center",freeScrollFriction:.075,friction:.28,namespaceJQueryEvents:!0,percentPosition:!0,resize:!0,selectedAttraction:.025,setGallerySize:!0},f.createMethods=[];var p=f.prototype;n.extend(p,e.prototype),p._create=function(){var e=this.guid=++u;for(var i in this.element.flickityGUID=e,d[e]=this,this.selectedIndex=0,this.restingFrames=0,this.x=0,this.velocity=0,this.originSide=this.options.rightToLeft?"right":"left",this.viewport=document.createElement("div"),this.viewport.className="flickity-viewport",this._createSlider(),(this.options.resize||this.options.watchCSS)&&t.addEventListener("resize",this),this.options.on){var n=this.options.on[i];this.on(i,n)}f.createMethods.forEach(function(t){this[t]()},this),this.options.watchCSS?this.watchCSS():this.activate()},p.option=function(t){n.extend(this.options,t)},p.activate=function(){this.isActive||(this.isActive=!0,this.element.classList.add("flickity-enabled"),this.options.rightToLeft&&this.element.classList.add("flickity-rtl"),this.getSize(),c(this._filterFindCellElements(this.element.children),this.slider),this.viewport.appendChild(this.slider),this.element.appendChild(this.viewport),this.reloadCells(),this.options.accessibility&&(this.element.tabIndex=0,this.element.addEventListener("keydown",this)),this.emitEvent("activate"),this.selectInitialIndex(),this.isInitActivated=!0,this.dispatchEvent("ready"))},p._createSlider=function(){var t=document.createElement("div");t.className="flickity-slider",t.style[this.originSide]=0,this.slider=t},p._filterFindCellElements=function(t){return n.filterFindElements(t,this.options.cellSelector)},p.reloadCells=function(){this.cells=this._makeCells(this.slider.children),this.positionCells(),this._getWrapShiftCells(),this.setGallerySize()},p._makeCells=function(t){return this._filterFindCellElements(t).map(function(t){return new r(t,this)},this)},p.getLastCell=function(){return this.cells[this.cells.length-1]},p.getLastSlide=function(){return this.slides[this.slides.length-1]},p.positionCells=function(){this._sizeCells(this.cells),this._positionCells(0)},p._positionCells=function(t){t=t||0,this.maxCellHeight=t&&this.maxCellHeight||0;var e=0;if(t>0){var i=this.cells[t-1];e=i.x+i.size.outerWidth}for(var n=this.cells.length,r=t;r<n;r++){var s=this.cells[r];s.setPosition(e),e+=s.size.outerWidth,this.maxCellHeight=Math.max(s.size.outerHeight,this.maxCellHeight)}this.slideableWidth=e,this.updateSlides(),this._containSlides(),this.slidesWidth=n?this.getLastSlide().target-this.slides[0].target:0},p._sizeCells=function(t){t.forEach(function(t){t.getSize()})},p.updateSlides=function(){if(this.slides=[],this.cells.length){var t=new s(this);this.slides.push(t);var e="left"==this.originSide?"marginRight":"marginLeft",i=this._getCanCellFit();this.cells.forEach(function(n,r){if(t.cells.length){var a=t.outerWidth-t.firstMargin+(n.size.outerWidth-n.size[e]);i.call(this,r,a)||(t.updateTarget(),t=new s(this),this.slides.push(t)),t.addCell(n)}else t.addCell(n)},this),t.updateTarget(),this.updateSelectedSlide()}},p._getCanCellFit=function(){var t=this.options.groupCells;if(!t)return function(){return!1};if("number"==typeof t){var e=parseInt(t,10);return function(t){return t%e!==0}}var i="string"==typeof t&&t.match(/^(\d+)%$/),n=i?parseInt(i[1],10)/100:1;return function(t,e){return e<=(this.size.innerWidth+1)*n}},p._init=p.reposition=function(){this.positionCells(),this.positionSliderAtSelected()},p.getSize=function(){this.size=i(this.element),this.setCellAlign(),this.cursorPosition=this.size.innerWidth*this.cellAlign};var m={center:{left:.5,right:.5},left:{left:0,right:1},right:{right:0,left:1}};return p.setCellAlign=function(){var t=m[this.options.cellAlign];this.cellAlign=t?t[this.originSide]:this.options.cellAlign},p.setGallerySize=function(){if(this.options.setGallerySize){var t=this.options.adaptiveHeight&&this.selectedSlide?this.selectedSlide.height:this.maxCellHeight;this.viewport.style.height=t+"px"}},p._getWrapShiftCells=function(){if(this.options.wrapAround){this._unshiftCells(this.beforeShiftCells),this._unshiftCells(this.afterShiftCells);var t=this.cursorPosition,e=this.cells.length-1;this.beforeShiftCells=this._getGapCells(t,e,-1),t=this.size.innerWidth-this.cursorPosition,this.afterShiftCells=this._getGapCells(t,0,1)}},p._getGapCells=function(t,e,i){for(var n=[];t>0;){var r=this.cells[e];if(!r)break;n.push(r),e+=i,t-=r.size.outerWidth}return n},p._containSlides=function(){if(this.options.contain&&!this.options.wrapAround&&this.cells.length){var t=this.options.rightToLeft,e=t?"marginRight":"marginLeft",i=t?"marginLeft":"marginRight",n=this.slideableWidth-this.getLastCell().size[i],r=n<this.size.innerWidth,s=this.cursorPosition+this.cells[0].size[e],a=n-this.size.innerWidth*(1-this.cellAlign);this.slides.forEach(function(t){r?t.target=n*this.cellAlign:(t.target=Math.max(t.target,s),t.target=Math.min(t.target,a))},this)}},p.dispatchEvent=function(t,e,i){var n=e?[e].concat(i):i;if(this.emitEvent(t,n),o&&this.$element){var r=t+=this.options.namespaceJQueryEvents?".flickity":"";if(e){var s=new o.Event(e);s.type=t,r=s}this.$element.trigger(r,i)}},p.select=function(t,e,i){if(this.isActive&&(t=parseInt(t,10),this._wrapSelect(t),(this.options.wrapAround||e)&&(t=n.modulo(t,this.slides.length)),this.slides[t])){var r=this.selectedIndex;this.selectedIndex=t,this.updateSelectedSlide(),i?this.positionSliderAtSelected():this.startAnimation(),this.options.adaptiveHeight&&this.setGallerySize(),this.dispatchEvent("select",null,[t]),t!=r&&this.dispatchEvent("change",null,[t]),this.dispatchEvent("cellSelect")}},p._wrapSelect=function(t){var e=this.slides.length;if(!(this.options.wrapAround&&e>1))return t;var i=n.modulo(t,e),r=Math.abs(i-this.selectedIndex),s=Math.abs(i+e-this.selectedIndex),a=Math.abs(i-e-this.selectedIndex);!this.isDragSelect&&s<r?t+=e:!this.isDragSelect&&a<r&&(t-=e),t<0?this.x-=this.slideableWidth:t>=e&&(this.x+=this.slideableWidth)},p.previous=function(t,e){this.select(this.selectedIndex-1,t,e)},p.next=function(t,e){this.select(this.selectedIndex+1,t,e)},p.updateSelectedSlide=function(){var t=this.slides[this.selectedIndex];t&&(this.unselectSelectedSlide(),this.selectedSlide=t,t.select(),this.selectedCells=t.cells,this.selectedElements=t.getCellElements(),this.selectedCell=t.cells[0],this.selectedElement=this.selectedElements[0])},p.unselectSelectedSlide=function(){this.selectedSlide&&this.selectedSlide.unselect()},p.selectInitialIndex=function(){var t=this.options.initialIndex;if(this.isInitActivated)this.select(this.selectedIndex,!1,!0);else{if(t&&"string"==typeof t&&this.queryCell(t))return void this.selectCell(t,!1,!0);var e=0;t&&this.slides[t]&&(e=t),this.select(e,!1,!0)}},p.selectCell=function(t,e,i){var n=this.queryCell(t);if(n){var r=this.getCellSlideIndex(n);this.select(r,e,i)}},p.getCellSlideIndex=function(t){for(var e=0;e<this.slides.length;e++)if(-1!=this.slides[e].cells.indexOf(t))return e},p.getCell=function(t){for(var e=0;e<this.cells.length;e++){var i=this.cells[e];if(i.element==t)return i}},p.getCells=function(t){t=n.makeArray(t);var e=[];return t.forEach(function(t){var i=this.getCell(t);i&&e.push(i)},this),e},p.getCellElements=function(){return this.cells.map(function(t){return t.element})},p.getParentCell=function(t){return this.getCell(t)||(t=n.getParent(t,".flickity-slider > *"),this.getCell(t))},p.getAdjacentCellElements=function(t,e){if(!t)return this.selectedSlide.getCellElements();e=void 0===e?this.selectedIndex:e;var i=this.slides.length;if(1+2*t>=i)return this.getCellElements();for(var r=[],s=e-t;s<=e+t;s++){var a=this.options.wrapAround?n.modulo(s,i):s,o=this.slides[a];o&&(r=r.concat(o.getCellElements()))}return r},p.queryCell=function(t){if("number"==typeof t)return this.cells[t];if("string"==typeof t){if(t.match(/^[#.]?[\d/]/))return;t=this.element.querySelector(t)}return this.getCell(t)},p.uiChange=function(){this.emitEvent("uiChange")},p.childUIPointerDown=function(t){"touchstart"!=t.type&&t.preventDefault(),this.focus()},p.onresize=function(){this.watchCSS(),this.resize()},n.debounceMethod(f,"onresize",150),p.resize=function(){if(this.isActive&&!this.isAnimating&&!this.isDragging){this.getSize(),this.options.wrapAround&&(this.x=n.modulo(this.x,this.slideableWidth)),this.positionCells(),this._getWrapShiftCells(),this.setGallerySize(),this.emitEvent("resize");var t=this.selectedElements&&this.selectedElements[0];this.selectCell(t,!1,!0)}},p.watchCSS=function(){this.options.watchCSS&&(-1!=l(this.element,":after").content.indexOf("flickity")?this.activate():this.deactivate())},p.onkeydown=function(t){var e=document.activeElement&&document.activeElement!=this.element;if(this.options.accessibility&&!e){var i=f.keyboardHandlers[t.keyCode];i&&i.call(this)}},f.keyboardHandlers={37:function(){var t=this.options.rightToLeft?"next":"previous";this.uiChange(),this[t]()},39:function(){var t=this.options.rightToLeft?"previous":"next";this.uiChange(),this[t]()}},p.focus=function(){var e=t.pageYOffset;this.element.focus({preventScroll:!0}),t.pageYOffset!=e&&t.scrollTo(t.pageXOffset,e)},p.deactivate=function(){this.isActive&&(this.element.classList.remove("flickity-enabled"),this.element.classList.remove("flickity-rtl"),this.unselectSelectedSlide(),this.cells.forEach(function(t){t.destroy()}),this.element.removeChild(this.viewport),c(this.slider.children,this.element),this.options.accessibility&&(this.element.removeAttribute("tabIndex"),this.element.removeEventListener("keydown",this)),this.isActive=!1,this.emitEvent("deactivate"))},p.destroy=function(){this.deactivate(),t.removeEventListener("resize",this),this.allOff(),this.emitEvent("destroy"),o&&this.$element&&o.removeData(this.element,"flickity"),delete this.element.flickityGUID,delete d[this.guid]},n.extend(p,a),f.data=function(t){var e=(t=n.getQueryElement(t))&&t.flickityGUID;return e&&d[e]},n.htmlInit(f,"flickity"),o&&o.bridget&&o.bridget("flickity",f),f.setJQuery=function(t){o=t},f.Cell=r,f.Slide=s,f}(s,t,e,i,n,r,a)}.apply(e,n),void 0===r||(t.exports=r)}(window)},5298:function(t,e,i){var n,r,s;window,r=[i(9945),i(3562),i(376),i(3912),i(549),i(7967),i(8422)],void 0===(s="function"==typeof(n=function(t){return t})?n.apply(e,r):n)||(t.exports=s)},8422:function(t,e,i){var n,r;window,n=[i(9945),i(977)],void 0===(r=function(t,e){return function(t,e,i){"use strict";e.createMethods.push("_createLazyload");var n=e.prototype;function r(t,e){this.img=t,this.flickity=e,this.load()}return n._createLazyload=function(){this.on("select",this.lazyLoad)},n.lazyLoad=function(){var t=this.options.lazyLoad;if(t){var e="number"==typeof t?t:0,n=this.getAdjacentCellElements(e),s=[];n.forEach(function(t){var e=function(t){if("IMG"==t.nodeName){var e=t.getAttribute("data-flickity-lazyload"),n=t.getAttribute("data-flickity-lazyload-src"),r=t.getAttribute("data-flickity-lazyload-srcset");if(e||n||r)return[t]}var s=t.querySelectorAll("img[data-flickity-lazyload], img[data-flickity-lazyload-src], img[data-flickity-lazyload-srcset]");return i.makeArray(s)}(t);s=s.concat(e)}),s.forEach(function(t){new r(t,this)},this)}},r.prototype.handleEvent=i.handleEvent,r.prototype.load=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this);var t=this.img.getAttribute("data-flickity-lazyload")||this.img.getAttribute("data-flickity-lazyload-src"),e=this.img.getAttribute("data-flickity-lazyload-srcset");this.img.src=t,e&&this.img.setAttribute("srcset",e),this.img.removeAttribute("data-flickity-lazyload"),this.img.removeAttribute("data-flickity-lazyload-src"),this.img.removeAttribute("data-flickity-lazyload-srcset")},r.prototype.onload=function(t){this.complete(t,"flickity-lazyloaded")},r.prototype.onerror=function(t){this.complete(t,"flickity-lazyerror")},r.prototype.complete=function(t,e){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this);var i=this.flickity.getParentCell(this.img),n=i&&i.element;this.flickity.cellSizeChange(n),this.img.classList.add(e),this.flickity.dispatchEvent("lazyLoad",t,n)},e.LazyLoader=r,e}(0,t,e)}.apply(e,n))||(t.exports=r)},3912:function(t,e,i){var n,r;window,n=[i(9945),i(2475),i(977)],void 0===(r=function(t,e,i){return function(t,e,i,n){"use strict";function r(t){this.parent=t,this._create()}r.prototype=Object.create(i.prototype),r.prototype._create=function(){this.holder=document.createElement("ol"),this.holder.className="flickity-page-dots",this.dots=[],this.handleClick=this.onClick.bind(this),this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))},r.prototype.activate=function(){this.setDots(),this.holder.addEventListener("click",this.handleClick),this.bindStartEvent(this.holder),this.parent.element.appendChild(this.holder)},r.prototype.deactivate=function(){this.holder.removeEventListener("click",this.handleClick),this.unbindStartEvent(this.holder),this.parent.element.removeChild(this.holder)},r.prototype.setDots=function(){var t=this.parent.slides.length-this.dots.length;t>0?this.addDots(t):t<0&&this.removeDots(-t)},r.prototype.addDots=function(t){for(var e=document.createDocumentFragment(),i=[],n=this.dots.length,r=n+t,s=n;s<r;s++){var a=document.createElement("li");a.className="dot",a.setAttribute("aria-label","Page dot "+(s+1)),e.appendChild(a),i.push(a)}this.holder.appendChild(e),this.dots=this.dots.concat(i)},r.prototype.removeDots=function(t){this.dots.splice(this.dots.length-t,t).forEach(function(t){this.holder.removeChild(t)},this)},r.prototype.updateSelected=function(){this.selectedDot&&(this.selectedDot.className="dot",this.selectedDot.removeAttribute("aria-current")),this.dots.length&&(this.selectedDot=this.dots[this.parent.selectedIndex],this.selectedDot.className="dot is-selected",this.selectedDot.setAttribute("aria-current","step"))},r.prototype.onTap=r.prototype.onClick=function(t){var e=t.target;if("LI"==e.nodeName){this.parent.uiChange();var i=this.dots.indexOf(e);this.parent.select(i)}},r.prototype.destroy=function(){this.deactivate(),this.allOff()},e.PageDots=r,n.extend(e.defaults,{pageDots:!0}),e.createMethods.push("_createPageDots");var s=e.prototype;return s._createPageDots=function(){this.options.pageDots&&(this.pageDots=new r(this),this.on("activate",this.activatePageDots),this.on("select",this.updateSelectedPageDots),this.on("cellChange",this.updatePageDots),this.on("resize",this.updatePageDots),this.on("deactivate",this.deactivatePageDots))},s.activatePageDots=function(){this.pageDots.activate()},s.updateSelectedPageDots=function(){this.pageDots.updateSelected()},s.updatePageDots=function(){this.pageDots.setDots()},s.deactivatePageDots=function(){this.pageDots.deactivate()},e.PageDots=r,e}(0,t,e,i)}.apply(e,n))||(t.exports=r)},549:function(t,e,i){var n,r;window,n=[i(2137),i(977),i(9945)],void 0===(r=function(t,e,i){return function(t,e,i){"use strict";function n(t){this.parent=t,this.state="stopped",this.onVisibilityChange=this.visibilityChange.bind(this),this.onVisibilityPlay=this.visibilityPlay.bind(this)}n.prototype=Object.create(t.prototype),n.prototype.play=function(){"playing"!=this.state&&(document.hidden?document.addEventListener("visibilitychange",this.onVisibilityPlay):(this.state="playing",document.addEventListener("visibilitychange",this.onVisibilityChange),this.tick()))},n.prototype.tick=function(){if("playing"==this.state){var t=this.parent.options.autoPlay;t="number"==typeof t?t:3e3;var e=this;this.clear(),this.timeout=setTimeout(function(){e.parent.next(!0),e.tick()},t)}},n.prototype.stop=function(){this.state="stopped",this.clear(),document.removeEventListener("visibilitychange",this.onVisibilityChange)},n.prototype.clear=function(){clearTimeout(this.timeout)},n.prototype.pause=function(){"playing"==this.state&&(this.state="paused",this.clear())},n.prototype.unpause=function(){"paused"==this.state&&this.play()},n.prototype.visibilityChange=function(){this[document.hidden?"pause":"unpause"]()},n.prototype.visibilityPlay=function(){this.play(),document.removeEventListener("visibilitychange",this.onVisibilityPlay)},e.extend(i.defaults,{pauseAutoPlayOnHover:!0}),i.createMethods.push("_createPlayer");var r=i.prototype;return r._createPlayer=function(){this.player=new n(this),this.on("activate",this.activatePlayer),this.on("uiChange",this.stopPlayer),this.on("pointerDown",this.stopPlayer),this.on("deactivate",this.deactivatePlayer)},r.activatePlayer=function(){this.options.autoPlay&&(this.player.play(),this.element.addEventListener("mouseenter",this))},r.playPlayer=function(){this.player.play()},r.stopPlayer=function(){this.player.stop()},r.pausePlayer=function(){this.player.pause()},r.unpausePlayer=function(){this.player.unpause()},r.deactivatePlayer=function(){this.player.stop(),this.element.removeEventListener("mouseenter",this)},r.onmouseenter=function(){this.options.pauseAutoPlayOnHover&&(this.player.pause(),this.element.addEventListener("mouseleave",this))},r.onmouseleave=function(){this.player.unpause(),this.element.removeEventListener("mouseleave",this)},i.Player=n,i}(t,e,i)}.apply(e,n))||(t.exports=r)},376:function(t,e,i){var n,r;window,n=[i(9945),i(2475),i(977)],void 0===(r=function(t,e,i){return function(t,e,i,n){"use strict";var r="http://www.w3.org/2000/svg";function s(t,e){this.direction=t,this.parent=e,this._create()}s.prototype=Object.create(i.prototype),s.prototype._create=function(){this.isEnabled=!0,this.isPrevious=-1==this.direction;var t=this.parent.options.rightToLeft?1:-1;this.isLeft=this.direction==t;var e=this.element=document.createElement("button");e.className="flickity-button flickity-prev-next-button",e.className+=this.isPrevious?" previous":" next",e.setAttribute("type","button"),this.disable(),e.setAttribute("aria-label",this.isPrevious?"Previous":"Next");var i=this.createSVG();e.appendChild(i),this.parent.on("select",this.update.bind(this)),this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))},s.prototype.activate=function(){this.bindStartEvent(this.element),this.element.addEventListener("click",this),this.parent.element.appendChild(this.element)},s.prototype.deactivate=function(){this.parent.element.removeChild(this.element),this.unbindStartEvent(this.element),this.element.removeEventListener("click",this)},s.prototype.createSVG=function(){var t=document.createElementNS(r,"svg");t.setAttribute("class","flickity-button-icon"),t.setAttribute("viewBox","0 0 100 100");var e,i=document.createElementNS(r,"path"),n="string"==typeof(e=this.parent.options.arrowShape)?e:"M "+e.x0+",50 L "+e.x1+","+(e.y1+50)+" L "+e.x2+","+(e.y2+50)+" L "+e.x3+",50 L "+e.x2+","+(50-e.y2)+" L "+e.x1+","+(50-e.y1)+" Z";return i.setAttribute("d",n),i.setAttribute("class","arrow"),this.isLeft||i.setAttribute("transform","translate(100, 100) rotate(180) "),t.appendChild(i),t},s.prototype.handleEvent=n.handleEvent,s.prototype.onclick=function(){if(this.isEnabled){this.parent.uiChange();var t=this.isPrevious?"previous":"next";this.parent[t]()}},s.prototype.enable=function(){this.isEnabled||(this.element.disabled=!1,this.isEnabled=!0)},s.prototype.disable=function(){this.isEnabled&&(this.element.disabled=!0,this.isEnabled=!1)},s.prototype.update=function(){var t=this.parent.slides;if(this.parent.options.wrapAround&&t.length>1)this.enable();else{var e=t.length?t.length-1:0,i=this.isPrevious?0:e;this[this.parent.selectedIndex==i?"disable":"enable"]()}},s.prototype.destroy=function(){this.deactivate(),this.allOff()},n.extend(e.defaults,{prevNextButtons:!0,arrowShape:{x0:10,x1:60,y1:50,x2:70,y2:40,x3:30}}),e.createMethods.push("_createPrevNextButtons");var a=e.prototype;return a._createPrevNextButtons=function(){this.options.prevNextButtons&&(this.prevButton=new s(-1,this),this.nextButton=new s(1,this),this.on("activate",this.activatePrevNextButtons))},a.activatePrevNextButtons=function(){this.prevButton.activate(),this.nextButton.activate(),this.on("deactivate",this.deactivatePrevNextButtons)},a.deactivatePrevNextButtons=function(){this.prevButton.deactivate(),this.nextButton.deactivate(),this.off("deactivate",this.deactivatePrevNextButtons)},e.PrevNextButton=s,e}(0,t,e,i)}.apply(e,n))||(t.exports=r)},1483:function(t,e,i){var n,r;window,void 0===(r="function"==typeof(n=function(){"use strict";function t(t){this.parent=t,this.isOriginLeft="left"==t.originSide,this.cells=[],this.outerWidth=0,this.height=0}var e=t.prototype;return e.addCell=function(t){if(this.cells.push(t),this.outerWidth+=t.size.outerWidth,this.height=Math.max(t.size.outerHeight,this.height),1==this.cells.length){this.x=t.x;var e=this.isOriginLeft?"marginLeft":"marginRight";this.firstMargin=t.size[e]}},e.updateTarget=function(){var t=this.isOriginLeft?"marginRight":"marginLeft",e=this.getLastCell(),i=e?e.size[t]:0,n=this.outerWidth-(this.firstMargin+i);this.target=this.x+this.firstMargin+n*this.parent.cellAlign},e.getLastCell=function(){return this.cells[this.cells.length-1]},e.select=function(){this.cells.forEach(function(t){t.select()})},e.unselect=function(){this.cells.forEach(function(t){t.unselect()})},e.getCellElements=function(){return this.cells.map(function(t){return t.element})},t})?n.call(e,i,e,t):n)||(t.exports=r)},867:function(t,e,i){var n,r,s;window,r=[i(708)],void 0===(s="function"==typeof(n=function(t){"use strict";t.createMethods.push("_createHash");var e=t.prototype;e._createHash=function(){this.options.hash&&(this.connectedHashLinks=[],this.onHashLinkClick=function(t){t.preventDefault(),this.selectCell(t.currentTarget.hash),history.replaceState(null,"",t.currentTarget.hash)}.bind(this),this.on("activate",this.activateHash),this.on("deactivate",this.deactivateHash))},e.activateHash=function(){if(this.on("change",this.onChangeHash),void 0===this.options.initialIndex&&location.hash){var t=this.queryCell(location.hash);t&&(this.options.initialIndex=this.getCellSlideIndex(t))}this.connectHashLinks()},e.deactivateHash=function(){this.off("change",this.onChangeHash),this.disconnectHashLinks()},e.onChangeHash=function(){var t=this.selectedElement.id;if(t){var e="#"+t;history.replaceState(null,"",e)}},e.connectHashLinks=function(){for(var t=document.querySelectorAll("a"),e=0;e<t.length;e++)this.connectHashLink(t[e])};var i=document.createElement("a");return e.connectHashLink=function(t){t.hash&&(i.href=t.href,i.pathname==location.pathname&&this.queryCell(t.hash)&&(t.addEventListener("click",this.onHashLinkClick),this.connectedHashLinks.push(t)))},e.disconnectHashLinks=function(){this.connectedHashLinks.forEach(function(t){t.removeEventListener("click",this.onHashLinkClick)},this),this.connectedHashLinks=[]},t})?n.apply(e,r):n)||(t.exports=s)},3941:function(t,e,i){var n,r;window,n=[i(3103),i(977)],void 0===(r=function(t,e){return function(t,e,i){"use strict";var n=e.prototype;return n.insert=function(t,e){var i=this._makeCells(t);if(i&&i.length){var n=this.cells.length;e=void 0===e?n:e;var r=function(t){var e=document.createDocumentFragment();return t.forEach(function(t){e.appendChild(t.element)}),e}(i),s=e==n;if(s)this.slider.appendChild(r);else{var a=this.cells[e].element;this.slider.insertBefore(r,a)}if(0===e)this.cells=i.concat(this.cells);else if(s)this.cells=this.cells.concat(i);else{var o=this.cells.splice(e,n-e);this.cells=this.cells.concat(i).concat(o)}this._sizeCells(i),this.cellChange(e,!0)}},n.append=function(t){this.insert(t,this.cells.length)},n.prepend=function(t){this.insert(t,0)},n.remove=function(t){var e=this.getCells(t);if(e&&e.length){var n=this.cells.length-1;e.forEach(function(t){t.remove();var e=this.cells.indexOf(t);n=Math.min(e,n),i.removeFrom(this.cells,t)},this),this.cellChange(n,!0)}},n.cellSizeChange=function(t){var e=this.getCell(t);if(e){e.getSize();var i=this.cells.indexOf(e);this.cellChange(i)}},n.cellChange=function(t,e){var i=this.selectedElement;this._positionCells(t),this._getWrapShiftCells(),this.setGallerySize();var n=this.getCell(i);n&&(this.selectedIndex=this.getCellSlideIndex(n)),this.selectedIndex=Math.min(this.slides.length-1,this.selectedIndex),this.emitEvent("cellChange",[t]),this.select(this.selectedIndex),e&&this.positionSliderAtSelected()},e}(0,t,e)}.apply(e,n))||(t.exports=r)},2339:function(t,e,i){var n,r;window,n=[i(977)],void 0===(r=function(t){return function(t,e){"use strict";return{startAnimation:function(){this.isAnimating||(this.isAnimating=!0,this.restingFrames=0,this.animate())},animate:function(){this.applyDragForce(),this.applySelectedAttraction();var t=this.x;if(this.integratePhysics(),this.positionSlider(),this.settle(t),this.isAnimating){var e=this;requestAnimationFrame(function(){e.animate()})}},positionSlider:function(){var t=this.x;this.options.wrapAround&&this.cells.length>1&&(t=e.modulo(t,this.slideableWidth),t-=this.slideableWidth,this.shiftWrapCells(t)),this.setTranslateX(t,this.isAnimating),this.dispatchScrollEvent()},setTranslateX:function(t,e){t+=this.cursorPosition,t=this.options.rightToLeft?-t:t;var i=this.getPositionValue(t);this.slider.style.transform=e?"translate3d("+i+",0,0)":"translateX("+i+")"},dispatchScrollEvent:function(){var t=this.slides[0];if(t){var e=-this.x-t.target,i=e/this.slidesWidth;this.dispatchEvent("scroll",null,[i,e])}},positionSliderAtSelected:function(){this.cells.length&&(this.x=-this.selectedSlide.target,this.velocity=0,this.positionSlider())},getPositionValue:function(t){return this.options.percentPosition?.01*Math.round(t/this.size.innerWidth*1e4)+"%":Math.round(t)+"px"},settle:function(t){!this.isPointerDown&&Math.round(100*this.x)==Math.round(100*t)&&this.restingFrames++,this.restingFrames>2&&(this.isAnimating=!1,delete this.isFreeScrolling,this.positionSlider(),this.dispatchEvent("settle",null,[this.selectedIndex]))},shiftWrapCells:function(t){var e=this.cursorPosition+t;this._shiftCells(this.beforeShiftCells,e,-1);var i=this.size.innerWidth-(t+this.slideableWidth+this.cursorPosition);this._shiftCells(this.afterShiftCells,i,1)},_shiftCells:function(t,e,i){for(var n=0;n<t.length;n++){var r=t[n],s=e>0?i:0;r.wrapShift(s),e-=r.size.outerWidth}},_unshiftCells:function(t){if(t&&t.length)for(var e=0;e<t.length;e++)t[e].wrapShift(0)},integratePhysics:function(){this.x+=this.velocity,this.velocity*=this.getFrictionFactor()},applyForce:function(t){this.velocity+=t},getFrictionFactor:function(){return 1-this.options[this.isFreeScrolling?"freeScrollFriction":"friction"]},getRestingPosition:function(){return this.x+this.velocity/(1-this.getFrictionFactor())},applyDragForce:function(){if(this.isDraggable&&this.isPointerDown){var t=this.dragX-this.x-this.velocity;this.applyForce(t)}},applySelectedAttraction:function(){if((!this.isDraggable||!this.isPointerDown)&&!this.isFreeScrolling&&this.slides.length){var t=(-1*this.selectedSlide.target-this.x)*this.options.selectedAttraction;this.applyForce(t)}}}}(0,t)}.apply(e,n))||(t.exports=r)},7226:function(t,e,i){var n,r;window,n=[i(1485)],void 0===(r=function(t){return function(t,e){"use strict";function i(t,e){this.element=t,this.parent=e,this.create()}var n=i.prototype;return n.create=function(){this.element.style.position="absolute",this.element.setAttribute("aria-hidden","true"),this.x=0,this.shift=0,this.element.style[this.parent.originSide]=0},n.destroy=function(){this.unselect(),this.element.style.position="";var t=this.parent.originSide;this.element.style[t]="",this.element.style.transform="",this.element.removeAttribute("aria-hidden")},n.getSize=function(){this.size=e(this.element)},n.setPosition=function(t){this.x=t,this.updateTarget(),this.renderPosition(t)},n.updateTarget=n.setDefaultTarget=function(){var t="left"==this.parent.originSide?"marginLeft":"marginRight";this.target=this.x+this.size[t]+this.size.width*this.parent.cellAlign},n.renderPosition=function(t){var e="left"===this.parent.originSide?1:-1,i=this.parent.options.percentPosition?t*e*(this.parent.size.innerWidth/this.size.width):t*e;this.element.style.transform="translateX("+this.parent.getPositionValue(i)+")"},n.select=function(){this.element.classList.add("is-selected"),this.element.removeAttribute("aria-hidden")},n.unselect=function(){this.element.classList.remove("is-selected"),this.element.setAttribute("aria-hidden","true")},n.wrapShift=function(t){this.shift=t,this.renderPosition(this.x+this.parent.slideableWidth*t)},n.remove=function(){this.element.parentNode.removeChild(this.element)},i}(0,t)}.apply(e,n))||(t.exports=r)},6252:function(t,e,i){var n,r;!function(s){n=[i(3103),i(6377),i(977)],r=function(t,e,i){return function(t,e,i,n){"use strict";n.extend(e.defaults,{draggable:">1",dragThreshold:3}),e.createMethods.push("_createDrag");var r=e.prototype;n.extend(r,i.prototype),r._touchActionValue="pan-y",r._createDrag=function(){this.on("activate",this.onActivateDrag),this.on("uiChange",this._uiChangeDrag),this.on("deactivate",this.onDeactivateDrag),this.on("cellChange",this.updateDraggable)},r.onActivateDrag=function(){this.handles=[this.viewport],this.bindHandles(),this.updateDraggable()},r.onDeactivateDrag=function(){this.unbindHandles(),this.element.classList.remove("is-draggable")},r.updateDraggable=function(){">1"==this.options.draggable?this.isDraggable=this.slides.length>1:this.isDraggable=this.options.draggable,this.isDraggable?this.element.classList.add("is-draggable"):this.element.classList.remove("is-draggable")},r.bindDrag=function(){this.options.draggable=!0,this.updateDraggable()},r.unbindDrag=function(){this.options.draggable=!1,this.updateDraggable()},r._uiChangeDrag=function(){delete this.isFreeScrolling},r.pointerDown=function(e,i){this.isDraggable?this.okayPointerDown(e)&&(this._pointerDownPreventDefault(e),this.pointerDownFocus(e),document.activeElement!=this.element&&this.pointerDownBlur(),this.dragX=this.x,this.viewport.classList.add("is-pointer-down"),this.pointerDownScroll=a(),t.addEventListener("scroll",this),this._pointerDownDefault(e,i)):this._pointerDownDefault(e,i)},r._pointerDownDefault=function(t,e){this.pointerDownPointer={pageX:e.pageX,pageY:e.pageY},this._bindPostStartEvents(t),this.dispatchEvent("pointerDown",t,[e])};var s={INPUT:!0,TEXTAREA:!0,SELECT:!0};function a(){return{x:t.pageXOffset,y:t.pageYOffset}}return r.pointerDownFocus=function(t){s[t.target.nodeName]||this.focus()},r._pointerDownPreventDefault=function(t){var e="touchstart"==t.type,i="touch"==t.pointerType,n=s[t.target.nodeName];e||i||n||t.preventDefault()},r.hasDragStarted=function(t){return Math.abs(t.x)>this.options.dragThreshold},r.pointerUp=function(t,e){delete this.isTouchScrolling,this.viewport.classList.remove("is-pointer-down"),this.dispatchEvent("pointerUp",t,[e]),this._dragPointerUp(t,e)},r.pointerDone=function(){t.removeEventListener("scroll",this),delete this.pointerDownScroll},r.dragStart=function(e,i){this.isDraggable&&(this.dragStartPosition=this.x,this.startAnimation(),t.removeEventListener("scroll",this),this.dispatchEvent("dragStart",e,[i]))},r.pointerMove=function(t,e){var i=this._dragPointerMove(t,e);this.dispatchEvent("pointerMove",t,[e,i]),this._dragMove(t,e,i)},r.dragMove=function(t,e,i){if(this.isDraggable){t.preventDefault(),this.previousDragX=this.dragX;var n=this.options.rightToLeft?-1:1;this.options.wrapAround&&(i.x%=this.slideableWidth);var r=this.dragStartPosition+i.x*n;if(!this.options.wrapAround&&this.slides.length){var s=Math.max(-this.slides[0].target,this.dragStartPosition);r=r>s?.5*(r+s):r;var a=Math.min(-this.getLastSlide().target,this.dragStartPosition);r=r<a?.5*(r+a):r}this.dragX=r,this.dragMoveTime=new Date,this.dispatchEvent("dragMove",t,[e,i])}},r.dragEnd=function(t,e){if(this.isDraggable){this.options.freeScroll&&(this.isFreeScrolling=!0);var i=this.dragEndRestingSelect();if(this.options.freeScroll&&!this.options.wrapAround){var n=this.getRestingPosition();this.isFreeScrolling=-n>this.slides[0].target&&-n<this.getLastSlide().target}else this.options.freeScroll||i!=this.selectedIndex||(i+=this.dragEndBoostSelect());delete this.previousDragX,this.isDragSelect=this.options.wrapAround,this.select(i),delete this.isDragSelect,this.dispatchEvent("dragEnd",t,[e])}},r.dragEndRestingSelect=function(){var t=this.getRestingPosition(),e=Math.abs(this.getSlideDistance(-t,this.selectedIndex)),i=this._getClosestResting(t,e,1),n=this._getClosestResting(t,e,-1);return i.distance<n.distance?i.index:n.index},r._getClosestResting=function(t,e,i){for(var n=this.selectedIndex,r=1/0,s=this.options.contain&&!this.options.wrapAround?function(t,e){return t<=e}:function(t,e){return t<e};s(e,r)&&(n+=i,r=e,null!==(e=this.getSlideDistance(-t,n)));)e=Math.abs(e);return{distance:r,index:n-i}},r.getSlideDistance=function(t,e){var i=this.slides.length,r=this.options.wrapAround&&i>1,s=r?n.modulo(e,i):e,a=this.slides[s];if(!a)return null;var o=r?this.slideableWidth*Math.floor(e/i):0;return t-(a.target+o)},r.dragEndBoostSelect=function(){if(void 0===this.previousDragX||!this.dragMoveTime||new Date-this.dragMoveTime>100)return 0;var t=this.getSlideDistance(-this.dragX,this.selectedIndex),e=this.previousDragX-this.dragX;return t>0&&e>0?1:t<0&&e<0?-1:0},r.staticClick=function(t,e){var i=this.getParentCell(t.target),n=i&&i.element,r=i&&this.cells.indexOf(i);this.dispatchEvent("staticClick",t,[e,n,r])},r.onscroll=function(){var t=a(),e=this.pointerDownScroll.x-t.x,i=this.pointerDownScroll.y-t.y;(Math.abs(e)>3||Math.abs(i)>3)&&this._pointerDone()},e}(s,t,e,i)}.apply(e,n),void 0===r||(t.exports=r)}(window)},3103:function(t,e,i){var n,r;!function(s){n=[i(2137),i(1485),i(977),i(7226),i(8949),i(2339)],r=function(t,e,i,n,r,a){return function(t,e,i,n,r,s,a){"use strict";var o=t.jQuery,l=t.getComputedStyle,h=t.console;function c(t,e){for(t=n.makeArray(t);t.length;)e.appendChild(t.shift())}var u=0,d={};function f(t,e){var i=n.getQueryElement(t);if(i){if(this.element=i,this.element.flickityGUID){var r=d[this.element.flickityGUID];return r&&r.option(e),r}o&&(this.$element=o(this.element)),this.options=n.extend({},this.constructor.defaults),this.option(e),this._create()}else h&&h.error("Bad element for Flickity: "+(i||t))}f.defaults={accessibility:!0,cellAlign:"center",freeScrollFriction:.075,friction:.28,namespaceJQueryEvents:!0,percentPosition:!0,resize:!0,selectedAttraction:.025,setGallerySize:!0},f.createMethods=[];var p=f.prototype;n.extend(p,e.prototype),p._create=function(){var e=this.guid=++u;for(var i in this.element.flickityGUID=e,d[e]=this,this.selectedIndex=0,this.restingFrames=0,this.x=0,this.velocity=0,this.originSide=this.options.rightToLeft?"right":"left",this.viewport=document.createElement("div"),this.viewport.className="flickity-viewport",this._createSlider(),(this.options.resize||this.options.watchCSS)&&t.addEventListener("resize",this),this.options.on){var n=this.options.on[i];this.on(i,n)}f.createMethods.forEach(function(t){this[t]()},this),this.options.watchCSS?this.watchCSS():this.activate()},p.option=function(t){n.extend(this.options,t)},p.activate=function(){this.isActive||(this.isActive=!0,this.element.classList.add("flickity-enabled"),this.options.rightToLeft&&this.element.classList.add("flickity-rtl"),this.getSize(),c(this._filterFindCellElements(this.element.children),this.slider),this.viewport.appendChild(this.slider),this.element.appendChild(this.viewport),this.reloadCells(),this.options.accessibility&&(this.element.tabIndex=0,this.element.addEventListener("keydown",this)),this.emitEvent("activate"),this.selectInitialIndex(),this.isInitActivated=!0,this.dispatchEvent("ready"))},p._createSlider=function(){var t=document.createElement("div");t.className="flickity-slider",t.style[this.originSide]=0,this.slider=t},p._filterFindCellElements=function(t){return n.filterFindElements(t,this.options.cellSelector)},p.reloadCells=function(){this.cells=this._makeCells(this.slider.children),this.positionCells(),this._getWrapShiftCells(),this.setGallerySize()},p._makeCells=function(t){return this._filterFindCellElements(t).map(function(t){return new r(t,this)},this)},p.getLastCell=function(){return this.cells[this.cells.length-1]},p.getLastSlide=function(){return this.slides[this.slides.length-1]},p.positionCells=function(){this._sizeCells(this.cells),this._positionCells(0)},p._positionCells=function(t){t=t||0,this.maxCellHeight=t&&this.maxCellHeight||0;var e=0;if(t>0){var i=this.cells[t-1];e=i.x+i.size.outerWidth}for(var n=this.cells.length,r=t;r<n;r++){var s=this.cells[r];s.setPosition(e),e+=s.size.outerWidth,this.maxCellHeight=Math.max(s.size.outerHeight,this.maxCellHeight)}this.slideableWidth=e,this.updateSlides(),this._containSlides(),this.slidesWidth=n?this.getLastSlide().target-this.slides[0].target:0},p._sizeCells=function(t){t.forEach(function(t){t.getSize()})},p.updateSlides=function(){if(this.slides=[],this.cells.length){var t=new s(this);this.slides.push(t);var e="left"==this.originSide?"marginRight":"marginLeft",i=this._getCanCellFit();this.cells.forEach(function(n,r){if(t.cells.length){var a=t.outerWidth-t.firstMargin+(n.size.outerWidth-n.size[e]);i.call(this,r,a)||(t.updateTarget(),t=new s(this),this.slides.push(t)),t.addCell(n)}else t.addCell(n)},this),t.updateTarget(),this.updateSelectedSlide()}},p._getCanCellFit=function(){var t=this.options.groupCells;if(!t)return function(){return!1};if("number"==typeof t){var e=parseInt(t,10);return function(t){return t%e!==0}}var i="string"==typeof t&&t.match(/^(\d+)%$/),n=i?parseInt(i[1],10)/100:1;return function(t,e){return e<=(this.size.innerWidth+1)*n}},p._init=p.reposition=function(){this.positionCells(),this.positionSliderAtSelected()},p.getSize=function(){this.size=i(this.element),this.setCellAlign(),this.cursorPosition=this.size.innerWidth*this.cellAlign};var m={center:{left:.5,right:.5},left:{left:0,right:1},right:{right:0,left:1}};return p.setCellAlign=function(){var t=m[this.options.cellAlign];this.cellAlign=t?t[this.originSide]:this.options.cellAlign},p.setGallerySize=function(){if(this.options.setGallerySize){var t=this.options.adaptiveHeight&&this.selectedSlide?this.selectedSlide.height:this.maxCellHeight;this.viewport.style.height=t+"px"}},p._getWrapShiftCells=function(){if(this.options.wrapAround){this._unshiftCells(this.beforeShiftCells),this._unshiftCells(this.afterShiftCells);var t=this.cursorPosition,e=this.cells.length-1;this.beforeShiftCells=this._getGapCells(t,e,-1),t=this.size.innerWidth-this.cursorPosition,this.afterShiftCells=this._getGapCells(t,0,1)}},p._getGapCells=function(t,e,i){for(var n=[];t>0;){var r=this.cells[e];if(!r)break;n.push(r),e+=i,t-=r.size.outerWidth}return n},p._containSlides=function(){if(this.options.contain&&!this.options.wrapAround&&this.cells.length){var t=this.options.rightToLeft,e=t?"marginRight":"marginLeft",i=t?"marginLeft":"marginRight",n=this.slideableWidth-this.getLastCell().size[i],r=n<this.size.innerWidth,s=this.cursorPosition+this.cells[0].size[e],a=n-this.size.innerWidth*(1-this.cellAlign);this.slides.forEach(function(t){r?t.target=n*this.cellAlign:(t.target=Math.max(t.target,s),t.target=Math.min(t.target,a))},this)}},p.dispatchEvent=function(t,e,i){var n=e?[e].concat(i):i;if(this.emitEvent(t,n),o&&this.$element){var r=t+=this.options.namespaceJQueryEvents?".flickity":"";if(e){var s=new o.Event(e);s.type=t,r=s}this.$element.trigger(r,i)}},p.select=function(t,e,i){if(this.isActive&&(t=parseInt(t,10),this._wrapSelect(t),(this.options.wrapAround||e)&&(t=n.modulo(t,this.slides.length)),this.slides[t])){var r=this.selectedIndex;this.selectedIndex=t,this.updateSelectedSlide(),i?this.positionSliderAtSelected():this.startAnimation(),this.options.adaptiveHeight&&this.setGallerySize(),this.dispatchEvent("select",null,[t]),t!=r&&this.dispatchEvent("change",null,[t]),this.dispatchEvent("cellSelect")}},p._wrapSelect=function(t){var e=this.slides.length;if(!(this.options.wrapAround&&e>1))return t;var i=n.modulo(t,e),r=Math.abs(i-this.selectedIndex),s=Math.abs(i+e-this.selectedIndex),a=Math.abs(i-e-this.selectedIndex);!this.isDragSelect&&s<r?t+=e:!this.isDragSelect&&a<r&&(t-=e),t<0?this.x-=this.slideableWidth:t>=e&&(this.x+=this.slideableWidth)},p.previous=function(t,e){this.select(this.selectedIndex-1,t,e)},p.next=function(t,e){this.select(this.selectedIndex+1,t,e)},p.updateSelectedSlide=function(){var t=this.slides[this.selectedIndex];t&&(this.unselectSelectedSlide(),this.selectedSlide=t,t.select(),this.selectedCells=t.cells,this.selectedElements=t.getCellElements(),this.selectedCell=t.cells[0],this.selectedElement=this.selectedElements[0])},p.unselectSelectedSlide=function(){this.selectedSlide&&this.selectedSlide.unselect()},p.selectInitialIndex=function(){var t=this.options.initialIndex;if(this.isInitActivated)this.select(this.selectedIndex,!1,!0);else{if(t&&"string"==typeof t&&this.queryCell(t))return void this.selectCell(t,!1,!0);var e=0;t&&this.slides[t]&&(e=t),this.select(e,!1,!0)}},p.selectCell=function(t,e,i){var n=this.queryCell(t);if(n){var r=this.getCellSlideIndex(n);this.select(r,e,i)}},p.getCellSlideIndex=function(t){for(var e=0;e<this.slides.length;e++)if(-1!=this.slides[e].cells.indexOf(t))return e},p.getCell=function(t){for(var e=0;e<this.cells.length;e++){var i=this.cells[e];if(i.element==t)return i}},p.getCells=function(t){t=n.makeArray(t);var e=[];return t.forEach(function(t){var i=this.getCell(t);i&&e.push(i)},this),e},p.getCellElements=function(){return this.cells.map(function(t){return t.element})},p.getParentCell=function(t){return this.getCell(t)||(t=n.getParent(t,".flickity-slider > *"),this.getCell(t))},p.getAdjacentCellElements=function(t,e){if(!t)return this.selectedSlide.getCellElements();e=void 0===e?this.selectedIndex:e;var i=this.slides.length;if(1+2*t>=i)return this.getCellElements();for(var r=[],s=e-t;s<=e+t;s++){var a=this.options.wrapAround?n.modulo(s,i):s,o=this.slides[a];o&&(r=r.concat(o.getCellElements()))}return r},p.queryCell=function(t){if("number"==typeof t)return this.cells[t];if("string"==typeof t){if(t.match(/^[#.]?[\d/]/))return;t=this.element.querySelector(t)}return this.getCell(t)},p.uiChange=function(){this.emitEvent("uiChange")},p.childUIPointerDown=function(t){"touchstart"!=t.type&&t.preventDefault(),this.focus()},p.onresize=function(){this.watchCSS(),this.resize()},n.debounceMethod(f,"onresize",150),p.resize=function(){if(this.isActive&&!this.isAnimating&&!this.isDragging){this.getSize(),this.options.wrapAround&&(this.x=n.modulo(this.x,this.slideableWidth)),this.positionCells(),this._getWrapShiftCells(),this.setGallerySize(),this.emitEvent("resize");var t=this.selectedElements&&this.selectedElements[0];this.selectCell(t,!1,!0)}},p.watchCSS=function(){this.options.watchCSS&&(-1!=l(this.element,":after").content.indexOf("flickity")?this.activate():this.deactivate())},p.onkeydown=function(t){var e=document.activeElement&&document.activeElement!=this.element;if(this.options.accessibility&&!e){var i=f.keyboardHandlers[t.keyCode];i&&i.call(this)}},f.keyboardHandlers={37:function(){var t=this.options.rightToLeft?"next":"previous";this.uiChange(),this[t]()},39:function(){var t=this.options.rightToLeft?"previous":"next";this.uiChange(),this[t]()}},p.focus=function(){var e=t.pageYOffset;this.element.focus({preventScroll:!0}),t.pageYOffset!=e&&t.scrollTo(t.pageXOffset,e)},p.deactivate=function(){this.isActive&&(this.element.classList.remove("flickity-enabled"),this.element.classList.remove("flickity-rtl"),this.unselectSelectedSlide(),this.cells.forEach(function(t){t.destroy()}),this.element.removeChild(this.viewport),c(this.slider.children,this.element),this.options.accessibility&&(this.element.removeAttribute("tabIndex"),this.element.removeEventListener("keydown",this)),this.isActive=!1,this.emitEvent("deactivate"))},p.destroy=function(){this.deactivate(),t.removeEventListener("resize",this),this.allOff(),this.emitEvent("destroy"),o&&this.$element&&o.removeData(this.element,"flickity"),delete this.element.flickityGUID,delete d[this.guid]},n.extend(p,a),f.data=function(t){var e=(t=n.getQueryElement(t))&&t.flickityGUID;return e&&d[e]},n.htmlInit(f,"flickity"),o&&o.bridget&&o.bridget("flickity",f),f.setJQuery=function(t){o=t},f.Cell=r,f.Slide=s,f}(s,t,e,i,n,r,a)}.apply(e,n),void 0===r||(t.exports=r)}(window)},708:function(t,e,i){var n,r,s;window,r=[i(3103),i(6252),i(3274),i(8450),i(6339),i(3941),i(4664)],void 0===(s="function"==typeof(n=function(t){return t})?n.apply(e,r):n)||(t.exports=s)},4664:function(t,e,i){var n,r;window,n=[i(3103),i(977)],void 0===(r=function(t,e){return function(t,e,i){"use strict";e.createMethods.push("_createLazyload");var n=e.prototype;function r(t,e){this.img=t,this.flickity=e,this.load()}return n._createLazyload=function(){this.on("select",this.lazyLoad)},n.lazyLoad=function(){var t=this.options.lazyLoad;if(t){var e="number"==typeof t?t:0,n=this.getAdjacentCellElements(e),s=[];n.forEach(function(t){var e=function(t){if("IMG"==t.nodeName){var e=t.getAttribute("data-flickity-lazyload"),n=t.getAttribute("data-flickity-lazyload-src"),r=t.getAttribute("data-flickity-lazyload-srcset");if(e||n||r)return[t]}var s=t.querySelectorAll("img[data-flickity-lazyload], img[data-flickity-lazyload-src], img[data-flickity-lazyload-srcset]");return i.makeArray(s)}(t);s=s.concat(e)}),s.forEach(function(t){new r(t,this)},this)}},r.prototype.handleEvent=i.handleEvent,r.prototype.load=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this);var t=this.img.getAttribute("data-flickity-lazyload")||this.img.getAttribute("data-flickity-lazyload-src"),e=this.img.getAttribute("data-flickity-lazyload-srcset");this.img.src=t,e&&this.img.setAttribute("srcset",e),this.img.removeAttribute("data-flickity-lazyload"),this.img.removeAttribute("data-flickity-lazyload-src"),this.img.removeAttribute("data-flickity-lazyload-srcset")},r.prototype.onload=function(t){this.complete(t,"flickity-lazyloaded")},r.prototype.onerror=function(t){this.complete(t,"flickity-lazyerror")},r.prototype.complete=function(t,e){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this);var i=this.flickity.getParentCell(this.img),n=i&&i.element;this.flickity.cellSizeChange(n),this.img.classList.add(e),this.flickity.dispatchEvent("lazyLoad",t,n)},e.LazyLoader=r,e}(0,t,e)}.apply(e,n))||(t.exports=r)},8450:function(t,e,i){var n,r;window,n=[i(3103),i(2475),i(977)],void 0===(r=function(t,e,i){return function(t,e,i,n){"use strict";function r(t){this.parent=t,this._create()}r.prototype=Object.create(i.prototype),r.prototype._create=function(){this.holder=document.createElement("ol"),this.holder.className="flickity-page-dots",this.dots=[],this.handleClick=this.onClick.bind(this),this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))},r.prototype.activate=function(){this.setDots(),this.holder.addEventListener("click",this.handleClick),this.bindStartEvent(this.holder),this.parent.element.appendChild(this.holder)},r.prototype.deactivate=function(){this.holder.removeEventListener("click",this.handleClick),this.unbindStartEvent(this.holder),this.parent.element.removeChild(this.holder)},r.prototype.setDots=function(){var t=this.parent.slides.length-this.dots.length;t>0?this.addDots(t):t<0&&this.removeDots(-t)},r.prototype.addDots=function(t){for(var e=document.createDocumentFragment(),i=[],n=this.dots.length,r=n+t,s=n;s<r;s++){var a=document.createElement("li");a.className="dot",a.setAttribute("aria-label","Page dot "+(s+1)),e.appendChild(a),i.push(a)}this.holder.appendChild(e),this.dots=this.dots.concat(i)},r.prototype.removeDots=function(t){this.dots.splice(this.dots.length-t,t).forEach(function(t){this.holder.removeChild(t)},this)},r.prototype.updateSelected=function(){this.selectedDot&&(this.selectedDot.className="dot",this.selectedDot.removeAttribute("aria-current")),this.dots.length&&(this.selectedDot=this.dots[this.parent.selectedIndex],this.selectedDot.className="dot is-selected",this.selectedDot.setAttribute("aria-current","step"))},r.prototype.onTap=r.prototype.onClick=function(t){var e=t.target;if("LI"==e.nodeName){this.parent.uiChange();var i=this.dots.indexOf(e);this.parent.select(i)}},r.prototype.destroy=function(){this.deactivate(),this.allOff()},e.PageDots=r,n.extend(e.defaults,{pageDots:!0}),e.createMethods.push("_createPageDots");var s=e.prototype;return s._createPageDots=function(){this.options.pageDots&&(this.pageDots=new r(this),this.on("activate",this.activatePageDots),this.on("select",this.updateSelectedPageDots),this.on("cellChange",this.updatePageDots),this.on("resize",this.updatePageDots),this.on("deactivate",this.deactivatePageDots))},s.activatePageDots=function(){this.pageDots.activate()},s.updateSelectedPageDots=function(){this.pageDots.updateSelected()},s.updatePageDots=function(){this.pageDots.setDots()},s.deactivatePageDots=function(){this.pageDots.deactivate()},e.PageDots=r,e}(0,t,e,i)}.apply(e,n))||(t.exports=r)},6339:function(t,e,i){var n,r;window,n=[i(2137),i(977),i(3103)],void 0===(r=function(t,e,i){return function(t,e,i){"use strict";function n(t){this.parent=t,this.state="stopped",this.onVisibilityChange=this.visibilityChange.bind(this),this.onVisibilityPlay=this.visibilityPlay.bind(this)}n.prototype=Object.create(t.prototype),n.prototype.play=function(){"playing"!=this.state&&(document.hidden?document.addEventListener("visibilitychange",this.onVisibilityPlay):(this.state="playing",document.addEventListener("visibilitychange",this.onVisibilityChange),this.tick()))},n.prototype.tick=function(){if("playing"==this.state){var t=this.parent.options.autoPlay;t="number"==typeof t?t:3e3;var e=this;this.clear(),this.timeout=setTimeout(function(){e.parent.next(!0),e.tick()},t)}},n.prototype.stop=function(){this.state="stopped",this.clear(),document.removeEventListener("visibilitychange",this.onVisibilityChange)},n.prototype.clear=function(){clearTimeout(this.timeout)},n.prototype.pause=function(){"playing"==this.state&&(this.state="paused",this.clear())},n.prototype.unpause=function(){"paused"==this.state&&this.play()},n.prototype.visibilityChange=function(){this[document.hidden?"pause":"unpause"]()},n.prototype.visibilityPlay=function(){this.play(),document.removeEventListener("visibilitychange",this.onVisibilityPlay)},e.extend(i.defaults,{pauseAutoPlayOnHover:!0}),i.createMethods.push("_createPlayer");var r=i.prototype;return r._createPlayer=function(){this.player=new n(this),this.on("activate",this.activatePlayer),this.on("uiChange",this.stopPlayer),this.on("pointerDown",this.stopPlayer),this.on("deactivate",this.deactivatePlayer)},r.activatePlayer=function(){this.options.autoPlay&&(this.player.play(),this.element.addEventListener("mouseenter",this))},r.playPlayer=function(){this.player.play()},r.stopPlayer=function(){this.player.stop()},r.pausePlayer=function(){this.player.pause()},r.unpausePlayer=function(){this.player.unpause()},r.deactivatePlayer=function(){this.player.stop(),this.element.removeEventListener("mouseenter",this)},r.onmouseenter=function(){this.options.pauseAutoPlayOnHover&&(this.player.pause(),this.element.addEventListener("mouseleave",this))},r.onmouseleave=function(){this.player.unpause(),this.element.removeEventListener("mouseleave",this)},i.Player=n,i}(t,e,i)}.apply(e,n))||(t.exports=r)},3274:function(t,e,i){var n,r;window,n=[i(3103),i(2475),i(977)],void 0===(r=function(t,e,i){return function(t,e,i,n){"use strict";var r="http://www.w3.org/2000/svg";function s(t,e){this.direction=t,this.parent=e,this._create()}s.prototype=Object.create(i.prototype),s.prototype._create=function(){this.isEnabled=!0,this.isPrevious=-1==this.direction;var t=this.parent.options.rightToLeft?1:-1;this.isLeft=this.direction==t;var e=this.element=document.createElement("button");e.className="flickity-button flickity-prev-next-button",e.className+=this.isPrevious?" previous":" next",e.setAttribute("type","button"),this.disable(),e.setAttribute("aria-label",this.isPrevious?"Previous":"Next");var i=this.createSVG();e.appendChild(i),this.parent.on("select",this.update.bind(this)),this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))},s.prototype.activate=function(){this.bindStartEvent(this.element),this.element.addEventListener("click",this),this.parent.element.appendChild(this.element)},s.prototype.deactivate=function(){this.parent.element.removeChild(this.element),this.unbindStartEvent(this.element),this.element.removeEventListener("click",this)},s.prototype.createSVG=function(){var t=document.createElementNS(r,"svg");t.setAttribute("class","flickity-button-icon"),t.setAttribute("viewBox","0 0 100 100");var e,i=document.createElementNS(r,"path"),n="string"==typeof(e=this.parent.options.arrowShape)?e:"M "+e.x0+",50 L "+e.x1+","+(e.y1+50)+" L "+e.x2+","+(e.y2+50)+" L "+e.x3+",50 L "+e.x2+","+(50-e.y2)+" L "+e.x1+","+(50-e.y1)+" Z";return i.setAttribute("d",n),i.setAttribute("class","arrow"),this.isLeft||i.setAttribute("transform","translate(100, 100) rotate(180) "),t.appendChild(i),t},s.prototype.handleEvent=n.handleEvent,s.prototype.onclick=function(){if(this.isEnabled){this.parent.uiChange();var t=this.isPrevious?"previous":"next";this.parent[t]()}},s.prototype.enable=function(){this.isEnabled||(this.element.disabled=!1,this.isEnabled=!0)},s.prototype.disable=function(){this.isEnabled&&(this.element.disabled=!0,this.isEnabled=!1)},s.prototype.update=function(){var t=this.parent.slides;if(this.parent.options.wrapAround&&t.length>1)this.enable();else{var e=t.length?t.length-1:0,i=this.isPrevious?0:e;this[this.parent.selectedIndex==i?"disable":"enable"]()}},s.prototype.destroy=function(){this.deactivate(),this.allOff()},n.extend(e.defaults,{prevNextButtons:!0,arrowShape:{x0:10,x1:60,y1:50,x2:70,y2:40,x3:30}}),e.createMethods.push("_createPrevNextButtons");var a=e.prototype;return a._createPrevNextButtons=function(){this.options.prevNextButtons&&(this.prevButton=new s(-1,this),this.nextButton=new s(1,this),this.on("activate",this.activatePrevNextButtons))},a.activatePrevNextButtons=function(){this.prevButton.activate(),this.nextButton.activate(),this.on("deactivate",this.deactivatePrevNextButtons)},a.deactivatePrevNextButtons=function(){this.prevButton.deactivate(),this.nextButton.deactivate(),this.off("deactivate",this.deactivatePrevNextButtons)},e.PrevNextButton=s,e}(0,t,e,i)}.apply(e,n))||(t.exports=r)},8949:function(t,e,i){var n,r;window,void 0===(r="function"==typeof(n=function(){"use strict";function t(t){this.parent=t,this.isOriginLeft="left"==t.originSide,this.cells=[],this.outerWidth=0,this.height=0}var e=t.prototype;return e.addCell=function(t){if(this.cells.push(t),this.outerWidth+=t.size.outerWidth,this.height=Math.max(t.size.outerHeight,this.height),1==this.cells.length){this.x=t.x;var e=this.isOriginLeft?"marginLeft":"marginRight";this.firstMargin=t.size[e]}},e.updateTarget=function(){var t=this.isOriginLeft?"marginRight":"marginLeft",e=this.getLastCell(),i=e?e.size[t]:0,n=this.outerWidth-(this.firstMargin+i);this.target=this.x+this.firstMargin+n*this.parent.cellAlign},e.getLastCell=function(){return this.cells[this.cells.length-1]},e.select=function(){this.cells.forEach(function(t){t.select()})},e.unselect=function(){this.cells.forEach(function(t){t.unselect()})},e.getCellElements=function(){return this.cells.map(function(t){return t.element})},t})?n.call(e,i,e,t):n)||(t.exports=r)},9943:function(t,e,i){var n,r;window,n=[i(9249),i(977)],void 0===(r=function(t,e){return function(t,e,i){"use strict";var n=e.prototype;return n.insert=function(t,e){var i=this._makeCells(t);if(i&&i.length){var n=this.cells.length;e=void 0===e?n:e;var r=function(t){var e=document.createDocumentFragment();return t.forEach(function(t){e.appendChild(t.element)}),e}(i),s=e==n;if(s)this.slider.appendChild(r);else{var a=this.cells[e].element;this.slider.insertBefore(r,a)}if(0===e)this.cells=i.concat(this.cells);else if(s)this.cells=this.cells.concat(i);else{var o=this.cells.splice(e,n-e);this.cells=this.cells.concat(i).concat(o)}this._sizeCells(i),this.cellChange(e,!0)}},n.append=function(t){this.insert(t,this.cells.length)},n.prepend=function(t){this.insert(t,0)},n.remove=function(t){var e=this.getCells(t);if(e&&e.length){var n=this.cells.length-1;e.forEach(function(t){t.remove();var e=this.cells.indexOf(t);n=Math.min(e,n),i.removeFrom(this.cells,t)},this),this.cellChange(n,!0)}},n.cellSizeChange=function(t){var e=this.getCell(t);if(e){e.getSize();var i=this.cells.indexOf(e);this.cellChange(i)}},n.cellChange=function(t,e){var i=this.selectedElement;this._positionCells(t),this._getWrapShiftCells(),this.setGallerySize();var n=this.getCell(i);n&&(this.selectedIndex=this.getCellSlideIndex(n)),this.selectedIndex=Math.min(this.slides.length-1,this.selectedIndex),this.emitEvent("cellChange",[t]),this.select(this.selectedIndex),e&&this.positionSliderAtSelected()},e}(0,t,e)}.apply(e,n))||(t.exports=r)},2121:function(t,e,i){var n,r;window,n=[i(977)],void 0===(r=function(t){return function(t,e){"use strict";return{startAnimation:function(){this.isAnimating||(this.isAnimating=!0,this.restingFrames=0,this.animate())},animate:function(){this.applyDragForce(),this.applySelectedAttraction();var t=this.x;if(this.integratePhysics(),this.positionSlider(),this.settle(t),this.isAnimating){var e=this;requestAnimationFrame(function(){e.animate()})}},positionSlider:function(){var t=this.x;this.options.wrapAround&&this.cells.length>1&&(t=e.modulo(t,this.slideableWidth),t-=this.slideableWidth,this.shiftWrapCells(t)),this.setTranslateX(t,this.isAnimating),this.dispatchScrollEvent()},setTranslateX:function(t,e){t+=this.cursorPosition,t=this.options.rightToLeft?-t:t;var i=this.getPositionValue(t);this.slider.style.transform=e?"translate3d("+i+",0,0)":"translateX("+i+")"},dispatchScrollEvent:function(){var t=this.slides[0];if(t){var e=-this.x-t.target,i=e/this.slidesWidth;this.dispatchEvent("scroll",null,[i,e])}},positionSliderAtSelected:function(){this.cells.length&&(this.x=-this.selectedSlide.target,this.velocity=0,this.positionSlider())},getPositionValue:function(t){return this.options.percentPosition?.01*Math.round(t/this.size.innerWidth*1e4)+"%":Math.round(t)+"px"},settle:function(t){this.isPointerDown||Math.round(100*this.x)!=Math.round(100*t)||this.restingFrames++,this.restingFrames>2&&(this.isAnimating=!1,delete this.isFreeScrolling,this.positionSlider(),this.dispatchEvent("settle",null,[this.selectedIndex]))},shiftWrapCells:function(t){var e=this.cursorPosition+t;this._shiftCells(this.beforeShiftCells,e,-1);var i=this.size.innerWidth-(t+this.slideableWidth+this.cursorPosition);this._shiftCells(this.afterShiftCells,i,1)},_shiftCells:function(t,e,i){for(var n=0;n<t.length;n++){var r=t[n],s=e>0?i:0;r.wrapShift(s),e-=r.size.outerWidth}},_unshiftCells:function(t){if(t&&t.length)for(var e=0;e<t.length;e++)t[e].wrapShift(0)},integratePhysics:function(){this.x+=this.velocity,this.velocity*=this.getFrictionFactor()},applyForce:function(t){this.velocity+=t},getFrictionFactor:function(){return 1-this.options[this.isFreeScrolling?"freeScrollFriction":"friction"]},getRestingPosition:function(){return this.x+this.velocity/(1-this.getFrictionFactor())},applyDragForce:function(){if(this.isDraggable&&this.isPointerDown){var t=this.dragX-this.x-this.velocity;this.applyForce(t)}},applySelectedAttraction:function(){if((!this.isDraggable||!this.isPointerDown)&&!this.isFreeScrolling&&this.slides.length){var t=(-1*this.selectedSlide.target-this.x)*this.options.selectedAttraction;this.applyForce(t)}}}}(0,t)}.apply(e,n))||(t.exports=r)},4092:function(t,e,i){var n,r;window,n=[i(1485)],void 0===(r=function(t){return function(t,e){"use strict";function i(t,e){this.element=t,this.parent=e,this.create()}var n=i.prototype;return n.create=function(){this.element.style.position="absolute",this.element.setAttribute("aria-hidden","true"),this.x=0,this.shift=0},n.destroy=function(){this.unselect(),this.element.style.position="";var t=this.parent.originSide;this.element.style[t]=""},n.getSize=function(){this.size=e(this.element)},n.setPosition=function(t){this.x=t,this.updateTarget(),this.renderPosition(t)},n.updateTarget=n.setDefaultTarget=function(){var t="left"==this.parent.originSide?"marginLeft":"marginRight";this.target=this.x+this.size[t]+this.size.width*this.parent.cellAlign},n.renderPosition=function(t){var e=this.parent.originSide;this.element.style[e]=this.parent.getPositionValue(t)},n.select=function(){this.element.classList.add("is-selected"),this.element.removeAttribute("aria-hidden")},n.unselect=function(){this.element.classList.remove("is-selected"),this.element.setAttribute("aria-hidden","true")},n.wrapShift=function(t){this.shift=t,this.renderPosition(this.x+this.parent.slideableWidth*t)},n.remove=function(){this.element.parentNode.removeChild(this.element)},i}(0,t)}.apply(e,n))||(t.exports=r)},3170:function(t,e,i){var n,r;!function(s){n=[i(9249),i(6377),i(977)],r=function(t,e,i){return function(t,e,i,n){"use strict";n.extend(e.defaults,{draggable:">1",dragThreshold:3}),e.createMethods.push("_createDrag");var r=e.prototype;n.extend(r,i.prototype),r._touchActionValue="pan-y";var s="createTouch"in document,a=!1;r._createDrag=function(){this.on("activate",this.onActivateDrag),this.on("uiChange",this._uiChangeDrag),this.on("deactivate",this.onDeactivateDrag),this.on("cellChange",this.updateDraggable),s&&!a&&(t.addEventListener("touchmove",function(){}),a=!0)},r.onActivateDrag=function(){this.handles=[this.viewport],this.bindHandles(),this.updateDraggable()},r.onDeactivateDrag=function(){this.unbindHandles(),this.element.classList.remove("is-draggable")},r.updateDraggable=function(){">1"==this.options.draggable?this.isDraggable=this.slides.length>1:this.isDraggable=this.options.draggable,this.isDraggable?this.element.classList.add("is-draggable"):this.element.classList.remove("is-draggable")},r.bindDrag=function(){this.options.draggable=!0,this.updateDraggable()},r.unbindDrag=function(){this.options.draggable=!1,this.updateDraggable()},r._uiChangeDrag=function(){delete this.isFreeScrolling},r.pointerDown=function(e,i){this.isDraggable?this.okayPointerDown(e)&&(this._pointerDownPreventDefault(e),this.pointerDownFocus(e),document.activeElement!=this.element&&this.pointerDownBlur(),this.dragX=this.x,this.viewport.classList.add("is-pointer-down"),this.pointerDownScroll=l(),t.addEventListener("scroll",this),this._pointerDownDefault(e,i)):this._pointerDownDefault(e,i)},r._pointerDownDefault=function(t,e){this.pointerDownPointer={pageX:e.pageX,pageY:e.pageY},this._bindPostStartEvents(t),this.dispatchEvent("pointerDown",t,[e])};var o={INPUT:!0,TEXTAREA:!0,SELECT:!0};function l(){return{x:t.pageXOffset,y:t.pageYOffset}}return r.pointerDownFocus=function(t){o[t.target.nodeName]||this.focus()},r._pointerDownPreventDefault=function(t){var e="touchstart"==t.type,i="touch"==t.pointerType,n=o[t.target.nodeName];e||i||n||t.preventDefault()},r.hasDragStarted=function(t){return Math.abs(t.x)>this.options.dragThreshold},r.pointerUp=function(t,e){delete this.isTouchScrolling,this.viewport.classList.remove("is-pointer-down"),this.dispatchEvent("pointerUp",t,[e]),this._dragPointerUp(t,e)},r.pointerDone=function(){t.removeEventListener("scroll",this),delete this.pointerDownScroll},r.dragStart=function(e,i){this.isDraggable&&(this.dragStartPosition=this.x,this.startAnimation(),t.removeEventListener("scroll",this),this.dispatchEvent("dragStart",e,[i]))},r.pointerMove=function(t,e){var i=this._dragPointerMove(t,e);this.dispatchEvent("pointerMove",t,[e,i]),this._dragMove(t,e,i)},r.dragMove=function(t,e,i){if(this.isDraggable){t.preventDefault(),this.previousDragX=this.dragX;var n=this.options.rightToLeft?-1:1;this.options.wrapAround&&(i.x=i.x%this.slideableWidth);var r=this.dragStartPosition+i.x*n;if(!this.options.wrapAround&&this.slides.length){var s=Math.max(-this.slides[0].target,this.dragStartPosition);r=r>s?.5*(r+s):r;var a=Math.min(-this.getLastSlide().target,this.dragStartPosition);r=r<a?.5*(r+a):r}this.dragX=r,this.dragMoveTime=new Date,this.dispatchEvent("dragMove",t,[e,i])}},r.dragEnd=function(t,e){if(this.isDraggable){this.options.freeScroll&&(this.isFreeScrolling=!0);var i=this.dragEndRestingSelect();if(this.options.freeScroll&&!this.options.wrapAround){var n=this.getRestingPosition();this.isFreeScrolling=-n>this.slides[0].target&&-n<this.getLastSlide().target}else this.options.freeScroll||i!=this.selectedIndex||(i+=this.dragEndBoostSelect());delete this.previousDragX,this.isDragSelect=this.options.wrapAround,this.select(i),delete this.isDragSelect,this.dispatchEvent("dragEnd",t,[e])}},r.dragEndRestingSelect=function(){var t=this.getRestingPosition(),e=Math.abs(this.getSlideDistance(-t,this.selectedIndex)),i=this._getClosestResting(t,e,1),n=this._getClosestResting(t,e,-1);return i.distance<n.distance?i.index:n.index},r._getClosestResting=function(t,e,i){for(var n=this.selectedIndex,r=1/0,s=this.options.contain&&!this.options.wrapAround?function(t,e){return t<=e}:function(t,e){return t<e};s(e,r)&&(n+=i,r=e,null!==(e=this.getSlideDistance(-t,n)));)e=Math.abs(e);return{distance:r,index:n-i}},r.getSlideDistance=function(t,e){var i=this.slides.length,r=this.options.wrapAround&&i>1,s=r?n.modulo(e,i):e,a=this.slides[s];if(!a)return null;var o=r?this.slideableWidth*Math.floor(e/i):0;return t-(a.target+o)},r.dragEndBoostSelect=function(){if(void 0===this.previousDragX||!this.dragMoveTime||new Date-this.dragMoveTime>100)return 0;var t=this.getSlideDistance(-this.dragX,this.selectedIndex),e=this.previousDragX-this.dragX;return t>0&&e>0?1:t<0&&e<0?-1:0},r.staticClick=function(t,e){var i=this.getParentCell(t.target),n=i&&i.element,r=i&&this.cells.indexOf(i);this.dispatchEvent("staticClick",t,[e,n,r])},r.onscroll=function(){var t=l(),e=this.pointerDownScroll.x-t.x,i=this.pointerDownScroll.y-t.y;(Math.abs(e)>3||Math.abs(i)>3)&&this._pointerDone()},e}(s,t,e,i)}.apply(e,n),void 0===r||(t.exports=r)}(window)},9249:function(t,e,i){var n,r;!function(s){n=[i(2137),i(1485),i(977),i(4092),i(1331),i(2121)],r=function(t,e,i,n,r,a){return function(t,e,i,n,r,s,a){"use strict";var o=t.jQuery,l=t.getComputedStyle,h=t.console;function c(t,e){for(t=n.makeArray(t);t.length;)e.appendChild(t.shift())}var u=0,d={};function f(t,e){var i=n.getQueryElement(t);if(i){if(this.element=i,this.element.flickityGUID){var r=d[this.element.flickityGUID];return r.option(e),r}o&&(this.$element=o(this.element)),this.options=n.extend({},this.constructor.defaults),this.option(e),this._create()}else h&&h.error("Bad element for Flickity: "+(i||t))}f.defaults={accessibility:!0,cellAlign:"center",freeScrollFriction:.075,friction:.28,namespaceJQueryEvents:!0,percentPosition:!0,resize:!0,selectedAttraction:.025,setGallerySize:!0},f.createMethods=[];var p=f.prototype;n.extend(p,e.prototype),p._create=function(){var e=this.guid=++u;for(var i in this.element.flickityGUID=e,d[e]=this,this.selectedIndex=0,this.restingFrames=0,this.x=0,this.velocity=0,this.originSide=this.options.rightToLeft?"right":"left",this.viewport=document.createElement("div"),this.viewport.className="flickity-viewport",this._createSlider(),(this.options.resize||this.options.watchCSS)&&t.addEventListener("resize",this),this.options.on){var n=this.options.on[i];this.on(i,n)}f.createMethods.forEach(function(t){this[t]()},this),this.options.watchCSS?this.watchCSS():this.activate()},p.option=function(t){n.extend(this.options,t)},p.activate=function(){this.isActive||(this.isActive=!0,this.element.classList.add("flickity-enabled"),this.options.rightToLeft&&this.element.classList.add("flickity-rtl"),this.getSize(),c(this._filterFindCellElements(this.element.children),this.slider),this.viewport.appendChild(this.slider),this.element.appendChild(this.viewport),this.reloadCells(),this.options.accessibility&&(this.element.tabIndex=0,this.element.addEventListener("keydown",this)),this.emitEvent("activate"),this.selectInitialIndex(),this.isInitActivated=!0,this.dispatchEvent("ready"))},p._createSlider=function(){var t=document.createElement("div");t.className="flickity-slider",t.style[this.originSide]=0,this.slider=t},p._filterFindCellElements=function(t){return n.filterFindElements(t,this.options.cellSelector)},p.reloadCells=function(){this.cells=this._makeCells(this.slider.children),this.positionCells(),this._getWrapShiftCells(),this.setGallerySize()},p._makeCells=function(t){return this._filterFindCellElements(t).map(function(t){return new r(t,this)},this)},p.getLastCell=function(){return this.cells[this.cells.length-1]},p.getLastSlide=function(){return this.slides[this.slides.length-1]},p.positionCells=function(){this._sizeCells(this.cells),this._positionCells(0)},p._positionCells=function(t){t=t||0,this.maxCellHeight=t&&this.maxCellHeight||0;var e=0;if(t>0){var i=this.cells[t-1];e=i.x+i.size.outerWidth}for(var n=this.cells.length,r=t;r<n;r++){var s=this.cells[r];s.setPosition(e),e+=s.size.outerWidth,this.maxCellHeight=Math.max(s.size.outerHeight,this.maxCellHeight)}this.slideableWidth=e,this.updateSlides(),this._containSlides(),this.slidesWidth=n?this.getLastSlide().target-this.slides[0].target:0},p._sizeCells=function(t){t.forEach(function(t){t.getSize()})},p.updateSlides=function(){if(this.slides=[],this.cells.length){var t=new s(this);this.slides.push(t);var e="left"==this.originSide?"marginRight":"marginLeft",i=this._getCanCellFit();this.cells.forEach(function(n,r){if(t.cells.length){var a=t.outerWidth-t.firstMargin+(n.size.outerWidth-n.size[e]);i.call(this,r,a)||(t.updateTarget(),t=new s(this),this.slides.push(t)),t.addCell(n)}else t.addCell(n)},this),t.updateTarget(),this.updateSelectedSlide()}},p._getCanCellFit=function(){var t=this.options.groupCells;if(!t)return function(){return!1};if("number"==typeof t){var e=parseInt(t,10);return function(t){return t%e!==0}}var i="string"==typeof t&&t.match(/^(\d+)%$/),n=i?parseInt(i[1],10)/100:1;return function(t,e){return e<=(this.size.innerWidth+1)*n}},p._init=p.reposition=function(){this.positionCells(),this.positionSliderAtSelected()},p.getSize=function(){this.size=i(this.element),this.setCellAlign(),this.cursorPosition=this.size.innerWidth*this.cellAlign};var m={center:{left:.5,right:.5},left:{left:0,right:1},right:{right:0,left:1}};return p.setCellAlign=function(){var t=m[this.options.cellAlign];this.cellAlign=t?t[this.originSide]:this.options.cellAlign},p.setGallerySize=function(){if(this.options.setGallerySize){var t=this.options.adaptiveHeight&&this.selectedSlide?this.selectedSlide.height:this.maxCellHeight;this.viewport.style.height=t+"px"}},p._getWrapShiftCells=function(){if(this.options.wrapAround){this._unshiftCells(this.beforeShiftCells),this._unshiftCells(this.afterShiftCells);var t=this.cursorPosition,e=this.cells.length-1;this.beforeShiftCells=this._getGapCells(t,e,-1),t=this.size.innerWidth-this.cursorPosition,this.afterShiftCells=this._getGapCells(t,0,1)}},p._getGapCells=function(t,e,i){for(var n=[];t>0;){var r=this.cells[e];if(!r)break;n.push(r),e+=i,t-=r.size.outerWidth}return n},p._containSlides=function(){if(this.options.contain&&!this.options.wrapAround&&this.cells.length){var t=this.options.rightToLeft,e=t?"marginRight":"marginLeft",i=t?"marginLeft":"marginRight",n=this.slideableWidth-this.getLastCell().size[i],r=n<this.size.innerWidth,s=this.cursorPosition+this.cells[0].size[e],a=n-this.size.innerWidth*(1-this.cellAlign);this.slides.forEach(function(t){r?t.target=n*this.cellAlign:(t.target=Math.max(t.target,s),t.target=Math.min(t.target,a))},this)}},p.dispatchEvent=function(t,e,i){var n=e?[e].concat(i):i;if(this.emitEvent(t,n),o&&this.$element){var r=t+=this.options.namespaceJQueryEvents?".flickity":"";if(e){var s=o.Event(e);s.type=t,r=s}this.$element.trigger(r,i)}},p.select=function(t,e,i){if(this.isActive&&(t=parseInt(t,10),this._wrapSelect(t),(this.options.wrapAround||e)&&(t=n.modulo(t,this.slides.length)),this.slides[t])){var r=this.selectedIndex;this.selectedIndex=t,this.updateSelectedSlide(),i?this.positionSliderAtSelected():this.startAnimation(),this.options.adaptiveHeight&&this.setGallerySize(),this.dispatchEvent("select",null,[t]),t!=r&&this.dispatchEvent("change",null,[t]),this.dispatchEvent("cellSelect")}},p._wrapSelect=function(t){var e=this.slides.length;if(!(this.options.wrapAround&&e>1))return t;var i=n.modulo(t,e),r=Math.abs(i-this.selectedIndex),s=Math.abs(i+e-this.selectedIndex),a=Math.abs(i-e-this.selectedIndex);!this.isDragSelect&&s<r?t+=e:!this.isDragSelect&&a<r&&(t-=e),t<0?this.x-=this.slideableWidth:t>=e&&(this.x+=this.slideableWidth)},p.previous=function(t,e){this.select(this.selectedIndex-1,t,e)},p.next=function(t,e){this.select(this.selectedIndex+1,t,e)},p.updateSelectedSlide=function(){var t=this.slides[this.selectedIndex];t&&(this.unselectSelectedSlide(),this.selectedSlide=t,t.select(),this.selectedCells=t.cells,this.selectedElements=t.getCellElements(),this.selectedCell=t.cells[0],this.selectedElement=this.selectedElements[0])},p.unselectSelectedSlide=function(){this.selectedSlide&&this.selectedSlide.unselect()},p.selectInitialIndex=function(){var t=this.options.initialIndex;if(this.isInitActivated)this.select(this.selectedIndex,!1,!0);else{if(t&&"string"==typeof t&&this.queryCell(t))return void this.selectCell(t,!1,!0);var e=0;t&&this.slides[t]&&(e=t),this.select(e,!1,!0)}},p.selectCell=function(t,e,i){var n=this.queryCell(t);if(n){var r=this.getCellSlideIndex(n);this.select(r,e,i)}},p.getCellSlideIndex=function(t){for(var e=0;e<this.slides.length;e++)if(-1!=this.slides[e].cells.indexOf(t))return e},p.getCell=function(t){for(var e=0;e<this.cells.length;e++){var i=this.cells[e];if(i.element==t)return i}},p.getCells=function(t){t=n.makeArray(t);var e=[];return t.forEach(function(t){var i=this.getCell(t);i&&e.push(i)},this),e},p.getCellElements=function(){return this.cells.map(function(t){return t.element})},p.getParentCell=function(t){return this.getCell(t)||(t=n.getParent(t,".flickity-slider > *"),this.getCell(t))},p.getAdjacentCellElements=function(t,e){if(!t)return this.selectedSlide.getCellElements();e=void 0===e?this.selectedIndex:e;var i=this.slides.length;if(1+2*t>=i)return this.getCellElements();for(var r=[],s=e-t;s<=e+t;s++){var a=this.options.wrapAround?n.modulo(s,i):s,o=this.slides[a];o&&(r=r.concat(o.getCellElements()))}return r},p.queryCell=function(t){if("number"==typeof t)return this.cells[t];if("string"==typeof t){if(t.match(/^[#\.]?[\d\/]/))return;t=this.element.querySelector(t)}return this.getCell(t)},p.uiChange=function(){this.emitEvent("uiChange")},p.childUIPointerDown=function(t){"touchstart"!=t.type&&t.preventDefault(),this.focus()},p.onresize=function(){this.watchCSS(),this.resize()},n.debounceMethod(f,"onresize",150),p.resize=function(){if(this.isActive){this.getSize(),this.options.wrapAround&&(this.x=n.modulo(this.x,this.slideableWidth)),this.positionCells(),this._getWrapShiftCells(),this.setGallerySize(),this.emitEvent("resize");var t=this.selectedElements&&this.selectedElements[0];this.selectCell(t,!1,!0)}},p.watchCSS=function(){this.options.watchCSS&&(-1!=l(this.element,":after").content.indexOf("flickity")?this.activate():this.deactivate())},p.onkeydown=function(t){var e=document.activeElement&&document.activeElement!=this.element;if(this.options.accessibility&&!e){var i=f.keyboardHandlers[t.keyCode];i&&i.call(this)}},f.keyboardHandlers={37:function(){var t=this.options.rightToLeft?"next":"previous";this.uiChange(),this[t]()},39:function(){var t=this.options.rightToLeft?"previous":"next";this.uiChange(),this[t]()}},p.focus=function(){var e=t.pageYOffset;this.element.focus({preventScroll:!0}),t.pageYOffset!=e&&t.scrollTo(t.pageXOffset,e)},p.deactivate=function(){this.isActive&&(this.element.classList.remove("flickity-enabled"),this.element.classList.remove("flickity-rtl"),this.unselectSelectedSlide(),this.cells.forEach(function(t){t.destroy()}),this.element.removeChild(this.viewport),c(this.slider.children,this.element),this.options.accessibility&&(this.element.removeAttribute("tabIndex"),this.element.removeEventListener("keydown",this)),this.isActive=!1,this.emitEvent("deactivate"))},p.destroy=function(){this.deactivate(),t.removeEventListener("resize",this),this.allOff(),this.emitEvent("destroy"),o&&this.$element&&o.removeData(this.element,"flickity"),delete this.element.flickityGUID,delete d[this.guid]},n.extend(p,a),f.data=function(t){var e=(t=n.getQueryElement(t))&&t.flickityGUID;return e&&d[e]},n.htmlInit(f,"flickity"),o&&o.bridget&&o.bridget("flickity",f),f.setJQuery=function(t){o=t},f.Cell=r,f.Slide=s,f}(s,t,e,i,n,r,a)}.apply(e,n),void 0===r||(t.exports=r)}(window)},2522:function(t,e,i){var n,r,s;window,r=[i(9249),i(3170),i(7824),i(7728),i(9453),i(9943),i(766)],void 0===(s="function"==typeof(n=function(t){return t})?n.apply(e,r):n)||(t.exports=s)},766:function(t,e,i){var n,r;window,n=[i(9249),i(977)],void 0===(r=function(t,e){return function(t,e,i){"use strict";e.createMethods.push("_createLazyload");var n=e.prototype;function r(t,e){this.img=t,this.flickity=e,this.load()}return n._createLazyload=function(){this.on("select",this.lazyLoad)},n.lazyLoad=function(){var t=this.options.lazyLoad;if(t){var e="number"==typeof t?t:0,n=this.getAdjacentCellElements(e),s=[];n.forEach(function(t){var e=function(t){if("IMG"==t.nodeName){var e=t.getAttribute("data-flickity-lazyload"),n=t.getAttribute("data-flickity-lazyload-src"),r=t.getAttribute("data-flickity-lazyload-srcset");if(e||n||r)return[t]}var s=t.querySelectorAll("img[data-flickity-lazyload], img[data-flickity-lazyload-src], img[data-flickity-lazyload-srcset]");return i.makeArray(s)}(t);s=s.concat(e)}),s.forEach(function(t){new r(t,this)},this)}},r.prototype.handleEvent=i.handleEvent,r.prototype.load=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this);var t=this.img.getAttribute("data-flickity-lazyload")||this.img.getAttribute("data-flickity-lazyload-src"),e=this.img.getAttribute("data-flickity-lazyload-srcset");this.img.src=t,e&&this.img.setAttribute("srcset",e),this.img.removeAttribute("data-flickity-lazyload"),this.img.removeAttribute("data-flickity-lazyload-src"),this.img.removeAttribute("data-flickity-lazyload-srcset")},r.prototype.onload=function(t){this.complete(t,"flickity-lazyloaded")},r.prototype.onerror=function(t){this.complete(t,"flickity-lazyerror")},r.prototype.complete=function(t,e){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this);var i=this.flickity.getParentCell(this.img),n=i&&i.element;this.flickity.cellSizeChange(n),this.img.classList.add(e),this.flickity.dispatchEvent("lazyLoad",t,n)},e.LazyLoader=r,e}(0,t,e)}.apply(e,n))||(t.exports=r)},7728:function(t,e,i){var n,r;window,n=[i(9249),i(2475),i(977)],void 0===(r=function(t,e,i){return function(t,e,i,n){"use strict";function r(t){this.parent=t,this._create()}r.prototype=Object.create(i.prototype),r.prototype._create=function(){this.holder=document.createElement("ol"),this.holder.className="flickity-page-dots",this.dots=[],this.handleClick=this.onClick.bind(this),this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))},r.prototype.activate=function(){this.setDots(),this.holder.addEventListener("click",this.handleClick),this.bindStartEvent(this.holder),this.parent.element.appendChild(this.holder)},r.prototype.deactivate=function(){this.holder.removeEventListener("click",this.handleClick),this.unbindStartEvent(this.holder),this.parent.element.removeChild(this.holder)},r.prototype.setDots=function(){var t=this.parent.slides.length-this.dots.length;t>0?this.addDots(t):t<0&&this.removeDots(-t)},r.prototype.addDots=function(t){for(var e=document.createDocumentFragment(),i=[],n=this.dots.length,r=n+t,s=n;s<r;s++){var a=document.createElement("li");a.className="dot",a.setAttribute("aria-label","Page dot "+(s+1)),e.appendChild(a),i.push(a)}this.holder.appendChild(e),this.dots=this.dots.concat(i)},r.prototype.removeDots=function(t){this.dots.splice(this.dots.length-t,t).forEach(function(t){this.holder.removeChild(t)},this)},r.prototype.updateSelected=function(){this.selectedDot&&(this.selectedDot.className="dot",this.selectedDot.removeAttribute("aria-current")),this.dots.length&&(this.selectedDot=this.dots[this.parent.selectedIndex],this.selectedDot.className="dot is-selected",this.selectedDot.setAttribute("aria-current","step"))},r.prototype.onTap=r.prototype.onClick=function(t){var e=t.target;if("LI"==e.nodeName){this.parent.uiChange();var i=this.dots.indexOf(e);this.parent.select(i)}},r.prototype.destroy=function(){this.deactivate(),this.allOff()},e.PageDots=r,n.extend(e.defaults,{pageDots:!0}),e.createMethods.push("_createPageDots");var s=e.prototype;return s._createPageDots=function(){this.options.pageDots&&(this.pageDots=new r(this),this.on("activate",this.activatePageDots),this.on("select",this.updateSelectedPageDots),this.on("cellChange",this.updatePageDots),this.on("resize",this.updatePageDots),this.on("deactivate",this.deactivatePageDots))},s.activatePageDots=function(){this.pageDots.activate()},s.updateSelectedPageDots=function(){this.pageDots.updateSelected()},s.updatePageDots=function(){this.pageDots.setDots()},s.deactivatePageDots=function(){this.pageDots.deactivate()},e.PageDots=r,e}(0,t,e,i)}.apply(e,n))||(t.exports=r)},9453:function(t,e,i){var n,r;window,n=[i(2137),i(977),i(9249)],void 0===(r=function(t,e,i){return function(t,e,i){"use strict";function n(t){this.parent=t,this.state="stopped",this.onVisibilityChange=this.visibilityChange.bind(this),this.onVisibilityPlay=this.visibilityPlay.bind(this)}n.prototype=Object.create(t.prototype),n.prototype.play=function(){"playing"!=this.state&&(document.hidden?document.addEventListener("visibilitychange",this.onVisibilityPlay):(this.state="playing",document.addEventListener("visibilitychange",this.onVisibilityChange),this.tick()))},n.prototype.tick=function(){if("playing"==this.state){var t=this.parent.options.autoPlay;t="number"==typeof t?t:3e3;var e=this;this.clear(),this.timeout=setTimeout(function(){e.parent.next(!0),e.tick()},t)}},n.prototype.stop=function(){this.state="stopped",this.clear(),document.removeEventListener("visibilitychange",this.onVisibilityChange)},n.prototype.clear=function(){clearTimeout(this.timeout)},n.prototype.pause=function(){"playing"==this.state&&(this.state="paused",this.clear())},n.prototype.unpause=function(){"paused"==this.state&&this.play()},n.prototype.visibilityChange=function(){this[document.hidden?"pause":"unpause"]()},n.prototype.visibilityPlay=function(){this.play(),document.removeEventListener("visibilitychange",this.onVisibilityPlay)},e.extend(i.defaults,{pauseAutoPlayOnHover:!0}),i.createMethods.push("_createPlayer");var r=i.prototype;return r._createPlayer=function(){this.player=new n(this),this.on("activate",this.activatePlayer),this.on("uiChange",this.stopPlayer),this.on("pointerDown",this.stopPlayer),this.on("deactivate",this.deactivatePlayer)},r.activatePlayer=function(){this.options.autoPlay&&(this.player.play(),this.element.addEventListener("mouseenter",this))},r.playPlayer=function(){this.player.play()},r.stopPlayer=function(){this.player.stop()},r.pausePlayer=function(){this.player.pause()},r.unpausePlayer=function(){this.player.unpause()},r.deactivatePlayer=function(){this.player.stop(),this.element.removeEventListener("mouseenter",this)},r.onmouseenter=function(){this.options.pauseAutoPlayOnHover&&(this.player.pause(),this.element.addEventListener("mouseleave",this))},r.onmouseleave=function(){this.player.unpause(),this.element.removeEventListener("mouseleave",this)},i.Player=n,i}(t,e,i)}.apply(e,n))||(t.exports=r)},7824:function(t,e,i){var n,r;window,n=[i(9249),i(2475),i(977)],void 0===(r=function(t,e,i){return function(t,e,i,n){"use strict";var r="http://www.w3.org/2000/svg";function s(t,e){this.direction=t,this.parent=e,this._create()}s.prototype=Object.create(i.prototype),s.prototype._create=function(){this.isEnabled=!0,this.isPrevious=-1==this.direction;var t=this.parent.options.rightToLeft?1:-1;this.isLeft=this.direction==t;var e=this.element=document.createElement("button");e.className="flickity-button flickity-prev-next-button",e.className+=this.isPrevious?" previous":" next",e.setAttribute("type","button"),this.disable(),e.setAttribute("aria-label",this.isPrevious?"Previous":"Next");var i=this.createSVG();e.appendChild(i),this.parent.on("select",this.update.bind(this)),this.on("pointerDown",this.parent.childUIPointerDown.bind(this.parent))},s.prototype.activate=function(){this.bindStartEvent(this.element),this.element.addEventListener("click",this),this.parent.element.appendChild(this.element)},s.prototype.deactivate=function(){this.parent.element.removeChild(this.element),this.unbindStartEvent(this.element),this.element.removeEventListener("click",this)},s.prototype.createSVG=function(){var t=document.createElementNS(r,"svg");t.setAttribute("class","flickity-button-icon"),t.setAttribute("viewBox","0 0 100 100");var e,i=document.createElementNS(r,"path"),n="string"==typeof(e=this.parent.options.arrowShape)?e:"M "+e.x0+",50 L "+e.x1+","+(e.y1+50)+" L "+e.x2+","+(e.y2+50)+" L "+e.x3+",50 L "+e.x2+","+(50-e.y2)+" L "+e.x1+","+(50-e.y1)+" Z";return i.setAttribute("d",n),i.setAttribute("class","arrow"),this.isLeft||i.setAttribute("transform","translate(100, 100) rotate(180) "),t.appendChild(i),t},s.prototype.handleEvent=n.handleEvent,s.prototype.onclick=function(){if(this.isEnabled){this.parent.uiChange();var t=this.isPrevious?"previous":"next";this.parent[t]()}},s.prototype.enable=function(){this.isEnabled||(this.element.disabled=!1,this.isEnabled=!0)},s.prototype.disable=function(){this.isEnabled&&(this.element.disabled=!0,this.isEnabled=!1)},s.prototype.update=function(){var t=this.parent.slides;if(this.parent.options.wrapAround&&t.length>1)this.enable();else{var e=t.length?t.length-1:0,i=this.isPrevious?0:e;this[this.parent.selectedIndex==i?"disable":"enable"]()}},s.prototype.destroy=function(){this.deactivate(),this.allOff()},n.extend(e.defaults,{prevNextButtons:!0,arrowShape:{x0:10,x1:60,y1:50,x2:70,y2:40,x3:30}}),e.createMethods.push("_createPrevNextButtons");var a=e.prototype;return a._createPrevNextButtons=function(){this.options.prevNextButtons&&(this.prevButton=new s(-1,this),this.nextButton=new s(1,this),this.on("activate",this.activatePrevNextButtons))},a.activatePrevNextButtons=function(){this.prevButton.activate(),this.nextButton.activate(),this.on("deactivate",this.deactivatePrevNextButtons)},a.deactivatePrevNextButtons=function(){this.prevButton.deactivate(),this.nextButton.deactivate(),this.off("deactivate",this.deactivatePrevNextButtons)},e.PrevNextButton=s,e}(0,t,e,i)}.apply(e,n))||(t.exports=r)},1331:function(t,e,i){var n,r;window,void 0===(r="function"==typeof(n=function(){"use strict";function t(t){this.parent=t,this.isOriginLeft="left"==t.originSide,this.cells=[],this.outerWidth=0,this.height=0}var e=t.prototype;return e.addCell=function(t){if(this.cells.push(t),this.outerWidth+=t.size.outerWidth,this.height=Math.max(t.size.outerHeight,this.height),1==this.cells.length){this.x=t.x;var e=this.isOriginLeft?"marginLeft":"marginRight";this.firstMargin=t.size[e]}},e.updateTarget=function(){var t=this.isOriginLeft?"marginRight":"marginLeft",e=this.getLastCell(),i=e?e.size[t]:0,n=this.outerWidth-(this.firstMargin+i);this.target=this.x+this.firstMargin+n*this.parent.cellAlign},e.getLastCell=function(){return this.cells[this.cells.length-1]},e.select=function(){this.cells.forEach(function(t){t.select()})},e.unselect=function(){this.cells.forEach(function(t){t.unselect()})},e.getCellElements=function(){return this.cells.map(function(t){return t.element})},t})?n.call(e,i,e,t):n)||(t.exports=r)},1485:function(t,e,i){var n,r;window,void 0===(r="function"==typeof(n=function(){"use strict";function t(t){var e=parseFloat(t);return-1==t.indexOf("%")&&!isNaN(e)&&e}var e="undefined"==typeof console?function(){}:function(t){console.error(t)},i=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],n=i.length;function r(t){var i=getComputedStyle(t);return i||e("Style returned "+i+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),i}var s,a=!1;function o(e){if(function(){if(!a){a=!0;var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style.boxSizing="border-box";var i=document.body||document.documentElement;i.appendChild(e);var n=r(e);s=200==Math.round(t(n.width)),o.isBoxSizeOuter=s,i.removeChild(e)}}(),"string"==typeof e&&(e=document.querySelector(e)),e&&"object"==typeof e&&e.nodeType){var l=r(e);if("none"==l.display)return function(){for(var t={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},e=0;e<n;e++)t[i[e]]=0;return t}();var h={};h.width=e.offsetWidth,h.height=e.offsetHeight;for(var c=h.isBorderBox="border-box"==l.boxSizing,u=0;u<n;u++){var d=i[u],f=l[d],p=parseFloat(f);h[d]=isNaN(p)?0:p}var m=h.paddingLeft+h.paddingRight,g=h.paddingTop+h.paddingBottom,y=h.marginLeft+h.marginRight,v=h.marginTop+h.marginBottom,b=h.borderLeftWidth+h.borderRightWidth,S=h.borderTopWidth+h.borderBottomWidth,E=c&&s,k=t(l.width);!1!==k&&(h.width=k+(E?0:m+b));var x=t(l.height);return!1!==x&&(h.height=x+(E?0:g+S)),h.innerWidth=h.width-(m+b),h.innerHeight=h.height-(g+S),h.outerWidth=h.width+y,h.outerHeight=h.height+v,h}}return o})?n.call(e,i,e,t):n)||(t.exports=r)},9473:function(t){var e;"undefined"!=typeof window&&(e=function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/dist/",i(i.s="./src/hls.ts")}({
vendor: 2,795 bytes, line 2
2"./node_modules/eventemitter3/index.js":function(t,e,i){"use strict";var n=Object.prototype.hasOwnProperty,r="~";function s(){}function a(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function o(t,e,i,n,s){if("function"!=typeof i)throw new TypeError("The listener must be a function");var o=new a(i,n||t,s),l=r?r+e:e;return t._events[l]?t._events[l].fn?t._events[l]=[t._events[l],o]:t._events[l].push(o):(t._events[l]=o,t._eventsCount++),t}function l(t,e){0===--t._eventsCount?t._events=new s:delete t._events[e]}function h(){this._events=new s,this._eventsCount=0}Object.create&&(s.prototype=Object.create(null),(new s).__proto__||(r=!1)),h.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)n.call(t,e)&&i.push(r?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},h.prototype.listeners=function(t){var e=r?r+t:t,i=this._events[e];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,s=i.length,a=new Array(s);n<s;n++)a[n]=i[n].fn;return a},h.prototype.listenerCount=function(t){var e=r?r+t:t,i=this._events[e];return i?i.fn?1:i.length:0},h.prototype.emit=function(t,e,i,n,s,a){var o=r?r+t:t;if(!this._events[o])return!1;var l,h,c=this._events[o],u=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),u){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,i),!0;case 4:return c.fn.call(c.context,e,i,n),!0;case 5:return c.fn.call(c.context,e,i,n,s),!0;case 6:return c.fn.call(c.context,e,i,n,s,a),!0}for(h=1,l=new Array(u-1);h<u;h++)l[h-1]=arguments[h];c.fn.apply(c.context,l)}else{var d,f=c.length;for(h=0;h<f;h++)switch(c[h].once&&this.removeListener(t,c[h].fn,void 0,!0),u){case 1:c[h].fn.call(c[h].context);break;case 2:c[h].fn.call(c[h].context,e);break;case 3:c[h].fn.call(c[h].context,e,i);break;case 4:c[h].fn.call(c[h].context,e,i,n);break;default:if(!l)for(d=1,l=new Array(u-1);d<u;d++)l[d-1]=arguments[d];c[h].fn.apply(c[h].context,l)}}return!0},h.prototype.on=function(t,e,i){return o(this,t,e,i,!1)},h.prototype.once=function(t,e,i){return o(this,t,e,i,!0)},h.prototype.removeListener=function(t,e,i,n){var s=r?r+t:t;if(!this._events[s])return this;if(!e)return l(this,s),this;var a=this._events[s];if(a.fn)a.fn!==e||n&&!a.once||i&&a.context!==i||l(this,s);else{for(var o=0,h=[],c=a.length;o<c;o++)(a[o].fn!==e||n&&!a[o].once||i&&a[o].context!==i)&&h.push(a[o]);h.length?this._events[s]=1===h.length?h[0]:h:l(this,s)}return this},h.prototype.removeAllListeners=function(t){var e;return t?(e=r?r+t:t,this._events[e]&&l(this,e)):(this._events=new s,this._eventsCount=0),this},h.prototype.off=h.prototype.removeListener,h.prototype.addListener=h.prototype.on,h.prefixed=r,h.EventEmitter=h,t.exports=h},
vendor: 1,708 bytes, line 2
2"./node_modules/url-toolkit/src/url-toolkit.js":function(t,e,i){var n,r,s,a,o;n=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/?#]*\/)*[^;?#]*)?(;[^?#]*)?(\?[^#]*)?(#.*)?$/,r=/^([^\/?#]*)(.*)$/,s=/(?:\/|^)\.(?=\/)/g,a=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,o={buildAbsoluteURL:function(t,e,i){if(i=i||{},t=t.trim(),!(e=e.trim())){if(!i.alwaysNormalize)return t;var n=o.parseURL(t);if(!n)throw new Error("Error trying to parse base URL.");return n.path=o.normalizePath(n.path),o.buildURLFromParts(n)}var s=o.parseURL(e);if(!s)throw new Error("Error trying to parse relative URL.");if(s.scheme)return i.alwaysNormalize?(s.path=o.normalizePath(s.path),o.buildURLFromParts(s)):e;var a=o.parseURL(t);if(!a)throw new Error("Error trying to parse base URL.");if(!a.netLoc&&a.path&&"/"!==a.path[0]){var l=r.exec(a.path);a.netLoc=l[1],a.path=l[2]}a.netLoc&&!a.path&&(a.path="/");var h={scheme:a.scheme,netLoc:s.netLoc,path:null,params:s.params,query:s.query,fragment:s.fragment};if(!s.netLoc&&(h.netLoc=a.netLoc,"/"!==s.path[0]))if(s.path){var c=a.path,u=c.substring(0,c.lastIndexOf("/")+1)+s.path;h.path=o.normalizePath(u)}else h.path=a.path,s.params||(h.params=a.params,s.query||(h.query=a.query));return null===h.path&&(h.path=i.alwaysNormalize?o.normalizePath(s.path):s.path),o.buildURLFromParts(h)},parseURL:function(t){var e=n.exec(t);return e?{scheme:e[1]||"",netLoc:e[2]||"",path:e[3]||"",params:e[4]||"",query:e[5]||"",fragment:e[6]||""}:null},normalizePath:function(t){for(t=t.split("").reverse().join("").replace(s,"");t.length!==(t=t.replace(a,"")).length;);return t.split("").reverse().join("")},buildURLFromParts:function(t){return t.scheme+t.netLoc+t.path+t.params+t.query+t.fragment}},t.exports=o},
vendor: 2,671 bytes, line 2
2"./node_modules/webworkify-webpack/index.js":function(t,e,i){function n(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.m=t,i.c=e,i.i=function(t){return t},i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="/",i.oe=function(t){throw console.error(t),t};var n=i(i.s=ENTRY_MODULE);return n.default||n}var r="[\\.|\\-|\\+|\\w|/|@]+",s="\\(\\s*(/\\*.*?\\*/)?\\s*.*?("+r+").*?\\)";function a(t){return(t+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function o(t){return!isNaN(1*t)}function l(t,e,n){var l={};l[n]=[];var h=e.toString(),c=h.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!c)return l;for(var u,d=c[1],f=new RegExp("(\\\\n|\\W)"+a(d)+s,"g");u=f.exec(h);)"dll-reference"!==u[3]&&l[n].push(u[3]);for(f=new RegExp("\\("+a(d)+'\\("(dll-reference\\s('+r+'))"\\)\\)'+s,"g");u=f.exec(h);)t[u[2]]||(l[n].push(u[1]),t[u[2]]=i(u[1]).m),l[u[2]]=l[u[2]]||[],l[u[2]].push(u[4]);for(var p=Object.keys(l),m=0;m<p.length;m++)for(var g=0;g<l[p[m]].length;g++)o(l[p[m]][g])&&(l[p[m]][g]=1*l[p[m]][g]);return l}function h(t){return Object.keys(t).reduce(function(e,i){return e||t[i].length>0},!1)}t.exports=function(t,e){e=e||{};var r={main:i.m},s=e.all?{main:Object.keys(r.main)}:function(t,e){for(var i={main:[e]},n={main:[]},r={main:{}};h(i);)for(var s=Object.keys(i),a=0;a<s.length;a++){var o=s[a],c=i[o].pop();if(r[o]=r[o]||{},!r[o][c]&&t[o][c]){r[o][c]=!0,n[o]=n[o]||[],n[o].push(c);for(var u=l(t,t[o][c],o),d=Object.keys(u),f=0;f<d.length;f++)i[d[f]]=i[d[f]]||[],i[d[f]]=i[d[f]].concat(u[d[f]])}}return n}(r,t),a="";Object.keys(s).filter(function(t){return"main"!==t}).forEach(function(t){for(var e=0;s[t][e];)e++;s[t].push(e),r[t][e]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",a=a+"var "+t+" = ("+n.toString().replace("ENTRY_MODULE",JSON.stringify(e))+")({"+s[t].map(function(e){return JSON.stringify(e)+": "+r[t][e].toString()}).join(",")+"});\n"}),a=a+"new (("+n.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+s.main.map(function(t){return JSON.stringify(t)+": "+r.main[t].toString()}).join(",")+"}))(self);";var o=new window.Blob([a],{type:"text/javascript"});if(e.bare)return o;var c=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(o),u=new window.Worker(c);return u.objectURL=c,u}},
vendor: 55,157 bytes, line 2
2"./src/crypt/decrypter.js":function(t,e,i){"use strict";i.r(e);var n=function(){function t(t,e){this.subtle=t,this.aesIV=e}return t.prototype.decrypt=function(t,e){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},e,t)},t}(),r=function(){function t(t,e){this.subtle=t,this.key=e}return t.prototype.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},t}(),s=function(){function t(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.initTable()}var e=t.prototype;return e.uint8ArrayToUint32Array_=function(t){for(var e=new DataView(t),i=new Uint32Array(4),n=0;n<4;n++)i[n]=e.getUint32(4*n);return i},e.initTable=function(){var t=this.sBox,e=this.invSBox,i=this.subMix,n=i[0],r=i[1],s=i[2],a=i[3],o=this.invSubMix,l=o[0],h=o[1],c=o[2],u=o[3],d=new Uint32Array(256),f=0,p=0,m=0;for(m=0;m<256;m++)d[m]=m<128?m<<1:m<<1^283;for(m=0;m<256;m++){var g=p^p<<1^p<<2^p<<3^p<<4;g=g>>>8^255&g^99,t[f]=g,e[g]=f;var y=d[f],v=d[y],b=d[v],S=257*d[g]^16843008*g;n[f]=S<<24|S>>>8,r[f]=S<<16|S>>>16,s[f]=S<<8|S>>>24,a[f]=S,S=16843009*b^65537*v^257*y^16843008*f,l[g]=S<<24|S>>>8,h[g]=S<<16|S>>>16,c[g]=S<<8|S>>>24,u[g]=S,f?(f=y^d[d[d[b^y]]],p^=d[d[p]]):f=p=1}},e.expandKey=function(t){for(var e=this.uint8ArrayToUint32Array_(t),i=!0,n=0;n<e.length&&i;)i=e[n]===this.key[n],n++;if(!i){this.key=e;var r=this.keySize=e.length;if(4!==r&&6!==r&&8!==r)throw new Error("Invalid aes key size="+r);var s,a,o,l,h=this.ksRows=4*(r+6+1),c=this.keySchedule=new Uint32Array(h),u=this.invKeySchedule=new Uint32Array(h),d=this.sBox,f=this.rcon,p=this.invSubMix,m=p[0],g=p[1],y=p[2],v=p[3];for(s=0;s<h;s++)s<r?o=c[s]=e[s]:(l=o,s%r===0?(l=d[(l=l<<8|l>>>24)>>>24]<<24|d[l>>>16&255]<<16|d[l>>>8&255]<<8|d[255&l],l^=f[s/r|0]<<24):r>6&&s%r===4&&(l=d[l>>>24]<<24|d[l>>>16&255]<<16|d[l>>>8&255]<<8|d[255&l]),c[s]=o=(c[s-r]^l)>>>0);for(a=0;a<h;a++)s=h-a,l=3&a?c[s]:c[s-4],u[a]=a<4||s<=4?l:m[d[l>>>24]]^g[d[l>>>16&255]]^y[d[l>>>8&255]]^v[d[255&l]],u[a]=u[a]>>>0}},e.networkToHostOrderSwap=function(t){return t<<24|(65280&t)<<8|(16711680&t)>>8|t>>>24},e.decrypt=function(t,e,i,n){for(var r,s,a,o,l,h,c,u,d,f,p,m,g,y,v,b,S,E=this.keySize+6,k=this.invKeySchedule,x=this.invSBox,w=this.invSubMix,_=w[0],C=w[1],T=w[2],A=w[3],P=this.uint8ArrayToUint32Array_(i),D=P[0],M=P[1],L=P[2],R=P[3],I=new Int32Array(t),F=new Int32Array(I.length),O=this.networkToHostOrderSwap;e<I.length;){for(d=O(I[e]),f=O(I[e+1]),p=O(I[e+2]),m=O(I[e+3]),l=d^k[0],h=m^k[1],c=p^k[2],u=f^k[3],g=4,y=1;y<E;y++)r=_[l>>>24]^C[h>>16&255]^T[c>>8&255]^A[255&u]^k[g],s=_[h>>>24]^C[c>>16&255]^T[u>>8&255]^A[255&l]^k[g+1],a=_[c>>>24]^C[u>>16&255]^T[l>>8&255]^A[255&h]^k[g+2],o=_[u>>>24]^C[l>>16&255]^T[h>>8&255]^A[255&c]^k[g+3],l=r,h=s,c=a,u=o,g+=4;r=x[l>>>24]<<24^x[h>>16&255]<<16^x[c>>8&255]<<8^x[255&u]^k[g],s=x[h>>>24]<<24^x[c>>16&255]<<16^x[u>>8&255]<<8^x[255&l]^k[g+1],a=x[c>>>24]<<24^x[u>>16&255]<<16^x[l>>8&255]<<8^x[255&h]^k[g+2],o=x[u>>>24]<<24^x[l>>16&255]<<16^x[h>>8&255]<<8^x[255&c]^k[g+3],g+=3,F[e]=O(r^D),F[e+1]=O(o^M),F[e+2]=O(a^L),F[e+3]=O(s^R),D=d,M=f,L=p,R=m,e+=4}return n?(S=(b=(v=F.buffer).byteLength)&&new DataView(v).getUint8(b-1))?v.slice(0,b-S):v:F.buffer},e.destroy=function(){this.key=void 0,this.keySize=void 0,this.ksRows=void 0,this.sBox=void 0,this.invSBox=void 0,this.subMix=void 0,this.invSubMix=void 0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.rcon=void 0},t}(),a=i("./src/errors.ts"),o=i("./src/utils/logger.js"),l=i("./src/events.js"),h=i("./src/utils/get-self-scope.js"),c=Object(h.getSelfScope)(),u=function(){function t(t,e,i){var n=(void 0===i?{}:i).removePKCS7Padding,r=void 0===n||n;if(this.logEnabled=!0,this.observer=t,this.config=e,this.removePKCS7Padding=r,r)try{var s=c.crypto;s&&(this.subtle=s.subtle||s.webkitSubtle)}catch(t){}this.disableWebCrypto=!this.subtle}var e=t.prototype;return e.isSync=function(){return this.disableWebCrypto&&this.config.enableSoftwareAES},e.decrypt=function(t,e,i,a){var l=this;if(this.disableWebCrypto&&this.config.enableSoftwareAES){this.logEnabled&&(o.logger.log("JS AES decrypt"),this.logEnabled=!1);var h=this.decryptor;h||(this.decryptor=h=new s),h.expandKey(e),a(h.decrypt(t,0,i,this.removePKCS7Padding))}else{this.logEnabled&&(o.logger.log("WebCrypto AES decrypt"),this.logEnabled=!1);var c=this.subtle;this.key!==e&&(this.key=e,this.fastAesKey=new r(c,e)),this.fastAesKey.expandKey().then(function(r){new n(c,i).decrypt(t,r).catch(function(n){l.onWebCryptoError(n,t,e,i,a)}).then(function(t){a(t)})}).catch(function(n){l.onWebCryptoError(n,t,e,i,a)})}},e.onWebCryptoError=function(t,e,i,n,r){this.config.enableSoftwareAES?(o.logger.log("WebCrypto Error, disable WebCrypto API"),this.disableWebCrypto=!0,this.logEnabled=!0,this.decrypt(e,i,n,r)):(o.logger.error("decrypting error : "+t.message),this.observer.trigger(l.default.ERROR,{type:a.ErrorTypes.MEDIA_ERROR,details:a.ErrorDetails.FRAG_DECRYPT_ERROR,fatal:!0,reason:t.message}))},e.destroy=function(){var t=this.decryptor;t&&(t.destroy(),this.decryptor=void 0)},t}();e.default=u},"./src/demux/demuxer-inline.js":function(t,e,i){"use strict";i.r(e);var n=i("./src/events.js"),r=i("./src/errors.ts"),s=i("./src/crypt/decrypter.js"),a=i("./src/polyfills/number.js"),o=i("./src/utils/logger.js"),l=i("./src/utils/get-self-scope.js");function h(t,e){return 255===t[e]&&240==(246&t[e+1])}function c(t,e){return 1&t[e+1]?7:9}function u(t,e){return(3&t[e+3])<<11|t[e+4]<<3|(224&t[e+5])>>>5}function d(t,e){return!!(e+1<t.length&&h(t,e))}function f(t,e){if(d(t,e)){var i=c(t,e);if(e+i>=t.length)return!1;var n=u(t,e);if(n<=i)return!1;var r=e+n;if(r===t.length||r+1<t.length&&h(t,r))return!0}return!1}function p(t,e,i,s,a){if(!t.samplerate){var l=function(t,e,i,s){var a,l,h,c,u,d=navigator.userAgent.toLowerCase(),f=s,p=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];if(a=((192&e[i+2])>>>6)+1,!((l=(60&e[i+2])>>>2)>p.length-1))return c=(1&e[i+2])<<2,c|=(192&e[i+3])>>>6,o.logger.log("manifest codec:"+s+",ADTS data:type:"+a+",sampleingIndex:"+l+"["+p[l]+"Hz],channelConfig:"+c),/firefox/i.test(d)?l>=6?(a=5,u=new Array(4),h=l-3):(a=2,u=new Array(2),h=l):-1!==d.indexOf("android")?(a=2,u=new Array(2),h=l):(a=5,u=new Array(4),s&&(-1!==s.indexOf("mp4a.40.29")||-1!==s.indexOf("mp4a.40.5"))||!s&&l>=6?h=l-3:((s&&-1!==s.indexOf("mp4a.40.2")&&(l>=6&&1===c||/vivaldi/i.test(d))||!s&&1===c)&&(a=2,u=new Array(2)),h=l)),u[0]=a<<3,u[0]|=(14&l)>>1,u[1]|=(1&l)<<7,u[1]|=c<<3,5===a&&(u[1]|=(14&h)>>1,u[2]=(1&h)<<7,u[2]|=8,u[3]=0),{config:u,samplerate:p[l],channelCount:c,codec:"mp4a.40."+a,manifestCodec:f};t.trigger(n.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+l})}(e,i,s,a);t.config=l.config,t.samplerate=l.samplerate,t.channelCount=l.channelCount,t.codec=l.codec,t.manifestCodec=l.manifestCodec,o.logger.log("parsed codec:"+t.codec+",rate:"+l.samplerate+",nb channel:"+l.channelCount)}}function m(t){return 9216e4/t}function g(t,e,i,n,r){var s=function(t,e,i,n,r){var s,a,o=t.length;if(s=c(t,e),a=u(t,e),(a-=s)>0&&e+s+a<=o)return{headerLength:s,frameLength:a,stamp:i+n*r}}(e,i,n,r,m(t.samplerate));if(s){var a=s.stamp,o=s.headerLength,l=s.frameLength,h={unit:e.subarray(i+o,i+o+l),pts:a,dts:a};return t.samples.push(h),{sample:h,length:l+o}}}var y=i("./src/demux/id3.js"),v=function(){function t(t,e,i){this.observer=t,this.config=i,this.remuxer=e}var e=t.prototype;return e.resetInitSegment=function(t,e,i,n){this._audioTrack={container:"audio/adts",type:"audio",id:0,sequenceNumber:0,isAAC:!0,samples:[],len:0,manifestCodec:e,duration:n,inputTimeScale:9e4}},e.resetTimeStamp=function(){},t.probe=function(t){if(!t)return!1;for(var e=(y.default.getID3Data(t,0)||[]).length,i=t.length;e<i;e++)if(f(t,e))return o.logger.log("ADTS sync word found !"),!0;return!1},e.append=function(t,e,i,n){for(var r=this._audioTrack,s=y.default.getID3Data(t,0)||[],l=y.default.getTimeStamp(s),h=Object(a.isFiniteNumber)(l)?90*l:9e4*e,c=0,u=h,f=t.length,m=s.length,v=[{pts:u,dts:u,data:s}];m<f-1;)if(d(t,m)&&m+5<f){p(r,this.observer,t,m,r.manifestCodec);var b=g(r,t,m,h,c);if(!b){o.logger.log("Unable to parse AAC frame");break}m+=b.length,u=b.sample.pts,c++}else y.default.isHeader(t,m)?(s=y.default.getID3Data(t,m),v.push({pts:u,dts:u,data:s}),m+=s.length):m++;this.remuxer.remux(r,{samples:[]},{samples:v,inputTimeScale:9e4},{samples:[]},e,i,n)},e.destroy=function(){},t}(),b=i("./src/demux/mp4demuxer.js"),S={BitratesMap:[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],SamplingRateMap:[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],SamplesCoefficients:[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],BytesInSlot:[0,1,1,4],appendFrame:function(t,e,i,n,r){if(!(i+24>e.length)){var s=this.parseHeader(e,i);if(s&&i+s.frameLength<=e.length){var a=n+r*(9e4*s.samplesPerFrame/s.sampleRate),o={unit:e.subarray(i,i+s.frameLength),pts:a,dts:a};return t.config=[],t.channelCount=s.channelCount,t.samplerate=s.sampleRate,t.samples.push(o),{sample:o,length:s.frameLength}}}},parseHeader:function(t,e){var i=t[e+1]>>3&3,n=t[e+1]>>1&3,r=t[e+2]>>4&15,s=t[e+2]>>2&3,a=t[e+2]>>1&1;if(1!==i&&0!==r&&15!==r&&3!==s){var o=3===i?3-n:3===n?3:4,l=1e3*S.BitratesMap[14*o+r-1],h=3===i?0:2===i?1:2,c=S.SamplingRateMap[3*h+s],u=t[e+3]>>6==3?1:2,d=S.SamplesCoefficients[i][n],f=S.BytesInSlot[n],p=8*d*f;return{sampleRate:c,channelCount:u,frameLength:parseInt(d*l/c+a,10)*f,samplesPerFrame:p}}},isHeaderPattern:function(t,e){return!(255!==t[e]||224&~t[e+1]||!(6&t[e+1]))},isHeader:function(t,e){return!!(e+1<t.length&&this.isHeaderPattern(t,e))},probe:function(t,e){if(e+1<t.length&&this.isHeaderPattern(t,e)){var i=this.parseHeader(t,e),n=4;i&&i.frameLength&&(n=i.frameLength);var r=e+n;if(r===t.length||r+1<t.length&&this.isHeaderPattern(t,r))return!0}return!1}},E=S,k=function(){function t(t){this.data=t,this.bytesAvailable=t.byteLength,this.word=0,this.bitsAvailable=0}var e=t.prototype;return e.loadWord=function(){var t=this.data,e=this.bytesAvailable,i=t.byteLength-e,n=new Uint8Array(4),r=Math.min(4,e);if(0===r)throw new Error("no bytes available");n.set(t.subarray(i,i+r)),this.word=new DataView(n.buffer).getUint32(0),this.bitsAvailable=8*r,this.bytesAvailable-=r},e.skipBits=function(t){var e;this.bitsAvailable>t?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,t-=(e=t>>3)>>3,this.bytesAvailable-=e,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)},e.readBits=function(t){var e=Math.min(this.bitsAvailable,t),i=this.word>>>32-e;return t>32&&o.logger.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=e,this.bitsAvailable>0?this.word<<=e:this.bytesAvailable>0&&this.loadWord(),(e=t-e)>0&&this.bitsAvailable?i<<e|this.readBits(e):i},e.skipLZ=function(){var t;for(t=0;t<this.bitsAvailable;++t)if(this.word&2147483648>>>t)return this.word<<=t,this.bitsAvailable-=t,t;return this.loadWord(),t+this.skipLZ()},e.skipUEG=function(){this.skipBits(1+this.skipLZ())},e.skipEG=function(){this.skipBits(1+this.skipLZ())},e.readUEG=function(){var t=this.skipLZ();return this.readBits(t+1)-1},e.readEG=function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)},e.readBoolean=function(){return 1===this.readBits(1)},e.readUByte=function(){return this.readBits(8)},e.readUShort=function(){return this.readBits(16)},e.readUInt=function(){return this.readBits(32)},e.skipScalingList=function(t){var e,i=8,n=8;for(e=0;e<t;e++)0!==n&&(n=(i+this.readEG()+256)%256),i=0===n?i:n},e.readSPS=function(){var t,e,i,n,r,s,a,o=0,l=0,h=0,c=0,u=this.readUByte.bind(this),d=this.readBits.bind(this),f=this.readUEG.bind(this),p=this.readBoolean.bind(this),m=this.skipBits.bind(this),g=this.skipEG.bind(this),y=this.skipUEG.bind(this),v=this.skipScalingList.bind(this);if(u(),t=u(),d(5),m(3),u(),y(),100===t||110===t||122===t||244===t||44===t||83===t||86===t||118===t||128===t){var b=f();if(3===b&&m(1),y(),y(),m(1),p())for(s=3!==b?8:12,a=0;a<s;a++)p()&&v(a<6?16:64)}y();var S=f();if(0===S)f();else if(1===S)for(m(1),g(),g(),e=f(),a=0;a<e;a++)g();y(),m(1),i=f(),n=f(),0===(r=d(1))&&m(1),m(1),p()&&(o=f(),l=f(),h=f(),c=f());var E=[1,1];if(p()&&p())switch(u()){case 1:E=[1,1];break;case 2:E=[12,11];break;case 3:E=[10,11];break;case 4:E=[16,11];break;case 5:E=[40,33];break;case 6:E=[24,11];break;case 7:E=[20,11];break;case 8:E=[32,11];break;case 9:E=[80,33];break;case 10:E=[18,11];break;case 11:E=[15,11];break;case 12:E=[64,33];break;case 13:E=[160,99];break;case 14:E=[4,3];break;case 15:E=[3,2];break;case 16:E=[2,1];break;case 255:E=[u()<<8|u(),u()<<8|u()]}return{width:Math.ceil(16*(i+1)-2*o-2*l),height:(2-r)*(n+1)*16-(r?2:4)*(h+c),pixelRatio:E}},e.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},t}(),x=function(){function t(t,e,i,n){this.decryptdata=i,this.discardEPB=n,this.decrypter=new s.default(t,e,{removePKCS7Padding:!1})}var e=t.prototype;return e.decryptBuffer=function(t,e){this.decrypter.decrypt(t,this.decryptdata.key.buffer,this.decryptdata.iv.buffer,e)},e.decryptAacSample=function(t,e,i,n){var r=t[e].unit,s=r.subarray(16,r.length-r.length%16),a=s.buffer.slice(s.byteOffset,s.byteOffset+s.length),o=this;this.decryptBuffer(a,function(s){s=new Uint8Array(s),r.set(s,16),n||o.decryptAacSamples(t,e+1,i)})},e.decryptAacSamples=function(t,e,i){for(;;e++){if(e>=t.length)return void i();if(!(t[e].unit.length<32)){var n=this.decrypter.isSync();if(this.decryptAacSample(t,e,i,n),!n)return}}},e.getAvcEncryptedData=function(t){for(var e=16*Math.floor((t.length-48)/160)+16,i=new Int8Array(e),n=0,r=32;r<=t.length-16;r+=160,n+=16)i.set(t.subarray(r,r+16),n);return i},e.getAvcDecryptedUnit=function(t,e){e=new Uint8Array(e);for(var i=0,n=32;n<=t.length-16;n+=160,i+=16)t.set(e.subarray(i,i+16),n);return t},e.decryptAvcSample=function(t,e,i,n,r,s){var a=this.discardEPB(r.data),o=this.getAvcEncryptedData(a),l=this;this.decryptBuffer(o.buffer,function(o){r.data=l.getAvcDecryptedUnit(a,o),s||l.decryptAvcSamples(t,e,i+1,n)})},e.decryptAvcSamples=function(t,e,i,n){for(;;e++,i=0){if(e>=t.length)return void n();for(var r=t[e].units;!(i>=r.length);i++){var s=r[i];if(!(s.data.length<=48||1!==s.type&&5!==s.type)){var a=this.decrypter.isSync();if(this.decryptAvcSample(t,e,i,n,s,a),!a)return}}}},t}(),w={video:1,audio:2,id3:3,text:4},_=function(){function t(t,e,i,n){this.observer=t,this.config=i,this.typeSupported=n,this.remuxer=e,this.sampleAes=null,this.pmtUnknownTypes={}}var e=t.prototype;return e.setDecryptData=function(t){null!=t&&null!=t.key&&"SAMPLE-AES"===t.method?this.sampleAes=new x(this.observer,this.config,t,this.discardEPB):this.sampleAes=null},t.probe=function(e){var i=t._syncOffset(e);return!(i<0||(i&&o.logger.warn("MPEG2-TS detected but first sync word found @ offset "+i+", junk ahead ?"),0))},t._syncOffset=function(t){for(var e=Math.min(1e3,t.length-564),i=0;i<e;){if(71===t[i]&&71===t[i+188]&&71===t[i+376])return i;i++}return-1},t.createTrack=function(t,e){return{container:"video"===t||"audio"===t?"video/mp2t":void 0,type:t,id:w[t],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:"video"===t?0:void 0,isAAC:"audio"===t||void 0,duration:"audio"===t?e:void 0}},e.resetInitSegment=function(e,i,n,r){this.pmtParsed=!1,this._pmtId=-1,this.pmtUnknownTypes={},this._avcTrack=t.createTrack("video",r),this._audioTrack=t.createTrack("audio",r),this._id3Track=t.createTrack("id3",r),this._txtTrack=t.createTrack("text",r),this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=i,this.videoCodec=n,this._duration=r},e.resetTimeStamp=function(){},e.append=function(e,i,s,a){var l,h,c,u,d,f=e.length,p=!1;this.pmtUnknownTypes={},this.contiguous=s;var m=this.pmtParsed,g=this._avcTrack,y=this._audioTrack,v=this._id3Track,b=g.pid,S=y.pid,E=v.pid,k=this._pmtId,x=g.pesData,w=y.pesData,_=v.pesData,C=this._parsePAT,T=this._parsePMT.bind(this),A=this._parsePES,P=this._parseAVCPES.bind(this),D=this._parseAACPES.bind(this),M=this._parseMPEGPES.bind(this),L=this._parseID3PES.bind(this),R=t._syncOffset(e);for(f-=(f+R)%188,l=R;l<f;l+=188)if(71===e[l]){if(h=!!(64&e[l+1]),c=((31&e[l+1])<<8)+e[l+2],(48&e[l+3])>>4>1){if((u=l+5+e[l+4])===l+188)continue}else u=l+4;switch(c){case b:h&&(x&&(d=A(x))&&P(d,!1),x={data:[],size:0}),x&&(x.data.push(e.subarray(u,l+188)),x.size+=l+188-u);break;case S:h&&(w&&(d=A(w))&&(y.isAAC?D(d):M(d)),w={data:[],size:0}),w&&(w.data.push(e.subarray(u,l+188)),w.size+=l+188-u);break;case E:h&&(_&&(d=A(_))&&L(d),_={data:[],size:0}),_&&(_.data.push(e.subarray(u,l+188)),_.size+=l+188-u);break;case 0:h&&(u+=e[u]+1),k=this._pmtId=C(e,u);break;case k:h&&(u+=e[u]+1);var I=T(e,u,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,null!=this.sampleAes);(b=I.avc)>0&&(g.pid=b),(S=I.audio)>0&&(y.pid=S,y.isAAC=I.isAAC),(E=I.id3)>0&&(v.pid=E),p&&!m&&(o.logger.log("reparse from beginning"),p=!1,l=R-188),m=this.pmtParsed=!0;break;case 17:case 8191:break;default:p=!0}}else this.observer.trigger(n.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});x&&(d=A(x))?(P(d,!0),g.pesData=null):g.pesData=x,w&&(d=A(w))?(y.isAAC?D(d):M(d),y.pesData=null):(w&&w.size&&o.logger.log("last AAC PES packet truncated,might overlap between fragments"),y.pesData=w),_&&(d=A(_))?(L(d),v.pesData=null):v.pesData=_,null==this.sampleAes?this.remuxer.remux(y,g,v,this._txtTrack,i,s,a):this.decryptAndRemux(y,g,v,this._txtTrack,i,s,a)},e.decryptAndRemux=function(t,e,i,n,r,s,a){if(t.samples&&t.isAAC){var o=this;this.sampleAes.decryptAacSamples(t.samples,0,function(){o.decryptAndRemuxAvc(t,e,i,n,r,s,a)})}else this.decryptAndRemuxAvc(t,e,i,n,r,s,a)},e.decryptAndRemuxAvc=function(t,e,i,n,r,s,a){if(e.samples){var o=this;this.sampleAes.decryptAvcSamples(e.samples,0,0,function(){o.remuxer.remux(t,e,i,n,r,s,a)})}else this.remuxer.remux(t,e,i,n,r,s,a)},e.destroy=function(){this._initPTS=this._initDTS=void 0,this._duration=0},e._parsePAT=function(t,e){return(31&t[e+10])<<8|t[e+11]},e._trackUnknownPmt=function(t,e,i){var n=this.pmtUnknownTypes[t]||0;return 0===n&&(this.pmtUnknownTypes[t]=0,e.call(o.logger,i)),this.pmtUnknownTypes[t]++,n},e._parsePMT=function(t,e,i,n){var r,s,a={audio:-1,avc:-1,id3:-1,isAAC:!0};for(r=e+3+((15&t[e+1])<<8|t[e+2])-4,e+=12+((15&t[e+10])<<8|t[e+11]);e<r;){switch(s=(31&t[e+1])<<8|t[e+2],t[e]){case 207:if(!n){this._trackUnknownPmt(t[e],o.logger.warn,"ADTS AAC with AES-128-CBC frame encryption found in unencrypted stream");break}case 15:-1===a.audio&&(a.audio=s);break;case 21:-1===a.id3&&(a.id3=s);break;case 219:if(!n){this._trackUnknownPmt(t[e],o.logger.warn,"H.264 with AES-128-CBC slice encryption found in unencrypted stream");break}case 27:-1===a.avc&&(a.avc=s);break;case 3:case 4:i?-1===a.audio&&(a.audio=s,a.isAAC=!1):this._trackUnknownPmt(t[e],o.logger.warn,"MPEG audio found, not supported in this browser");break;case 36:this._trackUnknownPmt(t[e],o.logger.warn,"Unsupported HEVC stream type found");break;default:this._trackUnknownPmt(t[e],o.logger.log,"Unknown stream type:"+t[e])}e+=5+((15&t[e+3])<<8|t[e+4])}return a},e._parsePES=function(t){var e,i,n,r,s,a,l,h,c=0,u=t.data;if(!t||0===t.size)return null;for(;u[0].length<19&&u.length>1;){var d=new Uint8Array(u[0].length+u[1].length);d.set(u[0]),d.set(u[1],u[0].length),u[0]=d,u.splice(1,1)}if(1===((e=u[0])[0]<<16)+(e[1]<<8)+e[2]){if((n=(e[4]<<8)+e[5])&&n>t.size-6)return null;if(192&(i=e[7])&&(a=536870912*(14&e[9])+4194304*(255&e[10])+16384*(254&e[11])+128*(255&e[12])+(254&e[13])/2,64&i?a-(l=536870912*(14&e[14])+4194304*(255&e[15])+16384*(254&e[16])+128*(255&e[17])+(254&e[18])/2)>54e5&&(o.logger.warn(Math.round((a-l)/9e4)+"s delta between PTS and DTS, align them"),a=l):l=a),h=(r=e[8])+9,t.size<=h)return null;t.size-=h,s=new Uint8Array(t.size);for(var f=0,p=u.length;f<p;f++){var m=(e=u[f]).byteLength;if(h){if(h>m){h-=m;continue}e=e.subarray(h),m-=h,h=0}s.set(e,c),c+=m}return n&&(n-=r+3),{data:s,pts:a,dts:l,len:n}}return null},e.pushAccesUnit=function(t,e){if(t.units.length&&t.frame){var i=e.samples,n=i.length;if(isNaN(t.pts)){if(!n)return void e.dropped++;var r=i[n-1];t.pts=r.pts,t.dts=r.dts}!this.config.forceKeyFrameOnDiscontinuity||!0===t.key||e.sps&&(n||this.contiguous)?(t.id=n,i.push(t)):e.dropped++}t.debug.length&&o.logger.log(t.pts+"/"+t.dts+":"+t.debug)},e._parseAVCPES=function(t,e){var i,n,r,s=this,a=this._avcTrack,o=this._parseAVCNALu(t.data),l=this.avcSample,h=!1,c=this.pushAccesUnit.bind(this),u=function(t,e,i,n){return{key:t,pts:e,dts:i,units:[],debug:n}};t.data=null,l&&o.length&&!a.audFound&&(c(l,a),l=this.avcSample=u(!1,t.pts,t.dts,"")),o.forEach(function(e){switch(e.type){case 1:n=!0,l||(l=s.avcSample=u(!0,t.pts,t.dts,"")),l.frame=!0;var o=e.data;if(h&&o.length>4){var d=new k(o).readSliceType();2!==d&&4!==d&&7!==d&&9!==d||(l.key=!0)}break;case 5:n=!0,l||(l=s.avcSample=u(!0,t.pts,t.dts,"")),l.key=!0,l.frame=!0;break;case 6:n=!0,(i=new k(s.discardEPB(e.data))).readUByte();for(var f=0,p=0,m=!1,g=0;!m&&i.bytesAvailable>1;){f=0;do{f+=g=i.readUByte()}while(255===g);p=0;do{p+=g=i.readUByte()}while(255===g);if(4===f&&0!==i.bytesAvailable){if(m=!0,181===i.readUByte()&&49===i.readUShort()&&1195456820===i.readUInt()&&3===i.readUByte()){var v=i.readUByte(),b=31&v,S=[v,i.readUByte()];for(r=0;r<b;r++)S.push(i.readUByte()),S.push(i.readUByte()),S.push(i.readUByte());s._insertSampleInOrder(s._txtTrack.samples,{type:3,pts:t.pts,bytes:S})}}else if(5===f&&0!==i.bytesAvailable){if(m=!0,p>16){var E=[];for(r=0;r<16;r++)E.push(i.readUByte().toString(16)),3!==r&&5!==r&&7!==r&&9!==r||E.push("-");var x=p-16,w=new Uint8Array(x);for(r=0;r<x;r++)w[r]=i.readUByte();s._insertSampleInOrder(s._txtTrack.samples,{pts:t.pts,payloadType:f,uuid:E.join(""),userDataBytes:w,userData:Object(y.utf8ArrayToStr)(w.buffer)})}}else if(p<i.bytesAvailable)for(r=0;r<p;r++)i.readUByte()}break;case 7:if(n=!0,h=!0,!a.sps){var _=(i=new k(e.data)).readSPS();a.width=_.width,a.height=_.height,a.pixelRatio=_.pixelRatio,a.sps=[e.data],a.duration=s._duration;var C=e.data.subarray(1,4),T="avc1.";for(r=0;r<3;r++){var A=C[r].toString(16);A.length<2&&(A="0"+A),T+=A}a.codec=T}break;case 8:n=!0,a.pps||(a.pps=[e.data]);break;case 9:n=!1,a.audFound=!0,l&&c(l,a),l=s.avcSample=u(!1,t.pts,t.dts,"");break;case 12:n=!1;break;default:n=!1,l&&(l.debug+="unknown NAL "+e.type+" ")}l&&n&&l.units.push(e)}),e&&l&&(c(l,a),this.avcSample=null)},e._insertSampleInOrder=function(t,e){var i=t.length;if(i>0){if(e.pts>=t[i-1].pts)t.push(e);else for(var n=i-1;n>=0;n--)if(e.pts<t[n].pts){t.splice(n,0,e);break}}else t.push(e)},e._getLastNalUnit=function(){var t,e=this.avcSample;if(!e||0===e.units.length){var i=this._avcTrack.samples;e=i[i.length-1]}if(e){var n=e.units;t=n[n.length-1]}return t},e._parseAVCNALu=function(t){var e,i,n,r,s=0,a=t.byteLength,o=this._avcTrack,l=o.naluState||0,h=l,c=[],u=-1;for(-1===l&&(u=0,r=31&t[0],l=0,s=1);s<a;)if(e=t[s++],l)if(1!==l)if(e)if(1===e){if(u>=0)n={data:t.subarray(u,s-l-1),type:r},c.push(n);else{var d=this._getLastNalUnit();if(d&&(h&&s<=4-h&&d.state&&(d.data=d.data.subarray(0,d.data.byteLength-h)),(i=s-l-1)>0)){var f=new Uint8Array(d.data.byteLength+i);f.set(d.data,0),f.set(t.subarray(0,i),d.data.byteLength),d.data=f}}s<a?(u=s,r=31&t[s],l=0):l=-1}else l=0;else l=3;else l=e?0:2;else l=e?0:1;if(u>=0&&l>=0&&(n={data:t.subarray(u,a),type:r,state:l},c.push(n)),0===c.length){var p=this._getLastNalUnit();if(p){var m=new Uint8Array(p.data.byteLength+t.byteLength);m.set(p.data,0),m.set(t,p.data.byteLength),p.data=m}}return o.naluState=l,c},e.discardEPB=function(t){for(var e,i,n=t.byteLength,r=[],s=1;s<n-2;)0===t[s]&&0===t[s+1]&&3===t[s+2]?(r.push(s+2),s+=2):s++;if(0===r.length)return t;e=n-r.length,i=new Uint8Array(e);var a=0;for(s=0;s<e;a++,s++)a===r[0]&&(a++,r.shift()),i[s]=t[a];return i},e._parseAACPES=function(t){var e,i,s,a,l,h,c,u=this._audioTrack,f=t.data,y=t.pts,v=this.aacOverFlow,b=this.aacLastPTS;if(v){var S=new Uint8Array(v.byteLength+f.byteLength);S.set(v,0),S.set(f,v.byteLength),f=S}for(s=0,l=f.length;s<l-1&&!d(f,s);s++);if(!s||(s<l-1?(h="AAC PES did not start with ADTS header,offset:"+s,c=!1):(h="no ADTS header found in AAC PES",c=!0),o.logger.warn("parsing error:"+h),this.observer.trigger(n.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:c,reason:h}),!c)){if(p(u,this.observer,f,s,this.audioCodec),i=0,e=m(u.samplerate),v&&b){var E=b+e;Math.abs(E-y)>1&&(o.logger.log("AAC: align PTS for overlapping frames by "+Math.round((E-y)/90)),y=E)}for(;s<l;){if(d(f,s)){if(s+5<l){var k=g(u,f,s,y,i);if(k){s+=k.length,a=k.sample.pts,i++;continue}}break}s++}v=s<l?f.subarray(s,l):null,this.aacOverFlow=v,this.aacLastPTS=a}},e._parseMPEGPES=function(t){for(var e=t.data,i=e.length,n=0,r=0,s=t.pts;r<i;)if(E.isHeader(e,r)){var a=E.appendFrame(this._audioTrack,e,r,s,n);if(!a)break;r+=a.length,n++}else r++},e._parseID3PES=function(t){this._id3Track.samples.push(t)},t}(),C=function(){function t(t,e,i){this.observer=t,this.config=i,this.remuxer=e}var e=t.prototype;return e.resetInitSegment=function(t,e,i,n){this._audioTrack={container:"audio/mpeg",type:"audio",id:-1,sequenceNumber:0,isAAC:!1,samples:[],len:0,manifestCodec:e,duration:n,inputTimeScale:9e4}},e.resetTimeStamp=function(){},t.probe=function(t){var e,i,n=y.default.getID3Data(t,0);if(n&&void 0!==y.default.getTimeStamp(n))for(e=n.length,i=Math.min(t.length-1,e+100);e<i;e++)if(E.probe(t,e))return o.logger.log("MPEG Audio sync word found !"),!0;return!1},e.append=function(t,e,i,n){for(var r=y.default.getID3Data(t,0)||[],s=y.default.getTimeStamp(r),a=void 0!==s?90*s:9e4*e,o=r.length,l=t.length,h=0,c=0,u=this._audioTrack,d=[{pts:a,dts:a,data:r}];o<l;)if(E.isHeader(t,o)){var f=E.appendFrame(u,t,o,a,h);if(!f)break;o+=f.length,c=f.sample.pts,h++}else y.default.isHeader(t,o)?(r=y.default.getID3Data(t,o),d.push({pts:c,dts:c,data:r}),o+=r.length):o++;this.remuxer.remux(u,{samples:[]},{samples:d,inputTimeScale:9e4},{samples:[]},e,i,n)},e.destroy=function(){},t}(),T=function(){function t(){}return t.getSilentFrame=function(t,e){if("mp4a.40.2"===t){if(1===e)return new Uint8Array([0,200,0,128,35,128]);if(2===e)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===e)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===e)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===e)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null},t}(),A=Math.pow(2,32)-1,P=function(){function t(){}return t.init=function(){var e;for(e in t.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]},t.types)t.types.hasOwnProperty(e)&&(t.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);var i=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),n=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);t.HDLR_TYPES={video:i,audio:n};var r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),s=new Uint8Array([0,0,0,0,0,0,0,0]);t.STTS=t.STSC=t.STCO=s,t.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),t.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),t.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),t.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var a=new Uint8Array([105,115,111,109]),o=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);t.FTYP=t.box(t.types.ftyp,a,l,a,o),t.DINF=t.box(t.types.dinf,t.box(t.types.dref,r))},t.box=function(t){for(var e,i=Array.prototype.slice.call(arguments,1),n=8,r=i.length,s=r;r--;)n+=i[r].byteLength;for((e=new Uint8Array(n))[0]=n>>24&255,e[1]=n>>16&255,e[2]=n>>8&255,e[3]=255&n,e.set(t,4),r=0,n=8;r<s;r++)e.set(i[r],n),n+=i[r].byteLength;return e},t.hdlr=function(e){return t.box(t.types.hdlr,t.HDLR_TYPES[e])},t.mdat=function(e){return t.box(t.types.mdat,e)},t.mdhd=function(e,i){i*=e;var n=Math.floor(i/(A+1)),r=Math.floor(i%(A+1));return t.box(t.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,n>>24,n>>16&255,n>>8&255,255&n,r>>24,r>>16&255,r>>8&255,255&r,85,196,0,0]))},t.mdia=function(e){return t.box(t.types.mdia,t.mdhd(e.timescale,e.duration),t.hdlr(e.type),t.minf(e))},t.mfhd=function(e){return t.box(t.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e]))},t.minf=function(e){return"audio"===e.type?t.box(t.types.minf,t.box(t.types.smhd,t.SMHD),t.DINF,t.stbl(e)):t.box(t.types.minf,t.box(t.types.vmhd,t.VMHD),t.DINF,t.stbl(e))},t.moof=function(e,i,n){return t.box(t.types.moof,t.mfhd(e),t.traf(n,i))},t.moov=function(e){for(var i=e.length,n=[];i--;)n[i]=t.trak(e[i]);return t.box.apply(null,[t.types.moov,t.mvhd(e[0].timescale,e[0].duration)].concat(n).concat(t.mvex(e)))},t.mvex=function(e){for(var i=e.length,n=[];i--;)n[i]=t.trex(e[i]);return t.box.apply(null,[t.types.mvex].concat(n))},t.mvhd=function(e,i){i*=e;var n=Math.floor(i/(A+1)),r=Math.floor(i%(A+1)),s=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,n>>24,n>>16&255,n>>8&255,255&n,r>>24,r>>16&255,r>>8&255,255&r,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return t.box(t.types.mvhd,s)},t.sdtp=function(e){var i,n,r=e.samples||[],s=new Uint8Array(4+r.length);for(n=0;n<r.length;n++)i=r[n].flags,s[n+4]=i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy;return t.box(t.types.sdtp,s)},t.stbl=function(e){return t.box(t.types.stbl,t.stsd(e),t.box(t.types.stts,t.STTS),t.box(t.types.stsc,t.STSC),t.box(t.types.stsz,t.STSZ),t.box(t.types.stco,t.STCO))},t.avc1=function(e){var i,n,r,s=[],a=[];for(i=0;i<e.sps.length;i++)r=(n=e.sps[i]).byteLength,s.push(r>>>8&255),s.push(255&r),s=s.concat(Array.prototype.slice.call(n));for(i=0;i<e.pps.length;i++)r=(n=e.pps[i]).byteLength,a.push(r>>>8&255),a.push(255&r),a=a.concat(Array.prototype.slice.call(n));var o=t.box(t.types.avcC,new Uint8Array([1,s[3],s[4],s[5],255,224|e.sps.length].concat(s).concat([e.pps.length]).concat(a))),l=e.width,h=e.height,c=e.pixelRatio[0],u=e.pixelRatio[1];return t.box(t.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,255&l,h>>8&255,255&h,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o,t.box(t.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),t.box(t.types.pasp,new Uint8Array([c>>24,c>>16&255,c>>8&255,255&c,u>>24,u>>16&255,u>>8&255,255&u])))},t.esds=function(t){var e=t.config.length;return new Uint8Array([0,0,0,0,3,23+e,0,1,0,4,15+e,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([e]).concat(t.config).concat([6,1,2]))},t.mp4a=function(e){var i=e.samplerate;return t.box(t.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,i>>8&255,255&i,0,0]),t.box(t.types.esds,t.esds(e)))},t.mp3=function(e){var i=e.samplerate;return t.box(t.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,i>>8&255,255&i,0,0]))},t.stsd=function(e){return"audio"===e.type?e.isAAC||"mp3"!==e.codec?t.box(t.types.stsd,t.STSD,t.mp4a(e)):t.box(t.types.stsd,t.STSD,t.mp3(e)):t.box(t.types.stsd,t.STSD,t.avc1(e))},t.tkhd=function(e){var i=e.id,n=e.duration*e.timescale,r=e.width,s=e.height,a=Math.floor(n/(A+1)),o=Math.floor(n%(A+1));return t.box(t.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,i>>24&255,i>>16&255,i>>8&255,255&i,0,0,0,0,a>>24,a>>16&255,a>>8&255,255&a,o>>24,o>>16&255,o>>8&255,255&o,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,r>>8&255,255&r,0,0,s>>8&255,255&s,0,0]))},t.traf=function(e,i){var n=t.sdtp(e),r=e.id,s=Math.floor(i/(A+1)),a=Math.floor(i%(A+1));return t.box(t.types.traf,t.box(t.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,255&r])),t.box(t.types.tfdt,new Uint8Array([1,0,0,0,s>>24,s>>16&255,s>>8&255,255&s,a>>24,a>>16&255,a>>8&255,255&a])),t.trun(e,n.length+16+20+8+16+8+8),n)},t.trak=function(e){return e.duration=e.duration||4294967295,t.box(t.types.trak,t.tkhd(e),t.mdia(e))},t.trex=function(e){var i=e.id;return t.box(t.types.trex,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},t.trun=function(e,i){var n,r,s,a,o,l,h=e.samples||[],c=h.length,u=12+16*c,d=new Uint8Array(u);for(i+=8+u,d.set([0,0,15,1,c>>>24&255,c>>>16&255,c>>>8&255,255&c,i>>>24&255,i>>>16&255,i>>>8&255,255&i],0),n=0;n<c;n++)s=(r=h[n]).duration,a=r.size,o=r.flags,l=r.cts,d.set([s>>>24&255,s>>>16&255,s>>>8&255,255&s,a>>>24&255,a>>>16&255,a>>>8&255,255&a,o.isLeading<<2|o.dependsOn,o.isDependedOn<<6|o.hasRedundancy<<4|o.paddingValue<<1|o.isNonSync,61440&o.degradPrio,15&o.degradPrio,l>>>24&255,l>>>16&255,l>>>8&255,255&l],12+16*n);return t.box(t.types.trun,d)},t.initSegment=function(e){t.types||t.init();var i,n=t.moov(e);return(i=new Uint8Array(t.FTYP.byteLength+n.byteLength)).set(t.FTYP),i.set(n,t.FTYP.byteLength),i},t}(),D=P;function M(t,e,i,n){void 0===i&&(i=1),void 0===n&&(n=!1);var r=t*e*i;return n?Math.round(r):r}function L(t,e){return void 0===e&&(e=!1),M(t,1e3,1/9e4,e)}function R(t,e){return void 0===e&&(e=1),M(t,9e4,1/e)}var I=R(10),F=R(.2),O=null;function B(t,e){var i;if(void 0===e)return t;for(i=e<t?-8589934592:8589934592;Math.abs(t-e)>4294967296;)t+=i;return t}var N,V=function(){function t(t,e,i,n){if(this.observer=t,this.config=e,this.typeSupported=i,this.ISGenerated=!1,null===O){var r=navigator.userAgent.match(/Chrome\/(\d+)/i);O=r?parseInt(r[1]):0}}var e=t.prototype;return e.destroy=function(){},e.resetTimeStamp=function(t){this._initPTS=this._initDTS=t},e.resetInitSegment=function(){this.ISGenerated=!1},e.getVideoStartPts=function(t){var e=!1,i=t.reduce(function(t,i){var n=i.pts-t;return n<-4294967296?(e=!0,B(t,i.pts)):n>0?t:i.pts},t[0].pts);return e&&o.logger.debug("PTS rollover detected"),i},e.remux=function(t,e,i,r,s,a,l){if(this.ISGenerated||this.generateIS(t,e,s),this.ISGenerated){var h=t.samples.length,c=e.samples.length,u=s,d=s;if(h&&c){var f=this.getVideoStartPts(e.samples),p=(B(t.samples[0].pts,f)-f)/e.inputTimeScale;u+=Math.max(0,p),d+=Math.max(0,-p)}if(h){t.timescale||(o.logger.warn("regenerate InitSegment as audio detected"),this.generateIS(t,e,s));var m,g=this.remuxAudio(t,u,a,l);c&&(g&&(m=g.endPTS-g.startPTS),e.timescale||(o.logger.warn("regenerate InitSegment as video detected"),this.generateIS(t,e,s)),this.remuxVideo(e,d,a,m))}else if(c){var y=this.remuxVideo(e,d,a,0,l);y&&t.codec&&this.remuxEmptyAudio(t,u,a,y)}}i.samples.length&&this.remuxID3(i,s),r.samples.length&&this.remuxText(r,s),this.observer.trigger(n.default.FRAG_PARSED)},e.generateIS=function(t,e,i){var s,a,l=this.observer,h=t.samples,c=e.samples,u=this.typeSupported,d="audio/mp4",f={},p={tracks:f},m=void 0===this._initPTS;if(m&&(s=a=1/0),t.config&&h.length&&(t.timescale=t.samplerate,o.logger.log("audio sampling rate : "+t.samplerate),t.isAAC||(u.mpeg?(d="audio/mpeg",t.codec=""):u.mp3&&(t.codec="mp3")),f.audio={container:d,codec:t.codec,initSegment:!t.isAAC&&u.mpeg?new Uint8Array:D.initSegment([t]),metadata:{channelCount:t.channelCount}},m&&(s=a=h[0].pts-Math.round(t.inputTimeScale*i))),e.sps&&e.pps&&c.length){var g=e.inputTimeScale;if(e.timescale=g,f.video={container:"video/mp4",codec:e.codec,initSegment:D.initSegment([e]),metadata:{width:e.width,height:e.height}},m){var y=this.getVideoStartPts(c),v=Math.round(g*i);a=Math.min(a,B(c[0].dts,y)-v),s=Math.min(s,y-v),this.observer.trigger(n.default.INIT_PTS_FOUND,{initPTS:s})}}else m&&f.audio&&this.observer.trigger(n.default.INIT_PTS_FOUND,{initPTS:s});Object.keys(f).length?(l.trigger(n.default.FRAG_PARSING_INIT_SEGMENT,p),this.ISGenerated=!0,m&&(this._initPTS=s,this._initDTS=a)):l.trigger(n.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})},e.remuxVideo=function(t,e,i,s){var a,l,h,c,u,d=t.timescale,f=t.samples,p=[],m=f.length,g=this._initPTS,y=8,v=Number.POSITIVE_INFINITY,b=Number.NEGATIVE_INFINITY,S=0,E=!1,k=this.nextAvcDts;if(0!==m){i||(k=e*d-(f[0].pts-B(f[0].dts,f[0].pts)));for(var x=0;x<m;x++){var w=f[x];w.pts=B(w.pts-g,k),w.dts=B(w.dts-g,k),w.dts>w.pts&&(S=Math.max(Math.min(S,w.pts-w.dts),-1*F)),w.dts<f[x>0?x-1:x].dts&&(E=!0)}E&&f.sort(function(t,e){var i=t.dts-e.dts,n=t.pts-e.pts;return i||n||t.id-e.id}),c=f[0].dts,u=f[m-1].dts;var _=Math.round((u-c)/(m-1));if(S<0){if(S<-2*_){o.logger.warn("PTS < DTS detected in video samples, offsetting DTS from PTS by "+L(-_,!0)+" ms");for(var C=S,T=0;T<m;T++)f[T].dts=C=Math.max(C,f[T].pts-_),f[T].pts=Math.max(C,f[T].pts)}else{o.logger.warn("PTS < DTS detected in video samples, shifting DTS by "+L(S,!0)+" ms to overcome this issue");for(var A=0;A<m;A++)f[A].dts=f[A].dts+S}c=f[0].dts,u=f[m-1].dts}if(i){var P=c-k,M=P>_;if(M||P<-1){M?o.logger.warn("AVC: "+L(P,!0)+" ms ("+P+"dts) hole between fragments detected, filling it"):o.logger.warn("AVC: "+L(-P,!0)+" ms ("+P+"dts) overlapping between fragments detected"),c=k;var R=f[0].pts-P;f[0].dts=c,f[0].pts=R,o.logger.log("Video: First PTS/DTS adjusted: "+L(R,!0)+"/"+L(c,!0)+", delta: "+L(P,!0)+" ms")}}O&&O<75&&(c=Math.max(0,c));for(var I=0,N=0,V=0;V<m;V++){for(var z=f[V],H=z.units,q=H.length,U=0,G=0;G<q;G++)U+=H[G].data.length;N+=U,I+=q,z.length=U,z.dts=Math.max(z.dts,c),z.pts=Math.max(z.pts,z.dts,0),v=Math.min(z.pts,v),b=Math.max(z.pts,b)}u=f[m-1].dts;var j=N+4*I+8;try{l=new Uint8Array(j)}catch(t){return void this.observer.trigger(n.default.ERROR,{type:r.ErrorTypes.MUX_ERROR,details:r.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:j,reason:"fail allocating video mdat "+j})}var W=new DataView(l.buffer);W.setUint32(0,j),l.set(D.types.mdat,4);for(var $=0;$<m;$++){for(var Y,K=f[$],X=K.units,J=0,Q=0,Z=X.length;Q<Z;Q++){var tt=X[Q],et=tt.data,it=tt.data.byteLength;W.setUint32(y,it),y+=4,l.set(et,y),y+=it,J+=4+it}if($<m-1)a=f[$+1].dts-K.dts;else{var nt=this.config,rt=K.dts-f[$>0?$-1:$].dts;if(nt.stretchShortVideoTrack){var st=nt.maxBufferHole,at=Math.floor(st*d),ot=(s?v+s*d:this.nextAudioPts)-K.pts;ot>at?((a=ot-rt)<0&&(a=rt),o.logger.log("It is approximately "+L(ot,!1)+" ms to the next segment; using duration "+L(a,!1)+" ms for the last video frame.")):a=rt}else a=rt}Y=Math.round(K.pts-K.dts),p.push({size:J,duration:a,cts:Y,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:K.key?2:1,isNonSync:K.key?0:1}})}this.nextAvcDts=u+a;var lt=t.dropped;if(t.nbNalu=0,t.dropped=0,p.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var ht=p[0].flags;ht.dependsOn=2,ht.isNonSync=0}t.samples=p,h=D.moof(t.sequenceNumber++,c,t),t.samples=[];var ct={data1:h,data2:l,startPTS:v/d,endPTS:(b+a)/d,startDTS:c/d,endDTS:this.nextAvcDts/d,type:"video",hasAudio:!1,hasVideo:!0,nb:p.length,dropped:lt};return this.observer.trigger(n.default.FRAG_PARSING_DATA,ct),ct}},e.remuxAudio=function(t,e,i,s){var a,l,h,c,u,d,f=t.inputTimeScale,p=t.timescale,m=f/p,g=(t.isAAC?1024:1152)*m,y=this._initPTS,v=!t.isAAC&&this.typeSupported.mpeg,b=v?0:8,S=t.samples,E=[],k=this.nextAudioPts;if(i|=S.length&&k&&(s&&Math.abs(e-k/f)<.1||Math.abs(S[0].pts-k-y)<20*g),S.forEach(function(t){t.pts=t.dts=B(t.pts-y,e*f)}),S=S.filter(function(t){return t.pts>=0}),0!==S.length){if(i||(k=s?Math.max(0,e*f):S[0].pts),t.isAAC)for(var x=this.config.maxAudioFramesDrift,w=0,_=k;w<S.length;){var C=S[w],A=C.pts,P=A-_;if(P<=-x*g)i||w>0?(o.logger.warn("Dropping 1 audio frame @ "+L(_,!0)/1e3+"s due to "+L(P,!0)+" ms overlap."),S.splice(w,1)):(o.logger.warn("Audio frame @ "+L(A,!0)/1e3+"s overlaps nextAudioPts by "+L(P,!0)+" ms."),_=A+g,w++);else if(P>=x*g&&P<I&&_){var M=Math.round(P/g);o.logger.warn("Injecting "+M+" audio frames @ "+L(_,!0)/1e3+"s due to "+L(P,!0)+" ms gap.");for(var R=0;R<M;R++){var F=Math.max(_,0);(l=T.getSilentFrame(t.manifestCodec||t.codec,t.channelCount))||(o.logger.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),l=C.unit.subarray()),S.splice(w,0,{unit:l,pts:F,dts:F}),_+=g,w++}C.pts=C.dts=_,_+=g,w++}else Math.abs(P),C.pts=C.dts=_,_+=g,w++}for(var O=S.length,N=0;O--;)N+=S[O].unit.byteLength;for(var V=0,z=S.length;V<z;V++){var H=S[V],q=H.unit,U=H.pts;if(void 0!==d&&a)a.duration=Math.round((U-d)/m);else{var G=U-k,j=0;if(i&&t.isAAC&&G){if(G>0&&G<I)j=Math.round((U-k)/g),o.logger.log(L(G,!0)+" ms hole between AAC samples detected,filling it"),j>0&&((l=T.getSilentFrame(t.manifestCodec||t.codec,t.channelCount))||(l=q.subarray()),N+=j*l.length);else if(G<-12){o.logger.log("drop overlapping AAC sample, expected/parsed/delta: "+L(k,!0)+" ms / "+L(U,!0)+" ms / "+L(-G,!0)+" ms"),N-=q.byteLength;continue}U=k}if(u=U,!(N>0))return;N+=b;try{h=new Uint8Array(N)}catch(t){return void this.observer.trigger(n.default.ERROR,{type:r.ErrorTypes.MUX_ERROR,details:r.ErrorDetails.REMUX_ALLOC_ERROR,fatal:!1,bytes:N,reason:"fail allocating audio mdat "+N})}v||(new DataView(h.buffer).setUint32(0,N),h.set(D.types.mdat,4));for(var W=0;W<j;W++)(l=T.getSilentFrame(t.manifestCodec||t.codec,t.channelCount))||(o.logger.log("Unable to get silent frame for given audio codec; duplicating this frame instead."),l=q.subarray()),h.set(l,b),b+=l.byteLength,a={size:l.byteLength,cts:0,duration:1024,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},E.push(a)}h.set(q,b);var $=q.byteLength;b+=$,a={size:$,cts:0,duration:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},E.push(a),d=U}var Y=0;if((O=E.length)>=2&&(Y=E[O-2].duration,a.duration=Y),O){this.nextAudioPts=k=d+m*Y,t.samples=E,c=v?new Uint8Array:D.moof(t.sequenceNumber++,u/m,t),t.samples=[];var K=u/f,X=k/f,J={data1:c,data2:h,startPTS:K,endPTS:X,startDTS:K,endDTS:X,type:"audio",hasAudio:!0,hasVideo:!1,nb:O};return this.observer.trigger(n.default.FRAG_PARSING_DATA,J),J}return null}},e.remuxEmptyAudio=function(t,e,i,n){var r=t.inputTimeScale,s=r/(t.samplerate?t.samplerate:r),a=this.nextAudioPts,l=(void 0!==a?a:n.startDTS*r)+this._initDTS,h=n.endDTS*r+this._initDTS,c=1024*s,u=Math.ceil((h-l)/c),d=T.getSilentFrame(t.manifestCodec||t.codec,t.channelCount);if(o.logger.warn("remux empty Audio"),d){for(var f=[],p=0;p<u;p++){var m=l+p*c;f.push({unit:d,pts:m,dts:m})}t.samples=f,this.remuxAudio(t,e,i)}else o.logger.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!")},e.remuxID3=function(t,e){var i=t.samples.length;if(i){for(var r=t.inputTimeScale,s=this._initPTS,a=this._initDTS,o=0;o<i;o++){var l=t.samples[o];l.pts=B(l.pts-s,e*r)/r,l.dts=B(l.dts-a,e*r)/r}this.observer.trigger(n.default.FRAG_PARSING_METADATA,{samples:t.samples}),t.samples=[]}},e.remuxText=function(t,e){var i=t.samples.length,r=t.inputTimeScale,s=this._initPTS;if(i){for(var a=0;a<i;a++){var o=t.samples[a];o.pts=B(o.pts-s,e*r)/r}t.samples.sort(function(t,e){return t.pts-e.pts}),this.observer.trigger(n.default.FRAG_PARSING_USERDATA,{samples:t.samples})}t.samples=[]},t}(),z=function(){function t(t){this.observer=t}var e=t.prototype;return e.destroy=function(){},e.resetTimeStamp=function(){},e.resetInitSegment=function(){},e.remux=function(t,e,i,r,s,a,o,l){var h=this.observer,c="";t&&(c+="audio"),e&&(c+="video"),h.trigger(n.default.FRAG_PARSING_DATA,{data1:l,startPTS:s,startDTS:s,type:c,hasAudio:!!t,hasVideo:!!e,nb:1,dropped:0}),h.trigger(n.default.FRAG_PARSED)},t}(),H=Object(l.getSelfScope)();try{N=H.performance.now.bind(H.performance)}catch(t){o.logger.debug("Unable to use Performance API on this environment"),N=H.Date.now}var q=function(){function t(t,e,i,n){this.observer=t,this.typeSupported=e,this.config=i,this.vendor=n}var e=t.prototype;return e.destroy=function(){var t=this.demuxer;t&&t.destroy()},e.push=function(t,e,i,r,a,o,l,h,c,u,d,f){var p=this;if(t.byteLength>0&&null!=e&&null!=e.key&&"AES-128"===e.method){var m=this.decrypter;null==m&&(m=this.decrypter=new s.default(this.observer,this.config));var g=N();m.decrypt(t,e.key.buffer,e.iv.buffer,function(t){var s=N();p.observer.trigger(n.default.FRAG_DECRYPTED,{stats:{tstart:g,tdecrypt:s}}),p.pushDecrypted(new Uint8Array(t),e,new Uint8Array(i),r,a,o,l,h,c,u,d,f)})}else this.pushDecrypted(new Uint8Array(t),e,new Uint8Array(i),r,a,o,l,h,c,u,d,f)},e.pushDecrypted=function(t,e,i,s,a,o,l,h,c,u,d,f){var p=this.demuxer,m=this.remuxer;if(!p||l||h){for(var g,y=this.observer,S=this.typeSupported,E=this.config,k=[{demux:_,remux:V},{demux:b.default,remux:z},{demux:v,remux:V},{demux:C,remux:V}],x=0,w=k.length;x<w&&!(g=k[x]).demux.probe(t);x++);if(!g)return void y.trigger(n.default.ERROR,{type:r.ErrorTypes.MEDIA_ERROR,details:r.ErrorDetails.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"});m&&m instanceof g.remux||(m=new g.remux(y,E,S,this.vendor)),p&&p instanceof g.demux||(p=new g.demux(y,m,E,S),this.probe=g.demux.probe),this.demuxer=p,this.remuxer=m}(l||h)&&(p.resetInitSegment(i,s,a,u),m.resetInitSegment()),l&&(p.resetTimeStamp(f),m.resetTimeStamp(f)),"function"==typeof p.setDecryptData&&p.setDecryptData(e),p.append(t,o,c,d)},t}();e.default=q},"./src/demux/demuxer-worker.js":function(t,e,i){"use strict";i.r(e);var n=i("./src/demux/demuxer-inline.js"),r=i("./src/events.js"),s=i("./src/utils/logger.js"),a=i("./node_modules/eventemitter3/index.js");e.default=function(t){var e=new a.EventEmitter;e.trigger=function(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),r=1;r<i;r++)n[r-1]=arguments[r];e.emit.apply(e,[t,t].concat(n))},e.off=function(t){for(var i=arguments.length,n=new Array(i>1?i-1:0),r=1;r<i;r++)n[r-1]=arguments[r];e.removeListener.apply(e,[t].concat(n))};var i=function(e,i){t.postMessage({event:e,data:i})};t.addEventListener("message",function(r){var a=r.data;switch(a.cmd){case"init":var o=JSON.parse(a.config);t.demuxer=new n.default(e,a.typeSupported,o,a.vendor),Object(s.enableLogs)(o.debug),i("init",null);break;case"demux":t.demuxer.push(a.data,a.decryptdata,a.initSegment,a.audioCodec,a.videoCodec,a.timeOffset,a.discontinuity,a.trackSwitch,a.contiguous,a.duration,a.accurateTimeOffset,a.defaultInitPTS)}}),e.on(r.default.FRAG_DECRYPTED,i),e.on(r.default.FRAG_PARSING_INIT_SEGMENT,i),e.on(r.default.FRAG_PARSED,i),e.on(r.default.ERROR,i),e.on(r.default.FRAG_PARSING_METADATA,i),e.on(r.default.FRAG_PARSING_USERDATA,i),e.on(r.default.INIT_PTS_FOUND,i),e.on(r.default.FRAG_PARSING_DATA,function(e,i){var n=[],r={event:e,data:i};i.data1&&(r.data1=i.data1.buffer,n.push(i.data1.buffer),delete i.data1),i.data2&&(r.data2=i.data2.buffer,n.push(i.data2.buffer),delete i.data2),t.postMessage(r,n)})}},"./src/demux/id3.js":function(t,e,i){"use strict";i.r(e),i.d(e,"utf8ArrayToStr",function(){return o});var n,r=i("./src/utils/get-self-scope.js"),s=function(){function t(){}return t.isHeader=function(t,e){return e+10<=t.length&&73===t[e]&&68===t[e+1]&&51===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},t.isFooter=function(t,e){return e+10<=t.length&&51===t[e]&&68===t[e+1]&&73===t[e+2]&&t[e+3]<255&&t[e+4]<255&&t[e+6]<128&&t[e+7]<128&&t[e+8]<128&&t[e+9]<128},t.getID3Data=function(e,i){for(var n=i,r=0;t.isHeader(e,i);)r+=10,r+=t._readSize(e,i+6),t.isFooter(e,i+10)&&(r+=10),i+=r;if(r>0)return e.subarray(n,n+r)},t._readSize=function(t,e){var i=0;return i=(127&t[e])<<21,i|=(127&t[e+1])<<14,(i|=(127&t[e+2])<<7)|127&t[e+3]},t.getTimeStamp=function(e){for(var i=t.getID3Frames(e),n=0;n<i.length;n++){var r=i[n];if(t.isTimeStampFrame(r))return t._readTimeStamp(r)}},t.isTimeStampFrame=function(t){return t&&"PRIV"===t.key&&"com.apple.streaming.transportStreamTimestamp"===t.info},t._getFrameData=function(e){var i=String.fromCharCode(e[0],e[1],e[2],e[3]),n=t._readSize(e,4);return{type:i,size:n,data:e.subarray(10,10+n)}},t.getID3Frames=function(e){for(var i=0,n=[];t.isHeader(e,i);){for(var r=t._readSize(e,i+6),s=(i+=10)+r;i+8<s;){var a=t._getFrameData(e.subarray(i)),o=t._decodeFrame(a);o&&n.push(o),i+=a.size+10}t.isFooter(e,i)&&(i+=10)}return n},t._decodeFrame=function(e){return"PRIV"===e.type?t._decodePrivFrame(e):"W"===e.type[0]?t._decodeURLFrame(e):t._decodeTextFrame(e)},t._readTimeStamp=function(t){if(8===t.data.byteLength){var e=new Uint8Array(t.data),i=1&e[3],n=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return n/=45,i&&(n+=47721858.84),Math.round(n)}},t._decodePrivFrame=function(e){if(!(e.size<2)){var i=t._utf8ArrayToStr(e.data,!0),n=new Uint8Array(e.data.subarray(i.length+1));return{key:e.type,info:i,data:n.buffer}}},t._decodeTextFrame=function(e){if(!(e.size<2)){if("TXXX"===e.type){var i=1,n=t._utf8ArrayToStr(e.data.subarray(i),!0);i+=n.length+1;var r=t._utf8ArrayToStr(e.data.subarray(i));return{key:e.type,info:n,data:r}}var s=t._utf8ArrayToStr(e.data.subarray(1));return{key:e.type,data:s}}},t._decodeURLFrame=function(e){if("WXXX"===e.type){if(e.size<2)return;var i=1,n=t._utf8ArrayToStr(e.data.subarray(i),!0);i+=n.length+1;var r=t._utf8ArrayToStr(e.data.subarray(i));return{key:e.type,info:n,data:r}}var s=t._utf8ArrayToStr(e.data);return{key:e.type,data:s}},t._utf8ArrayToStr=function(t,e){void 0===e&&(e=!1);var i=a();if(i){var n=i.decode(t);if(e){var r=n.indexOf("\0");return-1!==r?n.substring(0,r):n}return n.replace(/\0/g,"")}for(var s,o,l,h=t.length,c="",u=0;u<h;){if(0===(s=t[u++])&&e)return c;if(0!==s&&3!==s)switch(s>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:c+=String.fromCharCode(s);break;case 12:case 13:o=t[u++],c+=String.fromCharCode((31&s)<<6|63&o);break;case 14:o=t[u++],l=t[u++],c+=String.fromCharCode((15&s)<<12|(63&o)<<6|63&l)}}return c},t}();function a(){var t=Object(r.getSelfScope)();return n||void 0===t.TextDecoder||(n=new t.TextDecoder("utf-8")),n}var o=s._utf8ArrayToStr;e.default=s},"./src/demux/mp4demuxer.js":function(t,e,i){"use strict";i.r(e);var n=i("./src/utils/logger.js"),r=i("./src/events.js"),s=Math.pow(2,32)-1,a=function(){function t(t,e){this.observer=t,this.remuxer=e}var e=t.prototype;return e.resetTimeStamp=function(t){this.initPTS=t},e.resetInitSegment=function(e,i,n,s){if(e&&e.byteLength){var a=this.initData=t.parseInitSegment(e);null==i&&(i="mp4a.40.5"),null==n&&(n="avc1.42e01e");var o={};a.audio&&a.video?o.audiovideo={container:"video/mp4",codec:i+","+n,initSegment:s?e:null}:(a.audio&&(o.audio={container:"audio/mp4",codec:i,initSegment:s?e:null}),a.video&&(o.video={container:"video/mp4",codec:n,initSegment:s?e:null})),this.observer.trigger(r.default.FRAG_PARSING_INIT_SEGMENT,{tracks:o})}else i&&(this.audioCodec=i),n&&(this.videoCodec=n)},t.probe=function(e){return t.findBox({data:e,start:0,end:Math.min(e.length,16384)},["moof"]).length>0},t.bin2str=function(t){return String.fromCharCode.apply(null,t)},t.readUint16=function(t,e){t.data&&(e+=t.start,t=t.data);var i=t[e]<<8|t[e+1];return i<0?65536+i:i},t.readUint32=function(t,e){t.data&&(e+=t.start,t=t.data);var i=t[e]<<24|t[e+1]<<16|t[e+2]<<8|t[e+3];return i<0?4294967296+i:i},t.writeUint32=function(t,e,i){t.data&&(e+=t.start,t=t.data),t[e]=i>>24,t[e+1]=i>>16&255,t[e+2]=i>>8&255,t[e+3]=255&i},t.findBox=function(e,i){var n,r,s,a,o,l,h=[];if(e.data?(o=e.start,s=e.end,e=e.data):(o=0,s=e.byteLength),!i.length)return null;for(n=o;n<s;)l=(r=t.readUint32(e,n))>1?n+r:s,t.bin2str(e.subarray(n+4,n+8))===i[0]&&(1===i.length?h.push({data:e,start:n+8,end:l}):(a=t.findBox({data:e,start:n+8,end:l},i.slice(1))).length&&(h=h.concat(a))),n=l;return h},t.parseSegmentIndex=function(e){var i,n=t.findBox(e,["moov"])[0],r=n?n.end:null,s=0,a=t.findBox(e,["sidx"]);if(!a||!a[0])return null;i=[];var o=(a=a[0]).data[0];s=0===o?8:16;var l=t.readUint32(a,s);s+=4,s+=0===o?8:16,s+=2;var h=a.end+0,c=t.readUint16(a,s);s+=2;for(var u=0;u<c;u++){var d=s,f=t.readUint32(a,d);d+=4;var p=2147483647&f;if(1==(2147483648&f)>>>31)return void console.warn("SIDX has hierarchical references (not supported)");var m=t.readUint32(a,d);d+=4,i.push({referenceSize:p,subsegmentDuration:m,info:{duration:m/l,start:h,end:h+p-1}}),h+=p,s=d+=4}return{earliestPresentationTime:0,timescale:l,version:o,referencesCount:c,references:i,moovEndOffset:r}},t.parseInitSegment=function(e){var i=[];return t.findBox(e,["moov","trak"]).forEach(function(e){var r=t.findBox(e,["tkhd"])[0];if(r){var s=r.data[r.start],a=0===s?12:20,o=t.readUint32(r,a),l=t.findBox(e,["mdia","mdhd"])[0];if(l){a=0===(s=l.data[l.start])?12:20;var h=t.readUint32(l,a),c=t.findBox(e,["mdia","hdlr"])[0];if(c){var u={soun:"audio",vide:"video"}[t.bin2str(c.data.subarray(c.start+8,c.start+12))];if(u){var d=t.findBox(e,["mdia","minf","stbl","stsd"]);if(d.length){d=d[0];var f=t.bin2str(d.data.subarray(d.start+12,d.start+16));n.logger.log("MP4Demuxer:"+u+":"+f+" found")}i[o]={timescale:h,type:u},i[u]={timescale:h,id:o}}}}}}),i},t.getStartDTS=function(e,i){var n,r,s;return n=t.findBox(i,["moof","traf"]),r=[].concat.apply([],n.map(function(i){return t.findBox(i,["tfhd"]).map(function(n){var r,s,a;return r=t.readUint32(n,4),s=e[r].timescale||9e4,a=t.findBox(i,["tfdt"]).map(function(e){var i,n;return i=e.data[e.start],n=t.readUint32(e,4),1===i&&(n*=Math.pow(2,32),n+=t.readUint32(e,8)),n})[0],a/s})})),s=Math.min.apply(null,r),isFinite(s)?s:0},t.offsetStartDTS=function(e,i,n){t.findBox(i,["moof","traf"]).map(function(i){return t.findBox(i,["tfhd"]).map(function(r){var a=t.readUint32(r,4),o=e[a].timescale||9e4;t.findBox(i,["tfdt"]).map(function(e){var i=e.data[e.start],r=t.readUint32(e,4);if(0===i)t.writeUint32(e,4,r-n*o);else{r*=Math.pow(2,32),r+=t.readUint32(e,8),r-=n*o,r=Math.max(r,0);var a=Math.floor(r/(s+1)),l=Math.floor(r%(s+1));t.writeUint32(e,4,a),t.writeUint32(e,8,l)}})})})},e.append=function(e,i,n,s){var a=this.initData;a||(this.resetInitSegment(e,this.audioCodec,this.videoCodec,!1),a=this.initData);var o,l=this.initPTS;if(void 0===l){var h=t.getStartDTS(a,e);this.initPTS=l=h-i,this.observer.trigger(r.default.INIT_PTS_FOUND,{initPTS:l})}t.offsetStartDTS(a,e,l),o=t.getStartDTS(a,e),this.remuxer.remux(a.audio,a.video,null,null,o,n,s,e)},e.destroy=function(){},t}();e.default=a},
2"./src/errors.ts":function(t,e,i){"use strict";var n,r;i.r(e),i.d(e,"ErrorTypes",function(){return n}),i.d(e,"ErrorDetails",function(){return r}),function(t){t.NETWORK_ERROR="networkError",t.MEDIA_ERROR="mediaError",t.KEY_SYSTEM_ERROR="keySystemError",t.MUX_ERROR="muxError",t.OTHER_ERROR="otherError"}(n||(n={})),function(t){t.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",t.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",t.KEY_SYSTEM_NO_SESSION="keySystemNoSession",t.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",t.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",t.MANIFEST_LOAD_ERROR="manifestLoadError",t.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",t.MANIFEST_PARSING_ERROR="manifestParsingError",t.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",t.LEVEL_EMPTY_ERROR="levelEmptyError",t.LEVEL_LOAD_ERROR="levelLoadError",t.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",t.LEVEL_SWITCH_ERROR="levelSwitchError",t.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",t.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",t.FRAG_LOAD_ERROR="fragLoadError",t.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",t.FRAG_DECRYPT_ERROR="fragDecryptError",t.FRAG_PARSING_ERROR="fragParsingError",t.REMUX_ALLOC_ERROR="remuxAllocError",t.KEY_LOAD_ERROR="keyLoadError",t.KEY_LOAD_TIMEOUT="keyLoadTimeOut",t.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",t.BUFFER_APPEND_ERROR="bufferAppendError",t.BUFFER_APPENDING_ERROR="bufferAppendingError",t.BUFFER_STALLED_ERROR="bufferStalledError",t.BUFFER_FULL_ERROR="bufferFullError",t.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",t.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",t.INTERNAL_EXCEPTION="internalException"}(r||(r={}))},
2"./src/events.js":function(t,e,i){"use strict";i.r(e),e.default={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",BUFFER_RESET:"hlsBufferReset",BUFFER_CODECS:"hlsBufferCodecs",BUFFER_CREATED:"hlsBufferCreated",BUFFER_APPENDING:"hlsBufferAppending",BUFFER_APPENDED:"hlsBufferAppended",BUFFER_EOS:"hlsBufferEos",BUFFER_FLUSHING:"hlsBufferFlushing",BUFFER_FLUSHED:"hlsBufferFlushed",MANIFEST_LOADING:"hlsManifestLoading",MANIFEST_LOADED:"hlsManifestLoaded",MANIFEST_PARSED:"hlsManifestParsed",LEVEL_SWITCHING:"hlsLevelSwitching",LEVEL_SWITCHED:"hlsLevelSwitched",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsLevelPtsUpdated",LEVELS_UPDATED:"hlsLevelsUpdated",AUDIO_TRACKS_UPDATED:"hlsAudioTracksUpdated",AUDIO_TRACK_SWITCHING:"hlsAudioTrackSwitching",AUDIO_TRACK_SWITCHED:"hlsAudioTrackSwitched",AUDIO_TRACK_LOADING:"hlsAudioTrackLoading",AUDIO_TRACK_LOADED:"hlsAudioTrackLoaded",SUBTITLE_TRACKS_UPDATED:"hlsSubtitleTracksUpdated",SUBTITLE_TRACK_SWITCH:"hlsSubtitleTrackSwitch",SUBTITLE_TRACK_LOADING:"hlsSubtitleTrackLoading",SUBTITLE_TRACK_LOADED:"hlsSubtitleTrackLoaded",SUBTITLE_FRAG_PROCESSED:"hlsSubtitleFragProcessed",CUES_PARSED:"hlsCuesParsed",NON_NATIVE_TEXT_TRACKS_FOUND:"hlsNonNativeTextTracksFoun
vendor: 805 bytes, line 2
2d",INIT_PTS_FOUND:"hlsInitPtsFound",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",FRAG_DECRYPTED:"hlsFragDecrypted",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_USERDATA:"hlsFragParsingUserdata",FRAG_PARSING_METADATA:"hlsFragParsingMetadata",FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",FPS_DROP:"hlsFpsDrop",FPS_DROP_LEVEL_CAPPING:"hlsFpsDropLevelCapping",ERROR:"hlsError",DESTROYING:"hlsDestroying",KEY_LOADING:"hlsKeyLoading",KEY_LOADED:"hlsKeyLoaded",STREAM_STATE_TRANSITION:"hlsStreamStateTransition",LIVE_BACK_BUFFER_REACHED:"hlsLiveBackBufferReached"}},"./src/hls.ts":function(t,e,
vendor: 134,168 bytes, line 2
2i){"use strict";i.r(e),i.d(e,"default",function(){return hi});var n={};i.r(n),i.d(n,"newCue",function(){return fe});var r,s,a=i("./node_modules/url-toolkit/src/url-toolkit.js"),o=i("./src/errors.ts"),l=i("./src/polyfills/number.js"),h=i("./src/events.js"),c=i("./src/utils/logger.js"),u={hlsEventGeneric:!0,hlsHandlerDestroying:!0,hlsHandlerDestroyed:!0},d=function(){function t(t){this.hls=void 0,this.handledEvents=void 0,this.useGenericHandler=void 0,this.hls=t,this.onEvent=this.onEvent.bind(this);for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];this.handledEvents=i,this.useGenericHandler=!0,this.registerListeners()}var e=t.prototype;return e.destroy=function(){this.onHandlerDestroying(),this.unregisterListeners(),this.onHandlerDestroyed()},e.onHandlerDestroying=function(){},e.onHandlerDestroyed=function(){},e.isEventHandler=function(){return"object"==typeof this.handledEvents&&this.handledEvents.length&&"function"==typeof this.onEvent},e.registerListeners=function(){this.isEventHandler()&&this.handledEvents.forEach(function(t){if(u[t])throw new Error("Forbidden event-name: "+t);this.hls.on(t,this.onEvent)},this)},e.unregisterListeners=function(){this.isEventHandler()&&this.handledEvents.forEach(function(t){this.hls.off(t,this.onEvent)},this)},e.onEvent=function(t,e){this.onEventGeneric(t,e)},e.onEventGeneric=function(t,e){try{(function(t,e){var i="on"+t.replace("hls","");if("function"!=typeof this[i])throw new Error("Event "+t+" has no generic handler in this "+this.constructor.name+" class (tried "+i+")");return this[i].bind(this,e)}).call(this,t,e).call()}catch(e){c.logger.error("An internal error happened while handling event "+t+'. Error message: "'+e.message+'". Here is a stacktrace:',e),this.hls.trigger(h.default.ERROR,{type:o.ErrorTypes.OTHER_ERROR,details:o.ErrorDetails.INTERNAL_EXCEPTION,fatal:!1,event:t,err:e})}},t}(),f=d;!function(t){t.MANIFEST="manifest",t.LEVEL="level",t.AUDIO_TRACK="audioTrack",t.SUBTITLE_TRACK="subtitleTrack"}(r||(r={})),function(t){t.MAIN="main",t.AUDIO="audio",t.SUBTITLE="subtitle"}(s||(s={}));var p=i("./src/demux/mp4demuxer.js");function m(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var g,y=function(){function t(t,e){this._uri=null,this.baseuri=void 0,this.reluri=void 0,this.method=null,this.key=null,this.iv=null,this.baseuri=t,this.reluri=e}var e,i;return e=t,(i=[{key:"uri",get:function(){return!this._uri&&this.reluri&&(this._uri=Object(a.buildAbsoluteURL)(this.baseuri,this.reluri,{alwaysNormalize:!0})),this._uri}}])&&m(e.prototype,i),t}();function v(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}!function(t){t.AUDIO="audio",t.VIDEO="video"}(g||(g={}));var b=function(){function t(){var t;this._url=null,this._byteRange=null,this._decryptdata=null,this._elementaryStreams=((t={})[g.AUDIO]=!1,t[g.VIDEO]=!1,t),this.deltaPTS=0,this.rawProgramDateTime=null,this.programDateTime=null,this.title=null,this.tagList=[],this.cc=void 0,this.type=void 0,this.relurl=void 0,this.baseurl=void 0,this.duration=void 0,this.start=void 0,this.sn=0,this.urlId=0,this.level=0,this.levelkey=void 0,this.loader=void 0}var e,i,n=t.prototype;return n.setByteRange=function(t,e){var i=t.split("@",2),n=[];1===i.length?n[0]=e?e.byteRangeEndOffset:0:n[0]=parseInt(i[1]),n[1]=parseInt(i[0])+n[0],this._byteRange=n},n.addElementaryStream=function(t){this._elementaryStreams[t]=!0},n.hasElementaryStream=function(t){return!0===this._elementaryStreams[t]},n.createInitializationVector=function(t){for(var e=new Uint8Array(16),i=12;i<16;i++)e[i]=t>>8*(15-i)&255;return e},n.setDecryptDataFromLevelKey=function(t,e){var i=t;return(null==t?void 0:t.method)&&t.uri&&!t.iv&&((i=new y(t.baseuri,t.reluri)).method=t.method,i.iv=this.createInitializationVector(e)),i},e=t,(i=[{key:"url",get:function(){return!this._url&&this.relurl&&(this._url=Object(a.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url},set:function(t){this._url=t}},{key:"byteRange",get:function(){return this._byteRange?this._byteRange:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"decryptdata",get:function(){if(!this.levelkey&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkey){var t=this.sn;"number"!=typeof t&&(this.levelkey&&"AES-128"===this.levelkey.method&&!this.levelkey.iv&&c.logger.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),t=0),this._decryptdata=this.setDecryptDataFromLevelKey(this.levelkey,t)}return this._decryptdata}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;if(!Object(l.isFiniteNumber)(this.programDateTime))return null;var t=Object(l.isFiniteNumber)(this.duration)?this.duration:0;return this.programDateTime+1e3*t}},{key:"encrypted",get:function(){return!(!this.decryptdata||null===this.decryptdata.uri||null!==this.decryptdata.key)}}])&&v(e.prototype,i),t}();function S(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var E=function(){function t(t){this.endCC=0,this.endSN=0,this.fragments=[],this.initSegment=null,this.live=!0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=t,this.version=null}var e,i;return e=t,(i=[{key:"hasProgramDateTime",get:function(){return!(!this.fragments[0]||!Object(l.isFiniteNumber)(this.fragments[0].programDateTime))}}])&&S(e.prototype,i),t}(),k=/^(\d+)x(\d+)$/,x=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,w=function(){function t(e){for(var i in"string"==typeof e&&(e=t.parseAttrList(e)),e)e.hasOwnProperty(i)&&(this[i]=e[i])}var e=t.prototype;return e.decimalInteger=function(t){var e=parseInt(this[t],10);return e>Number.MAX_SAFE_INTEGER?1/0:e},e.hexadecimalInteger=function(t){if(this[t]){var e=(this[t]||"0x").slice(2);e=(1&e.length?"0":"")+e;for(var i=new Uint8Array(e.length/2),n=0;n<e.length/2;n++)i[n]=parseInt(e.slice(2*n,2*n+2),16);return i}return null},e.hexadecimalIntegerAsNumber=function(t){var e=parseInt(this[t],16);return e>Number.MAX_SAFE_INTEGER?1/0:e},e.decimalFloatingPoint=function(t){return parseFloat(this[t])},e.enumeratedString=function(t){return this[t]},e.decimalResolution=function(t){var e=k.exec(this[t]);if(null!==e)return{width:parseInt(e[1],10),height:parseInt(e[2],10)}},t.parseAttrList=function(t){var e,i={};for(x.lastIndex=0;null!==(e=x.exec(t));){var n=e[2];0===n.indexOf('"')&&n.lastIndexOf('"')===n.length-1&&(n=n.slice(1,-1)),i[e[1]]=n}return i},t}(),_={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0}};function C(t,e){return MediaSource.isTypeSupported((e||"video")+'/mp4;codecs="'+t+'"')}var T=/(?:#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)|#EXT-X-SESSION-DATA:([^\n\r]*)[\r\n]+)/g,A=/#EXT-X-MEDIA:(.*)/g,P=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/|(?!#)([\S+ ?]+)/.source,/|#EXT-X-BYTERANGE:*(.+)/.source,/|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/|#.*/.source].join(""),"g"),D=/(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE): *(\d+))|(?:#EXT-X-(TARGETDURATION): *(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DISCONTINUITY-SEQ)UENCE:(\d+))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(VERSION):(\d+))|(?:#EXT-X-(MAP):(.+))|(?:(#)([^:]*):(.*))|(?:(#)(.*))(?:.*)\r?\n?/,M=/\.(mp4|m4s|m4v|m4a)$/i,L=function(){function t(){}return t.findGroup=function(t,e){for(var i=0;i<t.length;i++){var n=t[i];if(n.id===e)return n}},t.convertAVC1ToAVCOTI=function(t){var e,i=t.split(".");return i.length>2?(e=i.shift()+".",e+=parseInt(i.shift()).toString(16),e+=("000"+parseInt(i.shift()).toString(16)).substr(-4)):e=t,e},t.resolve=function(t,e){return a.buildAbsoluteURL(e,t,{alwaysNormalize:!0})},t.parseMasterPlaylist=function(e,i){var n,r=[],s={},a=!1;function o(t,e){["video","audio"].forEach(function(i){var n=t.filter(function(t){return function(t,e){var i=_[e];return!!i&&!0===i[t.slice(0,4)]}(t,i)});if(n.length){var r=n.filter(function(t){return 0===t.lastIndexOf("avc1",0)||0===t.lastIndexOf("mp4a",0)});e[i+"Codec"]=r.length>0?r[0]:n[0],t=t.filter(function(t){return-1===n.indexOf(t)})}}),e.unknownCodecs=t}for(T.lastIndex=0;null!=(n=T.exec(e));)if(n[1]){var l={},h=l.attrs=new w(n[1]);l.url=t.resolve(n[2],i);var c=h.decimalResolution("RESOLUTION");c&&(l.width=c.width,l.height=c.height),l.bitrate=h.decimalInteger("AVERAGE-BANDWIDTH")||h.decimalInteger("BANDWIDTH"),l.name=h.NAME,o([].concat((h.CODECS||"").split(/[ ,]+/)),l),l.videoCodec&&-1!==l.videoCodec.indexOf("avc1")&&(l.videoCodec=t.convertAVC1ToAVCOTI(l.videoCodec)),r.push(l)}else if(n[3]){var u=new w(n[3]);u["DATA-ID"]&&(a=!0,s[u["DATA-ID"]]=u)}return{levels:r,sessionData:a?s:null}},t.parseMasterPlaylistMedia=function(e,i,n,r){var s;void 0===r&&(r=[]);var a=[],o=0;for(A.lastIndex=0;null!==(s=A.exec(e));){var l=new w(s[1]);if(l.TYPE===n){var h={attrs:l,id:o++,groupId:l["GROUP-ID"],instreamId:l["INSTREAM-ID"],name:l.NAME||l.LANGUAGE,type:n,default:"YES"===l.DEFAULT,autoselect:"YES"===l.AUTOSELECT,forced:"YES"===l.FORCED,lang:l.LANGUAGE};if(l.URI&&(h.url=t.resolve(l.URI,i)),r.length){var c=t.findGroup(r,h.groupId);h.audioCodec=c?c.codec:r[0].codec}a.push(h)}}return a},t.parseLevelPlaylist=function(t,e,i,n,r){var s,a,o,h=0,u=0,d=new E(e),f=0,p=null,m=new b,g=null;for(P.lastIndex=0;null!==(s=P.exec(t));){var v=s[1];if(v){m.duration=parseFloat(v);var S=(" "+s[2]).slice(1);m.title=S||null,m.tagList.push(S?["INF",v,S]:["INF",v])}else if(s[3]){if(Object(l.isFiniteNumber)(m.duration)){var k=h++;m.type=n,m.start=u,o&&(m.levelkey=o),m.sn=k,m.level=i,m.cc=f,m.urlId=r,m.baseurl=e,m.relurl=(" "+s[3]).slice(1),R(m,p),d.fragments.push(m),p=m,u+=m.duration,m=new b}}else if(s[4]){var x=(" "+s[4]).slice(1);p?m.setByteRange(x,p):m.setByteRange(x)}else if(s[5])m.rawProgramDateTime=(" "+s[5]).slice(1),m.tagList.push(["PROGRAM-DATE-TIME",m.rawProgramDateTime]),null===g&&(g=d.fragments.length);else{if(!(s=s[0].match(D))){c.logger.warn("No matches on slow regex match for level playlist!");continue}for(a=1;a<s.length&&void 0===s[a];a++);var _=(" "+s[a+1]).slice(1),C=(" "+s[a+2]).slice(1);switch(s[a]){case"#":m.tagList.push(C?[_,C]:[_]);break;case"PLAYLIST-TYPE":d.type=_.toUpperCase();break;case"MEDIA-SEQUENCE":h=d.startSN=parseInt(_);break;case"TARGETDURATION":d.targetduration=parseFloat(_);break;case"VERSION":d.version=parseInt(_);break;case"EXTM3U":break;case"ENDLIST":d.live=!1;break;case"DIS":f++,m.tagList.push(["DIS"]);break;case"DISCONTINUITY-SEQ":f=parseInt(_);break;case"KEY":var T=new w(_),A=T.enumeratedString("METHOD"),L=T.URI,I=T.hexadecimalInteger("IV");if("com.apple.streamingkeydelivery"===(T.KEYFORMAT||"identity")){c.logger.warn("Keyformat com.apple.streamingkeydelivery is not supported");continue}A&&(o=new y(e,L),L&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(A)>=0&&(o.method=A,o.key=null,o.iv=I));break;case"START":var F=new w(_).decimalFloatingPoint("TIME-OFFSET");Object(l.isFiniteNumber)(F)&&(d.startTimeOffset=F);break;case"MAP":var O=new w(_);m.relurl=O.URI,O.BYTERANGE&&m.setByteRange(O.BYTERANGE),m.baseurl=e,m.level=i,m.type=n,m.sn="initSegment",d.initSegment=m,(m=new b).rawProgramDateTime=d.initSegment.rawProgramDateTime;break;default:c.logger.warn("line parsed but not handled: "+s)}}}return(m=p)&&!m.relurl&&(d.fragments.pop(),u-=m.duration),d.totalduration=u,d.averagetargetduration=u/d.fragments.length,d.endSN=h-1,d.startCC=d.fragments[0]?d.fragments[0].cc:0,d.endCC=f,!d.initSegment&&d.fragments.length&&d.fragments.every(function(t){return M.test(t.relurl)})&&(c.logger.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),(m=new b).relurl=d.fragments[0].relurl,m.baseurl=e,m.level=i,m.type=n,m.sn="initSegment",d.initSegment=m,d.needSidxRanges=!0),g&&function(t,e){for(var i=t[e],n=e-1;n>=0;n--){var r=t[n];r.programDateTime=i.programDateTime-1e3*r.duration,i=r}}(d.fragments,g),d},t}();function R(t,e){t.rawProgramDateTime?t.programDateTime=Date.parse(t.rawProgramDateTime):(null==e?void 0:e.programDateTime)&&(t.programDateTime=e.endProgramDateTime),Object(l.isFiniteNumber)(t.programDateTime)||(t.programDateTime=null,t.rawProgramDateTime=null)}var I=window.performance,F=function(t){var e,i;function n(e){var i;return(i=t.call(this,e,h.default.MANIFEST_LOADING,h.default.LEVEL_LOADING,h.default.AUDIO_TRACK_LOADING,h.default.SUBTITLE_TRACK_LOADING)||this).loaders={},i}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i,n.canHaveQualityLevels=function(t){return t!==r.AUDIO_TRACK&&t!==r.SUBTITLE_TRACK},n.mapContextToLevelType=function(t){switch(t.type){case r.AUDIO_TRACK:return s.AUDIO;case r.SUBTITLE_TRACK:return s.SUBTITLE;default:return s.MAIN}},n.getResponseUrl=function(t,e){var i=t.url;return void 0!==i&&0!==i.indexOf("data:")||(i=e.url),i};var a=n.prototype;return a.createInternalLoader=function(t){var e=this.hls.config,i=e.pLoader,n=e.loader,r=new(i||n)(e);return t.loader=r,this.loaders[t.type]=r,r},a.getInternalLoader=function(t){return this.loaders[t.type]},a.resetInternalLoader=function(t){this.loaders[t]&&delete this.loaders[t]},a.destroyInternalLoaders=function(){for(var t in this.loaders){var e=this.loaders[t];e&&e.destroy(),this.resetInternalLoader(t)}},a.destroy=function(){this.destroyInternalLoaders(),t.prototype.destroy.call(this)},a.onManifestLoading=function(t){this.load({url:t.url,type:r.MANIFEST,level:0,id:null,responseType:"text"})},a.onLevelLoading=function(t){this.load({url:t.url,type:r.LEVEL,level:t.level,id:t.id,responseType:"text"})},a.onAudioTrackLoading=function(t){this.load({url:t.url,type:r.AUDIO_TRACK,level:null,id:t.id,responseType:"text"})},a.onSubtitleTrackLoading=function(t){this.load({url:t.url,type:r.SUBTITLE_TRACK,level:null,id:t.id,responseType:"text"})},a.load=function(t){var e=this.hls.config;c.logger.debug("Loading playlist of type "+t.type+", level: "+t.level+", id: "+t.id);var i,n,s,a,o=this.getInternalLoader(t);if(o){var l=o.context;if(l&&l.url===t.url)return c.logger.trace("playlist request ongoing"),!1;c.logger.warn("aborting previous loader for type: "+t.type),o.abort()}switch(t.type){case r.MANIFEST:i=e.manifestLoadingMaxRetry,n=e.manifestLoadingTimeOut,s=e.manifestLoadingRetryDelay,a=e.manifestLoadingMaxRetryTimeout;break;case r.LEVEL:i=0,a=0,s=0,n=e.levelLoadingTimeOut;break;default:i=e.levelLoadingMaxRetry,n=e.levelLoadingTimeOut,s=e.levelLoadingRetryDelay,a=e.levelLoadingMaxRetryTimeout}o=this.createInternalLoader(t);var h={timeout:n,maxRetry:i,retryDelay:s,maxRetryDelay:a},u={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};return c.logger.debug("Calling internal loader delegate for URL: "+t.url),o.load(t,h,u),!0},a.loadsuccess=function(t,e,i,n){if(void 0===n&&(n=null),i.isSidxRequest)return this._handleSidxRequest(t,i),void this._handlePlaylistLoaded(t,e,i,n);if(this.resetInternalLoader(i.type),"string"!=typeof t.data)throw new Error('expected responseType of "text" for PlaylistLoader');var r=t.data;e.tload=I.now(),0===r.indexOf("#EXTM3U")?r.indexOf("#EXTINF:")>0||r.indexOf("#EXT-X-TARGETDURATION:")>0?this._handleTrackOrLevelPlaylist(t,e,i,n):this._handleMasterPlaylist(t,e,i,n):this._handleManifestParsingError(t,i,"no EXTM3U delimiter",n)},a.loaderror=function(t,e,i){void 0===i&&(i=null),this._handleNetworkError(e,i,!1,t)},a.loadtimeout=function(t,e,i){void 0===i&&(i=null),this._handleNetworkError(e,i,!0)},a._handleMasterPlaylist=function(t,e,i,r){var s=this.hls,a=t.data,o=n.getResponseUrl(t,i),l=L.parseMasterPlaylist(a,o),u=l.levels,d=l.sessionData;if(u.length){var f=u.map(function(t){return{id:t.attrs.AUDIO,codec:t.audioCodec}}),p=L.parseMasterPlaylistMedia(a,o,"AUDIO",f),m=L.parseMasterPlaylistMedia(a,o,"SUBTITLES"),g=L.parseMasterPlaylistMedia(a,o,"CLOSED-CAPTIONS");if(p.length){var y=!1;p.forEach(function(t){t.url||(y=!0)}),!1===y&&u[0].audioCodec&&!u[0].attrs.AUDIO&&(c.logger.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),p.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:{},url:""}))}s.trigger(h.default.MANIFEST_LOADED,{levels:u,audioTracks:p,subtitles:m,captions:g,url:o,stats:e,networkDetails:r,sessionData:d})}else this._handleManifestParsingError(t,i,"no level found in manifest",r)},a._handleTrackOrLevelPlaylist=function(t,e,i,s){var a=this.hls,c=i.id,u=i.level,d=i.type,f=n.getResponseUrl(t,i),p=Object(l.isFiniteNumber)(c)?c:0,m=Object(l.isFiniteNumber)(u)?u:p,g=n.mapContextToLevelType(i),y=L.parseLevelPlaylist(t.data,f,m,g,p);if(y.tload=e.tload,y.fragments.length){if(d===r.MANIFEST){var v={url:f,details:y};a.trigger(h.default.MANIFEST_LOADED,{levels:[v],audioTracks:[],url:f,stats:e,networkDetails:s,sessionData:null})}if(e.tparsed=I.now(),y.needSidxRanges){var b=y.initSegment.url;this.load({url:b,isSidxRequest:!0,type:d,level:u,levelDetails:y,id:c,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer"})}else i.levelDetails=y,this._handlePlaylistLoaded(t,e,i,s)}else a.trigger(h.default.ERROR,{type:o.ErrorTypes.NETWORK_ERROR,details:o.ErrorDetails.LEVEL_EMPTY_ERROR,fatal:!1,url:f,reason:"no fragments found in level",level:"number"==typeof i.level?i.level:void 0})},a._handleSidxRequest=function(t,e){if("string"==typeof t.data)throw new Error("sidx request must be made with responseType of array buffer");var i=p.default.parseSegmentIndex(new Uint8Array(t.data));if(i){var n=i.references,r=e.levelDetails;n.forEach(function(t,e){var i=t.info;if(r){var n=r.fragments[e];0===n.byteRange.length&&n.setByteRange(String(1+i.end-i.start)+"@"+String(i.start))}}),r&&r.initSegment.setByteRange(String(i.moovEndOffset)+"@0")}},a._handleManifestParsingError=function(t,e,i,n){this.hls.trigger(h.default.ERROR,{type:o.ErrorTypes.NETWORK_ERROR,details:o.ErrorDetails.MANIFEST_PARSING_ERROR,fatal:!0,url:t.url,reason:i,networkDetails:n})},a._handleNetworkError=function(t,e,i,n){var s,a;void 0===i&&(i=!1),void 0===n&&(n=null),c.logger.info("A network error occured while loading a "+t.type+"-type playlist");var l=this.getInternalLoader(t);switch(t.type){case r.MANIFEST:s=i?o.ErrorDetails.MANIFEST_LOAD_TIMEOUT:o.ErrorDetails.MANIFEST_LOAD_ERROR,a=!0;break;case r.LEVEL:s=i?o.ErrorDetails.LEVEL_LOAD_TIMEOUT:o.ErrorDetails.LEVEL_LOAD_ERROR,a=!1;break;case r.AUDIO_TRACK:s=i?o.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:o.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,a=!1;break;default:a=!1}l&&(l.abort(),this.resetInternalLoader(t.type));var u={type:o.ErrorTypes.NETWORK_ERROR,details:s,fatal:a,url:t.url,loader:l,context:t,networkDetails:e};n&&(u.response=n),this.hls.trigger(h.default.ERROR,u)},a._handlePlaylistLoaded=function(t,e,i,s){var a=i.type,o=i.level,l=i.id,c=i.levelDetails;if(c&&c.targetduration)if(n.canHaveQualityLevels(i.type))this.hls.trigger(h.default.LEVEL_LOADED,{details:c,level:o||0,id:l||0,stats:e,networkDetails:s});else switch(a){case r.AUDIO_TRACK:this.hls.trigger(h.default.AUDIO_TRACK_LOADED,{details:c,id:l,stats:e,networkDetails:s});break;case r.SUBTITLE_TRACK:this.hls.trigger(h.default.SUBTITLE_TRACK_LOADED,{details:c,id:l,stats:e,networkDetails:s})}else this._handleManifestParsingError(t,i,"invalid target duration",s)},n}(f),O=function(t){var e,i;function n(e){var i;return(i=t.call(this,e,h.default.FRAG_LOADING)||this).loaders={},i}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r=n.prototype;return r.destroy=function(){var e=this.loaders;for(var i in e){var n=e[i];n&&n.destroy()}this.loaders={},t.prototype.destroy.call(this)},r.onFragLoading=function(t){var e=t.frag,i=e.type,n=this.loaders,r=this.hls.config,s=r.fLoader,a=r.loader;e.loaded=0;var o,h,u,d=n[i];d&&(c.logger.warn("abort previous fragment loader for type: "+i),d.abort()),d=n[i]=e.loader=r.fLoader?new s(r):new a(r),o={url:e.url,frag:e,responseType:"arraybuffer",progressData:!1};var f=e.byteRangeStartOffset,p=e.byteRangeEndOffset;Object(l.isFiniteNumber)(f)&&Object(l.isFiniteNumber)(p)&&(o.rangeStart=f,o.rangeEnd=p),h={timeout:r.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:r.fragLoadingMaxRetryTimeout},u={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},d.load(o,h,u)},r.loadsuccess=function(t,e,i,n){void 0===n&&(n=null);var r=t.data,s=i.frag;s.loader=void 0,this.loaders[s.type]=void 0,this.hls.trigger(h.default.FRAG_LOADED,{payload:r,frag:s,stats:e,networkDetails:n})},r.loaderror=function(t,e,i){void 0===i&&(i=null);var n=e.frag,r=n.loader;r&&r.abort(),this.loaders[n.type]=void 0,this.hls.trigger(h.default.ERROR,{type:o.ErrorTypes.NETWORK_ERROR,details:o.ErrorDetails.FRAG_LOAD_ERROR,fatal:!1,frag:e.frag,response:t,networkDetails:i})},r.loadtimeout=function(t,e,i){void 0===i&&(i=null);var n=e.frag,r=n.loader;r&&r.abort(),this.loaders[n.type]=void 0,this.hls.trigger(h.default.ERROR,{type:o.ErrorTypes.NETWORK_ERROR,details:o.ErrorDetails.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e.frag,networkDetails:i})},r.loadprogress=function(t,e,i,n){void 0===n&&(n=null);var r=e.frag;r.loaded=t.loaded,this.hls.trigger(h.default.FRAG_LOAD_PROGRESS,{frag:r,stats:t,networkDetails:n})},n}(f),B=function(t){var e,i;function n(e){var i;return(i=t.call(this,e,h.default.KEY_LOADING)||this).loaders={},i.decryptkey=null,i.decrypturl=null,i}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r=n.prototype;return r.destroy=function(){for(var e in this.loaders){var i=this.loaders[e];i&&i.destroy()}this.loaders={},t.prototype.destroy.call(this)},r.onKeyLoading=function(t){var e=t.frag,i=e.type,n=this.loaders[i];if(e.decryptdata){var r=e.decryptdata.uri;if(r!==this.decrypturl||null===this.decryptkey){var s=this.hls.config;if(n&&(c.logger.warn("abort previous key loader for type:"+i),n.abort()),!r)return void c.logger.warn("key uri is falsy");e.loader=this.loaders[i]=new s.loader(s),this.decrypturl=r,this.decryptkey=null;var a={url:r,frag:e,responseType:"arraybuffer"},o={timeout:s.fragLoadingTimeOut,maxRetry:0,retryDelay:s.fragLoadingRetryDelay,maxRetryDelay:s.fragLoadingMaxRetryTimeout},l={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};e.loader.load(a,o,l)}else this.decryptkey&&(e.decryptdata.key=this.decryptkey,this.hls.trigger(h.default.KEY_LOADED,{frag:e}))}else c.logger.warn("Missing decryption data on fragment in onKeyLoading")},r.loadsuccess=function(t,e,i){var n=i.frag;n.decryptdata?(this.decryptkey=n.decryptdata.key=new Uint8Array(t.data),n.loader=void 0,delete this.loaders[n.type],this.hls.trigger(h.default.KEY_LOADED,{frag:n})):c.logger.error("after key load, decryptdata unset")},r.loaderror=function(t,e){var i=e.frag,n=i.loader;n&&n.abort(),delete this.loaders[i.type],this.hls.trigger(h.default.ERROR,{type:o.ErrorTypes.NETWORK_ERROR,details:o.ErrorDetails.KEY_LOAD_ERROR,fatal:!1,frag:i,response:t})},r.loadtimeout=function(t,e){var i=e.frag,n=i.loader;n&&n.abort(),delete this.loaders[i.type],this.hls.trigger(h.default.ERROR,{type:o.ErrorTypes.NETWORK_ERROR,details:o.ErrorDetails.KEY_LOAD_TIMEOUT,fatal:!1,frag:i})},n}(f),N="NOT_LOADED",V="APPENDING",z="PARTIAL",H="OK",q=function(t){var e,i;function n(e){var i;return(i=t.call(this,e,h.default.BUFFER_APPENDED,h.default.FRAG_BUFFERED,h.default.FRAG_LOADED)||this).bufferPadding=.2,i.fragments=Object.create(null),i.timeRanges=Object.create(null),i.config=e.config,i}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r=n.prototype;return r.destroy=function(){this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.config=null,f.prototype.destroy.call(this),t.prototype.destroy.call(this)},r.getBufferedFrag=function(t,e){var i=this.fragments,n=Object.keys(i).filter(function(n){var r=i[n];if(r.body.type!==e)return!1;if(!r.buffered)return!1;var s=r.body;return s.startPTS<=t&&t<=s.endPTS});if(0===n.length)return null;var r=n.pop();return i[r].body},r.detectEvictedFragments=function(t,e){var i=this;Object.keys(this.fragments).forEach(function(n){var r=i.fragments[n];if(r&&r.buffered){var s=r.range[t];if(s)for(var a=s.time,o=0;o<a.length;o++){var l=a[o];if(!i.isTimeBuffered(l.startPTS,l.endPTS,e)){i.removeFragment(r.body);break}}}})},r.detectPartialFragments=function(t){var e=this,i=this.getFragmentKey(t),n=this.fragments[i];n&&(n.buffered=!0,Object.keys(this.timeRanges).forEach(function(i){if(t.hasElementaryStream(i)){var r=e.timeRanges[i];n.range[i]=e.getBufferedTimes(t.startPTS,t.endPTS,r)}}))},r.getBufferedTimes=function(t,e,i){for(var n,r,s=[],a=!1,o=0;o<i.length;o++){if(n=i.start(o)-this.bufferPadding,r=i.end(o)+this.bufferPadding,t>=n&&e<=r){s.push({startPTS:Math.max(t,i.start(o)),endPTS:Math.min(e,i.end(o))});break}if(t<r&&e>n)s.push({startPTS:Math.max(t,i.start(o)),endPTS:Math.min(e,i.end(o))}),a=!0;else if(e<=n)break}return{time:s,partial:a}},r.getFragmentKey=function(t){return t.type+"_"+t.level+"_"+t.urlId+"_"+t.sn},r.getPartialFragment=function(t){var e,i,n,r=this,s=null,a=0;return Object.keys(this.fragments).forEach(function(o){var l=r.fragments[o];r.isPartial(l)&&(i=l.body.startPTS-r.bufferPadding,n=l.body.endPTS+r.bufferPadding,t>=i&&t<=n&&(e=Math.min(t-i,n-t),a<=e&&(s=l.body,a=e)))}),s},r.getState=function(t){var e=this.getFragmentKey(t),i=this.fragments[e],n=N;return void 0!==i&&(n=i.buffered?!0===this.isPartial(i)?z:H:V),n},r.isPartial=function(t){return!0===t.buffered&&(void 0!==t.range.video&&!0===t.range.video.partial||void 0!==t.range.audio&&!0===t.range.audio.partial)},r.isTimeBuffered=function(t,e,i){for(var n,r,s=0;s<i.length;s++){if(n=i.start(s)-this.bufferPadding,r=i.end(s)+this.bufferPadding,t>=n&&e<=r)return!0;if(e<=n)return!1}return!1},r.onFragLoaded=function(t){var e=t.frag;Object(l.isFiniteNumber)(e.sn)&&!e.bitrateTest&&(this.fragments[this.getFragmentKey(e)]={body:e,range:Object.create(null),buffered:!1})},r.onBufferAppended=function(t){var e=this;this.timeRanges=t.timeRanges,Object.keys(this.timeRanges).forEach(function(t){var i=e.timeRanges[t];e.detectEvictedFragments(t,i)})},r.onFragBuffered=function(t){this.detectPartialFragments(t.frag)},r.hasFragment=function(t){var e=this.getFragmentKey(t);return void 0!==this.fragments[e]},r.removeFragment=function(t){var e=this.getFragmentKey(t);delete this.fragments[e]},r.removeAllFragments=function(){this.fragments=Object.create(null)},n}(f),U=function(t,e){for(var i=0,n=t.length-1,r=null,s=null;i<=n;){var a=e(s=t[r=(i+n)/2|0]);if(a>0)i=r+1;else{if(!(a<0))return s;n=r-1}}return null},G=function(){function t(){}return t.isBuffered=function(t,e){try{if(t)for(var i=t.buffered,n=0;n<i.length;n++)if(e>=i.start(n)&&e<=i.end(n))return!0}catch(t){}return!1},t.bufferInfo=function(t,e,i){try{if(t){var n,r=t.buffered,s=[];for(n=0;n<r.length;n++)s.push({start:r.start(n),end:r.end(n)});return this.bufferedInfo(s,e,i)}}catch(t){}return{len:0,start:e,end:e,nextStart:void 0}},t.bufferedInfo=function(t,e,i){t.sort(function(t,e){return t.start-e.start||e.end-t.end});var n=[];if(i)for(var r=0;r<t.length;r++){var s=n.length;if(s){var a=n[s-1].end;t[r].start-a<i?t[r].end>a&&(n[s-1].end=t[r].end):n.push(t[r])}else n.push(t[r])}else n=t;for(var o,l=0,h=e,c=e,u=0;u<n.length;u++){var d=n[u].start,f=n[u].end;if(e+i>=d&&e<f)h=d,l=(c=f)-e;else if(e+i<d){o=d;break}}return{len:l,start:h,end:c,nextStart:o}},t}(),j=i("./node_modules/eventemitter3/index.js"),W=i("./node_modules/webworkify-webpack/index.js"),$=i("./src/demux/demuxer-inline.js");function Y(){return window.MediaSource||window.WebKitMediaSource}var K=i("./src/utils/get-self-scope.js"),X=function(t){var e,i;function n(){return t.apply(this,arguments)||this}return i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i,n.prototype.trigger=function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];this.emit.apply(this,[t,t].concat(i))},n}(j.EventEmitter),J=Object(K.getSelfScope)(),Q=Y()||{isTypeSupported:function(){return!1}},Z=function(){function t(t,e){var i=this;this.hls=t,this.id=e;var n=this.observer=new X,r=t.config,s=function(e,n){(n=n||{}).frag=i.frag,n.id=i.id,t.trigger(e,n)};n.on(h.default.FRAG_DECRYPTED,s),n.on(h.default.FRAG_PARSING_INIT_SEGMENT,s),n.on(h.default.FRAG_PARSING_DATA,s),n.on(h.default.FRAG_PARSED,s),n.on(h.default.ERROR,s),n.on(h.default.FRAG_PARSING_METADATA,s),n.on(h.default.FRAG_PARSING_USERDATA,s),n.on(h.default.INIT_PTS_FOUND,s);var a={mp4:Q.isTypeSupported("video/mp4"),mpeg:Q.isTypeSupported("audio/mpeg"),mp3:Q.isTypeSupported('audio/mp4; codecs="mp3"')},l=navigator.vendor;if(r.enableWorker&&"undefined"!=typeof Worker){var u;c.logger.log("demuxing in webworker");try{u=this.w=W("./src/demux/demuxer-worker.js"),this.onwmsg=this.onWorkerMessage.bind(this),u.addEventListener("message",this.onwmsg),u.onerror=function(e){t.trigger(h.default.ERROR,{type:o.ErrorTypes.OTHER_ERROR,details:o.ErrorDetails.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",err:{message:e.message+" ("+e.filename+":"+e.lineno+")"}})},u.postMessage({cmd:"init",typeSupported:a,vendor:l,id:e,config:JSON.stringify(r)})}catch(t){c.logger.warn("Error in worker:",t),c.logger.error("Error while initializing DemuxerWorker, fallback on DemuxerInline"),u&&J.URL.revokeObjectURL(u.objectURL),this.demuxer=new $.default(n,a,r,l),this.w=void 0}}else this.demuxer=new $.default(n,a,r,l)}var e=t.prototype;return e.destroy=function(){var t=this.w;if(t)t.removeEventListener("message",this.onwmsg),t.terminate(),this.w=null;else{var e=this.demuxer;e&&(e.destroy(),this.demuxer=null)}var i=this.observer;i&&(i.removeAllListeners(),this.observer=null)},e.push=function(t,e,i,n,r,s,a,o){var h=this.w,u=Object(l.isFiniteNumber)(r.startPTS)?r.startPTS:r.start,d=r.decryptdata,f=this.frag,p=!(f&&r.cc===f.cc),m=!(f&&r.level===f.level),g=f&&r.sn===f.sn+1,y=!m&&g;if(p&&c.logger.log(this.id+":discontinuity detected"),m&&c.logger.log(this.id+":switch detected"),this.frag=r,h)h.postMessage({cmd:"demux",data:t,decryptdata:d,initSegment:e,audioCodec:i,videoCodec:n,timeOffset:u,discontinuity:p,trackSwitch:m,contiguous:y,duration:s,accurateTimeOffset:a,defaultInitPTS:o},t instanceof ArrayBuffer?[t]:[]);else{var v=this.demuxer;v&&v.push(t,d,e,i,n,u,p,m,y,s,a,o)}},e.onWorkerMessage=function(t){var e=t.data,i=this.hls;switch(e.event){case"init":J.URL.revokeObjectURL(this.w.objectURL);break;case h.default.FRAG_PARSING_DATA:e.data.data1=new Uint8Array(e.data1),e.data2&&(e.data.data2=new Uint8Array(e.data2));default:e.data=e.data||{},e.data.frag=this.frag,e.data.id=this.id,i.trigger(e.event,e.data)}},t}();function tt(t,e,i){switch(e){case"audio":t.audioGroupIds||(t.audioGroupIds=[]),t.audioGroupIds.push(i);break;case"text":t.textGroupIds||(t.textGroupIds=[]),t.textGroupIds.push(i)}}function et(t,e,i){var n=t[e],r=t[i],s=r.startPTS;if(Object(l.isFiniteNumber)(s))i>e?(n.duration=s-n.start,n.duration<0&&c.logger.warn("negative duration computed for frag "+n.sn+",level "+n.level+", there should be some duration drift between playlist and fragment!")):(r.duration=n.start-s,r.duration<0&&c.logger.warn("negative duration computed for frag "+r.sn+",level "+r.level+", there should be some duration drift between playlist and fragment!"));else if(i>e){var a=n.cc===r.cc;r.start=n.start+(a&&n.minEndPTS?n.minEndPTS-n.start:n.duration)}else r.start=Math.max(n.start-r.duration,0)}function it(t,e,i,n,r,s){var a=i,o=n;if(Object(l.isFiniteNumber)(e.startPTS)){var h=Math.abs(e.startPTS-i);Object(l.isFiniteNumber)(e.deltaPTS)?e.deltaPTS=Math.max(h,e.deltaPTS):e.deltaPTS=h,a=Math.max(i,e.startPTS),i=Math.min(i,e.startPTS),o=Math.min(n,e.endPTS),n=Math.max(n,e.endPTS),r=Math.min(r,e.startDTS),s=Math.max(s,e.endDTS)}var c=i-e.start;e.start=e.startPTS=i,e.maxStartPTS=a,e.endPTS=n,e.minEndPTS=o,e.startDTS=r,e.endDTS=s,e.duration=n-i;var u,d,f,p=e.sn;if(!t||p<t.startSN||p>t.endSN)return 0;for(u=p-t.startSN,(d=t.fragments)[u]=e,f=u;f>0;f--)et(d,f,f-1);for(f=u;f<d.length-1;f++)et(d,f,f+1);return t.PTSKnown=!0,c}function nt(t,e){e.initSegment&&t.initSegment&&(e.initSegment=t.initSegment);var i,n=0;if(rt(t,e,function(t,r){n=t.cc-r.cc,Object(l.isFiniteNumber)(t.startPTS)&&(r.start=r.startPTS=t.startPTS,r.endPTS=t.endPTS,r.duration=t.duration,r.backtracked=t.backtracked,r.dropped=t.dropped,i=r),e.PTSKnown=!0}),e.PTSKnown){if(n){c.logger.log("discontinuity sliding from playlist, take drift into account");for(var r=e.fragments,s=0;s<r.length;s++)r[s].cc+=n}i?it(e,i,i.startPTS,i.endPTS,i.startDTS,i.endDTS):function(t,e){var i=e.startSN-t.startSN,n=t.fragments,r=e.fragments;if(!(i<0||i>n.length))for(var s=0;s<r.length;s++)r[s].start+=n[i].start}(t,e),e.PTSKnown=t.PTSKnown}}function rt(t,e,i){if(t&&e)for(var n=Math.max(t.startSN,e.startSN)-e.startSN,r=Math.min(t.endSN,e.endSN)-e.startSN,s=e.startSN-t.startSN,a=n;a<=r;a++){var o=t.fragments[s+a],l=e.fragments[a];if(!o||!l)break;i(o,l,a)}}function st(t,e,i){var n=1e3*(e.averagetargetduration?e.averagetargetduration:e.targetduration),r=n/2;return t&&e.endSN===t.endSN&&(n=r),i&&(n=Math.max(r,n-(window.performance.now()-i))),Math.round(n)}var at=function(t){for(var e="",i=t.length,n=0;n<i;n++)e+="["+t.start(n).toFixed(3)+","+t.end(n).toFixed(3)+"]";return e};function ot(t,e){e.fragments.forEach(function(e){if(e){var i=e.start+t;e.start=e.startPTS=i,e.endPTS=i+e.duration}}),e.PTSKnown=!0}function lt(t,e,i){!function(t,e,i){if(function(t,e,i){var n=!1;return e&&e.details&&i&&(i.endCC>i.startCC||t&&t.cc<i.startCC)&&(n=!0),n}(t,i,e)){var n=function(t,e){var i=t.fragments,n=e.fragments;if(n.length&&i.length){var r=function(t,e){for(var i=null,n=0;n<t.length;n+=1){var r=t[n];if(r&&r.cc===e){i=r;break}}return i}(i,n[0].cc);if(r&&(!r||r.startPTS))return r;c.logger.log("No frag in previous level to align on")}else c.logger.log("No fragments to align")}(i.details,e);n&&(c.logger.log("Adjusting PTS using last level due to CC increase within current level"),ot(n.start,e))}}(t,i,e),!i.PTSKnown&&e&&function(t,e){if(e&&e.fragments.length){if(!t.hasProgramDateTime||!e.hasProgramDateTime)return;var i=e.fragments[0].programDateTime,n=(t.fragments[0].programDateTime-i)/1e3+e.fragments[0].start;Object(l.isFiniteNumber)(n)&&(c.logger.log("adjusting PTS using programDateTime delta, sliding:"+n.toFixed(3)),ot(n,t))}}(i,e.details)}function ht(t,e,i){if(null===e||!Array.isArray(t)||!t.length||!Object(l.isFiniteNumber)(e))return null;if(e<(t[0].programDateTime||0))return null;if(e>=(t[t.length-1].endProgramDateTime||0))return null;i=i||0;for(var n=0;n<t.length;++n){var r=t[n];if(dt(e,i,r))return r}return null}function ct(t,e,i,n){void 0===i&&(i=0),void 0===n&&(n=0);var r=null;return t?r=e[t.sn-e[0].sn+1]:0===i&&0===e[0].start&&(r=e[0]),r&&0===ut(i,n,r)?r:U(e,ut.bind(null,i,n))||r}function ut(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0);var n=Math.min(e,i.duration+(i.deltaPTS?i.deltaPTS:0));return i.start+i.duration-n<=t?1:i.start-n>t&&i.start?-1:0}function dt(t,e,i){var n=1e3*Math.min(e,i.duration+(i.deltaPTS?i.deltaPTS:0));return(i.endProgramDateTime||0)-n>t}var ft=function(){function t(t,e,i,n){this.config=t,this.media=e,this.fragmentTracker=i,this.hls=n,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1}var e=t.prototype;return e.poll=function(t){var e=this.config,i=this.media,n=this.stalled,r=i.currentTime,s=i.seeking,a=this.seeking&&!s,o=!this.seeking&&s;if(this.seeking=s,r===t){if((o||a)&&(this.stalled=null),!i.paused&&!i.ended&&0!==i.playbackRate&&i.buffered.length){var l=G.bufferInfo(i,r,0),h=l.len>0,u=l.nextStart||0;if(h||u){if(s){var d=l.len>2,f=!u||u-r>2&&!this.fragmentTracker.getPartialFragment(r);if(d||f)return;this.moved=!1}if(!this.moved&&this.stalled){var p=Math.max(u,l.start||0)-r;if(p>0&&p<=2)return void this._trySkipBufferHole(null)}var m=self.performance.now();if(null!==n){var g=m-n;!s&&g>=250&&this._reportStall(l.len);var y=G.bufferInfo(i,r,e.maxBufferHole);this._tryFixBufferStall(y,g)}else this.stalled=m}}}else if(this.moved=!0,null!==n){if(this.stallReported){var v=self.performance.now()-n;c.logger.warn("playback not stuck anymore @"+r+", after "+Math.round(v)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}},e._tryFixBufferStall=function(t,e){var i=this.config,n=this.fragmentTracker,r=this.media.currentTime,s=n.getPartialFragment(r);s&&this._trySkipBufferHole(s)||t.len>i.maxBufferHole&&e>1e3*i.highBufferWatchdogPeriod&&(c.logger.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())},e._reportStall=function(t){var e=this.hls,i=this.media;this.stallReported||(this.stallReported=!0,c.logger.warn("Playback stalling at @"+i.currentTime+" due to low buffer (buffer="+t+")"),e.trigger(h.default.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!1,buffer:t}))},e._trySkipBufferHole=function(t){for(var e=this.config,i=this.hls,n=this.media,r=n.currentTime,s=0,a=0;a<n.buffered.length;a++){var l=n.buffered.start(a);if(r+e.maxBufferHole>=s&&r<l){var u=Math.max(l+.05,n.currentTime+.1);return c.logger.warn("skipping hole, adjusting currentTime from "+r+" to "+u),this.moved=!0,this.stalled=null,n.currentTime=u,t&&i.trigger(h.default.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+r+" to "+u,frag:t}),u}s=n.buffered.end(a)}return 0},e._tryNudgeBuffer=function(){var t=this.config,e=this.hls,i=this.media,n=i.currentTime,r=(this.nudgeRetry||0)+1;if(this.nudgeRetry=r,r<t.nudgeMaxRetry){var s=n+r*t.nudgeOffset;c.logger.warn("Nudging 'currentTime' from "+n+" to "+s),i.currentTime=s,e.trigger(h.default.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_NUDGE_ON_STALL,fatal:!1})}else c.logger.error("Playhead still not moving while enough data buffered @"+n+" after "+t.nudgeMaxRetry+" nudges"),e.trigger(h.default.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_STALLED_ERROR,fatal:!0})},t}(),pt=function(t){var e,i;function n(e){for(var i,n=arguments.length,r=new Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];return(i=t.call.apply(t,[this,e].concat(r))||this)._boundTick=void 0,i._tickTimer=null,i._tickInterval=null,i._tickCallCount=0,i._boundTick=i.tick.bind(function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i)),i}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r=n.prototype;return r.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},r.hasInterval=function(){return!!this._tickInterval},r.hasNextTick=function(){return!!this._tickTimer},r.setInterval=function(t){return!this._tickInterval&&(this._tickInterval=self.setInterval(this._boundTick,t),!0)},r.clearInterval=function(){return!!this._tickInterval&&(self.clearInterval(this._tickInterval),this._tickInterval=null,!0)},r.clearNextTick=function(){return!!this._tickTimer&&(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0)},r.tick=function(){this._tickCallCount++,1===this._tickCallCount&&(this.doTick(),this._tickCallCount>1&&(this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)),this._tickCallCount=0)},r.doTick=function(){},n}(f),mt="STOPPED",gt="STARTING",yt="IDLE",vt="PAUSED",bt="KEY_LOADING",St="FRAG_LOADING",Et="FRAG_LOADING_WAITING_RETRY",kt="WAITING_TRACK",xt="PARSING",wt="PARSED",_t="BUFFER_FLUSHING",Ct="ENDED",Tt="ERROR",At="WAITING_INIT_PTS",Pt="WAITING_LEVEL",Dt=function(t){var e,i;function n(){return t.apply(this,arguments)||this}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r=n.prototype;return r.doTick=function(){},r.startLoad=function(){},r.stopLoad=function(){var t=this.fragCurrent;t&&(t.loader&&t.loader.abort(),this.fragmentTracker.removeFragment(t)),this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=mt},r._streamEnded=function(t,e){var i=this.fragCurrent,n=this.fragmentTracker;if(!e.live&&i&&!i.backtracked&&i.sn===e.endSN&&!t.nextStart){var r=n.getState(i);return r===z||r===H}return!1},r.onMediaSeeking=function(){var t=this.config,e=this.media,i=this.mediaBuffer,n=this.state,r=e?e.currentTime:null,s=G.bufferInfo(i||e,r,this.config.maxBufferHole);if(c.logger.log("media seeking to "+(Object(l.isFiniteNumber)(r)?r.toFixed(3):r)),n===St){var a=this.fragCurrent;if(0===s.len&&a){var o=t.maxFragLookUpTolerance,h=a.start-o,u=a.start+a.duration+o;r<h||r>u?(a.loader&&(c.logger.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),a.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=yt):c.logger.log("seeking outside of buffer but within currently loaded fragment range")}}else n===Ct&&(0===s.len&&(this.fragPrevious=null,this.fragCurrent=null),this.state=yt);e&&(this.lastCurrentTime=r),this.loadedmetadata||(this.nextLoadPosition=this.startPosition=r),this.tick()},r.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},r.onHandlerDestroying=function(){this.stopLoad(),t.prototype.onHandlerDestroying.call(this)},r.onHandlerDestroyed=function(){this.state=mt,this.fragmentTracker=null},r.computeLivePosition=function(t,e){var i=void 0!==this.config.liveSyncDuration?this.config.liveSyncDuration:this.config.liveSyncDurationCount*e.targetduration;return t+Math.max(0,e.totalduration-i)},n}(pt);function Mt(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var Lt,Rt=function(t){var e,i;function n(e,i){var n;return(n=t.call(this,e,h.default.MEDIA_ATTACHED,h.default.MEDIA_DETACHING,h.default.MANIFEST_LOADING,h.default.MANIFEST_PARSED,h.default.LEVEL_LOADED,h.default.LEVELS_UPDATED,h.default.KEY_LOADED,h.default.FRAG_LOADED,h.default.FRAG_LOAD_EMERGENCY_ABORTED,h.default.FRAG_PARSING_INIT_SEGMENT,h.default.FRAG_PARSING_DATA,h.default.FRAG_PARSED,h.default.ERROR,h.default.AUDIO_TRACK_SWITCHING,h.default.AUDIO_TRACK_SWITCHED,h.default.BUFFER_CREATED,h.default.BUFFER_APPENDED,h.default.BUFFER_FLUSHED)||this).fragmentTracker=i,n.config=e.config,n.audioCodecSwap=!1,n._state=mt,n.stallReported=!1,n.gapController=null,n.altAudio=!1,n.audioOnly=!1,n.bitrateTest=!1,n}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r,a,u=n.prototype;return u.startLoad=function(t){if(this.levels){var e=this.lastCurrentTime,i=this.hls;if(this.stopLoad(),this.setInterval(100),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var n=i.startLevel;-1===n&&(i.config.testBandwidth?(n=0,this.bitrateTest=!0):n=i.nextAutoLevel),this.level=i.nextLoadLevel=n,this.loadedmetadata=!1}e>0&&-1===t&&(c.logger.log("override startPosition with lastCurrentTime @"+e.toFixed(3)),t=e),this.state=yt,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()}else this.forceStartLoad=!0,this.state=mt},u.stopLoad=function(){this.forceStartLoad=!1,t.prototype.stopLoad.call(this)},u.doTick=function(){switch(this.state){case _t:this.fragLoadError=0;break;case yt:this._doTickIdle();break;case Pt:var t=this.levels[this.level];t&&t.details&&(this.state=yt);break;case Et:var e=window.performance.now(),i=this.retryDate;(!i||e>=i||this.media&&this.media.seeking)&&(c.logger.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=yt)}this._checkBuffer(),this._checkFragmentChanged()},u._doTickIdle=function(){var t=this.hls,e=t.config,i=this.media;if(void 0!==this.levelLastLoaded&&(i||!this.startFragRequested&&e.startFragPrefetch))if(this.altAudio&&this.audioOnly)this.demuxer.frag=null;else{var n;n=this.loadedmetadata?i.currentTime:this.nextLoadPosition;var r=t.nextLoadLevel,s=this.levels[r];if(s){var a,o=s.bitrate;a=o?Math.max(8*e.maxBufferSize/o,e.maxBufferLength):e.maxBufferLength,a=Math.min(a,e.maxMaxBufferLength);var l=n<e.maxBufferHole?Math.max(2,e.maxBufferHole):e.maxBufferHole,u=G.bufferInfo(this.mediaBuffer?this.mediaBuffer:i,n,l),d=u.len;if(!(d>=a)){c.logger.trace("buffer length of "+d.toFixed(3)+" is below max of "+a.toFixed(3)+". checking for more payload ..."),this.level=t.nextLoadLevel=r;var f=s.details;if(!f||f.live&&this.levelLastLoaded!==r)this.state=Pt;else{if(this._streamEnded(u,f)){var p={};return this.altAudio&&(p.type="video"),this.hls.trigger(h.default.BUFFER_EOS,p),void(this.state=Ct)}this._fetchPayloadOrEos(n,u,f)}}}}},u._fetchPayloadOrEos=function(t,e,i){var n=this.fragPrevious,r=(this.level,i.fragments),s=r.length;if(0!==s){var a,o=r[0].start,l=r[s-1].start+r[s-1].duration,h=e.end;if(i.initSegment&&!i.initSegment.data)a=i.initSegment;else if(i.live){var u=this.config.initialLiveManifestSize;if(s<u)return void c.logger.warn("Can not start playback of a level, reason: not enough fragments "+s+" < "+u);if(null===(a=this._ensureFragmentAtLivePoint(i,h,o,l,n,r)))return}else h<o&&(a=r[0]);a||(a=this._findFragment(o,n,s,r,h,l,i)),a&&(a.encrypted?this._loadKey(a,i):this._loadFragment(a,i,t,h))}},u._ensureFragmentAtLivePoint=function(t,e,i,n,r,s){var a,o=this.hls.config,h=this.media,u=1/0;if(void 0!==o.liveMaxLatencyDuration?u=o.liveMaxLatencyDuration:Object(l.isFiniteNumber)(o.liveMaxLatencyDurationCount)&&(u=o.liveMaxLatencyDurationCount*t.targetduration),e<Math.max(i-o.maxFragLookUpTolerance,n-u)){var d=this.liveSyncPosition=this.computeLivePosition(i,t);e=d,h&&!h.paused&&h.readyState&&h.duration>d&&d>h.currentTime&&(c.logger.log("buffer end: "+e.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+d.toFixed(3)),h.currentTime=d),this.nextLoadPosition=d}if(t.PTSKnown&&e>n&&h&&h.readyState)return null;if(this.startFragRequested&&!t.PTSKnown&&r)if(t.hasProgramDateTime)c.logger.log("live playlist, switching playlist, load frag with same PDT: "+r.programDateTime),a=ht(s,r.endProgramDateTime,o.maxFragLookUpTolerance);else{var f=r.sn+1;if(f>=t.startSN&&f<=t.endSN){var p=s[f-t.startSN];r.cc===p.cc&&(a=p,c.logger.log("live playlist, switching playlist, load frag with next SN: "+a.sn))}a||(a=U(s,function(t){return r.cc-t.cc}))&&c.logger.log("live playlist, switching playlist, load frag with same CC: "+a.sn)}return a},u._findFragment=function(t,e,i,n,r,s,a){var o,l=this.hls.config;if(o=r<s?ct(e,n,r,r>s-l.maxFragLookUpTolerance?0:l.maxFragLookUpTolerance):n[i-1]){var h=o.sn-a.startSN,u=e&&o.level===e.level,d=n[h-1],f=n[h+1];if(e&&o.sn===e.sn)if(u&&!o.backtracked)if(o.sn<a.endSN){var p=e.deltaPTS;p&&p>l.maxBufferHole&&e.dropped&&h?(o=d,c.logger.warn("Previous fragment was dropped with large PTS gap between audio and video. Maybe fragment is not starting with a keyframe? Loading previous one to try to overcome this")):(o=f,this.fragmentTracker.getState(o)!==H&&c.logger.log("Re-loading fragment with SN: "+o.sn))}else o=null;else o.backtracked&&(f&&f.backtracked?(c.logger.warn("Already backtracked from fragment "+f.sn+", will not backtrack to fragment "+o.sn+". Loading fragment "+f.sn),o=f):(c.logger.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),o.dropped=0,d?(o=d).backtracked=!0:h&&(o=null)))}return o},u._loadKey=function(t,e){c.logger.log("Loading key for "+t.sn+" of ["+e.startSN+"-"+e.endSN+"], level "+this.level),this.state=bt,this.hls.trigger(h.default.KEY_LOADING,{frag:t})},u._loadFragment=function(t,e,i,n){var r=this.fragmentTracker.getState(t);this.fragCurrent=t,"initSegment"!==t.sn&&(this.startFragRequested=!0),Object(l.isFiniteNumber)(t.sn)&&!t.bitrateTest&&(this.nextLoadPosition=t.start+t.duration),t.backtracked||r===N||r===z?(t.autoLevel=this.hls.autoLevelEnabled,t.bitrateTest=this.bitrateTest,c.logger.log("Loading "+t.sn+" of ["+e.startSN+"-"+e.endSN+"], level "+this.level+", "+(this.loadedmetadata?"currentTime":"nextLoadPosition")+": "+parseFloat(i.toFixed(3))+", bufferEnd: "+parseFloat(n.toFixed(3))),this.hls.trigger(h.default.FRAG_LOADING,{frag:t}),this.demuxer||(this.demuxer=new Z(this.hls,"main")),this.state=St):r===V&&this._reduceMaxBufferLength(t.duration)&&this.fragmentTracker.removeFragment(t)},u.getBufferedFrag=function(t){return this.fragmentTracker.getBufferedFrag(t,s.MAIN)},u.followingBufferedFrag=function(t){return t?this.getBufferedFrag(t.endPTS+.5):null},u._checkFragmentChanged=function(){var t,e,i=this.media;if(i&&i.readyState&&!1===i.seeking&&((e=i.currentTime)>this.lastCurrentTime&&(this.lastCurrentTime=e),G.isBuffered(i,e)?t=this.getBufferedFrag(e):G.isBuffered(i,e+.1)&&(t=this.getBufferedFrag(e+.1)),t)){var n=t;if(n!==this.fragPlaying){this.hls.trigger(h.default.FRAG_CHANGED,{frag:n});var r=n.level;this.fragPlaying&&this.fragPlaying.level===r||this.hls.trigger(h.default.LEVEL_SWITCHED,{level:r}),this.fragPlaying=n}}},u.immediateLevelSwitch=function(){if(c.logger.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var t,e=this.media;e?(t=e.paused)||e.pause():t=!0,this.previouslyPaused=t}var i=this.fragCurrent;i&&i.loader&&i.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},u.immediateLevelSwitchEnd=function(){var t=this.media;t&&t.buffered.length&&(this.immediateSwitch=!1,t.currentTime>0&&G.isBuffered(t,t.currentTime)&&(t.currentTime-=1e-4),this.previouslyPaused||t.play())},u.nextLevelSwitch=function(){var t=this.media;if(t&&t.readyState){var e,i=this.getBufferedFrag(t.currentTime);if(i&&i.startPTS>1&&this.flushMainBuffer(0,i.startPTS-1),t.paused)e=0;else{var n=this.hls.nextLoadLevel,r=this.levels[n],s=this.fragLastKbps;e=s&&this.fragCurrent?this.fragCurrent.duration*r.bitrate/(1e3*s)+1:0}var a=this.getBufferedFrag(t.currentTime+e);if(a){var o=this.followingBufferedFrag(a);if(o){var l=this.fragCurrent;l&&l.loader&&l.loader.abort(),this.fragCurrent=null;var h=Math.max(a.endPTS,o.maxStartPTS+Math.min(this.config.maxFragLookUpTolerance,o.duration));this.flushMainBuffer(h,Number.POSITIVE_INFINITY)}}}},u.flushMainBuffer=function(t,e){this.state=_t;var i={startOffset:t,endOffset:e};this.altAudio&&(i.type="video"),this.hls.trigger(h.default.BUFFER_FLUSHING,i)},u.onMediaAttached=function(t){var e=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvended=this.onMediaEnded.bind(this),e.addEventListener("seeking",this.onvseeking),e.addEventListener("seeked",this.onvseeked),e.addEventListener("ended",this.onvended);var i=this.config;this.levels&&i.autoStartLoad&&this.hls.startLoad(i.startPosition),this.gapController=new ft(i,e,this.fragmentTracker,this.hls)},u.onMediaDetaching=function(){var t=this.media;t&&t.ended&&(c.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var e=this.levels;e&&e.forEach(function(t){t.details&&t.details.fragments.forEach(function(t){t.backtracked=void 0})}),t&&(t.removeEventListener("seeking",this.onvseeking),t.removeEventListener("seeked",this.onvseeked),t.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.fragmentTracker.removeAllFragments(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.stopLoad()},u.onMediaSeeked=function(){var t=this.media,e=t?t.currentTime:void 0;Object(l.isFiniteNumber)(e)&&c.logger.log("media seeked to "+e.toFixed(3)),this.tick()},u.onManifestLoading=function(){c.logger.log("trigger BUFFER_RESET"),this.hls.trigger(h.default.BUFFER_RESET),this.fragmentTracker.removeAllFragments(),this.stalled=!1,this.startPosition=this.lastCurrentTime=0},u.onManifestParsed=function(t){var e,i=!1,n=!1;t.levels.forEach(function(t){(e=t.audioCodec)&&(-1!==e.indexOf("mp4a.40.2")&&(i=!0),-1!==e.indexOf("mp4a.40.5")&&(n=!0))}),this.audioCodecSwitch=i&&n,this.audioCodecSwitch&&c.logger.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.altAudio=t.altAudio,this.levels=t.levels,this.startFragRequested=!1;var r=this.config;(r.autoStartLoad||this.forceStartLoad)&&this.hls.startLoad(r.startPosition)},u.onLevelLoaded=function(t){var e=t.details,i=t.level,n=this.levels[this.levelLastLoaded],r=this.levels[i],s=e.totalduration,a=0;if(c.logger.log("level "+i+" loaded ["+e.startSN+","+e.endSN+"],duration:"+s),e.live||r.details&&r.details.live){var o=r.details;o&&e.fragments.length>0?(nt(o,e),a=e.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(a,o),e.PTSKnown&&Object(l.isFiniteNumber)(a)?c.logger.log("live playlist sliding:"+a.toFixed(3)):(c.logger.log("live playlist - outdated PTS, unknown sliding"),lt(this.fragPrevious,n,e))):(c.logger.log("live playlist - first load, unknown sliding"),e.PTSKnown=!1,lt(this.fragPrevious,n,e))}else e.PTSKnown=!1;if(r.details=e,this.levelLastLoaded=i,this.hls.trigger(h.default.LEVEL_UPDATED,{details:e,level:i}),!1===this.startFragRequested){if(-1===this.startPosition||-1===this.lastCurrentTime){var u=e.startTimeOffset;Object(l.isFiniteNumber)(u)?(u<0&&(c.logger.log("negative start time offset "+u+", count from end of last fragment"),u=a+s+u),c.logger.log("start time offset found in playlist, adjust startPosition to "+u),this.startPosition=u):e.live?(this.startPosition=this.computeLivePosition(a,e),c.logger.log("configure startPosition to "+this.startPosition)):this.startPosition=0,this.lastCurrentTime=this.startPosition}this.nextLoadPosition=this.startPosition}this.state===Pt&&(this.state=yt),this.tick()},u.onKeyLoaded=function(){this.state===bt&&(this.state=yt,this.tick())},u.onFragLoaded=function(t){var e=this.fragCurrent,i=this.hls,n=this.levels,r=this.media,s=t.frag;if(this.state===St&&e&&"main"===s.type&&s.level===e.level&&s.sn===e.sn){var a=t.stats,o=n[e.level],l=o.details;if(this.bitrateTest=!1,this.stats=a,c.logger.log("Loaded "+e.sn+" of ["+l.startSN+" ,"+l.endSN+"],level "+e.level),s.bitrateTest&&i.nextLoadLevel)this.state=yt,this.startFragRequested=!1,a.tparsed=a.tbuffered=window.performance.now(),i.trigger(h.default.FRAG_BUFFERED,{stats:a,frag:e,id:"main"}),this.tick();else if("initSegment"===s.sn)this.state=yt,a.tparsed=a.tbuffered=window.performance.now(),l.initSegment.data=t.payload,i.trigger(h.default.FRAG_BUFFERED,{stats:a,frag:e,id:"main"}),this.tick();else{c.logger.log("Parsing "+e.sn+" of ["+l.startSN+" ,"+l.endSN+"],level "+e.level+", cc "+e.cc),this.state=xt,this.pendingBuffering=!0,this.appended=!1,s.bitrateTest&&(s.bitrateTest=!1,this.fragmentTracker.onFragLoaded({frag:s}));var u=!(r&&r.seeking)&&(l.PTSKnown||!l.live),d=l.initSegment?l.initSegment.data:[],f=this._getAudioCodec(o);(this.demuxer=this.demuxer||new Z(this.hls,"main")).push(t.payload,d,f,o.videoCodec,e,l.totalduration,u)}}this.fragLoadError=0},u.onFragParsingInitSegment=function(t){var e=this.fragCurrent,i=t.frag;if(e&&"main"===t.id&&i.sn===e.sn&&i.level===e.level&&this.state===xt){var n,r,s=t.tracks;if(this.audioOnly=s.audio&&!s.video,this.altAudio&&!this.audioOnly&&delete s.audio,r=s.audio){var a=this.levels[this.level].audioCodec,o=navigator.userAgent.toLowerCase();a&&this.audioCodecSwap&&(c.logger.log("swapping playlist audio codec"),a=-1!==a.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),this.audioCodecSwitch&&1!==r.metadata.channelCount&&-1===o.indexOf("firefox")&&(a="mp4a.40.5"),-1!==o.indexOf("android")&&"audio/mpeg"!==r.container&&(a="mp4a.40.2",c.logger.log("Android: force audio codec to "+a)),r.levelCodec=a,r.id=t.id}for(n in(r=s.video)&&(r.levelCodec=this.levels[this.level].videoCodec,r.id=t.id),this.hls.trigger(h.default.BUFFER_CODECS,s),s){r=s[n],c.logger.log("main track:"+n+",container:"+r.container+",codecs[level/parsed]=["+r.levelCodec+"/"+r.codec+"]");var l=r.initSegment;l&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(h.default.BUFFER_APPENDING,{type:n,data:l,parent:"main",content:"initSegment"}))}this.tick()}},u.onFragParsingData=function(t){var e=this,i=this.fragCurrent,n=t.frag;if(i&&"main"===t.id&&n.sn===i.sn&&n.level===i.level&&("audio"!==t.type||!this.altAudio)&&this.state===xt){var r=this.levels[this.level],s=i;if(Object(l.isFiniteNumber)(t.endPTS)||(t.endPTS=t.startPTS+i.duration,t.endDTS=t.startDTS+i.duration),!0===t.hasAudio&&s.addElementaryStream(g.AUDIO),!0===t.hasVideo&&s.addElementaryStream(g.VIDEO),c.logger.log("Parsed "+t.type+",PTS:["+t.startPTS.toFixed(3)+","+t.endPTS.toFixed(3)+"],DTS:["+t.startDTS.toFixed(3)+"/"+t.endDTS.toFixed(3)+"],nb:"+t.nb+",dropped:"+(t.dropped||0)),"video"===t.type)if(s.dropped=t.dropped,s.dropped)if(s.backtracked)c.logger.warn("Already backtracked on this fragment, appending with the gap",s.sn);else{var a=r.details;if(!a||s.sn!==a.startSN)return c.logger.warn("missing video frame(s), backtracking fragment",s.sn),this.fragmentTracker.removeFragment(s),s.backtracked=!0,this.nextLoadPosition=t.startPTS,this.state=yt,this.fragPrevious=s,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),void this.tick();c.logger.warn("missing video frame(s) on first frag, appending with gap",s.sn)}else s.backtracked=!1;var o=it(r.details,s,t.startPTS,t.endPTS,t.startDTS,t.endDTS),u=this.hls;u.trigger(h.default.LEVEL_PTS_UPDATED,{details:r.details,level:this.level,drift:o,type:t.type,start:t.startPTS,end:t.endPTS}),[t.data1,t.data2].forEach(function(i){i&&i.length&&e.state===xt&&(e.appended=!0,e.pendingBuffering=!0,u.trigger(h.default.BUFFER_APPENDING,{type:t.type,data:i,parent:"main",content:"data"}))}),this.tick()}},u.onFragParsed=function(t){var e=this.fragCurrent,i=t.frag;e&&"main"===t.id&&i.sn===e.sn&&i.level===e.level&&this.state===xt&&(this.stats.tparsed=window.performance.now(),this.state=wt,this._checkAppendedParsed())},u.onAudioTrackSwitching=function(t){var e=this.altAudio,i=!!t.url,n=t.id;if(!i){if(this.mediaBuffer!==this.media){c.logger.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var r=this.fragCurrent;r.loader&&(c.logger.log("switching to main audio track, cancel main fragment load"),r.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=yt}var s=this.hls;e&&s.trigger(h.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),s.trigger(h.default.AUDIO_TRACK_SWITCHED,{id:n})}},u.onAudioTrackSwitched=function(t){var e=t.id,i=!!this.hls.audioTracks[e].url;if(i){var n=this.videoBuffer;n&&this.mediaBuffer!==n&&(c.logger.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=n)}this.altAudio=i,this.tick()},u.onBufferCreated=function(t){var e,i,n=t.tracks,r=!1;for(var s in n){var a=n[s];"main"===a.id?(i=s,e=a,"video"===s&&(this.videoBuffer=n[s].buffer)):r=!0}r&&e?(c.logger.log("alternate track found, use "+i+".buffered to schedule main fragment loading"),this.mediaBuffer=e.buffer):this.mediaBuffer=this.media},u.onBufferAppended=function(t){if("main"===t.parent){var e=this.state;e!==xt&&e!==wt||(this.pendingBuffering=t.pending>0,this._checkAppendedParsed())}},u._checkAppendedParsed=function(){if(!(this.state!==wt||this.appended&&this.pendingBuffering)){var t=this.fragCurrent;if(t){var e=this.mediaBuffer?this.mediaBuffer:this.media;c.logger.log("main buffered : "+at(e.buffered)),this.fragPrevious=t;var i=this.stats;i.tbuffered=window.performance.now(),this.fragLastKbps=Math.round(8*i.total/(i.tbuffered-i.tfirst)),this.hls.trigger(h.default.FRAG_BUFFERED,{stats:i,frag:t,id:"main"}),this.state=yt}(this.loadedmetadata||this.startPosition<=0)&&this.tick()}},u.onError=function(t){var e=t.frag||this.fragCurrent;if(!e||"main"===e.type){var i=!!this.media&&G.isBuffered(this.media,this.media.currentTime)&&G.isBuffered(this.media,this.media.currentTime+.5);switch(t.details){case o.ErrorDetails.FRAG_LOAD_ERROR:case o.ErrorDetails.FRAG_LOAD_TIMEOUT:case o.ErrorDetails.KEY_LOAD_ERROR:case o.ErrorDetails.KEY_LOAD_TIMEOUT:if(!t.fatal)if(this.fragLoadError+1<=this.config.fragLoadingMaxRetry){var n=Math.min(Math.pow(2,this.fragLoadError)*this.config.fragLoadingRetryDelay,this.config.fragLoadingMaxRetryTimeout);c.logger.warn("mediaController: frag loading failed, retry in "+n+" ms"),this.retryDate=window.performance.now()+n,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.fragLoadError++,this.state=Et}else c.logger.error("mediaController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.state=Tt;break;case o.ErrorDetails.LEVEL_LOAD_ERROR:case o.ErrorDetails.LEVEL_LOAD_TIMEOUT:this.state!==Tt&&(t.fatal?(this.state=Tt,c.logger.warn("streamController: "+t.details+",switch to "+this.state+" state ...")):t.levelRetry||this.state!==Pt||(this.state=yt));break;case o.ErrorDetails.BUFFER_FULL_ERROR:"main"!==t.parent||this.state!==xt&&this.state!==wt||(i?(this._reduceMaxBufferLength(this.config.maxBufferLength),this.state=yt):(c.logger.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)))}}},u._reduceMaxBufferLength=function(t){var e=this.config;return e.maxMaxBufferLength>=t&&(e.maxMaxBufferLength/=2,c.logger.warn("main:reduce max buffer length to "+e.maxMaxBufferLength+"s"),!0)},u._checkBuffer=function(){var t=this.media;if(t&&0!==t.readyState){var e=(this.mediaBuffer?this.mediaBuffer:t).buffered;!this.loadedmetadata&&e.length?(this.loadedmetadata=!0,this._seekToStartPos()):this.immediateSwitch?this.immediateLevelSwitchEnd():this.gapController.poll(this.lastCurrentTime,e)}},u.onFragLoadEmergencyAborted=function(){this.state=yt,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tick()},u.onBufferFlushed=function(){var t=this.mediaBuffer?this.mediaBuffer:this.media;if(t){var e=this.audioOnly?g.AUDIO:g.VIDEO;this.fragmentTracker.detectEvictedFragments(e,t.buffered)}this.state=yt,this.fragPrevious=null},u.onLevelsUpdated=function(t){this.levels=t.levels},u.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},u._seekToStartPos=function(){var t=this.media,e=t.currentTime,i=this.startPosition;if(e!==i&&i>=0){if(t.seeking)return void c.logger.log("could not seek to "+i+", already seeking at "+e);var n=(t.buffered.length?t.buffered.start(0):0)-i;n>0&&n<this.config.maxBufferHole&&(c.logger.log("adjusting start position by "+n+" to match buffer start"),i+=n,this.startPosition=i),c.logger.log("seek to target start position "+i+" from current time "+e+". ready state "+t.readyState),t.currentTime=i}},u._getAudioCodec=function(t){var e=this.config.defaultAudioCodec||t.audioCodec;return this.audioCodecSwap&&(c.logger.log("swapping playlist audio codec"),e&&(e=-1!==e.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5")),e},r=n,(a=[{key:"state",set:function(t){if(this.state!==t){var e=this.state;this._state=t,c.logger.log("main stream-controller: "+e+"->"+t),this.hls.trigger(h.default.STREAM_STATE_TRANSITION,{previousState:e,nextState:t})}},get:function(){return this._state}},{key:"currentLevel",get:function(){var t=this.media;if(t){var e=this.getBufferedFrag(t.currentTime);if(e)return e.level}return-1}},{key:"nextBufferedFrag",get:function(){var t=this.media;return t?this.followingBufferedFrag(this.getBufferedFrag(t.currentTime)):null}},{key:"nextLevel",get:function(){var t=this.nextBufferedFrag;return t?t.level:-1}},{key:"liveSyncPosition",get:function(){return this._liveSyncPosition},set:function(t){this._liveSyncPosition=t}}])&&Mt(r.prototype,a),n}(Dt);function It(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var Ft=function(t){var e,i;function n(e){var i;return(i=t.call(this,e,h.default.MANIFEST_LOADED,h.default.LEVEL_LOADED,h.default.AUDIO_TRACK_SWITCHED,h.default.FRAG_LOADED,h.default.ERROR)||this).canload=!1,i.currentLevelIndex=null,i.manualLevelIndex=-1,i.timer=null,Lt=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),i}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r,s,a=n.prototype;return a.onHandlerDestroying=function(){this.clearTimer(),this.manualLevelIndex=-1},a.clearTimer=function(){null!==this.timer&&(clearTimeout(this.timer),this.timer=null)},a.startLoad=function(){var t=this._levels;this.canload=!0,this.levelRetryCount=0,t&&t.forEach(function(t){t.loadError=0;var e=t.details;e&&e.live&&(t.details=void 0)}),null!==this.timer&&this.loadLevel()},a.stopLoad=function(){this.canload=!1},a.onManifestLoaded=function(t){var e,i=[],n=[],r={},s=null,a=!1,l=!1;if(t.levels.forEach(function(t){var e=t.attrs;t.loadError=0,t.fragmentError=!1,a=a||!!t.videoCodec,l=l||!!t.audioCodec,Lt&&t.audioCodec&&-1!==t.audioCodec.indexOf("mp4a.40.34")&&(t.audioCodec=void 0),(s=r[t.bitrate])?s.url.push(t.url):(t.url=[t.url],t.urlId=0,r[t.bitrate]=t,i.push(t)),e&&(e.AUDIO&&tt(s||t,"audio",e.AUDIO),e.SUBTITLES&&tt(s||t,"text",e.SUBTITLES))}),a&&l&&(i=i.filter(function(t){return!!t.videoCodec})),i=i.filter(function(t){var e=t.audioCodec,i=t.videoCodec;return(!e||C(e,"audio"))&&(!i||C(i,"video"))}),t.audioTracks&&(n=t.audioTracks.filter(function(t){return!t.audioCodec||C(t.audioCodec,"audio")})).forEach(function(t,e){t.id=e}),i.length>0){e=i[0].bitrate,i.sort(function(t,e){return t.bitrate-e.bitrate}),this._levels=i;for(var u=0;u<i.length;u++)if(i[u].bitrate===e){this._firstLevel=u,c.logger.log("manifest loaded,"+i.length+" level(s) found, first bitrate:"+e);break}var d=l&&!a;this.hls.trigger(h.default.MANIFEST_PARSED,{levels:i,audioTracks:n,firstLevel:this._firstLevel,stats:t.stats,audio:l,video:a,altAudio:!d&&n.some(function(t){return!!t.url})})}else this.hls.trigger(h.default.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:this.hls.url,reason:"no level with compatible codecs found in manifest"})},a.setLevelInternal=function(t){var e=this._levels,i=this.hls;if(t>=0&&t<e.length){if(this.clearTimer(),this.currentLevelIndex!==t){c.logger.log("switching to level "+t),this.currentLevelIndex=t;var n=e[t];n.level=t,i.trigger(h.default.LEVEL_SWITCHING,n)}var r=e[t],s=r.details;if(!s||s.live){var a=r.urlId;i.trigger(h.default.LEVEL_LOADING,{url:r.url[a],level:t,id:a})}}else i.trigger(h.default.ERROR,{type:o.ErrorTypes.OTHER_ERROR,details:o.ErrorDetails.LEVEL_SWITCH_ERROR,level:t,fatal:!1,reason:"invalid level idx"})},a.onError=function(t){if(t.fatal)t.type===o.ErrorTypes.NETWORK_ERROR&&this.clearTimer();else{var e,i=!1,n=!1;switch(t.details){case o.ErrorDetails.FRAG_LOAD_ERROR:case o.ErrorDetails.FRAG_LOAD_TIMEOUT:case o.ErrorDetails.KEY_LOAD_ERROR:case o.ErrorDetails.KEY_LOAD_TIMEOUT:e=t.frag.level,n=!0;break;case o.ErrorDetails.LEVEL_LOAD_ERROR:case o.ErrorDetails.LEVEL_LOAD_TIMEOUT:e=t.context.level,i=!0;break;case o.ErrorDetails.REMUX_ALLOC_ERROR:e=t.level,i=!0}void 0!==e&&this.recoverLevel(t,e,i,n)}},a.recoverLevel=function(t,e,i,n){var r,s,a,o=this,l=this.hls.config,h=t.details,u=this._levels[e];if(u.loadError++,u.fragmentError=n,i){if(!(this.levelRetryCount+1<=l.levelLoadingMaxRetry))return c.logger.error("level controller, cannot recover from "+h+" error"),this.currentLevelIndex=null,this.clearTimer(),void(t.fatal=!0);s=Math.min(Math.pow(2,this.levelRetryCount)*l.levelLoadingRetryDelay,l.levelLoadingMaxRetryTimeout),this.timer=setTimeout(function(){return o.loadLevel()},s),t.levelRetry=!0,this.levelRetryCount++,c.logger.warn("level controller, "+h+", retry in "+s+" ms, current retry count is "+this.levelRetryCount)}(i||n)&&((r=u.url.length)>1&&u.loadError<r?(u.urlId=(u.urlId+1)%r,u.details=void 0,c.logger.warn("level controller, "+h+" for level "+e+": switching to redundant URL-id "+u.urlId)):-1===this.manualLevelIndex?(a=0===e?this._levels.length-1:e-1,c.logger.warn("level controller, "+h+": switch to "+a),this.hls.nextAutoLevel=this.currentLevelIndex=a):n&&(c.logger.warn("level controller, "+h+": reload a fragment"),this.currentLevelIndex=null))},a.onFragLoaded=function(t){var e=t.frag;if(void 0!==e&&"main"===e.type){var i=this._levels[e.level];void 0!==i&&(i.fragmentError=!1,i.loadError=0,this.levelRetryCount=0)}},a.onLevelLoaded=function(t){var e=this,i=t.level,n=t.details;if(i===this.currentLevelIndex){var r=this._levels[i];if(r.fragmentError||(r.loadError=0,this.levelRetryCount=0),n.live){var s=st(r.details,n,t.stats.trequest);c.logger.log("live playlist, reload in "+Math.round(s)+" ms"),this.timer=setTimeout(function(){return e.loadLevel()},s)}else this.clearTimer()}},a.onAudioTrackSwitched=function(t){var e=this.hls.audioTracks[t.id].groupId,i=this.hls.levels[this.currentLevelIndex];if(i&&i.audioGroupIds){for(var n=-1,r=0;r<i.audioGroupIds.length;r++)if(i.audioGroupIds[r]===e){n=r;break}n!==i.urlId&&(i.urlId=n,this.startLoad())}},a.loadLevel=function(){if(c.logger.debug("call to loadLevel"),null!==this.currentLevelIndex&&this.canload){var t=this._levels[this.currentLevelIndex];if("object"==typeof t&&t.url.length>0){var e=this.currentLevelIndex,i=t.urlId,n=t.url[i];c.logger.log("Attempt loading level index "+e+" with URL-id "+i),this.hls.trigger(h.default.LEVEL_LOADING,{url:n,level:e,id:i})}}},a.removeLevel=function(t,e){var i=this.levels.filter(function(i,n){return n!==t||i.url.length>1&&void 0!==e&&(i.url=i.url.filter(function(t,i){return i!==e}),i.urlId=0,!0)}).map(function(t,e){var i=t.details;return i&&i.fragments&&i.fragments.forEach(function(t){t.level=e}),t});this._levels=i,this.hls.trigger(h.default.LEVELS_UPDATED,{levels:i})},r=n,(s=[{key:"levels",get:function(){return this._levels}},{key:"level",get:function(){return this.currentLevelIndex},set:function(t){var e=this._levels;e&&(t=Math.min(t,e.length-1),this.currentLevelIndex===t&&e[t].details||this.setLevelInternal(t))}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(t){this.manualLevelIndex=t,void 0===this._startLevel&&(this._startLevel=t),-1!==t&&(this.level=t)}},{key:"firstLevel",get:function(){return this._firstLevel},set:function(t){this._firstLevel=t}},{key:"startLevel",get:function(){if(void 0===this._startLevel){var t=this.hls.config.startLevel;return void 0!==t?t:this._firstLevel}return this._startLevel},set:function(t){this._startLevel=t}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(t){this.level=t,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=t)}}])&&It(r.prototype,s),n}(f),Ot=i("./src/demux/id3.js");function Bt(t,e){var i;try{i=new Event("addtrack")}catch(t){(i=document.createEvent("Event")).initEvent("addtrack",!1,!1)}i.track=t,e.dispatchEvent(i)}function Nt(t){if(null==t?void 0:t.cues)for(;t.cues.length>0;)t.removeCue(t.cues[0])}var Vt=function(t){var e,i;function n(e){var i;return(i=t.call(this,e,h.default.MEDIA_ATTACHED,h.default.MEDIA_DETACHING,h.default.FRAG_PARSING_METADATA,h.default.LIVE_BACK_BUFFER_REACHED)||this).id3Track=void 0,i.media=void 0,i}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r=n.prototype;return r.destroy=function(){f.prototype.destroy.call(this)},r.onMediaAttached=function(t){this.media=t.media,this.media},r.onMediaDetaching=function(){Nt(this.id3Track),this.id3Track=void 0,this.media=void 0},r.getID3Track=function(t){for(var e=0;e<t.length;e++){var i=t[e];if("metadata"===i.kind&&"id3"===i.label)return Bt(i,this.media),i}return this.media.addTextTrack("metadata","id3")},r.onFragParsingMetadata=function(t){var e=t.frag,i=t.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var n=window.WebKitDataCue||window.VTTCue||window.TextTrackCue,r=0;r<i.length;r++){var s=Ot.default.getID3Frames(i[r].data);if(s){var a=Math.max(i[r].pts,0),o=r<i.length-1?i[r+1].pts:e.endPTS;o||(o=e.start+e.duration),o-a<=0&&(o=a+.25);for(var l=0;l<s.length;l++){var h=s[l];if(!Ot.default.isTimeStampFrame(h)){var c=new n(a,o,"");c.value=h,this.id3Track.addCue(c)}}}}},r.onLiveBackBufferReached=function(t){var e=t.bufferEnd,i=this.id3Track;if(i&&i.cues&&i.cues.length){var n=function(t,e){if(e<t[0].endTime)return t[0];if(e>t[t.length-1].endTime)return t[t.length-1];for(var i=0,n=t.length-1;i<=n;){var r=Math.floor((n+i)/2);if(e<t[r].endTime)n=r-1;else{if(!(e>t[r].endTime))return t[r];i=r+1}}return t[i].endTime-e<e-t[n].endTime?t[i]:t[n]}(i.cues,e);if(n)for(;i.cues[0]!==n;)i.removeCue(i.cues[0])}},n}(f),zt=function(){function t(t){this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.alpha_=t?Math.exp(Math.log(.5)/t):0,this.estimate_=0,this.totalWeight_=0}var e=t.prototype;return e.sample=function(t,e){var i=Math.pow(this.alpha_,t);this.estimate_=e*(1-i)+i*this.estimate_,this.totalWeight_+=t},e.getTotalWeight=function(){return this.totalWeight_},e.getEstimate=function(){if(this.alpha_){var t=1-Math.pow(this.alpha_,this.totalWeight_);return this.estimate_/t}return this.estimate_},t}(),Ht=function(){function t(t,e,i,n){this.hls=void 0,this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.hls=t,this.defaultEstimate_=n,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new zt(e),this.fast_=new zt(i)}var e=t.prototype;return e.sample=function(t,e){var i=(t=Math.max(t,this.minDelayMs_))/1e3,n=8*e/i;this.fast_.sample(i,n),this.slow_.sample(i,n)},e.canEstimate=function(){var t=this.fast_;return t&&t.getTotalWeight()>=this.minWeight_},e.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},e.destroy=function(){},t}();function qt(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var Ut=window.performance,Gt=function(t){var e,i;function n(e){var i;return(i=t.call(this,e,h.default.FRAG_LOADING,h.default.FRAG_LOADED,h.default.FRAG_BUFFERED,h.default.ERROR)||this).lastLoadedFragLevel=0,i._nextAutoLevel=-1,i.hls=e,i.timer=null,i._bwEstimator=null,i.onCheck=i._abandonRulesCheck.bind(function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i)),i}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r,s,a=n.prototype;return a.destroy=function(){this.clearTimer(),f.prototype.destroy.call(this)},a.onFragLoading=function(t){var e=t.frag;if("main"===e.type&&(this.timer||(this.fragCurrent=e,this.timer=setInterval(this.onCheck,100)),!this._bwEstimator)){var i,n,r=this.hls,s=r.config,a=e.level;r.levels[a].details.live?(i=s.abrEwmaFastLive,n=s.abrEwmaSlowLive):(i=s.abrEwmaFastVoD,n=s.abrEwmaSlowVoD),this._bwEstimator=new Ht(r,n,i,s.abrEwmaDefaultEstimate)}},a._abandonRulesCheck=function(){var t=this.hls,e=t.media,i=this.fragCurrent;if(i){var n=i.loader;if(!n||n.stats&&n.stats.aborted)return c.logger.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),void(this._nextAutoLevel=-1);var r=n.stats;if(e&&r&&(!e.paused&&0!==e.playbackRate||!e.readyState)&&i.autoLevel&&i.level){var s=Ut.now()-r.trequest,a=Math.abs(e.playbackRate);if(s>500*i.duration/a){var o=t.levels,l=Math.max(1,r.bw?r.bw/8:1e3*r.loaded/s),u=o[i.level];if(!u)return;var d=u.realBitrate?Math.max(u.realBitrate,u.bitrate):u.bitrate,f=r.total?r.total:Math.max(r.loaded,Math.round(i.duration*d/8)),p=e.currentTime,m=(f-r.loaded)/l,g=(G.bufferInfo(e,p,t.config.maxBufferHole).end-p)/a;if(g<2*i.duration/a&&m>g){var y,v,b=t.minAutoLevel;for(v=i.level-1;v>b;v--){var S=o[v].realBitrate?Math.max(o[v].realBitrate,o[v].bitrate):o[v].bitrate;if(i.duration*S/(6.4*l)<g)break}y<m&&(c.logger.warn("loading too slow, abort fragment loading and switch to level "+v+":fragLoadedDelay["+v+"]<fragLoadedDelay["+(i.level-1)+"];bufferStarvationDelay:"+y.toFixed(1)+"<"+m.toFixed(1)+":"+g.toFixed(1)),t.nextLoadLevel=v,this._bwEstimator.sample(s,r.loaded),n.abort(),this.clearTimer(),t.trigger(h.default.FRAG_LOAD_EMERGENCY_ABORTED,{frag:i,stats:r}))}}}}},a.onFragLoaded=function(t){var e=t.frag;if("main"===e.type&&Object(l.isFiniteNumber)(e.sn)){if(this.clearTimer(),this.lastLoadedFragLevel=e.level,this._nextAutoLevel=-1,this.hls.config.abrMaxWithRealBitrate){var i=this.hls.levels[e.level],n=(i.loaded?i.loaded.bytes:0)+t.stats.loaded,r=(i.loaded?i.loaded.duration:0)+t.frag.duration;i.loaded={bytes:n,duration:r},i.realBitrate=Math.round(8*n/r)}if(t.frag.bitrateTest){var s=t.stats;s.tparsed=s.tbuffered=s.tload,this.onFragBuffered(t)}}},a.onFragBuffered=function(t){var e=t.stats,i=t.frag;if(!0!==e.aborted&&"main"===i.type&&Object(l.isFiniteNumber)(i.sn)&&(!i.bitrateTest||e.tload===e.tbuffered)){var n=e.tparsed-e.trequest;c.logger.log("latency/loading/parsing/append/kbps:"+Math.round(e.tfirst-e.trequest)+"/"+Math.round(e.tload-e.tfirst)+"/"+Math.round(e.tparsed-e.tload)+"/"+Math.round(e.tbuffered-e.tparsed)+"/"+Math.round(8*e.loaded/(e.tbuffered-e.trequest))),this._bwEstimator.sample(n,e.loaded),e.bwEstimate=this._bwEstimator.getEstimate(),i.bitrateTest?this.bitrateTestDelay=n/1e3:this.bitrateTestDelay=0}},a.onError=function(t){switch(t.details){case o.ErrorDetails.FRAG_LOAD_ERROR:case o.ErrorDetails.FRAG_LOAD_TIMEOUT:this.clearTimer()}},a.clearTimer=function(){clearInterval(this.timer),this.timer=null},a._findBestLevel=function(t,e,i,n,r,s,a,o,l){for(var h=r;h>=n;h--){var u=l[h];if(u){var d,f=u.details,p=f?f.totalduration/f.fragments.length:e,m=!!f&&f.live;d=h<=t?a*i:o*i;var g=l[h].realBitrate?Math.max(l[h].realBitrate,l[h].bitrate):l[h].bitrate,y=g*p/d;if(c.logger.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+h+"/"+Math.round(d)+"/"+g+"/"+p+"/"+s+"/"+y),d>g&&(!y||m&&!this.bitrateTestDelay||y<s))return h}}return-1},r=n,(s=[{key:"nextAutoLevel",get:function(){var t=this._nextAutoLevel,e=this._bwEstimator;if(!(-1===t||e&&e.canEstimate()))return t;var i=this._nextABRAutoLevel;return-1!==t&&(i=Math.min(t,i)),i},set:function(t){this._nextAutoLevel=t}},{key:"_nextABRAutoLevel",get:function(){var t=this.hls,e=t.maxAutoLevel,i=t.levels,n=t.config,r=t.minAutoLevel,s=t.media,a=this.lastLoadedFragLevel,o=this.fragCurrent?this.fragCurrent.duration:0,l=s?s.currentTime:0,h=s&&0!==s.playbackRate?Math.abs(s.playbackRate):1,u=this._bwEstimator?this._bwEstimator.getEstimate():n.abrEwmaDefaultEstimate,d=(G.bufferInfo(s,l,n.maxBufferHole).end-l)/h,f=this._findBestLevel(a,o,u,r,e,d,n.abrBandWidthFactor,n.abrBandWidthUpFactor,i);if(f>=0)return f;c.logger.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var p=o?Math.min(o,n.maxStarvationDelay):n.maxStarvationDelay,m=n.abrBandWidthFactor,g=n.abrBandWidthUpFactor;if(0===d){var y=this.bitrateTestDelay;y&&(p=(o?Math.min(o,n.maxLoadingDelay):n.maxLoadingDelay)-y,c.logger.trace("bitrate test took "+Math.round(1e3*y)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*p)+" ms"),m=g=1)}return f=this._findBestLevel(a,o,u,r,e,d+p,m,g,i),Math.max(f,0)}}])&&qt(r.prototype,s),n}(f),jt=Y(),Wt=function(t){var e,i;function n(e){var i;return(i=t.call(this,e,h.default.MEDIA_ATTACHING,h.default.MEDIA_DETACHING,h.default.MANIFEST_PARSED,h.default.BUFFER_RESET,h.default.BUFFER_APPENDING,h.default.BUFFER_CODECS,h.default.BUFFER_EOS,h.default.BUFFER_FLUSHING,h.default.LEVEL_PTS_UPDATED,h.default.LEVEL_UPDATED)||this)._msDuration=null,i._levelDuration=null,i._levelTargetDuration=10,i._live=null,i._objectUrl=null,i._needsFlush=!1,i._needsEos=!1,i.config=void 0,i.audioTimestampOffset=void 0,i.bufferCodecEventsExpected=0,i._bufferCodecEventsTotal=0,i.media=null,i.mediaSource=null,i.segments=[],i.parent=void 0,i.appending=!1,i.appended=0,i.appendError=0,i.flushBufferCounter=0,i.tracks={},i.pendingTracks={},i.sourceBuffer={},i.flushRange=[],i._onMediaSourceOpen=function(){c.logger.log("media source opened"),i.hls.trigger(h.default.MEDIA_ATTACHED,{media:i.media});var t=i.mediaSource;t&&t.removeEventListener("sourceopen",i._onMediaSourceOpen),i.checkPendingTracks()},i._onMediaSourceClose=function(){c.logger.log("media source closed")},i._onMediaSourceEnded=function(){c.logger.log("media source ended")},i._onSBUpdateEnd=function(){if(i.audioTimestampOffset&&i.sourceBuffer.audio){var t=i.sourceBuffer.audio;c.logger.warn("change mpeg audio timestamp offset from "+t.timestampOffset+" to "+i.audioTimestampOffset),t.timestampOffset=i.audioTimestampOffset,delete i.audioTimestampOffset}i._needsFlush&&i.doFlush(),i._needsEos&&i.checkEos(),i.appending=!1;var e=i.parent,n=i.segments.reduce(function(t,i){return i.parent===e?t+1:t},0),r={},s=i.sourceBuffer;for(var a in s){var o=s[a];if(!o)throw Error("handling source buffer update end error: source buffer for "+a+" uninitilized and unable to update buffered TimeRanges.");r[a]=o.buffered}i.hls.trigger(h.default.BUFFER_APPENDED,{parent:e,pending:n,timeRanges:r}),i._needsFlush||i.doAppending(),i.updateMediaElementDuration(),0===n&&i.flushLiveBackBuffer()},i._onSBUpdateError=function(t){c.logger.error("sourceBuffer error:",t),i.hls.trigger(h.default.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_APPENDING_ERROR,fatal:!1})},i.config=e.config,i}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r=n.prototype;return r.destroy=function(){f.prototype.destroy.call(this)},r.onLevelPtsUpdated=function(t){var e=t.type,i=this.tracks.audio;if("audio"===e&&i&&"audio/mpeg"===i.container){var n=this.sourceBuffer.audio;if(!n)throw Error("Level PTS Updated and source buffer for audio uninitalized");if(Math.abs(n.timestampOffset-t.start)>.1){var r=n.updating;try{n.abort()}catch(t){c.logger.warn("can not abort audio buffer: "+t)}r?this.audioTimestampOffset=t.start:(c.logger.warn("change mpeg audio timestamp offset from "+n.timestampOffset+" to "+t.start),n.timestampOffset=t.start)}}},r.onManifestParsed=function(t){var e=2;(t.audio&&!t.video||!t.altAudio)&&(e=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=e,c.logger.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},r.onMediaAttaching=function(t){var e=this.media=t.media;if(e&&jt){var i=this.mediaSource=new jt;i.addEventListener("sourceopen",this._onMediaSourceOpen),i.addEventListener("sourceended",this._onMediaSourceEnded),i.addEventListener("sourceclose",this._onMediaSourceClose),e.src=window.URL.createObjectURL(i),this._objectUrl=e.src}},r.onMediaDetaching=function(){c.logger.log("media source detaching");var t=this.mediaSource;if(t){if("open"===t.readyState)try{t.endOfStream()}catch(t){c.logger.warn("onMediaDetaching:"+t.message+" while calling endOfStream")}t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),this.media&&(this._objectUrl&&window.URL.revokeObjectURL(this._objectUrl),this.media.src===this._objectUrl?(this.media.removeAttribute("src"),this.media.load()):c.logger.warn("media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.hls.trigger(h.default.MEDIA_DETACHED)},r.checkPendingTracks=function(){var t=this.bufferCodecEventsExpected,e=this.pendingTracks,i=Object.keys(e).length;(i&&!t||2===i)&&(this.createSourceBuffers(e),this.pendingTracks={},this.doAppending())},r.onBufferReset=function(){var t=this.sourceBuffer;for(var e in t){var i=t[e];try{i&&(this.mediaSource&&this.mediaSource.removeSourceBuffer(i),i.removeEventListener("updateend",this._onSBUpdateEnd),i.removeEventListener("error",this._onSBUpdateError))}catch(t){}}this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0},r.onBufferCodecs=function(t){var e=this;Object.keys(this.sourceBuffer).length||(Object.keys(t).forEach(function(i){e.pendingTracks[i]=t[i]}),this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())},r.createSourceBuffers=function(t){var e=this.sourceBuffer,i=this.mediaSource;if(!i)throw Error("createSourceBuffers called when mediaSource was null");for(var n in t)if(!e[n]){var r=t[n];if(!r)throw Error("source buffer exists for track "+n+", however track does not");var s=r.levelCodec||r.codec,a=r.container+";codecs="+s;c.logger.log("creating sourceBuffer("+a+")");try{var l=e[n]=i.addSourceBuffer(a);l.addEventListener("updateend",this._onSBUpdateEnd),l.addEventListener("error",this._onSBUpdateError),this.tracks[n]={buffer:l,codec:s,id:r.id,container:r.container,levelCodec:r.levelCodec}}catch(t){c.logger.error("error while trying to add sourceBuffer:"+t.message),this.hls.trigger(h.default.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:t,mimeType:a})}}this.hls.trigger(h.default.BUFFER_CREATED,{tracks:this.tracks})},r.onBufferAppending=function(t){this._needsFlush||(this.segments?this.segments.push(t):this.segments=[t],this.doAppending())},r.onBufferEos=function(t){for(var e in this.sourceBuffer)if(!t.type||t.type===e){var i=this.sourceBuffer[e];i&&!i.ended&&(i.ended=!0,c.logger.log(e+" sourceBuffer now EOS"))}this.checkEos()},r.checkEos=function(){var t=this.sourceBuffer,e=this.mediaSource;if(e&&"open"===e.readyState){for(var i in t){var n=t[i];if(n){if(!n.ended)return;if(n.updating)return void(this._needsEos=!0)}}c.logger.log("all media data are available, signal endOfStream() to MediaSource and stop loading fragment");try{e.endOfStream()}catch(t){c.logger.warn("exception while calling mediaSource.endOfStream()")}this._needsEos=!1}else this._needsEos=!1},r.onBufferFlushing=function(t){t.type?this.flushRange.push({start:t.startOffset,end:t.endOffset,type:t.type}):(this.flushRange.push({start:t.startOffset,end:t.endOffset,type:"video"}),this.flushRange.push({start:t.startOffset,end:t.endOffset,type:"audio"})),this.flushBufferCounter=0,this.doFlush()},r.flushLiveBackBuffer=function(){if(this._live){var t=this.config.liveBackBufferLength;if(isFinite(t)&&!(t<0))if(this.media)for(var e=this.media.currentTime,i=this.sourceBuffer,n=Object.keys(i),r=e-Math.max(t,this._levelTargetDuration),s=n.length-1;s>=0;s--){var a=n[s],o=i[a];if(o){var l=o.buffered;l.length>0&&r>l.start(0)&&this.removeBufferRange(a,o,0,r)&&this.hls.trigger(h.default.LIVE_BACK_BUFFER_REACHED,{bufferEnd:r})}}else c.logger.error("flushLiveBackBuffer called without attaching media")}},r.onLevelUpdated=function(t){var e=t.details;e.fragments.length>0&&(this._levelDuration=e.totalduration+e.fragments[0].start,this._levelTargetDuration=e.averagetargetduration||e.targetduration||10,this._live=e.live,this.updateMediaElementDuration())},r.updateMediaElementDuration=function(){var t,e=this.config;if(null!==this._levelDuration&&this.media&&this.mediaSource&&this.sourceBuffer&&0!==this.media.readyState&&"open"===this.mediaSource.readyState){for(var i in this.sourceBuffer){var n=this.sourceBuffer[i];if(n&&!0===n.updating)return}t=this.media.duration,null===this._msDuration&&(this._msDuration=this.mediaSource.duration),!0===this._live&&!0===e.liveDurationInfinity?(c.logger.log("Media Source duration is set to Infinity"),this._msDuration=this.mediaSource.duration=1/0):(this._levelDuration>this._msDuration&&this._levelDuration>t||!Object(l.isFiniteNumber)(t))&&(c.logger.log("Updating Media Source duration to "+this._levelDuration.toFixed(3)),this._msDuration=this.mediaSource.duration=this._levelDuration)}},r.doFlush=function(){for(;this.flushRange.length;){var t=this.flushRange[0];if(!this.flushBuffer(t.start,t.end,t.type))return void(this._needsFlush=!0);this.flushRange.shift(),this.flushBufferCounter=0}if(0===this.flushRange.length){this._needsFlush=!1;var e=0,i=this.sourceBuffer;try{for(var n in i){var r=i[n];r&&(e+=r.buffered.length)}}catch(t){c.logger.error("error while accessing sourceBuffer.buffered")}this.appended=e,this.hls.trigger(h.default.BUFFER_FLUSHED)}},r.doAppending=function(){var t=this.config,e=this.hls,i=this.segments,n=this.sourceBuffer;if(Object.keys(n).length){if(!this.media||this.media.error)return this.segments=[],void c.logger.error("trying to append although a media error occured, flush segment and abort");if(!this.appending){var r=i.shift();if(r)try{var s=n[r.type];if(!s)return void this._onSBUpdateEnd();if(s.updating)return void i.unshift(r);s.ended=!1,this.parent=r.parent,s.appendBuffer(r.data),this.appendError=0,this.appended++,this.appending=!0}catch(n){c.logger.error("error while trying to append buffer:"+n.message),i.unshift(r);var a={type:o.ErrorTypes.MEDIA_ERROR,parent:r.parent,details:"",fatal:!1};22===n.code?(this.segments=[],a.details=o.ErrorDetails.BUFFER_FULL_ERROR):(this.appendError++,a.details=o.ErrorDetails.BUFFER_APPEND_ERROR,this.appendError>t.appendErrorMaxRetry&&(c.logger.log("fail "+t.appendErrorMaxRetry+" times to append segment in sourceBuffer"),this.segments=[],a.fatal=!0)),e.trigger(h.default.ERROR,a)}}}},r.flushBuffer=function(t,e,i){var n=this.sourceBuffer;if(!Object.keys(n).length)return!0;var r="null";if(this.media&&(r=this.media.currentTime.toFixed(3)),c.logger.log("flushBuffer,pos/start/end: "+r+"/"+t+"/"+e),this.flushBufferCounter>=this.appended)return c.logger.warn("abort flushing too many retries"),!0;var s=n[i];if(s){if(s.ended=!1,s.updating)return c.logger.warn("cannot flush, sb updating in progress"),!1;if(this.removeBufferRange(i,s,t,e))return this.flushBufferCounter++,!1}return c.logger.log("buffer flushed"),!0},r.removeBufferRange=function(t,e,i,n){try{for(var r=0;r<e.buffered.length;r++){var s=e.buffered.start(r),a=e.buffered.end(r),o=Math.max(s,i),l=Math.min(a,n);if(Math.min(l,a)-o>.5){var h="null";return this.media&&(h=this.media.currentTime.toString()),c.logger.log("sb remove "+t+" ["+o+","+l+"], of ["+s+","+a+"], pos:"+h),e.remove(o,l),!0}}}catch(t){c.logger.warn("removeBufferRange failed",t)}return!1},n}(f);function $t(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var Yt=function(t){var e,i;function n(e){var i;return(i=t.call(this,e,h.default.FPS_DROP_LEVEL_CAPPING,h.default.MEDIA_ATTACHING,h.default.MANIFEST_PARSED,h.default.LEVELS_UPDATED,h.default.BUFFER_CODECS,h.default.MEDIA_DETACHING)||this).autoLevelCapping=Number.POSITIVE_INFINITY,i.firstLevel=null,i.levels=[],i.media=null,i.restrictedLevels=[],i.timer=null,i.clientRect=null,i}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r,s,a,o=n.prototype;return o.destroy=function(){this.hls.config.capLevelToPlayerSize&&(this.media=null,this.clientRect=null,this.stopCapping())},o.onFpsDropLevelCapping=function(t){n.isLevelAllowed(t.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(t.droppedLevel)},o.onMediaAttaching=function(t){this.media=t.media instanceof window.HTMLVideoElement?t.media:null},o.onManifestParsed=function(t){var e=this.hls;this.restrictedLevels=[],this.levels=t.levels,this.firstLevel=t.firstLevel,e.config.capLevelToPlayerSize&&t.video&&this.startCapping()},o.onBufferCodecs=function(t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()},o.onLevelsUpdated=function(t){this.levels=t.levels},o.onMediaDetaching=function(){this.stopCapping()},o.detectPlayerSize=function(){if(this.media){var t=this.levels?this.levels.length:0;if(t){var e=this.hls;e.autoLevelCapping=this.getMaxLevel(t-1),e.autoLevelCapping>this.autoLevelCapping&&e.streamController.nextLevelSwitch(),this.autoLevelCapping=e.autoLevelCapping}}},o.getMaxLevel=function(t){var e=this;if(!this.levels)return-1;var i=this.levels.filter(function(i,r){return n.isLevelAllowed(r,e.restrictedLevels)&&r<=t});return this.clientRect=null,n.getMaxLevelByMediaSize(i,this.mediaWidth,this.mediaHeight)},o.startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),clearInterval(this.timer),this.timer=setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},o.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=null,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(this.timer=clearInterval(this.timer),this.timer=null)},o.getDimensions=function(){if(this.clientRect)return this.clientRect;var t=this.media,e={width:0,height:0};if(t){var i=t.getBoundingClientRect();e.width=i.width,e.height=i.height,e.width||e.height||(e.width=i.right-i.left||t.width||0,e.height=i.bottom-i.top||t.height||0)}return this.clientRect=e,e},n.isLevelAllowed=function(t,e){return void 0===e&&(e=[]),-1===e.indexOf(t)},n.getMaxLevelByMediaSize=function(t,e,i){if(!t||t&&!t.length)return-1;for(var n=function(t,e){return!e||t.width!==e.width||t.height!==e.height},r=t.length-1,s=0;s<t.length;s+=1){var a=t[s];if((a.width>=e||a.height>=i)&&n(a,t[s+1])){r=s;break}}return r},r=n,a=[{key:"contentScaleFactor",get:function(){var t=1;try{t=window.devicePixelRatio}catch(t){}return t}}],(s=[{key:"mediaWidth",get:function(){return this.getDimensions().width*n.contentScaleFactor}},{key:"mediaHeight",get:function(){return this.getDimensions().height*n.contentScaleFactor}}])&&$t(r.prototype,s),a&&$t(r,a),n}(f),Kt=window.performance,Xt=function(t){var e,i;function n(e){return t.call(this,e,h.default.MEDIA_ATTACHING)||this}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r=n.prototype;return r.destroy=function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1},r.onMediaAttaching=function(t){var e=this.hls.config;e.capLevelOnFPSDrop&&("function"==typeof(this.video=t.media instanceof window.HTMLVideoElement?t.media:null).getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),clearInterval(this.timer),this.timer=setInterval(this.checkFPSInterval.bind(this),e.fpsDroppedMonitoringPeriod))},r.checkFPS=function(t,e,i){var n=Kt.now();if(e){if(this.lastTime){var r=n-this.lastTime,s=i-this.lastDroppedFrames,a=e-this.lastDecodedFrames,o=1e3*s/r,l=this.hls;if(l.trigger(h.default.FPS_DROP,{currentDropped:s,currentDecoded:a,totalDroppedFrames:i}),o>0&&s>l.config.fpsDroppedMonitoringThreshold*a){var u=l.currentLevel;c.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+u),u>0&&(-1===l.autoLevelCapping||l.autoLevelCapping>=u)&&(u-=1,l.trigger(h.default.FPS_DROP_LEVEL_CAPPING,{level:u,droppedLevel:l.currentLevel}),l.autoLevelCapping=u,l.streamController.nextLevelSwitch())}}this.lastTime=n,this.lastDroppedFrames=i,this.lastDecodedFrames=e}},r.checkFPSInterval=function(){var t=this.video;if(t)if(this.isVideoPlaybackQualityAvailable){var e=t.getVideoPlaybackQuality();this.checkFPS(t,e.totalVideoFrames,e.droppedVideoFrames)}else this.checkFPS(t,t.webkitDecodedFrameCount,t.webkitDroppedFrameCount)},n}(f),Jt=function(){function t(t){t&&t.xhrSetup&&(this.xhrSetup=t.xhrSetup)}var e=t.prototype;return e.destroy=function(){this.abort(),this.loader=null},e.abort=function(){var t=this.loader;t&&4!==t.readyState&&(this.stats.aborted=!0,t.abort()),window.clearTimeout(this.requestTimeout),this.requestTimeout=null,window.clearTimeout(this.retryTimeout),this.retryTimeout=null},e.load=function(t,e,i){this.context=t,this.config=e,this.callbacks=i,this.stats={trequest:window.performance.now(),retry:0},this.retryDelay=e.retryDelay,this.loadInternal()},e.loadInternal=function(){var t,e=this.context;t=this.loader=new window.XMLHttpRequest;var i=this.stats;i.tfirst=0,i.loaded=0;var n=this.xhrSetup;try{if(n)try{n(t,e.url)}catch(i){t.open("GET",e.url,!0),n(t,e.url)}t.readyState||t.open("GET",e.url,!0)}catch(i){return void this.callbacks.onError({code:t.status,text:i.message},e,t)}e.rangeEnd&&t.setRequestHeader("Range","bytes="+e.rangeStart+"-"+(e.rangeEnd-1)),t.onreadystatechange=this.readystatechange.bind(this),t.onprogress=this.loadprogress.bind(this),t.responseType=e.responseType,this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),t.send()},e.readystatechange=function(t){var e=t.currentTarget,i=e.readyState,n=this.stats,r=this.context,s=this.config;if(!n.aborted&&i>=2)if(window.clearTimeout(this.requestTimeout),0===n.tfirst&&(n.tfirst=Math.max(window.performance.now(),n.trequest)),4===i){var a=e.status;if(a>=200&&a<300){var o,l;n.tload=Math.max(n.tfirst,window.performance.now()),l="arraybuffer"===r.responseType?(o=e.response).byteLength:(o=e.responseText).length,n.loaded=n.total=l;var h={url:e.responseURL,data:o};this.callbacks.onSuccess(h,n,r,e)}else n.retry>=s.maxRetry||a>=400&&a<499?(c.logger.error(a+" while loading "+r.url),this.callbacks.onError({code:a,text:e.statusText},r,e)):(c.logger.warn(a+" while loading "+r.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,s.maxRetryDelay),n.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),s.timeout)},e.loadtimeout=function(){c.logger.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context,null)},e.loadprogress=function(t){var e=t.currentTarget,i=this.stats;i.loaded=t.loaded,t.lengthComputable&&(i.total=t.total);var n=this.callbacks.onProgress;n&&n(i,this.context,null,e)},t}();function Qt(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var Zt=function(t){var e,i;function n(e){var i;return(i=t.call(this,e,h.default.MANIFEST_LOADING,h.default.MANIFEST_PARSED,h.default.AUDIO_TRACK_LOADED,h.default.AUDIO_TRACK_SWITCHED,h.default.LEVEL_LOADED,h.default.ERROR)||this)._trackId=-1,i._selectDefaultTrack=!0,i.tracks=[],i.trackIdBlacklist=Object.create(null),i.audioGroupId=null,i}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r,s,a=n.prototype;return a.onManifestLoading=function(){this.tracks=[],this._trackId=-1,this._selectDefaultTrack=!0},a.onManifestParsed=function(t){var e=this.tracks=t.audioTracks||[];this.hls.trigger(h.default.AUDIO_TRACKS_UPDATED,{audioTracks:e}),this._selectAudioGroup(this.hls.nextLoadLevel)},a.onAudioTrackLoaded=function(t){if(t.id>=this.tracks.length)c.logger.warn("Invalid audio track id:",t.id);else{if(c.logger.log("audioTrack "+t.id+" loaded"),this.tracks[t.id].details=t.details,t.details.live&&!this.hasInterval()){var e=1e3*t.details.targetduration;this.setInterval(e)}!t.details.live&&this.hasInterval()&&this.clearInterval()}},a.onAudioTrackSwitched=function(t){var e=this.tracks[t.id].groupId;e&&this.audioGroupId!==e&&(this.audioGroupId=e)},a.onLevelLoaded=function(t){this._selectAudioGroup(t.level)},a.onError=function(t){t.type===o.ErrorTypes.NETWORK_ERROR&&(t.fatal&&this.clearInterval(),t.details===o.ErrorDetails.AUDIO_TRACK_LOAD_ERROR&&(c.logger.warn("Network failure on audio-track id:",t.context.id),this._handleLoadError()))},a._setAudioTrack=function(t){if(this._trackId===t&&this.tracks[this._trackId].details)c.logger.debug("Same id as current audio-track passed, and track details available -> no-op");else if(t<0||t>=this.tracks.length)c.logger.warn("Invalid id passed to audio-track controller");else{var e=this.tracks[t];c.logger.log("Now switching to audio-track index "+t),this.clearInterval(),this._trackId=t;var i=e.url,n=e.type,r=e.id;this.hls.trigger(h.default.AUDIO_TRACK_SWITCHING,{id:r,type:n,url:i}),this._loadTrackDetailsIfNeeded(e)}},a.doTick=function(){this._updateTrack(this._trackId)},a._selectAudioGroup=function(t){var e=this.hls.levels[t];if(e&&e.audioGroupIds){var i=e.audioGroupIds[e.urlId];this.audioGroupId!==i&&(this.audioGroupId=i,this._selectInitialAudioTrack())}},a._selectInitialAudioTrack=function(){var t=this,e=this.tracks;if(e.length){var i=this.tracks[this._trackId],n=null;if(i&&(n=i.name),this._selectDefaultTrack){var r=e.filter(function(t){return t.default});r.length?e=r:c.logger.warn("No default audio tracks defined")}var s=!1,a=function(){e.forEach(function(e){s||t.audioGroupId&&e.groupId!==t.audioGroupId||n&&n!==e.name||(t._setAudioTrack(e.id),s=!0)})};a(),s||(n=null,a()),s||(c.logger.error("No track found for running audio group-ID: "+this.audioGroupId),this.hls.trigger(h.default.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:o.ErrorDetails.AUDIO_TRACK_LOAD_ERROR,fatal:!0}))}},a._needsTrackLoading=function(t){var e=t.details,i=t.url;return!(e&&!e.live||!i)},a._loadTrackDetailsIfNeeded=function(t){if(this._needsTrackLoading(t)){var e=t.url,i=t.id;c.logger.log("loading audio-track playlist for id: "+i),this.hls.trigger(h.default.AUDIO_TRACK_LOADING,{url:e,id:i})}},a._updateTrack=function(t){if(!(t<0||t>=this.tracks.length)){this.clearInterval(),this._trackId=t,c.logger.log("trying to update audio-track "+t);var e=this.tracks[t];this._loadTrackDetailsIfNeeded(e)}},a._handleLoadError=function(){this.trackIdBlacklist[this._trackId]=!0;var t=this._trackId,e=this.tracks[t],i=e.name,n=e.language,r=e.groupId;c.logger.warn("Loading failed on audio track id: "+t+", group-id: "+r+', name/language: "'+i+'" / "'+n+'"');for(var s=t,a=0;a<this.tracks.length;a++)if(!this.trackIdBlacklist[a]&&this.tracks[a].name===i){s=a;break}s!==t?(c.logger.log("Attempting audio-track fallback id:",s,"group-id:",this.tracks[s].groupId),this._setAudioTrack(s)):c.logger.warn('No fallback audio-track found for name/language: "'+i+'" / "'+n+'"')},r=n,(s=[{key:"audioTracks",get:function(){return this.tracks}},{key:"audioTrack",get:function(){return this._trackId},set:function(t){this._setAudioTrack(t),this._selectDefaultTrack=!1}}])&&Qt(r.prototype,s),n}(pt);function te(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var ee=window.performance,ie=function(t){var e,i;function n(e,i){var n;return(n=t.call(this,e,h.default.MEDIA_ATTACHED,h.default.MEDIA_DETACHING,h.default.AUDIO_TRACKS_UPDATED,h.default.AUDIO_TRACK_SWITCHING,h.default.AUDIO_TRACK_LOADED,h.default.KEY_LOADED,h.default.FRAG_LOADED,h.default.FRAG_PARSING_INIT_SEGMENT,h.default.FRAG_PARSING_DATA,h.default.FRAG_PARSED,h.default.ERROR,h.default.BUFFER_RESET,h.default.BUFFER_CREATED,h.default.BUFFER_APPENDED,h.default.BUFFER_FLUSHED,h.default.INIT_PTS_FOUND)||this).fragmentTracker=i,n.config=e.config,n.audioCodecSwap=!1,n._state=mt,n.initPTS=[],n.waitingFragment=null,n.videoTrackCC=null,n.waitingVideoCC=null,n}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r,s,a=n.prototype;return a.onInitPtsFound=function(t){var e=t.id,i=t.frag.cc,n=t.initPTS;"main"===e&&(this.initPTS[i]=n,this.videoTrackCC=i,c.logger.log("InitPTS for cc: "+i+" found from main: "+n),this.state===At&&this.tick())},a.startLoad=function(t){if(this.tracks){var e=this.lastCurrentTime;this.stopLoad(),this.setInterval(100),this.fragLoadError=0,e>0&&-1===t?(c.logger.log("audio:override startPosition with lastCurrentTime @"+e.toFixed(3)),this.state=yt):(this.lastCurrentTime=this.startPosition?this.startPosition:t,this.state=gt),this.nextLoadPosition=this.startPosition=this.lastCurrentTime,this.tick()}else this.startPosition=t,this.state=mt},a.doTick=function(){var t,e,i,n=this.hls,r=n.config;switch(this.state){case Tt:case vt:case _t:break;case gt:this.state=kt,this.loadedmetadata=!1;break;case yt:var s=this.tracks;if(!s)break;if(!this.media&&(this.startFragRequested||!r.startFragPrefetch))break;if(this.loadedmetadata)t=this.media.currentTime;else if(void 0===(t=this.nextLoadPosition))break;var a=this.mediaBuffer?this.mediaBuffer:this.media,o=this.videoBuffer?this.videoBuffer:this.media,u=t<r.maxBufferHole?Math.max(2,r.maxBufferHole):r.maxBufferHole,d=G.bufferInfo(a,t,u),f=G.bufferInfo(o,t,u),p=d.len,m=d.end,g=this.fragPrevious,y=Math.min(r.maxBufferLength,r.maxMaxBufferLength),v=Math.max(y,f.len),b=this.audioSwitch,S=this.trackId;if((p<v||b)&&S<s.length){if(void 0===(i=s[S].details)){this.state=kt;break}if(!b&&this._streamEnded(d,i))return this.hls.trigger(h.default.BUFFER_EOS,{type:"audio"}),void(this.state=Ct);var E,k=i.fragments,x=k.length,w=k[0].start,_=k[x-1].start+k[x-1].duration;if(b)if(i.live&&!i.PTSKnown)c.logger.log("switching audiotrack, live stream, unknown PTS,load first fragment"),m=0;else if(m=t,i.PTSKnown&&t<w){if(!(d.end>w||d.nextStart))return;c.logger.log("alt audio track ahead of main track, seek to start of alt audio track"),this.media.currentTime=w+.05}if(i.initSegment&&!i.initSegment.data)E=i.initSegment;else if(m<=w){if(E=k[0],null!==this.videoTrackCC&&E.cc!==this.videoTrackCC&&(E=function(t,e){return U(t,function(t){return t.cc<e?1:t.cc>e?-1:0})}(k,this.videoTrackCC)),i.live&&E.loadIdx&&E.loadIdx===this.fragLoadIdx){var C=d.nextStart?d.nextStart:w;return c.logger.log("no alt audio available @currentTime:"+this.media.currentTime+", seeking @"+(C+.05)),void(this.media.currentTime=C+.05)}}else{var T,A=r.maxFragLookUpTolerance,P=g?k[g.sn-k[0].sn+1]:void 0;m<_?(m>_-A&&(A=0),T=P&&!ut(m,A,P)?P:U(k,function(t){return ut(m,A,t)})):T=k[x-1],T&&(E=T,w=T.start,g&&E.level===g.level&&E.sn===g.sn&&(E.sn<i.endSN?(E=k[E.sn+1-i.startSN],this.fragmentTracker.getState(E)!==H&&c.logger.log("SN just loaded, load next one: "+E.sn)):E=null))}E&&(E.encrypted?(c.logger.log("Loading key for "+E.sn+" of ["+i.startSN+" ,"+i.endSN+"],track "+S),this.state=bt,n.trigger(h.default.KEY_LOADING,{frag:E})):(this.fragCurrent=E,(b||this.fragmentTracker.getState(E)===N)&&(c.logger.log("Loading "+E.sn+", cc: "+E.cc+" of ["+i.startSN+" ,"+i.endSN+"],track "+S+", "+(this.loadedmetadata?"currentTime":"nextLoadPosition")+": "+t+", bufferEnd: "+m.toFixed(3)),"initSegment"!==E.sn&&(this.startFragRequested=!0),Object(l.isFiniteNumber)(E.sn)&&(this.nextLoadPosition=E.start+E.duration),n.trigger(h.default.FRAG_LOADING,{frag:E}),this.state=St)))}break;case kt:(e=this.tracks[this.trackId])&&e.details&&(this.state=yt);break;case Et:var D=ee.now(),M=this.retryDate,L=(a=this.media)&&a.seeking;(!M||D>=M||L)&&(c.logger.log("audioStreamController: retryDate reached, switch back to IDLE state"),this.state=yt);break;case At:var R=this.waitingFragment;if(R){var I=R.frag.cc;if(void 0!==this.initPTS[I])this.waitingFragment=null,this.state=St,this.onFragLoaded(R);else if(this.videoTrackCC!==this.waitingVideoCC)c.logger.log("Waiting fragment cc ("+I+") cancelled because video is at cc "+this.videoTrackCC),this.clearWaitingFragment();else{var F=G.bufferInfo(this.mediaBuffer,this.media.currentTime,r.maxBufferHole);ut(F.end,r.maxFragLookUpTolerance,R.frag)<0&&(c.logger.log("Waiting fragment cc ("+I+") @ "+R.frag.start+" cancelled because another fragment at "+F.end+" is needed"),this.clearWaitingFragment())}}else this.state=yt}},a.clearWaitingFragment=function(){var t=this.waitingFragment;t&&(this.fragmentTracker.removeFragment(t.frag),this.waitingFragment=null,this.waitingVideoCC=null,this.state=yt)},a.onMediaAttached=function(t){var e=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),e.addEventListener("seeking",this.onvseeking),e.addEventListener("ended",this.onvended);var i=this.config;this.tracks&&i.autoStartLoad&&this.startLoad(i.startPosition)},a.onMediaDetaching=function(){var t=this.media;t&&t.ended&&(c.logger.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),t&&(t.removeEventListener("seeking",this.onvseeking),t.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.media=this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()},a.onAudioTracksUpdated=function(t){c.logger.log("audio tracks updated"),this.tracks=t.audioTracks},a.onAudioTrackSwitching=function(t){var e=!!t.url;this.trackId=t.id,this.fragCurrent=null,this.clearWaitingFragment(),this.state=vt,e?this.setInterval(100):this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),e&&(this.audioSwitch=!0,this.state=yt),this.tick()},a.onAudioTrackLoaded=function(t){var e=t.details,i=t.id,n=this.tracks[i],r=n.details,s=e.totalduration,a=0;if(c.logger.log("track "+i+" loaded ["+e.startSN+","+e.endSN+"],duration:"+s),e.live||r&&r.live?r&&e.fragments.length>0?(nt(r,e),a=e.fragments[0].start,e.PTSKnown?c.logger.log("live audio playlist sliding:"+a.toFixed(3)):c.logger.log("live audio playlist - outdated PTS, unknown sliding")):(e.PTSKnown=!1,c.logger.log("live audio playlist - first load, unknown sliding")):e.PTSKnown=!1,n.details=e,!this.startFragRequested){if(-1===this.startPosition){var o=e.startTimeOffset;Object(l.isFiniteNumber)(o)?(c.logger.log("start time offset found in playlist, adjust startPosition to "+o),this.startPosition=o):e.live?(this.startPosition=this.computeLivePosition(a,e),c.logger.log("compute startPosition for audio-track to "+this.startPosition)):this.startPosition=0}this.nextLoadPosition=this.startPosition}this.state===kt&&(this.state=yt),this.tick()},a.onKeyLoaded=function(){this.state===bt&&(this.state=yt,this.tick())},a.onFragLoaded=function(t){var e=this.fragCurrent,i=t.frag;if(this.state===St&&e&&"audio"===i.type&&i.level===e.level&&i.sn===e.sn){var n=this.tracks[this.trackId],r=n.details,s=r.totalduration,a=e.level,o=e.sn,l=e.cc,u=this.config.defaultAudioCodec||n.audioCodec||"mp4a.40.2",d=this.stats=t.stats;if("initSegment"===o)this.state=yt,d.tparsed=d.tbuffered=ee.now(),r.initSegment.data=t.payload,this.hls.trigger(h.default.FRAG_BUFFERED,{stats:d,frag:e,id:"audio"}),this.tick();else{this.state=xt,this.appended=!1,this.demuxer||(this.demuxer=new Z(this.hls,"audio"));var f=this.initPTS[l],p=r.initSegment?r.initSegment.data:[];void 0!==f?(this.pendingBuffering=!0,c.logger.log("Demuxing "+o+" of ["+r.startSN+" ,"+r.endSN+"],track "+a),this.demuxer.push(t.payload,p,u,null,e,s,!1,f)):(c.logger.log("Unknown video PTS for cc "+l+", waiting for video PTS before demuxing audio frag "+o+" of ["+r.startSN+" ,"+r.endSN+"],track "+a),this.waitingFragment=t,this.waitingVideoCC=this.videoTrackCC,this.state=At)}}this.fragLoadError=0},a.onFragParsingInitSegment=function(t){var e=this.fragCurrent,i=t.frag;if(e&&"audio"===t.id&&i.sn===e.sn&&i.level===e.level&&this.state===xt){var n,r=t.tracks;if(r.video&&delete r.video,n=r.audio){n.levelCodec=n.codec,n.id=t.id,this.hls.trigger(h.default.BUFFER_CODECS,r),c.logger.log("audio track:audio,container:"+n.container+",codecs[level/parsed]=["+n.levelCodec+"/"+n.codec+"]");var s=n.initSegment;if(s){var a={type:"audio",data:s,parent:"audio",content:"initSegment"};this.audioSwitch?this.pendingData=[a]:(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(h.default.BUFFER_APPENDING,a))}this.tick()}}},a.onFragParsingData=function(t){var e=this,i=this.fragCurrent,n=t.frag;if(i&&"audio"===t.id&&"audio"===t.type&&n.sn===i.sn&&n.level===i.level&&this.state===xt){var r=this.trackId,s=this.tracks[r],a=this.hls;Object(l.isFiniteNumber)(t.endPTS)||(t.endPTS=t.startPTS+i.duration,t.endDTS=t.startDTS+i.duration),i.addElementaryStream(g.AUDIO),c.logger.log("parsed "+t.type+",PTS:["+t.startPTS.toFixed(3)+","+t.endPTS.toFixed(3)+"],DTS:["+t.startDTS.toFixed(3)+"/"+t.endDTS.toFixed(3)+"],nb:"+t.nb),it(s.details,i,t.startPTS,t.endPTS);var u=this.media,d=!1;if(this.audioSwitch)if(u&&u.readyState){var f=u.currentTime;c.logger.log("switching audio track : currentTime:"+f),f>=t.startPTS&&(c.logger.log("switching audio track : flushing all audio"),this.state=_t,a.trigger(h.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),d=!0,this.audioSwitch=!1,a.trigger(h.default.AUDIO_TRACK_SWITCHED,{id:r}))}else this.audioSwitch=!1,a.trigger(h.default.AUDIO_TRACK_SWITCHED,{id:r});var p=this.pendingData;if(!p)return c.logger.warn("Apparently attempt to enqueue media payload without codec initialization data upfront"),void a.trigger(h.default.ERROR,{type:o.ErrorTypes.MEDIA_ERROR,details:null,fatal:!0});this.audioSwitch||([t.data1,t.data2].forEach(function(e){e&&e.length&&p.push({type:t.type,data:e,parent:"audio",content:"data"})}),!d&&p.length&&(p.forEach(function(t){e.state===xt&&(e.pendingBuffering=!0,e.hls.trigger(h.default.BUFFER_APPENDING,t))}),this.pendingData=[],this.appended=!0)),this.tick()}},a.onFragParsed=function(t){var e=this.fragCurrent,i=t.frag;e&&"audio"===t.id&&i.sn===e.sn&&i.level===e.level&&this.state===xt&&(this.stats.tparsed=ee.now(),this.state=wt,this._checkAppendedParsed())},a.onBufferReset=function(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1},a.onBufferCreated=function(t){var e=t.tracks.audio;e&&(this.mediaBuffer=e.buffer,this.loadedmetadata=!0),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer)},a.onBufferAppended=function(t){if("audio"===t.parent){var e=this.state;e!==xt&&e!==wt||(this.pendingBuffering=t.pending>0,this._checkAppendedParsed())}},a._checkAppendedParsed=function(){if(!(this.state!==wt||this.appended&&this.pendingBuffering)){var t=this.fragCurrent,e=this.stats,i=this.hls;if(t){this.fragPrevious=t,e.tbuffered=ee.now(),i.trigger(h.default.FRAG_BUFFERED,{stats:e,frag:t,id:"audio"});var n=this.mediaBuffer?this.mediaBuffer:this.media;n&&c.logger.log("audio buffered : "+at(n.buffered)),this.audioSwitch&&this.appended&&(this.audioSwitch=!1,i.trigger(h.default.AUDIO_TRACK_SWITCHED,{id:this.trackId})),this.state=yt}this.tick()}},a.onError=function(t){var e=t.frag;if(!e||"audio"===e.type)switch(t.details){case o.ErrorDetails.FRAG_LOAD_ERROR:case o.ErrorDetails.FRAG_LOAD_TIMEOUT:var i=t.frag;if(i&&"audio"!==i.type)break;if(!t.fatal){var n=this.fragLoadError;n?n++:n=1;var r=this.config;if(n<=r.fragLoadingMaxRetry){this.fragLoadError=n;var s=Math.min(Math.pow(2,n-1)*r.fragLoadingRetryDelay,r.fragLoadingMaxRetryTimeout);c.logger.warn("AudioStreamController: frag loading failed, retry in "+s+" ms"),this.retryDate=ee.now()+s,this.state=Et}else c.logger.error("AudioStreamController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.state=Tt}break;case o.ErrorDetails.AUDIO_TRACK_LOAD_ERROR:case o.ErrorDetails.AUDIO_TRACK_LOAD_TIMEOUT:case o.ErrorDetails.KEY_LOAD_ERROR:case o.ErrorDetails.KEY_LOAD_TIMEOUT:this.state!==Tt&&(this.state=t.fatal?Tt:yt,c.logger.warn("AudioStreamController: "+t.details+" while loading frag, now switching to "+this.state+" state ..."));break;case o.ErrorDetails.BUFFER_FULL_ERROR:if("audio"===t.parent&&(this.state===xt||this.state===wt)){var a=this.mediaBuffer,l=this.media.currentTime;if(a&&G.isBuffered(a,l)&&G.isBuffered(a,l+.5)){var u=this.config;u.maxMaxBufferLength>=u.maxBufferLength&&(u.maxMaxBufferLength/=2,c.logger.warn("AudioStreamController: reduce max buffer length to "+u.maxMaxBufferLength+"s")),this.state=yt}else c.logger.warn("AudioStreamController: buffer full error also media.currentTime is not buffered, flush audio buffer"),this.fragCurrent=null,this.state=_t,this.hls.trigger(h.default.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"})}}},a.onBufferFlushed=function(){var t=this,e=this.pendingData;e&&e.length?(c.logger.log("AudioStreamController: appending pending audio data after buffer flushed"),e.forEach(function(e){t.hls.trigger(h.default.BUFFER_APPENDING,e)}),this.appended=!0,this.pendingData=[],this.state=wt):(this.state=yt,this.fragPrevious=null,this.tick())},r=n,(s=[{key:"state",set:function(t){if(this.state!==t){var e=this.state;this._state=t,c.logger.log("audio stream:"+e+"->"+t)}},get:function(){return this._state}}])&&te(r.prototype,s),n}(Dt),ne=function(){if("undefined"!=typeof window&&window.VTTCue)return window.VTTCue;var t={"":!0,lr:!0,rl:!0},e={start:!0,middle:!0,end:!0,left:!0,right:!0};function i(t){return"string"==typeof t&&!!e[t.toLowerCase()]&&t.toLowerCase()}function n(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)t[n]=i[n]}return t}function r(e,r,s){var a=this,o={enumerable:!0};a.hasBeenReset=!1;var l="",h=!1,c=e,u=r,d=s,f=null,p="",m=!0,g="auto",y="start",v=50,b="middle",S=50,E="middle";Object.defineProperty(a,"id",n({},o,{get:function(){return l},set:function(t){l=""+t}})),Object.defineProperty(a,"pauseOnExit",n({},o,{get:function(){return h},set:function(t){h=!!t}})),Object.defineProperty(a,"startTime",n({},o,{get:function(){return c},set:function(t){if("number"!=typeof t)throw new TypeError("Start time must be set to a number.");c=t,this.hasBeenReset=!0}})),Object.defineProperty(a,"endTime",n({},o,{get:function(){return u},set:function(t){if("number"!=typeof t)throw new TypeError("End time must be set to a number.");u=t,this.hasBeenReset=!0}})),Object.defineProperty(a,"text",n({},o,{get:function(){return d},set:function(t){d=""+t,this.hasBeenReset=!0}})),Object.defineProperty(a,"region",n({},o,{get:function(){return f},set:function(t){f=t,this.hasBeenReset=!0}})),Object.defineProperty(a,"vertical",n({},o,{get:function(){return p},set:function(e){var i=function(e){return"string"==typeof e&&!!t[e.toLowerCase()]&&e.toLowerCase()}(e);if(!1===i)throw new SyntaxError("An invalid or illegal string was specified.");p=i,this.hasBeenReset=!0}})),Object.defineProperty(a,"snapToLines",n({},o,{get:function(){return m},set:function(t){m=!!t,this.hasBeenReset=!0}})),Object.defineProperty(a,"line",n({},o,{get:function(){return g},set:function(t){if("number"!=typeof t&&"auto"!==t)throw new SyntaxError("An invalid number or illegal string was specified.");g=t,this.hasBeenReset=!0}})),Object.defineProperty(a,"lineAlign",n({},o,{get:function(){return y},set:function(t){var e=i(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");y=e,this.hasBeenReset=!0}})),Object.defineProperty(a,"position",n({},o,{get:function(){return v},set:function(t){if(t<0||t>100)throw new Error("Position must be between 0 and 100.");v=t,this.hasBeenReset=!0}})),Object.defineProperty(a,"positionAlign",n({},o,{get:function(){return b},set:function(t){var e=i(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");b=e,this.hasBeenReset=!0}})),Object.defineProperty(a,"size",n({},o,{get:function(){return S},set:function(t){if(t<0||t>100)throw new Error("Size must be between 0 and 100.");S=t,this.hasBeenReset=!0}})),Object.defineProperty(a,"align",n({},o,{get:function(){return E},set:function(t){var e=i(t);if(!e)throw new SyntaxError("An invalid or illegal string was specified.");E=e,this.hasBeenReset=!0}})),a.displayState=void 0}return r.prototype.getCueAsHTML=function(){return window.WebVTT.convertCueToDOMTree(window,this.text)},r}(),re=function(){return{decode:function(t){if(!t)return"";if("string"!=typeof t)throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(t))}}};function se(){this.window=window,this.state="INITIAL",this.buffer="",this.decoder=new re,this.regionList=[]}function ae(){this.values=Object.create(null)}function oe(t,e,i,n){var r=n?t.split(n):[t];for(var s in r)if("string"==typeof r[s]){var a=r[s].split(i);2===a.length&&e(a[0],a[1])}}ae.prototype={set:function(t,e){this.get(t)||""===e||(this.values[t]=e)},get:function(t,e,i){return i?this.has(t)?this.values[t]:e[i]:this.has(t)?this.values[t]:e},has:function(t){return t in this.values},alt:function(t,e,i){for(var n=0;n<i.length;++n)if(e===i[n]){this.set(t,e);break}},integer:function(t,e){/^-?\d+$/.test(e)&&this.set(t,parseInt(e,10))},percent:function(t,e){return!!(e.match(/^([\d]{1,3})(\.[\d]*)?%$/)&&(e=parseFloat(e))>=0&&e<=100)&&(this.set(t,e),!0)}};var le=new ne(0,0,0),he="middle"===le.align?"middle":"center";function ce(t,e,i){var n=t;function r(){var e=function(t){function e(t,e,i,n){return 3600*(0|t)+60*(0|e)+(0|i)+(0|n)/1e3}var i=t.match(/^(\d+):(\d{2})(:\d{2})?\.(\d{3})/);return i?i[3]?e(i[1],i[2],i[3].replace(":",""),i[4]):i[1]>59?e(i[1],i[2],0,i[4]):e(0,i[1],i[2],i[4]):null}(t);if(null===e)throw new Error("Malformed timestamp: "+n);return t=t.replace(/^[^\sa-zA-Z-]+/,""),e}function s(){t=t.replace(/^\s+/,"")}if(s(),e.startTime=r(),s(),"--\x3e"!==t.substr(0,3))throw new Error("Malformed time stamp (time stamps must be separated by '--\x3e'): "+n);t=t.substr(3),s(),e.endTime=r(),s(),function(t,e){var n=new ae;oe(t,function(t,e){switch(t){case"region":for(var r=i.length-1;r>=0;r--)if(i[r].id===e){n.set(t,i[r].region);break}break;case"vertical":n.alt(t,e,["rl","lr"]);break;case"line":var s=e.split(","),a=s[0];n.integer(t,a),n.percent(t,a)&&n.set("snapToLines",!1),n.alt(t,a,["auto"]),2===s.length&&n.alt("lineAlign",s[1],["start",he,"end"]);break;case"position":s=e.split(","),n.percent(t,s[0]),2===s.length&&n.alt("positionAlign",s[1],["start",he,"end","line-left","line-right","auto"]);break;case"size":n.percent(t,e);break;case"align":n.alt(t,e,["start",he,"end","left","right"])}},/:/,/\s/),e.region=n.get("region",null),e.vertical=n.get("vertical","");var r=n.get("line","auto");"auto"===r&&-1===le.line&&(r=-1),e.line=r,e.lineAlign=n.get("lineAlign","start"),e.snapToLines=n.get("snapToLines",!0),e.size=n.get("size",100),e.align=n.get("align",he);var s=n.get("position","auto");"auto"===s&&50===le.position&&(s="start"===e.align||"left"===e.align?0:"end"===e.align||"right"===e.align?100:50),e.position=s}(t,e)}function ue(t){return t.replace(/<br(?: \/)?>/gi,"\n")}se.prototype={parse:function(t){var e=this;function i(){var t=e.buffer,i=0;for(t=ue(t);i<t.length&&"\r"!==t[i]&&"\n"!==t[i];)++i;var n=t.substr(0,i);return"\r"===t[i]&&++i,"\n"===t[i]&&++i,e.buffer=t.substr(i),n}function n(t){oe(t,function(t,e){},/:/)}t&&(e.buffer+=e.decoder.decode(t,{stream:!0}));try{var r;if("INITIAL"===e.state){if(!/\r\n|\n/.test(e.buffer))return this;var s=(r=i()).match(/^()?WEBVTT([ \t].*)?$/);if(!s||!s[0])throw new Error("Malformed WebVTT signature.");e.state="HEADER"}for(var a=!1;e.buffer;){if(!/\r\n|\n/.test(e.buffer))return this;switch(a?a=!1:r=i(),e.state){case"HEADER":/:/.test(r)?n(r):r||(e.state="ID");continue;case"NOTE":r||(e.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(r)){e.state="NOTE";break}if(!r)continue;if(e.cue=new ne(0,0,""),e.state="CUE",-1===r.indexOf("--\x3e")){e.cue.id=r;continue}case"CUE":try{ce(r,e.cue,e.regionList)}catch(t){e.cue=null,e.state="BADCUE";continue}e.state="CUETEXT";continue;case"CUETEXT":var o=-1!==r.indexOf("--\x3e");if(!r||o&&(a=!0)){e.oncue&&e.oncue(e.cue),e.cue=null,e.state="ID";continue}e.cue.text&&(e.cue.text+="\n"),e.cue.text+=r;continue;case"BADCUE":r||(e.state="ID");continue}}}catch(t){"CUETEXT"===e.state&&e.cue&&e.oncue&&e.oncue(e.cue),e.cue=null,e.state="INITIAL"===e.state?"BADWEBVTT":"BADCUE"}return this},flush:function(){var t=this;try{if(t.buffer+=t.decoder.decode(),(t.cue||"HEADER"===t.state)&&(t.buffer+="\n\n",t.parse()),"INITIAL"===t.state)throw new Error("Malformed WebVTT signature.")}catch(t){throw t}return t.onflush&&t.onflush(),this}};var de=se;function fe(t,e,i,n){for(var r,s,a,o,l,h=[],c=window.VTTCue||TextTrackCue,u=0;u<n.rows.length;u++)if(a=!0,o=0,l="",!(r=n.rows[u]).isEmpty()){for(var d=0;d<r.chars.length;d++)r.chars[d].uchar.match(/\s/)&&a?o++:(l+=r.chars[d].uchar,a=!1);r.cueStartTime=e,e===i&&(i+=1e-4),s=new c(e,i,ue(l.trim())),o>=16?o--:o++,navigator.userAgent.match(/Firefox\//)?s.line=u+1:s.line=u>7?u-2:u+1,s.align="left",s.position=Math.max(0,Math.min(100,o/32*100)),h.push(s),t&&t.addCue(s)}return h}var pe,me={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},ge=function(t){var e=t;return me.hasOwnProperty(t)&&(e=me[t]),String.fromCharCode(e)},ye=15,ve=100,be={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},Se={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Ee={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},ke={25:2,26:4,29:6,30:8,31:10,27:13,28:15},xe=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];!function(t){t[t.ERROR=0]="ERROR",t[t.TEXT=1]="TEXT",t[t.WARNING=2]="WARNING",t[t.INFO=2]="INFO",t[t.DEBUG=3]="DEBUG",t[t.DATA=3]="DATA"}(pe||(pe={}));var we=function(){function t(){this.time=null,this.verboseLevel=pe.ERROR}return t.prototype.log=function(t,e){this.verboseLevel>=t&&c.logger.log(this.time+" ["+t+"] "+e)},t}(),_e=function(t){for(var e=[],i=0;i<t.length;i++)e.push(t[i].toString(16));return e},Ce=function(){function t(t,e,i,n,r){this.foreground=void 0,this.underline=void 0,this.italics=void 0,this.background=void 0,this.flash=void 0,this.foreground=t||"white",this.underline=e||!1,this.italics=i||!1,this.background=n||"black",this.flash=r||!1}var e=t.prototype;return e.reset=function(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1},e.setStyles=function(t){for(var e=["foreground","underline","italics","background","flash"],i=0;i<e.length;i++){var n=e[i];t.hasOwnProperty(n)&&(this[n]=t[n])}},e.isDefault=function(){return"white"===this.foreground&&!this.underline&&!this.italics&&"black"===this.background&&!this.flash},e.equals=function(t){return this.foreground===t.foreground&&this.underline===t.underline&&this.italics===t.italics&&this.background===t.background&&this.flash===t.flash},e.copy=function(t){this.foreground=t.foreground,this.underline=t.underline,this.italics=t.italics,this.background=t.background,this.flash=t.flash},e.toString=function(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash},t}(),Te=function(){function t(t,e,i,n,r,s){this.uchar=void 0,this.penState=void 0,this.uchar=t||" ",this.penState=new Ce(e,i,n,r,s)}var e=t.prototype;return e.reset=function(){this.uchar=" ",this.penState.reset()},e.setChar=function(t,e){this.uchar=t,this.penState.copy(e)},e.setPenState=function(t){this.penState.copy(t)},e.equals=function(t){return this.uchar===t.uchar&&this.penState.equals(t.penState)},e.copy=function(t){this.uchar=t.uchar,this.penState.copy(t.penState)},e.isEmpty=function(){return" "===this.uchar&&this.penState.isDefault()},t}(),Ae=function(){function t(t){this.chars=void 0,this.pos=void 0,this.currPenState=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chars=[];for(var e=0;e<ve;e++)this.chars.push(new Te);this.logger=t,this.pos=0,this.currPenState=new Ce}var e=t.prototype;return e.equals=function(t){for(var e=!0,i=0;i<ve;i++)if(!this.chars[i].equals(t.chars[i])){e=!1;break}return e},e.copy=function(t){for(var e=0;e<ve;e++)this.chars[e].copy(t.chars[e])},e.isEmpty=function(){for(var t=!0,e=0;e<ve;e++)if(!this.chars[e].isEmpty()){t=!1;break}return t},e.setCursor=function(t){this.pos!==t&&(this.pos=t),this.pos<0?(this.logger.log(pe.DEBUG,"Negative cursor position "+this.pos),this.pos=0):this.pos>ve&&(this.logger.log(pe.DEBUG,"Too large cursor position "+this.pos),this.pos=ve)},e.moveCursor=function(t){var e=this.pos+t;if(t>1)for(var i=this.pos+1;i<e+1;i++)this.chars[i].setPenState(this.currPenState);this.setCursor(e)},e.backSpace=function(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)},e.insertChar=function(t){t>=144&&this.backSpace();var e=ge(t);this.pos>=ve?this.logger.log(pe.ERROR,"Cannot insert "+t.toString(16)+" ("+e+") at position "+this.pos+". Skipping it!"):(this.chars[this.pos].setChar(e,this.currPenState),this.moveCursor(1))},e.clearFromPos=function(t){var e;for(e=t;e<ve;e++)this.chars[e].reset()},e.clear=function(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()},e.clearToEndOfRow=function(){this.clearFromPos(this.pos)},e.getTextString=function(){for(var t=[],e=!0,i=0;i<ve;i++){var n=this.chars[i].uchar;" "!==n&&(e=!1),t.push(n)}return e?"":t.join("")},e.setPenStyles=function(t){this.currPenState.setStyles(t),this.chars[this.pos].setPenState(this.currPenState)},t}(),Pe=function(){function t(t){this.rows=void 0,this.currRow=void 0,this.nrRollUpRows=void 0,this.lastOutputScreen=void 0,this.logger=void 0,this.rows=[];for(var e=0;e<ye;e++)this.rows.push(new Ae(t));this.logger=t,this.currRow=14,this.nrRollUpRows=null,this.lastOutputScreen=null,this.reset()}var e=t.prototype;return e.reset=function(){for(var t=0;t<ye;t++)this.rows[t].clear();this.currRow=14},e.equals=function(t){for(var e=!0,i=0;i<ye;i++)if(!this.rows[i].equals(t.rows[i])){e=!1;break}return e},e.copy=function(t){for(var e=0;e<ye;e++)this.rows[e].copy(t.rows[e])},e.isEmpty=function(){for(var t=!0,e=0;e<ye;e++)if(!this.rows[e].isEmpty()){t=!1;break}return t},e.backSpace=function(){this.rows[this.currRow].backSpace()},e.clearToEndOfRow=function(){this.rows[this.currRow].clearToEndOfRow()},e.insertChar=function(t){this.rows[this.currRow].insertChar(t)},e.setPen=function(t){this.rows[this.currRow].setPenStyles(t)},e.moveCursor=function(t){this.rows[this.currRow].moveCursor(t)},e.setCursor=function(t){this.logger.log(pe.INFO,"setCursor: "+t),this.rows[this.currRow].setCursor(t)},e.setPAC=function(t){this.logger.log(pe.INFO,"pacData = "+JSON.stringify(t));var e=t.row-1;if(this.nrRollUpRows&&e<this.nrRollUpRows-1&&(e=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==e){for(var i=0;i<ye;i++)this.rows[i].clear();var n=this.currRow+1-this.nrRollUpRows,r=this.lastOutputScreen;if(r){var s=r.rows[n].cueStartTime,a=this.logger.time;if(s&&null!==a&&s<a)for(var o=0;o<this.nrRollUpRows;o++)this.rows[e-this.nrRollUpRows+o+1].copy(r.rows[n+o])}}this.currRow=e;var l=this.rows[this.currRow];if(null!==t.indent){var h=t.indent,c=Math.max(h-1,0);l.setCursor(t.indent),t.color=l.chars[c].penState.foreground}var u={foreground:t.color,underline:t.underline,italics:t.italics,background:"black",flash:!1};this.setPen(u)},e.setBkgData=function(t){this.logger.log(pe.INFO,"bkgData = "+JSON.stringify(t)),this.backSpace(),this.setPen(t),this.insertChar(32)},e.setRollUpRows=function(t){this.nrRollUpRows=t},e.rollUp=function(){if(null!==this.nrRollUpRows){this.logger.log(pe.TEXT,this.getDisplayText());var t=this.currRow+1-this.nrRollUpRows,e=this.rows.splice(t,1)[0];e.clear(),this.rows.splice(this.currRow,0,e),this.logger.log(pe.INFO,"Rolling up")}else this.logger.log(pe.DEBUG,"roll_up but nrRollUpRows not set yet")},e.getDisplayText=function(t){t=t||!1;for(var e=[],i="",n=-1,r=0;r<ye;r++){var s=this.rows[r].getTextString();s&&(n=r+1,t?e.push("Row "+n+": '"+s+"'"):e.push(s.trim()))}return e.length>0&&(i=t?"["+e.join(" | ")+"]":e.join("\n")),i},e.getTextAndFormat=function(){return this.rows},t}(),De=function(){function t(t,e,i){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=t,this.outputFilter=e,this.mode=null,this.verbose=0,this.displayedMemory=new Pe(i),this.nonDisplayedMemory=new Pe(i),this.lastOutputScreen=new Pe(i),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=i}var e=t.prototype;return e.reset=function(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[14],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null},e.getHandler=function(){return this.outputFilter},e.setHandler=function(t){this.outputFilter=t},e.setPAC=function(t){this.writeScreen.setPAC(t)},e.setBkgData=function(t){this.writeScreen.setBkgData(t)},e.setMode=function(t){t!==this.mode&&(this.mode=t,this.logger.log(pe.INFO,"MODE="+t),"MODE_POP-ON"===this.mode?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),"MODE_ROLL-UP"!==this.mode&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=t)},e.insertChars=function(t){for(var e=0;e<t.length;e++)this.writeScreen.insertChar(t[e]);var i=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(pe.INFO,i+": "+this.writeScreen.getDisplayText(!0)),"MODE_PAINT-ON"!==this.mode&&"MODE_ROLL-UP"!==this.mode||(this.logger.log(pe.TEXT,"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())},e.ccRCL=function(){this.logger.log(pe.INFO,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")},e.ccBS=function(){this.logger.log(pe.INFO,"BS - BackSpace"),"MODE_TEXT"!==this.mode&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())},e.ccAOF=function(){},e.ccAON=function(){},e.ccDER=function(){this.logger.log(pe.INFO,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()},e.ccRU=function(t){this.logger.log(pe.INFO,"RU("+t+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(t)},e.ccFON=function(){this.logger.log(pe.INFO,"FON - Flash On"),this.writeScreen.setPen({flash:!0})},e.ccRDC=function(){this.logger.log(pe.INFO,"RDC - Resume Direct
2Captioning"),this.setMode("MODE_PAINT-ON")},e.ccTR=function(){this.logger.log(pe.INFO,"TR"),this.setMode("MODE_TEXT")},e.ccRTD=function(){this.logger.log(pe.INFO,"RTD"),this.setMode("MODE_TEXT")},e.ccEDM=function(){this.logger.log(pe.INFO,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)},e.ccCR=function(){this.logger.log(pe.INFO,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)},e.ccENM=function(){this.logger.log(pe.INFO,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()},e.ccEOC=function(){if(this.logger.log(pe.INFO,"EOC - End Of Caption"),"MODE_POP-ON"===this.mode){var t=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=t,this.writeScreen=this.nonDisplayedMemory,this.logger.log(pe.TEXT,"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)},e.ccTO=function(t){this.logger.log(pe.INFO,"TO("+t+") - Tab Offset"),this.writeScreen.moveCursor(t)},e.ccMIDROW=function(t){var e={flash:!1};if(e.underline=t%2==1,e.italics=t>=46,e.italics)e.foreground="white";else{var i=Math.floor(t/2)-16;e.foreground=["white","green","blue","cyan","red","yellow","magenta"][i]}this.logger.log(pe.INFO,"MIDROW: "+JSON.stringify(e)),this.writeScreen.setPen(e)},e.outputDataUpdate=function(t){void 0===t&&(t=!1);var e=this.logger.time;null!==e&&this.outputFilter&&(null!==this.cueStartTime||this.displayedMemory.isEmpty()?this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,e,this.lastOutputScreen),t&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:e):this.cueStartTime=e,this.lastOutputScreen.copy(this.displayedMemory))},e.cueSplitAtTime=function(t){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,t,this.displayedMemory),this.cueStartTime=t))},t}(),Me=function(){function t(t,e,i){this.channels=void 0,this.currentChannel=0,this.cmdHistory=void 0,this.logger=void 0;var n=new we;this.channels=[null,new De(t,e,n),new De(t+1,i,n)],this.cmdHistory={a:null,b:null},this.logger=n}var e=t.prototype;return e.getHandler=function(t){return this.channels[t].getHandler()},e.setHandler=function(t,e){this.channels[t].setHandler(e)},e.addData=function(t,e){var i,n,r,s=!1;this.logger.time=t;for(var a=0;a<e.length;a+=2)if(n=127&e[a],r=127&e[a+1],0!==n||0!==r){if(this.logger.log(pe.DATA,"["+_e([e[a],e[a+1]])+"] -> ("+_e([n,r])+")"),(i=this.parseCmd(n,r))||(i=this.parseMidrow(n,r)),i||(i=this.parsePAC(n,r)),i||(i=this.parseBackgroundAttributes(n,r)),!i&&(s=this.parseChars(n,r))){var o=this.currentChannel;o&&o>0?this.channels[o].insertChars(s):this.logger.log(pe.WARNING,"No channel found yet. TEXT-MODE?")}i||s||this.logger.log(pe.WARNING,"Couldn't parse cleaned data "+_e([n,r])+" orig: "+_e([e[a],e[a+1]]))}},e.parseCmd=function(t,e){var i=this.cmdHistory;if(!((20===t||28===t||21===t||29===t)&&e>=32&&e<=47||(23===t||31===t)&&e>=33&&e<=35))return!1;if(Re(t,e,i))return Le(null,null,i),this.logger.log(pe.DEBUG,"Repeated command ("+_e([t,e])+") is dropped"),!0;var n=20===t||21===t||23===t?1:2,r=this.channels[n];return 20===t||21===t||28===t||29===t?32===e?r.ccRCL():33===e?r.ccBS():34===e?r.ccAOF():35===e?r.ccAON():36===e?r.ccDER():37===e?r.ccRU(2):38===e?r.ccRU(3):39===e?r.ccRU(4):40===e?r.ccFON():41===e?r.ccRDC():42===e?r.ccTR():43===e?r.ccRTD():44===e?r.ccEDM():45===e?r.ccCR():46===e?r.ccENM():47===e&&r.ccEOC():r.ccTO(e-32),Le(t,e,i),this.currentChannel=n,!0},e.parseMidrow=function(t,e){var i=0;if((17===t||25===t)&&e>=32&&e<=47){if((i=17===t?1:2)!==this.currentChannel)return this.logger.log(pe.ERROR,"Mismatch channel in midrow parsing"),!1;var n=this.channels[i];return!!n&&(n.ccMIDROW(e),this.logger.log(pe.DEBUG,"MIDROW ("+_e([t,e])+")"),!0)}return!1},e.parsePAC=function(t,e){var i,n=this.cmdHistory;if(!((t>=17&&t<=23||t>=25&&t<=31)&&e>=64&&e<=127||(16===t||24===t)&&e>=64&&e<=95))return!1;if(Re(t,e,n))return Le(null,null,n),!0;var r=t<=23?1:2;i=e>=64&&e<=95?1===r?be[t]:Ee[t]:1===r?Se[t]:ke[t];var s=this.channels[r];return!!s&&(s.setPAC(this.interpretPAC(i,e)),Le(t,e,n),this.currentChannel=r,!0)},e.interpretPAC=function(t,e){var i,n={color:null,italics:!1,indent:null,underline:!1,row:t};return i=e>95?e-96:e-64,n.underline=!(1&~i),i<=13?n.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(i/2)]:i<=15?(n.italics=!0,n.color="white"):n.indent=4*Math.floor((i-16)/2),n},e.parseChars=function(t,e){var i,n=null,r=null;if(t>=25?(i=2,r=t-8):(i=1,r=t),r>=17&&r<=19){var s;
vendor: 38,615 bytes, line 2
2s=17===r?e+80:18===r?e+112:e+144,this.logger.log(pe.INFO,"Special char '"+ge(s)+"' in channel "+i),n=[s]}else t>=32&&t<=127&&(n=0===e?[t]:[t,e]);if(n){var a=_e(n);this.logger.log(pe.DEBUG,"Char codes = "+a.join(",")),Le(t,e,this.cmdHistory)}return n},e.parseBackgroundAttributes=function(t,e){var i;if(!((16===t||24===t)&&e>=32&&e<=47||(23===t||31===t)&&e>=45&&e<=47))return!1;var n={};16===t||24===t?(i=Math.floor((e-32)/2),n.background=xe[i],e%2==1&&(n.background=n.background+"_semi")):45===e?n.background="transparent":(n.foreground="black",47===e&&(n.underline=!0));var r=t<=23?1:2;return this.channels[r].setBkgData(n),Le(t,e,this.cmdHistory),!0},e.reset=function(){for(var t=0;t<Object.keys(this.channels).length;t++){var e=this.channels[t];e&&e.reset()}this.cmdHistory={a:null,b:null}},e.cueSplitAtTime=function(t){for(var e=0;e<this.channels.length;e++){var i=this.channels[e];i&&i.cueSplitAtTime(t)}},t}();function Le(t,e,i){i.a=t,i.b=e}function Re(t,e,i){return i.a===t&&i.b===e}var Ie=Me,Fe=function(){function t(t,e){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=t,this.trackName=e}var e=t.prototype;return e.dispatchCue=function(){null!==this.startTime&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)},e.newCue=function(t,e,i){(null===this.startTime||this.startTime>t)&&(this.startTime=t),this.endTime=e,this.screen=i,this.timelineController.createCaptionsTrack(this.trackName)},e.reset=function(){this.cueRanges=[]},t}(),Oe=function(t,e,i){return t.substr(i||0,e.length)===e},Be=function(t){for(var e=5381,i=t.length;i;)e=33*e^t.charCodeAt(--i);return(e>>>0).toString()},Ne=function(t,e,i,n,r,s){var a,o=Object(Ot.utf8ArrayToStr)(new Uint8Array(t)).trim().replace(/\r\n|\n\r|\n|\r/g,"\n").split("\n"),h="00:00.000",c=0,u=0,d=0,f=[],p=!0,m=!1,g=new de;g.oncue=function(t){var e=i[n],r=i.ccOffset;e&&e.new&&(void 0!==u?r=i.ccOffset=e.start:function(t,e,i){var n=t[e],r=t[n.prevCC];if(!r||!r.new&&n.new)return t.ccOffset=t.presentationOffset=n.start,void(n.new=!1);for(;r&&r.new;)t.ccOffset+=n.start-r.start,n.new=!1,r=t[(n=r).prevCC];t.presentationOffset=i}(i,n,d)),d&&(r=d-i.presentationOffset),m&&(t.startTime+=r-u,t.endTime+=r-u),t.id=Be(t.startTime.toString())+Be(t.endTime.toString())+Be(t.text),t.text=decodeURIComponent(encodeURIComponent(t.text)),t.endTime>0&&f.push(t)},g.onparsingerror=function(t){a=t},g.onflush=function(){a&&s?s(a):r(f)},o.forEach(function(t){if(p){if(Oe(t,"X-TIMESTAMP-MAP=")){p=!1,m=!0,t.substr(16).split(",").forEach(function(t){Oe(t,"LOCAL:")?h=t.substr(6):Oe(t,"MPEGTS:")&&(c=parseInt(t.substr(7)))});try{e+(9e4*i[n].start||0)<0&&(e+=8589934592),c-=e,u=function(t){var e=parseInt(t.substr(-3)),i=parseInt(t.substr(-6,2)),n=parseInt(t.substr(-9,2)),r=t.length>9?parseInt(t.substr(0,t.indexOf(":"))):0;if(!(Object(l.isFiniteNumber)(e)&&Object(l.isFiniteNumber)(i)&&Object(l.isFiniteNumber)(n)&&Object(l.isFiniteNumber)(r)))throw Error("Malformed X-TIMESTAMP-MAP: Local:"+t);return e+=1e3*i,(e+=6e4*n)+36e5*r}(h)/1e3,d=c/9e4}catch(t){m=!1,a=t}return}""===t&&(p=!1)}g.parse(t+"\n")}),g.flush()};function Ve(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ze(t,e){return t&&t.label===e.name&&!(t.textTrack1||t.textTrack2)}function He(t,e,i,n){return Math.min(e,n)-Math.max(t,i)}var qe=function(t){var e,i;function n(e){var i;if((i=t.call(this,e,h.default.MEDIA_ATTACHING,h.default.MEDIA_DETACHING,h.default.FRAG_PARSING_USERDATA,h.default.FRAG_DECRYPTED,h.default.MANIFEST_LOADING,h.default.MANIFEST_LOADED,h.default.FRAG_LOADED,h.default.INIT_PTS_FOUND)||this).media=null,i.config=void 0,i.enabled=!0,i.Cues=void 0,i.textTracks=[],i.tracks=[],i.initPTS=[],i.unparsedVttFrags=[],i.captionsTracks={},i.nonNativeCaptionsTracks={},i.captionsProperties=void 0,i.cea608Parser1=void 0,i.cea608Parser2=void 0,i.lastSn=-1,i.prevCC=-1,i.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}},i.hls=e,i.config=e.config,i.Cues=e.config.cueHandler,i.captionsProperties={textTrack1:{label:i.config.captionsTextTrack1Label,languageCode:i.config.captionsTextTrack1LanguageCode},textTrack2:{label:i.config.captionsTextTrack2Label,languageCode:i.config.captionsTextTrack2LanguageCode},textTrack3:{label:i.config.captionsTextTrack3Label,languageCode:i.config.captionsTextTrack3LanguageCode},textTrack4:{label:i.config.captionsTextTrack4Label,languageCode:i.config.captionsTextTrack4LanguageCode}},i.config.enableCEA708Captions){var n=new Fe(Ve(i),"textTrack1"),r=new Fe(Ve(i),"textTrack2"),s=new Fe(Ve(i),"textTrack3"),a=new Fe(Ve(i),"textTrack4");i.cea608Parser1=new Ie(1,n,r),i.cea608Parser2=new Ie(3,s,a)}return i}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r=n.prototype;return r.addCues=function(t,e,i,n,r){for(var s=!1,a=r.length;a--;){var o=r[a],l=He(o[0],o[1],e,i);if(l>=0&&(o[0]=Math.min(o[0],e),o[1]=Math.max(o[1],i),s=!0,l/(i-e)>.5))return}if(s||r.push([e,i]),this.config.renderTextTracksNatively)this.Cues.newCue(this.captionsTracks[t],e,i,n);else{var c=this.Cues.newCue(null,e,i,n);this.hls.trigger(h.default.CUES_PARSED,{type:"captions",cues:c,track:t})}},r.onInitPtsFound=function(t){var e=this,i=t.frag,n=t.id,r=t.initPTS,s=this.unparsedVttFrags;"main"===n&&(this.initPTS[i.cc]=r),s.length&&(this.unparsedVttFrags=[],s.forEach(function(t){e.onFragLoaded(t)}))},r.getExistingTrack=function(t){var e=this.media;if(e)for(var i=0;i<e.textTracks.length;i++){var n=e.textTracks[i];if(n[t])return n}return null},r.createCaptionsTrack=function(t){this.config.renderTextTracksNatively?this.createNativeTrack(t):this.createNonNativeTrack(t)},r.createNativeTrack=function(t){if(!this.captionsTracks[t]){var e=this.captionsProperties,i=this.captionsTracks,n=this.media,r=e[t],s=r.label,a=r.languageCode,o=this.getExistingTrack(t);if(o)i[t]=o,Nt(i[t]),Bt(i[t],n);else{var l=this.createTextTrack("captions",s,a);l&&(l[t]=!0,i[t]=l)}}},r.createNonNativeTrack=function(t){if(!this.nonNativeCaptionsTracks[t]){var e=this.captionsProperties[t];if(e){var i={_id:t,label:e.label,kind:"captions",default:!!e.media&&!!e.media.default,closedCaptions:e.media};this.nonNativeCaptionsTracks[t]=i,this.hls.trigger(h.default.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[i]})}}},r.createTextTrack=function(t,e,i){var n=this.media;if(n)return n.addTextTrack(t,e,i)},r.destroy=function(){t.prototype.destroy.call(this)},r.onMediaAttaching=function(t){this.media=t.media,this._cleanTracks()},r.onMediaDetaching=function(){var t=this.captionsTracks;Object.keys(t).forEach(function(e){Nt(t[e]),delete t[e]}),this.nonNativeCaptionsTracks={}},r.onManifestLoading=function(){this.lastSn=-1,this.prevCC=-1,this.vttCCs={ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!1}},this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={}},r._cleanTracks=function(){var t=this.media;if(t){var e=t.textTracks;if(e)for(var i=0;i<e.length;i++)Nt(e[i])}},r.onManifestLoaded=function(t){var e=this;if(this.textTracks=[],this.unparsedVttFrags=this.unparsedVttFrags||[],this.initPTS=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset()),this.config.enableWebVTT){var i=t.subtitles||[],n=this.tracks&&i&&this.tracks.length===i.length;if(this.tracks=t.subtitles||[],this.config.renderTextTracksNatively){var r=this.media?this.media.textTracks:[];this.tracks.forEach(function(t,i){var n;if(i<r.length){for(var s=null,a=0;a<r.length;a++)if(ze(r[a],t)){s=r[a];break}s&&(n=s)}n||(n=e.createTextTrack("subtitles",t.name,t.lang)),t.default?n.mode=e.hls.subtitleDisplay?"showing":"hidden":n.mode="disabled",e.textTracks.push(n)})}else if(!n&&this.tracks&&this.tracks.length){var s=this.tracks.map(function(t){return{label:t.name,kind:t.type.toLowerCase(),default:t.default,subtitleTrack:t}});this.hls.trigger(h.default.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:s})}}this.config.enableCEA708Captions&&t.captions&&t.captions.forEach(function(t){var i=/(?:CC|SERVICE)([1-4])/.exec(t.instreamId);if(i){var n="textTrack"+i[1],r=e.captionsProperties[n];r&&(r.label=t.name,t.lang&&(r.languageCode=t.lang),r.media=t)}})},r.onFragLoaded=function(t){var e=t.frag,i=t.payload,n=this.cea608Parser1,r=this.cea608Parser2,s=this.initPTS,a=this.lastSn,o=this.unparsedVttFrags;if("main"===e.type){var c=e.sn;e.sn!==a+1&&n&&r&&(n.reset(),r.reset()),this.lastSn=c}else if("subtitle"===e.type)if(i.byteLength){if(!Object(l.isFiniteNumber)(s[e.cc]))return o.push(t),void(s.length&&this.hls.trigger(h.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e}));var u=e.decryptdata;null!=u&&null!=u.key&&"AES-128"===u.method||this._parseVTTs(e,i)}else this.hls.trigger(h.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e})},r._parseVTTs=function(t,e){var i=this,n=this.hls,r=this.prevCC,s=this.textTracks,a=this.vttCCs;a[t.cc]||(a[t.cc]={start:t.start,prevCC:r,new:!0},this.prevCC=t.cc),Ne(e,this.initPTS[t.cc],a,t.cc,function(e){if(i.config.renderTextTracksNatively){var r=s[t.level];if("disabled"===r.mode)return void n.trigger(h.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t});e.forEach(function(t){if(!r.cues.getCueById(t.id))try{if(r.addCue(t),!r.cues.getCueById(t.id))throw new Error("addCue is failed for: "+t)}catch(i){c.logger.debug("Failed occurred on adding cues: "+i);var e=new window.TextTrackCue(t.startTime,t.endTime,t.text);e.id=t.id,r.addCue(e)}})}else{var a=i.tracks[t.level].default?"default":"subtitles"+t.level;n.trigger(h.default.CUES_PARSED,{type:"subtitles",cues:e,track:a})}n.trigger(h.default.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:t})},function(e){c.logger.log("Failed to parse VTT cue: "+e),n.trigger(h.default.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:t})})},r.onFragDecrypted=function(t){var e=t.frag,i=t.payload;if("subtitle"===e.type){if(!Object(l.isFiniteNumber)(this.initPTS[e.cc]))return void this.unparsedVttFrags.push(t);this._parseVTTs(e,i)}},r.onFragParsingUserdata=function(t){var e=this.cea608Parser1,i=this.cea608Parser2;if(this.enabled&&e&&i)for(var n=0;n<t.samples.length;n++){var r=t.samples[n].bytes;if(r){var s=this.extractCea608Data(r);e.addData(t.samples[n].pts,s[0]),i.addData(t.samples[n].pts,s[1])}}},r.extractCea608Data=function(t){for(var e=31&t[0],i=2,n=[[],[]],r=0;r<e;r++){var s=t[i++],a=127&t[i++],o=127&t[i++],l=3&s;0===a&&0===o||4&s&&(0!==l&&1!==l||(n[l].push(a),n[l].push(o)))}return n},n}(f);function Ue(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Ge(t){for(var e=[],i=0;i<t.length;i++){var n=t[i];"subtitles"===n.kind&&n.label&&e.push(t[i])}return e}var je,We=function(t){var e,i;function n(e){var i;return(i=t.call(this,e,h.default.MEDIA_ATTACHED,h.default.MEDIA_DETACHING,h.default.MANIFEST_LOADED,h.default.SUBTITLE_TRACK_LOADED)||this).tracks=[],i.trackId=-1,i.media=null,i.stopped=!0,i.subtitleDisplay=!0,i.queuedDefaultTrack=null,i}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r,s,a=n.prototype;return a.destroy=function(){f.prototype.destroy.call(this)},a.onMediaAttached=function(t){var e=this;this.media=t.media,this.media&&(Object(l.isFiniteNumber)(this.queuedDefaultTrack)&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=null),this.trackChangeListener=this._onTextTracksChanged.bind(this),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.subtitlePollingInterval=setInterval(function(){e.trackChangeListener()},500):this.media.textTracks.addEventListener("change",this.trackChangeListener))},a.onMediaDetaching=function(){this.media&&(this.useTextTrackPolling?clearInterval(this.subtitlePollingInterval):this.media.textTracks.removeEventListener("change",this.trackChangeListener),Object(l.isFiniteNumber)(this.subtitleTrack)&&(this.queuedDefaultTrack=this.subtitleTrack),Ge(this.media.textTracks).forEach(function(t){Nt(t)}),this.subtitleTrack=-1,this.media=null)},a.onManifestLoaded=function(t){var e=this,i=t.subtitles||[];this.tracks=i,this.hls.trigger(h.default.SUBTITLE_TRACKS_UPDATED,{subtitleTracks:i}),i.forEach(function(t){t.default&&(e.media?e.subtitleTrack=t.id:e.queuedDefaultTrack=t.id)})},a.onSubtitleTrackLoaded=function(t){var e=this,i=t.id,n=t.details,r=this.trackId,s=this.tracks,a=s[r];if(i>=s.length||i!==r||!a||this.stopped)this._clearReloadTimer();else if(c.logger.log("subtitle track "+i+" loaded"),n.live){var o=st(a.details,n,t.stats.trequest);c.logger.log("Reloading live subtitle playlist in "+o+"ms"),this.timer=setTimeout(function(){e._loadCurrentTrack()},o)}else this._clearReloadTimer()},a.startLoad=function(){this.stopped=!1,this._loadCurrentTrack()},a.stopLoad=function(){this.stopped=!0,this._clearReloadTimer()},a._clearReloadTimer=function(){this.timer&&(clearTimeout(this.timer),this.timer=null)},a._loadCurrentTrack=function(){var t=this.trackId,e=this.tracks,i=this.hls,n=e[t];t<0||!n||n.details&&!n.details.live||(c.logger.log("Loading subtitle track "+t),i.trigger(h.default.SUBTITLE_TRACK_LOADING,{url:n.url,id:t}))},a._toggleTrackModes=function(t){var e=this.media,i=this.subtitleDisplay,n=this.trackId;if(e){var r=Ge(e.textTracks);if(-1===t)[].slice.call(r).forEach(function(t){t.mode="disabled"});else{var s=r[n];s&&(s.mode="disabled")}var a=r[t];a&&(a.mode=i?"showing":"hidden")}},a._setSubtitleTrackInternal=function(t){var e=this.hls,i=this.tracks;!Object(l.isFiniteNumber)(t)||t<-1||t>=i.length||(this.trackId=t,c.logger.log("Switching to subtitle track "+t),e.trigger(h.default.SUBTITLE_TRACK_SWITCH,{id:t}),this._loadCurrentTrack())},a._onTextTracksChanged=function(){if(this.media&&this.hls.config.renderTextTracksNatively){for(var t=-1,e=Ge(this.media.textTracks),i=0;i<e.length;i++)if("hidden"===e[i].mode)t=i;else if("showing"===e[i].mode){t=i;break}this.subtitleTrack=t}},r=n,(s=[{key:"subtitleTracks",get:function(){return this.tracks}},{key:"subtitleTrack",get:function(){return this.trackId},set:function(t){this.trackId!==t&&(this._toggleTrackModes(t),this._setSubtitleTrackInternal(t))}}])&&Ue(r.prototype,s),n}(f),$e=i("./src/crypt/decrypter.js"),Ye=window.performance,Ke=function(t){var e,i;function n(e,i){var n;return(n=t.call(this,e,h.default.MEDIA_ATTACHED,h.default.MEDIA_DETACHING,h.default.ERROR,h.default.KEY_LOADED,h.default.FRAG_LOADED,h.default.SUBTITLE_TRACKS_UPDATED,h.default.SUBTITLE_TRACK_SWITCH,h.default.SUBTITLE_TRACK_LOADED,h.default.SUBTITLE_FRAG_PROCESSED,h.default.LEVEL_UPDATED)||this).fragmentTracker=i,n.config=e.config,n.state=mt,n.tracks=[],n.tracksBuffered=[],n.currentTrackId=-1,n.decrypter=new $e.default(e,e.config),n.lastAVStart=0,n._onMediaSeeking=n.onMediaSeeking.bind(function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(n)),n}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r=n.prototype;return r.startLoad=function(){this.stopLoad(),this.state=yt;var t=this.tracks[this.currentTrackId];t&&t.details&&(this.setInterval(500),this.tick())},r.onSubtitleFragProcessed=function(t){var e=t.frag,i=t.success;if(this.fragPrevious=e,this.state=yt,i){var n=this.tracksBuffered[this.currentTrackId];if(n){for(var r,s=e.start,a=0;a<n.length;a++)if(s>=n[a].start&&s<=n[a].end){r=n[a];break}var o=e.start+e.duration;r?r.end=o:(r={start:s,end:o},n.push(r))}}},r.onMediaAttached=function(t){var e=t.media;this.media=e,e.addEventListener("seeking",this._onMediaSeeking),this.state=yt},r.onMediaDetaching=function(){var t=this;this.media&&(this.media.removeEventListener("seeking",this._onMediaSeeking),this.fragmentTracker.removeAllFragments(),this.currentTrackId=-1,this.tracks.forEach(function(e){t.tracksBuffered[e.id]=[]}),this.media=null,this.state=mt)},r.onError=function(t){var e=t.frag;e&&"subtitle"===e.type&&(this.fragCurrent&&this.fragCurrent.loader&&this.fragCurrent.loader.abort(),this.state=yt)},r.onSubtitleTracksUpdated=function(t){var e=this;c.logger.log("subtitle tracks updated"),this.tracksBuffered=[],this.tracks=t.subtitleTracks,this.tracks.forEach(function(t){e.tracksBuffered[t.id]=[]})},r.onSubtitleTrackSwitch=function(t){if(this.currentTrackId=t.id,this.tracks&&this.tracks.length&&-1!==this.currentTrackId){var e=this.tracks[this.currentTrackId];e&&e.details&&this.setInterval(500)}else this.clearInterval()},r.onSubtitleTrackLoaded=function(t){var e=t.id,i=t.details,n=this.currentTrackId,r=this.tracks,s=r[n];e>=r.length||e!==n||!s||(i.live&&function(t,e,i){void 0===i&&(i=0);var n=-1;rt(t,e,function(t,e,i){e.start=t.start,n=i});var r=e.fragments;if(n<0)r.forEach(function(t){t.start+=i});else for(var s=n+1;s<r.length;s++)r[s].start=r[s-1].start+r[s-1].duration}(s.details,i,this.lastAVStart),s.details=i,this.setInterval(500))},r.onKeyLoaded=function(){this.state===bt&&(this.state=yt)},r.onFragLoaded=function(t){var e=this.fragCurrent,i=t.frag.decryptdata,n=t.frag,r=this.hls;if(this.state===St&&e&&"subtitle"===t.frag.type&&e.sn===t.frag.sn&&t.payload.byteLength>0&&i&&i.key&&"AES-128"===i.method){var s=Ye.now();this.decrypter.decrypt(t.payload,i.key.buffer,i.iv.buffer,function(t){var e=Ye.now();r.trigger(h.default.FRAG_DECRYPTED,{frag:n,payload:t,stats:{tstart:s,tdecrypt:e}})})}},r.onLevelUpdated=function(t){var e=t.details.fragments;this.lastAVStart=e.length?e[0].start:0},r.doTick=function(){if(this.media)switch(this.state){case yt:var t=this.config,e=this.currentTrackId,i=this.fragmentTracker,n=this.media,r=this.tracks;if(!r||!r[e]||!r[e].details)break;var s,a=t.maxBufferHole,o=t.maxFragLookUpTolerance,l=Math.min(t.maxBufferLength,t.maxMaxBufferLength),u=G.bufferedInfo(this._getBuffered(),n.currentTime,a),d=u.end,f=u.len,p=r[e].details,m=p.fragments,g=m.length,y=m[g-1].start+m[g-1].duration;if(f>l)return;var v=this.fragPrevious;d<y?(v&&p.hasProgramDateTime&&(s=ht(m,v.endProgramDateTime,o)),s||(s=ct(v,m,d,o))):s=m[g-1],s&&s.encrypted?(c.logger.log("Loading key for "+s.sn),this.state=bt,this.hls.trigger(h.default.KEY_LOADING,{frag:s})):s&&i.getState(s)===N&&(this.fragCurrent=s,this.state=St,this.hls.trigger(h.default.FRAG_LOADING,{frag:s}))}else this.state=yt},r.stopLoad=function(){this.lastAVStart=0,this.fragPrevious=null,t.prototype.stopLoad.call(this)},r._getBuffered=function(){return this.tracksBuffered[this.currentTrackId]||[]},r.onMediaSeeking=function(){if(this.fragCurrent){var t=this.media?this.media.currentTime:0,e=this.config.maxFragLookUpTolerance,i=this.fragCurrent.start-e,n=this.fragCurrent.start+this.fragCurrent.duration+e;(t<i||t>n)&&(this.fragCurrent.loader&&this.fragCurrent.loader.abort(),this.fragmentTracker.removeFragment(this.fragCurrent),this.fragCurrent=null,this.fragPrevious=null,this.state=yt,this.tick())}},n}(Dt);!function(t){t.WIDEVINE="com.widevine.alpha",t.PLAYREADY="com.microsoft.playready"}(je||(je={}));var Xe="undefined"!=typeof window&&window.navigator&&window.navigator.requestMediaKeySystemAccess?window.navigator.requestMediaKeySystemAccess.bind(window.navigator):null;function Je(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var Qe=function(t){var e,i;function n(e){var i;return(i=t.call(this,e,h.default.MEDIA_ATTACHED,h.default.MEDIA_DETACHED,h.default.MANIFEST_PARSED)||this)._widevineLicenseUrl=void 0,i._licenseXhrSetup=void 0,i._emeEnabled=void 0,i._requestMediaKeySystemAccess=void 0,i._drmSystemOptions=void 0,i._config=void 0,i._mediaKeysList=[],i._media=null,i._hasSetMediaKeys=!1,i._requestLicenseFailureCount=0,i.mediaKeysPromise=null,i._onMediaEncrypted=function(t){if(c.logger.log('Media is encrypted using "'+t.initDataType+'" init data type'),!i.mediaKeysPromise)return c.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been requested"),void i.hls.trigger(h.default.ERROR,{type:o.ErrorTypes.KEY_SYSTEM_ERROR,details:o.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});var e=function(e){i._media&&(i._attemptSetMediaKeys(e),i._generateRequestWithPreferredKeySession(t.initDataType,t.initData))};i.mediaKeysPromise.then(e).catch(e)},i._config=e.config,i._widevineLicenseUrl=i._config.widevineLicenseUrl,i._licenseXhrSetup=i._config.licenseXhrSetup,i._emeEnabled=i._config.emeEnabled,i._requestMediaKeySystemAccess=i._config.requestMediaKeySystemAccessFunc,i._drmSystemOptions=e.config.drmSystemOptions,i}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i;var r,s,a=n.prototype;return a.getLicenseServerUrl=function(t){switch(t){case je.WIDEVINE:if(!this._widevineLicenseUrl)break;return this._widevineLicenseUrl}throw new Error('no license server URL configured for key-system "'+t+'"')},a._attemptKeySystemAccess=function(t,e,i){var n=this,r=function(t,e,i,n){if(t===je.WIDEVINE)return function(t,e,i){var n={audioCapabilities:[],videoCapabilities:[]};return t.forEach(function(t){n.audioCapabilities.push({contentType:'audio/mp4; codecs="'+t+'"',robustness:i.audioRobustness||""})}),e.forEach(function(t){n.videoCapabilities.push({contentType:'video/mp4; codecs="'+t+'"',robustness:i.videoRobustness||""})}),[n]}(e,i,n);throw new Error("Unknown key-system: "+t)}(t,e,i,this._drmSystemOptions);c.logger.log("Requesting encrypted media key-system access");var s=this.requestMediaKeySystemAccess(t,r);this.mediaKeysPromise=s.then(function(e){return n._onMediaKeySystemAccessObtained(t,e)}),s.catch(function(e){c.logger.error('Failed to obtain key-system "'+t+'" access:',e)})},a._onMediaKeySystemAccessObtained=function(t,e){var i=this;c.logger.log('Access for key-system "'+t+'" obtained');var n={mediaKeysSessionInitialized:!1,mediaKeySystemAccess:e,mediaKeySystemDomain:t};this._mediaKeysList.push(n);var r=Promise.resolve().then(function(){return e.createMediaKeys()}).then(function(e){return n.mediaKeys=e,c.logger.log('Media-keys created for key-system "'+t+'"'),i._onMediaKeysCreated(),e});return r.catch(function(t){c.logger.error("Failed to create media-keys:",t)}),r},a._onMediaKeysCreated=function(){var t=this;this._mediaKeysList.forEach(function(e){e.mediaKeysSession||(e.mediaKeysSession=e.mediaKeys.createSession(),t._onNewMediaKeySession(e.mediaKeysSession))})},a._onNewMediaKeySession=function(t){var e=this;c.logger.log("New key-system session "+t.sessionId),t.addEventListener("message",function(i){e._onKeySessionMessage(t,i.message)},!1)},a._onKeySessionMessage=function(t,e){c.logger.log("Got EME message event, creating license request"),this._requestLicense(e,function(e){c.logger.log("Received license data (length: "+(e?e.byteLength:e)+"), updating key-session"),t.update(e)})},a._attemptSetMediaKeys=function(t){if(!this._media)throw new Error("Attempted to set mediaKeys without first attaching a media element");if(!this._hasSetMediaKeys){var e=this._mediaKeysList[0];if(!e||!e.mediaKeys)return c.logger.error("Fatal: Media is encrypted but no CDM access or no keys have been obtained yet"),void this.hls.trigger(h.default.ERROR,{type:o.ErrorTypes.KEY_SYSTEM_ERROR,details:o.ErrorDetails.KEY_SYSTEM_NO_KEYS,fatal:!0});c.logger.log("Setting keys for encrypted media"),this._media.setMediaKeys(e.mediaKeys),this._hasSetMediaKeys=!0}},a._generateRequestWithPreferredKeySession=function(t,e){var i=this,n=this._mediaKeysList[0];if(!n)return c.logger.error("Fatal: Media is encrypted but not any key-system access has been obtained yet"),void this.hls.trigger(h.default.ERROR,{type:o.ErrorTypes.KEY_SYSTEM_ERROR,details:o.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});if(n.mediaKeysSessionInitialized)c.logger.warn("Key-Session already initialized but requested again");else{var r=n.mediaKeysSession;if(!r)return c.logger.error("Fatal: Media is encrypted but no key-session existing"),void this.hls.trigger(h.default.ERROR,{type:o.ErrorTypes.KEY_SYSTEM_ERROR,details:o.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!0});if(!e)return c.logger.warn("Fatal: initData required for generating a key session is null"),void this.hls.trigger(h.default.ERROR,{type:o.ErrorTypes.KEY_SYSTEM_ERROR,details:o.ErrorDetails.KEY_SYSTEM_NO_INIT_DATA,fatal:!0});c.logger.log('Generating key-session request for "'+t+'" init data type'),n.mediaKeysSessionInitialized=!0,r.generateRequest(t,e).then(function(){c.logger.debug("Key-session generation succeeded")}).catch(function(t){c.logger.error("Error generating key-session request:",t),i.hls.trigger(h.default.ERROR,{type:o.ErrorTypes.KEY_SYSTEM_ERROR,details:o.ErrorDetails.KEY_SYSTEM_NO_SESSION,fatal:!1})})}},a._createLicenseXhr=function(t,e,i){var n=new XMLHttpRequest,r=this._licenseXhrSetup;try{if(r)try{r(n,t)}catch(e){n.open("POST",t,!0),r(n,t)}n.readyState||n.open("POST",t,!0)}catch(t){throw new Error("issue setting up KeySystem license XHR "+t)}return n.responseType="arraybuffer",n.onreadystatechange=this._onLicenseRequestReadyStageChange.bind(this,n,t,e,i),n},a._onLicenseRequestReadyStageChange=function(t,e,i,n){if(4===t.readyState)if(200===t.status)this._requestLicenseFailureCount=0,c.logger.log("License request succeeded"),"arraybuffer"!==t.responseType&&c.logger.warn("xhr response type was not set to the expected arraybuffer for license request"),n(t.response);else{if(c.logger.error("License Request XHR failed ("+e+"). Status: "+t.status+" ("+t.statusText+")"),this._requestLicenseFailureCount++,this._requestLicenseFailureCount>3)return void this.hls.trigger(h.default.ERROR,{type:o.ErrorTypes.KEY_SYSTEM_ERROR,details:o.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0});var r=3-this._requestLicenseFailureCount+1;c.logger.warn("Retrying license request, "+r+" attempts left"),this._requestLicense(i,n)}},a._generateLicenseRequestChallenge=function(t,e){if(t.mediaKeySystemDomain===je.WIDEVINE)return e;throw new Error("unsupported key-system: "+t.mediaKeySystemDomain)},a._requestLicense=function(t,e){c.logger.log("Requesting content license for key-system");var i=this._mediaKeysList[0];if(!i)return c.logger.error("Fatal error: Media is encrypted but no key-system access has been obtained yet"),void this.hls.trigger(h.default.ERROR,{type:o.ErrorTypes.KEY_SYSTEM_ERROR,details:o.ErrorDetails.KEY_SYSTEM_NO_ACCESS,fatal:!0});try{var n=this.getLicenseServerUrl(i.mediaKeySystemDomain),r=this._createLicenseXhr(n,t,e);c.logger.log("Sending license request to URL: "+n);var s=this._generateLicenseRequestChallenge(i,t);r.send(s)}catch(t){c.logger.error("Failure requesting DRM license: "+t),this.hls.trigger(h.default.ERROR,{type:o.ErrorTypes.KEY_SYSTEM_ERROR,details:o.ErrorDetails.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0})}},a.onMediaAttached=function(t){if(this._emeEnabled){var e=t.media;this._media=e,e.addEventListener("encrypted",this._onMediaEncrypted)}},a.onMediaDetached=function(){var t=this._media,e=this._mediaKeysList;t&&(t.removeEventListener("encrypted",this._onMediaEncrypted),this._media=null,this._mediaKeysList=[],Promise.all(e.map(function(t){if(t.mediaKeysSession)return t.mediaKeysSession.close().catch(function(){})})).then(function(){return t.setMediaKeys(null)}).catch(function(){}))},a.onManifestParsed=function(t){if(this._emeEnabled){var e=t.levels.map(function(t){return t.audioCodec}),i=t.levels.map(function(t){return t.videoCodec});this._attemptKeySystemAccess(je.WIDEVINE,e,i)}},r=n,(s=[{key:"requestMediaKeySystemAccess",get:function(){if(!this._requestMediaKeySystemAccess)throw new Error("No requestMediaKeySystemAccess function configured");return this._requestMediaKeySystemAccess}}])&&Je(r.prototype,s),n}(f);function Ze(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)}return i}function ti(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Ze(Object(i),!0).forEach(function(e){ei(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Ze(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function ei(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var ii=ti(ti({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,maxBufferSize:6e7,maxBufferHole:.5,lowBufferWatchdogPeriod:.5,highBufferWatchdogPeriod:3,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,liveDurationInfinity:!1,liveBackBufferLength:1/0,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:Jt,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,abrController:Gt,bufferController:Wt,capLevelController:Yt,fpsController:Xt,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystemOptions:{},requestMediaKeySystemAccessFunc:Xe,testBandwidth:!0},{cueHandler:n,enableCEA708Captions:!0,enableWebVTT:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}),{},{subtitleStreamController:Ke,subtitleTrackController:We,timelineController:qe,audioStreamController:ie,audioTrackController:Zt,emeController:Qe});function ni(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)}return i}function ri(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?ni(Object(i),!0).forEach(function(e){si(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):ni(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}function si(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function ai(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function oi(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function li(t,e,i){return e&&oi(t.prototype,e),i&&oi(t,i),t}var hi=function(t){var e,i;function n(e){var i;void 0===e&&(e={}),(i=t.call(this)||this).config=void 0,i._autoLevelCapping=void 0,i.abrController=void 0,i.capLevelController=void 0,i.levelController=void 0,i.streamController=void 0,i.networkControllers=void 0,i.audioTrackController=void 0,i.subtitleTrackController=void 0,i.emeController=void 0,i.coreComponents=void 0,i.media=null,i.url=null;var r=n.DefaultConfig;if((e.liveSyncDurationCount||e.liveMaxLatencyDurationCount)&&(e.liveSyncDuration||e.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");i.config=ri(ri({},r),e);var s=ai(i).config;if(void 0!==s.liveMaxLatencyDurationCount&&s.liveMaxLatencyDurationCount<=s.liveSyncDurationCount)throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be gt "liveSyncDurationCount"');if(void 0!==s.liveMaxLatencyDuration&&(void 0===s.liveSyncDuration||s.liveMaxLatencyDuration<=s.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be gt "liveSyncDuration"');Object(c.enableLogs)(s.debug),i._autoLevelCapping=-1;var a=i.abrController=new s.abrController(ai(i)),o=new s.bufferController(ai(i)),l=i.capLevelController=new s.capLevelController(ai(i)),h=new s.fpsController(ai(i)),u=new F(ai(i)),d=new O(ai(i)),f=new B(ai(i)),p=new Vt(ai(i)),m=i.levelController=new Ft(ai(i)),g=new q(ai(i)),y=[m,i.streamController=new Rt(ai(i),g)],v=s.audioStreamController;v&&y.push(new v(ai(i),g)),i.networkControllers=y;var b=[u,d,f,a,o,l,h,p,g];if(v=s.audioTrackController){var S=new v(ai(i));i.audioTrackController=S,b.push(S)}if(v=s.subtitleTrackController){var E=new v(ai(i));i.subtitleTrackController=E,y.push(E)}if(v=s.emeController){var k=new v(ai(i));i.emeController=k,b.push(k)}return(v=s.subtitleStreamController)&&y.push(new v(ai(i),g)),(v=s.timelineController)&&b.push(new v(ai(i))),i.coreComponents=b,i}i=t,(e=n).prototype=Object.create(i.prototype),e.prototype.constructor=e,e.__proto__=i,n.isSupported=function(){return function(){var t=Y();if(!t)return!1;var e=self.SourceBuffer||self.WebKitSourceBuffer,i=t&&"function"==typeof t.isTypeSupported&&t.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),n=!e||e.prototype&&"function"==typeof e.prototype.appendBuffer&&"function"==typeof e.prototype.remove;return!!i&&!!n}()},li(n,null,[{key:"version",get:function(){return"0.14.17"}},{key:"Events",get:function(){return h.default}},{key:"ErrorTypes",get:function(){return o.ErrorTypes}},{key:"ErrorDetails",get:function(){return o.ErrorDetails}},{key:"DefaultConfig",get:function(){return n.defaultConfig?n.defaultConfig:ii},set:function(t){n.defaultConfig=t}}]);var r=n.prototype;return r.destroy=function(){c.logger.log("destroy"),this.trigger(h.default.DESTROYING),this.detachMedia(),this.coreComponents.concat(this.networkControllers).forEach(function(t){t.destroy()}),this.url=null,this.removeAllListeners(),this._autoLevelCapping=-1},r.attachMedia=function(t){c.logger.log("attachMedia"),this.media=t,this.trigger(h.default.MEDIA_ATTACHING,{media:t})},r.detachMedia=function(){c.logger.log("detachMedia"),this.trigger(h.default.MEDIA_DETACHING),this.media=null},r.loadSource=function(t){t=a.buildAbsoluteURL(window.location.href,t,{alwaysNormalize:!0}),c.logger.log("loadSource:"+t),this.url=t,this.trigger(h.default.MANIFEST_LOADING,{url:t})},r.startLoad=function(t){void 0===t&&(t=-1),c.logger.log("startLoad("+t+")"),this.networkControllers.forEach(function(e){e.startLoad(t)})},r.stopLoad=function(){c.logger.log("stopLoad"),this.networkControllers.forEach(function(t){t.stopLoad()})},r.swapAudioCodec=function(){c.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()},r.recoverMediaError=function(){c.logger.log("recoverMediaError");var t=this.media;this.detachMedia(),t&&this.attachMedia(t)},r.removeLevel=function(t,e){void 0===e&&(e=0),this.levelController.removeLevel(t,e)},li(n,[{key:"levels",get:function(){return this.levelController.levels}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(t){c.logger.log("set currentLevel:"+t),this.loadLevel=t,this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(t){c.logger.log("set nextLevel:"+t),this.levelController.manualLevel=t,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(t){c.logger.log("set loadLevel:"+t),this.levelController.manualLevel=t}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(t){this.levelController.nextLoadLevel=t}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(t){c.logger.log("set firstLevel:"+t),this.levelController.firstLevel=t}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(t){c.logger.log("set startLevel:"+t),-1!==t&&(t=Math.max(t,this.minAutoLevel)),this.levelController.startLevel=t}},{key:"capLevelToPlayerSize",set:function(t){var e=!!t;e!==this.config.capLevelToPlayerSize&&(e?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=e)}},{key:"autoLevelCapping",get:function(){return this._autoLevelCapping},set:function(t){c.logger.log("set autoLevelCapping:"+t),this._autoLevelCapping=t}},{key:"bandwidthEstimate",get:function(){var t=this.abrController._bwEstimator;return t?t.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){for(var t=this.levels,e=this.config.minAutoBitrate,i=t?t.length:0,n=0;n<i;n++)if((t[n].realBitrate?Math.max(t[n].realBitrate,t[n].bitrate):t[n].bitrate)>e)return n;return 0}},{key:"maxAutoLevel",get:function(){var t=this.levels,e=this.autoLevelCapping;return-1===e&&t&&t.length?t.length-1:e}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(t){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,t)}},{key:"audioTracks",get:function(){var t=this.audioTrackController;return t?t.audioTracks:[]}},{key:"audioTrack",get:function(){var t=this.audioTrackController;return t?t.audioTrack:-1},set:function(t){var e=this.audioTrackController;e&&(e.audioTrack=t)}},{key:"liveSyncPosition",get:function(){return this.streamController.liveSyncPosition}},{key:"subtitleTracks",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTrack:-1},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleTrack=t)}},{key:"subtitleDisplay",get:function(){var t=this.subtitleTrackController;return!!t&&t.subtitleDisplay},set:function(t){var e=this.subtitleTrackController;e&&(e.subtitleDisplay=t)}}]),n}(X);hi.defaultConfig=void 0},
2"./src/polyfills/number.js":function(t,e,i){"use strict";i.r(e),i.d(e,"isFiniteNumber",function(){return n}),i.d(e,"MAX_SAFE_INTEGER",function(){return r});var n=Number.isFinite||function(t){return"number"==typeof t&&isFinite(t)},r=Number.MAX_SAFE_INTEGER||9007199254740991},
2"./src/utils/get-self-scope.js":function(t,e,i){"use strict";function n(){return"undefined"==typeof window?self:window}i.r(e),i.d(e,"getSelfScope",function(){return n})},
vendor: 766 bytes, line 2
2"./src/utils/logger.js":function(t,e,i){"use strict";i.r(e),i.d(e,"enableLogs",function(){return l}),i.d(e,"logger",function(){return h});var n=i("./src/utils/get-self-scope.js");function r(){}var s={trace:r,debug:r,log:r,warn:r,info:r,error:r},a=s,o=Object(n.getSelfScope)();var l=function(t){if(o.console&&!0===t||"object"==typeof t){!function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];i.forEach(function(e){a[e]=t[e]?t[e].bind(t):function(t){var e=o.console[t];return e?function(){for(var i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];n[0]&&(n[0]=function(t,e){return"["+t+"] > "+e}(t,n[0])),e.apply(o.console,n)}:r}(e)})}(t,"debug","log","info","warn","error");try{a.log()}catch(t){a=s}}else a=s},h=a}
vendor: 6,084 bytes, line 2
2}).default},t.exports=e())},3263:function(t,e,i){!function(e){"use strict";var n=i(7510),r=function(t,e,i){var r,s,a,o,l={},h=0,c=0,u={sensitivity:7,interval:100,timeout:0};function d(e,i,n){var l=function(t){r=t.clientX,s=t.clientY};return c&&(c=clearTimeout(c)),n?(a=e.clientX,o=e.clientY,t.addEventListener("mousemove",l,!1),1!==h&&(c=setTimeout(function(){f(t,i,e)},u.interval))):(t.removeEventListener("mousemove",l,!1),1===h&&(c=setTimeout(function(){!function(t,e,i){c&&(c=clearTimeout(c)),h=0,e.call(t,i)}(t,i,e)},u.timeout))),this}function f(t,e,i){if(c&&(c=clearTimeout(c)),Math.abs(a-r)+Math.abs(o-s)<u.sensitivity)return h=1,e.call(t,i);a=r,o=s,c=setTimeout(function(){f(t,e,i)},u.interval)}function p(t){d(t,e,!0)}function m(t){d(t,i)}return l.options=function(t){u=n({},u,t)},l.remove=function(){t&&(t.removeEventListener("mouseover",p,!1),t.removeEventListener("mouseout",m,!1))},t&&(t.addEventListener("mouseover",p,!1),t.addEventListener("mouseout",m,!1)),l};e.hoverintent=r,t.exports&&(t.exports=r)}(this)},9891:function(module,exports,__webpack_require__){var factory;"undefined"!=typeof navigator&&(factory=function(){"use strict";var svgNS="http://www.w3.org/2000/svg",locationHref="",_useWebWorker=!1,initialDefaultFrame=-999999,setWebWorker=function(t){_useWebWorker=!!t},getWebWorker=function(){return _useWebWorker},setLocationHref=function(t){locationHref=t},getLocationHref=function(){return locationHref};function createTag(t){return document.createElement(t)}function extendPrototype(t,e){var i,n,r=t.length;for(i=0;i<r;i+=1)for(var s in n=t[i].prototype)Object.prototype.hasOwnProperty.call(n,s)&&(e.prototype[s]=n[s])}function getDescriptor(t,e){return Object.getOwnPropertyDescriptor(t,e)}function createProxyFunction(t){function e(){}return e.prototype=t,e}var audioControllerFactory=function(){function t(t){this.audios=[],this.audioFactory=t,this._volume=1,this._isMuted=!1}return t.prototype={addAudio:function(t){this.audios.push(t)},pause:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].pause()},resume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].resume()},setRate:function(t){var e,i=this.audios.length;for(e=0;e<i;e+=1)this.audios[e].setRate(t)},createAudio:function(t){return this.audioFactory?this.audioFactory(t):window.Howl?new window.Howl({src:[t]}):{isPlaying:!1,play:function(){this.isPlaying=!0},seek:function(){this.isPlaying=!1},playing:function(){},rate:function(){},setVolume:function(){}}},setAudioFactory:function(t){this.audioFactory=t},setVolume:function(t){this._volume=t,this._updateVolume()},mute:function(){this._isMuted=!0,this._updateVolume()},unmute:function(){this._isMuted=!1,this._updateVolume()},getVolume:function(){return this._volume},_updateVolume:function(){var t,e=this.audios.length;for(t=0;t<e;t+=1)this.audios[t].volume(this._volume*(this._isMuted?0:1))}},function(){return new t}}(),createTypedArray=function(){function t(t,e){var i,n=0,r=[];switch(t){case"int16":case"uint8c":i=1;break;default:i=1.1}for(n=0;n<e;n+=1)r.push(i);return r}return"function"==typeof Uint8ClampedArray&&"function"==typeof Float32Array?function(e,i){return"float32"===e?new Float32Array(i):"int16"===e?new Int16Array(i):"uint8c"===e?new Uint8ClampedArray(i):t(e,i)}:t}();function createSizedArray(t){return Array.apply(null,{length:t})}function _typeof$6(t){return _typeof$6="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$6(t)}var subframeEnabled=!0,expressionsPlugin=null,expressionsInterfaces=null,idPrefix$1="",isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),_shouldRoundValues=!1,bmPow=Math.pow,bmSqrt=Math.sqrt,bmFloor=Math.floor,bmMax=Math.max,bmMin=Math.min,BMMath={};function ProjectInterface$1(){return{}}!function(){var t,e=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],i=e.length;for(t=0;t<i;t+=1)BMMath[e[t]]=Math[e[t]]}(),BMMath.random=Math.random,BMMath.abs=function(t){if("object"===_typeof$6(t)&&t.length){var e,i=createSizedArray(t.length),n=t.length;for(e=0;e<n;e+=1)i[e]=Math.abs(t[e]);return i}return Math.abs(t)};var defaultCurveSegments=150,degToRads=Math.PI/180,roundCorner=.5519;function roundValues(t){_shouldRoundValues=!!t}function bmRnd(t){return _shouldRoundValues?Math.round(t):t}function styleDiv(t){t.style.position="absolute",t.style.top=0,t.style.left=0,t.style.display="block",t.style.transformOrigin="0 0",t.style.webkitTransformOrigin="0 0",t.style.backfaceVisibility="visible",t.style.webkitBackfaceVisibility="visible",t.style.transformStyle="preserve-3d",t.style.webkitTransformStyle="preserve-3d",t.style.mozTransformStyle="preserve-3d"}function BMEnterFrameEvent(t,e,i,n){this.type=t,this.currentTime=e,this.totalTime=i,this.direction=n<0?-1:1}function BMCompleteEvent(t,e){this.type=t,this.direction=e<0?-1:1}function BMCompleteLoopEvent(t,e,i,n){this.type=t,this.currentLoop=i,this.totalLoops=e,this.direction=n<0?-1:1}function BMSegmentStartEvent(t,e,i){this.type=t,this.firstFrame=e,this.totalFrames=i}function BMDestroyEvent(t,e){this.type=t,this.target=e}function BMRenderFrameErrorEvent(t,e){this.type="renderFrameError",this.nativeError=t,this.currentTime=e}function BMConfigErrorEvent(t){this.type="configError",this.nativeError=t}function BMAnimationConfigErrorEvent(t,e){this.type=t,this.nativeError=e}var createElementID=(_count=0,function(){return idPrefix$1+"__lottie_element_"+(_count+=1)}),_count;function HSVtoRGB(t,e,i){var n,r,s,a,o,l,h,c;switch(l=i*(1-e),h=i*(1-(o=6*t-(a=Math.floor(6*t)))*e),c=i*(1-(1-o)*e),a%6){case 0:n=i,r=c,s=l;break;case 1:n=h,r=i,s=l;break;case 2:n=l,r=i,s=c;break;case 3:n=l,r=h,s=i;break;case 4:n=c,r=l,s=i;break;case 5:n=i,r=l,s=h}return[n,r,s]}
vendor: 24,417 bytes, line 2
2function RGBtoHSV(t,e,i){var n,r=Math.max(t,e,i),s=Math.min(t,e,i),a=r-s,o=0===r?0:a/r,l=r/255;switch(r){case s:n=0;break;case t:n=e-i+a*(e<i?6:0),n/=6*a;break;case e:n=i-t+2*a,n/=6*a;break;case i:n=t-e+4*a,n/=6*a}return[n,o,l]}function addSaturationToRGB(t,e){var i=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return i[1]+=e,i[1]>1?i[1]=1:i[1]<=0&&(i[1]=0),HSVtoRGB(i[0],i[1],i[2])}function addBrightnessToRGB(t,e){var i=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return i[2]+=e,i[2]>1?i[2]=1:i[2]<0&&(i[2]=0),HSVtoRGB(i[0],i[1],i[2])}function addHueToRGB(t,e){var i=RGBtoHSV(255*t[0],255*t[1],255*t[2]);return i[0]+=e/360,i[0]>1?i[0]-=1:i[0]<0&&(i[0]+=1),HSVtoRGB(i[0],i[1],i[2])}var rgbToHex=function(){var t,e,i=[];for(t=0;t<256;t+=1)e=t.toString(16),i[t]=1===e.length?"0"+e:e;return function(t,e,n){return t<0&&(t=0),e<0&&(e=0),n<0&&(n=0),"#"+i[t]+i[e]+i[n]}}(),setSubframeEnabled=function(t){subframeEnabled=!!t},getSubframeEnabled=function(){return subframeEnabled},setExpressionsPlugin=function(t){expressionsPlugin=t},getExpressionsPlugin=function(){return expressionsPlugin},setExpressionInterfaces=function(t){expressionsInterfaces=t},getExpressionInterfaces=function(){return expressionsInterfaces},setDefaultCurveSegments=function(t){defaultCurveSegments=t},getDefaultCurveSegments=function(){return defaultCurveSegments},setIdPrefix=function(t){idPrefix$1=t},getIdPrefix=function(){return idPrefix$1};function createNS(t){return document.createElementNS(svgNS,t)}function _typeof$5(t){return _typeof$5="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$5(t)}var dataManager=function(){var t,e,i=1,n=[],r={onmessage:function(){},postMessage:function(e){t({data:e})}},s={postMessage:function(t){r.onmessage({data:t})}};function a(){e||(e=function(e){if(window.Worker&&window.Blob&&getWebWorker()){var i=new Blob(["var _workerSelf = self; self.onmessage = ",e.toString()],{type:"text/javascript"}),n=URL.createObjectURL(i);return new Worker(n)}return t=e,r}(function(t){if(s.dataManager||(s.dataManager=function(){function t(r,s){var a,o,l,h,c,d,f=r.length;for(o=0;o<f;o+=1)if("ks"in(a=r[o])&&!a.completed){if(a.completed=!0,a.hasMask){var p=a.masksProperties;for(h=p.length,l=0;l<h;l+=1)if(p[l].pt.k.i)n(p[l].pt.k);else for(d=p[l].pt.k.length,c=0;c<d;c+=1)p[l].pt.k[c].s&&n(p[l].pt.k[c].s[0]),p[l].pt.k[c].e&&n(p[l].pt.k[c].e[0])}0===a.ty?(a.layers=e(a.refId,s),t(a.layers,s)):4===a.ty?i(a.shapes):5===a.ty&&u(a)}}function e(t,e){var i=function(t,e){for(var i=0,n=e.length;i<n;){if(e[i].id===t)return e[i];i+=1}return null}(t,e);return i?i.layers.__used?JSON.parse(JSON.stringify(i.layers)):(i.layers.__used=!0,i.layers):null}function i(t){var e,r,s;for(e=t.length-1;e>=0;e-=1)if("sh"===t[e].ty)if(t[e].ks.k.i)n(t[e].ks.k);else for(s=t[e].ks.k.length,r=0;r<s;r+=1)t[e].ks.k[r].s&&n(t[e].ks.k[r].s[0]),t[e].ks.k[r].e&&n(t[e].ks.k[r].e[0]);else"gr"===t[e].ty&&i(t[e].it)}function n(t){var e,i=t.i.length;for(e=0;e<i;e+=1)t.i[e][0]+=t.v[e][0],t.i[e][1]+=t.v[e][1],t.o[e][0]+=t.v[e][0],t.o[e][1]+=t.v[e][1]}function r(t,e){var i=e?e.split("."):[100,100,100];return t[0]>i[0]||!(i[0]>t[0])&&(t[1]>i[1]||!(i[1]>t[1])&&(t[2]>i[2]||!(i[2]>t[2])&&null))}var s,a=function(){var t=[4,4,14];function e(t){var e=t.t.d;t.t.d={k:[{s:e,t:0}]}}function i(t){var i,n=t.length;for(i=0;i<n;i+=1)5===t[i].ty&&e(t[i])}return function(e){if(r(t,e.v)&&(i(e.layers),e.assets)){var n,s=e.assets.length;for(n=0;n<s;n+=1)e.assets[n].layers&&i(e.assets[n].layers)}}}(),o=(s=[4,7,99],function(t){if(t.chars&&!r(s,t.v)){var e,n=t.chars.length;for(e=0;e<n;e+=1){var a=t.chars[e];a.data&&a.data.shapes&&(i(a.data.shapes),a.data.ip=0,a.data.op=99999,a.data.st=0,a.data.sr=1,a.data.ks={p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0}},t.chars[e].t||(a.data.shapes.push({ty:"no"}),a.data.shapes[0].it.push({p:{k:[0,0],a:0},s:{k:[100,100],a:0},a:{k:[0,0],a:0},r:{k:0,a:0},o:{k:100,a:0},sk:{k:0,a:0},sa:{k:0,a:0},ty:"tr"})))}}}),l=function(){var t=[5,7,15];function e(t){var e=t.t.p;"number"==typeof e.a&&(e.a={a:0,k:e.a}),"number"==typeof e.p&&(e.p={a:0,k:e.p}),"number"==typeof e.r&&(e.r={a:0,k:e.r})}function i(t){var i,n=t.length;for(i=0;i<n;i+=1)5===t[i].ty&&e(t[i])}return function(e){if(r(t,e.v)&&(i(e.layers),e.assets)){var n,s=e.assets.length;for(n=0;n<s;n+=1)e.assets[n].layers&&i(e.assets[n].layers)}}}(),h=function(){var t=[4,1,9];function e(t){var i,n,r,s=t.length;for(i=0;i<s;i+=1)if("gr"===t[i].ty)e(t[i].it);else if("fl"===t[i].ty||"st"===t[i].ty)if(t[i].c.k&&t[i].c.k[0].i)for(r=t[i].c.k.length,n=0;n<r;n+=1)t[i].c.k[n].s&&(t[i].c.k[n].s[0]/=255,t[i].c.k[n].s[1]/=255,t[i].c.k[n].s[2]/=255,t[i].c.k[n].s[3]/=255),t[i].c.k[n].e&&(t[i].c.k[n].e[0]/=255,t[i].c.k[n].e[1]/=255,t[i].c.k[n].e[2]/=255,t[i].c.k[n].e[3]/=255);else t[i].c.k[0]/=255,t[i].c.k[1]/=255,t[i].c.k[2]/=255,t[i].c.k[3]/=255}function i(t){var i,n=t.length;for(i=0;i<n;i+=1)4===t[i].ty&&e(t[i].shapes)}return function(e){if(r(t,e.v)&&(i(e.layers),e.assets)){var n,s=e.assets.length;for(n=0;n<s;n+=1)e.assets[n].layers&&i(e.assets[n].layers)}}}(),c=function(){var t=[4,4,18];function e(t){var i,n,r;for(i=t.length-1;i>=0;i-=1)if("sh"===t[i].ty)if(t[i].ks.k.i)t[i].ks.k.c=t[i].closed;else for(r=t[i].ks.k.length,n=0;n<r;n+=1)t[i].ks.k[n].s&&(t[i].ks.k[n].s[0].c=t[i].closed),t[i].ks.k[n].e&&(t[i].ks.k[n].e[0].c=t[i].closed);else"gr"===t[i].ty&&e(t[i].it)}function i(t){var i,n,r,s,a,o,l=t.length;for(n=0;n<l;n+=1){if((i=t[n]).hasMask){var h=i.masksProperties;for(s=h.length,r=0;r<s;r+=1)if(h[r].pt.k.i)h[r].pt.k.c=h[r].cl;else for(o=h[r].pt.k.length,a=0;a<o;a+=1)h[r].pt.k[a].s&&(h[r].pt.k[a].s[0].c=h[r].cl),h[r].pt.k[a].e&&(h[r].pt.k[a].e[0].c=h[r].cl)}4===i.ty&&e(i.shapes)}}return function(e){if(r(t,e.v)&&(i(e.layers),e.assets)){var n,s=e.assets.length;for(n=0;n<s;n+=1)e.assets[n].layers&&i(e.assets[n].layers)}}}();function u(t){0===t.t.a.length&&t.t.p}var d={completeData:function(i){i.__complete||(h(i),a(i),o(i),l(i),c(i),t(i.layers,i.assets),function(i,n){if(i){var r=0,s=i.length;for(r=0;r<s;r+=1)1===i[r].t&&(i[r].data.layers=e(i[r].data.refId,n),t(i[r].data.layers,n))}}(i.chars,i.assets),i.__complete=!0)}};return d.checkColors=h,d.checkChars=o,d.checkPathProperties=l,d.checkShapes=c,d.completeLayers=t,d}()),s.assetLoader||(s.assetLoader=function(){function t(t){var e=t.getResponseHeader("content-type");return e&&"json"===t.responseType&&-1!==e.indexOf("json")||t.response&&"object"===_typeof$5(t.response)?t.response:t.response&&"string"==typeof t.response?JSON.parse(t.response):t.responseText?JSON.parse(t.responseText):null}return{load:function(e,i,n,r){var s,a=new XMLHttpRequest;try{a.responseType="json"}catch(t){}a.onreadystatechange=function(){if(4===a.readyState)if(200===a.status)s=t(a),n(s);else try{s=t(a),n(s)}catch(t){r&&r(t)}};try{a.open(["G","E","T"].join(""),e,!0)}catch(t){a.open(["G","E","T"].join(""),i+"/"+e,!0)}a.send()}}}()),"loadAnimation"===t.data.type)s.assetLoader.load(t.data.path,t.data.fullPath,function(e){s.dataManager.completeData(e),s.postMessage({id:t.data.id,payload:e,status:"success"})},function(){s.postMessage({id:t.data.id,status:"error"})});else if("complete"===t.data.type){var e=t.data.animation;s.dataManager.completeData(e),s.postMessage({id:t.data.id,payload:e,status:"success"})}else"loadData"===t.data.type&&s.assetLoader.load(t.data.path,t.data.fullPath,function(e){s.postMessage({id:t.data.id,payload:e,status:"success"})},function(){s.postMessage({id:t.data.id,status:"error"})})}),e.onmessage=function(t){var e=t.data,i=e.id,r=n[i];n[i]=null,"success"===e.status?r.onComplete(e.payload):r.onError&&r.onError()})}function o(t,e){var r="processId_"+(i+=1);return n[r]={onComplete:t,onError:e},r}return{loadAnimation:function(t,i,n){a();var r=o(i,n);e.postMessage({type:"loadAnimation",path:t,fullPath:window.location.origin+window.location.pathname,id:r})},loadData:function(t,i,n){a();var r=o(i,n);e.postMessage({type:"loadData",path:t,fullPath:window.location.origin+window.location.pathname,id:r})},completeAnimation:function(t,i,n){a();var r=o(i,n);e.postMessage({type:"complete",animation:t,id:r})}}}(),ImagePreloader=function(){var t=function(){var t=createTag("canvas");t.width=1,t.height=1;var e=t.getContext("2d");return e.fillStyle="rgba(0,0,0,0)",e.fillRect(0,0,1,1),t}();function e(){this.loadedAssets+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function i(){this.loadedFootagesCount+=1,this.loadedAssets===this.totalImages&&this.loadedFootagesCount===this.totalFootages&&this.imagesLoadedCb&&this.imagesLoadedCb(null)}function n(t,e,i){var n="";if(t.e)n=t.p;else if(e){var r=t.p;-1!==r.indexOf("images/")&&(r=r.split("/")[1]),n=e+r}else n=i,n+=t.u?t.u:"",n+=t.p;return n}function r(t){var e=0,i=setInterval(function(){(t.getBBox().width||e>500)&&(this._imageLoaded(),clearInterval(i)),e+=1}.bind(this),50)}function s(t){var e={assetData:t},i=n(t,this.assetsPath,this.path);return dataManager.loadData(i,function(t){e.img=t,this._footageLoaded()}.bind(this),function(){e.img={},this._footageLoaded()}.bind(this)),e}function a(){this._imageLoaded=e.bind(this),this._footageLoaded=i.bind(this),this.testImageLoaded=r.bind(this),this.createFootageData=s.bind(this),this.assetsPath="",this.path="",this.totalImages=0,this.totalFootages=0,this.loadedAssets=0,this.loadedFootagesCount=0,this.imagesLoadedCb=null,this.images=[]}return a.prototype={loadAssets:function(t,e){var i;this.imagesLoadedCb=e;var n=t.length;for(i=0;i<n;i+=1)t[i].layers||(t[i].t&&"seq"!==t[i].t?3===t[i].t&&(this.totalFootages+=1,this.images.push(this.createFootageData(t[i]))):(this.totalImages+=1,this.images.push(this._createImageData(t[i]))))},setAssetsPath:function(t){this.assetsPath=t||""},setPath:function(t){this.path=t||""},loadedImages:function(){return this.totalImages===this.loadedAssets},loadedFootages:function(){return this.totalFootages===this.loadedFootagesCount},destroy:function(){this.imagesLoadedCb=null,this.images.length=0},getAsset:function(t){for(var e=0,i=this.images.length;e<i;){if(this.images[e].assetData===t)return this.images[e].img;e+=1}return null},createImgData:function(e){var i=n(e,this.assetsPath,this.path),r=createTag("img");r.crossOrigin="anonymous",r.addEventListener("load",this._imageLoaded,!1),r.addEventListener("error",function(){s.img=t,this._imageLoaded()}.bind(this),!1),r.src=i;var s={img:r,assetData:e};return s},createImageData:function(e){var i=n(e,this.assetsPath,this.path),r=createNS("image");isSafari?this.testImageLoaded(r):r.addEventListener("load",this._imageLoaded,!1),r.addEventListener("error",function(){s.img=t,this._imageLoaded()}.bind(this),!1),r.setAttributeNS("http://www.w3.org/1999/xlink","href",i),this._elementHelper.append?this._elementHelper.append(r):this._elementHelper.appendChild(r);var s={img:r,assetData:e};return s},imageLoaded:e,footageLoaded:i,setCacheType:function(t,e){"svg"===t?(this._elementHelper=e,this._createImageData=this.createImageData.bind(this)):this._createImageData=this.createImgData.bind(this)}},a}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(t,e){if(this._cbs[t])for(var i=this._cbs[t],n=0;n<i.length;n+=1)i[n](e)},addEventListener:function(t,e){return this._cbs[t]||(this._cbs[t]=[]),this._cbs[t].push(e),function(){this.removeEventListener(t,e)}.bind(this)},removeEventListener:function(t,e){if(e){if(this._cbs[t]){for(var i=0,n=this._cbs[t].length;i<n;)this._cbs[t][i]===e&&(this._cbs[t].splice(i,1),i-=1,n-=1),i+=1;this._cbs[t].length||(this._cbs[t]=null)}}else this._cbs[t]=null}};var markerParser=function(){function t(t){for(var e,i=t.split("\r\n"),n={},r=0,s=0;s<i.length;s+=1)2===(e=i[s].split(":")).length&&(n[e[0]]=e[1].trim(),r+=1);if(0===r)throw new Error;return n}return function(e){for(var i=[],n=0;n<e.length;n+=1){var r=e[n],s={time:r.tm,duration:r.dr};try{s.payload=JSON.parse(e[n].cm)}catch(i){try{s.payload=t(e[n].cm)}catch(t){s.payload={name:e[n].cm}}}i.push(s)}return i}}(),ProjectInterface=function(){function t(t){this.compositions.push(t)}return function(){function e(t){for(var e=0,i=this.compositions.length;e<i;){if(this.compositions[e].data&&this.compositions[e].data.nm===t)return this.compositions[e].prepareFrame&&this.compositions[e].data.xt&&this.compositions[e].prepareFrame(this.currentFrame),this.compositions[e].compInterface;e+=1}return null}return e.compositions=[],e.currentFrame=0,e.registerComposition=t,e}}(),renderers={},registerRenderer=function(t,e){renderers[t]=e};function getRenderer(t){return renderers[t]}function getRegisteredRenderer(){if(renderers.canvas)return"canvas";for(var t in renderers)if(renderers[t])return t;return""}function _typeof$4(t){return _typeof$4="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$4(t)}var AnimationItem=function(){this._cbs=[],this.name="",this.path="",this.isLoaded=!1,this.currentFrame=0,this.currentRawFrame=0,this.firstFrame=0,this.totalFrames=0,this.frameRate=0,this.frameMult=0,this.playSpeed=1,this.playDirection=1,this.playCount=0,this.animationData={},this.assets=[],this.isPaused=!0,this.autoplay=!1,this.loop=!0,this.renderer=null,this.animationID=createElementID(),this.assetsPath="",this.timeCompleted=0,this.segmentPos=0,this.isSubframeEnabled=getSubframeEnabled(),this.segments=[],this._idle=!0,this._completedLoop=!1,this.projectInterface=ProjectInterface(),this.imagePreloader=new ImagePreloader,this.audioController=audioControllerFactory(),this.markers=[],this.configAnimation=this.configAnimation.bind(this),this.onSetupError=this.onSetupError.bind(this),this.onSegmentComplete=this.onSegmentComplete.bind(this),this.drawnFrameEvent=new BMEnterFrameEvent("drawnFrame",0,0,0),this.expressionsPlugin=getExpressionsPlugin()};extendPrototype([BaseEvent],AnimationItem),AnimationItem.prototype.setParams=function(t){(t.wrapper||t.container)&&(this.wrapper=t.wrapper||t.container);var e="svg";t.animType?e=t.animType:t.renderer&&(e=t.renderer);var i=getRenderer(e);this.renderer=new i(this,t.rendererSettings),this.imagePreloader.setCacheType(e,this.renderer.globalData.defs),this.renderer.setProjectInterface(this.projectInterface),this.animType=e,""===t.loop||null===t.loop||void 0===t.loop||!0===t.loop?this.loop=!0:!1===t.loop?this.loop=!1:this.loop=parseInt(t.loop,10),this.autoplay=!("autoplay"in t)||t.autoplay,this.name=t.name?t.name:"",this.autoloadSegments=!Object.prototype.hasOwnProperty.call(t,"autoloadSegments")||t.autoloadSegments,this.assetsPath=t.assetsPath,this.initialSegment=t.initialSegment,t.audioFactory&&this.audioController.setAudioFactory(t.audioFactory),t.animationData?this.setupAnimation(t.animationData):t.path&&(-1!==t.path.lastIndexOf("\\")?this.path=t.path.substr(0,t.path.lastIndexOf("\\")+1):this.path=t.path.substr(0,t.path.lastIndexOf("/")+1),this.fileName=t.path.substr(t.path.lastIndexOf("/")+1),this.fileName=this.fileName.substr(0,this.fileName.lastIndexOf(".json")),dataManager.loadAnimation(t.path,this.configAnimation,this.onSetupError))},AnimationItem.prototype.onSetupError=function(){this.trigger("data_failed")},AnimationItem.prototype.setupAnimation=function(t){dataManager.completeAnimation(t,this.configAnimation)},AnimationItem.prototype.setData=function(t,e){e&&"object"!==_typeof$4(e)&&(e=JSON.parse(e));var i={wrapper:t,animationData:e},n=t.attributes;i.path=n.getNamedItem("data-animation-path")?n.getNamedItem("data-animation-path").value:n.getNamedItem("data-bm-path")?n.getNamedItem("data-bm-path").value:n.getNamedItem("bm-path")?n.getNamedItem("bm-path").value:"",i.animType=n.getNamedItem("data-anim-type")?n.getNamedItem("data-anim-type").value:n.getNamedItem("data-bm-type")?n.getNamedItem("data-bm-type").value:n.getNamedItem("bm-type")?n.getNamedItem("bm-type").value:n.getNamedItem("data-bm-renderer")?n.getNamedItem("data-bm-renderer").value:n.getNamedItem("bm-renderer")?n.getNamedItem("bm-renderer").value:getRegisteredRenderer()||"canvas";var r=n.getNamedItem("data-anim-loop")?n.getNamedItem("data-anim-loop").value:n.getNamedItem("data-bm-loop")?n.getNamedItem("data-bm-loop").value:n.getNamedItem("bm-loop")?n.getNamedItem("bm-loop").value:"";"false"===r?i.loop=!1:"true"===r?i.loop=!0:""!==r&&(i.loop=parseInt(r,10));var s=n.getNamedItem("data-anim-autoplay")?n.getNamedItem("data-anim-autoplay").value:n.getNamedItem("data-bm-autoplay")?n.getNamedItem("data-bm-autoplay").value:!n.getNamedItem("bm-autoplay")||n.getNamedItem("bm-autoplay").value;i.autoplay="false"!==s,i.name=n.getNamedItem("data-name")?n.getNamedItem("data-name").value:n.getNamedItem("data-bm-name")?n.getNamedItem("data-bm-name").value:n.getNamedItem("bm-name")?n.getNamedItem("bm-name").value:"","false"===(n.getNamedItem("data-anim-prerender")?n.getNamedItem("data-anim-prerender").value:n.getNamedItem("data-bm-prerender")?n.getNamedItem("data-bm-prerender").value:n.getNamedItem("bm-prerender")?n.getNamedItem("bm-prerender").value:"")&&(i.prerender=!1),i.path?this.setParams(i):this.trigger("destroy")},AnimationItem.prototype.includeLayers=function(t){t.op>this.animationData.op&&(this.animationData.op=t.op,this.totalFrames=Math.floor(t.op-this.animationData.ip));var e,i,n=this.animationData.layers,r=n.length,s=t.layers,a=s.length;for(i=0;i<a;i+=1)for(e=0;e<r;){if(n[e].id===s[i].id){n[e]=s[i];break}e+=1}if((t.chars||t.fonts)&&(this.renderer.globalData.fontManager.addChars(t.chars),this.renderer.globalData.fontManager.addFonts(t.fonts,this.renderer.globalData.defs)),t.assets)for(r=t.assets.length,e=0;e<r;e+=1)this.animationData.assets.push(t.assets[e]);this.animationData.__complete=!1,dataManager.completeAnimation(this.animationData,this.onSegmentComplete)},AnimationItem.prototype.onSegmentComplete=function(t){this.animationData=t;var e=getExpressionsPlugin();e&&e.initExpressions(this),this.loadNextSegment()},AnimationItem.prototype.loadNextSegment=function(){var t=this.animationData.segments;if(!t||0===t.length||!this.autoloadSegments)return this.trigger("data_ready"),void(this.timeCompleted=this.totalFrames);var e=t.shift();this.timeCompleted=e.time*this.frameRate;var i=this.path+this.fileName+"_"+this.segmentPos+".json";this.segmentPos+=1,dataManager.loadData(i,this.includeLayers.bind(this),function(){this.trigger("data_failed")}.bind(this))},AnimationItem.prototype.loadSegments=function(){this.animationData.segments||(this.timeCompleted=this.totalFrames),this.loadNextSegment()},AnimationItem.prototype.imagesLoaded=function(){this.trigger("loaded_images"),this.checkLoaded()},AnimationItem.prototype.preloadImages=function(){this.imagePreloader.setAssetsPath(this.assetsPath),this.imagePreloader.setPath(this.path),this.imagePreloader.loadAssets(this.animationData.assets,this.imagesLoaded.bind(this))},AnimationItem.prototype.configAnimation=function(t){if(this.renderer)try{this.animationData=t,this.initialSegment?(this.totalFrames=Math.floor(this.initialSegment[1]-this.initialSegment[0]),this.firstFrame=Math.round(this.initialSegment[0])):(this.totalFrames=Math.floor(this.animationData.op-this.animationData.ip),this.firstFrame=Math.round(this.animationData.ip)),this.renderer.configAnimation(t),t.assets||(t.assets=[]),this.assets=this.animationData.assets,this.frameRate=this.animationData.fr,this.frameMult=this.animationData.fr/1e3,this.renderer.searchExtraCompositions(t.assets),this.markers=markerParser(t.markers||[]),this.trigger("config_ready"),this.preloadImages(),this.loadSegments(),this.updaFrameModifier(),this.waitForFontsLoaded(),this.isPaused&&this.audioController.pause()}catch(t){this.triggerConfigError(t)}},AnimationItem.prototype.waitForFontsLoaded=function(){this.renderer&&(this.renderer.globalData.fontManager.isLoaded?this.checkLoaded():setTimeout(this.waitForFontsLoaded.bind(this),20))},AnimationItem.prototype.checkLoaded=function(){if(!this.isLoaded&&this.renderer.globalData.fontManager.isLoaded&&(this.imagePreloader.loadedImages()||"canvas"!==this.renderer.rendererType)&&this.imagePreloader.loadedFootages()){this.isLoaded=!0;var t=getExpressionsPlugin();t&&t.initExpressions(this),this.renderer.initItems(),setTimeout(function(){this.trigger("DOMLoaded")}.bind(this),0),this.gotoFrame(),this.autoplay&&this.play()}},AnimationItem.prototype.resize=function(t,e){var i="number"==typeof t?t:void 0,n="number"==typeof e?e:void 0;this.renderer.updateContainerSize(i,n)},AnimationItem.prototype.setSubframe=function(t){this.isSubframeEnabled=!!t},AnimationItem.prototype.gotoFrame=function(){this.currentFrame=this.isSubframeEnabled?this.currentRawFrame:~~this.currentRawFrame,this.timeCompleted!==this.totalFrames&&this.currentFrame>this.timeCompleted&&(this.currentFrame=this.timeCompleted),this.trigger("enterFrame"),this.renderFrame(),this.trigger("drawnFrame")},AnimationItem.prototype.renderFrame=function(){if(!1!==this.isLoaded&&this.renderer)try{this.expressionsPlugin&&this.expressionsPlugin.resetFrame(),this.renderer.renderFrame(this.currentFrame+this.firstFrame)}catch(t){this.triggerRenderFrameError(t)}},AnimationItem.prototype.play=function(t){t&&this.name!==t||!0===this.isPaused&&(this.isPaused=!1,this.trigger("_play"),this.audioController.resume(),this._idle&&(this._idle=!1,this.trigger("_active")))},AnimationItem.prototype.pause=function(t){t&&this.name!==t||!1===this.isPaused&&(this.isPaused=!0,this.trigger("_pause"),this._idle=!0,this.trigger("_idle"),this.audioController.pause())},AnimationItem.prototype.togglePause=function(t){t&&this.name!==t||(!0===this.isPaused?this.play():this.pause())},AnimationItem.prototype.stop=function(t){t&&this.name!==t||(this.pause(),this.playCount=0,this._completedLoop=!1,this.setCurrentRawFrameValue(0))},AnimationItem.prototype.getMarkerData=function(t){for(var e,i=0;i<this.markers.length;i+=1)if((e=this.markers[i]).payload&&e.payload.name===t)return e;return null},AnimationItem.prototype.goToAndStop=function(t,e,i){if(!i||this.name===i){var n=Number(t);if(isNaN(n)){var r=this.getMarkerData(t);r&&this.goToAndStop(r.time,!0)}else e?this.setCurrentRawFrameValue(t):this.setCurrentRawFrameValue(t*this.frameModifier);this.pause()}},AnimationItem.prototype.goToAndPlay=function(t,e,i){if(!i||this.name===i){var n=Number(t);if(isNaN(n)){var r=this.getMarkerData(t);r&&(r.duration?this.playSegments([r.time,r.time+r.duration],!0):this.goToAndStop(r.time,!0))}else this.goToAndStop(n,e,i);this.play()}},AnimationItem.prototype.advanceTime=function(t){if(!0!==this.isPaused&&!1!==this.isLoaded){var e=this.currentRawFrame+t*this.frameModifier,i=!1;e>=this.totalFrames-1&&this.frameModifier>0?this.loop&&this.playCount!==this.loop?e>=this.totalFrames?(this.playCount+=1,this.checkSegments(e%this.totalFrames)||(this.setCurrentRawFrameValue(e%this.totalFrames),this._completedLoop=!0,this.trigger("loopComplete"))):this.setCurrentRawFrameValue(e):this.checkSegments(e>this.totalFrames?e%this.totalFrames:0)||(i=!0,e=this.totalFrames-1):e<0?this.checkSegments(e%this.totalFrames)||(!this.loop||this.playCount--<=0&&!0!==this.loop?(i=!0,e=0):(this.setCurrentRawFrameValue(this.totalFrames+e%this.totalFrames),this._completedLoop?this.trigger("loopComplete"):this._completedLoop=!0)):this.setCurrentRawFrameValue(e),i&&(this.setCurrentRawFrameValue(e),this.pause(),this.trigger("complete"))}},AnimationItem.prototype.adjustSegment=function(t,e){this.playCount=0,t[1]<t[0]?(this.frameModifier>0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(-1)),this.totalFrames=t[0]-t[1],this.timeCompleted=this.totalFrames,this.firstFrame=t[1],this.setCurrentRawFrameValue(this.totalFrames-.001-e)):t[1]>t[0]&&(this.frameModifier<0&&(this.playSpeed<0?this.setSpeed(-this.playSpeed):this.setDirection(1)),this.totalFrames=t[1]-t[0],this.timeCompleted=this.totalFrames,this.firstFrame=t[0],this.setCurrentRawFrameValue(.001+e)),this.trigger("segmentStart")},AnimationItem.prototype.setSegment=function(t,e){var i=-1;this.isPaused&&(this.currentRawFrame+this.firstFrame<t?i=t:this.currentRawFrame+this.firstFrame>e&&(i=e-t)),this.firstFrame=t,this.totalFrames=e-t,this.timeCompleted=this.totalFrames,-1!==i&&this.goToAndStop(i,!0)},AnimationItem.prototype.playSegments=function(t,e){if(e&&(this.segments.length=0),"object"===_typeof$4(t[0])){var i,n=t.length;for(i=0;i<n
vendor: 4,358 bytes, line 2
2;i+=1)this.segments.push(t[i])}else this.segments.push(t);this.segments.length&&e&&this.adjustSegment(this.segments.shift(),0),this.isPaused&&this.play()},AnimationItem.prototype.resetSegments=function(t){this.segments.length=0,this.segments.push([this.animationData.ip,this.animationData.op]),t&&this.checkSegments(0)},AnimationItem.prototype.checkSegments=function(t){return!!this.segments.length&&(this.adjustSegment(this.segments.shift(),t),!0)},AnimationItem.prototype.destroy=function(t){t&&this.name!==t||!this.renderer||(this.renderer.destroy(),this.imagePreloader.destroy(),this.trigger("destroy"),this._cbs=null,this.onEnterFrame=null,this.onLoopComplete=null,this.onComplete=null,this.onSegmentStart=null,this.onDestroy=null,this.renderer=null,this.expressionsPlugin=null,this.imagePreloader=null,this.projectInterface=null)},AnimationItem.prototype.setCurrentRawFrameValue=function(t){this.currentRawFrame=t,this.gotoFrame()},AnimationItem.prototype.setSpeed=function(t){this.playSpeed=t,this.updaFrameModifier()},AnimationItem.prototype.setDirection=function(t){this.playDirection=t<0?-1:1,this.updaFrameModifier()},AnimationItem.prototype.setLoop=function(t){this.loop=t},AnimationItem.prototype.setVolume=function(t,e){e&&this.name!==e||this.audioController.setVolume(t)},AnimationItem.prototype.getVolume=function(){return this.audioController.getVolume()},AnimationItem.prototype.mute=function(t){t&&this.name!==t||this.audioController.mute()},AnimationItem.prototype.unmute=function(t){t&&this.name!==t||this.audioController.unmute()},AnimationItem.prototype.updaFrameModifier=function(){this.frameModifier=this.frameMult*this.playSpeed*this.playDirection,this.audioController.setRate(this.playSpeed*this.playDirection)},AnimationItem.prototype.getPath=function(){return this.path},AnimationItem.prototype.getAssetsPath=function(t){var e="";if(t.e)e=t.p;else if(this.assetsPath){var i=t.p;-1!==i.indexOf("images/")&&(i=i.split("/")[1]),e=this.assetsPath+i}else e=this.path,e+=t.u?t.u:"",e+=t.p;return e},AnimationItem.prototype.getAssetData=function(t){for(var e=0,i=this.assets.length;e<i;){if(t===this.assets[e].id)return this.assets[e];e+=1}return null},AnimationItem.prototype.hide=function(){this.renderer.hide()},AnimationItem.prototype.show=function(){this.renderer.show()},AnimationItem.prototype.getDuration=function(t){return t?this.totalFrames:this.totalFrames/this.frameRate},AnimationItem.prototype.updateDocumentData=function(t,e,i){try{this.renderer.getElementByPath(t).updateDocumentData(e,i)}catch(t){}},AnimationItem.prototype.trigger=function(t){if(this._cbs&&this._cbs[t])switch(t){case"enterFrame":this.triggerEvent(t,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameModifier));break;case"drawnFrame":this.drawnFrameEvent.currentTime=this.currentFrame,this.drawnFrameEvent.totalTime=this.totalFrames,this.drawnFrameEvent.direction=this.frameModifier,this.triggerEvent(t,this.drawnFrameEvent);break;case"loopComplete":this.triggerEvent(t,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult));break;case"complete":this.triggerEvent(t,new BMCompleteEvent(t,this.frameMult));break;case"segmentStart":this.triggerEvent(t,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames));break;case"destroy":this.triggerEvent(t,new BMDestroyEvent(t,this));break;default:this.triggerEvent(t)}"enterFrame"===t&&this.onEnterFrame&&this.onEnterFrame.call(this,new BMEnterFrameEvent(t,this.currentFrame,this.totalFrames,this.frameMult)),"loopComplete"===t&&this.onLoopComplete&&this.onLoopComplete.call(this,new BMCompleteLoopEvent(t,this.loop,this.playCount,this.frameMult)),"complete"===t&&this.onComplete&&this.onComplete.call(this,new BMCompleteEvent(t,this.frameMult)),"segmentStart"===t&&this.onSegmentStart&&this.onSegmentStart.call(this,new BMSegmentStartEvent(t,this.firstFrame,this.totalFrames)),"destroy"===t&&this.onDestroy&&this.onDestroy.call(this,new BMDestroyEvent(t,this))},AnimationItem.prototype.triggerRenderFrameError=function(t){var e=new BMRenderFrameErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)},AnimationItem.prototype.triggerConfigError=function(t){var e=new BMConfigErrorEvent(t,this.currentFrame);this.triggerEvent("error",e),this.onError&&this.onError.call(this,e)};var animationManager=function(){var t={},e=[],i=0,
vendor: 8,337 bytes, line 2
2n=0,r=0,s=!0,a=!1;function o(t){for(var i=0,r=t.target;i<n;)e[i].animation===r&&(e.splice(i,1),i-=1,n-=1,r.isPaused||c()),i+=1}function l(t,i){if(!t)return null;for(var r=0;r<n;){if(e[r].elem===t&&null!==e[r].elem)return e[r].animation;r+=1}var s=new AnimationItem;return u(s,t),s.setData(t,i),s}function h(){r+=1,p()}function c(){r-=1}function u(t,i){t.addEventListener("destroy",o),t.addEventListener("_active",h),t.addEventListener("_idle",c),e.push({elem:i,animation:t}),n+=1}function d(t){var o,l=t-i;for(o=0;o<n;o+=1)e[o].animation.advanceTime(l);i=t,r&&!a?window.requestAnimationFrame(d):s=!0}function f(t){i=t,window.requestAnimationFrame(d)}function p(){!a&&r&&s&&(window.requestAnimationFrame(f),s=!1)}return t.registerAnimation=l,t.loadAnimation=function(t){var e=new AnimationItem;return u(e,null),e.setParams(t),e},t.setSpeed=function(t,i){var r;for(r=0;r<n;r+=1)e[r].animation.setSpeed(t,i)},t.setDirection=function(t,i){var r;for(r=0;r<n;r+=1)e[r].animation.setDirection(t,i)},t.play=function(t){var i;for(i=0;i<n;i+=1)e[i].animation.play(t)},t.pause=function(t){var i;for(i=0;i<n;i+=1)e[i].animation.pause(t)},t.stop=function(t){var i;for(i=0;i<n;i+=1)e[i].animation.stop(t)},t.togglePause=function(t){var i;for(i=0;i<n;i+=1)e[i].animation.togglePause(t)},t.searchAnimations=function(t,e,i){var n,r=[].concat([].slice.call(document.getElementsByClassName("lottie")),[].slice.call(document.getElementsByClassName("bodymovin"))),s=r.length;for(n=0;n<s;n+=1)i&&r[n].setAttribute("data-bm-type",i),l(r[n],t);if(e&&0===s){i||(i="svg");var a=document.getElementsByTagName("body")[0];a.innerText="";var o=createTag("div");o.style.width="100%",o.style.height="100%",o.setAttribute("data-bm-type",i),a.appendChild(o),l(o,t)}},t.resize=function(){var t;for(t=0;t<n;t+=1)e[t].animation.resize()},t.goToAndStop=function(t,i,r){var s;for(s=0;s<n;s+=1)e[s].animation.goToAndStop(t,i,r)},t.destroy=function(t){var i;for(i=n-1;i>=0;i-=1)e[i].animation.destroy(t)},t.freeze=function(){a=!0},t.unfreeze=function(){a=!1,p()},t.setVolume=function(t,i){var r;for(r=0;r<n;r+=1)e[r].animation.setVolume(t,i)},t.mute=function(t){var i;for(i=0;i<n;i+=1)e[i].animation.mute(t)},t.unmute=function(t){var i;for(i=0;i<n;i+=1)e[i].animation.unmute(t)},t.getRegisteredAnimations=function(){var t,i=e.length,n=[];for(t=0;t<i;t+=1)n.push(e[t].animation);return n},t}(),BezierFactory=function(){var t={getBezierEasing:function(t,i,n,r,s){var a=s||("bez_"+t+"_"+i+"_"+n+"_"+r).replace(/\./g,"p");if(e[a])return e[a];var o=new c([t,i,n,r]);return e[a]=o,o}},e={},i=11,n=1/(i-1),r="function"==typeof Float32Array;function s(t,e){return 1-3*e+3*t}function a(t,e){return 3*e-6*t}function o(t){return 3*t}function l(t,e,i){return((s(e,i)*t+a(e,i))*t+o(e))*t}function h(t,e,i){return 3*s(e,i)*t*t+2*a(e,i)*t+o(e)}function c(t){this._p=t,this._mSampleValues=r?new Float32Array(i):new Array(i),this._precomputed=!1,this.get=this.get.bind(this)}return c.prototype={get:function(t){var e=this._p[0],i=this._p[1],n=this._p[2],r=this._p[3];return this._precomputed||this._precompute(),e===i&&n===r?t:0===t?0:1===t?1:l(this._getTForX(t),i,r)},_precompute:function(){var t=this._p[0],e=this._p[1],i=this._p[2],n=this._p[3];this._precomputed=!0,t===e&&i===n||this._calcSampleValues()},_calcSampleValues:function(){for(var t=this._p[0],e=this._p[2],r=0;r<i;++r)this._mSampleValues[r]=l(r*n,t,e)},_getTForX:function(t){for(var e=this._p[0],r=this._p[2],s=this._mSampleValues,a=0,o=1,c=i-1;o!==c&&s[o]<=t;++o)a+=n;var u=a+(t-s[--o])/(s[o+1]-s[o])*n,d=h(u,e,r);return d>=.001?function(t,e,i,n){for(var r=0;r<4;++r){var s=h(e,i,n);if(0===s)return e;e-=(l(e,i,n)-t)/s}return e}(t,u,e,r):0===d?u:function(t,e,i,n,r){var s,a,o=0;do{(s=l(a=e+(i-e)/2,n,r)-t)>0?i=a:e=a}while(Math.abs(s)>1e-7&&++o<10);return a}(t,a,a+n,e,r)}},t}(),pooling={double:function(t){return t.concat(createSizedArray(t.length))}},poolFactory=function(t,e,i){var n=0,r=t,s=createSizedArray(r);return{newElement:function(){return n?s[n-=1]:e()},release:function(t){n===r&&(s=pooling.double(s),r*=2),i&&i(t),s[n]=t,n+=1}}},bezierLengthPool=poolFactory(8,function(){return{addedLength:0,percents:createTypedArray("float32",getDefaultCurveSegments()),lengths:createTypedArray("float32",getDefaultCurveSegments())}}),segmentsLengthPool=poolFactory(8,function(){return{lengths:[],totalLength:0}},function(t){var e,i=t.lengths.length;for(e=0;e<i;e+=1)bezierLengthPool.release(t.lengths[e]);t.lengths.length=0});function bezFunction(){var t=Math;function e(t,e,i,n,r,s){var a=t*n+e*r+i*s-r*n-s*t-i*e;return a>-.001&&a<.001}var i=function(t,e,i,n){var r,s,a,o,l,h,c=getDefaultCurveSegments(),u=0,d=[],f=[],p=bezierLengthPool.newElement();for(a=i.length,r=0;r<c;r+=1){for(l=r/(c-1),h=0,s=0;s<a;s+=1)o=bmPow(1-l,3)*t[s]+3*bmPow(1-l,2)*l*i[s]+3*(1-l)*bmPow(l,2)*n[s]+bmPow(l,3)*e[s],d[s]=o,null!==f[s]&&(h+=bmPow(d[s]-f[s],2)),f[s]=d[s];h&&(u+=h=bmSqrt(h)),p.percents[r]=l,p.lengths[r]=u}return p.addedLength=u,p};function n(t){this.segmentLength=0,this.points=new Array(t)}function r(t,e){this.partialLength=t,this.point=e}var s,a=(s={},function(t,i,a,o){var l=(t[0]+"_"+t[1]+"_"+i[0]+"_"+i[1]+"_"+a[0]+"_"+a[1]+"_"+o[0]+"_"+o[1]).replace(/\./g,"p");if(!s[l]){var h,c,u,d,f,p,m,g=getDefaultCurveSegments(),y=0,v=null;2===t.length&&(t[0]!==i[0]||t[1]!==i[1])&&e(t[0],t[1],i[0],i[1],t[0]+a[0],t[1]+a[1])&&e(t[0],t[1],i[0],i[1],i[0]+o[0],i[1]+o[1])&&(g=2);var b=new n(g);for(u=a.length,h=0;h<g;h+=1){for(m=createSizedArray(u),f=h/(g-1),p=0,c=0;c<u;c+=1)d=bmPow(1-f,3)*t[c]+3*bmPow(1-f,2)*f*(t[c]+a[c])+3*(1-f)*bmPow(f,2)*(i[c]+o[c])+bmPow(f,3)*i[c],m[c]=d,null!==v&&(p+=bmPow(m[c]-v[c],2));y+=p=bmSqrt(p),b.points[h]=new r(p,m),v=m}b.segmentLength=y,s[l]=b}return s[l]});function o(t,e){var i=e.percents,n=e.lengths,r=i.length,s=bmFloor((r-1)*t),a=t*e.addedLength,o=0;if(s===r-1||0===s||a===n[s])return i[s];for(var l=n[s]>a?-1:1,h=!0;h;)if(n[s]<=a&&n[s+1]>a?(o=(a-n[s])/(n[s+1]-n[s]),h=!1):s+=l,s<0||s>=r-1){if(s===r-1)return i[s];h=!1}return i[s]+(i[s+1]-i[s])*o}var l=createTypedArray("float32",8);return{getSegmentsLength:function(t){var e,n=segmentsLengthPool.newElement(),r=t.c,s=t.v,a=t.o,o=t.i,l=t._length,h=n.lengths,c=0;for(e=0;e<l-1;e+=1)h[e]=i(s[e],s[e+1],a[e],o[e+1]),c+=h[e].addedLength;return r&&l&&(h[e]=i(s[e],s[0],a[e],o[0]),c+=h[e].addedLength),n.totalLength=c,n},getNewSegment:function(e,i,n,r,s,a,h){s<0?s=0:s>1&&(s=1);var c,u=o(s,h),d=o(a=a>1?1:a,h),f=e.length,p=1-u,m=1-d,g=p*p*p,y=u*p*p*3,v=u*u*p*3,b=u*u*u,S=p*p*m,E=u*p*m+p*u*m+p*p*d,k=u*u*m+p*u*d+u*p*d,x=u*u*d,w=p*m*m,_=u*m*m+p*d*m+p*m*d,C=u*d*m+p*d*d+u*m*d,T=u*d*d,A=m*m*m,P=d*m*m+m*d*m+m*m*d,D=d*d*m+m*d*d+d*m*d,M=d*d*d;for(c=0;c<f;c+=1)l[4*c]=t.round(1e3*(g*e[c]+y*n[c]+v*r[c]+b*i[c]))/1e3,l[4*c+1]=t.round(1e3*(S*e[c]+E*n[c]+k*r[c]+x*i[c]))/1e3,l[4*c+2]=t.round(1e3*(w*e[c]+_*n[c]+C*r[c]+T*i[c]))/1e3,l[4*c+3]=t.round(1e3*(A*e[c]+P*n[c]+D*r[c]+M*i[c]))/1e3;return l},getPointInSegment:function(e,i,n,r,s,a){var l=o(s,a),h=1-l;return[t.round(1e3*(h*h*h*e[0]+(l*h*h+h*l*h+h*h*l)*n[0]+(l*l*h+h*l*l+l*h*l)*r[0]+l*l*l*i[0]))/1e3,t.round(1e3*(h*h*h*e[1]+(l*h*h+h*l*h+h*h*l)*n[1]+(l*l*h+h*l*l+l*h*l)*r[1]+l*l*l*i[1]))/1e3]},buildBezierData:a,pointOnLine2D:e,pointOnLine3D:function(i,n,r,s,a,o,l,h,c){if(0===r&&0===o&&0===c)return e(i,n,s,a,l,h);var u,d=t.sqrt(t.pow(s-i,2)+t.pow(a-n,2)+t.pow(o-r,2)),f=t.sqrt(t.pow(l-i,2)+t.pow(h-n,2)+t.pow(c-r,2)),p=t.sqrt(t.pow(l-s,2)+t.pow(h-a,2)+t.pow(c-o,2));return(u=d>f?d>p?d-f-p:p-f-d:p>f?p-f-d:f-d-p)>-1e-4&&u<1e-4}}}var bez=bezFunction(),initFrame=initialDefaultFrame,mathAbs=Math.abs;function interpolateValue(t,e){var i,n=this.offsetTime;"multidimensional"===this.propType&&(i=createTypedArray("float32",this.pv.length));for(var r,s,a,o,l,h,c,u,d,f=e.lastIndex,p=f,m=this.keyframes.length-1,g=!0;g;){if(r=this.keyframes[p],s=this.keyframes[p+1],p===m-1&&t>=s.t-n){r.h&&(r=s),f=0;break}if(s.t-n>t){f=p;break}p<m-1?p+=1:(f=0,g=!1)}a=this.keyframesMetadata[p]||{};var y,v=s.t-n,b=r.t-n;if(r.to){a.bezierData||(a.bezierData=bez.buildBezierData(r.s,s.s||r.e,r.to,r.ti));var S=a.bezierData;if(t>=v||t<b){var E=t>=v?S.points.length-1:0;for(l=S.points[E].point.length,o=0;o<l;o+=1)i[o]=S.points[E].point[o]}else{a.__fnct?d=a.__fnct:(d=BezierFactory.getBezierEasing(r.o.x,r.o.y,r.i.x,r.i.y,r.n).get,a.__fnct=d),h=d((t-b)/(v-b));var k,x=S.segmentLength*h,w=e.lastFrame<t&&e._lastKeyframeIndex===p?e._lastAddedLe
vendor: 6,222 bytes, line 2
2ngth:0;for(u=e.lastFrame<t&&e._lastKeyframeIndex===p?e._lastPoint:0,g=!0,c=S.points.length;g;){if(w+=S.points[u].partialLength,0===x||0===h||u===S.points.length-1){for(l=S.points[u].point.length,o=0;o<l;o+=1)i[o]=S.points[u].point[o];break}if(x>=w&&x<w+S.points[u+1].partialLength){for(k=(x-w)/S.points[u+1].partialLength,l=S.points[u].point.length,o=0;o<l;o+=1)i[o]=S.points[u].point[o]+(S.points[u+1].point[o]-S.points[u].point[o])*k;break}u<c-1?u+=1:g=!1}e._lastPoint=u,e._lastAddedLength=w-S.points[u].partialLength,e._lastKeyframeIndex=p}}else{var _,C,T,A,P;if(m=r.s.length,y=s.s||r.e,this.sh&&1!==r.h)t>=v?(i[0]=y[0],i[1]=y[1],i[2]=y[2]):t<=b?(i[0]=r.s[0],i[1]=r.s[1],i[2]=r.s[2]):quaternionToEuler(i,slerp(createQuaternion(r.s),createQuaternion(y),(t-b)/(v-b)));else for(p=0;p<m;p+=1)1!==r.h&&(t>=v?h=1:t<b?h=0:(r.o.x.constructor===Array?(a.__fnct||(a.__fnct=[]),a.__fnct[p]?d=a.__fnct[p]:(_=void 0===r.o.x[p]?r.o.x[0]:r.o.x[p],C=void 0===r.o.y[p]?r.o.y[0]:r.o.y[p],T=void 0===r.i.x[p]?r.i.x[0]:r.i.x[p],A=void 0===r.i.y[p]?r.i.y[0]:r.i.y[p],d=BezierFactory.getBezierEasing(_,C,T,A).get,a.__fnct[p]=d)):a.__fnct?d=a.__fnct:(_=r.o.x,C=r.o.y,T=r.i.x,A=r.i.y,d=BezierFactory.getBezierEasing(_,C,T,A).get,r.keyframeMetadata=d),h=d((t-b)/(v-b)))),y=s.s||r.e,P=1===r.h?r.s[p]:r.s[p]+(y[p]-r.s[p])*h,"multidimensional"===this.propType?i[p]=P:i=P}return e.lastIndex=f,i}function slerp(t,e,i){var n,r,s,a,o,l=[],h=t[0],c=t[1],u=t[2],d=t[3],f=e[0],p=e[1],m=e[2],g=e[3];return(r=h*f+c*p+u*m+d*g)<0&&(r=-r,f=-f,p=-p,m=-m,g=-g),1-r>1e-6?(n=Math.acos(r),s=Math.sin(n),a=Math.sin((1-i)*n)/s,o=Math.sin(i*n)/s):(a=1-i,o=i),l[0]=a*h+o*f,l[1]=a*c+o*p,l[2]=a*u+o*m,l[3]=a*d+o*g,l}function quaternionToEuler(t,e){var i=e[0],n=e[1],r=e[2],s=e[3],a=Math.atan2(2*n*s-2*i*r,1-2*n*n-2*r*r),o=Math.asin(2*i*n+2*r*s),l=Math.atan2(2*i*s-2*n*r,1-2*i*i-2*r*r);t[0]=a/degToRads,t[1]=o/degToRads,t[2]=l/degToRads}function createQuaternion(t){var e=t[0]*degToRads,i=t[1]*degToRads,n=t[2]*degToRads,r=Math.cos(e/2),s=Math.cos(i/2),a=Math.cos(n/2),o=Math.sin(e/2),l=Math.sin(i/2),h=Math.sin(n/2);return[o*l*a+r*s*h,o*s*a+r*l*h,r*l*a-o*s*h,r*s*a-o*l*h]}function getValueAtCurrentTime(){var t=this.comp.renderedFrame-this.offsetTime,e=this.keyframes[0].t-this.offsetTime,i=this.keyframes[this.keyframes.length-1].t-this.offsetTime;if(!(t===this._caching.lastFrame||this._caching.lastFrame!==initFrame&&(this._caching.lastFrame>=i&&t>=i||this._caching.lastFrame<e&&t<e))){this._caching.lastFrame>=t&&(this._caching._lastKeyframeIndex=-1,this._caching.lastIndex=0);var n=this.interpolateValue(t,this._caching);this.pv=n}return this._caching.lastFrame=t,this.pv}function setVValue(t){var e;if("unidimensional"===this.propType)e=t*this.mult,mathAbs(this.v-e)>1e-5&&(this.v=e,this._mdf=!0);else for(var i=0,n=this.v.length;i<n;)e=t[i]*this.mult,mathAbs(this.v[i]-e)>1e-5&&(this.v[i]=e,this._mdf=!0),i+=1}function processEffectsSequence(){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t;this.lock=!0,this._mdf=this._isFirstFrame;var e=this.effectsSequence.length,i=this.kf?this.pv:this.data.k;for(t=0;t<e;t+=1)i=this.effectsSequence[t](i);this.setVValue(i),this._isFirstFrame=!1,this.lock=!1,this.frameId=this.elem.globalData.frameId}}function addEffect(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function ValueProperty(t,e,i,n){this.propType="unidimensional",this.mult=i||1,this.data=e,this.v=i?e.k*i:e.k,this.pv=e.k,this._mdf=!1,this.elem=t,this.container=n,this.comp=t.comp,this.k=!1,this.kf=!1,this.vel=0,this.effectsSequence=[],this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function MultiDimensionalProperty(t,e,i,n){var r;this.propType="multidimensional",this.mult=i||1,this.data=e,this._mdf=!1,this.elem=t,this.container=n,this.comp=t.comp,this.k=!1,this.kf=!1,this.frameId=-1;var s=e.k.length;for(this.v=createTypedArray("float32",s),this.pv=createTypedArray("float32",s),this.vel=createTypedArray("float32",s),r=0;r<s;r+=1)this.v[r]=e.k[r]*this.mult,this.pv[r]=e.k[r];this._isFirstFrame=!0,this.effectsSequence=[],this.getValue=processEffectsSequence,this.setVValue=setVValue,this.addEffect=addEffect}function KeyframedValueProperty(t,e,i,n){this.propType="unidimensional",this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.frameId=-1,this._caching={lastFrame:initFrame,lastIndex:0,value:0,_lastKeyframeIndex:-1},this.k=!0,this.kf=!0,this.data=e,this.mult=i||1,this.elem=t,this.container=n,this.comp=t.comp,this.v=initFrame,this.pv=initFrame,this._isFirstFrame=!0,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.addEffect=addEffect}function KeyframedMultidimensionalProperty(t,e,i,n){var r;this.propType="multidimensional";var s,a,o,l,h=e.k.length;for(r=0;r<h-1;r+=1)e.k[r].to&&e.k[r].s&&e.k[r+1]&&e.k[r+1].s&&(s=e.k[r].s,a=e.k[r+1].s,o=e.k[r].to,l=e.k[r].ti,(2===s.length&&(s[0]!==a[0]||s[1]!==a[1])&&bez.pointOnLine2D(s[0],s[1],a[0],a[1],s[0]+o[0],s[1]+o[1])&&bez.pointOnLine2D(s[0],s[1],a[0],a[1],a[0]+l[0],a[1]+l[1])||3===s.length&&(s[0]!==a[0]||s[1]!==a[1]||s[2]!==a[2])&&bez.pointOnLine3D(s[0],s[1],s[2],a[0],a[1],a[2],s[0]+o[0],s[1]+o[1],s[2]+o[2])&&bez.pointOnLine3D(s[0],s[1],s[2],a[0],a[1],a[2],a[0]+l[0],a[1]+l[1],a[2]+l[2]))&&(e.k[r].to=null,e.k[r].ti=null),s[0]===a[0]&&s[1]===a[1]&&0===o[0]&&0===o[1]&&0===l[0]&&0===l[1]&&(2===s.length||s[2]===a[2]&&0===o[2]&&0===l[2])&&(e.k[r].to=null,e.k[r].ti=null));this.effectsSequence=[getValueAtCurrentTime.bind(this)],this.data=e,this.keyframes=e.k,this.keyframesMetadata=[],this.offsetTime=t.data.st,this.k=!0,this.kf=!0,this._isFirstFrame=!0,this.mult=i||1,this.elem=t,this.container=n,this.comp=t.comp,this.getValue=processEffectsSequence,this.setVValue=setVValue,this.interpolateValue=interpolateValue,this.frameId=-1;var c=e.k[0].s.length;for(this.v=createTypedArray("float32",c),this.pv=createTypedArray("float32",c),r=0;r<c;r+=1)this.v[r]=initFrame,this.pv[r]=initFrame;this._caching={lastFrame:initFrame,lastIndex:0,value:createTypedArray("float32",c)},this.addEffect=addEffect}
vendor: 23,433 bytes, line 2
2var PropertyFactory={getProp:function(t,e,i,n,r){var s;if(e.sid&&(e=t.globalData.slotManager.getProp(e)),e.k.length)if("number"==typeof e.k[0])s=new MultiDimensionalProperty(t,e,n,r);else switch(i){case 0:s=new KeyframedValueProperty(t,e,n,r);break;case 1:s=new KeyframedMultidimensionalProperty(t,e,n,r)}else s=new ValueProperty(t,e,n,r);return s.effectsSequence.length&&r.addDynamicProperty(s),s}};function DynamicPropertyContainer(){}DynamicPropertyContainer.prototype={addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&(this.dynamicProperties.push(t),this.container.addDynamicProperty(this),this._isAnimated=!0)},iterateDynamicProperties:function(){var t;this._mdf=!1;var e=this.dynamicProperties.length;for(t=0;t<e;t+=1)this.dynamicProperties[t].getValue(),this.dynamicProperties[t]._mdf&&(this._mdf=!0)},initDynamicPropertyContainer:function(t){this.container=t,this.dynamicProperties=[],this._mdf=!1,this._isAnimated=!1}};var pointPool=poolFactory(8,function(){return createTypedArray("float32",2)});function ShapePath(){this.c=!1,this._length=0,this._maxLength=8,this.v=createSizedArray(this._maxLength),this.o=createSizedArray(this._maxLength),this.i=createSizedArray(this._maxLength)}ShapePath.prototype.setPathData=function(t,e){this.c=t,this.setLength(e);for(var i=0;i<e;)this.v[i]=pointPool.newElement(),this.o[i]=pointPool.newElement(),this.i[i]=pointPool.newElement(),i+=1},ShapePath.prototype.setLength=function(t){for(;this._maxLength<t;)this.doubleArrayLength();this._length=t},ShapePath.prototype.doubleArrayLength=function(){this.v=this.v.concat(createSizedArray(this._maxLength)),this.i=this.i.concat(createSizedArray(this._maxLength)),this.o=this.o.concat(createSizedArray(this._maxLength)),this._maxLength*=2},ShapePath.prototype.setXYAt=function(t,e,i,n,r){var s;switch(this._length=Math.max(this._length,n+1),this._length>=this._maxLength&&this.doubleArrayLength(),i){case"v":s=this.v;break;case"i":s=this.i;break;case"o":s=this.o;break;default:s=[]}(!s[n]||s[n]&&!r)&&(s[n]=pointPool.newElement()),s[n][0]=t,s[n][1]=e},ShapePath.prototype.setTripleAt=function(t,e,i,n,r,s,a,o){this.setXYAt(t,e,"v",a,o),this.setXYAt(i,n,"o",a,o),this.setXYAt(r,s,"i",a,o)},ShapePath.prototype.reverse=function(){var t=new ShapePath;t.setPathData(this.c,this._length);var e=this.v,i=this.o,n=this.i,r=0;this.c&&(t.setTripleAt(e[0][0],e[0][1],n[0][0],n[0][1],i[0][0],i[0][1],0,!1),r=1);var s,a=this._length-1,o=this._length;for(s=r;s<o;s+=1)t.setTripleAt(e[a][0],e[a][1],n[a][0],n[a][1],i[a][0],i[a][1],s,!1),a-=1;return t},ShapePath.prototype.length=function(){return this._length};var shapePool=(factory=poolFactory(4,function(){return new ShapePath},function(t){var e,i=t._length;for(e=0;e<i;e+=1)pointPool.release(t.v[e]),pointPool.release(t.i[e]),pointPool.release(t.o[e]),t.v[e]=null,t.i[e]=null,t.o[e]=null;t._length=0,t.c=!1}),factory.clone=function(t){var e,i=factory.newElement(),n=void 0===t._length?t.v.length:t._length;for(i.setLength(n),i.c=t.c,e=0;e<n;e+=1)i.setTripleAt(t.v[e][0],t.v[e][1],t.o[e][0],t.o[e][1],t.i[e][0],t.i[e][1],e);return i},factory),factory;function ShapeCollection(){this._length=0,this._maxLength=4,this.shapes=createSizedArray(this._maxLength)}ShapeCollection.prototype.addShape=function(t){this._length===this._maxLength&&(this.shapes=this.shapes.concat(createSizedArray(this._maxLength)),this._maxLength*=2),this.shapes[this._length]=t,this._length+=1},ShapeCollection.prototype.releaseShapes=function(){var t;for(t=0;t<this._length;t+=1)shapePool.release(this.shapes[t]);this._length=0};var shapeCollectionPool=(ob={newShapeCollection:function(){return _length?pool[_length-=1]:new ShapeCollection},release:function(t){var e,i=t._length;for(e=0;e<i;e+=1)shapePool.release(t.shapes[e]);t._length=0,_length===_maxLength&&(pool=pooling.double(pool),_maxLength*=2),pool[_length]=t,_length+=1}},_length=0,_maxLength=4,pool=createSizedArray(_maxLength),ob),ob,_length,_maxLength,pool,ShapePropertyFactory=function(){var t=-999999;function e(t,e,i){var n,r,s,a,o,l,h,c,u,d=i.lastIndex,f=this.keyframes;if(t<f[0].t-this.offsetTime)n=f[0].s[0],s=!0,d=0;else if(t>=f[f.length-1].t-this.offsetTime)n=f[f.length-1].s?f[f.length-1].s[0]:f[f.length-2].e[0],s=!0;else{for(var p,m,g,y=d,v=f.length-1,b=!0;b&&(p=f[y],!((m=f[y+1]).t-this.offsetTime>t));)y<v-1?y+=1:b=!1;if(g=this.keyframesMetadata[y]||{},d=y,!(s=1===p.h)){if(t>=m.t-this.offsetTime)c=1;else if(t<p.t-this.offsetTime)c=0;else{var S;g.__fnct?S=g.__fnct:(S=BezierFactory.getBezierEasing(p.o.x,p.o.y,p.i.x,p.i.y).get,g.__fnct=S),c=S((t-(p.t-this.offsetTime))/(m.t-this.offsetTime-(p.t-this.offsetTime)))}r=m.s?m.s[0]:p.e[0]}n=p.s[0]}for(l=e._length,h=n.i[0].length,i.lastIndex=d,a=0;a<l;a+=1)for(o=0;o<h;o+=1)u=s?n.i[a][o]:n.i[a][o]+(r.i[a][o]-n.i[a][o])*c,e.i[a][o]=u,u=s?n.o[a][o]:n.o[a][o]+(r.o[a][o]-n.o[a][o])*c,e.o[a][o]=u,u=s?n.v[a][o]:n.v[a][o]+(r.v[a][o]-n.v[a][o])*c,e.v[a][o]=u}function i(){var e=this.comp.renderedFrame-this.offsetTime,i=this.keyframes[0].t-this.offsetTime,n=this.keyframes[this.keyframes.length-1].t-this.offsetTime,r=this._caching.lastFrame;return r!==t&&(r<i&&e<i||r>n&&e>n)||(this._caching.lastIndex=r<e?this._caching.lastIndex:0,this.interpolateShape(e,this.pv,this._caching)),this._caching.lastFrame=e,this.pv}function n(){this.paths=this.localShapeCollection}function r(t){(function(t,e){if(t._length!==e._length||t.c!==e.c)return!1;var i,n=t._length;for(i=0;i<n;i+=1)if(t.v[i][0]!==e.v[i][0]||t.v[i][1]!==e.v[i][1]||t.o[i][0]!==e.o[i][0]||t.o[i][1]!==e.o[i][1]||t.i[i][0]!==e.i[i][0]||t.i[i][1]!==e.i[i][1])return!1;return!0})(this.v,t)||(this.v=shapePool.clone(t),this.localShapeCollection.releaseShapes(),this.localShapeCollection.addShape(this.v),this._mdf=!0,this.paths=this.localShapeCollection)}function s(){if(this.elem.globalData.frameId!==this.frameId)if(this.effectsSequence.length)if(this.lock)this.setVValue(this.pv);else{var t,e;this.lock=!0,this._mdf=!1,t=this.kf?this.pv:this.data.ks?this.data.ks.k:this.data.pt.k;var i=this.effectsSequence.length;for(e=0;e<i;e+=1)t=this.effectsSequence[e](t);this.setVValue(t),this.lock=!1,this.frameId=this.elem.globalData.frameId}else this._mdf=!1}function a(t,e,i){this.propType="shape",this.comp=t.comp,this.container=t,this.elem=t,this.data=e,this.k=!1,this.kf=!1,this._mdf=!1;var r=3===i?e.pt.k:e.ks.k;this.v=shapePool.clone(r),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.reset=n,this.effectsSequence=[]}function o(t){this.effectsSequence.push(t),this.container.addDynamicProperty(this)}function l(e,r,s){this.propType="shape",this.comp=e.comp,this.elem=e,this.container=e,this.offsetTime=e.data.st,this.keyframes=3===s?r.pt.k:r.ks.k,this.keyframesMetadata=[],this.k=!0,this.kf=!0;var a=this.keyframes[0].s[0].i.length;this.v=shapePool.newElement(),this.v.setPathData(this.keyframes[0].s[0].c,a),this.pv=shapePool.clone(this.v),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.paths.addShape(this.v),this.lastFrame=t,this.reset=n,this._caching={lastFrame:t,lastIndex:0},this.effectsSequence=[i.bind(this)]}a.prototype.interpolateShape=e,a.prototype.getValue=s,a.prototype.setVValue=r,a.prototype.addEffect=o,l.prototype.getValue=s,l.prototype.interpolateShape=e,l.prototype.setVValue=r,l.prototype.addEffect=o;var h=function(){var t=roundCorner;function e(t,e){this.v=shapePool.newElement(),this.v.setPathData(!0,4),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.paths=this.localShapeCollection,this.localShapeCollection.addShape(this.v),this.d=e.d,this.elem=t,this.comp=t.comp,this.frameId=-1,this.initDynamicPropertyContainer(t),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.s=PropertyFactory.getProp(t,e.s,1,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertEllToPath())}return e.prototype={reset:n,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertEllToPath())},convertEllToPath:function(){var e=this.p.v[0],i=this.p.v[1],n=this.s.v[0]/2,r=this.s.v[1]/2,s=3!==this.d,a=this.v;a.v[0][0]=e,a.v[0][1]=i-r,a.v[1][0]=s?e+n:e-n,a.v[1][1]=i,a.v[2][0]=e,a.v[2][1]=i+r,a.v[3][0]=s?e-n:e+n,a.v[3][1]=i,a.i[0][0]=s?e-n*t:e+n*t,a.i[0][1]=i-r,a.i[1][0]=s?e+n:e-n,a.i[1][1]=i-r*t,a.i[2][0]=s?e+n*t:e-n*t,a.i[2][1]=i+r,a.i[3][0]=s?e-n:e+n,a.i[3][1]=i+r*t,a.o[0][0]=s?e+n*t:e-n*t,a.o[0][1]=i-r,a.o[1][0]=s?e+n:e-n,a.o[1][1]=i+r*t,a.o[2][0]=s?e-n*t:e+n*t,a.o[2][1]=i+r,a.o[3][0]=s?e-n:e+n,a.o[3][1]=i-r*t}},extendPrototype([DynamicPropertyContainer],e),e}(),c=function(){function t(t,e){this.v=shapePool.newElement(),this.v.setPathData(!0,0),this.elem=t,this.comp=t.comp,this.data=e,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),1===e.sy?(this.ir=PropertyFactory.getProp(t,e.ir,0,0,this),this.is=PropertyFactory.getProp(t,e.is,0,.01,this),this.convertToPath=this.convertStarToPath):this.convertToPath=this.convertPolygonToPath,this.pt=PropertyFactory.getProp(t,e.pt,0,0,this),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.r=PropertyFactory.getProp(t,e.r,0,degToRads,this),this.or=PropertyFactory.getProp(t,e.or,0,0,this),this.os=PropertyFactory.getProp(t,e.os,0,.01,this),this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertToPath())}return t.prototype={reset:n,getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertToPath())},convertStarToPath:function(){var t,e,i,n,r=2*Math.floor(this.pt.v),s=2*Math.PI/r,a=!0,o=this.or.v,l=this.ir.v,h=this.os.v,c=this.is.v,u=2*Math.PI*o/(2*r),d=2*Math.PI*l/(2*r),f=-Math.PI/2;f+=this.r.v;var p=3===this.data.d?-1:1;for(this.v._length=0,t=0;t<r;t+=1){i=a?h:c,n=a?u:d;var m=(e=a?o:l)*Math.cos(f),g=e*Math.sin(f),y=0===m&&0===g?0:g/Math.sqrt(m*m+g*g),v=0===m&&0===g?0:-m/Math.sqrt(m*m+g*g);m+=+this.p.v[0],g+=+this.p.v[1],this.v.setTripleAt(m,g,m-y*n*i*p,g-v*n*i*p,m+y*n*i*p,g+v*n*i*p,t,!0),a=!a,f+=s*p}},convertPolygonToPath:function(){var t,e=Math.floor(this.pt.v),i=2*Math.PI/e,n=this.or.v,r=this.os.v,s=2*Math.PI*n/(4*e),a=.5*-Math.PI,o=3===this.data.d?-1:1;for(a+=this.r.v,this.v._length=0,t=0;t<e;t+=1){var l=n*Math.cos(a),h=n*Math.sin(a),c=0===l&&0===h?0:h/Math.sqrt(l*l+h*h),u=0===l&&0===h?0:-l/Math.sqrt(l*l+h*h);l+=+this.p.v[0],h+=+this.p.v[1],this.v.setTripleAt(l,h,l-c*s*r*o,h-u*s*r*o,l+c*s*r*o,h+u*s*r*o,t,!0),a+=i*o}this.paths.length=0,this.paths[0]=this.v}},extendPrototype([DynamicPropertyContainer],t),t}(),u=function(){function t(t,e){this.v=shapePool.newElement(),this.v.c=!0,this.localShapeCollection=shapeCollectionPool.newShapeCollection(),this.localShapeCollection.addShape(this.v),this.paths=this.localShapeCollection,this.elem=t,this.comp=t.comp,this.frameId=-1,this.d=e.d,this.initDynamicPropertyContainer(t),this.p=PropertyFactory.getProp(t,e.p,1,0,this),this.s=PropertyFactory.getProp(t,e.s,1,0,this),this.r=PropertyFactory.getProp(t,e.r,0,0,this),this.dynamicProperties.length?this.k=!0:(this.k=!1,this.convertRectToPath())}return t.prototype={convertRectToPath:function(){var t=this.p.v[0],e=this.p.v[1],i=this.s.v[0]/2,n=this.s.v[1]/2,r=bmMin(i,n,this.r.v),s=r*(1-roundCorner);this.v._length=0,2===this.d||1===this.d?(this.v.setTripleAt(t+i,e-n+r,t+i,e-n+r,t+i,e-n+s,0,!0),this.v.setTripleAt(t+i,e+n-r,t+i,e+n-s,t+i,e+n-r,1,!0),0!==r?(this.v.setTripleAt(t+i-r,e+n,t+i-r,e+n,t+i-s,e+n,2,!0),this.v.setTripleAt(t-i+r,e+n,t-i+s,e+n,t-i+r,e+n,3,!0),this.v.setTripleAt(t-i,e+n-r,t-i,e+n-r,t-i,e+n-s,4,!0),this.v.setTripleAt(t-i,e-n+r,t-i,e-n+s,t-i,e-n+r,5,!0),this.v.setTripleAt(t-i+r,e-n,t-i+r,e-n,t-i+s,e-n,6,!0),this.v.setTripleAt(t+i-r,e-n,t+i-s,e-n,t+i-r,e-n,7,!0)):(this.v.setTripleAt(t-i,e+n,t-i+s,e+n,t-i,e+n,2),this.v.setTripleAt(t-i,e-n,t-i,e-n+s,t-i,e-n,3))):(this.v.setTripleAt(t+i,e-n+r,t+i,e-n+s,t+i,e-n+r,0,!0),0!==r?(this.v.setTripleAt(t+i-r,e-n,t+i-r,e-n,t+i-s,e-n,1,!0),this.v.setTripleAt(t-i+r,e-n,t-i+s,e-n,t-i+r,e-n,2,!0),this.v.setTripleAt(t-i,e-n+r,t-i,e-n+r,t-i,e-n+s,3,!0),this.v.setTripleAt(t-i,e+n-r,t-i,e+n-s,t-i,e+n-r,4,!0),this.v.setTripleAt(t-i+r,e+n,t-i+r,e+n,t-i+s,e+n,5,!0),this.v.setTripleAt(t+i-r,e+n,t+i-s,e+n,t+i-r,e+n,6,!0),this.v.setTripleAt(t+i,e+n-r,t+i,e+n-r,t+i,e+n-s,7,!0)):(this.v.setTripleAt(t-i,e-n,t-i+s,e-n,t-i,e-n,1,!0),this.v.setTripleAt(t-i,e+n,t-i,e+n-s,t-i,e+n,2,!0),this.v.setTripleAt(t+i,e+n,t+i-s,e+n,t+i,e+n,3,!0)))},getValue:function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf&&this.convertRectToPath())},reset:n},extendPrototype([DynamicPropertyContainer],t),t}();return{getShapeProp:function(t,e,i){var n;return 3===i||4===i?n=(3===i?e.pt:e.ks).k.length?new l(t,e,i):new a(t,e,i):5===i?n=new u(t,e):6===i?n=new h(t,e):7===i&&(n=new c(t,e)),n.k&&t.addDynamicProperty(n),n},getConstructorFunction:function(){return a},getKeyframedConstructorFunction:function(){return l}}}(),Matrix=function(){var t=Math.cos,e=Math.sin,i=Math.tan,n=Math.round;function r(){return this.props[0]=1,this.props[1]=0,this.props[2]=0,this.props[3]=0,this.props[4]=0,this.props[5]=1,this.props[6]=0,this.props[7]=0,this.props[8]=0,this.props[9]=0,this.props[10]=1,this.props[11]=0,this.props[12]=0,this.props[13]=0,this.props[14]=0,this.props[15]=1,this}function s(i){if(0===i)return this;var n=t(i),r=e(i);return this._t(n,-r,0,0,r,n,0,0,0,0,1,0,0,0,0,1)}function a(i){if(0===i)return this;var n=t(i),r=e(i);return this._t(1,0,0,0,0,n,-r,0,0,r,n,0,0,0,0,1)}function o(i){if(0===i)return this;var n=t(i),r=e(i);return this._t(n,0,r,0,0,1,0,0,-r,0,n,0,0,0,0,1)}function l(i){if(0===i)return this;var n=t(i),r=e(i);return this._t(n,-r,0,0,r,n,0,0,0,0,1,0,0,0,0,1)}function h(t,e){return this._t(1,e,t,1,0,0)}function c(t,e){return this.shear(i(t),i(e))}function u(n,r){var s=t(r),a=e(r);return this._t(s,a,0,0,-a,s,0,0,0,0,1,0,0,0,0,1)._t(1,0,0,0,i(n),1,0,0,0,0,1,0,0,0,0,1)._t(s,-a,0,0,a,s,0,0,0,0,1,0,0,0,0,1)}function d(t,e,i){return i||0===i||(i=1),1===t&&1===e&&1===i?this:this._t(t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1)}function f(t,e,i,n,r,s,a,o,l,h,c,u,d,f,p,m){return this.props[0]=t,this.props[1]=e,this.props[2]=i,this.props[3]=n,this.props[4]=r,this.props[5]=s,this.props[6]=a,this.props[7]=o,this.props[8]=l,this.props[9]=h,this.props[10]=c,this.props[11]=u,this.props[12]=d,this.props[13]=f,this.props[14]=p,this.props[15]=m,this}function p(t,e,i){return i=i||0,0!==t||0!==e||0!==i?this._t(1,0,0,0,0,1,0,0,0,0,1,0,t,e,i,1):this}function m(t,e,i,n,r,s,a,o,l,h,c,u,d,f,p,m){var g=this.props;if(1===t&&0===e&&0===i&&0===n&&0===r&&1===s&&0===a&&0===o&&0===l&&0===h&&1===c&&0===u)return g[12]=g[12]*t+g[15]*d,g[13]=g[13]*s+g[15]*f,g[14]=g[14]*c+g[15]*p,g[15]*=m,this._identityCalculated=!1,this;var y=g[0],v=g[1],b=g[2],S=g[3],E=g[4],k=g[5],x=g[6],w=g[7],_=g[8],C=g[9],T=g[10],A=g[11],P=g[12],D=g[13],M=g[14],L=g[15];return g[0]=y*t+v*r+b*l+S*d,g[1]=y*e+v*s+b*h+S*f,g[2]=y*i+v*a+b*c+S*p,g[3]=y*n+v*o+b*u+S*m,g[4]=E*t+k*r+x*l+w*d,g[5]=E*e+k*s+x*h+w*f,g[6]=E*i+k*a+x*c+w*p,g[7]=E*n+k*o+x*u+w*m,g[8]=_*t+C*r+T*l+A*d,g[9]=_*e+C*s+T*h+A*f,g[10]=_*i+C*a+T*c+A*p,g[11]=_*n+C*o+T*u+A*m,g[12]=P*t+D*r+M*l+L*d,g[13]=P*e+D*s+M*h+L*f,g[14]=P*i+D*a+M*c+L*p,g[15]=P*n+D*o+M*u+L*m,this._identityCalculated=!1,this}function g(t){var e=t.props;return this.transform(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}function y(){return this._identityCalculated||(this._identity=!(1!==this.props[0]||0!==this.props[1]||0!==this.props[2]||0!==this.props[3]||0!==this.props[4]||1!==this.props[5]||0!==this.props[6]||0!==this.props[7]||0!==this.props[8]||0!==this.props[9]||1!==this.props[10]||0!==this.props[11]||0!==this.props[12]||0!==this.props[13]||0!==this.props[14]||1!==this.props[15]),this._identityCalculated=!0),this._identity}function v(t){for(var e=0;e<16;){if(t.props[e]!==this.props[e])return!1;e+=1}return!0}function b(t){var e;for(e=0;e<16;e+=1)t.props[e]=this.props[e];return t}function S(t){var e;for(e=0;e<16;e+=1)this.props[e]=t[e]}function E(t,e,i){return{x:t*this.props[0]+e*this.props[4]+i*this.props[8]+this.props[12],y:t*this.props[1]+e*this.props[5]+i*this.props[9]+this.props[13],z:t*this.props[2]+e*this.props[6]+i*this.props[10]+this.props[14]}}function k(t,e,i){return t*this.props[0]+e*this.props[4]+i*this.props[8]+this.props[12]}function x(t,e,i){return t*this.props[1]+e*this.props[5]+i*this.props[9]+this.props[13]}function w(t,e,i){return t*this.props[2]+e*this.props[6]+i*this.props[10]+this.props[14]}function _(){var t=this.props[0]*this.props[5]-this.props[1]*this.props[4],e=this.props[5]/t,i=-this.props[1]/t,n=-this.props[4]/t,r=this.props[0]/t,s=(this.props[4]*this.props[13]-this.props[5]*this.props[12])/t,a=-(this.props[0]*this.props[13]-this.props[1]*this.props[12])/t,o=new Matrix;return o.props[0]=e,o.props[1]=i,o.props[4]=n,o.props[5]=r,o.props[12]=s,o.props[13]=a,o}function C(t){return this.getInverseMatrix().applyToPointArray(t[0],t[1],t[2]||0)}function T(t){var e,i=t.length,n=[];for(e=0;e<i;e+=1)n[e]=C(t[e]);return n}function A(t,e,i){var n=createTypedArray("float32",6);if(this.isIdentity())n[0]=t[0],n[1]=t[1],n[2]=e[0],n[3]=e[1],n[4]=i[0],n[5]=i[1];else{var r=this.props[0],s=this.props[1],a=this.props[4],o=this.props[5],l=this.props[12],h=this.props[13];n[0]=t[0]*r+t[1]*a+l,n[1]=t[0]*s+t[1]*o+h,n[2]=e[0]*r+e[1]*a+l,n[3]=e[0]*s+e[1]*o+h,n[4]=i[0]*r+i[1]*a+l,n[5]=i[0]*s+i[1]*o+h}return n}function P(t,e,i){return this.isIdentity()?[t,e,i]:[t*this.props[0]+e*this.props[4]+i*this.props[8]+this.props[12],t*this.props[1]+e*this.props[5]+i*this.props[9]+this.props[13],t*this.props[2]+e*this.props[6]+i*this.props[10]+this.props[14]]}function D(t,e){if(this.isIdentity())return t+","+e;var i=this.props;return Math.round(100*(t*i[0]+e*i[4]+i[12]))/100+","+Math.round(100*(t*i[1]+e*i[5]+i[13]))/100}function M(){for(var t=0,e=this.props,i="matrix3d(";t<16;)i+=n(1e4*e[t])/1e4,i+=15===t?")":",",t+=1;return i}function L(t){return t<1e-6&&t>0||t>-1e-6&&t<0?n(1e4*t)/1e4:t}function R(){var t=this.props;return"matrix("+L(t[0])+","+L(t[1])+","+L(t[4])+","+L(t[5])+","+L(t[12])+","+L(t[13])+")"}return function(){this.reset=r,this.rotate=s,this.rotateX=a,this.rotateY=o,this.rotateZ=l,this.skew=c,this.skewFromAxis=u,this.shear=h,this.scale=d,this.setTransform=f,this.translate=p,this.transform=m,this.multiply=g,this.applyToPoint=E,this.applyToX=k,this.applyToY=x,this.applyToZ=w,this.applyToPointArray=P,this.applyToTriplePoints=A,this.applyToPointStringified=D,this.toCSS=M,this.to2dCSS=R,this.clone=b,this.cloneFromProps=S,this.equals=v,this.inversePoints=T,this.inversePoint=C,this.getInverseMatrix=_,this._t=this.transform,this.isIdentity=y,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}();function _typeof$3(t){return _typeof$3="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$3(t)}var lottie={},standalone="__[STANDALONE]__",animationData="__[ANIMATIONDATA]__",renderer="";function setLocation(t){setLocationHref(t)}function searchAnimations(){!0===standalone?animationManager.searchAnimations(animationData,standalone,renderer):animationManager.searchAnimations()}function setSubframeRendering(t){setSubframeEnabled(t)}function setPrefix(t){setIdPrefix(t)}function loadAnimation(t){return!0===standalone&&(t.animationData=JSON.parse(animationData)),animationManager.loadAnimation(t)}function setQuality(t){if("string"==typeof t)switch(t){case"high":setDefaultCurveSegments(200);break;default:case"medium":setDefaultCurveSegments(50);break;case"low":setDefaultCurveSegments(10)}else!isNaN(t)&&t>1&&setDefaultCurveSegments(t);getDefaultCurveSegments()>=50?roundValues(!1):roundValues(!0)}function inBrowser(){return"undefined"!=typeof navigator}function installPlugin(t,e){"expressions"===t&&setExpressionsPlugin(e)}function getFactory(t){switch(t){case"propertyFactory":return PropertyFactory;case"shapePropertyFactory":return ShapePropertyFactory;case"matrix":return Matrix;default:return null}}function checkReady(){"complete"===document.readyState&&(clearInterval(readyStateCheckInterval),searchAnimations())}function getQueryVariable(t){for(var e=queryString.split("&"),i=0;i<e.length;i+=1){var n=e[i].split("=");if(decodeURIComponent(n[0])==t)return decodeURIComponent(n[1])}return null}lottie.play=animationManager.play,lottie.pause=animationManager.pause,lottie.setLocationHref=setLocation,lottie.togglePause=animationManager.togglePause,lottie.setSpeed=animationManager.setSpeed,lottie.setDirection=animationManager.setDirection,lottie.stop=animationManager.stop,lottie.searchAnimations=searchAnimations,lottie.registerAnimation=animationManager.registerAnimation,lottie.loadAnimation=loadAnimation,lottie.setSubframeRendering=setSubframeRendering,lottie.resize=animationManager.resize,lottie.goToAndStop=animationManager.goToAndStop,lottie.destroy=animationManager.destroy,lottie.setQuality=setQuality,lottie.inBrowser=inBrowser,lottie.installPlugin=installPlugin,lottie.freeze=animationManager.freeze,lottie.unfreeze=animationManager.unfreeze,lottie.setVolume=animationManager.setVolume,lottie.mute=animationManager.mute,lottie.unmute=animationManager.unmute,lottie.getRegisteredAnimations=animationManager.getRegisteredAnimations,lottie.useWebWorker=setWebWorker,lottie.setIDPrefix=setPrefix,lottie.__getFactory=getFactory,lottie.version="5.12.2";var queryString="";if(standalone){var scripts=document.getElementsByTagName("script"),index=scripts.length-1,myScript=scripts[index]||{src:""};queryString=myScript.src?myScript.src.replace(/^[^\?]+\??/,""):"",renderer=getQueryVariable("renderer")}var readyStateCheckInterval=setInterval(checkReady,100);try{"object"!==_typeof$3(exports)&&__webpack_require__.amdO}catch(t){}var ShapeModifiers=function(){var t={},e={};return t.registerModifier=function(t,i){e[t]||(e[t]=i)},t.getModifier=function(t,i,n){return new e[t](i,n)},t}();function ShapeModifier(){}function TrimModifier(){}function PuckerAndBloatModifier(){}ShapeModifier.prototype.initModifierProperties=function(){},ShapeModifier.prototype.addShapeToModifier=function(){},ShapeModifier.prototype.addShape=function(t){if(!this.closed){t.sh.container.addDynamicProperty(t.sh);var e={shape:t.sh,data:t,localShapeCollection:shapeCollectionPool.newShapeCollection()};this.shapes.push(e),this.addShapeToModifier(e),this._isAnimated&&t.setAsAnimated()}},ShapeModifier.prototype.init=function(t,e){this.shapes=[],this.elem=t,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e),this.frameId=initialDefaultFrame,this.closed=!1,this.k=!1,this.dynamicProperties.length?this.k=!0:this.getValue(!0)},ShapeModifier.prototype.processKeys=function(){this.elem.globalData.frameId!==this.frameId&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties())},extendPrototype([DynamicPropertyContainer],ShapeModifier),extendPrototype([ShapeModifier],TrimModifier),TrimModifier.prototype.initModifierProperties=function(t,e){this.s=PropertyFactory.getProp(t,e.s,0,.01,this),this.e=Pro
vendor: 5,368 bytes, line 2
2pertyFactory.getProp(t,e.e,0,.01,this),this.o=PropertyFactory.getProp(t,e.o,0,0,this),this.sValue=0,this.eValue=0,this.getValue=this.processKeys,this.m=e.m,this._isAnimated=!!this.s.effectsSequence.length||!!this.e.effectsSequence.length||!!this.o.effectsSequence.length},TrimModifier.prototype.addShapeToModifier=function(t){t.pathsData=[]},TrimModifier.prototype.calculateShapeEdges=function(t,e,i,n,r){var s=[];e<=1?s.push({s:t,e:e}):t>=1?s.push({s:t-1,e:e-1}):(s.push({s:t,e:1}),s.push({s:0,e:e-1}));var a,o,l=[],h=s.length;for(a=0;a<h;a+=1){var c,u;(o=s[a]).e*r<n||o.s*r>n+i||(c=o.s*r<=n?0:(o.s*r-n)/i,u=o.e*r>=n+i?1:(o.e*r-n)/i,l.push([c,u]))}return l.length||l.push([0,0]),l},TrimModifier.prototype.releasePathsData=function(t){var e,i=t.length;for(e=0;e<i;e+=1)segmentsLengthPool.release(t[e]);return t.length=0,t},TrimModifier.prototype.processShapes=function(t){var e,i,n,r;if(this._mdf||t){var s=this.o.v%360/360;if(s<0&&(s+=1),(e=this.s.v>1?1+s:this.s.v<0?0+s:this.s.v+s)>(i=this.e.v>1?1+s:this.e.v<0?0+s:this.e.v+s)){var a=e;e=i,i=a}e=1e-4*Math.round(1e4*e),i=1e-4*Math.round(1e4*i),this.sValue=e,this.eValue=i}else e=this.sValue,i=this.eValue;var o,l,h,c,u,d=this.shapes.length,f=0;if(i===e)for(r=0;r<d;r+=1)this.shapes[r].localShapeCollection.releaseShapes(),this.shapes[r].shape._mdf=!0,this.shapes[r].shape.paths=this.shapes[r].localShapeCollection,this._mdf&&(this.shapes[r].pathsData.length=0);else if(1===i&&0===e||0===i&&1===e){if(this._mdf)for(r=0;r<d;r+=1)this.shapes[r].pathsData.length=0,this.shapes[r].shape._mdf=!0}else{var p,m,g=[];for(r=0;r<d;r+=1)if((p=this.shapes[r]).shape._mdf||this._mdf||t||2===this.m){if(l=(n=p.shape.paths)._length,u=0,!p.shape._mdf&&p.pathsData.length)u=p.totalShapeLength;else{for(h=this.releasePathsData(p.pathsData),o=0;o<l;o+=1)c=bez.getSegmentsLength(n.shapes[o]),h.push(c),u+=c.totalLength;p.totalShapeLength=u,p.pathsData=h}f+=u,p.shape._mdf=!0}else p.shape.paths=p.localShapeCollection;var y,v=e,b=i,S=0;for(r=d-1;r>=0;r-=1)if((p=this.shapes[r]).shape._mdf){for((m=p.localShapeCollection).releaseShapes(),2===this.m&&d>1?(y=this.calculateShapeEdges(e,i,p.totalShapeLength,S,f),S+=p.totalShapeLength):y=[[v,b]],l=y.length,o=0;o<l;o+=1){v=y[o][0],b=y[o][1],g.length=0,b<=1?g.push({s:p.totalShapeLength*v,e:p.totalShapeLength*b}):v>=1?g.push({s:p.totalShapeLength*(v-1),e:p.totalShapeLength*(b-1)}):(g.push({s:p.totalShapeLength*v,e:p.totalShapeLength}),g.push({s:0,e:p.totalShapeLength*(b-1)}));var E=this.addShapes(p,g[0]);if(g[0].s!==g[0].e){if(g.length>1)if(p.shape.paths.shapes[p.shape.paths._length-1].c){var k=E.pop();this.addPaths(E,m),E=this.addShapes(p,g[1],k)}else this.addPaths(E,m),E=this.addShapes(p,g[1]);this.addPaths(E,m)}}p.shape.paths=m}}},TrimModifier.prototype.addPaths=function(t,e){var i,n=t.length;for(i=0;i<n;i+=1)e.addShape(t[i])},TrimModifier.prototype.addSegment=function(t,e,i,n,r,s,a){r.setXYAt(e[0],e[1],"o",s),r.setXYAt(i[0],i[1],"i",s+1),a&&r.setXYAt(t[0],t[1],"v",s),r.setXYAt(n[0],n[1],"v",s+1)},TrimModifier.prototype.addSegmentFromArray=function(t,e,i,n){e.setXYAt(t[1],t[5],"o",i),e.setXYAt(t[2],t[6],"i",i+1),n&&e.setXYAt(t[0],t[4],"v",i),e.setXYAt(t[3],t[7],"v",i+1)},TrimModifier.prototype.addShapes=function(t,e,i){var n,r,s,a,o,l,h,c,u=t.pathsData,d=t.shape.paths.shapes,f=t.shape.paths._length,p=0,m=[],g=!0;for(i?(o=i._length,c=i._length):(i=shapePool.newElement(),o=0,c=0),m.push(i),n=0;n<f;n+=1){for(l=u[n].lengths,i.c=d[n].c,s=d[n].c?l.length:l.length+1,r=1;r<s;r+=1)if(p+(a=l[r-1]).addedLength<e.s)p+=a.addedLength,i.c=!1;else{if(p>e.e){i.c=!1;break}e.s<=p&&e.e>=p+a.addedLength?(this.addSegment(d[n].v[r-1],d[n].o[r-1],d[n].i[r],d[n].v[r],i,o,g),g=!1):(h=bez.getNewSegment(d[n].v[r-1],d[n].v[r],d[n].o[r-1],d[n].i[r],(e.s-p)/a.addedLength,(e.e-p)/a.addedLength,l[r-1]),this.addSegmentFromArray(h,i,o,g),g=!1,i.c=!1),p+=a.addedLength,o+=1}if(d[n].c&&l.length){if(a=l[r-1],p<=e.e){var y=l[r-1].addedLength;e.s<=p&&e.e>=p+y?(this.addSegment(d[n].v[r-1],d[n].o[r-1],d[n].i[0],d[n].v[0],i,o,g),g=!1):(h=bez.getNewSegment(d[n].v[r-1],d[n].v[0],d[n].o[r-1],d[n].i[0],(e.s-p)/y,(e.e-p)/y,l[r-1]),this.addSegmentFromArray(h,i,o,g),g=!1,i.c=!1)}else i.c=!1;p+=a.addedLength,o+=1}if(i._length&&(i.setXYAt(i.v[c][0],i.v[c][1],"i",c),i.setXYAt(i.v[i._length-1][0],i.v[i._length-1][1],"o",i._length-1)),p>e.e)break;n<f-1&&(i=shapePool.newElement(),g=!0,m.push(i),o=0)}return m},extendPrototype([ShapeModifier],PuckerAndBloatModifier),PuckerAndBloatModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(t,e.a,0,null,this),this._isAnimated=!!this.amount.effectsSequence.length},PuckerAndBloatModifier.prototype.processPath=function(t,e){var i=e/100,n=[0,0],r=t._length,s=0;for(s=0;s<r;s+=1)n[0]+=t.v[s][0],n[1]+=t.v[s][1];n[0]/=r,n[1]/=r;var a,o,l,h,c,u,d=shapePool.newElement();for(d.c=t.c,s=0;s<r;s+=1)a=t.v[s][0]+(n[0]-t.v[s][0])*i,o=t.v[s][1]+(n[1]-t.v[s][1])*i,l=t.o[s][0]+(n[0]-t.o[s][0])*-i,h=t.o[s][1]+(n[1]-t.o[s][1])*-i,c=t.i[s][0]+(n[0]-t.i[s][0])*-i,u=t.i[s][1]+(n[1]-t.i[s][1])*-i,d.setTripleAt(a,o,l,h,c,u,s);return d},PuckerAndBloatModifier.prototype.processShapes=function(t){var e,i,n,r,s,a,o=this.shapes.length,l=this.amount.v;if(0!==l)for(i=0;i<o;i+=1){if(a=(s=this.shapes[i]).localShapeCollection,s.shape._mdf||this._mdf||t)for(a.releaseShapes(),s.shape._mdf=!0,e=s.shape.paths.shapes,r
vendor: 23,506 bytes, line 2
2=s.shape.paths._length,n=0;n<r;n+=1)a.addShape(this.processPath(e[n],l));s.shape.paths=s.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var TransformPropertyFactory=function(){var t=[0,0];function e(t,e,i){if(this.elem=t,this.frameId=-1,this.propType="transform",this.data=e,this.v=new Matrix,this.pre=new Matrix,this.appliedTransformations=0,this.initDynamicPropertyContainer(i||t),e.p&&e.p.s?(this.px=PropertyFactory.getProp(t,e.p.x,0,0,this),this.py=PropertyFactory.getProp(t,e.p.y,0,0,this),e.p.z&&(this.pz=PropertyFactory.getProp(t,e.p.z,0,0,this))):this.p=PropertyFactory.getProp(t,e.p||{k:[0,0,0]},1,0,this),e.rx){if(this.rx=PropertyFactory.getProp(t,e.rx,0,degToRads,this),this.ry=PropertyFactory.getProp(t,e.ry,0,degToRads,this),this.rz=PropertyFactory.getProp(t,e.rz,0,degToRads,this),e.or.k[0].ti){var n,r=e.or.k.length;for(n=0;n<r;n+=1)e.or.k[n].to=null,e.or.k[n].ti=null}this.or=PropertyFactory.getProp(t,e.or,1,degToRads,this),this.or.sh=!0}else this.r=PropertyFactory.getProp(t,e.r||{k:0},0,degToRads,this);e.sk&&(this.sk=PropertyFactory.getProp(t,e.sk,0,degToRads,this),this.sa=PropertyFactory.getProp(t,e.sa,0,degToRads,this)),this.a=PropertyFactory.getProp(t,e.a||{k:[0,0,0]},1,0,this),this.s=PropertyFactory.getProp(t,e.s||{k:[100,100,100]},1,.01,this),e.o?this.o=PropertyFactory.getProp(t,e.o,0,.01,t):this.o={_mdf:!1,v:1},this._isDirty=!0,this.dynamicProperties.length||this.getValue(!0)}return e.prototype={applyToMatrix:function(t){var e=this._mdf;this.iterateDynamicProperties(),this._mdf=this._mdf||e,this.a&&t.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.s&&t.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&t.skewFromAxis(-this.sk.v,this.sa.v),this.r?t.rotate(-this.r.v):t.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.data.p.s?this.data.p.z?t.translate(this.px.v,this.py.v,-this.pz.v):t.translate(this.px.v,this.py.v,0):t.translate(this.p.v[0],this.p.v[1],-this.p.v[2])},getValue:function(e){if(this.elem.globalData.frameId!==this.frameId){if(this._isDirty&&(this.precalculateMatrix(),this._isDirty=!1),this.iterateDynamicProperties(),this._mdf||e){var i;if(this.v.cloneFromProps(this.pre.props),this.appliedTransformations<1&&this.v.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations<2&&this.v.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.sk&&this.appliedTransformations<3&&this.v.skewFromAxis(-this.sk.v,this.sa.v),this.r&&this.appliedTransformations<4?this.v.rotate(-this.r.v):!this.r&&this.appliedTransformations<4&&this.v.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.autoOriented){var n,r;if(i=this.elem.globalData.frameRate,this.p&&this.p.keyframes&&this.p.getValueAtTime)this.p._caching.lastFrame+this.p.offsetTime<=this.p.keyframes[0].t?(n=this.p.getValueAtTime((this.p.keyframes[0].t+.01)/i,0),r=this.p.getValueAtTime(this.p.keyframes[0].t/i,0)):this.p._caching.lastFrame+this.p.offsetTime>=this.p.keyframes[this.p.keyframes.length-1].t?(n=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/i,0),r=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/i,0)):(n=this.p.pv,r=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/i,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){n=[],r=[];var s=this.px,a=this.py;s._caching.lastFrame+s.offsetTime<=s.keyframes[0].t?(n[0]=s.getValueAtTime((s.keyframes[0].t+.01)/i,0),n[1]=a.getValueAtTime((a.keyframes[0].t+.01)/i,0),r[0]=s.getValueAtTime(s.keyframes[0].t/i,0),r[1]=a.getValueAtTime(a.keyframes[0].t/i,0)):s._caching.lastFrame+s.offsetTime>=s.keyframes[s.keyframes.length-1].t?(n[0]=s.getValueAtTime(s.keyframes[s.keyframes.length-1].t/i,0),n[1]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/i,0),r[0]=s.getValueAtTime((s.keyframes[s.keyframes.length-1].t-.01)/i,0),r[1]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/i,0)):(n=[s.pv,a.pv],r[0]=s.getValueAtTime((s._caching.lastFrame+s.offsetTime-.01)/i,s.offsetTime),r[1]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/i,a.offsetTime))}else n=r=t;this.v.rotate(-Math.atan2(n[1]-r[1],n[0]-r[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(this.appliedTransformations=0,this.pre.reset(),!this.a.effectsSequence.length&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],e),e.prototype.addDynamicProperty=function(t){this._addDynamicProperty(t),this.elem.addDynamicProperty(t),this._isDirty=!0},e.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(t,i,n){return new e(t,i,n)}}}();function RepeaterModifier(){}function RoundCornersModifier(){}function floatEqual(t,e){return 1e5*Math.abs(t-e)<=Math.min(Math.abs(t),Math.abs(e))}function floatZero(t){return Math.abs(t)<=1e-5}function lerp(t,e,i){return t*(1-i)+e*i}function lerpPoint(t,e,i){return[lerp(t[0],e[0],i),lerp(t[1],e[1],i)]}function quadRoots(t,e,i){if(0===t)return[];var n=e*e-4*t*i;if(n<0)return[];var r=-e/(2*t);if(0===n)return[r];var s=Math.sqrt(n)/(2*t);return[r-s,r+s]}function polynomialCoefficients(t,e,i,n){return[3*e-t-3*i+n,3*t-6*e+3*i,-3*t+3*e,t]}function singlePoint(t){return new PolynomialBezier(t,t,t,t,!1)}function PolynomialBezier(t,e,i,n,r){r&&pointEqual(t,e)&&(e=lerpPoint(t,n,1/3)),r&&pointEqual(i,n)&&(i=lerpPoint(t,n,2/3));var s=polynomialCoefficients(t[0],e[0],i[0],n[0]),a=polynomialCoefficients(t[1],e[1],i[1],n[1]);this.a=[s[0],a[0]],this.b=[s[1],a[1]],this.c=[s[2],a[2]],this.d=[s[3],a[3]],this.points=[t,e,i,n]}function extrema(t,e){var i=t.points[0][e],n=t.points[t.points.length-1][e];if(i>n){var r=n;n=i,i=r}for(var s=quadRoots(3*t.a[e],2*t.b[e],t.c[e]),a=0;a<s.length;a+=1)if(s[a]>0&&s[a]<1){var o=t.point(s[a])[e];o<i?i=o:o>n&&(n=o)}return{min:i,max:n}}function intersectData(t,e,i){var n=t.boundingBox();return{cx:n.cx,cy:n.cy,width:n.width,height:n.height,bez:t,t:(e+i)/2,t1:e,t2:i}}function splitData(t){var e=t.bez.split(.5);return[intersectData(e[0],t.t1,t.t),intersectData(e[1],t.t,t.t2)]}function boxIntersect(t,e){return 2*Math.abs(t.cx-e.cx)<t.width+e.width&&2*Math.abs(t.cy-e.cy)<t.height+e.height}function intersectsImpl(t,e,i,n,r,s){if(boxIntersect(t,e))if(i>=s||t.width<=n&&t.height<=n&&e.width<=n&&e.height<=n)r.push([t.t,e.t]);else{var a=splitData(t),o=splitData(e);intersectsImpl(a[0],o[0],i+1,n,r,s),intersectsImpl(a[0],o[1],i+1,n,r,s),intersectsImpl(a[1],o[0],i+1,n,r,s),intersectsImpl(a[1],o[1],i+1,n,r,s)}}function crossProduct(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function lineIntersection(t,e,i,n){var r=[t[0],t[1],1],s=[e[0],e[1],1],a=[i[0],i[1],1],o=[n[0],n[1],1],l=crossProduct(crossProduct(r,s),crossProduct(a,o));return floatZero(l[2])?null:[l[0]/l[2],l[1]/l[2]]}function polarOffset(t,e,i){return[t[0]+Math.cos(e)*i,t[1]-Math.sin(e)*i]}function pointDistance(t,e){return Math.hypot(t[0]-e[0],t[1]-e[1])}function pointEqual(t,e){return floatEqual(t[0],e[0])&&floatEqual(t[1],e[1])}function ZigZagModifier(){}function setPoint(t,e,i,n,r,s,a){var o=i-Math.PI/2,l=i+Math.PI/2,h=e[0]+Math.cos(i)*n*r,c=e[1]-Math.sin(i)*n*r;t.setTripleAt(h,c,h+Math.cos(o)*s,c-Math.sin(o)*s,h+Math.cos(l)*a,c-Math.sin(l)*a,t.length())}function getPerpendicularVector(t,e){var i=[e[0]-t[0],e[1]-t[1]],n=.5*-Math.PI;return[Math.cos(n)*i[0]-Math.sin(n)*i[1],Math.sin(n)*i[0]+Math.cos(n)*i[1]]}function getProjectingAngle(t,e){var i=0===e?t.length()-1:e-1,n=(e+1)%t.length(),r=getPerpendicularVector(t.v[i],t.v[n]);return Math.atan2(0,1)-Math.atan2(r[1],r[0])}function zigZagCorner(t,e,i,n,r,s,a){var o=getProjectingAngle(e,i),l=e.v[i%e._length],h=e.v[0===i?e._length-1:i-1],c=e.v[(i+1)%e._length],u=2===s?Math.sqrt(Math.pow(l[0]-h[0],2)+Math.pow(l[1]-h[1],2)):0,d=2===s?Math.sqrt(Math.pow(l[0]-c[0],2)+Math.pow(l[1]-c[1],2)):0;setPoint(t,e.v[i%e._length],o,a,n,d/(2*(r+1)),u/(2*(r+1)),s)}function zigZagSegment(t,e,i,n,r,s){for(var a=0;a<n;a+=1){var o=(a+1)/(n+1),l=2===r?Math.sqrt(Math.pow(e.points[3][0]-e.points[0][0],2)+Math.pow(e.points[3][1]-e.points[0][1],2)):0,h=e.normalAngle(o);setPoint(t,e.point(o),h,s,i,l/(2*(n+1)),l/(2*(n+1)),r),s=-s}return s}function linearOffset(t,e,i){var n=Math.atan2(e[0]-t[0],e[1]-t[1]);return[polarOffset(t,n,i),polarOffset(e,n,i)]}function offsetSegment(t,e){var i,n,r,s,a,o,l;i=(l=linearOffset(t.points[0],t.points[1],e))[0],n=l[1],r=(l=linearOffset(t.points[1],t.points[2],e))[0],s=l[1],a=(l=linearOffset(t.points[2],t.points[3],e))[0],o=l[1];var h=lineIntersection(i,n,r,s);null===h&&(h=n);var c=lineIntersection(a,o,r,s);return null===c&&(c=a),new PolynomialBezier(i,h,c,o)}function joinLines(t,e,i,n,r){var s=e.points[3],a=i.points[0];if(3===n)return s;if(pointEqual(s,a))return s;if(2===n){var o=-e.tangentAngle(1),l=-i.tangentAngle(0)+Math.PI,h=lineIntersection(s,polarOffset(s,o+Math.PI/2,100),a,polarOffset(a,o+Math.PI/2,100)),c=h?pointDistance(h,s):pointDistance(s,a)/2,u=polarOffset(s,o,2*c*roundCorner);return t.setXYAt(u[0],u[1],"o",t.length()-1),u=polarOffset(a,l,2*c*roundCorner),t.setTripleAt(a[0],a[1],a[0],a[1],u[0],u[1],t.length()),a}var d=lineIntersection(pointEqual(s,e.points[2])?e.points[0]:e.points[2],s,a,pointEqual(a,i.points[1])?i.points[3]:i.points[1]);return d&&pointDistance(d,s)<r?(t.setTripleAt(d[0],d[1],d[0],d[1],d[0],d[1],t.length()),d):s}function getIntersection(t,e){var i=t.intersections(e);return i.length&&floatEqual(i[0][0],1)&&i.shift(),i.length?i[0]:null}function pruneSegmentIntersection(t,e){var i=t.slice(),n=e.slice(),r=getIntersection(t[t.length-1],e[0]);return r&&(i[t.length-1]=t[t.length-1].split(r[0])[0],n[0]=e[0].split(r[1])[1]),t.length>1&&e.length>1&&(r=getIntersection(t[0],e[e.length-1]))?[[t[0].split(r[0])[0]],[e[e.length-1].split(r[1])[1]]]:[i,n]}function pruneIntersections(t){for(var e,i=1;i<t.length;i+=1)e=pruneSegmentIntersection(t[i-1],t[i]),t[i-1]=e[0],t[i]=e[1];return t.length>1&&(e=pruneSegmentIntersection(t[t.length-1],t[0]),t[t.length-1]=e[0],t[0]=e[1]),t}function offsetSegmentSplit(t,e){var i,n,r,s,a=t.inflectionPoints();if(0===a.length)return[offsetSegment(t,e)];if(1===a.length||floatEqual(a[1],1))return i=(r=t.split(a[0]))[0],n=r[1],[offsetSegment(i,e),offsetSegment(n,e)];i=(r=t.split(a[0]))[0];var o=(a[1]-a[0])/(1-a[0]);return s=(r=r[1].split(o))[0],n=r[1],[offsetSegment(i,e),offsetSegment(s,e),offsetSegment(n,e)]}function OffsetPathModifier(){}function getFontProperties(t){for(var e=t.fStyle?t.fStyle.split(" "):[],i="normal",n="normal",r=e.length,s=0;s<r;s+=1)switch(e[s].toLowerCase()){case"italic":n="italic";break;case"bold":i="700";break;case"black":i="900";break;case"medium":i="500";break;case"regular":case"normal":i="400";break;case"light":case"thin":i="200"}return{style:n,weight:t.fWeight||i}}extendPrototype([ShapeModifier],RepeaterModifier),RepeaterModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.c=PropertyFactory.getProp(t,e.c,0,null,this),this.o=PropertyFactory.getProp(t,e.o,0,null,this),this.tr=TransformPropertyFactory.getTransformProperty(t,e.tr,this),this.so=PropertyFactory.getProp(t,e.tr.so,0,.01,this),this.eo=PropertyFactory.getProp(t,e.tr.eo,0,.01,this),this.data=e,this.dynamicProperties.length||this.getValue(!0),this._isAnimated=!!this.dynamicProperties.length,this.pMatrix=new Matrix,this.rMatrix=new Matrix,this.sMatrix=new Matrix,this.tMatrix=new Matrix,this.matrix=new Matrix},RepeaterModifier.prototype.applyTransforms=function(t,e,i,n,r,s){var a=s?-1:1,o=n.s.v[0]+(1-n.s.v[0])*(1-r),l=n.s.v[1]+(1-n.s.v[1])*(1-r);t.translate(n.p.v[0]*a*r,n.p.v[1]*a*r,n.p.v[2]),e.translate(-n.a.v[0],-n.a.v[1],n.a.v[2]),e.rotate(-n.r.v*a*r),e.translate(n.a.v[0],n.a.v[1],n.a.v[2]),i.translate(-n.a.v[0],-n.a.v[1],n.a.v[2]),i.scale(s?1/o:o,s?1/l:l),i.translate(n.a.v[0],n.a.v[1],n.a.v[2])},RepeaterModifier.prototype.init=function(t,e,i,n){for(this.elem=t,this.arr=e,this.pos=i,this.elemsData=n,this._currentCopies=0,this._elements=[],this._groups=[],this.frameId=-1,this.initDynamicPropertyContainer(t),this.initModifierProperties(t,e[i]);i>0;)i-=1,this._elements.unshift(e[i]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(t){var e,i=t.length;for(e=0;e<i;e+=1)t[e]._processed=!1,"gr"===t[e].ty&&this.resetElements(t[e].it)},RepeaterModifier.prototype.cloneElements=function(t){var e=JSON.parse(JSON.stringify(t));return this.resetElements(e),e},RepeaterModifier.prototype.changeGroupRender=function(t,e){var i,n=t.length;for(i=0;i<n;i+=1)t[i]._render=e,"gr"===t[i].ty&&this.changeGroupRender(t[i].it,e)},RepeaterModifier.prototype.processShapes=function(t){var e,i,n,r,s,a=!1;if(this._mdf||t){var o,l=Math.ceil(this.c.v);if(this._groups.length<l){for(;this._groups.length<l;){var h={it:this.cloneElements(this._elements),ty:"gr"};h.it.push({a:{a:0,ix:1,k:[0,0]},nm:"Transform",o:{a:0,ix:7,k:100},p:{a:0,ix:2,k:[0,0]},r:{a:1,ix:6,k:[{s:0,e:0,t:0},{s:0,e:0,t:1}]},s:{a:0,ix:3,k:[100,100]},sa:{a:0,ix:5,k:0},sk:{a:0,ix:4,k:0},ty:"tr"}),this.arr.splice(0,0,h),this._groups.splice(0,0,h),this._currentCopies+=1}this.elem.reloadShapes(),a=!0}for(s=0,n=0;n<=this._groups.length-1;n+=1){if(o=s<l,this._groups[n]._render=o,this.changeGroupRender(this._groups[n].it,o),!o){var c=this.elemsData[n].it,u=c[c.length-1];0!==u.transform.op.v?(u.transform.op._mdf=!0,u.transform.op.v=0):u.transform.op._mdf=!1}s+=1}this._currentCopies=l;var d=this.o.v,f=d%1,p=d>0?Math.floor(d):Math.ceil(d),m=this.pMatrix.props,g=this.rMatrix.props,y=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,b,S=0;if(d>0){for(;S<p;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),S+=1;f&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,f,!1),S+=f)}else if(d<0){for(;S>p;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),S-=1;f&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-f,!0),S-=f)}for(n=1===this.data.m?0:this._currentCopies-1,r=1===this.data.m?1:-1,s=this._currentCopies;s;){if(b=(i=(e=this.elemsData[n].it)[e.length-1].transform.mProps.v.props).length,e[e.length-1].transform.mProps._mdf=!0,e[e.length-1].transform.op._mdf=!0,e[e.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(n/(this._currentCopies-1)),0!==S){for((0!==n&&1===r||n!==this._currentCopies-1&&-1===r)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7],m[8],m[9],m[10],m[11],m[12],m[13],m[14],m[15]),v=0;v<b;v+=1)i[v]=this.matrix.props[v];this.matrix.reset()}else for(this.matrix.reset(),v=0;v<b;v+=1)i[v]=this.matrix.props[v];S+=1,s-=1,n+=r}}else for(s=this._currentCopies,n=0,r=1;s;)i=(e=this.elemsData[n].it)[e.length-1].transform.mProps.v.props,e[e.length-1].transform.mProps._mdf=!1,e[e.length-1].transform.op._mdf=!1,s-=1,n+=r;return a},RepeaterModifier.prototype.addShape=function(){},extendPrototype([ShapeModifier],RoundCornersModifier),RoundCornersModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.rd=PropertyFactory.getProp(t,e.r,0,null,this),this._isAnimated=!!this.rd.effectsSequence.length},RoundCornersModifier.prototype.processPath=function(t,e){var i,n=shapePool.newElement();n.c=t.c;var r,s,a,o,l,h,c,u,d,f,p,m,g=t._length,y=0;for(i=0;i<g;i+=1)r=t.v[i],a=t.o[i],s=t.i[i],r[0]===a[0]&&r[1]===a[1]&&r[0]===s[0]&&r[1]===s[1]?0!==i&&i!==g-1||t.c?(o=0===i?t.v[g-1]:t.v[i-1],h=(l=Math.sqrt(Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)))?Math.min(l/2,e)/l:0,c=p=r[0]+(o[0]-r[0])*h,u=m=r[1]-(r[1]-o[1])*h,d=c-(c-r[0])*roundCorner,f=u-(u-r[1])*roundCorner,n.setTripleAt(c,u,d,f,p,m,y),y+=1,o=i===g-1?t.v[0]:t.v[i+1],h=(l=Math.sqrt(Math.pow(r[0]-o[0],2)+Math.pow(r[1]-o[1],2)))?Math.min(l/2,e)/l:0,c=d=r[0]+(o[0]-r[0])*h,u=f=r[1]+(o[1]-r[1])*h,p=c-(c-r[0])*roundCorner,m=u-(u-r[1])*roundCorner,n.setTripleAt(c,u,d,f,p,m,y),y+=1):(n.setTripleAt(r[0],r[1],a[0],a[1],s[0],s[1],y),y+=1):(n.setTripleAt(t.v[i][0],t.v[i][1],t.o[i][0],t.o[i][1],t.i[i][0],t.i[i][1],y),y+=1);return n},RoundCornersModifier.prototype.processShapes=function(t){var e,i,n,r,s,a,o=this.shapes.length,l=this.rd.v;if(0!==l)for(i=0;i<o;i+=1){if(a=(s=this.shapes[i]).localShapeCollection,s.shape._mdf||this._mdf||t)for(a.releaseShapes(),s.shape._mdf=!0,e=s.shape.paths.shapes,r=s.shape.paths._length,n=0;n<r;n+=1)a.addShape(this.processPath(e[n],l));s.shape.paths=s.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},PolynomialBezier.prototype.point=function(t){return[((this.a[0]*t+this.b[0])*t+this.c[0])*t+this.d[0],((this.a[1]*t+this.b[1])*t+this.c[1])*t+this.d[1]]},PolynomialBezier.prototype.derivative=function(t){return[(3*t*this.a[0]+2*this.b[0])*t+this.c[0],(3*t*this.a[1]+2*this.b[1])*t+this.c[1]]},PolynomialBezier.prototype.tangentAngle=function(t){var e=this.derivative(t);return Math.atan2(e[1],e[0])},PolynomialBezier.prototype.normalAngle=function(t){var e=this.derivative(t);return Math.atan2(e[0],e[1])},PolynomialBezier.prototype.inflectionPoints=function(){var t=this.a[1]*this.b[0]-this.a[0]*this.b[1];if(floatZero(t))return[];var e=-.5*(this.a[1]*this.c[0]-this.a[0]*this.c[1])/t,i=e*e-1/3*(this.b[1]*this.c[0]-this.b[0]*this.c[1])/t;if(i<0)return[];var n=Math.sqrt(i);return floatZero(n)?n>0&&n<1?[e]:[]:[e-n,e+n].filter(function(t){return t>0&&t<1})},PolynomialBezier.prototype.split=function(t){if(t<=0)return[singlePoint(this.points[0]),this];if(t>=1)return[this,singlePoint(this.points[this.points.length-1])];var e=lerpPoint(this.points[0],this.points[1],t),i=lerpPoint(this.points[1],this.points[2],t),n=lerpPoint(this.points[2],this.points[3],t),r=lerpPoint(e,i,t),s=lerpPoint(i,n,t),a=lerpPoint(r,s,t);return[new PolynomialBezier(this.points[0],e,r,a,!0),new PolynomialBezier(a,s,n,this.points[3],!0)]},PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var t=this.bounds();return{left:t.x.min,right:t.x.max,top:t.y.min,bottom:t.y.max,width:t.x.max-t.x.min,height:t.y.max-t.y.min,cx:(t.x.max+t.x.min)/2,cy:(t.y.max+t.y.min)/2}},PolynomialBezier.prototype.intersections=function(t,e,i){void 0===e&&(e=2),void 0===i&&(i=7);var n=[];return intersectsImpl(intersectData(this,0,1),intersectData(t,0,1),0,e,n,i),n},PolynomialBezier.shapeSegment=function(t,e){var i=(e+1)%t.length();return new PolynomialBezier(t.v[e],t.o[e],t.i[i],t.v[i],!0)},PolynomialBezier.shapeSegmentInverted=function(t,e){var i=(e+1)%t.length();return new PolynomialBezier(t.v[i],t.i[i],t.o[e],t.v[e],!0)},extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(t,e.s,0,null,this),this.frequency=PropertyFactory.getProp(t,e.r,0,null,this),this.pointsType=PropertyFactory.getProp(t,e.pt,0,null,this),this._isAnimated=0!==this.amplitude.effectsSequence.length||0!==this.frequency.effectsSequence.length||0!==this.pointsType.effectsSequence.length},ZigZagModifier.prototype.processPath=function(t,e,i,n){var r=t._length,s=shapePool.newElement();if(s.c=t.c,t.c||(r-=1),0===r)return s;var a=-1,o=PolynomialBezier.shapeSegment(t,0);zigZagCorner(s,t,0,e,i,n,a);for(var l=0;l<r;l+=1)a=zigZagSegment(s,o,e,i,n,-a),o=l!==r-1||t.c?PolynomialBezier.shapeSegment(t,(l+1)%r):null,zigZagCorner(s,t,l+1,e,i,n,a);return s},ZigZagModifier.prototype.processShapes=function(t){var e,i,n,r,s,a,o=this.shapes.length,l=this.amplitude.v,h=Math.max(0,Math.round(this.frequency.v)),c=this.pointsType.v;if(0!==l)for(i=0;i<o;i+=1){if(a=(s=this.shapes[i]).localShapeCollection,s.shape._mdf||this._mdf||t)for(a.releaseShapes(),s.shape._mdf=!0,e=s.shape.paths.shapes,r=s.shape.paths._length,n=0;n<r;n+=1)a.addShape(this.processPath(e[n],l,h,c));s.shape.paths=s.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)},extendPrototype([ShapeModifier],OffsetPathModifier),OffsetPathModifier.prototype.initModifierProperties=function(t,e){this.getValue=this.processKeys,this.amount=PropertyFactory.getProp(t,e.a,0,null,this),this.miterLimit=PropertyFactory.getProp(t,e.ml,0,null,this),this.lineJoin=e.lj,this._isAnimated=0!==this.amount.effectsSequence.length},OffsetPathModifier.prototype.processPath=function(t,e,i,n){var r=shapePool.newElement();r.c=t.c;var s,a,o,l=t.length();t.c||(l-=1);var h=[];for(s=0;s<l;s+=1)o=PolynomialBezier.shapeSegment(t,s),h.push(offsetSegmentSplit(o,e));if(!t.c)for(s=l-1;s>=0;s-=1)o=PolynomialBezier.shapeSegmentInverted(t,s),h.push(offsetSegmentSplit(o,e));h=pruneIntersections(h);var c=null,u=null;for(s=0;s<h.length;s+=1){var d=h[s];for(u&&(c=joinLines(r,u,d[0],i,n)),u=d[d.length-1],a=0;a<d.length;a+=1)o=d[a],c&&pointEqual(o.points[0],c)?r.setXYAt(o.points[1][0],o.points[1][1],"o",r.length()-1):r.setTripleAt(o.points[0][0],o.points[0][1],o.points[1][0],o.points[1][1],o.points[0][0],o.points[0][1],r.length()),r.setTripleAt(o.points[3][0],o.points[3][1],o.points[3][0],o.points[3][1],o.points[2][0],o.points[2][1],r.length()),c=o.points[3]}return h.length&&joinLines(r,u,h[0][0],i,n),r},OffsetPathModifier.prototype.processShapes=function(t){var e,i,n,r,s,a,o=this.shapes.length,l=this.amount.v,h=this.miterLimit.v,c=this.lineJoin;if(0!==l)for(i=0;i<o;i+=1){if(a=(s=this.shapes[i]).localShapeCollection,s.shape._mdf||this._mdf||t)for(a.releaseShapes(),s.shape._mdf=!0,e=s.shape.paths.shapes,r=s.shape.paths._length,n=0;n<r;n+=1)a.addShape(this.processPath(e[n],l,c,h));s.shape.paths=s.localShapeCollection}this.dynamicProperties.length||(this._mdf=!1)};var FontManager=function(){var t={w:0,size:0,shapes:[],data:{shapes:[]}},e=[];e=e.concat([2304,2305,2306,2307,2362,2363,2364,2364,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2387,2388,2389,2390,2391,2402,2403]);var i=127988,n=["d83cdffb","d83cdffc","d83cdffd","d83cdffe","d83cdfff"];function r(t,e){var i=createTag("span");i.setAttribute("aria-hidden",!0),i.style.fontFamily=e;var n=createTag("span");n.innerText="giItT1WQy@!-/#",i.style.position="absolute",i.style.left="-10000px",i.style.top="-10000px",i.style.fontSize="300
2px",i.style.fontVariant="normal",i.style.fontStyle="normal",i.style.fontWeight="normal",i.style.letterSpacing="0",i.appendChild(n),document.body.appendChild(i);var r=n.offsetWidth;return n.style.fontFamily=function(t){var e,i=t.split(","),n=i.length,r=[];for(e=0;e<n;e+=1)"sans-serif"!==i[e]&&"monospace"!==i[e]&&r.push(i[e]);return r.join(",")}(t)+", "+e,{node:n,w:r,parent:i}}function s(t,e){var i,n=document.body&&e?"svg":"canvas",r=getFontProperties(t);if("svg"===n){var s=createNS("text");s.style.fontSize="100px",s.setAttribute("font-family",t.fFamily),s.setAttribute("font-style",r.style),s.setAttribute("font-weight",r.weight),s.textContent="1",t.fClass?(s.style.fontFamily="inherit",s.setAttribute("class",t.fClass)):s.style.fontFamily=t.fFamily,e.appendChild(s),i=s}else{var a=new OffscreenCanvas(500,500).getContext("2d");a.font=r.style+" "+r.weight+" 100px "+t.fFamily,i=a}return{measureText:function(t){return"svg"===n?(i.textContent=t,i.getComputedTextLength()):i.measureText(t).width}}}function a(t){var e=0,i=t.charCodeAt(0);if(i>=55296&&i<=56319){var n=t.charCodeAt(1);n>=56320&&n<=57343&&(e=1024*(i-55296)+n-56320+65536)}return e}function o(t){var e=a(t);return e>=127462&&e<=127487}var l=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};l.isModifier=function(t,e){var i=t.toString(16)+e.toString(16);return-1!==n.indexOf(i)},l.isZeroWidthJoiner=function(t){return 8205===t},l.isFlagEmoji=function(t){return o(t.substr(0,2))&&o(t.substr(2,2))},l.isRegionalCode=o,l.isCombinedCharacter=function(t){return-1!==e.indexOf(t)},l.isRegionalFlag=function(t,e){var n=a(t.substr(e,2));if(n!==i)return!1;var r=0;for(e+=2;r<5;){if((n=a(t.substr(e,2)))<917601||n>917626)return!1;r+=1,e+=2}return 917631===a(t.substr(e,2))},l.isVariationSelector=function(t){return 65039===t},l.BLACK_FLAG_CODE_POINT=i;var h={addChars:function(t){if(t){var e;this.chars||(this.chars=[]);var i,n,r=t.length,s=this.chars.length;for(e=0;e<r;e+=1){for(i=0,n=!1;i<s;)this.chars[i].style===t[e].style&&this.chars[i].fFamily===t[e].fFamily&&this.chars[i].ch===t[e].ch&&(n=!0),i+=1;n||(this.chars.push(t[e]),s+=1)}}},addFonts:function(t,e){if(t){if(this.chars)return this.isLoaded=!0,void(this.fonts=t.list);if(!document.body)return this.isLoaded=!0,t.list.forEach(function(t){t.helper=s(t),t.cache={}}),void(this.fonts=t.list);var i,n=t.list,a=n.length,o=a;for(i=0;i<a;i+=1){var l,h,c=!0;if(n[i].loaded=!1,n[i].monoCase=r(n[i].fFamily,"monospace"),n[i].sansCase=r(n[i].fFamily,"sans-serif"),n[i].fPath){if("p"===n[i].fOrigin||3===n[i].origin){if((l=document.querySelectorAll('style[f-forigin="p"][f-family="'+n[i].fFamily+'"], style[f-origin="3"][f-family="'+n[i].fFamily+'"]')).length>0&&(c=!1),c){var u=createTag("style");u.setAttribute("f-forigin",n[i].fOrigin),u.setAttribute("f-origin",n[i].origin),u.setAttribute("f-family",n[i].fFamily),u.type="text/css",u.innerText="@font-face {font-family: "+n[i].fFamily+"; font-style: normal; src: url('"+n[i].fPath+"');}",e.appendChild(u)}}else if("g"===n[i].fOrigin||1===n[i].origin){for(l=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),h=0;h<l.length;h+=1)-1!==l[h].href.indexOf(n[i].fPath)&&(c=!1);if(c){var d=createTag("link");d.setAttribute("f-forigin",n[i].fOrigin),d.setAttribute("f-origin",n[i].origin),d.type="text/css",d.rel="stylesheet",d.href=n[i].fPath,document.body.appendChild(d)}}else if("t"===n[i].fOrigin||2===n[i].origin){for(l=document.querySelectorAll('script[f-forigin="t"], script[f-origin="2"]'),h=0;h<l.length;h+=1)n[i].fPath===l[h].src&&(c=!1);if(c){var f=createTag("link");f.setAttribute("f-forigin",n[i].fOrigin),f.setAttribute("f-origin",n[i].origin),f.setAttribute("rel","stylesheet"),f.setAttribute("href",n[i].fPath),e.appendChild(f)}}}else n[i].loaded=!0,o-=1;n[i].helper=s(n[i],e),n[i].cache={},this.fonts.push(n[i])}0===o?this.isLoaded=!0:setTimeout(this.checkLoadedFonts.bind(this),100)}else this.isLoaded=!0},getCharData:function(e,i,n){for(var r=0,s=this.chars.length;r<s;){if(this.chars[r].ch===e&&this.chars[r].style===i&&this.chars[r].fFamily===n)return this.chars[r];r+=1}return("string"==typeof e&&13!==e.charCodeAt(0)||!e)&&console&&console.warn&&!this._warned&&(this._warned=!0,console.warn("Missing character from exported characters list: ",e,i,n)),t},getFontByName:function(t){for(var e=0,i=this.fonts.length;e<i;){if(this.fonts[e].fName===t)return this.fonts[e];e+=1}return this.fonts[0]}
vendor: 9,813 bytes, line 2
2,measureText:function(t,e,i){var n=this.getFontByName(e),r=t;if(!n.cache[r]){var s=n.helper;if(" "===t){var a=s.measureText("|"+t+"|"),o=s.measureText("||");n.cache[r]=(a-o)/100}else n.cache[r]=s.measureText(t)/100}return n.cache[r]*i},checkLoadedFonts:function(){var t,e,i,n=this.fonts.length,r=n;for(t=0;t<n;t+=1)this.fonts[t].loaded?r-=1:"n"===this.fonts[t].fOrigin||0===this.fonts[t].origin?this.fonts[t].loaded=!0:(e=this.fonts[t].monoCase.node,i=this.fonts[t].monoCase.w,e.offsetWidth!==i?(r-=1,this.fonts[t].loaded=!0):(e=this.fonts[t].sansCase.node,i=this.fonts[t].sansCase.w,e.offsetWidth!==i&&(r-=1,this.fonts[t].loaded=!0)),this.fonts[t].loaded&&(this.fonts[t].sansCase.parent.parentNode.removeChild(this.fonts[t].sansCase.parent),this.fonts[t].monoCase.parent.parentNode.removeChild(this.fonts[t].monoCase.parent)));0!==r&&Date.now()-this.initTime<5e3?setTimeout(this.checkLoadedFontsBinded,20):setTimeout(this.setIsLoadedBinded,10)},setIsLoaded:function(){this.isLoaded=!0}};return l.prototype=h,l}();function SlotManager(t){this.animationData=t}function slotFactory(t){return new SlotManager(t)}function RenderableElement(){}SlotManager.prototype.getProp=function(t){return this.animationData.slots&&this.animationData.slots[t.sid]?Object.assign(t,this.animationData.slots[t.sid].p):t},RenderableElement.prototype={initRenderable:function(){this.isInRange=!1,this.hidden=!1,this.isTransparent=!1,this.renderableComponents=[]},addRenderableComponent:function(t){-1===this.renderableComponents.indexOf(t)&&this.renderableComponents.push(t)},removeRenderableComponent:function(t){-1!==this.renderableComponents.indexOf(t)&&this.renderableComponents.splice(this.renderableComponents.indexOf(t),1)},prepareRenderableFrame:function(t){this.checkLayerLimits(t)},checkTransparency:function(){this.finalTransform.mProp.o.v<=0?!this.isTransparent&&this.globalData.renderConfig.hideOnTransparent&&(this.isTransparent=!0,this.hide()):this.isTransparent&&(this.isTransparent=!1,this.show())},checkLayerLimits:function(t){this.data.ip-this.data.st<=t&&this.data.op-this.data.st>t?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var t,e=this.renderableComponents.length;for(t=0;t<e;t+=1)this.renderableComponents[t].renderFrame(this._isFirstFrame)},sourceRectAtTime:function(){return{top:0,left:0,width:100,height:100}},getLayerSize:function(){return 5===this.data.ty?{w:this.data.textData.width,h:this.data.textData.height}:{w:this.data.width,h:this.data.height}}};var getBlendMode=(blendModeEnums={0:"source-over",1:"multiply",2:"screen",3:"overlay",4:"darken",5:"lighten",6:"color-dodge",7:"color-burn",8:"hard-light",9:"soft-light",10:"difference",11:"exclusion",12:"hue",13:"saturation",14:"color",15:"luminosity"},function(t){return blendModeEnums[t]||""}),blendModeEnums;function SliderEffect(t,e,i){this.p=PropertyFactory.getProp(e,t.v,0,0,i)}function AngleEffect(t,e,i){this.p=PropertyFactory.getProp(e,t.v,0,0,i)}function ColorEffect(t,e,i){this.p=PropertyFactory.getProp(e,t.v,1,0,i)}function PointEffect(t,e,i){this.p=PropertyFactory.getProp(e,t.v,1,0,i)}function LayerIndexEffect(t,e,i){this.p=PropertyFactory.getProp(e,t.v,0,0,i)}function MaskIndexEffect(t,e,i){this.p=PropertyFactory.getProp(e,t.v,0,0,i)}function CheckboxEffect(t,e,i){this.p=PropertyFactory.getProp(e,t.v,0,0,i)}function NoValueEffect(){this.p={}}function EffectsManager(t,e){var i,n=t.ef||[];this.effectElements=[];var r,s=n.length;for(i=0;i<s;i+=1)r=new GroupEffect(n[i],e),this.effectElements.push(r)}function GroupEffect(t,e){this.init(t,e)}function BaseElement(){}function FrameElement(){}function FootageElement(t,e,i){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.footageData=e.imageLoader.getAsset(this.assetData),this.initBaseData(t,e,i)}function AudioElement(t,e,i){this.initFrame(),this.initRenderable(),this.assetData=e.getAssetData(t.refId),this.initBaseData(t,e,i),this._isPlaying=!1,this._canPlay=!1;var n=this.globalData.getAssetsPath(this.assetData);this.audio=this.globalData.audioController.createAudio(n),this._currentTime=0,this.globalData.audioController.addAudio(this),this._volumeMultiplier=1,this._volume=1,this._previousVolume=null,this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0},this.lv=PropertyFactory.getProp(this,t.au&&t.au.lv?t.au.lv:{k:[100]},1,.01,this)}function BaseRenderer(){}extendPrototype([DynamicPropertyContainer],GroupEffect),GroupEffect.prototype.getValue=GroupEffect.prototype.iterateDynamicProperties,GroupEffect.prototype.init=function(t,e){var i;this.data=t,this.effectElements=[],this.initDynamicPropertyContainer(e);var n,r=this.data.ef.length,s=this.data.ef;for(i=0;i<r;i+=1){switch(n=null,s[i].ty){case 0:n=new SliderEffect(s[i],e,this);break;case 1:n=new AngleEffect(s[i],e,this);break;case 2:n=new ColorEffect(s[i],e,this);break;case 3:n=new PointEffect(s[i],e,this);break;case 4:case 7:n=new CheckboxEffect(s[i],e,this);break;case 10:n=new LayerIndexEffect(s[i],e,this);break;case 11:n=new MaskIndexEffect(s[i],e,this);break;case 5:n=new EffectsManager(s[i],e,this);break;default:n=new NoValueEffect(s[i],e,this)}n&&this.effectElements.push(n)}},BaseElement.prototype={checkMasks:function(){if(!this.data.hasMask)return!1;for(var t=0,e=this.data.masksProperties.length;t<e;){if("n"!==this.data.masksProperties[t].mode&&!1!==this.data.masksProperties[t].cl)return!0;t+=1}return!1},initExpressions:function(){var t=getExpressionInterfaces();if(t){var e=t("layer"),i=t("effects"),n=t("shape"),r=t("text"),s=t("comp");this.layerInterface=e(this),this.data.hasMask&&this.maskManager&&this.layerInterface.registerMaskInterface(this.maskManager);var a=i.createEffectsInterface(this,this.layerInterface);this.layerInterface.registerEffectsInterface(a),0===this.data.ty||this.data.xt?this.compInterface=s(this):4===this.data.ty?(this.layerInterface.shapeInterface=n(this.shapesData,this.itemsData,this.layerInterface),this.layerInterface.content=this.layerInterface.shapeInterface):5===this.data.ty&&(this.layerInterface.textInterface=r(this),this.layerInterface.text=this.layerInterface.textInterface)}},setBlendMode:function(){var t=getBlendMode(this.data.bm);(this.baseElement||this.layerElement).style["mix-blend-mode"]=t},initBaseData:function(t,e,i){this.globalData=e,this.comp=i,this.data=t,this.layerId=createElementID(),this.data.sr||(this.data.sr=1),this.effectsManager=new EffectsManager(this.data,this,this.dynamicProperties)},getType:function(){return this.type},sourceRectAtTime:function(){}},FrameElement.prototype={initFrame:function(){this._isFirstFrame=!1,this.dynamicProperties=[],this._mdf=!1},prepareProperties:function(t,e){var i,n=this.dynamicProperties.length;for(i=0;i<n;i+=1)(e||this._isParent&&"transform"===this.dynamicProperties[i].propType)&&(this.dynamicProperties[i].getValue(),this.dynamicProperties[i]._mdf&&(this.globalData._mdf=!0,this._mdf=!0))},addDynamicProperty:function(t){-1===this.dynamicProperties.indexOf(t)&&this.dynamicProperties.push(t)}},FootageElement.prototype.prepareFrame=function(){},extendPrototype([RenderableElement,BaseElement,FrameElement],FootageElement),FootageElement.prototype.getBaseElement=function(){return null},FootageElement.prototype.renderFrame=function(){},FootageElement.prototype.destroy=function(){},FootageElement.prototype.initExpressions=function(){var t=getExpressionInterfaces();if(t){var e=t("footage");this.layerInterface=e(this)}},FootageElement.prototype.getFootageData=function(){return this.footageData},AudioElement.prototype.prepareFrame=function(t){if(this.prepareRenderableFrame(t,!0),this.prepareProperties(t,!0),this.tm._placeholder)this._currentTime=t/this.data.sr;else{var e=this.tm.v;this._currentTime=e}this._volume=this.lv.v[0];var i=this._volume*this._volumeMultiplier;this._previousVolume!==i&&(this._previousVolume=i,this.audio.volume(i))},extendPrototype([RenderableElement,BaseElement,FrameElement],AudioElement),AudioElement.prototype.renderFrame=function(){this.isInRange&&this._canPlay&&(this._isPlaying?(!this.audio.playing()||Math.abs(this._currentTime/this.globalData.frameRate-this.audio.seek())>.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(t){this.audio.rate(t)},AudioElement.prototype.volume=function(t){this._volumeMultiplier=t,this._previousVolume=t*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},BaseRenderer.prototype.checkLayers=function(t){var e,i,n=this.layers.length;for(this.completeLayers=!0,e=n-1;e>=0;e-=1)this.elements[e]||(i=this.layers[e]).ip-i.st<=t-this.layers[e].st&&i.op-i.st>t-this.layers[e].st&&this.buildItem(e),this.completeLayers=!!this.elements[e]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(t){switch(t.ty){case 2:return this.createImage(t);case 0:return this.createComp(t);case 1:return this.createSolid(t);case 3:default:return this.createNull(t);case 4:return this.createShape(t);case 5:return this.createText(t);case 6:return this.createAudio(t);case 13:return this.createCamera(t);case 15:return this.createFootage(t)}
vendor: 11,336 bytes, line 2
2},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(t){return new AudioElement(t,this.globalData,this)},BaseRenderer.prototype.createFootage=function(t){return new FootageElement(t,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.buildItem(t);this.checkPendingElements()},BaseRenderer.prototype.includeLayers=function(t){var e;this.completeLayers=!1;var i,n=t.length,r=this.layers.length;for(e=0;e<n;e+=1)for(i=0;i<r;){if(this.layers[i].id===t[e].id){this.layers[i]=t[e];break}i+=1}},BaseRenderer.prototype.setProjectInterface=function(t){this.globalData.projectInterface=t},BaseRenderer.prototype.initItems=function(){this.globalData.progressiveLoad||this.buildAllItems()},BaseRenderer.prototype.buildElementParenting=function(t,e,i){for(var n=this.elements,r=this.layers,s=0,a=r.length;s<a;)r[s].ind==e&&(n[s]&&!0!==n[s]?(i.push(n[s]),n[s].setAsParent(),void 0!==r[s].parent?this.buildElementParenting(t,r[s].parent,i):t.setHierarchy(i)):(this.buildItem(s),this.addPendingElement(t))),s+=1},BaseRenderer.prototype.addPendingElement=function(t){this.pendingElements.push(t)},BaseRenderer.prototype.searchExtraCompositions=function(t){var e,i=t.length;for(e=0;e<i;e+=1)if(t[e].xt){var n=this.createComp(t[e]);n.initExpressions(),this.globalData.projectInterface.registerComposition(n)}},BaseRenderer.prototype.getElementById=function(t){var e,i=this.elements.length;for(e=0;e<i;e+=1)if(this.elements[e].data.ind===t)return this.elements[e];return null},BaseRenderer.prototype.getElementByPath=function(t){var e,i=t.shift();if("number"==typeof i)e=this.elements[i];else{var n,r=this.elements.length;for(n=0;n<r;n+=1)if(this.elements[n].data.nm===i){e=this.elements[n];break}}return 0===t.length?e:e.getElementByPath(t)},BaseRenderer.prototype.setupGlobalData=function(t,e){this.globalData.fontManager=new FontManager,this.globalData.slotManager=slotFactory(t),this.globalData.fontManager.addChars(t.chars),this.globalData.fontManager.addFonts(t.fonts,e),this.globalData.getAssetData=this.animationItem.getAssetData.bind(this.animationItem),this.globalData.getAssetsPath=this.animationItem.getAssetsPath.bind(this.animationItem),this.globalData.imageLoader=this.animationItem.imagePreloader,this.globalData.audioController=this.animationItem.audioController,this.globalData.frameId=0,this.globalData.frameRate=t.fr,this.globalData.nm=t.nm,this.globalData.compSize={w:t.w,h:t.h}};var effectTypes={TRANSFORM_EFFECT:"transformEFfect"};function TransformElement(){}function MaskElement(t,e,i){this.data=t,this.element=e,this.globalData=i,this.storedData=[],this.masksProperties=this.data.masksProperties||[],this.maskElement=null;var n,r,s=this.globalData.defs,a=this.masksProperties?this.masksProperties.length:0;this.viewData=createSizedArray(a),this.solidPath="";var o,l,h,c,u,d,f=this.masksProperties,p=0,m=[],g=createElementID(),y="clipPath",v="clip-path";for(n=0;n<a;n+=1)if(("a"!==f[n].mode&&"n"!==f[n].mode||f[n].inv||100!==f[n].o.k||f[n].o.x)&&(y="mask",v="mask"),"s"!==f[n].mode&&"i"!==f[n].mode||0!==p?h=null:((h=createNS("rect")).setAttribute("fill","#ffffff"),h.setAttribute("width",this.element.comp.data.w||0),h.setAttribute("height",this.element.comp.data.h||0),m.push(h)),r=createNS("path"),"n"===f[n].mode)this.viewData[n]={op:PropertyFactory.getProp(this.element,f[n].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,f[n],3),elem:r,lastPath:""},s.appendChild(r);else{var b;if(p+=1,r.setAttribute("fill","s"===f[n].mode?"#000000":"#ffffff"),r.setAttribute("clip-rule","nonzero"),0!==f[n].x.k?(y="mask",v="mask",d=PropertyFactory.getProp(this.element,f[n].x,0,null,this.element),b=createElementID(),(c=createNS("filter")).setAttribute("id",b),(u=createNS("feMorphology")).setAttribute("operator","erode"),u.setAttribute("in","SourceGraphic"),u.setAttribute("radius","0"),c.appendChild(u),s.appendChild(c),r.setAttribute("stroke","s"===f[n].mode?"#000000":"#ffffff")):(u=null,d=null),this.storedData[n]={elem:r,x:d,expan:u,lastPath:"",lastOperator:"",filterId:b,lastRadius:0},"i"===f[n].mode){l=m.length;var S=createNS("g");for(o=0;o<l;o+=1)S.appendChild(m[o]);var E=createNS("mask");E.setAttribute("mask-type","alpha"),E.setAttribute("id",g+"_"+p),E.appendChild(r),s.appendChild(E),S.setAttribute("mask","url("+getLocationHref()+"#"+g+"_"+p+")"),m.length=0,m.push(S)}else m.push(r);f[n].inv&&!this.solidPath&&(this.solidPath=this.createLayerSolidPath()),this.viewData[n]={elem:r,lastPath:"",op:PropertyFactory.getProp(this.element,f[n].o,0,.01,this.element),prop:ShapePropertyFactory.getShapeProp(this.element,f[n],3),invRect:h},this.viewData[n].prop.k||this.drawPath(f[n],this.viewData[n].prop.v,this.viewData[n])}for(this.maskElement=createNS(y),a=m.length,n=0;n<a;n+=1)this.maskElement.appendChild(m[n]);p>0&&(this.maskElement.setAttribute("id",g),this.element.maskedElement.setAttribute(v,"url("+getLocationHref()+"#"+g+")"),s.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}TransformElement.prototype={initTransform:function(){var t=new Matrix;this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_localMatMdf:!1,_opMdf:!1,mat:t,localMat:t,localOpacity:1},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var t,e=this.finalTransform.mat,i=0,n=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;i<n;){if(this.hierarchy[i].finalTransform.mProp._mdf){this.finalTransform._matMdf=!0;break}i+=1}if(this.finalTransform._matMdf)for(t=this.finalTransform.mProp.v.props,e.cloneFromProps(t),i=0;i<n;i+=1)e.multiply(this.hierarchy[i].finalTransform.mProp.v)}this.finalTransform._matMdf&&(this.finalTransform._localMatMdf=this.finalTransform._matMdf),this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v)},renderLocalTransform:function(){if(this.localTransforms){var t=0,e=this.localTransforms.length;if(this.finalTransform._localMatMdf=this.finalTransform._matMdf,!this.finalTransform._localMatMdf||!this.finalTransform._opMdf)for(;t<e;)this.localTransforms[t]._mdf&&(this.finalTransform._localMatMdf=!0),this.localTransforms[t]._opMdf&&!this.finalTransform._opMdf&&(this.finalTransform.localOpacity=this.finalTransform.mProp.o.v,this.finalTransform._opMdf=!0),t+=1;if(this.finalTransform._localMatMdf){var i=this.finalTransform.localMat;for(this.localTransforms[0].matrix.clone(i),t=1;t<e;t+=1){var n=this.localTransforms[t].matrix;i.multiply(n)}i.multiply(this.finalTransform.mat)}if(this.finalTransform._opMdf){var r=this.finalTransform.localOpacity;for(t=0;t<e;t+=1)r*=.01*this.localTransforms[t].opacity;this.finalTransform.localOpacity=r}}},searchEffectTransforms:function(){if(this.renderableEffectsManager){var t=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT);if(t.length){this.localTransforms=[],this.finalTransform.localMat=new Matrix;var e=0,i=t.length;for(e=0;e<i;e+=1)this.localTransforms.push(t[e])}}},globalToLocal:function(t){var e=[];e.push(this.finalTransform);for(var i,n=!0,r=this.comp;n;)r.finalTransform?(r.data.hasMask&&e.splice(0,0,r.finalTransform),r=r.comp):n=!1;var s,a=e.length;for(i=0;i<a;i+=1)s=e[i].mat.applyToPointArray(0,0,0),t=[t[0]-s[0],t[1]-s[1],0];return t},mHelper:new Matrix},MaskElement.prototype.getMaskProperty=function(t){return this.viewData[t].prop},MaskElement.prototype.renderFrame=function(t){var e,i=this.element.finalTransform.mat,n=this.masksProperties.length;for(e=0;e<n;e+=1)if((this.viewData[e].prop._mdf||t)&&this.drawPath(this.masksProperties[e],this.viewData[e].prop.v,this.viewData[e]),(this.viewData[e].op._mdf||t)&&this.viewData[e].elem.setAttribute("fill-opacity",this.viewData[e].op.v),"n"!==this.masksProperties[e].mode&&(this.viewData[e].invRect&&(this.element.finalTransform.mProp._mdf||t)&&this.viewData[e].invRect.setAttribute("transform",i.getInverseMatrix().to2dCSS()),this.storedData[e].x&&(this.storedData[e].x._mdf||t))){var r=this.storedData[e].expan;this.storedData[e].x.v<0?("erode"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="erode",this.storedData[e].elem.setAttribute("filter","url("+getLocationHref()+"#"+this.storedData[e].filterId+")")),r.setAttribute("radius",-this.storedData[e].x.v)):("dilate"!==this.storedData[e].lastOperator&&(this.storedData[e].lastOperator="dilate",this.storedData[e].elem.setAttribute("filter",null)),this.storedData[e].elem.setAttribute("stroke-width",2*this.storedData[e].x.v))}},MaskElement.prototype.getMaskelement=function(){return this.maskElement},MaskElement.prototype.createLayerSolidPath=function(){var t="M0,0 ";return t+=" h"+this.globalData.compSize.w,t+=" v"+this.globalData.compSize.h,(t+=" h-"+this.globalData.compSize.w)+" v-"+this.globalData.compSize.h+" "},MaskElement.prototype.drawPath=function(t,e,i){var n,r,s=" M"+e.v[0][0]+","+e.v[0][1];for(r=e._length,n=1;n<r;n+=1)s+=" C"+e.o[n-1][0]+","+e.o[n-1][1]+" "+e.i[n][0]+","+e.i[n][1]+" "+e.v[n][0]+","+e.v[n][1];if(e.c&&r>1&&(s+=" C"+e.o[n-1][0]+","+e.o[n-1][1]+" "+e.i[0][0]+","+e.i[0][1]+" "+e.v[0][0]+","+e.v[0][1]),i.lastPath!==s){var a="";i.elem&&(e.c&&(a=t.inv?this.solidPath+s:s),i.elem.setAttribute("d",a)),i.lastPath=s}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory={createFilter:function(t,e){var i=createNS("filter");return i.setAttribute("id",t),!0!==e&&(i.setAttribute("filterUnits","objectBoundingBox"),i.setAttribute("x","0%"),i.setAttribute("y","0%"),i.setAttribute("width","100%"),i.setAttribute("height","100%")),i},createAlphaToLuminanceFilter:function(){var t=createNS("feColorMatrix");return t.setAttribute("type","matrix"),t.setAttribute("color-interpolation-filters","sRGB"),t.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),t}},featureSupport=function(){var t={maskType:!0,svgLumaHidden:!0,offscreenCanvas:"undefined"!=typeof OffscreenCanvas};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(t.maskType=!1),/firefox/i.test(navigator.userAgent)&&(t.svgLumaHidden=!1),t}(),registeredEffects$1={},idPrefix="filter_result_";function SVGEffects(t){var e,i,n="SourceGraphic",r=t.data.ef?t.data.ef.length:0,s=createElementID(),a=filtersFactory.createFilter(s,!0),o=0;for(this.filters=[],e=0;e<r;e+=1){i=null;var l=t.data.ef[e].ty;registeredEffects$1[l]&&(i=new(0,registeredEffects$1[l].effect)(a,t.effectsManager.effectElements[e],t,idPrefix+o,n),n=idPrefix+o,registeredEffects$1[l].countsAsEffect&&(o+=1)),i&&this.filters.push(i)}o&&(t.globalData.defs.appendChild(a),t.layerElement.setAttribute("filter","url("+getLocationHref()+"#"+s+")")),this.filters.length&&t.addRenderableComponent(this)}function registerEffect$1(t,e,i){registeredEffects$1[t]={effect:e,countsAsEffect:i}}function SVGBaseElement(){}function HierarchyElement(){}
vendor: 13,653 bytes, line 2
2function RenderableDOMElement(){}function IImageElement(t,e,i){this.assetData=e.getAssetData(t.refId),this.assetData&&this.assetData.sid&&(this.assetData=e.slotManager.getProp(this.assetData)),this.initElement(t,e,i),this.sourceRect={top:0,left:0,width:this.assetData.w,height:this.assetData.h}}function ProcessedElement(t,e){this.elem=t,this.pos=e}function IShapeElement(){}SVGEffects.prototype.renderFrame=function(t){var e,i=this.filters.length;for(e=0;e<i;e+=1)this.filters[e].renderFrame(t)},SVGEffects.prototype.getEffects=function(t){var e,i=this.filters.length,n=[];for(e=0;e<i;e+=1)this.filters[e].type===t&&n.push(this.filters[e]);return n},SVGBaseElement.prototype={initRendererElement:function(){this.layerElement=createNS("g")},createContainerElements:function(){this.matteElement=createNS("g"),this.transformedElement=this.layerElement,this.maskedElement=this.layerElement,this._sizeChanged=!1;var t=null;if(this.data.td){this.matteMasks={};var e=createNS("g");e.setAttribute("id",this.layerId),e.appendChild(this.layerElement),t=e,this.globalData.defs.appendChild(e)}else this.data.tt?(this.matteElement.appendChild(this.layerElement),t=this.matteElement,this.baseElement=this.matteElement):this.baseElement=this.layerElement;if(this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0===this.data.ty&&!this.data.hd){var i=createNS("clipPath"),n=createNS("path");n.setAttribute("d","M0,0 L"+this.data.w+",0 L"+this.data.w+","+this.data.h+" L0,"+this.data.h+"z");var r=createElementID();if(i.setAttribute("id",r),i.appendChild(n),this.globalData.defs.appendChild(i),this.checkMasks()){var s=createNS("g");s.setAttribute("clip-path","url("+getLocationHref()+"#"+r+")"),s.appendChild(this.layerElement),this.transformedElement=s,t?t.appendChild(this.transformedElement):this.baseElement=this.transformedElement}else this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+r+")")}0!==this.data.bm&&this.setBlendMode()},renderElement:function(){this.finalTransform._localMatMdf&&this.transformedElement.setAttribute("transform",this.finalTransform.localMat.to2dCSS()),this.finalTransform._opMdf&&this.transformedElement.setAttribute("opacity",this.finalTransform.localOpacity)},destroyBaseElement:function(){this.layerElement=null,this.matteElement=null,this.maskManager.destroy()},getBaseElement:function(){return this.data.hd?null:this.baseElement},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData),this.renderableEffectsManager=new SVGEffects(this),this.searchEffectTransforms()},getMatte:function(t){if(this.matteMasks||(this.matteMasks={}),!this.matteMasks[t]){var e,i,n,r,s=this.layerId+"_"+t;if(1===t||3===t){var a=createNS("mask");a.setAttribute("id",s),a.setAttribute("mask-type",3===t?"luminance":"alpha"),(n=createNS("use")).setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),a.appendChild(n),this.globalData.defs.appendChild(a),featureSupport.maskType||1!==t||(a.setAttribute("mask-type","luminance"),e=createElementID(),i=filtersFactory.createFilter(e),this.globalData.defs.appendChild(i),i.appendChild(filtersFactory.createAlphaToLuminanceFilter()),(r=createNS("g")).appendChild(n),a.appendChild(r),r.setAttribute("filter","url("+getLocationHref()+"#"+e+")"))}else if(2===t){var o=createNS("mask");o.setAttribute("id",s),o.setAttribute("mask-type","alpha");var l=createNS("g");o.appendChild(l),e=createElementID(),i=filtersFactory.createFilter(e);var h=createNS("feComponentTransfer");h.setAttribute("in","SourceGraphic"),i.appendChild(h);var c=createNS("feFuncA");c.setAttribute("type","table"),c.setAttribute("tableValues","1.0 0.0"),h.appendChild(c),this.globalData.defs.appendChild(i);var u=createNS("rect");u.setAttribute("width",this.comp.data.w),u.setAttribute("height",this.comp.data.h),u.setAttribute("x","0"),u.setAttribute("y","0"),u.setAttribute("fill","#ffffff"),u.setAttribute("opacity","0"),l.setAttribute("filter","url("+getLocationHref()+"#"+e+")"),l.appendChild(u),(n=createNS("use")).setAttributeNS("http://www.w3.org/1999/xlink","href","#"+this.layerId),l.appendChild(n),featureSupport.maskType||(o.setAttribute("mask-type","luminance"),i.appendChild(filtersFactory.createAlphaToLuminanceFilter()),r=createNS("g"),l.appendChild(u),r.appendChild(this.layerElement),l.appendChild(r)),this.globalData.defs.appendChild(o)}this.matteMasks[t]=s}return this.matteMasks[t]},setMatte:function(t){this.matteElement&&this.matteElement.setAttribute("mask","url("+getLocationHref()+"#"+t+")")}},HierarchyElement.prototype={initHierarchy:function(){this.hierarchy=[],this._isParent=!1,this.checkParenting()},setHierarchy:function(t){this.hierarchy=t},setAsParent:function(){this._isParent=!0},checkParenting:function(){void 0!==this.data.parent&&this.comp.buildElementParenting(this,this.data.parent,[])}},extendPrototype([RenderableElement,createProxyFunction({initElement:function(t,e,i){this.initFrame(),this.initBaseData(t,e,i),this.initTransform(t,e,i),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide()},hide:function(){this.hidden||this.isInRange&&!this.isTransparent||((this.baseElement||this.layerElement).style.display="none",this.hidden=!0)},show:function(){this.isInRange&&!this.isTransparent&&(this.data.hd||((this.baseElement||this.layerElement).style.display="block"),this.hidden=!1,this._isFirstFrame=!0)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},renderInnerContent:function(){},prepareFrame:function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.checkTransparency()},destroy:function(){this.innerElem=null,this.destroyBaseElement()}})],RenderableDOMElement),extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],IImageElement),IImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData);this.innerElem=createNS("image"),this.innerElem.setAttribute("width",this.assetData.w+"px"),this.innerElem.setAttribute("height",this.assetData.h+"px"),this.innerElem.setAttribute("preserveAspectRatio",this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio),this.innerElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.innerElem)},IImageElement.prototype.sourceRectAtTime=function(){return this.sourceRect},IShapeElement.prototype={addShapeToModifiers:function(t){var e,i=this.shapeModifiers.length;for(e=0;e<i;e+=1)this.shapeModifiers[e].addShape(t)},isShapeInAnimatedModifiers:function(t){for(var e=this.shapeModifiers.length;0<e;)if(this.shapeModifiers[0].isAnimatedWithShape(t))return!0;return!1},renderModifiers:function(){if(this.shapeModifiers.length){var t,e=this.shapes.length;for(t=0;t<e;t+=1)this.shapes[t].sh.reset();for(t=(e=this.shapeModifiers.length)-1;t>=0&&!this.shapeModifiers[t].processShapes(this._isFirstFrame);t-=1);}},searchProcessedElement:function(t){for(var e=this.processedElements,i=0,n=e.length;i<n;){if(e[i].elem===t)return e[i].pos;i+=1}return 0},addProcessedElement:function(t,e){for(var i=this.processedElements,n=i.length;n;)if(i[n-=1].elem===t)return void(i[n].pos=e);i.push(new ProcessedElement(t,e))},prepareFrame:function(t){this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)}};var lineCapEnum={1:"butt",2:"round",3:"square"},lineJoinEnum={1:"miter",2:"round",3:"bevel"};function SVGShapeData(t,e,i){this.caches=[],this.styles=[],this.transformers=t,this.lStr="",this.sh=i,this.lvl=e,this._isAnimated=!!i.k;for(var n=0,r=t.length;n<r;){if(t[n].mProps.dynamicProperties.length){this._isAnimated=!0;break}n+=1}}function SVGStyleData(t,e){this.data=t,this.type=t.ty,this.d="",this.lvl=e,this._mdf=!1,this.closed=!0===t.hd,this.pElem=createNS("path"),this.msElem=null}function DashProperty(t,e,i,n){var r;this.elem=t,this.frameId=-1,this.dataProps=createSizedArray(e.length),this.renderer=i,this.k=!1,this.dashStr="",this.dashArray=createTypedArray("float32",e.length?e.length-1:0),this.dashoffset=createTypedArray("float32",1),this.initDynamicPropertyContainer(n);var s,a=e.length||0;for(r=0;r<a;r+=1)s=PropertyFactory.getProp(t,e[r].v,0,0,this),this.k=s.k||this.k,this.dataProps[r]={n:e[r].n,p:s};this.k||this.getValue(!0),this._isAnimated=this.k}function SVGStrokeStyleData(t,e,i){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.w=PropertyFactory.getProp(t,e.w,0,null,this),this.d=new DashProperty(t,e.d||{},"svg",this),this.c=PropertyFactory.getProp(t,e.c,1,255,this),this.style=i,this._isAnimated=!!this._isAnimated}function SVGFillStyleData(t,e,i){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.c=PropertyFactory.getProp(t,e.c,1,255,this),this.style=i}function SVGNoStyleData(t,e,i){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.style=i}function GradientProperty(t,e,i){this.data=e,this.c=createTypedArray("uint8c",4*e.p);var n=e.k.k[0].s?e.k.k[0].s.length-4*e.p:e.k.k.length-4*e.p;this.o=createTypedArray("float32",n),this._cmdf=!1,this._omdf=!1,this._collapsable=this.checkCollapsable(),this._hasOpacity=n,this.initDynamicPropertyContainer(i),this.prop=PropertyFactory.getProp(t,e.k,1,null,this),this.k=this.prop.k,this.getValue(!0)}function SVGGradientFillStyleData(t,e,i){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.initGradientData(t,e,i)}function SVGGradientStrokeStyleData(t,e,i){this.initDynamicPropertyContainer(t),this.getValue=this.iterateDynamicProperties,this.w=PropertyFactory.getProp(t,e.w,0,null,this),this.d=new DashProperty(t,e.d||{},"svg",this),this.initGradientData(t,e,i),this._isAnimated=!!this._isAnimated}function ShapeGroupData(){this.it=[],this.prevViewData=[],this.gr=createNS("g")}function SVGTransformData(t,e,i){this.transform={mProps:t,op:e,container:i},this.elements=[],this._isAnimated=this.transform.mProps.dynamicProperties.length||this.transform.op.effectsSequence.length}SVGShapeData.prototype.setAsAnimated=function(){this._isAnimated=!0},SVGStyleData.prototype.reset=function(){this.d="",this._mdf=!1},DashProperty.prototype.getValue=function(t){if((this.elem.globalData.frameId!==this.frameId||t)&&(this.frameId=this.elem.globalData.frameId,this.iterateDynamicProperties(),this._mdf=this._mdf||t,this._mdf)){var e=0,i=this.dataProps.length;for("svg"===this.renderer&&(this.dashStr=""),e=0;e<i;e+=1)"o"!==this.dataProps[e].n?"svg"===this.renderer?this.dashStr+=" "+this.dataProps[e].p.v:this.dashArray[e]=this.dataProps[e].p.v:this.dashoffset[0]=this.dataProps[e].p.v}},extendPrototype([DynamicPropertyContainer],DashProperty),extendPrototype([DynamicPropertyContainer],SVGStrokeStyleData),extendPrototype([DynamicPropertyContainer],SVGFillStyleData),extendPrototype([DynamicPropertyContainer],SVGNoStyleData),GradientProperty.prototype.comparePoints=function(t,e){for(var i=0,n=this.o.length/2;i<n;){if(Math.abs(t[4*i]-t[4*e+2*i])>.01)return!1;i+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var t=0,e=this.data.k.k.length;t<e;){if(!this.comparePoints(this.data.k.k[t].s,this.data.p))return!1;t+=1}else if(!this.comparePoints(this.data.k.k,this.data.p))return!1;return!0},GradientProperty.prototype.getValue=function(t){if(this.prop.getValue(),this._mdf=!1,this._cmdf=!1,this._omdf=!1,this.prop._mdf||t){var e,i,n,r=4*this.data.p;for(e=0;e<r;e+=1)i=e%4==0?100:255,n=Math.round(this.prop.v[e]*i),this.c[e]!==n&&(this.c[e]=n,this._cmdf=!t);if(this.o.length)for(r=this.prop.v.length,e=4*this.data.p;e<r;e+=1)i=e%2==0?100:1,n=e%2==0?Math.round(100*this.prop.v[e]):this.prop.v[e],this.o[e-4*this.data.p]!==n&&(this.o[e-4*this.data.p]=n,this._omdf=!t);this._mdf=!t}},extendPrototype([DynamicPropertyContainer],GradientProperty),SVGGradientFillStyleData.prototype.initGradientData=function(t,e,i){this.o=PropertyFactory.getProp(t,e.o,0,.01,this),this.s=PropertyFactory.getProp(t,e.s,1,null,this),this.e=PropertyFactory.getProp(t,e.e,1,null,this),this.h=PropertyFactory.getProp(t,e.h||{k:0},0,.01,this),this.a=PropertyFactory.getProp(t,e.a||{k:0},0,degToRads,this),this.g=new GradientProperty(t,e.g,this),this.style=i,this.stops=[],this.setGradientData(i.pElem,e),this.setGradientOpacity(e,i),this._isAnimated=!!this._isAnimated},SVGGradientFillStyleData.prototype.setGradientData=function(t,e){var i=createElementID(),n=createNS(1===e.t?"linearGradient":"radialGradient");n.setAttribute("id",i),n.setAttribute("spreadMethod","pad"),n.setAttribute("gradientUnits","userSpaceOnUse");var r,s,a,o=[];for(a=4*e.g.p,s=0;s<a;s+=4)r=createNS("stop"),n.appendChild(r),o.push(r);t.setAttribute("gf"===e.ty?"fill":"stroke","url("+getLocationHref()+"#"+i+")"),this.gf=n,this.cst=o},SVGGradientFillStyleData.prototype.setGradientOpacity=function(t,e){if(this.g._hasOpacity&&!this.g._collapsable){var i,n,r,s=createNS("mask"),a=createNS("path");s.appendChild(a);var o=createElementID(),l=createElementID();s.setAttribute("id",l);var h=createNS(1===t.t?"linearGradient":"radialGradient");h.setAttribute("id",o),h.setAttribute("spreadMethod","pad"),h.setAttribute("gradientUnits","userSpaceOnUse"),r=t.g.k.k[0].s?t.g.k.k[
vendor: 8,893 bytes, line 2
20].s.length:t.g.k.k.length;var c=this.stops;for(n=4*t.g.p;n<r;n+=2)(i=createNS("stop")).setAttribute("stop-color","rgb(255,255,255)"),h.appendChild(i),c.push(i);a.setAttribute("gf"===t.ty?"fill":"stroke","url("+getLocationHref()+"#"+o+")"),"gs"===t.ty&&(a.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),a.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),1===t.lj&&a.setAttribute("stroke-miterlimit",t.ml)),this.of=h,this.ms=s,this.ost=c,this.maskId=l,e.msElem=a}},extendPrototype([DynamicPropertyContainer],SVGGradientFillStyleData),extendPrototype([SVGGradientFillStyleData,DynamicPropertyContainer],SVGGradientStrokeStyleData);var buildShapeString=function(t,e,i,n){if(0===e)return"";var r,s=t.o,a=t.i,o=t.v,l=" M"+n.applyToPointStringified(o[0][0],o[0][1]);for(r=1;r<e;r+=1)l+=" C"+n.applyToPointStringified(s[r-1][0],s[r-1][1])+" "+n.applyToPointStringified(a[r][0],a[r][1])+" "+n.applyToPointStringified(o[r][0],o[r][1]);return i&&e&&(l+=" C"+n.applyToPointStringified(s[r-1][0],s[r-1][1])+" "+n.applyToPointStringified(a[0][0],a[0][1])+" "+n.applyToPointStringified(o[0][0],o[0][1]),l+="z"),l},SVGElementsRenderer=function(){var t=new Matrix,e=new Matrix;function i(t,e,i){(i||e.transform.op._mdf)&&e.transform.container.setAttribute("opacity",e.transform.op.v),(i||e.transform.mProps._mdf)&&e.transform.container.setAttribute("transform",e.transform.mProps.v.to2dCSS())}function n(){}function r(i,n,r){var s,a,o,l,h,c,u,d,f,p,m=n.styles.length,g=n.lvl;for(c=0;c<m;c+=1){if(l=n.sh._mdf||r,n.styles[c].lvl<g){for(d=e.reset(),f=g-n.styles[c].lvl,p=n.transformers.length-1;!l&&f>0;)l=n.transformers[p].mProps._mdf||l,f-=1,p-=1;if(l)for(f=g-n.styles[c].lvl,p=n.transformers.length-1;f>0;)d.multiply(n.transformers[p].mProps.v),f-=1,p-=1}else d=t;if(a=(u=n.sh.paths)._length,l){for(o="",s=0;s<a;s+=1)(h=u.shapes[s])&&h._length&&(o+=buildShapeString(h,h._length,h.c,d));n.caches[c]=o}else o=n.caches[c];n.styles[c].d+=!0===i.hd?"":o,n.styles[c]._mdf=l||n.styles[c]._mdf}}function s(t,e,i){var n=e.style;(e.c._mdf||i)&&n.pElem.setAttribute("fill","rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||i)&&n.pElem.setAttribute("fill-opacity",e.o.v)}function a(t,e,i){o(t,e,i),l(0,e,i)}function o(t,e,i){var n,r,s,a,o,l=e.gf,h=e.g._hasOpacity,c=e.s.v,u=e.e.v;if(e.o._mdf||i){var d="gf"===t.ty?"fill-opacity":"stroke-opacity";e.style.pElem.setAttribute(d,e.o.v)}if(e.s._mdf||i){var f=1===t.t?"x1":"cx",p="x1"===f?"y1":"cy";l.setAttribute(f,c[0]),l.setAttribute(p,c[1]),h&&!e.g._collapsable&&(e.of.setAttribute(f,c[0]),e.of.setAttribute(p,c[1]))}if(e.g._cmdf||i){n=e.cst;var m=e.g.c;for(s=n.length,r=0;r<s;r+=1)(a=n[r]).setAttribute("offset",m[4*r]+"%"),a.setAttribute("stop-color","rgb("+m[4*r+1]+","+m[4*r+2]+","+m[4*r+3]+")")}if(h&&(e.g._omdf||i)){var g=e.g.o;for(s=(n=e.g._collapsable?e.cst:e.ost).length,r=0;r<s;r+=1)a=n[r],e.g._collapsable||a.setAttribute("offset",g[2*r]+"%"),a.setAttribute("stop-opacity",g[2*r+1])}if(1===t.t)(e.e._mdf||i)&&(l.setAttribute("x2",u[0]),l.setAttribute("y2",u[1]),h&&!e.g._collapsable&&(e.of.setAttribute("x2",u[0]),e.of.setAttribute("y2",u[1])));else if((e.s._mdf||e.e._mdf||i)&&(o=Math.sqrt(Math.pow(c[0]-u[0],2)+Math.pow(c[1]-u[1],2)),l.setAttribute("r",o),h&&!e.g._collapsable&&e.of.setAttribute("r",o)),e.e._mdf||e.h._mdf||e.a._mdf||i){o||(o=Math.sqrt(Math.pow(c[0]-u[0],2)+Math.pow(c[1]-u[1],2)));var y=Math.atan2(u[1]-c[1],u[0]-c[0]),v=e.h.v;v>=1?v=.99:v<=-1&&(v=-.99);var b=o*v,S=Math.cos(y+e.a.v)*b+c[0],E=Math.sin(y+e.a.v)*b+c[1];l.setAttribute("fx",S),l.setAttribute("fy",E),h&&!e.g._collapsable&&(e.of.setAttribute("fx",S),e.of.setAttribute("fy",E))}}function l(t,e,i){var n=e.style,r=e.d;r&&(r._mdf||i)&&r.dashStr&&(n.pElem.setAttribute("stroke-dasharray",r.dashStr),n.pElem.setAttribute("stroke-dashoffset",r.dashoffset[0])),e.c&&(e.c._mdf||i)&&n.pElem.setAttribute("stroke","rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||i)&&n.pElem.setAttribute("stroke-opacity",e.o.v),(e.w._mdf||i)&&(n.pElem.setAttribute("stroke-width",e.w.v),n.msElem&&n.msElem.setAttribute("stroke-width",e.w.v))}return{createRenderFunction:function(t){switch(t.ty){case"fl":return s;case"gf":return o;case"gs":return a;case"st":return l;case"sh":case"el":case"rc":case"sr":return r;case"tr":return i;case"no":return n;default:return null}}}}();function SVGShapeElement(t,e,i){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(t,e,i),this.prevViewData=[]}function LetterProps(t,e,i,n,r,s){this.o=t,this.sw=e,this.sc=i,this.fc=n,this.m=r,this.p=s,this._mdf={o:!0,sw:!!e,sc:!!i,fc:!!n,m:!0,p:!0}}function TextProperty(t,e){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,e.d&&e.d.sid&&(e.d=t.globalData.slotManager.getProp(e.d)),this.data=e,this.elem=t,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var t,e,i,n,r=this.shapes.length,s=this.stylesList.length,a=[],o=!1;for(i=0;i<s;i+=1){for(n=this.stylesList[i],o=!1,a.length=0,t=0;t<r;t+=1)-1!==(e=this.shapes[t]).styles.indexOf(n)&&(a.push(e),o=e._isAnimated||o);a.length>1&&o&&this.setShapesAsAnimated(a)}},SVGShapeElement.prototype.setShapesAsAnimated=function(t){var e,i=t.length;for(e=0;e<i;e+=1)t[e].setAsAnimated()},SVGShapeElement.prototype.createStyleElement=function(t,e){var i,n=new SVGStyleData(t,e),r=n.pElem;return"st"===t.ty?i=new SVGStrokeStyleData(this,t,n):"fl"===t.ty?i=new SVGFillStyleData(this,t,n):"gf"===t.ty||"gs"===t.ty?(i=new("gf"===t.ty?SVGGradientFillStyleData:SVGGradientStrokeStyleData)(this,t,n),this.globalData.defs.appendChild(i.gf),i.maskId&&(this.globalData.defs.appendChild(i.ms),this.globalData.defs.appendChild(i.of),r.setAttribute("mask","url("+getLocationHref()+"#"+i.maskId+")"))):"no"===t.ty&&(i=new SVGNoStyleData(this,t,n)),"st"!==t.ty&&"gs"!==t.ty||(r.setAttribute("stroke-linecap",lineCapEnum[t.lc||2]),r.setAttribute("stroke-linejoin",lineJoinEnum[t.lj||2]),r.setAttribute("fill-opacity","0"),1===t.lj&&r.setAttribute("stroke-miterlimit",t.ml)),2===t.r&&r.setAttribute("fill-rule","evenodd"),t.ln&&r.setAttribute("id",t.ln),t.cl&&r.setAttribute("class",t.cl),t.bm&&(r.style["mix-blend-mode"]=getBlendMode(t.bm)),this.stylesList.push(n),this.addToAnimatedContents(t,i),i},SVGShapeElement.prototype.createGroupElement=function(t){var e=new ShapeGroupData;return t.ln&&e.gr.setAttribute("id",t.ln),t.cl&&e.gr.setAttribute("class",t.cl),t.bm&&(e.gr.style["mix-blend-mode"]=getBlendMode(t.bm)),e},SVGShapeElement.prototype.createTransformElement=function(t,e){var i=TransformPropertyFactory.getTransformProperty(this,t,this),n=new SVGTransformData(i,i.o,e);return this.addToAnimatedContents(t,n),n},SVGShapeElement.prototype.createShapeElement=function(t,e,i){var n=4;"rc"===t.ty?n=5:"el"===t.ty?n=6:"sr"===t.ty&&(n=7);var r=new SVGShapeData(e,i,ShapePropertyFactory.getShapeProp(this,t,n,this));return this.shapes.push(r),this.addShapeToModifiers(r),this.addToAnimatedContents(t,r),r},SVGShapeElement.prototype.addToAnimatedContents=function(t,e){for(var i=0,n=this.animatedContents.length;i<n;){if(this.animatedContents[i].element===e)return;i+=1}this.animatedContents.push({fn:SVGElementsRenderer.createRenderFunction(t),element:e,data:t})},SVGShapeElement.prototype.setElementStyles=function(t){var e,i=t.styles,n=this.stylesList.length;for(e=0;e<n;e+=1)this.stylesList[e].closed||i.push(this.stylesList[e])},SVGShapeElement.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes(),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers()}
vendor: 30,018 bytes, line 2
2,SVGShapeElement.prototype.searchShapes=function(t,e,i,n,r,s,a){var o,l,h,c,u,d,f=[].concat(s),p=t.length-1,m=[],g=[];for(o=p;o>=0;o-=1){if((d=this.searchProcessedElement(t[o]))?e[o]=i[d-1]:t[o]._render=a,"fl"===t[o].ty||"st"===t[o].ty||"gf"===t[o].ty||"gs"===t[o].ty||"no"===t[o].ty)d?e[o].style.closed=!1:e[o]=this.createStyleElement(t[o],r),t[o]._render&&e[o].style.pElem.parentNode!==n&&n.appendChild(e[o].style.pElem),m.push(e[o].style);else if("gr"===t[o].ty){if(d)for(h=e[o].it.length,l=0;l<h;l+=1)e[o].prevViewData[l]=e[o].it[l];else e[o]=this.createGroupElement(t[o]);this.searchShapes(t[o].it,e[o].it,e[o].prevViewData,e[o].gr,r+1,f,a),t[o]._render&&e[o].gr.parentNode!==n&&n.appendChild(e[o].gr)}else"tr"===t[o].ty?(d||(e[o]=this.createTransformElement(t[o],n)),c=e[o].transform,f.push(c)):"sh"===t[o].ty||"rc"===t[o].ty||"el"===t[o].ty||"sr"===t[o].ty?(d||(e[o]=this.createShapeElement(t[o],f,r)),this.setElementStyles(e[o])):"tm"===t[o].ty||"rd"===t[o].ty||"ms"===t[o].ty||"pb"===t[o].ty||"zz"===t[o].ty||"op"===t[o].ty?(d?(u=e[o]).closed=!1:((u=ShapeModifiers.getModifier(t[o].ty)).init(this,t[o]),e[o]=u,this.shapeModifiers.push(u)),g.push(u)):"rp"===t[o].ty&&(d?(u=e[o]).closed=!0:(u=ShapeModifiers.getModifier(t[o].ty),e[o]=u,u.init(this,t,o,e),this.shapeModifiers.push(u),a=!1),g.push(u));this.addProcessedElement(t[o],o+1)}for(p=m.length,o=0;o<p;o+=1)m[o].closed=!0;for(p=g.length,o=0;o<p;o+=1)g[o].closed=!0},SVGShapeElement.prototype.renderInnerContent=function(){var t;this.renderModifiers();var e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].reset();for(this.renderShape(),t=0;t<e;t+=1)(this.stylesList[t]._mdf||this._isFirstFrame)&&(this.stylesList[t].msElem&&(this.stylesList[t].msElem.setAttribute("d",this.stylesList[t].d),this.stylesList[t].d="M0 0"+this.stylesList[t].d),this.stylesList[t].pElem.setAttribute("d",this.stylesList[t].d||"M0 0"))},SVGShapeElement.prototype.renderShape=function(){var t,e,i=this.animatedContents.length;for(t=0;t<i;t+=1)e=this.animatedContents[t],(this._isFirstFrame||e.element._isAnimated)&&!0!==e.data&&e.fn(e.data,e.element,this._isFirstFrame)},SVGShapeElement.prototype.destroy=function(){this.destroyBaseElement(),this.shapesData=null,this.itemsData=null},LetterProps.prototype.update=function(t,e,i,n,r,s){this._mdf.o=!1,this._mdf.sw=!1,this._mdf.sc=!1,this._mdf.fc=!1,this._mdf.m=!1,this._mdf.p=!1;var a=!1;return this.o!==t&&(this.o=t,this._mdf.o=!0,a=!0),this.sw!==e&&(this.sw=e,this._mdf.sw=!0,a=!0),this.sc!==i&&(this.sc=i,this._mdf.sc=!0,a=!0),this.fc!==n&&(this.fc=n,this._mdf.fc=!0,a=!0),this.m!==r&&(this.m=r,this._mdf.m=!0,a=!0),!s.length||this.p[0]===s[0]&&this.p[1]===s[1]&&this.p[4]===s[4]&&this.p[5]===s[5]&&this.p[12]===s[12]&&this.p[13]===s[13]||(this.p=s,this._mdf.p=!0,a=!0),a},TextProperty.prototype.defaultBoxWidth=[0,0],TextProperty.prototype.copyData=function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},TextProperty.prototype.setCurrentData=function(t){t.__complete||this.completeTextData(t),this.currentData=t,this.currentData.boxWidth=this.currentData.boxWidth||this.defaultBoxWidth,this._mdf=!0},TextProperty.prototype.searchProperty=function(){return this.searchKeyframes()},TextProperty.prototype.searchKeyframes=function(){return this.kf=this.data.d.k.length>1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(t){this.effectsSequence.push(t),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(t){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||t){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var e=this.currentData,i=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var n;this.lock=!0,this._mdf=!1;var r=this.effectsSequence.length,s=t||this.data.d.k[this.keysIndex].s;for(n=0;n<r;n+=1)s=i!==this.keysIndex?this.effectsSequence[n](s,s.t):this.effectsSequence[n](this.currentData,s.t);e!==s&&this.setCurrentData(s),this.v=this.currentData,this.pv=this.v,this.lock=!1,this.frameId=this.elem.globalData.frameId}}},TextProperty.prototype.getKeyframeValue=function(){for(var t=this.data.d.k,e=this.elem.comp.renderedFrame,i=0,n=t.length;i<=n-1&&!(i===n-1||t[i+1].t>e);)i+=1;return this.keysIndex!==i&&(this.keysIndex=i),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(t){for(var e,i,n=[],r=0,s=t.length,a=!1,o=!1,l="";r<s;)a=o,o=!1,e=t.charCodeAt(r),l=t.charAt(r),FontManager.isCombinedCharacter(e)?a=!0:e>=55296&&e<=56319?FontManager.isRegionalFlag(t,r)?l=t.substr(r,14):(i=t.charCodeAt(r+1))>=56320&&i<=57343&&(FontManager.isModifier(e,i)?(l=t.substr(r,2),a=!0):l=FontManager.isFlagEmoji(t.substr(r,4))?t.substr(r,4):t.substr(r,2)):e>56319?(i=t.charCodeAt(r+1),FontManager.isVariationSelector(e)&&(a=!0)):FontManager.isZeroWidthJoiner(e)&&(a=!0,o=!0),a?(n[n.length-1]+=l,a=!1):n.push(l),r+=l.length;return n},TextProperty.prototype.completeTextData=function(t){t.__complete=!0;var e,i,n,r,s,a,o,l=this.elem.globalData.fontManager,h=this.data,c=[],u=0,d=h.m.g,f=0,p=0,m=0,g=[],y=0,v=0,b=l.getFontByName(t.f),S=0,E=getFontProperties(b);t.fWeight=E.weight,t.fStyle=E.style,t.finalSize=t.s,t.finalText=this.buildFinalText(t.t),i=t.finalText.length,t.finalLineHeight=t.lh;var k,x=t.tr/1e3*t.finalSize;if(t.sz)for(var w,_,C=!0,T=t.sz[0],A=t.sz[1];C;){w=0,y=0,i=(_=this.buildFinalText(t.t)).length,x=t.tr/1e3*t.finalSize;var P=-1;for(e=0;e<i;e+=1)k=_[e].charCodeAt(0),n=!1," "===_[e]?P=e:13!==k&&3!==k||(y=0,n=!0,w+=t.finalLineHeight||1.2*t.finalSize),l.chars?(o=l.getCharData(_[e],b.fStyle,b.fFamily),S=n?0:o.w*t.finalSize/100):S=l.measureText(_[e],t.f,t.finalSize),y+S>T&&" "!==_[e]?(-1===P?i+=1:e=P,w+=t.finalLineHeight||1.2*t.finalSize,_.splice(e,P===e?1:0,"\r"),P=-1,y=0):(y+=S,y+=x);w+=b.ascent*t.finalSize/100,this.canResize&&t.finalSize>this.minimumFontSize&&A<w?(t.finalSize-=1,t.finalLineHeight=t.finalSize*t.lh/t.s):(t.finalText=_,i=t.finalText.length,C=!1)}y=-x,S=0;var D,M=0;for(e=0;e<i;e+=1)if(n=!1,13===(k=(D=t.finalText[e]).charCodeAt(0))||3===k?(M=0,g.push(y),v=y>v?y:v,y=-2*x,r="",n=!0,m+=1):r=D,l.chars?(o=l.getCharData(D,b.fStyle,l.getFontByName(t.f).fFamily),S=n?0:o.w*t.finalSize/100):S=l.measureText(r,t.f,t.finalSize)," "===D?M+=S+x:(y+=S+x+M,M=0),c.push({l:S,an:S,add:f,n:n,anIndexes:[],val:r,line:m,animatorJustifyOffset:0}),2==d){if(f+=S,""===r||" "===r||e===i-1){for(""!==r&&" "!==r||(f-=S);p<=e;)c[p].an=f,c[p].ind=u,c[p].extra=S,p+=1;u+=1,f=0}}else if(3==d){if(f+=S,""===r||e===i-1){for(""===r&&(f-=S);p<=e;)c[p].an=f,c[p].ind=u,c[p].extra=S,p+=1;f=0,u+=1}}else c[u].ind=u,c[u].extra=0,u+=1;if(t.l=c,v=y>v?y:v,g.push(y),t.sz)t.boxWidth=t.sz[0],t.justifyOffset=0;else switch(t.boxWidth=v,t.j){case 1:t.justifyOffset=-t.boxWidth;break;case 2:t.justifyOffset=-t.boxWidth/2;break;default:t.justifyOffset=0}t.lineWidths=g;var L,R,I,F,O=h.a;a=O.length;var B=[];for(s=0;s<a;s+=1){for((L=O[s]).a.sc&&(t.strokeColorAnim=!0),L.a.sw&&(t.strokeWidthAnim=!0),(L.a.fc||L.a.fh||L.a.fs||L.a.fb)&&(t.fillColorAnim=!0),F=0,I=L.s.b,e=0;e<i;e+=1)(R=c[e]).anIndexes[s]=F,(1==I&&""!==R.val||2==I&&""!==R.val&&" "!==R.val||3==I&&(R.n||" "==R.val||e==i-1)||4==I&&(R.n||e==i-1))&&(1===L.s.rn&&B.push(F),F+=1);h.a[s].s.totalChars=F;var N,V=-1;if(1===L.s.rn)for(e=0;e<i;e+=1)V!=(R=c[e]).anIndexes[s]&&(V=R.anIndexes[s],N=B.splice(Math.floor(Math.random()*B.length),1)[0]),R.anIndexes[s]=N}t.yOffset=t.finalLineHeight||1.2*t.finalSize,t.ls=t.ls||0,t.ascent=b.ascent*t.finalSize/100},TextProperty.prototype.updateDocumentData=function(t,e){e=void 0===e?this.keysIndex:e;var i=this.copyData({},this.data.d.k[e].s);i=this.copyData(i,t),this.data.d.k[e].s=i,this.recalculate(e),this.setCurrentData(i),this.elem.addDynamicProperty(this)},TextProperty.prototype.recalculate=function(t){var e=this.data.d.k[t].s;e.__complete=!1,this.keysIndex=0,this._isFirstFrame=!0,this.getValue(e)},TextProperty.prototype.canResizeFont=function(t){this.canResize=t,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)},TextProperty.prototype.setMinimumFontSize=function(t){this.minimumFontSize=Math.floor(t)||1,this.recalculate(this.keysIndex),this.elem.addDynamicProperty(this)};var TextSelectorProp=function(){var t=Math.max,e=Math.min,i=Math.floor;function n(t,e){this._currentTextLength=-1,this.k=!1,this.data=e,this.elem=t,this.comp=t.comp,this.finalS=0,this.finalE=0,this.initDynamicPropertyContainer(t),this.s=PropertyFactory.getProp(t,e.s||{k:0},0,0,this),this.e="e"in e?PropertyFactory.getProp(t,e.e,0,0,this):{v:100},this.o=PropertyFactory.getProp(t,e.o||{k:0},0,0,this),this.xe=PropertyFactory.getProp(t,e.xe||{k:0},0,0,this),this.ne=PropertyFactory.getProp(t,e.ne||{k:0},0,0,this),this.sm=PropertyFactory.getProp(t,e.sm||{k:100},0,0,this),this.a=PropertyFactory.getProp(t,e.a,0,.01,this),this.dynamicProperties.length||this.getValue()}return n.prototype={getMult:function(n){this._currentTextLength!==this.elem.textProperty.currentData.l.length&&this.getValue();var r=0,s=0,a=1,o=1;this.ne.v>0?r=this.ne.v/100:s=-this.ne.v/100,this.xe.v>0?a=1-this.xe.v/100:o=1+this.xe.v/100;var l=BezierFactory.getBezierEasing(r,s,a,o).get,h=0,c=this.finalS,u=this.finalE,d=this.data.sh;if(2===d)h=l(h=u===c?n>=u?1:0:t(0,e(.5/(u-c)+(n-c)/(u-c),1)));else if(3===d)h=l(h=u===c?n>=u?0:1:1-t(0,e(.5/(u-c)+(n-c)/(u-c),1)));else if(4===d)u===c?h=0:(h=t(0,e(.5/(u-c)+(n-c)/(u-c),1)))<.5?h*=2:h=1-2*(h-.5),h=l(h);else if(5===d){if(u===c)h=0;else{var f=u-c,p=-f/2+(n=e(t(0,n+.5-c),u-c)),m=f/2;h=Math.sqrt(1-p*p/(m*m))}h=l(h)}else 6===d?(u===c?h=0:(n=e(t(0,n+.5-c),u-c),h=(1+Math.cos(Math.PI+2*Math.PI*n/(u-c)))/2),h=l(h)):(n>=i(c)&&(h=t(0,e(n-c<0?e(u,1)-(c-n):u-n,1))),h=l(h));if(100!==this.sm.v){var g=.01*this.sm.v;0===g&&(g=1e-8);var y=.5-.5*g;h<y?h=0:(h=(h-y)/g)>1&&(h=1)}return h*this.a.v},getValue:function(t){this.iterateDynamicProperties(),this._mdf=t||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,t&&2===this.data.r&&(this.e.v=this._currentTextLength);var e=2===this.data.r?1:100/this.data.totalChars,i=this.o.v/e,n=this.s.v/e+i,r=this.e.v/e+i;if(n>r){var s=n;n=r,r=s}this.finalS=n,this.finalE=r}},extendPrototype([DynamicPropertyContainer],n),{getTextSelectorProp:function(t,e,i){return new n(t,e,i)}}}();function TextAnimatorDataProperty(t,e,i){var n={propType:!1},r=PropertyFactory.getProp,s=e.a;this.a={r:s.r?r(t,s.r,0,degToRads,i):n,rx:s.rx?r(t,s.rx,0,degToRads,i):n,ry:s.ry?r(t,s.ry,0,degToRads,i):n,sk:s.sk?r(t,s.sk,0,degToRads,i):n,sa:s.sa?r(t,s.sa,0,degToRads,i):n,s:s.s?r(t,s.s,1,.01,i):n,a:s.a?r(t,s.a,1,0,i):n,o:s.o?r(t,s.o,0,.01,i):n,p:s.p?r(t,s.p,1,0,i):n,sw:s.sw?r(t,s.sw,0,0,i):n,sc:s.sc?r(t,s.sc,1,0,i):n,fc:s.fc?r(t,s.fc,1,0,i):n,fh:s.fh?r(t,s.fh,0,0,i):n,fs:s.fs?r(t,s.fs,0,.01,i):n,fb:s.fb?r(t,s.fb,0,.01,i):n,t:s.t?r(t,s.t,0,0,i):n},this.s=TextSelectorProp.getTextSelectorProp(t,e.s,i),this.s.t=e.s.t}function TextAnimatorProperty(t,e,i){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=t,this._renderType=e,this._elem=i,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(i)}function ITextElement(){}TextAnimatorProperty.prototype.searchProperties=function(){var t,e,i=this._textData.a.length,n=PropertyFactory.getProp;for(t=0;t<i;t+=1)e=this._textData.a[t],this._animatorsData[t]=new TextAnimatorDataProperty(this._elem,e,this);this._textData.p&&"m"in this._textData.p?(this._pathData={a:n(this._elem,this._textData.p.a,0,0,this),f:n(this._elem,this._textData.p.f,0,0,this),l:n(this._elem,this._textData.p.l,0,0,this),r:n(this._elem,this._textData.p.r,0,0,this),p:n(this._elem,this._textData.p.p,0,0,this),m:this._elem.maskManager.getMaskProperty(this._textData.p.m)},this._hasMaskedPath=!0):this._hasMaskedPath=!1,this._moreOptions.alignment=n(this._elem,this._textData.m.a,1,0,this)},TextAnimatorProperty.prototype.getMeasures=function(t,e){if(this.lettersChangedFlag=e,this._mdf||this._isFirstFrame||e||this._hasMaskedPath&&this._pathData.m._mdf){this._isFirstFrame=!1;var i,n,r,s,a,o,l,h,c,u,d,f,p,m,g,y,v,b,S,E=this._moreOptions.alignment.v,k=this._animatorsData,x=this._textData,w=this.mHelper,_=this._renderType,C=this.renderedLetters.length,T=t.l;if(this._hasMaskedPath){if(S=this._pathData.m,!this._pathData.n||this._pathData._mdf){var A,P=S.v;for(this._pathData.r.v&&(P=P.reverse()),a={tLength:0,segments:[]},s=P._length-1,y=0,r=0;r<s;r+=1)A=bez.buildBezierData(P.v[r],P.v[r+1],[P.o[r][0]-P.v[r][0],P.o[r][1]-P.v[r][1]],[P.i[r+1][0]-P.v[r+1][0],P.i[r+1][1]-P.v[r+1][1]]),a.tLength+=A.segmentLength,a.segments.push(A),y+=A.segmentLength;r=s,S.v.c&&(A=bez.buildBezierData(P.v[r],P.v[0],[P.o[r][0]-P.v[r][0],P.o[r][1]-P.v[r][1]],[P.i[0][0]-P.v[0][0],P.i[0][1]-P.v[0][1]]),a.tLength+=A.segmentLength,a.segments.push(A),y+=A.segmentLength),this._pathData.pi=a}if(a=this._pathData.pi,o=this._pathData.f.v,d=0,u=1,h=0,c=!0,m=a.segments,o<0&&S.v.c)for(a.tLength<Math.abs(o)&&(o=-Math.abs(o)%a.tLength),u=(p=m[d=m.length-1].points).length-1;o<0;)o+=p[u].partialLength,(u-=1)<0&&(u=(p=m[d-=1].points).length-1);f=(p=m[d].points)[u-1],g=(l=p[u]).partialLength}s=T.length,i=0,n=0;var D,M,L,R,I,F=1.2*t.finalSize*.714,O=!0;L=k.length;var B,N,V,z,H,q,U,G,j,W,$,Y,K=-1,X=o,J=d,Q=u,Z=-1,tt="",et=this.defaultPropsArray;if(2===t.j||1===t.j){var it=0,nt=0,rt=2===t.j?-.5:-1,st=0,at=!0;for(r=0;r<s;r+=1)if(T[r].n){for(it&&(it+=nt);st<r;)T[st].animatorJustifyOffset=it,st+=1;it=0,at=!0}else{for(M=0;M<L;M+=1)(D=k[M].a).t.propType&&(at&&2===t.j&&(nt+=D.t.v*rt),(I=k[M].s.getMult(T[r].anIndexes[M],x.a[M].s.totalChars)).length?it+=D.t.v*I[0]*rt:it+=D.t.v*I*rt);at=!1}for(it&&(it+=nt);st<r;)T[st].animatorJustifyOffset=it,st+=1}for(r=0;r<s;r+=1){if(w.reset(),z=1,T[r].n)i=0,n+=t.yOffset,n+=O?1:0,o=X,O=!1,this._hasMaskedPath&&(u=Q,f=(p=m[d=J].points)[u-1],g=(l=p[u]).partialLength,h=0),tt="",$="",j="",Y="",et=this.defaultPropsArray;else{if(this._hasMaskedPath){if(Z!==T[r].line){switch(t.j){case 1:o+=y-t.lineWidths[T[r].line];break;case 2:o+=(y-t.lineWidths[T[r].line])/2}Z=T[r].line}K!==T[r].ind&&(T[K]&&(o+=T[K].extra),o+=T[r].an/2,K=T[r].ind),o+=E[0]*T[r].an*.005;var ot=0;for(M=0;M<L;M+=1)(D=k[M].a).p.propType&&((I=k[M].s.getMult(T[r].anIndexes[M],x.a[M].s.totalChars)).length?ot+=D.p.v[0]*I[0]:ot+=D.p.v[0]*I),D.a.propType&&((I=k[M].s.getMult(T[r].anIndexes[M],x.a[M].s.totalChars)).length?ot+=D.a.v[0]*I[0]:ot+=D.a.v[0]*I);for(c=!0,this._pathData.a.v&&(o=.5*T[0].an+(y-this._pathData.f.v-.5*T[0].an-.5*T[T.length-1].an)*K/(s-1),o+=this._pathData.f.v);c;)h+g>=o+ot||!p?(v=(o+ot-h)/l.partialLength,N=f.point[0]+(l.point[0]-f.point[0])*v,V=f.point[1]+(l.point[1]-f.point[1])*v,w.translate(-E[0]*T[r].an*.005,-E[1]*F*.01),c=!1):p&&(h+=l.partialLength,(u+=1)>=p.length&&(u=0,m[d+=1]?p=m[d].points:S.v.c?(u=0,p=m[d=0].points):(h-=l.partialLength,p=null)),p&&(f=l,g=(l=p[u]).partialLength));B=T[r].an/2-T[r].add,w.translate(-B,0,0)}else B=T[r].an/2-T[r].add,w.translate(-B,0,0),w.translate(-E[0]*T[r].an*.005,-E[1]*F*.01,0);for(M=0;M<L;M+=1)(D=k[M].a).t.propType&&(I=k[M].s.getMult(T[r].anIndexes[M],x.a[M].s.totalChars),0===i&&0===t.j||(this._hasMaskedPath?I.length?o+=D.t.v*I[0]:o+=D.t.v*I:I.length?i+=D.t.v*I[0]:i+=D.t.v*I));for(t.strokeWidthAnim&&(q=t.sw||0),t.strokeColorAnim&&(H=t.sc?[t.sc[0],t.sc[1],t.sc[2]]:[0,0,0]),t.fillColorAnim&&t.fc&&(U=[t.fc[0],t.fc[1],t.fc[2]]),M=0;M<L;M+=1)(D=k[M].a).a.propType&&((I=k[M].s.getMult(T[r].anIndexes[M],x.a[M].s.totalChars)).length?w.translate(-D.a.v[0]*I[0],-D.a.v[1]*I[1],D.a.v[2]*I[2]):w.translate(-D.a.v[0]*I,-D.a.v[1]*I,D.a.v[2]*I));for(M=0;M<L;M+=1)(D=k[M].a).s.propType&&((I=k[M].s.getMult(T[r].anIndexes[M],x.a[M].s.totalChars)).length?w.scale(1+(D.s.v[0]-1)*I[0],1+(D.s.v[1]-1)*I[1],1):w.scale(1+(D.s.v[0]-1)*I,1+(D.s.v[1]-1)*I,1));for(M=0;M<L;M+=1){if(D=k[M].a,I=k[M].s.getMult(T[r].anIndexes[M],x.a[M].s.totalChars),D.sk.propType&&(I.length?w.skewFromAxis(-D.sk.v*I[0],D.sa.v*I[1]):w.skewFromAxis(-D.sk.v*I,D.sa.v*I)),D.r.propType&&(I.length?w.rotateZ(-D.r.v*I[2]):w.rotateZ(-D.r.v*I)),D.ry.propType&&(I.length?w.rotateY(D.ry.v*I[1]):w.rotateY(D.ry.v*I)),D.rx.propType&&(I.length?w.rotateX(D.rx.v*I[0]):w.rotateX(D.rx.v*I)),D.o.propType&&(I.length?z+=(D.o.v*I[0]-z)*I[0]:z+=(D.o.v*I-z)*I),t.strokeWidthAnim&&D.sw.propType&&(I.length?q+=D.sw.v*I[0]:q+=D.sw.v*I),t.strokeColorAnim&&D.sc.propType)for(G=0;G<3;G+=1)I.length?H[G]+=(D.sc.v[G]-H[G])*I[0]:H[G]+=(D.sc.v[G]-H[G])*I;if(t.fillColorAnim&&t.fc){if(D.fc.propType)for(G=0;G<3;G+=1)I.length?U[G]+=(D.fc.v[G]-U[G])*I[0]:U[G]+=(D.fc.v[G]-U[G])*I;D.fh.propType&&(U=I.length?addHueToRGB(U,D.fh.v*I[0]):addHueToRGB(U,D.fh.v*I)),D.fs.propType&&(U=I.length?addSaturationToRGB(U,D.fs.v*I[0]):addSaturationToRGB(U,D.fs.v*I)),D.fb.propType&&(U=I.length?addBrightnessToRGB(U,D.fb.v*I[0]):addBrightnessToRGB(U,D.fb.v*I))}}for(M=0;M<L;M+=1)(D=k[M].a).p.propType&&(I=k[M].s.getMult(T[r].anIndexes[M],x.a[M].s.totalChars),this._hasMaskedPath?I.length?w.translate(0,D.p.v[1]*I[0],-D.p.v[2]*I[1]):w.translate(0,D.p.v[1]*I,-D.p.v[2]*I):I.length?w.translate(D.p.v[0]*I[0],D.p.v[1]*I[1],-D.p.v[2]*I[2]):w.translate(D.p.v[0]*I,D.p.v[1]*I,-D.p.v[2]*I));if(t.strokeWidthAnim&&(j=q<0?0:q),t.strokeColorAnim&&(W="rgb("+Math.round(255*H[0])+","+Math.round(255*H[1])+","+Math.round(255*H[2])+")"),t.fillColorAnim&&t.fc&&($="rgb("+Math.round(255*U[0])+","+Math.round(255*U[1])+","+Math.round(255*U[2])+")"),this._hasMaskedPath){if(w.translate(0,-t.ls),w.translate(0,E[1]*F*.01+n,0),this._pathData.p.v){b=(l.point[1]-f.point[1])/(l.point[0]-f.point[0]);var lt=180*Math.atan(b)/Math.PI;l.point[0]<f.point[0]&&(lt+=180),w.rotate(-lt*Math.PI/180)}w.translate(N,V,0),o-=E[0]*T[r].an*.005,T[r+1]&&K!==T[r+1].ind&&(o+=T[r].an/2,o+=.001*t.tr*t.finalSize)}else{switch(w.translate(i,n,0),t.ps&&w.translate(t.ps[0],t.ps[1]+t.ascent,0),t.j){case 1:w.translate(T[r].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[T[r].line]),0,0);break;case 2:w.translate(T[r].animatorJustifyOffset+t.justifyOffset+(t.boxWidth-t.lineWidths[T[r].line])/2,0,0)}w.translate(0,-t.ls),w.translate(B,0,0),w.translate(E[0]*T[r].an*.005,E[1]*F*.01,0),i+=T[r].l+.001*t.tr*t.finalSize}"html"===_?tt=w.toCSS():"svg"===_?tt=w.to2dCSS():et=[w.props[0],w.props[1],w.props[2],w.props[3],w.props[4],w.props[5],w.props[6],w.props[7],w.props[8],w.props[9],w.props[10],w.props[11],w.props[12],w.props[13],w.props[14],w.props[15]],Y=z}C<=r?(R=new LetterProps(Y,j,W,$,tt,et),this.renderedLetters.push(R),C+=1,this.lettersChangedFlag=!0):(R=this.renderedLetters[r],this.lettersChangedFlag=R.update(Y,j,W,$,tt,et)||this.lettersChangedFlag)}}},TextAnimatorProperty.prototype.getValue=function(){this._elem.globalData.frameId!==this._frameId&&(this._frameId=this._elem.globalData.frameId,this.iterateDynamicProperties())},TextAnimatorProperty.prototype.mHelper=new Matrix,TextAnimatorProperty.prototype.defaultPropsArray=[],extendPrototype([DynamicPropertyContainer],TextAnimatorProperty),ITextElement.prototype.initElement=function(t,e,i){this.lettersChangedFlag=!0,this.initFrame(),this.initBaseData(t,e,i),this.textProperty=new TextProperty(this,t.t,this.dynamicProperties),this.textAnimator=new TextAnimatorProperty(t.t,this.renderType,this),this.initTransform(t,e,i),this.initHierarchy(),this.initRenderable(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),this.createContent(),this.hide(),this.textAnimator.searchProperties(this.dynamicProperties)},ITextElement.prototype.prepareFrame=function(t){this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange)},ITextElement.prototype.createPathShape=function(t,e){var i,n,r=e.length,s="";for(i=0;i<r;i+=1)"sh"===e[i].ty&&(n=e[i].ks.k,s+=buildShapeString(n,n.i.length,!0,t));return s},ITextElement.prototype.updateDocumentData=function(t,e){this.textProperty.updateDocumentData(t,e)},ITextElement.prototype.canResizeFont=function(t){this.textProperty.canResizeFont(t)},ITextElement.prototype.setMinimumFontSize=function(t){this.textProperty.setMinimumFontSize(t)},ITextElement.prototype.applyTextPropertiesToMatrix=function(t,e,i,n,r){switch(t.ps&&e.translate(t.ps[0],t.ps[1]+t.ascent,0),e.translate(0,-t.ls,0),t.j){case 1:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[i]),0,0);break;case 2:e.translate(t.justifyOffset+(t.boxWidth-t.lineWidths[i])/2,0,0)}e.translate(n,r,0)},ITextElement.prototype.buildColor=function(t){return"rgb("+Math.round(255*t[0])+","+Math.round(255*t[1])+","+Math.round(255*t[2])+")"},ITextElement.prototype.emptyProp=new LetterProps,ITextElement.prototype.destroy=function(){},ITextElement.prototype.validateText=function(){(this.textProperty._mdf||this.textProperty._isFirstFrame)&&(this.buildNewText(),this.textProperty._isFirstFrame=!1,this.textProperty._mdf=!1)};var emptyShapeData={shapes:[]};function SVGTextLottieElement(t,e,i){this.textSpans=[],this.renderType="svg",this.initElement(t,e,i)}function ISolidElement(t,e,i){this.initElement(t,e,i)}function NullElement(t,e,i){this.initFrame(),this.initBaseData(t,e,i),this.initFrame(),this.initTransform(t,e,i),this.initHierarchy()}function SVGRendererBase(){}function ICompElement(){}function SVGCompElement(t,e,i){this.layers=t.layers,this.supports3d=!0,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(t,e,i),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function SVGRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.svgElement=createNS("svg");var i="";if(e&&e.title){var n=createNS("title"),r=createElementID();n.setAttribute("id",r),n.textContent=e.title,this.svgElement.appendChild(n),i+=r}if(e&&e.description){var s=createNS("desc"),a=createElementID();s.setAttribute("id",a),s.textContent=e.description,this.svgElement.appendChild(s),i+=" "+a}i&&this.svgElement.setAttribute("aria-labelledby",i);var o=createNS("defs");this.svgElement.appendChild(o);var l=createNS("g");this.svgElement.appendChild(l),this.layerElement=l,this.renderConfig={preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",progressiveLoad:e&&e.progressiveLoad||!1,hideOnTransparent:!(e&&!1===e.hideOnTransparent),viewBoxOnly:e&&e.viewBoxOnly||!1,viewBoxSize:e&&e.viewBoxSize||!1,className:e&&e.className||"",id:e&&e.id||"",focusable:e&&e.focusable,filterSize:{width:e&&e.filterSize&&e.filterSize.width||"100%",height:e&&e.filterSize&&e.filterSize.height||"100%",x:e&&e.filterSize&&e.filterSize.x||"0%",y:e&&e.filterSize&&e.filterSize.y||"0%"},width:e&&e.width,height:e&&e.height,runExpressions:!e||void 0===e.runExpressions||e.runExpressions},this.globalData={_mdf:!1,frameNum:-1,defs:o,renderConfig:this.renderConfig},this.elements=[],this.pendingElements=[],this.destroyed=!1,this.rendererType="svg"}function ShapeTransformManager(){this.sequences={},this.sequenceList=[],this.transform_key_count=0}extendPrototype([BaseElement,TransformElement,SVGBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],SVGTextLottieElement),SVGTextLottieElement.prototype.createContent=function(){this.data.singleShape&&!this.globalData.fontManager.chars&&(this.textContainer=createNS("text"))},SVGTextLottieElement.prototype.buildTextContents=function(t){for(var e=0,i=t.length,n=[],r="";e<i;)t[e]===String.fromCharCode(13)||t[e]===String.fromCharCode(3)?(n.push(r),r=""):r+=t[e],e+=1;return n.push(r),n},SVGTextLottieElement.prototype.buildShapeData=function(t,e){if(t.shapes&&t.shapes.length){var i=t.shapes[0];if(i.it){var n=i.it[i.it.length-1];n.s&&(n.s.k[0]=e,n.s.k[1]=e)}}return t},SVGTextLottieElement.prototype.buildNewText=function(){var t,e;this.addDynamicProperty(this);var i=this.textProperty.currentData;this.renderedLetters=createSizedArray(i?i.l.length:0),i.fc?this.layerElement.setAttribute("fill",this.buildColor(i.fc)):this.layerElement.setAttribute("fill","rgba(0,0,0,0)"),i.sc&&(this.layerElement.setAttribute("stroke",this.buildColor(i.sc)),this.layerElement.setAttribute("stroke-width",i.sw)),this.layerElement.setAttribute("font-size",i.finalSize);var n=this.globalData.fontManager.getFontByName(i.f);if(n.fClass)this.layerElement.setAttribute("class",n.fClass);else{this.layerElement.setAttribute("font-family",n.fFamily);var r=i.fWeight,s=i.fStyle;this.layerElement.setAttribute("font-style",s),this.layerElement.setAttribute("font-weight",r)}this.layerElement.setAttribute("aria-label",i.t);var a,o=i.l||[],l=!!this.globalData.fontManager.chars;e=o.length;var h=this.mHelper,c=this.data.singleShape,u=0,d=0,f=!0,p=.001*i.tr*i.finalSize;if(!c||l||i.sz){var m,g=this.textSpans.length;for(t=0;t<e;t+=1){if(this.textSpans[t]||(this.textSpans[t]={span:null,childSpan:null,glyph:null}),!l||!c||0===t){if(a=g>t?this.textSpans[t].span:createNS(l?"g":"text"),g<=t){if(a.setAttribute("stroke-linecap","butt"),a.setAttribute("stroke-linejoin","round"),a.setAttribute("stroke-miterlimit","4"),this.textSpans[t].span=a,l){var y=createNS("g");a.appendChild(y),this.textSpans[t].childSpan=y}this.textSpans[t].span=a,this.layerElement.appendChild(a)}a.style.display="inherit"}if(h.reset(),c&&(o[t].n&&(u=-p,d+=i.yOffset,d+=f?1:0,f=!1),this.applyTextPropertiesToMatrix(i,h,o[t].line,u,d),u+=o[t].l||0,u+=p),l){var v;if(1===(m=this.globalData.fontManager.getCharData(i.finalText[t],n.fStyle,this.globalData.fontManager.getFontByName(i.f).fFamily)).t)v=new SVGCompElement(m.data,this.globalData,this);else{var b=emptyShapeData;m.data&&m.data.shapes&&(b=this.buildShapeData(m.data,i.finalSize)),v=new SVGShapeElement(b,this.globalData,this)}if(this.textSpans[t].glyph){var S=this.textSpans[t].glyph;this.textSpans[t].childSpan.removeChild(S.layerElement),S.destroy()}this.textSpans[t].glyph=v,v._debug=!0,v.prepareFrame(0),v.renderFrame(),this.textSpans[t].childSpan.appendChild(v.layerElement),1===m.t&&this.textSpans[t].childSpan.setAttribute("transform","scale("+i.finalSize/100+","+i.finalSize/100+")")}else c&&a.setAttribute("transform","translate("+h.props[12]+","+h.props[13]+")"),a.textContent=o[t].val,a.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}c&&a&&a.setAttribute("d","")}else{var E=this.textContainer,k="start";switch(i.j){case 1:k="end";break;case 2:k="middle";break;default:k="start"}E.setAttribute("text-anchor",k),E.setAttribute("letter-spacing",p);var x=this.buildTextContents(i.finalText);for(e=x.length,d=i.ps?i.ps[1]+i.ascent:0,t=0;t<e;t+=1)(a=this.textSpans[t].span||createNS("tspan")).textContent=x[t],a.setAttribute("x",0),a.setAttribute("y",d),a.style.display="inherit",E.appendChild(a),this.textSpans[t]||(this.textSpans[t]={span:null,glyph:null}),this.textSpans[t].span=a,d+=i.finalLineHeight;this.layerElement.appendChild(E)}for(;t<this.textSpans.length;)this.textSpans[t].span.style.display="none",t+=1;this._sizeChanged=!0},SVGTextLottieElement.prototype.sourceRectAtTime=function(){if(this.prepareFrame(this.comp.renderedFrame-this.data.st),this.renderInnerContent(),this._sizeChanged){this._sizeChanged=!1;var t=this.layerElement.getBBox();this.bbox={top:t.y,left:t.x,width:t.width,height:t.height}}return this.bbox},SVGTextLottieElement.prototype.getValue=function(){var t,e,i=this.textSpans.length;for(this.renderedFrame=this.comp.renderedFrame,t=0;t<i;t+=1)(e=this.textSpans[t].glyph)&&(e.prepareFrame(this.comp.renderedFrame-this.data.st),e._mdf&&(this._mdf=!0))},SVGTextLottieElement.prototype.renderInnerContent=function(){if(this.validateText(),(!this.data.singleShape||this._mdf)&&(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag)){var t,e;this._sizeChanged=!0;var i,n,r,s=this.textAnimator.renderedLetters,a=this.textProperty.currentData.l;for(e=a.length,t=0;t<e;t+=1)a[t].n||(i=s[t],n=this.textSpans[t].span,(r=this.textSpans[t].glyph)&&r.renderFrame(),i._mdf.m&&n.setAttribute("transform",i.m),i._mdf.o&&n.setAttribute("opacity",i.o),i._mdf.sw&&n.setAttribute("stroke-width",i.sw),i._mdf.sc&&n.setAttribute("stroke",i.sc),i._mdf.fc&&n.setAttribute("fill",i.fc))}},extendPrototype([IImageElement],ISolidElement),ISolidElement.prototype.createContent=function(){var t=createNS("rect");t.setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.layerElement.appendChild(t)},NullElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},NullElement.prototype.renderFrame=function(){},NullElement.prototype.getBaseElement=function(){return null},NullElement.prototype.destroy=function(){},NullElement.prototype.sourceRectAtTime=function(){},NullElement.prototype.hide=function(){},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement],NullElement),extendPrototype([BaseRenderer],SVGRendererBase),SVGRendererBase.prototype.createNull=function(t){return new NullElement(t,this.globalData,this)},SVGRendererBase.prototype.createShape=function(t){return new SVGShapeElement(t,this.globalData,this)},SVGRendererBase.prototype.createText=function(t){return new SVGTextLottieElement(t,this.globalData,this)},SVGRendererBase.prototype.createImage=function(t){return new IImageElement(t,this.globalData,this)},SVGRendererBase.prototype.createSolid=function(t){return new ISolidElement(t,this.globalData,this)},SVGRendererBase.prototype.configAnimation=function(t){this.svgElement.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.svgElement.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),this.renderConfig.viewBoxSize?this.svgElement.setAttribute("viewBox",this.renderConfig.viewBoxSize):this.svgElement.setAttribute("viewBox","0 0 "+t.w+" "+t.h),this.renderConfig.viewBoxOnly||(this.svgElement.setAttribute("width",t.w),this.svgElement.setAttribute("height",t.h),this.svgElement.style.width="100%",this.svgElement.style.height="100%",this.svgElement.style.transform="translate3d(0,
20,0)",this.svgElement.style.contentVisibility=this.renderConfig.contentVisibility),this.renderConfig.width&&this.svgElement.setAttribute("width",this.renderConfig.width),this.renderConfig.height&&this.svgElement.setAttribute("height",this.renderConfig.height),this.renderConfig.className&&this.svgElement.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.svgElement.setAttribute("id",this.renderConfig.id),void 0!==this.renderConfig.focusable&&this.svgElement.setAttribute("focusable",this.renderConfig.focusable),this.svgElement.setAttribute("preserveAspectRatio",this.renderConfig.preserveAspectRatio),this.animationItem.wrapper.appendChild(this.svgElement);var e=this.globalData.defs;this.setupGlobalData(t,e),this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.data=t;var i=createNS("clipPath"),n=createNS("rect");n.setAttribute("width",t.w),n.setAttribute("height",t.h),n.setAttribute("x",0),n.setAttribute("y",0);var r=createElementID();i.setAttribute("id",r),i.appendChild(n),this.layerElement.setAttribute("clip-path","url("+getLocationHref()+"#"+r+")"),e.appendChild(i),this.layers=t.layers,this.elements=createSizedArray(t.layers.length)},SVGRendererBase.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.layerElement=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},SVGRendererBase.prototype.updateContainerSize=function(){},SVGRendererBase.prototype.findIndexByInd=function(t){var e=0,i=this.layers.length;for(e=0;e<i;e+=1)if(this.layers[e].ind===t)return e;return-1},SVGRendererBase.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){e[t]=!0;var i=this.createItem(this.layers[t]);if(e[t]=i,getExpressionsPlugin()&&(0===this.layers[t].ty&&this.globalData.projectInterface.registerComposition(i),i.initExpressions()),this.appendElementInPos(i,t),this.layers[t].tt){var n="tp"in this.layers[t]?this.findIndexByInd(this.layers[t].tp):t-1;if(-1===n)return;if(this.elements[n]&&!0!==this.elements[n]){var r=e[n].getMatte(this.layers[t].tt);i.setMatte(r)}else this.buildItem(n),this.addPendingElement(i)}}},SVGRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;){var t=this.pendingElements.pop();if(t.checkParenting(),t.data.tt)for(var e=0,i=this.elements.length;e<i;){if(this.elements[e]===t){var n="tp"in t.data?this.findIndexByInd(t.data.tp):e-1,r=this.elements[n].getMatte(this.layers[e].tt);t.setMatte(r);break}e+=1}}},SVGRendererBase.prototype.renderFrame=function(t){if(this.renderedFrame!==t&&!this.destroyed){var e;null===t?t=this.renderedFrame:this.renderedFrame=t,this.globalData.frameNum=t,this.globalData.frameId+=1,this.globalData.projectInterface.currentFrame=t,this.globalData._mdf=!1;var i=this.layers.length;for(this.completeLayers||this.checkLayers(t),e=i-1;e>=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].prepareFrame(t-this.layers[e].st);if(this.globalData._mdf)for(e=0;e<i;e+=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()}},SVGRendererBase.prototype.appendElementInPos=function(t,e){var i=t.getBaseElement();if(i){for(var n,r=0;r<e;)this.elements[r]&&!0!==this.elements[r]&&this.elements[r].getBaseElement()&&(n=this.elements[r].getBaseElement()),r+=1;n?this.layerElement.insertBefore(i,n):this.layerElement.appendChild(i)}},SVGRendererBase.prototype.hide=function(){this.layerElement.style.display="none"},SVGRendererBase.prototype.show=function(){this.layerElement.style.display="block"},extendPrototype([BaseElement,TransformElement,HierarchyElement,FrameElement,RenderableDOMElement],ICompElement),ICompElement.prototype.initElement=function(t,e,i){this.initFrame(),this.initBaseData(t,e,i),this.initTransform(t,e,i),this.initRenderable(),this.initHierarchy(),this.initRendererElement(),this.createContainerElements(),this.createRenderableComponents(),!this.data.xt&&e.progressiveLoad||this.buildAllItems(),this.hide()},ICompElement.prototype.prepareFrame=function(t){if(this._mdf=!1,this.prepareRenderableFrame(t),this.prepareProperties(t,this.isInRange),this.isInRange||this.data.xt){if(this.tm._placeholder)this.renderedFrame=t/this.data.sr;else{var e=this.tm.v;e===this.data.op&&(e=this.data.op-1),this.renderedFrame=e}var i,n=this.elements.length;for(this.completeLayers||this.checkLayers(this.renderedFrame),i=n-1;i>=0;i-=1)(this.completeLayers||this.elements[i])&&(this.elements[i].prepareFrame(this.renderedFrame-this.layers[i].st),this.elements[i]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},ICompElement.prototype.setElements=function(t){this.elements=t},ICompElement.prototype.getElements=function(){return this.elements},ICompElement.prototype.destroyElements=function(){var t,e=this.layers.length;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy()},ICompElement.prototype.destroy=function(){this.destroyElements(),this.destroyBaseElement()},extendPrototype([SVGRendererBase,ICompElement,SVGBaseElement],SVGCompElement),SVGCompElement.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)},extendPrototype([SVGRendererBase],SVGRenderer),SVGRenderer.prototype.createComp=function(t){return new SVGCompElement(t,this.globalData,this)},ShapeTransformManager.prototype={addTransformSequence:function(t){var e,i=t.length,n="_";for(e=0;e<i;e+=1)n+=t[e].transform.key+"_";var r=this.sequences[n];return r||(r={transforms:[].concat(t),finalTransform:new Matrix,_mdf:!1},this.sequences[n]=r,this.sequenceList.push(r)),r},processSequence:function(t,e){for(var i=0,n=t.transforms.length,r=e;i<n&&!e;){if(t.transforms[i].transform.mProps._mdf){r=!0;break}i+=1}if(r)for(t.finalTransform.reset(),i=n-1;i>=0;i-=1)t.finalTransform.multiply(t.transforms[i].transform.mProps.v);t._mdf=r},processSequences:function(t){var e,i=this.sequenceList.length;for(e=0;e<i;e+=1)this.processSequence(this.sequenceList[e],t)},getNewKey:function(){return this.transform_key_count+=1,"_"+this.transform_key_count}};var lumaLoader=function(){var t="__lottie_element_luma_buffer",e=null,i=null,n=null;function r(){var r,s,a;e||(r=createNS("svg"),s=createNS("filter"),a=createNS("feColorMatrix"),s.setAttribute("id",t),a.setAttribute("type","matrix"),a.setAttribute("color-interpolation-filters","sRGB"),a.setAttribute("values","0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0, 0.3, 0.3, 0.3, 0, 0"),s.appendChild(a),r.appendChild(s),r.setAttribute("id",t+"_svg"),featureSupport.svgLumaHidden&&(r.style.display="none"),n=r,document.body.appendChild(n),e=createTag("canvas"),(i=e.getContext("2d")).filter="url
2(#"+t+")",i.fillStyle="rgba(0,0,0,0)",i.fillRect(0,0,1,1))}return{load:r,get:function(n){return e||r(),e.width=n.width,e.height=n.height,i.filter="url(#"+t+")",e}}};function createCanvas(t,e){if(featureSupport.offscreenCanvas)return new OffscreenCanvas(t,e);var i=createTag("canvas");return i.width=t,i.height=e,i}var assetLoader={loadLumaCanvas:lumaLoader.load,getLumaCanvas:lumaLoader.get,createCanvas:createCanvas},registeredEffects={};function CVEffects(t){var e,i,n=t.data.ef?t.data.ef.length:0;for(this.filters=[],e=0;e<n;e+=1){i=null;var r=t.data.ef[e].ty;registeredEffects[r]&&(i=new(0,registeredEffects[r].effect)(t.effectsManager.effectElements[e],t)),i&&this.filters.push(i)}this.filters.length&&t.addRenderableComponent(this)}function registerEffect(t,e){registeredEffects[t]={effect:e}}function CVMaskElement(t,e){var i;this.data=t,this.element=e,this.masksProperties=this.data.masksProperties||[],this.viewData=createSizedArray(this.masksProperties.length);var n=this.masksProperties.length,r=!1;for(i=0;i<n;i+=1)"n"!==this.masksProperties[i].mode&&(r=!0),this.viewData[i]=ShapePropertyFactory.getShapeProp(this.element,this.masksProperties[i],3);this.hasMasks=r,r&&this.element.addRenderableComponent(this)}function CVBaseElement(){}CVEffects.prototype.renderFrame=function(t){var e,i=this.filters.length;for(e=0;e<i;e+=1)this.filters[e].renderFrame(t)},CVEffects.prototype.getEffects=function(t){var e,i=this.filters.length,n=[];for(e=0;e<i;e+=1)this.filters[e].type===t&&n.push(this.filters[e]);return n},CVMaskElement.prototype.renderFrame=function(){if(this.hasMasks){var t,e,i,n,r=this.element.finalTransform.mat,s=this.element.canvasContext,a=this.masksProperties.length;for(s.beginPath(),t=0;t<a;t+=1)if("n"!==this.masksProperties[t].mode){var o;this.masksProperties[t].inv&&(s.moveTo(0,0),s.lineTo(this.element.globalData.compSize.w,0),s.lineTo(this.element.globalData.compSize.w,this.element.globalData.compSize.h),s.lineTo(0,this.element.globalData.compSize.h),s.lineTo(0,0)),n=this.viewData[t].v,e=r.applyToPointArray(n.v[0][0],n.v[0][1],0),s.moveTo(e[0],e[1]);var l=n._length;for(o=1;o<l;o+=1)i=r.applyToTriplePoints(n.o[o-1],n.i[o],n.v[o]),s.bezierCurveTo(i[0],i[1],i[2],i[3],i[4],i[5]);i=r.applyToTriplePoints(n.o[o-1],n.i[0],n.v[0]),s.bezierCurveTo(i[0],i[1],i[2],i[3],i[4],i[5])}this.element.globalData.renderer.save(!0),s.clip()}},CVMaskElement.prototype.getMaskProperty=MaskElement.prototype.getMaskProperty,CVMaskElement.prototype.destroy=function(){this.element=null};var operationsMap={1:"source-in",2:"source-out",3:"source-in",4:"source-out"};function CVShapeData(t,e,i,n){this.styledShapes=[],this.tr=[0,0,0,0,0,0];var r,s=4;"rc"===e.ty?s=5:"el"===e.ty?s=6:"sr"===e.ty&&(s=7),this.sh=ShapePropertyFactory.getShapeProp(t,e,s,t);var a,o=i.length;for(r=0;r<o;r+=1)i[r].closed||(a={transforms:n.addTransformSequence(i[r].transforms),trNodes:[]},this.styledShapes.push(a),i[r].elements.push(a
vendor: 4,168 bytes, line 2
2))}function CVShapeElement(t,e,i){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.itemsData=[],this.prevViewData=[],this.shapeModifiers=[],this.processedElements=[],this.transformsManager=new ShapeTransformManager,this.initElement(t,e,i)}function CVTextElement(t,e,i){this.textSpans=[],this.yOffset=0,this.fillColorAnim=!1,this.strokeColorAnim=!1,this.strokeWidthAnim=!1,this.stroke=!1,this.fill=!1,this.justifyOffset=0,this.currentRender=null,this.renderType="canvas",this.values={fill:"rgba(0,0,0,0)",stroke:"rgba(0,0,0,0)",sWidth:0,fValue:""},this.initElement(t,e,i)}function CVImageElement(t,e,i){this.assetData=e.getAssetData(t.refId),this.img=e.imageLoader.getAsset(this.assetData),this.initElement(t,e,i)}function CVSolidElement(t,e,i){this.initElement(t,e,i)}function CanvasRendererBase(){}function CanvasContext(){this.opacity=-1,this.transform=createTypedArray("float32",16),this.fillStyle="",this.strokeStyle="",this.lineWidth="",this.lineCap="",this.lineJoin="",this.miterLimit="",this.id=Math.random()}function CVContextData(){var t;for(this.stack=[],this.cArrPos=0,this.cTr=new Matrix,t=0;t<15;t+=1){var e=new CanvasContext;this.stack[t]=e}this._length=15,this.nativeContext=null,this.transformMat=new Matrix,this.currentOpacity=1,this.currentFillStyle="",this.appliedFillStyle="",this.currentStrokeStyle="",this.appliedStrokeStyle="",this.currentLineWidth="",this.appliedLineWidth="",this.currentLineCap="",this.appliedLineCap="",this.currentLineJoin="",this.appliedLineJoin="",this.appliedMiterLimit="",this.currentMiterLimit=""}function CVCompElement(t,e,i){this.completeLayers=!1,this.layers=t.layers,this.pendingElements=[],this.elements=createSizedArray(this.layers.length),this.initElement(t,e,i),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function CanvasRenderer(t,e){this.animationItem=t,this.renderConfig={clearCanvas:!e||void 0===e.clearCanvas||e.clearCanvas,context:e&&e.context||null,progressiveLoad:e&&e.progressiveLoad||!1,preserveAspectRatio:e&&e.preserveAspectRatio||"xMidYMid meet",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",contentVisibility:e&&e.contentVisibility||"visible",className:e&&e.className||"",id:e&&e.id||"",runExpressions:!e||void 0===e.runExpressions||e.runExpressions},this.renderConfig.dpr=e&&e.dpr||1,this.animationItem.wrapper&&(this.renderConfig.dpr=e&&e.dpr||window.devicePixelRatio||1),this.renderedFrame=-1,this.globalData={frameNum:-1,_mdf:!1,renderConfig:this.renderConfig,currentGlobalAlpha:-1},this.contextData=new CVContextData,this.elements=[],this.pendingElements=[],this.transformMat=new Matrix,this.completeLayers=!1,this.rendererType="canvas",this.renderConfig.clearCanvas&&(this.ctxTransform=this.contextData.transform.bind(this.contextData),this.ctxOpacity=this.contextData.opacity.bind(this.contextData),this.ctxFillStyle=this.contextData.fillStyle.bind(this.contextData),this.ctxStrokeStyle=this.contextData.strokeStyle.bind(this.contextData),this.ctxLineWidth=this.contextData.lineWidth.bind(this.contextData),this.ctxLineCap=this.contextData.lineCap.bind(this.contextData),this.ctxLineJoin=this.contextData.lineJoin.bind(this.contextData),this.ctxMiterLimit=this.contextData.miterLimit.bind(this.contextData),this.ctxFill=this.contextData.fill.bind(this.contextData),this.ctxFillRect=this.contextData.fillRect.bind(this.contextData),this.ctxStroke=this.contextData.stroke.bind(this.contextData),this.save=this.contextData.save.bind(this.contextData))}function HBaseElement(){}function HSolidElement(t,e,i){this.initElement(t,e,i)}function HShapeElement(t,e,i){this.shapes=[],this.shapesData=t.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.shapesContainer=createNS("g"),this.initElement(t,e,i),this.prevViewData=[],this.currentBBox={x:999999,y:-999999,h:0,w:0}}function HTextElement(t,e,i){this.textSpans=[],this.textPaths=[],this.currentBBox={x:999999,y:-999999,h:0,w:0},this.renderType="svg",this.isMasked=!1,this.initElement(t,e,i)}function HCameraElement(t,e,i){this.initFrame(),this.initBaseData(t,e,i),this.initHierarchy();var
vendor: 24,167 bytes, line 2
2n=PropertyFactory.getProp;if(this.pe=n(this,t.pe,0,0,this),t.ks.p.s?(this.px=n(this,t.ks.p.x,1,0,this),this.py=n(this,t.ks.p.y,1,0,this),this.pz=n(this,t.ks.p.z,1,0,this)):this.p=n(this,t.ks.p,1,0,this),t.ks.a&&(this.a=n(this,t.ks.a,1,0,this)),t.ks.or.k.length&&t.ks.or.k[0].to){var r,s=t.ks.or.k.length;for(r=0;r<s;r+=1)t.ks.or.k[r].to=null,t.ks.or.k[r].ti=null}this.or=n(this,t.ks.or,1,degToRads,this),this.or.sh=!0,this.rx=n(this,t.ks.rx,0,degToRads,this),this.ry=n(this,t.ks.ry,0,degToRads,this),this.rz=n(this,t.ks.rz,0,degToRads,this),this.mat=new Matrix,this._prevMat=new Matrix,this._isFirstFrame=!0,this.finalTransform={mProp:this}}function HImageElement(t,e,i){this.assetData=e.getAssetData(t.refId),this.initElement(t,e,i)}function HybridRendererBase(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:e&&e.className||"",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(e&&!1===e.hideOnTransparent),filterSize:{width:e&&e.filterSize&&e.filterSize.width||"400%",height:e&&e.filterSize&&e.filterSize.height||"400%",x:e&&e.filterSize&&e.filterSize.x||"-100%",y:e&&e.filterSize&&e.filterSize.y||"-100%"}},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}function HCompElement(t,e,i){this.layers=t.layers,this.supports3d=!t.hasMask,this.completeLayers=!1,this.pendingElements=[],this.elements=this.layers?createSizedArray(this.layers.length):[],this.initElement(t,e,i),this.tm=t.tm?PropertyFactory.getProp(this,t.tm,0,e.frameRate,this):{_placeholder:!0}}function HybridRenderer(t,e){this.animationItem=t,this.layers=null,this.renderedFrame=-1,this.renderConfig={className:e&&e.className||"",imagePreserveAspectRatio:e&&e.imagePreserveAspectRatio||"xMidYMid slice",hideOnTransparent:!(e&&!1===e.hideOnTransparent),filterSize:{width:e&&e.filterSize&&e.filterSize.width||"400%",height:e&&e.filterSize&&e.filterSize.height||"400%",x:e&&e.filterSize&&e.filterSize.x||"-100%",y:e&&e.filterSize&&e.filterSize.y||"-100%"},runExpressions:!e||void 0===e.runExpressions||e.runExpressions},this.globalData={_mdf:!1,frameNum:-1,renderConfig:this.renderConfig},this.pendingElements=[],this.elements=[],this.threeDElements=[],this.destroyed=!1,this.camera=null,this.supports3d=!0,this.rendererType="html"}CVBaseElement.prototype={createElements:function(){},initRendererElement:function(){},createContainerElements:function(){if(this.data.tt>=1){this.buffers=[];var t=this.globalData.canvasContext,e=assetLoader.createCanvas(t.canvas.width,t.canvas.height);this.buffers.push(e);var i=assetLoader.createCanvas(t.canvas.width,t.canvas.height);this.buffers.push(i),this.data.tt>=3&&!document._isProxy&&assetLoader.loadLumaCanvas()}this.canvasContext=this.globalData.canvasContext,this.transformCanvas=this.globalData.transformCanvas,this.renderableEffectsManager=new CVEffects(this),this.searchEffectTransforms()},createContent:function(){},setBlendMode:function(){var t=this.globalData;if(t.blendMode!==this.data.bm){t.blendMode=this.data.bm;var e=getBlendMode(this.data.bm);t.canvasContext.globalCompositeOperation=e}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this),this.transformEffects=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT)},hideElement:function(){this.hidden||this.isInRange&&!this.isTransparent||(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},clearCanvas:function(t){t.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)},prepareLayer:function(){if(this.data.tt>=1){var t=this.buffers[0].getContext("2d");this.clearCanvas(t),t.drawImage(this.canvasContext.canvas,0,0),this.currentTransform=this.canvasContext.getTransform(),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform)}},exitLayer:function(){if(this.data.tt>=1){var t=this.buffers[1],e=t.getContext("2d");if(this.clearCanvas(e),e.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform),this.comp.getElementById("tp"in this.data?this.data.tp:this.data.ind-1).renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var i=assetLoader.getLumaCanvas(this.canvasContext.canvas);i.getContext("2d").drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(i,0,0)}this.canvasContext.globalCompositeOperation=operationsMap[this.data.tt],this.canvasContext.drawImage(t,0,0),this.canvasContext.globalCompositeOperation="destination-over",this.canvasContext.drawImage(this.buffers[0],0,0),this.canvasContext.setTransform(this.currentTransform),this.canvasContext.globalCompositeOperation="source-over"}},renderFrame:function(t){if(!this.hidden&&!this.data.hd&&(1!==this.data.td||t)){this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();var e=0===this.data.ty;this.prepareLayer(),this.globalData.renderer.save(e),this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity),this.renderInnerContent(),this.globalData.renderer.restore(e),this.exitLayer(),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement,CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated,extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(t,e){var i={data:t,type:t.ty,preTransforms:this.transformsManager.addTransformSequence(e),transforms:[],elements:[],closed:!0===t.hd},n={};if("fl"===t.ty||"st"===t.ty?(n.c=PropertyFactory.getProp(this,t.c,1,255,this),n.c.k||(i.co="rgb("+bmFloor(n.c.v[0])+","+bmFloor(n.c.v[1])+","+bmFloor(n.c.v[2])+")")):"gf"!==t.ty&&"gs"!==t.ty||(n.s=PropertyFactory.getProp(this,t.s,1,null,this),n.e=PropertyFactory.getProp(this,t.e,1,null,this),n.h=PropertyFactory.getProp(this,t.h||{k:0},0,.01,this),n.a=PropertyFactory.getProp(this,t.a||{k:0},0,degToRads,this),n.g=new GradientProperty(this,t.g,this)),n.o=PropertyFactory.getProp(this,t.o,0,.01,this),"st"===t.ty||"gs"===t.ty){if(i.lc=lineCapEnum[t.lc||2],i.lj=lineJoinEnum[t.lj||2],1==t.lj&&(i.ml=t.ml),n.w=PropertyFactory.getProp(this,t.w,0,null,this),n.w.k||(i.wi=n.w.v),t.d){var r=new DashProperty(this,t.d,"canvas",this);n.d=r,n.d.k||(i.da=n.d.dashArray,i.do=n.d.dashoffset[0])}}else i.r=2===t.r?"evenodd":"nonzero";return this.stylesList.push(i),n.style=i,n},CVShapeElement.prototype.createGroupElement=function(){return{it:[],prevViewData:[]}},CVShapeElement.prototype.createTransformElement=function(t){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,t.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,t,this)}}},CVShapeElement.prototype.createShapeElement=function(t){var e=new CVShapeData(this,t,this.stylesList,this.transformsManager);return this.shapes.push(e),this.addShapeToModifiers(e),e},CVShapeElement.prototype.reloadShapes=function(){var t;this._isFirstFrame=!0;var e=this.itemsData.length;for(t=0;t<e;t+=1)this.prevViewData[t]=this.itemsData[t];for(this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[]),e=this.dynamicProperties.length,t=0;t<e;t+=1)this.dynamicProperties[t].getValue();this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame)},CVShapeElement.prototype.addTransformToStyleList=function(t){var e,i=this.stylesList.length;for(e=0;e<i;e+=1)this.stylesList[e].closed||this.stylesList[e].transforms.push(t)},CVShapeElement.prototype.removeTransformFromStyleList=function(){var t,e=this.stylesList.length;for(t=0;t<e;t+=1)this.stylesList[t].closed||this.stylesList[t].transforms.pop()},CVShapeElement.prototype.closeStyles=function(t){var e,i=t.length;for(e=0;e<i;e+=1)t[e].closed=!0},CVShapeElement.prototype.searchShapes=function(t,e,i,n,r){var s,a,o,l,h,c,u=t.length-1,d=[],f=[],p=[].concat(r);for(s=u;s>=0;s-=1){if((l=this.searchProcessedElement(t[s]))?e[s]=i[l-1]:t[s]._shouldRender=n,"fl"===t[s].ty||"st"===t[s].ty||"gf"===t[s].ty||"gs"===t[s].ty)l?e[s].style.closed=!1:e[s]=this.createStyleElement(t[s],p),d.push(e[s].style);else if("gr"===t[s].ty){if(l)for(o=e[s].it.length,a=0;a<o;a+=1)e[s].prevViewData[a]=e[s].it[a];else e[s]=this.createGroupElement(t[s]);this.searchShapes(t[s].it,e[s].it,e[s].prevViewData,n,p)}else"tr"===t[s].ty?(l||(c=this.createTransformElement(t[s]),e[s]=c),p.push(e[s]),this.addTransformToStyleList(e[s])):"sh"===t[s].ty||"rc"===t[s].ty||"el"===t[s].ty||"sr"===t[s].ty?l||(e[s]=this.createShapeElement(t[s])):"tm"===t[s].ty||"rd"===t[s].ty||"pb"===t[s].ty||"zz"===t[s].ty||"op"===t[s].ty?(l?(h=e[s]).closed=!1:((h=ShapeModifiers.getModifier(t[s].ty)).init(this,t[s]),e[s]=h,this.shapeModifiers.push(h)),f.push(h)):"rp"===t[s].ty&&(l?(h=e[s]).closed=!0:(h=ShapeModifiers.getModifier(t[s].ty),e[s]=h,h.init(this,t,s,e),this.shapeModifiers.push(h),n=!1),f.push(h));this.addProcessedElement(t[s],s+1)}for(this.removeTransformFromStyleList(),this.closeStyles(d),u=f.length,s=0;s<u;s+=1)f[s].closed=!0},CVShapeElement.prototype.renderInnerContent=function(){this.transformHelper.opacity=1,this.transformHelper._opMdf=!1,this.renderModifiers(),this.transformsManager.processSequences(this._isFirstFrame),this.renderShape(this.transformHelper,this.shapesData,this.itemsData,!0)},CVShapeElement.prototype.renderShapeTransform=function(t,e){(t._opMdf||e.op._mdf||this._isFirstFrame)&&(e.opacity=t.opacity,e.opacity*=e.op.v,e._opMdf=!0)},CVShapeElement.prototype.drawLayer=function(){var t,e,i,n,r,s,a,o,l,h=this.stylesList.length,c=this.globalData.renderer,u=this.globalData.canvasContext;for(t=0;t<h;t+=1)if(("st"!==(o=(l=this.stylesList[t]).type)&&"gs"!==o||0!==l.wi)&&l.data._shouldRender&&0!==l.coOp&&0!==this.globalData.currentGlobalAlpha){for(c.save(),s=l.elements,"st"===o||"gs"===o?(c.ctxStrokeStyle("st"===o?l.co:l.grd),c.ctxLineWidth(l.wi),c.ctxLineCap(l.lc),c.ctxLineJoin(l.lj),c.ctxMiterLimit(l.ml||0)):c.ctxFillStyle("fl"===o?l.co:l.grd),c.ctxOpacity(l.coOp),"st"!==o&&"gs"!==o&&u.beginPath(),c.ctxTransform(l.preTransforms.finalTransform.props),i=s.length,e=0;e<i;e+=1){for("st"!==o&&"gs"!==o||(u.beginPath(),l.da&&(u.setLineDash(l.da),u.lineDashOffset=l.do)),r=(a=s[e].trNodes).length,n=0;n<r;n+=1)"m"===a[n].t?u.moveTo(a[n].p[0],a[n].p[1]):"c"===a[n].t?u.bezierCurveTo(a[n].pts[0],a[n].pts[1],a[n].pts[2],a[n].pts[3],a[n].pts[4],a[n].pts[5]):u.closePath();"st"!==o&&"gs"!==o||(c.ctxStroke(),l.da&&u.setLineDash(this.dashResetter))}"st"!==o&&"gs"!==o&&this.globalData.renderer.ctxFill(l.r),c.restore()}},CVShapeElement.prototype.renderShape=function(t,e,i,n){var r,s;for(s=t,r=e.length-1;r>=0;r-=1)"tr"===e[r].ty?(s=i[r].transform,this.renderShapeTransform(t,s)):"sh"===e[r].ty||"el"===e[r].ty||"rc"===e[r].ty||"sr"===e[r].ty?this.renderPath(e[r],i[r]):"fl"===e[r].ty?this.renderFill(e[r],i[r],s):"st"===e[r].ty?this.renderStroke(e[r],i[r],s):"gf"===e[r].ty||"gs"===e[r].ty?this.renderGradientFill(e[r],i[r],s):"gr"===e[r].ty?this.renderShape(s,e[r].it,i[r].it):e[r].ty;n&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(t,e){if(this._isFirstFrame||e._mdf||t.transforms._mdf){var i,n,r,s=t.trNodes,a=e.paths,o=a._length;s.length=0;var l=t.transforms.finalTransform;for(r=0;r<o;r+=1){var h=a.shapes[r];if(h&&h.v){for(n=h._length,i=1;i<n;i+=1)1===i&&s.push({t:"m",p:l.applyToPointArray(h.v[0][0],h.v[0][1],0)}),s.push({t:"c",pts:l.applyToTriplePoints(h.o[i-1],h.i[i],h.v[i])});1===n&&s.push({t:"m",p:l.applyToPointArray(h.v[0][0],h.v[0][1],0)}),h.c&&n&&(s.push({t:"c",pts:l.applyToTriplePoints(h.o[i-1],h.i[0],h.v[0])}),s.push({t:"z"}))}}t.trNodes=s}},CVShapeElement.prototype.renderPath=function(t,e){if(!0!==t.hd&&t._shouldRender){var i,n=e.styledShapes.length;for(i=0;i<n;i+=1)this.renderStyledShape(e.styledShapes[i],e.sh)}},CVShapeElement.prototype.renderFill=function(t,e,i){var n=e.style;(e.c._mdf||this._isFirstFrame)&&(n.co="rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||i._opMdf||this._isFirstFrame)&&(n.coOp=e.o.v*i.opacity)},CVShapeElement.prototype.renderGradientFill=function(t,e,i){var n,r=e.style;if(!r.grd||e.g._mdf||e.s._mdf||e.e._mdf||1!==t.t&&(e.h._mdf||e.a._mdf)){var s,a=this.globalData.canvasContext,o=e.s.v,l=e.e.v;if(1===t.t)n=a.createLinearGradient(o[0],o[1],l[0],l[1]);else{var h=Math.sqrt(Math.pow(o[0]-l[0],2)+Math.pow(o[1]-l[1],2)),c=Math.atan2(l[1]-o[1],l[0]-o[0]),u=e.h.v;u>=1?u=.99:u<=-1&&(u=-.99);var d=h*u,f=Math.cos(c+e.a.v)*d+o[0],p=Math.sin(c+e.a.v)*d+o[1];n=a.createRadialGradient(f,p,0,o[0],o[1],h)}var m=t.g.p,g=e.g.c,y=1;for(s=0;s<m;s+=1)e.g._hasOpacity&&e.g._collapsable&&(y=e.g.o[2*s+1]),n.addColorStop(g[4*s]/100,"rgba("+g[4*s+1]+","+g[4*s+2]+","+g[4*s+3]+","+y+")");r.grd=n}r.coOp=e.o.v*i.opacity},CVShapeElement.prototype.renderStroke=function(t,e,i){var n=e.style,r=e.d;r&&(r._mdf||this._isFirstFrame)&&(n.da=r.dashArray,n.do=r.dashoffset[0]),(e.c._mdf||this._isFirstFrame)&&(n.co="rgb("+bmFloor(e.c.v[0])+","+bmFloor(e.c.v[1])+","+bmFloor(e.c.v[2])+")"),(e.o._mdf||i._opMdf||this._isFirstFrame)&&(n.coOp=e.o.v*i.opacity),(e.w._mdf||this._isFirstFrame)&&(n.wi=e.w.v)},CVShapeElement.prototype.destroy=function(){this.shapesData=null,this.globalData=null,this.canvasContext=null,this.stylesList.length=0,this.itemsData.length=0},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement,ITextElement],CVTextElement),CVTextElement.prototype.tHelper=createTag("canvas").getContext("2d"),CVTextElement.prototype.buildNewText=function(){var t=this.textProperty.currentData;this.renderedLetters=createSizedArray(t.l?t.l.length:0);var e=!1;t.fc?(e=!0,this.values.fill=this.buildColor(t.fc)):this.values.fill="rgba(0,0,0,0)",this.fill=e;var i=!1;t.sc&&(i=!0,this.values.stroke=this.buildColor(t.sc),this.values.sWidth=t.sw);var n,r,s,a,o,l,h,c,u,d,f,p,m=this.globalData.fontManager.getFontByName(t.f),g=t.l,y=this.mHelper;this.stroke=i,this.values.fValue=t.finalSize+"px "+this.globalData.fontManager.getFontByName(t.f).fFamily,r=t.finalText.length;var v=this.data.singleShape,b=.001*t.tr*t.finalSize,S=0,E=0,k=!0,x=0;for(n=0;n<r;n+=1){a=(s=this.globalData.fontManager.getCharData(t.finalText[n],m.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily))&&s.data||{},y.reset(),v&&g[n].n&&(S=-b,E+=t.yOffset,E+=k?1:0,k=!1),u=(h=a.shapes?a.shapes[0].it:[]).length,y.scale(t.finalSize/100,t.finalSize/100),v&&this.applyTextPropertiesToMatrix(t,y,g[n].line,S,E),f=createSizedArray(u-1);var w=0;for(c=0;c<u;c+=1)if("sh"===h[c].ty){for(l=h[c].ks.k.i.length,d=h[c].ks.k,p=[],o=1;o<l;o+=1)1===o&&p.push(y.applyToX(d.v[0][0],d.v[0][1],0),y.applyToY(d.v[0][0],d.v[0][1],0)),p.push(y.applyToX(d.o[o-1][0],d.o[o-1][1],0),y.applyToY(d.o[o-1][0],d.o[o-1][1],0),y.applyToX(d.i[o][0],d.i[o][1],0),y.applyToY(d.i[o][0],d.i[o][1],0),y.applyToX(d.v[o][0],d.v[o][1],0),y.applyToY(d.v[o][0],d.v[o][1],0));p.push(y.applyToX(d.o[o-1][0],d.o[o-1][1],0),y.applyToY(d.o[o-1][0],d.o[o-1][1],0),y.applyToX(d.i[0][0],d.i[0][1],0),y.applyToY(d.i[0][0],d.i[0][1],0),y.applyToX(d.v[0][0],d.v[0][1],0),y.applyToY(d.v[0][0],d.v[0][1],0)),f[w]=p,w+=1}v&&(S+=g[n].l,S+=b),this.textSpans[x]?this.textSpans[x].elem=f:this.textSpans[x]={elem:f},x+=1}},CVTextElement.prototype.renderInnerContent=function(){var t,e,i,n,r,s;this.validateText(),this.canvasContext.font=this.values.fValue,this.globalData.renderer.ctxLineCap("butt"),this.globalData.renderer.ctxLineJoin("miter"),this.globalData.renderer.ctxMiterLimit(4),this.data.singleShape||this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag);var a,o=this.textAnimator.renderedLetters,l=this.textProperty.currentData.l;e=l.length;var h,c,u=null,d=null,f=null,p=this.globalData.renderer;for(t=0;t<e;t+=1)if(!l[t].n){if((a=o[t])&&(p.save(),p.ctxTransform(a.p),p.ctxOpacity(a.o)),this.fill){for(a&&a.fc?u!==a.fc&&(p.ctxFillStyle(a.fc),u=a.fc):u!==this.values.fill&&(u=this.values.fill,p.ctxFillStyle(this.values.fill)),n=(h=this.textSpans[t].elem).length,this.globalData.canvasContext.beginPath(),i=0;i<n;i+=1)for(s=(c=h[i]).length,this.globalData.canvasContext.moveTo(c[0],c[1]),r=2;r<s;r+=6)this.globalData.canvasContext.bezierCurveTo(c[r],c[r+1],c[r+2],c[r+3],c[r+4],c[r+5]);this.globalData.canvasContext.closePath(),p.ctxFill()}if(this.stroke){for(a&&a.sw?f!==a.sw&&(f=a.sw,p.ctxLineWidth(a.sw)):f!==this.values.sWidth&&(f=this.values.sWidth,p.ctxLineWidth(this.values.sWidth)),a&&a.sc?d!==a.sc&&(d=a.sc,p.ctxStrokeStyle(a.sc)):d!==this.values.stroke&&(d=this.values.stroke,p.ctxStrokeStyle(this.values.stroke)),n=(h=this.textSpans[t].elem).length,this.globalData.canvasContext.beginPath(),i=0;i<n;i+=1)for(s=(c=h[i]).length,this.globalData.canvasContext.moveTo(c[0],c[1]),r=2;r<s;r+=6)this.globalData.canvasContext.bezierCurveTo(c[r],c[r+1],c[r+2],c[r+3],c[r+4],c[r+5]);this.globalData.canvasContext.closePath(),p.ctxStroke()}a&&this.globalData.renderer.restore()}},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVImageElement),CVImageElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVImageElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVImageElement.prototype.createContent=function(){if(this.img.width&&(this.assetData.w!==this.img.width||this.assetData.h!==this.img.height)){var t=createTag("canvas");t.width=this.assetData.w,t.height=this.assetData.h;var e,i,n=t.getContext("2d"),r=this.img.width,s=this.img.height,a=r/s,o=this.assetData.w/this.assetData.h,l=this.assetData.pr||this.globalData.renderConfig.imagePreserveAspectRatio;a>o&&"xMidYMid slice"===l||a<o&&"xMidYMid slice"!==l?e=(i=s)*o:i=(e=r)/o,n.drawImage(this.img,(r-e)/2,(s-i)/2,e,i,0,0,this.assetData.w,this.assetData.h),this.img=t}},CVImageElement.prototype.renderInnerContent=function(){this.canvasContext.drawImage(this.img,0,0)},CVImageElement.prototype.destroy=function(){this.img=null},extendPrototype([BaseElement,TransformElement,CVBaseElement,HierarchyElement,FrameElement,RenderableElement],CVSolidElement),CVSolidElement.prototype.initElement=SVGShapeElement.prototype.initElement,CVSolidElement.prototype.prepareFrame=IImageElement.prototype.prepareFrame,CVSolidElement.prototype.renderInnerContent=function(){this.globalData.renderer.ctxFillStyle(this.data.sc),this.globalData.renderer.ctxFillRect(0,0,this.data.sw,this.data.sh)},extendPrototype([BaseRenderer],CanvasRendererBase),CanvasRendererBase.prototype.createShape=function(t){return new CVShapeElement(t,this.globalData,this)},CanvasRendererBase.prototype.createText=function(t){return new CVTextElement(t,this.globalData,this)},CanvasRendererBase.prototype.createImage=function(t){return new CVImageElement(t,this.globalData,this)},CanvasRendererBase.prototype.createSolid=function(t){return new CVSolidElement(t,this.globalData,this)},CanvasRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,CanvasRendererBase.prototype.ctxTransform=function(t){1===t[0]&&0===t[1]&&0===t[4]&&1===t[5]&&0===t[12]&&0===t[13]||this.canvasContext.transform(t[0],t[1],t[4],t[5],t[12],t[13])},CanvasRendererBase.prototype.ctxOpacity=function(t){this.canvasContext.globalAlpha*=t<0?0:t},CanvasRendererBase.prototype.ctxFillStyle=function(t){this.canvasContext.fillStyle=t},CanvasRendererBase.prototype.ctxStrokeStyle=function(t){this.canvasContext.strokeStyle=t},CanvasRendererBase.prototype.ctxLineWidth=function(t){this.canvasContext.lineWidth=t},CanvasRendererBase.prototype.ctxLineCap=function(t){this.canvasContext.lineCap=t},CanvasRendererBase.prototype.ctxLineJoin=function(t){this.canvasContext.lineJoin=t},CanvasRendererBase.prototype.ctxMiterLimit=function(t){this.canvasContext.miterLimit=t},CanvasRendererBase.prototype.ctxFill=function(t){this.canvasContext.fill(t)},CanvasRendererBase.prototype.ctxFillRect=function(t,e,i,n){this.canvasContext.fillRect(t,e,i,n)},CanvasRendererBase.prototype.ctxStroke=function(){this.canvasContext.stroke()},CanvasRendererBase.prototype.reset=function(){this.renderConfig.clearCanvas?this.contextData.reset():this.canvasContext.restore()},CanvasRendererBase.prototype.save=function(){this.canvasContext.save()},CanvasRendererBase.prototype.restore=function(t){this.renderConfig.clearCanvas?(t&&(this.globalData.blendMode="source-over"),this.contextData.restore(t)):this.canvasContext.restore()},CanvasRendererBase.prototype.configAnimation=function(t){if(this.animationItem.wrapper){this.animationItem.container=createTag("canvas");var e=this.animationItem.container.style;e.width="100%",e.height="100%";var i="0px 0px 0px";e.transformOrigin=i,e.mozTransformOrigin=i,e.webkitTransformOrigin=i,e["-webkit-transform"]=i,e.contentVisibility=this.renderConfig.contentVisibility,this.animationItem.wrapper.appendChild(this.animationItem.container),this.canvasContext=this.animationItem.container.getContext("2d"),this.renderConfig.className&&this.animationItem.container.setAttribute("class",this.renderConfig.className),this.renderConfig.id&&this.animationItem.container.setAttribute("id",this.renderConfig.id)}else this.canvasContext=this.renderConfig.context;this.contextData.setContext(this.canvasContext),this.data=t,this.layers=t.layers,this.transformCanvas={w:t.w,h:t.h,sx:0,sy:0,tx:0,ty:0},this.setupGlobalData(t,document.body),this.globalData.canvasContext=this.canvasContext,this.globalData.renderer=this,this.globalData.isDashed=!1,this.globalData.progressiveLoad=this.renderConfig.progressiveLoad,this.globalData.transformCanvas=this.transformCanvas,this.elements=createSizedArray(t.layers.length),this.updateContainerSize()},CanvasRendererBase.prototype.updateContainerSize=function(t,e){var i,n,r,s;if(this.reset(),t?(i=t,n=e,this.canvasContext.canvas.width=i,this.canvasContext.canvas.height=n):(this.animationItem.wrapper&&this.animationItem.container?(i=this.animationItem.wrapper.offsetWidth,n=this.animationItem.wrapper.offsetHeight):(i=this.canvasContext.canvas.width,n=this.canvasContext.canvas.height),this.canvasContext.canvas.width=i*this.renderConfig.dpr,this.canvasContext.canvas.height=n*this.renderConfig.dpr),-1!==this.renderConfig.preserveAspectRatio.indexOf("meet")||-1!==this.renderConfig.preserveAspectRatio.indexOf("slice")){var a=this.renderConfig.preserveAspectRatio.split(" "),o=a[1]||"meet",l=a[0]||"xMidYMid",h=l.substr(0,4),c=l.substr(4);r=i/n,(s=this.transformCanvas.w/this.transformCanvas.h)>r&&"meet"===o||s<r&&"slice"===o?(this.transformCanvas.sx=i/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=i/(this.transformCanvas.w/this.renderConfig.dpr)):(this.transformCanvas.sx=n/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.sy=n/(this.transformCanvas.h/this.renderConfig.dpr)),this.transformCanvas.tx="xMid"===h&&(s<r&&"meet"===o||s>r&&"slice"===o)?(i-this.transformCanvas.w*(n/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===h&&(s<r&&"meet"===o||s>r&&"slice"===o)?(i-this.transformCanvas.w*(n/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.t
vendor: 4,282 bytes, line 2
2y="YMid"===c&&(s>r&&"meet"===o||s<r&&"slice"===o)?(n-this.transformCanvas.h*(i/this.transformCanvas.w))/2*this.renderConfig.dpr:"YMax"===c&&(s>r&&"meet"===o||s<r&&"slice"===o)?(n-this.transformCanvas.h*(i/this.transformCanvas.w))*this.renderConfig.dpr:0}else"none"===this.renderConfig.preserveAspectRatio?(this.transformCanvas.sx=i/(this.transformCanvas.w/this.renderConfig.dpr),this.transformCanvas.sy=n/(this.transformCanvas.h/this.renderConfig.dpr),this.transformCanvas.tx=0,this.transformCanvas.ty=0):(this.transformCanvas.sx=this.renderConfig.dpr,this.transformCanvas.sy=this.renderConfig.dpr,this.transformCanvas.tx=0,this.transformCanvas.ty=0);this.transformCanvas.props=[this.transformCanvas.sx,0,0,0,0,this.transformCanvas.sy,0,0,0,0,1,0,this.transformCanvas.tx,this.transformCanvas.ty,0,1],this.ctxTransform(this.transformCanvas.props),this.canvasContext.beginPath(),this.canvasContext.rect(0,0,this.transformCanvas.w,this.transformCanvas.h),this.canvasContext.closePath(),this.canvasContext.clip(),this.renderFrame(this.renderedFrame,!0)},CanvasRendererBase.prototype.destroy=function(){var t;for(this.renderConfig.clearCanvas&&this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),t=(this.layers?this.layers.length:0)-1;t>=0;t-=1)this.elements[t]&&this.elements[t].destroy&&this.elements[t].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(t,e){if((this.renderedFrame!==t||!0!==this.renderConfig.clearCanvas||e)&&!this.destroyed&&-1!==t){var i;this.renderedFrame=t,this.globalData.frameNum=t-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||e,this.globalData.projectInterface.currentFrame=t;var n=this.layers.length;for(this.completeLayers||this.checkLayers(t),i=n-1;i>=0;i-=1)(this.completeLayers||this.elements[i])&&this.elements[i].prepareFrame(t-this.layers[i].st);if(this.globalData._mdf){for(!0===this.renderConfig.clearCanvas?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),i=n-1;i>=0;i-=1)(this.completeLayers||this.elements[i])&&this.elements[i].renderFrame();!0!==this.renderConfig.clearCanvas&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(t){var e=this.elements;if(!e[t]&&99!==this.layers[t].ty){var i=this.createItem(this.layers[t],this,this.globalData);e[t]=i,i.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"},CVContextData.prototype.duplicate=function(){var t=2*this._length,e=0;for(e=this._length;e<t;e+=1)this.stack[e]=new CanvasContext;this._length=t},CVContextData.prototype.reset=function(){this.cArrPos=0,this.cTr.reset(),this.stack[this.cArrPos].opacity=1},CVContextData.prototype.restore=function(t){this.cArrPos-=1;var e,i=this.stack[this.cArrPos],n=i.transform,r=this.cTr.props;for(e=0;e<16;e+=1)r[e]=n[e];if(t){this.nativeContext.restore();var s=this.stack[this.cArrPos+1];this.appliedFillStyle=s.fillStyle,this.appliedStrokeStyle=s.strokeStyle,this.appliedLineWidth=s.lineWidth,this.appliedLineCap=s.lineCap,this.appliedLineJoin=s.lineJoin,this.appliedMiterLimit=s.miterLimit}this.nativeContext.setTransform(n[0],n[1],n[4],n[5],n[12],n[13]),(t||-1!==i.opacity&&this.currentOpacity!==i.opacity)&&(this.nativeContext.globalAlpha=i.opacity,this.currentOpacity=i.opacity),this.currentFillStyle=i.fillStyle,this.currentStrokeStyle=i.strokeStyle,this.currentLineWidth=i.lineWidth,this.currentLineCap=i.lineCap,this.currentLineJoin=i.lineJoin,this.currentMiterLimit=i.miterLimit},CVContextData.prototype.save=function(t){t&&this.nativeContext.save();var e=this.cTr.props;this._length<=this.cArrPos&&this.duplicate();var i,n=this.stack[this.cArrPos];for(i=0;i<16;i+=1)n.transform[i]=e[i];this.cArrPos+=1;var r=this.stack[this.cArrPos];r.opacity=n.opacity,r.fillStyle=n.fillStyle,r.strokeStyle=n.strokeStyle,r.lineWidth=n.lineWidth,r.lineCap=n.lineCap,r.lineJoin=n.lineJoin,r.miter
vendor: 5,362 bytes, line 2
2Limit=n.miterLimit},CVContextData.prototype.setOpacity=function(t){this.stack[this.cArrPos].opacity=t},CVContextData.prototype.setContext=function(t){this.nativeContext=t},CVContextData.prototype.fillStyle=function(t){this.stack[this.cArrPos].fillStyle!==t&&(this.currentFillStyle=t,this.stack[this.cArrPos].fillStyle=t)},CVContextData.prototype.strokeStyle=function(t){this.stack[this.cArrPos].strokeStyle!==t&&(this.currentStrokeStyle=t,this.stack[this.cArrPos].strokeStyle=t)},CVContextData.prototype.lineWidth=function(t){this.stack[this.cArrPos].lineWidth!==t&&(this.currentLineWidth=t,this.stack[this.cArrPos].lineWidth=t)},CVContextData.prototype.lineCap=function(t){this.stack[this.cArrPos].lineCap!==t&&(this.currentLineCap=t,this.stack[this.cArrPos].lineCap=t)},CVContextData.prototype.lineJoin=function(t){this.stack[this.cArrPos].lineJoin!==t&&(this.currentLineJoin=t,this.stack[this.cArrPos].lineJoin=t)},CVContextData.prototype.miterLimit=function(t){this.stack[this.cArrPos].miterLimit!==t&&(this.currentMiterLimit=t,this.stack[this.cArrPos].miterLimit=t)},CVContextData.prototype.transform=function(t){this.transformMat.cloneFromProps(t);var e=this.cTr;this.transformMat.multiply(e),e.cloneFromProps(this.transformMat.props);var i=e.props;this.nativeContext.setTransform(i[0],i[1],i[4],i[5],i[12],i[13])},CVContextData.prototype.opacity=function(t){var e=this.stack[this.cArrPos].opacity;e*=t<0?0:t,this.stack[this.cArrPos].opacity!==e&&(this.currentOpacity!==t&&(this.nativeContext.globalAlpha=t,this.currentOpacity=t),this.stack[this.cArrPos].opacity=e)},CVContextData.prototype.fill=function(t){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fill(t)},CVContextData.prototype.fillRect=function(t,e,i,n){this.appliedFillStyle!==this.currentFillStyle&&(this.appliedFillStyle=this.currentFillStyle,this.nativeContext.fillStyle=this.appliedFillStyle),this.nativeContext.fillRect(t,e,i,n)},CVContextData.prototype.stroke=function(){this.appliedStrokeStyle!==this.currentStrokeStyle&&(this.appliedStrokeStyle=this.currentStrokeStyle,this.nativeContext.strokeStyle=this.appliedStrokeStyle),this.appliedLineWidth!==this.currentLineWidth&&(this.appliedLineWidth=this.currentLineWidth,this.nativeContext.lineWidth=this.appliedLineWidth),this.appliedLineCap!==this.currentLineCap&&(this.appliedLineCap=this.currentLineCap,this.nativeContext.lineCap=this.appliedLineCap),this.appliedLineJoin!==this.currentLineJoin&&(this.appliedLineJoin=this.currentLineJoin,this.nativeContext.lineJoin=this.appliedLineJoin),this.appliedMiterLimit!==this.currentMiterLimit&&(this.appliedMiterLimit=this.currentMiterLimit,this.nativeContext.miterLimit=this.appliedMiterLimit),this.nativeContext.stroke()},extendPrototype([CanvasRendererBase,ICompElement,CVBaseElement],CVCompElement),CVCompElement.prototype.renderInnerContent=function(){var t,e=this.canvasContext;for(e.beginPath(),e.moveTo(0,0),e.lineTo(this.data.w,0),e.lineTo(this.data.w,this.data.h),e.lineTo(0,this.data.h),e.lineTo(0,0),e.clip(),t=this.layers.length-1;t>=0;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].renderFrame()},CVCompElement.prototype.destroy=function(){var t;for(t=this.layers.length-1;t>=0;t-=1)this.elements[t]&&this.elements[t].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)},extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(t){return new CVCompElement(t,this.globalData,this)},HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0!==this.data.bm&&this.setBlendMode()},renderElement:function(){var t=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var e=this.finalTransform.mat.toCSS();t.transform=e,t.webkitTransform=e}this.finalTransform._opMdf&&(t.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRe
vendor: 20,678 bytes, line 2
2nderer.prototype.buildElementParenting,extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var t;this.data.hasMask?((t=createNS("rect")).setAttribute("width",this.data.sw),t.setAttribute("height",this.data.sh),t.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):((t=createTag("div")).style.width=this.data.sw+"px",t.style.height=this.data.sh+"px",t.style.backgroundColor=this.data.sc),this.layerElement.appendChild(t)},extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var t;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),t=this.svgElement;else{t=createNS("svg");var e=this.comp.data?this.comp.data:this.globalData.compSize;t.setAttribute("width",e.w),t.setAttribute("height",e.h),t.appendChild(this.shapesContainer),this.layerElement.appendChild(t)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=t},HShapeElement.prototype.getTransformedPoint=function(t,e){var i,n=t.length;for(i=0;i<n;i+=1)e=t[i].mProps.v.applyToPointArray(e[0],e[1],0);return e},HShapeElement.prototype.calculateShapeBoundingBox=function(t,e){var i,n,r,s,a,o=t.sh.v,l=t.transformers,h=o._length;if(!(h<=1)){for(i=0;i<h-1;i+=1)n=this.getTransformedPoint(l,o.v[i]),r=this.getTransformedPoint(l,o.o[i]),s=this.getTransformedPoint(l,o.i[i+1]),a=this.getTransformedPoint(l,o.v[i+1]),this.checkBounds(n,r,s,a,e);o.c&&(n=this.getTransformedPoint(l,o.v[i]),r=this.getTransformedPoint(l,o.o[i]),s=this.getTransformedPoint(l,o.i[0]),a=this.getTransformedPoint(l,o.v[0]),this.checkBounds(n,r,s,a,e))}},HShapeElement.prototype.checkBounds=function(t,e,i,n,r){this.getBoundsOfCurve(t,e,i,n);var s=this.shapeBoundingBox;r.x=bmMin(s.left,r.x),r.xMax=bmMax(s.right,r.xMax),r.y=bmMin(s.top,r.y),r.yMax=bmMax(s.bottom,r.yMax)},HShapeElement.prototype.shapeBoundingBox={left:0,right:0,top:0,bottom:0},HShapeElement.prototype.tempBoundingBox={x:0,xMax:0,y:0,yMax:0,width:0,height:0},HShapeElement.prototype.getBoundsOfCurve=function(t,e,i,n){for(var r,s,a,o,l,h,c,u=[[t[0],n[0]],[t[1],n[1]]],d=0;d<2;++d)s=6*t[d]-12*e[d]+6*i[d],r=-3*t[d]+9*e[d]-9*i[d]+3*n[d],a=3*e[d]-3*t[d],s|=0,a|=0,0==(r|=0)&&0===s||(0===r?(o=-a/s)>0&&o<1&&u[d].push(this.calculateF(o,t,e,i,n,d)):(l=s*s-4*a*r)>=0&&((h=(-s+bmSqrt(l))/(2*r))>0&&h<1&&u[d].push(this.calculateF(h,t,e,i,n,d)),(c=(-s-bmSqrt(l))/(2*r))>0&&c<1&&u[d].push(this.calculateF(c,t,e,i,n,d))));this.shapeBoundingBox.left=bmMin.apply(null,u[0]),this.shapeBoundingBox.top=bmMin.apply(null,u[1]),this.shapeBoundingBox.right=bmMax.apply(null,u[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,u[1])},HShapeElement.prototype.calculateF=function(t,e,i,n,r,s){return bmPow(1-t,3)*e[s]+3*bmPow(1-t,2)*t*i[s]+3*(1-t)*bmPow(t,2)*n[s]+bmPow(t,3)*r[s]},HShapeElement.prototype.calculateBoundingBox=function(t,e){var i,n=t.length;for(i=0;i<n;i+=1)t[i]&&t[i].sh?this.calculateShapeBoundingBox(t[i],e):t[i]&&t[i].it?this.calculateBoundingBox(t[i].it,e):t[i]&&t[i].style&&t[i].w&&this.expandStrokeBoundingBox(t[i].w,e)},HShapeElement.prototype.expandStrokeBoundingBox=function(t,e){var i=0;if(t.keyframes){for(var n=0;n<t.keyframes.length;n+=1){var r=t.keyframes[n].s;r>i&&(i=r)}i*=t.mult}else i=t.v*t.mult;e.x-=i,e.xMax+=i,e.y-=i,e.yMax+=i},HShapeElement.prototype.currentBoxContains=function(t){return this.currentBBox.x<=t.x&&this.currentBBox.y<=t.y&&this.currentBBox.width+this.currentBBox.x>=t.x+t.width&&this.currentBBox.height+this.currentBBox.y>=t.y+t.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var t=this.tempBoundingBox,e=999999;if(t.x=e,t.xMax=-e,t.y=e,t.yMax=-e,this.calculateBoundingBox(this.itemsData,t),t.width=t.xMax<t.x?0:t.xMax-t.x,t.height=t.yMax<t.y?0:t.yMax-t.y,this.currentBoxContains(t))return;var i=!1;if(this.currentBBox.w!==t.width&&(this.currentBBox.w=t.width,this.shapeCont.setAttribute("width",t.width),i=!0),this.currentBBox.h!==t.height&&(this.currentBBox.h=t.height,this.shapeCont.setAttribute("height",t.height),i=!0),i||this.currentBBox.x!==t.x||this.currentBBox.y!==t.y){this.currentBBox.w=t.width,this.currentBBox.h=t.height,this.currentBBox.x=t.x,this.currentBBox.y=t.y,this.shapeCont.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h);var n=this.shapeCont.style,r="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";n.transform=r,n.webkitTransform=r}}},extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement,ITextElement],HTextElement),HTextElement.prototype.createContent=function(){if(this.isMasked=this.checkMasks(),this.isMasked){this.renderType="svg",this.compW=this.comp.data.w,this.compH=this.comp.data.h,this.svgElement.setAttribute("width",this.compW),this.svgElement.setAttribute("height",this.compH);var t=createNS("g");this.maskedElement.appendChild(t),this.innerElem=t}else this.renderType="html",this.innerElem=this.layerElement;this.checkParenting()},HTextElement.prototype.buildNewText=function(){var t=this.textProperty.currentData;this.renderedLetters=createSizedArray(t.l?t.l.length:0);var e=this.innerElem.style,i=t.fc?this.buildColor(t.fc):"rgba(0,0,0,0)";e.fill=i,e.color=i,t.sc&&(e.stroke=this.buildColor(t.sc),e.strokeWidth=t.sw+"px");var n,r,s=this.globalData.fontManager.getFontByName(t.f);if(!this.globalData.fontManager.chars)if(e.fontSize=t.finalSize+"px",e.lineHeight=t.finalSize+"px",s.fClass)this.innerElem.className=s.fClass;else{e.fontFamily=s.fFamily;var a=t.fWeight,o=t.fStyle;e.fontStyle=o,e.fontWeight=a}var l,h,c,u=t.l;r=u.length;var d,f=this.mHelper,p="",m=0;for(n=0;n<r;n+=1){if(this.globalData.fontManager.chars?(this.textPaths[m]?l=this.textPaths[m]:((l=createNS("path")).setAttribute("stroke-linecap",lineCapEnum[1]),l.setAttribute("stroke-linejoin",lineJoinEnum[2]),l.setAttribute("stroke-miterlimit","4")),this.isMasked||(this.textSpans[m]?c=(h=this.textSpans[m]).children[0]:((h=createTag("div")).style.lineHeight=0,(c=createNS("svg")).appendChild(l),styleDiv(h)))):this.isMasked?l=this.textPaths[m]?this.textPaths[m]:createNS("text"):this.textSpans[m]?(h=this.textSpans[m],l=this.textPaths[m]):(styleDiv(h=createTag("span")),styleDiv(l=createTag("span")),h.appendChild(l)),this.globalData.fontManager.chars){var g,y=this.globalData.fontManager.getCharData(t.finalText[n],s.fStyle,this.globalData.fontManager.getFontByName(t.f).fFamily);if(g=y?y.data:null,f.reset(),g&&g.shapes&&g.shapes.length&&(d=g.shapes[0].it,f.scale(t.finalSize/100,t.finalSize/100),p=this.createPathShape(f,d),l.setAttribute("d",p)),this.isMasked)this.innerElem.appendChild(l);else{if(this.innerElem.appendChild(h),g&&g.shapes){document.body.appendChild(c);var v=c.getBBox();c.setAttribute("width",v.width+2),c.setAttribute("height",v.height+2),c.setAttribute("viewBox",v.x-1+" "+(v.y-1)+" "+(v.width+2)+" "+(v.height+2));var b=c.style,S="translate("+(v.x-1)+"px,"+(v.y-1)+"px)";b.transform=S,b.webkitTransform=S,u[n].yOffset=v.y-1}else c.setAttribute("width",1),c.setAttribute("height",1);h.appendChild(c)}}else if(l.textContent=u[n].val,l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),this.isMasked)this.innerElem.appendChild(l);else{this.innerElem.appendChild(h);var E=l.style,k="translate3d(0,"+-t.finalSize/1.2+"px,0)";E.transform=k,E.webkitTransform=k}this.isMasked?this.textSpans[m]=l:this.textSpans[m]=h,this.textSpans[m].style.display="block",this.textPaths[m]=l,m+=1}for(;m<this.textSpans.length;)this.textSpans[m].style.display="none",m+=1},HTextElement.prototype.renderInnerContent=function(){var t;if(this.validateText(),this.data.singleShape){if(!this._isFirstFrame&&!this.lettersChangedFlag)return;if(this.isMasked&&this.finalTransform._matMdf){this.svgElement.setAttribute("viewBox",-this.finalTransform.mProp.p.v[0]+" "+-this.finalTransform.mProp.p.v[1]+" "+this.compW+" "+this.compH),t=this.svgElement.style;var e="translate("+-this.finalTransform.mProp.p.v[0]+"px,"+-this.finalTransform.mProp.p.v[1]+"px)";t.transform=e,t.webkitTransform=e}}if(this.textAnimator.getMeasures(this.textProperty.currentData,this.lettersChangedFlag),this.lettersChangedFlag||this.textAnimator.lettersChangedFlag){var i,n,r,s,a,o=0,l=this.textAnimator.renderedLetters,h=this.textProperty.currentData.l;for(n=h.length,i=0;i<n;i+=1)h[i].n?o+=1:(s=this.textSpans[i],a=this.textPaths[i],r=l[o],o+=1,r._mdf.m&&(this.isMasked?s.setAttribute("transform",r.m):(s.style.webkitTransform=r.m,s.style.transform=r.m)),s.style.opacity=r.o,r.sw&&r._mdf.sw&&a.setAttribute("stroke-width",r.sw),r.sc&&r._mdf.sc&&a.setAttribute("stroke",r.sc),r.fc&&r._mdf.fc&&(a.setAttribute("fill",r.fc),a.style.color=r.fc));if(this.innerElem.getBBox&&!this.hidden&&(this._isFirstFrame||this._mdf)){var c=this.innerElem.getBBox();if(this.currentBBox.w!==c.width&&(this.currentBBox.w=c.width,this.svgElement.setAttribute("width",c.width)),this.currentBBox.h!==c.height&&(this.currentBBox.h=c.height,this.svgElement.setAttribute("height",c.height)),this.currentBBox.w!==c.width+2||this.currentBBox.h!==c.height+2||this.currentBBox.x!==c.x-1||this.currentBBox.y!==c.y-1){this.currentBBox.w=c.width+2,this.currentBBox.h=c.height+2,this.currentBBox.x=c.x-1,this.currentBBox.y=c.y-1,this.svgElement.setAttribute("viewBox",this.currentBBox.x+" "+this.currentBBox.y+" "+this.currentBBox.w+" "+this.currentBBox.h),t=this.svgElement.style;var u="translate("+this.currentBBox.x+"px,"+this.currentBBox.y+"px)";t.transform=u,t.webkitTransform=u}}}},extendPrototype([BaseElement,FrameElement,HierarchyElement],HCameraElement),HCameraElement.prototype.setup=function(){var t,e,i,n,r=this.comp.threeDElements.length;for(t=0;t<r;t+=1)if("3d"===(e=this.comp.threeDElements[t]).type){i=e.perspectiveElem.style,n=e.container.style;var s=this.pe.v+"px",a="0px 0px 0px",o="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";i.perspective=s,i.webkitPerspective=s,n.transformOrigin=a,n.mozTransformOrigin=a,n.webkitTransformOrigin=a,i.transform=o,i.webkitTransform=o}},HCameraElement.prototype.createElements=function(){},HCameraElement.prototype.hide=function(){},HCameraElement.prototype.renderFrame=function(){var t,e,i=this._isFirstFrame;if(this.hierarchy)for(e=this.hierarchy.length,t=0;t<e;t+=1)i=this.hierarchy[t].finalTransform.mProp._mdf||i;if(i||this.pe._mdf||this.p&&this.p._mdf||this.px&&(this.px._mdf||this.py._mdf||this.pz._mdf)||this.rx._mdf||this.ry._mdf||this.rz._mdf||this.or._mdf||this.a&&this.a._mdf){if(this.mat.reset(),this.hierarchy)for(t=e=this.hierarchy.length-1;t>=0;t-=1){var n=this.hierarchy[t].finalTransform.mProp;this.mat.translate(-n.p.v[0],-n.p.v[1],n.p.v[2]),this.mat.rotateX(-n.or.v[0]).rotateY(-n.or.v[1]).rotateZ(n.or.v[2]),this.mat.rotateX(-n.rx.v).rotateY(-n.ry.v).rotateZ(n.rz.v),this.mat.scale(1/n.s.v[0],1/n.s.v[1],1/n.s.v[2]),this.mat.translate(n.a.v[0],n.a.v[1],n.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var r;r=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var s=Math.sqrt(Math.pow(r[0],2)+Math.pow(r[1],2)+Math.pow(r[2],2)),a=[r[0]/s,r[1]/s,r[2]/s],o=Math.sqrt(a[2]*a[2]+a[0]*a[0]),l=Math.atan2(a[1],o),h=Math.atan2(a[0],-a[2]);this.mat.rotateY(h).rotateX(-l)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var c=!this._prevMat.equals(this.mat);if((c||this.pe._mdf)&&this.comp.threeDElements){var u,d,f;for(e=this.comp.threeDElements.length,t=0;t<e;t+=1)if("3d"===(u=this.comp.threeDElements[t]).type){if(c){var p=this.mat.toCSS();(f=u.container.style).transform=p,f.webkitTransform=p}this.pe._mdf&&((d=u.perspectiveElem.style).perspective=this.pe.v+"px",d.webkitPerspective=this.pe.v+"px")}this.mat.clone(this._prevMat)}}this._isFirstFrame=!1},HCameraElement.prototype.prepareFrame=function(t){this.prepareProperties(t,!0)},HCameraElement.prototype.destroy=function(){},HCameraElement.prototype.getBaseElement=function(){return null},extendPrototype([BaseElement,TransformElement,HBaseElement,HSolidElement,HierarchyElement,FrameElement,RenderableElement],HImageElement),HImageElement.prototype.createContent=function(){var t=this.globalData.getAssetsPath(this.assetData),e=new Image;this.data.hasMask?(this.imageElem=createNS("image"),this.imageElem.setAttribute("width",this.assetData.w+"px"),this.imageElem.setAttribute("height",this.assetData.h+"px"),this.imageElem.setAttributeNS("http://www.w3.org/1999/xlink","href",t),this.layerElement.appendChild(this.imageElem),this.baseElement.setAttribute("width",this.assetData.w),this.baseElement.setAttribute("height",this.assetData.h)):this.layerElement.appendChild(e),e.crossOrigin="anonymous",e.src=t,this.data.ln&&this.baseElement.setAttribute("id",this.data.ln)},extendPrototype([BaseRenderer],HybridRendererBase),HybridRendererBase.prototype.buildItem=SVGRenderer.prototype.buildItem,HybridRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},HybridRendererBase.prototype.appendElementInPos=function(t,e){var i=t.getBaseElement();if(i){var n=this.layers[e];if(n.ddd&&this.supports3d)this.addTo3dContainer(i,e);else if(this.threeDElements)this.addTo3dContainer(i,e);else{for(var r,s,a=0;a<e;)this.elements[a]&&!0!==this.elements[a]&&this.elements[a].getBaseElement&&(s=this.elements[a],r=(this.layers[a].ddd?this.getThreeDContainerByPos(a):s.getBaseElement())||r),a+=1;r?n.ddd&&this.supports3d||this.layerElement.insertBefore(i,r):n.ddd&&this.supports3d||this.layerElement.appendChild(i)}}},HybridRendererBase.prototype.createShape=function(t){return this.supports3d?new HShapeElement(t,this.globalData,this):new SVGShapeElement(t,this.globalData,this)},HybridRendererBase.prototype.createText=function(t){return this.supports3d?new HTextElement(t,this.globalData,this):new SVGTextLottieElement(t,this.globalData,this)},HybridRendererBase.prototype.createCamera=function(t){return this.camera=new HCameraElement(t,this.globalData,this),this.camera},HybridRendererBase.prototype.createImage=function(t){return this.supports3d?new HImageElement(t,this.globalData,this):new IImageElement(t,this.globalData,this)},HybridRendererBase.prototype.createSolid=function(t){return this.supports3d?new HSolidElement(t,this.globalData,this):new ISolidElement(t,this.globalData,this)},HybridRendererBase.prototype.createNull=SVGRenderer.prototype.createNull,HybridRendererBase.prototype.getThreeDContainerByPos=function(t){for(var e=0,i=this.threeDElements.length;e<i;){if(this.threeDElements[e].startPos<=t&&this.threeDElements[e].endPos>=t)return this.threeDElements[e].perspectiveElem;e+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(t,e){var i,n,r=createTag("div");styleDiv(r);var s=createTag("div");if(styleDiv(s),"3d"===e){(i=r.style).width=this.globalData.compSize.w+"px",i.height=this.globalData.compSize.h+"px";var a="50% 50%";i.webkitTransformOrigin=a,i.mozTransformOrigin=a,i.transformOrigin=a;var o="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";(n=s.style).transform=o,n.webkitTransform=o}r.appendChild(s);var l={container:s,perspectiveElem:r,startPos:t,endPos:t,type:e};return this.threeDElements.push(l),l},HybridRendererBase.prototype.build3dContainers=function(){var t,e,i=this.layers.length,n="";for(t=0;t<i;t+=1)this.layers[t].ddd&&3!==this.layers[t].ty?("3d"!==n&&(n="3d",e=this.createThreeDContainer(t,"3d")),e.endPos=Math.max(e.endPos,t)):("2d"!==n&&(n="2d",e=this.createThreeDContainer(t,"2d")),e.endPos=Math.max(e.endPos,t));for(t=(i=this.threeDElements.length)-1;t>=0;t-=1)this.resizerElem.appendChild(this.threeDElements[t].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(t,e){for(var i=0,n=this.threeDElements.length;i<n;){if(e<=this.threeDElements[i].endPos){for(var r,s=this.threeDElements[i].startPos;s<e;)this.elements[s]&&this.elements[s].getBaseElement&&(r=this.elements[s].getBaseElement()),s+=1;r?this.threeDElements[i].container.insertBefore(t,r):this.threeDElements[i].container.appendChild(t);break}i+=1}},HybridRendererBase.prototype.configAnimation=function(t){var e=createTag("div"),i=this.animationItem.wrapper,n=e.style;n.width=t.w+"px",n.height=t.h+"px",this.resizerElem=e,styleDiv(e),n.transformStyle="flat",n.mozTransformStyle="flat",n.webkitTransformStyle="flat",this.renderConfig.className&&e.setAttribute("class",this.renderConfig.className),i.appendChild(e),n.overflow="hidden";var r=createNS("svg");r.setAttribute("width","1"),r.setAttribute("height","1"),styleDiv(r),this.resizerElem.appendChild(r);var s=createNS("defs");r.appendChild(s),this.data=t,this.setupGlobalData(t,r),this.globalData.defs=s,this.layers=t.layers,this.layerElement=this.resizerElem,this.build3dContainers(),this.updateContainerSize()},HybridRendererBase.prototype.destroy=function(){var t;this.animationItem.wrapper&&(this.animationItem.wrapper.innerText=""),this.animationItem.container=null,this.globalData.defs=null;var e=this.layers?this.layers.length:0;for(t=0;t<e;t+=1)this.elements[t]&&this.elements[t].destroy&&this.elements[t].destroy();this.elements.length=0,this.destroyed=!0,this.animationItem=null},HybridRendererBase.prototype.updateContainerSize=function(){var t,e,i,n,r=this.animationItem.wrapper.offsetWidth,s=this.animationItem.wrapper.offsetHeight,a=r/s;this.globalData.compSize.w/this.globalData.compSize.h>a?(t=r/this.globalData.compSize.w,e=r/this.globalData.compSize.w,i=0,n=(s-this.globalData.compSize.h*(r/this.globalData.compSize.w))/2):(t=s/this.globalData.compSize.h,e=s/this.globalData.compSize.h,i=(r-this.globalData.compSize.w*(s/this.globalData.compSize.h))/2,n=0);var o=this.resizerElem.style;o.webkitTransform="matrix3d("+t+",0,0,0,0,"+e+",0,0,0,0,1,0,"+i+","+n+",0,1)",o.transform=o.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var t,e=this.globalData.compSize.w,i=this.globalData.compSize.h,n=this.threeDElements.length;for(t=0;t<n;t+=1){var r=this.threeDElements[t].perspectiveElem.style;r.webkitPerspective=Math.sqrt(Math.pow(e,2)+Math.pow(i,2))+"px",r.perspective=r.webkitPerspective}}},HybridRendererBase.prototype.searchExtraCompositions=function(t){var e,i=t.length,n=createTag("div");for(e=0;e<i;e+=1)if(t[e].xt){var r=this.createComp(t[e],n,this.globalData.comp,null);r.initExpressions(),this.globalData.projectInterface.registerComposition(r)}},extendPrototype([HybridRendererBase,ICompElement,HBaseElement],HCompElement),HCompElement.prototype._createBaseContainerElements=HCompElement.prototype.createContainerElements,HCompElement.prototype.createContainerElements=function(){this._createBaseContainerElements(),this.data.hasMask?(this.svgElement.setAttribute("width",this.data.w),this.svgElement.setAttribute("height",this.data.h),this.transformedElement=this.baseElement):this.transformedElement=this.layerElement},HCompElement.prototype.addTo3dContainer=function(t,e){for(var i,n=0;n<e;)this.elements[n]&&this.elements[n].getBaseElement&&(i=this.elements[n].getBaseElement()),n+=1;i?this.layerElement.insertBefore(t,i):this.layerElement.appendChild(t)},HCompElement.prototype.createComp=function(t){return this.supports3d?new HCompElement(t,this.globalData,this):new SVGCompElement(t,this.globalData,this)},extendPrototype([HybridRendererBase],HybridRenderer),HybridRenderer.prototype.createComp=function(t){return this.supports3d?new HCompElement(t,this.globalData,this):new SVGCompElement(t,this.globalData,this)};var CompExpressionInterface=function(t){function e(e){for(var i=0,n=t.layers.length;i<n;){if(t.layers[i].nm===e||t.layers[i].ind===e)return t.elements[i].layerInterface;i+=1}return null}return Object.definePrope
vendor: 5,129 bytes, line 2
2rty(e,"_name",{value:t.data.nm}),e.layer=e,e.pixelAspect=1,e.height=t.data.h||t.globalData.compSize.h,e.width=t.data.w||t.globalData.compSize.w,e.pixelAspect=1,e.frameDuration=1/t.globalData.frameRate,e.displayStartTime=0,e.numLayers=t.layers.length,e};function _typeof$2(t){return _typeof$2="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$2(t)}function seedRandom(t,e){var i=this,n=256,r="random",s=e.pow(n,6),a=e.pow(2,52),o=2*a,l=255;function h(t){var e,i=t.length,r=this,s=0,a=r.i=r.j=0,o=r.S=[];for(i||(t=[i++]);s<n;)o[s]=s++;for(s=0;s<n;s++)o[s]=o[a=l&a+t[s%i]+(e=o[s])],o[a]=e;r.g=function(t){for(var e,i=0,s=r.i,a=r.j,o=r.S;t--;)e=o[s=l&s+1],i=i*n+o[l&(o[s]=o[a=l&a+e])+(o[a]=e)];return r.i=s,r.j=a,i}}function c(t,e){return e.i=t.i,e.j=t.j,e.S=t.S.slice(),e}function u(t,e){var i,n=[],r=_typeof$2(t);if(e&&"object"==r)for(i in t)try{n.push(u(t[i],e-1))}catch(t){}return n.length?n:"string"==r?t:t+"\0"}function d(t,e){for(var i,n=t+"",r=0;r<n.length;)e[l&r]=l&(i^=19*e[l&r])+n.charCodeAt(r++);return f(e)}function f(t){return String.fromCharCode.apply(0,t)}e["seed"+r]=function(l,p,m){var g=[],y=d(u((p=!0===p?{entropy:!0}:p||{}).entropy?[l,f(t)]:null===l?function(){try{var e=new Uint8Array(n);return(i.crypto||i.msCrypto).getRandomValues(e),f(e)}catch(e){var r=i.navigator,s=r&&r.plugins;return[+new Date,i,s,i.screen,f(t)]}}():l,3),g),v=new h(g),b=function(){for(var t=v.g(6),e=s,i=0;t<a;)t=(t+i)*n,e*=n,i=v.g(1);for(;t>=o;)t/=2,e/=2,i>>>=1;return(t+i)/e};return b.int32=function(){return 0|v.g(4)},b.quick=function(){return v.g(4)/4294967296},b.double=b,d(f(v.S),t),(p.pass||m||function(t,i,n,s){return s&&(s.S&&c(s,v),t.state=function(){return c(v,{})}),n?(e[r]=t,i):t})(b,y,"global"in p?p.global:this==e,p.state)},d(e.random(),t)}function initialize$2(t){seedRandom([],t)}var propTypes={SHAPE:"shape"};function _typeof$1(t){return _typeof$1="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof$1(t)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null,_lottieGlobal={};function resetFrame(){_lottieGlobal={}}function $bm_isInstanceOfArray(t){return t.constructor===Array||t.constructor===Float32Array}function isNumerable(t,e){return"number"===t||e instanceof Number||"boolean"===t||"string"===t}function $bm_neg(t){var e=_typeof$1(t);if("number"===e||t instanceof Number||"boolean"===e)return-t;if($bm_isInstanceOfArray(t)){var i,n=t.length,r=[];for(i=0;i<n;i+=1)r[i]=-t[i];return r}return t.propType?t.v:-t}initialize$2(BMMath);var easeInBez=BezierFactory.getBezierEasing(.333,0,.833,.833,"easeIn").get,easeOutBez=BezierFactory.getBezierEasing(.167,.167,.667,1,"easeOut").get,easeInOutBez=BezierFactory.getBezierEasing(.33,0,.667,1,"easeInOut").get;function sum(t,e){var i=_typeof$1(t),n=_typeof$1(e);if(isNumerable(i,t)&&isNumerable(n,e)||"string"===i||"string"===n)return t+e;if($bm_isInstanceOfArray(t)&&isNumerable(n,e))return(t=t.slice(0))[0]+=e,t;if(isNumerable(i,t)&&$bm_isInstanceOfArray(e))return(e=e.slice(0))[0]=t+e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var r=0,s=t.length,a=e.length,o=[];r<s||r<a;)("number"==typeof t[r]||t[r]instanceof Number)&&("number"==typeof e[r]||e[r]instanceof Number)?o[r]=t[r]+e[r]:o[r]=void 0===e[r]?t[r]:t[r]||e[r],r+=1;return o}return 0}var add=sum;function sub(t,e){var i=_typeof$1(t),n=_typeof$1(e);if(isNumerable(i,t)&&isNumerable(n,e))return"string"===i&&(t=parseInt(t,10)),"string"===n&&(e=parseInt(e,10)),t-e;if($bm_isInstanceOfArray(t)&&isNumerable(n,e))return(t=t.slice(0))[0]-=e,t;if(isNumerable(i,t)&&$bm_isInstanceOfArray(e))return(e=e.slice(0))[0]=t-e[0],e;if($bm_isInstanceOfArray(t)&&$bm_isInstanceOfArray(e)){for(var r=0,s=t.length,a=e.length,o=[];r<s||r<a;)("number"==typeof t[r]||t[r]instanceof Number)&&("number"==typeof e[r]||e[r]instanceof Number)?o[r]=t[r]-e[r]:o[r]=void 0===e[r]?t[r]:t[r]||e[r],r+=1;return o}return 0}function mul(t,e){var i,n,r,s=_typeof$1(t),a=_typeof$1(e);if(isNumerable(s,t)&&isNumerable(a,e))return t*e;if($bm_isInstanceOfArray(t)&&isNumerable(a,e)){for(r=t.length,i=createTypedArray("float32",r),n=0;n<r;n+=1)i[n]=t[n]*e;return i}if(isNumerable(s,t)&&$bm_isInstanceOfArray(e)){for(r=e.length,i=createTypedArray("float32",r),n=0;n<r;n+=1)i[n]=t*e[n];return i}return 0}function div(t,e){var i,n,r,s=_typeof$1(t),a=_typeof$1(e);if(isNumerable(s,t)&&isNumerable(a,e))return t/e;if($bm_isInstanceOfArray(t)&&isNumerable(a,e)){for(r=t.length,i=createTypedArray("float32",r),n=0;n<r;n+=1)i[n]=t[n]/e;return i}if(isNumerable(s,t)&&$bm_isInstanceOfArray(e)){for(r=e.length,i=createTypedArray("float32",r),n=0;n<r;n+=1)i[n]=t/e[n];return i}return 0}function mod(t,e){return"string"==typeof t&&(t=parseInt(t,10)),"string"==typeof e&&(e=parseInt(e,10)),t%e}var $bm_sum=sum,$bm_sub=sub,$bm_mul=mul,$bm_div=div,$bm_mod=mod;
vendor: 15,590 bytes, line 2
2function clamp(t,e,i){if(e>i){var n=i;i=e,e=n}return Math.min(Math.max(t,e),i)}function radiansToDegrees(t){return t/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(t){return t*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(t,e){if("number"==typeof t||t instanceof Number)return e=e||0,Math.abs(t-e);var i;e||(e=helperLengthArray);var n=Math.min(t.length,e.length),r=0;for(i=0;i<n;i+=1)r+=Math.pow(e[i]-t[i],2);return Math.sqrt(r)}function normalize(t){return div(t,length(t))}function rgbToHsl(t){var e,i,n=t[0],r=t[1],s=t[2],a=Math.max(n,r,s),o=Math.min(n,r,s),l=(a+o)/2;if(a===o)e=0,i=0;else{var h=a-o;switch(i=l>.5?h/(2-a-o):h/(a+o),a){case n:e=(r-s)/h+(r<s?6:0);break;case r:e=(s-n)/h+2;break;case s:e=(n-r)/h+4}e/=6}return[e,i,l,t[3]]}function hue2rgb(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}function hslToRgb(t){var e,i,n,r=t[0],s=t[1],a=t[2];if(0===s)e=a,n=a,i=a;else{var o=a<.5?a*(1+s):a+s-a*s,l=2*a-o;e=hue2rgb(l,o,r+1/3),i=hue2rgb(l,o,r),n=hue2rgb(l,o,r-1/3)}return[e,i,n,t[3]]}function linear(t,e,i,n,r){if(void 0!==n&&void 0!==r||(n=e,r=i,e=0,i=1),i<e){var s=i;i=e,e=s}if(t<=e)return n;if(t>=i)return r;var a,o=i===e?0:(t-e)/(i-e);if(!n.length)return n+(r-n)*o;var l=n.length,h=createTypedArray("float32",l);for(a=0;a<l;a+=1)h[a]=n[a]+(r[a]-n[a])*o;return h}function random(t,e){if(void 0===e&&(void 0===t?(t=0,e=1):(e=t,t=void 0)),e.length){var i,n=e.length;t||(t=createTypedArray("float32",n));var r=createTypedArray("float32",n),s=BMMath.random();for(i=0;i<n;i+=1)r[i]=t[i]+s*(e[i]-t[i]);return r}return void 0===t&&(t=0),t+BMMath.random()*(e-t)}function createPath(t,e,i,n){var r,s=t.length,a=shapePool.newElement();a.setPathData(!!n,s);var o,l,h=[0,0];for(r=0;r<s;r+=1)o=e&&e[r]?e[r]:h,l=i&&i[r]?i[r]:h,a.setTripleAt(t[r][0],t[r][1],l[0]+t[r][0],l[1]+t[r][1],o[0]+t[r][0],o[1]+t[r][1],r,!0);return a}function initiateExpression(elem,data,property){function noOp(t){return t}if(!elem.globalData.renderConfig.runExpressions)return noOp;var val=data.x,needsVelocity=/velocity(?![\w\d])/.test(val),_needsRandom=-1!==val.indexOf("random"),elemType=elem.data.ty,transform,$bm_transform,content,effect,thisProperty=property;thisProperty.valueAtTime=thisProperty.getValueAtTime,Object.defineProperty(thisProperty,"value",{get:function(){return thisProperty.v}}),elem.comp.frameDuration=1/elem.comp.globalData.frameRate,elem.comp.displayStartTime=0;var inPoint=elem.data.ip/elem.comp.globalData.frameRate,outPoint=elem.data.op/elem.comp.globalData.frameRate,width=elem.data.sw?elem.data.sw:0,height=elem.data.sh?elem.data.sh:0,name=elem.data.nm,loopIn,loop_in,loopOut,loop_out,smooth,toWorld,fromWorld,fromComp,toComp,fromCompToSurface,position,rotation,anchorPoint,scale,thisLayer,thisComp,mask,valueAtTime,velocityAtTime,scoped_bm_rt,expression_function=eval("[function _expression_function(){"+val+";scoped_bm_rt=$bm_rt}]")[0],numKeys=property.kf?data.k.length:0,active=!this.data||!0!==this.data.hd,wiggle=function(t,e){var i,n,r=this.pv.length?this.pv.length:1,s=createTypedArray("float32",r),a=Math.floor(5*time);for(i=0,n=0;i<a;){for(n=0;n<r;n+=1)s[n]+=-e+2*e*BMMath.random();i+=1}var o=5*time,l=o-Math.floor(o),h=createTypedArray("float32",r);if(r>1){for(n=0;n<r;n+=1)h[n]=this.pv[n]+s[n]+(-e+2*e*BMMath.random())*l;return h}return this.pv+s[0]+(-e+2*e*BMMath.random())*l}.bind(this);function loopInDuration(t,e){return loopIn(t,e,!0)}function loopOutDuration(t,e){return loopOut(t,e,!0)}thisProperty.loopIn&&(loopIn=thisProperty.loopIn.bind(thisProperty),loop_in=loopIn),thisProperty.loopOut&&(loopOut=thisProperty.loopOut.bind(thisProperty),loop_out=loopOut),thisProperty.smooth&&(smooth=thisProperty.smooth.bind(thisProperty)),this.getValueAtTime&&(valueAtTime=this.getValueAtTime.bind(this)),this.getVelocityAtTime&&(velocityAtTime=this.getVelocityAtTime.bind(this));var comp=elem.comp.globalData.projectInterface.bind(elem.comp.globalData.projectInterface),time,velocity,value,text,textIndex,textTotal,selectorValue;function lookAt(t,e){var i=[e[0]-t[0],e[1]-t[1],e[2]-t[2]],n=Math.atan2(i[0],Math.sqrt(i[1]*i[1]+i[2]*i[2]))/degToRads;return[-Math.atan2(i[1],i[2])/degToRads,n,0]}function easeOut(t,e,i,n,r){return applyEase(easeOutBez,t,e,i,n,r)}function easeIn(t,e,i,n,r){return applyEase(easeInBez,t,e,i,n,r)}function ease(t,e,i,n,r){return applyEase(easeInOutBez,t,e,i,n,r)}function applyEase(t,e,i,n,r,s){void 0===r?(r=i,s=n):e=(e-i)/(n-i),e>1?e=1:e<0&&(e=0);var a=t(e);if($bm_isInstanceOfArray(r)){var o,l=r.length,h=createTypedArray("float32",l);for(o=0;o<l;o+=1)h[o]=(s[o]-r[o])*a+r[o];return h}return(s-r)*a+r}function nearestKey(t){var e,i,n,r=data.k.length;if(data.k.length&&"number"!=typeof data.k[0])if(i=-1,(t*=elem.comp.globalData.frameRate)<data.k[0].t)i=1,n=data.k[0].t;else{for(e=0;e<r-1;e+=1){if(t===data.k[e].t){i=e+1,n=data.k[e].t;break}if(t>data.k[e].t&&t<data.k[e+1].t){t-data.k[e].t>data.k[e+1].t-t?(i=e+2,n=data.k[e+1].t):(i=e+1,n=data.k[e].t);break}}-1===i&&(i=e+1,n=data.k[e].t)}else i=0,n=0;var s={};return s.index=i,s.time=n/elem.comp.globalData.frameRate,s}function key(t){var e,i,n;if(!data.k.length||"number"==typeof data.k[0])throw new Error("The property has no keyframe at index "+t);t-=1,e={time:data.k[t].t/elem.comp.globalData.frameRate,value:[]};var r=Object.prototype.hasOwnProperty.call(data.k[t],"s")?data.k[t].s:data.k[t-1].e;for(n=r.length,i=0;i<n;i+=1)e[i]=r[i],e.value[i]=r[i];return e}function framesToTime(t,e){return e||(e=elem.comp.globalData.frameRate),t/e}function timeToFrames(t,e){return t||0===t||(t=time),e||(e=elem.comp.globalData.frameRate),t*e}function seedRandom(t){BMMath.seedrandom(randSeed+t)}function sourceRectAtTime(){return elem.sourceRectAtTime()}function substring(t,e){return"string"==typeof value?void 0===e?value.substring(t):value.substring(t,e):""}function substr(t,e){return"string"==typeof value?void 0===e?value.substr(t):value.substr(t,e):""}function posterizeTime(t){time=0===t?0:Math.floor(time*t)/t,value=valueAtTime(time)}var index=elem.data.ind,hasParent=!(!elem.hierarchy||!elem.hierarchy.length),parent,randSeed=Math.floor(1e6*Math.random()),globalData=elem.globalData;function executeExpression(t){return value=t,this.frameExpressionId===elem.globalData.frameId&&"textSelector"!==this.propType?value:("textSelector"===this.propType&&(textIndex=this.textIndex,textTotal=this.textTotal,selectorValue=this.selectorValue),thisLayer||(text=elem.layerInterface.text,thisLayer=elem.layerInterface,thisComp=elem.comp.compInterface,toWorld=thisLayer.toWorld.bind(thisLayer),fromWorld=thisLayer.fromWorld.bind(thisLayer),fromComp=thisLayer.fromComp.bind(thisLayer),toComp=thisLayer.toComp.bind(thisLayer),mask=thisLayer.mask?thisLayer.mask.bind(thisLayer):null,fromCompToSurface=fromComp),transform||(transform=elem.layerInterface("ADBE Transform Group"),$bm_transform=transform,transform&&(anchorPoint=transform.anchorPoint)),4!==elemType||content||(content=thisLayer("ADBE Root Vectors Group")),effect||(effect=thisLayer(4)),(hasParent=!(!elem.hierarchy||!elem.hierarchy.length))&&!parent&&(parent=elem.hierarchy[0].layerInterface),time=this.comp.renderedFrame/this.comp.globalData.frameRate,_needsRandom&&seedRandom(randSeed+time),needsVelocity&&(velocity=velocityAtTime(time)),expression_function(),this.frameExpressionId=elem.globalData.frameId,scoped_bm_rt=scoped_bm_rt.propType===propTypes.SHAPE?scoped_bm_rt.v:scoped_bm_rt)}return executeExpression.__preventDeadCodeRemoval=[$bm_transform,anchorPoint,time,velocity,inPoint,outPoint,width,height,name,loop_in,loop_out,smooth,toComp,fromCompToSurface,toWorld,fromWorld,mask,position,rotation,scale,thisComp,numKeys,active,wiggle,loopInDuration,loopOutDuration,comp,lookAt,easeOut,easeIn,ease,nearestKey,key,text,textIndex,textTotal,selectorValue,framesToTime,timeToFrames,sourceRectAtTime,substring,substr,posterizeTime,index,globalData],executeExpression}return ob.initiateExpression=initiateExpression,ob.__preventDeadCodeRemoval=[window,document,XMLHttpRequest,fetch,frames,$bm_neg,add,$bm_sum,$bm_sub,$bm_mul,$bm_div,$bm_mod,clamp,radians_to_degrees,degreesToRadians,degrees_to_radians,normalize,rgbToHsl,hslToRgb,linear,random,createPath,_lottieGlobal],ob.resetFrame=resetFrame,ob}(),Expressions=function(){var t={initExpressions:function(t){var e=0,i=[];t.renderer.compInterface=CompExpressionInterface(t.renderer),t.renderer.globalData.projectInterface.registerComposition(t.renderer),t.renderer.globalData.pushExpression=function(){e+=1},t.renderer.globalData.popExpression=function(){0==(e-=1)&&function(){var t,e=i.length;for(t=0;t<e;t+=1)i[t].release();i.length=0}()},t.renderer.globalData.registerExpressionProperty=function(t){-1===i.indexOf(t)&&i.push(t)}}};return t.resetFrame=ExpressionManager.resetFrame,t}(),MaskManagerInterface=function(){function t(t,e){this._mask=t,this._data=e}return Object.defineProperty(t.prototype,"maskPath",{get:function(){return this._mask.prop.k&&this._mask.prop.getValue(),this._mask.prop}}),Object.defineProperty(t.prototype,"maskOpacity",{get:function(){return this._mask.op.k&&this._mask.op.getValue(),100*this._mask.op.v}}),function(e){var i,n=createSizedArray(e.viewData.length),r=e.viewData.length;for(i=0;i<r;i+=1)n[i]=new t(e.viewData[i],e.masksProperties[i]);return function(t){for(i=0;i<r;){if(e.masksProperties[i].nm===t)return n[i];i+=1}return null}}}(),ExpressionPropertyInterface=function(){var t={pv:0,v:0,mult:1},e={pv:[0,0,0],v:[0,0,0],mult:1};function i(t,e,i){Object.defineProperty(t,"velocity",{get:function(){return e.getVelocityAtTime(e.comp.currentFrame)}}),t.numKeys=e.keyframes?e.keyframes.length:0,t.key=function(n){if(!t.numKeys)return 0;var r;r="s"in e.keyframes[n-1]?e.keyframes[n-1].s:"e"in e.keyframes[n-2]?e.keyframes[n-2].e:e.keyframes[n-2].s;var s="unidimensional"===i?new Number(r):Object.assign({},r);return s.time=e.keyframes[n-1].t/e.elem.comp.globalData.frameRate,s.value="unidimensional"===i?r[0]:r,s},t.valueAtTime=e.getValueAtTime,t.speedAtTime=e.getSpeedAtTime,t.velocityAtTime=e.getVelocityAtTime,t.propertyGroup=e.propertyGroup}function n(){return t}return function(r){return r?"unidimensional"===r.propType?function(e){e&&"pv"in e||(e=t);var n=1/e.mult,r=e.pv*n,s=new Number(r);return s.value=r,i(s,e,"unidimensional"),function(){return e.k&&e.getValue(),r=e.v*n,s.value!==r&&((s=new Number(r)).value=r,i(s,e,"unidimensional")),s}}(r):function(t){t&&"pv"in t||(t=e);var n=1/t.mult,r=t.data&&t.data.l||t.pv.length,s=createTypedArray("float32",r),a=createTypedArray("float32",r);return s.value=a,i(s,t,"multidimensional"),function(){t.k&&t.getValue();for(var e=0;e<r;e+=1)a[e]=t.v[e]*n,s[e]=a[e];return s}}(r):n}}(),TransformExpressionInterface=function(t){function e(t){switch(t){case"scale":case"Scale":case"ADBE Scale":case 6:return e.scale;case"rotation":case"Rotation":case"ADBE Rotation":case"ADBE Rotate Z":case 10:return e.rotation;case"ADBE Rotate X":return e.xRotation;case"ADBE Rotate Y":return e.yRotation;case"position":case"Position":case"ADBE Position":case 2:return e.position;case"ADBE Position_0":return e.xPosition;case"ADBE Position_1":return e.yPosition;case"ADBE Position_2":return e.zPosition;case"anchorPoint":case"AnchorPoint":case"Anchor Point":case"ADBE AnchorPoint":case 1:return e.anchorPoint;case"opacity":case"Opacity":case 11:return e.opacity;default:return null}}var i,n,r,s;return Object.defineProperty(e,"rotation",{get:ExpressionPropertyInterface(t.r||t.rz)}),Object.defineProperty(e,"zRotation",{get:ExpressionPropertyInterface(t.rz||t.r)}),Object.defineProperty(e,"xRotation",{get:ExpressionPropertyInterface(t.rx)}),Object.defineProperty(e,"yRotation",{get:ExpressionPropertyInterface(t.ry)}),Object.defineProperty(e,"scale",{get:ExpressionPropertyInterface(t.s)}),t.p?s=ExpressionPropertyInterface(t.p):(i=ExpressionPropertyInterface(t.px),n=ExpressionPropertyInterface(t.py),t.pz&&(r=ExpressionPropertyInterface(t.pz))),Object.defineProperty(e,"position",{get:function(){return t.p?s():[i(),n(),r?r():0]}}),Object.defineProperty(e,"xPosition",{get:ExpressionPropertyInterface(t.px)}),Object.defineProperty(e,"yPosition",{get:ExpressionPropertyInterface(t.py)}),Object.defineProperty(e,"zPosition",{get:ExpressionPropertyInterface(t.pz)}),Object.defineProperty(e,"anchorPoint",{get:ExpressionPropertyInterface(t.a)}),Object.defineProperty(e,"opacity",{get:ExpressionPropertyInterface(t.o)}),Object.defineProperty(e,"skew",{get:ExpressionPropertyInterface(t.sk)}),Object.defineProperty(e,"skewAxis",{get:ExpressionPropertyInterface(t.sa)}),Object.defineProperty(e,"orientation",{get:ExpressionPropertyInterface(t.or)}),e},LayerExpressionInterface=function(){function t(t){var e=new Matrix;return void 0!==t?this._elem.finalTransform.mProp.getValueAtTime(t).clone(e):this._elem.finalTransform.mProp.applyToMatrix(e),e}function e(t,e){var i=this.getMatrix(e);return i.props[12]=0,i.props[13]=0,i.props[14]=0,this.applyPoint(i,t)}function i(t,e){var i=this.getMatrix(e);return this.applyPoint(i,t)}function n(t,e){var i=this.getMatrix(e);return i.props[12]=0,i.props[13]=0,i.props[14]=0,this.invertPoint(i,t)}function r(t,e){var i=this.getMatrix(e);return this.invertPoint(i,t)}function s(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var i,n=this._elem.hierarchy.length;for(i=0;i<n;i+=1)this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(t)}return t.applyToPointArray(e[0],e[1],e[2]||0)}function a(t,e){if(this._elem.hierarchy&&this._elem.hierarchy.length){var i,n=this._elem.hierarchy.length;for(i=0;i<n;i+=1)this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(t)}return t.inversePoint(e)}function o(t){var e=new Matrix;if(e.reset(),this._elem.finalTransform.mProp.applyToMatrix(e),this._elem.hierarchy&&this._elem.hierarchy.length){var i,n=this._elem.hierarchy.length;for(i=0;i<n;i+=1)this._elem.hierarchy[i].finalTransform.mProp.applyToMatrix(e);return e.inversePoint(t)}return e.inversePoint(t)}function l(){return[1,1,1,1]}return function(h){var c;function u(t){switch(t){case"ADBE Root Vectors Group":case"Contents":case 2:return u.shapeInterface;case 1:case 6:case"Transform":case"transform":case"ADBE Transform Group":return c;case 4:case"ADBE Effect Parade":case"effects":case"Effects":return u.effect;case"ADBE Text Properties":return u.textInterface;default:return null}}u.getMatrix=t,u.invertPoint=a,u.applyPoint=s,u.toWorld=i,u.toWorldVec=e,u.fromWorld=r,u.fromWorldVec=n,u.toComp=i,u.fromComp=o,u.sampleImage=l,u.sourceRectAtTime=h.sourceRectAtTime.bind(h),u._elem=h;var d=getDescriptor(c=TransformExpressionInterface(h.finalTransform.mProp),"anchorPoint");return Object.defineProperties(u,{hasParent:{get:function(){return h.hierarchy.length}},parent:{get:function(){return h.hierarchy[0].layerInterface}},rotation:getDescriptor(c,"rotation"),scale:getDescriptor(c,"scale"),position:getDescriptor(c,"position"),opacity:getDescriptor(c,"opacity"),anchorPoint:d,anchor_point:d,transform:{get:function(){return c}},active:{get:function(){return h.isInRange}}}),u.startTime=h.data.st,u.index=h.data.ind,u.source=h.data.refId,u.height=0===h.data.ty?h.data.h:100,u.width=0===h.data.ty?h.data.w:100,u.inPoint=h.data.ip/h.comp.globalData.frameRate,u.outPoint=h.data.op/h.comp.globalData.frameRate,u._name=h.data.nm,u.registerMaskInterface=function(t){u.mask=new MaskManagerInterface(t,h)},u.registerEffectsInterface=function(t){u.effect=t},u}}(),propertyGroupFactory=function(t,e){return function(i){return(i=void 0===i?1:i)<=0?t:e(i-1)}},PropertyInterface=function(t,e){var i={_name:t};return function(t){return(t=void 0===t?1:t)<=0?i:e(t-1)}}
vendor: 23,083 bytes, line 2
2,EffectsExpressionInterface=function(){function t(i,n,r,s){function a(t){for(var e=i.ef,n=0,r=e.length;n<r;){if(t===e[n].nm||t===e[n].mn||t===e[n].ix)return 5===e[n].ty?h[n]:h[n]();n+=1}throw new Error}var o,l=propertyGroupFactory(a,r),h=[],c=i.ef.length;for(o=0;o<c;o+=1)5===i.ef[o].ty?h.push(t(i.ef[o],n.effectElements[o],n.effectElements[o].propertyGroup,s)):h.push(e(n.effectElements[o],i.ef[o].ty,s,l));return"ADBE Color Control"===i.mn&&Object.defineProperty(a,"color",{get:function(){return h[0]()}}),Object.defineProperties(a,{numProperties:{get:function(){return i.np}},_name:{value:i.nm},propertyGroup:{value:l}}),a.enabled=0!==i.en,a.active=a.enabled,a}function e(t,e,i,n){var r=ExpressionPropertyInterface(t.p);return t.p.setGroupProperty&&t.p.setGroupProperty(PropertyInterface("",n)),function(){return 10===e?i.comp.compInterface(t.p.v):r()}}return{createEffectsInterface:function(e,i){if(e.effectsManager){var n,r=[],s=e.data.ef,a=e.effectsManager.effectElements.length;for(n=0;n<a;n+=1)r.push(t(s[n],e.effectsManager.effectElements[n],i,e));var o=e.data.ef||[],l=function(t){for(n=0,a=o.length;n<a;){if(t===o[n].nm||t===o[n].mn||t===o[n].ix)return r[n];n+=1}return null};return Object.defineProperty(l,"numProperties",{get:function(){return o.length}}),l}return null}}}(),ShapePathInterface=function(t,e,i){var n=e.sh;function r(t){return"Shape"===t||"shape"===t||"Path"===t||"path"===t||"ADBE Vector Shape"===t||2===t?r.path:null}var s=propertyGroupFactory(r,i);return n.setGroupProperty(PropertyInterface("Path",s)),Object.defineProperties(r,{path:{get:function(){return n.k&&n.getValue(),n}},shape:{get:function(){return n.k&&n.getValue(),n}},_name:{value:t.nm},ix:{value:t.ix},propertyIndex:{value:t.ix},mn:{value:t.mn},propertyGroup:{value:i}}),r},ShapeExpressionInterface=function(){function t(t,o,f){var p,m=[],g=t?t.length:0;for(p=0;p<g;p+=1)"gr"===t[p].ty?m.push(e(t[p],o[p],f)):"fl"===t[p].ty?m.push(i(t[p],o[p],f)):"st"===t[p].ty?m.push(s(t[p],o[p],f)):"tm"===t[p].ty?m.push(a(t[p],o[p],f)):"tr"===t[p].ty||("el"===t[p].ty?m.push(l(t[p],o[p],f)):"sr"===t[p].ty?m.push(h(t[p],o[p],f)):"sh"===t[p].ty?m.push(ShapePathInterface(t[p],o[p],f)):"rc"===t[p].ty?m.push(c(t[p],o[p],f)):"rd"===t[p].ty?m.push(u(t[p],o[p],f)):"rp"===t[p].ty?m.push(d(t[p],o[p],f)):"gf"===t[p].ty?m.push(n(t[p],o[p],f)):m.push(r(t[p],o[p])));return m}function e(e,i,n){var r=function(t){switch(t){case"ADBE Vectors Group":case"Contents":case 2:return r.content;default:return r.transform}};r.propertyGroup=propertyGroupFactory(r,n);var s=function(e,i,n){var r,s=function(t){for(var e=0,i=r.length;e<i;){if(r[e]._name===t||r[e].mn===t||r[e].propertyIndex===t||r[e].ix===t||r[e].ind===t)return r[e];e+=1}return"number"==typeof t?r[t-1]:null};s.propertyGroup=propertyGroupFactory(s,n),r=t(e.it,i.it,s.propertyGroup),s.numProperties=r.length;var a=o(e.it[e.it.length-1],i.it[i.it.length-1],s.propertyGroup);return s.transform=a,s.propertyIndex=e.cix,s._name=e.nm,s}(e,i,r.propertyGroup),a=o(e.it[e.it.length-1],i.it[i.it.length-1],r.propertyGroup);return r.content=s,r.transform=a,Object.defineProperty(r,"_name",{get:function(){return e.nm}}),r.numProperties=e.np,r.propertyIndex=e.ix,r.nm=e.nm,r.mn=e.mn,r}function i(t,e,i){function n(t){return"Color"===t||"color"===t?n.color:"Opacity"===t||"opacity"===t?n.opacity:null}return Object.defineProperties(n,{color:{get:ExpressionPropertyInterface(e.c)},opacity:{get:ExpressionPropertyInterface(e.o)},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(PropertyInterface("Color",i)),e.o.setGroupProperty(PropertyInterface("Opacity",i)),n}function n(t,e,i){function n(t){return"Start Point"===t||"start point"===t?n.startPoint:"End Point"===t||"end point"===t?n.endPoint:"Opacity"===t||"opacity"===t?n.opacity:null}return Object.defineProperties(n,{startPoint:{get:ExpressionPropertyInterface(e.s)},endPoint:{get:ExpressionPropertyInterface(e.e)},opacity:{get:ExpressionPropertyInterface(e.o)},type:{get:function(){return"a"}},_name:{value:t.nm},mn:{value:t.mn}}),e.s.setGroupProperty(PropertyInterface("Start Point",i)),e.e.setGroupProperty(PropertyInterface("End Point",i)),e.o.setGroupProperty(PropertyInterface("Opacity",i)),n}function r(){return function(){return null}}function s(t,e,i){var n,r=propertyGroupFactory(h,i),s=propertyGroupFactory(l,r);function a(i){Object.defineProperty(l,t.d[i].nm,{get:ExpressionPropertyInterface(e.d.dataProps[i].p)})}var o=t.d?t.d.length:0,l={};for(n=0;n<o;n+=1)a(n),e.d.dataProps[n].p.setGroupProperty(s);function h(t){return"Color"===t||"color"===t?h.color:"Opacity"===t||"opacity"===t?h.opacity:"Stroke Width"===t||"stroke width"===t?h.strokeWidth:null}return Object.defineProperties(h,{color:{get:ExpressionPropertyInterface(e.c)},opacity:{get:ExpressionPropertyInterface(e.o)},strokeWidth:{get:ExpressionPropertyInterface(e.w)},dash:{get:function(){return l}},_name:{value:t.nm},mn:{value:t.mn}}),e.c.setGroupProperty(PropertyInterface("Color",r)),e.o.setGroupProperty(PropertyInterface("Opacity",r)),e.w.setGroupProperty(PropertyInterface("Stroke Width",r)),h}function a(t,e,i){function n(e){return e===t.e.ix||"End"===e||"end"===e?n.end:e===t.s.ix?n.start:e===t.o.ix?n.offset:null}var r=propertyGroupFactory(n,i);return n.propertyIndex=t.ix,e.s.setGroupProperty(PropertyInterface("Start",r)),e.e.setGroupProperty(PropertyInterface("End",r)),e.o.setGroupProperty(PropertyInterface("Offset",r)),n.propertyIndex=t.ix,n.propertyGroup=i,Object.defineProperties(n,{start:{get:ExpressionPropertyInterface(e.s)},end:{get:ExpressionPropertyInterface(e.e)},offset:{get:ExpressionPropertyInterface(e.o)},_name:{value:t.nm}}),n.mn=t.mn,n}function o(t,e,i){function n(e){return t.a.ix===e||"Anchor Point"===e?n.anchorPoint:t.o.ix===e||"Opacity"===e?n.opacity:t.p.ix===e||"Position"===e?n.position:t.r.ix===e||"Rotation"===e||"ADBE Vector Rotation"===e?n.rotation:t.s.ix===e||"Scale"===e?n.scale:t.sk&&t.sk.ix===e||"Skew"===e?n.skew:t.sa&&t.sa.ix===e||"Skew Axis"===e?n.skewAxis:null}var r=propertyGroupFactory(n,i);return e.transform.mProps.o.setGroupProperty(PropertyInterface("Opacity",r)),e.transform.mProps.p.setGroupProperty(PropertyInterface("Position",r)),e.transform.mProps.a.setGroupProperty(PropertyInterface("Anchor Point",r)),e.transform.mProps.s.setGroupProperty(PropertyInterface("Scale",r)),e.transform.mProps.r.setGroupProperty(PropertyInterface("Rotation",r)),e.transform.mProps.sk&&(e.transform.mProps.sk.setGroupProperty(PropertyInterface("Skew",r)),e.transform.mProps.sa.setGroupProperty(PropertyInterface("Skew Angle",r))),e.transform.op.setGroupProperty(PropertyInterface("Opacity",r)),Object.defineProperties(n,{opacity:{get:ExpressionPropertyInterface(e.transform.mProps.o)},position:{get:ExpressionPropertyInterface(e.transform.mProps.p)},anchorPoint:{get:ExpressionPropertyInterface(e.transform.mProps.a)},scale:{get:ExpressionPropertyInterface(e.transform.mProps.s)},rotation:{get:ExpressionPropertyInterface(e.transform.mProps.r)},skew:{get:ExpressionPropertyInterface(e.transform.mProps.sk)},skewAxis:{get:ExpressionPropertyInterface(e.transform.mProps.sa)},_name:{value:t.nm}}),n.ty="tr",n.mn=t.mn,n.propertyGroup=i,n}function l(t,e,i){function n(e){return t.p.ix===e?n.position:t.s.ix===e?n.size:null}var r=propertyGroupFactory(n,i);n.propertyIndex=t.ix;var s="tm"===e.sh.ty?e.sh.prop:e.sh;return s.s.setGroupProperty(PropertyInterface("Size",r)),s.p.setGroupProperty(PropertyInterface("Position",r)),Object.defineProperties(n,{size:{get:ExpressionPropertyInterface(s.s)},position:{get:ExpressionPropertyInterface(s.p)},_name:{value:t.nm}}),n.mn=t.mn,n}function h(t,e,i){function n(e){return t.p.ix===e?n.position:t.r.ix===e?n.rotation:t.pt.ix===e?n.points:t.or.ix===e||"ADBE Vector Star Outer Radius"===e?n.outerRadius:t.os.ix===e?n.outerRoundness:!t.ir||t.ir.ix!==e&&"ADBE Vector Star Inner Radius"!==e?t.is&&t.is.ix===e?n.innerRoundness:null:n.innerRadius}var r=propertyGroupFactory(n,i),s="tm"===e.sh.ty?e.sh.prop:e.sh;return n.propertyIndex=t.ix,s.or.setGroupProperty(PropertyInterface("Outer Radius",r)),s.os.setGroupProperty(PropertyInterface("Outer Roundness",r)),s.pt.setGroupProperty(PropertyInterface("Points",r)),s.p.setGroupProperty(PropertyInterface("Position",r)),s.r.setGroupProperty(PropertyInterface("Rotation",r)),t.ir&&(s.ir.setGroupProperty(PropertyInterface("Inner Radius",r)),s.is.setGroupProperty(PropertyInterface("Inner Roundness",r))),Object.defineProperties(n,{position:{get:ExpressionPropertyInterface(s.p)},rotation:{get:ExpressionPropertyInterface(s.r)},points:{get:ExpressionPropertyInterface(s.pt)},outerRadius:{get:ExpressionPropertyInterface(s.or)},outerRoundness:{get:ExpressionPropertyInterface(s.os)},innerRadius:{get:ExpressionPropertyInterface(s.ir)},innerRoundness:{get:ExpressionPropertyInterface(s.is)},_name:{value:t.nm}}),n.mn=t.mn,n}function c(t,e,i){function n(e){return t.p.ix===e?n.position:t.r.ix===e?n.roundness:t.s.ix===e||"Size"===e||"ADBE Vector Rect Size"===e?n.size:null}var r=propertyGroupFactory(n,i),s="tm"===e.sh.ty?e.sh.prop:e.sh;return n.propertyIndex=t.ix,s.p.setGroupProperty(PropertyInterface("Position",r)),s.s.setGroupProperty(PropertyInterface("Size",r)),s.r.setGroupProperty(PropertyInterface("Rotation",r)),Object.defineProperties(n,{position:{get:ExpressionPropertyInterface(s.p)},roundness:{get:ExpressionPropertyInterface(s.r)},size:{get:ExpressionPropertyInterface(s.s)},_name:{value:t.nm}}),n.mn=t.mn,n}function u(t,e,i){function n(e){return t.r.ix===e||"Round Corners 1"===e?n.radius:null}var r=propertyGroupFactory(n,i),s=e;return n.propertyIndex=t.ix,s.rd.setGroupProperty(PropertyInterface("Radius",r)),Object.defineProperties(n,{radius:{get:ExpressionPropertyInterface(s.rd)},_name:{value:t.nm}}),n.mn=t.mn,n}function d(t,e,i){function n(e){return t.c.ix===e||"Copies"===e?n.copies:t.o.ix===e||"Offset"===e?n.offset:null}var r=propertyGroupFactory(n,i),s=e;return n.propertyIndex=t.ix,s.c.setGroupProperty(PropertyInterface("Copies",r)),s.o.setGroupProperty(PropertyInterface("Offset",r)),Object.defineProperties(n,{copies:{get:ExpressionPropertyInterface(s.c)},offset:{get:ExpressionPropertyInterface(s.o)},_name:{value:t.nm}}),n.mn=t.mn,n}return function(e,i,n){var r;function s(t){if("number"==typeof t)return 0===(t=void 0===t?1:t)?n:r[t-1];for(var e=0,i=r.length;e<i;){if(r[e]._name===t)return r[e];e+=1}return null}return s.propertyGroup=propertyGroupFactory(s,function(){return n}),r=t(e,i,s.propertyGroup),s.numProperties=r.length,s._name="Contents",s}}(),TextExpressionInterface=function(t){var e;function i(t){return"ADBE Text Document"===t?i.sourceText:null}return Object.defineProperty(i,"sourceText",{get:function(){t.textProperty.getValue();var i=t.textProperty.currentData.t;return e&&i===e.value||((e=new String(i)).value=i||new String(i),Object.defineProperty(e,"style",{get:function(){return{fillColor:t.textProperty.currentData.fc}}})),e}}),i};function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}var FootageInterface=(dataInterfaceFactory=function(t){function e(t){return"Outline"===t?e.outlineInterface():null}return e._name="Outline",e.outlineInterface=function(t){var e="",i=t.getFootageData();function n(t){if(i[t])return e=t,"object"===_typeof(i=i[t])?n:i;var r=t.indexOf(e);if(-1!==r){var s=parseInt(t.substr(r+e.length),10);return"object"===_typeof(i=i[s])?n:i}return""}return function(){return e="",i=t.getFootageData(),n}}(t),e},function(t){function e(t){return"Data"===t?e.dataInterface:null}return e._name="Data",e.dataInterface=dataInterfaceFactory(t),e}),dataInterfaceFactory,interfaces={layer:LayerExpressionInterface,effects:EffectsExpressionInterface,comp:CompExpressionInterface,shape:ShapeExpressionInterface,text:TextExpressionInterface,footage:FootageInterface};function getInterface(t){return interfaces[t]||null}var expressionHelpers={searchExpressions:function(t,e,i){e.x&&(i.k=!0,i.x=!0,i.initiateExpression=ExpressionManager.initiateExpression,i.effectsSequence.push(i.initiateExpression(t,e,i).bind(i)))},getSpeedAtTime:function(t){var e=this.getValueAtTime(t),i=this.getValueAtTime(t+-.01),n=0;if(e.length){var r;for(r=0;r<e.length;r+=1)n+=Math.pow(i[r]-e[r],2);n=100*Math.sqrt(n)}else n=0;return n},getVelocityAtTime:function(t){if(void 0!==this.vel)return this.vel;var e,i,n=-.001,r=this.getValueAtTime(t),s=this.getValueAtTime(t+n);if(r.length)for(e=createTypedArray("float32",r.length),i=0;i<r.length;i+=1)e[i]=(s[i]-r[i])/n;else e=(s-r)/n;return e},getValueAtTime:function(t){return t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastFrame&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastFrame<t?this._cachingAtTime.lastIndex:0,this._cachingAtTime.value=this.interpolateValue(t,this._cachingAtTime),this._cachingAtTime.lastFrame=t),this._cachingAtTime.value},getStaticValueAtTime:function(){return this.pv},setGroupProperty:function(t){this.propertyGroup=t}};function addPropertyDecorator(){function t(t,e,i){if(!this.k||!this.keyframes)return this.pv;t=t?t.toLowerCase():"";var n,r,s,a,o,l=this.comp.renderedFrame,h=this.keyframes,c=h[h.length-1].t;if(l<=c)return this.pv;if(i?r=c-(n=e?Math.abs(c-this.elem.comp.globalData.frameRate*e):Math.max(0,c-this.elem.data.ip)):((!e||e>h.length-1)&&(e=h.length-1),n=c-(r=h[h.length-1-e].t)),"pingpong"===t){if(Math.floor((l-r)/n)%2!=0)return this.getValueAtTime((n-(l-r)%n+r)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var u=this.getValueAtTime(r/this.comp.globalData.frameRate,0),d=this.getValueAtTime(c/this.comp.globalData.frameRate,0),f=this.getValueAtTime(((l-r)%n+r)/this.comp.globalData.frameRate,0),p=Math.floor((l-r)/n);if(this.pv.length){for(a=(o=new Array(u.length)).length,s=0;s<a;s+=1)o[s]=(d[s]-u[s])*p+f[s];return o}return(d-u)*p+f}if("continue"===t){var m=this.getValueAtTime(c/this.comp.globalData.frameRate,0),g=this.getValueAtTime((c-.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(a=(o=new Array(m.length)).length,s=0;s<a;s+=1)o[s]=m[s]+(m[s]-g[s])*((l-c)/this.comp.globalData.frameRate)/5e-4;return o}return m+(l-c)/.001*(m-g)}}return this.getValueAtTime(((l-r)%n+r)/this.comp.globalData.frameRate,0)}function e(t,e,i){if(!this.k)return this.pv;t=t?t.toLowerCase():"";var n,r,s,a,o,l=this.comp.renderedFrame,h=this.keyframes,c=h[0].t;if(l>=c)return this.pv;if(i?r=c+(n=e?Math.abs(this.elem.comp.globalData.frameRate*e):Math.max(0,this.elem.data.op-c)):((!e||e>h.length-1)&&(e=h.length-1),n=(r=h[e].t)-c),"pingpong"===t){if(Math.floor((c-l)/n)%2==0)return this.getValueAtTime(((c-l)%n+c)/this.comp.globalData.frameRate,0)}else{if("offset"===t){var u=this.getValueAtTime(c/this.comp.globalData.frameRate,0),d=this.getValueAtTime(r/this.comp.globalData.frameRate,0),f=this.getValueAtTime((n-(c-l)%n+c)/this.comp.globalData.frameRate,0),p=Math.floor((c-l)/n)+1;if(this.pv.length){for(a=(o=new Array(u.length)).length,s=0;s<a;s+=1)o[s]=f[s]-(d[s]-u[s])*p;return o}return f-(d-u)*p}if("continue"===t){var m=this.getValueAtTime(c/this.comp.globalData.frameRate,0),g=this.getValueAtTime((c+.001)/this.comp.globalData.frameRate,0);if(this.pv.length){for(a=(o=new Array(m.length)).length,s=0;s<a;s+=1)o[s]=m[s]+(m[s]-g[s])*(c-l)/.001;return o}return m+(m-g)*(c-l)/.001}}return this.getValueAtTime((n-((c-l)%n+c))/this.comp.globalData.frameRate,0)}function i(t,e){if(!this.k)return this.pv;if(t=.5*(t||.4),(e=Math.floor(e||5))<=1)return this.pv;var i,n,r=this.comp.renderedFrame/this.comp.globalData.frameRate,s=r-t,a=e>1?(r+t-s)/(e-1):1,o=0,l=0;for(i=this.pv.length?createTypedArray("float32",this.pv.length):0;o<e;){if(n=this.getValueAtTime(s+o*a),this.pv.length)for(l=0;l<this.pv.length;l+=1)i[l]+=n[l];else i+=n;o+=1}if(this.pv.length)for(l=0;l<this.pv.length;l+=1)i[l]/=e;else i/=e;return i}function n(t){this._transformCachingAtTime||(this._transformCachingAtTime={v:new Matrix});var e=this._transformCachingAtTime.v;if(e.cloneFromProps(this.pre.props),this.appliedTransformations<1){var i=this.a.getValueAtTime(t);e.translate(-i[0]*this.a.mult,-i[1]*this.a.mult,i[2]*this.a.mult)}if(this.appliedTransformations<2){var n=this.s.getValueAtTime(t);e.scale(n[0]*this.s.mult,n[1]*this.s.mult,n[2]*this.s.mult)}if(this.sk&&this.appliedTransformations<3){var r=this.sk.getValueAtTime(t),s=this.sa.getValueAtTime(t);e.skewFromAxis(-r*this.sk.mult,s*this.sa.mult)}if(this.r&&this.appliedTransformations<4){var a=this.r.getValueAtTime(t);e.rotate(-a*this.r.mult)}else if(!this.r&&this.appliedTransformations<4){var o=this.rz.getValueAtTime(t),l=this.ry.getValueAtTime(t),h=this.rx.getValueAtTime(t),c=this.or.getValueAtTime(t);e.rotateZ(-o*this.rz.mult).rotateY(l*this.ry.mult).rotateX(h*this.rx.mult).rotateZ(-c[2]*this.or.mult).rotateY(c[1]*this.or.mult).rotateX(c[0]*this.or.mult)}if(this.data.p&&this.data.p.s){var u=this.px.getValueAtTime(t),d=this.py.getValueAtTime(t);if(this.data.p.z){var f=this.pz.getValueAtTime(t);e.translate(u*this.px.mult,d*this.py.mult,-f*this.pz.mult)}else e.translate(u*this.px.mult,d*this.py.mult,0)}else{var p=this.p.getValueAtTime(t);e.translate(p[0]*this.p.mult,p[1]*this.p.mult,-p[2]*this.p.mult)}return e}function r(){return this.v.clone(new Matrix)}var s=TransformPropertyFactory.getTransformProperty;TransformPropertyFactory.getTransformProperty=function(t,e,i){var a=s(t,e,i);return a.dynamicProperties.length?a.getValueAtTime=n.bind(a):a.getValueAtTime=r.bind(a),a.setGroupProperty=expressionHelpers.setGroupProperty,a};var a=PropertyFactory.getProp;PropertyFactory.getProp=function(n,r,s,o,l){var h=a(n,r,s,o,l);h.kf?h.getValueAtTime=expressionHelpers.getValueAtTime.bind(h):h.getValueAtTime=expressionHelpers.getStaticValueAtTime.bind(h),h.setGroupProperty=expressionHelpers.setGroupProperty,h.loopOut=t,h.loopIn=e,h.smooth=i,h.getVelocityAtTime=expressionHelpers.getVelocityAtTime.bind(h),h.getSpeedAtTime=expressionHelpers.getSpeedAtTime.bind(h),h.numKeys=1===r.a?r.k.length:0,h.propertyIndex=r.ix;var c=0;return 0!==s&&(c=createTypedArray("float32",1===r.a?r.k[0].s.length:r.k.length)),h._cachingAtTime={lastFrame:initialDefaultFrame,lastIndex:0,value:c},expressionHelpers.searchExpressions(n,r,h),h.k&&l.addDynamicProperty(h),h};var o=ShapePropertyFactory.getConstructorFunction(),l=ShapePropertyFactory.getKeyframedConstructorFunction();function h(){}h.prototype={vertices:function(t,e){this.k&&this.getValue();var i,n=this.v;void 0!==e&&(n=this.getValueAtTime(e,0));var r=n._length,s=n[t],a=n.v,o=createSizedArray(r);for(i=0;i<r;i+=1)o[i]="i"===t||"o"===t?[s[i][0]-a[i][0],s[i][1]-a[i][1]]:[s[i][0],s[i][1]];return o},points:function(t){return this.vertices("v",t)},inTangents:function(t){return this.vertices("i",t)},outTangents:function(t){return this.vertices("o",t)},isClosed:function(){return this.v.c},pointOnPath:function(t,e){var i=this.v;void 0!==e&&(i=this.getValueAtTime(e,0)),this._segmentsLength||(this._segmentsLength=bez.getSegmentsLength(i));for(var n,r=this._segmentsLength,s=r.lengths,a=r.totalLength*t,o=0,l=s.length,h=0;o<l;){if(h+s[o].addedLength>a){var c=o,u=i.c&&o===l-1?0:o+1,d=(a-h)/s[o].addedLength;n=bez.getPointInSegment(i.v[c],i.v[u],i.o[c],i.i[u],d,s[o]);break}h+=s[o].addedLength,o+=1}return n||(n=i.c?[i.v[0][0],i.v[0][1]]:[i.v[i._length-1][0],i.v[i._length-1][1]]),n},vectorOnPath:function(t,e,i){1==t?t=this.v.c:0==t&&(t=.999);var n=this.pointOnPath(t,e),r=this.pointOnPath(t+.001,e),s=r[0]-n[0],a=r[1]-n[1],o=Math.sqrt(Math.pow(s,2)+Math.pow(a,2));return 0===o?[0,0]:"tangent"===i?[s/o,a/o]:[-a/o,s/o]},tangentOnPath:function(t,e){return this.vectorOnPath(t,e,"tangent")},normalOnPath:function(t,e){return this.vectorOnPath(t,e,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([h],o),extendPrototype([h],l),l.prototype.getValueAtTime=function(t){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),t*=this.elem.globalData.frameRate,(t-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime<t?this._caching.lastIndex:0,this._cachingAtTime.lastTime=t,this.interpolateShape(t,this._cachingAtTime.shapeValue,this._cachingAtTime)),this._cachingAtTime.shapeValue},l.prototype.initiateExpression=ExpressionManager.initiateExpression;var c=ShapePropertyFactory.getShapeProp;ShapePropertyFactory.getShapeProp=function(t,e,i,n,r){var s=c(t,e,i,n,r);return s.propertyIndex=e.ix,s.lock=!1,3===i?expressionHelpers.searchExpressions(t,e.pt,s):4===i&&expressionHelpers.searchExpressions(t,e.ks,s),s.k&&t.addDynamicProperty(s),s}}function initialize$1(){addPropertyDecorator()}function addDecorator(){TextProperty.prototype.getExpressionValue=function(t,e){var i=this.calculateExpression(e);if(t.t!==i){var n={};return this.copyData(n,t),n.t=i.toString(),n.__complete=!1,n}return t},TextProperty.prototype.searchProperty=function(){var t=this.searchKeyframes(),e=this.searchExpressions();return this.kf=t||e,this.kf},TextProperty.prototype.searchExpressions=function(){return this.data.d.x?(this.calculateExpression=ExpressionManager.initiateExpression.bind(this)(this.elem,this.data.d,this),this.addEffect(this.getExpressionValue.bind(this)),!0):null}}function initialize(){addDecorator()}function SVGComposableEffect(){}SVGComposableEffect.prototype={createMergeNode:function(t,e){var i,n,r=createNS("feMerge");for(r.setAttribute("result",t),n=0;n<e.length;n+=1)(i=createNS("feMergeNode")).setAttribute("in",e[n]),r.appendChild(i),r.appendChild(i);return r}};var linearFilterValue="0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0";function SVGTintFilter(t,e,i,n,r){this.filterManager=e;var s=createNS("feColorMatrix");s.setAttribute("type","matrix"),s.setAttribute("color-interpolation-filters","linearRGB"),s.setAttribute("values",linearFilterValue+" 1 0"),this.linearFilter=s,s.setAttribute("result",n+"_tint_1"),t.appendChild(s),(s=createNS("feColorMatrix")).setAttribute("type","matrix"),s.setAttribute("color-interpolation-filters","sRGB"),s.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),s.setAttribute("result",n+"_tint_2"),t.appendChild(s),this.matrixFilter=s;var a=this.createMergeNode(n,[r,n+"_tint_1",n+"_tint_2"]);t.appendChild(a)}function SVGFillFilter(t,e,i,n){this.filterManager=e;var r=createNS("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","sRGB"),r.setAttribute("values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"),r.setAttribute("result",n),t.appendChild(r),this.matrixFilter=r}function SVGStrokeEffect(t,e,i){this.initialized=!1,this.filterManager=e,this.elem=i,this.paths=[]}function SVGTritoneFilter(t,e,i,n){this.filterManager=e;var r=createNS("feColorMatrix");r.setAttribute("type","matrix"),r.setAttribute("color-interpolation-filters","linearRGB"),r.setAttribute("values","0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0"),t.appendChild(r);var s=createNS("feComponentTransfer");
vendor: 5,079 bytes, line 2
2s.setAttribute("color-interpolation-filters","sRGB"),s.setAttribute("result",n),this.matrixFilter=s;var a=createNS("feFuncR");a.setAttribute("type","table"),s.appendChild(a),this.feFuncR=a;var o=createNS("feFuncG");o.setAttribute("type","table"),s.appendChild(o),this.feFuncG=o;var l=createNS("feFuncB");l.setAttribute("type","table"),s.appendChild(l),this.feFuncB=l,t.appendChild(s)}function SVGProLevelsFilter(t,e,i,n){this.filterManager=e;var r=this.filterManager.effectElements,s=createNS("feComponentTransfer");(r[10].p.k||0!==r[10].p.v||r[11].p.k||1!==r[11].p.v||r[12].p.k||1!==r[12].p.v||r[13].p.k||0!==r[13].p.v||r[14].p.k||1!==r[14].p.v)&&(this.feFuncR=this.createFeFunc("feFuncR",s)),(r[17].p.k||0!==r[17].p.v||r[18].p.k||1!==r[18].p.v||r[19].p.k||1!==r[19].p.v||r[20].p.k||0!==r[20].p.v||r[21].p.k||1!==r[21].p.v)&&(this.feFuncG=this.createFeFunc("feFuncG",s)),(r[24].p.k||0!==r[24].p.v||r[25].p.k||1!==r[25].p.v||r[26].p.k||1!==r[26].p.v||r[27].p.k||0!==r[27].p.v||r[28].p.k||1!==r[28].p.v)&&(this.feFuncB=this.createFeFunc("feFuncB",s)),(r[31].p.k||0!==r[31].p.v||r[32].p.k||1!==r[32].p.v||r[33].p.k||1!==r[33].p.v||r[34].p.k||0!==r[34].p.v||r[35].p.k||1!==r[35].p.v)&&(this.feFuncA=this.createFeFunc("feFuncA",s)),(this.feFuncR||this.feFuncG||this.feFuncB||this.feFuncA)&&(s.setAttribute("color-interpolation-filters","sRGB"),t.appendChild(s)),(r[3].p.k||0!==r[3].p.v||r[4].p.k||1!==r[4].p.v||r[5].p.k||1!==r[5].p.v||r[6].p.k||0!==r[6].p.v||r[7].p.k||1!==r[7].p.v)&&((s=createNS("feComponentTransfer")).setAttribute("color-interpolation-filters","sRGB"),s.setAttribute("result",n),t.appendChild(s),this.feFuncRComposed=this.createFeFunc("feFuncR",s),this.feFuncGComposed=this.createFeFunc("feFuncG",s),this.feFuncBComposed=this.createFeFunc("feFuncB",s))}function SVGDropShadowEffect(t,e,i,n,r){var s=e.container.globalData.renderConfig.filterSize,a=e.data.fs||s;t.setAttribute("x",a.x||s.x),t.setAttribute("y",a.y||s.y),t.setAttribute("width",a.width||s.width),t.setAttribute("height",a.height||s.height),this.filterManager=e;var o=createNS("feGaussianBlur");o.setAttribute("in","SourceAlpha"),o.setAttribute("result",n+"_drop_shadow_1"),o.setAttribute("stdDeviation","0"),this.feGaussianBlur=o,t.appendChild(o);var l=createNS("feOffset");l.setAttribute("dx","25"),l.setAttribute("dy","0"),l.setAttribute("in",n+"_drop_shadow_1"),l.setAttribute("result",n+"_drop_shadow_2"),this.feOffset=l,t.appendChild(l);var h=createNS("feFlood");h.setAttribute("flood-color","#00ff00"),h.setAttribute("flood-opacity","1"),h.setAttribute("result",n+"_drop_shadow_3"),this.feFlood=h,t.appendChild(h);var c=createNS("feComposite");c.setAttribute("in",n+"_drop_shadow_3"),c.setAttribute("in2",n+"_drop_shadow_2"),c.setAttribute("operator","in"),c.setAttribute("result",n+"_drop_shadow_4"),t.appendChild(c);var u=this.createMergeNode(n,[n+"_drop_shadow_4",r]);t.appendChild(u)}extendPrototype([SVGComposableEffect],SVGTintFilter),SVGTintFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,i=this.filterManager.effectElements[1].p.v,n=this.filterManager.effectElements[2].p.v/100;this.linearFilter.setAttribute("values",linearFilterValue+" "+n+" 0"),this.matrixFilter.setAttribute("values",i[0]-e[0]+" 0 0 0 "+e[0]+" "+(i[1]-e[1])+" 0 0 0 "+e[1]+" "+(i[2]-e[2])+" 0 0 0 "+e[2]+" 0 0 0 1 0")}},SVGFillFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[2].p.v,i=this.filterManager.effectElements[6].p.v;this.matrixFilter.setAttribute("values","0 0 0 0 "+e[0]+" 0 0 0 0 "+e[1]+" 0 0 0 0 "+e[2]+" 0 0 0 "+i+" 0")}},SVGStrokeEffect.prototype.initialize=function(){var t,e,i,n,r=this.elem.layerElement.children||this.elem.layerElement.childNodes;for(1===this.filterManager.effectElements[1].p.v?(n=this.elem.maskManager.masksProperties.length,i=0):n=1+(i=this.filterManager.effectElements[0].p.v-1),(e=createNS("g")).setAttribute("fill","none"),e.setAttribute("stroke-linecap","round"),e.setAttribute("stroke-dashoffset",1);i<n;i+=1)t=createNS("path"),e.appendChild(t),this.paths.push({p:t,m:i});if(3===this.filterManager.effectElements[10].p.v){var s=createNS("mask"),a=createElementID();s.setAttribute("id",a),s.setAttribute("mask-type","alpha"),s.appendChild(e),this.elem.globalData.defs.appendChild(s);var o=createNS("g");for(o.setAttribute("mask","url("+getLocationHref()+"#"+a+")");r[0];)o.appendChild(r[0]);this.elem.layerElement.appendChild(o),this.masker=s,e.setAttribute("stroke","#fff")}else if(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v){if(2===this.filterManager.effectElements[10].p.v)for(r=this.elem.layerElement.children||this.elem.layerElement.childNodes;r.length;)this.elem.layerElement.removeChild(r[0]);this.elem.layerElement.appendChild(e),this.elem.layerElement.removeAttribute("mask"),e.setAttribute("stroke","#fff")}this.initialized=!0,this.pathMasker=e},SVGStrokeEffect.prototype.renderFrame=function(t){var e;this.initialized||this.initialize();var i,n,r=this.paths.length;for(e=0;e<r;
vendor: 4,562 bytes, line 2
2e+=1)if(-1!==this.paths[e].m&&(i=this.elem.maskManager.viewData[this.paths[e].m],n=this.paths[e].p,(t||this.filterManager._mdf||i.prop._mdf)&&n.setAttribute("d",i.lastPath),t||this.filterManager.effectElements[9].p._mdf||this.filterManager.effectElements[4].p._mdf||this.filterManager.effectElements[7].p._mdf||this.filterManager.effectElements[8].p._mdf||i.prop._mdf)){var s;if(0!==this.filterManager.effectElements[7].p.v||100!==this.filterManager.effectElements[8].p.v){var a=.01*Math.min(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),o=.01*Math.max(this.filterManager.effectElements[7].p.v,this.filterManager.effectElements[8].p.v),l=n.getTotalLength();s="0 0 0 "+l*a+" ";var h,c=l*(o-a),u=1+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01,d=Math.floor(c/u);for(h=0;h<d;h+=1)s+="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01+" ";s+="0 "+10*l+" 0 0"}else s="1 "+2*this.filterManager.effectElements[4].p.v*this.filterManager.effectElements[9].p.v*.01;n.setAttribute("stroke-dasharray",s)}if((t||this.filterManager.effectElements[4].p._mdf)&&this.pathMasker.setAttribute("stroke-width",2*this.filterManager.effectElements[4].p.v),(t||this.filterManager.effectElements[6].p._mdf)&&this.pathMasker.setAttribute("opacity",this.filterManager.effectElements[6].p.v),(1===this.filterManager.effectElements[10].p.v||2===this.filterManager.effectElements[10].p.v)&&(t||this.filterManager.effectElements[3].p._mdf)){var f=this.filterManager.effectElements[3].p.v;this.pathMasker.setAttribute("stroke","rgb("+bmFloor(255*f[0])+","+bmFloor(255*f[1])+","+bmFloor(255*f[2])+")")}},SVGTritoneFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=this.filterManager.effectElements[0].p.v,i=this.filterManager.effectElements[1].p.v,n=this.filterManager.effectElements[2].p.v,r=n[0]+" "+i[0]+" "+e[0],s=n[1]+" "+i[1]+" "+e[1],a=n[2]+" "+i[2]+" "+e[2];this.feFuncR.setAttribute("tableValues",r),this.feFuncG.setAttribute("tableValues",s),this.feFuncB.setAttribute("tableValues",a)}},SVGProLevelsFilter.prototype.createFeFunc=function(t,e){var i=createNS(t);return i.setAttribute("type","table"),e.appendChild(i),i},SVGProLevelsFilter.prototype.getTableValue=function(t,e,i,n,r){for(var s,a,o=0,l=Math.min(t,e),h=Math.max(t,e),c=Array.call(null,{length:256}),u=0,d=r-n,f=e-t;o<=256;)a=(s=o/256)<=l?f<0?r:n:s>=h?f<0?n:r:n+d*Math.pow((s-t)/f,1/i),c[u]=a,u+=1,o+=256/255;return c.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e,i=this.filterManager.effectElements;this.feFuncRComposed&&(t||i[3].p._mdf||i[4].p._mdf||i[5].p._mdf||i[6].p._mdf||i[7].p._mdf)&&(e=this.getTableValue(i[3].p.v,i[4].p.v,i[5].p.v,i[6].p.v,i[7].p.v),this.feFuncRComposed.setAttribute("tableValues",e),this.feFuncGComposed.setAttribute("tableValues",e),this.feFuncBComposed.setAttribute("tableValues",e)),this.feFuncR&&(t||i[10].p._mdf||i[11].p._mdf||i[12].p._mdf||i[13].p._mdf||i[14].p._mdf)&&(e=this.getTableValue(i[10].p.v,i[11].p.v,i[12].p.v,i[13].p.v,i[14].p.v),this.feFuncR.setAttribute("tableValues",e)),this.feFuncG&&(t||i[17].p._mdf||i[18].p._mdf||i[19].p._mdf||i[20].p._mdf||i[21].p._mdf)&&(e=this.getTableValue(i[17].p.v,i[18].p.v,i[19].p.v,i[20].p.v,i[21].p.v),this.feFuncG.setAttribute("tableValues",e)),this.feFuncB&&(t||i[24].p._mdf||i[25].p._mdf||i[26].p._mdf||i[27].p._mdf||i[28].p._mdf)&&(e=this.getTableValue(i[24].p.v,i[25].p.v,i[26].p.v,i[27].p.v,i[28].p.v),this.feFuncB.setAttribute("tableValues",e)),this.feFuncA&&(t||i[31].p._mdf||i[32].p._mdf||i[33].p._mdf||i[34].p._mdf||i[35].p._mdf)&&(e=this.getTableValue(i[31].p.v,i[32].p.v,i[33].p.v,i[34].p.v,i[35].p.v),this.feFuncA.setAttribute("tableValues",e))}},extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){if((t||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),t||this.filterManager.effectElements[0].p._mdf){var e=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*e[0]),Math.round(255*e[1]),Math.round(255*e[2])))}if((t||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),t||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var i=this.filterManager.effectElements[3].p.v,
vendor: 4,292 bytes, line 2
2n=(this.filterManager.effectElements[2].p.v-90)*degToRads,r=i*Math.cos(n),s=i*Math.sin(n);this.feOffset.setAttribute("dx",r),this.feOffset.setAttribute("dy",s)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(t,e,i){this.initialized=!1,this.filterManager=e,this.filterElem=t,this.elem=i,i.matteElement=createNS("g"),i.matteElement.appendChild(i.layerElement),i.matteElement.appendChild(i.transformedElement),i.baseElement=i.matteElement}function SVGGaussianBlurEffect(t,e,i,n){t.setAttribute("x","-100%"),t.setAttribute("y","-100%"),t.setAttribute("width","300%"),t.setAttribute("height","300%"),this.filterManager=e;var r=createNS("feGaussianBlur");r.setAttribute("result",n),t.appendChild(r),this.feGaussianBlur=r}function TransformEffect(){}function SVGTransformEffect(t,e){this.init(e)}function CVTransformEffect(t){this.init(t)}return SVGMatte3Effect.prototype.findSymbol=function(t){for(var e=0,i=_svgMatteSymbols.length;e<i;){if(_svgMatteSymbols[e]===t)return _svgMatteSymbols[e];e+=1}return null},SVGMatte3Effect.prototype.replaceInParent=function(t,e){var i=t.layerElement.parentNode;if(i){for(var n,r=i.children,s=0,a=r.length;s<a&&r[s]!==t.layerElement;)s+=1;s<=a-2&&(n=r[s+1]);var o=createNS("use");o.setAttribute("href","#"+e),n?i.insertBefore(o,n):i.appendChild(o)}},SVGMatte3Effect.prototype.setElementAsMask=function(t,e){if(!this.findSymbol(e)){var i=createElementID(),n=createNS("mask");n.setAttribute("id",e.layerId),n.setAttribute("mask-type","alpha"),_svgMatteSymbols.push(e);var r=t.globalData.defs;r.appendChild(n);var s=createNS("symbol");s.setAttribute("id",i),this.replaceInParent(e,i),s.appendChild(e.layerElement),r.appendChild(s);var a=createNS("use");a.setAttribute("href","#"+i),n.appendChild(a),e.data.hd=!1,e.show()}t.setMatte(e.layerId)},SVGMatte3Effect.prototype.initialize=function(){for(var t=this.filterManager.effectElements[0].p.v,e=this.elem.comp.elements,i=0,n=e.length;i<n;)e[i]&&e[i].data.ind===t&&this.setElementAsMask(this.elem,e[i]),i+=1;this.initialized=!0},SVGMatte3Effect.prototype.renderFrame=function(){this.initialized||this.initialize()},SVGGaussianBlurEffect.prototype.renderFrame=function(t){if(t||this.filterManager._mdf){var e=.3*this.filterManager.effectElements[0].p.v,i=this.filterManager.effectElements[1].p.v,n=3==i?0:e,r=2==i?0:e;this.feGaussianBlur.setAttribute("stdDeviation",n+" "+r);var s=1==this.filterManager.effectElements[2].p.v?"wrap":"duplicate";this.feGaussianBlur.setAttribute("edgeMode",s)}},TransformEffect.prototype.init=function(t){this.effectsManager=t,this.type=effectTypes.TRANSFORM_EFFECT,this.matrix=new Matrix,this.opacity=-1,this._mdf=!1,this._opMdf=!1},TransformEffect.prototype.renderFrame=function(t){if(this._opMdf=!1,this._mdf=!1,t||this.effectsManager._mdf){var e=this.effectsManager.effectElements,i=e[0].p.v,n=e[1].p.v,r=1===e[2].p.v,s=e[3].p.v,a=r?s:e[4].p.v,o=e[5].p.v,l=e[6].p.v,h=e[7].p.v;this.matrix.reset(),this.matrix.translate(-i[0],-i[1],i[2]),this.matrix.scale(.01*a,.01*s,1),this.matrix.rotate(-h*degToRads),this.matrix.skewFromAxis(-o*degToRads,(l+90)*degToRads),this.matrix.translate(n[0],n[1],0),this._mdf=!0,this.opacity!==e[8].p.v&&(this.opacity=e[8].p.v,this._opMdf=!0)}},extendPrototype([TransformEffect],SVGTransformEffect),extendPrototype([TransformEffect],CVTransformEffect),registerRenderer("canvas",CanvasRenderer),registerRenderer("html",HybridRenderer),registerRenderer("svg",SVGRenderer),ShapeModifiers.registerModifier("tm",TrimModifier),ShapeModifiers.registerModifier("pb",PuckerAndBloatModifier),ShapeModifiers.registerModifier("rp",RepeaterModifier),ShapeModifiers.registerModifier("rd",RoundCornersModifier),ShapeModifiers.registerModifier("zz",ZigZagModifier),ShapeModifiers.registerModifier("op",OffsetPathModifier),setExpressionsPlugin(Expressions),setExpressionInterfaces(getInterface),initialize$1(),initialize(),registerEffect$1(20,SVGTintFilter,!0),registerEffect$1(21,SVGFillFilter,!0),registerEffect$1(22,SVGStrokeEffect,!1),registerEffect$1(23,SVGTritoneFilter,!0),registerEffect$1(24,SVGProLevelsFilter,!0),registerEffect$1(25,SVGDropShadowEffect,!0),registerEffect$1(28,SVGMatte3Effect,!1),registerEffect$1(29,SVGGaussianBlurEffect,!0),registerEffect$1(35,SVGTransformEffect,!1),registerEffect(35,CVTransformEffect),lottie},module.exports=factory())}
vendor: 12,819 bytes, line 2
2,6994:function(t,e,i){var n,r,s;window,r=[i(2831),i(1485)],void 0===(s="function"==typeof(n=function(t,e){"use strict";var i=t.create("masonry");i.compatOptions.fitWidth="isFitWidth";var n=i.prototype;return n._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns(),this.colYs=[];for(var t=0;t<this.cols;t++)this.colYs.push(0);this.maxY=0,this.horizontalColIndex=0},n.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var t=this.items[0],i=t&&t.element;this.columnWidth=i&&e(i).outerWidth||this.containerWidth}var n=this.columnWidth+=this.gutter,r=this.containerWidth+this.gutter,s=r/n,a=n-r%n;s=Math[a&&a<1?"round":"floor"](s),this.cols=Math.max(s,1)},n.getContainerWidth=function(){var t=this._getOption("fitWidth")?this.element.parentNode:this.element,i=e(t);this.containerWidth=i&&i.innerWidth},n._getItemLayoutPosition=function(t){t.getSize();var e=t.size.outerWidth%this.columnWidth,i=Math[e&&e<1?"round":"ceil"](t.size.outerWidth/this.columnWidth);i=Math.min(i,this.cols);for(var n=this[this.options.horizontalOrder?"_getHorizontalColPosition":"_getTopColPosition"](i,t),r={x:this.columnWidth*n.col,y:n.y},s=n.y+t.size.outerHeight,a=i+n.col,o=n.col;o<a;o++)this.colYs[o]=s;return r},n._getTopColPosition=function(t){var e=this._getTopColGroup(t),i=Math.min.apply(Math,e);return{col:e.indexOf(i),y:i}},n._getTopColGroup=function(t){if(t<2)return this.colYs;for(var e=[],i=this.cols+1-t,n=0;n<i;n++)e[n]=this._getColGroupY(n,t);return e},n._getColGroupY=function(t,e){if(e<2)return this.colYs[t];var i=this.colYs.slice(t,t+e);return Math.max.apply(Math,i)},n._getHorizontalColPosition=function(t,e){var i=this.horizontalColIndex%this.cols;i=t>1&&i+t>this.cols?0:i;var n=e.size.outerWidth&&e.size.outerHeight;return this.horizontalColIndex=n?i+t:this.horizontalColIndex,{col:i,y:this._getColGroupY(i,t)}},n._manageStamp=function(t){var i=e(t),n=this._getElementOffset(t),r=this._getOption("originLeft")?n.left:n.right,s=r+i.outerWidth,a=Math.floor(r/this.columnWidth);a=Math.max(0,a);var o=Math.floor(s/this.columnWidth);o-=s%this.columnWidth?0:1,o=Math.min(this.cols-1,o);for(var l=(this._getOption("originTop")?n.top:n.bottom)+i.outerHeight,h=a;h<=o;h++)this.colYs[h]=Math.max(l,this.colYs[h])},n._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var t={height:this.maxY};return this._getOption("fitWidth")&&(t.width=this._getContainerFitWidth()),t},n._getContainerFitWidth=function(){for(var t=0,e=this.cols;--e&&0===this.colYs[e];)t++;return(this.cols-t)*this.columnWidth-this.gutter},n.needsResizeLayout=function(){var t=this.containerWidth;return this.getContainerWidth(),t!=this.containerWidth},i})?n.apply(e,r):n)||(t.exports=s)},3169:function(t,e,i){var n,r,s;window,r=[i(2137),i(1485)],void 0===(s="function"==typeof(n=function(t,e){"use strict";var i=document.documentElement.style,n="string"==typeof i.transition?"transition":"WebkitTransition",r="string"==typeof i.transform?"transform":"WebkitTransform",s={WebkitTransition:"webkitTransitionEnd",transition:"transitionend"}[n],a={transform:r,transition:n,transitionDuration:n+"Duration",transitionProperty:n+"Property",transitionDelay:n+"Delay"};function o(t,e){t&&(this.element=t,this.layout=e,this.position={x:0,y:0},this._create())}var l=o.prototype=Object.create(t.prototype);l.constructor=o,l._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},l.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},l.getSize=function(){this.size=e(this.element)},l.css=function(t){var e=this.element.style;for(var i in t)e[a[i]||i]=t[i]},l.getPosition=function(){var t=getComputedStyle(this.element),e=this.layout._getOption("originLeft"),i=this.layout._getOption("originTop"),n=t[e?"left":"right"],r=t[i?"top":"bottom"],s=parseFloat(n),a=parseFloat(r),o=this.layout.size;-1!=n.indexOf("%")&&(s=s/100*o.width),-1!=r.indexOf("%")&&(a=a/100*o.height),s=isNaN(s)?0:s,a=isNaN(a)?0:a,s-=e?o.paddingLeft:o.paddingRight,a-=i?o.paddingTop:o.paddingBottom,this.position.x=s,this.position.y=a},l.layoutPosition=function(){var t=this.layout.size,e={},i=this.layout._getOption("originLeft"),n=this.layout._getOption("originTop"),r=i?"paddingLeft":"paddingRight",s=i?"left":"right",a=i?"right":"left",o=this.position.x+t[r];e[s]=this.getXValue(o),e[a]="";var l=n?"paddingTop":"paddingBottom",h=n?"top":"bottom",c=n?"bottom":"top",u=this.position.y+t[l];e[h]=this.getYValue(u),e[c]="",this.css(e),this.emitEvent("layout",[this])},l.getXValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&!e?t/this.layout.size.width*100+"%":t+"px"},l.getYValue=function(t){var e=this.layout._getOption("horizontal");return this.layout.options.percentPosition&&e?t/this.layout.size.height*100+"%":t+"px"},l._transitionTo=function(t,e){this.getPosition();var i=this.position.x,n=this.position.y,r=t==this.position.x&&e==this.position.y;if(this.setPosition(t,e),!r||this.isTransitioning){var s=t-i,a=e-n,o={};o.transform=this.getTranslate(s,a),this.transition({to:o,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})}else this.layoutPosition()},l.getTranslate=function(t,e){return"translate3d("+(t=this.layout._getOption("originLeft")?t:-t)+"px, "+(e=this.layout._getOption("originTop")?e:-e)+"px, 0)"},l.goTo=function(t,e){this.setPosition(t,e),this.layoutPosition()},l.moveTo=l._transitionTo,l.setPosition=function(t,e){this.position.x=parseFloat(t),this.position.y=parseFloat(e)},l._nonTransition=function(t){for(var e in this.css(t.to),t.isCleaning&&this._removeStyles(t.to),t.onTransitionEnd)t.onTransitionEnd[e].call(this)},l.transition=function(t){if(parseFloat(this.layout.options.transitionDuration)){var e=this._transn;for(var i in t.onTransitionEnd)e.onEnd[i]=t.onTransitionEnd[i];for(i in t.to)e.ingProperties[i]=!0,t.isCleaning&&(e.clean[i]=!0);t.from&&(this.css(t.from),this.element.offsetHeight),this.enableTransition(t.to),this.css(t.to),this.isTransitioning=!0}else this._nonTransition(t)};var h="opacity,"+r.replace(/([A-Z])/g,function(t){return"-"+t.toLowerCase()});l.enableTransition=function(){if(!this.isTransitioning){var t=this.layout.options.transitionDuration;t="number"==typeof t?t+"ms":t,this.css({transitionProperty:h,transitionDuration:t,transitionDelay:this.staggerDelay||0}),this.element.addEventListener(s,this,!1)}},l.onwebkitTransitionEnd=function(t){this.ontransitionend(t)},l.onotransitionend=function(t){this.ontransitionend(t)};var c={"-webkit-transform":"transform"};l.ontransitionend=function(t){if(t.target===this.element){var e=this._transn,i=c[t.propertyName]||t.propertyName;delete e.ingProperties[i],function(t){for(var e in t)return!1;return!0}(e.ingProperties)&&this.disableTransition(),i in e.clean&&(this.element.style[t.propertyName]="",delete e.clean[i]),i in e.onEnd&&(e.onEnd[i].call(this),delete e.onEnd[i]),this.emitEvent("transitionEnd",[this])}},l.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(s,this,!1),this.isTransitioning=!1},l._removeStyles=function(t){var e={};for(var i in t)e[i]="";this.css(e)};var u={transitionProperty:"",transitionDuration:"",transitionDelay:""};return l.removeTransitionStyles=function(){this.css(u)},l.stagger=function(t){t=isNaN(t)?0:t,this.staggerDelay=t+"ms"},l.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},l.remove=function(){n&&parseFloat(this.layout.options.transitionDuration)?(this.once("transitionEnd",function(){this.removeElem()}),this.hide()):this.removeElem()},l.reveal=function(){delete this.isHidden,this.css({display:""});var t=this.layout.options,e={};e[this.getHideRevealTransitionEndProperty("visibleStyle")]=this.onRevealTransitionEnd,this.transition({from:t.hiddenStyle,to:t.visibleStyle,isCleaning:!0,onTransitionEnd:e})},l.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},l.getHideRevealTransitionEndProperty=function(t){var e=this.layout.options[t];if(e.opacity)return"opacity";for(var i in e)return i},l.hide=function(){this.isHidden=!0,this.css({display:""});var t=this.layout.options,e={};e[this.getHideRevealTransitionEndProperty("hiddenStyle")]=this.onHideTransitionEnd,this.transition({from:t.visibleStyle,to:t.hiddenStyle,isCleaning:!0,onTransitionEnd:e})},l.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},l.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},o})?n.apply(e,r):n)||(t.exports=s)},2831:function(t,e,i){var n,r;!function(s){"use strict";n=[i(2137),i(1485),i(977),i(3169)],r=function(t,e,i,n){return function(t,e,i,n,r){var s=t.console,a=t.jQuery,o=function(){},l=0,h={};function c(t,e){var i=n.getQueryElement(t);if(i){this.element=i,a&&(this.$element=a(this.element)),this.options=n.extend({},this.constructor.defaults),this.option(e);var r=++l;this.element.outlayerGUID=r,h[r]=this,this._create(),this._getOption("initLayout")&&this.layout()}else s&&s.error("Bad element for "+this.constructor.namespace+": "+(i||t))}c.namespace="outlayer",c.Item=r,c.defaults={containerStyle:{position:"relative"},initLayout:!0,originLeft:!0,originTop:!0,resize:!0,resizeContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}};var u=c.prototype;function d(t){function e(){t.apply(this,arguments)}return e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e}n.extend(u,e.prototype),u.option=function(t){n.extend(this.options,t)},u._getOption=function(t){var e=this.constructor.compatOptions[t];return e&&void 0!==this.options[e]?this.options[e]:this.options[t]},c.compatOptions={initLayout:"isInitLayout",horizontal:"isHorizontal",layoutInstant:"isLayoutInstant",originLeft:"isOriginLeft",originTop:"isOriginTop",resize:"isResizeBound",resizeContainer:"isResizingContainer"},u._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),n.extend(this.element.style,this.options.containerStyle),this._getOption("resize")&&this.bindResize()},u.reloadItems=function(){this.items=this._itemize(this.element.children)},u._itemize=function(t){for(var e=this._filterFindItemElements(t),i=this.constructor.Item,n=[],r=0;r<e.length;r++){var s=new i(e[r],this);n.push(s)}return n},u._filterFindItemElements=function(t){return n.filterFindElements(t,this.options.itemSelector)},u.getItemElements=function(){return this.items.map(function(t){return t.element})},u.layout=function(){this._resetLayout(),this._manageStamps();var t=this._getOption("layoutInstant"),e=void 0!==t?t:!this._isLayoutInited;this.layoutItems(this.items,e),this._isLayoutInited=!0},u._init=u.layout,u._resetLayout=function(){this.getSize()},u.getSize=function(){this.size=i(this.element)},u._getMeasurement=function(t,e){var n,r=this.options[t];r?("string"==typeof r?n=this.element.querySelector(r):r instanceof HTMLElement&&(n=r),this[t]=n?i(n)[e]:r):this[t]=0},u.layoutItems=function(t,e){t=this._getItemsForLayout(t),this._layoutItems(t,e),this._postLayout()},u._getItemsForLayout=function(t){return t.filter(function(t){return!t.isIgnored})},u._layoutItems=function(t,e){if(this._emitCompleteOnItems("layout",t),t&&t.length){var i=[];t.forEach(function(t){var n=this._getItemLayoutPosition(t);n.item=t,n.isInstant=e||t.isLayoutInstant,i.push(n)},this),this._processLayoutQueue(i)}},u._getItemLayoutPosition=function(){return{x:0,y:0}},u._processLayoutQueue=function(t){this.updateStagger(),t.forEach(function(t,e){this._positionItem(t.item,t.x,t.y,t.isInstant,e)},this)},u.updateStagger=function(){var t=this.options.stagger;if(null!=t)return this.stagger=function(t){if("number"==typeof t)return t;var e=t.match(/(^\d*\.?\d*)(\w*)/),i=e&&e[1],n=e&&e[2];return i.length?(i=parseFloat(i))*(f[n]||1):0}(t),this.stagger;this.stagger=0},u._positionItem=function(t,e,i,n,r){n?t.goTo(e,i):(t.stagger(r*this.stagger),t.moveTo(e,i))},u._postLayout=function(){this.resizeContainer()},u.resizeContainer=function(){if(this._getOption("resizeContainer")){var t=this._getContainerSize();t&&(this._setContainerMeasure(t.width,!0),this._setContainerMeasure(t.height,!1))}},u._getContainerSize=o,u._setContainerMeasure=function(t,e){if(void 0!==t){var i=this.size;i.isBorderBox&&(t+=e?i.paddingLeft+i.paddingRight+i.borderLeftWidth+i.borderRightWidth:i.paddingBottom+i.paddingTop+i.borderTopWidth+i.borderBottomWidth),t=Math.max(t,0),this.element.style[e?"width":"height"]=t+"px"}},u._emitCompleteOnItems=function(t,e){var i=this;function n(){i.dispatchEvent(t+"Complete",null,[e])}var r=e.length;if(e&&r){var s=0;e.forEach(function(e){e.once(t,a)})}else n();function a(){++s==r&&n()}}
2,u.dispatchEvent=function(t,e,i){var n=e?[e].concat(i):i;if(this.emitEvent(t,n),a)if(this.$element=this.$element||a(this.element),e){var r=a.Event(e);r.type=t,this.$element.trigger(r,i)}else this.$element.trigger(t,i)},u.ignore=function(t){var e=this.getItem(t);e&&(e.isIgnored=!0)},u.unignore=function(t){var e=this.getItem(t);e&&delete e.isIgnored},u.stamp=function(t){(t=this._find(t))&&(this.stamps=this.stamps.concat(t),t.forEach(this.ignore,this))},u.unstamp=function(t){(t=this._find(t))&&t.forEach(function(t){n.removeFrom(this.stamps,t),this.unignore(t)},this)},u._find=function(t){if(t)return"string"==typeof t&&(t=this.element.querySelectorAll(t)),n.makeArray(t)},u._manageStamps=function(){this.stamps&&this.stamps.length&&(this._getBoundingRect(),this.stamps.forEach(this._manageStamp,this))},u._getBoundingRect=function(){var t=this.element.getBoundingClientRect(),e=this.size;this._boundingRect={left:t.left+e.paddingLeft+e.borderLeftWidth,top:t.top+e.paddingTop+e.borderTopWidth,right:t.right-(e.paddingRight+e.borderRightWidth),bottom:t.bottom-(e.paddingBottom+e.borderBottomWidth)}},u._manageStamp=o,u._getElementOffset=function(t){var e=t.getBoundingClientRect(),n=this._boundingRect,r=i(t);return{left:e.left-n.left-r.marginLeft,top:e.top-n.top-r.marginTop,right:n.right-e.right-r.marginRight,bottom:n.bottom-e.bottom-r.marginBottom}},u.handleEvent=n.handleEvent,u.bindResize=function(){t.addEventListener("resize",this),this.isResizeBound=!0},u.unbindResize=function(){t.removeEventListener("resize",this),this.isResizeBound=!1},u.onresize=function(){this.resize()},n.debounceMethod(c,"onresize",100),u.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},u.needsResizeLayout=function(){var t=i(this.element);return this.size&&t&&t.innerWidth!==this.size.innerWidth},u.addItems=function(t){var e=this._itemize(t);return e.length&&(this.items=this.items.concat(e)),e},u.appended=function(t){var e=this.addItems(t);e.length&&(this.layoutItems(e,!0),this.reveal(e))},u.prepended=function(t){var e=this._itemize(t);if(e.length){var i=this.items.slice(0);this.items=e.concat(i),this._resetLayout(),this._manageStamps(),this.layoutItems(e,!0),this.reveal(e),this.layoutItems(i)}},u.reveal=function(t){if(this._emitCompleteOnItems("reveal",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.reveal()})}},u.hide=function(t){if(this._emitCompleteOnItems("hide",t),t&&t.length){var e=this.updateStagger();t.forEach(function(t,i){t.stagger(i*e),t.hide()})}},u.revealItemElements=function(t){var e=this.getItems(t);this.reveal(e)},u.hideItemElements=function(t){var e=this.getItems(t);this.hide(e)},u.getItem=function(t){for(var e=0;e<this.items.length;e++){var i=this.items[e];if(i.element==t)return i}},u.getItems=function(t){t=n.makeArray(t);var e=[];return t.forEach(function(t){var i=this.getItem(t);i&&e.push(i)},this),e},u.remove=function(t){var e=this.getItems(t);this._emitCompleteOnItems("remove",e),e&&e.length&&e.forEach(function(t){t.remove(),n.removeFrom(this.items,t)},this)},u.destroy=function(){var t=this.element.style;t.height="",t.position="",t.width="",this.items.forEach(function(t){t.destroy()}),this.unbindResize();var e=this.element.outlayerGUID;delete h[e],delete this.element.outlayerGUID,a&&a.removeData(this.element,this.constructor.namespace)},c.data=function(t){var e=(t=n.getQueryElement(t))&&t.outlayerGUID;return e&&h[e]},c.create=function(t,e){var i=d(c);return i.defaults=n.extend({},c.defaults),n.extend(i.defaults,e),i.compatOptions=n.extend({},c.compatOptions),i.namespace=t,i.data=c.data,i.Item=d(r),n.htmlInit(i,t),a&&a.bridget&&a.bridget(t,i),i};var f={ms:1,s:1e3};return c.Item=r,c}(s,t,e,i,n)}.apply(e,n),void 0===r||(t.exports=r)}(window)},4330:function(t,e,i){"object"==typeof navigator&&(t.exports=function(){"use strict";function t(t,e,i){return(e=function(t){var e=function(t){if("object"!=typeof t||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==typeof e?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function e(t,e){for(var i=0;i<e.length;i++){var n=e[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function n(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function r(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)}return i}function s(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};
vendor: 4,286 bytes, line 2
2e%2?r(Object(i),!0).forEach(function(e){n(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var a={addCSS:!0,thumbWidth:15,watch:!0},o=function(t){return null!=t?t.constructor:null},l=function(t,e){return!!(t&&e&&t instanceof e)},h=function(t){return null==t},c=function(t){return o(t)===Object},u=function(t){return o(t)===String},d=function(t){return Array.isArray(t)},f=function(t){return l(t,NodeList)},p={nullOrUndefined:h,object:c,number:function(t){return o(t)===Number&&!Number.isNaN(t)},string:u,boolean:function(t){return o(t)===Boolean},function:function(t){return o(t)===Function},array:d,nodeList:f,element:function(t){return l(t,Element)},event:function(t){return l(t,Event)},empty:function(t){return h(t)||(u(t)||d(t)||f(t))&&!t.length||c(t)&&!Object.keys(t).length}};var m=function(){function t(e,i){(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")})(this,t),p.element(e)?this.element=e:p.string(e)&&(this.element=document.querySelector(e)),p.element(this.element)&&p.empty(this.element.rangeTouch)&&(this.config=s({},a,{},i),this.init())}return function(t,i,n){i&&e(t.prototype,i),n&&e(t,n)}(t,[{key:"init",value:function(){t.enabled&&(this.config.addCSS&&(this.element.style.userSelect="none",this.element.style.webKitUserSelect="none",this.element.style.touchAction="manipulation"),this.listeners(!0),this.element.rangeTouch=this)}},{key:"destroy",value:function(){t.enabled&&(this.config.addCSS&&(this.element.style.userSelect="",this.element.style.webKitUserSelect="",this.element.style.touchAction=""),this.listeners(!1),this.element.rangeTouch=null)}},{key:"listeners",value:function(t){var e=this,i=t?"addEventListener":"removeEventListener";["touchstart","touchmove","touchend"].forEach(function(t){e.element[i](t,function(t){return e.set(t)},!1)})}},{key:"get",value:function(e){if(!t.enabled||!p.event(e))return null;var i,n=e.target,r=e.changedTouches[0],s=parseFloat(n.getAttribute("min"))||0,a=parseFloat(n.getAttribute("max"))||100,o=parseFloat(n.getAttribute("step"))||1,l=n.getBoundingClientRect(),h=100/l.width*(this.config.thumbWidth/2)/100;return 0>(i=100/l.width*(r.clientX-l.left))?i=0:100<i&&(i=100),50>i?i-=(100-2*i)*h:50<i&&(i+=2*(i-50)*h),s+function(t,e){if(1>e){var i=function(t){var e="".concat(t).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return e?Math.max(0,(e[1]?e[1].length:0)-(e[2]?+e[2]:0)):0}(e);return parseFloat(t.toFixed(i))}return Math.round(t/e)*e}(i/100*(a-s),o)}},{key:"set",value:function(e){t.enabled&&p.event(e)&&!e.target.disabled&&(e.preventDefault(),e.target.value=this.get(e),function(t,e){if(t&&e){var i=new Event(e,{bubbles:!0});t.dispatchEvent(i)}}(e.target,"touchend"===e.type?"change":"input"))}}],[{key:"setup",value:function(e){var i=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=null;if(p.empty(e)||p.string(e)?n=Array.from(document.querySelectorAll(p.string(e)?e:'input[type="range"]')):p.element(e)?n=[e]:p.nodeList(e)?n=Array.from(e):p.array(e)&&(n=e.filter(p.element)),p.empty(n))return null;var r=s({},a,{},i);if(p.string(e)&&r.watch){var o=new MutationObserver(function(i){Array.from(i).forEach(function(i){Array.from(i.addedNodes).forEach(function(i){p.element(i)&&function(t,e){return function(){return Array.from(document.querySelectorAll(e)).includes(this)}.call(t,e)}(i,e)&&new t(i,r)})})});o.observe(document.body,{childList:!0,subtree:!0})}return n.map(function(e){return new t(e,i)})}},{key:"enabled",get:function(){return"ontouchstart"in document.documentElement}}]),t}();const g=t=>null!=t?t.constructor:null,y=(t,e)=>Boolean(t&&e&&t instanceof e),v=t=>null==t,b=t=>g(t)===Object,S=t=>g(t)===String,E=t=>"function"==typeof t,k=t=>Array.isArray(t),x=t=>y(t,NodeList),w=t=>v(t)||(S(t)||k(t)||x(t))&&!t.length||b(t)&&!Object.keys(t).length;var _=v,C=b,T=t=>g(t)===Number&&!Number.isNaN(t),A=S,P=t=>g(t)===Boolean,D=E,M=k,L=x,R=t=>null!==t&&"object"==typeof t&&1===t.nodeType&&"object"==typeof t.style&&"object"==typeof t.ownerDocument,I=t=>y(t,Event),F=t=>y(t,KeyboardEvent),O=t=>y(t,TextTrack)||!v(t)&&S(t.kind),B=t=>y(t,Promise)&&E(t.then),N=t=>{if(y(t,window.URL))return!0;
2if(!S(t))return!1;let e=t;t.startsWith("http://")&&t.startsWith("https://")||(e=`http://${t}`);try{return!w(new URL(e).hostname)}catch(t){return!1}},V=w;const z=(()=>{const t=document.createElement("span"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},i=Object.keys(e).find(e=>void 0!==t.style[e]);return!!A(i)&&e[i]})();function H(t,e){setTimeout(()=>{try{t.hidden=!0,t.offsetHeight,t.hidden=!1}catch(t){}},e)}var q={isIE:Boolean(window.document.documentMode),isEdge:/Edge/g.test(navigator.userAgent),isWebKit:"WebkitAppearance"in document.documentElement.style&&!/Edge/g.test(navigator.userAgent),isIPhone:/iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1,isIPadOS:"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,isIos:/iPad|iPhone|iPod/gi.test(navigator.userAgent)&&navigator.maxTouchPoints>1};function U(t,e){return e.split(".").reduce((t,e)=>t&&t[e],t)}function G(t={},...e){if(!e.length)return t;const i=e.shift();
vendor: 38,480 bytes, line 2
2return C(i)?(Object.keys(i).forEach(e=>{C(i[e])?(Object.keys(t).includes(e)||Object.assign(t,{[e]:{}}),G(t[e],i[e])):Object.assign(t,{[e]:i[e]})}),G(t,...e)):t}function j(t,e){const i=t.length?t:[t];Array.from(i).reverse().forEach((t,i)=>{const n=i>0?e.cloneNode(!0):e,r=t.parentNode,s=t.nextSibling;n.appendChild(t),s?r.insertBefore(n,s):r.appendChild(n)})}function W(t,e){R(t)&&!V(e)&&Object.entries(e).filter(([,t])=>!_(t)).forEach(([e,i])=>t.setAttribute(e,i))}function $(t,e,i){const n=document.createElement(t);return C(e)&&W(n,e),A(i)&&(n.innerText=i),n}function Y(t,e,i,n){R(e)&&e.appendChild($(t,i,n))}function K(t){L(t)||M(t)?Array.from(t).forEach(K):R(t)&&R(t.parentNode)&&t.parentNode.removeChild(t)}function X(t){if(!R(t))return;let{length:e}=t.childNodes;for(;e>0;)t.removeChild(t.lastChild),e-=1}function J(t,e){return R(e)&&R(e.parentNode)&&R(t)?(e.parentNode.replaceChild(t,e),t):null}function Q(t,e){if(!A(t)||V(t))return{};const i={},n=G({},e);return t.split(",").forEach(t=>{const e=t.trim(),r=e.replace(".",""),s=e.replace(/[[\]]/g,"").split("="),[a]=s,o=s.length>1?s[1].replace(/["']/g,""):"";switch(e.charAt(0)){case".":A(n.class)?i.class=`${n.class} ${r}`:i.class=r;break;case"#":i.id=e.replace("#","");break;case"[":i[a]=o}}),G(n,i)}function Z(t,e){if(!R(t))return;let i=e;P(i)||(i=!t.hidden),t.hidden=i}function tt(t,e,i){if(L(t))return Array.from(t).map(t=>tt(t,e,i));if(R(t)){let n="toggle";return void 0!==i&&(n=i?"add":"remove"),t.classList[n](e),t.classList.contains(e)}return!1}function et(t,e){return R(t)&&t.classList.contains(e)}function it(t,e){const{prototype:i}=Element;return(i.matches||i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector||function(){return Array.from(document.querySelectorAll(e)).includes(this)}).call(t,e)}function nt(t){return this.elements.container.querySelectorAll(t)}function rt(t){return this.elements.container.querySelector(t)}function st(t=null,e=!1){R(t)&&t.focus({preventScroll:!0,focusVisible:e})}const at={"audio/ogg":"vorbis","audio/wav":"1","video/webm":"vp8, vorbis","video/mp4":"avc1.42E01E, mp4a.40.2","video/ogg":"theora"},ot={audio:"canPlayType"in document.createElement("audio"),video:"canPlayType"in document.createElement("video"),check(t,e){const i=ot[t]||"html5"!==e;return{api:i,ui:i&&ot.rangeInput}},pip:!(q.isIPhone||!D($("video").webkitSetPresentationMode)&&(!document.pictureInPictureEnabled||$("video").disablePictureInPicture)),airplay:D(window.WebKitPlaybackTargetAvailabilityEvent),playsinline:"playsInline"in document.createElement("video"),mime(t){if(V(t))return!1;const[e]=t.split("/");let i=t;if(!this.isHTML5||e!==this.type)return!1;Object.keys(at).includes(i)&&(i+=`; codecs="${at[t]}"`);try{return Boolean(i&&this.media.canPlayType(i).replace(/no/,""))}catch(t){return!1}},textTracks:"textTracks"in document.createElement("video"),rangeInput:(()=>{const t=document.createElement("input");return t.type="range","range"===t.type})(),touch:"ontouchstart"in document.documentElement,transitions:!1!==z,reducedMotion:"matchMedia"in window&&window.matchMedia("(prefers-reduced-motion)").matches},lt=(()=>{let t=!1;try{const e=Object.defineProperty({},"passive",{get:()=>(t=!0,null)});window.addEventListener("test",null,e),window.removeEventListener("test",null,e)}catch(t){}return t})();function ht(t,e,i,n=!1,r=!0,s=!1){if(!t||!("addEventListener"in t)||V(e)||!D(i))return;const a=e.split(" ");let o=s;lt&&(o={passive:r,capture:s}),a.forEach(e=>{this&&this.eventListeners&&n&&this.eventListeners.push({element:t,type:e,callback:i,options:o}),t[n?"addEventListener":"removeEventListener"](e,i,o)})}function ct(t,e="",i,n=!0,r=!1){ht.call(this,t,e,i,!0,n,r)}function ut(t,e="",i,n=!0,r=!1){ht.call(this,t,e,i,!1,n,r)}function dt(t,e="",i,n=!0,r=!1){const s=(...a)=>{ut(t,e,s,n,r),i.apply(this,a)};ht.call(this,t,e,s,!0,n,r)}function ft(t,e="",i=!1,n={}){if(!R(t)||V(e))return;const r=new CustomEvent(e,{bubbles:i,detail:{...n,plyr:this}});t.dispatchEvent(r)}function pt(){this&&this.eventListeners&&(this.eventListeners.forEach(t=>{const{element:e,type:i,callback:n,options:r}=t;e.removeEventListener(i,n,r)}),this.eventListeners=[])}function mt(){return new Promise(t=>this.ready?setTimeout(t,0):ct.call(this,this.elements.container,"ready",t)).then(()=>{})}function gt(t){B(t)&&t.then(null,()=>{})}function yt(t){return M(t)?t.filter((e,i)=>t.indexOf(e)===i):t}function vt(t,e){return M(t)&&t.length?t.reduce((t,i)=>Math.abs(i-e)<Math.abs(t-e)?i:t):null}function bt(t){return!(!window||!window.CSS)&&window.CSS.supports(t)}const St=[[1,1],[4,3],[3,4],[5,4],[4,5],[3,2],[2,3],[16,10],[10,16],[16,9],[9,16],[21,9],[9,21],[32,9],[9,32]].reduce((t,[e,i])=>({...t,[e/i]:[e,i]}),{});function Et(t){return!!(M(t)||A(t)&&t.includes(":"))&&(M(t)?t:t.split(":")).map(Number).every(T)}function kt(t){if(!M(t)||!t.every(T))return null;const[e,i]=t,n=(t,e)=>0===e?t:n(e,t%e),r=n(e,i);return[e/r,i/r]}function xt(t){const e=t=>Et(t)?t.split(":").map(Number):null;let i=e(t);if(null===i&&(i=e(this.config.ratio)),null===i&&!V(this.embed)&&M(this.embed.ratio)&&({ratio:i}=this.embed),null===i&&this.isHTML5){const{videoWidth:t,videoHeight:e}=this.media;i=[t,e]}return kt(i)}function wt(t){if(!this.isVideo)return{};const{wrapper:e}=this.elements,i=xt.call(this,t);if(!M(i))return{};const[n,r]=kt(i),s=100/n*r;if(bt(`aspect-ratio: ${n}/${r}`)?e.style.aspectRatio=`${n}/${r}`:e.style.paddingBottom=`${s}%`,this.isVimeo&&!this.config.vimeo.premium&&this.supported.ui){const t=100/this.media.offsetWidth*parseInt(window.getComputedStyle(this.media).paddingBottom,10),i=(t-s)/(t/50);this.fullscreen.active?e.style.paddingBottom=null:this.media.style.transform=`translateY(-${i}%)`}else this.isHTML5&&e.classList.add(this.config.classNames.videoFixedRatio);return{padding:s,ratio:i}}function _t(t,e,i=.05){const n=t/e,r=vt(Object.keys(St),n);return Math.abs(r-n)<=i?St[r]:[t,e]}const Ct={getSources(){return this.isHTML5?Array.from(this.media.querySelectorAll("source")).filter(t=>{const e=t.getAttribute("type");return!!V(e)||ot.mime.call(this,e)}):[]},getQualityOptions(){return this.config.quality.forced?this.config.quality.options:Ct.getSources.call(this).map(t=>Number(t.getAttribute("size"))).filter(Boolean)},setup(){if(!this.isHTML5)return;const t=this;t.options.speed=t.config.speed.options,V(this.config.ratio)||wt.call(t),Object.defineProperty(t.media,"quality",{get(){const e=Ct.getSources.call(t).find(e=>e.getAttribute("src")===t.source);return e&&Number(e.getAttribute("size"))},set(e){if(t.quality!==e){if(t.config.quality.forced&&D(t.config.quality.onChange))t.config.quality.onChange(e);else{const i=Ct.getSources.call(t).find(t=>Number(t.getAttribute("size"))===e);if(!i)return;const{currentTime:n,paused:r,preload:s,readyState:a,playbackRate:o}=t.media;t.media.src=i.getAttribute("src"),("none"!==s||a)&&(t.once("loadedmetadata",()=>{t.speed=o,t.currentTime=n,r||gt(t.play())}),t.media.load())}ft.call(t,t.media,"qualitychange",!1,{quality:e})}}})},cancelRequests(){this.isHTML5&&(K(Ct.getSources.call(this)),this.media.setAttribute("src",this.config.blankVideo),this.media.load(),this.debug.log("Cancelled network requests"))}};function Tt(t,...e){return V(t)?t:t.toString().replace(/{(\d+)}/g,(t,i)=>e[i].toString())}const At=(t="",e="",i="")=>t.replace(new RegExp(e.toString().replace(/([.*+?^=!:${}()|[\]/\\])/g,"\\$1"),"g"),i.toString()),Pt=(t="")=>t.toString().replace(/\w\S*/g,t=>t.charAt(0).toUpperCase()+t.slice(1).toLowerCase());function Dt(t){const e=document.createElement("div");return e.appendChild(t),e.innerHTML}const Mt={pip:"PIP",airplay:"AirPlay",html5:"HTML5",vimeo:"Vimeo",youtube:"YouTube"},Lt={get(t="",e={}){if(V(t)||V(e))return"";let i=U(e.i18n,t);if(V(i))return Object.keys(Mt).includes(t)?Mt[t]:"";const n={"{seektime}":e.seekTime,"{title}":e.title};return Object.entries(n).forEach(([t,e])=>{i=At(i,t,e)}),i}};class Rt{constructor(e){t(this,"get",t=>{if(!Rt.supported||!this.enabled)return null;const e=window.localStorage.getItem(this.key);if(V(e))return null;const i=JSON.parse(e);return A(t)&&t.length?i[t]:i}),t(this,"set",t=>{if(!Rt.supported||!this.enabled)return;if(!C(t))return;let e=this.get();V(e)&&(e={}),G(e,t);try{window.localStorage.setItem(this.key,JSON.stringify(e))}catch(t){}}),this.enabled=e.config.storage.enabled,this.key=e.config.storage.key}static get supported(){try{if(!("localStorage"in window))return!1;const t="___test";return window.localStorage.setItem(t,t),window.localStorage.removeItem(t),!0}catch(t){return!1}}}function It(t,e="text"){return new Promise((i,n)=>{try{const n=new XMLHttpRequest;if(!("withCredentials"in n))return;n.addEventListener("load",()=>{if("text"===e)try{i(JSON.parse(n.responseText))}catch(t){i(n.responseText)}else i(n.response)}),n.addEventListener("error",()=>{throw new Error(n.status)}),n.open("GET",t,!0),n.responseType=e,n.send()}catch(t){n(t)}})}function Ft(t,e){if(!A(t))return;const i="cache",n=A(e);let r=!1;const s=()=>null!==document.getElementById(e),a=(t,e)=>{t.innerHTML=e,n&&s()||document.body.insertAdjacentElement("afterbegin",t)};if(!n||!s()){const s=Rt.supported,o=document.createElement("div");if(o.setAttribute("hidden",""),n&&o.setAttribute("id",e),s){const t=window.localStorage.getItem(`${i}-${e}`);if(r=null!==t,r){const e=JSON.parse(t);a(o,e.content)}}It(t).then(t=>{if(!V(t)){if(s)try{window.localStorage.setItem(`${i}-${e}`,JSON.stringify({content:t}))}catch(t){}a(o,t)}}).catch(()=>{})}}const Ot=t=>Math.trunc(t/60/60%60,10);function Bt(t=0,e=!1,i=!1){if(!T(t))return Bt(void 0,e,i);const n=t=>`0${t}`.slice(-2);let r=Ot(t);const s=(t=>Math.trunc(t/60%60,10))(t),a=(t=>Math.trunc(t%60,10))(t);return r=e||r>0?`${r}:`:"",`${i&&t>0?"-":""}${r}${n(s)}:${n(a)}`}const Nt={getIconUrl(){const t=new URL(this.config.iconUrl,window.location),e=window.location.host?window.location.host:window.top.location.host,i=t.host!==e||q.isIE&&!window.svg4everybody;return{url:this.config.iconUrl,cors:i}},findElements(){try{return this.elements.controls=rt.call(this,this.config.selectors.controls.wrapper),this.elements.buttons={play:nt.call(this,this.config.selectors.buttons.play),pause:rt.call(this,this.config.selectors.buttons.pause),restart:rt.call(this,this.config.selectors.buttons.restart),rewind:rt.call(this,this.config.selectors.buttons.rewind),fastForward:rt.call(this,this.config.selectors.buttons.fastForward),mute:rt.call(this,this.config.selectors.buttons.mute),pip:rt.call(this,this.config.selectors.buttons.pip),airplay:rt.call(this,this.config.selectors.buttons.airplay),settings:rt.call(this,this.config.selectors.buttons.settings),captions:rt.call(this,this.config.selectors.buttons.captions),fullscreen:rt.call(this,this.config.selectors.buttons.fullscreen)},this.elements.progress=rt.call(this,this.config.selectors.progress),this.elements.inputs={seek:rt.call(this,this.config.selectors.inputs.seek),volume:rt.call(this,this.config.selectors.inputs.volume)},this.elements.display={buffer:rt.call(this,this.config.selectors.display.buffer),currentTime:rt.call(this,this.config.selectors.display.currentTime),duration:rt.call(this,this.config.selectors.display.duration)},R(this.elements.progress)&&(this.elements.display.seekTooltip=this.elements.progress.querySelector(`.${this.config.classNames.tooltip}`)),!0}catch(t){return this.debug.warn("It looks like there is a problem with your custom controls HTML",t),this.toggleNativeControls(!0),!1}},createIcon(t,e){const i="http://www.w3.org/2000/svg",n=Nt.getIconUrl.call(this),r=`${n.cors?"":n.url}#${this.config.iconPrefix}`,s=document.createElementNS(i,"svg");W(s,G(e,{"aria-hidden":"true",focusable:"false"}));const a=document.createElementNS(i,"use"),o=`${r}-${t}`;return"href"in a&&a.setAttributeNS("http://www.w3.org/1999/xlink","href",o),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",o),s.appendChild(a),s},createLabel(t,e={}){const i=Lt.get(t,this.config);return $("span",{...e,class:[e.class,this.config.classNames.hidden].filter(Boolean).join(" ")},i)},createBadge(t){if(V(t))return null;const e=$("span",{class:this.config.classNames.menu.value});return e.appendChild($("span",{class:this.config.classNames.menu.badge},t)),e},createButton(t,e){const i=G({},e);let n=function(t=""){let e=t.toString();return e=function(t=""){let e=t.toString();return e=At(e,"-"," "),e=At(e,"_"," "),e=Pt(e),At(e," ","")}(e),e.charAt(0).toLowerCase()+e.slice(1)}(t);const r={element:"button",toggle:!1,label:null,icon:null,labelPressed:null,iconPressed:null};switch(["element","icon","label"].forEach(t=>{Object.keys(i).includes(t)&&(r[t]=i[t],delete i[t])}),"button"!==r.element||Object.keys(i).includes("type")||(i.type="button"),Object.keys(i).includes("class")?i.class.split(" ").some(t=>t===this.config.classNames.control)||G(i,{class:`${i.class} ${this.config.classNames.control}`}):i.class=this.config.classNames.control,t){case"play":r.toggle=!0,r.label="play",r.labelPressed="pause",r.icon="play",r.iconPressed="pause";break;case"mute":r.toggle=!0,r.label="mute",r.labelPressed="unmute",r.icon="volume",r.iconPressed="muted";break;case"captions":r.toggle=!0,r.label="enableCaptions",r.labelPressed="disableCaptions",r.icon="captions-off",r.iconPressed="captions-on";break;case"fullscreen":r.toggle=!0,r.label="enterFullscreen",r.labelPressed="exitFullscreen",r.icon="enter-fullscreen",r.iconPressed="exit-fullscreen";break;case"play-large":i.class+=` ${this.config.classNames.control}--overlaid`,n="play",r.label="play",r.icon="play";break;default:V(r.label)&&(r.label=n),V(r.icon)&&(r.icon=t)}const s=$(r.element);return r.toggle?(s.appendChild(Nt.createIcon.call(this,r.iconPressed,{class:"icon--pressed"})),s.appendChild(Nt.createIcon.call(this,r.icon,{class:"icon--not-pressed"})),s.appendChild(Nt.createLabel.call(this,r.labelPressed,{class:"label--pressed"})),s.appendChild(Nt.createLabel.call(this,r.label,{class:"label--not-pressed"}))):(s.appendChild(Nt.createIcon.call(this,r.icon)),s.appendChild(Nt.createLabel.call(this,r.label))),G(i,Q(this.config.selectors.buttons[n],i)),W(s,i),"play"===n?(M(this.elements.buttons[n])||(this.elements.buttons[n]=[]),this.elements.buttons[n].push(s)):this.elements.buttons[n]=s,s},createRange(t,e){const i=$("input",G(Q(this.config.selectors.inputs[t]),{type:"range",min:0,max:100,step:.01,value:0,autocomplete:"off",role:"slider","aria-label":Lt.get(t,this.config),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":0},e));return this.elements.inputs[t]=i,Nt.updateRangeFill.call(this,i),m.setup(i),i},createProgress(t,e){const i=$("progress",G(Q(this.config.selectors.display[t]),{min:0,max:100,value:0,role:"progressbar","aria-hidden":!0},e));if("volume"!==t){i.appendChild($("span",null,"0"));const e={played:"played",buffer:"buffered"}[t],n=e?Lt.get(e,this.config):"";i.innerText=`% ${n.toLowerCase()}`}return this.elements.display[t]=i,i},createTime(t,e){const i=Q(this.config.selectors.display[t],e),n=$("div",G(i,{class:`${i.class?i.class:""} ${this.config.classNames.display.time} `.trim(),"aria-label":Lt.get(t,this.config),role:"timer"}),"00:00");return this.elements.display[t]=n,n},bindMenuItemShortcuts(t,e){ct.call(this,t,"keydown keyup",i=>{if(![" ","ArrowUp","ArrowDown","ArrowRight"].includes(i.key))return;if(i.preventDefault(),i.stopPropagation(),"keydown"===i.type)return;const n=it(t,'[role="menuitemradio"]');if(!n&&[" ","ArrowRight"].includes(i.key))Nt.showMenuPanel.call(this,e,!0);else{let e;" "!==i.key&&("ArrowDown"===i.key||n&&"ArrowRight"===i.key?(e=t.nextElementSibling,R(e)||(e=t.parentNode.firstElementChild)):(e=t.previousElementSibling,R(e)||(e=t.parentNode.lastElementChild)),st.call(this,e,!0))}},!1),ct.call(this,t,"keyup",t=>{"Return"===t.key&&Nt.focusFirstMenuItem.call(this,null,!0)})},createMenuItem({value:t,list:e,type:i,title:n,badge:r=null,checked:s=!1}){const a=Q(this.config.selectors.inputs[i]),o=$("button",G(a,{type:"button",role:"menuitemradio",class:`${this.config.classNames.control} ${a.class?a.class:""}`.trim(),"aria-checked":s,value:t})),l=$("span");l.innerHTML=n,R(r)&&l.appendChild(r),o.appendChild(l),Object.defineProperty(o,"checked",{enumerable:!0,get:()=>"true"===o.getAttribute("aria-checked"),set(t){t&&Array.from(o.parentNode.children).filter(t=>it(t,'[role="menuitemradio"]')).forEach(t=>t.setAttribute("aria-checked","false")),o.setAttribute("aria-checked",t?"true":"false")}}),this.listeners.bind(o,"click keyup",e=>{if(!F(e)||" "===e.key){switch(e.preventDefault(),e.stopPropagation(),o.checked=!0,i){case"language":this.currentTrack=Number(t);break;case"quality":this.quality=t;break;case"speed":this.speed=parseFloat(t)}Nt.showMenuPanel.call(this,"home",F(e))}},i,!1),Nt.bindMenuItemShortcuts.call(this,o,i),e.appendChild(o)},formatTime(t=0,e=!1){return T(t)?Bt(t,Ot(this.duration)>0,e):t},updateTimeDisplay(t=null,e=0,i=!1){R(t)&&T(e)&&(t.innerText=Nt.formatTime(e,i))},updateVolume(){this.supported.ui&&(R(this.elements.inputs.volume)&&Nt.setRange.call(this,this.elements.inputs.volume,this.muted?0:this.volume),R(this.elements.buttons.mute)&&(this.elements.buttons.mute.pressed=this.muted||0===this.volume))},setRange(t,e=0){R(t)&&(t.value=e,Nt.updateRangeFill.call(this,t))},updateProgress(t){if(!this.supported.ui||!I(t))return;let e=0;const i=(t,e)=>{const i=T(e)?e:0,n=R(t)?t:this.elements.display.buffer;if(R(n)){n.value=i;const t=n.getElementsByTagName("span")[0];R(t)&&(t.childNodes[0].nodeValue=i)}};if(t)switch(t.type){case"timeupdate":case"seeking":case"seeked":n=this.currentTime,r=this.duration,e=0===n||0===r||Number.isNaN(n)||Number.isNaN(r)?0:(n/r*100).toFixed(2),"timeupdate"===t.type&&Nt.setRange.call(this,this.elements.inputs.seek,e);break;case"playing":case"progress":i(this.elements.display.buffer,100*this.buffered)}var n,r},updateRangeFill(t){const e=I(t)?t.target:t;if(R(e)&&"range"===e.getAttribute("type")){if(it(e,this.config.selectors.inputs.seek)){e.setAttribute("aria-valuenow",this.currentTime);const t=Nt.formatTime(this.currentTime),i=Nt.formatTime(this.duration),n=Lt.get("seekLabel",this.config);e.setAttribute("aria-valuetext",n.replace("{currentTime}",t).replace("{duration}",i))}else if(it(e,this.config.selectors.inputs.volume)){const t=100*e.value;e.setAttribute("aria-valuenow",t),e.setAttribute("aria-valuetext",`${t.toFixed(1)}%`)}else e.setAttribute("aria-valuenow",e.value);(q.isWebKit||q.isIPadOS)&&e.style.setProperty("--value",e.value/e.max*100+"%")}},updateSeekTooltip(t){var e,i;if(!this.config.tooltips.seek||!R(this.elements.inputs.seek)||!R(this.elements.display.seekTooltip)||0===this.duration)return;const n=this.elements.display.seekTooltip,r=`${this.config.classNames.tooltip}--visible`,s=t=>tt(n,r,t);if(this.touch)return void s(!1);let a=0;const o=this.elements.progress.getBoundingClientRect();if(I(t))a=100/o.width*(t.pageX-o.left);else{if(!et(n,r))return;a=parseFloat(n.style.left,10)}a<0?a=0:a>100&&(a=100);const l=this.duration/100*a;n.innerText=Nt.formatTime(l);const h=null===(e=this.config.markers)||void 0===e||null===(i=e.points)||void 0===i?void 0:i.find(({time:t})=>t===Math.round(l));h&&n.insertAdjacentHTML("afterbegin",`${h.label}<br>`),n.style.left=`${a}%`,I(t)&&["mouseenter","mouseleave"].includes(t.type)&&s("mouseenter"===t.type)},timeUpdate(t){const e=!R(this.elements.display.duration)&&this.config.invertTime;Nt.updateTimeDisplay.call(this,this.elements.display.currentTime,e?this.duration-this.currentTime:this.currentTime,e),t&&"timeupdate"===t.type&&this.media.seeking||Nt.updateProgress.call(this,t)},durationUpdate(){if(!this.supported.ui||!this.config.invertTime&&this.currentTime)return;if(this.duration>=2**32)return Z(this.elements.display.currentTime,!0),void Z(this.elements.progress,!0);R(this.elements.inputs.seek)&&this.elements.inputs.seek.setAttribute("aria-valuemax",this.duration);const t=R(this.elements.display.duration);!t&&this.config.displayDuration&&this.paused&&Nt.updateTimeDisplay.call(this,this.elements.display.currentTime,this.duration),t&&Nt.updateTimeDisplay.call(this,this.elements.display.duration,this.duration),this.config.markers.enabled&&Nt.setMarkers.call(this),Nt.updateSeekTooltip.call(this)},toggleMenuButton(t,e){Z(this.elements.settings.buttons[t],!e)},updateSetting(t,e,i){const n=this.elements.settings.panels[t];let r=null,s=e;if("captions"===t)r=this.currentTrack;else{if(r=V(i)?this[t]:i,V(r)&&(r=this.config[t].default),!V(this.options[t])&&!this.options[t].includes(r))return void this.debug.warn(`Unsupported value of '${r}' for ${t}`);if(!this.config[t].options.includes(r))return void this.debug.warn(`Disabled value of '${r}' for ${t}`)}if(R(s)||(s=n&&n.querySelector('[role="menu"]')),!R(s))return;this.elements.settings.buttons[t].querySelector(`.${this.config.classNames.menu.value}`).innerHTML=Nt.getLabel.call(this,t,r);const a=s&&s.querySelector(`[value="${r}"]`);R(a)&&(a.checked=!0)},getLabel(t,e){switch(t){case"speed":return 1===e?Lt.get("normal",this.config):`${e}×`;case"quality":if(T(e)){const t=Lt.get(`qualityLabel.${e}`,this.config);return t.length?t:`${e}p`}return Pt(e);case"captions":return Ht.getLabel.call(this);default:return null}},setQualityMenu(t){if(!R(this.elements.settings.panels.quality))return;const e="quality",i=this.elements.settings.panels.quality.querySelector('[role="menu"]');M(t)&&(this.options.quality=yt(t).filter(t=>this.config.quality.options.includes(t)));const n=!V(this.options.quality)&&this.options.quality.length>1;if(Nt.toggleMenuButton.call(this,e,n),X(i),Nt.checkMenu.call(this),!n)return;const r=t=>{const e=Lt.get(`qualityBadge.${t}`,this.config);return e.length?Nt.createBadge.call(this,e):null};this.options.quality.sort((t,e)=>{const i=this.config.quality.options;return i.indexOf(t)>i.indexOf(e)?1:-1}).forEach(t=>{Nt.createMenuItem.call(this,{value:t,list:i,type:e,title:Nt.getLabel.call(this,"quality",t),badge:r(t)})}),Nt.updateSetting.call(this,e,i)},setCaptionsMenu(){if(!R(this.elements.settings.panels.captions))return;const t="captions",e=this.elements.settings.panels.captions.querySelector('[role="menu"]'),i=Ht.getTracks.call(this),n=Boolean(i.length);if(Nt.toggleMenuButton.call(this,t,n),X(e),Nt.checkMenu.call(this),!n)return;const r=i.map((t,i)=>({value:i,checked:this.captions.toggled&&this.currentTrack===i,title:Ht.getLabel.call(this,t),badge:t.language&&Nt.createBadge.call(this,t.language.toUpperCase()),list:e,type:"language"}));r.unshift({value:-1,checked:!this.captions.toggled,title:Lt.get("disabled",this.config),list:e,type:"language"}),r.forEach(Nt.createMenuItem.bind(this)),Nt.updateSetting.call(this,t,e)},setSpeedMenu(){if(!R(this.elements.settings.panels.speed))return;const t="speed",e=this.elements.settings.panels.speed.querySelector('[role="menu"]');this.options.speed=this.options.speed.filter(t=>t>=this.minimumSpeed&&t<=this.maximumSpeed);const i=!V(this.options.speed)&&this.options.speed.length>1;Nt.toggleMenuButton.call(this,t,i),X(e),Nt.checkMenu.call(this),i&&(this.options.speed.forEach(i=>{Nt.createMenuItem.call(this,{value:i,list:e,type:t,title:Nt.getLabel.call(this,"speed",i)})}),Nt.updateSetting.call(this,t,e))},checkMenu(){const{buttons:t}=this.elements.settings,e=!V(t)&&Object.values(t).some(t=>!t.hidden);Z(this.elements.settings.menu,!e)},focusFirstMenuItem(t,e=!1){if(this.elements.settings.popup.hidden)return;let i=t;R(i)||(i=Object.values(this.elements.settings.panels).find(t=>!t.hidden));const n=i.querySelector('[role^="menuitem"]');st.call(this,n,e)},toggleMenu(t){const{popup:e}=this.elements.settings,i=this.elements.buttons.settings;if(!R(e)||!R(i))return;const{hidden:n}=e;let r=n;if(P(t))r=t;else if(F(t)&&"Escape"===t.key)r=!1;else if(I(t)){const n=D(t.composedPath)?t.composedPath()[0]:t.target,s=e.contains(n);if(s||!s&&t.target!==i&&r)return}i.setAttribute("aria-expanded",r),Z(e,!r),tt(this.elements.container,this.config.classNames.menu.open,r),r&&F(t)?Nt.focusFirstMenuItem.call(this,null,!0):r||n||st.call(this,i,F(t))},getMenuSize(t){const e=t.cloneNode(!0);e.style.position="absolute",e.style.opacity=0,e.removeAttribute("hidden"),t.parentNode.appendChild(e);const i=e.scrollWidth,n=e.scrollHeight;return K(e),{width:i,height:n}},showMenuPanel(t="",e=!1){const i=this.elements.container.querySelector(`#plyr-settings-${this.id}-${t}`);if(!R(i))return;const n=i.parentNode,r=Array.from(n.children).find(t=>!t.hidden);if(ot.transitions&&!ot.reducedMotion){n.style.width=`${r.scrollWidth}px`,n.style.height=`${r.scrollHeight}px`;const t=Nt.getMenuSize.call(this,i),e=t=>{t.target===n&&["width","height"].includes(t.propertyName)&&(n.style.width="",n.style.height="",ut.call(this,n,z,e))};ct.call(this,n,z,e),n.style.width=`${t.width}px`,n.style.height=`${t.height}px`}Z(r,!0),Z(i,!1),Nt.focusFirstMenuItem.call(this,i,e)},setDownloadUrl(){const t=this.elements.buttons.download;R(t)&&t.setAttribute("href",this.download)},create(t){const{bindMenuItemShortcuts:e,createButton:i,createProgress:n,createRange:r,createTime:s,setQualityMenu:a,setSpeedMenu:o,showMenuPanel:l}=Nt;this.elements.controls=null,M(this.config.controls)&&this.config.controls.includes("play-large")&&this.elements.container.appendChild(i.call(this,"play-large"));const h=$("div",Q(this.config.selectors.controls.wrapper));this.elements.controls=h;const c={class:"plyr__controls__item"};return yt(M(this.config.controls)?this.config.controls:[]).forEach(a=>{if("restart"===a&&h.appendChild(i.call(this,"restart",c)),"rewind"===a&&h.appendChild(i.call(this,"rewind",c)),"play"===a&&h.appendChild(i.call(this,"play",c)),"fast-forward"===a&&h.appendChild(i.call(this,"fast-forward",c)),"progress"===a){const e=$("div",{class:`${c.class} plyr__progress__container`}),i=$("div",Q(this.config.selectors.progress));if(i.appendChild(r.call(this,"seek",{id:`plyr-seek-${t.id}`})),i.appendChild(n.call(this,"buffer")),this.config.tooltips.seek){const t=$("span",{class:this.config.classNames.tooltip},"00:00");i.appendChild(t),this.elements.display.seekTooltip=t}this.elements.progress=i,e.appendChild(this.elements.progress),h.appendChild(e)}if("current-time"===a&&h.appendChild(s.call(this,"currentTime",c)),"duration"===a&&h.appendChild(s.call(this,"duration",c)),"mute"===a||"volume"===a){let{volume:e}=this.elements;if(R(e)&&h.contains(e)||(e=$("div",G({},c,{class:`${c.class} plyr__volume`.trim()})),this.elements.volume=e,h.appendChild(e)),"mute"===a&&e.appendChild(i.call(this,"mute")),"volume"===a&&!q.isIos&&!q.isIPadOS){const i={max:1,step:.05,value:this.config.volume};e.appendChild(r.call(this,"volume",G(i,{id:`plyr-volume-${t.id}`})))}}if("captions"===a&&h.appendChild(i.call(this,"captions",c)),"settings"===a&&!V(this.config.settings)){const n=$("div",G({},c,{class:`${c.class} plyr__menu`.trim(),hidden:""}));n.appendChild(i.call(this,"settings",{"aria-haspopup":!0,"aria-controls":`plyr-settings-${t.id}`,"aria-expanded":!1}));const r=$("div",{class:"plyr__menu__container",id:`plyr-settings-${t.id}`,hidden:""}),s=$("div"),a=$("div",{id:`plyr-settings-${t.id}-home`}),o=$("div",{role:"menu"});a.appendChild(o),s.appendChild(a),this.elements.settings.panels.home=a,this.config.settings.forEach(i=>{const n=$("button",G(Q(this.config.selectors.buttons.settings),{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--forward`,role:"menuitem","aria-haspopup":!0,hidden:""}));e.call(this,n,i),ct.call(this,n,"click",()=>{l.call(this,i,!1)});const r=$("span",null,Lt.get(i,this.config)),a=$("span",{class:this.config.classNames.menu.value});a.innerHTML=t[i],r.appendChild(a),n.appendChild(r),o.appendChild(n);const h=$("div",{id:`plyr-settings-${t.id}-${i}`,hidden:""}),c=$("button",{type:"button",class:`${this.config.classNames.control} ${this.config.classNames.control}--back`});c.appendChild($("span",{"aria-hidden":!0},Lt.get(i,this.config))),c.appendChild($("span",{class:this.config.classNames.hidden},Lt.get("menuBack",this.config))),ct.call(this,h,"keydown",t=>{"ArrowLeft"===t.key&&(t.preventDefault(),t.stopPropagation(),l.call(this,"home",!0))},!1),ct.call(this,c,"click",()=>{l.call(this,"home",!1)}),h.appendChild(c),h.appendChild($("div",{role:"menu"})),s.appendChild(h),this.elements.settings.buttons[i]=n,this.elements.settings.panels[i]=h}),r.appendChild(s),n.appendChild(r),h.appendChild(n),this.elements.settings.popup=r,this.elements.settings.menu=n}if("pip"===a&&ot.pip&&h.appendChild(i.call(this,"pip",c)),"airplay"===a&&ot.airplay&&h.appendChild(i.call(this,"airplay",c)),"download"===a){const t=G({},c,{element:"a",href:this.download,target:"_blank"});this.isHTML5&&(t.download="");const{download:e}=this.config.urls;!N(e)&&this.isEmbed&&G(t,{icon:`logo-${this.provider}`,label:this.provider}),h.appendChild(i.call(this,"download",t))}"fullscreen"===a&&h.appendChild(i.call(this,"fullscreen",c))}),this.isHTML5&&a.call(this,Ct.getQualityOptions.call(this)),o.call(this),h},inject(){if(this.config.loadSprite){const t=Nt.getIconUrl.call(this);t.cors&&Ft(t.url,"sprite-plyr")}this.id=Math.floor(1e4*Math.random());let t=null;this.elements.controls=null;const e={id:this.id,seektime:this.config.seekTime,title:this.config.title};let i,n=!0;if(D(this.config.controls)&&(this.config.controls=this.config.controls.call(this,e)),this.config.controls||(this.config.controls=[]),R(this.config.controls)||A(this.config.controls)?t=this.config.controls:(t=Nt.create.call(this,{id:this.id,seektime:this.config.seekTime,speed:this.speed,quality:this.quality,captions:Ht.getLabel.call(this)}),n=!1),n&&A(this.config.controls)&&(t=(t=>{let i=t;return Object.entries(e).forEach(([t,e])=>{i=At(i,`{${t}}`,e)}),i})(t)),A(this.config.selectors.controls.container)&&(i=document.querySelector(this.config.selectors.controls.container)),R(i)||(i=this.elements.container),i[R(t)?"insertAdjacentElement":"insertAdjacentHTML"]("afterbegin",t),R(this.elements.controls)||Nt.findElements.call(this),!V(this.elements.buttons)){const t=t=>{const e=this.config.classNames.controlPressed;t.setAttribute("aria-pressed","false"),Object.defineProperty(t,"pressed",{configurable:!0,enumerable:!0,get:()=>et(t,e),set(i=!1){tt(t,e,i),t.setAttribute("aria-pressed",i?"true":"false")}})};Object.values(this.elements.buttons).filter(Boolean).forEach(e=>{M(e)||L(e)?Array.from(e).filter(Boolean).forEach(t):t(e)})}if(q.isEdge&&H(i),this.config.tooltips.controls){const{classNames:t,selectors:e}=this.config,i=`${e.controls.wrapper} ${e.labels} .${t.hidden}`,n=nt.call(this,i);Array.from(n).forEach(t=>{tt(t,this.config.classNames.hidden,!1),tt(t,this.config.classNames.tooltip,!0)})}},setMediaMetadata(){try{"mediaSession"in navigator&&(navigator.mediaSession.metadata=new window.MediaMetadata({title:this.config.mediaMetadata.title,artist:this.config.mediaMetadata.artist,album:this.config.mediaMetadata.album,artwork:this.config.mediaMetadata.artwork}))}catch(t){}},setMarkers(){var t,e;if(!this.duration||this.elements.markers)return;const i=null===(t=this.config.markers)||void 0===t||null===(e=t.points)||void 0===e?void 0:e.filter(({time:t})=>t>0&&t<this.duration);if(null==i||!i.length)return;const n=document.createDocumentFragment(),r=document.createDocumentFragment();let s=null;const a=`${this.config.classNames.tooltip}--visible`,o=t=>tt(s,a,t);i.forEach(t=>{const e=$("span",{class:this.config.classNames.marker},""),i=t.time/this.duration*100+"%";s&&(e.addEventListener("mouseenter",()=>{t.label||(s.style.left=i,s.innerHTML=t.label,o(!0))}),e.addEventListener("mouseleave",()=>{o(!1)})),e.addEventListener("click",()=>{this.currentTime=t.time}),e.style.left=i,r.appendChild(e)}),n.appendChild(r),this.config.tooltips.seek||(s=$("span",{class:this.config.classNames.tooltip},""),n.appendChild(s)),this.elements.markers={points:r,tip:s},this.elements.progress.appendChild(n)}};function Vt(t,e=!0){let i=t;if(e){const t=document.createElement("a");t.href=i,i=t.href}try{return new URL(i)}catch(t){return null}}function zt(t){const e=new URLSearchParams;return C(t)&&Object.entries(t).forEach(([t,i])=>{e.set(t,i)}),e}const Ht={setup(){if(!this.supported.ui)return;if(!this.isVideo||this.isYouTube||this.isHTML5&&!ot.textTracks)return void(M(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Nt.setCaptionsMenu.call(this));var t,e;if(R(this.elements.captions)||(this.elements.captions=$("div",Q(this.config.selectors.captions)),this.elements.captions.setAttribute("dir","auto"),t=this.elements.captions,e=this.elements.wrapper,R(t)&&R(e)&&e.parentNode.insertBefore(t,e.nextSibling)),q.isIE&&window.URL){const t=this.media.querySelectorAll("track");Array.from(t).forEach(t=>{const e=t.getAttribute("src"),i=Vt(e);null!==i&&i.hostname!==window.location.href.hostname&&["http:","https:"].includes(i.protocol)&&It(e,"blob").then(e=>{t.setAttribute("src",window.URL.createObjectURL(e))}).catch(()=>{K(t)})})}const i=yt((navigator.languages||[navigator.language||navigator.userLanguage||"en"]).map(t=>t.split("-")[0]));let n=(this.storage.get("language")||this.config.captions.language||"auto").toLowerCase();"auto"===n&&([n]=i);let r=this.storage.get("captions");if(P(r)||({active:r}=this.config.captions),Object.assign(this.captions,{toggled:!1,active:r,language:n,languages:i}),this.isHTML5){const t=this.config.captions.update?"addtrack removetrack":"removetrack";ct.call(this,this.media.textTracks,t,Ht.update.bind(this))}setTimeout(Ht.update.bind(this),0)},update(){const t=Ht.getTracks.call(this,!0),{active:e,language:i,meta:n,currentTrackNode:r}=this.captions,s=Boolean(t.find(t=>t.language===i));this.isHTML5&&this.isVideo&&t.filter(t=>!n.get(t)).forEach(t=>{this.debug.log("Track added",t),n.set(t,{default:"showing"===t.mode}),"showing"===t.mode&&(t.mode="hidden"),ct.call(this,t,"cuechange",()=>Ht.updateCues.call(this))}),(s&&this.language!==i||!t.includes(r))&&(Ht.setLanguage.call(this,i),Ht.toggle.call(this,e&&s)),this.elements&&tt(this.elements.container,this.config.classNames.captions.enabled,!V(t)),M(this.config.controls)&&this.config.controls.includes("settings")&&this.config.settings.includes("captions")&&Nt.setCaptionsMenu.call(this)},toggle(t,e=!0){if(!this.supported.ui)return;const{toggled:i}=this.captions,n=this.config.classNames.captions.active,r=_(t)?!i:t;if(r!==i){if(e||(this.captions.active=r,this.storage.set({captions:r})),!this.language&&r&&!e){const t=Ht.getTracks.call(this),e=Ht.findTrack.call(this,[this.captions.language,...this.captions.languages],!0);return this.captions.language=e.language,void Ht.set.call(this,t.indexOf(e))}this.elements.buttons.captions&&(this.elements.buttons.captions.pressed=r),tt(this.elements.container,n,r),this.captions.toggled=r,Nt.updateSetting.call(this,"captions"),ft.call(this,this.media,r?"captionsenabled":"captionsdisabled")}setTimeout(()=>{r&&this.captions.toggled&&(this.captions.currentTrackNode.mode="hidden")})},set(t,e=!0){const i=Ht.getTracks.call(this);if(-1!==t)if(T(t))if(t in i){if(this.captions.currentTrack!==t){this.captions.currentTrack=t;const n=i[t],{language:r}=n||{};this.captions.currentTrackNode=n,Nt.updateSetting.call(this,"captions"),e||(this.captions.language=r,this.storage.set({language:r})),this.isVimeo&&this.embed.enableTextTrack(r),ft.call(this,this.media,"languagechange")}Ht.toggle.call(this,!0,e),this.isHTML5&&this.isVideo&&Ht.updateCues.call(this)}else this.debug.warn("Track not found",t);else this.debug.warn("Invalid caption argument",t);else Ht.toggle.call(this,!1,e)},setLanguage(t,e=!0){if(!A(t))return void this.debug.warn("Invalid language argument",t);const i=t.toLowerCase();this.captions.language=i;const n=Ht.getTracks.call(this),r=Ht.findTrack.call(this,[i]);Ht.set.call(this,n.indexOf(r),e)},getTracks(t=!1){return Array.from((this.media||{}).textTracks||[]).filter(e=>!this.isHTML5||t||this.captions.meta.has(e)).filter(t=>["captions","subtitles"].includes(t.kind))},findTrack(t,e=!1){const i=Ht.getTracks.call(this),n=t=>Number((this.captions.meta.get(t)||{}).default),r=Array.from(i).sort((t,e)=>n(e)-n(t));let s;return t.every(t=>(s=r.find(e=>e.language===t),!s)),s||(e?r[0]:void 0)},getCurrentTrack(){return Ht.getTracks.call(this)[this.currentTrack]},getLabel(t){let e=t;return!O(e)&&ot.textTracks&&this.captions.toggled&&(e=Ht.getCurrentTrack.call(this)),O(e)?V(e.label)?V(e.language)?Lt.get("enabled",this.config):t.language.toUpperCase():e.label:Lt.get("disabled",this.config)},updateCues(t){if(!this.supported.ui)return;if(!R(this.elements.captions))return void this.debug.warn("No captions element to render to");if(!_(t)&&!Array.isArray(t))return void this.debug.warn("updateCues: Invalid input",t);let e=t;if(!e){const t=Ht.getCurrentTrack.call(this);e=Array.from((t||{}).activeCues||[]).map(t=>t.getCueAsHTML()).map(Dt)}const i=e.map(t=>t.trim()).join("\n");if(i!==this.elements.captions.innerHTML){X(this.elements.captions);const t=$("span",Q(this.config.selectors.caption));t.innerHTML=i,this.elements.captions.appendChild(t),ft.call(this,this.media,"cuechange")}}},qt={enabled:!0,title:"",debug:!1,autoplay:!1,autopause:!0,playsinline:!0,seekTime:10,volume:1,muted:!1,duration:null,displayDuration:!0,invertTime:!0,toggleInvert:!0,ratio:null,clickToPlay:!0,hideControls:!0,resetOnEnd:!1,disableContextMenu:!0,loadSprite:!0,iconPrefix:"plyr",iconUrl:"https://cdn.plyr.io/3.7.8/plyr.svg",blankVideo:"https://cdn.plyr.io/static/blank.mp4",quality:{default:576,options:[4320,2880,2160,1440,1080,720,576,480,360,240],forced:!1,onChange:null},loop:{active:!1},speed:{selected:1,options:[.5,.75,1,1.25,1.5,1.75,2,4]},keyboard:{focused:!0,global:!1},tooltips:{controls:!1,seek:!0},captions:{active:!1,language:"auto",update:!1},fullscreen:{enabled:!0,fallback:!0,iosNative:!1},storage:{enabled:!0,key:"plyr"},controls:["play-large","play","progress","current-time","mute","volume","captions","settings","pip","airplay","fullscreen"],settings:["captions","quality","speed"],i18n:{restart:"Restart",rewind:"Rewind {seektime}s",play:"Play",pause:"Pause",fastForward:"Forward {seektime}s",seek:"Seek",seekLabel:"{currentTime} of {duration}",played:"Played",buffered:"Buffered",currentTime:"Current time",duration:"Duration",volume:"Volume",mute:"Mute",unmute:"Unmute",enableCaptions:"Enable captions",disableCaptions:"Disable captions",download:"Download",enterFullscreen:"Enter fullscreen",exitFullscreen:"Exit fullscreen",frameTitle:"Player for {title}",captions:"Captions",settings:"Settings",pip:"PIP",menuBack:"Go back to previous menu",speed:"Speed",normal:"Normal",quality:"Quality",loop:"Loop",start:"Start",end:"End",all:"All",reset:"Reset",disabled:"Disabled",enabled:"Enabled",advertisement:"Ad",qualityBadge:{2160:"4K",1440:"HD",1080:"HD",720:"HD",576:"SD",480:"S
2D"}},urls:{download:null,vimeo:{sdk:"https://player.vimeo.com/api/player.js",iframe:"https://player.vimeo.com/video/{0}?{1}",api:"https://vimeo.com/api/oembed.json?url={0}"},youtube:{sdk:"https://www.youtube.com/iframe_api",api:"https://noembed.com/embed?url=https://www.youtube.com/watch?v={0}"},googleIMA:{sdk:"https://imasdk.googleapis.com/js/sdkloader/ima3.js"}},listeners:{seek:null,play:null,pause:null,restart:null,rewind:null,fastForward:null,mute:null,volume:null,captions:null,download:null,fullscreen:null,pip:null,airplay:null,speed:null,quality:null,loop:null,language:null},events:["ended","progress","stalled","playing","waiting","canplay","canplaythrough","loadstart","loadeddata","loadedmetadata","timeupdate","volumechange","play","pause","error","seeking","seeked","emptied","ratechange","cuechange","download","enterfullscreen","exitfullscreen","captionsenabled","captionsdisabled","languagechange","controlshidden","controlsshown","ready","statechange","qualitychange","adsloaded","adscontentpause","adscontentresume","adstarted","adsmidpoint","adscomplete","adsallcomplete","adsimpression","adsclick"],selectors:{editable:"input, textarea, select, [contenteditable]",container:".plyr",controls:{container:null,wrapper:".plyr__controls"},labels:"[data-plyr]",buttons:{play:'[data-plyr="play"]',pause:'[data-plyr="pause"]',restart:'[data-plyr="restart"]',rewind:'[data-plyr="rewind"]',fastForward:'[data-plyr="fast-forward"]',mute:'[data-plyr="mute"]',captions:'[data-plyr="captions"]',download:'[data-plyr="download"]',fullscreen:'[data-plyr="fullscreen"]',pip:'[data-plyr="pip"]',airplay:'[data-plyr="airplay"]',settings:'[data-plyr="settings"]',loop:'[data-plyr="loop"]'},inputs:{seek:'[data-plyr="seek"]',volume:'[data-plyr="volume"]',speed:'[data-plyr="speed"]',language:'[data-plyr="language"]',quality:'[data-plyr="quality"]'},display:{currentTime:".plyr__time--current",duration:".plyr__time--duration",buffer:".plyr__progress__buffer",loop:".plyr__progress__loop",volume:".plyr__volume--display"},progress:".plyr__progress",captions:".plyr__captions",caption:".plyr__caption"},classNames:{type:"plyr--{0}",provider:"plyr--{0}",video:"plyr__video-wrapper",embed:"plyr__video-embed",videoFixedRatio:"plyr__video-wrapper--fixed-ratio",embedContainer:"plyr__video-embed__container",poster:"plyr__poster",posterEnabled:"plyr__poster-enabled",ads:"plyr__ads",control:"plyr__control",controlPressed:"plyr__control--pressed",playing:"plyr--playing",paused:"plyr--paused",stopped:"plyr--stopped",loading:"plyr--loading",hover:"plyr--hover",tooltip:"plyr__tooltip",cues:"plyr__cues",marker:"plyr__progress__marker",hidden:"plyr__sr-only",hideControls:"plyr--hide-controls",isTouch:"plyr--is-touch",uiSupported:"plyr--full-ui",noTransition:"plyr--no-transition",display:{time:"plyr__time"},menu:{value:"plyr__menu__value",badge:"plyr__badge",open:"plyr--menu-open"},captions:{enabled:"plyr--captions-enabled",active:"plyr--captions-active"},fullscreen:{enabled:"plyr--fullscreen-enabled",fallback:"plyr--fullscreen-fallback"},pip:{supported:"plyr--pip-supported",active:"plyr--pip-active"},airplay:{supported:"plyr--airplay-supported",active:"plyr--airplay-active"},previewThumbnails:{thumbContainer:"plyr__preview-thumb",thumbContainerShown:"plyr__preview-thumb--is-shown",imageContainer:"plyr__preview-thumb__image-container",timeContainer:"plyr__preview-thumb__time-container",scrubbingContainer:"plyr__preview-scrubbing",scrubbingContainerShown:"plyr__preview-scrubbing--is-shown"}},attributes:{embed:{provider:"data-plyr-provider",id:"data-plyr-embed-id",hash:"data-plyr-embed-hash"}},ads:{enabled:!1,publisherId:"",tagUrl:""},previewThumbnails:{enabled:!1,src:""},vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,referrerPolicy:null,premium:!1},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!1},mediaMetadata:{title:"",artist:"",album:"",artwork:[]},markers:{enabled:!1,points:[]}},Ut="picture-in-picture",Gt={html5:"html5",youtube:"youtube",vimeo:"vimeo"},jt="video",Wt=()=>{};class $t{constructor(t=!1){this.enabled=window.console&&t,this.enabled&&this.log("Debugging enabled")}get log(){return this.enabled?Function.prototype.bind.call(console.log,console):Wt}get warn(){return this.enabled?Function.prototype.bind.call(console.warn,console):Wt}get error(){return this.enabled?Function.prototype.bind.call(console.error,console):Wt}}
vendor: 15,342 bytes, line 2
2class Yt{constructor(e){t(this,"onChange",()=>{if(!this.supported)return;const t=this.player.elements.buttons.fullscreen;R(t)&&(t.pressed=this.active);const e=this.target===this.player.media?this.target:this.player.elements.container;ft.call(this.player,e,this.active?"enterfullscreen":"exitfullscreen",!0)}),t(this,"toggleFallback",(t=!1)=>{if(t?this.scrollPosition={x:window.scrollX??0,y:window.scrollY??0}:window.scrollTo(this.scrollPosition.x,this.scrollPosition.y),document.body.style.overflow=t?"hidden":"",tt(this.target,this.player.config.classNames.fullscreen.fallback,t),q.isIos){let e=document.head.querySelector('meta[name="viewport"]');const i="viewport-fit=cover";e||(e=document.createElement("meta"),e.setAttribute("name","viewport"));const n=A(e.content)&&e.content.includes(i);t?(this.cleanupViewport=!n,n||(e.content+=`,${i}`)):this.cleanupViewport&&(e.content=e.content.split(",").filter(t=>t.trim()!==i).join(","))}this.onChange()}),t(this,"trapFocus",t=>{if(q.isIos||q.isIPadOS||!this.active||"Tab"!==t.key)return;const e=document.activeElement,i=nt.call(this.player,"a[href], button:not(:disabled), input:not(:disabled), [tabindex]"),[n]=i,r=i[i.length-1];e!==r||t.shiftKey?e===n&&t.shiftKey&&(r.focus(),t.preventDefault()):(n.focus(),t.preventDefault())}),t(this,"update",()=>{if(this.supported){let t;t=this.forceFallback?"Fallback (forced)":Yt.nativeSupported?"Native":"Fallback",this.player.debug.log(`${t} fullscreen enabled`)}else this.player.debug.log("Fullscreen not supported and fallback disabled");tt(this.player.elements.container,this.player.config.classNames.fullscreen.enabled,this.supported)}),t(this,"enter",()=>{this.supported&&(q.isIos&&this.player.config.fullscreen.iosNative?this.player.isVimeo?this.player.embed.requestFullscreen():this.target.webkitEnterFullscreen():!Yt.nativeSupported||this.forceFallback?this.toggleFallback(!0):this.prefix?V(this.prefix)||this.target[`${this.prefix}Request${this.property}`]():this.target.requestFullscreen({navigationUI:"hide"}))}),t(this,"exit",()=>{if(this.supported)if(q.isIos&&this.player.config.fullscreen.iosNative)this.player.isVimeo?this.player.embed.exitFullscreen():this.target.webkitEnterFullscreen(),gt(this.player.play());else if(!Yt.nativeSupported||this.forceFallback)this.toggleFallback(!1);else if(this.prefix){if(!V(this.prefix)){const t="moz"===this.prefix?"Cancel":"Exit";document[`${this.prefix}${t}${this.property}`]()}}else(document.cancelFullScreen||document.exitFullscreen).call(document)}),t(this,"toggle",()=>{this.active?this.exit():this.enter()}),this.player=e,this.prefix=Yt.prefix,this.property=Yt.property,this.scrollPosition={x:0,y:0},this.forceFallback="force"===e.config.fullscreen.fallback,this.player.elements.fullscreen=e.config.fullscreen.container&&function(t,e){const{prototype:i}=Element;return(i.closest||function(){let t=this;do{if(it.matches(t,e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null}).call(t,e)}(this.player.elements.container,e.config.fullscreen.container),ct.call(this.player,document,"ms"===this.prefix?"MSFullscreenChange":`${this.prefix}fullscreenchange`,()=>{this.onChange()}),ct.call(this.player,this.player.elements.container,"dblclick",t=>{R(this.player.elements.controls)&&this.player.elements.controls.contains(t.target)||this.player.listeners.proxy(t,this.toggle,"fullscreen")}),ct.call(this,this.player.elements.container,"keydown",t=>this.trapFocus(t)),this.update()}static get nativeSupported(){return!!(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}get useNative(){return Yt.nativeSupported&&!this.forceFallback}static get prefix(){if(D(document.exitFullscreen))return"";let t="";return["webkit","moz","ms"].some(e=>!(!D(document[`${e}ExitFullscreen`])&&!D(document[`${e}CancelFullScreen`])||(t=e,0))),t}static get property(){return"moz"===this.prefix?"FullScreen":"Fullscreen"}get supported(){return[this.player.config.fullscreen.enabled,this.player.isVideo,Yt.nativeSupported||this.player.config.fullscreen.fallback,!this.player.isYouTube||Yt.nativeSupported||!q.isIos||this.player.config.playsinline&&!this.player.config.fullscreen.iosNative].every(Boolean)}get active(){if(!this.supported)return!1;if(!Yt.nativeSupported||this.forceFallback)return et(this.target,this.player.config.classNames.fullscreen.fallback);const t=this.prefix?this.target.getRootNode()[`${this.prefix}${this.property}Element`]:this.target.getRootNode().fullscreenElement;return t&&t.shadowRoot?t===this.target.getRootNode().host:t===this.target}get target(){return q.isIos&&this.player.config.fullscreen.iosNative?this.player.media:this.player.elements.fullscreen??this.player.elements.container}}function Kt(t,e=1){return new Promise((i,n)=>{const r=new Image,s=()=>{delete r.onload,delete r.onerror,(r.naturalWidth>=e?i:n)(r)};Object.assign(r,{onload:s,onerror:s,src:t})})}const Xt={addStyleHook(){tt(this.elements.container,this.config.selectors.container.replace(".",""),!0),tt(this.elements.container,this.config.classNames.uiSupported,this.supported.ui)},toggleNativeControls(t=!1){t&&this.isHTML5?this.media.setAttribute("controls",""):this.media.removeAttribute("controls")},build(){if(this.listeners.media(),!this.supported.ui)return this.debug.warn(`Basic support only for ${this.provider} ${this.type}`),void Xt.toggleNativeControls.call(this,!0);R(this.elements.controls)||(Nt.inject.call(this),this.listeners.controls()),Xt.toggleNativeControls.call(this),this.isHTML5&&Ht.setup.call(this),this.volume=null,this.muted=null,this.loop=null,this.quality=null,this.speed=null,Nt.updateVolume.call(this),Nt.timeUpdate.call(this),Nt.durationUpdate.call(this),Xt.checkPlaying.call(this),tt(this.elements.container,this.config.classNames.pip.supported,ot.pip&&this.isHTML5&&this.isVideo),tt(this.elements.container,this.config.classNames.airplay.supported,ot.airplay&&this.isHTML5),tt(this.elements.container,this.config.classNames.isTouch,this.touch),this.ready=!0,setTimeout(()=>{ft.call(this,this.media,"ready")},0),Xt.setTitle.call(this),this.poster&&Xt.setPoster.call(this,this.poster,!1).catch(()=>{}),this.config.duration&&Nt.durationUpdate.call(this),this.config.mediaMetadata&&Nt.setMediaMetadata.call(this)},setTitle(){let t=Lt.get("play",this.config);if(A(this.config.title)&&!V(this.config.title)&&(t+=`, ${this.config.title}`),Array.from(this.elements.buttons.play||[]).forEach(e=>{e.setAttribute("aria-label",t)}),this.isEmbed){const t=rt.call(this,"iframe");if(!R(t))return;const e=V(this.config.title)?"video":this.config.title,i=Lt.get("frameTitle",this.config);t.setAttribute("title",i.replace("{title}",e))}},togglePoster(t){tt(this.elements.container,this.config.classNames.posterEnabled,t)},setPoster(t,e=!0){return e&&this.poster?Promise.reject(new Error("Poster already set")):(this.media.setAttribute("data-poster",t),this.elements.poster.removeAttribute("hidden"),mt.call(this).then(()=>Kt(t)).catch(e=>{throw t===this.poster&&Xt.togglePoster.call(this,!1),e}).then(()=>{if(t!==this.poster)throw new Error("setPoster cancelled by later call to setPoster")}).then(()=>(Object.assign(this.elements.poster.style,{backgroundImage:`url('${t}')`,backgroundSize:""}),Xt.togglePoster.call(this,!0),t)))},checkPlaying(t){tt(this.elements.container,this.config.classNames.playing,this.playing),tt(this.elements.container,this.config.classNames.paused,this.paused),tt(this.elements.container,this.config.classNames.stopped,this.stopped),Array.from(this.elements.buttons.play||[]).forEach(t=>{Object.assign(t,{pressed:this.playing}),t.setAttribute("aria-label",Lt.get(this.playing?"pause":"play",this.config))}),I(t)&&"timeupdate"===t.type||Xt.toggleControls.call(this)},checkLoading(t){this.loading=["stalled","waiting"].includes(t.type),clearTimeout(this.timers.loading),this.timers.loading=setTimeout(()=>{tt(this.elements.container,this.config.classNames.loading,this.loading),Xt.toggleControls.call(this)},this.loading?250:0)},toggleControls(t){const{controls:e}=this.elements;if(e&&this.config.hideControls){const i=this.touch&&this.lastSeekTime+2e3>Date.now();this.toggleControls(Boolean(t||this.loading||this.paused||e.pressed||e.hover||i))}},migrateStyles(){Object.values({...this.media.style}).filter(t=>!V(t)&&A(t)&&t.startsWith("--plyr")).forEach(t=>{this.elements.container.style.setProperty(t,this.media.style.getPropertyValue(t)),this.media.style.removeProperty(t)}),V(this.media.style)&&this.media.removeAttribute("style")}};class Jt{constructor(e){t(this,"firstTouch",()=>{const{player:t}=this,{elements:e}=t;t.touch=!0,tt(e.container,t.config.classNames.isTouch,!0)}),t(this,"global",(t=!0)=>{const{player:e}=this;e.config.keyboard.global&&ht.call(e,window,"keydown keyup",this.handleKey,t,!1),ht.call(e,document.body,"click",this.toggleMenu,t),dt.call(e,document.body,"touchstart",this.firstTouch)}),t(this,"container",()=>{const{player:t}=this,{config:e,elements:i,timers:n}=t;!e.keyboard.global&&e.keyboard.focused&&ct.call(t,i.container,"keydown keyup",this.handleKey,!1),ct.call(t,i.container,"mousemove mouseleave touchstart touchmove enterfullscreen exitfullscreen",e=>{const{controls:r}=i;r&&"enterfullscreen"===e.type&&(r.pressed=!1,r.hover=!1);let s=0;["touchstart","touchmove","mousemove"].includes(e.type)&&(Xt.toggleControls.call(t,!0),s=t.touch?3e3:2e3),clearTimeout(n.controls),n.controls=setTimeout(()=>Xt.toggleControls.call(t,!1),s)});const r=()=>{if(!t.isVimeo||t.config.vimeo.premium)return;const e=i.wrapper,{active:n}=t.fullscreen,[r,s]=xt.call(t),a=bt(`aspect-ratio: ${r} / ${s}`);if(!n)return void(a?(e.style.width=null,e.style.height=null):(e.style.maxWidth=null,e.style.margin=null));const[o,l]=[Math.max(document.documentElement.clientWidth||0,window.innerWidth||0),Math.max(document.documentElement.clientHeight||0,window.innerHeight||0)],h=o/l>r/s;a?(e.style.width=h?"auto":"100%",e.style.height=h?"100%":"auto"):(e.style.maxWidth=h?l/s*r+"px":null,e.style.margin=h?"0 auto":null)},s=()=>{clearTimeout(n.resized),n.resized=setTimeout(r,50)};ct.call(t,i.container,"enterfullscreen exitfullscreen",e=>{const{target:n}=t.fullscreen;n===i.container&&(!t.isEmbed&&V(t.config.ratio)||(r(),("enterfullscreen"===e.type?ct:ut).call(t,window,"resize",s)))})}),t(this,"media",()=>{const{player:t}=this,{elements:e}=t;if(ct.call(t,t.media,"timeupdate seeking seeked",e=>Nt.timeUpdate.call(t,e)),ct.call(t,t.media,"durationchange loadeddata loadedmetadata",e=>Nt.durationUpdate.call(t,e)),ct.call(t,t.media,"ended",()=>{t.isHTML5&&t.isVideo&&t.config.resetOnEnd&&(t.restart(),t.pause())}),ct.call(t,t.media,"progress playing seeking seeked",e=>Nt.updateProgress.call(t,e)),ct.call(t,t.media,"volumechange",e=>Nt.updateVolume.call(t,e)),ct.call(t,t.media,"playing play pause ended emptied timeupdate",e=>Xt.checkPlaying.call(t,e)),ct.call(t,t.media,"waiting canplay seeked playing",e=>Xt.checkLoading.call(t,e)),t.supported.ui&&t.config.clickToPlay&&!t.isAudio){const i=rt.call(t,`.${t.config.classNames.video}`);if(!R(i))return;ct.call(t,e.container,"click",n=>{([e.container,i].includes(n.target)||i.contains(n.target))&&(t.touch&&t.config.hideControls||(t.ended?(this.proxy(n,t.restart,"restart"),this.proxy(n,()=>{gt(t.play())},"play")):this.proxy(n,()=>{gt(t.togglePlay())},"play")))})}t.supported.ui&&t.config.disableContextMenu&&ct.call(t,e.wrapper,"contextmenu",t=>{t.preventDefault()},!1),ct.call(t,t.media,"volumechange",()=>{t.storage.set({volume:t.volume,muted:t.muted})}),ct.call(t,t.media,"ratechange",()=>{Nt.updateSetting.call(t,"speed"),t.storage.set({speed:t.speed})}),ct.call(t,t.media,"qualitychange",e=>{Nt.updateSetting.call(t,"quality",null,e.detail.quality)}),ct.call(t,t.media,"ready qualitychange",()=>{Nt.setDownloadUrl.call(t)});const i=t.config.events.concat(["keyup","keydown"]).join(" ");ct.call(t,t.media,i,i=>{let{detail:n={}}=i;"error"===i.type&&(n=t.media.error),ft.call(t,e.container,i.type,!0,n)})}),t(this,"proxy",(t,e,i)=>{const{player:n}=this,r=n.config.listeners[i];let s=!0;D(r)&&(s=r.call(n,t)),!1!==s&&D(e)&&e.call(n,t)}),t(this,"bind",(t,e,i,n,r=!0)=>{const{player:s}=this,a=s.config.listeners[n],o=D(a);ct.call(s,t,e,t=>this.proxy(t,i,n),r&&!o)}),t(this,"controls",()=>{const{player:t}=this,{elements:e}=t,i=q.isIE?"change":"input";if(e.buttons.play&&Array.from(e.buttons.play).forEach(e=>{this.bind(e,"click",()=>{gt(t.togglePlay())},"play")}),this.bind(e.buttons.restart,"click",t.restart,"restart"),this.bind(e.buttons.rewind,"click",()=>{t.lastSeekTime=Date.now(),t.rewind()},"rewind"),this.bind(e.buttons.fastForward,"click",()=>{t.lastSeekTime=Date.now(),t.forward()},"fastForward"),this.bind(e.buttons.mute,"click",()=>{t.muted=!t.muted},"mute"),this.bind(e.buttons.captions,"click",()=>t.toggleCaptions()),this.bind(e.buttons.download,"click",()=>{ft.call(t,t.media,"download")},"download"),this.bind(e.buttons.fullscreen,"click",()=>{t.fullscreen.toggle()},"fullscreen"),this.bind(e.buttons.pip,"click",()=>{t.pip="toggle"},"pip"),this.bind(e.buttons.airplay,"click",t.airplay,"airplay"),this.bind(e.buttons.settings,"click",e=>{e.stopPropagation(),e.preventDefault(),Nt.toggleMenu.call(t,e)},null,!1),this.bind(e.buttons.settings,"keyup",e=>{[" ","Enter"].includes(e.key)&&("Enter"!==e.key?(e.preventDefault(),e.stopPropagation(),Nt.toggleMenu.call(t,e)):Nt.focusFirstMenuItem.call(t,null,!0))},null,!1),this.bind(e.settings.menu,"keydown",e=>{"Escape"===e.key&&Nt.toggleMenu.call(t,e)}),this.bind(e.inputs.seek,"mousedown mousemove",t=>{const i=e.progress.getBoundingClientRect(),n=100/i.width*(t.pageX-i.left);t.currentTarget.setAttribute("seek-value",n)}),this.bind(e.inputs.seek,"mousedown mouseup keydown keyup touchstart touchend",e=>{const i=e.currentTarget,n="play-on-seeked";if(F(e)&&!["ArrowLeft","ArrowRight"].includes(e.key))return;t.lastSeekTime=Date.now();const r=i.hasAttribute(n),s=["mouseup","touchend","keyup"].includes(e.type);r&&s?(i.removeAttribute(n),gt(t.play())):!s&&t.playing&&(i.setAttribute(n,""),t.pause())}),q.isIos){const e=nt.call(t,'input[type="range"]');Array.from(e).forEach(t=>this.bind(t,i,t=>H(t.target)))}this.bind(e.inputs.seek,i,e=>{const i=e.currentTarget;let n=i.getAttribute("seek-value");V(n)&&(n=i.value),i.removeAttribute("seek-value"),t.currentTime=n/i.max*t.duration},"seek"),this.bind(e.progress,"mouseenter mouseleave mousemove",e=>Nt.updateSeekTooltip.call(t,e)),this.bind(e.progress,"mousemove touchmove",e=>{const{previewThumbnails:i}=t;i&&i.loaded&&i.startMove(e)}),this.bind(e.progress,"mouseleave touchend click",()=>{const{previewThumbnails:e}=t;e&&e.loaded&&e.endMove(!1,!0)}),this.bind(e.progress,"mousedown touchstart",e=>{const{previewThumbnails:i}=t;i&&i.loaded&&i.startScrubbing(e)}),this.bind(e.progress,"mouseup touchend",e=>{const{previewThumbnails:i}=t;i&&i.loaded&&i.endScrubbing(e)}),q.isWebKit&&Array.from(nt.call(t,'input[type="range"]')).forEach(e=>{this.bind(e,"input",e=>Nt.updateRangeFill.call(t,e.target))}),t.config.toggleInvert&&!R(e.display.duration)&&this.bind(e.display.currentTime,"click",()=>{0!==t.currentTime&&(t.config.invertTime=!t.config.invertTime,Nt.timeUpdate.call(t))}),this.bind(e.inputs.volume,i,e=>{t.volume=e.target.value},"volume"),this.bind(e.controls,"mouseenter mouseleave",i=>{e.controls.hover=!t.touch&&"mouseenter"===i.type}),e.fullscreen&&Array.from(e.fullscreen.children).filter(t=>
vendor: 5,425 bytes, line 2
2!t.contains(e.container)).forEach(i=>{this.bind(i,"mouseenter mouseleave",i=>{e.controls&&(e.controls.hover=!t.touch&&"mouseenter"===i.type)})}),this.bind(e.controls,"mousedown mouseup touchstart touchend touchcancel",t=>{e.controls.pressed=["mousedown","touchstart"].includes(t.type)}),this.bind(e.controls,"focusin",()=>{const{config:i,timers:n}=t;tt(e.controls,i.classNames.noTransition,!0),Xt.toggleControls.call(t,!0),setTimeout(()=>{tt(e.controls,i.classNames.noTransition,!1)},0);const r=this.touch?3e3:4e3;clearTimeout(n.controls),n.controls=setTimeout(()=>Xt.toggleControls.call(t,!1),r)}),this.bind(e.inputs.volume,"wheel",e=>{const i=e.webkitDirectionInvertedFromDevice,[n,r]=[e.deltaX,-e.deltaY].map(t=>i?-t:t),s=Math.sign(Math.abs(n)>Math.abs(r)?n:r);t.increaseVolume(s/50);const{volume:a}=t.media;(1===s&&a<1||-1===s&&a>0)&&e.preventDefault()},"volume",!1)}),this.player=e,this.lastKey=null,this.focusTimer=null,this.lastKeyDown=null,this.handleKey=this.handleKey.bind(this),this.toggleMenu=this.toggleMenu.bind(this),this.firstTouch=this.firstTouch.bind(this)}handleKey(t){const{player:e}=this,{elements:i}=e,{key:n,type:r,altKey:s,ctrlKey:a,metaKey:o,shiftKey:l}=t,h="keydown"===r,c=h&&n===this.lastKey;var u;if(!(s||a||o||l)&&n)if(h){const r=document.activeElement;if(R(r)){const{editable:n}=e.config.selectors,{seek:s}=i.inputs;if(r!==s&&it(r,n))return;if(" "===t.key&&it(r,'button, [role^="menuitem"]'))return}switch([" ","ArrowLeft","ArrowUp","ArrowRight","ArrowDown","0","1","2","3","4","5","6","7","8","9","c","f","k","l","m"].includes(n)&&(t.preventDefault(),t.stopPropagation()),n){case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":c||(u=parseInt(n,10),e.currentTime=e.duration/10*u);break;case" ":case"k":c||gt(e.togglePlay());break;case"ArrowUp":e.increaseVolume(.1);break;case"ArrowDown":e.decreaseVolume(.1);break;case"m":c||(e.muted=!e.muted);break;case"ArrowRight":e.forward();break;case"ArrowLeft":e.rewind();break;case"f":e.fullscreen.toggle();break;case"c":c||e.toggleCaptions();break;case"l":e.loop=!e.loop}"Escape"===n&&!e.fullscreen.usingNative&&e.fullscreen.active&&e.fullscreen.toggle(),this.lastKey=n}else this.lastKey=null}toggleMenu(t){Nt.toggleMenu.call(this.player,t)}}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==i.g?i.g:"undefined"!=typeof self&&self;var Qt=function(t,e){return function(t){t.exports=function(){var t=function(){},e={},i={},n={};function r(t,e){t=t.push?t:[t];var r,s,a,o=[],l=t.length,h=l;for(r=function(t,i){i.length&&o.push(t),--h||e(o)};l--;)s=t[l],(a=i[s])?r(s,a):(n[s]=n[s]||[]).push(r)}function s(t,e){if(t){var r=n[t];if(i[t]=e,r)for(;r.length;)r[0](t,e),r.splice(0,1)}}function a(e,i){e.call&&(e={success:e}),i.length?(e.error||t)(i):(e.success||t)(e)}function o(e,i,n,r){var s,a,l=document,h=n.async,c=(n.numRetries||0)+1,u=n.before||t,d=e.replace(/[\?|#].*$/,""),f=e.replace(/^(css|img)!/,"");r=r||0,/(^css!|\.css$)/.test(d)?((a=l.createElement("link")).rel="stylesheet",a.href=f,(s="hideFocus"in a)&&a.relList&&(s=0,a.rel="preload",a.as="style")):/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(d)?(a=l.createElement("img")).src=f:((a=l.createElement("script")).src=e,a.async=void 0===h||h),a.onload=a.onerror=a.onbeforeload=function(t){var l=t.type[0];if(s)try{a.sheet.cssText.length||(l="e")}catch(t){18!=t.code&&(l="e")}if("e"==l){if((r+=1)<c)return o(e,i,n,r)}else if("preload"==a.rel&&"style"==a.as)return a.rel="stylesheet";i(e,l,t.defaultPrevented)},!1!==u(e,a)&&l.head.appendChild(a)}function l(t,e,i){var n,r,s=(t=t.push?t:[t]).length,a=s,l=[];for(n=function(t,i,n){if("e"==i&&l.push(t),"b"==i){if(!n)return;l.push(t)}--s||e(l)},r=0;r<a;r++)o(t[r],n,i)}function h(t,i,n){var r,o;if(i&&i.trim&&(r=i),o=(r?n:i)||{},r){if(r in e)throw"LoadJS";e[r]=!0}function h(e,i){l(t,function(t){a(o,t),e&&a({success:e,error:i},t),s(r,t)},o)}if(o.returnPromise)return new Promise(h);h()}return h.ready=function(t,e){return r(t,function(t){a(e,t)}),h},h.done=function(t){s(t,[])},h.reset=function(){e={},i={},n={}},h.isDefined=function(t){return t in e},h}()}(e={exports:{}}),e.exports}();function Zt(t){return new Promise((e,i)=>{Qt(t,{success:e,error:i})})}function te(t){t&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===t&&(this.media.paused=!t,ft.call(this,this.media,t?"play":"pause"))}const ee={setup(){const t=this;tt(t.elements.wrapper,t.config.classNames.embed,!0),t.options.speed=t.config.speed.options,wt.call(t),C(window.Vimeo)?ee.ready.call(t):Zt(t.config.urls.vimeo.sdk).then(()=>{ee.ready.call(t)}).catch(e=>{t.debug.warn("Vimeo SDK (player.js) failed to load",e)})},ready(){const t=this,e=t.config.vimeo,{premium:i,referrerPolicy:n,...r}=e;let s=t.media.getAttribute("src"),a="";V(s)?(s=t.media.getAttribute(t.config.attributes.embed.id),a=t.media.getAttribute(t.config.attributes.embed.hash)):a=function(t){const e=t.match(/^.*(vimeo.com\/|video\/)(\d+)(\?.*&*h=|\/)+([\d,a-f]+)/);return e&&5===e.length?e[4]:null}(s);const o=a?{h:a}:{};i&&Object.assign(r,{controls:!1,sidedock:!1});const l=zt({loop:t.config.loop.active,autoplay:t.autoplay,muted:t.muted,gesture:"media",playsinline:t.config.playsinline,...o,...r}),h=V(c=s)?null:T(Number(c))?c:c.match(/^.*(vimeo.com\/|video\/)(\d+).*/)?RegExp.$2:c;var c;const u=$("iframe"),d=Tt(t.config.urls.vimeo.iframe,h,l);if(u.setAttribute("src",d),u.setAttribute("allowfullscreen",""),u.setAttribute("allow",["auto
2play","fullscreen","picture-in-picture","encrypted-media","accelerometer","gyroscope"].join("; ")),V(n)||u.setAttribute("referrerPolicy",n),i||!e.customControls)u.setAttribute("data-poster",t.poster),t.media=J(u,t.media);else{const e=$("div",{class:t.config.classNames.embedContainer,"data-poster":t.poster});e.appendChild(u),t.media=J(e,t.media)}e.customControls||It(Tt(t.config.urls.vimeo.api,d)).then(e=>{!V(e)&&e.thumbnail_url&&Xt.setPoster.call(t,e.thumbnail_url).catch(()=>{})}),t.embed=new window.Vimeo.Player(u,{autopause:t.config.autopause,muted:t.muted}),t.media.paused=!0,t.media.currentTime=0,t.supported.ui&&t.embed.disableTextTrack(),t.media.play=()=>(te.call(t,!0),t.embed.play()),t.media.pause=()=>(te.call(t,!1),t.embed.pause()),t.media.stop=()=>{t.pause(),t.currentTime=0};let{currentTime:f}=t.media;Object.defineProperty(t.media,"currentTime",{get:()=>f,set(e){const{embed:i,media:n,paused:r,volume:s}=t,a=r&&!i.hasPlayed;n.seeking=!0,ft.call(t,n,"seeking"),Promise.resolve(a&&i.setVolume(0)).then(()=>i.setCurrentTime(e)).then(()=>a&&i.pause()).then(()=>a&&i.setVolume(s)).catch(()=>{})}});let p=t.config.speed.selected;Object.defineProperty(t.media,"playbackRate",{get:()=>p,set(e){t.embed.setPlaybackRate(e).then(()=>{p=e,ft.call(t,t.media,"ratechange")}).catch(()=>{t.options.speed=[1]})}});let{volume:m}=t.config;Object.defineProperty(t.media,"volume",{get:()=>m,set(e){t.embed.setVolume(e).then(()=>{m=e,ft.call(t,t.media,"volumechange")})}});let{muted:g}=t.config;Object.defineProperty(t.media,"muted",{get:()=>g,set(e){const i=!!P(e)&&e;t.embed.setMuted(!!i||t.config.muted).then(()=>{g=i,ft.call(t,t.media,"volumechange")})}});let y,{loop:v}=t.config;Object.defineProperty(t.media,"loop",{get:()=>v,set(e){const i=P(e)?e:t.config.loop.active;t.embed.setLoop(i).then(()=>{v=i})}}),t.embed.getVideoUrl().then(e=>{y=e,Nt.setDownloadUrl.call(t)}).catch(t=>{this.debug.warn(t)}),Object.defineProperty(t.media,"currentSrc",{get:()=>y}),Object.defineProperty(t.media,"ended",{get:()=>t.currentTime===t.duration}),Promise.all([t.embed.getVideoWidth(),t.embed.getVideoHeight()]).then(e=>{const[i,n]=e;t.embed.ratio=_t(i,n),wt.call(this)}),t.embed.setAutopause(t.config.autopause).then(e=>{t.config.autopause=e}),t.embed.getVideoTitle().then(e=>{t.config.title=e,Xt.setTitle.call(this)}),t.embed.getCurrentTime().then(e=>{f=e,ft.call(t,t.media,"timeupdate")}),t.embed.getDuration().then(e=>{t.media.duration=e,ft.call(t,t.media,"durationchange")}),t.embed.getTextTracks().then(e=>{t.media.textTracks=e,Ht.setup.call(t)}),t.embed.on("cuechange",({cues:e=[]})=>{const i=e.map(t=>function(t){const e=document.createDocumentFragment(),i=document.createElement("div");return e.appendChild(i),i.innerHTML=t,e.firstChild.innerText}(t.text));Ht.updateCues.call(t,i)}),t.embed.on("loaded",()=>{t.embed.getPaused().then(e=>{te.call(t,!e),e||ft.call(t,t.media,"playing")}),R(t.embed.element)&&t.supported.ui&&t.embed.element.setAttribute("tabindex",-1)}),t.embed.on("bufferstart",()=>{ft.call(t,t.media,"waiting")}),t.embed.on("bufferend",()=>{ft.call(t,t.media,"playing")}),t.embed.on("play",()=>{te.call(t,!0),ft.call(t,t.media,"playing")}),t.embed.on("pause",()=>{te.call(t,!1)}),t.embed.on("timeupdate",e=>{t.media.seeking=!1,f=e.seconds,ft.call(t,t.media,"timeupdate")}),t.embed.on("progress",e=>{t.media.buffered=e.percent,ft.call(t,t.media,"progress"),1===parseInt(e.percent,10)&&ft.call(t,t.media,"canplaythrough"),t.embed.getDuration().then(e=>{e!==t.media.duration&&(t.media.duration=e,ft.call(t,t.media,"durationchange"))})}),t.embed.on("seeked",()=>{t.media.seeking=!1,ft.call(t,t.media,"seeked")}),t.embed.on("ended",()=>{t.media.paused=!0,ft.call(t,t.media,"ended")}),t.embed.on("error",e=>{t.media.error=e,ft.call(t,t.media,"error")}),e.customControls&&setTimeout(()=>Xt.build.call(t),0)}};function ie(t){t&&!this.embed.hasPlayed&&(this.embed.hasPlayed=!0),this.media.paused===t&&(this.media.paused=!t,ft.call(this,this.media,t?"play":"pause"))}function ne(t){return t.noCookie?"https://www.youtube-nocookie.com":"http:"===window.location.protocol?"http://www.youtube.com":void 0}const re={setup(){if(tt(this.elements.wrapper,this.config.classNames.embed,!0),C(window.YT)&&D(window.YT.Player))re.ready.call(this);else{const t=window.onYouTubeIframeAPIReady;window.onYouTubeIframeAPIReady=()=>{D(t)&&t(),re.ready.call(this)},Zt(this.config.urls.youtube.sdk).catch(t=>{this.debug.warn("YouTube API failed to load",t)})}},getTitle(t){It(Tt(this.config.urls.youtube.api,t)).then(t=>{if(C(t)){const{title:e,height:i,width:n}=t;this.config.title=e,Xt.setTitle.call(this),this.embed.ratio=_t(n,i)}wt.call(this)}).catch(()=>{wt.call(this)})},ready(){const t=this,e=t.config.youtube,i=t.media&&t.media.getAttribute("id");if(!V(i)&&i.startsWith("youtube-"))return;let n=t.media.getAttribute("src");V(n)&&(n=t.media.getAttribute(this.config.attributes.embed.id));const r=V(s=n)?null:s.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|&v=)([^#&?]*).*/)?RegExp.$2:s;var s;const a=$("div",{id:`${t.provider}-${Math.floor(1e4*Math.random())}`,"data-poster":e.customControls?t.poster:void 0});if(t.media=J(a,t.media),e.customControls){const e=t=>`https://i.ytimg.com/vi/${r}/${t}default.jpg`;Kt(e("maxres"),121).catch(()=>
vendor: 34,429 bytes, line 2
2Kt(e("sd"),121)).catch(()=>Kt(e("hq"))).then(e=>Xt.setPoster.call(t,e.src)).then(e=>{e.includes("maxres")||(t.elements.poster.style.backgroundSize="cover")}).catch(()=>{})}t.embed=new window.YT.Player(t.media,{videoId:r,host:ne(e),playerVars:G({},{autoplay:t.config.autoplay?1:0,hl:t.config.hl,controls:t.supported.ui&&e.customControls?0:1,disablekb:1,playsinline:t.config.playsinline&&!t.config.fullscreen.iosNative?1:0,cc_load_policy:t.captions.active?1:0,cc_lang_pref:t.config.captions.language,widget_referrer:window?window.location.href:null},e),events:{onError(e){if(!t.media.error){const i=e.data,n={2:"The request contains an invalid parameter value. For example, this error occurs if you specify a video ID that does not have 11 characters, or if the video ID contains invalid characters, such as exclamation points or asterisks.",5:"The requested content cannot be played in an HTML5 player or another error related to the HTML5 player has occurred.",100:"The video requested was not found. This error occurs when a video has been removed (for any reason) or has been marked as private.",101:"The owner of the requested video does not allow it to be played in embedded players.",150:"The owner of the requested video does not allow it to be played in embedded players."}[i]||"An unknown error occurred";t.media.error={code:i,message:n},ft.call(t,t.media,"error")}},onPlaybackRateChange(e){const i=e.target;t.media.playbackRate=i.getPlaybackRate(),ft.call(t,t.media,"ratechange")},onReady(i){if(D(t.media.play))return;const n=i.target;re.getTitle.call(t,r),t.media.play=()=>{ie.call(t,!0),n.playVideo()},t.media.pause=()=>{ie.call(t,!1),n.pauseVideo()},t.media.stop=()=>{n.stopVideo()},t.media.duration=n.getDuration(),t.media.paused=!0,t.media.currentTime=0,Object.defineProperty(t.media,"currentTime",{get:()=>Number(n.getCurrentTime()),set(e){t.paused&&!t.embed.hasPlayed&&t.embed.mute(),t.media.seeking=!0,ft.call(t,t.media,"seeking"),n.seekTo(e)}}),Object.defineProperty(t.media,"playbackRate",{get:()=>n.getPlaybackRate(),set(t){n.setPlaybackRate(t)}});let{volume:s}=t.config;Object.defineProperty(t.media,"volume",{get:()=>s,set(e){s=e,n.setVolume(100*s),ft.call(t,t.media,"volumechange")}});let{muted:a}=t.config;Object.defineProperty(t.media,"muted",{get:()=>a,set(e){const i=P(e)?e:a;a=i,n[i?"mute":"unMute"](),n.setVolume(100*s),ft.call(t,t.media,"volumechange")}}),Object.defineProperty(t.media,"currentSrc",{get:()=>n.getVideoUrl()}),Object.defineProperty(t.media,"ended",{get:()=>t.currentTime===t.duration});const o=n.getAvailablePlaybackRates();t.options.speed=o.filter(e=>t.config.speed.options.includes(e)),t.supported.ui&&e.customControls&&t.media.setAttribute("tabindex",-1),ft.call(t,t.media,"timeupdate"),ft.call(t,t.media,"durationchange"),clearInterval(t.timers.buffering),t.timers.buffering=setInterval(()=>{t.media.buffered=n.getVideoLoadedFraction(),(null===t.media.lastBuffered||t.media.lastBuffered<t.media.buffered)&&ft.call(t,t.media,"progress"),t.media.lastBuffered=t.media.buffered,1===t.media.buffered&&(clearInterval(t.timers.buffering),ft.call(t,t.media,"canplaythrough"))},200),e.customControls&&setTimeout(()=>Xt.build.call(t),50)},onStateChange(i){const n=i.target;switch(clearInterval(t.timers.playing),t.media.seeking&&[1,2].includes(i.data)&&(t.media.seeking=!1,ft.call(t,t.media,"seeked")),i.data){case-1:ft.call(t,t.media,"timeupdate"),t.media.buffered=n.getVideoLoadedFraction(),ft.call(t,t.media,"progress");break;case 0:ie.call(t,!1),t.media.loop?(n.stopVideo(),n.playVideo()):ft.call(t,t.media,"ended");break;case 1:e.customControls&&!t.config.autoplay&&t.media.paused&&!t.embed.hasPlayed?t.media.pause():(ie.call(t,!0),ft.call(t,t.media,"playing"),t.timers.playing=setInterval(()=>{ft.call(t,t.media,"timeupdate")},50),t.media.duration!==n.getDuration()&&(t.media.duration=n.getDuration(),ft.call(t,t.media,"durationchange")));break;case 2:t.muted||t.embed.unMute(),ie.call(t,!1);break;case 3:ft.call(t,t.media,"waiting")}ft.call(t,t.elements.container,"statechange",!1,{code:i.data})}}})}},se={setup(){this.media?(tt(this.elements.container,this.config.classNames.type.replace("{0}",this.type),!0),tt(this.elements.container,this.config.classNames.provider.replace("{0}",this.provider),!0),this.isEmbed&&tt(this.elements.container,this.config.classNames.type.replace("{0}","video"),!0),this.isVideo&&(this.elements.wrapper=$("div",{class:this.config.classNames.video}),j(this.media,this.elements.wrapper),this.elements.poster=$("div",{class:this.config.classNames.poster}),this.elements.wrapper.appendChild(this.elements.poster)),this.isHTML5?Ct.setup.call(this):this.isYouTube?re.setup.call(this):this.isVimeo&&ee.setup.call(this)):this.debug.warn("No media element found!")}};class ae{constructor(e){t(this,"load",()=>{this.enabled&&(C(window.google)&&C(window.google.ima)?this.ready():Zt(this.player.config.urls.googleIMA.sdk).then(()=>{this.ready()}).catch(()=>{this.trigger("error",new Error("Google IMA SDK failed to load"))}))}),t(this,"ready",()=>{var t;this.enabled||((t=this).manager&&t.manager.destroy(),t.elements.displayContainer&&t.elements.displayContainer.destroy(),t.elements.container.remove()),this.startSafetyTimer(12e3,"ready()"),this.managerPromise.then(()=>{this.clearSafetyTimer("onAdsManagerLoaded()")}),this.listeners(),this.setupIMA()}),t(this,"setupIMA",()=>{this.elements.container=$("div",{class:this.player.config.classNames.ads}),this.player.elements.container.appendChild(this.elements.container),google.ima.settings.setVpaidMode(google.ima.ImaSdkSettings.VpaidMode.ENABLED),google.ima.settings.setLocale(this.player.config.ads.language),google.ima.settings.setDisableCustomPlaybackForIOS10Plus(this.player.config.playsinline),this.elements.displayContainer=new google.ima.AdDisplayContainer(this.elements.container,this.player.media),this.loader=new google.ima.AdsLoader(this.elements.displayContainer),this.loader.addEventListener(google.ima.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,t=>this.onAdsManagerLoaded(t),!1),this.loader.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,t=>this.onAdError(t),!1),this.requestAds()}),t(this,"requestAds",()=>{const{container:t}=this.player.elements;try{const e=new google.ima.AdsRequest;e.adTagUrl=this.tagUrl,e.linearAdSlotWidth=t.offsetWidth,e.linearAdSlotHeight=t.offsetHeight,e.nonLinearAdSlotWidth=t.offsetWidth,e.nonLinearAdSlotHeight=t.offsetHeight,e.forceNonLinearFullSlot=!1,e.setAdWillPlayMuted(!this.player.muted),this.loader.requestAds(e)}catch(t){this.onAdError(t)}}),t(this,"pollCountdown",(t=!1)=>{if(!t)return clearInterval(this.countdownTimer),void this.elements.container.removeAttribute("data-badge-text");this.countdownTimer=setInterval(()=>{const t=Bt(Math.max(this.manager.getRemainingTime(),0)),e=`${Lt.get("advertisement",this.player.config)} - ${t}`;this.elements.container.setAttribute("data-badge-text",e)},100)}),t(this,"onAdsManagerLoaded",t=>{if(!this.enabled)return;const e=new google.ima.AdsRenderingSettings;e.restoreCustomPlaybackStateOnAdBreakComplete=!0,e.enablePreloading=!0,this.manager=t.getAdsManager(this.player,e),this.cuePoints=this.manager.getCuePoints(),this.manager.addEventListener(google.ima.AdErrorEvent.Type.AD_ERROR,t=>this.onAdError(t)),Object.keys(google.ima.AdEvent.Type).forEach(t=>{this.manager.addEventListener(google.ima.AdEvent.Type[t],t=>this.onAdEvent(t))}),this.trigger("loaded")}),t(this,"addCuePoints",()=>{V(this.cuePoints)||this.cuePoints.forEach(t=>{if(0!==t&&-1!==t&&t<this.player.duration){const e=this.player.elements.progress;if(R(e)){const i=100/this.player.duration*t,n=$("span",{class:this.player.config.classNames.cues});n.style.left=`${i.toString()}%`,e.appendChild(n)}}})}),t(this,"onAdEvent",t=>{const{container:e}=this.player.elements,i=t.getAd(),n=t.getAdData();switch((t=>{ft.call(this.player,this.player.media,`ads${t.replace(/_/g,"").toLowerCase()}`)})(t.type),t.type){case google.ima.AdEvent.Type.LOADED:this.trigger("loaded"),this.pollCountdown(!0),i.isLinear()||(i.width=e.offsetWidth,i.height=e.offsetHeight);break;case google.ima.AdEvent.Type.STARTED:this.manager.setVolume(this.player.volume);break;case google.ima.AdEvent.Type.ALL_ADS_COMPLETED:this.player.ended?this.loadAds():this.loader.contentComplete();break;case google.ima.AdEvent.Type.CONTENT_PAUSE_REQUESTED:this.pauseContent();break;case google.ima.AdEvent.Type.CONTENT_RESUME_REQUESTED:this.pollCountdown(),this.resumeContent();break;case google.ima.AdEvent.Type.LOG:n.adError&&this.player.debug.warn(`Non-fatal ad error: ${n.adError.getMessage()}`)}}),t(this,"onAdError",t=>{this.cancel(),this.player.debug.warn("Ads error",t)}),t(this,"listeners",()=>{const{container:t}=this.player.elements;let e;this.player.on("canplay",()=>{this.addCuePoints()}),this.player.on("ended",()=>{this.loader.contentComplete()}),this.player.on("timeupdate",()=>{e=this.player.currentTime}),this.player.on("seeked",()=>{const t=this.player.currentTime;V(this.cuePoints)||this.cuePoints.forEach((i,n)=>{e<i&&i<t&&(this.manager.discardAdBreak(),this.cuePoints.splice(n,1))})}),window.addEventListener("resize",()=>{this.manager&&this.manager.resize(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL)})}),t(this,"play",()=>{const{container:t}=this.player.elements;this.managerPromise||this.resumeContent(),this.managerPromise.then(()=>{this.manager.setVolume(this.player.volume),this.elements.displayContainer.initialize();try{this.initialized||(this.manager.init(t.offsetWidth,t.offsetHeight,google.ima.ViewMode.NORMAL),this.manager.start()),this.initialized=!0}catch(t){this.onAdError(t)}}).catch(()=>{})}),t(this,"resumeContent",()=>{this.elements.container.style.zIndex="",this.playing=!1,gt(this.player.media.play())}),t(this,"pauseContent",()=>{this.elements.container.style.zIndex=3,this.playing=!0,this.player.media.pause()}),t(this,"cancel",()=>{this.initialized&&this.resumeContent(),this.trigger("error"),this.loadAds()}),t(this,"loadAds",()=>{this.managerPromise.then(()=>{this.manager&&this.manager.destroy(),this.managerPromise=new Promise(t=>{this.on("loaded",t),this.player.debug.log(this.manager)}),this.initialized=!1,this.requestAds()}).catch(()=>{})}),t(this,"trigger",(t,...e)=>{const i=this.events[t];M(i)&&i.forEach(t=>{D(t)&&t.apply(this,e)})}),t(this,"on",(t,e)=>(M(this.events[t])||(this.events[t]=[]),this.events[t].push(e),this)),t(this,"startSafetyTimer",(t,e)=>{this.player.debug.log(`Safety timer invoked from: ${e}`),this.safetyTimer=setTimeout(()=>{this.cancel(),this.clearSafetyTimer("startSafetyTimer()")},t)}),t(this,"clearSafetyTimer",t=>{_(this.safetyTimer)||(this.player.debug.log(`Safety timer cleared from: ${t}`),clearTimeout(this.safetyTimer),this.safetyTimer=null)}),this.player=e,this.config=e.config.ads,this.playing=!1,this.initialized=!1,this.elements={container:null,displayContainer:null},this.manager=null,this.loader=null,this.cuePoints=null,this.events={},this.safetyTimer=null,this.countdownTimer=null,this.managerPromise=new Promise((t,e)=>{this.on("loaded",t),this.on("error",e)}),this.load()}get enabled(){const{config:t}=this;return this.player.isHTML5&&this.player.isVideo&&t.enabled&&(!V(t.publisherId)||N(t.tagUrl))}get tagUrl(){const{config:t}=this;return N(t.tagUrl)?t.tagUrl:`https://go.aniview.com/api/adserver6/vast/?${zt({AV_PUBLISHERID:"58c25bb0073ef448b1087ad6",AV_CHANNELID:"5a0458dc28a06145e4519d21",AV_URL:window.location.hostname,cb:Date.now(),AV_WIDTH:640,AV_HEIGHT:480,AV_CDIM2:t.publisherId})}`}}function oe(t=0,e=0,i=255){return Math.min(Math.max(t,e),i)}const le=t=>{const e=[];return t.split(/\r\n\r\n|\n\n|\r\r/).forEach(t=>{const i={};t.split(/\r\n|\n|\r/).forEach(t=>{if(T(i.startTime)){if(!V(t.trim())&&V(i.text)){const e=t.trim().split("#xywh=");[i.text]=e,e[1]&&([i.x,i.y,i.w,i.h]=e[1].split(","))}}else{const e=t.match(/([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})( ?--> ?)([0-9]{2})?:?([0-9]{2}):([0-9]{2}).([0-9]{2,3})/);e&&(i.startTime=60*Number(e[1]||0)*60+60*Number(e[2])+Number(e[3])+Number(`0.${e[4]}`),i.endTime=60*Number(e[6]||0)*60+60*Number(e[7])+Number(e[8])+Number(`0.${e[9]}`))}}),i.text&&e.push(i)}),e},he=(t,e)=>{const i={};return t>e.width/e.height?(i.width=e.width,i.height=1/t*e.width):(i.height=e.height,i.width=t*e.height),i};class ce{constructor(e){t(this,"load",()=>{this.player.elements.display.seekTooltip&&(this.player.elements.display.seekTooltip.hidden=this.enabled),this.enabled&&this.getThumbnails().then(()=>{this.enabled&&(this.render(),this.determineContainerAutoSizing(),this.listeners(),this.loaded=!0)})}),t(this,"getThumbnails",()=>new Promise(t=>{const{src:e}=this.player.config.previewThumbnails;if(V(e))throw new Error("Missing previewThumbnails.src config attribute");const i=()=>{this.thumbnails.sort((t,e)=>t.height-e.height),this.player.debug.log("Preview thumbnails",this.thumbnails),t()};if(D(e))e(t=>{this.thumbnails=t,i()});else{const t=(A(e)?[e]:e).map(t=>this.getThumbnail(t));Promise.all(t).then(i)}})),t(this,"getThumbnail",t=>new Promise(e=>{It(t).then(i=>{const n={frames:le(i),height:null,urlPrefix:""};n.frames[0].text.startsWith("/")||n.frames[0].text.startsWith("http://")||n.frames[0].text.startsWith("https://")||(n.urlPrefix=t.substring(0,t.lastIndexOf("/")+1));const r=new Image;r.onload=()=>{n.height=r.naturalHeight,n.width=r.naturalWidth,this.thumbnails.push(n),e()},r.src=n.urlPrefix+n.frames[0].text})})),t(this,"startMove",t=>{if(this.loaded&&I(t)&&["touchmove","mousemove"].includes(t.type)&&this.player.media.duration){if("touchmove"===t.type)this.seekTime=this.player.media.duration*(this.player.elements.inputs.seek.value/100);else{var e,i;const n=this.player.elements.progress.getBoundingClientRect(),r=100/n.width*(t.pageX-n.left);this.seekTime=this.player.media.duration*(r/100),this.seekTime<0&&(this.seekTime=0),this.seekTime>this.player.media.duration-1&&(this.seekTime=this.player.media.duration-1),this.mousePosX=t.pageX,this.elements.thumb.time.innerText=Bt(this.seekTime);const s=null===(e=this.player.config.markers)||void 0===e||null===(i=e.points)||void 0===i?void 0:i.find(({time:t})=>t===Math.round(this.seekTime));s&&this.elements.thumb.time.insertAdjacentHTML("afterbegin",`${s.label}<br>`)}this.showImageAtCurrentTime()}}),t(this,"endMove",()=>{this.toggleThumbContainer(!1,!0)}),t(this,"startScrubbing",t=>{(_(t.button)||!1===t.button||0===t.button)&&(this.mouseDown=!0,this.player.media.duration&&(this.toggleScrubbingContainer(!0),this.toggleThumbContainer(!1,!0),this.showImageAtCurrentTime()))}),t(this,"endScrubbing",()=>{this.mouseDown=!1,Math.ceil(this.lastTime)===Math.ceil(this.player.media.currentTime)?this.toggleScrubbingContainer(!1):dt.call(this.player,this.player.media,"timeupdate",()=>{this.mouseDown||this.toggleScrubbingContainer(!1)})}),t(this,"listeners",()=>{this.player.on("play",()=>{this.toggleThumbContainer(!1,!0)}),this.player.on("seeked",()=>{this.toggleThumbContainer(!1)}),this.player.on("timeupdate",()=>{this.lastTime=this.player.media.currentTime})}),t(this,"render",()=>{this.elements.thumb.container=$("div",{class:this.player.config.classNames.previewThumbnails.thumbContainer}),this.elements.thumb.imageContainer=$("div",{class:this.player.config.classNames.previewThumbnails.imageContainer}),this.elements.thumb.container.appendChild(this.elements.thumb.imageContainer);const t=$("div",{class:this.player.config.classNames.previewThumbnails.timeContainer});this.elements.thumb.time=$("span",{},"00:00"),t.appendChild(this.elements.thumb.time),this.elements.thumb.imageContainer.appendChild(t),R(this.player.elements.progress)&&this.player.elements.progress.appendChild(this.elements.thumb.container),this.elements.scrubbing.container=$("div",{class:this.player.config.classNames.previewThumbnails.scrubbingContainer}),this.player.elements.wrapper.appendChild(this.elements.scrubbing.container)}),t(this,"destroy",()=>{this.elements.thumb.container&&this.elements.thumb.container.remove(),this.elements.scrubbing.container&&this.elements.scrubbing.container.remove()}),t(this,"showImageAtCurrentTime",()=>{this.mouseDown?this.setScrubbingContainerSize():this.setThumbContainerSizeAndPos();const t=this.thumbnails[0].frames.findIndex(t=>this.seekTime>=t.startTime&&this.seekTime<=t.endTime),e=t>=0;let i=0;this.mouseDown||this.toggleThumbContainer(e),e&&(this.thumbnails.forEach((e,n)=>{this.loadedImages.includes(e.frames[t].text)&&(i=n)}),t!==this.showingThumb&&(this.showingThumb=t,this.loadImage(i)))}),t(this,"loadImage",(t=0)=>{const e=this.showingThumb,i=this.thumbnails[t],{urlPrefix:n}=i,r=i.frames[e],s=i.frames[e].text,a=n+s;if(this.currentImageElement&&this.currentImageElement.dataset.filename===s)this.showImage(this.currentImageElement,r,t,e,s,!1),this.currentImageElement.dataset.index=e,this.removeOldImages(this.currentImageElement);else{this.loadingImage&&this.usingSprites&&(this.loadingImage.onload=null);const i=new Image;i.src=a,i.dataset.index=e,i.dataset.filename=s,this.showingThumbFilename=s,this.player.debug.log(`Loading image: ${a}`),i.onload=()=>this.showImage(i,r,t,e,s,!0),this.loadingImage=i,this.removeOldImages(i)}}),t(this,"showImage",(t,e,i,n,r,s=!0)=>{this.player.debug.log(`Showing thumb: ${r}. num: ${n}. qual: ${i}. newimg: ${s}`),this.setImageSizeAndOffset(t,e),s&&(this.currentImageContainer.appendChild(t),this.currentImageElement=t,this.loadedImages.includes(r)||this.loadedImages.push(r)),this.preloadNearby(n,!0).then(this.preloadNearby(n,!1)).then(this.getHigherQuality(i,t,e,r))}),t(this,"removeOldImages",t=>{Array.from(this.currentImageContainer.children).forEach(e=>{if("img"!==e.tagName.toLowerCase())return;const i=this.usingSprites?500:1e3;if(e.dataset.index!==t.dataset.index&&!e.dataset.deleting){e.dataset.deleting=!0;const{currentImageContainer:t}=this;setTimeout(()=>{t.removeChild(e),this.player.debug.log(`Removing thumb: ${e.dataset.filename}`)},i)}})}),t(this,"preloadNearby",(t,e=!0)=>new Promise(i=>{setTimeout(()=>{const n=this.thumbnails[0].frames[t].text;if(this.showingThumbFilename===n){let r;r=e?this.thumbnails[0].frames.slice(t):this.thumbnails[0].frames.slice(0,t).reverse();let s=!1;r.forEach(t=>{const e=t.text;if(e!==n&&!this.loadedImages.includes(e)){s=!0,this.player.debug.log(`Preloading thumb filename: ${e}`);const{urlPrefix:t}=this.thumbnails[0],n=t+e,r=new Image;r.src=n,r.onload=()=>{this.player.debug.log(`Preloaded thumb filename: ${e}`),this.loadedImages.includes(e)||this.loadedImages.push(e),i()}}}),s||i()}},300)})),t(this,"getHigherQuality",(t,e,i,n)=>{if(t<this.thumbnails.length-1){let r=e.naturalHeight;this.usingSprites&&(r=i.h),r<this.thumbContainerHeight&&setTimeout(()=>{this.showingThumbFilename===n&&(this.player.debug.log(`Showing higher quality thumb for: ${n}`),this.loadImage(t+1))},300)}}),t(this,"toggleThumbContainer",(t=!1,e=!1)=>{const i=this.player.config.classNames.previewThumbnails.thumbContainerShown;this.elements.thumb.container.classList.toggle(i,t),!t&&e&&(this.showingThumb=null,this.showingThumbFilename=null)}),t(this,"toggleScrubbingContainer",(t=!1)=>{const e=this.player.config.classNames.previewThumbnails.scrubbingContainerShown;this.elements.scrubbing.container.classList.toggle(e,t),t||(this.showingThumb=null,this.showingThumbFilename=null)}),t(this,"determineContainerAutoSizing",()=>{(this.elements.thumb.imageContainer.clientHeight>20||this.elements.thumb.imageContainer.clientWidth>20)&&(this.sizeSpecifiedInCSS=!0)}),t(this,"setThumbContainerSizeAndPos",()=>{const{imageContainer:t}=this.elements.thumb;if(this.sizeSpecifiedInCSS){if(t.clientHeight>20&&t.clientWidth<20){const e=Math.floor(t.clientHeight*this.thumbAspectRatio);t.style.width=`${e}px`}else if(t.clientHeight<20&&t.clientWidth>20){const e=Math.floor(t.clientWidth/this.thumbAspectRatio);t.style.height=`${e}px`}}else{const e=Math.floor(this.thumbContainerHeight*this.thumbAspectRatio);t.style.height=`${this.thumbContainerHeight}px`,t.style.width=`${e}px`}this.setThumbContainerPos()}),t(this,"setThumbContainerPos",()=>{const t=this.player.elements.progress.getBoundingClientRect(),e=this.player.elements.container.getBoundingClientRect(),{container:i}=this.elements.thumb,n=e.left-t.left+10,r=e.right-t.left-i.clientWidth-10,s=this.mousePosX-t.left-i.clientWidth/2,a=oe(s,n,r);i.style.left=`${a}px`,i.style.setProperty("--preview-arrow-offset",s-a+"px")}),t(this,"setScrubbingContainerSize",()=>{const{width:t,height:e}=he(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});this.elements.scrubbing.container.style.width=`${t}px`,this.elements.scrubbing.container.style.height=`${e}px`}),t(this,"setImageSizeAndOffset",(t,e)=>{if(!this.usingSprites)return;const i=this.thumbContainerHeight/e.h;t.style.height=t.naturalHeight*i+"px",t.style.width=t.naturalWidth*i+"px",t.style.left=`-${e.x*i}px`,t.style.top=`-${e.y*i}px`}),this.player=e,this.thumbnails=[],this.loaded=!1,this.lastMouseMoveTime=Date.now(),this.mouseDown=!1,this.loadedImages=[],this.elements={thumb:{},scrubbing:{}},this.load()}get enabled(){return this.player.isHTML5&&this.player.isVideo&&this.player.config.previewThumbnails.enabled}get currentImageContainer(){return this.mouseDown?this.elements.scrubbing.container:this.elements.thumb.imageContainer}get usingSprites(){return Object.keys(this.thumbnails[0].frames[0]).includes("w")}get thumbAspectRatio(){return this.usingSprites?this.thumbnails[0].frames[0].w/this.thumbnails[0].frames[0].h:this.thumbnails[0].width/this.thumbnails[0].height}get thumbContainerHeight(){if(this.mouseDown){const{height:t}=he(this.thumbAspectRatio,{width:this.player.media.clientWidth,height:this.player.media.clientHeight});return t}return this.sizeSpecifiedInCSS?this.elements.thumb.imageContainer.clientHeight:Math.floor(this.player.media.clientWidth/this.thumbAspectRatio/4)}get currentImageElement(){return this.mouseDown?this.currentScrubbingImageElement:this.currentThumbnailImageElement}set currentImageElement(t){this.mouseDown?this.currentScrubbingImageElement=t:this.currentThumbnailImageElement=t}}const ue={insertElements(t,e){A(e)?Y(t,this.media,{src:e}):M(e)&&e.forEach(e=>{Y(t,this.media,e)})},change(t){U(t,"sources.length")?(Ct.cancelRequests.call(this),this.destroy.call(this,()=>{this.options.quality=[],K(this.media),this.media=null,R(this.elements.container)&&this.elements.container.removeAttribute("class");const{sources:e,type:i}=t,[{provider:n=Gt.html5,src:r}]=e,s="html5"===n?i:"div",a="html5"===n?{}:{src:r};Object.assign(this,{provider:n,type:i,supported:ot.check(i,n,this.config.playsinline),media:$(s,a)}),this.elements.container.appendChild(this.media),P(t.autoplay)&&(this.config.autoplay=t.autoplay),this.isHTML5&&(this.config.crossorigin&&this.media.setAttribute("crossorigin",""),this.config.autoplay&&this.media.setAttribute("autoplay",""),V(t.poster)||(this.poster=t.poster),this.config.loop.active&&this.media.setAttribute("loop",""),this.config.muted&&this.media.setAttribute("muted",""),this.config.playsinline&&this.media.setAttribute("playsinline","")),Xt.addStyleHook.call(this),this.isHTML5&&ue.insertElements.call(this,"source",e),this.config.title=t.title,se.setup.call(this),this.isHTML5&&Object.keys(t).includes("tracks")&&ue.insertElements.call(this,"track",t.tracks),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Xt.build.call(this),this.isHTML5&&this.media.load(),V(t.previewThumbnails)||(Object.assign(this.config.previewThumbnails,t.previewThumbnails),this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new ce(this))),this.fullscreen.update()},!0)):this.debug.warn("Invalid source format")}};class de{constructor(e,i){if(t(this,"play",()=>D(this.media.play)?(this.ads&&this.ads.enabled&&this.ads.managerPromise.then(()=>this.ads.play()).catch(()=>gt(this.media.play())),this.media.play()):null),t(this,"pause",()=>this.playing&&D(this.media.pause)?this.media.pause():null),t(this,"togglePlay",t=>(P(t)?t:!this.playing)?this.play():this.pause()),t(this,"stop",()=>{this.isHTML5?(this.pause(),this.restart()):D(this.media.stop)&&this.media.stop()}),t(this,"restart",()=>{this.currentTime=0}),t(this,"rewind",t=>{this.currentTime-=T(t)?t:this.config.seekTime}),t(this,"forward",t=>{this.currentTime+=T(t)?t:this.config.seekTime}),t(this,"increaseVolume",t=>{const e=this.media.muted?0:this.volume;this.volume=e+(T(t)?t:0)}),t(this,"decreaseVolume",t=>{this.increaseVolume(-t)}),t(this,"airplay",()=>{ot.airplay&&this.media.webkitShowPlaybackTargetPicker()}),t(this,"toggleControls",t=>{if(this.supported.ui&&!this.isAudio){const e=et(this.elements.container,this.config.classNames.hideControls),i=void 0===t?void 0:!t,n=tt(this.elements.container,this.config.classNames.hideControls,i);if(n&&M(this.config.controls)&&this.config.controls.includes("settings")&&!V(this.config.settings)&&Nt.toggleMenu.call(this,!1),n!==e){const t=n?"controlshidden":"controlsshown";ft.call(this,this.media,t)}return!n}return!1}),t(this,"on",(t,e)=>{ct.call(this,this.elements.container,t,e)}),t(this,"once",(t,e)=>{dt.call(this,this.elements.container,t,e)}),t(this,"off",(t,e)=>{ut(this.elements.container,t,e)}),t(this,"destroy",(t,e=!1)=>{if(!this.ready)return;const i=()=>{document.body.style.overflow="",this.embed=null,e?(Object.keys(this.elements).length&&(K(this.elements.buttons.play),K(this.elements.captions),K(this.elements.controls),K(this.elements.wrapper),this.elements.buttons.play=null,this.elements.captions=null,this.elements.controls=null,this.elements.wrapper=null),D(t)&&t()):(pt.call(this),Ct.cancelRequests.call(this),J(this.elements.original,this.elements.container),ft.call(this,this.elements.original,"destroyed",!0),D(t)&&t.call(this.elements.original),this.ready=!1,setTimeout(()=>{this.elements=null,this.media=null},200))};this.stop(),clearTimeout(this.timers.loading),clearTimeout(this.timers.controls),clearTimeout(this.timers.resized),this.isHTML5?(Xt.toggleNativeControls.call(this,!0),i()):this.isYouTube?(clearInterval(this.timers.buffering),clearInterval(this.timers.playing),null!==this.embed&&D(this.embed.destroy)&&this.embed.destroy(),i()):this.isVimeo&&(null!==this.embed&&this.embed.unload().then(i),setTimeout(i,200))}),t(this,"supports",t=>ot.mime.call(this,t)),this.timers={},this.ready=!1,this.loading=!1,this.failed=!1,this.touch=ot.touch,this.media=e,A(this.media)&&(this.media=document.querySelectorAll(this.media)),(window.jQuery&&this.media instanceof jQuery||L(this.media)||M(this.media))&&(this.media=this.media[0]),this.config=G({},qt,de.defaults,i||{},(()=>{try{return JSON.parse(this.media.getAttribute("data-plyr-config"))}catch(t){return{}}})()),this.elements={container:null,fullscreen:null,captions:null,buttons:{},display:{},progress:{},inputs:{},settings:{popup:null,menu:null,panels:{},buttons:{}}},this.captions={active:null,currentTrack:-1,meta:new WeakMap},this.fullscreen={active:!1},this.options={speed:[],quality:[]},this.debug=new $t(this.config.debug),this.debug.log("Config",this.config),this.debug.log("Support",ot),_(this.media)||!R(this.media))return void this.debug.error("Setup failed: no suitable element passed");if(this.media.plyr)return void this.debug.warn("Target already setup");if(!this.config.enabled)return void this.debug.error("Setup failed: disabled by config");if(!ot.check().api)return void this.debug.error("Setup failed: no support");const n=this.media.cloneNode(!0);n.autoplay=!1,this.elements.original=n;const r=this.media.tagName.toLowerCase();let s=null,a=null;switch(r){case"div":if(s=this.media.querySelector("iframe"),R(s)){if(a=Vt(s.getAttribute("src")),this.provider=function(t){return/^(https?:\/\/)?(www\.)?(youtube\.com|youtube-nocookie\.com|youtu\.?be)\/.+$/.test(t)?Gt.youtube:/^https?:\/\/player.vimeo.com\/video\/\d{0,9}(?=\b|\/)/.test(t)?Gt.vimeo:null}(a.toString()),this.elements.container=this.media,this.media=s,this.elements.container.className="",a.search.length){const t=["1","true"];t.includes(a.searchParams.get("autoplay"))&&(this.config.autoplay=!0),t.includes(a.searchParams.get("loop"))&&(this.config.loop.active=!0),this.isYouTube?(this.config.playsinline=t.includes(a.searchParams.get("playsinline")),this.config.youtube.hl=a.searchParams.get("hl")):this.config.playsinline=!0}}else this.provider=this.media.getAttribute(this.config.attributes.embed.provider),this.media.removeAttribute(this.config.attributes.embed.provider);if(V(this.provider)||!Object.values(Gt).includes(this.provider))return void this.debug.error("Setup failed: Invalid provider");this.type=jt;break;case"video":case"audio":this.type=r,this.provider=Gt.html5,this.media.hasAttribute("crossorigin")&&(this.config.crossorigin=!0),this.media.hasAttribute("autoplay")&&(this.config.autoplay=!0),(this.media.hasAttribute("playsinline")||this.media.hasAttribute("webkit-playsinline"))&&(this.config.playsinline=!0),this.media.hasAttribute("muted")&&(this.config.muted=!0),this.media.hasAttribute("loop")&&(this.config.loop.active=!0);break;default:return void this.debug.error("Setup failed: unsupported type")}this.supported=ot.check(this.type,this.provider),this.supported.api?(this.eventListeners=[],this.listeners=new Jt(this),this.storage=new Rt(this),this.media.plyr=this,R(this.elements.container)||(this.elements.container=$("div"),j(this.media,this.elements.container)),Xt.migrateStyles.call(this),Xt.addStyleHook.call(this),se.setup.call(this),this.config.debug&&ct.call(this,this.elements.container,this.config.events.join(" "),t=>{this.debug.log(`event: ${t.type}`)}),this.fullscreen=new Yt(this),(this.isHTML5||this.isEmbed&&!this.supported.ui)&&Xt.build.call(this),this.listeners.container(),this.listeners.global(),this.config.ads.enabled&&(this.ads=new ae(this)),this.isHTML5&&this.config.autoplay&&this.once("canplay",()=>gt(this.play())),this.lastSeekTime=0,this.config.previewThumbnails.enabled&&(this.previewThumbnails=new ce(this))):this.debug.error("Setup failed: no support")}get isHTML5(){return this.provider===Gt.html5}get isEmbed(){return this.isYouTube||this.isVimeo}get isYouTube(){return this.provider===Gt.youtube}get isVimeo(){return this.provider===Gt.vimeo}get isVideo(){return this.type===jt}get isAudio(){return"audio"===this.type}get playing(){return Boolean(this.ready&&!this.paused&&!this.ended)}get paused(){return Boolean(this.media.paused)}get stopped(){return Boolean(this.paused&&0===this.currentTime)}get ended(){return Boolean(this.media.ended)}set currentTime(t){if(!this.duration)return;const e=T(t)&&t>0;this.media.currentTime=e?Math.min(t,this.duration):0,this.debug.log(`Seeking to ${this.currentTime} seconds`)}get currentTime(){return Number(this.media.currentTime)}get buffered(){const{buffered:t}=this.media;return T(t)?t:t&&t.length&&this.duration>0?t.end(0)/this.duration:0}get seeking(){return Boolean(this.media.seeking)}get duration(){const t=parseFloat(this.config.duration),e=(this.media||{}).duration,i=T(e)&&e!==1/0?e:0;return t||i}set volume(t){let e=t;A(e)&&(e=Number(e)),T(e)||(e=this.storage.get("volume")),T(e)||({volume:e}=this.config),e>1&&(e=1),e<0&&(e=0),this.config.volume=e,this.media.volume=e,!V(t)&&this.muted&&e>0&&(this.muted=!1)}get volume(){return Number(this.media.volume)}set muted(t){let e=t;P(e)||(e=this.storage.get("muted")),P(e)||(e=this.config.muted),this.config.muted=e,this.media.muted=e}get muted(){return Boolean(this.media.muted)}get hasAudio(){return!this.isHTML5||!!this.isAudio||Boolean(this.media.mozHasAudio)||Boolean(this.media.webkitAudioDecodedByteCount)||Boolean(this.media.audioTracks&&this.media.audioTracks.length)}set speed(t){let e=null;T(t)&&(e=t),T(e)||(e=this.storage.get("speed")),T(e)||(e=this.config.speed.selected);const{minimumSpeed:i,maximumSpeed:n}=this;e=oe(e,i,n),this.config.speed.selected=e,setTimeout(()=>{this.media&&(this.media.playbackRate=e)},0)}get speed(){return Number(this.media.playbackRate)}get minimumSpeed(){return this.isYouTube?Math.min(...this.options.speed):this.isVimeo?.5:.0625}get maximumSpeed(){return this.isYouTube?Math.max(...this.options.speed):this.isVimeo?2:16}set quality(t){const e=this.config.quality,i=this.options.quality;if(!i.length)return;let n=[!V(t)&&Number(t),this.storage.get("quality"),e.selected,e.default].find(T),r=!0;if(!i.includes(n)){const t=vt(i,n);this.debug.warn(`Unsupported quality option: ${n}, using ${t} instead`),n=t,r=!1}e.selected=n,this.media.quality=n,r&&this.storage.set({quality:n})}get quality(){return this.media.quality}set loop(t){const e=P(t)?t:this.config.loop.active;this.config.loop.active=e,this.media.loop=e}get loop(){return Boolean(this.media.loop)}set source(t){ue.change.call(this,t)}get source(){return this.media.currentSrc}get download(){const{download:t}=this.config.urls;return N(t)?t:this.source}set download(t){N(t)&&(this.config.urls.download=t,Nt.setDownloadUrl.call(this))}set poster(t){this.isVideo?Xt.setPoster.call(this,t,!1).catch(()=>{}):this.debug.warn("Poster can only be set for video")}get poster(){return this.isVideo?this.media.getAttribute("poster")||this.media.getAttribute("data-poster"):null}get ratio(){if(!this.isVideo)return null;const t=kt(xt.call(this));return M(t)?t.join(":"):t}set ratio(t){this.isVideo?A(t)&&Et(t)?(this.config.ratio=kt(t),wt.call(this)):this.debug.error(`Invalid aspect ratio specified (${t})`):this.debug.warn("Aspect ratio can only be set for video")}set autoplay(t){this.config.autoplay=P(t)?t:this.config.autoplay}get autoplay(){return Boolean(this.config.autoplay)}toggleCaptions(t){Ht.toggle.call(this,t,!1)}set currentTrack(t){Ht.set.call(this,t,!1),Ht.setup.call(this)}get currentTrack(){const{toggled:t,currentTrack:e}=this.captions;return t?e:-1}set language(t){Ht.setLanguage.call(this,t,!1)}get language(){return(Ht.getCurrentTrack.call(this)||{}).language}set pip(t){if(!ot.pip)return;const e=P(t)?t:!this.pip;D(this.media.webkitSetPresentationMode)&&this.media.webkitSetPresentationMode(e?Ut:"inline"),D(this.media.requestPictureInPicture)&&(!this.pip&&e?this.media.requestPictureInPicture():this.pip&&!e&&document.exitPictureInPicture())}get pip(){return ot.pip?V(this.media.webkitPresentationMode)?this.media===document.pictureInPictureElement:this.media.webkitPresentationMode===Ut:null}setPreviewThumbnails(t){this.previewThumbnails&&this.previewThumbnails.loaded&&(this.previewThumbnails.destroy(),this.previewThumbnails=null),Object.assign(this.config.previewThumbnails,t),this.config.previewThumbnails.enabled&&(this.previewThumbnails=new ce(this))}
2static supported(t,e){return ot.check(t,e)}static loadSprite(t,e){return Ft(t,e)}static setup(t,e={}){let i=null;return A(t)?i=Array.from(document.querySelectorAll(t)):L(t)?i=Array.from(t):M(t)&&(i=t.filter(R)),V(i)?null:i.map(t=>new de(t,e))}}var fe;return de.defaults=(fe=qt,JSON.parse(JSON.stringify(fe))),de}())},9708:function(t,e){var i;(()=>{((n,r)=>{if(t.exports)return t.exports=r();void 0===(i=(()=>n.TimeMe=r()).apply(e,[]))||(t.exports=i)})(this,()=>{let t={startStopTimes:{},idleTimeoutMs:3e4,currentIdleTimeMs:0,checkIdleStateRateMs:250,isUserCurrentlyOnPage:!0,isUserCurrentlyIdle:!1,currentPageName:"default-page-name",timeElapsedCallbacks:[],userLeftCallbacks:[],userReturnCallbacks:[],trackTimeOnElement:e=>{let i=document.getElementById(e);i&&(i.addEventListener("mouseover",()=>{t.startTimer(e)}),i.addEventListener("mousemove",()=>{t.startTimer(e)}),i.addEventListener("mouseleave",()=>{t.stopTimer(e)}),i.addEventListener("keypress",()=>{t.startTimer(e)}),i.addEventListener("focus",()=>{t.startTimer(e)}))},getTimeOnElementInSeconds:e=>t.getTimeOnPageInSeconds(e)||0,startTimer:(e,i)=>{if(e||(e=t.currentPageName),void 0===t.startStopTimes[e])t.startStopTimes[e]=[];else{let i=t.startStopTimes[e],n=i[i.length-1];if(void 0!==n&&void 0===n.stopTime)return}t.startStopTimes[e].push({startTime:i||new Date,stopTime:void 0})},stopAllTimers:()=>{let e=Object.keys(t.startStopTimes);for(let i=0;i<e.length;i++)t.stopTimer(e[i])},stopTimer:(e,i)=>{e||(e=t.currentPageName);let n=t.startStopTimes[e];void 0!==n&&0!==n.length&&void 0===n[n.length-1].stopTime&&(n[n.length-1].stopTime=i||new Date)},getTimeOnCurrentPageInSeconds:()=>t.getTimeOnPageInSeconds(t.currentPageName),getTimeOnPageInSeconds:e=>{let i=t.getTimeOnPageInMilliseconds(e);return void 0===i?void 0:i/1e3},getTimeOnCurrentPageInMilliseconds:()=>t.getTimeOnPageInMilliseconds(t.currentPageName),getTimeOnPageInMilliseconds:e=>{let i=0,n=t.startStopTimes[e];if(void 0===n)return;let r=0;for(let t=0;t<n.length;t++){let e=n[t].startTime,i=n[t].stopTime;void 0===i&&(i=new Date),r+=i-e}return i=Number(r),i},getTimeOnAllPagesInSeconds:()=>{let e=[],i=Object.keys(t.startStopTimes);for(let n=0;n<i.length;n++){let r=i[n],s=t.getTimeOnPageInSeconds(r);e.push({pageName:r,timeOnPage:s})}return e},setIdleDurationInSeconds:e=>{let i=parseFloat(e);if(!1!==isNaN(i))throw{name:"InvalidDurationException",message:"An invalid duration time ("+e+") was provided."};t.idleTimeoutMs=1e3*e},setCurrentPageName:e=>{t.currentPageName=e},resetRecordedPageTime:e=>{delete t.startStopTimes[e]},resetAllRecordedPageTimes:()=>{let e=Object.keys(t.startStopTimes);for(let i=0;i<e.length;i++)t.resetRecordedPageTime(e[i])},userActivityDetected:()=>{t.isUserCurrentlyIdle&&t.triggerUserHasReturned(),t.resetIdleCountdown()},resetIdleCountdown:()=>{t.isUserCurrentlyIdle=!1,t.currentIdleTimeMs=0},callWhenUserLeaves:(e,i)=>{t.userLeftCallbacks.push({callback:e,numberOfTimesToInvoke:i})},callWhenUserReturns:(e,i)=>{t.userReturnCallbacks.push({callback:e,numberOfTimesToInvoke:i})},triggerUserHasReturned:()=>{if(!t.isUserCurrentlyOnPage){t.isUserCurrentlyOnPage=!0,t.resetIdleCountdown();for(let e=0;e<t.userReturnCallbacks.length;e++){let i=t.userReturnCallbacks[e],n=i.numberOfTimesToInvoke;(isNaN(n)||void 0===n||n>0)&&(i.numberOfTimesToInvoke-=1,i.callback())}}t.startTimer()},triggerUserHasLeftPageOrGoneIdle:()=>{if(t.isUserCurrentlyOnPage){t.isUserCurrentlyOnPage=!1;for(let e=0;e<t.userLeftCallbacks.length;e++){let i=t.userLeftCallbacks[e],n=i.numberOfTimesToInvoke;(isNaN(n)||void 0===n||n>0)&&(i.numberOfTimesToInvoke-=1,i.callback())}}t.stopAllTimers()},callAfterTimeElapsedInSeconds:(e,i)=>{t.timeElapsedCallbacks.push({timeInSeconds:e,callback:i,pending:!0})},checkIdleState:()=>{for(let e=0;e<t.timeElapsedCallbacks.length;e++)t.timeElapsedCallbacks[e].pending&&t.getTimeOnCurrentPageInSeconds()>t.timeElapsedCallbacks[e].timeInSeconds&&(t.timeElapsedCallbacks[e].callback(),t.timeElapsedCallbacks[e].pending=!1);!1===t.isUserCurrentlyIdle&&t.currentIdleTimeMs>t.idleTimeoutMs?(t.isUserCurrentlyIdle=!0,t.triggerUserHasLeftPageOrGoneIdle()):t.currentIdleTimeMs+=t.checkIdleStateRateMs},visibilityChangeEventName:void 0,hiddenPropName:void 0,listenForVisibilityEvents:(e,i)=>{e&&t.listenForUserLeavesOrReturnsEvents(),i&&t.listForIdleEvents()},listenForUserLeavesOrReturnsEvents:()=>{void 0!==document.hidden?(t.hiddenPropName="hidden",t.visibilityChangeEventName="visibilitychange"):void 0!==document.mozHidden?(t.hiddenPropName="mozHidden",t.visibilityChangeEventName="mozvisibilitychange"):void 0!==document.msHidden?(t.hiddenPropName="msHidden",t.visibilityChangeEventName="msvisibilitychange"):void 0!==document.webkitHidden&&(t.hiddenPropName="webkitHidden",t.visibilityChangeEventName="webkitvisibilitychange"),document.addEventListener(t.visibilityChangeEventName,()=>{document[t.hiddenPropName]?t.triggerUserHasLeftPageOrGoneIdle():t.triggerUserHasReturned()},!1),window.addEventListener("blur",()=>{t.triggerUserHasLeftPageOrGoneIdle()}),window.addEventListener("focus",()=>{t.triggerUserHasReturned()})},listForIdleEvents:()=>{document.addEventListener("mousemove",()=>{t.userActivityDetected()}),document.addEventListener("keyup",()=>{t.userActivityDetected()}),document.addEventListener("touchstart",()=>{t.userActivityDetected()}),window.addEventListener("scroll",()=>{t.userActivityDetected()}),setInterval(()=>{!0!==t.isUserCurrentlyIdle&&t.checkIdleState()},t.checkIdleStateRateMs)},websocket:void 0,websocketHost:void 0,setUpWebsocket:e=>{if(window.WebSocket&&e){let i=e.websocketHost;try{t.websocket=new WebSocket(i),window.onbeforeunload=()=>{t.sendCurrentTime(e.appId)},t.websocket.onopen=()=>{t.sendInitWsRequest(e.appId)},t.websocket.onerror=t=>{console&&console.log("Error occurred in websocket connection: "+t)},t.websocket.onmessage=t=>{console&&console.log(t.data)}}catch(t){console&&console.error("Failed to connect to websocket host. Error:"+t)}}},websocketSend:e=>{t.websocket.send(JSON.stringify(e))},sendCurrentTime:e=>{let i={type:"INSERT_TIME",appId:e,timeOnPageMs:t.getTimeOnCurrentPageInMilliseconds(),pageName:t.currentPageName};t.websocketSend(i)},sendInitWsRequest:e=>{let i={type:"INIT",appId:e};t.websocketSend(i)},initialize:e=>{let i,n,r=t.idleTimeoutMs||30,s=t.currentPageName||"default-page-name",a=!0,o=!0;e&&(r=e.idleTimeoutInSeconds||r,s=e.currentPageName||s,i=e.websocketOptions,n=e.initialStartTime,!1===e.trackWhenUserLeavesPage&&(a=!1),!1===e.trackWhenUserGoesIdle&&(o=!1)),t.setIdleDurationInSeconds(r),t.setCurrentPageName(s),t.setUpWebsocket(i),t.listenForVisibilityEvents(a,o),t.startTimer(void 0,n)}};return t})}).call(this)}
vendor: 4,637 bytes, line 2
2,931:function(t,e,i){var n,r;n=function(){var t=!1;function e(t){this.opts=function(){for(var t=1;t<arguments.length;t++)for(var e in arguments[t])arguments[t].hasOwnProperty(e)&&(arguments[0][e]=arguments[t][e]);return arguments[0]}({},{onClose:null,onOpen:null,beforeOpen:null,beforeClose:null,stickyFooter:!1,footer:!1,cssClass:[],closeLabel:"Close",closeMethods:["overlay","button","escape"]},t),this.init()}function i(){this.modalBoxFooter&&(this.modalBoxFooter.style.width=this.modalBox.clientWidth+"px",this.modalBoxFooter.style.left=this.modalBox.offsetLeft+"px")}return e.prototype.init=function(){if(!this.modal)return function(){this.modal=document.createElement("div"),this.modal.classList.add("tingle-modal"),0!==this.opts.closeMethods.length&&-1!==this.opts.closeMethods.indexOf("overlay")||this.modal.classList.add("tingle-modal--noOverlayClose"),this.modal.style.display="none",this.opts.cssClass.forEach(function(t){"string"==typeof t&&this.modal.classList.add(t)},this),-1!==this.opts.closeMethods.indexOf("button")&&(this.modalCloseBtn=document.createElement("button"),this.modalCloseBtn.type="button",this.modalCloseBtn.classList.add("tingle-modal__close"),this.modalCloseBtnIcon=document.createElement("span"),this.modalCloseBtnIcon.classList.add("tingle-modal__closeIcon"),this.modalCloseBtnIcon.innerHTML='<svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg"><path d="M.3 9.7c.2.2.4.3.7.3.3 0 .5-.1.7-.3L5 6.4l3.3 3.3c.2.2.5.3.7.3.2 0 .5-.1.7-.3.4-.4.4-1 0-1.4L6.4 5l3.3-3.3c.4-.4.4-1 0-1.4-.4-.4-1-.4-1.4 0L5 3.6 1.7.3C1.3-.1.7-.1.3.3c-.4.4-.4 1 0 1.4L3.6 5 .3 8.3c-.4.4-.4 1 0 1.4z" fill="#000" fill-rule="nonzero"/></svg>',this.modalCloseBtnLabel=document.createElement("span"),this.modalCloseBtnLabel.classList.add("tingle-modal__closeLabel"),this.modalCloseBtnLabel.innerHTML=this.opts.closeLabel,this.modalCloseBtn.appendChild(this.modalCloseBtnIcon),this.modalCloseBtn.appendChild(this.modalCloseBtnLabel)),this.modalBox=document.createElement("div"),this.modalBox.classList.add("tingle-modal-box"),this.modalBoxContent=document.createElement("div"),this.modalBoxContent.classList.add("tingle-modal-box__content"),this.modalBox.appendChild(this.modalBoxContent),-1!==this.opts.closeMethods.indexOf("button")&&this.modal.appendChild(this.modalCloseBtn),this.modal.appendChild(this.modalBox)}.call(this),function(){this._events={clickCloseBtn:this.close.bind(this),clickOverlay:function(t){var e=this.modal.offsetWidth-this.modal.clientWidth,i=t.clientX>=this.modal.offsetWidth-15,n=this.modal.scrollHeight!==this.modal.offsetHeight;"MacIntel"===navigator.platform&&0==e&&i&&n||-1!==this.opts.closeMethods.indexOf("overlay")&&!function(t){for(;(t=t.parentElement)&&!t.classList.contains("tingle-modal"););return t}(t.target)&&t.clientX<this.modal.clientWidth&&this.close()}.bind(this),resize:this.checkOverflow.bind(this),keyboardNav:function(t){-1!==this.opts.closeMethods.indexOf("escape")&&27===t.which&&this.isOpen()&&this.close()}.bind(this)},-1!==this.opts.closeMethods.indexOf("button")&&this.modalCloseBtn.addEventListener("click",this._events.clickCloseBtn),this.modal.addEventListener("mousedown",this._events.clickOverlay),window.addEventListener("resize",this._events.resize),document.addEventListener("keydown",this._events.keyboardNav)}.call(this),document.body.appendChild(this.modal,document.body.firstChild),this.opts.footer&&this.addFooter(),this},e.prototype._busy=function(e){t=e},e.prototype._isBusy=function(){return t},e.prototype.destroy=function(){null!==this.modal&&(this.isOpen()&&this.close(!0),function(){-1!==this.opts.closeMethods.indexOf("button")&&this.modalCloseBtn.removeEventListener("click",this._events.clickCloseBtn),this.modal.removeEventListener("mousedown",this._events.clickOverlay),window.removeEventListener("resize",this._events.resize),document.removeEventListener("keydown",this._events.keyboardNav)}.call(this),this.modal.parentNode.removeChild(this.modal),this.modal=null)},e.prototype.isOpen=function(){return!!this.modal.classList.contains("tingle-modal--visible")},e.prototype.open=function(){if(!this._isBusy()){this._busy(!0);var t=this;return"function"==typeof t.opts.beforeOpen&&t.opts.beforeOpen(),this.modal.style.removeProperty?this.modal.style.removeProperty("display"):this.modal.style.removeAttribute("display"),this._scrollPosition=window.pageYOffset,document.body.classList.add("tingle-enabled"),document.body.style.top=-this._scrollPosition+"px",this.setStickyFooter(this.opts.stickyFooter),this.modal.classList.add("tingle-modal--visible"),"function"==typeof t.opts.onOpen&&t.opts.onOpen.call(t),t._busy(!1),this.checkOverflow(),this}}
2,e.prototype.close=function(t){if(!this._isBusy()){if(this._busy(!0),"function"==typeof this.opts.beforeClose&&!this.opts.beforeClose.call(this))return void this._busy(!1);document.body.classList.remove("tingle-enabled"),document.body.style.top=null,window.scrollTo({top:this._scrollPosition,behavior:"instant"}),this.modal.classList.remove("tingle-modal--visible");var e=this;e.modal.style.display="none","function"==typeof e.opts.onClose&&e.opts.onClose.call(this),e._busy(!1)}},e.prototype.setContent=function(t){return"string"==typeof t?this.modalBoxContent.innerHTML=t:(this.modalBoxContent.innerHTML="",this.modalBoxContent.appendChild(t)),this.isOpen()&&this.checkOverflow(),this},e.prototype.getContent=function(){return this.modalBoxContent},e.prototype.addFooter=function(){return function(){this.modalBoxFooter=document.createElement("div"),this.modalBoxFooter.classList.add("tingle-modal-box__footer"),this.modalBox.appendChild(this.modalBoxFooter)}.call(this),this},e.prototype.setFooterContent=function(t){return this.modalBoxFooter.innerHTML=t,this},e.prototype.getFooterContent=function(){return this.modalBoxFooter},e.prototype.setStickyFooter=function(t){return this.isOverflow()||(t=!1),t?this.modalBox.contains(this.modalBoxFooter)&&(this.modalBox.removeChild(this.modalBoxFooter),this.modal.appendChild(this.modalBoxFooter),this.modalBoxFooter.classList.add("tingle-modal-box__footer--sticky"),i.call(this),this.modalBoxContent.style["padding-bottom"]=this.modalBoxFooter.clientHeight+20+"px"):this.modalBoxFooter&&(this.modalBox.contains(this.modalBoxFooter)||(this.modal.removeChild(this.modalBoxFooter),this.modalBox.appendChild(this.modalBoxFooter),this.modalBoxFooter.style.width="auto",this.modalBoxFooter.style.left="",this.modalBoxContent.style["padding-bottom"]="",this.modalBoxFooter.classList.remove("tingle-modal-box__footer--sticky"))),this},e.prototype.addFooterBtn=function(t,e,i){var n=document.createElement("button");return n.innerHTML=t,n.addEventListener("click",i),"string"==typeof e&&e.length&&e.split(" ").forEach(function(t){n.classList.add(t)}),this.modalBoxFooter.appendChild(n),n},e.prototype.resize=function(){console.warn("Resize is deprecated and will be removed in version 1.0")},e.prototype.isOverflow=function(){return window.innerHeight<=this.modalBox.clientHeight},e.prototype.checkOverflow=function(){this.modal.classList.contains("tingle-modal--visible")&&(this.isOverflow()?this.modal.classList.add("tingle-modal--overflow"):this.modal.classList.remove("tingle-modal--overflow"),!this.isOverflow()&&this.opts.stickyFooter?this.setStickyFooter(!1):this.isOverflow()&&this.opts.stickyFooter&&(i.call(this),this.setStickyFooter(!0)))},{modal:e}},void 0===(r=n.call(e,i,e,t))||(t.exports=r)},6377:function(t,e,i){var n,r;!function(s){n=[i(2475)],r=function(t){return function(t,e){"use strict";function i(){}var n=i.prototype=Object.create(e.prototype);n.bindHandles=function(){this._bindHandles(!0)},n.unbindHandles=function(){this._bindHandles(!1)},n._bindHandles=function(e){for(var i=(e=void 0===e||e)?"addEventListener":"removeEventListener",n=e?this._touchActionValue:"",r=0;r<this.handles.length;r++){var s=this.handles[r];this._bindStartEvent(s,e),s[i]("click",this),t.PointerEvent&&(s.style.touchAction=n)}},n._touchActionValue="none",n.pointerDown=function(t,e){this.okayPointerDown(t)&&(this.pointerDownPointer={pageX:e.pageX,pageY:e.pageY},t.preventDefault(),this.pointerDownBlur(),this._bindPostStartEvents(t),this.emitEvent("pointerDown",[t,e]))};var r={TEXTAREA:!0,INPUT:!0,SELECT:!0,OPTION:!0},s={radio:!0,checkbox:!0,button:!0,submit:!0,image:!0,file:!0};return n.okayPointerDown=function(t){var e=r[t.target.nodeName],i=s[t.target.type],n=!e||i;return n||this._pointerReset(),n},n.pointerDownBlur=function(){var t=document.activeElement;t&&t.blur&&t!=document.body&&t.blur()},n.pointerMove=function(t,e){var i=this._dragPointerMove(t,e);this.emitEvent("pointerMove",[t,e,i]),this._dragMove(t,e,i)},n._dragPointerMove=function(t,e){var i={x:e.pageX-this.pointerDownPointer.pageX,y:e.pageY-this.pointerDownPointer.pageY};return!this.isDragging&&this.hasDragStarted(i)&&this._dragStart(t,e),i},n.hasDragStarted=function(t){return Math.abs(t.x)>3||Math.abs(t.y)>3},n.pointerUp=function(t,e){this.emitEvent("pointerUp",[t,e]),this._dragPointerUp(t,e)},n._dragPointerUp=function(t,e){this.isDragging?this._dragEnd(t,e):this._staticClick(t,e)},n._dragStart=function(t,e){this.isDragging=!0,this.isPreventing
vendor: 4,095 bytes, line 2
2Clicks=!0,this.dragStart(t,e)},n.dragStart=function(t,e){this.emitEvent("dragStart",[t,e])},n._dragMove=function(t,e,i){this.isDragging&&this.dragMove(t,e,i)},n.dragMove=function(t,e,i){t.preventDefault(),this.emitEvent("dragMove",[t,e,i])},n._dragEnd=function(t,e){this.isDragging=!1,setTimeout(function(){delete this.isPreventingClicks}.bind(this)),this.dragEnd(t,e)},n.dragEnd=function(t,e){this.emitEvent("dragEnd",[t,e])},n.onclick=function(t){this.isPreventingClicks&&t.preventDefault()},n._staticClick=function(t,e){this.isIgnoringMouseUp&&"mouseup"==t.type||(this.staticClick(t,e),"mouseup"!=t.type&&(this.isIgnoringMouseUp=!0,setTimeout(function(){delete this.isIgnoringMouseUp}.bind(this),400)))},n.staticClick=function(t,e){this.emitEvent("staticClick",[t,e])},i.getPointerPoint=e.getPointerPoint,i}(s,t)}.apply(e,n),void 0===r||(t.exports=r)}(window)},2475:function(t,e,i){var n,r;!function(s){n=[i(2137)],r=function(t){return function(t,e){"use strict";function i(){}var n=i.prototype=Object.create(e.prototype);n.bindStartEvent=function(t){this._bindStartEvent(t,!0)},n.unbindStartEvent=function(t){this._bindStartEvent(t,!1)},n._bindStartEvent=function(e,i){var n=(i=void 0===i||i)?"addEventListener":"removeEventListener",r="mousedown";"ontouchstart"in t?r="touchstart":t.PointerEvent&&(r="pointerdown"),e[n](r,this)},n.handleEvent=function(t){var e="on"+t.type;this[e]&&this[e](t)},n.getTouch=function(t){for(var e=0;e<t.length;e++){var i=t[e];if(i.identifier==this.pointerIdentifier)return i}},n.onmousedown=function(t){var e=t.button;e&&0!==e&&1!==e||this._pointerDown(t,t)},n.ontouchstart=function(t){this._pointerDown(t,t.changedTouches[0])},n.onpointerdown=function(t){this._pointerDown(t,t)},n._pointerDown=function(t,e){t.button||this.isPointerDown||(this.isPointerDown=!0,this.pointerIdentifier=void 0!==e.pointerId?e.pointerId:e.identifier,this.pointerDown(t,e))},n.pointerDown=function(t,e){this._bindPostStartEvents(t),this.emitEvent("pointerDown",[t,e])};var r={mousedown:["mousemove","mouseup"],touchstart:["touchmove","touchend","touchcancel"],pointerdown:["pointermove","pointerup","pointercancel"]};return n._bindPostStartEvents=function(e){if(e){var i=r[e.type];i.forEach(function(e){t.addEventListener(e,this)},this),this._boundPointerEvents=i}},n._unbindPostStartEvents=function(){this._boundPointerEvents&&(this._boundPointerEvents.forEach(function(e){t.removeEventListener(e,this)},this),delete this._boundPointerEvents)},n.onmousemove=function(t){this._pointerMove(t,t)},n.onpointermove=function(t){t.pointerId==this.pointerIdentifier&&this._pointerMove(t,t)},n.ontouchmove=function(t){var e=this.getTouch(t.changedTouches);e&&this._pointerMove(t,e)},n._pointerMove=function(t,e){this.pointerMove(t,e)},n.pointerMove=function(t,e){this.emitEvent("pointerMove",[t,e])},n.onmouseup=function(t){this._pointerUp(t,t)},n.onpointerup=function(t){t.pointerId==this.pointerIdentifier&&this._pointerUp(t,t)},n.ontouchend=function(t){var e=this.getTouch(t.changedTouches);e&&this._pointerUp(t,e)},n._pointerUp=function(t,e){this._pointerDone(),this.pointerUp(t,e)},n.pointerUp=function(t,e){this.emitEvent("pointerUp",[t,e])},n._pointerDone=function(){this._pointerReset(),this._unbindPostStartEvents(),this.pointerDone()},n._pointerReset=function(){this.isPointerDown=!1,delete this.pointerIdentifier},n.pointerDone=function(){},n.onpointercancel=function(t){t.pointerId==this.pointerIdentifier&&this._pointerCancel(t,t)},n.ontouchcancel=function(t){var e=this.getTouch(t.changedTouches);e&&this._pointerCancel(t,e)},n._pointerCancel=function(t,e){this._pointerDone(),this.pointerCancel(t,e)},n.pointerCancel=function(t,e){this.emitEvent("pointerCancel",[t,e])},i.getPointerPoint=function(t){return{x:t.pageX,y:t.pageY}},i}(s,t)}.apply(e,n),void 0===r||(t.exports=r)}(window)},7510:function(t){t.exports=function(){for(var t={},i=0;i<arguments.length;i++){var n=arguments[i];for(var r in n)e.call(n,r)&&(t[r]=n[r])}return t};var e=Object.prototype.hasOwnProperty},4633:function(t,e,i){var n=i(3738).default;function r(){"use strict";t.exports=r=function(){return e}
vendor: 4,620 bytes, line 2
2,t.exports.__esModule=!0,t.exports.default=t.exports;var e={},i=Object.prototype,s=i.hasOwnProperty,a=Object.defineProperty||function(t,e,i){t[e]=i.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",h=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function u(t,e,i){return Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,i){return t[e]=i}}function d(t,e,i,n){var r=e&&e.prototype instanceof m?e:m,s=Object.create(r.prototype),o=new A(n||[]);return a(s,"_invoke",{value:w(t,i,o)}),s}function f(t,e,i){try{return{type:"normal",arg:t.call(e,i)}}catch(t){return{type:"throw",arg:t}}}e.wrap=d;var p={};function m(){}function g(){}function y(){}var v={};u(v,l,function(){return this});var b=Object.getPrototypeOf,S=b&&b(b(P([])));S&&S!==i&&s.call(S,l)&&(v=S);var E=y.prototype=m.prototype=Object.create(v);function k(t){["next","throw","return"].forEach(function(e){u(t,e,function(t){return this._invoke(e,t)})})}function x(t,e){function i(r,a,o,l){var h=f(t[r],t,a);if("throw"!==h.type){var c=h.arg,u=c.value;return u&&"object"==n(u)&&s.call(u,"__await")?e.resolve(u.__await).then(function(t){i("next",t,o,l)},function(t){i("throw",t,o,l)}):e.resolve(u).then(function(t){c.value=t,o(c)},function(t){return i("throw",t,o,l)})}l(h.arg)}var r;a(this,"_invoke",{value:function(t,n){function s(){return new e(function(e,r){i(t,n,e,r)})}return r=r?r.then(s,s):s()}})}function w(t,e,i){var n="suspendedStart";return function(r,s){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===r)throw s;return{value:void 0,done:!0}}for(i.method=r,i.arg=s;;){var a=i.delegate;if(a){var o=_(a,i);if(o){if(o===p)continue;return o}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if("suspendedStart"===n)throw n="completed",i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);n="executing";var l=f(t,e,i);if("normal"===l.type){if(n=i.done?"completed":"suspendedYield",l.arg===p)continue;return{value:l.arg,done:i.done}}"throw"===l.type&&(n="completed",i.method="throw",i.arg=l.arg)}}}function _(t,e){var i=e.method,n=t.iterator[i];if(void 0===n)return e.delegate=null,"throw"===i&&t.iterator.return&&(e.method="return",e.arg=void 0,_(t,e),"throw"===e.method)||"return"!==i&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+i+"' method")),p;var r=f(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,p;var s=r.arg;return s?s.done?(e[t.resultName]=s.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,p):s:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,p)}function C(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(C,this),this.reset(!0)}function P(t){if(t){var e=t[l];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,n=function e(){for(;++i<t.length;)if(s.call(t,i))return e.value=t[i],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:D}}function D(){return{value:void 0,done:!0}}return g.prototype=y,a(E,"constructor",{value:y,configurable:!0}),a(y,"constructor",{value:g,configurable:!0}),g.displayName=u(y,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,u(t,c,"GeneratorFunction")),t.prototype=Object.create(E),t},e.awrap=function(t){return{__await:t}},k(x.prototype),u(x.prototype,h,function(){return this}),e.AsyncIterator=x,e.async=function(t,i,n,r,s){void 0===s&&(s=Promise);var a=new x(d(t,i,n,r),s);return e.isGeneratorFunction(i)?a:a.next().then(function(t){return t.done?t.value:a.next()})},k(E),u(E,c,"Generator"),u(E,l,function(){return this}),u(E,"toString",function(){return"[object Generator]"}),e.keys=function(t){var e=Object(t),i=[];for(var n in e)i.push(n);return i.reverse(),function t(){for(;i.length;){var n=i.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=P,A.prototype={constructor:A,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEac
vendor: 4,275 bytes, line 2
2h(T),!t)for(var e in this)"t"===e.charAt(0)&&s.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function i(i,n){return a.type="throw",a.arg=t,e.next=i,n&&(e.method="next",e.arg=void 0),!!n}for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n],a=r.completion;if("root"===r.tryLoc)return i("end");if(r.tryLoc<=this.prev){var o=s.call(r,"catchLoc"),l=s.call(r,"finallyLoc");if(o&&l){if(this.prev<r.catchLoc)return i(r.catchLoc,!0);if(this.prev<r.finallyLoc)return i(r.finallyLoc)}else if(o){if(this.prev<r.catchLoc)return i(r.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<r.finallyLoc)return i(r.finallyLoc)}}}},abrupt:function(t,e){for(var i=this.tryEntries.length-1;i>=0;--i){var n=this.tryEntries[i];if(n.tryLoc<=this.prev&&s.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var r=n;break}}r&&("break"===t||"continue"===t)&&r.tryLoc<=e&&e<=r.finallyLoc&&(r=null);var a=r?r.completion:{};return a.type=t,a.arg=e,r?(this.method="next",this.next=r.finallyLoc,p):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),T(i),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var n=i.completion;if("throw"===n.type){var r=n.arg;T(i)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,i){return this.delegate={iterator:P(t),resultName:e,nextLoc:i},"next"===this.method&&(this.arg=void 0),p}},e}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},3738:function(t){function e(i){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(i)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},4756:function(t,e,i){var n=i(4633)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},__webpack_module_cache__={},leafPrototypes,getProto;function __webpack_require__(t){var e=__webpack_module_cache__[t];if(void 0!==e)return e.exports;var i=__webpack_module_cache__[t]={exports:{}};return __webpack_modules__[t].call(i.exports,i,i.exports,__webpack_require__),i.exports}__webpack_require__.amdO={},__webpack_require__.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return __webpack_require__.d(e,{a:e}),e},getProto=Object.getPrototypeOf?function(t){return Object.getPrototypeOf(t)}:function(t){return t.__proto__},__webpack_require__.t=function(t,e){if(1&e&&(t=this(t)),8&e)return t;if("object"==typeof t&&t){if(4&e&&t.__esModule)return t;if(16&e&&"function"==typeof t.then)return t}var i=Object.create(null);__webpack_require__.r(i);var n={};leafPrototypes=leafPrototypes||[null,getProto({}),getProto([]),getProto(getProto)];for(var r=2&e&&t;"object"==typeof r&&!~leafPrototypes.indexOf(r);r=getProto(r))Object.getOwnPropertyNames(r).forEach(function(e){n[e]=function(){return t[e]}});return n.default=function(){return t},__webpack_require__.d(i,n),i},__webpack_require__.d=function(t,e){for(var i in e)__webpack_require__.o(e,i)&&!__webpack_require__.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),__webpack_require__.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},__webpack_require__.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}
2),Object.defineProperty(t,"__esModule",{value:!0})};var __webpack_exports__={};!function(){"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function i(t){var i=function(t){if("object"!==e(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,"string");if("object"!==e(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===e(i)?i:String(i)}function n(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,i(r.key),r)}}function r(t,e,i){return e&&n(t.prototype,e),i&&n(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function s(t,e,n){return(e=i(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var a="ps-logger-level",o=function(){function e(){t(this,e)}return r(e,null,[{key:"disableVerboseLogging",value:function(){return window.sessionStorage.setItem(a,0),e}},{key:"enableVerboseLogging",value:function(){return window.sessionStorage.setItem(a,1),e}},{key:"currentLogLevel",value:function(){return 1*window.sessionStorage.getItem(a)}},{key:"assert",value:function(){return h("assert",arguments),e}},{key:"clear",value:function(){return h("clear",arguments),e}},{key:"count",value:function(){return h("count",arguments),e}},{key:"debug",value:function(){return e.log.apply(null,arguments),e}},{key:"dir",value:function(){return h("dir",arguments),e}},{key:"dirxml",value:function(){return h("dirxml",arguments),e}},{key:"error",value:function(){return h("error",arguments,0),e}},{key:"exception",value:function(){return e.error.apply(null,arguments),e}},{key:"group",value:function(){return h("group",arguments),e}},{key:"groupCollapsed",value:function(){return h("groupCollapsed",arguments),e}},{key:"groupEnd",value:function(){return h("groupEnd",arguments),e}},{key:"info",value:function(){return h("info",arguments),e}},{key:"log",value:function(){return h("log",arguments),e}},{key:"profile",value:function(){return h("profile",arguments),e}},{key:"profileEnd",value:function(){return h("profileEnd",arguments),e}},{key:"table",value:function(){return h("table",arguments),e}},{key:"time",value:function(){return h("time",arguments),e}},{key:"timeEnd",value:function(){return h("timeEnd",arguments),e}},{key:"timeStamp",value:function(){return h("timeStamp",arguments),e}},{key:"trace",value:function(){return h("trace",arguments),e}},{key:"warn",value:function(){return h("warn",arguments),e}},{key:"welcomeMessage",value:function(){var t="%c";l()&&(t="");var e="".concat(t,"To enable verbose logging from Perfect Sense Javascript, set the session storage variable ").concat(t,"ps-logger-level ").concat(t,"to 1"),i="background-color: #eee; font-size: 18px",n="".concat(i,"; color: #333333"),r="".concat(i,"; color: #23c8ff"),s="".concat(i,"; color: #ff1e3c"),a="".concat("background-color: #eee; font-size: 11px","; color: #333333"),o="".concat(a,"; font-weight: bold");l()?console.log(e):(console.log(n,r,s,r,s,n),console.log(e,a,o,a))}}]),e}();function l(){return/Trident\/|MSIE/.test(window.navigator.userAgent)}function h(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;window.console&&(window.console[t]&&o.currentLogLevel()>=i?window.console[t].apply(null,e):o.currentLogLevel()>=i&&window.console.log&&window.console.log.apply(null,e))}var c="data-bsp-plugin",u="complete",d="interactive",f="readystatechange",p="bsp-plugin:load",m="bspPlugin",g=function(){function e(){t(this,e),s(this,"attrPlugin",c),s(this,"propPlugin",m),s(this,"msgPrefix","PluginRegistry:"),this._plugins=[],v.call(this)}return r(e,[{key:"register",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},r=this;y.call(this,{load:i,Module:t,selector:e,option:n}),document.addEventListener(f,function(){document.readyState!==d&&document.readyState!==u||b.call(r)})}},{key:"scope",value:function(t){return this.constructor.scope(t)}}],[{key:"scope",value:function(t){return t[m]}}]),e}();function y(t){this._plugins.push(t),o.log("".concat(this.msgPrefix," _addPluginToReg
2istry: added plugin to registry"),t)}function v(){var t=this;if(window.MutationObserver){var e=new window.MutationObserver(function(e){b.call(t)});document.readyState===d||document.readyState===u?e.observe(document.body,{childList:!0,subtree:!0}):document.addEventListener(f,function(){document.readyState!==d&&document.readyState!==u||e.observe(document.body,{childList:!0,subtree:!0})})}else document.addEventListener("DOMSubtreeModified",function(){b.call(t)},!1)}function b(){for(var t=this,e=0;e<t._plugins.length;e++)E.call(t,t._plugins[e])}function S(t,e){return"".concat(t.trim(),":not([").concat(c,"~='").concat(e,"'])")}function E(t){var e=[],i=t.selector.split(","),n=this;if(i.length>1)for(var r=0;r<i.length;r++){var s=S.call(n,i[r],t.Module.name),a=document.querySelectorAll(s);if(a.length)for(var l=0;l<a.length;l++)e.push(a[l])}else{var h=S.call(n,t.selector,t.Module.name);e=document.querySelectorAll(h)}if(e.length){o.log("".concat(this.msgPrefix," _loadPlugin: Nodes found using selector ").concat(t.selector).concat(this.selectorSuffix),e);for(var c=function(){var i=e[p];if("function"==typeof t.load)i._bspLoadPromise=new Promise(function(e,n){t.load(e,n,i)}).then(function(){x.call(n,i,t)});else if(t.load===d||t.load===u){var r=function(){if(t.load===document.readyState||t.load===d&&document.readyState===u)return!0};r()?x.call(n,i,t):document.addEventListener(f,function(){r()&&x.call(n,i,t)})}},p=0;p<e.length;p++)c()}else o.log("".concat(this.msgPrefix," _loadPlugin: No uninstantiated nodes found using selector ").concat(t.selector).concat(this.selectorSuffix," at this time"))}function k(t,e){var i=e.Module.name;if(i.length<2&&!e.Module.generatedName)for(i="Module".concat(Math.ceil(1e5*Math.random()));t[this.propPlugin][i];)i="Module".concat(Math.ceil(1e5*Math.random()));else e.Module.generatedName&&(i=e.Module.generatedName);return e.Module.generatedName=i,i}function x(t,e){try{t[this.propPlugin]||(t[this.propPlugin]={});var i=k.call(this,t,e);if(o.log("".concat(this.msgPrefix," _doLoadPlugin:"),t,e),!t[this.propPlugin][i]){var n;t[this.propPlugin][i]=new e.Module(t,e.options);var r={element:t,instance:t[this.propPlugin]};"function"==typeof window.CustomEvent?n=new window.CustomEvent(p,{detail:r}):document.createEvent&&(n=document.createEvent("CustomEvent")).initCustomEvent(p,!0,!1,r),t.dispatchEvent&&t.dispatchEvent(n)}t.setAttribute(this.attrPlugin,function(t,e){var i=t.getAttribute(c),n=e.generatedName;return i&&i.indexOf(n)>-1?i:i?i+" "+n:n}(t,e.Module))}catch(n){o.error(n)}}window.addEventListener("load",function(){setTimeout(function(){},500)});var w=new g;function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function C(t,e){if(t){if("string"==typeof t)return _(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_(t,e):void 0}}function T(t){return function(t){if(Array.isArray(t))return _(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||C(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var A=__webpack_require__(9708);function P(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)}return i}function D(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?P(Object(i),!0).forEach(function(e){s(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):P(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var M="/_track",L=function(){return+new Date},R=function(t,e){try{localStorage.setItem(t,e)}catch(t){}},I=function(){function e(){t(this,e)}return r(e,null,[{key:"bspTrackingScript",get:function(){return document.querySelector("[data-bsp-site]")}},{key:"contentId",get:function(){var t=document.querySelector("[data-bsp-contentid]");if(t)return t.getAttribute("data-bsp-contentid")}},{key:"extraData",get:function(){var t=document.querySelector("[data-bsp-analytics-data]");if(t)return JSON.parse(t.dataset.bspAnalyticsData)},set:function(t){var e=document.querySelector("[data-bsp-analytics-data]");e&&(e.dataset.bspAnalyticsData=t)}},{key:"pageViewIds",get:function(){return T(document.querySelectorAll("[data-bsp-pv]")).map(function(t){return t.getAttribute("data-bsp-pv")})}},{key:"referrer",get:function(){return document.referrer?document.referrer:""}},{key:"siteId",get:function(){if(this.bspTrackingScript)return this.bspTrackingScript.getAttribute("data-bsp-site")}},{key:"siteSuffix",get:function(){return this.siteId?".".concat(this.siteId):""}},{key:"trackingEnabled",get:function(){return!!this.bspTrackingScript}},{key:"clearTimeout",value:function(t){function e(){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(){var t="bsp.analytics.timeout.id".concat(this.siteSuffix
2),e=localStorage.getItem(t);e&&(clearTimeout(e),localStorage.removeItem(t))})},{key:"post",value:function(t,e){var i=D({s:this.siteId,p:this.pageViewIds,u:window.location.href},this.extraData),n=new XMLHttpRequest,r=JSON.stringify(D(D({},i),t));e?(n.open("POST",M,!1),n.onreadystatechange=function(){n.readyState===XMLHttpRequest.DONE&&200===n.status&&e()}):n.open("POST",M,!0),n.send(r)}},{key:"trackVisits",value:function(){var t=!1,e=!1,i="bsp.analytics.uniqueVisit".concat(this.siteSuffix),n="bsp.analytics.visitStarted".concat(this.siteSuffix),r="bsp.analytics.lastActivity".concat(this.siteSuffix);localStorage.getItem(i)||(R(i,!0),t=!0);var s=localStorage.getItem(n),a=localStorage.getItem(r),o=L();R(r,o),!s||parseInt(s)+432e5<o?(R(n,o),e=!0):(!a||parseInt(a)+18e5<o)&&(e=!0);var l=[];t&&l.push("uv"),e&&l.push("v"),this.pageViewIds&&l.push("pv"),this.referrer&&l.push("ch"),this.post({r:this.referrer,ci:this.contentId,e:l})}},{key:"trackTimeOnPage",value:function(){var t=this;A.resetAllRecordedPageTimes(),A.initialize({idleTimeoutInSeconds:30});var e=0,i=1e4,n=32*i,r="bsp.analytics.timeout.id".concat(this.siteSuffix);this.clearTimeout(),R(r,setTimeout(function s(){i<n&&(i*=2),t.clearTimeout(),R(r,setTimeout(s,i));var a=A.getTimeOnCurrentPageInSeconds(),o=a-e;if(o>0){e=a;var l=[];l.push("t"),t.post({e:l,t:o>n?n:o})}},i)),window.addEventListener("beforeunload",function(){var i=A.getTimeOnCurrentPageInSeconds()-e;if(!(i<=0)){var n=[];n.push("t");var r={e:n,t:i};if(navigator.sendBeacon)navigator.sendBeacon(M,JSON.stringify(r));else{var s,a=L()+200;for(t.post(r,function(){s=!0});!(s||L()>a););}}})}}]),e}(),F=function(){I.trackingEnabled&&(I.trackVisits(),I.trackTimeOnPage(),window.addEventListener("Bsp:PageView",function(){I.trackVisits(),I.trackTimeOnPage()}))};function O(t,e){if(t<=0)return e;var i,n,r=0;return function(){if(n=arguments,!i){var s=this,a=+Date.now(),o=t-a+r;o<=0?(r=a,e.apply(s,n)):i=setTimeout(function(){r=a,i=null,e.apply(s,n)},o)}}}"loading"===document.readyState?document.addEventListener("DOMContentLoaded",F):F();var B=function(){function e(){t(this,e),this.selector=".GoogleDfpAd",this.init()}return r(e,[{key:"init",value:function(){var t=this;this.currentMediaQuery=this.getMediaQuery(),this.googleAds=document.querySelectorAll(this.selector),this.googleAds.length&&(this.googleAds.forEach(function(e){t.processAd(e)}),this.sendAdserverRequest())}},{key:"sendAdserverRequest",value:function(){var t=this;window.googletag.cmd.push(function(){window.googletag.pubads().refresh(window.dfpAdSlots),t.createResizeListener()})}},{key:"processAd",value:function(t){var e=t.getAttribute("data-hide-mobile")||!1,i=t.getAttribute("data-hide-desktop")||!1,n=!0;if("xs"!==this.getMediaQuery&&"sm"!==this.getMediaQuery||(n=!1),n&&i||!n&&e)t.parentNode.remove();else{var r,s=t.id,a=t.getAttribute("data-slot-name")||"",o=t.getAttribute("data-slot-sizes")||"",l=t.getAttribute("data-slot-adSizeMap")||"";void 0!==window.googletag&&null!==window.googletag&&window.googletag.cmd.push(function(){r=window.googletag.defineSlot(a,JSON.parse(o),s).addService(window.googletag.pubads());var e=-1,i=-1,n=window.innerWidth;if(null!=l&&l.length>0){var h=window.googletag.sizeMapping();JSON.parse(l).forEach(function(t){var r=t.slice(1),s=t[0][0],a=!0;1===r.length&&0===r[0][0]&&0===r[0][1]&&(r=[],a=!1),void 0!==s&&s<=n&&(a&&s>i?i=s:!a&&s>e&&(e=s)),h.addSize(t[0],r)}),r.defineSizeMapping(h.build())}e>=0&&e>i&&t.setAttribute("data-ad-size-map-hidden",!0),window.googletag.display(s),window.dfpAdSlots.push(r)})}}},{key:"getMediaQuery",value:function(){var t=window.getComputedStyle(document.querySelector("body"),"::before").getPropertyValue("content")||!1;return!!t&&t.replace(/["']/g,"")}},{key:"createResizeListener",value:function(){var t=this;window.addEventListener("resize",O(250,function(){t.getMediaQuery()!==t.currentMediaQuery&&(t.currentMediaQuery=t.getMediaQuery(),window.googletag.pubads().refresh())}))}}]),e}();function N(t,e){return N=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},N(t,e)}function V(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&N(t,e)}function z(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function H(t,i){if(i&&("object"===e(i)||"function"==typeof i))return i;if(void 0!==i)throw new TypeError("Derived constructors may only return object or undefined");return z(t)}function q(t){return q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},q(t)}function U(t,e,i){return U=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}
2()?Reflect.construct.bind():function(t,e,i){var n=[null];n.push.apply(n,e);var r=new(Function.bind.apply(t,n));return i&&N(r,i.prototype),r},U.apply(null,arguments)}function G(t){var e="function"==typeof Map?new Map:void 0;return G=function(t){if(null===t||(i=t,-1===Function.toString.call(i).indexOf("[native code]")))return t;var i;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return U(t,arguments,q(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),N(n,t)},G(t)}var j=function(t){var e=Math.floor(t/3600),i=Math.floor(t%3600/60),n=Math.floor(t%60),r="";return e>0&&(r+="".concat(e,":").concat(i<10?"0":"")),(r+="".concat(i,":").concat(n<10?"0":""))+"".concat(n)};var W=["timeupdate","loadedmetadata","ended","seeked","play","pause","volumechange"],$=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"connectedCallback",value:function(){this.player=this.querySelector("audio"),this.timeEl=this.querySelector(".HTML5AudioPlayer-time"),this.seekInput=this.querySelector('[data-change="seek"]'),this.progressEl=this.querySelector(".HTML5AudioPlayer-seekTrackProgress"),this.addEventListener("click",this),this.addEventListener("input",this),this.addEventListener("change",this),this.player.addEventListener("play",this),this.player.addEventListener("pause",this),this.player.addEventListener("loadedmetadata",this),this.player.addEventListener("timeupdate",this)}},{key:"handleEvent",value:function(t){t.target.matches('[data-click="togglePlayback"]')&&(this.player.paused?this.player.play():this.player.pause()),t.target.matches('[data-click="toggleMute"]')&&(this.player.muted=!this.player.muted),t.target.matches('[data-click="rewind"]')&&(this.player.currentTime=this.player.currentTime-30),t.target.matches('[data-click="forward"]')&&(this.player.currentTime=this.player.currentTime+30),"input"===t.type&&t.target.matches('[data-change="seek"]')&&(this.seeking=!0),"change"===t.type&&t.target.matches('[data-change="seek"]')&&(this.seeking=!1,this.player.currentTime=this.player.duration*t.target.value/100),W.indexOf(t.type)>=0&&this.render()}},{key:"playing",get:function(){return this.hasAttribute("playing")},set:function(t){t?this.setAttribute("playing",""):this.removeAttribute("playing")}},{key:"muted",get:function(){return this.hasAttribute("muted")},set:function(t){t?this.setAttribute("muted",""):this.removeAttribute("muted")}},{key:"render",value:function(){this.timeEl.innerHTML="".concat(j(this.player.currentTime)," / ").concat(j(this.player.duration)),this.muted=this.player.muted,this.playing=!this.player.paused,this.progressEl.style.width="".concat(this.player.currentTime/this.player.duration*100,"%"),this.seeking||(this.seekInput.value=this.player.currentTime/this.player.duration*100)}}]),a}(G(HTMLElement));var Y="ACTIVE",K="AffinityToggleButton:update",X=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"active",get:function(){return this.getAttribute("data-state")===Y}},{key:"state",get:function(){return this.getAttribute("data-state")},set:function(t){this.setAttribute("data-state",t)}},{key:"submitting",get:function(){return this.hasAttribute("submitting")}
2,set:function(t){t?this.setAttribute("submitting",""):this.removeAttribute("submitting")}},{key:"target",get:function(){return this.getAttribute("data-target")}},{key:"type",get:function(){return this.getAttribute("data-type")}},{key:"connectedCallback",value:function(){this.submitUrl=this.getAttribute("data-url"),this.authUrl=this.getAttribute("data-auth-url"),this.addEventListener("click",this),document.body.addEventListener(K,this),this.emit(K)}},{key:"createFormData",value:function(){var t=new FormData;return t.append("action",this.active?"REMOVE":"ADD"),t.append("target",this.target),t.append("type",this.type),t}},{key:"disconnectedCallback",value:function(){this.removeEventListener("click",this),document.body.addEventListener(K,this)}},{key:"hanldeClick",value:function(){this.submitting||this.submit()}},{key:"handleEvent",value:function(t){"click"===t.type&&this.hanldeClick(),t.type===K&&this.handleUpdateEvent(t)}},{key:"hanldeResponse",value:function(t){var e=(new DOMParser).parseFromString(t,"text/html").body.firstElementChild;this.parentNode.replaceChild(e,this)}},{key:"handleUpdateEvent",value:function(t){t.target!==this&&t.target.target===this.target&&t.target.type===this.type&&(this.state=t.target.active?Y:"")}},{key:"submit",value:function(){var t=this;this.submitting=!0,fetch(this.submitUrl,{method:"POST",credentials:"include",body:this.createFormData()}).then(function(t){if(200!==t.status)throw new Error(t.statusText);return t.text()}).then(function(e){t.hanldeResponse(e)}).catch(function(t){console.log(t)}).finally(function(){t.submitting=!1})}},{key:"emit",value:function(t){var e=new CustomEvent(t,{bubbles:!0});this.dispatchEvent(e)}}]),a}(G(HTMLElement));function J(){return J="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,i){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=q(t)););return t}(t,e);if(n){var r=Object.getOwnPropertyDescriptor(n,e);return r.get?r.get.call(arguments.length<3?t:i):r.value}},J.apply(this,arguments)}var Q=__webpack_require__(9473),Z=__webpack_require__.n(Q),tt=__webpack_require__(4330),et=__webpack_require__.n(tt);function it(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)}return i}function nt(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?it(Object(i),!0).forEach(function(e){s(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):it(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var rt={ready:"VideoPlayer:ready",timeUpdate:"VideoPlayer:timeUpdate",valoumeChange:"VideoPlayer:volumeChange",play:"VideoPlayer:play",playing:"VideoPlayer:playing",pause:"VideoPlayer:paused",volumeChange:"VideoPlayer:volumeChange",enterFullscreen:"VideoPlayer:enterFullscreen",exitFullscreen:"VideoPlayer:exitFullscreen",ended:"VideoPlayer:ended",error:"VideoPlayer:error",quartileCompleted:"VideoPlayer:quartileCompleted"},st={playingInterval:5,playbackPosition:0,quartilePosition:-1},at=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"connectedCallback",value:function(){this.intervals=nt({},st)}},{key:"videoId",get:function(){return this.getAttribute("video-id")}},{key:"videoTitle",get:function(){return this.getAttribute("video-title")}},{key:"playerId",get:function(){return this.getAttribute("player-id")}},{key:"autoplay",get:function(){return this.hasAttribute("autoplay")}},{key:"disableClickToPlay",get:function(){return this.hasAttribute("disable-click-to-play")}},{key:"muted",get:function(){return this.hasAttribute("muted")}},{key:"loop",get:function(){return this.hasAttribute("loop")}},{key:"poster",get:function(){return this.getAttribute("poster")}},{key:"video",get:function(){return{id:this.videoId,videoPlatform:this.platform,seekSeconds:this.seekSeconds,title:this.videoTitle,inPlaylist:document.querySelector("ps-playlist"),playListTagsosition:T(d
2ocument.querySelectorAll("ps-playlist-item")).findIndex(function(t){return t.isCurrent}),duration:this.duration,playerWidth:this.getPlayerWidth(),playerHeight:this.getPlayerHeight(),playerResolution:this.getPlayerResolution(),isAutoPlay:this.getIsAutoPlay(),startVolume:this.getStartVolume(),volume:this.getVolume(),isFullscreen:this.onVideoFullscreen(),videoUuid:this.getVideoUuid(),videoFileType:this.getVideoFileType(),videoInitiation:this.getAttribute("data-playback-started")||!1,credit:this.getCredit(),ownerSite:this.getOwnerSite(),videoClassification:this.getCategory(),source:this.getSource(),location:this.getDateline(),videoStatus:this.getVideoStatus(),quartile:this.getDisplayQuartile(this.intervals.quartilePosition)}}},{key:"init",value:function(){this.platform=this.getPlatformName()}},{key:"onReady",value:function(){this.emit(rt.ready)}},{key:"onPlay",value:function(){this.emit(rt.playing)}},{key:"onTimeUpdate",value:function(){this.sendVideoPlaybackIntervalEvents(),this.emit(rt.timeUpdate)}},{key:"onMute",value:function(){this.emit(rt.volumeChange)}},{key:"onPause",value:function(){this.emit(rt.pause)}},{key:"onEnded",value:function(){this.intervals=nt({},st),this.emit(rt.ended)}},{key:"onError",value:function(){this.emit(rt.error)}},{key:"onVolumneChange",value:function(){this.emit(rt.volumeChange)}},{key:"play",value:function(){}},{key:"pause",value:function(){}},{key:"playPause",value:function(){this.getAttribute("data-playback-paused")?this.play():this.pause()}},{key:"sendVideoPlaybackIntervalEvents",value:function(){if(this.duration&&0!==this.duration){for(var t=this.currentTime/this.duration*100;this.currentTime>this.intervals.playbackPosition+2*this.intervals.playingInterval;)this.intervals.playbackPosition+=this.intervals.playingInterval;if(this.currentTime>=this.intervals.playbackPosition+this.intervals.playingInterval){this.intervals.playbackPosition+=this.intervals.playingInterval;var e=new CustomEvent("Video:onVideoTimeIntervalUpdate",{bubbles:!0,detail:{playerId:this.playerId,videoPlatform:this.platform,video:this.video,secondsElapsed:this.currentTime}});this.dispatchEvent(e)}var i=null;if(t>=this.intervals.quartilePosition)if(-1===this.intervals.quartilePosition){if(t>=this.intervals.quartilePosition+25)for(this.intervals.quartilePosition=0;t>=this.intervals.quartilePosition;)this.intervals.quartilePosition+=25}else i=this.intervals.quartilePosition,this.intervals.quartilePosition+=25,100===this.intervals.quartilePosition&&(this.intervals.quartilePosition=95);null!==i&&(95===i&&(i=100),this.emit(rt.quartileCompleted,{quartile:i}))}}},{key:"getDisplayQuartile",value:function(t){return-1===t?0:50===t?25:75===t?50:95===t?75:100}},{key:"getCategory",value:function(){}},{key:"getCredit",value:function(){}},{key:"getDateline",value:function(){}},{key:"getIsAutoPlay",value:function(){}},{key:"getOwnerSite",value:function(){}},{key:"getPlatformName",value:function(){}},{key:"getPlayerHeight",value:function(){}},{key:"getPlayerWidth",value:function(){}},{key:"getPlayerResolution",value:function(){return this.getPlayerWidth()+" x "+this.getPlayerHeight()}},{key:"getPlayListTagsosition",value:function(t){for(var e=document.querySelector("[data-playlist]"),i=e.querySelectorAll(".PlaylistItem"),n=e.querySelector("[data-video-id='".concat(t,"']")),r=0;r<i.length;r++)if(n===i[r])return r}},{key:"getSource",value:function(){}},{key:"getVideoFileType",value:function(){}},{key:"getVideoStatus",value:function(){return this.getAttribute("data-playback-playing")?"Playing":this.getAttribute("data-playback-paused")?"Paused":this.getAttribute("data-playback-ended")?"Ended":null}},{key:"getVideoUuid",value:function(){}},{key:"getVolume",value:function(){}},{key:"getStartVolume",value:function(){}},{key:"onVideoFullscreen",value:function(){}},{key:"onEnterFullScreen",value:function(){this.emit(rt.enterFullscreen)}},{key:"onExitFullscreen",value:function(){this.emit(rt.exitFullscreen)}},{key:"emit",value:function(t){var e=new CustomEvent(t,{bubbles:!0,detail:arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}});this.dispatchEvent(e)}}]),a}(G(HTMLElement));var ot=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(e){var i;return t(this,a),(i=s.call(this,e)).node=e,i}
2return r(a,[{key:"connectedCallback",value:function(){this.classList.add("CompanionTooltip"),this.appendChild(this.node.companionItem.cloneNode(!0)),this.updatePosition(),this.node.player.addEventListener(rt.enterFullscreen,this),this.node.player.addEventListener(rt.exitFullscreen,this),this.node.player.addEventListener(rt.ready,this)}},{key:"handleEvent",value:function(t){var e=this;[rt.enterFullscreen,rt.exitFullscreen,rt.ready].indexOf(t.type)>=0&&requestAnimationFrame(function(){e.updatePosition()})}},{key:"updatePosition",value:function(){var t=this.node.parentElement.clientWidth,e=this.node.position,i=240/t*100,n=e-i/2<0,r=e+i/2>100;this.style.removeProperty("right"),this.style.removeProperty("left");var s=document.createElementNS("http://www.w3.org/2000/svg","svg"),a=document.createElementNS("http://www.w3.org/2000/svg","path");a.setAttributeNS(null,"stroke","var(--borderColor)"),s.classList.add("CompanionTooltip-tail"),s.appendChild(a),this.appendChild(s),n?(this.style.left="7px",s.setAttribute("width",12),s.setAttribute("viewBox","0 0 12 12"),a.setAttributeNS(null,"d","M 0 0 L 0 12 L 12 0"),this.alignment="left"):r?(this.style.right="7px",s.setAttribute("width",12),s.setAttribute("viewBox","0 0 12 12"),a.setAttributeNS(null,"d","M 0 0 L 12 12 L 12 0"),this.alignment="right"):(this.style.left="-112px",s.setAttribute("width",24),s.setAttribute("viewBox","0 0 24 12"),a.setAttributeNS(null,"d","M 0 0 L 12 12 L 24 0"),this.alignment="center")}},{key:"alignment",get:function(){this.hasAttribute("alignment")},set:function(t){this.setAttribute("alignment",t)}}]),a}(G(HTMLElement));customElements.get("companion-tooltip")||customElements.define("companion-tooltip",ot);var lt=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(e,i){var n;t(this,a),(n=s.call(this,e,i)).companionItem=e,n.player=i;var r=1e3*n.player.duration;return n.position=n.companionItem.timestamp/r*100,n}return r(a,[{key:"connectedCallback",value:function(){this.companionTooltip=new ot(this),this.appendChild(this.companionTooltip),this.style.left="".concat(this.position,"%");var t=document.createElementNS("http://www.w3.org/2000/svg","svg"),e=document.createElementNS("http://www.w3.org/2000/svg","circle");t.appendChild(e),t.setAttribute("viewBox","0 0 16 16"),e.setAttributeNS(null,"cx",8),e.setAttributeNS(null,"cy",8),e.setAttributeNS(null,"r",6),e.setAttributeNS(null,"stroke","white"),e.setAttributeNS(null,"stroke-width","4"),this.appendChild(t)}},{key:"active",get:function(){return this.hasAttribute("active")},set:function(t){t?this.setAttribute("active",""):this.removeAttribute("active")}}]),a}(G(HTMLElement));customElements.get("companion-node")||customElements.define("companion-node",lt);var ht={play:"VideoPlayerControls:play",rewind:"VideoPlayerControls:rewind",forward:"VideoPlayerControls:forward",seek:"VideoPlayerControls:seek",togglePlayback:"VideoPlayerControls:togglePlayback",toggleMute:"VideoPlayerControls:toggleMute",toggleFullscreen:"VideoPlayerControls:toggleFullscreen"},ct=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"connectedCallback",value:function(){var t=this;this.addEventListener("click",this.clickHandler),this.addEventListener("input",this.inputkHandler),this.addEventListener("change",this.changeHandler),this.player.addEventListener(rt.timeUpdate,function(){t.update(
2)}),this.player.addEventListener(rt.ready,function(){t.ready=!0,t.update()}),this.player.addEventListener(rt.playing,function(){t.resetControlsTimeout(),t.update()}),this.player.addEventListener(rt.pause,function(){t.update()}),this.player.addEventListener(rt.volumeChange,function(){t.update()}),this.player.addEventListener(rt.enterFullscreen,function(){t.update()}),this.player.addEventListener(rt.exitFullscreen,function(){t.update()}),this.player.addEventListener("mousemove",function(){t.hideControls=!1,t.resetControlsTimeout()})}},{key:"createCompanionNodes",value:function(){var t=this;if(this.player.duration&&!this.companionNodes){this.companionNodes=[],this.showCompanionNodes=this.querySelector('[name="companion-toggle"]').checked;var e=this.querySelector(".VideoPlayerControls-seekControls");document.querySelectorAll("ps-playlist-item[is-current] ps-companion-content-item").forEach(function(i){var n=new lt(i,t.player);e.appendChild(n),t.companionNodes.push(n)}),this.companionNodes.length>0&&(this.withCompanion=!0)}}},{key:"setCompanionNodesState",value:function(){var t=this;if(this.companionNodes){this.companionNodes.forEach(function(t){t.companionItem.active=!1});var e=this.companionNodes.filter(function(e){return 1e3*t.player.currentTime>e.companionItem.timestamp});if(e.forEach(function(t){t.companionItem.active=!1,t.active=!1}),e.length>0){var i=e.reduce(function(t,e){return t.companionItem.timestamp>e.companionItem.timestamp?t:e});i&&(i.companionItem.active=!0,i.active=!0)}}}},{key:"clickHandler",value:function(t){this.hideControls=!1,this.resetControlsTimeout(),t.target.matches("[data-click]")&&(t.stopImmediatePropagation(),this.emit(ht[t.target.dataset.click]))}},{key:"inputkHandler",value:function(t){t.target.matches('[data-change="seek"]')&&(this.disableSeekUpdates=!0)}},{key:"changeHandler",value:function(t){var e=t.target;e.matches('[data-change="seek"]')&&(this.disableSeekUpdates=!1,this.emit(ht.seek,{currentTime:this.player.duration/100*event.target.value})),e.matches('[name="companion-toggle"]')&&(this.showCompanionNodes=e.checked)}},{key:"resetControlsTimeout",value:function(){var t=this;this.controlsTimeout&&clearTimeout(this.controlsTimeout),this.controlsTimeout=setTimeout(function(){t.hideControls=!0,t.controlsTimeout=null},2e3)}},{key:"disconnectedCallback",value:function(){this.addEventListener("click",this.clickHandler)}},{key:"player",get:function(){return this.closest("[data-video-player]")}},{key:"progress",get:function(){return this.player.currentTime/this.player.duration*100||0}},{key:"playing",get:function(){return this.hasAttribute("playing")},set:function(t){t?this.setAttribute("playing",""):this.removeAttribute("playing")}},{key:"hideControls",get:function(){return this.hasAttribute("hide-controls")},set:function(t){t?this.setAttribute("hide-controls",""):this.removeAttribute("hide-controls")}},{key:"muted",get:function(){return this.hasAttribute("muted")},set:function(t){t?this.setAttribute("muted",""):this.removeAttribute("muted")}},{key:"showCompanionNodes",get:function(){return this.hasAttribute("show-companion-nodes")},set:function(t){t?this.setAttribute("show-companion-nodes",""):this.removeAttribute("show-companion-nodes")}},{key:"interactive",get:function(){return this.hasAttribute("interactive")},set:function(t){t?this.setAttribute("interactive",""):this.removeAttribute("interactive")}},{key:"fullscreen",get:function(){return this.hasAttribute("fullscreen")},set:function(t){t?this.setAttribute("fullscreen",""):this.removeAttribute("fullscreen")}},{key:"ready",get:function(){return this.hasAttribute("ready")},set:function(t){t?this.setAttribute("ready",""):this.removeAttribute("ready")}},{key:"withCompanion",get:function(){return this.hasAttribute("with-companion")},set:function(t){t?this.setAttribute("with-companion",""):this.removeAttribute("with-companion")}},{key:"emit",value:function(t){var e=new CustomEvent(t,{bubbles:!0,detail:arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}});this.dispatchEvent(e)}},{key:"update",value:function(){this.createCompanionNodes(),this.setCompanionNodesState(),this.playing=this.player.playing,this.muted=this.player.muted,this.fullscreen=this.player.fullscreen,this.querySelector(".VideoPlayerControls-seekTrackProgress").style.width="".concat(this.progress,"%"),this.querySelector(".VideoPlayerControls-time").innerText="".concat(j(this.player.currentTime)," / ").concat(j(this.player.duration)),this.disableSeekUpdates||(this.querySelector(".VideoPlayerControls-seekControl
2s input[type=range").value=this.progress),(this.player.playing||this.player.currentTime>0)&&(this.interactive=!0)}}]),a}(G(HTMLElement));var ut=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"connectedCallback",value:function(){var t=this;this.plyr||(J(q(a.prototype),"connectedCallback",this).call(this),this.plyr=new(et())(this.plyrContainerElement,{muted:this.muted,autoplay:this.autoplay,controls:this.querySelector("video-player-controls"),poster:this.poster,loop:{active:this.loop},clickToPlay:!this.disableClickToPlay,fullscreen:{enabled:!0,fallback:!0,iosNative:!0}}),setTimeout(function(){t.plyr.poster=t.poster}),this.addEventListener(ht.togglePlayback,function(){t.plyr.togglePlay()}),this.addEventListener(ht.toggleMute,function(){t.plyr.muted=!t.plyr.muted}),this.addEventListener(ht.rewind,function(){t.plyr.rewind(5)}),this.addEventListener(ht.forward,function(){t.plyr.forward(5)}),this.addEventListener(ht.toggleFullscreen,function(){t.plyr.fullscreen.toggle()}),this.addEventListener(ht.seek,function(e){t.plyr.currentTime=e.detail.currentTime}),this.addEventListener(ht.play,function(e){t.plyr.play()}),this.plyr.once("ready",function(){return t.onReady()}),this.plyr.on("timeupdate",function(){return t.onTimeUpdate()}),this.plyr.on("volumechange",function(){return t.onVolumneChange()}),this.plyr.on("enterfullscreen",function(){return t.onEnterFullScreen()}),this.plyr.on("exitfullscreen",function(){return t.onExitFullscreen()}),this.plyr.on("playing",function(){return t.onPlay()}),this.plyr.on("pause",function(){return t.onPause()}),this.plyr.on("ended",function(){return t.onEnded()}),this.plyr.on("error",function(){return t.onError()}))}},{key:"disconnectedCallback",value:function(){this.state={currentTime:this.currentTime,muted:this.muted,playing:this.playing}}},{key:"play",value:function(){this.plyr.play()}},{key:"pause",value:function(){this.plyr.pause()}},{key:"plyrContainerElement",get:function(){return this.querySelector("video")}},{key:"currentTime",get:function(){return this.plyr.currentTime}},{key:"duration",get:function(){return this.plyr.duration}},{key:"playing",get:function(){return this.plyr.playing}},{key:"fullscreen",get:function(){return this.plyr.fullscreen.active}},{key:"muted",get:function(){return this.plyr?this.plyr.muted:this.hasAttribute("muted")}}]),a}(at);var dt=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"connectedCallback",value:function(){if(!this.plyr){var t;try{var e=this.getAttribute("player-snippet");(t=(new DOMParser).parseFromString(e,"text/html").querySelector("video")).setAttribute("playsinline","")}catch(t){console.log("Video is unavailable")}if(t){var i=this.querySelector("video");if(i.parentElement.replaceChild(t,i),t.canPlayType("application/vnd.apple.mpegurl"))t.src=t.dataset.hlsUrl;else{if(!Z().isSupported())return;var n=new(Z());n.loadSource(t.dataset.hlsUrl),n.attachMedia(t)}J(q(a.prototype),"connectedCallback",this).call(this)}}}}]),a}(ut);var ft=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}
2return r(a,[{key:"connectedCallback",value:function(){this.closeButton=this.querySelector("[data-toggle-trigger]"),this.checkSessionStorage()}},{key:"checkSessionStorage",value:function(){var t=this;"noShow"!==sessionStorage.getItem("bannerStatus")&&(this.setAttribute("data-show",""),this.closeButton.addEventListener("click",function(){t.removeAttribute("data-show"),sessionStorage.setItem("bannerStatus","noShow")}))}}]),a}(G(HTMLElement));var pt=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"connectedCallback",value:function(){this.closeButton=this.querySelector("[data-toggle-trigger]"),this.checkSessionStorage()}},{key:"checkSessionStorage",value:function(){var t=this;"noShow"!==sessionStorage.getItem("globalBannerStatus")&&(this.setAttribute("data-show",""),this.closeButton.addEventListener("click",function(){t.removeAttribute("data-show"),sessionStorage.setItem("globalBannerStatus","noShow")}))}}]),a}(G(HTMLElement)),mt=__webpack_require__(9261),gt=__webpack_require__.n(mt),yt=r(function e(i){t(this,e),gt()(i,{clamp:i.dataset.byuiClamp||3})});var vt="CompanionContentViewer:close",bt="CompanionContentViewer:open",St="CompanionContentViewer:toggle",Et=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(e){var i;return t(this,a),(i=s.call(this,e)).url=e,i}return r(a,[{key:"connectedCallback",value:function(){this.load(),this.addEventListener("click",this)}},{key:"attributeChangedCallback",value:function(t){"expanded"===t&&this.emit(St)}},{key:"handleEvent",value:function(t){"click"===t.type&&(t.target.matches('[data-click="close"]')&&this.emit(vt),t.target.matches('[data-click="toggle"]')&&(this.expanded=!this.expanded))}},{key:"expanded",get:function(){return this.hasAttribute("expanded")},set:function(t){t?this.setAttribute("expanded",""):this.removeAttribute("expanded")}},{key:"load",value:function(){var t=this;this.classList.add("CompanionContentViewer"),this.innerHTML=this.template;var e=document.createElement("iframe");e.style.border="none",e.style.height="100%",e.style.width="100%";var i=this.querySelector(".CompanionContentViewer-body");e.src=this.url,i.appendChild(e),this.emit(bt),e.addEventListener("load",function(){var i=e.contentDocument.querySelector("#iconsMap"),n=e.contentDocument.querySelector("[data-companion-content]");e.contentDocument.body.innerHTML="",e.contentDocument.body.append(i),e.contentDocument.body.append(n),e.contentDocument.body.classList.add("CompanionContentViewerBody"),t.setAttribute("ready",""),t.emit("CompanionContentViewer:ready"),e.contentDocument.addEventListener("click",function(t){if(t.target.closest("a")&&t.target.href){var e=t.target.getAttribute("target");"_self"!==e&&e||(t.preventDefault(),window.location=t.target.href)}})})}},{key:"template",get:function(){return'\n <div class="CompanionContentViewer-header">\n <button class="CompanionContentViewer-toggle" data-click="toggle">\n <span class="CompanionContentViewer-expand">\n <svg>\n <use xlink:href="#icon-24-chevron-left"></use>\n </svg>\n Expand\n </span>\n <span class="CompanionContentViewer-collapse">\n <svg>\n <use xlink:href="#icon-24-chevron-right"></use>\n </svg>\n Collapse\n </span>\n </button>\n <button class="CompanionContentViewer-close" data-click="close">\n Close\n <svg>\n <use xlink:href="#icon-24-times"></use>\n </svg>\n </button>\n </div>\n <svg class="CompanionContentViewer-spinner">\n <use xlink:href="#icon-spinner"></use>\n </svg>\n <div class="CompanionContentViewer-body">\n </div>\n '.trim()}},{key:"emit",value:function(t){var e=new CustomEvent(t,{bubbles:!0});this.dispatchEvent(e)}}],[{key:"observedAttributes",get:function(){return["expanded"]}}]),a}(G(HTMLElement));customElements.get("companion-content-viewer")||customElements.define("companion-content-viewer",Et);var kt=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}
2return r(a,[{key:"connectedCallback",value:function(){this.addEventListener("click",this.clickHandler),this.querySelector(".CompanionContentItem-timestamp").innerHTML=j(this.timestamp/1e3)}},{key:"clickHandler",value:function(t){var e=t.target.href,i=this.closest(".VideoPage-playlist");if(e&&i){t.preventDefault();var n=new Et(e);return i.appendChild(n),document.body.dispatchEvent(new Event("Ajax:Rendered")),void n.addEventListener(vt,function(){n.parentElement.removeChild(n)})}e&&(t.preventDefault(),window.open(e,"_blank"))}},{key:"timestamp",get:function(){return+this.getAttribute("timestamp")}},{key:"active",get:function(){return this.hasAttribute("active")},set:function(t){t?this.setAttribute("active",""):this.removeAttribute("active")}}]),a}(G(HTMLElement));var xt=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"expanded",get:function(){return this.hasAttribute("expanded")},set:function(t){t?this.setAttribute("expanded",""):this.removeAttribute("expanded")}},{key:"paginationLink",get:function(){return this.querySelector("a[data-pagination]")}},{key:"headerEl",get:function(){return this.querySelector(".Commenting-header")}},{key:"connectedCallback",value:function(){this.addEventListener("submit",this),this.addEventListener("click",this)}},{key:"handleEvent",value:function(t){"submit"===t.type&&this.submit(t),"click"===t.type&&this.handleClick(t)}},{key:"handleClick",value:function(t){t.target===this.paginationLink&&(t.preventDefault(),this.paginate()),(t.target===this.headerEl||this.headerEl.contains(t.target))&&(this.expanded=!this.expanded)}},{key:"paginate",value:function(){var t=this,e=T(this.querySelectorAll(".Comment")),i=new URL(this.paginationLink.href),n=new URLSearchParams(i.search);n.set("offset",e.length),i.search=n.toString(),fetch(i).then(function(t){return t.text()}).then(function(e){var i=T((new DOMParser).parseFromString(e,"text/html").querySelectorAll(".Comment"));if(i.forEach(function(e){t.querySelector(".Commenting-comments").appendChild(e)}),i.length<1){var n=t.querySelector(".Commenting-pagination");n.parentElement.removeChild(n)}if(i.length<1){var r=document.createElement("div");r.innerText=t.dataset.noMoreComments,t.querySelector(".Commenting-comments").appendChild(r)}}).catch(function(t){console.log(t)})}},{key:"submit",value:function(t){var e=this;t.preventDefault();var i=t.target;fetch(i.action,{method:i.method,body:new FormData(i)}).then(function(t){if(200!==t.status)throw new Error(t.statusText);return t.text()}).then(function(t){i.reset(),e.hanldeResponse(t)}).catch(function(t){console.log(t)}).finally(function(){e.submitting=!1})}},{key:"hanldeResponse",value:function(t){var e=(new DOMParser).parseFromString(t,"text/html").body.firstElementChild;this.querySelector(".Commenting-comments").prepend(e);var i=this.querySelector(".Commenting-noCommentsMessage");i&&i.parentElement.removeChild(i)}}]),a}(G(HTMLElement));var wt=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"connectedCallback",value:function(){this.el=this,this.init()}},{key:"init",value:function(){var t=this;this.el.addEventListener("click",function(e){t.el.getAttribute("dropdown-open")&&"false"!==t.el.getAttribute("dropdown-open").toString()?t.hideAllDropdowns():(t.hideAllDropdowns(),t.toggleDropdownItems("show"))}),this.el.setAttribute("listener-active",!0),document.addEventListener("click",function(e){var i,n=e.path||e.composedPath&&e.composedPath(),r=!1;for(i=0;i<n.length;i++){var s=n[i];s.classList&&-1!==s.classList.toString().indexOf("CustomDropdown")&&(r=!0)}r||t.hideAllDropdowns()})}},{key:"toggleDropdownItems",value:function(t){var e="show"===t;this.el.setAttribute("dropdown-open",e)}},{key:"hideAllDropdowns",value:function(){this.toggleDropdownItems("hide")}}]),a}(G(HTMLElement)),_t=__webpack_require__(2522),Ct=__webpack_require__.n(_t);function Tt(){var t=/iPad|iPhone|iPod/.test(window.navigator.userAgent)&&!window.MSStream;if(this.flickity&&t&&!this.carouselScrollingIOSHackSet){this.carouselScrollingIOSHackSet=!0;var e=0;this.el.ontouchstart=function(t){e=t.touches[0].clientX},this.el.ontouchmove=function(t){Math.abs(t.touches[0].clientX-e)>5&&t.cancelable&&t.preventDefault()}}}function At(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)}return i}function Pt(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};
2e%2?At(Object(i),!0).forEach(function(e){s(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):At(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}var Dt={adaptiveHeight:!1,imagesLoaded:!0,cellAlign:"left",selectedAttraction:.15,friction:.9,dragThreshold:10},Mt={mobile:["mq-xs","mq-sm","mq-md"],desktop:["mq-lg","mq-hk","mq-xl"]},Lt=function(){function e(i){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{flickity:{},breakpoints:{}};t(this,e),this.el=i;var r=Pt(Pt({},Dt),n.flickity.default);this.options={flickity:{default:r,mobile:Pt(Pt({},r),n.flickity.mobile),desktop:Pt(Pt({},r),n.flickity.desktop)},breakpoints:Pt(Pt({},Mt),n.breakpoints)},this.init()}return r(e,[{key:"init",value:function(){var t=this;this.carousel=this.el.querySelector(e.selectors.slides),this.mobileDisable=this.carousel.getAttribute(e.selectors.mobileDisabled);try{this.desktopDisable=this.carousel.getAttribute(e.selectors.desktopDisabled)}catch(t){return}this.carouselItems.forEach(function(e){return e.addEventListener("load",t.resizeCarousel)}),"complete"===document.readyState?this.handleWindowLoad():window.addEventListener("load",function(){return t.handleWindowLoad()}),window.addEventListener("resize",O(250,function(){t.handleOptions(),t.rebuildCarouselIfChanged()})),this.el.addEventListener("click",function(e){var i=e.target;t.flickity&&i.matches('[data-click="next"]')&&t.flickity.next(),t.flickity&&i.matches('[data-click="previous"]')&&t.flickity.previous()})}},{key:"setTabIndexing",value:function(){this.flickity.cells.forEach(function(t){t.element&&("true"===t.element.getAttribute("aria-hidden")?t.element.setAttribute("tabindex","-1"):t.element.setAttribute("tabindex","0"))})}},{key:"handleCellSelect",value:function(){var t=this;this.setTabIndexing(),this.updateCounter(),this.el.querySelectorAll('[data-click="previous"]').forEach(function(e){if(!t.flickityOptions.wrapAround){var i=t.flickity.selectedIndex-1;e.disabled=!t.flickity.cells[i]}}),this.el.querySelectorAll('[data-click="next"]').forEach(function(e){if(!t.flickityOptions.wrapAround){var i=t.flickity.selectedIndex+1;e.disabled=!t.flickity.cells[i]}})}},{key:"handleWindowLoad",value:function(){this.handleOptions(),this.initCarousel()}},{key:"updateCounter",value:function(){var t=this;this.el.querySelectorAll('[class$="-currentIndex"]').forEach(function(e){e.textContent=t.flickity.selectedIndex+1})}},{key:"getMediaQuery",value:function(){var t=window.getComputedStyle(document.querySelector("body"),"::before").getPropertyValue("content")||!1;return!!t&&t.replace(/["']/g,"")}},{key:"handleOptions",value:function(){this.didMQChange()?this.optionsChanged=!0:this.optionsChanged=!1}},{key:"didMQChange",value:function(){return this.changedBreakpoints=!1,"mq-xs"===this.getMediaQuery()&&"xs"!==this.breakpoint&&(this.changedBreakpoints=!0,this.breakpoint="xs",this.flickityOptions=this.options.flickity.mobile||this.options.flickity.default),"mq-sm"===this.getMediaQuery()&&"sm"!==this.breakpoint&&(this.changedBreakpoints=!0,this.breakpoint="sm",this.flickityOptions=this.options.flickity.mobile||this.options.flickity.default),"mq-md"===this.getMediaQuery()&&"md"!==this.breakpoint&&(this.changedBreakpoints=!0,this.breakpoint="md",this.flickityOptions=this.options.flickity.mobile||this.options.flickity.default),"mq-lg"===this.getMediaQuery()&&"lg"!==this.breakpoint&&(this.changedBreakpoints=!0,this.breakpoint="lg",this.flickityOptions=this.options.flickity.desktop||this.options.flickity.default),"mq-hk"===this.getMediaQuery()&&"hk"!==this.breakpoint&&(this.changedBreakpoints=!0,this.breakpoint="hk",this.flickityOptions=this.options.flickity.desktop||this.options.flickity.default),"mq-xl"===this.getMediaQuery()&&"xl"!==this.breakpoint&&(this.changedBreakpoints=!0,this.breakpoint="xl",this.flickityOptions=this.options.flickity.desktop||this.options.flickity.default),this.changedBreakpoints}},{key:"rebuildCarouselIfChanged",value:function(){this.optionsChanged&&(this.destroyCarousel(),this.initCarousel())}},{key:"destroyCarousel",value:function(){this.flickity&&(this.flickity.destroy(),this.el.removeAttribute("data-flickity-enabled"))}},{key:"resizeCarousel",value:function(){this.flickity.resize()}},{key:"carouselItems",get:function(){return T(this.el.querySelectorAll(e.selectors.slide)||[])}},{key:"initCarousel",value:function(){var t=this;this.flickity=new(Ct())(this.carousel,this.flickityOptions),this.el.setAttribute(e.selectors.carouselEnabled,""),this.flickity.on("cellSelect",function(){t.handleCellSelect()}),this.flickity.on("ready",function(){t.resizeCarousel()}),Tt.call(this)}}]),e}();
2s(Lt,"selectors",{slide:"[data-slide]",slides:"[data-slides]",flickityEnabled:".flickity-enabled",desktopDisabled:"data-disable-desktop",mobileDisabled:"data-disable-mobile",enhancement:"CarouselEnhancement",carouselEnabled:"data-flickity-enabled"});var Rt=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"fullscreen",get:function(){return this.hasAttribute("fullscreen")},set:function(t){t?this.setAttribute("fullscreen",""):this.removeAttribute("fullscreen")}},{key:"connectedCallback",value:function(){this.createCarousel(),this.registerEvents()}},{key:"createCarousel",value:function(){var t=this;this.carousel=new Lt(this,{flickity:{default:{lazyLoad:!0,pageDots:!1,wrapAround:!1,groupCells:!1,autoPlay:!1,prevNextButtons:!1,contain:!0,on:{staticClick:function(){t.onStaticClick()},change:function(e){t.onSlideChange(e)}}},desktop:{prevNextButtons:!1,pageDots:!1}}})}},{key:"disconnectedCallback",value:function(){this.carousel.destroyCarousel()}},{key:"enterFullscreen",value:function(){document.documentElement.style.setProperty("overflow","hidden"),this._placeholder=document.createElement("div"),this._placeholder.style.height="".concat(this.clientHeight,"px"),this.parentNode.insertBefore(this._placeholder,this),this.fullscreen=!0,this.carousel.destroyCarousel(),this.carousel.initCarousel()}},{key:"exitFullscreen",value:function(){document.documentElement.style.removeProperty("overflow"),this._placeholder&&(this.parentNode.removeChild(this._placeholder),delete this._placeholder),this.fullscreen=!1,this.carousel.destroyCarousel(),this.carousel.initCarousel()}},{key:"handleEvent",value:function(t){"keydown"===t.type&&"Escape"===t.key&&this.fullscreen&&this.exitFullscreen(),("click"===t.type&&this.fullscreen&&t.target.matches('[data-click="exit-fullscreen"]')||t.target.closest('[data-click="exit-fullscreen"]'))&&(this.exitFullscreen(),t.preventDefault())}},{key:"onStaticClick",value:function(){this.fullscreen||this.enterFullscreen()}},{key:"onSlideChange",value:function(t){var e=this.carousel.flickity.selectedSlide.cells[0].element.querySelector(".CarouselSlide-info").cloneNode(!0),i=this.querySelector(".EnhancementCarousel-info");i.innerHTML="",i.appendChild(e),this.preloadImage(t+1)}},{key:"registerEvents",value:function(){window.addEventListener("keydown",this),this.addEventListener("click",this)}},{key:"preloadImage",value:function(t){var e;try{e=this.carousel.flickity.cells[t].element}catch(t){}e&&e.querySelectorAll('[data-lazy-load="true"]').forEach(function(t){t.dataset.src&&(t.src=t.dataset.src,t.removeAttribute("data-src")),t.dataset.srcset&&(t.srcset=t.dataset.srcset,t.removeAttribute("data-srcset")),t.removeAttribute("data-lazy-load")})}}]),a}(G(HTMLElement));var It=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"error",get:function(){return this.hasAttribute("has-error")},set:function(t){t?this.setAttribute("has-error",""):this.removeAttribute("has-error")}},{key:"errorMessage",get:function(){return this.querySelector('[class*="-errors"]')},set:function(t){var e=this.querySelector('[class*="-errors"]');e&&(e.innerText=t)}},{key:"input",get:function(){return this.querySelector("input")}},{key:"bindEvents",value:function(){this.addEventListener("focusout",this),this.addEventListener("change",this)}},{key:"connectedCallback",value:function(){this.bindEvents()}},{key:"handleEvent",value:function(t){["focusout","change"].includes(t.type)&&this.validate()}},{key:"validate",value:function(){var t=this.input.validity;if(t.valid)return this.errorMessage="",void(this.error=!1);for(var e in t)if(t[e])return this.errorMessage=this.dataset[e],void(this.error=!0)}}]),a}(G(HTMLElement));var Ft=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"input",get:function(){}},{key:"captcha",get:function(){return this.querySelector("ps-google-captcha")}},{key:"valid",get:function(){return this.captcha.valid}},{key:"validate",value:function(){this.error=!this.valid}}]),a}(It);var Ot=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a)}(It);var Bt=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}
2return r(a,[{key:"connectedCallback",value:function(){var t=this;J(q(a.prototype),"connectedCallback",this).call(this),this.button.addEventListener("click",function(){t.input.click()}),this.addEventListener("change",function(){t.files=t.input.files;var e=t.files.map(function(t){return"".concat(t.name)}).join(", ");t.querySelector(".FileInput-fileList").innerText=e||t.dataset.noFileChosen})}},{key:"files",get:function(){return this._files},set:function(t){this._files=Array.from(t),this.hasFiles=!!this._files}},{key:"hasFiles",get:function(){return this.hasAttribute("has-files")},set:function(t){t?this.setAttribute("has-files",""):this.removeAttribute("has-files")}},{key:"button",get:function(){return this.querySelector("button")}}]),a}(It);var Nt=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"formId",get:function(){return this.getAttribute("data-form-id")}},{key:"form",get:function(){return this.querySelector("form")}},{key:"captcha",get:function(){return this.querySelector("ps-captcha-input")}},{key:"submitsInline",get:function(){return this.hasAttribute("submits-inline")}},{key:"submitting",get:function(){return this.hasAttribute("submitting")},set:function(t){t?this.setAttribute("submitting",""):this.removeAttribute("submitting")}},{key:"connectedCallback",value:function(){this.addEventListener("submit",this),this.form.setAttribute("novalidate","")}},{key:"handleEvent",value:function(t){if("submit"===t.type){if(t.preventDefault(),this.submitting)return;if(!this.isValid())return;this.submitForm()}}},{key:"isValid",value:function(){return!(T(this.form.elements).find(function(t){return!t.validity.valid})||this.captcha&&!this.captcha.valid)}},{key:"submitForm",value:function(){this.submitting=!0,this.submitsInline?this.submitInline():this.form.submit()}},{key:"submitInline",value:function(){var t=this,e=this.form.getAttribute("action")||"",i=this.form.getAttribute("method")||"POST",n=new FormData(this.form);fetch(e,{credentials:"include",method:i,body:n}).then(function(t){return t.text()}).then(function(e){return t.handleSubmitResponse(e)}).catch(function(t){console.log("Form Error: "+t)}).finally(function(){t.submitting=!1})}},{key:"handleSubmitResponse",value:function(t){var e=(new DOMParser).parseFromString(t,"text/html").documentElement.querySelector('[data-form-id="'.concat(this.formId,'"]'));this.parentElement.replaceChild(e,this),window.scrollTo({top:0,behavior:"smooth"})}}]),a}(G(HTMLElement));var Vt="https://www.google.com/recaptcha/api.js?onload=onGrecaptchaLoadCallback&render=explicit",zt="grecaptcha:ready";window.onGrecaptchaLoadCallback=function(){document.body.dispatchEvent(new Event(zt))};var Ht=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"connectedCallback",value:function(){this.load()}},{key:"sitekey",get:function(){return this.dataset.sitekey}},{key:"valid",get:function(){return!!window.grecaptcha&&!!window.grecaptcha.getResponse()}},{key:"load",value:function(){var t=this;if(!T(document.querySelectorAll("script")).find(function(t){return t.src===Vt})){var e=document.createElement("script");e.setAttribute("src",Vt),document.querySelector("head").appendChild(e)}window.grecaptcha?this.render():document.body.addEventListener(zt,function(){return t.render()})}},{key:"render",value:function(){var t=document.createElement("div");this.appendChild(t),window.grecaptcha.render(t,{sitekey:this.sitekey})}}]),a}(G(HTMLElement));var qt=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a)}(It);var Ut=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a)}(It);var Gt=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"input",get:function(){return this.querySelector("select")}}]),a}(It);var jt=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a)}(It);var Wt=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"input",get:function(){return this.querySelector("textarea")}}]),a}(It);function $t(t){var e=t.getBoundingClientRect(),i=Math.max(document.documentElement.clientHeight,window.innerHeight);return!(e.bottom<0||e.top-i>=0)}var Yt=function(){V(s,window.HTMLElement);var e,i,n=(e=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,n=q(e);if(i){var r=q(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return H(this,t)});function s(){return t(this,s),n.apply(this,arguments)}
2return r(s,[{key:"connectedCallback",value:function(){var t=this;this.items=this.querySelectorAll("[data-fade]"),this.onInteraction=function(){return t.activate()},window.addEventListener("scroll",O(50,this.onInteraction)),window.addEventListener("resize",O(50,this.onInteraction)),this.activate()}},{key:"activate",value:function(){function t(t){t.addEventListener("animationend",function(){t.getAttribute("data-animation-ended")||t.setAttribute("data-animation-ended","true")})}this.items.forEach(function(e){if($t(e)){var i=e.getAttribute("data-fade"),n=e.getAttribute("data-transition");switch(i){case"left":e.style.animation="fadeLeft 1s",n&&(e.style.animationDelay=n/3+"s"),t(e);break;case"right":e.style.animation="fadeRight 1s",n&&(e.style.animationDelay=n/3+"s");break;case"up":e.style.animation="fadeUp 1s",n&&(e.style.animationDelay=n/3+"s");break;case"bigUp":e.style.animation="fadeBigUp 1s",t(e);break;case"bounce":e.style.animation="bounce 1s";break;case"rightParent":e.addEventListener("animationend",function(){var t=e.querySelectorAll("[data-fade-child]");if(t)for(var i=0;i<t.length;i++)t[i].style.animation="fadeUp 1s",t[i].style.animationDelay=i/3+"s",t[i].style.animationFillMode="forwards"}),e.style.animation="fadeRight 1s";break;case"imgSlideRight":e.style.animation="imgSlideRight 1s"}e.style.animationFillMode="forwards",e.classList.contains("VideoGraphicModule-graphics")&&function(t){var e=t.getElementsByClassName("VideoGraphicModule-graphics-graphic"),i=function(){var t,e=document.createElement("fakeelement"),i={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"animationend",WebkitAnimation:"webkitAnimationEnd"};for(t in i)if(void 0!==e.style[t])return i[t]}();if(e)for(var n=0;n<e.length;n++)if(n===e.length-1){var r=e[n];i&&r.addEventListener(i,function(){t.setAttribute("modal-animation-done","")})}}(e)}})}}]),s}();var Kt=function(){V(s,window.HTMLElement);var e,i,n=(e=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,n=q(e);if(i){var r=q(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return H(this,t)});function s(){return t(this,s),n.apply(this,arguments)}return r(s,[{key:"connectedCallback",value:function(){var t=this;this.items=this.querySelectorAll("[data-fade-gallery]"),this.onInteraction=function(){return t.activate()},window.addEventListener("scroll",O(50,this.onInteraction)),window.addEventListener("resize",O(50,this.onInteraction)),this.activate()}},{key:"activate",value:function(){this.items.forEach(function(t){if($t(t)){var e=t.querySelectorAll("[data-fade-galleryChild]");e[0].style.animation="fadeLeft 1s",e[0].style.animationDelay="0s",e[0].style.animationFillMode="forwards",e[1].style.animation="fadeRight 1s",e[1].style.animationDelay=1/3+"s",e[1].style.animationFillMode="forwards",e[2].style.animation="fadeLeft 1s",e[2].style.animationDelay=2/3+"s",e[2].style.animationFillMode="forwards",e[3].style.animation="fadeRight 1s",e[3].style.animationDelay="1s",e[3].style.animationFillMode="forwards"}})}}]),s}(),Xt=__webpack_require__(7115);var Jt="playing",Qt="pause",Zt="paused",te="playing",ee={autoplay:!1,muted:!1,seekSeconds:0};var ie=function(e){V(o,e);var i,n,a=(i=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function o(e){var i;return t(this,o),s(z(i=a.call(this,e)),"uiConfId",null),s(z(i),"entryId",null),s(z(i),"partnerId",null),s(z(i),"dfpUrl",null),s(z(i),"player",null),i}return r(o,[{key:"videoDuration",get:function(){return this.player.evaluate("{duration}")}},{key:"init",value:function(){var t=this,e=this,i=document.querySelector(".KalturaVideoLead"),n=document.querySelector(".VideoLeadBackgroun
2d"),r=document.querySelector(".VideoLeadPoster"),s=document.querySelector(".VideoLead");this.selectors=Object.assign(this.selectors,{targetId:"KalturaVideoPlayer-%id%"});var a=document.querySelector(".videoPlayButton"),l=document.querySelector("[data-player-target]");if(a&&a.addEventListener("click",function(){t.play(),l.classList.add("isPlaying")}),this.entryId=this.el.getAttribute("data-entry-id"),this.uiConfId=this.el.getAttribute("data-ui-conf-id"),this.partnerId=this.el.getAttribute("data-partner-id"),"undefined"!=typeof kWidget){var h=this.playerId,c={targetId:this.selectors.targetId.replace("%id%",h),uiconf_id:this.uiConfId,entry_id:this.entryId,wid:"_"+this.partnerId,readyCallback:function(e){var n=document.getElementById(e);t.player=n,n.kBind("playerStateChange.".concat(h),function(e){"loading"===e&&(t.state="waiting")}),n.kBind("AdSupport_StartAdPlayback.".concat(h),function(){t.state="playing"}),n.kBind("mediaLoaded.".concat(h),function(){t.onMediaReady()}),n.kBind("firstPlay.".concat(h),function(){t.onMediaStart()}),n.kBind("playerPlayed.".concat(h),function(){if(t.onMediaPlaying(),i){var e=i.querySelector(".KalturaVideoLead-content");e&&(e.style.display="none")}}),n.kBind("playerPlayEnd.".concat(h),function(){t.onMediaEnded()}),n.kBind("mute.".concat(h),function(){t.onPlayerMute()}),n.kBind("unmute.".concat(h),function(){t.onPlayerUnMute()}),n.kBind("playerPaused.".concat(h),function(){t.onPlayerPause()}),n.kBind("playerUpdatePlayhead.".concat(h),function(e){t.onMediaTimeUpdate(e)})},flashvars:{autoPlay:!1,autoMute:this.settings.muted,"mediaProxy.mediaPlayFrom":this.settings.seekSeconds}};this.settings.dfpUrl&&(c.flashvars.doubleClick={adTagUrl:this.settings.dfpUrl,leadWithFlash:"false"}),u(),window.addEventListener("resize",function(t){u()}),kWidget.embed(c),J(q(o.prototype),"init",this).call(this)}else console.error("ERROR: Kaltura SDK not loaded");function u(){if(i){var t=e.el.offsetHeight;i.style.height=t+"px"}if(n){var a=e.el.offsetHeight;n.style.height=a+"px"}if(r){var o=e.el.offsetHeight;r.style.height=o+"px"}if(s){var l=e.el.offsetHeight;s.style.height=l+"px"}}}},{key:"loadVideo",value:function(){this.player.sendNotification("changeMedia",{entryId:this.entryId,partnerId:this.partnerId})}},{key:"onPlayerMute",value:function(){this.onVideoMute()}},{key:"onPlayerUnMute",value:function(){this.onVideoUnMute()}},{key:"onPlayerPause",value:function(){this.settings.paused=!0,this.onVideoPause()}},{key:"onMediaReady",value:function(){this.onVideoReady()}},{key:"onMediaStart",value:function(){J(q(o.prototype),"onVideoStart",this).call(this)}},{key:"onMediaPlaying",value:function(){this.settings.paused&&(this.settings.paused=!1,this.onVideoUnPause())}},{key:"onMediaEnded",value:function(){this.onVideoEnd()}},{key:"onMediaTimeUpdate",value:function(t){this.onVideoTimeUpdate({secondsElapsed:t})}},{key:"play",value:function(){this.player.sendNotification("doPlay")}},{key:"pause",value:function(){this.player.sendNotification("doPause")}}]),o}(function(e){V(o,e);var i,n,a=(i=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function o(e){var i;return t(this,o),s(z(i=a.call(this)),"selectors",{blockName:"videoPlayer",externalControlBlock:"data-contains-embedded-video",externalControlPlayPause:"data-contains-embedded-video-trigger"}),s(z(i),"metrics",{playbackPosition:0,quartilePosition:-1}),i.el=e,i.elExternalControl=e.closest("[".concat(i.selectors.externalControlBlock,"]")),i.settings=Object.assign({},ee,{playerId:i.el.getAttribute("data-player-id"),videoId:i.el.getAttribute("data-video-id"),videoTitle:i.el.getAttribute("data-video-title"),autoplay:i.el.getAttribute("data-autoplay"),loop:i.el.getAttribute("data-loop"),muted:i.el.getAttribute("data-muted"),seekSeconds:i.el.getAttribute("data-vseek-seconds"),dfpUrl:i.el.getAttribute("data-dfp-url")}),i.init(),i}return r(o,[{key:"videoData",get:function(){return{id:this.videoId,title:this.settings.videoTitle,duration:this.videoDuration}}},{key:"eventState",get:function(){return{instance:this,video:this.videoData,playerId:this.playerId}}},{key:"videoDuration",get:function(){return-1}},{key:"playerId",get:function(){return this.settings.playerId}},{key:"videoId",get:function(){return this.settings.videoId}},{key:"videoTitle",get:function(){return this.settings.videoTitle}},{key:"state",get:function(){return this._state},set:function(t){return t!==this._state&&(this._state=t,this.el.setAttribute("data-videoplayerstate",t),this.elExternalControl&&this.elExternalControl.setAttribute(this.selectors.externalControlBlock,t)),this._state}},{key:"init",value:function(){this.setBinds()}},{key:"setBinds",value:function(){var t=this;this.elExternalControl&&this.elExternalControl.querySelector("[".concat(this.selectors.externalControlPlayPause,"]")).addEventListener("click",function(){t.playPause()})}},{key:"onVideoBuffering",value:function(){this.state="waiting",this.emitSync("waiting",this.eventState)}},{key:"onVideoReady",value:function(){this.state="ready",this.emitSync("ready",this.eventState)}},{key:"onVideoStart",value:function(t){this.resetMetrics(),this.state=te,this.emitSync(Jt,this.eventState)}},{key:"onVideoTimeUpdate",value:function(t){var e=t.secondsElapsed;this.emitSync("timeupdate",Object.assign({secondsElapseds:e},this.eventState)),this.sendVideoPlaybackMetricEvents(e)}},{key:"onVideoStop",value:function(){this.state=Zt,this.emitSync(Qt,this.eventState)}},{key:"onVideoMute",value:function(){this.el.setAttribute("data-muted",""),this.emitSync("muted",this.eventState)}},{key:"onVideoUnMute",value:function(){this.el.removeAttribute("data-muted"),this.emitSync("unmuted",this.eventState)}},{key:"onVideoPause",value:function(){this.state=Zt,this.emitSync(Qt,this.eventState)}},{key:"onVideoUnPause",value:function(){this.state=te,this.emitSync(Jt,this.eventState)}},{key:"onVideoEnd",value:function(t){this.state="ended",this.emitSync("ended",this.eventState)}},{key:"play",value:function(){}},{key:"pause",value:function(){}},{key:"playPause",value:function(){this.state===te?this.pause():this.play()}},{key:"resetMetrics",value:function(){this.metrics={playbackPosition:0,quartilePosition:-1}}},{key:"sendVideoPlaybackMetricEvents",value:function(t){for(var e=t/this.videoDuration*100;t>this.metrics.playbackPosition+10;)this.metrics.playbackPosition+=5;t>=this.metrics.playbackPosition+5&&(this.metrics.playbackPosition+=5,this.emitSync("timeintervalupdate",Object.assign({secondsElapsed:this.metrics.playbackPosition},this.eventState)));var i=null;if(e>=this.metrics.quartilePosition)if(-1===this.metrics.quartilePosition){if(e>=this.metrics.quartilePosition+25)for(this.metrics.quartilePosition=0;e>=this.metrics.quartilePosition;)this.metrics.quartilePosition+=25}else i=this.metrics.quartilePosition,this.metrics.quartilePosition+=25,100===this.metrics.quartilePosition&&(this.metrics.quartilePosition=95);null!==i&&(95===i&&(i=100),this.emitSync("videoquartilecompleted",Object.assign({secondsElapsed:this.metrics.playbackPosition,quartile:i},this.eventState)))}}],[{key:"genUniqueId",value:function(){var t=Math.floor(1e6*Math.random());return"_video_player_".concat(t)}}]),o}(__webpack_require__.n(Xt)()));var ne=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"randomSlideIndicator",get:function(){return this.getAttribute("data-random-slide")}},{key:"connectedCallback",value:function(){this.carouselSlides=this.querySelector(".Carousel-slides"),"true"===this.randomSlideIndicator?(this.randomNumber=Math.floor(Math.random()*this.carouselSlides.children.length),this.handleOptions(this.randomNumber)):(this.randomNumber=0,this.handleOptions(this.randomNumber))}},{key:"handleOptions",value:function(t){this.carousel=new Lt(this,{flickity:{default:{initialIndex:t,lazyLoad:!0,pageDots:!0,wrapAround:!1,groupCells:!1,autoPlay:!1,prevNextButtons:!1,contain:!0}}})}},{key:"disconnectedCallback",value:function(){this.carousel.destroyCarousel()}}]),a}(G(HTMLElement)),re=__webpack_require__(5839),se=__webpack_require__.n(re);function ae(){se().Cell.prototype.renderPosition=function(t){var e=this.parent.originSide;this.element.style[e]=this.parent.getPositionValue(t)}}var oe={mobile:["mq-xs","mq-sm","mq-md"],desktop:["mq-lg","mq-hk","mq-xl"]};function le(){var t=window.getComputedStyle(document.body,"::before").getPropertyValue("content")||!1;return t?t.replace(/["']/g,""):"false"}var he=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){var e;return t(this,a),e=s.call(this),ae(),e}
2return r(a,[{key:"connectedCallback",value:function(){var t=this;this.cacheElements(),window.addEventListener("load",function(){t.initCarousel()})}},{key:"cacheElements",value:function(){this.carouselText=this.querySelector("[data-text-container]"),this.carouselGallery=this.querySelector("[data-gallery-container]"),this.isAutoplay=this.getAttribute("data-autoplay"),this.autoplaySpeed=this.getAttribute("data-autoplay-speed")}},{key:"initCarousel",value:function(){var t=this;this.handleOptions(),this.flickity=new(se())(this.carouselText,this.textOptions),this.flickityNav=new(se())(this.carouselGallery,this.galleryOptions),this.setAttribute("data-flickity-enabled","true"),this.handleSlideChange(),this.carouselGallery.addEventListener("mouseenter",function(){t.querySelectorAll(".is-selected [data-progress]").forEach(function(t){t.style.animationPlayState="paused"})}),this.carouselGallery.addEventListener("mouseleave",function(){t.querySelectorAll("[data-progress]").forEach(function(t){t.style.animationPlayState="running"})})}},{key:"handleOptions",value:function(){var t=1e3*this.autoplaySpeed;this.galleryOptions={adaptiveHeight:!0,wrapAround:!0,lazyLoad:!0,pageDots:!1,prevNextButtons:!1,cellAlign:"left",autoPlay:t,pauseAutoPlayOnHover:!0},oe.mobile.includes(le())&&(this.galleryOptions.cellAlign="center",this.galleryOptions.wrapAround=!0),this.textOptions={pageDots:!1,draggable:!1,groupCells:!1,adaptiveHeight:!1,prevNextButtons:!1,contain:!0,asNavFor:this.carouselGallery}}},{key:"handleSlideChange",value:function(){this.flickity.on("change",function(){})}},{key:"disconnectedCallback",value:function(){this.carousel.destroyCarousel()}}]),a}(G(HTMLElement));var ce=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"connectedCallback",value:function(){var t=this;this.cacheElements(),window.addEventListener("load",function(){t.initCarousel()})}},{key:"cacheElements",value:function(){this.carousel=this.querySelector(".ListCarouselD-promo"),this.carouselNav=this.querySelector(".ListCarouselD-nav")}},{key:"initCarousel",value:function(){this.flickity=new Lt(this,{flickity:{default:{adaptiveHeight:!0,wrapAround:!0,lazyLoad:!0,pageDots:!0,prevNextButtons:!0,cellAlign:"center"},desktop:{cellAlign:"left",pageDots:!1}}}),this.flickityNav=new(se())(this.carouselNav,{pageDots:!1,draggable:!1,groupCells:!1,adaptiveHeight:!1,prevNextButtons:!1,contain:!0,asNavFor:this.carousel})}}]),a}(G(HTMLElement));var ue=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){var e;return t(this,a),e=s.call(this),ae(),e}return r(a,[{key:"connectedCallback",value:function(){var t=this;this.cacheElements(),window.addEventListener("load",function(){t.initCarousel()})}},{key:"cacheElements",value:function(){this.carouselText=this.querySelector(".ListCarouselF-text"),this.carouselGallery=this.querySelector(".ListCarouselF-gallery"),this.customButtonGroup=this.querySelector(".FlickityCustomNavigation"),this.previousButton=this.customButtonGroup.querySelector(".FlickityCustomNavigation-button-prev"),this.nextButton=this.customButtonGroup.querySelector(".FlickityCustomNavigation-button-next")}},{key:"initCarousel",value:function(){this.handleOptions(),this.flickity=new(se())(this.carouselText,this.textOptions),this.flickityNav=new(se())(this.carouselGallery,this.galleryOptions),this.setAttribute("data-flickity-enabled","true"),this.setTabIndexing(),this.customButtons(),this.handleSlideChange()}},{key:"handleOptions",value:function(){this.galleryOptions={adaptiveHeight:!0,wrapAround:!0,pageDots:!1,prevNextButtons:!1,cellAlign:this.getMediaAlignment()},oe.mobile.includes(le())&&(this.galleryOptions.cellAlign="center"),this.textOptions={pageDots:!1,draggable:!1,groupCells:!1,adaptiveHeight:!0,prevNextButtons:!1,asNavFor:this.carouselGallery,wrapAround:!0}}},{key:"handleSlideChange",value:function(){var t=this;this.flickity.on("change",function(){t.setTabIndexing()})}},{key:"customButtons",value:function(){var t=this;this.previousButton.addEventListener("click",function(){t.flickityNav.previous()}),this.nextButton.addEventListener("click",function(){t.flickityNav.next()})}},{key:"setTabIndexing",value:function(){this.flickity.cells.forEac
2h(function(t){t.element&&("true"===t.element.getAttribute("aria-hidden")?t.element.setAttribute("tabindex","-1"):t.element.setAttribute("tabindex","0"))})}},{key:"destroyCarousel",value:function(){this.flickity&&(this.flickity.destroy(),this.removeAttribute("data-flickity-enabled"))}},{key:"resizeCarousel",value:function(){this.flickity.resize()}},{key:"getMediaAlignment",value:function(){return"left"===this.getAttribute("data-media-horizontal")?"right":"left"}},{key:"disconnectedCallback",value:function(){this.flickity.destroyCarousel()}}]),a}(G(HTMLElement));var de={selItems:"[data-list-loadmore-items]",selPagination:"[data-list-loadmore-pagination]"},fe="data-list-loadmore",pe=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"connectedCallback",value:function(t){this.el=this,this.settings=Object.assign({},de,t),this.el.setAttribute(fe,""),this.init()}},{key:"init",value:function(){this.elItems=this.el.querySelector(this.settings.selItems),this.setBinds()}},{key:"loadMore",value:function(t,e){var i=this,n=this,r=this.el.className,s=a.findClassNameMatches(document,r),o=Array.from(s).indexOf(this.el);this.el.setAttribute(fe,"loading"),window.fetch(t,{credentials:"include"}).then(function(t){return i.el.setAttribute(fe,""),t.text()}).then(function(t){var s=document.createElement("div");s.innerHTML=t;var l=a.findClassNameMatches(s,r),h=l[o].querySelector(n.settings.selItems),c=l[o].querySelector(n.settings.selPagination);"function"==typeof e?e(h,c,l[o]):i.render(h,c,n.elItems,n.elPagination)}).catch(function(t){console.log(t)})}},{key:"next",value:function(t){if(this.elPagination){var e=this.elPagination.querySelector("a");e&&this.loadMore(e.href,t)}}},{key:"setBinds",value:function(){var t=this;this.elPagination&&this.elPagination.addEventListener("click",function(e){var i=e.target;i.matches("a")?(e.preventDefault(),t.loadMore(i.href)):i.matches("button")&&t.loadMore(i.dataset.href)})}},{key:"elPagination",get:function(){return this.el.querySelector(this.settings.selPagination)}},{key:"render",value:function(t,e){t&&this.elItems.insertAdjacentHTML("beforeend",t.innerHTML),e?this.elPagination.innerHTML=e.innerHTML:this.elPagination.parentNode.removeChild(this.elPagination),this.dispatchRendered()}},{key:"dispatchRendered",value:function(){var t=new CustomEvent("Ajax:Rendered",{bubbles:!0});document.body.dispatchEvent(t)}}],[{key:"findClassNameMatches",value:function(t,e){return t.querySelectorAll("[class=".concat(e,"]"))}}]),a}(G(HTMLElement));var me=function(){V(s,window.HTMLElement);var e,i,n=(e=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,n=q(e);if(i){var r=q(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return H(this,t)});function s(){return t(this,s),n.apply(this,arguments)}return r(s,[{key:"connectedCallback",value:function(){var t=this;t.form=this.querySelector("form"),t.searchQuery=this.querySelector('input[name="q"]'),t.clearSearch=this.querySelector("button.clearSearch"),null!==this.clearSearch&&this.clearSearch.addEventListener("click",function(e){e.preventDefault(),t.searchQuery.value="",t.form.submit()})}}]),s}(),ge=__webpack_require__(3263),ye=__webpack_require__.n(ge),ve=__webpack_require__(867),be=__webpack_require__.n(ve);var Se=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}
2return r(a,[{key:"connectedCallback",value:function(){var t=this;window.addEventListener("load",function(){t.cacheElements(),t.dealWithSlideHover(),t.slideClickEvent();var e=parseInt(window.location.hash.slice(7));if(e>-1){var i=e-1;t.buildCarousel(i),t.flickity.on("change",function(e){t.handleSlideChange(e)})}})}},{key:"cacheElements",value:function(){this.galleryContent=this.querySelector(".GalleryPage-content"),this.galleryMainWrapper=this.querySelector(".GalleryPage-main"),this.galleryActions=this.querySelector(".GalleryPage-actions"),this.galleryCounter=this.querySelector('[class$="-numbers"]'),this.galleryMainSlide=this.querySelectorAll(".GallerySlide"),this.slide=".GalleryPage-items-item",this.carouselCount=this.querySelector('[class$="-currentIndex"]'),this.carouselNavigation=this.querySelector("#carouselNavigation").content.cloneNode(!0).querySelector("*"),this.slides=this.querySelectorAll(this.slide)}},{key:"buildGalleryAside",value:function(){this.galleryCarouselAside=document.createElement("aside"),this.galleryCarouselPagination=document.createElement("div"),this.galleryCarouselAside.setAttribute("class","GalleryPageCarousel-aside"),this.galleryCarouselPagination.setAttribute("class","GalleryPageCarousel-pagination"),this.galleryCarouselWrapper.appendChild(this.galleryCarouselAside),this.galleryCarouselAside.appendChild(this.galleryCarouselPagination)}},{key:"buildCarousel",value:function(t){var e=this;this.galleryCarouselWrapper=document.createElement("div"),this.gallerySlidesClone=document.createElement("div"),Array.from(this.querySelectorAll(this.slide)).forEac
2h(function(t,i){var n=document.createElement("div");n.setAttribute("class","GalleryPageCarousel-slide"),n.setAttribute("id","slide-"+(i+1)),e.gallerySlidesClone.setAttribute("class","GalleryPageCarousel-slides"),n.appendChild(t.querySelector(".GallerySlide").cloneNode(!0)),e.gallerySlidesClone.appendChild(n)}),this.galleryCarouselWrapper.insertAdjacentHTML("afterbegin",'<a href="#" class="GalleryPageCarousel-closeButton"><svg><use xlink:href="#icon-close-overlay-x"></use></svg></a>'),this.galleryCarouselWrapper.className="GalleryPageCarousel",this.galleryCarouselWrapper.appendChild(this.gallerySlidesClone);var i=this.galleryContent.hasAttribute("data-hidetitlefullview"),n=this.galleryContent.hasAttribute("data-hidecreditfullview"),r=this.galleryContent.hasAttribute("data-hidecaptionfullview");i&&this.galleryCarouselWrapper.setAttribute("data-hidetitlefullview","true"),n&&this.galleryCarouselWrapper.setAttribute("data-hidecreditfullview","true"),r&&this.galleryCarouselWrapper.setAttribute("data-hidecaptionfullview","true"),document.body.appendChild(this.galleryCarouselWrapper),document.body.classList.add("GalleryPageCarousel-enabled");var s,a=this.galleryCarouselWrapper.querySelector(".GalleryPageCarousel-slides");s=t>0?t:0,this.buildGalleryAside();var o={arrowShape:{x0:25,x1:60,y1:35,x2:65,y2:30,x3:35},adaptiveHeight:!1,hash:!0,imagesLoaded:!0,initialIndex:s,pageDots:!1,lazyLoad:2,prevNextButtons:!1};s>0&&this.setState("gallery"),this.flickity=new(be())(a,o),window.addEventListener("load",function(){e.flickity.resize()}),this.galleryCarouselWrapper.querySelector(".GalleryPageCarousel-closeButton").addEventListener("click",function(t){t.preventDefault(),e.destroyCarousel()}),this.galleryCarouselWrapper.addEventListener("click",this),document.addEventListener("keydown",function(t){("key"in t?"Escape"===t.key||"Esc"===t.key:27===t.keyCode)&&e.destroyCarousel()}),this.handleSlideChange(s),this.dispatchRendered()}},{key:"destroyCarousel",value:function(){var t=this;setTimeout(function(){t.flickity.destroy(),history.pushState("",document.title,window.location.pathname+window.location.search);var e=document.querySelector(".GalleryPageCarousel");e.parentNode.removeChild(e),document.body.classList.remove("GalleryPageCarousel-enabled")},0)}},{key:"handleEvent",value:function(t){("click"===t.type&&t.target.matches('[data-click="previous"')||t.target.closest('[data-click="previous"'))&&this.flickity.previous(),("click"===t.type&&t.target.matches('[data-click="next"')||t.target.closest('[data-click="next"'))&&this.flickity.next()}},{key:"handleSlideChange",value:function(t){var e=this.galleryActions,i=this.galleryCounter,n=this.querySelectorAll(".ActionLink"),r=this.querySelector(".GalleryPage-currentSlide"),s=this.flickity.selectedElement.querySelector(".GallerySlide-title"),a=this.flickity.selectedElement.querySelector(".GallerySlide-infoDescription"),o=this.flickity.selectedElement.querySelector(".GallerySlide-infoAttribution"),l=this.flickity.selectedElement.querySelector(".GallerySlide-media"),h=this.galleryCarouselWrapper.querySelector(".GalleryPageCarousel-aside");h.innerHTML="",r&&(r.innerHTML=t+1),i&&h&&(h.innerHTML+=i.outerHTML),s&&h&&(h.innerHTML+=s.outerHTML),a&&h&&(h.innerHTML+=a.outerHTML),o&&h&&(h.innerHTML+=o.outerHTML),h.innerHTML+=this.carouselNavigation.outerHTML,e&&h&&(h.innerHTML+=e.outerHTML),n&&n.forEach(function(t){var e=t.getAttribute("href");e&&(e=e.split("?")[1]),e&&(e.indexOf("#slide")>-1?t.setAttribute("href",t.getAttribute("href").replace(/#slide-\d+/,window.location.hash)):t.setAttribute("href",t.getAttribute("href").replace(window.location.pathname,window.location.pathname+window.location.hash)))}),document.body.dispatchEvent(new CustomEvent("Gallery:onSlideUpdate",{detail:{activeSlide:{indexs:t,title:s?s.getAttribute("data-info-title"):"",attribution:s?s.getAttribute("data-info-attribution"):"",bspId:l.getAttribute("data-image-bsp-id")}}})),this.preloadNextImage(t),this.setState("gallery")}},{key:"preloadNextImage",value:function(t){var e=t,i=null,n=null;e<=this.flickity.cells.length&&(i=this.flickity.cells[e].element)&&(n=i.querySelector('[data-lazy-load="true"]'))&&(n.dataset.src&&(n.src=n.dataset.src,n.removeAttribute("data-src"),n.removeAttribute("data-lazy-load")),n.dataset.srcset&&(n.srcset=n.dataset.srcset,n.removeAttribute("data-srcset"),n.removeAttribute("data-lazy-load")))}},{key:"dealWithSlideHover",value:function(){var t=this;this.galleryMainSlide.forEach(function(e){t.hoverListDner=ye()(e,function(){t.showGalleryIcon(e,"hover")},function(){t.hideGalleryIcon(e,"hover")})})}},{key:"dispatchRendered",value:function(){var t=new CustomEvent("Ajax:Rendered",{bubbles:!0});document.body.dispatchEvent(t)}},{key:"slideClickEvent",value:function(){var t=this;
2Array.from(this.slides).forEach(function(e,i){e.addEventListener("click",function(e){e.preventDefault(),t.buildCarousel(i),t.handleSlideChange(i),t.flickity.on("change",function(e){t.handleSlideChange(e)})})})}},{key:"showGalleryIcon",value:function(t,e){t&&(t.getAttribute("data-item-"+e)?t.removeAttribute("data-item-"+e):(this.galleryMainSlide.forEach(function(t){t.removeAttribute("data-item-"+e)}),t.setAttribute("data-item-"+e,!0)))}},{key:"hideGalleryIcon",value:function(t,e){t.removeAttribute("data-item-"+e)}},{key:"setState",value:function(t){this.setAttribute("data-state",t),"start"===this.getAttribute("data-state")&&this.removeAttribute("data-showing-aside")}}]),a}(G(HTMLElement));var Ee=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"connectedCallback",value:function(){this.fetchData()}},{key:"apiUrl",get:function(){return this.getAttribute("api-url")}},{key:"contentEl",get:function(){return this.querySelector(".GoogleCalendarModule-ajaxableContent")}},{key:"state",get:function(){return this.getAttribute("state")},set:function(t){this.setAttribute("state",t)}},{key:"fetchData",value:function(){var t=this;this.state="loading",fetch(this.apiUrl).then(function(t){if(200!==t.status)throw new Error(t.statusText);return t.text()}).then(function(e){t.afterFetch(e)}).catch(function(e){console.log("error: ",e),t.state="error"})}},{key:"afterFetch",value:function(t){this.state=null,this.contentEl.innerHTML=t}}]),a}(G(HTMLElement));var ke=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"connectedCallback",value:function(){J(q(a.prototype),"connectedCallback",this).call(this),this.adjustVideoLeadHeight();var t=this;window.addEventListener("resize",function(e){t.adjustVideoLeadHeight()}),this.setCaroReady(),this.setPlayAttribute()}},{key:"setCaroReady",value:function(){var t=this.closest(".ListVerticalVideoCarousel");t&&(this.videoPromo=this.closest(".VideoPromo"),this.meta=this.videoPromo.querySelector(".VideoPromo-player-meta"),t.setAttribute("data-ready","true"))}},{key:"setPlayAttribute",value:function(){var t=this,e=this.closest(".VideoPromo"),i=this.querySelector("video");e&&(i.addEventListener("play",function(){e.setAttribute("data-playing","true"),t.meta.setAttribute("data-playing","true")}),i.addEventListener("pause",function(){e.setAttribute("data-playing","false"),t.meta.removeAttribute("data-playing","true")}))}},{key:"playVideoOnClick",value:function(){var t=this.querySelector("video");t&&t.addEventListener("click",function(){t.paused?t.play():t.pause()})}},{key:"adjustVideoLeadHeight",value:function(){var t=document.querySelector(".VideoLeadBackground"),e=d
2ocument.querySelector(".KalturaVideoLead"),i=document.querySelector(".VideoLeadPoster"),n=document.querySelector(".VideoLead"),r=window.innerWidth,s=320;r>1024?s=640:r>768&&(s=500),t&&(t.style.height=s+"px"),e&&(e.style.height=s+"px"),i&&(i.style.height=s+"px"),n&&(n.style.height=s+"px")}}]),a}(ut),xe=function(){function e(){var i=this;if(t(this,e),"IntersectionObserver"in window)return this.modernBrowsers(),void document.body.addEventListener("Ajax:Rendered",function(){i.modernBrowsers()});this.oldskool(),document.body.addEventListener("Ajax:Rendered",function(){i.oldskool()})}return r(e,[{key:"applySrc",value:function(t){t.dataset.src&&(t.src=t.dataset.src,t.removeAttribute("data-src")),t.dataset.srcset&&(t.srcset=t.dataset.srcset,t.removeAttribute("data-srcset")),t.removeAttribute("data-lazy-load")}},{key:"loadImage",value:function(t){var e=this,i=t.closest("picture");i&&i.querySelectorAll("[data-src], [data-srcset]").forEach(function(t){return e.applySrc(t)}),i||this.applySrc(t)}},{key:"modernBrowsers",value:function(){var t=this,e=[].slice.call(document.querySelectorAll("img[data-lazy-load]")),i={rootMargin:"".concat(window.innerWidth,"px ").concat(window.innerHeight,"px")},n=new IntersectionObserver(function(e){e.forEach(function(e){if(e.isIntersecting){var i=e.target;t.loadImage(i),n.unobserve(i)}})},i);e.forEach(function(t){n.observe(t)})}},{key:"oldskool",value:function(){var t=this,e=!1,i=[].slice.call(document.querySelectorAll("img[data-lazy-load]")),n=function n(){!1===e&&(e=!0,setTimeout(function(){i.forEach(function(e){var r=e.getBoundingClientRect();r.top<=2*window.innerHeight&&r.bottom>=-window.innerHeight&&"none"!==window.getComputedStyle(e).display&&(t.loadImage(e),0===(i=i.filter(function(t){return t!==e})).length&&(document.removeEventListener("scroll",n),window.removeEventListener("resize",n),window.removeEventListener("orientationchange",n)))}),e=!1},200))};document.addEventListener("scroll",n,!0),window.addEventListener("resize",n),window.addEventListener("orientationchange",n),n()}}]),e}();function we(t,e,i,n,r,s,a){try{var o=t[s](a),l=o.value}catch(t){return void i(t)}o.done?e(l):Promise.resolve(l).then(n,r)}function _e(t){return function(){var e=this,i=arguments;return new Promise(function(n,r){var s=t.apply(e,i);function a(t){we(s,n,r,a,o,"next",t)}function o(t){we(s,n,r,a,o,"throw",t)}a(void 0)})}}var Ce=__webpack_require__(4756),Te=__webpack_require__.n(Ce);var Ae=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"connectedCallback",value:function(){var t=this;this.createOrUpdate(),document.addEventListener(Pe.updated,function(){return t.createOrUpdate()})}},{key:"createOrUpdate",value:function(){this.posts=T(document.body.querySelectorAll(".LiveBlogPost")).map(function(t){return{timestamp:+t.getAttribute("data-timestamp"),id:t.querySelector("a[id]").id,date:t.querySelector(".LiveBlogPost-date").innerText.trim(),time:t.querySelector(".LiveBlogPost-time").innerText.trim(),headline:t.querySelector(".LiveBlogPost-headline").innerText.trim()}}),this.render()}},{key:"render",value:function(){var t=this.posts.reduce(function(t,e){return t[e.date]||(t[e.date]=[]),t[e.date].push(e),t},{}),e=Object.keys(t).map(function(e){return{dates:e,posts:t[e]}});this.postsEl.innerHTML=e.map(function(t){return'\n <div class="LiveBlogFeed-date">\n '.concat(t.date,'\n </div>\n <div class="LiveBlogFeed-posts">\n ').concat(t.posts.map(function(t){return'<div class="LiveBlogFeed-post">\n <a href="#'.concat(t.id,'" class="LiveBlogFeed-post-time">\n ').concat(t.time,'\n </a>\n <a href="#').concat(t.id,'" class="LiveBlogFeed-post-headline">\n ').concat(t.headline,"\n </a>\n </div>")}).join(""),"\n </div>")}).join("")}},{key:"postsEl",get:function(){return this.querySelector(".LiveBlogFeed-posts")}
2}]),a}(G(HTMLElement));var Pe={updated:"LiveBlogPosts.updated"},De=function(e){V(o,e);var i,n,s,a=(n=o,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(n);if(s){var i=q(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return H(this,t)});function o(){return t(this,o),a.apply(this,arguments)}return r(o,[{key:"live",get:function(){return this.hasAttribute("live")}},{key:"connectedCallback",value:function(){var t=this;customElements.define("ps-live-blog-feed",Ae),this.live&&setInterval(function(){t.getNewPosts()},15e3)}},{key:"getNewPosts",value:(i=_e(Te().mark(function t(){var e,i,n,r,s,a,o=this;return Te().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,fetch(window.location.href).then(function(t){return t.text()});case 3:e=t.sent,t.next=9;break;case 6:return t.prev=6,t.t0=t.catch(0),t.abrupt("return",console.error("Error getting new posts",t.t0));case 9:i=new DOMParser,n=i.parseFromString(e,"text/html"),r=T(n.querySelectorAll(".LiveBlogPost")),s=T(this.querySelectorAll(".LiveBlogPost")),(a=r.filter(function(t){return!s.find(function(e){return+t.dataset.timestamp===+e.dataset.timestamp})})).reverse().forEach(function(t){o.prepend(t)}),a&&this.emit(Pe.updated);case 16:case"end":return t.stop()}},t,this,[[0,6]])})),function(){return i.apply(this,arguments)})},{key:"emit",value:function(t){var e=new CustomEvent(t,{bubbles:!0,detail:arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}});this.dispatchEvent(e)}}]),o}(G(HTMLElement)),Me=__webpack_require__(9891),Le=__webpack_require__.n(Me);var Re=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"connectedCallback",value:function(){this.hasAttribute("data-loop-frame")&&(this.frameLoop=parseInt(this.getAttribute("data-loop-frame"))),this.hasAttribute("data-trigger-frames")&&(this.segmentTriggers=JSON.parse(this.getAttribute("data-trigger-frames"))),this.hasAttribute("data-animation-path")&&(this.animationPath=this.getAttribute("data-animation-path"),window.addEventListener("resize",this),this.initOrDestroy())}},{key:"handleEvent",value:function(t){"resize"===t.type&&this.initOrDestroy()}},{key:"initOrDestroy",value:function(){"none"!==window.getComputedStyle(this).display?this.init():this.destroy()}},{key:"destroy",value:function(){this.anim&&(this.anim.destroy(),delete this.anim)}},{key:"init",value:function(){var t=this;if(!this.anim){this.anim=Le().loadAnimation({container:this,renderer:"svg",loop:!1,autoplay:!1,path:this.animationPath}),this.anim.addEventListener("data_ready",function(e){for(var i=[t.anim.animationData.ip].concat(T(t.segmentTriggers),[t.anim.animationData.op+1]),n=0;n<i.length-1;n++){var r=i[n],s=i[n+1]-1;i[n]=[r,s]}i.pop(),t.anim.playSegments(i,!0)});var e=0;this.anim.addEventListener("segmentStart",function(i){t.segmentTriggers.indexOf(i.firstFrame)>-1&&t.setAttribute("data-trigger-"+ ++e,"")}),this.frameLoop&&this.anim.addEventListener("complete",function(e){t.anim.playSegments([t.frameLoop,t.anim.animationData.op],!0)})}}}]),a}(G(HTMLElement));var Ie=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}
2return r(a,[{key:"connectedCallback",value:function(){if(this.dismissible){var t=document.createElementNS("http://www.w3.org/2000/svg","svg"),e=document.createElementNS("http://www.w3.org/2000/svg","use");e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href","#close-x"),t.appendChild(e),this.dismissButton=document.createElement("button"),this.dismissButton.appendChild(t),this.appendChild(this.dismissButton)}this.addEventListener("click",this)}},{key:"handleEvent",value:function(t){"click"===t.type&&t.target.matches("button")&&this.parentNode.removeChild(this)}},{key:"dismissible",get:function(){return this.hasAttribute("dismissible")}}]),a}(G(HTMLElement));var Fe=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"connectedCallback",value:function(){this.dealWithMenuHover(),this.handleEventListeners(),this.closeDropdownsOnFocusOut(),this.setBurgerTabIndex(),this.setFocusWhenBurgerMenuOpen(),oe.desktop.includes(le())&&this.checkClickTarget(),new MutationObserver(function(t){}).observe(document.body,{attributes:!0,attributeFilter:["data-sticky-nav"]})}},{key:"navigationButton",get:function(){return this.querySelectorAll(a.selectors.buttonSelector)}},{key:"navigationItems",get:function(){return this.querySelectorAll(a.selectors.navigationItem)}},{key:"dealWithMenuHover",value:function(){var t=this;if(window.innerWidth>1024){var e={timeout:100,interval:0};this.navigationItems.forEach(function(i){t.hoverListener=ye()(i,function(){return t.openNavItem(i)},function(){return t.closeNavItem(i)}).options(e)})}}},{key:"handleEventListeners",value:function(){var t=this;addEventListener("resize",O(250,function(e){oe.desktop.includes(le())?(t.checkClickTarget(),t.navigationItems&&t.navigationItems.forEach(function(e){e.querySelector(a.selectors.moreSelector)&&t.closeNavItem(e)})):t.removeClickTarget(),t.setBurgerTabIndex()})),this.navigationItems&&this.navigationItems.forEach(function(e){e.querySelector(a.selectors.moreSelector)&&e.querySelector(a.selectors.moreSelector).addEventListener("click",function(i){t.openNavItem(e)})}),this.navigationButton&&this.navigationButton.forEach(function(t){t.closest(".Navigation-items-item").setAttribute("data-nav-buton","true")})}},{key:"getContentWidth",value:function(){var t=this.querySelector(".Navigation-items-container"),e=getComputedStyle(t);return t.clientWidth-parseFloat(e.paddingLeft)-parseFloat(e.paddingRight)}},{key:"openNavItem",value:function(t){if(t){if(t.parentNode.closest(a.selectors.navigationItem)){if(!t.hasAttribute("data-item-active"))return void t.setAttribute("data-item-active","");t.removeAttribute("data-item-active")}if(t.hasAttribute("data-item-active"))t.removeAttribute("data-item-active");else{for(var e=0;e<this.navigationItems.length;e++)this.navigationItems[e].removeAttribute("data-item-active");t.setAttribute("data-item-active",""),this.adjustSubNavPosition(t)}}}},{key:"closeNavItem",value:function(t){t.removeAttribute("data-item-active");var e=t.querySelector(".NavigationItem-items-container");e&&(e.style.left=0)}},{key:"checkClickTarget",value:function(){document.addEventListener("click",this.event)}},{key:"removeClickTarget",value:function(){this.event&&document.removeEventListener("click",this.event)&&document.removeEventListener("click",this.event)}},{key:"adjustSubNavPosition",value:function(t){var e=t.querySelector(".NavigationItem-items-container");if(e){var i=t.getBoundingClientRect().width,n=-1*(e.getBoundingClientRect().width/2-i/2),r=e.getBoundingClientRect().right-document.body.getBoundingClientRect().right+n+40,s=document.body.getBoundingClientRect().left-e.getBoundingClientRect().left-n+40;r>0&&(n+=-1*r),s>0&&(n+=s),e.style.left="".concat(n,"px"),e.style.setProperty("--tail-offset-left","".concat(i/2-n-17,"px"))}}},{key:"closeDropdownsOnFocusOut",value:function(){var t=this.parentNode;if(this.classList.contains("Navigation")&&t.classList.contains("Page-header-navigation-items"))for(var e=this.querySelectorAll(".desktop-symbol"),i=function(t){e[t].addEventListener("keydown",function(i){if("Enter"===i.key){var n=e[t].closest(".NavigationItem");n.addEventListener("focusout",function(t){n.contains(t.relatedTarget)||n.removeAttribute("data-item-active")})}})},n=0;n<e.length;n++)i(n)}},{key:"setBurgerTabIndex",value:function(){if(this.classList.contains("Navigation")){var t=this.parentNode;if(t.classList.contains("Page-header-hamburger-secondaryNav")){var e=document.querySelector(".Page-header-menu.mobileView .Page-header-menu-trigger"),i=t.querySelectorAll(".NavigationItem-text-link");if(window.innerWidth<=1024)for(var n=0;n<i.length;n++)e.tabIndex=0,i[n].tabIndex=0;else for(var r=0;r<i.length;r++)e.tabIndex=-1,i[r].tabIndex=-1}}}},{key:"setFocusWhenBurgerMenuOpen",value:function(){var t=this.parentNode;if(this.classList.contains("Navigation")&&t.classList.contains("Page-header-hamburger-secondaryNav")){var e=document.querySelector(".Page-header-menu.mobileView .Page-header-menu-trigger"),i=this.querySelector(".Navigation-items"),n=this.querySelectorAll(".NavigationItem-text-link"),r=this.querySelectorAll(".mobile-symbol");e.addEventListener("keydown",function(t){if("Enter"===t.key){i.focus(),setTimeout(function(){n&&n[0].focus()},500);var e=document.querySelector(".Page-header"),r=document.querySelector(".Page-header-hamburger-menu");r.addEventListener("focusout",function(t){r.contains(t.relatedTarget)||(e.removeAttribute("data-toggle-header"),document.body.removeAttribute("data-toggle-header"))})}});for(var s=function(t){r[t].addEventListener("keydown",function(e){if("Enter"===e.key){var i=r[t].closest(".NavigationItem");i.addEventListener("focusout",function(t){i.contains(t.relatedTarget)||i.removeAttribute("data-item-active")})}})},a=0;a<r.length;a++)s(a)}}},{key:"closeBurgerMenuOnFocusOut",value:function(){var t=document.querySelector(".Page-header"),e=this.querySelector(".Navigation-items");e.addEventListener("focusin",function(i){e.contains(i.relatedTarget)||t.removeAttribute('data-toggle-header="hamburger-menu"')})}}]),a}(G(HTMLElement));s(Fe,"selectors",{navigationItem:".NavigationItem",moreSelector:".NavigationItem-text.withSubNav",buttonSelector:".NavigationItem-button"});var Oe=__webpack_require__(6994),Be=__webpack_require__.n(Oe);var Ne=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}
2return r(a,[{key:"connectedCallback",value:function(){this.gridItems=this.querySelector(a.selectors.gridItems),this.gridImages=this.gridItems.querySelectorAll("img"),this.gridItem=a.selectors.gridItem,this.gridGutter=a.attributes.gutter,this.gridSizer=a.selectors.gridSizer,this.gridEnabled=a.selectors.gridEnabled,this.buildMasonryList()}},{key:"buildMasonryList",value:function(){var t=this,e=new(Be())(this.gridItems,{horizontalOrder:!0,itemSelector:this.gridItem,columnWidth:this.gridSizer,gutter:this.gridGutter,percentPosition:!0});this.gridImages.forEach(function(t){t.addEventListener("load",function(t){e.layout()})}),e.once("layoutComplete",function(e){t.setAttribute(t.gridEnabled,"true")}),window.addEventListener("resize",O(250,function(){e.layout()}))}}]),a}(G(HTMLElement));s(Ne,"attributes",{item:"[data-item]",items:"[data-items]",sizer:"[data-masonry-sizer]",gutter:"[data-masonry-gutter]",enabled:"data-masonry-enabled"}),s(Ne,"selectors",{gridItem:Ne.attributes.item,gridItems:Ne.attributes.items,gridSizer:Ne.attributes.sizer,gridGutter:Ne.attributes.gutter,gridEnabled:Ne.attributes.enabled});var Ve=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"headerStyle",get:function(){return this.getAttribute("data-header-style")}},{key:"sticky",get:function(){return this.hasAttribute("data-sticky-header")}},{key:"stuck",get:function(){return this.hasAttribute("data-stuck")},set:function(t){t?this.setAttribute("data-stuck",""):this.removeAttribute("data-stuck")}},{key:"hat",get:function(){return this.querySelector(".Page-hat")}},{key:"connectedCallback",value:function(){this.cacheElements(),this.handleEventListeners()}},{key:"cacheElements",value:function(){this.menuButton=this.querySelector(a.selectors.menuButton),this.globalNavButton=this.querySelector(a.selectors.globalNavButton),this.hamburgerMenu=this.querySelector(a.selectors.hamburgerMenu),this.headerBar=document.querySelector(a.selectors.headerBar),this.menuWrapper=this.querySelector(a.selectors.menuWrapper),this.menuWrapper=this.querySelector(a.selectors.menuWrapper),this.mainLink=this.querySelector(a.selectors.mainLink),this.returnLink=this.querySelector(a.selectors.returnLink),this.event=this.setClickTarget.bind(this)}},{key:"handleEvent",value:function(t){"load"===t.type&&this.setState(),"resize"===t.type&&this.setBodyOffset(),"scroll"===t.type&&this.resizeHeaderOnScroll()}},{key:"handleEventListeners",value:function(){var t=this;"tall-to-short"===this.headerStyle&&window.addEventListener("scroll",this,!0),window.addEventListener("scroll",function(){var t=document.getElementById("Page-header-bar").offsetTop;window.pageYOffset>t?document.body.hasAttribute("data-sticky-nav")||document.body.setAttribute("data-sticky-nav","true"):document.body.hasAttribute("data-sticky-nav")&&document.body.removeAttribute("data-sticky-nav")}),this.menuButton&&this.menuButton.addEventListener("click",function(e){e.preventDefault(),t.isMenuOpen()?t.closeMenu():t.openMenu()}),this.mainLink&&this.mainLink.addEventListener("click",function(e){e.preventDefault(),t.openMainMenu()}),this.returnLink&&this.returnLink.addEventListener("click",function(e){e.preventDefault(),t.closeMainMenu()}),window.addEventListener("resize",this),"complete"===document.readyState?this.setState():window.addEventListener("load",this)}},{key:"resizeHeaderOnScroll",value:function(){if(!oe.desktop.includes(le()))return document.body.setAttribute("data-shrink-header","false"),document.documentElement.style.removeProperty("--headerHeight"),void this.setTotalHeaderHeight();window.scrollY>parseInt(getComputedStyle(document.documentElement).getPropertyValue("--headerHeight"))?(document.documentElement.style.setProperty("--headerHeight","60px"),document.body.setAttribute("data-shrink-header","true")):(document.body.setAttribute("data-shrink-header","false"),document.documentElement.style.removeProperty("--headerHeight")),this.setTotalHeaderHeight()}},{key:"setClickTarget",value:function(t){if(this.menuWrapper){var e=this.menuWrapper.contains(t.target),i=this.headerBar.contains(t.target);e||i||this.closeMenu()}}},{key:"setBodyOffset",value:function(){var t,e=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--headerHeight")),i=this.querySelector(".desktopView"),n=this.querySelector(".mobileView"),r=this.querySelector(".Page-header-bar-global"),s=0;t=this.dataset.noNav?this.offsetHeight:null,oe.desktop.includes(le())?i&&r&&(s=i.offsetHeight+r.offsetHeight):n&&r&&(s=n.offsetHeight+r.offsetHeight),t?document.documentElement.style.setProperty("--contentVerticalOffset","".concat(t,"px")):s>e?document.documentElement.style.setProperty("--contentVerticalOffset","".concat(s,"px")):document.documentElement.style.setProperty("--contentVerticalOffset","".concat(e,"px"))}},{key:"setState",value:function(){this.sticky&&(this.stuck=!0),this.setBodyOffset(),this.setTotalHeaderHeight()}},{key:"setTotalHeaderHeight",value:function(){if(this.sticky){var t=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--headerHeight"));document.documentElement.style.setProperty("--totalHeaderHeight","".concat(t,"px"))}else document.documentElement.style.setProperty("--totalHeaderHeight","0px")}},{key:"openMenu",value:function(){document.body.setAttribute("data-toggle-header","hamburger-menu"),this.setAttribute("data-toggle-header","hamburger-menu"),this.menuButton.setAttribute("aria-expanded","true"),this.hamburgerMenu.focu
2s()}},{key:"closeMenu",value:function(){this.isMenuOpen()&&(document.body.removeAttribute("data-toggle-header"),this.removeAttribute("data-toggle-header"),this.menuButton.setAttribute("aria-expanded","false"))}},{key:"isMenuOpen",value:function(){return"hamburger-menu"===document.body.getAttribute("data-toggle-header")}},{key:"openMainMenu",value:function(){document.body.setAttribute("data-toggle-mainMenu","open"),this.setAttribute("data-toggle-mainMenu","open")}},{key:"closeMainMenu",value:function(){document.body.removeAttribute("data-toggle-mainMenu"),this.removeAttribute("data-toggle-mainMenu")}}]),a}(G(HTMLElement));s(Ve,"selectors",{menuButton:".Page-header-menu-trigger",globalNavButton:".Page-header-globalNav-trigger",hamburgerMenu:".Page-header-hamburger-menu",headerBar:".Page-header-bar",menuWrapper:".Page-header-hamburger-menu-wrapper",mainLink:".Page-header-hamburger-primaryNav-header-mainLink-link",returnLink:".GlobalNavigation-returnLink"});var ze="PlaylistItem:loadVideo",He=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"connectedCallback",value:function(){this.addEventListener("click",this)}},{key:"handleEvent",value:function(t){if("click"===t.type){if(t.target.matches(".PlaylistItem-toggle"))return void(this.expanded=!this.expanded);t.preventDefault(),this.isCurrent||this.load()}}},{key:"load",value:function(){this.emit(ze,{url:this.url})}},{key:"disconnectedCallback",value:function(){this.removeEventListener("click",this)}},{key:"url",get:function(){return this.getAttribute("url")}},{key:"contentId",get:function(){return this.getAttribute("content-id")}},{key:"expanded",get:function(){return this.hasAttribute("expanded")},set:function(t){t?this.setAttribute("expanded",""):this.removeAttribute("expanded")}},{key:"isCurrent",get:function(){return this.hasAttribute("is-current")},set:function(t){t?this.setAttribute("is-current",""):this.removeAttribute("is-current")}},{key:"emit",value:function(t){var e=new CustomEvent(t,{bubbles:!0,detail:arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}});this.dispatchEvent(e)}}]),a}(G(HTMLElement));var qe=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"clipped",get:function(){return this.hasAttribute("expanded")},set:function(t){t?this.setAttribute("clipped",""):this.removeAttribute("clipped")}},{key:"overflowing",get:function(){return this.hasAttribute("overflowing")},set:function(t){t?this.setAttribute("overflowing",""):this.removeAttribute("overflowing")}},{key:"previousButton",get:function(){return this.querySelector(".FlickityCustomNavigation-button-prev")}},{key:"nextButton",get:function(){return this.querySelector(".FlickityCustomNavigation-button-next")}},{key:"playlistItemsContainer",get:function(){return this.querySelector("[data-playlist-items]")}},{key:"scrollDownButton",get:function(){return this.querySelector('[data-click="scrollDown"]')}},{key:"scrollUpButton",get:function(){return this.querySelector('[data-click="scrollUp"]')}},{key:"clickHandler",value:function(t){t.target===this.previousButton&&this.flickity&&this.flickity.previous(),t.target===this.nextButton&&this.flickity&&this.flickity.next(),t.target.matches('[data-click="expand"]')&&(this.clipped=!1),t.target===this.scrollDownButton&&this.scrollDown(),t.target===this.scrollUpButton&&this.scrollUp()}},{key:"connectedCallback",value:function(){this.playlistItems=T(this.querySelectorAll("ps-playlist-item")),"complete"===document.readyState?this.createOrUpdateCarousel():window.addEventListener("load",this),this.addEventListener(ze,this),this.addEventListener(rt.ended,this),this.addEventListener("click",this),this.addEventListener("scroll",this,!0)}},{key:"createOrUpdateCarousel",value:function(){var t=this;this.flickity&&this.flickity.destroy(),this.playlistItemsContainer.clientWidth<this.playlistItemsContainer.scrollWidth&&(this.flickity=new(Ct())(this.playlistItemsContainer,{cellAlign:"left",contain:!0,freeScroll:!0,imagesLoaded:!0,pageDots:!1,prevNextButtons:!1,watchCSS:!0}),this.flickity.on("dragStart",function(){t.dragging=!0}),this.flickity.on("settle",function(){t.dragging=!1}),this.flickity.on("select",function(){return t.updateUi()})),this.setState()}},{key:"disconnectedCallback",value:function(){this.removeEventListener("click",this),this.removeEventListener(ze,this),this.removeEventListener(rt.ended,this),window.removeEventListener("load",this),this.removeEventListener("scroll",this,!0)}},{key:"endedHanlder",value:function(){var t=this.playlistItems.findIndex(function(t){return t.isCurrent});t<this.playlistItems.length-1&&this.playlistItems[t+1].load()}},{key:"handleEvent",value:function(t){t.type===rt.ended&&this.endedHanlder(),t.type===ze&&this.loadVideoHanlder(t),"click"===t.type&&this.clickHandler(t),"load"===t.type&&(window.addEventListener("resize",this),this.setScrollState(),this.createOrUpdateCarousel()),"resize"===t.type&&(this.setScrollState(),this.createOrUpdateCarousel()),"scroll"===t.type&&this.setScrollState()}},{key:"loadVideoHanlder",value:function(t){var e=this;this.dragging||fetch(t.detail.url).then(function(t){return t.text()}).then(function(t){return e.responseHanlder(t)}).then(function(){return e.setState(e.playlistItems.indexOf(t.target))})}},{key:"responseHanlder",value:function(t){var e=(new DOMParser).parseFromString(t,"text/html"),i=e.documentElement.querySelector("[data-vi
2deo-player]"),n=e.documentElement.querySelector(".VideoPage-headline"),r=this.querySelector("[data-player-title]"),s=this.querySelector("[data-video-player]");s.parentElement.replaceChild(i,s),r.innerText=n?n.innerText.trim():""}},{key:"setScrollState",value:function(){this.overflowing=this.playlistItemsContainer.scrollHeight>this.playlistItemsContainer.clientHeight,this.scrollUpButton&&(this.scrollUpButton.disabled=this.playlistItemsContainer.scrollTop<1),this.scrollDownButton&&(this.scrollDownButton.disabled=this.playlistItemsContainer.scrollTop>=this.playlistItemsContainer.scrollHeight-this.playlistItemsContainer.offsetHeight)}},{key:"setState",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.playlistItems.forEach(function(e,i){e.isCurrent=i===t}),this.flickity&&this.flickity.select(t)}},{key:"scrollDown",value:function(){this.playlistItemsContainer.scrollBy({top:200,behavior:"smooth"})}},{key:"scrollUp",value:function(){this.playlistItemsContainer.scrollBy({top:-200,behavior:"smooth"})}},{key:"updateUi",value:function(){this.flickity.cells[this.flickity.selectedIndex-1]?this.flickity.cells[this.flickity.selectedIndex+1]?(this.previousButton.removeAttribute("disabled"),this.nextButton.removeAttribute("disabled")):(this.nextButton.setAttribute("disabled",""),this.previousButton.removeAttribute("disabled")):(this.previousButton.setAttribute("disabled",""),this.nextButton.removeAttribute("disabled"))}}]),a}(G(HTMLElement));var Ue=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"setScrollState",value:function(){}}]),a}(qe);var Ge=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"connectedCallback",value:function(){this.addEventListener("click",this),this.player=this.querySelector("audio"),this.player.addEventListener("play",this),this.player.addEventListener("pause",this),this.player.addEventListener("loadedmetadata",this),this.player.addEventListener("timeupdate",this),this.player.readyState>=1&&this.render()}},{key:"handleEvent",value:function(t){"click"===t.type&&t.target.matches('[data-click="togglePlayback"]')&&(this.player.paused?this.player.play():this.player.pause()),"play"===t.type&&(this.playing=!0),"pause"===t.type&&(this.playing=!1),"timeupdate"===t.type&&this.render(),"loadedmetadata"===t.type&&this.render()}},{key:"playing",get:function(){return this.hasAttribute("playing")},set:function(t){t?this.setAttribute("playing",""):this.removeAttribute("playing")}},{key:"currentTime",get:function(){return j(this.player.currentTime)}},{key:"duration",get:function(){return j(this.player.duration)}},{key:"render",value:function(){this.querySelector(".PodcastEpisodeEnhancement-status").innerHTML="".concat(this.currentTime," / ").concat(this.duration)}}]),a}(G(HTMLElement));var je=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"headerEl",get:function(){return this.querySelector("[data-header]")}},{key:"contentEl",get:function(){return this.querySelector("[data-content]")}},{key:"descriptionEl",get:function(){return this.querySelector("[data-description]")}},{key:"descriptionHeight",get:function(){return this.querySelector(".PromoAccordion-description").offsetHeight}},{key:"expanded",get:function(){return this.hasAttribute("expanded")},set:function(t){this.headerEl.setAttribute("aria-expanded",t),t?this.setAttribute("expanded",""):this.removeAttribute("expanded")}}
2,{key:"adjustContentHeight",value:function(){this.contentEl.style.maxHeight=this.expanded?this.descriptionHeight+"px":"0px"}},{key:"changeDescriptionTabIndex",value:function(t){var e="-1";t&&(e="0"),this.descriptionEl.setAttribute("tabindex",e)}},{key:"attributeChangedCallback",value:function(t){"expanded"===t&&(this.contentEl.classList.toggle("expanded",this.expanded),this.adjustContentHeight(),this.changeDescriptionTabIndex(this.expanded))}},{key:"connectedCallback",value:function(){var t=this;this.headerEl.addEventListener("click",function(e){e.preventDefault(),t.expanded=!t.expanded}),"0"===this.getAttribute("data-index")&&this.hasAttribute("expanded")&&setTimeout(function(){t.adjustContentHeight()},1e3)}}],[{key:"observedAttributes",get:function(){return["expanded"]}}]),a}(G(HTMLElement)),We=function(){function e(i){t(this,e),this.element=i,this.init()}return r(e,[{key:"init",value:function(){var t=this.element.style.backgroundImage,e=this.element.style.backgroundColor,i=this.element.style.backgroundPosition?this.element.style.backgroundPosition:"center",n=document.createElement("style"),r="_"+Math.random().toString(36).substr(2,9);this.element.parentElement.classList.add(r),n.innerHTML="\n .PromoFullWidth.".concat(r,"::after,.PromoFullWidth-Large.").concat(r,'::after {\n position: absolute;\n content: "";\n top: 0;\n bottom: 0;\n margin-left: calc(-50vw + 50%);\n width: 100vw;\n left: 0;\n z-index: -1;\n background-image: ').concat(t,";\n background-color: ").concat(e,";\n background-position: ").concat(i,";\n background-size: cover;\n }\n "),document.head.appendChild(n)}}]),e}();var $e=function(){V(s,window.HTMLElement);var e,i,n=(e=s,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,n=q(e);if(i){var r=q(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return H(this,t)});function s(){return t(this,s),n.apply(this,arguments)}return r(s,[{key:"connectedCallback",value:function(){var t=this.getAttribute("data-content-id");t&&this.init(t)}},{key:"init",value:function(t){var e=this;if(function(t){for(var e=t+"=",i=document.cookie.split(";"),n=0;n<i.length;n++){for(var r=i[n];" "==r.charAt(0);)r=r.substring(1,r.length);if(0==r.indexOf(e))return r.substring(e.length,r.length)}return null}(t));else{this.style.display="block";var i=this.querySelector(".icon-close"),n=this.getAttribute("data-cookie-length")||7;i&&i.addEventListener("click",function(i){(function(t,e,i){var n="";if(i){var r=new Date;r.setTime(r.getTime()+24*i*60*60*1e3),n="; expires="+r.toUTCString()}document.cookie=t+"="+(e||"")+n+"; path=/"})(t,!0,n),e.style.display="none"})}}}]),s}();var Ye=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"connectedCallback",value:function(){var t=this,e=this.getAttribute("data-toggle"),i=this.querySelectorAll('[data-toggle-trigger="'+e+'"]'),n=this;this.handleToggle=function(t){t.preventDefault();var e=this.getAttribute("data-toggle-trigger"),i="data-toggle-in";e&&(n.getAttribute(i)===e?(document.body.removeAttribute(i),n.removeAttribute(i,e)):(document.body.setAttribute(i,e),n.setAttribute(i,e)))},i.forEach(function(e){return e.addEventListener("click",t.handleToggle,!0)})}},{key:"disconnectedCallback",value:function(){var t=this;this.querySelectorAll("[data-toggle-trigger]").forEach(function(e){return e.removeEventListener("click",t.handleToggle,!0)})}}]),a}(G(HTMLElement));var Ke=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}
2return r(a,[{key:"connectedCallback",value:function(){this.style.setProperty("--lineClamp",this.lineClamp),"complete"===document.readyState?this.update():window.addEventListener("load",this),window.addEventListener("resize",this),this.addEventListener("click",this)}},{key:"contentElement",get:function(){return this.querySelector(".ReadMore-content")}},{key:"lineClamp",get:function(){return this.getAttribute("line-clamp")}},{key:"clipping",get:function(){return this.hasAttribute("clipping")},set:function(t){t?this.setAttribute("clipping",!0):this.removeAttribute("clipping")}},{key:"expanded",get:function(){return this.hasAttribute("expanded")},set:function(t){t?this.setAttribute("expanded",!0):this.removeAttribute("expanded")}},{key:"handleClick",value:function(t){t.target.matches('[data-click="expand"]')&&(t.preventDefault(),this.expanded=!0),t.target.matches('[data-click="collapse"]')&&(t.preventDefault(),this.expanded=!1)}},{key:"handleEvent",value:function(t){"load"!==t.type&&"resize"!==t.type||this.update(),"click"===t.type&&this.handleClick(t)}},{key:"update",value:function(){this.clipping=this.contentElement.scrollHeight>this.contentElement.clientHeight}}]),a}(G(HTMLElement));var Xe=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"connectedCallback",value:function(){document.addEventListener("click",this)}},{key:"cacheElements",value:function(){this.headerSearch=document.querySelector(".Page-header-search-open"),this.searchClose=document.querySelector(".Page-header-search-close"),this.globalNavButton=document.querySelector(".Page-header-globalNav-trigger"),this.pageHeader=document.querySelector(".Page-header")}},{key:"init",value:function(){var t=this;this.headerSearch&&this.headerSearch.addEventListener("click",function(e){t.openSearch(e),e.preventDefault()}),this.searchClose&&this.searchClose.addEventListener("click",function(e){t.closeSearch(e),e.preventDefault()}),document.addEventListener("keydown",function(e){"Escape"===e.key&&t.isSearchOpen()&&t.closeSearch(e)}),window.addEventListener("resize",function(){return t.closeSearch()})}},{key:"openSearch",value:function(){this.setAttribute("data-searchoverlay-show",!0),document.body.setAttribute("data-searchoverlay-show",!0),document.body.removeAttribute("data-toggle-header"),document.body.removeAttribute("data-toggle-mainMenu"),document.querySelector(".Page-header").removeAttribute("data-toggle-header"),document.querySelector(".SearchOverlay-input").focus()}},{key:"closeSearch",value:function(){this.removeAttribute("data-searchoverlay-show"),document.body.removeAttribute("data-searchoverlay-show"),this.style.removeProperty("top")}},{key:"isSearchOpen",value:function(){return"true"===document.body.getAttribute("data-searchoverlay-show")}}]),a}(G(HTMLElement));var Je=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"connectedCallback",value:function(){this.addEventListener("click",this),this.expandFirstFilterOnDesktop()}},{key:"expandFirstFilterOnDesktop",value:function(){document.querySelector("ps-search-filter")===this&&oe.desktop.includes(le())&&(this.expanded=!0)}},{key:"handleEvent",value:function(t){"click"===t.type&&(t.target.closest(".SearchFilter-heading")||t.target.matches(".SearchFilter-heading"))&&(this.expanded=!this.expanded)}},{key:"disconnectedCallback",value:function(){this.removeEventListener("click",this)}},{key:"expanded",get:function(){return this.hasAttribute("expanded")},set:function(t){t?this.setAttribute("expanded",""):this.removeAttribute("expanded")}},{key:"isCurrent",get:function(){return this.hasAttribute("is-current")}
2,set:function(t){t?this.setAttribute("is-current",""):this.removeAttribute("is-current")}}]),a}(G(HTMLElement));var Qe=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"connectedCallback",value:function(){this.cacheElements(),this.handleFiltersOverlay(),this.handleSortSelect(),this.handleFiltersApply(),this.handleFiltersClear(),this.handleFiltersSelect(),this.clearAllFilters()}},{key:"cacheElements",value:function(){this.searchResultsModule=document.querySelector(".SearchResultsModule"),this.searchForm=document.querySelector(".SearchResultsModule-form"),this.searchSort=this.querySelector(".SearchResultsModule-sorts select"),this.filtersOpenButton=this.querySelectorAll(".SearchResultsModule-filters-open"),this.filtersCloseButton=this.querySelector(".SearchResultsModule-filters-close"),this.filtersOverlay=this.querySelector(".SearchResultsModule-filters-overlay"),this.filtersApply=this.querySelector(".SearchResultsModule-filters-apply"),this.filtersApply&&
2(this.filtersApplyButton=this.filtersApply.querySelector("button")),this.filtersSeeAll=this.querySelectorAll(".SearchFilter-seeAll"),this.filters=this.querySelectorAll(".SearchFilterInput input"),this.selectedFiltersArray=[],this.selectedFilters=this.querySelector(".SearchResultsModule-filters-selected"),this.selectedFiltersReset=this.querySelector(".SearchResultsModule-filters-selected-reset"),this.selectedFiltersContent=this.querySelector(".SearchResultsModule-filters-selected-content"),this.filtersClearFilter=this.querySelectorAll(".SearchResultsModule-filters-content [data-clear]"),this.clearAllFiltersButton=this.querySelector(".SearchResultsModule-filters-clear-filters")}},{key:"handleSortSelect",value:function(){var t=this;this.searchSort&&this.searchSort.addEventListener("change",function(e){t.gatherSelectedFilters(),t.searchResultsModule.submitSearch()})}},{key:"handleFiltersClear",value:function(){var t=this;this.filtersClearFilter.forEach(function(e){e.addEventListener("click",function(i){var n=e.getAttribute("data-name");t.clearSelectedFilter(n)})})}},{key:"clearSelectedFilter",value:function(t){var e=window.location.href;if(-1!==e.indexOf("?")){var i=e.split("?"),n=i[0];if(i.length>=1){var r=i[1],s=(e.indexOf("&")?r.split("&"):r.split("")).filter(function(e){return!e.startsWith("".concat(t,"="))}),a=n+(s.length>0?"?":"")+s.join("&");window.location.href=a}}}},{key:"handleFiltersSelect",value:function(){var t=this;this.filters.forEach(function(e){e.addEventListener("click",function(){var i=e.closest("[data-as-select]");console.log(e,i),(i||oe.desktop.includes(le()))&&(t.gatherSelectedFilters(),t.searchResultsModule.submitSearch())})})}},{key:"handleFiltersApply",value:function(){var t=this;this.filtersApply&&this.filtersApply.addEventListener("change",function(e){e.preventDefault(),t.gatherSelectedFilters(),t.closeOverlay(),t.searchResultsModule.submitSearch()}),this.filtersApplyButton&&this.filtersApplyButton.addEventListener("click",function(e){e.preventDefault(),t.gatherSelectedFilters(),t.closeOverlay(),t.searchResultsModule.submitSearch()})}},{key:"handleFiltersOverlay",value:function(){var t=this;this.filtersOpenButton.forEach(function(e){e.addEventListener("click",function(e){e.preventDefault(),t.openOverlay()})}),this.filtersCloseButton&&this.filtersCloseButton.addEventListener("click",function(e){e.preventDefault(),t.closeOverlay()})}},{key:"handleSelectedFiltersRemove",value:function(){var t=this;this.querySelectorAll(".SearchResultsModule-filters-selected-filter").forEach(function(e){e.querySelector("a").addEventListener("click",function(i){i.preventDefault(),t.removeSelectedFilter(e)})})}},{key:"removeSelectedFilter",value:function(t){var e=t.getAttribute("data-value");this.querySelectorAll('[value="'.concat(e,'"]')).forEach(function(t){t.checked&&(t.checked=!1)}),this.gatherSelectedFilters(),this.searchResultsModule.submitSearch()}},{key:"gatherSelectedFilters",value:function(){var t=this;this.selectedFiltersArray=[],this.filters=this.querySelectorAll(".SearchFilterInput input"),this.filters.forEach(function(e){if(e.checked){var i=e.parentElement.querySelector("span").innerHTML,n=e.getAttribute("value");t.selectedFiltersArray.push({label:i,value:n})}})}},{key:"openOverlay",value:function(){this.filtersOverlay.setAttribute("data-filters-open",!0),document.body.setAttribute("data-filters-open",!0)}},{key:"closeOverlay",value:function(){this.filtersOverlay.removeAttribute("data-filters-open"),document.body.removeAttribute("data-filters-open")}},{key:"clearAllFilters",value:function(){var t=this;this.clearAllFiltersButton&&this.clearAllFiltersButton.addEventListener("click",function(e){e.preventDefault(),t.filters.forEach(function(t){t.checked=!1}),t.gatherSelectedFilters(),t.searchResultsModule.submitSearch()})}}]),a}(G(HTMLElement));var Ze=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}
2return r(a,[{key:"connectedCallback",value:function(){this.cacheElements(),this.handleFiltersOverlay(),this.handleSortSelect(),this.handleFiltersApply(),this.handleFiltersSelect(),this.gatherSelectedFilters()}},{key:"cacheElements",value:function(){this.SearchResultsModuleCourse=document.querySelector(".SearchResultsModuleCourse"),this.searchForm=document.querySelector(".SearchResultsModuleCourse-form"),this.searchSort=this.querySelector(".SearchResultsModuleCourse-sorts select"),this.filtersOpenButton=this.querySelectorAll(".SearchResultsModuleCourse-filters-open"),this.filtersCloseButton=this.querySelector(".SearchResultsModuleCourse-filters-close"),this.filtersOverlay=this.querySelector(".SearchResultsModuleCourse-filters-overlay"),this.filtersApply=this.querySelector(".SearchResultsModuleCourse-filters-apply"),this.filtersApplyButton=this.filtersApply.querySelector("button"),this.filtersSeeAll=this.querySelectorAll(".SearchFilter-seeAll"),this.filters=this.querySelectorAll(".SearchFilterInput input"),this.selectedFiltersArray=[],this.selectedFilters=this.querySelector(".SearchResultsModuleCourse-filters-selected"),this.selectedFiltersReset=this.querySelector(".SearchResultsModuleCourse-filters-selected-reset"),this.selectedFiltersContent=this.querySelector(".SearchResultsModuleCourse-filters-selected-content"),this.clearFiltersButton=this.querySelector(".SearchResultsModuleCourse-filters-clearButton")}},{key:"handleSortSelect",value:function(){var t=this;this.searchSort&&this.searchSort.addEventListener("change",function(e){t.gatherSelectedFilters(),t.SearchResultsModuleCourse.submitSearch()})}},{key:"handleFiltersSelect",value:function(){var t=this;this.filters.forEach(function(e){e.addEventListener("click",function(){oe.desktop.includes(le())&&t.gatherSelectedFilters()})})}},{key:"handleFiltersApply",value:function(){var t=this;this.filtersApply.addEventListener("change",function(e){e.preventDefault(),t.gatherSelectedFilters(),t.closeOverlay(),t.SearchResultsModuleCourse.submitSearch()}),this.filtersApplyButton.addEventListener("click",function(e){e.preventDefault(),t.gatherSelectedFilters(),t.closeOverlay(),t.SearchResultsModuleCourse.submitSearch()})}},{key:"handleFiltersOverlay",value:function(){var t=this;this.filtersOpenButton.forEach(function(e){e.addEventListener("click",function(e){e.preventDefault(),t.openOverlay()})}),this.filtersCloseButton.addEventListener("click",function(e){e.preventDefault(),t.closeOverlay()})}},{key:"handleSelectedFiltersRemove",value:function(){var t=this;this.querySelectorAll(".SearchResultsModuleCourse-filters-selected-filter").forEach(function(e){e.querySelector("a").addEventListener("click",function(i){i.preventDefault(),t.removeSelectedFilter(e)})})}},{key:"removeSelectedFilter",value:function(t){var e=t.getAttribute("data-value");this.querySelectorAll('[value="'.concat(e,'"]')).forEach(function(t){t.checked&&(t.checked=!1)}),this.gatherSelectedFilters(),this.SearchResultsModuleCourse.submitSearch()}},{key:"gatherSelectedFilters",value:function(){var t=this;this.selectedFiltersArray=[],this.filters=this.querySelectorAll(".SearchFilterInput input"),this.filters.forEach(function(e){if(e.checked){var i=e.parentElement.querySelector("span").innerHTML,n=e.getAttribute("value"),r=e.parentNode.closest(".SearchFilter-content");if(!r)return;var s=r.querySelector(".SearchFilter-heading-title").innerHTML;t.selectedFiltersArray.push({label:i,value:n,group:s})}}),this.handleBadges(),this.handleClearButton()}},{key:"openOverlay",value:function(){this.filtersOverlay.setAttribute("data-filters-open",!0),document.body.setAttribute("data-filters-open",!0)}},{key:"closeOverlay",value:function(){this.filtersOverlay.removeAttribute("data-filters-open"),document.body.removeAttribute("data-filters-open")}},{key:"handleBadges",value:function(){var t=this;this.filterGroups=this.querySelectorAll(".SearchFilter-heading"),this.filterGroups.forEach(function(e){var i=e.querySelector(".SearchFilter-heading-title"),n=t.selectedFiltersArray.reduce(function(t,e){return e.group===i.innerHTML&&(t+=1),t},0);e.querySelector(".SearchFilter-badge").innerHTML=n>0?n:""})}},{key:"handleClearButton",value:function(){var t=this;this.clearFiltersButton.addEventListener("click",function(e){e.preventDefault(),t.clearFilters()}),this.selectedFiltersArray.length>0?this.clearFiltersButton.setAttribute("data-has-filters",!0):this.clearFiltersButton.removeAttribute("data-has-filters")}},{key:"clearFilters",value:function(){console.log("clearing filters"),this.selectedFiltersArray=[],this.filters.forEac
2h(function(t){t.checked&&(t.checked=!1)}),this.gatherSelectedFilters()}}]),a}(G(HTMLElement));var ti=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"connectedCallback",value:function(){this.cacheElements(),this.handleFiltersOverlay(),this.handleSortSelect(),this.handleFiltersApply(),this.handleFiltersSelect(),this.gatherSelectedFilters()}},{key:"cacheElements",value:function(){this.SearchResultsModuleDegree=document.querySelector(".SearchResultsModuleDegree"),this.searchForm=document.querySelector(".SearchResultsModuleDegree-form"),this.searchSort=this.querySelector(".SearchResultsModuleDegree-sorts select"),this.filtersOpenButton=this.querySelectorAll(".SearchResultsModuleDegree-filters-open"),this.filtersCloseButton=this.querySelector(".SearchResultsModuleDegree-filters-close"),this.filtersOverlay=this.querySelector(".SearchResultsModuleDegree-filters-overlay"),this.filtersApply=this.querySelector(".SearchResultsModuleDegree-filters-apply"),this.filtersApplyButton=this.filtersApply.querySelector("button"),this.filtersSeeAll=this.querySelectorAll(".SearchFilter-seeAll"),this.filters=this.querySelectorAll(".SearchFilterInput input"),this.selectedFiltersArray=[],this.selectedFilters=this.querySelector(".SearchResultsModuleDegree-filters-selected"),this.selectedFiltersReset=this.querySelector(".SearchResultsModuleDegree-filters-selected-reset"),this.selectedFiltersContent=this.querySelector(".SearchResultsModuleDegree-filters-selected-content"),this.clearFiltersButton=this.querySelector(".SearchResultsModuleDegree-filters-clearButton")}},{key:"handleSortSelect",value:function(){var t=this;this.searchSort&&this.searchSort.addEventListener("change",function(e){t.gatherSelectedFilters(),t.SearchResultsModuleDegree.submitSearch()})}},{key:"handleFiltersSelect",value:function(){var t=this;this.filters.forEach(function(e){e.addEventListener("click",function(){oe.desktop.includes(le())&&t.gatherSelectedFilters()})})}},{key:"handleFiltersApply",value:function(){var t=this;this.filtersApply.addEventListener("change",function(e){e.preventDefault(),t.gatherSelectedFilters(),t.closeOverlay(),t.SearchResultsModuleDegree.submitSearch()}),this.filtersApplyButton.addEventListener("click",function(e){e.preventDefault(),t.gatherSelectedFilters(),t.closeOverlay(),t.SearchResultsModuleDegree.submitSearch()})}},{key:"handleFiltersOverlay",value:function(){var t=this;this.filtersOpenButton.forEach(function(e){e.addEventListener("click",function(e){e.preventDefault(),t.openOverlay()})}),this.filtersCloseButton.addEventListener("click",function(e){e.preventDefault(),t.closeOverlay()})}},{key:"handleSelectedFiltersRemove",value:function(){var t=this;this.querySelectorAll(".SearchResultsModuleDegree-filters-selected-filter").forEach(function(e){e.querySelector("a").addEventListener("click",function(i){i.preventDefault(),t.removeSelectedFilter(e)})})}},{key:"removeSelectedFilter",value:function(t){var e=t.getAttribute("data-value");this.querySelectorAll('[value="'.concat(e,'"]')).forEach(function(t){t.checked&&(t.checked=!1)}),this.gatherSelectedFilters(),this.SearchResultsModuleDegree.submitSearch()}},{key:"gatherSelectedFilters",value:function(){var t=this;this.selectedFiltersArray=[],this.filters=this.querySelectorAll(".SearchFilterInput input"),this.filters.forEach(function(e){if(e.checked){var i=e.parentElement.querySelector("span").innerHTML,n=e.getAttribute("value"),r=e.parentNode.closest(".SearchFilter-content").querySelector(".SearchFilter-heading-title").innerHTML;t.selectedFiltersArray.push({label:i,value:n,group:r})}}),this.handleBadges(),this.handleClearButton()}},{key:"openOverlay",value:function(){this.filtersOverlay.setAttribute("data-filters-open",!0),document.body.setAttribute("data-filters-open",!0)}},{key:"closeOverlay",value:function(){this.filtersOverlay.removeAttribute("data-filters-open"),document.body.removeAttribute("data-filters-open")}},{key:"handleBadges",value:function(){var t=this;this.filterGroups=this.querySelectorAll(".SearchFilter-heading"),this.filterGroups.forEach(function(e){var i=e.querySelector(".SearchFilter-heading-title"),n=t.selectedFiltersArray.reduce(function(t,e){return e.group===i.innerHTML&&(t+=1),t},0);e.querySelector(".SearchFilter-badge").innerHTML=n>0?n:""})}},{key:"handleClearButton",value:function(){var t=this;this.clearFiltersButton.addEventListener("click",function(e){e.preventDefault(),t.clearFilters()}),this.selectedFiltersArray.length>0?this.clearFiltersButton.setAttribute("data-has-filters",!0):this.clearFiltersButton.removeAttribute("data-has-filters")}},{key:"clearFilters",value:function(){console.log("clearing filters"),this.selectedFiltersArray=[],this.filters.forEac
2h(function(t){t.checked&&(t.checked=!1)}),this.gatherSelectedFilters()}}]),a}(G(HTMLElement));var ei=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"connectedCallback",value:function(){this.cacheElements(),this.handleSortSelect(),this.handleFiltersClear(),this.handleFiltersSelect()}},{key:"cacheElements",value:function(){this.searchResultsModule=document.querySelector(".SearchResultsModule"),this.searchForm=document.querySelector(".SearchResultsModule-form"),this.searchSort=this.querySelector(".SearchResultsModule-sorts select"),this.filtersSeeAll=this.querySelectorAll(".SearchFilter-seeAll"),this.filters=this.querySelectorAll(".SearchFilterInput input"),this.selectedFiltersArray=[],this.selectedFilters=this.querySelector(".SearchResultsModule-filters-selected"),this.selectedFiltersReset=this.querySelector(".SearchResultsModule-filters-selected-reset"),this.selectedFiltersContent=this.querySelector(".SearchResultsModule-filters-selected-content"),this.filtersClearFilter=this.querySelectorAll(".SearchResultsModule-filters-content [data-clear]")}},{key:"handleSortSelect",value:function(){var t=this;this.searchSort&&this.searchSort.addEventListener("change",function(e){t.gatherSelectedFilters(),t.searchResultsModule.submitSearch()})}},{key:"handleFiltersClear",value:function(){var t=this;this.filtersClearFilter.forEach(function(e){e.addEventListener("click",function(i){var n=e.getAttribute("data-name");t.clearSelectedFilter(n)})})}},{key:"clearSelectedFilter",value:function(t){var e=window.location.href;if(-1!==e.indexOf("?")){var i=e.split("?"),n=i[0];if(i.length>=1){var r=i[1],s=(e.indexOf("&")?r.split("&"):r.split("")).filter(function(e){return!e.startsWith("".concat(t,"="))}),a=n+(s.length>0?"?":"")+s.join("&");window.location.href=a}}}},{key:"handleFiltersSelect",value:function(){var t=this;this.filters.forEach(function(e){e.addEventListener("click",function(e){t.gatherSelectedFilters(),t.searchResultsModule.submitSearch()})})}},{key:"handleSelectedFiltersRemove",value:function(){var t=this;this.querySelectorAll(".SearchResultsModule-filters-selected-filter").forEach(function(e){e.querySelector("a").addEventListener("click",function(i){i.preventDefault(),t.removeSelectedFilter(e)})})}},{key:"removeSelectedFilter",value:function(t){var e=t.getAttribute("data-value");this.querySelectorAll('[value="'.concat(e,'"]')).forEach(function(t){t.checked&&(t.checked=!1)}),this.gatherSelectedFilters(),this.searchResultsModule.submitSearch()}},{key:"gatherSelectedFilters",value:function(){var t=this;this.selectedFiltersArray=[],this.filters=this.querySelectorAll(".SearchFilterInput input"),this.filters.forEach(function(e){if(e.checked){var i=e.parentElement.querySelector("span").innerHTML,n=e.getAttribute("value");t.selectedFiltersArray.push({label:i,value:n})}})}}]),a}(G(HTMLElement));var ii=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"connectedCallback",value:function(){this.cacheElements(),this.handleFormSubmit(),this.handleSearchInput(),this.checkInputValue()}},{key:"handleFormSubmit",value:function(){var t=this;this.searchForm.addEventListener("submit",function(e){e.preventDefault(),t.searchInput&&t.searchInput.blur();var i=new URLSearchParams(new FormData(t.searchForm)).toString(),n=window.location.pathname+"?"+i;window.history.replaceState({},document.title,n),t.loadingTimeout=setTimeout(function(){t.clearSearchForm()},1e3),t.getNewSearch(n).then(function(e){clearTimeout(t.loadingTimeout),t.clearSearchForm(),t.renderSearchResults(e),document.body.dispatchEvent(new CustomEvent("Search:onSearchUpdate",{detail:{responseMarkup:e}}))})})}},{key:"submitSearch",value:function(){var t;t="function"==typeof Event?new Event("submit"):document.createEvent("submit",{bubbles:!0,cancelable:!1}),this.searchForm.dispatchEvent(t)}},{key:"getNewSearch",value:function(t){return new Promise(function(e,i){window.fetch(t,{credentials:"include"}).then(function(t){e(t.text())}).catch(function(){Promise()})})}},{key:"clearSearchForm",value:function(){this.searchResults.innerHTML=""}},{key:"checkInputValue",value:function(){this.searchInput&&(0===this.searchInput.value.length?this.searchForm.setAttribute("data-has-value",!1):this.searchForm.setAttribute("data-has-value",!0))}},{key:"handleSearchInput",value:function(){var t=this;this.searchInput&&this.searchInput.addEventListener("keyup",function(e){"Enter"!==e.code?O(250,function(){t.checkInputValue()}):t.searchForm.submit()}),this.clearButton&&this.clearButton.addEventListener("click",function(){t.searchInput.value="",t.searchInput.focus(),t.checkInputValue()})}},{key:"renderSearchResults",value:function(t){var e=document.createElement("div");e.innerHTML=t;var i=e.querySelector(".".concat(this.searchResults.getAttribute("class"))).innerHTML;i&&(this.searchResults.innerHTML=i);var n=e.querySelector("[data-bsp-analytics-data]");n&&(I.extraData=n.dataset.bspAnalyticsData),this.dispatchRendered()}},{key:"dispatchRendered",value:function(){var t=new CustomEvent("Bsp:PageView",{bubbles:!0});this.dispatchEvent(t);var e=new CustomEvent("Ajax:Rendered",{bubbles:!0});document.body.dispatchEvent(e)}},{key:"cacheElements",value:function(){this.searchForm=this.querySelector(".SearchResultsModule-form"),this.searchInput=this.searchForm.querySelector(".SearchResultsModule-formInput"),this.searchResults=this.querySelector(".SearchResultsModule-ajax"),this.clearButton=this.searchForm.querySelector(".SearchResultsModule-clearInputButton")}}]),a}(G(HTMLElement));function ni(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var n,r,s,a,o=[],l=!0,h=!1;try{if(s=(i=i.call(t)).next,0===e){if(Object(i)!==i)return;l=!1}else for(;!(l=(n=s.call(i)).done)&&(o.push(n.value),o.length!==e);l=!0);}catch(t){h=!0,r=t}
2finally{try{if(!l&&null!=i.return&&(a=i.return(),Object(a)!==a))return}finally{if(h)throw r}}return o}}(t,e)||C(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var ri=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"connectedCallback",value:function(){this.init()}},{key:"init",value:function(){this.type=this.dataset.type,this.dayUrl=this.dataset.dayurl,this.allEvents=JSON.parse(this.dataset.items),this.grouped=this.groupEvents(this.allEvents),this.refDate=new Date(this.dataset.referencedate.replace(/-/g,"/")),this.typeCapital=this.type.charAt(0).toUpperCase()+this.type.slice(1),this.dayNames=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],this.render()}},{key:"render",value:function(){var t=document.createElement("div");t.classList.add("week"),t.innerHTML=this.renderMix(this.mixAndMatch(this["allDays"+this.typeCapital](this.refDate),this.grouped)),this.appendChild(this.elementWeekDays()),this.appendChild(t)}},{key:"elementWeekDays",value:function(){var t="",e=document.createElement("div");return e.classList.add("week"),e.classList.add("week-days"),this.dayNames.forEach(function(e){t+='<div class="title">'.concat(e,"</div>")}),e.innerHTML=t,e}},{key:"renderMonthDays",value:function(t,e){var i=this,n="";return e.forEach(function(e,r){var s=new Date(t.getFullYear(),t.getMonth(),t.getDate()+r);n+=i.renderDayEvents(e,s)}),n}},{key:"renderMix",value:function(t){for(var e="",i=0,n=Object.entries(t);i<n.length;i++){var r=ni(n[i],2),s=r[0],a=r[1];e+=this.renderDayEvents(a,new Date(s))}return e}},{key:"mixAndMatch",value:function(t,e){for(var i={},n=0,r=Object.entries(t);n<r.length;n++){var s=ni(r[n],1)[0];void 0!==e[s]?i[s]=e[s]:i[s]=[]}return i}},{key:"allDaysMonth",value:function(t){var e={},i=new Date(t.getFullYear(),12,0).getDate(),n=new Date(t.getFullYear(),t.getMonth(),1).getDay(),r=(i+n)%7,s=new Date(t.getFullYear(),t.getMonth(),1);s.setDate(s.getDate()-n);for(var a=0;a<i+n+r;a++)e["".concat(s.getFullYear(),"/").concat(s.getMonth()+1,"/").concat(s.getDate())]=[],s.setDate(s.getDate()+1);return e}},{key:"allDaysWeek",value:function(t){var e={},i=new Date(t.getFullYear(),t.getMonth(),t.getDate());i.getDay()>0&&i.setDate(i.getDate()-i.getDay());for(var n=0;n<7;n++)e["".concat(i.getFullYear(),"/").concat(i.getMonth()+1,"/").concat(i.getDate())]=[],i.setDate(i.getDate()+1);return e}},{key:"groupEvents",value:function(t){var e={};return t.forEach(function(t){var i=new Date(t.date),n="".concat(i.getFullYear(),"/").concat(i.getMonth()+1,"/").concat(i.getDate());void 0===e[n]&&(e[n]=[]),e[n].push(t)}),e}},{key:"renderDayEvents",value:function(t,e){var i=this,n=new Date((new Date).getFullYear(),(new Date).getMonth(),(new Date).getDate()),r=n.getTime()>e.getTime()?" passed":"",s=n.getTime()===e.getTime()?" currDay":"",a=0===t.length?" empty":"",o=n.getMonth()!==e.getMonth()?" diffMonth":"",l='<div class="day'.concat(s).concat(o).concat(r).concat(a,'">');if(l+='<div class="date">\n <div class="weekDay">'.concat(this.dayNames[e.getDay()].substring(0,3),'</div>\n <div class="dateNum">').concat(e.getDate(),'</div>\n </div>\n <div class="events">'),void 0!==t){var h=t.length-3;t.slice(0,3).forEach(function(t,e){l+=i.renderSingleEvent(t)}),h>0&&this.dayUrl&&(l+='<div class="more"><a class="Link" href="'.concat(this.dayUrl,"/").concat(e.getFullYear(),"-").concat(e.getMonth()+1,"-").concat(e.getDate(),'">').concat(h," more event").concat(h>1?"s":"","</a></div>"))}return l+="</div></div>"}},{key:"renderSingleEvent",value:function(t){var e="12:00 AM - 11:59 PM"===t.timeRange;return'\n <div class="event">\n <div class="'.concat(e?"event-timeRange hidden":"event-timeRange",'">').concat(t.timeRange,'</div>\n <div class="event-title"><a class="Link" href="').concat(t.url,'">').concat(t.title,"</a></div>\n </div>\n ")}},{key:"addDays",value:function(t,e){var i=new Date(t);return i.setDate(i.getDate()+e),i}}]),a}(G(HTMLElement));function si(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var ai=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}
2return r(a,[{key:"connectedCallback",value:function(){this.cacheElements(),this.setListView(this.getListView()),J(q(a.prototype),"handleFormSubmit",this).call(this),J(q(a.prototype),"handleSearchInput",this).call(this),J(q(a.prototype),"checkInputValue",this).call(this),this.handleEvents(),this.checkForElementUpdates()}},{key:"handleEvents",value:function(){var t=this;this.searchButton&&this.searchButton.addEventListener("click",function(e){if(e.preventDefault(),t.searchDiv.toggleAttribute("search-open"),t.searchDiv.hasAttribute("search-open")){var i=t.searchDiv.querySelector("input[name=q]"),n=i.value.length;i.setSelectionRange(n,n),i.focus()}},!1),this.topContainer&&this.topContainer.addEventListener("click",function(){t.topContainer.style.display="none"}),this.eventsTimeout&&clearTimeout(this.eventsTimeout),this.viewInputs.forEach(function(e){e.addEventListener("change",t.changeListViewHandler.bind(t))})}},{key:"cacheElements",value:function(){this.searchForm=this.querySelector(".SearchResultsModuleCourse-form"),this.searchInput=this.searchForm.querySelector(".SearchResultsModuleCourse-formInput"),this.searchResults=this.querySelector(".SearchResultsModuleCourse-ajax"),this.clearButton=this.searchForm.querySelector(".SearchResultsModuleCourse-clearInputButton"),this.searchDiv=this.querySelector(".SearchResultsModuleCourse-filter-wrapper"),this.searchButton=this.querySelector(".SearchResultsModuleCourse-search-button"),this.topContainer=this.querySelector(".SearchResultsModuleCourse-topContainer"),this.viewInputs=this.querySelectorAll(".SearchResultsModuleCourse-view input")}},{key:"checkForElementUpdates",value:function(){var t=this;new MutationObserver(function(e,i){var n,r=function(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return si(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?si(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,o=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){o=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(o)throw s}}}}(e);try{for(r.s();!(n=r.n()).done;)"childList"===n.value.type&&(t.connectedCallback(),t.eventsTimeout=setTimeout(function(){t.handleEvents()},100))}catch(t){r.e(t)}finally{r.f()}}).observe(this.searchResults,{attributes:!1,childList:!0,subtree:!1})}},{key:"changeListViewHandler",value:function(t){var e=t.target,i=e.value;e.checked&&this.setListView(i)}},{key:"setListView",value:function(t){this.searchResults.dataset.listView=t,localStorage.setItem("searchCourseListView",t);var e=Array.from(this.viewInputs).find(function(e){return e.value===t});e&&e.setAttribute("checked","")}},{key:"getListView",value:function(){return localStorage.getItem("searchCourseListView")||"grid"}}]),a}(ii);function oi(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}var li=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"connectedCallback",value:function(){this.cacheElements(),J(q(a.prototype),"handleFormSubmit",this).call(this),J(q(a.prototype),"handleSearchInput",this).call(this),J(q(a.prototype),"checkInputValue",this).call(this),this.handleEvents(),this.checkForElementUpdates()}},{key:"handleEvents",value:function(){var t=this;this.searchButton&&this.searchButton.addEventListener("click",function(e){t.searchDiv.toggleAttribute("search-open"),e.preventDefault()},!1),this.topContainer&&this.topContainer.addEventListener("click",function(){t.topContainer.style.display="none"}),this.eventsTimeout&&clearTimeout(this.eventsTimeout)}},{key:"cacheElements",value:function(){this.searchForm=this.querySelector(".SearchResultsModuleDegree-form"),this.searchInput=this.searchForm.querySelector(".SearchResultsModuleDegree-formInput"),this.searchResults=this.querySelector(".SearchResultsModuleDegree-ajax"),this.clearButton=this.searchForm.querySelector(".SearchResultsModuleDegree-clearInputButton"),this.searchDiv=this.querySelector(".SearchResultsModuleDegree-filter-wrapper"),this.searchButton=this.querySelector(".SearchResultsModuleDegree-search-button"),this.topContainer=this.querySelector(".SearchResultsModuleDegree-topContainer")}},{key:"checkForElementUpdates",value:function(){var t=this;new MutationObserver(function(e,i){var n,r=function(t,e){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!i){if(Array.isArray(t)||(i=function(t,e){if(t){if("string"==typeof t)return oi(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?oi(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){i&&(t=i);var n=0,r=function(){};return{s:r,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,o=!1;return{s:function(){i=i.call(t)},n:function(){var t=i.next();return a=t.done,t},e:function(t){o=!0,s=t},f:function(){try{a||null==i.return||i.return()}finally{if(o)throw s}}}}(e);try{for(r.s();!(n=r.n()).done;)"childList"===n.value.type&&(t.connectedCallback(),t.eventsTimeout=setTimeout(function(){t.handleEvents()},100))}catch(t){r.e(t)}finally{r.f()}}).observe(this.searchResults,{attributes:!1,childList:!0,subtree:!1})}}]),a}(ii);var hi=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}
2return r(a,[{key:"connectedCallback",value:function(){this.init(),this.setEventListeners()}},{key:"init",value:function(){this.childEls=this.querySelectorAll(".SectionNavigation-items-item"),this.items=this.querySelector(".SectionNavigation-items"),this.navItem=this.querySelectorAll(".SectionNavigationItem-text-link")}},{key:"setEventListeners",value:function(){var t=this;window.addEventListener("load",function(){window.innerWidth<767&&t.setCarousel()}),window.addEventListener("resize",O(250,function(){window.innerWidth<767?t.setCarousel():t.destroyCarousel()}))}},{key:"setCarousel",value:function(){void 0===this.flickity&&(this.flickity=new(Ct())(this.items,{contain:!0,cellAlign:"left",adaptiveHeight:!0,prevNextButtons:!1,pageDots:!1,wrapAround:!0}),this.flickity.resize())}},{key:"destroyCarousel",value:function(){this.flickity&&(this.flickity.destroy(),this.flickity=void 0)}}]),a}(G(HTMLElement));var ci="data-active",ui="data-visible",di=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"connectedCallback",value:function(){this.init(),this.setBinds()}},{key:"init",value:function(){this.elTabs=T(this.querySelectorAll("[data-tab]")),this.elTabPanels=T(this.querySelectorAll("[data-tab-panel]")),this.ids=this.elTabPanels.map(function(t){return t.id});var t=window.location.hash.substr(1),e=this.ids.some(function(e){return t===e}),i=this.querySelector('[href$="'.concat(t,'"]'));window.addEventListener("load",function(){i&&i.parentNode.scrollIntoView({block:"nearest"})}),this.activePanel=window.location.hash.length&&e?window.location.hash.substr(1):this.elTabPanels[0].id}},{key:"setBinds",value:function(){var t=this;window.addEventListener("hashchange",function(){var e=window.location.hash.substr(1);t.ids.some(function(t){return e===t})&&(t.activePanel=e)}),this.elTabs.forEach(function(e){e.addEventListener("click",function(e){var i=e.currentTarget.href.split("#").pop();if(i){history.pushState(null,null,e.currentTarget.href);var n=t.ids.some(function(t){return i===t});n&&n&&(e.preventDefault(),t.activePanel=i)}})})}},{key:"activePanel",get:function(){return this._activePanel},set:function(t){this._activePanel!==t&&(this._activePanel=t,this.elTabs.forEach(function(e){t===e.getAttribute("href").substr(1)?e.setAttribute(ci,""):e.removeAttribute(ci)}),this.transitionPanels(t)),window.dispatchEvent(new Event("resize"))}},{key:"transitionPanels",value:function(t){this.elTabPanels.forEach(function(e){t===e.id?e.setAttribute(ui,""):e.removeAttribute(ui)})}},{key:"clearTransitionProperties",value:function(t){t.style.removeProperty("height"),t.style.removeProperty("opacity"),t.style.removeProperty("overflow"),t.style.removeProperty("display"),t.style.removeProperty("transition")}}]),a}(G(HTMLElement));var fi=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"connectedCallback",value:function(){var t=this;this.checked=this.input.checked,this.addEventListener("change",function(e){e.target===t.input&&(t.checked=t.input.checked)})}},{key:"input",get:function(){return this.querySelector("input")}},{key:"checked",get:function(){return this.hasAttribute("checked")},set:function(t){t?this.setAttribute("checked",""):this.removeAttribute("checked")}}]),a}(G(HTMLElement)),pi=null,mi=function(){return pi||(pi=new Promise(function(t,e){if(void 0===window.YT||void 0===window.YT.Player)if(document.querySelector('script[src="https://www.youtube.com/iframe_api"]'))window.onYouTubeIframeAPIReady=function(){t()};else{window.onYouTubeIframeAPIReady=function(){t()};var i=document.createElement("script");i.src="https://www.youtube.com/iframe_api",i.async=!0,i.defer=!0,i.onerror=function(){delete window.onYouTubeIframeAPIReady,e(new Error("Failed to load YouTube iframe API."))};var n=document.getElementsByTagName("script")[0];n&&n.parentNode?n.parentNode.insertBefore(i,n):document.head.appendChild(i)}else t()}),pi)};var gi=function(e){V(o,e);var i,n,s,a=(n=o,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(n);if(s){var i=q(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return H(this,t)});function o(){return t(this,o),a.apply(this,arguments)}
2return r(o,[{key:"connectedCallback",value:(i=_e(Te().mark(function t(){var e,i,n,r,s=this;return Te().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:J(q(o.prototype),"connectedCallback",this).call(this),this._apiReady=!1,this._playerReady=!1,this._userEngaged=!1,this._playingOnHover=!1,this._iframe=this.querySelector("iframe"),mi().then(function(){s._apiReady=!0}).catch(function(t){console.error("Failed to load YouTube API:",t.message)}),e=this._iframe.getAttribute("src"),i=window.location.origin,e.includes("origin=".concat(i))||(n="".concat(e,"&origin=").concat(i),this._iframe.setAttribute("src",n)),window.YT&&(this._player=new window.YT.Player(this._iframe,{playerVars:{mute:1},events:{onReady:function(){s.onReady(),s.playOnHover(),s.adjustVideoLeadHeight()},onStateChange:function(t){return s.onStateChange(t)}}})),r=this,window.addEventListener("resize",function(){r.adjustVideoLeadHeight()});case 13:case"end":return t.stop()}},t,this)})),function(){return i.apply(this,arguments)})},{key:"waitForPlayerReady",value:function(){var t=this;return new Promise(function(e,i){var n=setInterval(function(){t._apiReady&&t._player&&"function"==typeof t._player.playVideo&&"function"==typeof t._player.pauseVideo&&(clearInterval(n),e())},100);setTimeout(function(){clearInterval(n),i(new Error("Player methods did not become available in time."))},5e3)})}},{key:"playOnHover",value:function(){var t=this,e=this.closest(".ListVerticalVideoCarousel");e&&(this.videoPromo=this.closest(".VideoPromo"),this.meta=this.videoPromo.querySelector(".VideoPromo-player-meta"),this.waitForPlayerReady().then(function(){e.setAttribute("data-ready","true"),t.addEventListener("mouseenter",t.playHoverVideo),t.addEventListener("mouseleave",t.pauseHoverVideo)}).catch(function(){console.error("youtuve api methods are not available")}))}},{key:"playHoverVideo",value:function(){this._player.playVideo(),this._player.isMuted()||this._player.getPlayerState()===window.YT.PlayerState.PLAYING||this._player.mute(),this._playingOnHover=!0,this.meta&&this.meta.setAttribute("data-playing","true")}},{key:"pauseHoverVideo",value:function(){this._playingOnHover&&this._player.isMuted()&&(this._player.pauseVideo(),this._playingOnHover=!1,this.meta&&this.meta.removeAttribute("data-playing"))}},{key:"onStateChange",value:function(t){var e=t.data;e===window.YT.PlayerState.ENDED&&this.onEnded(),e===window.YT.PlayerState.PLAYING&&(this.onPlay(),this.dispatchEvent(new CustomEvent("youtube-playing",{bubbles:!0,detail:{isHoverPlay:this._playingOnHover}}))),e===window.YT.PlayerState.PAUSED&&(this.onPause(),this.dispatchEvent(new CustomEvent("youtube-paused",{bubbles:!0})),this._playingOnHover&&(this._player.playVideo(),this._player.unMute(),this._playingOnHover=!1,this._userEngaged=!0))}},{key:"onPlay",value:function(){this.meta.setAttribute("data-playing","true")}},{key:"onPause",value:function(){this.meta.removeAttribute("data-playing","true")}},{key:"adjustVideoLeadHeight",value:function(){var t=document.querySelector(".VideoLeadBackground"),e=d
2ocument.querySelector(".KalturaVideoLead"),i=document.querySelector(".VideoLeadPoster"),n=document.querySelector(".VideoLead");if(t){var r=this.offsetHeight;t.style.height=r+"px"}if(e){var s=this.offsetHeight;e.style.height=s+"px"}if(i){var a=this.offsetHeight;i.style.height=a+"px"}if(n){var o=this.offsetHeight;n.style.height=o+"px"}}}]),o}(at);var yi=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"attributeChangedCallback",value:function(){this.expanded?document.body.setAttribute("data-playlist-expanded",""):document.body.removeAttribute("data-playlist-expanded")}},{key:"connectedCallback",value:function(){this.playlistItems=T(this.querySelectorAll("ps-playlist-item")),this.setState(),this.addEventListener(ze,this),this.addEventListener("click",this),addEventListener(rt.ended,this)}},{key:"handleEvent",value:function(t){t.type===rt.ended&&this.onEnded(t),"click"===t.type&&this.onClick(t),t.type===ze&&this.onLoadVideo(t)}},{key:"onEnded",value:function(t){if(!t.target.companionOpen){var e=this.playlistItems.findIndex(function(t){return t.isCurrent});e<this.playlistItems.length-1&&this.playlistItems[e+1].load()}}},{key:"onClick",value:function(t){(t.target.matches(".Playlist-header")||t.target.closest(".Playlist-header"))&&(this.expanded=!this.expanded)}},{key:"disconnectedCallback",value:function(){this.removeEventListener(ze,this),this.removeEventListener("click",this),removeEventListener(rt.ended,this)}},{key:"setState",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.playlistItems&&this.playlistItems.forEach(function(e,i){e.isCurrent=i===t,e.expanded=e.isCurrent})}},{key:"onLoadVideo",value:function(t){var e=this;this.expanded=!1,fetch(t.detail.url).then(function(t){return t.text()}).then(function(t){return e.responseHanlder(t)}).then(function(){return e.setState(e.playlistItems.indexOf(t.target))})}},{key:"responseHanlder",value:function(t){var e=(new DOMParser).parseFromString(t,"text/html").documentElement.querySelector("[data-video-content-wrapper]"),i=e.querySelector("[data-body-content-companions]"),n=document.querySelectorAll("[data-body-content-companions] [data-body-content-companions-group]"),r=document.querySelector("[data-video-content-wrapper]");r.parentElement.replaceChild(e,r),i.innerHTML="";var s=i.dataset.contentId;n.forEach(function(t){t.dataset.contentId===s?t.setAttribute("data-active",""):t.removeAttribute("data-active"),i.appendChild(t)})}},{key:"expanded",get:function(){return this.hasAttribute("expanded")},set:function(t){t?this.setAttribute("expanded",""):this.removeAttribute("expanded")}}],[{key:"observedAttributes",get:function(){return["expanded"]}}]),a}(G(HTMLElement)),vi=__webpack_require__(931),bi=__webpack_require__.n(vi);var Si=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"dataForm",get:function(){return this.querySelector("#dataForm")}},{key:"connectedCallback",value:function(){this.addEventListener("click",this)}},{key:"beginEditting",value:function(){var t=new(bi().modal)({onClose:function(){t.destroy()},beforeOpen:function(){var e=document.querySelector(".tingle-modal__close"),i=e.querySelector("svg"),n=document.createElementNS("http://www.w3.org/2000/svg","svg"),r=document.createElementNS("http://www.w3.org/2000/svg","use");r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href","#close-x"),n.appendChild(r),i.parentNode.replaceChild(n,i);var s=t.getContent();s.parentNode.insertBefore(e,s)}});t.setContent(this.dataForm.content.cloneNode(!0)),t.open()}},{key:"handleEvent",value:function(t){t.target.closest(".UserProfilePage-editButton")&&this.beginEditting()}}]),a}(G(HTMLElement));var Ei=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"plyrContainerElement",get:function(){return this.querySelector("div")}},{key:"connectedCallback",value:function(){var t=this;J(q(a.prototype),"connectedCallback",this).call(this),this.plyr&&(this.plyr.source={type:"video",sources:[{src:this.videoId,provider:"vimeo"}]}),this.plyr&&this.state&&(this.plyr.autoplay=this.state.playing,this.plyr.once("ready",function(){t.plyr.embed.setCurrentTime(t.state.currentTime),t.plyr.muted=t.state.muted}))}}]),a}(ut);var ki=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}
2return r(a,[{key:"connectedCallback",value:function(){this.poster=this.querySelector(".VideoLeadPoster-poster-content"),this.videoPlayerTarget=this.querySelector("[data-player-target]"),this.youTubeVideo=this.querySelector(".YouTubeVideoPlayer iframe"),this.youTubeVideoPlayBtn=this.querySelector(".VideoLeadBackground-playButton"),this.autoPlayYouTube=this.querySelector(".VideoLeadBackground .YouTubeVideoPlayer iframe"),this.addEventListener(rt.ready,this),this.addEventListener(rt.playing,this),this.addEventListener(rt.pause,this),this.addEventListener("click",this),this.autoPlayYoutubeVideo(),this.hideAdditionalPlayButtonForYoutube()}},{key:"handleEvent",value:function(t){t.type===rt.ready&&(this.ready=!0,this.player=t.target,this.player.autoplay?this.setAttribute("data-video-state","playing"):this.setAttribute("data-video-state","paused")),t.type===rt.playing&&(this.playing=!0,this.setAttribute("data-video-state","playing")),t.type===rt.pause&&this.setAttribute("data-video-state","paused"),"click"===t.type&&t.target.matches(".videoPlayButton, .videoPauseButton")&&(this.player&&(this.player.playing?(this.player.pause(),this.videoPlayerTarget.classList.remove("isPlaying"),this.setAttribute("data-video-state","paused")):(this.player.play(),this.videoPlayerTarget.classList.add("isPlaying"),this.setAttribute("data-video-state","playing"))),this.youTubeVideo&&(this.youTubeVideo.src+="&mute=1&autoplay=1",this.videoPlayerTarget.classList.add("isPlaying"),this.setAttribute("data-video-state","playing")))}},{key:"ready",get:function(){return this.hasAttribute("ready")},set:function(t){t?this.setAttribute("ready",""):this.removeAttribute("ready")}},{key:"playing",get:function(){return this.hasAttribute("playing")},set:function(t){t?this.setAttribute("playing",""):this.removeAttribute("playing")}},{key:"autoPlayYoutubeVideo",value:function(){this.autoPlayYouTube&&this.youTubeVideoPlayBtn&&this.youTubeVideoPlayBtn.click()}},{key:"hideAdditionalPlayButtonForYoutube",value:function(){var t=this.querySelector(".YouTubeVideoPlayer"),e=this.querySelector(".VideoLeadBackground-controls");t&&(console.log("hiding additional controls"),e.style.display="none")}}]),a}(G(HTMLElement));var xi=function(e){V(o,e);var i,n,s,a=(n=o,s=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(n);if(s){var i=q(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return H(this,t)});function o(){return t(this,o),a.apply(this,arguments)}return r(o,[{key:"connectedCallback",value:function(){this._userEngaged=!1,this._enteringFullscreen=!1,this.promoWrapper=this.querySelector(".VideoPromo-player-wrapper"),this.player=this.querySelector(".plyr"),this.videoElement=this.querySelector("video"),this.videoElementWrapper=this.querySelector(".plyr"),this.durationElement=this.querySelector(".VideoPromo-player-meta-duration"),this.isHtml5Video=null!==this.videoElement,this.isYoutubeVideo=null!==this.querySelector(".YouTubeVideoPlayer"),this.youtubePlayer=this.querySelector("ps-youtubeplayer"),oe.desktop.includes(le())&&this.playOnHover(),this.playOnClick(),this.initializeDuration(),this.identifyPlayerType(),this.setupFullscreenListeners()}},{key:"initializeDuration",value:(i=_e(Te().mark(function t(){var e;return Te().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,this.waitForMetadata();case 3:e=this.videoElement?.duration,this.showDuration(e),t.next=10;break;case 7:t.prev=7,t.t0=t.catch(0),console.warn("Failed to initialize duration:",t.t0);case 10:case"end":return t.stop()}},t,this,[[0,7]])})),function(){return i.apply(this,arguments)})},{key:"waitForMetadata",value:function(){var t=this;return new Promise(function(e){t.videoElement?t.videoElement.readyState>=1?e():t.videoElement.addEventListener("loadedmetadata",function(){return e()}):e()})}},{key:"playOnHover",value:function(){this.videoElement&&(this.addEventListener("mouseenter",this.playHoverVideo),this.addEventListener("mouseleave",this.pauseHoverVideo))}},{key:"playHoverVideo",value:function(){var t=this;if(this.videoElement){if(this.videoElement.readyState<2)return void console.log("Video not ready for hover play - readyState:",this.videoElement.readyState,"src:",this.videoElement.currentSrc);var e=!this.videoElement.paused,i=this.videoElement.muted;document.querySelectorAll(".VideoPromo").forEach(function(e){var i=e.querySelector("video");if(i&&i!==t.videoElement){var n=!i.paused,r=i.muted;n&&r&&i.pause()}}),e&&!i||(this.videoElement.play(),this.videoElement.muted=!0)}}},{key:"setupFullscreenListeners",value:function(){var t=this;if(this.player){var e=this.player.querySelector(".VideoPlayerControls-fullscreenToggle");e?e.addEventListener("click",function(){t._enteringFullscreen=!0,t._inFullscreen=!1,setTimeout(function(){t._enteringFullscreen=!1},500)}):setTimeout(function(){var e=t.player.querySelector(".VideoPlayerControls-fullscreenToggle");e&&e.addEventListener("click",function(){t._enteringFullscreen=!0,t._inFullscreen=!1,setTimeout(function(){t._enteringFullscreen=!1},500)})},1e3)}var i=function(){(document.fullscreenElement||document.webkitFullscreenElement)&&t.player&&(t.player===document.fullscreenElement||t.player.contains(document.fullscreenElement))?t._inFullscreen=!0:t._inFullscreen&&(t._inFullscreen=!1)};
2document.addEventListener("fullscreenchange",i),document.addEventListener("webkitfullscreenchange",i)}},{key:"pauseHoverVideo",value:function(){if(this.videoElement){var t=!this.videoElement.paused,e=this.videoElement.muted,i=this.querySelector(".plyr"),n=i&&i.classList.contains("plyr--fullscreen");!t||!e||n||this._enteringFullscreen||this._inFullscreen||this.videoElement.pause()}}},{key:"pauseAllVideos",value:function(){var t=this;document.querySelectorAll(".VideoPromo").forEach(function(e){var i=e.querySelector("video");i&&i!==t.videoElement&&i.pause()}),document.querySelectorAll("ps-youtubeplayer").forEach(function(e){var i=e;i&&i!==t.youtubePlayer&&(i._playingOnHover&&(i._playingOnHover=!1),i._player&&"function"==typeof i._player.pauseVideo&&i._player.pauseVideo())})}},{key:"playOnClick",value:function(){var t=this;this.videoElement&&this.querySelector(".plyr__poster").addEventListener("click",function(e){t.player.classList.contains("plyr--playing")&&!1===t.videoElement.muted?t.isHtml5Video&&(e.preventDefault(),e.stopPropagation(),t.videoElement.pause()):t.isHtml5Video&&(setTimeout(function(){t.videoElement.play(),t.videoElement.muted=!1},10),t._userEngaged=!0,t.pauseAllVideos())}),this.isYoutubeVideo&&this.youtubePlayer&&this.youtubePlayer.addEventListener("youtube-playing",function(e){e.detail.isHoverPlay||t.pauseAllVideos()})}},{key:"showDuration",value:function(t){if(t&&this.durationElement){var e=j(t);this.durationElement.textContent=e}}},{key:"identifyPlayerType",value:function(){this.videoElement&&this.classList.add("html5-video"),this.youtubePlayer&&this.classList.add("youtube-video")}}]),o}(G(HTMLElement));var wi=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"attributeChangedCallback",value:function(){this.fixed?document.body.setAttribute("data-video-player-fixed",""):document.body.removeAttribute("data-video-player-fixed")}},{key:"connectedCallback",value:function(){this.addEventListener(rt.timeUpdate,this),this.addEventListener(rt.ready,this),this.addEventListener(rt.enterFullscreen,this),this.addEventListener(rt.exitFullscreen,this),document.addEventListener(St,this),document.addEventListener(bt,this),document.addEventListener(vt,this)}},{key:"handleEvent",value:function(t){"scroll"===t.type&&this.onScroll(),t.type===rt.timeUpdate&&(this.querySelector(".VideoPagePlayer-duration").innerHTML=j(t.target.duration),this.removeEventListener(rt.timeUpdate,this)),t.type===rt.ready&&("complete"===document.readyState?this.onLoad():window.addEventListener("load",this)),t.type===rt.enterFullscreen&&(this.isFullscreen=!0,this.fixed=!1),t.type===rt.exitFullscreen&&(this.isFullscreen=!1),"load"===t.type&&this.onLoad(),t.type===St&&(this.withCompanionExpanded=t.target.expanded),t.type===bt&&(this.withCompanion=!0),t.type===vt&&(this.withCompanionExpanded=!1,this.withCompanion=!1)}},{key:"onLoad",value:function(){document.addEventListener("scroll",this,!0),this.createPlaceholder();var t=document.querySelector("companion-content-viewer");t&&(this.withCompanion=!0,this.withCompanionExpanded=t.expanded)}},{key:"onScroll",value:function(){if(!this.isFullscreen){var t=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--totalHeaderHeight")),e=parseInt(getComputedStyle(document.documentElement).getPropertyValue("--miniPlayerHeight")),i=this.getBoundingClientRect().bottom<t+e;this.fixed=i}}},{key:"createPlaceholder",value:function(){this.placeholder=new Image(this.clientWidth,this.clientHeight),this.placeholder.style.width="100%",this.placeholder.classList.add("VideoPagePlayer-placeholder"),this.appendChild(this.placeholder)}},{key:"fixed",get:function(){return this.hasAttribute("fixed")},set:function(t){t?this.setAttribute("fixed",""):this.removeAttribute("fixed")}},{key:"withCompanion",get:function(){return this.hasAttribute("with-companion")},set:function(t){t?this.setAttribute("with-companion",""):this.removeAttribute("with-companion")}},{key:"withCompanionExpanded",get:function(){return this.hasAttribute("with-companion-expanded")},set:function(t){t?this.setAttribute("with-companion-expanded",""):this.removeAttribute("with-companion-expanded")}}],[{key:"observedAttributes",get:function(){return["fixed"]}}]),a}(G(HTMLElement)),_i=function(){function e(){t(this,e)}return r(e,null,[{key:"goToAnchor",value:function(t){var e=document.querySelector(t);if(e&&(e.scrollIntoView(),"hidden"===document.visibilityState)){var i=document.querySelector("#Page-header-bar");if(i){var n=window.pageYOffset;n&&window.scroll(0,n-i.offsetHeight)}}}},{key:"init",value:function(){var t=this;window.addEventListener("pageshow",function(){var e=window.location.hash;e&&t.goToAnchor(e)})}}]),e}();var Ci=function(e){V(l,e);var i,n,a,o=(n=l,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(n);if(a){var i=q(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return H(this,t)});function l(){var e;return t(this,l),s(z(e=o.call(this)),"destroyTimeline",function(t){return t.destroy()}),s(z(e),"resizeTimeline",function(){e.timeline.resize()}),Ct().Cell.prototype.renderPosition=function(t){var e=this.parent.originSide;this.element.style[e]=this.parent.getPositionValue(t)},e}
2return r(l,[{key:"connectedCallback",value:function(){var t=this;console.log(l.selectors),this.timelineItems=this.querySelector(l.selectors.timelineItems),console.log("timelineItems"),console.log(this.timelineItems),this.timelineNavigation=this.querySelector(l.selectors.timelineNavigation),console.log("timelineNavigation"),console.log(this.timelineNavigation),this.navItems=this.querySelectorAll(l.selectors.navItems),console.log("navItems"),console.log(this.navItems),this.initTimeline().then(function(){t.timelineEvents.forEach(function(e){return e.addEventListener("load",t.resizeTimeline)}),window.addEventListener("resize",O(250,function(){t.initTimeline()}))})}},{key:"disconnectedCallback",value:function(){var t=this;this.timelineEvents.forEach(function(e){return e.removeEventListener("load",t.resizeTimeline)}),window.removeEventListener("resize",O(250,function(){t.initTimeline()}))}},{key:"initTimeline",value:(i=_e(Te().mark(function t(){var e=this;return Te().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(console.log("timeline"),console.log(this.timeline),console.log("timelineEvents"),console.log(this.timelineEvents),!(this.timelineEvents.length<=1)){t.next=7;break}return console.log("length is < 1"),t.abrupt("return",null);case 7:if(this.timeline&&(console.log("found timeline"),this.destroyTimeline(this.timeline),delete this.timeline),this.timelineNav&&(console.log("found timeline nav"),this.destroyTimeline(this.timelineNav),this.listenerTracker.removeListeners(),delete this.timelineNav),this.timeline=new(Ct())(this.timelineItems,{cellAlign:"left",contain:!0,pageDots:!1,wrapAround:this.wrapAround,prevNextButtons:!0}),!this.timelineNavigation){t.next=14;break}return t.next=13,Promise.resolve().then(__webpack_require__.t.bind(__webpack_require__,5839,23));case 13:this.timelineNav=new(Ct())(this.timelineNavigation,{asNavFor:this.timelineItems,pageDots:!1,prevNextButtons:!1,wrapAround:!1,contain:!1,cellAlign:"center"});case 14:this.navItems&&this.navItems.forEach(function(t,i){e.listenerTracker.addListener(t,"click",function(){e.timeline.select(i)})}),this.timeline.on("change",function(t){var i=document.querySelector(".TimelineModule-title")?document.querySelector(".TimelineModule-title").innerText:null;i||(i=document.querySelector(".TimelineModuleCompact-title")?document.querySelector(".TimelineModuleCompact-title").innerText:null);var n=!!e.timeline&&e.timeline.selectedElement,r=n&&n.querySelector(".TimelineEventCard-title")?n.querySelector(".TimelineEventCard-title").innerText:null;e.timelineNav&&e.timelineNav.select(t),null===r&&(r=(n=!!e.timelineNav&&e.timelineNav.selectedElement)&&n.querySelector("span")?n.querySelector("span").innerText:null),e.previewNeighbors&&l.addNeighborPreview(e.timeline)}),this.timelineNav&&this.timelineNav.on("change",function(t){e.timeline.select(t)}),this.previewNeighbors&&l.addNeighborPreview(this.timeline);case 18:case"end":return t.stop()}},t,this)})),function(){return i.apply(this,arguments)})},{key:"timelineEvents",get:function(){return T(this.querySelectorAll(l.selectors.timelineItem))||[]}},{key:"wrapAround",get:function(){return!this.hasAttribute(l.selectors.noWraparound)}},{key:"previewNeighbors",get:function(){return this.hasAttribute(l.selectors.previewNeighbors)}}],[{key:"addNeighborPreview",value:function(t){var e=t.slides&&t.slides.length,i=t.selectedIndex,n=t.nextButton&&t.nextButton.element,r=t.prevButton&&t.prevButton.element;if(!(e&&n&&r&&e>i))return console.warn("Flickity instance must have a size, previous and next buttons, and a size greater than selected index."),!1;if(i>0){var s=l.getElementFromSlides(t,i-1),a=!!s&&s.querySelector(l.selectors.timelineCardTitle);r.innerText=a?a.innerText:""}if(e-1>i){var o=l.getElementFromSlides(t,i+1),h=!!o&&o.querySelector(l.selectors.timelineCardTitle);n.innerText=h?h.innerText:""}}},{key:"getElementFromSlides",value:function(t,e){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return!!(Array.isArray(t.slides)&&t.slides.length>e)&&!!(Array.isArray(t.slides[e].cells)&&t.slides[e].cells.length>i)&&t.slides[e].cells[i].element}}]),l}(G(HTMLElement));s(Ci,"selectors",{timelineNavigation:"[data-timeline-navigation]",navItems:".TimelineModule-nav-item",timelineItems:"[data-timeline-items]",timelineItem:"[data-timeline-item]",timelineCardTitle:".TimelineEventCard-title",noWraparound:"data-no-wraparound",previewNeighbors:"data-preview-neighbors"});var Ti=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){var e;return t(this,a),(e=s.call(this)).isIntersecting=!1,e}
2return r(a,[{key:"connectedCallback",value:function(){this.cacheElements(),this.initCarousel(),this.initIntersectionObserver(),this.preventCarouselRebuildDuringFullscreen(),this.setupMobileSlideChangeAutoplay()}},{key:"preventCarouselRebuildDuringFullscreen",value:function(){if(this.carouselInstance&&this.carouselInstance.rebuildCarouselIfChanged){var t=this.carouselInstance.rebuildCarouselIfChanged.bind(this.carouselInstance);this.carouselInstance.rebuildCarouselIfChanged=function(){document.fullscreenElement||document.webkitFullscreenElement||t()}}}},{key:"setupMobileSlideChangeAutoplay",value:function(){var t=this,e=function(){t.carouselInstance&&t.carouselInstance.flickity&&t.carouselInstance.flickity.on("change",function(){window.innerWidth<768&&(t.stopAllOtherVideos(),t.playCurrentSlideVideo())})};this.carouselInstance?.flickity?e():"complete"===document.readyState?setTimeout(e,100):window.addEventListener("load",function(){setTimeout(e,100)})}},{key:"playCurrentSlideVideo",value:function(){if(this.carouselInstance&&this.carouselInstance.flickity){var t=this.carouselInstance.flickity.selectedIndex,e=this.carouselInstance.flickity.cells[t];if(e&&e.element){var i=e.element.querySelector(".VideoPromo");if(i){var n=i.querySelector("video");if(n){var r=!n.paused,s=!n.muted;if(r&&s)return;n.muted=!0,n.play().catch(function(t){console.warn("Slide change autoplay failed:",t)})}}}}}},{key:"stopAllOtherVideos",value:function(){if(this.carouselInstance&&this.carouselInstance.flickity){var t=this.carouselInstance.flickity.selectedIndex;this.carouselInstance.flickity.cells.forEach(function(e,i){if(i!==t&&e&&e.element){var n=e.element.querySelector(".VideoPromo");if(n){var r=n.querySelector("video");if(r&&!r.paused){var s=r.closest(".plyr")?.contains(document.fullscreenElement);s||r.pause()}}}})}}},{key:"disconnectedCallback",value:function(){this.observer&&this.observer.disconnect()}},{key:"cacheElements",value:function(){this.carouselWrapper=this.querySelector(".ListVerticalVideoCarousel-carouselWrapper"),this.carouselElement=this.querySelector(".ListVerticalVideoCarousel-items"),this.carouselItems=this.querySelectorAll(".ListVerticalVideoCarousel-items-item")}},{key:"initCarousel",value:function(){this.carouselInstance=new Lt(this,{flickity:{default:{lazyLoad:!0,pageDots:!1,wrapAround:!0,groupCells:!1,autoPlay:!1,prevNextButtons:!0,contain:!0}}})}},{key:"initIntersectionObserver",value:function(){var t=this;this.carouselWrapper?(this.observer=new IntersectionObserver(function(e){e.forEach(function(e){t.isIntersecting=e.isIntersecting,e.isIntersecting&&t.autoPlayFirstVideoMutedWhenScrolledIntoView()})},{threshold:.1}),this.observer.observe(this.carouselWrapper)):console.log("Carousel wrapper not found")}},{key:"autoPlayFirstVideoMutedWhenScrolledIntoView",value:function(){var t=this.querySelector(".VideoPromo"),e=this.classList.contains("plyr--playing");if(t){var i=t.querySelector("video");i&&!e&&(i.muted=!0,i.play().catch(function(t){console.warn("Autoplay failed:",t)}))}}}]),a}(G(HTMLElement)),Ai={},Pi={},Di=0,Mi=0;function Li(){for(var t=document.querySelectorAll(".carousel-container"),e=function(e){var i=t[e].querySelector(".EnhancedCarousel-slides:not([flickity-index])"),n=t[e].querySelector(".carousel-nav-slides");t[e].setAttribute("flickity-index",Di),n&&(n.setAttribute("flickity-index",Di),Pi[Di]=new(Ct())(n,{imagesLoaded:!0,lazyLoad:!0,draggable:!1,groupCells:!1,adaptiveHeight:!1,prevNextButtons:!1,asNavFor:i,pageDots:!1,wrapAround:!1,contain:!0}));var r=t[e].parentNode.classList.toString().indexOf("Enhancement")>-1;t[e].classList.add(r?"enhancement-carousel":"published-carousel"),t[e].parentNode.classList.toString().indexOf("js-carousel-overlay");var s=t[e].classList.toString().indexOf("lead-carousel")>-1;t[e].setAttribute("carousel-wrapAround",s),Ai[Di]=new(Ct())(i,{arrowShape:{x0:25,x1:60,y1:35,x2:65,y2:30,x3:35},imagesLoaded:!0,lazyLoad:!0,groupCells:!0,draggable:!0,adaptiveHeight:!0,wrapAround:t[e].classList.toString().indexOf("lead-carousel")>-1,prevNextButtons:!0});var a=Ai[Di],o=t[e].querySelector(".last-index");o&&(o.innerText=a.cells.length),a.on("change",function(i){var n=t[e].querySelector(".current-index");
2n&&(n.innerText=i+1);var r=t[e].querySelectorAll(".carousel-next"),o=t[e].querySelectorAll(".carousel-prev");if("true"!==s.toString()){if(a.selectedIndex>0&&a.cells.length>0)for(Mi=0;Mi<o.length;Mi++)o[Mi].removeAttribute("disabled");else for(Mi=0;Mi<o.length;Mi++)o[Mi].setAttribute("disabled",!0);if(a.selectedIndex>=a.cells.length-1)for(Mi=0;Mi<r.length;Mi++)r[Mi].setAttribute("disabled",!0);else for(Mi=0;Mi<r.length;Mi++)r[Mi].removeAttribute("disabled")}}),function(t){var e=t.querySelectorAll(".btn-carousel:not([listener-active])");if(e&&e.length>0)for(var i=function(){var i=e[n];i.addEventListener("click",function(e){var n=-1!==i.classList.toString().indexOf("carousel-next")?"next":"prev",r=t.getAttribute("flickity-index"),s=Ai[r];"next"===n?s.next():s.previous()},!1),i.setAttribute("listener-active",!0)},n=0;n<e.length;n++)i()}(t[e]),Di++},i=0;i<t.length;i++)e(i)}function Ri(){var t=document.querySelectorAll(".Enhancement .EnhancedCarousel"),e=window.innerWidth&&document.documentElement.clientWidth?Math.min(window.innerWidth,document.documentElement.clientWidth):window.innerWidth||document.documentElement.clientWidth||document.querySelector("body").clientWidth;if(t&&t.length>0)for(var i=0;i<t.length;i++){var n=t[i];n.classList.remove("viewport-sm"),e<768?(n.classList.add("viewport-sm"),n.style.width=e+"px"):n.style.width="100%"}}function Ii(){if("function"==typeof window.Event)window.dispatchEvent(new window.Event("resize"));else{var t=window.document.createEvent("UIEvents");t.initUIEvent("resize",!0,!1,window,0),window.dispatchEvent(t)}}window.addEventListener("resize",Ri,!0),"loading"!==document.readyState?(Li(),Ri(),setTimeout(function(){Ii()},1e3)):document.addEventListener("DOMContentLoaded",function(){Li(),Ri(),setTimeout(function(){Ii()},1e3)}),__webpack_require__(7549),__webpack_require__(6272);var Fi=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"visible",get:function(){return this.hasAttribute("data-visible")},set:function(t){t?this.setAttribute("data-visible",""):this.removeAttribute("data-visible")}},{key:"connectedCallback",value:function(){this.addEventListener("click",this),window.addEventListener("scroll",this,!0),this.lastScrollY=0,this.scorllDelta=0}},{key:"handleEvent",value:function(t){"scroll"===t.type&&this.onScroll(),"click"===t.type&&t.target.matches("button, button *")&&this.onClick()}},{key:"onScroll",value:function(){scrollY<this.lastScrollY&&this.scorllDelta>0&&(this.scorllDelta=0),scrollY>this.lastScrollY&&this.scorllDelta<0&&(this.scorllDelta=0),this.scorllDelta+=scrollY-this.lastScrollY,this.scorllDelta<-20&&(this.visible=!0),this.scorllDelta>20&&(this.visible=!1),scrollY<2*window.innerHeight&&(this.visible=!1),this.lastScrollY=scrollY}},{key:"onClick",value:function(){scrollTo({top:0,left:0,behavior:"smooth"})}}]),a}(G(HTMLElement)),Oi=["--hatDisplacementHeight","--headerDisplacementHeight","--bannerDisplacementHeight","--breadcrumbBarDisplacementHeight"],Bi=function(){var t=getComputedStyle(document.documentElement);return Oi.map(function(e){return parseInt(t.getPropertyValue(e))}).reduce(function(t,e){return t+e},0)};var Ni="Chapter:active",Vi=function(e){V(l,e);var i,n,s,a,o=(s=l,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(s);if(a){var i=q(this).constructor;t=Reflect.construct(e,arguments,i)}else t=e.apply(this,arguments);return H(this,t)});function l(){return t(this,l),o.apply(this,arguments)}
2return r(l,[{key:"connectedCallback",value:function(){document.addEventListener("click",this),this.addEventListener("click",this),document.addEventListener(Ni,this),window.addEventListener("popstate",this),this.setAnchorChaptersBehaviour(),this.isCurrent&&this.emit(Ni)}},{key:"setAnchorChaptersBehaviour",value:(n=_e(Te().mark(function t(){return Te().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return this.scrollDisplacement=Bi(),window.addEventListener("scroll",this,!0),window.addEventListener("resize",this),t.next=5,customElements.whenDefined(this.localName);case 5:this.anchorChapters=T(this.childChapters).filter(function(t){return!!t.anchorTarget}),this.setAnchorChaptersState(),this.anchorChapters.length>0?(window.addEventListener("scroll",this,!0),window.addEventListener("resize",this)):(window.removeEventListener("scroll",this,!0),window.removeEventListener("resize",this));case 8:case"end":return t.stop()}},t,this)})),function(){return n.apply(this,arguments)})},{key:"setAnchorChaptersState",value:function(){var t=this,e=this.anchorChapters.filter(function(t){return null!==t.anchorTarget.offsetParent}).reduce(function(e,i){return i.anchorTarget.getBoundingClientRect().top<=t.scrollDisplacement+1?i:e},null);this.querySelectorAll("[data-active]").forEach(function(t){t.removeAttribute("data-active")}),this.anchorChapters.forEach(function(t){t.isCurrent=t===e})}},{key:"handleEvent",value:function(t){"resize"===t.type&&this.onResize(),"scroll"===t.type&&this.onScroll(t),"click"===t.type&&this.onClick(t),"popstate"===t.type&&this.onPopstate(t),t.type===Ni&&this.onActive(t)}},{key:"header",get:function(){return this.querySelector(":scope > .Chapter-header")}},{key:"link",get:function(){return this.header.querySelector(".Chapter-title a")}},{key:"url",get:function(){if(this.link&&this.link.href)return new URL(this.link.href)}},{key:"isCurrent",get:function(){return this.hasAttribute("data-current")},set:function(t){t?this.setAttribute("data-current",""):this.removeAttribute("data-current")}},{key:"isExternal",get:function(){return this.hasAttribute("data-external")}},{key:"isExpanded",get:function(){return this.hasAttribute("data-expanded")},set:function(t){t?this.setAttribute("data-expanded",""):this.removeAttribute("data-expanded")}}
2,{key:"childChapters",get:function(){return this.querySelectorAll(":scope > ul > li > bsp-chapter")}},{key:"anchorTarget",get:function(){if(this.url){var t=this.url.hash;if(t){var e=document.querySelector(t);return this.url.pathname===location.pathname&&this.url.hash&&!e?null:e}}}},{key:"getContent",value:(i=_e(Te().mark(function t(){var e,i,n,r,s,a,o,l,h,c,u;return Te().wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.isCurrent){t.next=2;break}return t.abrupt("return");case 2:return(e=new URL(this.url)).searchParams.set("fragment",!0),t.next=6,fetch(e);case 6:return i=t.sent,t.next=9,i.text();case 9:n=t.sent,r=new DOMParser,s=r.parseFromString(n,"text/html"),a=s.querySelector("[data-copmanion-content]"),(o=document.querySelector("[data-copmanion-content]")).parentNode.replaceChild(a,o),l=s.querySelector("[data-supplementary-content]"),document.querySelector("[data-supplementary-content]").innerHTML=l.innerHTML,document.title=s.title,this.isCurrent=!0,this.emit(Ni),(h=e.hash&&e.hash.length>1?document.querySelector(e.hash):null)?h.scrollIntoView():(c=Bi()+40,u=a.getBoundingClientRect().top+document.documentElement.scrollTop-c,window.scrollY>u&&window.scrollTo(0,u),this.childChapters.length>0&&(this.isExpanded=!0),window.scrollTo({top:0,left:0,behavior:"smooth"})),document.body.dispatchEvent(new Event("Ajax:Rendered")),window.history.pushState({},"",this.url);case 25:case"end":return t.stop()}},t,this)})),function(){return i.apply(this,arguments)})},{key:"onClick",value:function(t){if(t.currentTarget===document){if(!this.url)return;var e=t.target.matches('a[href="'.concat(this.url,'"]'))?t.target:t.target.closest('a[href="'.concat(this.url,'"]'));if(!e)return;if(e.matches('[target="_blank]"'))return;if(location.href.split("#")[0]===e.href.split("#")[0])return;return t.preventDefault(),void this.getContent()}if(t.stopPropagation(),t.target.matches(".Chapter-icon, .Chapter-icon *"))this.isExpanded=!this.isExpanded;else if(!this.link&&this.childChapters.length>0&&t.target.matches(".Chapter-title, .Chapter-title *"))this.isExpanded=!0;else if(!t.metaKey&&!t.ctrlKey&&!this.anchorTarget){var i=this.closest("bsp-book");i&&i.hasAttribute("data-is-no-ajax")||this.isExternal||"_blank"===this.link.getAttribute("target")||(t.preventDefault(),this.getContent())}}},{key:"onActive",value:function(t){this.isCurrent=t.target===this,(t.target===this||this.contains(t.target))&&(this.isExpanded=!0),T(this.childChapters).includes(t.target)&&t.target.anchorTarget&&(this.isCurrent=!0),this.setAnchorChaptersBehaviour()}},{key:"onPopstate",value:function(t){null!==t.state&&this.href===location.protocol+"//"+location.host+location.pathname&&(t.stopPropagation(),this.getContent())}},{key:"onScroll",value:function(){this.setAnchorChaptersState()}},{key:"onResize",value:function(){this.scrollDisplacement=Bi()}},{key:"onNavigate",value:function(t){t.detail.href===this.href&&(t.stopImmediatePropagation(),t.detail.event.preventDefault(),this.getContent())}},{key:"emit",value:function(t){var e=new CustomEvent(t,{bubbles:!0,detail:arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}});this.dispatchEvent(e)}}]),l}(G(HTMLElement));var zi=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"attributeChangedCallback",value:function(){this.expanded?document.body.setAttribute("data-playlist-expanded",""):document.body.removeAttribute("data-playlist-expanded")}},{key:"connectedCallback",value:function(){this.addEventListener("click",this),this.addEventListener(Ni,this)}},{key:"handleEvent",value:function(t){"click"===t.type&&this.onClick(t)}},{key:"onClick",value:function(t){t.target.matches(".Book-header, .Book-header *")&&(this.expanded=!this.expanded)}},{key:"disconnectedCallback",value:function(){this.removeEventListener("click",this)}},{key:"expanded",get:function(){return this.hasAttribute("expanded")},set:function(t){t?this.setAttribute("expanded",""):this.removeAttribute("expanded")}}],[{key:"observedAttributes",get:function(){return["expanded"]}}]),a}(G(HTMLElement));function Hi(t){return t+.5|0}const qi=(t,e,i)=>Math.max(Math.min(t,i),e);function Ui(t){return qi(Hi(2.55*t),0,255)}function Gi(t){return qi(Hi(255*t),0,255)}function ji(t){return qi(Hi(t/2.55)/100,0,1)}function Wi(t){return qi(Hi(100*t),0,100)}const $i={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Yi=[..."0123456789ABCDEF"],Ki=t=>Yi[15&t],Xi=t=>Yi[(240&t)>>4]+Yi[15&t],Ji=t=>(240&t)>>4==(15&t);const Qi=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function Zi(t,e,i){const n=e*Math.min(i,1-i),r=(e,r=(e+t/30)%12)=>i-n*Math.max(Math.min(r-3,9-r,1),-1);return[r(0),r(8),r(4)]}function tn(t,e,i){const n=(n,r=(n+t/60)%6)=>i-i*e*Math.max(Math.min(r,4-r,1),0);return[n(5),n(3),n(1)]}function en(t,e,i){const n=Zi(t,1,.5);let r;for(e+i>1&&(r=1/(e+i),e*=r,i*=r),r=0;r<3;r++)n[r]*=1-e-i,n[r]+=e;return n}function nn(t){const e=t.r/255,i=t.g/255,n=t.b/255,r=Math.max(e,i,n),s=Math.min(e,i,n),a=(r+s)/2;let o,l,h;return r!==s&&(h=r-s,l=a>
vendor: 9,148 bytes, line 2
2.5?h/(2-r-s):h/(r+s),o=function(t,e,i,n,r){return t===r?(e-i)/n+(e<i?6:0):e===r?(i-t)/n+2:(t-e)/n+4}(e,i,n,h,r),o=60*o+.5),[0|o,l||0,a]}function rn(t,e,i,n){return(Array.isArray(e)?t(e[0],e[1],e[2]):t(e,i,n)).map(Gi)}function sn(t,e,i){return rn(Zi,t,e,i)}function an(t){return(t%360+360)%360}const on={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},ln={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};let hn;const cn=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/,un=t=>t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055,dn=t=>t<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4);function fn(t,e,i){if(t){let n=nn(t);n[e]=Math.max(0,Math.min(n[e]+n[e]*i,0===e?360:1)),n=sn(n),t.r=n[0],t.g=n[1],t.b=n[2]}}function pn(t,e){return t?Object.assign(e||{},t):t}function mn(t){var e={r:0,g:0,b:0,a:255};return Array.isArray(t)?t.length>=3&&(e={r:t[0],g:t[1],b:t[2],a:255},t.length>3&&(e.a=Gi(t[3]))):(e=pn(t,{r:0,g:0,b:0,a:1})).a=Gi(e.a),e}function gn(t){return"r"===t.charAt(0)?function(t){const e=cn.exec(t);let i,n,r,s=255;if(e){if(e[7]!==i){const t=+e[7];s=e[8]?Ui(t):qi(255*t,0,255)}return i=+e[1],n=+e[3],r=+e[5],i=255&(e[2]?Ui(i):qi(i,0,255)),n=255&(e[4]?Ui(n):qi(n,0,255)),r=255&(e[6]?Ui(r):qi(r,0,255)),{r:i,g:n,b:r,a:s}}}(t):function(t){const e=Qi.exec(t);let i,n=255;if(!e)return;e[5]!==i&&(n=e[6]?Ui(+e[5]):Gi(+e[5]));const r=an(+e[2]),s=+e[3]/100,a=+e[4]/100;return i="hwb"===e[1]?function(t,e,i){return rn(en,t,e,i)}(r,s,a):"hsv"===e[1]?function(t,e,i){return rn(tn,t,e,i)}(r,s,a):sn(r,s,a),{r:i[0],g:i[1],b:i[2],a:n}}(t)}class yn{constructor(t){if(t instanceof yn)return t;const e=typeof t;let i;var n,r,s;"object"===e?i=mn(t):"string"===e&&(s=(n=t).length,"#"===n[0]&&(4===s||5===s?r={r:255&17*$i[n[1]],g:255&17*$i[n[2]],b:255&17*$i[n[3]],a:5===s?17*$i[n[4]]:255}:7!==s&&9!==s||(r={r:$i[n[1]]<<4|$i[n[2]],g:$i[n[3]]<<4|$i[n[4]],b:$i[n[5]]<<4|$i[n[6]],a:9===s?$i[n[7]]<<4|$i[n[8]]:255})),i=r||function(t){hn||(hn=function(){const t={},e=Object.keys(ln),i=Object.keys(on);let n,r,s,a,o;for(n=0;n<e.length;n++){for(a=o=e[n],r=0;r<i.length;r++)s=i[r],o=o.replace(s,on[s]);s=parseInt(ln[a],16),t[o]=[s>>16&255,s>>8&255,255&s]}return t}(),hn.transparent=[0,0,0,0]);const e=hn[t.toLowerCase()];return e&&{r:e[0],g:e[1],b:e[2],a:4===e.length?e[3]:255}}(t)||gn(t)),this._rgb=i,this._valid=!!i}get valid(){return this._valid}get rgb(){var t=pn(this._rgb);return t&&(t.a=ji(t.a)),t}set rgb(t){this._rgb=mn(t)}rgbString(){return this._valid?(t=this._rgb)&&(t.a<255?`rgba(${t.r}, ${t.g}, ${t.b}, ${ji(t.a)})`:`rgb(${t.r}, ${t.g}, ${t.b})`):void 0;var t}hexString(){return this._valid?(t=this._rgb,e=(t=>Ji(t.r)&&Ji(t.g)&&Ji(t.b)&&Ji(t.a))(t)?Ki:Xi,t?"#"+e(t.r)+e(t.g)+e(t.b)+((t,e)=>t<255?e(t):"")(t.a,e):void 0):void 0;var t,e}hslString(){return this._valid?function(t){if(!t)return;const e=nn(t),i=e[0],n=Wi(e[1]),r=Wi(e[2]);return t.a<255?`hsla(${i}, ${n}%, ${r}%, ${ji(t.a)})`:`hsl(${i}, ${n}%, ${r}%)`}(this._rgb):void 0}mix(t,e){if(t){const i=this.rgb,n=t.rgb;let r;const s=e===r?.5:e,a=2*s-1,o=i.a-n.a,l=((a*o===-1?a:(a+o)/(1+a*o))+1)/2;r=1-l,i.r=255&l*i.r+r*n.r+.5,i.g=255&l*i.g+r*n.g+.5,i.b=255&l*i.b+r*n.b+.5,i.a=s*i.a+(1-s)*n.a,this.rgb=i}return this}interpolate(t,e){return t&&(this._rgb=function(t,e,i){const n=dn(ji(t.r)),r=dn(ji(t.g)),s=dn(ji(t.b));return{r:Gi(un(n+i*(dn(ji(e.r))-n))),g:Gi(un(r+i*(dn(ji(e.g))-r))),b:Gi(un(s+i*(dn(ji(e.b))-s))),a:t.a+i*(e.a-t.a)}}(this._rgb,t._rgb,e)),this}clone(){return new yn(this.rgb)}alpha(t){return this._rgb.a=Gi(t),this}clearer(t){return this._rgb.a*=1-t,this}greyscale(){const t=this._rgb,e=Hi(.3*t.r+.59*t.g+.11*t.b);return t.r=t.g=t.b=e,this}opaquer(t){return this._rgb.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return fn(this._rgb,2,t),this}darken(t){return fn(this._rgb,2,-t),this}saturate(t){return fn(this._rgb,1,t),this}desaturate(t){return fn(this._rgb,1,-t),this}rotate(t){return function(t,e){var i=nn(t);i[0]=an(i[0]+e),i=sn(i),t.r=i[0],t.g=i[1],t.b=i[2]}(this._rgb,t),this}}function vn(){}const bn=(()=>{let t=0;return()=>t++})();function Sn(t){return null==t}function En(t){if(Array.isArray&&Array.isArray(t))return!0;const e=Object.prototype.toString.call(t);return"[object"===e.slice(0,7)&&"Array]"===e.slice(-6)}function kn(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)}function xn(t){return("number"==typeof t||t instanceof Number)&&isFinite(+t)}function wn(t,e){return xn(t)?t:e}function _n(t,e){return void 0===t?e:t}function Cn(t,e,i){if(t&&"function"==typeof t.call)return t.apply(i,e)}function Tn(t,e,i,n){let r,s,a;if(En(t))if(s=t.length,n)for(r=s-1;r>=0;r--)e.call(i,t[r],r);else for(r=0;r<s;r++)e.call(i,t[r],r);else if(kn(t))for(a=Object.keys(t),s=a.length,r=0;r<s;r++)e.call(i,t[a[r]],a[r])}function An(t,e){let i,n,r,s;if(!t||!e||t.length!==e.length)return!1;for(i=0,n=t.length;i<n;++i)if(r=t[i],s=e[i],r.datasetIndex!==s.datasetIndex||r.index!==s.index)return!1;return!0}function Pn(t){if(En(t))return t.map(Pn);if(kn(t)){const e=Object.create(null),i=Object.keys(t),n=i.length;let r=0;for(;r<n;++r)e[i[r]]=Pn(t[i[r]]);return e}return t}function Dn(t){return-1===["__proto__","prototype","constructor"].indexOf(t)}function Mn(t,e,i,n){if(!Dn(t))return;const r=e[t],s=i[t];kn(r)&&kn(s)?Ln(r,s,n):e[t]=Pn(s)}function Ln(t,e,i){const n=En(e)?e:[e],r=n.length;if(!kn(t))return t;const s=(i=i||{}).merger||Mn;let a;for(let e=0;e<r;++e){if(a=n[e],!kn(a))continue;const r=Object.keys(a);for(let e=0,n=r.length;e<n;++e)s(r[e],t,a,i)}return t}function Rn(t,e){return Ln(t,e,{merger:In})}function In(t,e,i){if(!Dn(t))return;const n=e[t],r=i[t];kn(n)&&kn(r)?Rn(n,r):Object.prototype.hasOwnProperty.call(e,t)||(e[t]=Pn(r))}const Fn={"":t=>t,x:t=>t.x,y:t=>t.y};function On(t,e){const i=Fn[e]||(Fn[e]=function(t){const e=function(t){const e=t.split("."),i=[];let n="";for(const t of e)n+=t,n.endsWith("\\")?n=n.slice(0,-1)+".":(i.push(n),n="");return i}(t);return t=>{for(const i of e){if(""===i)break;t=t&&t[i]}return t}}(e));return i(t)}function Bn(t){return t.charAt(0).toUpperCase()+t.slice(1)}const Nn=t=>void 0!==t,Vn=t=>"function"==typeof t,zn=(t,e)=>{if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0},Hn=Math.PI,qn=2*Hn,Un=qn+Hn,Gn=Number.POSITIVE_INFINITY,jn=Hn/180,Wn=Hn/2,$n=Hn/4,Yn=2*Hn/3,Kn=Math.log10,Xn=Math.sign;function Jn(t,e,i){return Math.abs(t-e)<i}function Qn(t){const e=Math.round(t);t=Jn(t,e,t/1e3)?e:t;const i=Math.pow(10,Math.floor(Kn(t))),n=t/i;return(n<=1?1:n<=2?2:n<=5?5:10)*i}function Zn(t){return!function(t){return"symbol"==typeof t||"object"==typeof t&&null!==t&&!(Symbol.toPrimitive in t||"toString"in t||"valueOf"in t)}(t)&&!isNaN(parseFloat(t))&&isFinite(t)}
vendor: 4,986 bytes, line 2
2function tr(t){return t*(Hn/180)}function er(t){if(!xn(t))return;let e=1,i=0;for(;Math.round(t*e)/e!==t;)e*=10,i++;return i}function ir(t,e){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function nr(t,e){return(t-e+Un)%qn-Hn}function rr(t){return(t%qn+qn)%qn}function sr(t,e,i,n){const r=rr(t),s=rr(e),a=rr(i),o=rr(s-r),l=rr(a-r),h=rr(r-s),c=rr(r-a);return r===s||r===a||n&&s===a||o>l&&h<c}function ar(t,e,i){return Math.max(e,Math.min(i,t))}function or(t,e,i,n=1e-6){return t>=Math.min(e,i)-n&&t<=Math.max(e,i)+n}function lr(t,e,i){i=i||(i=>t[i]<e);let n,r=t.length-1,s=0;for(;r-s>1;)n=s+r>>1,i(n)?s=n:r=n;return{lo:s,hi:r}}const hr=(t,e,i,n)=>lr(t,i,n?n=>{const r=t[n][e];return r<i||r===i&&t[n+1][e]===i}:n=>t[n][e]<i),cr=(t,e,i)=>lr(t,i,n=>t[n][e]>=i),ur=["push","pop","shift","splice","unshift"];function dr(t,e){const i=t._chartjs;if(!i)return;const n=i.listeners,r=n.indexOf(e);-1!==r&&n.splice(r,1),n.length>0||(ur.forEach(e=>{delete t[e]}),delete t._chartjs)}const fr="undefined"==typeof window?function(t){return t()}:window.requestAnimationFrame;function pr(t,e){let i=[],n=!1;return function(...r){i=r,n||(n=!0,fr.call(window,()=>{n=!1,t.apply(e,i)}))}}const mr=t=>"start"===t?"left":"end"===t?"right":"center",gr=(t,e,i)=>"start"===t?e:"end"===t?i:(e+i)/2;const yr=t=>0===t||1===t,vr=(t,e,i)=>-Math.pow(2,10*(t-=1))*Math.sin((t-e)*qn/i),br=(t,e,i)=>Math.pow(2,-10*t)*Math.sin((t-e)*qn/i)+1,Sr={linear:t=>t,easeInQuad:t=>t*t,easeOutQuad:t=>-t*(t-2),easeInOutQuad:t=>(t/=.5)<1?.5*t*t:-.5*(--t*(t-2)-1),easeInCubic:t=>t*t*t,easeOutCubic:t=>(t-=1)*t*t+1,easeInOutCubic:t=>(t/=.5)<1?.5*t*t*t:.5*((t-=2)*t*t+2),easeInQuart:t=>t*t*t*t,easeOutQuart:t=>-((t-=1)*t*t*t-1),easeInOutQuart:t=>(t/=.5)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2),easeInQuint:t=>t*t*t*t*t,easeOutQuint:t=>(t-=1)*t*t*t*t+1,easeInOutQuint:t=>(t/=.5)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2),easeInSine:t=>1-Math.cos(t*Wn),easeOutSine:t=>Math.sin(t*Wn),easeInOutSine:t=>-.5*(Math.cos(Hn*t)-1),easeInExpo:t=>0===t?0:Math.pow(2,10*(t-1)),easeOutExpo:t=>1===t?1:1-Math.pow(2,-10*t),easeInOutExpo:t=>yr(t)?t:t<.5?.5*Math.pow(2,10*(2*t-1)):.5*(2-Math.pow(2,-10*(2*t-1))),easeInCirc:t=>t>=1?t:-(Math.sqrt(1-t*t)-1),easeOutCirc:t=>Math.sqrt(1-(t-=1)*t),easeInOutCirc:t=>(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1),easeInElastic:t=>yr(t)?t:vr(t,.075,.3),easeOutElastic:t=>yr(t)?t:br(t,.075,.3),easeInOutElastic(t){const e=.1125;return yr(t)?t:t<.5?.5*vr(2*t,e,.45):.5+.5*br(2*t-1,e,.45)},easeInBack(t){const e=1.70158;return t*t*((e+1)*t-e)},easeOutBack(t){const e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},easeInOutBack(t){let e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},easeInBounce:t=>1-Sr.easeOutBounce(1-t),easeOutBounce(t){const e=7.5625,i=2.75;return t<1/i?e*t*t:t<2/i?e*(t-=1.5/i)*t+.75:t<2.5/i?e*(t-=2.25/i)*t+.9375:e*(t-=2.625/i)*t+.984375},easeInOutBounce:t=>t<.5?.5*Sr.easeInBounce(2*t):.5*Sr.easeOutBounce(2*t-1)+.5};function Er(t){if(t&&"object"==typeof t){const e=t.toString();return"[object CanvasPattern]"===e||"[object CanvasGradient]"===e}return!1}function kr(t){return Er(t)?t:new yn(t)}function xr(t){return Er(t)?t:new yn(t).saturate(.5).darken(.1).hexString()}const wr=["x","y","borderWidth","radius","tension"],_r=["color","borderColor","backgroundColor"],Cr=new Map;function Tr(t,e,i){return function(t,e){e=e||{};const i=t+JSON.stringify(e);let n=Cr.get(i);return n||(n=new Intl.NumberFormat(t,e),Cr.set(i,n)),n}(e,i).format(t)}const Ar={values(t){return En(t)?t:""+t},numeric(t,e,i){if(0===t)return"0";const n=this.chart.options.locale;let r,s=t;if(i.length>1){const e=Math.max(Math.abs(i[0].value),Math.abs(i[i.length-1].value));(e<1e-4||e>1e15)&&(r="scientific"),s=function(t,e){let i=e.length>3?e[2].value-e[1].value:e[1].value-e[0].value;return Math.abs(i)>=1&&t!==Math.floor(t)&&(i=t-Math.floor(t)),i}(t,i)}const a=Kn(Math.abs(s)),o=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:r,minimumFractionDigits:o,maximumFractionDigits:o};return Object.assign(l,this.options.ticks.format),Tr(t,n,l)},logarithmic(t,e,i){if(0===t)return"0";const n=i[e].significand||t/Math.pow(10,Math.floor(Kn(t)));return[1,2,3,5,10,15].includes(n)||e>.8*i.length?Ar.numeric.call(this,t,e,i):""}};var Pr={formatters:Ar};const Dr=Object.create(null),Mr=Object.create(null);function Lr(t,e){if(!e)return t;const i=e.split(".");for(let e=0,n=i.length;e<n;++e){const n=i[e];t=t[n]||(t[n]=Object.create(null))}return t}function Rr(t,e,i){return"string"==typeof e?Ln(Lr(t,e),i):Ln(Lr(t,""),e)}class Ir{constructor(t,e){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=t=>t.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={}
vendor: 4,183 bytes, line 2
2,this.hoverBackgroundColor=(t,e)=>xr(e.backgroundColor),this.hoverBorderColor=(t,e)=>xr(e.borderColor),this.hoverColor=(t,e)=>xr(e.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(e)}set(t,e){return Rr(this,t,e)}get(t){return Lr(this,t)}describe(t,e){return Rr(Mr,t,e)}override(t,e){return Rr(Dr,t,e)}route(t,e,i,n){const r=Lr(this,t),s=Lr(this,i),a="_"+e;Object.defineProperties(r,{[a]:{value:r[e],writable:!0},[e]:{enumerable:!0,get(){const t=this[a],e=s[n];return kn(t)?Object.assign({},e,t):_n(t,e)},set(t){this[a]=t}}})}apply(t){t.forEach(t=>t(this))}}var Fr=new Ir({_scriptable:t=>!t.startsWith("on"),_indexable:t=>"events"!==t,hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[function(t){t.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),t.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>"onProgress"!==t&&"onComplete"!==t&&"fn"!==t}),t.set("animations",{colors:{type:"color",properties:_r},numbers:{type:"number",properties:wr}}),t.describe("animations",{_fallback:"animation"}),t.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>0|t}}}})},function(t){t.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})},function(t){t.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,e)=>e.lineWidth,tickColor:(t,e)=>e.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:Pr.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),t.route("scale.ticks","color","","color"),t.route("scale.grid","color","","borderColor"),t.route("scale.border","color","","borderColor"),t.route("scale.title","color","","color"),t.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&"callback"!==t&&"parser"!==t,_indexable:t=>"borderDash"!==t&&"tickBorderDash"!==t&&"dash"!==t}),t.describe("scales",{_fallback:"scale"}),t.describe("scale.ticks",{_scriptable:t=>"backdropPadding"!==t&&"callback"!==t,_indexable:t=>"backdropPadding"!==t})}]);function Or(t,e,i,n,r){let s=e[r];return s||(s=e[r]=t.measureText(r).width,i.push(r)),s>n&&(n=s),n}function Br(t,e,i){const n=t.currentDevicePixelRatio,r=0!==i?Math.max(i/2,.5):0;return Math.round((e-r)*n)/n+r}function Nr(t,e){(e||t)&&((e=e||t.getContext("2d")).save(),e.resetTransform(),e.clearRect(0,0,t.width,t.height),e.restore())}function Vr(t,e,i,n){zr(t,e,i,n,null)}function zr(t,e,i,n,r){let s,a,o,l,h,c,u,d;const f=e.pointStyle,p=e.rotation,m=e.radius;let g=(p||0)*jn;if(f&&"object"==typeof f&&(s=f.toString(),"[object HTMLImageElement]"===s||"[object HTMLCanvasElement]"===s))return t.save(),t.translate(i,n),t.rotate(g),t.drawImage(f,-f.width/2,-f.height/2,f.width,f.height),void t.restore();if(!(isNaN(m)||m<=0)){switch(t.beginPath(),f){default:r?t.ellipse(i,n,r/2,m,0,0,qn):t.arc(i,n,m,0,qn),t.closePath();break;case"triangle":c=r?r/2:m,t.moveTo(i+Math.sin(g)*c,n-Math.cos(g)*m),g+=Yn,t.lineTo(i+Math.sin(g)*c,n-Math.cos(g)*m),g+=Yn,t.lineTo(i+Math.sin(g)*c,n-Math.cos(g)*m),t.closePath();break;case"rectRounded":h=.516*m,l=m-h,a=Math.cos(g+$n)*l,u=Math.cos(g+$n)*(r?r/2-h:l),o=Math.sin(g+$n)*l,d=Math.sin(g+$n)*(r?r/2-h:l),t.arc(i-u,n-o,h,g-Hn,g-Wn),t.arc(i+d,n-a,h,g-Wn,g),t.arc(i+u,n+o,h,g,g+Wn),t.arc(i-d,n+a,h,g+Wn,g+Hn),t.closePath();break;
vendor: 17,356 bytes, line 2
2case"rect":if(!p){l=Math.SQRT1_2*m,c=r?r/2:l,t.rect(i-c,n-l,2*c,2*l);break}g+=$n;case"rectRot":u=Math.cos(g)*(r?r/2:m),a=Math.cos(g)*m,o=Math.sin(g)*m,d=Math.sin(g)*(r?r/2:m),t.moveTo(i-u,n-o),t.lineTo(i+d,n-a),t.lineTo(i+u,n+o),t.lineTo(i-d,n+a),t.closePath();break;case"crossRot":g+=$n;case"cross":u=Math.cos(g)*(r?r/2:m),a=Math.cos(g)*m,o=Math.sin(g)*m,d=Math.sin(g)*(r?r/2:m),t.moveTo(i-u,n-o),t.lineTo(i+u,n+o),t.moveTo(i+d,n-a),t.lineTo(i-d,n+a);break;case"star":u=Math.cos(g)*(r?r/2:m),a=Math.cos(g)*m,o=Math.sin(g)*m,d=Math.sin(g)*(r?r/2:m),t.moveTo(i-u,n-o),t.lineTo(i+u,n+o),t.moveTo(i+d,n-a),t.lineTo(i-d,n+a),g+=$n,u=Math.cos(g)*(r?r/2:m),a=Math.cos(g)*m,o=Math.sin(g)*m,d=Math.sin(g)*(r?r/2:m),t.moveTo(i-u,n-o),t.lineTo(i+u,n+o),t.moveTo(i+d,n-a),t.lineTo(i-d,n+a);break;case"line":a=r?r/2:Math.cos(g)*m,o=Math.sin(g)*m,t.moveTo(i-a,n-o),t.lineTo(i+a,n+o);break;case"dash":t.moveTo(i,n),t.lineTo(i+Math.cos(g)*(r?r/2:m),n+Math.sin(g)*m);break;case!1:t.closePath()}t.fill(),e.borderWidth>0&&t.stroke()}}function Hr(t,e,i){return i=i||.5,!e||t&&t.x>e.left-i&&t.x<e.right+i&&t.y>e.top-i&&t.y<e.bottom+i}function qr(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()}function Ur(t){t.restore()}function Gr(t,e,i,n,r){if(!e)return t.lineTo(i.x,i.y);if("middle"===r){const n=(e.x+i.x)/2;t.lineTo(n,e.y),t.lineTo(n,i.y)}else"after"===r!=!!n?t.lineTo(e.x,i.y):t.lineTo(i.x,e.y);t.lineTo(i.x,i.y)}function jr(t,e,i,n){if(!e)return t.lineTo(i.x,i.y);t.bezierCurveTo(n?e.cp1x:e.cp2x,n?e.cp1y:e.cp2y,n?i.cp2x:i.cp1x,n?i.cp2y:i.cp1y,i.x,i.y)}function Wr(t,e,i,n,r){if(r.strikethrough||r.underline){const s=t.measureText(n),a=e-s.actualBoundingBoxLeft,o=e+s.actualBoundingBoxRight,l=i-s.actualBoundingBoxAscent,h=i+s.actualBoundingBoxDescent,c=r.strikethrough?(l+h)/2:h;t.strokeStyle=t.fillStyle,t.beginPath(),t.lineWidth=r.decorationWidth||2,t.moveTo(a,c),t.lineTo(o,c),t.stroke()}}function $r(t,e){const i=t.fillStyle;t.fillStyle=e.color,t.fillRect(e.left,e.top,e.width,e.height),t.fillStyle=i}function Yr(t,e,i,n,r,s={}){const a=En(e)?e:[e],o=s.strokeWidth>0&&""!==s.strokeColor;let l,h;for(t.save(),t.font=r.string,function(t,e){e.translation&&t.translate(e.translation[0],e.translation[1]),Sn(e.rotation)||t.rotate(e.rotation),e.color&&(t.fillStyle=e.color),e.textAlign&&(t.textAlign=e.textAlign),e.textBaseline&&(t.textBaseline=e.textBaseline)}(t,s),l=0;l<a.length;++l)h=a[l],s.backdrop&&$r(t,s.backdrop),o&&(s.strokeColor&&(t.strokeStyle=s.strokeColor),Sn(s.strokeWidth)||(t.lineWidth=s.strokeWidth),t.strokeText(h,i,n,s.maxWidth)),t.fillText(h,i,n,s.maxWidth),Wr(t,i,n,h,s),n+=Number(r.lineHeight);t.restore()}function Kr(t,e){const{x:i,y:n,w:r,h:s,radius:a}=e;t.arc(i+a.topLeft,n+a.topLeft,a.topLeft,1.5*Hn,Hn,!0),t.lineTo(i,n+s-a.bottomLeft),t.arc(i+a.bottomLeft,n+s-a.bottomLeft,a.bottomLeft,Hn,Wn,!0),t.lineTo(i+r-a.bottomRight,n+s),t.arc(i+r-a.bottomRight,n+s-a.bottomRight,a.bottomRight,Wn,0,!0),t.lineTo(i+r,n+a.topRight),t.arc(i+r-a.topRight,n+a.topRight,a.topRight,0,-Wn,!0),t.lineTo(i+a.topLeft,n)}const Xr=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,Jr=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function Qr(t,e){const i=(""+t).match(Xr);if(!i||"normal"===i[1])return 1.2*e;switch(t=+i[2],i[3]){case"px":return t;case"%":t/=100}return e*t}const Zr=t=>+t||0;function ts(t,e){const i={},n=kn(e),r=n?Object.keys(e):e,s=kn(t)?n?i=>_n(t[i],t[e[i]]):e=>t[e]:()=>t;for(const t of r)i[t]=Zr(s(t));return i}function es(t){return ts(t,{top:"y",right:"x",bottom:"y",left:"x"})}function is(t){return ts(t,["topLeft","topRight","bottomLeft","bottomRight"])}function ns(t){const e=es(t);return e.width=e.left+e.right,e.height=e.top+e.bottom,e}function rs(t,e){t=t||{},e=e||Fr.font;let i=_n(t.size,e.size);"string"==typeof i&&(i=parseInt(i,10));let n=_n(t.style,e.style);n&&!(""+n).match(Jr)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const r={family:_n(t.family,e.family),lineHeight:Qr(_n(t.lineHeight,e.lineHeight),i),size:i,style:n,weight:_n(t.weight,e.weight),string:""};return r.string=function(t){return!t||Sn(t.size)||Sn(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family}(r),r}function ss(t,e,i,n){let r,s,a,o=!0;for(r=0,s=t.length;r<s;++r)if(a=t[r],void 0!==a&&(void 0!==e&&"function"==typeof a&&(a=a(e),o=!1),void 0!==i&&En(a)&&(a=a[i%a.length],o=!1),void 0!==a))return n&&!o&&(n.cacheable=!1),a}function as(t,e){return Object.assign(Object.create(t),e)}function os(t,e=[""],i,n,r=()=>t[0]){const s=i||t;void 0===n&&(n=vs("_fallback",t));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:t,_rootScopes:s,_fallback:n,_getTarget:r,override:i=>os([i,...t],e,s,n)};return new Proxy(a,{deleteProperty(e,i){return delete e[i],delete e._keys,delete t[0][i],!0},get(i,n){return ds(i,n,()=>function(t,e,i,n){let r;for(const s of e)if(r=vs(cs(s,t),i),void 0!==r)return us(t,r)?gs(i,n,t,r):r}(n,e,t,i))},getOwnPropertyDescriptor(t,e){return Reflect.getOwnPropertyDescriptor(t._scopes[0],e)},getPrototypeOf(){return Reflect.getPrototypeOf(t[0])},has(t,e){return bs(t).includes(e)},ownKeys(t){return bs(t)},set(t,e,i){const n=t._storage||(t._storage=r());return t[e]=n[e]=i,delete t._keys,!0}})}function ls(t,e,i,n){const r={_cacheable:!1,_proxy:t,_context:e,_subProxy:i,_stack:new Set,_descriptors:hs(t,n),setContext:e=>ls(t,e,i,n),override:r=>ls(t.override(r),e,i,n)};return new Proxy(r,{deleteProperty(e,i){return delete e[i],delete t[i],!0},get(t,e,i){return ds(t,e,()=>function(t,e,i){const{_proxy:n,_context:r,_subProxy:s,_descriptors:a}=t;let o=n[e];return Vn(o)&&a.isScriptable(e)&&(o=function(t,e,i,n){const{_proxy:r,_context:s,_subProxy:a,_stack:o}=i;if(o.has(t))throw new Error("Recursion detected: "+Array.from(o).join("->")+"->"+t);o.add(t);let l=e(s,a||n);return o.delete(t),us(t,l)&&(l=gs(r._scopes,r,t,l)),l}(e,o,t,i)),En(o)&&o.length&&(o=function(t,e,i,n){const{_proxy:r,_context:s,_subProxy:a,_descriptors:o}=i;if(void 0!==s.index&&n(t))return e[s.index%e.length];if(kn(e[0])){const i=e,n=r._scopes.filter(t=>t!==i);e=[];for(const l of i){const i=gs(n,r,t,l);e.push(ls(i,s,a&&a[t],o))}}return e}(e,o,t,a.isIndexable)),us(e,o)&&(o=ls(o,r,s&&s[e],a)),o}(t,e,i))},getOwnPropertyDescriptor(e,i){return e._descriptors.allKeys?Reflect.has(t,i)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(t,i)},getPrototypeOf(){return Reflect.getPrototypeOf(t)},has(e,i){return Reflect.has(t,i)},ownKeys(){return Reflect.ownKeys(t)},set(e,i,n){return t[i]=n,delete e[i],!0}})}function hs(t,e={scriptable:!0,indexable:!0}){const{_scriptable:i=e.scriptable,_indexable:n=e.indexable,_allKeys:r=e.allKeys}=t;return{allKeys:r,scriptable:i,indexable:n,isScriptable:Vn(i)?i:()=>i,isIndexable:Vn(n)?n:()=>n}}const cs=(t,e)=>t?t+Bn(e):e,us=(t,e)=>kn(e)&&"adapters"!==t&&(null===Object.getPrototypeOf(e)||e.constructor===Object);function ds(t,e,i){if(Object.prototype.hasOwnProperty.call(t,e)||"constructor"===e)return t[e];const n=i();return t[e]=n,n}function fs(t,e,i){return Vn(t)?t(e,i):t}const ps=(t,e)=>!0===t?e:"string"==typeof t?On(e,t):void 0;function ms(t,e,i,n,r){for(const s of e){const e=ps(i,s);if(e){t.add(e);const s=fs(e._fallback,i,r);if(void 0!==s&&s!==i&&s!==n)return s}else if(!1===e&&void 0!==n&&i!==n)return null}return!1}function gs(t,e,i,n){const r=e._rootScopes,s=fs(e._fallback,i,n),a=[...t,...r],o=new Set;o.add(n);let l=ys(o,a,i,s||i,n);return null!==l&&(void 0===s||s===i||(l=ys(o,a,s,l,n),null!==l))&&os(Array.from(o),[""],r,s,()=>function(t,e,i){const n=t._getTarget();e in n||(n[e]={});const r=n[e];return En(r)&&kn(i)?i:r||{}}(e,i,n))}function ys(t,e,i,n,r){for(;i;)i=ms(t,e,i,n,r);return i}function vs(t,e){for(const i of e){if(!i)continue;const e=i[t];if(void 0!==e)return e}}function bs(t){let e=t._keys;return e||(e=t._keys=function(t){const e=new Set;for(const i of t)for(const t of Object.keys(i).filter(t=>!t.startsWith("_")))e.add(t);return Array.from(e)}(t._scopes)),e}const Ss=Number.EPSILON||1e-14,Es=(t,e)=>e<t.length&&!t[e].skip&&t[e],ks=t=>"x"===t?"y":"x";function xs(t,e,i,n){const r=t.skip?e:t,s=e,a=i.skip?e:i,o=ir(s,r),l=ir(a,s);let h=o/(o+l),c=l/(o+l);h=isNaN(h)?0:h,c=isNaN(c)?0:c;const u=n*h,d=n*c;return{previous:{x:s.x-u*(a.x-r.x),y:s.y-u*(a.y-r.y)},next:{x:s.x+d*(a.x-r.x),y:s.y+d*(a.y-r.y)}}}function ws(t,e,i){return Math.max(Math.min(t,i),e)}function _s(t,e,i,n,r){let s,a,o,l;if(e.spanGaps&&(t=t.filter(t=>!t.skip)),"monotone"===e.cubicInterpolationMode)!function(t,e="x"){const i=ks(e),n=t.length,r=Array(n).fill(0),s=Array(n);let a,o,l,h=Es(t,0);for(a=0;a<n;++a)if(o=l,l=h,h=Es(t,a+1),l){if(h){const t=h[e]-l[e];r[a]=0!==t?(h[i]-l[i])/t:0}s[a]=o?h?Xn(r[a-1])!==Xn(r[a])?0:(r[a-1]+r[a])/2:r[a-1]:r[a]}!function(t,e,i){const n=t.length;let r,s,a,o,l,h=Es(t,0);for(let c=0;c<n-1;++c)l=h,h=Es(t,c+1),l&&h&&(Jn(e[c],0,Ss)?i[c]=i[c+1]=0:(r=i[c]/e[c],s=i[c+1]/e[c],o=Math.pow(r,2)+Math.pow(s,2),o<=9||(a=3/Math.sqrt(o),i[c]=r*a*e[c],i[c+1]=s*a*e[c])))}(t,r,s),function(t,e,i="x"){const n=ks(i),r=t.length;let s,a,o,l=Es(t,0);for(let h=0;h<r;++h){if(a=o,o=l,l=Es(t,h+1),!o)continue;const r=o[i],c=o[n];a&&(s=(r-a[i])/3,o[`cp1${i}`]=r-s,o[`cp1${n}`]=c-s*e[h]),l&&(s=(l[i]-r)/3,o[`cp2${i}`]=r+s,o[`cp2${n}`]=c+s*e[h])}}(t,s,e)}(t,r);else{let i=n?t[t.length-1]:t[0];for(s=0,a=t.length;s<a;++s)o=t[s],l=xs(i,o,t[Math.min(s+1,a-(n?0:1))%a],e.tension),o.cp1x=l.previous.x,o.cp1y=l.previous.y,o.cp2x=l.next.x,o.cp2y=l.next.y,i=o}e.capBezierPoints&&function(t,e){let i,n,r,s,a,o=Hr(t[0],e);for(i=0,n=t.length;i<n;++i)a=s,s=o,o=i<n-1&&Hr(t[i+1],e),s&&(r=t[i],a&&(r.cp1x=ws(r.cp1x,e.left,e.right),r.cp1y=ws(r.cp1y,e.top,e.bottom)),o&&(r.cp2x=ws(r.cp2x,e.left,e.right),r.cp2y=ws(r.cp2y,e.top,e.bottom)))}(t,i)}function Cs(){return"undefined"!=typeof window&&"undefined"!=typeof document}function Ts(t){let e=t.parentNode;return e&&"[object ShadowRoot]"===e.toString()&&(e=e.host),e}function As(t,e,i){let n;return"string"==typeof t?(n=parseInt(t,10),-1!==t.indexOf("%")&&(n=n/100*e.parentNode[i])):n=t,n}const Ps=t=>t.ownerDocument.defaultView.getComputedStyle(t,null),Ds=["top","right","bottom","left"];function Ms(t,e,i){const n={};i=i?"-"+i:"";for(let r=0;r<4;r++){const s=Ds[r];n[s]=parseFloat(t[e+"-"+s+i])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}function Ls(t,e){if("native"in t)return t;const{canvas:i,currentDevicePixelRatio:n}=e,r=Ps(i),s="border-box"===r.boxSizing,a=Ms(r,"padding"),o=Ms(r,"border","width"),{x:l,y:h,box:c}=function(t,e){const i=t.touches,n=i&&i.length?i[0]:t,{offsetX:r,offsetY:s}=n;let a,o,l=!1;if(((t,e,i)=>(t>0||e>0)&&(!i||!i.shadowRoot))(r,s,t.target))a=r,o=s;else{const t=e.getBoundingClientRect();a=n.clientX-t.left,o=n.clientY-t.top,l=!0}return{x:a,y:o,box:l}}(t,i),u=a.left+(c&&o.left),d=a.top+(c&&o.top);let{width:f,height:p}=e;return s&&(f-=a.width+o.width,p-=a.height+o.height),{x:Math.round((l-u)/f*i.width/n),y:Math.round((h-d)/p*i.height/n)}}const Rs=t=>Math.round(10*t)/10;function Is(t,e,i){const n=e||1,r=Rs(t.height*n),s=Rs(t.width*n);t.height=Rs(t.height),t.width=Rs(t.width);const a=t.canvas;return a.style&&(i||!a.style.height&&!a.style.width)&&(a.style.height=`${t.height}px`,a.style.width=`${t.width}px`),(t.currentDevicePixelRatio!==n||a.height!==r||a.width!==s)&&(t.currentDevicePixelRatio=n,a.height=r,a.width=s,t.ctx.setTransform(n,0,0,n,0,0),!0)}const Fs=function(){let t=!1;try{const e={get passive(){return t=!0,!1}};Cs()&&(window.addEventListener("test",null,e),window.removeEventListener("test",null,e))}catch(t){}return t}();function Os(t,e){const i=function(t,e){return Ps(t).getPropertyValue(e)}(t,e),n=i&&i.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Bs(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:t.y+i*(e.y-t.y)}}function Ns(t,e,i,n){return{x:t.x+i*(e.x-t.x),y:"middle"===n?i<.5?t.y:e.y:"after"===n?i<1?t.y:e.y:i>0?e.y:t.y}}function Vs(t,e,i,n){const r={x:t.cp2x,y:t.cp2y},s={x:e.cp1x,y:e.cp1y},a=Bs(t,r,i),o=Bs(r,s,i),l=Bs(s,e,i),h=Bs(a,o,i),c=Bs(o,l,i);return Bs(h,c,i)}function zs(t,e,i){return t?function(t,e){return{x(i){return t+t+e-i},setWidth(t){e=t},textAlign(t){return"center"===t?t:"right"===t?"left":"right"},xPlus(t,e){return t-e},leftForLtr(t,e){return t-e}}}(e,i):{x(t){return t},setWidth(t){},textAlign(t){return t},xPlus(t,e){return t+e},leftForLtr(t,e){return t}}}function Hs(t,e){let i,n;"ltr"!==e&&"rtl"!==e||(i=t.canvas.style,n=[i.getPropertyValue("direction"),i.getPropertyPriority("direction")],i.setProperty("direction",e,"important"),t.prevTextDirection=n)}function qs(t,e){void 0!==e&&(delete t.prevTextDirection,t.canvas.style.setProperty("direction",e[0],e[1]))}function Us(t){return"angle"===t?{between:sr,compare:nr,normalize:rr}:{between:or,compare:(t,e)=>t-e,normalize:t=>t}}function Gs({start:t,end:e,count:i,loop:n,style:r}){return{start:t%i,end:e%i,loop:n&&(e-t+1)%i==0,style:r}}function js(t,e,i){if(!i)return[t];const{property:n,start:r,end:s}=i,a=e.length,{compare:o,between:l,normalize:h}=Us(n),{start:c,end:u,loop:d,style:f}=function(t,e,i){const{property:n,start:r,end:s}=i,{between:a,normalize:o}=Us(n),l=e.length;let h,c,{start:u,end:d,loop:f}=t;if(f){for(u+=l,d+=l,h=0,c=l;h<c&&a(o(e[u%l][n]),r,s);++h)u--,d--;u%=l,d%=l}return d<u&&(d+=l),{start:u,end:d,loop:f,style:t.style}}(t,e,i),p=[];let m,g,y,v=!1,b=null;const S=()=>v||l(r,y,m)&&0!==o(r,y),E=()=>!v||0===o(s,m)||l(s,y,m);for(let t=c,i=c;t<=u;++t)g=e[t%a],g.skip||(m=h(g[n]),m!==y&&(v=l(m,r,s),null===b&&S()&&(b=0===o(m,r)?t:i),null!==b&&E()&&(p.push(Gs({start:b,end:t,loop:d,count:a,style:f})),b=null),i=t,y=m));return null!==b&&p.push(Gs({start:b,end:u,loop:d,count:a,style:f})),p}function Ws(t){return{backgroundColor:t.backgroundColor,borderCapStyle:t.borderCapStyle,borderDash:t.borderDash,borderDashOffset:t.borderDashOffset,borderJoinStyle:t.borderJoinStyle,borderWidth:t.borderWidth,borderColor:t.borderColor}}function $s(t,e){if(!e)return!1;const i=[],n=function(t,e){return Er(e)?(i.includes(e)||i.push(e),i.indexOf(e)):e};return JSON.stringify(t,n)!==JSON.stringify(e,n)}function Ys(t,e,i){return t.options.clip?t[i]:e[i]}class Ks{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,e,i,n){const r=e.listeners[n],s=e.duration;r.forEach(n=>n({chart:t,initial:e.initial,numSteps:s,currentStep:Math.min(i-e.start,s)}))}_refresh(){this._request||(this._running=!0,this._request=fr.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let e=0;this._charts.forEach((i,n)=>{if(!i.running||!i.items.length)return;const r=i.items;let s,a=r.length-1,o=!1;for(;a>=0;--a)s=r[a],s._active?(s._total>i.duration&&(i.duration=s._total),s.tick(t),o=!0):(r[a]=r[r.length-1],r.pop());o&&(n.draw(),this._notify(n,i,t,"progress")),r.length||(i.running=!1,this._notify(n,i,t,"complete"),i.initial=!1),e+=r.length}),this._lastDate=t,0===e&&(this._running=!1)}_getAnims(t){const e=this._charts;let i=e.get(t);return i||(i={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},e.set(t,i)),i}listen(t,e,i){this._getAnims(t).listeners[e].push(i)}add(t,e){e&&e.length&&this._getAnims(t).items.push(...e)}has(t){return this._getAnims(t).items.length>0}start(t){const e=this._charts.get(t);e&&(e.running=!0,e.start=Date.now(),e.duration=e.items.reduce((t,e)=>Math.max(t,e._duration),0),this._refresh())}running(t){if(!this._running)return!1;const e=this._charts.get(t);return!!(e&&e.running&&e.items.length)}stop(t){const e=this._charts.get(t);if(!e||!e.items.length)return;const i=e.items;let n=i.length-1;for(;n>=0;--n)i[n].cancel();e.items=[],this._notify(t,e,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var Xs=new Ks;const Js="transparent",Qs={boolean(t,e,i){return i>.5?e:t},color(t,e,i){const n=kr(t||Js),r=n.valid&&kr(e||Js);return r&&r.valid?r.mix(n,i).hexString():e},number(t,e,i){return t+(e-t)*i}};class Zs{constructor(t,e,i,n){const r=e[i];n=ss([t.to,n,r,t.from]);const s=ss([t.from,r,n]);this._active=!0,this._fn=t.fn||Qs[t.type||typeof s],this._easing=Sr[t.easing]||Sr.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=e,this._prop=i,this._from=s,this._to=n,this._promises=void 0}active(){return this._active}update(t,e,i){if(this._active){this._notify(!1);const n=this._target[this._prop],r=i-this._start,s=this._duration-r;this._start=i,this._duration=Math.floor(Math.max(s,t.duration)),this._total+=r,this._loop=!!t.loop,this._to=ss([t.to,e,n,t.from]),this._from=ss([t.from,n,e])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const e=t-this._start,i=this._duration,n=this._prop,r=this._from,s=this._loop,a=this._to;let o;if(this._active=r!==a&&(s||e<i),!this._active)return this._target[n]=a,void this._notify(!0);e<0?this._target[n]=r:(o=e/i%2,o=s&&o>1?2-o:o,o=this._easing(Math.min(1,Math.max(0,o))),this._target[n]=this._fn(r,a,o))}wait(){const t=this._promises||(this._promises=[]);return new Promise((e,i)=>{t.push({res:e,rej:i})})}_notify(t){const e=t?"res":"rej",i=this._promises||[];for(let t=0;t<i.length;t++)i[t][e]()}}class ta{constructor(t,e){this._chart=t,this._properties=new Map,this.configure(e)}configure(t){if(!kn(t))return;const e=Object.keys(Fr.animation),i=this._properties;Object.getOwnPropertyNames(t).forEach(n=>{const r=t[n];if(!kn(r))return;const s={};for(const t of e)s[t]=r[t];
vendor: 4,149 bytes, line 2
2(En(r.properties)&&r.properties||[n]).forEach(t=>{t!==n&&i.has(t)||i.set(t,s)})})}_animateOptions(t,e){const i=e.options,n=function(t,e){if(!e)return;let i=t.options;if(i)return i.$shared&&(t.options=i=Object.assign({},i,{$shared:!1,$animations:{}})),i;t.options=e}(t,i);if(!n)return[];const r=this._createAnimations(n,i);return i.$shared&&function(t,e){const i=[],n=Object.keys(e);for(let e=0;e<n.length;e++){const r=t[n[e]];r&&r.active()&&i.push(r.wait())}return Promise.all(i)}(t.options.$animations,i).then(()=>{t.options=i},()=>{}),r}_createAnimations(t,e){const i=this._properties,n=[],r=t.$animations||(t.$animations={}),s=Object.keys(e),a=Date.now();let o;for(o=s.length-1;o>=0;--o){const l=s[o];if("$"===l.charAt(0))continue;if("options"===l){n.push(...this._animateOptions(t,e));continue}const h=e[l];let c=r[l];const u=i.get(l);if(c){if(u&&c.active()){c.update(u,h,a);continue}c.cancel()}u&&u.duration?(r[l]=c=new Zs(u,t,l,h),n.push(c)):t[l]=h}return n}update(t,e){if(0===this._properties.size)return void Object.assign(t,e);const i=this._createAnimations(t,e);return i.length?(Xs.add(this._chart,i),!0):void 0}}function ea(t,e){const i=t&&t.options||{},n=i.reverse,r=void 0===i.min?e:0,s=void 0===i.max?e:0;return{start:n?s:r,end:n?r:s}}function ia(t,e){const i=[],n=t._getSortedDatasetMetas(e);let r,s;for(r=0,s=n.length;r<s;++r)i.push(n[r].index);return i}function na(t,e,i,n={}){const r=t.keys,s="single"===n.mode;let a,o,l,h;if(null===e)return;let c=!1;for(a=0,o=r.length;a<o;++a){if(l=+r[a],l===i){if(c=!0,n.all)continue;break}h=t.values[l],xn(h)&&(s||0===e||Xn(e)===Xn(h))&&(e+=h)}return c||n.all?e:0}function ra(t,e){const i=t&&t.options.stacked;return i||void 0===i&&void 0!==e.stack}function sa(t,e,i){const n=t[e]||(t[e]={});return n[i]||(n[i]={})}function aa(t,e,i,n){for(const r of e.getMatchingVisibleMetas(n).reverse()){const e=t[r.index];if(i&&e>0||!i&&e<0)return r.index}return null}function oa(t,e){const{chart:i,_cachedMeta:n}=t,r=i._stacks||(i._stacks={}),{iScale:s,vScale:a,index:o}=n,l=s.axis,h=a.axis,c=function(t,e,i){return`${t.id}.${e.id}.${i.stack||i.type}`}(s,a,n),u=e.length;let d;for(let t=0;t<u;++t){const i=e[t],{[l]:s,[h]:u}=i;d=(i._stacks||(i._stacks={}))[h]=sa(r,c,s),d[o]=u,d._top=aa(d,a,!0,n.type),d._bottom=aa(d,a,!1,n.type),(d._visualValues||(d._visualValues={}))[o]=u}}function la(t,e){const i=t.scales;return Object.keys(i).filter(t=>i[t].axis===e).shift()}function ha(t,e){const i=t.controller.index,n=t.vScale&&t.vScale.axis;if(n){e=e||t._parsed;for(const t of e){const e=t._stacks;if(!e||void 0===e[n]||void 0===e[n][i])return;delete e[n][i],void 0!==e[n]._visualValues&&void 0!==e[n]._visualValues[i]&&delete e[n]._visualValues[i]}}}const ca=t=>"reset"===t||"none"===t,ua=(t,e)=>e?t:Object.assign({},t);class da{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,e){this.chart=t,this._ctx=t.ctx,this.index=e,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=ra(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&ha(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,e=this._cachedMeta,i=this.getDataset(),n=(t,e,i,n)=>"x"===t?e:"r"===t?n:i,r=e.xAxisID=_n(i.xAxisID,la(t,"x")),s=e.yAxisID=_n(i.yAxisID,la(t,"y")),a=e.rAxisID=_n(i.rAxisID,la(t,"r")),o=e.indexAxis,l=e.iAxisID=n(o,r,s,a),h=e.vAxisID=n(o,s,r,a);e.xScale=this.getScaleForId(r),e.yScale=this.getScaleForId(s),e.rScale=this.getScaleForId(a),e.
vendor: 4,165 bytes, line 2
2iScale=this.getScaleForId(l),e.vScale=this.getScaleForId(h)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const e=this._cachedMeta;return t===e.iScale?e.vScale:e.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&dr(this._data,this),t._stacked&&ha(t)}_dataCheck(){const t=this.getDataset(),e=t.data||(t.data=[]),i=this._data;if(kn(e)){const t=this._cachedMeta;this._data=function(t,e){const{iScale:i,vScale:n}=e,r="x"===i.axis?"x":"y",s="x"===n.axis?"x":"y",a=Object.keys(t),o=new Array(a.length);let l,h,c;for(l=0,h=a.length;l<h;++l)c=a[l],o[l]={[r]:c,[s]:t[c]};return o}(e,t)}else if(i!==e){if(i){dr(i,this);const t=this._cachedMeta;ha(t),t._parsed=[]}e&&Object.isExtensible(e)&&((n=e)._chartjs?n._chartjs.listeners.push(this):(Object.defineProperty(n,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[this]}}),ur.forEach(t=>{const e="_onData"+Bn(t),i=n[t];Object.defineProperty(n,t,{configurable:!0,enumerable:!1,value(...t){const r=i.apply(this,t);return n._chartjs.listeners.forEach(i=>{"function"==typeof i[e]&&i[e](...t)}),r}})}))),this._syncList=[],this._data=e}var n}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const e=this._cachedMeta,i=this.getDataset();let n=!1;this._dataCheck();const r=e._stacked;e._stacked=ra(e.vScale,e),e.stack!==i.stack&&(n=!0,ha(e),e.stack=i.stack),this._resyncElements(t),(n||r!==e._stacked)&&(oa(this,e._parsed),e._stacked=ra(e.vScale,e))}configure(){const t=this.chart.config,e=t.datasetScopeKeys(this._type),i=t.getOptionScopes(this.getDataset(),e,!0);this.options=t.createResolver(i,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,e){const{_cachedMeta:i,_data:n}=this,{iScale:r,_stacked:s}=i,a=r.axis;let o,l,h,c=0===t&&e===n.length||i._sorted,u=t>0&&i._parsed[t-1];if(!1===this._parsing)i._parsed=n,i._sorted=!0,h=n;else{h=En(n[t])?this.parseArrayData(i,n,t,e):kn(n[t])?this.parseObjectData(i,n,t,e):this.parsePrimitiveData(i,n,t,e);const r=()=>null===l[a]||u&&l[a]<u[a];for(o=0;o<e;++o)i._parsed[o+t]=l=h[o],c&&(r()&&(c=!1),u=l);i._sorted=c}s&&oa(this,h)}parsePrimitiveData(t,e,i,n){const{iScale:r,vScale:s}=t,a=r.axis,o=s.axis,l=r.getLabels(),h=r===s,c=new Array(n);let u,d,f;for(u=0,d=n;u<d;++u)f=u+i,c[u]={[a]:h||r.parse(l[f],f),[o]:s.parse(e[f],f)};return c}parseArrayData(t,e,i,n){const{xScale:r,yScale:s}=t,a=new Array(n);let o,l,h,c;for(o=0,l=n;o<l;++o)h=o+i,c=e[h],a[o]={x:r.parse(c[0],h),y:s.parse(c[1],h)};return a}parseObjectData(t,e,i,n){const{xScale:r,yScale:s}=t,{xAxisKey:a="x",yAxisKey:o="y"}=this._parsing,l=new Array(n);let h,c,u,d;for(h=0,c=n;h<c;++h)u=h+i,d=e[u],l[h]={x:r.parse(On(d,a),u),y:s.parse(On(d,o),u)};return l}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,e,i){const n=this.chart,r=this._cachedMeta,s=e[t.axis];return na({keys:ia(n,!0),values:e._stacks[t.axis]._visualValues},s,r.index,{mode:i})}updateRangeFromParsed(t,e,i,n){const r=i[e.axis];let s=null===r?NaN:r;const a=n&&i._stacks[e.axis];n&&a&&(n.values=a,s=na(n,r,this._cachedMeta.index)),t.min=Math.min(t.min,s),t.max=Math.max(t.max,s)}getMinMax(t,e){const i=this._cachedMeta,n=i._parsed,r=i._sorted&&t===i.iScale,s=n.length,a=this._getOtherScale(t),o=((t,e,i)=>t&&!e.hidden&&e._stacked&&{keys:ia(i,!0),values:null})(e,i,this.chart),l={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:h,max:c}=function(t){const{min:e,max:i,minDefined:n,maxDefined:r}=t.getUserBounds();return{min:n?e:Number.NEGATIVE_INFINITY,max:r?i:Number.POSITIVE_INFINITY}}(a);let u,d;function f(){d=n[u];const e=d[a.axis];return!xn(d[t.axis])||h>e||c<e}for(u=0;u<s&&(f()||(this.updateRangeFromParsed(l,t,d,o),!r));++u);if(r)for(u=s-1;u>=0;--u)if(!f()){this.updateRangeFromParsed(l,t,d,o);break}return l}getAllParsedValues(t){const e=this._cachedMeta._parsed,i=[];let n,r,s;for(n=0,r=e.length;n<r;++n)s=e[n][t.axis],xn(s)&&i.push(s);return i}getMaxOverflow(){return!1}
vendor: 19,666 bytes, line 2
2getLabelAndValue(t){const e=this._cachedMeta,i=e.iScale,n=e.vScale,r=this.getParsed(t);return{label:i?""+i.getLabelForValue(r[i.axis]):"",value:n?""+n.getLabelForValue(r[n.axis]):""}}_update(t){const e=this._cachedMeta;this.update(t||"default"),e._clip=function(t){let e,i,n,r;return kn(t)?(e=t.top,i=t.right,n=t.bottom,r=t.left):e=i=n=r=t,{top:e,right:i,bottom:n,left:r,disabled:!1===t}}(_n(this.options.clip,function(t,e,i){if(!1===i)return!1;const n=ea(t,i),r=ea(e,i);return{top:r.end,right:n.end,bottom:r.start,left:n.start}}(e.xScale,e.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,e=this.chart,i=this._cachedMeta,n=i.data||[],r=e.chartArea,s=[],a=this._drawStart||0,o=this._drawCount||n.length-a,l=this.options.drawActiveElementsOnTop;let h;for(i.dataset&&i.dataset.draw(t,r,a,o),h=a;h<a+o;++h){const e=n[h];e.hidden||(e.active&&l?s.push(e):e.draw(t,r))}for(h=0;h<s.length;++h)s[h].draw(t,r)}getStyle(t,e){const i=e?"active":"default";return void 0===t&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(i):this.resolveDataElementOptions(t||0,i)}getContext(t,e,i){const n=this.getDataset();let r;if(t>=0&&t<this._cachedMeta.data.length){const e=this._cachedMeta.data[t];r=e.$context||(e.$context=function(t,e,i){return as(t,{active:!1,dataIndex:e,parsed:void 0,raw:void 0,element:i,index:e,mode:"default",type:"data"})}(this.getContext(),t,e)),r.parsed=this.getParsed(t),r.raw=n.data[t],r.index=r.dataIndex=t}else r=this.$context||(this.$context=function(t,e){return as(t,{active:!1,dataset:void 0,datasetIndex:e,index:e,mode:"default",type:"dataset"})}(this.chart.getContext(),this.index)),r.dataset=n,r.index=r.datasetIndex=this.index;return r.active=!!e,r.mode=i,r}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,e){return this._resolveElementOptions(this.dataElementType.id,e,t)}_resolveElementOptions(t,e="default",i){const n="active"===e,r=this._cachedDataOpts,s=t+"-"+e,a=r[s],o=this.enableOptionSharing&&Nn(i);if(a)return ua(a,o);const l=this.chart.config,h=l.datasetElementScopeKeys(this._type,t),c=n?[`${t}Hover`,"hover",t,""]:[t,""],u=l.getOptionScopes(this.getDataset(),h),d=Object.keys(Fr.elements[t]),f=l.resolveNamedOptions(u,d,()=>this.getContext(i,n,e),c);return f.$shared&&(f.$shared=o,r[s]=Object.freeze(ua(f,o))),f}_resolveAnimations(t,e,i){const n=this.chart,r=this._cachedDataOpts,s=`animation-${e}`,a=r[s];if(a)return a;let o;if(!1!==n.options.animation){const n=this.chart.config,r=n.datasetAnimationScopeKeys(this._type,e),s=n.getOptionScopes(this.getDataset(),r);o=n.createResolver(s,this.getContext(t,i,e))}const l=new ta(n,o&&o.animations);return o&&o._cacheable&&(r[s]=Object.freeze(l)),l}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,e){return!e||ca(t)||this.chart._animationsDisabled}_getSharedOptions(t,e){const i=this.resolveDataElementOptions(t,e),n=this._sharedOptions,r=this.getSharedOptions(i),s=this.includeOptions(e,r)||r!==n;return this.updateSharedOptions(r,e,i),{sharedOptions:r,includeOptions:s}}updateElement(t,e,i,n){ca(n)?Object.assign(t,i):this._resolveAnimations(e,n).update(t,i)}updateSharedOptions(t,e,i){t&&!ca(e)&&this._resolveAnimations(void 0,e).update(t,i)}_setStyle(t,e,i,n){t.active=n;const r=this.getStyle(e,n);this._resolveAnimations(e,i,n).update(t,{options:!n&&this.getSharedOptions(r)||r})}removeHoverStyle(t,e,i){this._setStyle(t,i,"active",!1)}setHoverStyle(t,e,i){this._setStyle(t,i,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const e=this._data,i=this._cachedMeta.data;for(const[t,e,i]of this._syncList)this[t](e,i);this._syncList=[];const n=i.length,r=e.length,s=Math.min(r,n);s&&this.parse(0,s),r>n?this._insertElements(n,r-n,t):r<n&&this._removeElements(r,n-r)}_insertElements(t,e,i=!0){const n=this._cachedMeta,r=n.data,s=t+e;let a;const o=t=>{for(t.length+=e,a=t.length-1;a>=s;a--)t[a]=t[a-e]};for(o(r),a=t;a<s;++a)r[a]=new this.dataElementType;this._parsing&&o(n._parsed),this.parse(t,e),i&&this.updateElements(r,t,e,"reset")}updateElements(t,e,i,n){}_removeElements(t,e){const i=this._cachedMeta;if(this._parsing){const n=i._parsed.splice(t,e);i._stacked&&ha(i,n)}i.data.splice(t,e)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[e,i,n]=t;this[e](i,n)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,e){e&&this._sync(["_removeElements",t,e]);const i=arguments.length-2;i&&this._sync(["_insertElements",t,i])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function fa(t){const e=t.iScale,i=function(t,e){if(!t._cache.$bar){const i=t.getMatchingVisibleMetas(e);let n=[];for(let e=0,r=i.length;e<r;e++)n=n.concat(i[e].controller.getAllParsedValues(t));t._cache.$bar=function(t){const e=new Set(t);return e.size===t.length?t:Array.from(e)}(n.sort((t,e)=>t-e))}return t._cache.$bar}(e,t.type);let n,r,s,a,o=e._length;const l=()=>{32767!==s&&-32768!==s&&(Nn(a)&&(o=Math.min(o,Math.abs(s-a)||o)),a=s)};for(n=0,r=i.length;n<r;++n)s=e.getPixelForValue(i[n]),l();for(a=void 0,n=0,r=e.ticks.length;n<r;++n)s=e.getPixelForTick(n),l();return o}function pa(t,e,i,n){return En(t)?function(t,e,i,n){const r=i.parse(t[0],n),s=i.parse(t[1],n),a=Math.min(r,s),o=Math.max(r,s);let l=a,h=o;Math.abs(a)>Math.abs(o)&&(l=o,h=a),e[i.axis]=h,e._custom={barStart:l,barEnd:h,start:r,end:s,min:a,max:o}}(t,e,i,n):e[i.axis]=i.parse(t,n),e}function ma(t,e,i,n){const r=t.iScale,s=t.vScale,a=r.getLabels(),o=r===s,l=[];let h,c,u,d;for(h=i,c=i+n;h<c;++h)d=e[h],u={},u[r.axis]=o||r.parse(a[h],h),l.push(pa(d,u,s,h));return l}function ga(t){return t&&void 0!==t.barStart&&void 0!==t.barEnd}function ya(t,e,i,n){let r=e.borderSkipped;const s={};if(!r)return void(t.borderSkipped=s);if(!0===r)return void(t.borderSkipped={top:!0,right:!0,bottom:!0,left:!0});const{start:a,end:o,reverse:l,top:h,bottom:c}=function(t){let e,i,n,r,s;return t.horizontal?(e=t.base>t.x,i="left",n="right"):(e=t.base<t.y,i="bottom",n="top"),e?(r="end",s="start"):(r="start",s="end"),{start:i,end:n,reverse:e,top:r,bottom:s}}(t);"middle"===r&&i&&(t.enableBorderRadius=!0,(i._top||0)===n?r=h:(i._bottom||0)===n?r=c:(s[va(c,a,o,l)]=!0,r=h)),s[va(r,a,o,l)]=!0,t.borderSkipped=s}function va(t,e,i,n){var r,s,a;return n?(a=i,t=ba(t=(r=t)===(s=e)?a:r===a?s:r,i,e)):t=ba(t,e,i),t}function ba(t,e,i){return"start"===t?e:"end"===t?i:t}function Sa(t,{inflateAmount:e},i){t.inflateAmount="auto"===e?1===i?.33:0:e}function Ea(t,e,i,n){const{controller:r,data:s,_sorted:a}=t,o=r._cachedMeta.iScale,l=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null;if(o&&e===o.axis&&"r"!==e&&a&&s.length){const a=o._reversePixels?cr:hr;if(!n){const n=a(s,e,i);if(l){const{vScale:e}=r._cachedMeta,{_parsed:i}=t,s=i.slice(0,n.lo+1).reverse().findIndex(t=>!Sn(t[e.axis]));n.lo-=Math.max(0,s);const a=i.slice(n.hi).findIndex(t=>!Sn(t[e.axis]));n.hi+=Math.max(0,a)}return n}if(r._sharedOptions){const t=s[0],n="function"==typeof t.getRange&&t.getRange(e);if(n){const t=a(s,e,i-n),r=a(s,e,i+n);return{lo:t.lo,hi:r.hi}}}}return{lo:0,hi:s.length-1}}function ka(t,e,i,n,r){const s=t.getSortedVisibleDatasetMetas(),a=i[e];for(let t=0,i=s.length;t<i;++t){const{index:i,data:o}=s[t],{lo:l,hi:h}=Ea(s[t],e,a,r);for(let t=l;t<=h;++t){const e=o[t];e.skip||n(e,i,t)}}}function xa(t,e,i,n,r){const s=[];return r||t.isPointInArea(e)?(ka(t,i,e,function(i,a,o){(r||Hr(i,t.chartArea,0))&&i.inRange(e.x,e.y,n)&&s.push({element:i,datasetIndex:a,index:o})},!0),s):s}function wa(t,e,i,n,r,s){return s||t.isPointInArea(e)?"r"!==i||n?function(t,e,i,n,r,s){let a=[];const o=function(t){const e=-1!==t.indexOf("x"),i=-1!==t.indexOf("y");return function(t,n){const r=e?Math.abs(t.x-n.x):0,s=i?Math.abs(t.y-n.y):0;return Math.sqrt(Math.pow(r,2)+Math.pow(s,2))}}(i);let l=Number.POSITIVE_INFINITY;return ka(t,i,e,function(i,h,c){const u=i.inRange(e.x,e.y,r);if(n&&!u)return;const d=i.getCenterPoint(r);if(!s&&!t.isPointInArea(d)&&!u)return;const f=o(e,d);f<l?(a=[{element:i,datasetIndex:h,index:c}],l=f):f===l&&a.push({element:i,datasetIndex:h,index:c})}),a}(t,e,i,n,r,s):function(t,e,i,n){let r=[];return ka(t,i,e,function(t,i,s){const{startAngle:a,endAngle:o}=t.getProps(["startAngle","endAngle"],n),{angle:l}=function(t,e){const i=e.x-t.x,n=e.y-t.y,r=Math.sqrt(i*i+n*n);let s=Math.atan2(n,i);return s<-.5*Hn&&(s+=qn),{angle:s,distance:r}}(t,{x:e.x,y:e.y});sr(l,a,o)&&r.push({element:t,datasetIndex:i,index:s})}),r}(t,e,i,r):[]}function _a(t,e,i,n,r){const s=[],a="x"===i?"inXRange":"inYRange";let o=!1;return ka(t,i,e,(t,n,l)=>{t[a]&&t[a](e[i],r)&&(s.push({element:t,datasetIndex:n,index:l}),o=o||t.inRange(e.x,e.y,r))}),n&&!o?[]:s}var Ca={evaluateInteractionItems:ka,modes:{index(t,e,i,n){const r=Ls(e,t),s=i.axis||"x",a=i.includeInvisible||!1,o=i.intersect?xa(t,r,s,n,a):wa(t,r,s,!1,n,a),l=[];return o.length?(t.getSortedVisibleDatasetMetas().forEach(t=>{const e=o[0].index,i=t.data[e];i&&!i.skip&&l.push({element:i,datasetIndex:t.index,index:e})}),l):[]},dataset(t,e,i,n){const r=Ls(e,t),s=i.axis||"xy",a=i.includeInvisible||!1;let o=i.intersect?xa(t,r,s,n,a):wa(t,r,s,!1,n,a);if(o.length>0){const e=o[0].datasetIndex,i=t.getDatasetMeta(e).data;o=[];for(let t=0;t<i.length;++t)o.push({element:i[t],datasetIndex:e,index:t})}return o},point(t,e,i,n){return xa(t,Ls(e,t),i.axis||"xy",n,i.includeInvisible||!1)},nearest(t,e,i,n){const r=Ls(e,t),s=i.axis||"xy",a=i.includeInvisible||!1;return wa(t,r,s,i.intersect,n,a)},x(t,e,i,n){return _a(t,Ls(e,t),"x",i.intersect,n)},y(t,e,i,n){return _a(t,Ls(e,t),"y",i.intersect,n)}}};const Ta=["left","top","right","bottom"];function Aa(t,e){return t.filter(t=>t.pos===e)}function Pa(t,e){return t.filter(t=>-1===Ta.indexOf(t.pos)&&t.box.axis===e)}function Da(t,e){return t.sort((t,i)=>{const n=e?i:t,r=e?t:i;return n.weight===r.weight?n.index-r.index:n.weight-r.weight})}function Ma(t,e,i,n){return Math.max(t[i],e[i])+Math.max(t[n],e[n])}function La(t,e){t.top=Math.max(t.top,e.top),t.left=Math.max(t.left,e.left),t.bottom=Math.max(t.bottom,e.bottom),t.right=Math.max(t.right,e.right)}function Ra(t,e,i,n){const{pos:r,box:s}=i,a=t.maxPadding;if(!kn(r)){i.size&&(t[r]-=i.size);const e=n[i.stack]||{size:0,count:1};e.size=Math.max(e.size,i.horizontal?s.height:s.width),i.size=e.size/e.count,t[r]+=i.size}s.getPadding&&La(a,s.getPadding());const o=Math.max(0,e.outerWidth-Ma(a,t,"left","right")),l=Math.max(0,e.outerHeight-Ma(a,t,"top","bottom")),h=o!==t.w,c=l!==t.h;return t.w=o,t.h=l,i.horizontal?{same:h,other:c}:{same:c,other:h}}function Ia(t,e){const i=e.maxPadding;return function(t){const n={left:0,top:0,right:0,bottom:0};return t.forEach(t=>{n[t]=Math.max(e[t],i[t])}),n}(t?["left","right"]:["top","bottom"])}function Fa(t,e,i,n){const r=[];let s,a,o,l,h,c;for(s=0,a=t.length,h=0;s<a;++s){o=t[s],l=o.box,l.update(o.width||e.w,o.height||e.h,Ia(o.horizontal,e));const{same:a,other:u}=Ra(e,i,o,n);h|=a&&r.length,c=c||u,l.fullSize||r.push(o)}return h&&Fa(r,e,i,n)||c}function Oa(t,e,i,n,r){t.top=i,t.left=e,t.right=e+n,t.bottom=i+r,t.width=n,t.height=r}function Ba(t,e,i,n){const r=i.padding;let{x:s,y:a}=e;for(const o of t){const t=o.box,l=n[o.stack]||{count:1,placed:0,weight:1},h=o.stackWeight/l.weight||1;if(o.horizontal){const n=e.w*h,s=l.size||t.height;Nn(l.start)&&(a=l.start),t.fullSize?Oa(t,r.left,a,i.outerWidth-r.right-r.left,s):Oa(t,e.left+l.placed,a,n,s),l.start=a,l.placed+=n,a=t.bottom}else{const n=e.h*h,a=l.size||t.width;Nn(l.start)&&(s=l.start),t.fullSize?Oa(t,s,r.top,a,i.outerHeight-r.bottom-r.top):Oa(t,s,e.top+l.placed,a,n),l.start=s,l.placed+=n,s=t.right}}e.x=s,e.y=a}var Na={addBox(t,e){t.boxes||(t.boxes=[]),e.fullSize=e.fullSize||!1,e.position=e.position||"top",e.weight=e.weight||0,e._layers=e._layers||function(){return[{z:0,draw(t){e.draw(t)}}]},t.boxes.push(e)},removeBox(t,e){const i=t.boxes?t.boxes.indexOf(e):-1;-1!==i&&t.boxes.splice(i,1)},configure(t,e,i){e.fullSize=i.fullSize,e.position=i.position,e.weight=i.weight},update(t,e,i,n){if(!t)return;const r=ns(t.options.layout.padding),s=Math.max(e-r.width,0),a=Math.max(i-r.height,0),o=function(t){const e=function(t){const e=[];let i,n,r,s,a,o;for(i=0,n=(t||[]).length;i<n;++i)r=t[i],({position:s,options:{stack:a,stackWeight:o=1}}=r),e.push({index:i,box:r,pos:s,horizontal:r.isHorizontal(),weight:r.weight,stack:a&&s+a,stackWeight:o});return e}(t),i=Da(e.filter(t=>t.box.fullSize),!0),n=Da(Aa(e,"left"),!0),r=Da(Aa(e,"right")),s=Da(Aa(e,"top"),!0),a=Da(Aa(e,"bottom")),o=Pa(e,"x"),l=Pa(e,"y");return{fullSize:i,leftAndTop:n.concat(s),rightAndBottom:r.concat(l).concat(a).concat(o),chartArea:Aa(e,"chartArea"),vertical:n.concat(r).concat(l),horizontal:s.concat(a).concat(o)}}(t.boxes),l=o.vertical,h=o.horizontal;Tn(t.boxes,t=>{"function"==typeof t.beforeLayout&&t.beforeLayout()});const c=l.reduce((t,e)=>e.box.options&&!1===e.box.options.display?t:t+1,0)||1,u=Object.freeze({outerWidth:e,outerHeight:i,padding:r,availableWidth:s,availableHeight:a,vBoxMaxWidth:s/2/c,hBoxMaxHeight:a/2}),d=Object.assign({},r);La(d,ns(n));const f=Object.assign({maxPadding:d,w:s,h:a,x:r.left,y:r.top},r),p=function(t,e){const i=function(t){const e={};for(const i of t){const{stack:t,pos:n,stackWeight:r}=i;if(!t||!Ta.includes(n))continue;const s=e[t]||(e[t]={count:0,placed:0,weight:0,size:0});s.count++,s.weight+=r}return e}(t),{vBoxMaxWidth:n,hBoxMaxHeight:r}=e;let s,a,o;for(s=0,a=t.length;s<a;++s){o=t[s];const{fullSize:a}=o.box,l=i[o.stack],h=l&&o.stackWeight/l.weight;o.horizontal?(o.width=h?h*n:a&&e.availableWidth,o.height=r):(o.width=n,o.height=h?h*r:a&&e.availableHeight)}return i}(l.concat(h),u);Fa(o.fullSize,f,u,p),Fa(l,f,u,p),Fa(h,f,u,p)&&Fa(l,f,u,p),function(t){const e=t.maxPadding;function i(i){const n=Math.max(e[i]-t[i],0);return t[i]+=n,n}t.y+=i("top"),t.x+=i("left"),i("right"),i("bottom")}(f),Ba(o.leftAndTop,f,u,p),f.x+=f.w,f.y+=f.h,Ba(o.rightAndBottom,f,u,p),t.chartArea={left:f.left,top:f.top,right:f.left+f.w,bottom:f.top+f.h,height:f.h,width:f.w},Tn(o.chartArea,e=>{const i=e.box;Object.assign(i,t.chartArea),i.update(f.w,f.h,{left:0,top:0,right:0,bottom:0})})}};class Va{acquireContext(t,e){}releaseContext(t){return!1}addEventListener(t,e,i){}removeEventListener(t,e,i){}getDevicePixelRatio(){return 1}getMaximumSize(t,e,i,n){return e=Math.max(0,e||t.width),i=i||t.height,{width:e,height:Math.max(0,n?Math.floor(e/n):i)}}isAttached(t){return!0}updateConfig(t){}}class za extends Va{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Ha="$chartjs",qa={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Ua=t=>null===t||""===t,Ga=!!Fs&&{passive:!0};function ja(t,e,i){t&&t.canvas&&t.canvas.removeEventListener(e,i,Ga)}function Wa(t,e){for(const i of t)if(i===e||i.contains(e))return!0}function $a(t,e,i){const n=t.canvas,r=new MutationObserver(t=>{let e=!1;for(const i of t)e=e||Wa(i.addedNodes,n),e=e&&!Wa(i.removedNodes,n);e&&i()});return r.observe(document,{childList:!0,subtree:!0}),r}function Ya(t,e,i){const n=t.canvas,r=new MutationObserver(t=>{let e=!1;for(const i of t)e=e||Wa(i.removedNodes,n),e=e&&!Wa(i.addedNodes,n);e&&i()});return r.observe(document,{childList:!0,subtree:!0}),r}const Ka=new Map;let Xa=0;function Ja(){const t=window.devicePixelRatio;t!==Xa&&(Xa=t,Ka.forEach((e,i)=>{i.currentDevicePixelRatio!==t&&e()}))}function Qa(t,e,i){const n=t.canvas,r=n&&Ts(n);if(!r)return;const s=pr((t,e)=>{const n=r.clientWidth;i(t,e),n<r.clientWidth&&i()},window),a=new ResizeObserver(t=>{const e=t[0],i=e.contentRect.width,n=e.contentRect.height;0===i&&0===n||s(i,n)});return a.observe(r),function(t,e){Ka.size||window.addEventListener("resize",Ja),Ka.set(t,e)}(t,s),a}function Za(t,e,i){i&&i.disconnect(),"resize"===e&&function(t){Ka.delete(t),Ka.size||window.removeEventListener("resize",Ja)}(t)}function to(t,e,i){const n=t.canvas,r=pr(e=>{null!==t.ctx&&i(function(t,e){const i=qa[t.type]||t.type,{x:n,y:r}=Ls(t,e);return{type:i,chart:e,native:t,x:void 0!==n?n:null,y:void 0!==r?r:null}}(e,t))},t);return function(t,e,i){t&&t.addEventListener(e,i,Ga)}(n,e,r),r}class eo extends Va{acquireContext(t,e){const i=t&&t.getContext&&t.getContext("2d");return i&&i.canvas===t?(function(t,e){const i=t.style,n=t.getAttribute("height"),r=t.getAttribute("width");if(t[Ha]={initial:{height:n,width:r,style:{display:i.display,height:i.height,width:i.width}}},i.display=i.display||"block",i.boxSizing=i.boxSizing||"border-box",Ua(r)){const e=Os(t,"width");void 0!==e&&(t.width=e)}if(Ua(n))if(""===t.style.height)t.height=t.width/(e||2);else{const e=Os(t,"height");void 0!==e&&(t.height=e)}}(t,e),i):null}releaseContext(t){const e=t.canvas;if(!e[Ha])return!1;const i=e[Ha].initial;["height","width"].forEach(t=>{const n=i[t];Sn(n)?e.removeAttribute(t):e.setAttribute(t,n)});const n=i.style||{};return Object.keys(n).forEach(t=>{e.style[t]=n[t]}),e.width=e.width,delete e[Ha],!0}addEventListener(t,e,i){this.removeEventListener(t,e);const n=t.$proxies||(t.$proxies={}),r={attach:$a,detach:Ya,resize:Qa}[e]||to;n[e]=r(t,e,i)}removeEventListener(t,e){const i=t.$proxies||(t.$proxies={}),n=i[e];n&&(({attach:Za,detach:Za,resize:Za}[e]||ja)(t,e,n),i[e]=void 0)}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,e,i,n){return function(t,e,i,n){const r=Ps(t),s=Ms(r,"margin"),a=As(r.maxWidth,t,"clientWidth")||Gn,o=As(r.maxHeight,t,"clientHeight")||Gn,l=function(t,e,i){let n,r;if(void 0===e||void 0===i){const s=t&&Ts(t);if(s){const t=s.getBoundingClientRect(),a=Ps(s),o=Ms(a,"border","width"),l=Ms(a,"padding");e=t.width-l.width-o.width,i=t.height-l.height-o.height,n=As(a.maxWidth,s,"clientWidth"),r=As(a.maxHeight,s,"clientHeight")}else e=t.clientWidth,i=t.clientHeight}return{width:e,height:i,maxWidth:n||Gn,maxHeight:r||Gn}}(t,e,i);let{width:h,height:c}=l;if("content-box"===r.boxSizing){const t=Ms(r,"border","width"),e=Ms(r,"padding");h-=e.width+t.width,c-=e.height+t.height}return h=Math.max(0,h-s.width),c=Math.max(0,n?h/n:c-s.height),h=Rs(Math.min(h,a,l.maxWidth)),c=Rs(Math.min(c,o,l.maxHeight)),h&&!c&&(c=Rs(h/2)),(void 0!==e||void 0!==i)&&n&&l.height&&c>l.height&&(c=l.height,h=Rs(Math.floor(c*n))),{width:h,height:c}}(t,e,i,n)}isAttached(t){const e=t&&Ts(t);return!(!e||!e.isConnected)}}class io{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}hasValue(){return Zn(this.x)&&Zn(this.y)}getProps(t,e){const i=this.$animations;if(!e||!i)return this;const n={};return t.forEach(t=>{n[t]=i[t]&&i[t].active()?i[t]._to:this[t]}),n}}function no(t,e,i,n,r){const s=_n(n,0),a=Math.min(_n(r,t.length),t.length);let o,l,h,c=0;for(i=Math.ceil(i),r&&(o=r-n,i=o/Math.floor(o/i)),h=s;h<0;)c++,h=Math.round(s+c*i);for(l=Math.max(s,0);l<a;l++)l===h&&(e.push(t[l]),c++,h=Math.round(s+c*i))}const ro=(t,e,i)=>"top"===e||"left"===e?t[e]+i:t[e]-i,so=(t,e)=>Math.min(e||t,t);function ao(t,e){const i=[],n=t.length/e,r=t.length;let s=0;for(;s<r;s+=n)i.push(t[Math.floor(s)]);return i}function oo(t,e,i){const n=t.ticks.length,r=Math.min(e,n-1),s=t._startPixel,a=t._endPixel,o=1e-6;let l,h=t.getPixelForTick(r);if(!(i&&(l=1===n?Math.max(h-s,a-h):0===e?(t.getPixelForTick(1)-h)
vendor: 4,123 bytes, line 2
2/2:(h-t.getPixelForTick(r-1))/2,h+=r<e?l:-l,h<s-o||h>a+o)))return h}function lo(t){return t.drawTicks?t.tickLength:0}function ho(t,e){if(!t.display)return 0;const i=rs(t.font,e),n=ns(t.padding);return(En(t.text)?t.text.length:1)*i.lineHeight+n.height}function co(t,e,i){let n=mr(t);return(i&&"right"!==e||!i&&"right"===e)&&(n=(t=>"left"===t?"right":"right"===t?"left":t)(n)),n}class uo extends io{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,e){return t}getUserBounds(){let{_userMin:t,_userMax:e,_suggestedMin:i,_suggestedMax:n}=this;return t=wn(t,Number.POSITIVE_INFINITY),e=wn(e,Number.NEGATIVE_INFINITY),i=wn(i,Number.POSITIVE_INFINITY),n=wn(n,Number.NEGATIVE_INFINITY),{min:wn(t,i),max:wn(e,n),minDefined:xn(t),maxDefined:xn(e)}}getMinMax(t){let e,{min:i,max:n,minDefined:r,maxDefined:s}=this.getUserBounds();if(r&&s)return{min:i,max:n};const a=this.getMatchingVisibleMetas();for(let o=0,l=a.length;o<l;++o)e=a[o].controller.getMinMax(this,t),r||(i=Math.min(i,e.min)),s||(n=Math.max(n,e.max));return i=s&&i>n?n:i,n=r&&i>n?i:n,{min:wn(i,wn(n,i)),max:wn(n,wn(i,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Cn(this.options.beforeUpdate,[this])}update(t,e,i){const{beginAtZero:n,grace:r,ticks:s}=this.options,a=s.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=e,this._margins=i=Object.assign({left:0,right:0,top:0,bottom:0},i),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+i.left+i.right:this.height+i.top+i.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=function(t,e,i){const{min:n,max:r}=t,s=(l=(r-n)/2,"string"==typeof(o=e)&&o.endsWith("%")?parseFloat(o)/100*l:+o),a=(t,e)=>i&&0===t?0:t+e;var o,l;return{min:a(n,-Math.abs(s)),max:a(r,s)}}(this,r,n),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const o=a<this.ticks.length;this._convertTicksToLabels(o?ao(this.ticks,a):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),s.display&&(s.autoSkip||"auto"===s.source)&&(this.ticks=function(t,e){const i=t.options.ticks,n=function(t){const e=t.options.offset,i=t._tickSize(),n=t._length/i+(e?0:1),r=t._maxLength/i;return Math.floor(Math.min(n,r))}(t),r=Math.min(i.maxTicksLimit||n,n),s=i.major.enabled?function(t){const e=[];let i,n;for(i=0,n=t.length;i<n;i++)t[i].major&&e.push(i);return e}(e):[],a=s.length,o=s[0],l=s[a-1],h=[];if(a>
vendor: 4,514 bytes, line 2
2r)return function(t,e,i,n){let r,s=0,a=i[0];for(n=Math.ceil(n),r=0;r<t.length;r++)r===a&&(e.push(t[r]),s++,a=i[s*n])}(e,h,s,a/r),h;const c=function(t,e,i){const n=function(t){const e=t.length;let i,n;if(e<2)return!1;for(n=t[0],i=1;i<e;++i)if(t[i]-t[i-1]!==n)return!1;return n}(t),r=e.length/i;if(!n)return Math.max(r,1);const s=function(t){const e=[],i=Math.sqrt(t);let n;for(n=1;n<i;n++)t%n===0&&(e.push(n),e.push(t/n));return i===(0|i)&&e.push(i),e.sort((t,e)=>t-e).pop(),e}(n);for(let t=0,e=s.length-1;t<e;t++){const e=s[t];if(e>r)return e}return Math.max(r,1)}(s,e,r);if(a>0){let t,i;const n=a>1?Math.round((l-o)/(a-1)):null;for(no(e,h,c,Sn(n)?0:o-n,o),t=0,i=a-1;t<i;t++)no(e,h,c,s[t],s[t+1]);return no(e,h,c,l,Sn(n)?e.length:l+n),h}return no(e,h,c),h}(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),o&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t,e,i=this.options.reverse;this.isHorizontal()?(t=this.left,e=this.right):(t=this.top,e=this.bottom,i=!i),this._startPixel=t,this._endPixel=e,this._reversePixels=i,this._length=e-t,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Cn(this.options.afterUpdate,[this])}beforeSetDimensions(){Cn(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Cn(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Cn(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Cn(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const e=this.options.ticks;let i,n,r;for(i=0,n=t.length;i<n;i++)r=t[i],r.label=Cn(e.callback,[r.value,i,t],this)}afterTickToLabelConversion(){Cn(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Cn(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,e=t.ticks,i=so(this.ticks.length,t.ticks.maxTicksLimit),n=e.minRotation||0,r=e.maxRotation;let s,a,o,l=n;if(!this._isVisible()||!e.display||n>=r||i<=1||!this.isHorizontal())return void(this.labelRotation=n);const h=this._getLabelSizes(),c=h.widest.width,u=h.highest.height,d=ar(this.chart.width-c,0,this.maxWidth);s=t.offset?this.maxWidth/i:d/(i-1),c+6>s&&(s=d/(i-(t.offset?.5:1)),a=this.maxHeight-lo(t.grid)-e.padding-ho(t.title,this.chart.options.font),o=Math.sqrt(c*c+u*u),l=Math.min(Math.asin(ar((h.highest.height+6)/s,-1,1)),Math.asin(ar(a/o,-1,1))-Math.asin(ar(u/o,-1,1)))*(180/Hn),l=Math.max(n,Math.min(r,l))),this.labelRotation=l}afterCalculateLabelRotation(){Cn(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Cn(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:e,options:{ticks:i,title:n,grid:r}}=this,s=this._isVisible(),a=this.isHorizontal();if(s){const s=ho(n,e.options.font);if(a?(t.width=this.maxWidth,t.height=lo(r)+s):(t.height=this.maxHeight,t.width=lo(r)+s),i.display&&this.ticks.length){const{first:e,last:n,widest:r,highest:s}=this._getLabelSizes(),o=2*i.padding,l=tr(this.labelRotation),h=Math.cos(l),c=Math.sin(l);if(a){const e=i.mirror?0:c*r.width+h*s.height;t.height=Math.min(this.maxHeight,t.height+e+o)}else{const e=i.mirror?0:h*r.width+c*s.height;t.width=Math.min(this.maxWidth,t.width+e+o)}this._calculatePadding(e,n,c,h)}}this._handleMargins(),a?(this.width=this._length=e.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=e.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,e,i,n){const{ticks:{align:r,padding:s},position:a}=this.options,o=0!==this.labelRotation,l="top"!==a&&"x"===this.axis;if(this.isHorizontal()){const a=this.getPixelForTick(0)-this.left,h=this.right-this.getPixelForTick(this.ticks.length-1);let c=0,u=0;o?l?(c=n*t.width,u=i*e.height):(c=i*t.height,u=n*e.width):"start"===r?u=e.width:"end"===r?c=t.width:"inner"!==r&&(c=t.width/2,u=e.width/2),this.paddingLeft=Math.max((c-a+s)*this.width/(this.width-a),0),this.paddingRight=Math.max((u-h+s)*this.width/(this.width-h),0)}
vendor: 18,648 bytes, line 2
2else{let i=e.height/2,n=t.height/2;"start"===r?(i=0,n=t.height):"end"===r&&(i=e.height,n=0),this.paddingTop=i+s,this.paddingBottom=n+s}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Cn(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:e}=this.options;return"top"===e||"bottom"===e||"x"===t}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){let e,i;for(this.beforeTickToLabelConversion(),this.generateTickLabels(t),e=0,i=t.length;e<i;e++)Sn(t[e].label)&&(t.splice(e,1),i--,e--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const e=this.options.ticks.sampleSize;let i=this.ticks;e<i.length&&(i=ao(i,e)),this._labelSizes=t=this._computeLabelSizes(i,i.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,e,i){const{ctx:n,_longestTextCache:r}=this,s=[],a=[],o=Math.floor(e/so(e,i));let l,h,c,u,d,f,p,m,g,y,v,b=0,S=0;for(l=0;l<e;l+=o){if(u=t[l].label,d=this._resolveTickFontOptions(l),n.font=f=d.string,p=r[f]=r[f]||{data:{},gc:[]},m=d.lineHeight,g=y=0,Sn(u)||En(u)){if(En(u))for(h=0,c=u.length;h<c;++h)v=u[h],Sn(v)||En(v)||(g=Or(n,p.data,p.gc,g,v),y+=m)}else g=Or(n,p.data,p.gc,g,u),y=m;s.push(g),a.push(y),b=Math.max(g,b),S=Math.max(y,S)}!function(t,e){Tn(t,t=>{const i=t.gc,n=i.length/2;let r;if(n>e){for(r=0;r<n;++r)delete t.data[i[r]];i.splice(0,n)}})}(r,e);const E=s.indexOf(b),k=a.indexOf(S),x=t=>({width:s[t]||0,height:a[t]||0});return{first:x(0),last:x(e-1),widest:x(E),highest:x(k),widths:s,heights:a}}getLabelForValue(t){return t}getPixelForValue(t,e){return NaN}getValueForPixel(t){}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const e=this._startPixel+t*this._length;return ar(this._alignToPixels?Br(this.chart,e,0):e,-32768,32767)}getDecimalForPixel(t){const e=(t-this._startPixel)/this._length;return this._reversePixels?1-e:e}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:e}=this;return t<0&&e<0?e:t>0&&e>0?t:0}getContext(t){const e=this.ticks||[];if(t>=0&&t<e.length){const i=e[t];return i.$context||(i.$context=function(t,e,i){return as(t,{tick:i,index:e,type:"tick"})}(this.getContext(),t,i))}return this.$context||(this.$context=as(this.chart.getContext(),{scale:this,type:"scale"}))}_tickSize(){const t=this.options.ticks,e=tr(this.labelRotation),i=Math.abs(Math.cos(e)),n=Math.abs(Math.sin(e)),r=this._getLabelSizes(),s=t.autoSkipPadding||0,a=r?r.widest.width+s:0,o=r?r.highest.height+s:0;return this.isHorizontal()?o*i>a*n?a/i:o/n:o*n<a*i?o/i:a/n}_isVisible(){const t=this.options.display;return"auto"!==t?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const e=this.axis,i=this.chart,n=this.options,{grid:r,position:s,border:a}=n,o=r.offset,l=this.isHorizontal(),h=this.ticks.length+(o?1:0),c=lo(r),u=[],d=a.setContext(this.getContext()),f=d.display?d.width:0,p=f/2,m=function(t){return Br(i,t,f)};let g,y,v,b,S,E,k,x,w,_,C,T;if("top"===s)g=m(this.bottom),E=this.bottom-c,x=g-p,_=m(t.top)+p,T=t.bottom;else if("bottom"===s)g=m(this.top),_=t.top,T=m(t.bottom)-p,E=g+p,x=this.top+c;else if("left"===s)g=m(this.right),S=this.right-c,k=g-p,w=m(t.left)+p,C=t.right;else if("right"===s)g=m(this.left),w=t.left,C=m(t.right)-p,S=g+p,k=this.left+c;else if("x"===e){if("center"===s)g=m((t.top+t.bottom)/2+.5);else if(kn(s)){const t=Object.keys(s)[0],e=s[t];g=m(this.chart.scales[t].getPixelForValue(e))}_=t.top,T=t.bottom,E=g+p,x=E+c}else if("y"===e){if("center"===s)g=m((t.left+t.right)/2);else if(kn(s)){const t=Object.keys(s)[0],e=s[t];g=m(this.chart.scales[t].getPixelForValue(e))}S=g-p,k=S-c,w=t.left,C=t.right}const A=_n(n.ticks.maxTicksLimit,h),P=Math.max(1,Math.ceil(h/A));for(y=0;y<h;y+=P){const t=this.getContext(y),e=r.setContext(t),n=a.setContext(t),s=e.lineWidth,h=e.color,c=n.dash||[],d=n.dashOffset,f=e.tickWidth,p=e.tickColor,m=e.tickBorderDash||[],g=e.tickBorderDashOffset;v=oo(this,y,o),void 0!==v&&(b=Br(i,v,s),l?S=k=w=C=b:E=x=_=T=b,u.push({tx1:S,ty1:E,tx2:k,ty2:x,x1:w,y1:_,x2:C,y2:T,width:s,color:h,borderDash:c,borderDashOffset:d,tickWidth:f,tickColor:p,tickBorderDash:m,tickBorderDashOffset:g}))}return this._ticksLength=h,this._borderValue=g,u}_computeLabelItems(t){const e=this.axis,i=this.options,{position:n,ticks:r}=i,s=this.isHorizontal(),a=this.ticks,{align:o,crossAlign:l,padding:h,mirror:c}=r,u=lo(i.grid),d=u+h,f=c?-h:d,p=-tr(this.labelRotation),m=[];let g,y,v,b,S,E,k,x,w,_,C,T,A="middle";if("top"===n)E=this.bottom-f,k=this._getXAxisLabelAlignment();else if("bottom"===n)E=this.top+f,k=this._getXAxisLabelAlignment();else if("left"===n){const t=this._getYAxisLabelAlignment(u);k=t.textAlign,S=t.x}else if("right"===n){const t=this._getYAxisLabelAlignment(u);k=t.textAlign,S=t.x}else if("x"===e){if("center"===n)E=(t.top+t.bottom)/2+d;else if(kn(n)){const t=Object.keys(n)[0],e=n[t];E=this.chart.scales[t].getPixelForValue(e)+d}k=this._getXAxisLabelAlignment()}else if("y"===e){if("center"===n)S=(t.left+t.right)/2-d;else if(kn(n)){const t=Object.keys(n)[0],e=n[t];S=this.chart.scales[t].getPixelForValue(e)}k=this._getYAxisLabelAlignment(u).textAlign}"y"===e&&("start"===o?A="top":"end"===o&&(A="bottom"));const P=this._getLabelSizes();for(g=0,y=a.length;g<y;++g){v=a[g],b=v.label;const t=r.setContext(this.getContext(g));x=this.getPixelForTick(g)+r.labelOffset,w=this._resolveTickFontOptions(g),_=w.lineHeight,C=En(b)?b.length:1;const e=C/2,i=t.color,o=t.textStrokeColor,h=t.textStrokeWidth;let u,d=k;if(s?(S=x,"inner"===k&&(d=g===y-1?this.options.reverse?"left":"right":0===g?this.options.reverse?"right":"left":"center"),T="top"===n?"near"===l||0!==p?-C*_+_/2:"center"===l?-P.highest.height/2-e*_+_:-P.highest.height+_/2:"near"===l||0!==p?_/2:"center"===l?P.highest.height/2-e*_:P.highest.height-C*_,c&&(T*=-1),0===p||t.showLabelBackdrop||(S+=_/2*Math.sin(p))):(E=x,T=(1-C)*_/2),t.showLabelBackdrop){const e=ns(t.backdropPadding),i=P.heights[g],n=P.widths[g];let r=T-e.top,s=0-e.left;switch(A){case"middle":r-=i/2;break;case"bottom":r-=i}switch(k){case"center":s-=n/2;break;case"right":s-=n;break;case"inner":g===y-1?s-=n:g>0&&(s-=n/2)}u={left:s,top:r,width:n+e.width,height:i+e.height,color:t.backdropColor}}m.push({label:b,font:w,textOffset:T,options:{rotation:p,color:i,strokeColor:o,strokeWidth:h,textAlign:d,textBaseline:A,translation:[S,E],backdrop:u}})}return m}_getXAxisLabelAlignment(){const{position:t,ticks:e}=this.options;if(-tr(this.labelRotation))return"top"===t?"left":"right";let i="center";return"start"===e.align?i="left":"end"===e.align?i="right":"inner"===e.align&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:e,ticks:{crossAlign:i,mirror:n,padding:r}}=this.options,s=t+r,a=this._getLabelSizes().widest.width;let o,l;return"left"===e?n?(l=this.right+r,"near"===i?o="left":"center"===i?(o="center",l+=a/2):(o="right",l+=a)):(l=this.right-s,"near"===i?o="right":"center"===i?(o="center",l-=a/2):(o="left",l=this.left)):"right"===e?n?(l=this.left+r,"near"===i?o="right":"center"===i?(o="center",l-=a/2):(o="left",l-=a)):(l=this.left+s,"near"===i?o="left":"center"===i?(o="center",l+=a/2):(o="right",l=this.right)):o="right",{textAlign:o,x:l}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,e=this.options.position;return"left"===e||"right"===e?{top:0,left:this.left,bottom:t.height,right:this.right}:"top"===e||"bottom"===e?{top:this.top,left:0,bottom:this.bottom,right:t.width}:void 0}drawBackground(){const{ctx:t,options:{backgroundColor:e},left:i,top:n,width:r,height:s}=this;e&&(t.save(),t.fillStyle=e,t.fillRect(i,n,r,s),t.restore())}getLineWidthForValue(t){const e=this.options.grid;if(!this._isVisible()||!e.display)return 0;const i=this.ticks.findIndex(e=>e.value===t);return i>=0?e.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const e=this.options.grid,i=this.ctx,n=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let r,s;const a=(t,e,n)=>{n.width&&n.color&&(i.save(),i.lineWidth=n.width,i.strokeStyle=n.color,i.setLineDash(n.borderDash||[]),i.lineDashOffset=n.borderDashOffset,i.beginPath(),i.moveTo(t.x,t.y),i.lineTo(e.x,e.y),i.stroke(),i.restore())};if(e.display)for(r=0,s=n.length;r<s;++r){const t=n[r];e.drawOnChartArea&&a({x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t),e.drawTicks&&a({x:t.tx1,y:t.ty1},{x:t.tx2,y:t.ty2},{color:t.tickColor,width:t.tickWidth,borderDash:t.tickBorderDash,borderDashOffset:t.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:e,options:{border:i,grid:n}}=this,r=i.setContext(this.getContext()),s=i.display?r.width:0;if(!s)return;const a=n.setContext(this.getContext(0)).lineWidth,o=this._borderValue;let l,h,c,u;this.isHorizontal()?(l=Br(t,this.left,s)-s/2,h=Br(t,this.right,a)+a/2,c=u=o):(c=Br(t,this.top,s)-s/2,u=Br(t,this.bottom,a)+a/2,l=h=o),e.save(),e.lineWidth=r.width,e.strokeStyle=r.color,e.beginPath(),e.moveTo(l,c),e.lineTo(h,u),e.stroke(),e.restore()}drawLabels(t){if(!this.options.ticks.display)return;const e=this.ctx,i=this._computeLabelArea();i&&qr(e,i);const n=this.getLabelItems(t);for(const t of n){const i=t.options,n=t.font;Yr(e,t.label,0,t.textOffset,n,i)}i&&Ur(e)}drawTitle(){const{ctx:t,options:{position:e,title:i,reverse:n}}=this;if(!i.display)return;const r=rs(i.font),s=ns(i.padding),a=i.align;let o=r.lineHeight/2;"bottom"===e||"center"===e||kn(e)?(o+=s.bottom,En(i.text)&&(o+=r.lineHeight*(i.text.length-1))):o+=s.top;const{titleX:l,titleY:h,maxWidth:c,rotation:u}=function(t,e,i,n){const{top:r,left:s,bottom:a,right:o,chart:l}=t,{chartArea:h,scales:c}=l;let u,d,f,p=0;const m=a-r,g=o-s;if(t.isHorizontal()){if(d=gr(n,s,o),kn(i)){const t=Object.keys(i)[0],n=i[t];f=c[t].getPixelForValue(n)+m-e}else f="center"===i?(h.bottom+h.top)/2+m-e:ro(t,i,e);u=o-s}else{if(kn(i)){const t=Object.keys(i)[0],n=i[t];d=c[t].getPixelForValue(n)-g+e}else d="center"===i?(h.left+h.right)/2-g+e:ro(t,i,e);f=gr(n,a,r),p="left"===i?-Wn:Wn}return{titleX:d,titleY:f,maxWidth:u,rotation:p}}(this,o,e,a);Yr(t,i.text,0,0,r,{color:i.color,maxWidth:c,rotation:u,textAlign:co(a,e,n),textBaseline:"middle",translation:[l,h]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,e=t.ticks&&t.ticks.z||0,i=_n(t.grid&&t.grid.z,-1),n=_n(t.border&&t.border.z,0);return this._isVisible()&&this.draw===uo.prototype.draw?[{z:i,draw:t=>{this.drawBackground(),this.drawGrid(t),this.drawTitle()}},{z:n,draw:()=>{this.drawBorder()}},{z:e,draw:t=>{this.drawLabels(t)}}]:[{z:e,draw:t=>{this.draw(t)}}]}getMatchingVisibleMetas(t){const e=this.chart.getSortedVisibleDatasetMetas(),i=this.axis+"AxisID",n=[];let r,s;for(r=0,s=e.length;r<s;++r){const s=e[r];s[i]!==this.id||t&&s.type!==t||n.push(s)}return n}_resolveTickFontOptions(t){return rs(this.options.ticks.setContext(this.getContext(t)).font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class fo{constructor(t,e,i){this.type=t,this.scope=e,this.override=i,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const e=Object.getPrototypeOf(t);let i;(function(t){return"id"in t&&"defaults"in t})(e)&&(i=this.register(e));const n=this.items,r=t.id,s=this.scope+"."+r;if(!r)throw new Error("class does not have id: "+t);return r in n||(n[r]=t,function(t,e,i){const n=Ln(Object.create(null),[i?Fr.get(i):{},Fr.get(e),t.defaults]);Fr.set(e,n),t.defaultRoutes&&function(t,e){Object.keys(e).forEach(i=>{const n=i.split("."),r=n.pop(),s=[t].concat(n).join("."),a=e[i].split("."),o=a.pop(),l=a.join(".");Fr.route(s,r,l,o)})}(e,t.defaultRoutes),t.descriptors&&Fr.describe(e,t.descriptors)}(t,s,i),this.override&&Fr.override(t.id,t.overrides)),s}get(t){return this.items[t]}unregister(t){const e=this.items,i=t.id,n=this.scope;i in e&&delete e[i],n&&i in Fr[n]&&(delete Fr[n][i],this.override&&delete Dr[i])}}class po{constructor(){this.controllers=new fo(da,"datasets",!0),this.elements=new fo(io,"elements"),this.plugins=new fo(Object,"plugins"),this.scales=new fo(uo,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,e,i){[...e].forEach(e=>{const n=i||this._getRegistryForType(e);i||n.isForType(e)||n===this.plugins&&e.id?this._exec(t,n,e):Tn(e,e=>{const n=i||this._getRegistryForType(e);this._exec(t,n,e)})})}_exec(t,e,i){const n=Bn(t);Cn(i["before"+n],[],i),e[t](i),Cn(i["after"+n],[],i)}_getRegistryForType(t){for(let e=0;e<this._typedRegistries.length;e++){const i=this._typedRegistries[e];if(i.isForType(t))return i}return this.plugins}_get(t,e,i){const n=e.get(t);if(void 0===n)throw new Error('"'+t+'" is not a registered '+i+".");return n}}var mo=new po;class go{constructor(){this._init=void 0}notify(t,e,i,n){if("beforeInit"===e&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install")),void 0===this._init)return;const r=n?this._descriptors(t).filter(n):this._descriptors(t),s=this._notify(r,t,e,i);return"afterDestroy"===e&&(this._notify(r,t,"stop"),this._notify(this._init,t,"uninstall"),this._init=void 0),s}_notify(t,e,i,n){n=n||{};for(const r of t){const t=r.plugin;if(!1===Cn(t[i],[e,n,r.options],t)&&n.cancelable)return!1}return!0}invalidate(){Sn(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const e=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),e}_createDescriptors(t,e){const i=t&&t.config,n=_n(i.options&&i.options.plugins,{}),r=function(t){const e={},i=[],n=Object.keys(mo.plugins.items);for(let t=0;t<n.length;t++)i.push(mo.getPlugin(n[t]));const r=t.plugins||[];for(let t=0;t<r.length;t++){const n=r[t];-1===i.indexOf(n)&&(i.push(n),e[n.id]=!0)}return{plugins:i,localIds:e}}(i);return!1!==n||e?function(t,{plugins:e,localIds:i},n,r){const s=[],a=t.getContext();for(const o of e){const e=o.id,l=yo(n[e],r);null!==l&&s.push({plugin:o,options:vo(t.config,{plugin:o,local:i[e]},l,a)})}return s}(t,r,n,e):[]}_notifyStateChanges(t){const e=this._oldCache||[],i=this._cache,n=(t,e)=>t.filter(t=>!e.some(e=>t.plugin.id===e.plugin.id));this._notify(n(e,i),t,"stop"),this._notify(n(i,e),t,"start")}}function yo(t,e){return e||!1!==t?!0===t?{}:t:null}function vo(t,{plugin:e,local:i},n,r){const s=t.pluginScopeKeys(e),a=t.getOptionScopes(n,s);return i&&e.defaults&&a.push(e.defaults),t.createResolver(a,r,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function bo(t,e){const i=Fr.datasets[t]||{};return((e.datasets||{})[t]||{}).indexAxis||e.indexAxis||i.indexAxis||"x"}function So(t){if("x"===t||"y"===t||"r"===t)return t}function Eo(t){return"top"===t||"bottom"===t?"x":"left"===t||"right"===t?"y":void 0}function ko(t,...e){if(So(t))return t;for(const i of e){const e=i.axis||Eo(i.position)||t.length>1&&So(t[0].toLowerCase());if(e)return e}throw new Error(`Cannot determine type of '${t}' axis. Please provide 'axis' or 'position' option.`)}function xo(t,e,i){if(i[e+"AxisID"]===t)return{axis:e}}function wo(t){const e=t.options||(t.options={});e.plugins=_n(e.plugins,{}),e.scales=function(t,e){const i=Dr[t.type]||{scales:{}},n=e.scales||{},r=bo(t.type,e),s=Object.create(null);return Object.keys(n).forEach(e=>{const a=n[e];if(!kn(a))return console.error(`Invalid scale configuration for scale: ${e}`);if(a._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${e}`);const o=ko(e,a,function(t,e){if(e.data&&e.data.datasets){const i=e.data.datasets.filter(e=>e.xAxisID===t||e.yAxisID===t);if(i.length)return xo(t,"x",i[0])||xo(t,"y",i[0])}return{}}(e,t),Fr.scales[a.type]),l=function(t,e){return t===e?"_index_":"_value_"}(o,r),h=i.scales||{};s[e]=Rn(Object.create(null),[{axis:o},a,h[o],h[l]])}),t.data.datasets.forEach(i=>{const r=i.type||t.type,a=i.indexAxis||bo(r,e),o=(Dr[r]||{}).scales||{};Object.keys(o).forEach(t=>{const e=function(t,e){let i=t;return"_index_"===t?i=e:"_value_"===t&&(i="x"===e?"y":"x"),i}(t,a),r=i[e+"AxisID"]||e;s[r]=s[r]||Object.create(null),Rn(s[r],[{axis:e},n[r],o[t]])})}),Object.keys(s).forEach(t=>{const e=s[t];Rn(e,[Fr.scales[e.type],Fr.scale])}),s}(t,e)}function _o(t){return(t=t||{}).datasets=t.datasets||[],t.labels=t.labels||[],t}const Co=new Map,To=new Set;function Ao(t,e){let i=Co.get(t);return i||(i=e(),Co.set(t,i),To.add(i)),i}const Po=(t,e,i)=>{const n=On(e,i);void 0!==n&&t.add(n)};class Do{constructor(t){this._config=function(t){return(t=t||{}).data=_o(t.data),wo(t),t}(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=_o(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),wo(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Ao(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,e){return Ao(`${t}.transition.${e}`,()=>[[`datasets.${t}.transitions.${e}`,`transitions.${e}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,e){return Ao(`${t}-${e}`,()=>[[`datasets.${t}.elements.${e}`,`datasets.${t}`,`elements.${e}`,""]])}pluginScopeKeys(t){const e=t.id;return Ao(`${this.type}-plugin-${e}`,()=>[[`plugins.${e}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,e){const i=this._scopeCache;let n=i.get(t);return n&&!e||(n=new Map,i.set(t,n)),n}getOptionScopes(t,e,i){const{options:n,type:r}=this,s=this._cachedScopes(t,i),a=s.get(e);if(a)return a;const o=new Set;e.forEach(e=>
vendor: 15,470 bytes, line 2
2{t&&(o.add(t),e.forEach(e=>Po(o,t,e))),e.forEach(t=>Po(o,n,t)),e.forEach(t=>Po(o,Dr[r]||{},t)),e.forEach(t=>Po(o,Fr,t)),e.forEach(t=>Po(o,Mr,t))});const l=Array.from(o);return 0===l.length&&l.push(Object.create(null)),To.has(e)&&s.set(e,l),l}chartOptionScopes(){const{options:t,type:e}=this;return[t,Dr[e]||{},Fr.datasets[e]||{},{type:e},Fr,Mr]}resolveNamedOptions(t,e,i,n=[""]){const r={$shared:!0},{resolver:s,subPrefixes:a}=Mo(this._resolverCache,t,n);let o=s;(function(t,e){const{isScriptable:i,isIndexable:n}=hs(t);for(const r of e){const e=i(r),s=n(r),a=(s||e)&&t[r];if(e&&(Vn(a)||Lo(a))||s&&En(a))return!0}return!1})(s,e)&&(r.$shared=!1,o=ls(s,i=Vn(i)?i():i,this.createResolver(t,i,a)));for(const t of e)r[t]=o[t];return r}createResolver(t,e,i=[""],n){const{resolver:r}=Mo(this._resolverCache,t,i);return kn(e)?ls(r,e,void 0,n):r}}function Mo(t,e,i){let n=t.get(e);n||(n=new Map,t.set(e,n));const r=i.join();let s=n.get(r);return s||(s={resolver:os(e,i),subPrefixes:i.filter(t=>!t.toLowerCase().includes("hover"))},n.set(r,s)),s}const Lo=t=>kn(t)&&Object.getOwnPropertyNames(t).some(e=>Vn(t[e])),Ro=["top","bottom","left","right","chartArea"];function Io(t,e){return"top"===t||"bottom"===t||-1===Ro.indexOf(t)&&"x"===e}function Fo(t,e){return function(i,n){return i[t]===n[t]?i[e]-n[e]:i[t]-n[t]}}function Oo(t){const e=t.chart,i=e.options.animation;e.notifyPlugins("afterRender"),Cn(i&&i.onComplete,[t],e)}function Bo(t){const e=t.chart,i=e.options.animation;Cn(i&&i.onProgress,[t],e)}function No(t){return Cs()&&"string"==typeof t?t=document.getElementById(t):t&&t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas),t}const Vo={},zo=t=>{const e=No(t);return Object.values(Vo).filter(t=>t.canvas===e).pop()};function Ho(t,e,i){const n=Object.keys(t);for(const r of n){const n=+r;if(n>=e){const s=t[r];delete t[r],(i>0||n>e)&&(t[n+i]=s)}}}class qo{static defaults=Fr;static instances=Vo;static overrides=Dr;static registry=mo;static version="4.5.1";static getChart=zo;static register(...t){mo.add(...t),Uo()}static unregister(...t){mo.remove(...t),Uo()}constructor(t,e){const i=this.config=new Do(e),n=No(t),r=zo(n);if(r)throw new Error("Canvas is already in use. Chart with ID '"+r.id+"' must be destroyed before the canvas with ID '"+r.canvas.id+"' can be reused.");const s=i.createResolver(i.chartOptionScopes(),this.getContext());this.platform=new(i.platform||function(t){return!Cs()||"undefined"!=typeof OffscreenCanvas&&t instanceof OffscreenCanvas?za:eo}(n)),this.platform.updateConfig(i);const a=this.platform.acquireContext(n,s.aspectRatio),o=a&&a.canvas,l=o&&o.height,h=o&&o.width;this.id=bn(),this.ctx=a,this.canvas=o,this.width=h,this.height=l,this._options=s,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new go,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=function(t,e){let i;return function(...n){return e?(clearTimeout(i),i=setTimeout(t,e,n)):t.apply(this,n),e}}(t=>this.update(t),s.resizeDelay||0),this._dataChanges=[],Vo[this.id]=this,a&&o?(Xs.listen(this,"complete",Oo),Xs.listen(this,"progress",Bo),this._initialize(),this.attached&&this.update()):console.error("Failed to create chart: can't acquire context from the given item")}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:e},width:i,height:n,_aspectRatio:r}=this;return Sn(t)?e&&r?r:n?i/n:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return mo}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():Is(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return Nr(this.canvas,this.ctx),this}stop(){return Xs.stop(this),this}resize(t,e){Xs.running(this)?this._resizeBeforeDraw={width:t,height:e}:this._resize(t,e)}_resize(t,e){const i=this.options,n=this.canvas,r=i.maintainAspectRatio&&this.aspectRatio,s=this.platform.getMaximumSize(n,t,e,r),a=i.devicePixelRatio||this.platform.getDevicePixelRatio(),o=this.width?"resize":"attach";this.width=s.width,this.height=s.height,this._aspectRatio=this.aspectRatio,Is(this,a,!0)&&(this.notifyPlugins("resize",{size:s}),Cn(i.onResize,[this,s],this),this.attached&&this._doResize(o)&&this.render())}ensureScalesHaveIDs(){Tn(this.options.scales||{},(t,e)=>{t.id=e})}buildOrUpdateScales(){const t=this.options,e=t.scales,i=this.scales,n=Object.keys(i).reduce((t,e)=>(t[e]=!1,t),{});let r=[];e&&(r=r.concat(Object.keys(e).map(t=>{const i=e[t],n=ko(t,i),r="r"===n,s="x"===n;return{options:i,dposition:r?"chartArea":s?"bottom":"left",dtype:r?"radialLinear":s?"category":"linear"}}))),Tn(r,e=>{const r=e.options,s=r.id,a=ko(s,r),o=_n(r.type,e.dtype);void 0!==r.position&&Io(r.position,a)===Io(e.dposition)||(r.position=e.dposition),n[s]=!0;let l=null;s in i&&i[s].type===o?l=i[s]:(l=new(mo.getScale(o))({id:s,type:o,ctx:this.ctx,chart:this}),i[l.id]=l),l.init(r,t)}),Tn(n,(t,e)=>{t||delete i[e]}),Tn(i,t=>{Na.configure(this,t,t.options),Na.addBox(this,t)})}_updateMetasets(){const t=this._metasets,e=this.data.datasets.length,i=t.length;if(t.sort((t,e)=>t.index-e.index),i>e){for(let t=e;t<i;++t)this._destroyDatasetMeta(t);t.splice(e,i-e)}this._sortedMetasets=t.slice(0).sort(Fo("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:e}}=this;t.length>e.length&&delete this._stacks,t.forEach((t,i)=>{0===e.filter(e=>e===t._dataset).length&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],e=this.data.datasets;let i,n;for(this._removeUnreferencedMetasets(),i=0,n=e.length;i<n;i++){const n=e[i];let r=this.getDatasetMeta(i);const s=n.type||this.config.type;if(r.type&&r.type!==s&&(this._destroyDatasetMeta(i),r=this.getDatasetMeta(i)),r.type=s,r.indexAxis=n.indexAxis||bo(s,this.options),r.order=n.order||0,r.index=i,r.label=""+n.label,r.visible=this.isDatasetVisible(i),r.controller)r.controller.updateIndex(i),r.controller.linkScales();else{const e=mo.getController(s),{datasetElementType:n,dataElementType:a}=Fr.datasets[s];Object.assign(e,{dataElementType:mo.getElement(a),datasetElementType:n&&mo.getElement(n)}),r.controller=new e(this,i),t.push(r.controller)}}return this._updateMetasets(),t}_resetElements(){Tn(this.data.datasets,(t,e)=>{this.getDatasetMeta(e).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const e=this.config;e.update();const i=this._options=e.createResolver(e.chartOptionScopes(),this.getContext()),n=this._animationsDisabled=!i.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),!1===this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0}))return;const r=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let s=0;for(let t=0,e=this.data.datasets.length;t<e;t++){const{controller:e}=this.getDatasetMeta(t),i=!n&&-1===r.indexOf(e);e.buildOrUpdateElements(i),s=Math.max(+e.getMaxOverflow(),s)}s=this._minPadding=i.layout.autoPadding?s:0,this._updateLayout(s),n||Tn(r,t=>{t.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(Fo("z","_idx"));const{_active:a,_lastEvent:o}=this;o?this._eventHandler(o,!0):a.length&&this._updateHoverStyles(a,a,!0),this.render()}_updateScales(){Tn(this.scales,t=>{Na.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,e=new Set(Object.keys(this._listeners)),i=new Set(t.events);zn(e,i)&&!!this._responsiveListeners===t.responsive||(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,e=this._getUniformDataChanges()||[];for(const{method:i,start:n,count:r}of e)Ho(t,n,"_removeElements"===i?-r:r)}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const e=this.data.datasets.length,i=e=>new Set(t.filter(t=>t[0]===e).map((t,e)=>e+","+t.splice(1).join(","))),n=i(0);for(let t=1;t<e;t++)if(!zn(n,i(t)))return;return Array.from(n).map(t=>t.split(",")).map(t=>({method:t[1],start:+t[2],count:+t[3]}))}_updateLayout(t){if(!1===this.notifyPlugins("beforeLayout",{cancelable:!0}))return;Na.update(this,this.width,this.height,t);const e=this.chartArea,i=e.width<=0||e.height<=0;this._layers=[],Tn(this.boxes,t=>{i&&"chartArea"===t.position||(t.configure&&t.configure(),this._layers.push(...t._layers()))},this),this._layers.forEach((t,e)=>{t._idx=e}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(!1!==this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})){for(let t=0,e=this.data.datasets.length;t<e;++t)this.getDatasetMeta(t).controller.configure();for(let e=0,i=this.data.datasets.length;e<i;++e)this._updateDataset(e,Vn(t)?t({datasetIndex:e}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,e){const i=this.getDatasetMeta(t),n={meta:i,index:t,mode:e,cancelable:!0};!1!==this.notifyPlugins("beforeDatasetUpdate",n)&&(i.controller._update(e),n.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",n))}render(){!1!==this.notifyPlugins("beforeRender",{cancelable:!0})&&(Xs.has(this)?this.attached&&!Xs.running(this)&&Xs.start(this):(this.draw(),Oo({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:t,height:e}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(t,e)}if(this.clear(),this.width<=0||this.height<=0)return;if(!1===this.notifyPlugins("beforeDraw",{cancelable:!0}))return;const e=this._layers;for(t=0;t<e.length&&e[t].z<=0;++t)e[t].draw(this.chartArea);for(this._drawDatasets();t<e.length;++t)e[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const e=this._sortedMetasets,i=[];let n,r;for(n=0,r=e.length;n<r;++n){const r=e[n];t&&!r.visible||i.push(r)}return i}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(!1===this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0}))return;const t=this.getSortedVisibleDatasetMetas();for(let e=t.length-1;e>=0;--e)this._drawDataset(t[e]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const e=this.ctx,i={meta:t,index:t.index,cancelable:!0},n=function(t,e){const i=e._clip;if(i.disabled)return!1;const n=function(t,e){const{xScale:i,yScale:n}=t;return i&&n?{left:Ys(i,e,"left"),right:Ys(i,e,"right"),top:Ys(n,e,"top"),bottom:Ys(n,e,"bottom")}:e}(e,t.chartArea);return{left:!1===i.left?0:n.left-(!0===i.left?0:i.left),right:!1===i.right?t.width:n.right+(!0===i.right?0:i.right),top:!1===i.top?0:n.top-(!0===i.top?0:i.top),bottom:!1===i.bottom?t.height:n.bottom+(!0===i.bottom?0:i.bottom)}}(this,t);!1!==this.notifyPlugins("beforeDatasetDraw",i)&&(n&&qr(e,n),t.controller.draw(),n&&Ur(e),i.cancelable=!1,this.notifyPlugins("afterDatasetDraw",i))}isPointInArea(t){return Hr(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,e,i,n){const r=Ca.modes[e];return"function"==typeof r?r(this,t,i,n):[]}getDatasetMeta(t){const e=this.data.datasets[t],i=this._metasets;let n=i.filter(t=>t&&t._dataset===e).pop();return n||(n={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:e&&e.order||0,index:t,_dataset:e,_parsed:[],_sorted:!1},i.push(n)),n}getContext(){return this.$context||(this.$context=as(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const e=this.data.datasets[t];if(!e)return!1;const i=this.getDatasetMeta(t);return"boolean"==typeof i.hidden?!i.hidden:!e.hidden}setDatasetVisibility(t,e){this.getDatasetMeta(t).hidden=!e}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,e,i){const n=i?"show":"hide",r=this.getDatasetMeta(t),s=r.controller._resolveAnimations(void 0,n);Nn(e)?(r.data[e].hidden=!i,this.update()):(this.setDatasetVisibility(t,i),s.update(r,{visible:i}),this.update(e=>e.datasetIndex===t?n:void 0))}hide(t,e){this._updateVisibility(t,e,!1)}show(t,e){this._updateVisibility(t,e,!0)}_destroyDatasetMeta(t){const e=this._metasets[t];e&&e.controller&&e.controller._destroy(),delete this._metasets[t]}_stop(){let t,e;for(this.stop(),Xs.remove(this),t=0,e=this.data.datasets.length;t<e;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:e}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),Nr(t,e),this.platform.releaseContext(e),this.canvas=null,this.ctx=null),delete Vo[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(t,e,i)=>{t.offsetX=e,t.offsetY=i,this._eventHandler(t)};Tn(this.options.events,t=>i(t,n))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,e=this.platform,i=(i,n)=>{e.addEventListener(this,i,n),t[i]=n},n=(i,n)=>{t[i]&&(e.removeEventListener(this,i,n),delete t[i])},r=(t,e)=>{this.canvas&&this.resize(t,e)};let s;const a=()=>{n("attach",a),this.attached=!0,this.resize(),i("resize",r),i("detach",s)};s=()=>{this.attached=!1,n("resize",r),this._stop(),this._resize(0,0),i("attach",a)},e.isAttached(this.canvas)?a():s()}unbindEvents(){Tn(this._listeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._listeners={},Tn(this._responsiveListeners,(t,e)=>{this.platform.removeEventListener(this,e,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,e,i){const n=i?"set":"remove";let r,s,a,o;for("dataset"===e&&(r=this.getDatasetMeta(t[0].datasetIndex),r.controller["_"+n+"DatasetHoverStyle"]()),a=0,o=t.length;a<o;++a){s=t[a];const e=s&&this.getDatasetMeta(s.datasetIndex).controller;e&&e[n+"HoverStyle"](s.element,s.datasetIndex,s.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const e=this._active||[],i=t.map(({datasetIndex:t,index:e})=>{const i=this.getDatasetMeta(t);if(!i)throw new Error("No dataset found at index "+t);return{datasetIndex:t,element:i.data[e],index:e}});!An(i,e)&&(this._active=i,this._lastEvent=null,this._updateHoverStyles(i,e))}notifyPlugins(t,e,i){return this._plugins.notify(this,t,e,i)}isPluginEnabled(t){return 1===this._plugins._cache.filter(e=>e.plugin.id===t).length}_updateHoverStyles(t,e,i){const n=this.options.hover,r=(t,e)=>t.filter(t=>!e.some(e=>t.datasetIndex===e.datasetIndex&&t.index===e.index)),s=r(e,t),a=i?t:r(t,e);s.length&&this.updateHoverStyle(s,n.mode,!1),a.length&&n.mode&&this.updateHoverStyle(a,n.mode,!0)}_eventHandler(t,e){const i={event:t,replay:e,cancelable:!0,inChartArea:this.isPointInArea(t)},n=e=>(e.options.events||this.options.events).includes(t.native.type);if(!1===this.notifyPlugins("beforeEvent",i,n))return;const r=this._handleEvent(t,e,i.inChartArea);return i.cancelable=!1,this.notifyPlugins("afterEvent",i,n),(r||i.changed)&&this.render(),this}_handleEvent(t,e,i){const{_active:n=[],options:r}=this,s=e,a=this._getActiveElements(t,n,i,s),o=function(t){return"mouseup"===t.type||"click"===t.type||"contextmenu"===t.type}
vendor: 4,642 bytes, line 2
2(t),l=function(t,e,i,n){return i&&"mouseout"!==t.type?n?e:t:null}(t,this._lastEvent,i,o);i&&(this._lastEvent=null,Cn(r.onHover,[t,a,this],this),o&&Cn(r.onClick,[t,a,this],this));const h=!An(a,n);return(h||e)&&(this._active=a,this._updateHoverStyles(a,n,e)),this._lastEvent=l,h}_getActiveElements(t,e,i,n){if("mouseout"===t.type)return[];if(!i)return e;const r=this.options.hover;return this.getElementsAtEventForMode(t,r.mode,r,n)}}function Uo(){return Tn(qo.instances,t=>t._plugins.invalidate())}function Go(t,e,i=e){t.lineCap=_n(i.borderCapStyle,e.borderCapStyle),t.setLineDash(_n(i.borderDash,e.borderDash)),t.lineDashOffset=_n(i.borderDashOffset,e.borderDashOffset),t.lineJoin=_n(i.borderJoinStyle,e.borderJoinStyle),t.lineWidth=_n(i.borderWidth,e.borderWidth),t.strokeStyle=_n(i.borderColor,e.borderColor)}function jo(t,e,i){t.lineTo(i.x,i.y)}function Wo(t,e,i={}){const n=t.length,{start:r=0,end:s=n-1}=i,{start:a,end:o}=e,l=Math.max(r,a),h=Math.min(s,o),c=r<a&&s<a||r>o&&s>o;return{count:n,start:l,loop:e.loop,ilen:h<l&&!c?n+h-l:h-l}}function $o(t,e,i,n){const{points:r,options:s}=e,{count:a,start:o,loop:l,ilen:h}=Wo(r,i,n),c=function(t){return t.stepped?Gr:t.tension||"monotone"===t.cubicInterpolationMode?jr:jo}(s);let u,d,f,{move:p=!0,reverse:m}=n||{};for(u=0;u<=h;++u)d=r[(o+(m?h-u:u))%a],d.skip||(p?(t.moveTo(d.x,d.y),p=!1):c(t,f,d,m,s.stepped),f=d);return l&&(d=r[(o+(m?h:0))%a],c(t,f,d,m,s.stepped)),!!l}function Yo(t,e,i,n){const r=e.points,{count:s,start:a,ilen:o}=Wo(r,i,n),{move:l=!0,reverse:h}=n||{};let c,u,d,f,p,m,g=0,y=0;const v=t=>(a+(h?o-t:t))%s,b=()=>{f!==p&&(t.lineTo(g,p),t.lineTo(g,f),t.lineTo(g,m))};for(l&&(u=r[v(0)],t.moveTo(u.x,u.y)),c=0;c<=o;++c){if(u=r[v(c)],u.skip)continue;const e=u.x,i=u.y,n=0|e;n===d?(i<f?f=i:i>p&&(p=i),g=(y*g+e)/++y):(b(),t.lineTo(e,i),d=n,y=0,f=p=i),m=i}b()}function Ko(t){const e=t.options,i=e.borderDash&&e.borderDash.length;return t._decimated||t._loop||e.tension||"monotone"===e.cubicInterpolationMode||e.stepped||i?$o:Yo}const Xo="function"==typeof Path2D;function Jo(t,e,i,n){const r=t.options,{[i]:s}=t.getProps([i],n);return Math.abs(e-s)<r.radius+r.hitRadius}function Qo(t,e){const{x:i,y:n,base:r,width:s,height:a}=t.getProps(["x","y","base","width","height"],e);let o,l,h,c,u;return t.horizontal?(u=a/2,o=Math.min(i,r),l=Math.max(i,r),h=n-u,c=n+u):(u=s/2,o=i-u,l=i+u,h=Math.min(n,r),c=Math.max(n,r)),{left:o,top:h,right:l,bottom:c}}function Zo(t,e,i,n){return t?0:ar(e,i,n)}function tl(t,e,i,n){const r=null===e,s=null===i,a=t&&!(r&&s)&&Qo(t,n);return a&&(r||or(e,a.left,a.right))&&(s||or(i,a.top,a.bottom))}function el(t,e){t.rect(e.x,e.y,e.w,e.h)}function il(t,e,i={}){const n=t.x!==i.x?-e:0,r=t.y!==i.y?-e:0,s=(t.x+t.w!==i.x+i.w?e:0)-n,a=(t.y+t.h!==i.y+i.h?e:0)-r;return{x:t.x+n,y:t.y+r,w:t.w+s,h:t.h+a,radius:t.radius}}const nl=(t,e)=>{let{boxHeight:i=e,boxWidth:n=e}=t;return t.usePointStyle&&(i=Math.min(i,e),n=t.pointStyleWidth||Math.min(n,e)),{boxWidth:n,boxHeight:i,itemHeight:Math.max(e,i)}};class rl extends io{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,e,i){this.maxWidth=t,this.maxHeight=e,this._margins=i,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let e=Cn(t.generateLabels,[this.chart],this)||[];t.filter&&(e=e.filter(e=>t.filter(e,this.chart.data))),t.sort&&(e=e.sort((e,i)=>t.sort(e,i,this.chart.data))),this.options.reverse&&e.reverse(),this.legendItems=e}fit(){const{options:t,ctx:e}=this;if(!t.display)return void(this.width=this.height=0);const i=t.labels,n=rs(i.font),r=n.size,s=this._computeTitleHeight(),{boxWidth:a,itemHeight:o}=nl(i,r);let l,h;e.font=n.string,this.isHorizontal()?(l=this.maxWidth,h=this._fitRows(s,r,a,o)+10):(h=this.maxHeight,l=this._fitCols(s,n,a,o)+10),this.width=Math.min(l,t.maxWidth||this.maxWidth),this.height=Math.min(h,t.maxHeight||this.maxHeight)}_fitRows(t,e,i,n){const{ctx:r,maxWidth:s,options:{labels:{padding:a}}}=this,o=this.legendHitBoxes=[],l=this.lineWidths=[0],h=n+a;let c=t;r.textAlign="left",r.textBaseline="middle";let u=-1,d=-h;
vendor: 13,211 bytes, line 2
2return this.legendItems.forEach((t,f)=>{const p=i+e/2+r.measureText(t.text).width;(0===f||l[l.length-1]+p+2*a>s)&&(c+=h,l[l.length-(f>0?0:1)]=0,d+=h,u++),o[f]={left:0,top:d,row:u,width:p,height:n},l[l.length-1]+=p+a}),c}_fitCols(t,e,i,n){const{ctx:r,maxHeight:s,options:{labels:{padding:a}}}=this,o=this.legendHitBoxes=[],l=this.columnSizes=[],h=s-t;let c=a,u=0,d=0,f=0,p=0;return this.legendItems.forEach((t,s)=>{const{itemWidth:m,itemHeight:g}=function(t,e,i,n,r){const s=function(t,e,i,n){let r=t.text;return r&&"string"!=typeof r&&(r=r.reduce((t,e)=>t.length>e.length?t:e)),e+i.size/2+n.measureText(r).width}(n,t,e,i),a=function(t,e,i){let n=t;return"string"!=typeof e.text&&(n=sl(e,i)),n}(r,n,e.lineHeight);return{itemWidth:s,itemHeight:a}}(i,e,r,t,n);s>0&&d+g+2*a>h&&(c+=u+a,l.push({width:u,height:d}),f+=u+a,p++,u=d=0),o[s]={left:f,top:d,col:p,width:m,height:g},u=Math.max(u,m),d+=g+a}),c+=u,l.push({width:u,height:d}),c}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:e,options:{align:i,labels:{padding:n},rtl:r}}=this,s=zs(r,this.left,this.width);if(this.isHorizontal()){let r=0,a=gr(i,this.left+n,this.right-this.lineWidths[r]);for(const o of e)r!==o.row&&(r=o.row,a=gr(i,this.left+n,this.right-this.lineWidths[r])),o.top+=this.top+t+n,o.left=s.leftForLtr(s.x(a),o.width),a+=o.width+n}else{let r=0,a=gr(i,this.top+t+n,this.bottom-this.columnSizes[r].height);for(const o of e)o.col!==r&&(r=o.col,a=gr(i,this.top+t+n,this.bottom-this.columnSizes[r].height)),o.top=a,o.left+=this.left+n,o.left=s.leftForLtr(s.x(o.left),o.width),a+=o.height+n}}isHorizontal(){return"top"===this.options.position||"bottom"===this.options.position}draw(){if(this.options.display){const t=this.ctx;qr(t,this),this._draw(),Ur(t)}}_draw(){const{options:t,columnSizes:e,lineWidths:i,ctx:n}=this,{align:r,labels:s}=t,a=Fr.color,o=zs(t.rtl,this.left,this.width),l=rs(s.font),{padding:h}=s,c=l.size,u=c/2;let d;this.drawTitle(),n.textAlign=o.textAlign("left"),n.textBaseline="middle",n.lineWidth=.5,n.font=l.string;const{boxWidth:f,boxHeight:p,itemHeight:m}=nl(s,c),g=this.isHorizontal(),y=this._computeTitleHeight();d=g?{x:gr(r,this.left+h,this.right-i[0]),y:this.top+h+y,line:0}:{x:this.left+h,y:gr(r,this.top+y+h,this.bottom-e[0].height),line:0},Hs(this.ctx,t.textDirection);const v=m+h;this.legendItems.forEach((b,S)=>{n.strokeStyle=b.fontColor,n.fillStyle=b.fontColor;const E=n.measureText(b.text).width,k=o.textAlign(b.textAlign||(b.textAlign=s.textAlign)),x=f+u+E;let w=d.x,_=d.y;if(o.setWidth(this.width),g?S>0&&w+x+h>this.right&&(_=d.y+=v,d.line++,w=d.x=gr(r,this.left+h,this.right-i[d.line])):S>0&&_+v>this.bottom&&(w=d.x=w+e[d.line].width+h,d.line++,_=d.y=gr(r,this.top+y+h,this.bottom-e[d.line].height)),function(t,e,i){if(isNaN(f)||f<=0||isNaN(p)||p<0)return;n.save();const r=_n(i.lineWidth,1);if(n.fillStyle=_n(i.fillStyle,a),n.lineCap=_n(i.lineCap,"butt"),n.lineDashOffset=_n(i.lineDashOffset,0),n.lineJoin=_n(i.lineJoin,"miter"),n.lineWidth=r,n.strokeStyle=_n(i.strokeStyle,a),n.setLineDash(_n(i.lineDash,[])),s.usePointStyle){const a={radius:p*Math.SQRT2/2,pointStyle:i.pointStyle,rotation:i.rotation,borderWidth:r},l=o.xPlus(t,f/2);zr(n,a,l,e+u,s.pointStyleWidth&&f)}else{const s=e+Math.max((c-p)/2,0),a=o.leftForLtr(t,f),l=is(i.borderRadius);n.beginPath(),Object.values(l).some(t=>0!==t)?Kr(n,{x:a,y:s,w:f,h:p,radius:l}):n.rect(a,s,f,p),n.fill(),0!==r&&n.stroke()}n.restore()}(o.x(w),_,b),w=((t,e,i,n)=>t===(n?"left":"right")?i:"center"===t?(e+i)/2:e)(k,w+f+u,g?w+x:this.right,t.rtl),function(t,e,i){Yr(n,i.text,t,e+m/2,l,{strikethrough:i.hidden,textAlign:o.textAlign(i.textAlign)})}(o.x(w),_,b),g)d.x+=x+h;else if("string"!=typeof b.text){const t=l.lineHeight;d.y+=sl(b,t)+h}else d.y+=v}),qs(this.ctx,t.textDirection)}drawTitle(){const t=this.options,e=t.title,i=rs(e.font),n=ns(e.padding);if(!e.display)return;const r=zs(t.rtl,this.left,this.width),s=this.ctx,a=e.position,o=i.size/2,l=n.top+o;let h,c=this.left,u=this.width;if(this.isHorizontal())u=Math.max(...this.lineWidths),h=this.top+l,c=gr(t.align,c,this.right-u);else{const e=this.columnSizes.reduce((t,e)=>Math.max(t,e.height),0);h=l+gr(t.align,this.top,this.bottom-e-t.labels.padding-this._computeTitleHeight())}const d=gr(a,c,c+u);s.textAlign=r.textAlign(mr(a)),s.textBaseline="middle",s.strokeStyle=e.color,s.fillStyle=e.color,s.font=i.string,Yr(s,e.text,d,h,i)}_computeTitleHeight(){const t=this.options.title,e=rs(t.font),i=ns(t.padding);return t.display?e.lineHeight+i.height:0}_getLegendItemAt(t,e){let i,n,r;if(or(t,this.left,this.right)&&or(e,this.top,this.bottom))for(r=this.legendHitBoxes,i=0;i<r.length;++i)if(n=r[i],or(t,n.left,n.left+n.width)&&or(e,n.top,n.top+n.height))return this.legendItems[i];return null}handleEvent(t){const e=this.options;if(!function(t,e){return!("mousemove"!==t&&"mouseout"!==t||!e.onHover&&!e.onLeave)||!(!e.onClick||"click"!==t&&"mouseup"!==t)}(t.type,e))return;const i=this._getLegendItemAt(t.x,t.y);if("mousemove"===t.type||"mouseout"===t.type){const s=this._hoveredItem,a=(r=i,null!==(n=s)&&null!==r&&n.datasetIndex===r.datasetIndex&&n.index===r.index);s&&!a&&Cn(e.onLeave,[t,s,this],this),this._hoveredItem=i,i&&!a&&Cn(e.onHover,[t,i,this],this)}else i&&Cn(e.onClick,[t,i,this],this);var n,r}}function sl(t,e){return e*(t.text?t.text.length:0)}var al={id:"legend",_element:rl,start(t,e,i){const n=t.legend=new rl({ctx:t.ctx,options:i,chart:t});Na.configure(t,n,i),Na.addBox(t,n)},stop(t){Na.removeBox(t,t.legend),delete t.legend},beforeUpdate(t,e,i){const n=t.legend;Na.configure(t,n,i),n.options=i},afterUpdate(t){const e=t.legend;e.buildLabels(),e.adjustHitBoxes()},afterEvent(t,e){e.replay||t.legend.handleEvent(e.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(t,e,i){const n=e.datasetIndex,r=i.chart;r.isDatasetVisible(n)?(r.hide(n),e.hidden=!0):(r.show(n),e.hidden=!1)},onHover:null,onLeave:null,labels:{color:t=>t.chart.options.color,boxWidth:40,padding:10,generateLabels(t){const e=t.data.datasets,{labels:{usePointStyle:i,pointStyle:n,textAlign:r,color:s,useBorderRadius:a,borderRadius:o}}=t.legend.options;return t._getSortedDatasetMetas().map(t=>{const l=t.controller.getStyle(i?0:void 0),h=ns(l.borderWidth);return{text:e[t.index].label,fillStyle:l.backgroundColor,fontColor:s,hidden:!t.visible,lineCap:l.borderCapStyle,lineDash:l.borderDash,lineDashOffset:l.borderDashOffset,lineJoin:l.borderJoinStyle,lineWidth:(h.width+h.height)/4,strokeStyle:l.borderColor,pointStyle:n||l.pointStyle,rotation:l.rotation,textAlign:r||l.textAlign,borderRadius:a&&(o||l.borderRadius),datasetIndex:t.index}},this)}},title:{color:t=>t.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:t=>!t.startsWith("on"),labels:{_scriptable:t=>!["generateLabels","filter","sort"].includes(t)}}};new WeakMap;const ol={average(t){if(!t.length)return!1;let e,i,n=new Set,r=0,s=0;for(e=0,i=t.length;e<i;++e){const i=t[e].element;if(i&&i.hasValue()){const t=i.tooltipPosition();n.add(t.x),r+=t.y,++s}}return 0!==s&&0!==n.size&&{x:[...n].reduce((t,e)=>t+e)/n.size,y:r/s}},nearest(t,e){if(!t.length)return!1;let i,n,r,s=e.x,a=e.y,o=Number.POSITIVE_INFINITY;for(i=0,n=t.length;i<n;++i){const n=t[i].element;if(n&&n.hasValue()){const t=ir(e,n.getCenterPoint());t<o&&(o=t,r=n)}}if(r){const t=r.tooltipPosition();s=t.x,a=t.y}return{x:s,y:a}}};function ll(t,e){return e&&(En(e)?Array.prototype.push.apply(t,e):t.push(e)),t}function hl(t){return("string"==typeof t||t instanceof String)&&t.indexOf("\n")>-1?t.split("\n"):t}function cl(t,e){const{element:i,datasetIndex:n,index:r}=e,s=t.getDatasetMeta(n).controller,{label:a,value:o}=s.getLabelAndValue(r);return{chart:t,label:a,parsed:s.getParsed(r),raw:t.data.datasets[n].data[r],formattedValue:o,dataset:s.getDataset(),dataIndex:r,datasetIndex:n,element:i}}function ul(t,e){const i=t.chart.ctx,{body:n,footer:r,title:s}=t,{boxWidth:a,boxHeight:o}=e,l=rs(e.bodyFont),h=rs(e.titleFont),c=rs(e.footerFont),u=s.length,d=r.length,f=n.length,p=ns(e.padding);let m=p.height,g=0,y=n.reduce((t,e)=>t+e.before.length+e.lines.length+e.after.length,0);y+=t.beforeBody.length+t.afterBody.length,u&&(m+=u*h.lineHeight+(u-1)*e.titleSpacing+e.titleMarginBottom),y&&(m+=f*(e.displayColors?Math.max(o,l.lineHeight):l.lineHeight)+(y-f)*l.lineHeight+(y-1)*e.bodySpacing),d&&(m+=e.footerMarginTop+d*c.lineHeight+(d-1)*e.footerSpacing);let v=0;const b=function(t){g=Math.max(g,i.measureText(t).width+v)};return i.save(),i.font=h.string,Tn(t.title,b),i.font=l.string,Tn(t.beforeBody.concat(t.afterBody),b),v=e.displayColors?a+2+e.boxPadding:0,Tn(n,t=>{Tn(t.before,b),Tn(t.lines,b),Tn(t.after,b)}),v=0,i.font=c.string,Tn(t.footer,b),i.restore(),g+=p.width,{width:g,height:m}}function dl(t,e,i,n){const{x:r,width:s}=i,{width:a,chartArea:{left:o,right:l}}=t;let h="center";return"center"===n?h=r<=(o+l)/2?"left":"right":r<=s/2?h="left":r>=a-s/2&&(h="right"),function(t,e,i,n){const{x:r,width:s}=n,a=i.caretSize+i.caretPadding;return"left"===t&&r+s+a>e.width||"right"===t&&r-s-a<0||void 0}(h,t,e,i)&&(h="center"),h}function fl(t,e,i){const n=i.yAlign||e.yAlign||function(t,e){const{y:i,height:n}=e;return i<n/2?"top":i>t.height-n/2?"bottom":"center"}(t,i);return{xAlign:i.xAlign||e.xAlign||dl(t,e,i,n),yAlign:n}}function pl(t,e,i,n){const{caretSize:r,caretPadding:s,cornerRadius:a}=t,{xAlign:o,yAlign:l}=i,h=r+s,{topLeft:c,topRight:u,bottomLeft:d,bottomRight:f}=is(a);let p=function(t,e){let{x:i,width:n}=t;return"right"===e?i-=n:"center"===e&&(i-=n/2),i}(e,o);const m=function(t,e,i){let{y:n,height:r}=t;return"top"===e?n+=i:n-="bottom"===e?r+i:r/2,n}(e,l,h);return"center"===l?"left"===o?p+=h:"right"===o&&(p-=h):"left"===o?p-=Math.max(c,d)+r:"right"===o&&(p+=Math.max(u,f)+r),{x:ar(p,0,n.width-e.width),y:ar(m,0,n.height-e.height)}}function ml(t,e,i){const n=ns(i.padding);return"center"===e?t.x+t.width/2:"right"===e?t.x+t.width-n.right:t.x+n.left}function gl(t){return ll([],hl(t))}function yl(t,e){const i=e&&e.dataset&&e.dataset.tooltip&&e.dataset.tooltip.callbacks;return i?t.override(i):t}const vl={beforeTitle:vn,title(t){if(t.length>0){const e=t[0],i=e.chart.data.labels,n=i?i.length:0;if(this&&this.options&&"dataset"===this.options.mode)return e.dataset.label||"";if(e.label)return e.label;if(n>0&&e.dataIndex<n)return i[e.dataIndex]}return""},afterTitle:vn,beforeBody:vn,beforeLabel:vn,label(t){if(this&&this.options&&"dataset"===this.options.mode)return t.label+": "+t.formattedValue||t.formattedValue;let e=t.dataset.label||"";e&&(e+=": ");const i=t.formattedValue;return Sn(i)||(e+=i),e},labelColor(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{borderColor:e.borderColor,backgroundColor:e.backgroundColor,borderWidth:e.borderWidth,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(t){const e=t.chart.getDatasetMeta(t.datasetIndex).controller.getStyle(t.dataIndex);return{pointStyle:e.pointStyle,rotation:e.rotation}},afterLabel:vn,afterBody:vn,beforeFooter:vn,footer:vn,afterFooter:vn};function bl(t,e,i,n){const r=t[e].call(i,n);return void 0===r?vl[e].call(i,n):r}class Sl extends io{static positioners=ol;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const e=this.chart,i=this.options.setContext(this.getContext()),n=i.enabled&&e.options.animation&&i.animations,r=new ta(this.chart,n);return n._cacheable&&(this._cachedAnimations=Object.freeze(r)),r}getContext(){return this.$context||(this.$context=as(this.chart.getContext(),{tooltip:this,tooltipItems:this._tooltipItems,type:"tooltip"}))}getTitle(t,e){const{callbacks:i}=e,n=bl(i,"beforeTitle",this,t),r=bl(i,"title",this,t),s=bl(i,"afterTitle",this,t);let a=[];return a=ll(a,hl(n)),a=ll(a,hl(r)),a=ll(a,hl(s)),a}getBeforeBody(t,e){return gl(bl(e.callbacks,"beforeBody",this,t))}getBody(t,e){const{callbacks:i}=e,n=[];return Tn(t,t=>{const e={before:[],lines:[],after:[]},r=yl(i,t);ll(e.before,hl(bl(r,"beforeLabel",this,t))),ll(e.lines,bl(r,"label",this,t)),ll(e.after,hl(bl(r,"afterLabel",this,t))),n.push(e)}),n}getAfterBody(t,e){return gl(bl(e.callbacks,"afterBody",this,t))}getFooter(t,e){const{callbacks:i}=e,n=bl(i,"beforeFooter",this,t),r=bl(i,"footer",this,t),s=bl(i,"afterFooter",this,t);let a=[];return a=ll(a,hl(n)),a=ll(a,hl(r)),a=ll(a,hl(s)),a}_createItems(t){const e=this._active,i=this.chart.data,n=[],r=[],s=[];let a,o,l=[];for(a=0,o=e.length;a<o;++a)l.push(cl(this.chart,e[a]));return t.filter&&(l=l.filter((e,n,r)=>t.filter(e,n,r,i))),t.itemSort&&(l=l.sort((e,n)=>
vendor: 27,569 bytes, line 2
2t.itemSort(e,n,i))),Tn(l,e=>{const i=yl(t.callbacks,e);n.push(bl(i,"labelColor",this,e)),r.push(bl(i,"labelPointStyle",this,e)),s.push(bl(i,"labelTextColor",this,e))}),this.labelColors=n,this.labelPointStyles=r,this.labelTextColors=s,this.dataPoints=l,l}update(t,e){const i=this.options.setContext(this.getContext()),n=this._active;let r,s=[];if(n.length){const t=ol[i.position].call(this,n,this._eventPosition);s=this._createItems(i),this.title=this.getTitle(s,i),this.beforeBody=this.getBeforeBody(s,i),this.body=this.getBody(s,i),this.afterBody=this.getAfterBody(s,i),this.footer=this.getFooter(s,i);const e=this._size=ul(this,i),a=Object.assign({},t,e),o=fl(this.chart,i,a),l=pl(i,a,o,this.chart);this.xAlign=o.xAlign,this.yAlign=o.yAlign,r={opacity:1,x:l.x,y:l.y,width:e.width,height:e.height,caretX:t.x,caretY:t.y}}else 0!==this.opacity&&(r={opacity:0});this._tooltipItems=s,this.$context=void 0,r&&this._resolveAnimations().update(this,r),t&&i.external&&i.external.call(this,{chart:this.chart,tooltip:this,replay:e})}drawCaret(t,e,i,n){const r=this.getCaretPosition(t,i,n);e.lineTo(r.x1,r.y1),e.lineTo(r.x2,r.y2),e.lineTo(r.x3,r.y3)}getCaretPosition(t,e,i){const{xAlign:n,yAlign:r}=this,{caretSize:s,cornerRadius:a}=i,{topLeft:o,topRight:l,bottomLeft:h,bottomRight:c}=is(a),{x:u,y:d}=t,{width:f,height:p}=e;let m,g,y,v,b,S;return"center"===r?(b=d+p/2,"left"===n?(m=u,g=m-s,v=b+s,S=b-s):(m=u+f,g=m+s,v=b-s,S=b+s),y=m):(g="left"===n?u+Math.max(o,h)+s:"right"===n?u+f-Math.max(l,c)-s:this.caretX,"top"===r?(v=d,b=v-s,m=g-s,y=g+s):(v=d+p,b=v+s,m=g+s,y=g-s),S=v),{x1:m,x2:g,x3:y,y1:v,y2:b,y3:S}}drawTitle(t,e,i){const n=this.title,r=n.length;let s,a,o;if(r){const l=zs(i.rtl,this.x,this.width);for(t.x=ml(this,i.titleAlign,i),e.textAlign=l.textAlign(i.titleAlign),e.textBaseline="middle",s=rs(i.titleFont),a=i.titleSpacing,e.fillStyle=i.titleColor,e.font=s.string,o=0;o<r;++o)e.fillText(n[o],l.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+a,o+1===r&&(t.y+=i.titleMarginBottom-a)}}_drawColorBox(t,e,i,n,r){const s=this.labelColors[i],a=this.labelPointStyles[i],{boxHeight:o,boxWidth:l}=r,h=rs(r.bodyFont),c=ml(this,"left",r),u=n.x(c),d=o<h.lineHeight?(h.lineHeight-o)/2:0,f=e.y+d;if(r.usePointStyle){const e={radius:Math.min(l,o)/2,pointStyle:a.pointStyle,rotation:a.rotation,borderWidth:1},i=n.leftForLtr(u,l)+l/2,h=f+o/2;t.strokeStyle=r.multiKeyBackground,t.fillStyle=r.multiKeyBackground,Vr(t,e,i,h),t.strokeStyle=s.borderColor,t.fillStyle=s.backgroundColor,Vr(t,e,i,h)}else{t.lineWidth=kn(s.borderWidth)?Math.max(...Object.values(s.borderWidth)):s.borderWidth||1,t.strokeStyle=s.borderColor,t.setLineDash(s.borderDash||[]),t.lineDashOffset=s.borderDashOffset||0;const e=n.leftForLtr(u,l),i=n.leftForLtr(n.xPlus(u,1),l-2),a=is(s.borderRadius);Object.values(a).some(t=>0!==t)?(t.beginPath(),t.fillStyle=r.multiKeyBackground,Kr(t,{x:e,y:f,w:l,h:o,radius:a}),t.fill(),t.stroke(),t.fillStyle=s.backgroundColor,t.beginPath(),Kr(t,{x:i,y:f+1,w:l-2,h:o-2,radius:a}),t.fill()):(t.fillStyle=r.multiKeyBackground,t.fillRect(e,f,l,o),t.strokeRect(e,f,l,o),t.fillStyle=s.backgroundColor,t.fillRect(i,f+1,l-2,o-2))}t.fillStyle=this.labelTextColors[i]}drawBody(t,e,i){const{body:n}=this,{bodySpacing:r,bodyAlign:s,displayColors:a,boxHeight:o,boxWidth:l,boxPadding:h}=i,c=rs(i.bodyFont);let u=c.lineHeight,d=0;const f=zs(i.rtl,this.x,this.width),p=function(i){e.fillText(i,f.x(t.x+d),t.y+u/2),t.y+=u+r},m=f.textAlign(s);let g,y,v,b,S,E,k;for(e.textAlign=s,e.textBaseline="middle",e.font=c.string,t.x=ml(this,m,i),e.fillStyle=i.bodyColor,Tn(this.beforeBody,p),d=a&&"right"!==m?"center"===s?l/2+h:l+2+h:0,b=0,E=n.length;b<E;++b){for(g=n[b],y=this.labelTextColors[b],e.fillStyle=y,Tn(g.before,p),v=g.lines,a&&v.length&&(this._drawColorBox(e,t,b,f,i),u=Math.max(c.lineHeight,o)),S=0,k=v.length;S<k;++S)p(v[S]),u=c.lineHeight;Tn(g.after,p)}d=0,u=c.lineHeight,Tn(this.afterBody,p),t.y-=r}drawFooter(t,e,i){const n=this.footer,r=n.length;let s,a;if(r){const o=zs(i.rtl,this.x,this.width);for(t.x=ml(this,i.footerAlign,i),t.y+=i.footerMarginTop,e.textAlign=o.textAlign(i.footerAlign),e.textBaseline="middle",s=rs(i.footerFont),e.fillStyle=i.footerColor,e.font=s.string,a=0;a<r;++a)e.fillText(n[a],o.x(t.x),t.y+s.lineHeight/2),t.y+=s.lineHeight+i.footerSpacing}}drawBackground(t,e,i,n){const{xAlign:r,yAlign:s}=this,{x:a,y:o}=t,{width:l,height:h}=i,{topLeft:c,topRight:u,bottomLeft:d,bottomRight:f}=is(n.cornerRadius);e.fillStyle=n.backgroundColor,e.strokeStyle=n.borderColor,e.lineWidth=n.borderWidth,e.beginPath(),e.moveTo(a+c,o),"top"===s&&this.drawCaret(t,e,i,n),e.lineTo(a+l-u,o),e.quadraticCurveTo(a+l,o,a+l,o+u),"center"===s&&"right"===r&&this.drawCaret(t,e,i,n),e.lineTo(a+l,o+h-f),e.quadraticCurveTo(a+l,o+h,a+l-f,o+h),"bottom"===s&&this.drawCaret(t,e,i,n),e.lineTo(a+d,o+h),e.quadraticCurveTo(a,o+h,a,o+h-d),"center"===s&&"left"===r&&this.drawCaret(t,e,i,n),e.lineTo(a,o+c),e.quadraticCurveTo(a,o,a+c,o),e.closePath(),e.fill(),n.borderWidth>0&&e.stroke()}_updateAnimationTarget(t){const e=this.chart,i=this.$animations,n=i&&i.x,r=i&&i.y;if(n||r){const i=ol[t.position].call(this,this._active,this._eventPosition);if(!i)return;const s=this._size=ul(this,t),a=Object.assign({},i,this._size),o=fl(e,t,a),l=pl(t,a,o,e);n._to===l.x&&r._to===l.y||(this.xAlign=o.xAlign,this.yAlign=o.yAlign,this.width=s.width,this.height=s.height,this.caretX=i.x,this.caretY=i.y,this._resolveAnimations().update(this,l))}}_willRender(){return!!this.opacity}draw(t){const e=this.options.setContext(this.getContext());let i=this.opacity;if(!i)return;this._updateAnimationTarget(e);const n={width:this.width,height:this.height},r={x:this.x,y:this.y};i=Math.abs(i)<.001?0:i;const s=ns(e.padding),a=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;e.enabled&&a&&(t.save(),t.globalAlpha=i,this.drawBackground(r,t,n,e),Hs(t,e.textDirection),r.y+=s.top,this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),qs(t,e.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,e){const i=this._active,n=t.map(({datasetIndex:t,index:e})=>{const i=this.chart.getDatasetMeta(t);if(!i)throw new Error("Cannot find a dataset at index "+t);return{datasetIndex:t,element:i.data[e],index:e}}),r=!An(i,n),s=this._positionChanged(n,e);(r||s)&&(this._active=n,this._eventPosition=e,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,e,i=!0){if(e&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const n=this.options,r=this._active||[],s=this._getActiveElements(t,r,e,i),a=this._positionChanged(s,t),o=e||!An(s,r)||a;return o&&(this._active=s,(n.enabled||n.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,e))),o}_getActiveElements(t,e,i,n){const r=this.options;if("mouseout"===t.type)return[];if(!n)return e.filter(t=>this.chart.data.datasets[t.datasetIndex]&&void 0!==this.chart.getDatasetMeta(t.datasetIndex).controller.getParsed(t.index));const s=this.chart.getElementsAtEventForMode(t,r.mode,r,i);return r.reverse&&s.reverse(),s}_positionChanged(t,e){const{caretX:i,caretY:n,options:r}=this,s=ol[r.position].call(this,t,e);return!1!==s&&(i!==s.x||n!==s.y)}}var El={id:"tooltip",_element:Sl,positioners:ol,afterInit(t,e,i){i&&(t.tooltip=new Sl({chart:t,options:i}))},beforeUpdate(t,e,i){t.tooltip&&t.tooltip.initialize(i)},reset(t,e,i){t.tooltip&&t.tooltip.initialize(i)},afterDraw(t){const e=t.tooltip;if(e&&e._willRender()){const i={tooltip:e};if(!1===t.notifyPlugins("beforeTooltipDraw",{...i,cancelable:!0}))return;e.draw(t.ctx),t.notifyPlugins("afterTooltipDraw",i)}},afterEvent(t,e){if(t.tooltip){const i=e.replay;t.tooltip.handleEvent(e.event,i,e.inChartArea)&&(e.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(t,e)=>e.bodyFont.size,boxWidth:(t,e)=>e.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:vl},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:t=>"filter"!==t&&"itemSort"!==t&&"external"!==t,_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};function kl(t){const e=this.getLabels();return t>=0&&t<e.length?e[t]:t}class xl extends uo{static id="category";static defaults={ticks:{callback:kl}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const e=this._addedLabels;if(e.length){const t=this.getLabels();for(const{index:i,label:n}of e)t[i]===n&&t.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,e){if(Sn(t))return null;const i=this.getLabels();return((t,e)=>null===t?null:ar(Math.round(t),0,e))(e=isFinite(e)&&i[e]===t?e:function(t,e,i,n){const r=t.indexOf(e);return-1===r?((t,e,i,n)=>("string"==typeof e?(i=t.push(e)-1,n.unshift({index:i,label:e})):isNaN(e)&&(i=null),i))(t,e,i,n):r!==t.lastIndexOf(e)?i:r}(i,t,_n(e,t),this._addedLabels),i.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:e}=this.getUserBounds();let{min:i,max:n}=this.getMinMax(!0);"ticks"===this.options.bounds&&(t||(i=0),e||(n=this.getLabels().length-1)),this.min=i,this.max=n}buildTicks(){const t=this.min,e=this.max,i=this.options.offset,n=[];let r=this.getLabels();r=0===t&&e===r.length-1?r:r.slice(t,e+1),this._valueRange=Math.max(r.length-(i?0:1),1),this._startValue=this.min-(i?.5:0);for(let i=t;i<=e;i++)n.push({value:i});return n}getLabelForValue(t){return kl.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return"number"!=typeof t&&(t=this.parse(t)),null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const e=this.ticks;return t<0||t>e.length-1?null:this.getPixelForValue(e[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function wl(t,e,{horizontal:i,minRotation:n}){const r=tr(n),s=(i?Math.sin(r):Math.cos(r))||.001,a=.75*e*(""+t).length;return Math.min(e/s,a)}class _l extends uo{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,e){return Sn(t)||("number"==typeof t||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:e,maxDefined:i}=this.getUserBounds();let{min:n,max:r}=this;const s=t=>n=e?n:t,a=t=>r=i?r:t;if(t){const t=Xn(n),e=Xn(r);t<0&&e<0?a(0):t>0&&e>0&&s(0)}if(n===r){let e=0===r?1:Math.abs(.05*r);a(r+e),t||s(n-e)}this.min=n,this.max=r}getTickLimit(){const t=this.options.ticks;let e,{maxTicksLimit:i,stepSize:n}=t;return n?(e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,e>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${e} ticks. Limiting to 1000.`),e=1e3)):(e=this.computeTickLimit(),i=i||11),i&&(e=Math.min(i,e)),e}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,e=t.ticks;let i=this.getTickLimit();i=Math.max(2,i);const n=function(t,e){const i=[],{bounds:n,step:r,min:s,max:a,precision:o,count:l,maxTicks:h,maxDigits:c,includeBounds:u}=t,d=r||1,f=h-1,{min:p,max:m}=e,g=!Sn(s),y=!Sn(a),v=!Sn(l),b=(m-p)/(c+1);let S,E,k,x,w=Qn((m-p)/f/d)*d;if(w<1e-14&&!g&&!y)return[{value:p},{value:m}];x=Math.ceil(m/w)-Math.floor(p/w),x>f&&(w=Qn(x*w/f/d)*d),Sn(o)||(S=Math.pow(10,o),w=Math.ceil(w*S)/S),"ticks"===n?(E=Math.floor(p/w)*w,k=Math.ceil(m/w)*w):(E=p,k=m),g&&y&&r&&function(t,e){const i=Math.round(t);return i-e<=t&&i+e>=t}((a-s)/r,w/1e3)?(x=Math.round(Math.min((a-s)/w,h)),w=(a-s)/x,E=s,k=a):v?(E=g?s:E,k=y?a:k,x=l-1,w=(k-E)/x):(x=(k-E)/w,x=Jn(x,Math.round(x),w/1e3)?Math.round(x):Math.ceil(x));const _=Math.max(er(w),er(E));S=Math.pow(10,Sn(o)?_:o),E=Math.round(E*S)/S,k=Math.round(k*S)/S;let C=0;for(g&&(u&&E!==s?(i.push({value:s}),E<s&&C++,Jn(Math.round((E+C*w)*S)/S,s,wl(s,b,t))&&C++):E<s&&C++);C<x;++C){const t=Math.round((E+C*w)*S)/S;if(y&&t>a)break;i.push({value:t})}return y&&u&&k!==a?i.length&&Jn(i[i.length-1].value,a,wl(a,b,t))?i[i.length-1].value=a:i.push({value:a}):y&&k!==a||i.push({value:k}),i}({maxTicks:i,bounds:t.bounds,min:t.min,max:t.max,precision:e.precision,step:e.stepSize,count:e.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:e.minRotation||0,includeBounds:!1!==e.includeBounds},this._range||this);return"ticks"===t.bounds&&function(t,e,i){let n,r,s;for(n=0,r=t.length;n<r;n++)s=t[n][i],isNaN(s)||(e.min=Math.min(e.min,s),e.max=Math.max(e.max,s))}(n,this,"value"),t.reverse?(n.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),n}configure(){const t=this.ticks;let e=this.min,i=this.max;if(super.configure(),this.options.offset&&t.length){const n=(i-e)/Math.max(t.length-1,1)/2;e-=n,i+=n}this._startValue=e,this._endValue=i,this._valueRange=i-e}getLabelForValue(t){return Tr(t,this.chart.options.locale,this.options.ticks.format)}}class Cl extends _l{static id="linear";static defaults={ticks:{callback:Pr.formatters.numeric}};determineDataLimits(){const{min:t,max:e}=this.getMinMax(!0);this.min=xn(t)?t:0,this.max=xn(e)?e:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),e=t?this.width:this.height,i=tr(this.options.ticks.minRotation),n=(t?Math.sin(i):Math.cos(i))||.001,r=this._resolveTickFontOptions(0);return Math.ceil(e/Math.min(40,r.lineHeight/n))}getPixelForValue(t){return null===t?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}function Tl(t){return"$"+Math.round(t/1e3)+"K"}Pr.formatters.logarithmic,Pr.formatters.numeric,qo.register(class extends da{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,e,i,n){return ma(t,e,i,n)}parseArrayData(t,e,i,n){return ma(t,e,i,n)}parseObjectData(t,e,i,n){const{iScale:r,vScale:s}=t,{xAxisKey:a="x",yAxisKey:o="y"}=this._parsing,l="x"===r.axis?a:o,h="x"===s.axis?a:o,c=[];let u,d,f,p;for(u=i,d=i+n;u<d;++u)p=e[u],f={},f[r.axis]=r.parse(On(p,l),u),c.push(pa(On(p,h),f,s,u));return c}updateRangeFromParsed(t,e,i,n){super.updateRangeFromParsed(t,e,i,n);const r=i._custom;r&&e===this._cachedMeta.vScale&&(t.min=Math.min(t.min,r.min),t.max=Math.max(t.max,r.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const e=this._cachedMeta,{iScale:i,vScale:n}=e,r=this.getParsed(t),s=r._custom,a=ga(s)?"["+s.start+", "+s.end+"]":""+n.getLabelForValue(r[n.axis]);return{label:""+i.getLabelForValue(r[i.axis]),value:a}}initialize(){this.enableOptionSharing=!0,super.initialize(),this._cachedMeta.stack=this.getDataset().stack}update(t){const e=this._cachedMeta;this.updateElements(e.data,0,e.data.length,t)}updateElements(t,e,i,n){const r="reset"===n,{index:s,_cachedMeta:{vScale:a}}=this,o=a.getBasePixel(),l=a.isHorizontal(),h=this._getRuler(),{sharedOptions:c,includeOptions:u}=this._getSharedOptions(e,n);for(let d=e;d<e+i;d++){const e=this.getParsed(d),i=r||Sn(e[a.axis])?{base:o,head:o}:this._calculateBarValuePixels(d),f=this._calculateBarIndexPixels(d,h),p=(e._stacks||{})[a.axis],m={horizontal:l,base:i.base,enableBorderRadius:!p||ga(e._custom)||s===p._top||s===p._bottom,x:l?i.head:f.center,y:l?f.center:i.head,height:l?f.size:Math.abs(i.size),width:l?Math.abs(i.size):f.size};u&&(m.options=c||this.resolveDataElementOptions(d,t[d].active?"active":n));const g=m.options||t[d].options;ya(m,g,p,s),Sa(m,g,h.ratio),this.updateElement(t[d],d,m,n)}}_getStacks(t,e){const{iScale:i}=this._cachedMeta,n=i.getMatchingVisibleMetas(this._type).filter(t=>t.controller.options.grouped),r=i.options.stacked,s=[],a=this._cachedMeta.controller.getParsed(e),o=a&&a[i.axis],l=t=>{const e=t._parsed.find(t=>t[i.axis]===o),n=e&&e[t.vScale.axis];if(Sn(n)||isNaN(n))return!0};for(const i of n)if((void 0===e||!l(i))&&((!1===r||-1===s.indexOf(i.stack)||void 0===r&&void 0===i.stack)&&s.push(i.stack),i.index===t))break;return s.length||s.push(void 0),s}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,e=this.chart.options.indexAxis;return Object.keys(t).filter(i=>t[i].axis===e).shift()}_getAxis(){const t={},e=this.getFirstScaleIdForIndexAxis();for(const i of this.chart.data.datasets)t[_n("x"===this.chart.options.indexAxis?i.xAxisID:i.yAxisID,e)]=!0;return Object.keys(t)}_getStackIndex(t,e,i){const n=this._getStacks(t,i),r=void 0!==e?n.indexOf(e):-1;return-1===r?n.length-1:r}_getRuler(){const t=this.options,e=this._cachedMeta,i=e.iScale,n=[];let r,s;for(r=0,s=e.data.length;r<s;++r)n.push(i.getPixelForValue(this.getParsed(r)[i.axis],r));const a=t.barThickness;return{min:a||fa(e),pixels:n,start:i._startPixel,end:i._endPixel,stackCount:this._getStackCount(),scale:i,grouped:t.grouped,ratio:a?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:e,_stacked:i,index:n},options:{base:r,minBarLength:s}}=this,a=r||0,o=this.getParsed(t),l=o._custom,h=ga(l);let c,u,d=o[e.axis],f=0,p=i?this.applyStack(e,o,i):d;p!==d&&(f=p-d,p=d),h&&(d=l.barStart,p=l.barEnd-l.barStart,0!==d&&Xn(d)!==Xn(l.barEnd)&&(f=0),f+=d);const m=Sn(r)||h?f:r;let g=e.getPixelForValue(m);if(c=this.chart.getDataVisibility(t)?e.getPixelForValue(f+p):g,u=c-g,Math.abs(u)<s){u=function(t,e,i){return 0!==t?Xn(t):(e.isHorizontal()?1:-1)*(e.min>=i?1:-1)}(u,e,a)*s,d===a&&(g-=u/2);const t=e.getPixelForDecimal(0),r=e.getPixelForDecimal(1),l=Math.min(t,r),f=Math.max(t,r);g=Math.max(Math.min(g,f),l),c=g+u,i&&!h&&(o._stacks[e.axis]._visualValues[n]=e.getValueForPixel(c)-e.getValueForPixel(g))}if(g===e.getPixelForValue(a)){const t=Xn(u)*e.getLineWidthForValue(a)/2;g+=t,u-=t}return{size:u,base:g,head:c,center:c+u/2}}_calculateBarIndexPixels(t,e){const i=e.scale,n=this.options,r=n.skipNull,s=_n(n.maxBarThickness,1/0);let a,o;const l=this._getAxisCount();if(e.grouped){const i=r?this._getStackCount(t):e.stackCount,h="flex"===n.barThickness?function(t,e,i,n){const r=e.pixels,s=r[t];let a=t>0?r[t-1]:null,o=t<r.length-1?r[t+1]:null;const l=i.categoryPercentage;null===a&&(a=s-(null===o?e.end-e.start:o-s)),null===o&&(o=s+s-a);const h=s-(s-Math.min(a,o))/2*l;return{chunk:Math.abs(o-a)/2*l/n,ratio:i.barPercentage,start:h}}(t,e,n,i*l):function(t,e,i,n){const r=i.barThickness;let s,a;return Sn(r)?(s=e.min*i.categoryPercentage,a=i.barPercentage):(s=r*n,a=1),{chunk:s/n,ratio:a,start:e.pixels[t]-s/2}}(t,e,n,i*l),c="x"===this.chart.options.indexAxis?this.getDataset().xAxisID:this.getDataset().yAxisID,u=this._getAxis().indexOf(_n(c,this.getFirstScaleIdForIndexAxis())),d=this._getStackIndex(this.index,this._cachedMeta.stack,r?t:void 0)+u;a=h.start+h.chunk*d+h.chunk/2,o=Math.min(s,h.chunk*h.ratio)}else a=i.getPixelForValue(this.getParsed(t)[i.axis],t),o=Math.min(s,e.min*e.ratio);return{base:a-o/2,head:a+o/2,center:a,size:o}}draw(){const t=this._cachedMeta,e=t.vScale,i=t.data,n=i.length;let r=0;for(;r<n;++r)null===this.getParsed(r)[e.axis]||i[r].hidden||i[r].draw(this._ctx)}},class extends io{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:e,options:{borderColor:i,backgroundColor:n}}=this,{inner:r,outer:s}=function(t){const e=Qo(t),i=e.right-e.left,n=e.bottom-e.top,r=function(t,e,i){const n=t.options.borderWidth,r=t.borderSkipped,s=es(n);return{t:Zo(r.top,s.top,0,i),r:Zo(r.right,s.right,0,e),b:Zo(r.bottom,s.bottom,0,i),l:Zo(r.left,s.left,0,e)}}(t,i/2,n/2),s=function(t,e,i){const{enableBorderRadius:n}=t.getProps(["enableBorderRadius"]),r=t.options.borderRadius,s=is(r),a=Math.min(e,i),o=t.borderSkipped,l=n||kn(r);return{topLeft:Zo(!l||o.top||o.left,s.topLeft,0,a),topRight:Zo(!l||o.top||o.right,s.topRight,0,a),bottomLeft:Zo(!l||o.bottom||o.left,s.bottomLeft,0,a),bottomRight:Zo(!l||o.bottom||o.right,s.bottomRight,0,a)}}(t,i/2,n/2);return{outer:{x:e.left,y:e.top,w:i,h:n,radius:s},inner:{x:e.left+r.l,y:e.top+r.t,w:i-r.l-r.r,h:n-r.t-r.b,radius:{topLeft:Math.max(0,s.topLeft-Math.max(r.t,r.l)),topRight:Math.max(0,s.topRight-Math.max(r.t,r.r)),bottomLeft:Math.max(0,s.bottomLeft-Math.max(r.b,r.l)),bottomRight:Math.max(0,s.bottomRight-Math.max(r.b,r.r))}}}}(this),a=(o=s.radius).topLeft||o.topRight||o.bottomLeft||o.bottomRight?Kr:el;var o;t.save(),s.w===r.w&&s.h===r.h||(t.beginPath(),a(t,il(s,e,r)),t.clip(),a(t,il(r,-e,s)),t.fillStyle=i,t.fill("evenodd")),t.beginPath(),a(t,il(r,e)),t.fillStyle=n,t.fill(),t.restore()}inRange(t,e,i){return tl(this,t,e,i)}inXRange(t,e){return tl(this,t,null,e)}inYRange(t,e){return tl(this,null,t,e)}getCenterPoint(t){const{x:e,y:i,base:n,horizontal:r}=this.getProps(["x","y","base","horizontal"],t);return{x:r?(e+n)/2:e,y:r?i:(i+n)/2}}getRange(t){return"x"===t?this.width/2:this.height/2}},xl,Cl,El,al);var Al={id:"barValueLabels",afterDatasetsDraw:function(t){var e=t.ctx;t.data.datasets.forEach(function(i,n){t.getDatasetMeta(n).data.forEach(function(t,n){var r=i.data[n];e.save(),e.fillStyle="#333333",e.font="700 13px sans-serif",e.textAlign="center",e.textBaseline="bottom",e.fillText(Tl(r),t.x,t.y-3),e.restore()})})}};function Pl(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)}return i}function Dl(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Pl(Object(i),!0).forEach(function(e){s(t,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Pl(Object(i)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))})}return t}qo.register(class extends da{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const e=this._cachedMeta,{dataset:i,data:n=[],_dataset:r}=e,s=this.chart._animationsDisabled;let{start:a,count:o}=function(t,e,i){const n=e.length;let r=0,s=n;if(t._sorted){const{iScale:a,vScale:o,_parsed:l}=t,h=t.dataset&&t.dataset.options?t.dataset.options.spanGaps:null,c=a.axis,{min:u,max:d,minDefined:f,maxDefined:p}=a.getUserBounds();if(f){if(r=Math.min(hr(l,c,u).lo,i?n:hr(e,c,a.getPixelForValue(u)).lo),h){const t=l.slice(0,r+1).reverse().findIndex(t=>!Sn(t[o.axis]));r-=Math.max(0,t)}r=ar(r,0,n-1)}if(p){let t=Math.max(hr(l,a.axis,d,!0).hi+1,i?0:hr(e,c,a.getPixelForValue(d),!0).hi+1);if(h){const e=l.slice(t-1).findIndex(t=>!Sn(t[o.axis]));t+=Math.max(0,e)}s=ar(t,r,n)-r}else s=n-r}return{start:r,count:s}}(e,n,s);this._drawStart=a,this._drawCount=o,function(t){const{xScale:e,yScale:i,_scaleRanges:n}=t,r={xmin:e.min,xmax:e.max,ymin:i.min,ymax:i.max};if(!n)return t._scaleRanges=r,!0;const s=n.xmin!==e.min||n.xmax!==e.max||n.ymin!==i.min||n.ymax!==i.max;return Object.assign(n,r),s}(e)&&(a=0,o=n.length),i._chart=this.chart,i._datasetIndex=this.index,i._decimated=!!r._decimated,i.points=n;const l=this.resolveDatasetElementOptions(t);this.options.showLine||(l.borderWidth=0),l.segment=this.options.segment,this.updateElement(i,void 0,{animated:!s,options:l},t),this.updateElements(n,a,o,t)}updateElements(t,e,i,n){const r="reset"===n,{iScale:s,vScale:a,_stacked:o,_dataset:l}=this._cachedMeta,{sharedOptions:h,includeOptions:c}=this._getSharedOptions(e,n),u=s.axis,d=a.axis,{spanGaps:f,segment:p}=this.options,m=Zn(f)?f:Number.POSITIVE_INFINITY,g=this.chart._animationsDisabled||r||"none"===n,y=e+i,v=t.length;let b=e>0&&this.getParsed(e-1);for(let i=0;i<v;++i){const f=t[i],v=g?f:{};if(i<e||i>=y){v.skip=!0;continue}const S=this.getParsed(i),E=Sn(S[d]),k=v[u]=s.getPixelForValue(S[u],i),x=v[d]=r||E?a.getBasePixel():a.getPixelForValue(o?this.applyStack(a,S,o):S[d],i);v.skip=isNaN(k)||isNaN(x)||E,v.stop=i>0&&Math.abs(S[u]-b[u])>m,p&&(v.parsed=S,v.raw=l.data[i]),c&&(v.options=h||this.resolveDataElementOptions(i,f.active?"active":n)),g||this.updateElement(f,i,v,n),b=S}}getMaxOverflow(){const t=this._cachedMeta,e=t.dataset,i=e.options&&e.options.borderWidth||0,n=t.data||[];if(!n.length)return i;const r=n[0].size(this.resolveDataElementOptions(0)),s=n[n.length-1].size(this.resolveDataElementOptions(n.length-1));return Math.max(i,r,s)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}},class extends io{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>"borderDash"!==t&&"fill"!==t};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,e){const i=this.options;if((i.tension||"monotone"===i.cubicInterpolationMode)&&!i.stepped&&!this._pointsUpdated){const n=i.spanGaps?this._loop:this._fullLoop;_s(this._points,i,t,n,e),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=function(t,e){const i=t.points,n=t.options.spanGaps,r=i.length;if(!r)return[];const s=!!t._loop,{start:a,end:o}=function(t,e,i,n){let r=0,s=e-1;if(i&&!n)for(;r<e&&!t[r].skip;)r++;for(;r<e&&t[r].skip;)r++;for(r%=e,i&&(s+=r);s>r&&t[s%e].skip;)s--;return s%=e,{start:r,end:s}}(i,r,s,n);return function(t,e,i,n){return n&&n.setContext&&i?function(t,e,i,n){const r=t._chart.getContext(),s=Ws(t.options),{_datasetIndex:a,options:{spanGaps:o}}=t,l=i.length,h=[];let c=s,u=e[0].start,d=u;function f(t,e,n,r){const s=o?-1:1;if(t!==e){for(t+=l;i[t%l].skip;)t-=s;for(;i[e%l].skip;)e+=s;t%l!==e%l&&(h.push({start:t%l,end:e%l,loop:n,style:r}),c=r,u=e%l)}}for(const t of e){u=o?u:t.start;let e,s=i[u%l];for(d=u+1;d<=t.end;d++){const o=i[d%l];e=Ws(n.setContext(as(r,{type:"segment",p0:s,p1:o,p0DataIndex:(d-1)%l,p1DataIndex:d%l,datasetIndex:a}))),$s(e,c)&&f(u,d-1,t.loop,c),s=o,c=e}u<d-1&&f(u,d-1,t.loop,c)}return h}(t,e,i,n):e}(t,!0===n?[{start:a,end:o,loop:s}
2]:function(t,e,i,n){const r=t.length,s=[];let a,o=e,l=t[e];for(a=e+1;a<=i;++a){const i=t[a%r];i.skip||i.stop?l.skip||(n=!1,s.push({start:e%r,end:(a-1)%r,loop:n}),e=o=i.stop?a:null):(o=a,l.skip&&(e=a)),l=i}return null!==o&&s.push({start:e%r,end:o%r,loop:n}),s}(i,a,o<a?o+r:o,!!t._fullLoop&&0===a&&o===r-1),i,e)}(this,this.options.segment))}first(){const t=this.segments,e=this.points;return t.length&&e[t[0].start]}last(){const t=this.segments,e=this.points,i=t.length;return i&&e[t[i-1].end]}interpolate(t,e){const i=this.options,n=t[e],r=this.points,s=function(t,e){const i=[],n=t.segments;for(let r=0;r<n.length;r++){const s=js(n[r],t.points,e);s.length&&i.push(...s)}return i}(this,{property:e,start:n,end:n});if(!s.length)return;const a=[],o=function(t){return t.stepped?Ns:t.tension||"monotone"===t.cubicInterpolationMode?Vs:Bs}(i);let l,h;for(l=0,h=s.length;l<h;++l){const{start:h,end:c}=s[l],u=r[h],d=r[c];if(u===d){a.push(u);continue}const f=o(u,d,Math.abs((n-u[e])/(d[e]-u[e])),i.stepped);f[e]=t[e],a.push(f)}return 1===a.length?a[0]:a}pathSegment(t,e,i){return Ko(this)(t,this,e,i)}path(t,e,i){const n=this.segments,r=Ko(this);let s=this._loop;e=e||0,i=i||this.points.length-e;for(const a of n)s&=r(t,this,a,{start:e,end:e+i-1});return!!s}draw(t,e,i,n){const r=this.options||{};(this.points||[]).length&&r.borderWidth&&(t.save(),function(t,e,i,n){Xo&&!e.options.segment?function(t,e,i,n){let r=e._path;r||(r=e._path=new Path2D,e.path(r,i,n)&&r.closePath()),Go(t,e.options),t.stroke(r)}(t,e,i,n):function(t,e,i,n){const{segments:r,options:s}=e,a=Ko(e);for(const o of r)Go(t,s,o.style),t.beginPath(),a(t,e,o,{start:i,end:i+n-1})&&t.closePath(),t.stroke()}(t,e,i,n)}(t,this,i,n),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}},class extends io{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,e,i){const n=this.options,{x:r,y:s}=this.getProps(["x","y"],i);return Math.pow(t-r,2)+Math.pow(e-s,2)<Math.pow(n.hitRadius+n.radius,2)}inXRange(t,e){return Jo(this,t,"x",e)}inYRange(t,e){return Jo(this,t,"y",e)}getCenterPoint(t){const{x:e,y:i}=this.getProps(["x","y"],t);return{x:e,y:i}}size(t){let e=(t=t||this.options||{}).radius||0;return e=Math.max(e,e&&t.hoverRadius||0),2*(e+(e&&t.borderWidth||0))}draw(t,e){const i=this.options;this.skip||i.radius<.1||!Hr(this,e,this.size(i)/2)||(t.strokeStyle=i.borderColor,t.lineWidth=i.borderWidth,t.fillStyle=i.backgroundColor,Vr(t,i,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}},xl,Cl,El,al);var Ml={regionLevel:"nation",regionId:"0"},Ll=[{keys:["some college","some college, no degree"],label:"Some college"},{keys:["a Bachelor's degree"],label:"Bachelor's degree"},{keys:["a Master's degree","a Master's or Professional degree"],label:"Master's degree"}],Rl=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"listEl",get:function(){return this.querySelector("[data-career-list]")}},{key:"detailEl",get:function(){return this.querySelector("[data-career-detail]")}},{key:"comparisonModalEl",get:function(){return this.querySelector("[data-comparison-modal]")}},{key:"comparisonToggleEl",get:function(){return this.querySelector("[data-comparison-toggle]")}},{key:"comparisonBodyEl",get:function(){return this.querySelector("[data-comparison-body]")}},{key:"connectedCallback",value:function(){this.careerCache=new Map,this.comparisonSet=new Set,this.selectedRegion=Dl({},Ml),this.comparisonLocationA=Dl({},Ml),this.comparisonLocationB=null,this.charts={},this.openDropdown=null,this.addEventListener("click",this),this.addEventListener("input",this),this.addEventListener("keydown",this),this.careerListOpen=!1,this.onDocumentClick=this.onDocumentClick.bind(this),this.onCareerListDocumentClick=this.onCareerListDocumentClick.bind(this),this.comparisonToggleEl.disabled=!0;var t=this.listEl&&this.listEl.querySelector("[data-career-id]");t&&this.selectCareer(t.dataset.careerId)}},{key:"handleEvent",value:function(t){"click"===t.type&&this.onClick(t),"input"===t.type&&this.onInput(t),"keydown"===t.type&&this.onKeydown(t)}},{key:"onClick",value:function(t){if(t.target.closest("[data-career-list-toggle]"))return t.preventDefault(),void this.toggleCareerList();var e=t.target.closest("[data-career-id]");if(e&&this.listEl.contains(e))return t.preventDefault(),void this.selectCareer(e.dataset.careerId);if(t.target.closest("[data-education-toggle]"))return t.preventDefault(),void this.toggleEducation();var i=t.target.closest("[data-add-comparison]");if(i)return t.preventDefault(),void this.addToComparison(i.dataset.addComparison);var n=t.target.closest("[data-remove-comparison]");if(n)return t.preventDefault(),void this.removeFromComparison(n.dataset.removeComparison);if(t.target.closest("[data-comparison-toggle]"))return t.preventDefault(),void this.openComparisonModal();if(t.target.closest("[data-comparison-close]"))return t.preventDefault(),void this.closeComparisonModal();if(t.target!==this.comparisonModalEl){var r=t.target.closest("[data-region-trigger]");if(r)return t.preventDefault(),void this.toggleRegionDropdown(r.closest("[data-region-dropdown]"));var s=t.target.closest("[data-region-option]");s&&(t.preventDefault(),this.selectRegion(s))}else this.closeComparisonModal()}},{key:"onInput",value:function(t){if(t.target.matches("[data-region-search]")){var e=t.target.closest("[data-region-dropdown]"),i=t.target.value.trim().toLowerCase();e.querySelectorAll("[data-region-option]").forEach(function(t){var e=t.textContent.trim().toLowerCase().includes(i);t.closest("li").hidden=!e})}}},{key:"onKeydown",value:function(t){if("Escape"===t.key){if(this.openDropdown){var e=this.openDropdown.querySelector("[data-region-trigger]");return this.closeRegionDropdown(this.openDropdown),void e.focus()}if(this.careerListOpen){var i=this.querySelector("[data-career-list-toggle]");return this.closeCareerList(),void(i&&i.focus())}this.comparisonModalEl.hidden||this.closeComparisonModal()}}},{key:"onDocumentClick",value:function(t){this.openDropdown&&!this.openDropdown.contains(t.target)&&this.closeRegionDropdown(this.openDropdown)}},{key:"onCareerListDocumentClick",value:function(t){var e=this.querySelector("[data-career-list-column]");this.careerListOpen&&e&&!e.contains(t.target)&&this.closeCareerList()}},{key:"toggleCareerList",value:function(){this.careerListOpen?this.closeCareerList():this.openCareerList()}},{key:"openCareerList",value:function(){var t=this.querySelector("[data-career-list-column]"),e=this.querySelector("[data-career-list-toggle]");t&&e&&(t.setAttribute("data-list-open",""),e.setAttribute("aria-expanded","true"),this.careerListOpen=!0,document.addEventListener("click",this.onCareerListDocumentClick))}},{key:"closeCareerList",value:function(){var t=this.querySelector("[data-career-list-column]"),e=this.querySelector("[data-career-list-toggle]");t&&t.removeAttribute("data-list-open"),e&&e.setAttribute("aria-expanded","fal
2se"),this.careerListOpen=!1,document.removeEventListener("click",this.onCareerListDocumentClick)}},{key:"updateCareerListToggle",value:function(){var t=this.querySelector("[data-career-list-label]"),e=this.listEl&&this.listEl.querySelector('[data-career-id="'+this.activeCareerId+'"] span');t&&e&&(t.textContent=e.textContent.trim())}},{key:"toggleRegionDropdown",value:function(t){"true"===t.querySelector("[data-region-trigger]").getAttribute("aria-expanded")?this.closeRegionDropdown(t):this.openRegionDropdown(t)}},{key:"openRegionDropdown",value:function(t){this.openDropdown&&this.openDropdown!==t&&this.closeRegionDropdown(this.openDropdown);var e=t.querySelector("[data-region-trigger]"),i=t.querySelector("[data-region-panel]"),n=t.querySelector("[data-region-search]");e.setAttribute("aria-expanded","true"),i.hidden=!1,n.value="",t.querySelectorAll("[data-region-list] li").forEach(function(t){t.hidden=!1}),this.openDropdown=t,document.addEventListener("click",this.onDocumentClick),n.focus()}},{key:"closeRegionDropdown",value:function(t){t.querySelector("[data-region-trigger]").setAttribute("aria-expanded","false"),t.querySelector("[data-region-panel]").hidden=!0,this.openDropdown===t&&(this.openDropdown=null,document.removeEventListener("click",this.onDocumentClick))}},{key:"syncDropdownToRegion",value:function(t,e){var i=t.querySelectorAll("[data-region-option]"),n=Array.from(i).find(function(t){return t.dataset.regionLevel===e.regionLevel&&t.dataset.regionId===e.regionId});i.forEach(function(t){var e=t===n;t.toggleAttribute("data-active",e),t.closest("li").setAttribute("aria-selected",String(e))}),n&&(t.querySelector("[data-region-trigger-label]").textContent=n.textContent.trim())}},{key:"selectRegion",value:function(t){var e=t.closest("[data-region-dropdown]"),i={regionLevel:t.dataset.regionLevel||"nation",regionId:t.dataset.regionId};e.querySelectorAll("[data-region-option]").forEach(function(e){var i=e===t;e.toggleAttribute("data-active",i),e.closest("li").setAttribute("aria-selected",String(i))}),e.querySelector("[data-region-trigger-label]").textContent=t.textContent.trim(),this.closeRegionDropdown(e);var n=e.dataset.regionDropdown;"main"===n?(this.selectedRegion=i,this.renderDetail()):"a"===n?this.comparisonLocationA=i:"b"===n&&(this.comparisonLocationB=i),this.renderComparisonTable()}},{key:"selectCareer",value:function(t){var e=this;this.activeCareerId=t,this.markActiveListItem(t),this.updateCareerListToggle(),this.closeCareerList(),this.collapseEducation(),this.detailEl.hidden=!1,this.renderStaticDetail(this.readStaticCareerData(t)),this.loadCareer(t).then(function(){e.renderDetail(),e.updateAddComparisonButton()})}},{key:"collapseEducation",value:function(){var t=this.detailEl.querySelector("[data-education-toggle]"),e=this.detailEl.querySelector("[data-education-panel]");t.setAttribute("aria-expanded","false"),t.removeAttribute("data-expanded"),e.hidden=!0}},{key:"readStaticCareerData",value:function(t){var e=this.listEl&&this.listEl.querySelector('[data-career-id="'+t+'"]'),i=e&&e.closest("li").querySelector("[data-career-data]");if(!i)return{};try{return JSON.parse(i.textContent)}catch(t){return{}}}},{key:"readCareerEndpoint",value:function(t){var e=this.listEl&&this.listEl.querySelector('[data-career-id="'+t+'"]');return e&&e.dataset.careerEndpoint||""}},{key:"loadCareer",value:function(t){var e=this;if(this.careerCache.has(t))return Promise.resolve(this.careerCache.get(t));var i,n=this.readStaticCareerData(t);return(i=this.readCareerEndpoint(t),fetch(i).then(function(t){return t.json()}).then(function(t){return Array.isArray(t)?t:[t]})).then(function(i){var r=i[0]&&i[0].regionalCareersData||[],s=Dl(Dl({careerId:t},n),{},{regionalCareersData:r});return e.careerCache.set(t,s),s})}},{key:"markActiveListItem",value:function(t){this.listEl.querySelectorAll("[data-career-id]").forEach(function(e){var i=e.dataset.careerId===t;e.toggleAttribute("data-active",i),i?e.setAttribute("aria-current","true"):e.removeAttribute("aria-current")})}},{key:"findRegionalData",value:function(t,e){if(!e)return{data:null,isFallback:!1};var i=t&&t.regionalCareersData||[],n=i.find(function(t){return t.regionLevel===e.regionLevel&&t.regionId===e.regionId});return n?{data:n,isFallback:!1}:{data:i.find(function(t){return"nation"===t.regionLevel})||null,isFallback:"nation"!==e.regionLevel}}},{key:"renderDetail",value:function(){var t=this.careerCache.get(this.activeCareerId);if(t&&this.detailEl){this.renderStaticDetail(t);var e=this.findRegionalData(t,this.selectedRegion),i=e.data,n=e.isFallback;this.renderRegionNote(n),this.renderSalary(i),this.renderOutlook(i)}}},{key:"renderStaticDetail",value:function(t){this.detailEl&&(this.detailEl.querySelector("[data-title]").textContent=t.careerTitle||"",this.detailEl.querySelector("[data-description]").textContent=t.careerDescription||"",this.renderEducation(t.educationNeeded),this.renderSkills(t.softSkills,t.hardSkills),this.renderCompanies(t.companies))}},{key:"renderEducation",value:function(t){var e=this,i=this.detailEl.querySelector("[data-education]");i.innerHTML="";var n=t||{};Ll.forEach(function(t){var r=t.keys,s=t.label,a=r.find(function(t){return null!=n[t]}),o=null==a?null:n[a];null!=o&&i.appendChild(e.createEducationDonut(Math.round(o),s))})}},{key:"createEducationDonut",value:function(t,e){var i=document.createElement("div");
2i.className="CareerExplorer-educationChart";var n=document.createElement("div");n.className="CareerExplorer-donutWrap",n.innerHTML='<svg class="CareerExplorer-donut" viewBox="0 0 36 36" role="img" aria-label="'+t+"% "+e+'"><circle class="CareerExplorer-donutTrack" cx="18" cy="18" r="15.9155"></circle><circle class="CareerExplorer-donutValue" cx="18" cy="18" r="15.9155" stroke-dasharray="'+t+" "+(100-t)+'" stroke-dashoffset="25"></circle></svg>';var r=document.createElement("div");r.className="CareerExplorer-educationText";var s=document.createElement("span");s.className="CareerExplorer-educationPercent",s.textContent=t+"%";var a=document.createElement("span");return a.className="CareerExplorer-educationLabel",a.textContent=e,r.appendChild(s),r.appendChild(a),i.appendChild(n),i.appendChild(r),i}},{key:"renderRegionNote",value:function(t){var e=this.detailEl.querySelector("[data-region-note]");e.hidden=!t,t&&(e.textContent=this.dataset.i18nNoStateData)}},{key:"renderSalary",value:function(t){var e=this.detailEl.querySelector("[data-salary-summary]"),i=function(t){var e=t&&t.annualEarnings;if(!e)return null;var i=Object.keys(e).map(Number).filter(function(t){return!Number.isNaN(t)}).sort(function(t,e){return t-e})[0];return null!=i?e[i]:null}(t);e.textContent=null!=i?"$"+Math.round(i).toLocaleString():"â";var n=this.detailEl.querySelector('[data-chart="salary"]');this.labelChartCanvas(n,e.textContent),this.charts.salary=function(t,e,i){i&&i.destroy();var n=function(t){var e=t&&t.annualEarnings;if(!e)return null;var i=Object.keys(e).map(Number).filter(function(t){return!Number.isNaN(t)}).sort(function(t,e){return t-e});if(0===i.length)return null;var n=e[i[0]],r=e[i[i.length-1]];return{low:n,mid:null!=t.medianEarnings?t.medianEarnings:e[i[Math.floor(i.length/2)]],high:r}}(e);return t&&n?new qo(t,{type:"bar",data:{labels:["Entry Level","Mid Level","Senior Level"],datasets:[{data:[n.low,n.mid,n.high],backgroundColor:"#006EB6",borderRadius:4,maxBarThickness:56}]},options:{layout:{padding:{top:20}},plugins:{legend:{display:!1},tooltip:{callbacks:{label:function(t){return"$"+Math.round(t.parsed.y).toLocaleString()}}}},scales:{x:{grid:{display:!1},border:{display:!1},ticks:{color:"#656565",font:{size:12}}},y:{beginAtZero:!0,grace:"5%",grid:{color:"#e5e7eb",borderDash:[4,4]},border:{display:!1},ticks:{color:"#9ca3af",font:{size:11},count:5,callback:function(t){return Tl(t)}}}}},plugins:[Al]}):null}(n,t,this.charts.salary)}},{key:"renderOutlook",value:function(t){var e=this.detailEl.querySelector("[data-outlook-summary]");e.textContent=t&&null!=t.careerGrowthRate?(t.careerGrowthRate>0?"+":"")+t.careerGrowthRate+"%":"â";var i=this.detailEl.querySelector('[data-chart="outlook"]');this.labelChartCanvas(i,e.textContent),this.charts.outlook=function(t,e,i){i&&i.destroy();var n=e&&e.careerEmploymentData;if(!t||!n)return null;var r=Object.keys(n).map(Number).filter(function(t){return!Number.isNaN(t)}).sort(function(t,e){return t-e});return 0===r.length?null:new qo(t,{type:"line",data:{labels:r,datasets:[{data:r.map(function(t){return n[t]}),borderColor:"#006EB6",backgroundColor:"#006EB6",pointRadius:3,pointHoverRadius:5,tension:.3,fill:!1}]},options:{plugins:{legend:{display:!1},tooltip:{callbacks:{label:function(t){return Math.round(t.parsed.y).toLocaleString()}}}},scales:{x:{grid:{display:!1},border:{display:!1},ticks:{color:"#9ca3af",font:{size:11},maxTicksLimit:5}},y:{grid:{color:"#e5e7eb",borderDash:[4,4]},border:{display:!1},ticks:{color:"#9ca3af",font:{size:11},count:5,callback:function(t){return function(t){var e=Math.abs(t);return e>=1e6?(t/1e6).toFixed(1).replace(/\.0$/,"")+"M":e>=1e3?Math.round(t/1e3)+"K":String(Math.round(t))}(t)}}}}}})}(i,t,this.charts.outlook)}},{key:"labelChartCanvas",value:function(t,e){if(t){var i=t.closest(".CareerExplorer-statCard"),n=i&&i.querySelector(".CareerExplorer-chartLabel"),r=n?n.textContent.trim():"";t.setAttribute("role","img"),t.setAttribute("aria-label",[r,e].filter(Boolean).join(": "))}}},{key:"renderSkills",value:function(t,e){this.renderSkillList('[data-skills="soft"]',t),this.renderSkillList('[data-skills="hard"]',e)}},{key:"renderSkillList",value:function(t,e){var i=this,n=this.detailEl.querySelector(t);
2n.innerHTML="",(e||[]).forEach(function(t){n.appendChild(i.createBulletItem(t))})}},{key:"renderCompanies",value:function(t){var e=this,i=this.detailEl.querySelector("[data-companies]");i.innerHTML="",(t||[]).forEach(function(t){i.appendChild(e.createBulletItem(t))})}},{key:"createBulletItem",value:function(t){var e=document.createElement("li"),i=document.createElement("span");i.className="CareerExplorer-bulletDot",i.setAttribute("aria-hidden","true");var n=document.createElement("span");return n.textContent=t,e.appendChild(i),e.appendChild(n),e}},{key:"toggleEducation",value:function(){var t=this.detailEl.querySelector("[data-education-toggle]"),e=this.detailEl.querySelector("[data-education-panel]"),i="true"===t.getAttribute("aria-expanded");t.setAttribute("aria-expanded",String(!i)),t.toggleAttribute("data-expanded",!i),e.hidden=i}},{key:"updateAddComparisonButton",value:function(){var t=this.detailEl.querySelector("[data-add-comparison]");if(t){var e=this.comparisonSet.has(this.activeCareerId);t.dataset.addComparison=this.activeCareerId,t.disabled=e,t.toggleAttribute("data-added",e),e?t.innerHTML='<svg class="CareerExplorer-comparisonCheck" viewBox="0 0 20 20" aria-hidden="true"><path d="M4 10.5l4 4 8-9" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"></path></svg><span>'+this.dataset.i18nAddedToComparison+"</span>":t.textContent=this.dataset.i18nAddToComparison}}},{key:"addToComparison",value:function(t){var e=this;this.comparisonSet.add(t),this.loadCareer(t).then(function(){e.updateAddComparisonButton(),e.renderComparisonTable()})}},{key:"removeFromComparison",value:function(t){this.comparisonSet.delete(t),this.updateAddComparisonButton(),this.renderComparisonTable()}},{key:"openComparisonModal",value:function(){this.comparisonReturnFocus=document.activeElement,this.comparisonModalEl.hidden=!1,document.querySelector("html").setAttribute("data-career-modal-open","true");var t=this.querySelector('[data-region-dropdown="a"]');this.comparisonLocationA=Dl({},this.selectedRegion),this.syncDropdownToRegion(t,this.comparisonLocationA),this.renderComparisonTable();var e=this.comparisonModalEl.querySelector("[data-comparison-close]");e&&e.focus()}},{key:"closeComparisonModal",value:function(){this.comparisonModalEl.hidden=!0,document.querySelector("html").removeAttribute("data-career-modal-open"),this.comparisonReturnFocus&&"function"==typeof this.comparisonReturnFocus.focus&&this.comparisonReturnFocus.focus(),this.comparisonReturnFocus=null}},{key:"renderComparisonTable",value:function(){var t=this,e=Array.from(this.comparisonSet).map(function(e){return t.careerCache.get(e)}).filter(Boolean);this.comparisonToggleEl.disabled=0===e.length,this.comparisonToggleEl.querySelector("[data-comparison-count]").textContent=String(e.length),this.comparisonBodyEl&&(this.comparisonBodyEl.innerHTML="",e.forEach(function(e){t.comparisonBodyEl.appendChild(t.buildComparisonCard(e))}))}},{key:"buildComparisonCard",value:function(t){var e=document.createElement("div");e.className="CareerExplorer-comparisonCard",e.appendChild(this.buildComparisonCardHeader(t));var i=document.createElement("div");return i.className="CareerExplorer-comparisonCardMetrics",i.appendChild(this.buildComparisonLocationBlock(t,this.comparisonLocationA)),i.appendChild(this.buildComparisonLocationBlock(t,this.comparisonLocationB)),e.appendChild(i),e}},{key:"buildComparisonCardHeader",value:function(t){var e=document.createElement("div");e.className="CareerExplorer-comparisonCardHeader";var i=document.createElement("span");i.className="CareerExplorer-comparisonCardName",i.textContent=t.careerTitle;var n=document.createElement("button");return n.type="button",n.className="CareerExplorer-comparisonRemove",n.dataset.removeComparison=t.careerId,n.setAttribute("aria-label",this.dataset.i18nRemoveFromComparison),n.innerHTML='<svg viewBox="0 0 24 24" aria-hidden="true"><line x1="6" y1="6" x2="18" y2="18" stroke="currentColor" stroke-width="2" stroke-linecap="round"></line><line x1="18" y1="6" x2="6" y2="18" stroke="currentColor" stroke-width="2" stroke-linecap="round"></line></svg>',e.appendChild(i),e.appendChild(n),e}},{key:"buildComparisonLocationBlock",value:function(t,e){var i=document.createElement("div");
2i.className="CareerExplorer-comparisonLocationBlock";var n=this.findRegionalData(t,e).data,r=n&&null!=n.medianEarnings?"$"+Math.round(n.medianEarnings).toLocaleString():"â",s=n&&null!=n.careerGrowthRate?(n.careerGrowthRate>0?"+":"")+n.careerGrowthRate+"%":"â";return i.appendChild(this.buildComparisonMetric(this.dataset.i18nComparisonSalary,r,"salary")),i.appendChild(this.buildComparisonMetric(this.dataset.i18nComparisonGrowth,s)),i}},{key:"buildComparisonMetric",value:function(t,e,i){var n=document.createElement("div");n.className="CareerExplorer-comparisonMetric";var r=document.createElement("span");r.className="CareerExplorer-comparisonMetricLabel",r.textContent=t;var s=document.createElement("span");return s.className="CareerExplorer-comparisonMetricValue",i&&s.classList.add("CareerExplorer-comparisonMetricValue--"+i),s.textContent=e,n.appendChild(r),n.appendChild(s),n}}]),a}(G(HTMLElement));var Il=function(t,e){return!(!t||!e)&&0===t.localeCompare(e,void 0,{sensitivity:"base"})},Fl=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"connectedCallback",value:function(){var t=this;this.addEventListener("click",this),this.navLinks=T(document.querySelectorAll("a")),this.glossaryItems=T(document.querySelectorAll(".GlossaryItem")),this.contentNavLinks=T(document.querySelectorAll(".ContentNavigation-nav a")),this.glossaryItems.forEach(function(e){var i=e.querySelector(".ModuleHeader-title").innerText[0];t.navLinks.find(function(t){return Il(t.innerText,i)}).href="#"})}},{key:"handleEvent",value:function(t){"click"===t.type&&this.onClick(t)}},{key:"onClick",value:function(t){if(t.target.matches('a[href]:not([href=""])')){t.preventDefault();var e=t.target.innerText;Il(this.selectedChar,e)?this.selectedChar=null:this.selectedChar=e,this.render()}}},{key:"render",value:function(){var t=this;this.navLinks.forEach(function(e){!t.selectedChar||Il(e.innerText,t.selectedChar)?e.removeAttribute("data-inactive"):e.setAttribute("data-inactive","")}),this.glossaryItems.forEach(function(e){var i=e.querySelector(".ModuleHeader-title").innerText[0];!t.selectedChar||Il(i,t.selectedChar)?e.style.removeProperty("display"):e.style.setProperty("display","none")}),this.contentNavLinks.forEach(function(e){var i=e.innerText[0],n=e.closest("li");!t.selectedChar||Il(i,t.selectedChar)?n.style.removeProperty("display"):n.style.setProperty("display","none")})}}]),a}(G(HTMLElement));var Ol="bsp.helpfulTrackerResponses",Bl=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"topicContentId",get:function(){return this.dataset.topicContentId}},{key:"topicModifiedAt",get:function(){var t=this.dataset.topicModifiedAt;if(t)return new Date(+t)}},{key:"allowResubmit",get:function(){return"true"===this.dataset.allowResubmit}},{key:"submitted",get:function(){return this.hasAttribute("submitted")},set:function(t){t?this.setAttribute("data-submitted",""):this.removeAttribute("data-submitted")}},{key:"showSupplementaryFields",get:function(){return this.hasAttribute("data-show-supplementary-fields")},set:function(t){t?this.setAttribute("data-show-supplementary-fields",""):this.removeAttribute("data-show-supplementary-fields")}},{key:"formStatus",get:function(){return this.dataset.formStatus},set:function(t){this.dataset.formStatus=t}},{key:"connectedCallback",value:function(){this.form=this.querySelector("form"),this.form.addEventListener("submit",this),this.form.addEventListener("click",this),this.querySelector("bsp-google-captcha")&&window.addEventListener("scroll",this,!0),this.setState(!1,this.allowResubmit)}},{key:"handleEvent",value:function(t){"click"===t.type&&this.onClick(t),"submit"===t.type&&this.onSubmit(t),"scroll"===t.type&&this.onScroll()}},{key:"setState",value:function(t,e){this.showSupplementaryFields=!1;var i=this.getResponse();!t&&e||!i||+i.topicModifiedAt!==+this.topicModifiedAt||(this.submitted=!0,Array.from(this.form.elements).forEac
2h(function(t){t.disabled=!0,t.value===i.value?t.setAttribute("data-active",""):t.removeAttribute("data-active")}))}},{key:"storeResponse",value:function(t){var e=localStorage.getItem(Ol),i=e?JSON.parse(e):{};i[this.topicContentId]={topicModifiedAt:this.topicModifiedAt.getTime(),value:t},localStorage.setItem(Ol,JSON.stringify(i))}},{key:"getResponse",value:function(){var t=localStorage.getItem(Ol),e=(t?JSON.parse(t):{})[this.topicContentId];return e&&(e.topicModifiedAt=new Date(+e.topicModifiedAt)),e}},{key:"onClick",value:function(t){t.target.matches('[type="submit"][name="feedbackType"]')&&(this.querySelector('input[name="feedbackType"]').value=t.target.value),t.target.matches('[type="button"][name="feedbackType"][value="negative"]')&&(this.showSupplementaryFields=!0,this.querySelector("textarea").focus())}},{key:"onSubmit",value:function(t){var e=this;if(t.preventDefault(),!this.submitted){this.submitted=!0;var i=this.form.getAttribute("action")||"",n=this.form.getAttribute("method")||"POST",r=new FormData(this.form);fetch(i,{credentials:"include",method:n,body:r}).then(function(){e.storeResponse(r.get("feedbackType")),e.setState(!0)}).catch(function(t){console.log("Form Error: "+t)})}}},{key:"onScroll",value:function(){this.isInViewport()?this.setAttribute("data-visible",""):this.removeAttribute("data-visible")}},{key:"isInViewport",value:function(){var t=this.getBoundingClientRect(),e=this.offsetHeight,i=this.offsetWidth,n=t.top>=-e,r=t.left>=-i,s=t.right<=(window.innerWidth||document.documentElement.clientWidth)+i,a=t.bottom<=(window.innerHeight||document.documentElement.clientHeight)+e;return n&&r&&s&&a}}]),a}(G(HTMLElement));var Nl=function(e){V(a,e);var i,n,s=(i=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function a(){return t(this,a),s.apply(this,arguments)}return r(a,[{key:"connectedCallback",value:function(){this.hasAttribute("data-can-toggle")&&this.addEventListener("click",this),this.hasAttribute("data-tracks-active")&&(this.init(),this.onScroll(),window.addEventListener("scroll",this,!0)),window.addEventListener("resize",this)}},{key:"handleEvent",value:function(t){"click"===t.type&&this.onClick(t),"resize"===t.type&&this.init(t),"scroll"===t.type&&this.onScroll(t)}},{key:"onClick",value:function(t){t.target.matches(".ContentNavigation-header, .ContentNavigation-header *")&&(this.expanded=!this.expanded)}},{key:"expanded",get:function(){return this.hasAttribute("data-expanded")},set:function(t){t?this.setAttribute("data-expanded",""):this.removeAttribute("data-expanded")}},{key:"init",value:function(){var t=this,e=getComputedStyle(document.documentElement),i=parseInt(e.getPropertyValue("--hatDisplacementHeight")),n=parseInt(e.getPropertyValue("--headerDisplacementHeight")),r=parseInt(e.getPropertyValue("--bannerDisplacementHeight")),s=parseInt(e.getPropertyValue("--breadcrumbBarDisplacementHeight"));this.scrollDisplacement=i+n+r+s,this.links=this.querySelectorAll(".Link"),this.targets=[],this.links.forEach(function(e){var i=new URL(e.getAttribute("href"),window.location.href).hash;i&&t.targets.push(document.querySelector(i))})}},{key:"onScroll",value:function(){var t=this,e=this.targets.filter(function(t){return t&&null!==t.offsetParent}).reduce(function(e,i){return i.getBoundingClientRect().top<=t.scrollDisplacement+1?i:e},null);this.querySelectorAll("[data-active]").forEach(function(t){t.removeAttribute("data-active")}),e&&this.querySelector('[href$="#'.concat(e.id,'"]')).setAttribute("data-active","")}}]),a}(G(HTMLElement));var Vl=function(e){V(o,e);var i,n,a=(i=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}(),function(){var t,e=q(i);if(n){var r=q(this).constructor;t=Reflect.construct(e,arguments,r)}else t=e.apply(this,arguments);return H(this,t)});function o(){var e;t(this,o);for(var i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];return s(z(e=a.call.apply(a,[this].concat(n))),"throttledeSettActiveElement",O(500,function(){e.setActiveElement()})),e}
2return r(o,[{key:"connectedCallback",value:function(){var t=this;this.directionElements=T(this.querySelectorAll("[data-has-content]")),this.throttledeSettActiveElement=O(500,function(){t.setActiveElement()}),this.setActiveElement(),window.addEventListener("scroll",this.throttledeSettActiveElement,!0),window.addEventListener("resize",this.throttledeSettActiveElement,!0)}},{key:"setActiveElement",value:function(){if(oe.desktop.includes(le())){var t,e=window.innerHeight/2,i=this.directionElements.reduce(function(i,n){var r=n.getBoundingClientRect().top+n.offsetHeight/2,s=Math.abs(e-r);return!t||s<t?(t=s,n):i},null);if(i&&(this.activeElement&&this.activeElement!==i&&this.activeElement.removeAttribute("data-active"),!this.activeElement||this.activeElement!==i)){this.activeElement=i,i.setAttribute("data-active","");var n=i.querySelector(".TutorialDirection-additionalContent");this.querySelector(".TutorialStep-contentWell").innerHTML=n.innerHTML,document.body.dispatchEvent(new Event("Ajax:Rendered"))}}}}]),o}(G(HTMLElement));function zl(){customElements.define("ps-affinity-button",X),customElements.define("ps-audio-player",$),customElements.define("ps-accordion-promo",je),customElements.define("ps-elemental-player",dt),window.customElements.define("bsp-back-to-top",Fi),customElements.define("ps-banner",ft),customElements.define("ps-global-banner",pt),window.customElements.define("bsp-book",zi),window.customElements.define("bsp-career-explorer",Rl),window.customElements.define("bsp-chapter",Vi),window.customElements.define("bsp-content-navigation",Nl),customElements.define("ps-companion-content-item",kt),customElements.define("ps-commenting",xt),customElements.define("ps-custom-dropdown",wt),customElements.define("ps-enhancement-carousel",Rt),
2customElements.define("byu-fade-in",Yt),customElements.define("byu-four-up-gallery",Kt),customElements.define("ps-form",Nt),window.customElements.define("bsp-glossary-nav",Fl),window.customElements.define("bsp-helpful-tracker",Bl),window.customElements.define("bsp-tutorial-step",Vl),customElements.define("ps-captcha-input",Ft),customElements.define("ps-file-input",Bt),customElements.define("ps-email-input",Ot),customElements.define("ps-google-captcha",Ht),customElements.define("ps-text-input",jt),customElements.define("ps-password-input",qt),customElements.define("ps-phone-number-input",Ut),customElements.define("ps-text-area",Wt),customElements.define("ps-select",Gt),customElements.define("ps-gallery-page",Se),customElements.define("ps-html5player",ke),customElements.define("ps-list-carousel",ne),customElements.define("ps-list-carousel-b",he),customElements.define("ps-list-carousel-d",ce),customElements.define("ps-list-carousel-f",ue),customElements.define("list-search-action",me),customElements.define("ps-list-loadmore",pe),customElements.define("ps-live-blog-posts",De),customElements.define("ps-lottie-animation",Re),customElements.define("ps-google-cal-module",Ee),customElements.define("ps-header",Ve),customElements.define("ps-nav",Fe),customElements.define("ps-promo-notification",$e),customElements.define("ps-masonry-list",Ne),customElements.define("ps-message",Ie),customElements.define("ps-playlist-item",He),customElements.define("ps-playlist-enhancement",Ue),customElements.define("ps-podcast-episode-enhancement",Ge),customElements.define("ps-search-filter",Je),customElements.define("ps-search-overlay",Xe),customElements.define("ps-search-filters",Qe),customElements.define("ps-search-filters-course",Ze),customElements.define("ps-search-filters-degree",ti),customElements.define("ps-search-filters-calendar",ei),customElements.define("ps-read-more",Ke),customElements.define("ps-search-results-module",ii),customElements.define("ps-search-results-module-degree",li),customElements.define("ps-search-results-module-course",ai),customElements.define("ps-section-nav",hi),customElements.define("ps-tabs",di),customElements.define("ps-toggle-input",fi),customElements.define("ps-toggler",Ye),customElements.define("ps-user-profile-page",Si),customElements.define("ps-video-page-player",wi),customElements.define("ps-youtubeplayer",gi),customElements.define("ps-vimeoplayer",Ei),customElements.define("video-player-controls",ct),customElements.define("ps-playlist",yi),customElements.define("ps-video-lead",ki),customElements.define("ps-video-module",qe),customElements.define("bsp-video-promo",xi),customElements.define("ps-event-calendar",ri),customElements.define("timeline-module",Ci),customElements.define("bsp-list-vertical-video-carousel",Ti),new B,new xe,_i.init()}w.register(ie,".KalturaVideoPlayer"),w.register(yt,"[data-byui-clamp]"),w.register(We,"[data-full-width-promo]"),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",zl):zl()}()})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.