jQuery.event.special.touchstart={setup:function(_,ns,handle){this.addEventListener("touchstart",handle,{passive:true})}};!function(a,b,c,d){function e(b,c){this.settings=null,this.options=a.extend({},e.Defaults,c),this.$element=a(b),this._handlers={},this._plugins={},this._supress={},this._current=null,this._speed=null,this._coordinates=[],this._breakpoint=null,this._width=null,this._items=[],this._clones=[],this._mergers=[],this._widths=[],this._invalidated={},this._pipe=[],this._drag={time:null,target:null,pointer:null,stage:{start:null,current:null},direction:null},this._states={current:{},tags:{initializing:["busy"],animating:["busy"],dragging:["interacting"]}},a.each(["onResize","onThrottledResize"],a.proxy(function(b,c){this._handlers[c]=a.proxy(this[c],this)},this)),a.each(e.Plugins,a.proxy(function(a,b){this._plugins[a.charAt(0).toLowerCase()+a.slice(1)]=new b(this)},this)),a.each(e.Workers,a.proxy(function(b,c){this._pipe.push({filter:c.filter,run:a.proxy(c.run,this)})},this)),this.setup(),this.initialize()}e.Defaults={items:3,loop:!1,center:!1,rewind:!1,checkVisibility:!0,mouseDrag:!0,touchDrag:!0,pullDrag:!0,freeDrag:!1,margin:0,stagePadding:0,merge:!1,mergeFit:!0,autoWidth:!1,startPosition:0,rtl:!1,smartSpeed:250,fluidSpeed:!1,dragEndSpeed:!1,responsive:{},responsiveRefreshRate:200,responsiveBaseElement:b,fallbackEasing:"swing",slideTransition:"",info:!1,nestedItemSelector:!1,itemElement:"div",stageElement:"div",refreshClass:"owl-refresh",loadedClass:"owl-loaded",loadingClass:"owl-loading",rtlClass:"owl-rtl",responsiveClass:"owl-responsive",dragClass:"owl-drag",itemClass:"owl-item",stageClass:"owl-stage",stageOuterClass:"owl-stage-outer",grabClass:"owl-grab"},e.Width={Default:"default",Inner:"inner",Outer:"outer"},e.Type={Event:"event",State:"state"},e.Plugins={},e.Workers=[{filter:["width","settings"],run:function(){this._width=this.$element.width()}},{filter:["width","items","settings"],run:function(a){a.current=this._items&&this._items[this.relative(this._current)]}},{filter:["items","settings"],run:function(){this.$stage.children(".cloned").remove()}},{filter:["width","items","settings"],run:function(a){var b=this.settings.margin||"",c=!this.settings.autoWidth,d=this.settings.rtl,e={width:"auto","margin-left":d?b:"","margin-right":d?"":b};!c&&this.$stage.children().css(e),a.css=e}},{filter:["width","items","settings"],run:function(a){var b=(this.width()/this.settings.items).toFixed(3)-this.settings.margin,c=null,d=this._items.length,e=!this.settings.autoWidth,f=[];for(a.items={merge:!1,width:b};d--;)c=this._mergers[d],c=this.settings.mergeFit&&Math.min(c,this.settings.items)||c,a.items.merge=c>1||a.items.merge,f[d]=e?b*c:this._items[d].width();this._widths=f}},{filter:["items","settings"],run:function(){var b=[],c=this._items,d=this.settings,e=Math.max(2*d.items,4),f=2*Math.ceil(c.length/2),g=d.loop&&c.length?d.rewind?e:Math.max(e,f):0,h="",i="";for(g/=2;g>0;)b.push(this.normalize(b.length/2,!0)),h+=c[b[b.length-1]][0].outerHTML,b.push(this.normalize(c.length-1-(b.length-1)/2,!0)),i=c[b[b.length-1]][0].outerHTML+i,g-=1;this._clones=b,a(h).addClass("cloned").appendTo(this.$stage),a(i).addClass("cloned").prependTo(this.$stage)}},{filter:["width","items","settings"],run:function(){for(var a=this.settings.rtl?1:-1,b=this._clones.length+this._items.length,c=-1,d=0,e=0,f=[];++c",h)||this.op(b,"<",g)&&this.op(b,">",h))&&i.push(c);this.$stage.children(".active").removeClass("active"),this.$stage.children(":eq("+i.join("), :eq(")+")").addClass("active"),this.$stage.children(".center").removeClass("center"),this.settings.center&&this.$stage.children().eq(this.current()).addClass("center")}}],e.prototype.initializeStage=function(){this.$stage=this.$element.find("."+this.settings.stageClass),this.$stage.length||(this.$element.addClass(this.options.loadingClass),this.$stage=a("<"+this.settings.stageElement+">",{"class":this.settings.stageClass}).wrap(a("
",{"class":this.settings.stageOuterClass})),this.$element.append(this.$stage.parent()))},e.prototype.initializeItems=function(){var b=this.$element.find(".owl-item");if(b.length)return this._items=b.get().map(function(b){return a(b)}),this._mergers=this._items.map(function(){return 1}),void this.refresh();this.replace(this.$element.children().not(this.$stage.parent())),this.isVisible()?this.refresh():this.invalidate("width"),this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass)},e.prototype.initialize=function(){if(this.enter("initializing"),this.trigger("initialize"),this.$element.toggleClass(this.settings.rtlClass,this.settings.rtl),this.settings.autoWidth&&!this.is("pre-loading")){var a,b,c;a=this.$element.find("img"),b=this.settings.nestedItemSelector?"."+this.settings.nestedItemSelector:d,c=this.$element.children(b).width(),a.length&&c<=0&&this.preloadAutoWidthImages(a)}this.initializeStage(),this.initializeItems(),this.registerEventHandlers(),this.leave("initializing"),this.trigger("initialized")},e.prototype.isVisible=function(){return!this.settings.checkVisibility||this.$element.is(":visible")},e.prototype.setup=function(){var b=this.viewport(),c=this.options.responsive,d=-1,e=null;c?(a.each(c,function(a){a<=b&&a>d&&(d=Number(a))}),e=a.extend({},this.options,c[d]),"function"==typeof e.stagePadding&&(e.stagePadding=e.stagePadding()),delete e.responsive,e.responsiveClass&&this.$element.attr("class",this.$element.attr("class").replace(new RegExp("("+this.options.responsiveClass+"-)\\S+\\s","g"),"$1"+d))):e=a.extend({},this.options),this.trigger("change",{property:{name:"settings",value:e}}),this._breakpoint=d,this.settings=e,this.invalidate("settings"),this.trigger("changed",{property:{name:"settings",value:this.settings}})},e.prototype.optionsLogic=function(){this.settings.autoWidth&&(this.settings.stagePadding=!1,this.settings.merge=!1)},e.prototype.prepare=function(b){var c=this.trigger("prepare",{content:b});return c.data||(c.data=a("<"+this.settings.itemElement+"/>").addClass(this.options.itemClass).append(b)),this.trigger("prepared",{content:c.data}),c.data},e.prototype.update=function(){for(var b=0,c=this._pipe.length,d=a.proxy(function(a){return this[a]},this._invalidated),e={};b0)&&this._pipe[b].run(e),b++;this._invalidated={},!this.is("valid")&&this.enter("valid")},e.prototype.width=function(a){switch(a=a||e.Width.Default){case e.Width.Inner:case e.Width.Outer:return this._width;default:return this._width-2*this.settings.stagePadding+this.settings.margin}},e.prototype.refresh=function(){this.enter("refreshing"),this.trigger("refresh"),this.setup(),this.optionsLogic(),this.$element.addClass(this.options.refreshClass),this.update(),this.$element.removeClass(this.options.refreshClass),this.leave("refreshing"),this.trigger("refreshed")},e.prototype.onThrottledResize=function(){b.clearTimeout(this.resizeTimer),this.resizeTimer=b.setTimeout(this._handlers.onResize,this.settings.responsiveRefreshRate)},e.prototype.onResize=function(){return!!this._items.length&&(this._width!==this.$element.width()&&(!!this.isVisible()&&(this.enter("resizing"),this.trigger("resize").isDefaultPrevented()?(this.leave("resizing"),!1):(this.invalidate("width"),this.refresh(),this.leave("resizing"),void this.trigger("resized")))))},e.prototype.registerEventHandlers=function(){a.support.transition&&this.$stage.on(a.support.transition.end+".owl.core",a.proxy(this.onTransitionEnd,this)),!1!==this.settings.responsive&&this.on(b,"resize",this._handlers.onThrottledResize),this.settings.mouseDrag&&(this.$element.addClass(this.options.dragClass),this.$stage.on("mousedown.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("dragstart.owl.core selectstart.owl.core",function(){return!1})),this.settings.touchDrag&&(this.$stage.on("touchstart.owl.core",a.proxy(this.onDragStart,this)),this.$stage.on("touchcancel.owl.core",a.proxy(this.onDragEnd,this)))},e.prototype.onDragStart=function(b){var d=null;3!==b.which&&(a.support.transform?(d=this.$stage.css("transform").replace(/.*\(|\)| /g,"").split(","),d={x:d[16===d.length?12:4],y:d[16===d.length?13:5]}):(d=this.$stage.position(),d={x:this.settings.rtl?d.left+this.$stage.width()-this.width()+this.settings.margin:d.left,y:d.top}),this.is("animating")&&(a.support.transform?this.animate(d.x):this.$stage.stop(),this.invalidate("position")),this.$element.toggleClass(this.options.grabClass,"mousedown"===b.type),this.speed(0),this._drag.time=(new Date).getTime(),this._drag.target=a(b.target),this._drag.stage.start=d,this._drag.stage.current=d,this._drag.pointer=this.pointer(b),a(c).on("mouseup.owl.core touchend.owl.core",a.proxy(this.onDragEnd,this)),a(c).one("mousemove.owl.core touchmove.owl.core",a.proxy(function(b){var d=this.difference(this._drag.pointer,this.pointer(b));a(c).on("mousemove.owl.core touchmove.owl.core",a.proxy(this.onDragMove,this)),Math.abs(d.x)0^this.settings.rtl?"left":"right";a(c).off(".owl.core"),this.$element.removeClass(this.options.grabClass),(0!==d.x&&this.is("dragging")||!this.is("valid"))&&(this.speed(this.settings.dragEndSpeed||this.settings.smartSpeed),this.current(this.closest(e.x,0!==d.x?f:this._drag.direction)),this.invalidate("position"),this.update(),this._drag.direction=f,(Math.abs(d.x)>3||(new Date).getTime()-this._drag.time>300)&&this._drag.target.one("click.owl.core",function(){return!1})),this.is("dragging")&&(this.leave("dragging"),this.trigger("dragged"))},e.prototype.closest=function(b,c){var e=-1,f=30,g=this.width(),h=this.coordinates();return this.settings.freeDrag||a.each(h,a.proxy(function(a,i){return"left"===c&&b>i-f&&bi-g-f&&b",h[a+1]!==d?h[a+1]:i-g)&&(e="left"===c?a+1:a),-1===e},this)),this.settings.loop||(this.op(b,">",h[this.minimum()])?e=b=this.minimum():this.op(b,"<",h[this.maximum()])&&(e=b=this.maximum())),e},e.prototype.animate=function(b){var c=this.speed()>0;this.is("animating")&&this.onTransitionEnd(),c&&(this.enter("animating"),this.trigger("translate")),a.support.transform3d&&a.support.transition?this.$stage.css({transform:"translate3d("+b+"px,0px,0px)",transition:this.speed()/1e3+"s"+(this.settings.slideTransition?" "+this.settings.slideTransition:"")}):c?this.$stage.animate({left:b+"px"},this.speed(),this.settings.fallbackEasing,a.proxy(this.onTransitionEnd,this)):this.$stage.css({left:b+"px"})},e.prototype.is=function(a){return this._states.current[a]&&this._states.current[a]>0},e.prototype.current=function(a){if(a===d)return this._current;if(0===this._items.length)return d;if(a=this.normalize(a),this._current!==a){var b=this.trigger("change",{property:{name:"position",value:a}});b.data!==d&&(a=this.normalize(b.data)),this._current=a,this.invalidate("position"),this.trigger("changed",{property:{name:"position",value:this._current}})}return this._current},e.prototype.invalidate=function(b){return"string"===a.type(b)&&(this._invalidated[b]=!0,this.is("valid")&&this.leave("valid")),a.map(this._invalidated,function(a,b){return b})},e.prototype.reset=function(a){(a=this.normalize(a))!==d&&(this._speed=0,this._current=a,this.suppress(["translate","translated"]),this.animate(this.coordinates(a)),this.release(["translate","translated"]))},e.prototype.normalize=function(a,b){var c=this._items.length,e=b?0:this._clones.length;return!this.isNumeric(a)||c<1?a=d:(a<0||a>=c+e)&&(a=((a-e/2)%c+c)%c+e/2),a},e.prototype.relative=function(a){return a-=this._clones.length/2,this.normalize(a,!0)},e.prototype.maximum=function(a){var b,c,d,e=this.settings,f=this._coordinates.length;if(e.loop)f=this._clones.length/2+this._items.length-1;else if(e.autoWidth||e.merge){if(b=this._items.length)for(c=this._items[--b].width(),d=this.$element.width();b--&&!((c+=this._items[b].width()+this.settings.margin)>d););f=b+1}else f=e.center?this._items.length-1:this._items.length-e.items;return a&&(f-=this._clones.length/2),Math.max(f,0)},e.prototype.minimum=function(a){return a?0:this._clones.length/2},e.prototype.items=function(a){return a===d?this._items.slice():(a=this.normalize(a,!0),this._items[a])},e.prototype.mergers=function(a){return a===d?this._mergers.slice():(a=this.normalize(a,!0),this._mergers[a])},e.prototype.clones=function(b){var c=this._clones.length/2,e=c+this._items.length,f=function(a){return a%2==0?e+a/2:c-(a+1)/2};return b===d?a.map(this._clones,function(a,b){return f(b)}):a.map(this._clones,function(a,c){return a===b?f(c):null})},e.prototype.speed=function(a){return a!==d&&(this._speed=a),this._speed},e.prototype.coordinates=function(b){var c,e=1,f=b-1;return b===d?a.map(this._coordinates,a.proxy(function(a,b){return this.coordinates(b)},this)):(this.settings.center?(this.settings.rtl&&(e=-1,f=b+1),c=this._coordinates[b],c+=(this.width()-c+(this._coordinates[f]||0))/2*e):c=this._coordinates[f]||0,c=Math.ceil(c))},e.prototype.duration=function(a,b,c){return 0===c?0:Math.min(Math.max(Math.abs(b-a),1),6)*Math.abs(c||this.settings.smartSpeed)},e.prototype.to=function(a,b){var c=this.current(),d=null,e=a-this.relative(c),f=(e>0)-(e<0),g=this._items.length,h=this.minimum(),i=this.maximum();this.settings.loop?(!this.settings.rewind&&Math.abs(e)>g/2&&(e+=-1*f*g),a=c+e,(d=((a-h)%g+g)%g+h)!==a&&d-e<=i&&d-e>0&&(c=d-e,a=d,this.reset(c))):this.settings.rewind?(i+=1,a=(a%i+i)%i):a=Math.max(h,Math.min(i,a)),this.speed(this.duration(c,a,b)),this.current(a),this.isVisible()&&this.update()},e.prototype.next=function(a){a=a||!1,this.to(this.relative(this.current())+1,a)},e.prototype.prev=function(a){a=a||!1,this.to(this.relative(this.current())-1,a)},e.prototype.onTransitionEnd=function(a){if(a!==d&&(a.stopPropagation(),(a.target||a.srcElement||a.originalTarget)!==this.$stage.get(0)))return!1;this.leave("animating"),this.trigger("translated")},e.prototype.viewport=function(){var d;return this.options.responsiveBaseElement!==b?d=a(this.options.responsiveBaseElement).width():b.innerWidth?d=b.innerWidth:c.documentElement&&c.documentElement.clientWidth?d=c.documentElement.clientWidth:console.warn("Can not detect viewport width."),d},e.prototype.replace=function(b){this.$stage.empty(),this._items=[],b&&(b=b instanceof jQuery?b:a(b)),this.settings.nestedItemSelector&&(b=b.find("."+this.settings.nestedItemSelector)),b.filter(function(){return 1===this.nodeType}).each(a.proxy(function(a,b){b=this.prepare(b),this.$stage.append(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)},this)),this.reset(this.isNumeric(this.settings.startPosition)?this.settings.startPosition:0),this.invalidate("items")},e.prototype.add=function(b,c){var e=this.relative(this._current);c=c===d?this._items.length:this.normalize(c,!0),b=b instanceof jQuery?b:a(b),this.trigger("add",{content:b,position:c}),b=this.prepare(b),0===this._items.length||c===this._items.length?(0===this._items.length&&this.$stage.append(b),0!==this._items.length&&this._items[c-1].after(b),this._items.push(b),this._mergers.push(1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)):(this._items[c].before(b),this._items.splice(c,0,b),this._mergers.splice(c,0,1*b.find("[data-merge]").addBack("[data-merge]").attr("data-merge")||1)),this._items[e]&&this.reset(this._items[e].index()),this.invalidate("items"),this.trigger("added",{content:b,position:c})},e.prototype.remove=function(a){(a=this.normalize(a,!0))!==d&&(this.trigger("remove",{content:this._items[a],position:a}),this._items[a].remove(),this._items.splice(a,1),this._mergers.splice(a,1),this.invalidate("items"),this.trigger("removed",{content:null,position:a}))},e.prototype.preloadAutoWidthImages=function(b){b.each(a.proxy(function(b,c){this.enter("pre-loading"),c=a(c),a(new Image).one("load",a.proxy(function(a){c.attr("src",a.target.src),c.css("opacity",1),this.leave("pre-loading"),!this.is("pre-loading")&&!this.is("initializing")&&this.refresh()},this)).attr("src",c.attr("src")||c.attr("data-src")||c.attr("data-src-retina"))},this))},e.prototype.destroy=function(){this.$element.off(".owl.core"),this.$stage.off(".owl.core"),a(c).off(".owl.core"),!1!==this.settings.responsive&&(b.clearTimeout(this.resizeTimer),this.off(b,"resize",this._handlers.onThrottledResize));for(var d in this._plugins)this._plugins[d].destroy();this.$stage.children(".cloned").remove(),this.$stage.unwrap(),this.$stage.children().contents().unwrap(),this.$stage.children().unwrap(),this.$stage.remove(),this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class",this.$element.attr("class").replace(new RegExp(this.options.responsiveClass+"-\\S+\\s","g"),"")).removeData("owl.carousel")},e.prototype.op=function(a,b,c){var d=this.settings.rtl;switch(b){case"<":return d?a>c:a":return d?ac;case">=":return d?a<=c:a>=c;case"<=":return d?a>=c:a<=c}},e.prototype.on=function(a,b,c,d){a.addEventListener?a.addEventListener(b,c,d):a.attachEvent&&a.attachEvent("on"+b,c)},e.prototype.off=function(a,b,c,d){a.removeEventListener?a.removeEventListener(b,c,d):a.detachEvent&&a.detachEvent("on"+b,c)},e.prototype.trigger=function(b,c,d,f,g){var h={item:{count:this._items.length,index:this.current()}},i=a.camelCase(a.grep(["on",b,d],function(a){return a}).join("-").toLowerCase()),j=a.Event([b,"owl",d||"carousel"].join(".").toLowerCase(),a.extend({relatedTarget:this},h,c));return this._supress[b]||(a.each(this._plugins,function(a,b){b.onTrigger&&b.onTrigger(j)}),this.register({type:e.Type.Event,name:b}),this.$element.trigger(j),this.settings&&"function"==typeof this.settings[i]&&this.settings[i].call(this,j)),j},e.prototype.enter=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]===d&&(this._states.current[b]=0),this._states.current[b]++},this))},e.prototype.leave=function(b){a.each([b].concat(this._states.tags[b]||[]),a.proxy(function(a,b){this._states.current[b]--},this))},e.prototype.register=function(b){if(b.type===e.Type.Event){if(a.event.special[b.name]||(a.event.special[b.name]={}),!a.event.special[b.name].owl){var c=a.event.special[b.name]._default;a.event.special[b.name]._default=function(a){return!c||!c.apply||a.namespace&&-1!==a.namespace.indexOf("owl")?a.namespace&&a.namespace.indexOf("owl")>-1:c.apply(this,arguments)},a.event.special[b.name].owl=!0}}else b.type===e.Type.State&&(this._states.tags[b.name]?this._states.tags[b.name]=this._states.tags[b.name].concat(b.tags):this._states.tags[b.name]=b.tags,this._states.tags[b.name]=a.grep(this._states.tags[b.name],a.proxy(function(c,d){return a.inArray(c,this._states.tags[b.name])===d},this)))},e.prototype.suppress=function(b){a.each(b,a.proxy(function(a,b){this._supress[b]=!0},this))},e.prototype.release=function(b){a.each(b,a.proxy(function(a,b){delete this._supress[b]},this))},e.prototype.pointer=function(a){var c={x:null,y:null};return a=a.originalEvent||a||b.event,a=a.touches&&a.touches.length?a.touches[0]:a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,a.pageX?(c.x=a.pageX,c.y=a.pageY):(c.x=a.clientX,c.y=a.clientY),c},e.prototype.isNumeric=function(a){return!isNaN(parseFloat(a))},e.prototype.difference=function(a,b){return{x:a.x-b.x,y:a.y-b.y}},a.fn.owlCarousel=function(b){var c=Array.prototype.slice.call(arguments,1);return this.each(function(){var d=a(this),f=d.data("owl.carousel");f||(f=new e(this,"object"==typeof b&&b),d.data("owl.carousel",f),a.each(["next","prev","to","destroy","refresh","replace","add","remove"],function(b,c){f.register({type:e.Type.Event,name:c}),f.$element.on(c+".owl.carousel.core",a.proxy(function(a){a.namespace&&a.relatedTarget!==this&&(this.suppress([c]),f[c].apply(this,[].slice.call(arguments,1)),this.release([c]))},f))})),"string"==typeof b&&"_"!==b.charAt(0)&&f[b].apply(f,c)})},a.fn.owlCarousel.Constructor=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._interval=null,this._visible=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoRefresh&&this.watch()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers)};e.Defaults={autoRefresh:!0,autoRefreshInterval:500},e.prototype.watch=function(){this._interval||(this._visible=this._core.isVisible(),this._interval=b.setInterval(a.proxy(this.refresh,this),this._core.settings.autoRefreshInterval))},e.prototype.refresh=function(){this._core.isVisible()!==this._visible&&(this._visible=!this._visible,this._core.$element.toggleClass("owl-hidden",!this._visible),this._visible&&this._core.invalidate("width")&&this._core.refresh())},e.prototype.destroy=function(){var a,c;b.clearInterval(this._interval);for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(c in Object.getOwnPropertyNames(this))"function"!=typeof this[c]&&(this[c]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoRefresh=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._loaded=[],this._handlers={"initialized.owl.carousel change.owl.carousel resized.owl.carousel":a.proxy(function(b){if(b.namespace&&this._core.settings&&this._core.settings.lazyLoad&&(b.property&&"position"==b.property.name||"initialized"==b.type)){var c=this._core.settings,e=c.center&&Math.ceil(c.items/2)||c.items,f=c.center&&-1*e||0,g=(b.property&&b.property.value!==d?b.property.value:this._core.current())+f,h=this._core.clones().length,i=a.proxy(function(a,b){this.load(b)},this);for(c.lazyLoadEager>0&&(e+=c.lazyLoadEager,c.loop&&(g-=c.lazyLoadEager,e++));f++-1||(e.each(a.proxy(function(c,d){var e,f=a(d),g=b.devicePixelRatio>1&&f.attr("data-src-retina")||f.attr("data-src")||f.attr("data-srcset");this._core.trigger("load",{element:f,url:g},"lazy"),f.is("img")?f.one("load.owl.lazy",a.proxy(function(){f.css("opacity",1),this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("src",g):f.is("source")?f.one("load.owl.lazy",a.proxy(function(){this._core.trigger("loaded",{element:f,url:g},"lazy")},this)).attr("srcset",g):(e=new Image,e.onload=a.proxy(function(){f.css({"background-image":'url("'+g+'")',opacity:"1"}),this._core.trigger("loaded",{element:f,url:g},"lazy")},this),e.src=g)},this)),this._loaded.push(d.get(0)))},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this._core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Lazy=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(c){this._core=c,this._previousHeight=null,this._handlers={"initialized.owl.carousel refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&this.update()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&"position"===a.property.name&&this.update()},this),"loaded.owl.lazy":a.proxy(function(a){a.namespace&&this._core.settings.autoHeight&&a.element.closest("."+this._core.settings.itemClass).index()===this._core.current()&&this.update()},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._intervalId=null;var d=this;a(b).on("load",function(){d._core.settings.autoHeight&&d.update()}),a(b).resize(function(){d._core.settings.autoHeight&&(null!=d._intervalId&&clearTimeout(d._intervalId),d._intervalId=setTimeout(function(){d.update()},250))})};e.Defaults={autoHeight:!1,autoHeightClass:"owl-height"},e.prototype.update=function(){var b=this._core._current,c=b+this._core.settings.items,d=this._core.settings.lazyLoad,e=this._core.$stage.children().toArray().slice(b,c),f=[],g=0;a.each(e,function(b,c){f.push(a(c).height())}),g=Math.max.apply(null,f),g<=1&&d&&this._previousHeight&&(g=this._previousHeight),this._previousHeight=g,this._core.$stage.parent().height(g).addClass(this._core.settings.autoHeightClass)},e.prototype.destroy=function(){var a,b;for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.AutoHeight=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._videos={},this._playing=null,this._handlers={"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.register({type:"state",name:"playing",tags:["interacting"]})},this),"resize.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.video&&this.isInFullScreen()&&a.preventDefault()},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._core.is("resizing")&&this._core.$stage.find(".cloned .owl-video-frame").remove()},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"===a.property.name&&this._playing&&this.stop()},this),"prepared.owl.carousel":a.proxy(function(b){if(b.namespace){var c=a(b.content).find(".owl-video");c.length&&(c.css("display","none"),this.fetch(c,a(b.content)))}},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this._core.$element.on(this._handlers),this._core.$element.on("click.owl.video",".owl-video-play-icon",a.proxy(function(a){this.play(a)},this))};e.Defaults={video:!1,videoHeight:!1,videoWidth:!1},e.prototype.fetch=function(a,b){var c=function(){return a.attr("data-vimeo-id")?"vimeo":a.attr("data-vzaar-id")?"vzaar":"youtube"}(),d=a.attr("data-vimeo-id")||a.attr("data-youtube-id")||a.attr("data-vzaar-id"),e=a.attr("data-width")||this._core.settings.videoWidth,f=a.attr("data-height")||this._core.settings.videoHeight,g=a.attr("href");if(!g)throw new Error("Missing video URL.");if(d=g.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com|be\-nocookie\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/),d[3].indexOf("youtu")>-1)c="youtube";else if(d[3].indexOf("vimeo")>-1)c="vimeo";else{if(!(d[3].indexOf("vzaar")>-1))throw new Error("Video URL not supported.");c="vzaar"}d=d[6],this._videos[g]={type:c,id:d,width:e,height:f},b.attr("data-video",g),this.thumbnail(a,this._videos[g])},e.prototype.thumbnail=function(b,c){var d,e,f,g=c.width&&c.height?"width:"+c.width+"px;height:"+c.height+"px;":"",h=b.find("img"),i="src",j="",k=this._core.settings,l=function(c){e='
',d=k.lazyLoad?a("
",{"class":"owl-video-tn "+j,srcType:c}):a("
",{"class":"owl-video-tn",style:"opacity:1;background-image:url("+c+")"}),b.after(d),b.after(e)};if(b.wrap(a("
",{"class":"owl-video-wrapper",style:g})),this._core.settings.lazyLoad&&(i="data-src",j="owl-lazy"),h.length)return l(h.attr(i)),h.remove(),!1;"youtube"===c.type?(f="//img.youtube.com/vi/"+c.id+"/hqdefault.jpg",l(f)):"vimeo"===c.type?a.ajax({type:"GET",url:"//vimeo.com/api/v2/video/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a[0].thumbnail_large,l(f)}}):"vzaar"===c.type&&a.ajax({type:"GET",url:"//vzaar.com/api/videos/"+c.id+".json",jsonp:"callback",dataType:"jsonp",success:function(a){f=a.framegrab_url,l(f)}})},e.prototype.stop=function(){this._core.trigger("stop",null,"video"),this._playing.find(".owl-video-frame").remove(),this._playing.removeClass("owl-video-playing"),this._playing=null,this._core.leave("playing"),this._core.trigger("stopped",null,"video")},e.prototype.play=function(b){var c,d=a(b.target),e=d.closest("."+this._core.settings.itemClass),f=this._videos[e.attr("data-video")],g=f.width||"100%",h=f.height||this._core.$stage.height();this._playing||(this._core.enter("playing"),this._core.trigger("play",null,"video"),e=this._core.items(this._core.relative(e.index())),this._core.reset(e.index()),c=a(''),c.attr("height",h),c.attr("width",g),"youtube"===f.type?c.attr("src","//www.youtube.com/embed/"+f.id+"?autoplay=1&rel=0&v="+f.id):"vimeo"===f.type?c.attr("src","//player.vimeo.com/video/"+f.id+"?autoplay=1"):"vzaar"===f.type&&c.attr("src","//view.vzaar.com/"+f.id+"/player?autoplay=true"),a(c).wrap('
').insertAfter(e.find(".owl-video")),this._playing=e.addClass("owl-video-playing"))},e.prototype.isInFullScreen=function(){var b=c.fullscreenElement||c.mozFullScreenElement||c.webkitFullscreenElement;return b&&a(b).parent().hasClass("owl-video-frame")},e.prototype.destroy=function(){var a,b;this._core.$element.off("click.owl.video");for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Video=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this.core=b,this.core.options=a.extend({},e.Defaults,this.core.options),this.swapping=!0,this.previous=d,this.next=d,this.handlers={"change.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&(this.previous=this.core.current(),this.next=a.property.value)},this),"drag.owl.carousel dragged.owl.carousel translated.owl.carousel":a.proxy(function(a){a.namespace&&(this.swapping="translated"==a.type)},this),"translate.owl.carousel":a.proxy(function(a){a.namespace&&this.swapping&&(this.core.options.animateOut||this.core.options.animateIn)&&this.swap()},this)},this.core.$element.on(this.handlers)};e.Defaults={animateOut:!1,animateIn:!1},e.prototype.swap=function(){if(1===this.core.settings.items&&a.support.animation&&a.support.transition){this.core.speed(0);var b,c=a.proxy(this.clear,this),d=this.core.$stage.children().eq(this.previous),e=this.core.$stage.children().eq(this.next),f=this.core.settings.animateIn,g=this.core.settings.animateOut;this.core.current()!==this.previous&&(g&&(b=this.core.coordinates(this.previous)-this.core.coordinates(this.next),d.one(a.support.animation.end,c).css({left:b+"px"}).addClass("animated owl-animated-out").addClass(g)),f&&e.one(a.support.animation.end,c).addClass("animated owl-animated-in").addClass(f))}},e.prototype.clear=function(b){a(b.target).css({left:""}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),this.core.onTransitionEnd()},e.prototype.destroy=function(){var a,b;for(a in this.handlers)this.core.$element.off(a,this.handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.Animate=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){var e=function(b){this._core=b,this._call=null,this._time=0,this._timeout=0,this._paused=!0,this._handlers={"changed.owl.carousel":a.proxy(function(a){a.namespace&&"settings"===a.property.name?this._core.settings.autoplay?this.play():this.stop():a.namespace&&"position"===a.property.name&&this._paused&&(this._time=0)},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.autoplay&&this.play()},this),"play.owl.autoplay":a.proxy(function(a,b,c){a.namespace&&this.play(b,c)},this),"stop.owl.autoplay":a.proxy(function(a){a.namespace&&this.stop()},this),"mouseover.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"mouseleave.owl.autoplay":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.play()},this),"touchstart.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this._core.is("rotating")&&this.pause()},this),"touchend.owl.core":a.proxy(function(){this._core.settings.autoplayHoverPause&&this.play()},this)},this._core.$element.on(this._handlers),this._core.options=a.extend({},e.Defaults,this._core.options)};e.Defaults={autoplay:!1,autoplayTimeout:5e3,autoplayHoverPause:!1,autoplaySpeed:!1},e.prototype._next=function(d){this._call=b.setTimeout(a.proxy(this._next,this,d),this._timeout*(Math.round(this.read()/this._timeout)+1)-this.read()),this._core.is("interacting")||c.hidden||this._core.next(d||this._core.settings.autoplaySpeed)},e.prototype.read=function(){return(new Date).getTime()-this._time},e.prototype.play=function(c,d){var e;this._core.is("rotating")||this._core.enter("rotating"),c=c||this._core.settings.autoplayTimeout,e=Math.min(this._time%(this._timeout||c),c),this._paused?(this._time=this.read(),this._paused=!1):b.clearTimeout(this._call),this._time+=this.read()%c-e,this._timeout=c,this._call=b.setTimeout(a.proxy(this._next,this,d),c-e)},e.prototype.stop=function(){this._core.is("rotating")&&(this._time=0,this._paused=!0,b.clearTimeout(this._call),this._core.leave("rotating"))},e.prototype.pause=function(){this._core.is("rotating")&&!this._paused&&(this._time=this.read(),this._paused=!0,b.clearTimeout(this._call))},e.prototype.destroy=function(){var a,b;this.stop();for(a in this._handlers)this._core.$element.off(a,this._handlers[a]);for(b in Object.getOwnPropertyNames(this))"function"!=typeof this[b]&&(this[b]=null)},a.fn.owlCarousel.Constructor.Plugins.autoplay=e}(window.Zepto||window.jQuery,window,document),function(a,b,c,d){"use strict";var e=function(b){this._core=b,this._initialized=!1,this._pages=[],this._controls={},this._templates=[],this.$element=this._core.$element,this._overrides={next:this._core.next,prev:this._core.prev,to:this._core.to},this._handlers={"prepared.owl.carousel":a.proxy(function(b){b.namespace&&this._core.settings.dotsData&&this._templates.push('
'+a(b.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot")+"
")},this),"added.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,0,this._templates.pop())},this),"remove.owl.carousel":a.proxy(function(a){a.namespace&&this._core.settings.dotsData&&this._templates.splice(a.position,1)},this),"changed.owl.carousel":a.proxy(function(a){a.namespace&&"position"==a.property.name&&this.draw()},this),"initialized.owl.carousel":a.proxy(function(a){a.namespace&&!this._initialized&&(this._core.trigger("initialize",null,"navigation"),this.initialize(),this.update(),this.draw(),this._initialized=!0,this._core.trigger("initialized",null,"navigation"))},this),"refreshed.owl.carousel":a.proxy(function(a){a.namespace&&this._initialized&&(this._core.trigger("refresh",null,"navigation"),this.update(),this.draw(),this._core.trigger("refreshed",null,"navigation"))},this)},this._core.options=a.extend({},e.Defaults,this._core.options),this.$element.on(this._handlers)};e.Defaults={nav:!1,navText:['',''],navSpeed:!1,navElement:'button type="button" role="presentation"',navContainer:!1,navContainerClass:"owl-nav",navClass:["owl-prev","owl-next"],slideBy:1,dotClass:"owl-dot",dotsClass:"owl-dots",dots:!0,dotsEach:!1,dotsData:!1,dotsSpeed:!1,dotsContainer:!1},e.prototype.initialize=function(){var b,c=this._core.settings;this._controls.$relative=(c.navContainer?a(c.navContainer):a("
").addClass(c.navContainerClass).appendTo(this.$element)).addClass("disabled"),this._controls.$previous=a("<"+c.navElement+">").addClass(c.navClass[0]).html(c.navText[0]).prependTo(this._controls.$relative).on("click",a.proxy(function(a){this.prev(c.navSpeed)},this)),this._controls.$next=a("<"+c.navElement+">").addClass(c.navClass[1]).html(c.navText[1]).appendTo(this._controls.$relative).on("click",a.proxy(function(a){this.next(c.navSpeed)},this)),c.dotsData||(this._templates=[a('",'"].join("")})},e.content=function(){return[this.createElColors_(),this.createElFont_(),this.createElControls_()]},e.label=function(){return this.localize("Caption Settings Dialog")},e.description=function(){return this.localize("Beginning of dialog window. Escape will cancel and close the window.")},e.buildCSSClass=function(){return n.prototype.buildCSSClass.call(this)+" vjs-text-track-settings"},e.getValues=function(){var i,n,t,s=this;return n=function(t,e,i){var n,r,a=(n=s.$(e.selector),r=e.parser,Or(n.options[n.options.selectedIndex].value,r));return void 0!==a&&(t[i]=a),t},void 0===(t={})&&(t=0),r(i=Lr).reduce(function(t,e){return n(t,i[e],e)},t)},e.setValues=function(i){var n=this;o(Lr,function(t,e){!function(t,e,i){if(e)for(var n=0;ne.attributes.bandwidth||(t[l]={language:u,autoselect:!0,default:"main"===o,playlists:[(i=e,r=i.attributes,a=i.segments,s={attributes:(n={NAME:r.id,BANDWIDTH:r.bandwidth,CODECS:r.codecs},n["PROGRAM-ID"]=1,n),uri:"",endList:"static"===(r.type||"static"),timeline:r.periodIndex,resolvedUri:"",targetDuration:r.duration,segments:a,mediaSequence:a.length?a[0].number:1},r.contentProtection&&(s.contentProtection=r.contentProtection),s)],uri:""}),t},{})),u.length&&(l.mediaGroups.SUBTITLES.subs=u.reduce(function(t,e){var i,n,r,a,s=e.attributes.lang||"text";return t[s]||(t[s]={language:s,default:!1,autoselect:!1,playlists:[(i=e,r=i.attributes,a=i.segments,"undefined"==typeof a&&(a=[{uri:r.baseUrl,timeline:r.periodIndex,resolvedUri:r.baseUrl||"",duration:r.sourceDuration,number:0}],r.duration=r.sourceDuration),{attributes:(n={NAME:r.id,BANDWIDTH:r.bandwidth},n["PROGRAM-ID"]=1,n),uri:"",endList:"static"===(r.type||"static"),timeline:r.periodIndex,resolvedUri:r.baseUrl||"",targetDuration:r.duration,segments:a,mediaSequence:a.length?a[0].number:1})],uri:""}),t},{})),l}(ss(os(t),e).map(za))},ls=function(t){return function(t){var e=Wa(t,"UTCTiming")[0];if(!e)return null;var i=$a(e);switch(i.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":i.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":i.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":i.method="DIRECT",i.value=Date.parse(i.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(Va)}return i}(os(t))},cs=function(t){return t>>>0};Ja=function(t){return Ka(t,["moov","trak"]).reduce(function(t,e){var i,n,r,a,s;return(i=Ka(e,["tkhd"])[0])?(n=i[0],a=cs(i[r=0===n?12:20]<<24|i[r+1]<<16|i[r+2]<<8|i[r+3]),(s=Ka(e,["mdia","mdhd"])[0])?(r=0===(n=s[0])?12:20,t[a]=cs(s[r]<<24|s[r+1]<<16|s[r+2]<<8|s[r+3]),t):null):null},{})},Za=function(r,t){var e,i,n;return e=Ka(t,["moof","traf"]),i=[].concat.apply([],e.map(function(n){return Ka(n,["tfhd"]).map(function(t){var e,i;return e=cs(t[4]<<24|t[5]<<16|t[6]<<8|t[7]),i=r[e]||9e4,(Ka(n,["tfdt"]).map(function(t){var e,i;return e=t[0],i=cs(t[4]<<24|t[5]<<16|t[6]<<8|t[7]),1===e&&(i*=Math.pow(2,32),i+=cs(t[8]<<24|t[9]<<16|t[10]<<8|t[11])),i})[0]||1/0)/i})})),n=Math.min.apply(null,i),isFinite(n)?n:0},ts=function(t){var e=Ka(t,["moov","trak"]),o=[];return e.forEach(function(t){var e=Ka(t,["mdia","hdlr"]),s=Ka(t,["tkhd"]);e.forEach(function(t,e){var i,n,r=Qa(t.subarray(8,12)),a=s[e];"vide"===r&&(n=0===(i=new DataView(a.buffer,a.byteOffset,a.byteLength)).getUint8(0)?i.getUint32(12):i.getUint32(20),o.push(n))})}),o};var hs,ds,ps,fs,ms,gs,ys,vs,_s,bs,Ts,Ss,ks,ws,Cs,Es,As,Ls,Os,Ps,Us,xs,Is,Ds,Rs,Ms,Bs,Ns,js,Fs,Vs,Hs,qs,zs,Ws,Gs,Xs,Ys,$s,Ks,Qs={findBox:Ka=function(t,e){var i,n,r,a,s,o=[];if(!e.length)return null;for(i=0;i>>1,t.samplingfrequencyindex<<7|t.channelcount<<3,6,1,2]))},Cs=function(t){return hs(xs.hdlr,Ns[t])},ws=function(t){var e=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,t.duration>>>24&255,t.duration>>>16&255,t.duration>>>8&255,255&t.duration,85,196,0,0]);return t.samplerate&&(e[12]=t.samplerate>>>24&255,e[13]=t.samplerate>>>16&255,e[14]=t.samplerate>>>8&255,e[15]=255&t.samplerate),hs(xs.mdhd,e)},ks=function(t){return hs(xs.mdia,ws(t),Cs(t.type),gs(t))},ms=function(t){return hs(xs.mfhd,new Uint8Array([0,0,0,0,(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t]))},gs=function(t){return hs(xs.minf,"video"===t.type?hs(xs.vmhd,js):hs(xs.smhd,Fs),ds(),As(t))},ys=function(t,e){for(var i=[],n=e.length;n--;)i[n]=Os(e[n]);return hs.apply(null,[xs.moof,ms(t)].concat(i))},vs=function(t){for(var e=t.length,i=[];e--;)i[e]=Ts(t[e]);return hs.apply(null,[xs.moov,bs(4294967295)].concat(i).concat(_s(t)))},_s=function(t){for(var e=t.length,i=[];e--;)i[e]=Ps(t[e]);return hs.apply(null,[xs.mvex].concat(i))},bs=function(t){var e=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t,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 hs(xs.mvhd,e)},Es=function(t){var e,i,n=t.samples||[],r=new Uint8Array(4+n.length);for(i=0;i>>8),r.push(255&i[e].byteLength),r=r.concat(Array.prototype.slice.call(i[e]));for(e=0;e>>8),a.push(255&n[e].byteLength),a=a.concat(Array.prototype.slice.call(n[e]));return hs(xs.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,(65280&t.width)>>8,255&t.width,(65280&t.height)>>8,255&t.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),hs(xs.avcC,new Uint8Array([1,t.profileIdc,t.profileCompatibility,t.levelIdc,255].concat([i.length]).concat(r).concat([n.length]).concat(a))),hs(xs.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))},Xs=function(t){return hs(xs.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&t.channelcount)>>8,255&t.channelcount,(65280&t.samplesize)>>8,255&t.samplesize,0,0,0,0,(65280&t.samplerate)>>8,255&t.samplerate,0,0]),ps(t))},Ss=function(t){var e=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,0,(4278190080&t.duration)>>24,(16711680&t.duration)>>16,(65280&t.duration)>>8,255&t.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,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,(65280&t.width)>>8,255&t.width,0,0,(65280&t.height)>>8,255&t.height,0,0]);return hs(xs.tkhd,e)},Os=function(t){var e,i,n,r,a,s;return e=hs(xs.tfhd,new Uint8Array([0,0,0,58,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(t.baseMediaDecodeTime/(Js+1)),s=Math.floor(t.baseMediaDecodeTime%(Js+1)),i=hs(xs.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,s>>>24&255,s>>>16&255,s>>>8&255,255&s])),92,"audio"===t.type?(n=Us(t,92),hs(xs.traf,e,i,n)):(r=Es(t),n=Us(t,r.length+92),hs(xs.traf,e,i,n,r))},Ts=function(t){return t.duration=t.duration||4294967295,hs(xs.trak,Ss(t),ks(t))},Ps=function(t){var e=new Uint8Array([0,0,0,0,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==t.type&&(e[e.length-1]=0),hs(xs.trex,e)},Ks=function(t,e){var i=0,n=0,r=0,a=0;return t.length&&(void 0!==t[0].duration&&(i=1),void 0!==t[0].size&&(n=2),void 0!==t[0].flags&&(r=4),void 0!==t[0].compositionTimeOffset&&(a=8)),[0,0,i|n|r|a,1,(4278190080&t.length)>>>24,(16711680&t.length)>>>16,(65280&t.length)>>>8,255&t.length,(4278190080&e)>>>24,(16711680&e)>>>16,(65280&e)>>>8,255&e]},$s=function(t,e){var i,n,r,a;for(e+=20+16*(n=t.samples||[]).length,i=Ks(n,e),a=0;a>>24,(16711680&r.duration)>>>16,(65280&r.duration)>>>8,255&r.duration,(4278190080&r.size)>>>24,(16711680&r.size)>>>16,(65280&r.size)>>>8,255&r.size,r.flags.isLeading<<2|r.flags.dependsOn,r.flags.isDependedOn<<6|r.flags.hasRedundancy<<4|r.flags.paddingValue<<1|r.flags.isNonSyncSample,61440&r.flags.degradationPriority,15&r.flags.degradationPriority,(4278190080&r.compositionTimeOffset)>>>24,(16711680&r.compositionTimeOffset)>>>16,(65280&r.compositionTimeOffset)>>>8,255&r.compositionTimeOffset]);return hs(xs.trun,new Uint8Array(i))},Ys=function(t,e){var i,n,r,a;for(e+=20+8*(n=t.samples||[]).length,i=Ks(n,e),a=0;a>>24,(16711680&r.duration)>>>16,(65280&r.duration)>>>8,255&r.duration,(4278190080&r.size)>>>24,(16711680&r.size)>>>16,(65280&r.size)>>>8,255&r.size]);return hs(xs.trun,new Uint8Array(i))},Us=function(t,e){return"audio"===t.type?Ys(t,e):$s(t,e)};var Zs={ftyp:fs=function(){return hs(xs.ftyp,Is,Ds,Is,Rs)},mdat:function(t){return hs(xs.mdat,t)},moof:ys,moov:vs,initSegment:function(t){var e,i=fs(),n=vs(t);return(e=new Uint8Array(i.byteLength+n.byteLength)).set(i),e.set(n,i.byteLength),e}},to=function(){this.init=function(){var a={};this.on=function(t,e){a[t]||(a[t]=[]),a[t]=a[t].concat(e)},this.off=function(t,e){var i;return!!a[t]&&(i=a[t].indexOf(e),a[t]=a[t].slice(),a[t].splice(i,1),-1>>8,r=255&e,e!==this.PADDING_)if(e===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(e===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(t.pts),this.flushDisplayed(t.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=t.pts;else if(e===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(t.pts);else if(e===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(t.pts);else if(e===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(t.pts);else if(e===this.CARRIAGE_RETURN_)this.clearFormatting(t.pts),this.flushDisplayed(t.pts),this.shiftRowsUp_(),this.startPts_=t.pts;else if(e===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(e===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(t.pts),this.displayed_=bo();else if(e===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=bo();else if(e===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(t.pts),this.displayed_=bo()),this.mode_="paintOn",this.startPts_=t.pts;else if(this.isSpecialCharacter(n,r))a=vo((n=(3&n)<<8)|r),this[this.mode_](t.pts,a),this.column_++;else if(this.isExtCharacter(n,r))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),a=vo((n=(3&n)<<8)|r),this[this.mode_](t.pts,a),this.column_++;else if(this.isMidRowCode(n,r))this.clearFormatting(t.pts),this[this.mode_](t.pts," "),this.column_++,14==(14&r)&&this.addFormatting(t.pts,["i"]),1==(1&r)&&this.addFormatting(t.pts,["u"]);else if(this.isOffsetControlCode(n,r))this.column_+=3&r;else if(this.isPAC(n,r)){var s=_o.indexOf(7968&e);"rollUp"===this.mode_&&this.setRollUp(t.pts,s),s!==this.row_&&(this.clearFormatting(t.pts),this.row_=s),1&r&&-1===this.formatting_.indexOf("u")&&this.addFormatting(t.pts,["u"]),16==(16&e)&&(this.column_=4*((14&e)>>1)),this.isColorPAC(r)&&14==(14&r)&&this.addFormatting(t.pts,["i"])}else this.isNormalChar(n)&&(0===r&&(r=null),a=vo(n),a+=vo(r),this[this.mode_](t.pts,a),this.column_+=a.length)}else this.lastControlCode_=null}};To.prototype=new eo,To.prototype.flushDisplayed=function(t){var e=this.displayed_.map(function(t){return t.trim()}).join("\n").replace(/^\n+|\n+$/g,"");e.length&&this.trigger("data",{startPts:this.startPts_,endPts:t,text:e,stream:this.name_})},To.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=bo(),this.nonDisplayed_=bo(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},To.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},To.prototype.isSpecialCharacter=function(t,e){return t===this.EXT_&&48<=e&&e<=63},To.prototype.isExtCharacter=function(t,e){return(t===this.EXT_+1||t===this.EXT_+2)&&32<=e&&e<=63},To.prototype.isMidRowCode=function(t,e){return t===this.EXT_&&32<=e&&e<=47},To.prototype.isOffsetControlCode=function(t,e){return t===this.OFFSET_&&33<=e&&e<=35},To.prototype.isPAC=function(t,e){return t>=this.BASE_&&t"},"");this[this.mode_](t,i)},To.prototype.clearFormatting=function(t){if(this.formatting_.length){var e=this.formatting_.reverse().reduce(function(t,e){return t+""},"");this.formatting_=[],this[this.mode_](t,e)}},To.prototype.popOn=function(t,e){var i=this.nonDisplayed_[this.row_];i+=e,this.nonDisplayed_[this.row_]=i},To.prototype.rollUp=function(t,e){var i=this.displayed_[this.row_];i+=e,this.displayed_[this.row_]=i},To.prototype.shiftRowsUp_=function(){var t;for(t=0;t>>2;o*=4,o+=3&s[7],r.timeStamp=o,void 0===e.pts&&void 0===e.dts&&(e.pts=r.timeStamp,e.dts=r.timeStamp),this.trigger("timestamp",r)}e.frames.push(r),i+=10,i+=n}while(i>>4&&(i+=t[i]+1),0===e.pid)e.type="pat",n(t.subarray(i),e),this.trigger("data",e);else if(e.pid===this.pmtPid)for(e.type="pmt",n(t.subarray(i),e),this.trigger("data",e);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,i,e]):this.processPes_(t,i,e)},this.processPes_=function(t,e,i){i.pid===this.programMapTable.video?i.streamType=ko.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=ko.ADTS_STREAM_TYPE:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=t.subarray(e),this.trigger("data",i)}}).prototype=new eo,Do.STREAM_TYPES={h264:27,adts:15},(Ro=function(){var d=this,n={data:[],size:0},r={data:[],size:0},a={data:[],size:0},s=function(t,e,i){var n,r,a=new Uint8Array(t.size),s={type:e},o=0,u=0;if(t.data.length&&!(t.size<9)){for(s.trackId=t.data[0].pid,o=0;o>>3,c.pts*=4,c.pts+=(6&l[13])>>>1,c.dts=c.pts,64&h&&(c.dts=(14&l[14])<<27|(255&l[15])<<20|(254&l[16])<<12|(255&l[17])<<5|(254&l[18])>>>3,c.dts*=4,c.dts+=(6&l[18])>>>1)),c.data=l.subarray(9+l[8]),n="video"===e||s.packetLength<=t.size,(i||n)&&(t.size=0,t.data.length=0),n&&d.trigger("data",s)}};Ro.prototype.init.call(this),this.push=function(i){({pat:function(){},pes:function(){var t,e;switch(i.streamType){case ko.H264_STREAM_TYPE:case ko.H264_STREAM_TYPE:t=n,e="video";break;case ko.ADTS_STREAM_TYPE:t=r,e="audio";break;case ko.METADATA_STREAM_TYPE:t=a,e="timed-metadata";break;default:return}i.payloadUnitStartIndicator&&s(t,e,!0),t.data.push(i),t.size+=i.data.byteLength},pmt:function(){var t={type:"metadata",tracks:[]},e=i.programMapTable;null!==e.video&&t.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&t.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),d.trigger("data",t)}})[i.type]()},this.flush=function(){s(n,"video"),s(r,"audio"),s(a,"timed-metadata"),this.trigger("done")}}).prototype=new eo;var No={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:Io,TransportParseStream:Do,ElementaryStream:Ro,TimestampRolloverStream:Bo,CaptionStream:So.CaptionStream,Cea608Stream:So.Cea608Stream,MetadataStream:Mo};for(var jo in ko)ko.hasOwnProperty(jo)&&(No[jo]=ko[jo]);var Fo,Vo=No,Ho=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(Fo=function(){var l;Fo.prototype.init.call(this),this.push=function(t){var e,i,n,r,a,s,o=0,u=0;if("audio"===t.type)for(l?(r=l,(l=new Uint8Array(r.byteLength+t.data.byteLength)).set(r),l.set(t.data,r.byteLength)):l=t.data;o+5>5,s=9e4*(a=1024*(1+(3&l[o+6])))/Ho[(60&l[o+2])>>>2],n=o+e,l.byteLength>>6&3),channelcount:(1&l[o+2])<<2|(192&l[o+3])>>>6,samplerate:Ho[(60&l[o+2])>>>2],samplingfrequencyindex:(60&l[o+2])>>>2,samplesize:16,data:l.subarray(o+7+i,n)}),l.byteLength===n)return void(l=void 0);u++,l=l.subarray(n)}else o++},this.flush=function(){this.trigger("done")}}).prototype=new eo;var qo,zo,Wo,Go=Fo,Xo=function(n){var r=n.byteLength,a=0,s=0;this.length=function(){return 8*r},this.bitsAvailable=function(){return 8*r+s},this.loadWord=function(){var t=n.byteLength-r,e=new Uint8Array(4),i=Math.min(4,r);if(0===i)throw new Error("no bytes available");e.set(n.subarray(t,t+i)),a=new DataView(e.buffer).getUint32(0),s=8*i,r-=i},this.skipBits=function(t){var e;t>>32-e;return 0<(s-=e)?a<<=e:0>>t))return a<<=t,s-=t,t;return this.loadWord(),t+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var t=this.skipLeadingZeros();return this.readBits(t+1)-1},this.readExpGolomb=function(){var t=this.readUnsignedExpGolomb();return 1&t?1+t>>>1:-1*(t>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};(zo=function(){var i,n,r=0;zo.prototype.init.call(this),this.push=function(t){var e;for(n=n?((e=new Uint8Array(n.byteLength+t.data.byteLength)).set(n),e.set(t.data,n.byteLength),e):t.data;r>4?i+20:i+10},this.parseAdtsSize=function(t,e){var i=(224&t[e+5])>>5,n=t[e+4]<<3;return 6144&t[e+3]|n|i},this.push=function(t){var e,i,n,r,a=0,s=0;for(o.length?(r=o.length,(o=new Uint8Array(t.byteLength+r)).set(o.subarray(0,r)),o.set(t,r)):o=t;3<=o.length-s;)if(o[s]!=="I".charCodeAt(0)||o[s+1]!=="D".charCodeAt(0)||o[s+2]!=="3".charCodeAt(0))if(!0&o[s]&&240==(240&o[s+1])){if(o.length-s<7)break;if((a=this.parseAdtsSize(o,s))>o.length)break;n={type:"audio",data:o.subarray(s,s+a),pts:u,dts:u},this.trigger("data",n),s+=a}else s++;else{if(o.length-s<10)break;if((a=this.parseId3TagSize(o,s))>o.length)break;i={type:"timed-metadata",data:o.subarray(s,s+a)},this.trigger("data",i),s+=a}e=o.length-s,o=0=e?t:(r.minSegmentDts=1/0,t.filter(function(t){return t.dts>=e&&(r.minSegmentDts=Math.min(r.minSegmentDts,t.dts),r.minSegmentPts=r.minSegmentDts,!0)}))},this.generateSampleTable_=function(t){var e,i,n=[];for(e=0;en.pts?e++:(i++,a-=r.byteLength,s-=r.nalCount,o-=r.duration);return 0===i?t:i===t.length?null:((u=t.slice(i)).byteLength=a,u.duration=o,u.nalCount=s,u.pts=u[0].pts,u.dts=u[0].dts,u)},this.alignGopsAtEnd_=function(t){var e,i,n,r,a,s,o;for(e=h.length-1,i=t.length-1,a=null,s=!1;0<=e&&0<=i;){if(n=h[e],r=t[i],n.pts===r.pts){s=!0;break}n.pts>r.pts?e--:(e===h.length-1&&(a=i),i--)}if(!s&&null===a)return null;if(0===(o=s?i:a))return t;var u=t.slice(o),l=u.reduce(function(t,e){return t.byteLength+=e.byteLength,t.duration+=e.duration,t.nalCount+=e.nalCount,t},{byteLength:0,duration:0,nalCount:0});return u.byteLength=l.byteLength,u.duration=l.duration,u.nalCount=l.nalCount,u.pts=u[0].pts,u.dts=u[0].dts,u},this.alignGopsWith=function(t){h=t}}).prototype=new eo,(du=function(t,e){this.numberOfTracks=0,this.metadataStream=e,"undefined"!=typeof t.remux?this.remuxTracks=!!t.remux:this.remuxTracks=!0,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,du.prototype.init.call(this),this.push=function(t){return t.text?this.pendingCaptions.push(t):t.frames?this.pendingMetadata.push(t):(this.pendingTracks.push(t.track),this.pendingBoxes.push(t.boxes),this.pendingBytes+=t.boxes.byteLength,"video"===t.track.type&&(this.videoTrack=t.track),void("audio"===t.track.type&&(this.audioTrack=t.track)))}}).prototype=new eo,du.prototype.flush=function(t){var e,i,n,r,a=0,s={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}for(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,bu.forEach(function(t){s.info[t]=this.videoTrack[t]},this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,_u.forEach(function(t){s.info[t]=this.audioTrack[t]},this)),1===this.pendingTracks.length?s.type=this.pendingTracks[0].type:s.type="combined",this.emittedTracks+=this.pendingTracks.length,n=Zs.initSegment(this.pendingTracks),s.initSegment=new Uint8Array(n.byteLength),s.initSegment.set(n),s.data=new Uint8Array(this.pendingBytes),r=0;r=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},(hu=function(n){var r,a,s=this,i=!0;hu.prototype.init.call(this),n=n||{},this.baseMediaDecodeTime=n.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var e={};(this.transmuxPipeline_=e).type="aac",e.metadataStream=new Vo.MetadataStream,e.aacStream=new nu,e.audioTimestampRolloverStream=new Vo.TimestampRolloverStream("audio"),e.timedMetadataTimestampRolloverStream=new Vo.TimestampRolloverStream("timed-metadata"),e.adtsStream=new Go,e.coalesceStream=new du(n,e.metadataStream),e.headOfPipeline=e.aacStream,e.aacStream.pipe(e.audioTimestampRolloverStream).pipe(e.adtsStream),e.aacStream.pipe(e.timedMetadataTimestampRolloverStream).pipe(e.metadataStream).pipe(e.coalesceStream),e.metadataStream.on("timestamp",function(t){e.aacStream.setTimestamp(t.timeStamp)}),e.aacStream.on("data",function(t){"timed-metadata"!==t.type||e.audioSegmentStream||(a=a||{timelineStartInfo:{baseMediaDecodeTime:s.baseMediaDecodeTime},codec:"adts",type:"audio"},e.coalesceStream.numberOfTracks++,e.audioSegmentStream=new cu(a,n),e.adtsStream.pipe(e.audioSegmentStream).pipe(e.coalesceStream))}),e.coalesceStream.on("data",this.trigger.bind(this,"data")),e.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setupTsPipeline=function(){var i={};(this.transmuxPipeline_=i).type="ts",i.metadataStream=new Vo.MetadataStream,i.packetStream=new Vo.TransportPacketStream,i.parseStream=new Vo.TransportParseStream,i.elementaryStream=new Vo.ElementaryStream,i.videoTimestampRolloverStream=new Vo.TimestampRolloverStream("video"),i.audioTimestampRolloverStream=new Vo.TimestampRolloverStream("audio"),i.timedMetadataTimestampRolloverStream=new Vo.TimestampRolloverStream("timed-metadata"),i.adtsStream=new Go,i.h264Stream=new vu,i.captionStream=new Vo.CaptionStream,i.coalesceStream=new du(n,i.metadataStream),i.headOfPipeline=i.packetStream,i.packetStream.pipe(i.parseStream).pipe(i.elementaryStream),i.elementaryStream.pipe(i.videoTimestampRolloverStream).pipe(i.h264Stream),i.elementaryStream.pipe(i.audioTimestampRolloverStream).pipe(i.adtsStream),i.elementaryStream.pipe(i.timedMetadataTimestampRolloverStream).pipe(i.metadataStream).pipe(i.coalesceStream),i.h264Stream.pipe(i.captionStream).pipe(i.coalesceStream),i.elementaryStream.on("data",function(t){var e;if("metadata"===t.type){for(e=t.tracks.length;e--;)r||"video"!==t.tracks[e].type?a||"audio"!==t.tracks[e].type||((a=t.tracks[e]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime):(r=t.tracks[e]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime;r&&!i.videoSegmentStream&&(i.coalesceStream.numberOfTracks++,i.videoSegmentStream=new lu(r,n),i.videoSegmentStream.on("timelineStartInfo",function(t){a&&(a.timelineStartInfo=t,i.audioSegmentStream.setEarliestDts(t.dts))}),i.videoSegmentStream.on("processedGopsInfo",s.trigger.bind(s,"gopInfo")),i.videoSegmentStream.on("baseMediaDecodeTime",function(t){a&&i.audioSegmentStream.setVideoBaseMediaDecodeTime(t)}),i.h264Stream.pipe(i.videoSegmentStream).pipe(i.coalesceStream)),a&&!i.audioSegmentStream&&(i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new cu(a,n),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream))}}),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setBaseMediaDecodeTime=function(t){var e=this.transmuxPipeline_;this.baseMediaDecodeTime=t,a&&(a.timelineStartInfo.dts=void 0,a.timelineStartInfo.pts=void 0,oo(a),a.timelineStartInfo.baseMediaDecodeTime=t,e.audioTimestampRolloverStream&&e.audioTimestampRolloverStream.discontinuity()),r&&(e.videoSegmentStream&&(e.videoSegmentStream.gopCache_=[],e.videoTimestampRolloverStream.discontinuity()),r.timelineStartInfo.dts=void 0,r.timelineStartInfo.pts=void 0,oo(r),e.captionStream.reset(),r.timelineStartInfo.baseMediaDecodeTime=t),e.timedMetadataTimestampRolloverStream&&e.timedMetadataTimestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(t){a&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(t)},this.alignGopsWith=function(t){r&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(t)},this.push=function(t){if(i){var e=pu(t);e&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():e||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),i=!1}this.transmuxPipeline_.headOfPipeline.push(t)},this.flush=function(){i=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new eo;var Tu,Su,ku={Transmuxer:hu,VideoSegmentStream:lu,AudioSegmentStream:cu,AUDIO_PROPERTIES:_u,VIDEO_PROPERTIES:bu},wu=Qs.parseType,Cu=function(t){return new Date(1e3*t-20828448e5)},Eu=function(t){return{isLeading:(12&t[0])>>>2,dependsOn:3&t[0],isDependedOn:(192&t[1])>>>6,hasRedundancy:(48&t[1])>>>4,paddingValue:(14&t[1])>>>1,isNonSyncSample:1&t[1],degradationPriority:t[2]<<8|t[3]}},Au={avc1:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{dataReferenceIndex:e.getUint16(6),width:e.getUint16(24),height:e.getUint16(26),horizresolution:e.getUint16(28)+e.getUint16(30)/16,vertresolution:e.getUint16(32)+e.getUint16(34)/16,frameCount:e.getUint16(40),depth:e.getUint16(74),config:Tu(t.subarray(78,t.byteLength))}},avcC:function(t){var e,i,n,r,a=new DataView(t.buffer,t.byteOffset,t.byteLength),s={configurationVersion:t[0],avcProfileIndication:t[1],profileCompatibility:t[2],avcLevelIndication:t[3],lengthSizeMinusOne:3&t[4],sps:[],pps:[]},o=31&t[5];for(n=6,r=0;r>>2&63,bufferSize:t[13]<<16|t[14]<<8|t[15],maxBitrate:t[16]<<24|t[17]<<16|t[18]<<8|t[19],avgBitrate:t[20]<<24|t[21]<<16|t[22]<<8|t[23],decoderConfigDescriptor:{tag:t[24],length:t[25],audioObjectType:t[26]>>>3&31,samplingFrequencyIndex:(7&t[26])<<1|t[27]>>>7&1,channelConfiguration:t[27]>>>3&15}}}},ftyp:function(t){for(var e=new DataView(t.buffer,t.byteOffset,t.byteLength),i={majorBrand:wu(t.subarray(0,4)),minorVersion:e.getUint32(4),compatibleBrands:[]},n=8;nMALFORMED DATA");else switch(31&t[e]){case 1:r.push("slice_layer_without_partitioning_rbsp");break;case 5:r.push("slice_layer_without_partitioning_rbsp_idr");break;case 6:r.push("sei_rbsp");break;case 7:r.push("seq_parameter_set_rbsp");break;case 8:r.push("pic_parameter_set_rbsp");break;case 9:r.push("access_unit_delimiter_rbsp");break;default:r.push("UNKNOWN NAL - "+t[e]&31)}return r}(t)}},mdhd:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n=4,r={version:i.getUint8(0),flags:new Uint8Array(t.subarray(1,4)),language:""};return 1===r.version?(n+=4,r.creationTime=Cu(i.getUint32(n)),n+=8,r.modificationTime=Cu(i.getUint32(n)),n+=4,r.timescale=i.getUint32(n),n+=8):(r.creationTime=Cu(i.getUint32(n)),n+=4,r.modificationTime=Cu(i.getUint32(n)),n+=4,r.timescale=i.getUint32(n),n+=4),r.duration=i.getUint32(n),n+=4,e=i.getUint16(n),r.language+=String.fromCharCode(96+(e>>10)),r.language+=String.fromCharCode(96+((992&e)>>5)),r.language+=String.fromCharCode(96+(31&e)),r},mdia:function(t){return{boxes:Tu(t)}},mfhd:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),sequenceNumber:t[4]<<24|t[5]<<16|t[6]<<8|t[7]}},minf:function(t){return{boxes:Tu(t)}},mp4a:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength),i={dataReferenceIndex:e.getUint16(6),channelcount:e.getUint16(16),samplesize:e.getUint16(18),samplerate:e.getUint16(24)+e.getUint16(26)/65536};return 28>4,isDependedOn:(12&t[e])>>2,hasRedundancy:3&t[e]});return i},sidx:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),references:[],referenceId:i.getUint32(4),timescale:i.getUint32(8),earliestPresentationTime:i.getUint32(12),firstOffset:i.getUint32(16)},r=i.getUint16(22);for(e=24;r;e+=12,r--)n.references.push({referenceType:(128&t[e])>>>7,referencedSize:2147483647&i.getUint32(e),subsegmentDuration:i.getUint32(e+4),startsWithSap:!!(128&t[e+8]),sapType:(112&t[e+8])>>>4,sapDeltaTime:268435455&i.getUint32(e+8)});return n},smhd:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),balance:t[4]+t[5]/256}},stbl:function(t){return{boxes:Tu(t)}},stco:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),chunkOffsets:[]},r=i.getUint32(4);for(e=8;r;e+=4,r--)n.chunkOffsets.push(i.getUint32(e));return n},stsc:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n=i.getUint32(4),r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleToChunks:[]};for(e=8;n;e+=12,n--)r.sampleToChunks.push({firstChunk:i.getUint32(e),samplesPerChunk:i.getUint32(e+4),sampleDescriptionIndex:i.getUint32(e+8)});return r},stsd:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleDescriptions:Tu(t.subarray(8))}},stsz:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleSize:i.getUint32(4),entries:[]};for(e=12;e>6,sampleHasRedundancy:(48&t[21])>>4,samplePaddingValue:(14&t[21])>>1,sampleIsDifferenceSample:!!(1&t[21]),sampleDegradationPriority:e.getUint16(22)}},trun:function(t){var e,i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),samples:[]},n=new DataView(t.buffer,t.byteOffset,t.byteLength),r=1&i.flags[2],a=4&i.flags[2],s=1&i.flags[1],o=2&i.flags[1],u=4&i.flags[1],l=8&i.flags[1],c=n.getUint32(4),h=8;for(r&&(i.dataOffset=n.getInt32(h),h+=4),a&&c&&(e={flags:Eu(t.subarray(h,h+4))},h+=4,s&&(e.duration=n.getUint32(h),h+=4),o&&(e.size=n.getUint32(h),h+=4),l&&(e.compositionTimeOffset=n.getUint32(h),h+=4),i.samples.push(e),c--);c--;)e={},s&&(e.duration=n.getUint32(h),h+=4),o&&(e.size=n.getUint32(h),h+=4),u&&(e.flags=Eu(t.subarray(h,h+4)),h+=4),l&&(e.compositionTimeOffset=n.getUint32(h),h+=4),i.samples.push(e);return i},"url ":function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4))}},vmhd:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),graphicsmode:e.getUint16(4),opcolor:new Uint16Array([e.getUint16(6),e.getUint16(8),e.getUint16(10)])}}},Lu={inspect:Tu=function(t){for(var e,i,n,r,a,s=0,o=[],u=new ArrayBuffer(t.length),l=new Uint8Array(u),c=0;c":e+"<\n"+n.map(function(t){return a+" "+t}).join("\n")+"\n"+a+" >":e+"<>"}return e+JSON.stringify(i,null,2).split("\n").map(function(t,e){return 0===e?t:a+" "+t}).join("\n")}).join("\n")+(r.boxes?"\n"+Su(r.boxes,e+1):"")}).join("\n")},parseTfdt:Au.tfdt,parseHdlr:Au.hdlr,parseTfhd:Au.tfhd,parseTrun:Au.trun},Ou=fo,Pu=So.CaptionStream,Uu=function(t,e){for(var i=t,n=0;n>>4&&(e+=t[4]+1),e},Bu=function(t){switch(t){case 5:return"slice_layer_without_partitioning_rbsp_idr";case 6:return"sei_rbsp";case 7:return"seq_parameter_set_rbsp";case 8:return"pic_parameter_set_rbsp";case 9:return"access_unit_delimiter_rbsp";default:return null}},Nu={parseType:function(t,e){var i=Du(t);return 0===i?"pat":i===e?"pmt":e?"pes":null},parsePat:function(t){var e=Ru(t),i=4+Mu(t);return e&&(i+=t[i]+1),(31&t[i+10])<<8|t[i+11]},parsePmt:function(t){var e={},i=Ru(t),n=4+Mu(t);if(i&&(n+=t[n]+1),1&t[n+5]){var r;r=3+((15&t[n+1])<<8|t[n+2])-4;for(var a=12+((15&t[n+10])<<8|t[n+11]);a=t.byteLength)return null;var i,n=null;return 192&(i=t[e+7])&&((n={}).pts=(14&t[e+9])<<27|(255&t[e+10])<<20|(254&t[e+11])<<12|(255&t[e+12])<<5|(254&t[e+13])>>>3,n.pts*=4,n.pts+=(6&t[e+13])>>>1,n.dts=n.pts,64&i&&(n.dts=(14&t[e+14])<<27|(255&t[e+15])<<20|(254&t[e+16])<<12|(255&t[e+17])<<5|(254&t[e+18])>>>3,n.dts*=4,n.dts+=(6&t[e+18])>>>1)),n},videoPacketContainsKeyFrame:function(t){for(var e=4+Mu(t),i=t.subarray(e),n=0,r=0,a=!1;r>4?i+20:i+10},parseAdtsSize:function(t,e){var i=(224&t[e+5])>>5,n=t[e+4]<<3;return 6144&t[e+3]|n|i},parseType:function(t,e){return t[e]==="I".charCodeAt(0)&&t[e+1]==="D".charCodeAt(0)&&t[e+2]==="3".charCodeAt(0)?"timed-metadata":!0&t[e]&&240==(240&t[e+1])?"audio":null},parseSampleRate:function(t){for(var e=0;e+5>>2];e++}return null},parseAacTimestamp:function(t){var e,i,n;e=10,64&t[5]&&(e+=4,e+=Fu(t.subarray(10,14)));do{if((i=Fu(t.subarray(e+4,e+8)))<1)return null;if("PRIV"===String.fromCharCode(t[e],t[e+1],t[e+2],t[e+3])){n=t.subarray(e+10,e+i+10);for(var r=0;r>>2;return s*=4,s+=3&a[7]}}e+=10,e+=i}while(et.length){i=!0;break}null===a&&(e=t.subarray(o,o+s),a=qu.aac.parseAacTimestamp(e)),o+=s;break;case"audio":if(t.length-o<7){i=!0;break}if((s=qu.aac.parseAdtsSize(t,o))>t.length){i=!0;break}null===r&&(e=t.subarray(o,o+s),r=qu.aac.parseSampleRate(e)),n++,o+=s;break;default:o++}if(i)return null}if(null===r||null===a)return null;var u=9e4/r;return{audio:[{type:"audio",dts:a,pts:a},{type:"audio",dts:a+1024*n*u,pts:a+1024*n*u}]}}(t):Xu(t))&&(n.audio||n.video)?(function(t,e){if(t.audio&&t.audio.length){var i=e;"undefined"==typeof i&&(i=t.audio[0].dts),t.audio.forEach(function(t){t.dts=Hu(t.dts,i),t.pts=Hu(t.pts,i),t.dtsTime=t.dts/9e4,t.ptsTime=t.pts/9e4})}if(t.video&&t.video.length){var n=e;if("undefined"==typeof n&&(n=t.video[0].dts),t.video.forEach(function(t){t.dts=Hu(t.dts,n),t.pts=Hu(t.pts,n),t.dtsTime=t.dts/9e4,t.ptsTime=t.pts/9e4}),t.firstKeyFrame){var r=t.firstKeyFrame;r.dts=Hu(r.dts,n),r.pts=Hu(r.pts,n),r.dtsTime=r.dts/9e4,r.ptsTime=r.dts/9e4}}}(n,e),n):null};var $u=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},Ku=function(){function n(t,e){for(var i=0;i>7))^a]=a;for(s=o=0;!n[s];s^=c||1,o=l[o]||1)for(d=(d=o^o<<1^o<<2^o<<3^o<<4)>>8^255&d^99,f=16843009*u[h=u[c=u[r[n[s]=d]=s]]]^65537*h^257*c^16843008*s,p=257*u[d]^16843008*d,a=0;a<4;a++)e[a][s]=p=p<<24^p>>>8,i[a][d]=f=f<<24^f>>>8;for(a=0;a<5;a++)e[a]=e[a].slice(0),i[a]=i[a].slice(0);return t}()),this._tables=[[Qu[0][0].slice(),Qu[0][1].slice(),Qu[0][2].slice(),Qu[0][3].slice(),Qu[0][4].slice()],[Qu[1][0].slice(),Qu[1][1].slice(),Qu[1][2].slice(),Qu[1][3].slice(),Qu[1][4].slice()]];var e=void 0,i=void 0,n=void 0,r=void 0,a=void 0,s=this._tables[0][4],o=this._tables[1],u=t.length,l=1;if(4!==u&&6!==u&&8!==u)throw new Error("Invalid aes key size");for(r=t.slice(0),a=[],this._key=[r,a],e=u;e<4*u+28;e++)n=r[e-1],(e%u==0||8===u&&e%u==4)&&(n=s[n>>>24]<<24^s[n>>16&255]<<16^s[n>>8&255]<<8^s[255&n],e%u==0&&(n=n<<8^n>>>24^l<<24,l=l<<1^283*(l>>7))),r[e]=r[e-u]^n;for(i=0;e;i++,e--)n=r[3&i?e:e-4],a[i]=e<=4||i<4?n:o[0][s[n>>>24]]^o[1][s[n>>16&255]]^o[2][s[n>>8&255]]^o[3][s[255&n]]}return c.prototype.decrypt=function(t,e,i,n,r,a){var s=this._key[1],o=t^s[0],u=n^s[1],l=i^s[2],c=e^s[3],h=void 0,d=void 0,p=void 0,f=s.length/4-2,m=void 0,g=4,y=this._tables[1],v=y[0],_=y[1],b=y[2],T=y[3],S=y[4];for(m=0;m>>24]^_[u>>16&255]^b[l>>8&255]^T[255&c]^s[g],d=v[u>>>24]^_[l>>16&255]^b[c>>8&255]^T[255&o]^s[g+1],p=v[l>>>24]^_[c>>16&255]^b[o>>8&255]^T[255&u]^s[g+2],c=v[c>>>24]^_[o>>16&255]^b[u>>8&255]^T[255&l]^s[g+3],g+=4,o=h,u=d,l=p;for(m=0;m<4;m++)r[(3&-m)+a]=S[o>>>24]<<24^S[u>>16&255]<<16^S[l>>8&255]<<8^S[255&c]^s[g++],h=o,o=u,u=l,l=c,c=h},c}(),Zu=function(){function t(){$u(this,t),this.listeners={}}return t.prototype.on=function(t,e){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(e)},t.prototype.off=function(t,e){if(!this.listeners[t])return!1;var i=this.listeners[t].indexOf(e);return this.listeners[t].splice(i,1),-1>8|t>>>24},il=function(t,e,i){var n=new Int32Array(t.buffer,t.byteOffset,t.byteLength>>2),r=new Ju(Array.prototype.slice.call(e)),a=new Uint8Array(t.byteLength),s=new Int32Array(a.buffer),o=void 0,u=void 0,l=void 0,c=void 0,h=void 0,d=void 0,p=void 0,f=void 0,m=void 0;for(o=i[0],u=i[1],l=i[2],c=i[3],m=0;mDate.now()},Pl=function(t){return t.excludeUntil&&t.excludeUntil===1/0},Ul=function(t){var e=Ol(t);return!t.disabled&&!e},xl=function(t,e){return e.attributes&&e.attributes[t]},Il=function(t,e){if(1===t.playlists.length)return!0;var i=e.attributes.BANDWIDTH||Number.MAX_VALUE;return 0===t.playlists.filter(function(t){return!!Ul(t)&&(t.attributes.BANDWIDTH||0) "+t.end(i));return e.join(", ")},$l=function(t){for(var e=[],i=0;i=t&&i.removeCue(r)},Ql=function(t){return isNaN(t)||Math.abs(t)===1/0?Number.MAX_VALUE:t},Jl=function(t,e,i){var r=v.WebKitDataCue||v.VTTCue;if(e&&e.forEach(function(t){var e=t.stream;this.inbandTextTracks_[e].addCue(new r(t.startTime+this.timestampOffset,t.endTime+this.timestampOffset,t.text))},t),i){var a=Ql(t.mediaSource_.duration);if(i.forEach(function(t){var n=t.cueTime+this.timestampOffset;t.frames.forEach(function(t){var e,i=new r(n,n,t.value||t.url||t.data||"");i.frame=t,i.value=t,e=i,Object.defineProperties(e.frame,{id:{get:function(){return oa.log.warn("cue.frame.id is deprecated. Use cue.value.key instead."),e.value.key}},value:{get:function(){return oa.log.warn("cue.frame.value is deprecated. Use cue.value.data instead."),e.value.data}},privateData:{get:function(){return oa.log.warn("cue.frame.privateData is deprecated. Use cue.value.data instead."),e.value.data}}}),this.metadataTrack_.addCue(i)},this)},t),t.metadataTrack_&&t.metadataTrack_.cues&&t.metadataTrack_.cues.length){for(var n=t.metadataTrack_.cues,s=[],o=0;o>>1,t.samplingfrequencyindex<<7|t.channelcount<<3,6,1,2]))},f=function(t){return o(T.hdlr,A[t])},p=function(t){var e=new Uint8Array([0,0,0,0,0,0,0,2,0,0,0,3,0,1,95,144,t.duration>>>24&255,t.duration>>>16&255,t.duration>>>8&255,255&t.duration,85,196,0,0]);return t.samplerate&&(e[12]=t.samplerate>>>24&255,e[13]=t.samplerate>>>16&255,e[14]=t.samplerate>>>8&255,e[15]=255&t.samplerate),o(T.mdhd,e)},d=function(t){return o(T.mdia,p(t),f(t.type),n(t))},a=function(t){return o(T.mfhd,new Uint8Array([0,0,0,0,(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t]))},n=function(t){return o(T.minf,"video"===t.type?o(T.vmhd,L):o(T.smhd,O),e(),g(t))},t=function(t,e){for(var i=[],n=e.length;n--;)i[n]=v(e[n]);return o.apply(null,[T.moof,a(t)].concat(i))},s=function(t){for(var e=t.length,i=[];e--;)i[e]=c(t[e]);return o.apply(null,[T.moov,l(4294967295)].concat(i).concat(u(t)))},u=function(t){for(var e=t.length,i=[];e--;)i[e]=_(t[e]);return o.apply(null,[T.mvex].concat(i))},l=function(t){var e=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,2,0,1,95,144,(4278190080&t)>>24,(16711680&t)>>16,(65280&t)>>8,255&t,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 o(T.mvhd,e)},m=function(t){var e,i,n=t.samples||[],r=new Uint8Array(4+n.length);for(i=0;i>>8),r.push(255&i[e].byteLength),r=r.concat(Array.prototype.slice.call(i[e]));for(e=0;e>>8),a.push(255&n[e].byteLength),a=a.concat(Array.prototype.slice.call(n[e]));return o(T.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,(65280&t.width)>>8,255&t.width,(65280&t.height)>>8,255&t.height,0,72,0,0,0,72,0,0,0,0,0,0,0,1,19,118,105,100,101,111,106,115,45,99,111,110,116,114,105,98,45,104,108,115,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o(T.avcC,new Uint8Array([1,t.profileIdc,t.profileCompatibility,t.levelIdc,255].concat([i.length]).concat(r).concat([n.length]).concat(a))),o(T.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])))},M=function(t){return o(T.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,(65280&t.channelcount)>>8,255&t.channelcount,(65280&t.samplesize)>>8,255&t.samplesize,0,0,0,0,(65280&t.samplerate)>>8,255&t.samplerate,0,0]),i(t))},h=function(t){var e=new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,0,(4278190080&t.duration)>>24,(16711680&t.duration)>>16,(65280&t.duration)>>8,255&t.duration,0,0,0,0,0,0,0,0,0,0,0,0,1,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,(65280&t.width)>>8,255&t.width,0,0,(65280&t.height)>>8,255&t.height,0,0]);return o(T.tkhd,e)},v=function(t){var e,i,n,r,a,s;return e=o(T.tfhd,new Uint8Array([0,0,0,58,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0])),a=Math.floor(t.baseMediaDecodeTime/(F+1)),s=Math.floor(t.baseMediaDecodeTime%(F+1)),i=o(T.tfdt,new Uint8Array([1,0,0,0,a>>>24&255,a>>>16&255,a>>>8&255,255&a,s>>>24&255,s>>>16&255,s>>>8&255,255&s])),92,"audio"===t.type?(n=b(t,92),o(T.traf,e,i,n)):(r=m(t),n=b(t,r.length+92),o(T.traf,e,i,n,r))},c=function(t){return t.duration=t.duration||4294967295,o(T.trak,h(t),d(t))},_=function(t){var e=new Uint8Array([0,0,0,0,(4278190080&t.id)>>24,(16711680&t.id)>>16,(65280&t.id)>>8,255&t.id,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return"video"!==t.type&&(e[e.length-1]=0),o(T.trex,e)},j=function(t,e){var i=0,n=0,r=0,a=0;return t.length&&(void 0!==t[0].duration&&(i=1),void 0!==t[0].size&&(n=2),void 0!==t[0].flags&&(r=4),void 0!==t[0].compositionTimeOffset&&(a=8)),[0,0,i|n|r|a,1,(4278190080&t.length)>>>24,(16711680&t.length)>>>16,(65280&t.length)>>>8,255&t.length,(4278190080&e)>>>24,(16711680&e)>>>16,(65280&e)>>>8,255&e]},N=function(t,e){var i,n,r,a;for(e+=20+16*(n=t.samples||[]).length,i=j(n,e),a=0;a>>24,(16711680&r.duration)>>>16,(65280&r.duration)>>>8,255&r.duration,(4278190080&r.size)>>>24,(16711680&r.size)>>>16,(65280&r.size)>>>8,255&r.size,r.flags.isLeading<<2|r.flags.dependsOn,r.flags.isDependedOn<<6|r.flags.hasRedundancy<<4|r.flags.paddingValue<<1|r.flags.isNonSyncSample,61440&r.flags.degradationPriority,15&r.flags.degradationPriority,(4278190080&r.compositionTimeOffset)>>>24,(16711680&r.compositionTimeOffset)>>>16,(65280&r.compositionTimeOffset)>>>8,255&r.compositionTimeOffset]);return o(T.trun,new Uint8Array(i))},B=function(t,e){var i,n,r,a;for(e+=20+8*(n=t.samples||[]).length,i=j(n,e),a=0;a>>24,(16711680&r.duration)>>>16,(65280&r.duration)>>>8,255&r.duration,(4278190080&r.size)>>>24,(16711680&r.size)>>>16,(65280&r.size)>>>8,255&r.size]);return o(T.trun,new Uint8Array(i))},b=function(t,e){return"audio"===t.type?B(t,e):N(t,e)};var V,H,q,z,W,G={ftyp:r=function(){return o(T.ftyp,S,k,S,w)},mdat:function(t){return o(T.mdat,t)},moof:t,moov:s,initSegment:function(t){var e,i=r(),n=s(t);return(e=new Uint8Array(i.byteLength+n.byteLength)).set(i),e.set(n,i.byteLength),e}},X=function(t){return t>>>0};q=function(t){return V(t,["moov","trak"]).reduce(function(t,e){var i,n,r,a,s;return(i=V(e,["tkhd"])[0])?(n=i[0],a=X(i[r=0===n?12:20]<<24|i[r+1]<<16|i[r+2]<<8|i[r+3]),(s=V(e,["mdia","mdhd"])[0])?(r=0===(n=s[0])?12:20,t[a]=X(s[r]<<24|s[r+1]<<16|s[r+2]<<8|s[r+3]),t):null):null},{})},z=function(r,t){var e,i,n;return e=V(t,["moof","traf"]),i=[].concat.apply([],e.map(function(n){return V(n,["tfhd"]).map(function(t){var e,i;return e=X(t[4]<<24|t[5]<<16|t[6]<<8|t[7]),i=r[e]||9e4,(V(n,["tfdt"]).map(function(t){var e,i;return e=t[0],i=X(t[4]<<24|t[5]<<16|t[6]<<8|t[7]),1===e&&(i*=Math.pow(2,32),i+=X(t[8]<<24|t[9]<<16|t[10]<<8|t[11])),i})[0]||1/0)/i})})),n=Math.min.apply(null,i),isFinite(n)?n:0},W=function(t){var e=V(t,["moov","trak"]),o=[];return e.forEach(function(t){var e=V(t,["mdia","hdlr"]),s=V(t,["tkhd"]);e.forEach(function(t,e){var i,n,r=H(t.subarray(8,12)),a=s[e];"vide"===r&&(n=0===(i=new DataView(a.buffer,a.byteOffset,a.byteLength)).getUint8(0)?i.getUint32(12):i.getUint32(20),o.push(n))})}),o};var Y={findBox:V=function(t,e){var i,n,r,a,s,o=[];if(!e.length)return null;for(i=0;i>>8,r=255&e,e!==this.PADDING_)if(e===this.RESUME_CAPTION_LOADING_)this.mode_="popOn";else if(e===this.END_OF_CAPTION_)this.mode_="popOn",this.clearFormatting(t.pts),this.flushDisplayed(t.pts),i=this.displayed_,this.displayed_=this.nonDisplayed_,this.nonDisplayed_=i,this.startPts_=t.pts;else if(e===this.ROLL_UP_2_ROWS_)this.rollUpRows_=2,this.setRollUp(t.pts);else if(e===this.ROLL_UP_3_ROWS_)this.rollUpRows_=3,this.setRollUp(t.pts);else if(e===this.ROLL_UP_4_ROWS_)this.rollUpRows_=4,this.setRollUp(t.pts);else if(e===this.CARRIAGE_RETURN_)this.clearFormatting(t.pts),this.flushDisplayed(t.pts),this.shiftRowsUp_(),this.startPts_=t.pts;else if(e===this.BACKSPACE_)"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1);else if(e===this.ERASE_DISPLAYED_MEMORY_)this.flushDisplayed(t.pts),this.displayed_=ft();else if(e===this.ERASE_NON_DISPLAYED_MEMORY_)this.nonDisplayed_=ft();else if(e===this.RESUME_DIRECT_CAPTIONING_)"paintOn"!==this.mode_&&(this.flushDisplayed(t.pts),this.displayed_=ft()),this.mode_="paintOn",this.startPts_=t.pts;else if(this.isSpecialCharacter(n,r))a=dt((n=(3&n)<<8)|r),this[this.mode_](t.pts,a),this.column_++;else if(this.isExtCharacter(n,r))"popOn"===this.mode_?this.nonDisplayed_[this.row_]=this.nonDisplayed_[this.row_].slice(0,-1):this.displayed_[this.row_]=this.displayed_[this.row_].slice(0,-1),a=dt((n=(3&n)<<8)|r),this[this.mode_](t.pts,a),this.column_++;else if(this.isMidRowCode(n,r))this.clearFormatting(t.pts),this[this.mode_](t.pts," "),this.column_++,14==(14&r)&&this.addFormatting(t.pts,["i"]),1==(1&r)&&this.addFormatting(t.pts,["u"]);else if(this.isOffsetControlCode(n,r))this.column_+=3&r;else if(this.isPAC(n,r)){var s=pt.indexOf(7968&e);"rollUp"===this.mode_&&this.setRollUp(t.pts,s),s!==this.row_&&(this.clearFormatting(t.pts),this.row_=s),1&r&&-1===this.formatting_.indexOf("u")&&this.addFormatting(t.pts,["u"]),16==(16&e)&&(this.column_=4*((14&e)>>1)),this.isColorPAC(r)&&14==(14&r)&&this.addFormatting(t.pts,["i"])}else this.isNormalChar(n)&&(0===r&&(r=null),a=dt(n),a+=dt(r),this[this.mode_](t.pts,a),this.column_+=a.length)}else this.lastControlCode_=null}};mt.prototype=new K,mt.prototype.flushDisplayed=function(t){var e=this.displayed_.map(function(t){return t.trim()}).join("\n").replace(/^\n+|\n+$/g,"");e.length&&this.trigger("data",{startPts:this.startPts_,endPts:t,text:e,stream:this.name_})},mt.prototype.reset=function(){this.mode_="popOn",this.topRow_=0,this.startPts_=0,this.displayed_=ft(),this.nonDisplayed_=ft(),this.lastControlCode_=null,this.column_=0,this.row_=14,this.rollUpRows_=2,this.formatting_=[]},mt.prototype.setConstants=function(){0===this.dataChannel_?(this.BASE_=16,this.EXT_=17,this.CONTROL_=(20|this.field_)<<8,this.OFFSET_=23):1===this.dataChannel_&&(this.BASE_=24,this.EXT_=25,this.CONTROL_=(28|this.field_)<<8,this.OFFSET_=31),this.PADDING_=0,this.RESUME_CAPTION_LOADING_=32|this.CONTROL_,this.END_OF_CAPTION_=47|this.CONTROL_,this.ROLL_UP_2_ROWS_=37|this.CONTROL_,this.ROLL_UP_3_ROWS_=38|this.CONTROL_,this.ROLL_UP_4_ROWS_=39|this.CONTROL_,this.CARRIAGE_RETURN_=45|this.CONTROL_,this.RESUME_DIRECT_CAPTIONING_=41|this.CONTROL_,this.BACKSPACE_=33|this.CONTROL_,this.ERASE_DISPLAYED_MEMORY_=44|this.CONTROL_,this.ERASE_NON_DISPLAYED_MEMORY_=46|this.CONTROL_},mt.prototype.isSpecialCharacter=function(t,e){return t===this.EXT_&&48<=e&&e<=63},mt.prototype.isExtCharacter=function(t,e){return(t===this.EXT_+1||t===this.EXT_+2)&&32<=e&&e<=63},mt.prototype.isMidRowCode=function(t,e){return t===this.EXT_&&32<=e&&e<=47},mt.prototype.isOffsetControlCode=function(t,e){return t===this.OFFSET_&&33<=e&&e<=35},mt.prototype.isPAC=function(t,e){return t>=this.BASE_&&t"},"");this[this.mode_](t,i)},mt.prototype.clearFormatting=function(t){if(this.formatting_.length){var e=this.formatting_.reverse().reduce(function(t,e){return t+""},"");this.formatting_=[],this[this.mode_](t,e)}},mt.prototype.popOn=function(t,e){var i=this.nonDisplayed_[this.row_];i+=e,this.nonDisplayed_[this.row_]=i},mt.prototype.rollUp=function(t,e){var i=this.displayed_[this.row_];i+=e,this.displayed_[this.row_]=i},mt.prototype.shiftRowsUp_=function(){var t;for(t=0;t>>2;o*=4,o+=3&s[7],r.timeStamp=o,void 0===e.pts&&void 0===e.dts&&(e.pts=r.timeStamp,e.dts=r.timeStamp),this.trigger("timestamp",r)}e.frames.push(r),i+=10,i+=n}while(i>>4&&(i+=t[i]+1),0===e.pid)e.type="pat",n(t.subarray(i),e),this.trigger("data",e);else if(e.pid===this.pmtPid)for(e.type="pmt",n(t.subarray(i),e),this.trigger("data",e);this.packetsWaitingForPmt.length;)this.processPes_.apply(this,this.packetsWaitingForPmt.shift());else void 0===this.programMapTable?this.packetsWaitingForPmt.push([t,i,e]):this.processPes_(t,i,e)},this.processPes_=function(t,e,i){i.pid===this.programMapTable.video?i.streamType=yt.H264_STREAM_TYPE:i.pid===this.programMapTable.audio?i.streamType=yt.ADTS_STREAM_TYPE:i.streamType=this.programMapTable["timed-metadata"][i.pid],i.type="pes",i.data=t.subarray(e),this.trigger("data",i)}}).prototype=new K,At.STREAM_TYPES={h264:27,adts:15},(Lt=function(){var d=this,n={data:[],size:0},r={data:[],size:0},a={data:[],size:0},s=function(t,e,i){var n,r,a=new Uint8Array(t.size),s={type:e},o=0,u=0;if(t.data.length&&!(t.size<9)){for(s.trackId=t.data[0].pid,o=0;o>>3,c.pts*=4,c.pts+=(6&l[13])>>>1,c.dts=c.pts,64&h&&(c.dts=(14&l[14])<<27|(255&l[15])<<20|(254&l[16])<<12|(255&l[17])<<5|(254&l[18])>>>3,c.dts*=4,c.dts+=(6&l[18])>>>1)),c.data=l.subarray(9+l[8]),n="video"===e||s.packetLength<=t.size,(i||n)&&(t.size=0,t.data.length=0),n&&d.trigger("data",s)}};Lt.prototype.init.call(this),this.push=function(i){({pat:function(){},pes:function(){var t,e;switch(i.streamType){case yt.H264_STREAM_TYPE:case yt.H264_STREAM_TYPE:t=n,e="video";break;case yt.ADTS_STREAM_TYPE:t=r,e="audio";break;case yt.METADATA_STREAM_TYPE:t=a,e="timed-metadata";break;default:return}i.payloadUnitStartIndicator&&s(t,e,!0),t.data.push(i),t.size+=i.data.byteLength},pmt:function(){var t={type:"metadata",tracks:[]},e=i.programMapTable;null!==e.video&&t.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.video,codec:"avc",type:"video"}),null!==e.audio&&t.tracks.push({timelineStartInfo:{baseMediaDecodeTime:0},id:+e.audio,codec:"adts",type:"audio"}),d.trigger("data",t)}})[i.type]()},this.flush=function(){s(n,"video"),s(r,"audio"),s(a,"timed-metadata"),this.trigger("done")}}).prototype=new K;var Ut={PAT_PID:0,MP2T_PACKET_LENGTH:188,TransportPacketStream:Et,TransportParseStream:At,ElementaryStream:Lt,TimestampRolloverStream:Pt,CaptionStream:gt.CaptionStream,Cea608Stream:gt.Cea608Stream,MetadataStream:Ot};for(var xt in yt)yt.hasOwnProperty(xt)&&(Ut[xt]=yt[xt]);var It,Dt=Ut,Rt=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];(It=function(){var l;It.prototype.init.call(this),this.push=function(t){var e,i,n,r,a,s,o=0,u=0;if("audio"===t.type)for(l?(r=l,(l=new Uint8Array(r.byteLength+t.data.byteLength)).set(r),l.set(t.data,r.byteLength)):l=t.data;o+5>5,s=9e4*(a=1024*(1+(3&l[o+6])))/Rt[(60&l[o+2])>>>2],n=o+e,l.byteLength>>6&3),channelcount:(1&l[o+2])<<2|(192&l[o+3])>>>6,samplerate:Rt[(60&l[o+2])>>>2],samplingfrequencyindex:(60&l[o+2])>>>2,samplesize:16,data:l.subarray(o+7+i,n)}),l.byteLength===n)return void(l=void 0);u++,l=l.subarray(n)}else o++},this.flush=function(){this.trigger("done")}}).prototype=new K;var Mt,Bt,Nt,jt=It,Ft=function(n){var r=n.byteLength,a=0,s=0;this.length=function(){return 8*r},this.bitsAvailable=function(){return 8*r+s},this.loadWord=function(){var t=n.byteLength-r,e=new Uint8Array(4),i=Math.min(4,r);if(0===i)throw new Error("no bytes available");e.set(n.subarray(t,t+i)),a=new DataView(e.buffer).getUint32(0),s=8*i,r-=i},this.skipBits=function(t){var e;t>>32-e;return 0<(s-=e)?a<<=e:0>>t))return a<<=t,s-=t,t;return this.loadWord(),t+this.skipLeadingZeros()},this.skipUnsignedExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.skipExpGolomb=function(){this.skipBits(1+this.skipLeadingZeros())},this.readUnsignedExpGolomb=function(){var t=this.skipLeadingZeros();return this.readBits(t+1)-1},this.readExpGolomb=function(){var t=this.readUnsignedExpGolomb();return 1&t?1+t>>>1:-1*(t>>>1)},this.readBoolean=function(){return 1===this.readBits(1)},this.readUnsignedByte=function(){return this.readBits(8)},this.loadWord()};(Bt=function(){var i,n,r=0;Bt.prototype.init.call(this),this.push=function(t){var e;for(n=n?((e=new Uint8Array(n.byteLength+t.data.byteLength)).set(n),e.set(t.data,n.byteLength),e):t.data;r>4?i+20:i+10},this.parseAdtsSize=function(t,e){var i=(224&t[e+5])>>5,n=t[e+4]<<3;return 6144&t[e+3]|n|i},this.push=function(t){var e,i,n,r,a=0,s=0;for(o.length?(r=o.length,(o=new Uint8Array(t.byteLength+r)).set(o.subarray(0,r)),o.set(t,r)):o=t;3<=o.length-s;)if(o[s]!=="I".charCodeAt(0)||o[s+1]!=="D".charCodeAt(0)||o[s+2]!=="3".charCodeAt(0))if(!0&o[s]&&240==(240&o[s+1])){if(o.length-s<7)break;if((a=this.parseAdtsSize(o,s))>o.length)break;n={type:"audio",data:o.subarray(s,s+a),pts:u,dts:u},this.trigger("data",n),s+=a}else s++;else{if(o.length-s<10)break;if((a=this.parseId3TagSize(o,s))>o.length)break;i={type:"timed-metadata",data:o.subarray(s,s+a)},this.trigger("data",i),s+=a}e=o.length-s,o=0=e?t:(r.minSegmentDts=1/0,t.filter(function(t){return t.dts>=e&&(r.minSegmentDts=Math.min(r.minSegmentDts,t.dts),r.minSegmentPts=r.minSegmentDts,!0)}))},this.generateSampleTable_=function(t){var e,i,n=[];for(e=0;en.pts?e++:(i++,a-=r.byteLength,s-=r.nalCount,o-=r.duration);return 0===i?t:i===t.length?null:((u=t.slice(i)).byteLength=a,u.duration=o,u.nalCount=s,u.pts=u[0].pts,u.dts=u[0].dts,u)},this.alignGopsAtEnd_=function(t){var e,i,n,r,a,s,o;for(e=h.length-1,i=t.length-1,a=null,s=!1;0<=e&&0<=i;){if(n=h[e],r=t[i],n.pts===r.pts){s=!0;break}n.pts>r.pts?e--:(e===h.length-1&&(a=i),i--)}if(!s&&null===a)return null;if(0===(o=s?i:a))return t;var u=t.slice(o),l=u.reduce(function(t,e){return t.byteLength+=e.byteLength,t.duration+=e.duration,t.nalCount+=e.nalCount,t},{byteLength:0,duration:0,nalCount:0});return u.byteLength=l.byteLength,u.duration=l.duration,u.nalCount=l.nalCount,u.pts=u[0].pts,u.dts=u[0].dts,u},this.alignGopsWith=function(t){h=t}}).prototype=new K,(ae=function(t,e){this.numberOfTracks=0,this.metadataStream=e,"undefined"!=typeof t.remux?this.remuxTracks=!!t.remux:this.remuxTracks=!0,this.pendingTracks=[],this.videoTrack=null,this.pendingBoxes=[],this.pendingCaptions=[],this.pendingMetadata=[],this.pendingBytes=0,this.emittedTracks=0,ae.prototype.init.call(this),this.push=function(t){return t.text?this.pendingCaptions.push(t):t.frames?this.pendingMetadata.push(t):(this.pendingTracks.push(t.track),this.pendingBoxes.push(t.boxes),this.pendingBytes+=t.boxes.byteLength,"video"===t.track.type&&(this.videoTrack=t.track),void("audio"===t.track.type&&(this.audioTrack=t.track)))}}).prototype=new K,ae.prototype.flush=function(t){var e,i,n,r,a=0,s={captions:[],captionStreams:{},metadata:[],info:{}},o=0;if(this.pendingTracks.length=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0))}for(this.videoTrack?(o=this.videoTrack.timelineStartInfo.pts,pe.forEach(function(t){s.info[t]=this.videoTrack[t]},this)):this.audioTrack&&(o=this.audioTrack.timelineStartInfo.pts,de.forEach(function(t){s.info[t]=this.audioTrack[t]},this)),1===this.pendingTracks.length?s.type=this.pendingTracks[0].type:s.type="combined",this.emittedTracks+=this.pendingTracks.length,n=G.initSegment(this.pendingTracks),s.initSegment=new Uint8Array(n.byteLength),s.initSegment.set(n),s.data=new Uint8Array(this.pendingBytes),r=0;r=this.numberOfTracks&&(this.trigger("done"),this.emittedTracks=0)},(re=function(n){var r,a,s=this,i=!0;re.prototype.init.call(this),n=n||{},this.baseMediaDecodeTime=n.baseMediaDecodeTime||0,this.transmuxPipeline_={},this.setupAacPipeline=function(){var e={};(this.transmuxPipeline_=e).type="aac",e.metadataStream=new Dt.MetadataStream,e.aacStream=new Kt,e.audioTimestampRolloverStream=new Dt.TimestampRolloverStream("audio"),e.timedMetadataTimestampRolloverStream=new Dt.TimestampRolloverStream("timed-metadata"),e.adtsStream=new jt,e.coalesceStream=new ae(n,e.metadataStream),e.headOfPipeline=e.aacStream,e.aacStream.pipe(e.audioTimestampRolloverStream).pipe(e.adtsStream),e.aacStream.pipe(e.timedMetadataTimestampRolloverStream).pipe(e.metadataStream).pipe(e.coalesceStream),e.metadataStream.on("timestamp",function(t){e.aacStream.setTimestamp(t.timeStamp)}),e.aacStream.on("data",function(t){"timed-metadata"!==t.type||e.audioSegmentStream||(a=a||{timelineStartInfo:{baseMediaDecodeTime:s.baseMediaDecodeTime},codec:"adts",type:"audio"},e.coalesceStream.numberOfTracks++,e.audioSegmentStream=new ne(a,n),e.adtsStream.pipe(e.audioSegmentStream).pipe(e.coalesceStream))}),e.coalesceStream.on("data",this.trigger.bind(this,"data")),e.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setupTsPipeline=function(){var i={};(this.transmuxPipeline_=i).type="ts",i.metadataStream=new Dt.MetadataStream,i.packetStream=new Dt.TransportPacketStream,i.parseStream=new Dt.TransportParseStream,i.elementaryStream=new Dt.ElementaryStream,i.videoTimestampRolloverStream=new Dt.TimestampRolloverStream("video"),i.audioTimestampRolloverStream=new Dt.TimestampRolloverStream("audio"),i.timedMetadataTimestampRolloverStream=new Dt.TimestampRolloverStream("timed-metadata"),i.adtsStream=new jt,i.h264Stream=new he,i.captionStream=new Dt.CaptionStream,i.coalesceStream=new ae(n,i.metadataStream),i.headOfPipeline=i.packetStream,i.packetStream.pipe(i.parseStream).pipe(i.elementaryStream),i.elementaryStream.pipe(i.videoTimestampRolloverStream).pipe(i.h264Stream),i.elementaryStream.pipe(i.audioTimestampRolloverStream).pipe(i.adtsStream),i.elementaryStream.pipe(i.timedMetadataTimestampRolloverStream).pipe(i.metadataStream).pipe(i.coalesceStream),i.h264Stream.pipe(i.captionStream).pipe(i.coalesceStream),i.elementaryStream.on("data",function(t){var e;if("metadata"===t.type){for(e=t.tracks.length;e--;)r||"video"!==t.tracks[e].type?a||"audio"!==t.tracks[e].type||((a=t.tracks[e]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime):(r=t.tracks[e]).timelineStartInfo.baseMediaDecodeTime=s.baseMediaDecodeTime;r&&!i.videoSegmentStream&&(i.coalesceStream.numberOfTracks++,i.videoSegmentStream=new ie(r,n),i.videoSegmentStream.on("timelineStartInfo",function(t){a&&(a.timelineStartInfo=t,i.audioSegmentStream.setEarliestDts(t.dts))}),i.videoSegmentStream.on("processedGopsInfo",s.trigger.bind(s,"gopInfo")),i.videoSegmentStream.on("baseMediaDecodeTime",function(t){a&&i.audioSegmentStream.setVideoBaseMediaDecodeTime(t)}),i.h264Stream.pipe(i.videoSegmentStream).pipe(i.coalesceStream)),a&&!i.audioSegmentStream&&(i.coalesceStream.numberOfTracks++,i.audioSegmentStream=new ne(a,n),i.adtsStream.pipe(i.audioSegmentStream).pipe(i.coalesceStream))}}),i.coalesceStream.on("data",this.trigger.bind(this,"data")),i.coalesceStream.on("done",this.trigger.bind(this,"done"))},this.setBaseMediaDecodeTime=function(t){var e=this.transmuxPipeline_;this.baseMediaDecodeTime=t,a&&(a.timelineStartInfo.dts=void 0,a.timelineStartInfo.pts=void 0,it(a),a.timelineStartInfo.baseMediaDecodeTime=t,e.audioTimestampRolloverStream&&e.audioTimestampRolloverStream.discontinuity()),r&&(e.videoSegmentStream&&(e.videoSegmentStream.gopCache_=[],e.videoTimestampRolloverStream.discontinuity()),r.timelineStartInfo.dts=void 0,r.timelineStartInfo.pts=void 0,it(r),e.captionStream.reset(),r.timelineStartInfo.baseMediaDecodeTime=t),e.timedMetadataTimestampRolloverStream&&e.timedMetadataTimestampRolloverStream.discontinuity()},this.setAudioAppendStart=function(t){a&&this.transmuxPipeline_.audioSegmentStream.setAudioAppendStart(t)},this.alignGopsWith=function(t){r&&this.transmuxPipeline_.videoSegmentStream&&this.transmuxPipeline_.videoSegmentStream.alignGopsWith(t)},this.push=function(t){if(i){var e=se(t);e&&"aac"!==this.transmuxPipeline_.type?this.setupAacPipeline():e||"ts"===this.transmuxPipeline_.type||this.setupTsPipeline(),i=!1}this.transmuxPipeline_.headOfPipeline.push(t)},this.flush=function(){i=!0,this.transmuxPipeline_.headOfPipeline.flush()},this.resetCaptions=function(){this.transmuxPipeline_.captionStream&&this.transmuxPipeline_.captionStream.reset()}}).prototype=new K;var fe,me,ge={Transmuxer:re,VideoSegmentStream:ie,AudioSegmentStream:ne,AUDIO_PROPERTIES:de,VIDEO_PROPERTIES:pe},ye=Y.parseType,ve=function(t){return new Date(1e3*t-20828448e5)},_e=function(t){return{isLeading:(12&t[0])>>>2,dependsOn:3&t[0],isDependedOn:(192&t[1])>>>6,hasRedundancy:(48&t[1])>>>4,paddingValue:(14&t[1])>>>1,isNonSyncSample:1&t[1],degradationPriority:t[2]<<8|t[3]}},be={avc1:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{dataReferenceIndex:e.getUint16(6),width:e.getUint16(24),height:e.getUint16(26),horizresolution:e.getUint16(28)+e.getUint16(30)/16,vertresolution:e.getUint16(32)+e.getUint16(34)/16,frameCount:e.getUint16(40),depth:e.getUint16(74),config:fe(t.subarray(78,t.byteLength))}},avcC:function(t){var e,i,n,r,a=new DataView(t.buffer,t.byteOffset,t.byteLength),s={configurationVersion:t[0],avcProfileIndication:t[1],profileCompatibility:t[2],avcLevelIndication:t[3],lengthSizeMinusOne:3&t[4],sps:[],pps:[]},o=31&t[5];for(n=6,r=0;r>>2&63,bufferSize:t[13]<<16|t[14]<<8|t[15],maxBitrate:t[16]<<24|t[17]<<16|t[18]<<8|t[19],avgBitrate:t[20]<<24|t[21]<<16|t[22]<<8|t[23],decoderConfigDescriptor:{tag:t[24],length:t[25],audioObjectType:t[26]>>>3&31,samplingFrequencyIndex:(7&t[26])<<1|t[27]>>>7&1,channelConfiguration:t[27]>>>3&15}}}},ftyp:function(t){for(var e=new DataView(t.buffer,t.byteOffset,t.byteLength),i={majorBrand:ye(t.subarray(0,4)),minorVersion:e.getUint32(4),compatibleBrands:[]},n=8;nMALFORMED DATA");else switch(31&t[e]){case 1:r.push("slice_layer_without_partitioning_rbsp");break;case 5:r.push("slice_layer_without_partitioning_rbsp_idr");break;case 6:r.push("sei_rbsp");break;case 7:r.push("seq_parameter_set_rbsp");break;case 8:r.push("pic_parameter_set_rbsp");break;case 9:r.push("access_unit_delimiter_rbsp");break;default:r.push("UNKNOWN NAL - "+t[e]&31)}return r}(t)}},mdhd:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n=4,r={version:i.getUint8(0),flags:new Uint8Array(t.subarray(1,4)),language:""};return 1===r.version?(n+=4,r.creationTime=ve(i.getUint32(n)),n+=8,r.modificationTime=ve(i.getUint32(n)),n+=4,r.timescale=i.getUint32(n),n+=8):(r.creationTime=ve(i.getUint32(n)),n+=4,r.modificationTime=ve(i.getUint32(n)),n+=4,r.timescale=i.getUint32(n),n+=4),r.duration=i.getUint32(n),n+=4,e=i.getUint16(n),r.language+=String.fromCharCode(96+(e>>10)),r.language+=String.fromCharCode(96+((992&e)>>5)),r.language+=String.fromCharCode(96+(31&e)),r},mdia:function(t){return{boxes:fe(t)}},mfhd:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),sequenceNumber:t[4]<<24|t[5]<<16|t[6]<<8|t[7]}},minf:function(t){return{boxes:fe(t)}},mp4a:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength),i={dataReferenceIndex:e.getUint16(6),channelcount:e.getUint16(16),samplesize:e.getUint16(18),samplerate:e.getUint16(24)+e.getUint16(26)/65536};return 28>4,isDependedOn:(12&t[e])>>2,hasRedundancy:3&t[e]});return i},sidx:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),references:[],referenceId:i.getUint32(4),timescale:i.getUint32(8),earliestPresentationTime:i.getUint32(12),firstOffset:i.getUint32(16)},r=i.getUint16(22);for(e=24;r;e+=12,r--)n.references.push({referenceType:(128&t[e])>>>7,referencedSize:2147483647&i.getUint32(e),subsegmentDuration:i.getUint32(e+4),startsWithSap:!!(128&t[e+8]),sapType:(112&t[e+8])>>>4,sapDeltaTime:268435455&i.getUint32(e+8)});return n},smhd:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),balance:t[4]+t[5]/256}},stbl:function(t){return{boxes:fe(t)}},stco:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),chunkOffsets:[]},r=i.getUint32(4);for(e=8;r;e+=4,r--)n.chunkOffsets.push(i.getUint32(e));return n},stsc:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n=i.getUint32(4),r={version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleToChunks:[]};for(e=8;n;e+=12,n--)r.sampleToChunks.push({firstChunk:i.getUint32(e),samplesPerChunk:i.getUint32(e+4),sampleDescriptionIndex:i.getUint32(e+8)});return r},stsd:function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleDescriptions:fe(t.subarray(8))}},stsz:function(t){var e,i=new DataView(t.buffer,t.byteOffset,t.byteLength),n={version:t[0],flags:new Uint8Array(t.subarray(1,4)),sampleSize:i.getUint32(4),entries:[]};for(e=12;e>6,sampleHasRedundancy:(48&t[21])>>4,samplePaddingValue:(14&t[21])>>1,sampleIsDifferenceSample:!!(1&t[21]),sampleDegradationPriority:e.getUint16(22)}},trun:function(t){var e,i={version:t[0],flags:new Uint8Array(t.subarray(1,4)),samples:[]},n=new DataView(t.buffer,t.byteOffset,t.byteLength),r=1&i.flags[2],a=4&i.flags[2],s=1&i.flags[1],o=2&i.flags[1],u=4&i.flags[1],l=8&i.flags[1],c=n.getUint32(4),h=8;for(r&&(i.dataOffset=n.getInt32(h),h+=4),a&&c&&(e={flags:_e(t.subarray(h,h+4))},h+=4,s&&(e.duration=n.getUint32(h),h+=4),o&&(e.size=n.getUint32(h),h+=4),l&&(e.compositionTimeOffset=n.getUint32(h),h+=4),i.samples.push(e),c--);c--;)e={},s&&(e.duration=n.getUint32(h),h+=4),o&&(e.size=n.getUint32(h),h+=4),u&&(e.flags=_e(t.subarray(h,h+4)),h+=4),l&&(e.compositionTimeOffset=n.getUint32(h),h+=4),i.samples.push(e);return i},"url ":function(t){return{version:t[0],flags:new Uint8Array(t.subarray(1,4))}},vmhd:function(t){var e=new DataView(t.buffer,t.byteOffset,t.byteLength);return{version:t[0],flags:new Uint8Array(t.subarray(1,4)),graphicsmode:e.getUint16(4),opcolor:new Uint16Array([e.getUint16(6),e.getUint16(8),e.getUint16(10)])}}},Te={inspect:fe=function(t){for(var e,i,n,r,a,s=0,o=[],u=new ArrayBuffer(t.length),l=new Uint8Array(u),c=0;c":e+"<\n"+n.map(function(t){return a+" "+t}).join("\n")+"\n"+a+" >":e+"<>"}return e+JSON.stringify(i,null,2).split("\n").map(function(t,e){return 0===e?t:a+" "+t}).join("\n")}).join("\n")+(r.boxes?"\n"+me(r.boxes,e+1):"")}).join("\n")},parseTfdt:be.tfdt,parseHdlr:be.hdlr,parseTfhd:be.tfhd,parseTrun:be.trun},Se=ut,ke=gt.CaptionStream,we=function(t,e){for(var i=t,n=0;nn);r++);return t.slice(r)}(this.gopBuffer_,this.mediaSource_.player_?this.mediaSource_.player_.currentTime():null,this.timeMapping_)}),this.transmuxer_.postMessage({action:"push",data:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength},[t.buffer]),this.transmuxer_.postMessage({action:"flush"})}},{key:"appendGopInfo_",value:function(t){this.gopBuffer_=function(t,e,i){if(!e.length)return t;if(i)return e.slice();for(var n=e[0].pts,r=0;r=n);r++);return t.slice(0,r).concat(e)}(this.gopBuffer_,t.data.gopInfo,this.safeAppend_)}},{key:"remove",value:function(t,e){if(this.videoBuffer_&&(this.videoBuffer_.updating=!0,this.videoBuffer_.remove(t,e),this.gopBuffer_=function(t,e,i,n){for(var r=Math.ceil(9e4*(e-n)),a=Math.ceil(9e4*(i-n)),s=t.slice(),o=t.length;o--&&!(t[o].pts<=a););if(-1===o)return s;for(var u=o+1;u--&&!(t[u].pts<=r););return u=Math.max(u,0),s.splice(u,o-u+1),s}(this.gopBuffer_,t,e,this.timeMapping_)),!this.audioDisabled_&&this.audioBuffer_&&(this.audioBuffer_.updating=!0,this.audioBuffer_.remove(t,e)),Kl(t,e,this.metadataTrack_),this.inbandTextTracks_)for(var i in this.inbandTextTracks_)Kl(t,e,this.inbandTextTracks_[i])}},{key:"processPendingSegments_",value:function(){var t={video:{segments:[],bytes:0},audio:{segments:[],bytes:0},captions:[],metadata:[]};t=this.pendingBuffers_.reduce(function(t,e){var i=e.type,n=e.data,r=e.initSegment;return t[i].segments.push(n),t[i].bytes+=n.byteLength,t[i].initSegment=r,e.captions&&(t.captions=t.captions.concat(e.captions)),e.info&&(t[i].info=e.info),e.metadata&&(t.metadata=t.metadata.concat(e.metadata)),t},t),this.videoBuffer_||this.audioBuffer_||(0===t.video.bytes&&(this.videoCodec_=null),0===t.audio.bytes&&(this.audioCodec_=null),this.createRealSourceBuffers_()),t.audio.info&&this.mediaSource_.trigger({type:"audioinfo",info:t.audio.info}),t.video.info&&this.mediaSource_.trigger({type:"videoinfo",info:t.video.info}),this.appendAudioInitSegment_&&(!this.audioDisabled_&&this.audioBuffer_&&(t.audio.segments.unshift(t.audio.initSegment),t.audio.bytes+=t.audio.initSegment.byteLength),this.appendAudioInitSegment_=!1);var e=!1;this.videoBuffer_&&t.video.bytes?(t.video.segments.unshift(t.video.initSegment),t.video.bytes+=t.video.initSegment.byteLength,this.concatAndAppendSegments_(t.video,this.videoBuffer_),Jl(this,t.captions,t.metadata)):!this.videoBuffer_||!this.audioDisabled_&&this.audioBuffer_||(e=!0),!this.audioDisabled_&&this.audioBuffer_&&this.concatAndAppendSegments_(t.audio,this.audioBuffer_),this.pendingBuffers_.length=0,e&&this.trigger("updateend"),this.bufferUpdating_=!1}},{key:"concatAndAppendSegments_",value:function(t,e){var i=0,n=void 0;if(t.bytes){n=new Uint8Array(t.bytes),t.segments.forEach(function(t){n.set(t,i),i+=t.byteLength});try{e.updating=!0,e.appendBuffer(n)}catch(t){this.mediaSource_.player_&&this.mediaSource_.player_.error({code:-3,type:"APPEND_BUFFER_ERR",message:t.message,originalError:t})}}}},{key:"abort",value:function(){this.videoBuffer_&&this.videoBuffer_.abort(),!this.audioDisabled_&&this.audioBuffer_&&this.audioBuffer_.abort(),this.transmuxer_&&this.transmuxer_.postMessage({action:"reset"}),this.pendingBuffers_.length=0,this.bufferUpdating_=!1}}]),r}(),_c=function(t){function e(){al(this,e);var a=ul(this,(e.__proto__||Object.getPrototypeOf(e)).call(this)),t=void 0;for(t in a.nativeMediaSource_=new v.MediaSource,a.nativeMediaSource_)t in e.prototype||"function"!=typeof a.nativeMediaSource_[t]||(a[t]=a.nativeMediaSource_[t].bind(a.nativeMediaSource_));return a.duration_=NaN,Object.defineProperty(a,"duration",{get:function(){return this.duration_===1/0?this.duration_:this.nativeMediaSource_.duration},set:function(t){(this.duration_=t)===1/0||(this.nativeMediaSource_.duration=t)}}),Object.defineProperty(a,"seekable",{get:function(){return this.duration_===1/0?oa.createTimeRanges([[0,this.nativeMediaSource_.duration]]):this.nativeMediaSource_.seekable}}),Object.defineProperty(a,"readyState",{get:function(){return this.nativeMediaSource_.readyState}}),Object.defineProperty(a,"activeSourceBuffers",{get:function(){return this.activeSourceBuffers_}}),a.sourceBuffers=[],a.activeSourceBuffers_=[],a.updateActiveSourceBuffers_=function(){if(a.activeSourceBuffers_.length=0,1===a.sourceBuffers.length){var t=a.sourceBuffers[0];return t.appendAudioInitSegment_=!0,t.audioDisabled_=!t.audioCodec_,void a.activeSourceBuffers_.push(t)}for(var i=!1,n=!0,e=0;ethis.nativeMediaSource_.duration||isNaN(this.nativeMediaSource_.duration))&&(this.nativeMediaSource_.duration=e)}},{key:"addSourceBuffer",value:function(t){var r,e,i=void 0,n=(r={type:"",parameters:{}},e=t.trim().split(";"),r.type=e.shift().trim(),e.forEach(function(t){var e=t.trim().split("=");if(1"):function(){}};function Pc(){}var Uc=function(){function r(t,e,i,n){al(this,r),this.callbacks_=[],this.pendingCallback_=null,this.timestampOffset_=0,this.mediaSource=t,this.processedAppend_=!1,this.type_=i,this.mimeType_=e,this.logger_=Oc("SourceUpdater["+i+"]["+e+"]"),"closed"===t.readyState?t.addEventListener("sourceopen",this.createSourceBuffer_.bind(this,e,n)):this.createSourceBuffer_(e,n)}return sl(r,[{key:"createSourceBuffer_",value:function(t,e){var i=this;this.sourceBuffer_=this.mediaSource.addSourceBuffer(t),this.logger_("created SourceBuffer"),e&&(e.trigger("sourcebufferadded"),this.mediaSource.sourceBuffers.length<2)?e.on("sourcebufferadded",function(){i.start_()}):this.start_()}},{key:"start_",value:function(){var e=this;this.started_=!0,this.onUpdateendCallback_=function(){var t=e.pendingCallback_;e.pendingCallback_=null,e.logger_("buffered ["+Yl(e.buffered())+"]"),t&&t(),e.runCallback_()},this.sourceBuffer_.addEventListener("updateend",this.onUpdateendCallback_),this.runCallback_()}},{key:"abort",value:function(t){var e=this;this.processedAppend_&&this.queueCallback_(function(){e.sourceBuffer_.abort()},t)}},{key:"appendBuffer",value:function(t,e){var i=this;this.processedAppend_=!0,this.queueCallback_(function(){i.sourceBuffer_.appendBuffer(t)},e)}},{key:"buffered",value:function(){return this.sourceBuffer_?this.sourceBuffer_.buffered:oa.createTimeRanges()}},{key:"remove",value:function(t,e){var i=this,n=2 "+e+"]"),i.sourceBuffer_.remove(t,e)},n)}},{key:"updating",value:function(){return!this.sourceBuffer_||this.sourceBuffer_.updating||this.pendingCallback_}},{key:"timestampOffset",value:function(t){var e=this;return"undefined"!=typeof t&&(this.queueCallback_(function(){e.sourceBuffer_.timestampOffset=t}),this.timestampOffset_=t),this.timestampOffset_}},{key:"queueCallback_",value:function(t,e){this.callbacks_.push([t.bind(this),e]),this.runCallback_()}},{key:"runCallback_",value:function(){var t=void 0;!this.updating()&&this.callbacks_.length&&this.started_&&(t=this.callbacks_.shift(),this.pendingCallback_=t[1],t[0]())}},{key:"dispose",value:function(){this.sourceBuffer_.removeEventListener("updateend",this.onUpdateendCallback_),this.sourceBuffer_&&"open"===this.mediaSource.readyState&&this.sourceBuffer_.abort()}}]),r}(),xc={GOAL_BUFFER_LENGTH:30,MAX_GOAL_BUFFER_LENGTH:60,GOAL_BUFFER_LENGTH_RATE:1,INITIAL_BANDWIDTH:4194304,BANDWIDTH_VARIANCE:1.2,BUFFER_LOW_WATER_LINE:0,MAX_BUFFER_LOW_WATER_LINE:30,BUFFER_LOW_WATER_LINE_RATE:1},Ic=2,Dc=-101,Rc=-102,Mc=function(t){var e,i,n={};return t.byterange&&(n.Range=(e=t.byterange,i=e.offset+e.length-1,"bytes="+e.offset+"-"+i)),n},Bc=function(t){t.forEach(function(t){t.abort()})},Nc=function(t,e){return e.timedout?{status:e.status,message:"HLS request timed-out at URL: "+e.uri,code:Dc,xhr:e}:e.aborted?{status:e.status,message:"HLS request aborted at URL: "+e.uri,code:Rc,xhr:e}:t?{status:e.status,message:"HLS request errored at URL: "+e.uri,code:Ic,xhr:e}:null},jc=function(s,o,u){var l=[],c=0;return function(t,e){if(t&&(Bc(s),l.push(t)),(c+=1)===s.length){if(e.endOfAllRequests=Date.now(),0t.code?e:t});return u(i,e)}return e.encryptedBytes?(r=e,a=u,(n=o).addEventListener("message",function t(e){if(e.data.source===r.requestId){n.removeEventListener("message",t);var i=e.data.decrypted;return r.bytes=new Uint8Array(i.bytes,i.byteOffset,i.byteLength),a(null,r)}}),void n.postMessage(Fl({source:r.requestId,encrypted:r.encryptedBytes,key:r.key.bytes,iv:r.key.iv}),[r.encryptedBytes.buffer,r.key.bytes.buffer])):u(null,e)}var n,r,a}},Fc=function(r,a){return function(t){var e,i,n;return r.stats=oa.mergeOptions(r.stats,(i=(e=t).target,(n={bandwidth:1/0,bytesReceived:0,roundTripTime:Date.now()-i.requestTime||0}).bytesReceived=e.loaded,n.bandwidth=Math.floor(n.bytesReceived/n.roundTripTime*8*1e3),n)),!r.stats.firstBytesReceivedAt&&r.stats.bytesReceived&&(r.stats.firstBytesReceivedAt=Date.now()),a(t,r)}},Vc=function(t,e,i,n,r,a,s){var o,u,l,c,h,d=[],p=jc(d,i,s);if(r.key){var f=t(oa.mergeOptions(e,{uri:r.key.resolvedUri,responseType:"arraybuffer"}),(o=r,u=p,function(t,e){var i=e.response,n=Nc(t,e);if(n)return u(n,o);if(16!==i.byteLength)return u({status:e.status,message:"Invalid HLS key at URL: "+e.uri,code:Ic,xhr:e},o);var r=new DataView(i);return o.key.bytes=new Uint32Array([r.getUint32(0),r.getUint32(4),r.getUint32(8),r.getUint32(12)]),u(null,o)}));d.push(f)}if(r.map&&!r.map.bytes){var m=t(oa.mergeOptions(e,{uri:r.map.resolvedUri,responseType:"arraybuffer",headers:Mc(r.map)}),(l=r,c=n,h=p,function(t,e){var i=e.response,n=Nc(t,e);return n?h(n,l):0===i.byteLength?h({status:e.status,message:"Empty HLS segment content at URL: "+e.uri,code:Ic,xhr:e},l):(l.map.bytes=new Uint8Array(e.response),c.isInitialized()||c.init(),l.map.timescales=Qs.timescale(l.map.bytes),l.map.videoTrackIds=Qs.videoTrackIds(l.map.bytes),h(null,l))}));d.push(m)}var g,y,v,_=t(oa.mergeOptions(e,{uri:r.resolvedUri,responseType:"arraybuffer",headers:Mc(r)}),(g=r,y=n,v=p,function(t,e){var i,n=e.response,r=Nc(t,e),a=void 0;return r?v(r,g):0===n.byteLength?v({status:e.status,message:"Empty HLS segment content at URL: "+e.uri,code:Ic,xhr:e},g):(g.stats={bandwidth:(i=e).bandwidth,bytesReceived:i.bytesReceived||0,roundTripTime:i.roundTripTime||0},g.key?g.encryptedBytes=new Uint8Array(e.response):g.bytes=new Uint8Array(e.response),g.map&&g.map.bytes&&(y.isInitialized()||y.init(),(a=y.parse(g.bytes,g.map.videoTrackIds,g.map.timescales))&&a.captions&&(g.captionStreams=a.captionStreams,g.fmp4Captions=a.captions)),v(null,g))}));return _.addEventListener("progress",Fc(r,a)),d.push(_),function(){return Bc(d)}},Hc=function(t,e){var i;return t&&(i=v.getComputedStyle(t))?i[e]:""},qc=function(t,n){var r=t.slice();t.sort(function(t,e){var i=n(t,e);return 0===i?r.indexOf(t)-r.indexOf(e):i})},zc=function(t,e){var i=void 0,n=void 0;return t.attributes.BANDWIDTH&&(i=t.attributes.BANDWIDTH),i=i||v.Number.MAX_VALUE,e.attributes.BANDWIDTH&&(n=e.attributes.BANDWIDTH),i-(n=n||v.Number.MAX_VALUE)},Wc=function(t,e,i){if(!t||!e)return!1;var n=i===t.segments.length;return t.endList&&"open"===e.readyState&&n},Gc=function(t){return"number"==typeof t&&isFinite(t)},Xc=function(t){function i(t){al(this,i);var e=ul(this,(i.__proto__||Object.getPrototypeOf(i)).call(this));if(!t)throw new TypeError("Initialization settings are required");if("function"!=typeof t.currentTime)throw new TypeError("No currentTime getter specified");if(!t.mediaSource)throw new TypeError("No MediaSource specified");return e.bandwidth=t.bandwidth,e.throughput={rate:0,count:0},e.roundTrip=NaN,e.resetStats_(),e.mediaIndex=null,e.hasPlayed_=t.hasPlayed,e.currentTime_=t.currentTime,e.seekable_=t.seekable,e.seeking_=t.seeking,e.duration_=t.duration,e.mediaSource_=t.mediaSource,e.hls_=t.hls,e.loaderType_=t.loaderType,e.startingMedia_=void 0,e.segmentMetadataTrack_=t.segmentMetadataTrack,e.goalBufferLength_=t.goalBufferLength,e.sourceType_=t.sourceType,e.inbandTextTracks_=t.inbandTextTracks,e.state_="INIT",e.checkBufferTimeout_=null,e.error_=void 0,e.currentTimeline_=-1,e.pendingSegment_=null,e.mimeType_=null,e.sourceUpdater_=null,e.xhrOptions_=null,e.activeInitSegmentId_=null,e.initSegments_={},e.captionParser_=new Iu,e.decrypter_=t.decrypter,e.syncController_=t.syncController,e.syncPoint_={segmentIndex:0,time:0},e.syncController_.on("syncinfoupdate",function(){return e.trigger("syncinfoupdate")}),e.mediaSource_.addEventListener("sourceopen",function(){return e.ended_=!1}),e.fetchAtBuffer_=!1,e.logger_=Oc("SegmentLoader["+e.loaderType_+"]"),Object.defineProperty(e,"state",{get:function(){return this.state_},set:function(t){t!==this.state_&&(this.logger_(this.state_+" -> "+t),this.state_=t)}}),e}return ol(i,oa.EventTarget),sl(i,[{key:"resetStats_",value:function(){this.mediaBytesTransferred=0,this.mediaRequests=0,this.mediaRequestsAborted=0,this.mediaRequestsTimedout=0,this.mediaRequestsErrored=0,this.mediaTransferDuration=0,this.mediaSecondsLoaded=0}},{key:"dispose",value:function(){this.state="DISPOSED",this.pause(),this.abort_(),this.sourceUpdater_&&this.sourceUpdater_.dispose(),this.resetStats_(),this.captionParser_.reset()}},{key:"abort",value:function(){"WAITING"===this.state?(this.abort_(),this.state="READY",this.paused()||this.monitorBuffer_()):this.pendingSegment_&&(this.pendingSegment_=null)}},{key:"abort_",value:function(){this.pendingSegment_&&this.pendingSegment_.abortRequests(),this.pendingSegment_=null}},{key:"error",value:function(t){return"undefined"!=typeof t&&(this.error_=t),this.pendingSegment_=null,this.error_}},{key:"endOfStream",value:function(){this.ended_=!0,this.pause(),this.trigger("ended")}},{key:"buffered_",value:function(){return this.sourceUpdater_?this.sourceUpdater_.buffered():oa.createTimeRanges()}},{key:"initSegment",value:function(t){var e=1 "+t.id+"]"),this.trigger("syncinfoupdate"),"INIT"===this.state&&this.couldBeginLoading_())return this.init_();if(i&&i.uri===t.uri){var a=t.mediaSequence-i.mediaSequence;this.logger_("live window shift ["+a+"]"),null!==this.mediaIndex&&(this.mediaIndex-=a),n&&(n.mediaIndex-=a,0<=n.mediaIndex&&(n.segment=t.segments[n.mediaIndex])),this.syncController_.saveExpiredSegmentInfo(i,t)}else null!==this.mediaIndex&&this.resyncLoader()}}},{key:"pause",value:function(){this.checkBufferTimeout_&&(v.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=null)}},{key:"paused",value:function(){return null===this.checkBufferTimeout_}},{key:"mimeType",value:function(t,e){this.mimeType_||(this.mimeType_=t,this.sourceBufferEmitter_=e,"INIT"===this.state&&this.couldBeginLoading_()&&this.init_())}},{key:"resetEverything",value:function(t){this.ended_=!1,this.resetLoader(),this.remove(0,this.duration_(),t),this.captionParser_.clearAllCaptions(),this.trigger("reseteverything")}},{key:"resetLoader",value:function(){this.fetchAtBuffer_=!1,this.resyncLoader()}},{key:"resyncLoader",value:function(){this.mediaIndex=null,this.syncPoint_=null,this.abort()}},{key:"remove",value:function(t,e,i){if(this.sourceUpdater_&&this.sourceUpdater_.remove(t,e,i),Kl(t,e,this.segmentMetadataTrack_),this.inbandTextTracks_)for(var n in this.inbandTextTracks_)Kl(t,e,this.inbandTextTracks_[n])}},{key:"monitorBuffer_",value:function(){this.checkBufferTimeout_&&v.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=v.setTimeout(this.monitorBufferTick_.bind(this),1)}},{key:"monitorBufferTick_",value:function(){"READY"===this.state&&this.fillBuffer_(),this.checkBufferTimeout_&&v.clearTimeout(this.checkBufferTimeout_),this.checkBufferTimeout_=v.setTimeout(this.monitorBufferTick_.bind(this),500)}},{key:"fillBuffer_",value:function(){if(!this.sourceUpdater_.updating()){this.syncPoint_||(this.syncPoint_=this.syncController_.getSyncPoint(this.playlist_,this.duration_(),this.currentTimeline_,this.currentTime_()));var t=this.checkBuffer_(this.buffered_(),this.playlist_,this.mediaIndex,this.hasPlayed_(),this.currentTime_(),this.syncPoint_);if(t)Wc(this.playlist_,this.mediaSource_,t.mediaIndex)?this.endOfStream():(t.mediaIndex!==this.playlist_.segments.length-1||"ended"!==this.mediaSource_.readyState||this.seeking_())&&((t.timeline!==this.currentTimeline_||null!==t.startOfSegment&&t.startOfSegment=this.goalBufferLength_())return null;if(!n&&1<=u)return null;if(null===a)return i=this.getSyncSegmentCandidate_(e),this.generateSegmentInfo_(e,i,null,!0);if(null!==i){var l=e.segments[i];return o=l&&l.end?l.end:s,this.generateSegmentInfo_(e,i+1,o,!1)}if(this.fetchAtBuffer_){var c=Dl.getMediaInfoForTime(e,s,a.segmentIndex,a.time);i=c.mediaIndex,o=c.startTime}else{var h=Dl.getMediaInfoForTime(e,r,a.segmentIndex,a.time);i=h.mediaIndex,o=h.startTime}return this.generateSegmentInfo_(e,i,o,!1)}},{key:"getSyncSegmentCandidate_",value:function(t){var e=this;if(-1===this.currentTimeline_)return 0;var i=t.segments.map(function(t,e){return{timeline:t.timeline,segmentIndex:e}}).filter(function(t){return t.timeline===e.currentTimeline_});return i.length?i[Math.min(i.length-1,1)].segmentIndex:Math.max(t.segments.length-1,0)}},{key:"generateSegmentInfo_",value:function(t,e,i,n){if(e<0||e>=t.segments.length)return null;var r=t.segments[e];return{requestId:"segment-loader-"+Math.random(),uri:r.resolvedUri,mediaIndex:e,isSyncRequest:n,startOfSegment:i,playlist:t,bytes:null,encryptedBytes:null,timestampOffset:null,timeline:r.timeline,duration:r.duration,segment:r}}},{key:"abortRequestEarly_",value:function(t){if(this.hls_.tech_.paused()||!this.xhrOptions_.timeout||!this.playlist_.attributes.BANDWIDTH)return!1;if(Date.now()-(t.firstBytesReceivedAt||Date.now())<1e3)return!1;var e=this.currentTime_(),i=t.bandwidth,n=this.pendingSegment_.duration,r=Dl.estimateSegmentRequestTime(n,i,this.playlist_,t.bytesReceived),a=function(t,e){var i=2 "+h+"] in timeline ["+v+"]"].join(" "))),this.sourceUpdater_.appendBuffer(e.bytes,this.handleUpdateEnd_.bind(this))}else this.state="READY"}},{key:"handleUpdateEnd_",value:function(){if(!this.pendingSegment_)return this.state="READY",void(this.paused()||this.monitorBuffer_());var t=this.pendingSegment_,e=t.segment,i=null!==this.mediaIndex;(this.pendingSegment_=null,this.recordThroughput_(t),this.addSegmentMetadataCue_(t),this.state="READY",this.mediaIndex=t.mediaIndex,this.fetchAtBuffer_=!0,this.currentTimeline_=t.timeline,this.trigger("syncinfoupdate"),e.end&&this.currentTime_()-e.end>3*t.playlist.targetDuration)?this.resetEverything():(i&&this.trigger("bandwidthupdate"),this.trigger("progress"),Wc(t.playlist,this.mediaSource_,t.mediaIndex+1)&&this.endOfStream(),this.paused()||this.monitorBuffer_())}},{key:"recordThroughput_",value:function(t){var e=this.throughput.rate,i=Date.now()-t.endOfAllRequests+1,n=Math.floor(t.byteLength/i*8*1e3);this.throughput.rate+=(n-e)/++this.throughput.count}},{key:"addSegmentMetadataCue_",value:function(t){if(this.segmentMetadataTrack_){var e=t.segment,i=e.start,n=e.end;if(Gc(i)&&Gc(n)){Kl(i,n,this.segmentMetadataTrack_);var r=v.WebKitDataCue||v.VTTCue,a={bandwidth:t.playlist.attributes.BANDWIDTH,resolution:t.playlist.attributes.RESOLUTION,codecs:t.playlist.attributes.CODECS,byteLength:t.byteLength,uri:t.uri,timeline:t.timeline,playlist:t.playlist.uri,start:i,end:n},s=new r(i,n,JSON.stringify(a));s.value=a,this.segmentMetadataTrack_.addCue(s)}}}}]),i}(),Yc=function(t){return decodeURIComponent(escape(String.fromCharCode.apply(null,t)))},$c=new Uint8Array("\n\n".split("").map(function(t){return t.charCodeAt(0)})),Kc=function(t){function n(t){var e=1=r.adStartTime&&e<=r.adEndTime)return r}return null},Jc=Yu,Zc=[{name:"VOD",run:function(t,e,i,n,r){if(i===1/0)return null;return{time:0,segmentIndex:0}}},{name:"ProgramDateTime",run:function(t,e,i,n,r){if(!t.datetimeToDisplayTime)return null;var a=e.segments||[],s=null,o=null;r=r||0;for(var u=0;uo){var u=void 0;u=s<0?i.start-Sl(e,t.mediaIndex,r):i.end+Sl(e,t.mediaIndex+1,r),this.discontinuities[a]={time:u,accuracy:o}}}}}]),e}(),eh=new ac("./decrypter-worker.worker.js",function(t,e){var h,i,d,g,n,l,y,s,r=this;h=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},i=function(){function n(t,e){for(var i=0;i>7))^a]=a;for(s=o=0;!n[s];s^=c||1,o=l[o]||1)for(d=(d=o^o<<1^o<<2^o<<3^o<<4)>>8^255&d^99,f=16843009*u[h=u[c=u[r[n[s]=d]=s]]]^65537*h^257*c^16843008*s,p=257*u[d]^16843008*d,a=0;a<4;a++)e[a][s]=p=p<<24^p>>>8,i[a][d]=f=f<<24^f>>>8;for(a=0;a<5;a++)e[a]=e[a].slice(0),i[a]=i[a].slice(0);return t}()),this._tables=[[d[0][0].slice(),d[0][1].slice(),d[0][2].slice(),d[0][3].slice(),d[0][4].slice()],[d[1][0].slice(),d[1][1].slice(),d[1][2].slice(),d[1][3].slice(),d[1][4].slice()]];var e=void 0,i=void 0,n=void 0,r=void 0,a=void 0,s=this._tables[0][4],o=this._tables[1],u=t.length,l=1;if(4!==u&&6!==u&&8!==u)throw new Error("Invalid aes key size");for(r=t.slice(0),a=[],this._key=[r,a],e=u;e<4*u+28;e++)n=r[e-1],(e%u==0||8===u&&e%u==4)&&(n=s[n>>>24]<<24^s[n>>16&255]<<16^s[n>>8&255]<<8^s[255&n],e%u==0&&(n=n<<8^n>>>24^l<<24,l=l<<1^283*(l>>7))),r[e]=r[e-u]^n;for(i=0;e;i++,e--)n=r[3&i?e:e-4],a[i]=e<=4||i<4?n:o[0][s[n>>>24]]^o[1][s[n>>16&255]]^o[2][s[n>>8&255]]^o[3][s[255&n]]}return c.prototype.decrypt=function(t,e,i,n,r,a){var s=this._key[1],o=t^s[0],u=n^s[1],l=i^s[2],c=e^s[3],h=void 0,d=void 0,p=void 0,f=s.length/4-2,m=void 0,g=4,y=this._tables[1],v=y[0],_=y[1],b=y[2],T=y[3],S=y[4];for(m=0;m>>24]^_[u>>16&255]^b[l>>8&255]^T[255&c]^s[g],d=v[u>>>24]^_[l>>16&255]^b[c>>8&255]^T[255&o]^s[g+1],p=v[l>>>24]^_[c>>16&255]^b[o>>8&255]^T[255&u]^s[g+2],c=v[c>>>24]^_[o>>16&255]^b[u>>8&255]^T[255&l]^s[g+3],g+=4,o=h,u=d,l=p;for(m=0;m<4;m++)r[(3&-m)+a]=S[o>>>24]<<24^S[u>>16&255]<<16^S[l>>8&255]<<8^S[255&c]^s[g++],h=o,o=u,u=l,l=c,c=h},c}(),n=function(){function t(){h(this,t),this.listeners={}}return t.prototype.on=function(t,e){this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(e)},t.prototype.off=function(t,e){if(!this.listeners[t])return!1;var i=this.listeners[t].indexOf(e);return this.listeners[t].splice(i,1),-1>8|t>>>24},s=function(){function u(t,e,i,n){h(this,u);var r=u.STEP,a=new Int32Array(t.buffer),s=new Uint8Array(t.byteLength),o=0;for(this.asyncStream_=new l,this.asyncStream_.push(this.decryptChunk_(a.subarray(o,o+r),e,i,s)),o=r;o>2),r=new g(Array.prototype.slice.call(e)),a=new Uint8Array(t.byteLength),s=new Int32Array(a.buffer),o=void 0,u=void 0,l=void 0,c=void 0,h=void 0,d=void 0,p=void 0,f=void 0,m=void 0;for(o=i[0],u=i[1],l=i[2],c=i[3],m=0;mt.end(0)||t.start(0)>e.end(0)?this.seekable_=t:this.seekable_=oa.createTimeRanges([[e.start(0)>t.start(0)?e.start(0):t.start(0),e.end(0)=e.end(e.length-1)))return this.techWaiting_();5<=this.consecutiveUpdates&&t===this.lastRecordedTime?(this.consecutiveUpdates++,this.waiting_()):t===this.lastRecordedTime?this.consecutiveUpdates++:(this.consecutiveUpdates=0,this.lastRecordedTime=t)}}},{key:"cancelTimer_",value:function(){this.consecutiveUpdates=0,this.timer_&&(this.logger_("cancelTimer_"),clearTimeout(this.timer_)),this.timer_=null}},{key:"fixesBadSeeks_",value:function(){var t=this.tech_.seeking(),e=this.seekable(),i=this.tech_.currentTime(),n=void 0;t&&this.afterSeekableWindow_(e,i)&&(n=e.end(e.length-1));t&&this.beforeSeekableWindow_(e,i)&&(n=e.start(0)+.1);return"undefined"!=typeof n&&(this.logger_("Trying to seek outside of seekable at time "+i+" with seekable range "+Yl(e)+". Seeking to "+n+"."),this.seekTo(n),!0)}},{key:"waiting_",value:function(){if(!this.techWaiting_()){var t=this.tech_.currentTime(),e=this.tech_.buffered(),i=Gl(e,t);return i.length&&t+3<=i.end(0)?(this.cancelTimer_(),this.seekTo(t),this.logger_("Stopped at "+t+" while inside a buffered region ["+i.start(0)+" -> "+i.end(0)+"]. Attempting to resume playback by seeking to the current time."),void this.tech_.trigger({type:"usage",name:"hls-unknown-waiting"})):void 0}}},{key:"techWaiting_",value:function(){var t=this.seekable(),e=this.tech_.currentTime();if(this.tech_.seeking()&&this.fixesBadSeeks_())return!0;if(this.tech_.seeking()||null!==this.timer_)return!0;if(this.beforeSeekableWindow_(t,e)){var i=t.end(t.length-1);return this.logger_("Fell out of live window at time "+e+". Seeking to live point (seekable end) "+i),this.cancelTimer_(),this.seekTo(i),this.tech_.trigger({type:"usage",name:"hls-live-resync"}),!0}var n=this.tech_.buffered(),r=Xl(n,e);if(this.videoUnderflow_(r,n,e))return this.cancelTimer_(),this.seekTo(e),this.tech_.trigger({type:"usage",name:"hls-video-underflow"}),!0;if(0t.end(t.length-1)+.1}},{key:"beforeSeekableWindow_",value:function(t,e){return!!(t.length&&0i||t.height>n})).filter(function(t){return t.width===f[0].width&&t.height===f[0].height}),u=m[m.length-1],g=m.filter(function(t){return t.bandwidth===u.bandwidth})[0]);var y=g||p||l||s[0]||a[0];return y?y.playlist:null}(this.playlists.master,this.systemBandwidth,parseInt(Hc(this.tech_.el(),"width"),10),parseInt(Hc(this.tech_.el(),"height"),10),this.limitRenditionByPlayerDimensions)},INITIAL_PLAYLIST_SELECTOR:function(){var t=this.playlists.master.playlists.filter(Dl.isEnabled);return qc(t,function(t,e){return zc(t,e)}),t.filter(function(t){return pc(t.attributes.CODECS).videoCodec})[0]||null},comparePlaylistBandwidth:zc,comparePlaylistResolution:function(t,e){var i=void 0,n=void 0;return t.attributes.RESOLUTION&&t.attributes.RESOLUTION.width&&(i=t.attributes.RESOLUTION.width),i=i||v.Number.MAX_VALUE,e.attributes.RESOLUTION&&e.attributes.RESOLUTION.width&&(n=e.attributes.RESOLUTION.width),i===(n=n||v.Number.MAX_VALUE)&&t.attributes.BANDWIDTH&&e.attributes.BANDWIDTH?t.attributes.BANDWIDTH-e.attributes.BANDWIDTH:i-n},xhr:Bl()};["GOAL_BUFFER_LENGTH","MAX_GOAL_BUFFER_LENGTH","GOAL_BUFFER_LENGTH_RATE","BUFFER_LOW_WATER_LINE","MAX_BUFFER_LOW_WATER_LINE","BUFFER_LOW_WATER_LINE_RATE","BANDWIDTH_VARIANCE"].forEach(function(e){Object.defineProperty(_h,e,{get:function(){return oa.log.warn("using Hls."+e+" is UNSAFE be sure you know what you are doing"),xc[e]},set:function(t){oa.log.warn("using Hls."+e+" is UNSAFE be sure you know what you are doing"),"number"!=typeof t||t<0?oa.log.warn("value of Hls."+e+" must be greater than or equal to 0"):xc[e]=t}})});var bh=function(t){if(/^(audio|video|application)\/(x-|vnd\.apple\.)?mpegurl/i.test(t))return"hls";return/^application\/dash\+xml/i.test(t)?"dash":null},Th=function(t,e){for(var i=e.media(),n=-1,r=0;r0||-1)*Math.floor(Math.abs(b))),b},ToPrimitive:function(a){var c,d,e;if(K(a))return a;if(d=a.valueOf,b(d)&&(c=d.call(a),K(c)))return c;if(e=a.toString,b(e)&&(c=e.call(a),K(c)))return c;throw new TypeError},ToObject:function(a){if(null==a)throw new TypeError("can't convert "+a+" to object");return e(a)},ToUint32:function(a){return a>>>0}},N=function(){};J(g,{bind:function(a){var c=this;if(!b(c))throw new TypeError("Function.prototype.bind called on incompatible "+c);for(var d,f=l.call(arguments,1),g=function(){if(this instanceof d){var b=c.apply(this,p.call(f,l.call(arguments)));return e(b)===b?b:this}return c.apply(a,p.call(f,l.call(arguments)))},h=s(0,c.length-f.length),i=[],j=0;h>j;j++)n.call(i,"$"+j);return d=Function("binder","return function ("+i.join(",")+"){ return binder.apply(this, arguments); }")(g),c.prototype&&(N.prototype=c.prototype,d.prototype=new N,N.prototype=null),d}});var O=q.bind(f.hasOwnProperty),P=q.bind(f.toString),Q=q.bind(l),R=r.bind(l),S=q.bind(i.slice),T=q.bind(i.split),U=q.bind(i.indexOf),V=q.bind(n),W=q.bind(f.propertyIsEnumerable),X=q.bind(d.sort),Y=c.isArray||function(a){return"[object Array]"===P(a)},Z=1!==[].unshift(0);J(d,{unshift:function(){return o.apply(this,arguments),this.length}},Z),J(c,{isArray:Y});var $=e("a"),_="a"!==$[0]||!(0 in $),aa=function(a){var b=!0,c=!0,d=!1;if(a)try{a.call("foo",function(a,c,d){"object"!=typeof d&&(b=!1)}),a.call([1],function(){"use strict";c="string"==typeof this},"x")}catch(e){d=!0}return!!a&&!d&&b&&c};J(d,{forEach:function(a){var c,d=M.ToObject(this),e=_&&E(this)?T(this,""):d,f=-1,g=M.ToUint32(e.length);if(arguments.length>1&&(c=arguments[1]),!b(a))throw new TypeError("Array.prototype.forEach callback must be a function");for(;++f1&&(d=arguments[1]),!b(a))throw new TypeError("Array.prototype.map callback must be a function");for(var i=0;g>i;i++)i in f&&("undefined"==typeof d?h[i]=a(f[i],i,e):h[i]=a.call(d,f[i],i,e));return h}},!aa(d.map)),J(d,{filter:function(a){var c,d,e=M.ToObject(this),f=_&&E(this)?T(this,""):e,g=M.ToUint32(f.length),h=[];if(arguments.length>1&&(d=arguments[1]),!b(a))throw new TypeError("Array.prototype.filter callback must be a function");for(var i=0;g>i;i++)i in f&&(c=f[i],("undefined"==typeof d?a(c,i,e):a.call(d,c,i,e))&&V(h,c));return h}},!aa(d.filter)),J(d,{every:function(a){var c,d=M.ToObject(this),e=_&&E(this)?T(this,""):d,f=M.ToUint32(e.length);if(arguments.length>1&&(c=arguments[1]),!b(a))throw new TypeError("Array.prototype.every callback must be a function");for(var g=0;f>g;g++)if(g in e&&!("undefined"==typeof c?a(e[g],g,d):a.call(c,e[g],g,d)))return!1;return!0}},!aa(d.every)),J(d,{some:function(a){var c,d=M.ToObject(this),e=_&&E(this)?T(this,""):d,f=M.ToUint32(e.length);if(arguments.length>1&&(c=arguments[1]),!b(a))throw new TypeError("Array.prototype.some callback must be a function");for(var g=0;f>g;g++)if(g in e&&("undefined"==typeof c?a(e[g],g,d):a.call(c,e[g],g,d)))return!0;return!1}},!aa(d.some));var ba=!1;d.reduce&&(ba="object"==typeof d.reduce.call("es5",function(a,b,c,d){return d})),J(d,{reduce:function(a){var c=M.ToObject(this),d=_&&E(this)?T(this,""):c,e=M.ToUint32(d.length);if(!b(a))throw new TypeError("Array.prototype.reduce callback must be a function");if(0===e&&1===arguments.length)throw new TypeError("reduce of empty array with no initial value");var f,g=0;if(arguments.length>=2)f=arguments[1];else for(;;){if(g in d){f=d[g++];break}if(++g>=e)throw new TypeError("reduce of empty array with no initial value")}for(;e>g;g++)g in d&&(f=a(f,d[g],g,c));return f}},!ba);var ca=!1;d.reduceRight&&(ca="object"==typeof d.reduceRight.call("es5",function(a,b,c,d){return d})),J(d,{reduceRight:function(a){var c=M.ToObject(this),d=_&&E(this)?T(this,""):c,e=M.ToUint32(d.length);if(!b(a))throw new TypeError("Array.prototype.reduceRight callback must be a function");if(0===e&&1===arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var f,g=e-1;if(arguments.length>=2)f=arguments[1];else for(;;){if(g in d){f=d[g--];break}if(--g<0)throw new TypeError("reduceRight of empty array with no initial value")}if(0>g)return f;do g in d&&(f=a(f,d[g],g,c));while(g--);return f}},!ca);var da=d.indexOf&&-1!==[0,1].indexOf(1,2);J(d,{indexOf:function(a){var b=_&&E(this)?T(this,""):M.ToObject(this),c=M.ToUint32(b.length);if(0===c)return-1;var d=0;for(arguments.length>1&&(d=M.ToInteger(arguments[1])),d=d>=0?d:s(0,c+d);c>d;d++)if(d in b&&b[d]===a)return d;return-1}},da);var ea=d.lastIndexOf&&-1!==[0,1].lastIndexOf(0,-3);J(d,{lastIndexOf:function(a){var b=_&&E(this)?T(this,""):M.ToObject(this),c=M.ToUint32(b.length);if(0===c)return-1;var d=c-1;for(arguments.length>1&&(d=t(d,M.ToInteger(arguments[1]))),d=d>=0?d:c-Math.abs(d);d>=0;d--)if(d in b&&a===b[d])return d;return-1}},ea);var fa=function(){var a=[1,2],b=a.splice();return 2===a.length&&Y(b)&&0===b.length}();J(d,{splice:function(a,b){return 0===arguments.length?[]:m.apply(this,arguments)}},!fa);var ga=function(){var a={};return d.splice.call(a,0,0,1),1===a.length}();J(d,{splice:function(a,b){if(0===arguments.length)return[];var c=arguments;return this.length=s(M.ToInteger(this.length),0),arguments.length>0&&"number"!=typeof b&&(c=Q(arguments),c.length<2?V(c,this.length-a):c[1]=M.ToInteger(b)),m.apply(this,c)}},!ga);var ha=function(){var a=new c(1e5);return a[8]="x",a.splice(1,1),7===a.indexOf("x")}(),ia=function(){var a=256,b=[];return b[a]="a",b.splice(a+1,0,"b"),"a"===b[a]}();J(d,{splice:function(a,b){for(var c,d=M.ToObject(this),e=[],f=M.ToUint32(d.length),g=M.ToInteger(a),i=0>g?s(f+g,0):t(g,f),j=t(s(M.ToInteger(b),0),f-i),k=0;j>k;)c=h(i+k),O(d,c)&&(e[k]=d[c]),k+=1;var l,m=Q(arguments,2),n=m.length;if(j>n){for(k=i;f-j>k;)c=h(k+j),l=h(k+n),O(d,c)?d[l]=d[c]:delete d[l],k+=1;for(k=f;k>f-j+n;)delete d[k-1],k-=1}else if(n>j)for(k=f-j;k>i;)c=h(k+j-1),l=h(k+n-1),O(d,c)?d[l]=d[c]:delete d[l],k-=1;k=i;for(var o=0;o=0&&!Y(a)&&b(a.callee)},Ea=Ca(arguments)?Ca:Da;J(e,{keys:function(a){var c=b(a),d=Ea(a),e=null!==a&&"object"==typeof a,f=e&&E(a);if(!e&&!c&&!d)throw new TypeError("Object.keys called on a non-object");var g=[],i=ua&&c;if(f&&va||d)for(var j=0;jm;m++){var n=Aa[m];l&&"constructor"===n||!O(a,n)||V(g,n)}return g}});var Fa=e.keys&&function(){return 2===e.keys(arguments).length}(1,2),Ga=e.keys&&function(){var a=e.keys(arguments);return 1!==arguments.length||1!==a.length||1!==a[0]}(1),Ha=e.keys;J(e,{keys:function(a){return Ha(Ea(a)?Q(a):a)}},!Fa||Ga);var Ia,Ja,Ka=0!==new Date(-0xc782b5b342b24).getUTCMonth(),La=new Date(-0x55d318d56a724),Ma=new Date(14496624e5),Na="Mon, 01 Jan -45875 11:59:59 GMT"!==La.toUTCString(),Oa=La.getTimezoneOffset();-720>Oa?(Ia="Tue Jan 02 -45875"!==La.toDateString(),Ja=!/^Thu Dec 10 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/.test(Ma.toString())):(Ia="Mon Jan 01 -45875"!==La.toDateString(),Ja=!/^Wed Dec 09 2015 \d\d:\d\d:\d\d GMT[-\+]\d\d\d\d(?: |$)/.test(Ma.toString()));var Pa=q.bind(Date.prototype.getFullYear),Qa=q.bind(Date.prototype.getMonth),Ra=q.bind(Date.prototype.getDate),Sa=q.bind(Date.prototype.getUTCFullYear),Ta=q.bind(Date.prototype.getUTCMonth),Ua=q.bind(Date.prototype.getUTCDate),Va=q.bind(Date.prototype.getUTCDay),Wa=q.bind(Date.prototype.getUTCHours),Xa=q.bind(Date.prototype.getUTCMinutes),Ya=q.bind(Date.prototype.getUTCSeconds),Za=q.bind(Date.prototype.getUTCMilliseconds),$a=["Sun","Mon","Tue","Wed","Thu","Fri"],_a=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ab=function(a,b){return Ra(new Date(b,a,0))};J(Date.prototype,{getFullYear:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var a=Pa(this);return 0>a&&Qa(this)>11?a+1:a},getMonth:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var a=Pa(this),b=Qa(this);return 0>a&&b>11?0:b},getDate:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var a=Pa(this),b=Qa(this),c=Ra(this);if(0>a&&b>11){if(12===b)return c;var d=ab(0,a+1);return d-c+1}return c},getUTCFullYear:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var a=Sa(this);return 0>a&&Ta(this)>11?a+1:a},getUTCMonth:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var a=Sa(this),b=Ta(this);return 0>a&&b>11?0:b},getUTCDate:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var a=Sa(this),b=Ta(this),c=Ua(this);if(0>a&&b>11){if(12===b)return c;var d=ab(0,a+1);return d-c+1}return c}},Ka),J(Date.prototype,{toUTCString:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var a=Va(this),b=Ua(this),c=Ta(this),d=Sa(this),e=Wa(this),f=Xa(this),g=Ya(this);return $a[a]+", "+(10>b?"0"+b:b)+" "+_a[c]+" "+d+" "+(10>e?"0"+e:e)+":"+(10>f?"0"+f:f)+":"+(10>g?"0"+g:g)+" GMT"}},Ka||Na),J(Date.prototype,{toDateString:function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var a=this.getDay(),b=this.getDate(),c=this.getMonth(),d=this.getFullYear();return $a[a]+" "+_a[c]+" "+(10>b?"0"+b:b)+" "+d}},Ka||Ia),(Ka||Ja)&&(Date.prototype.toString=function(){if(!(this&&this instanceof Date))throw new TypeError("this is not a Date object.");var a=this.getDay(),b=this.getDate(),c=this.getMonth(),d=this.getFullYear(),e=this.getHours(),f=this.getMinutes(),g=this.getSeconds(),h=this.getTimezoneOffset(),i=Math.floor(Math.abs(h)/60),j=Math.floor(Math.abs(h)%60);return $a[a]+" "+_a[c]+" "+(10>b?"0"+b:b)+" "+d+" "+(10>e?"0"+e:e)+":"+(10>f?"0"+f:f)+":"+(10>g?"0"+g:g)+" GMT"+(h>0?"-":"+")+(10>i?"0"+i:i)+(10>j?"0"+j:j)},I&&e.defineProperty(Date.prototype,"toString",{configurable:!0,enumerable:!1,writable:!0}));var bb=-621987552e5,cb="-000001",db=Date.prototype.toISOString&&-1===new Date(bb).toISOString().indexOf(cb),eb=Date.prototype.toISOString&&"1969-12-31T23:59:59.999Z"!==new Date(-1).toISOString();J(Date.prototype,{toISOString:function(){if(!isFinite(this))throw new RangeError("Date.prototype.toISOString called on non-finite value.");var a=Sa(this),b=Ta(this);a+=Math.floor(b/12),b=(b%12+12)%12;var c=[b+1,Ua(this),Wa(this),Xa(this),Ya(this)];a=(0>a?"-":a>9999?"+":"")+S("00000"+Math.abs(a),a>=0&&9999>=a?-4:-6);for(var d=0;d=7&&j>jb){var o=Math.floor(j/jb)*jb,p=Math.floor(o/1e3);m+=p,n-=1e3*p}k=1===l&&h(c)===c?new a(b.parse(c)):l>=7?new a(c,d,e,f,g,m,n):l>=6?new a(c,d,e,f,g,m):l>=5?new a(c,d,e,f,g):l>=4?new a(c,d,e,f):l>=3?new a(c,d,e):l>=2?new a(c,d):l>=1?new a(c):new a}else k=a.apply(this,arguments);return K(k)||J(k,{constructor:b},!0),k},c=new RegExp("^(\\d{4}|[+-]\\d{6})(?:-(\\d{2})(?:-(\\d{2})(?:T(\\d{2}):(\\d{2})(?::(\\d{2})(?:(\\.\\d{1,}))?)?(Z|(?:([-+])(\\d{2}):(\\d{2})))?)?)?)?$"),d=[0,31,59,90,120,151,181,212,243,273,304,334,365],e=function(a,b){var c=b>1?1:0;return d[b]+Math.floor((a-1969+c)/4)-Math.floor((a-1901+c)/100)+Math.floor((a-1601+c)/400)+365*(a-1970)},f=function(b){var c=0,d=b;if(kb&&d>jb){var e=Math.floor(d/jb)*jb,f=Math.floor(e/1e3);c+=f,d-=1e3*f}return j(new a(1970,0,1,0,0,c,d))};for(var g in a)O(a,g)&&(b[g]=a[g]);J(b,{now:a.now,UTC:a.UTC},!0),b.prototype=a.prototype,J(b.prototype,{constructor:b},!0);var i=function(b){var d=c.exec(b);if(d){var g,h=j(d[1]),i=j(d[2]||1)-1,k=j(d[3]||1)-1,l=j(d[4]||0),m=j(d[5]||0),n=j(d[6]||0),o=Math.floor(1e3*j(d[7]||0)),p=Boolean(d[4]&&!d[8]),q="-"===d[9]?1:-1,r=j(d[10]||0),s=j(d[11]||0),t=m>0||n>0||o>0;return(t?24:25)>l&&60>m&&60>n&&1e3>o&&i>-1&&12>i&&24>r&&60>s&&k>-1&&k=-864e13&&864e13>=g)?g:NaN}return a.parse.apply(this,arguments)};return J(b,{parse:i}),b}(Date)}Date.now||(Date.now=function(){return(new Date).getTime()});var lb=k.toFixed&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==0xde0b6b3a7640080.toFixed(0)),mb={base:1e7,size:6,data:[0,0,0,0,0,0],multiply:function(a,b){for(var c=-1,d=b;++c=0;)c+=mb.data[b],mb.data[b]=Math.floor(c/a),c=c%a*mb.base},numToString:function(){for(var a=mb.size,b="";--a>=0;)if(""!==b||0===a||0!==mb.data[a]){var c=h(mb.data[a]);""===b?b=c:b+=S("0000000",0,7-c.length)+c}return b},pow:function Gb(a,b,c){return 0===b?c:b%2===1?Gb(a,b-1,c*a):Gb(a*a,b/2,c)},log:function(a){for(var b=0,c=a;c>=4096;)b+=12,c/=4096;for(;c>=2;)b+=1,c/=2;return b}},nb=function(a){var b,c,d,e,f,g,i,k;if(b=j(a),b=L(b)?0:Math.floor(b),0>b||b>20)throw new RangeError("Number.toFixed called with invalid number of decimals");if(c=j(this),L(c))return"NaN";if(-1e21>=c||c>=1e21)return h(c);if(d="",0>c&&(d="-",c=-c),e="0",c>1e-21)if(f=mb.log(c*mb.pow(2,69,1))-69,g=0>f?c*mb.pow(2,-f,1):c/mb.pow(2,f,1),g*=4503599627370496,f=52-f,f>0){for(mb.multiply(0,g),i=b;i>=7;)mb.multiply(1e7,0),i-=7;for(mb.multiply(mb.pow(10,i,1),0),i=f-1;i>=23;)mb.divide(1<<23),i-=23;mb.divide(1<0?(k=e.length,e=b>=k?d+S("0.0000000000000000000",0,b-k+2)+e:d+S(e,0,k-b)+"."+S(e,k-b)):e=d+e,e};J(k,{toFixed:nb},lb);var ob=function(){try{return"1"===1..toPrecision(void 0)}catch(a){return!0}}(),pb=k.toPrecision;J(k,{toPrecision:function(a){return"undefined"==typeof a?pb.call(this):pb.call(this,a)}},ob),2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||"t"==="tesst".split(/(s)*/)[1]||4!=="test".split(/(?:)/,-1).length||"".split(/.?/).length||".".split(/()()/).length>1?!function(){var a="undefined"==typeof/()??/.exec("")[1],b=Math.pow(2,32)-1;i.split=function(c,d){var e=String(this);if("undefined"==typeof c&&0===d)return[];if(!A(c))return T(this,c,d);var f,g,h,i,j=[],k=(c.ignoreCase?"i":"")+(c.multiline?"m":"")+(c.unicode?"u":"")+(c.sticky?"y":""),l=0,m=new RegExp(c.source,k+"g");a||(f=new RegExp("^"+m.source+"$(?!\\s)",k));var o="undefined"==typeof d?b:M.ToUint32(d);for(g=m.exec(e);g&&(h=g.index+g[0].length,!(h>l&&(V(j,S(e,l,g.index)),!a&&g.length>1&&g[0].replace(f,function(){for(var a=1;a1&&g.index=o)));)m.lastIndex===g.index&&m.lastIndex++,g=m.exec(e);return l===e.length?(i||!m.test(""))&&V(j,""):V(j,S(e,l)),j.length>o?S(j,0,o):j}}():"0".split(void 0,0).length&&(i.split=function(a,b){return"undefined"==typeof a&&0===b?[]:T(this,a,b)});var qb=i.replace,rb=function(){var a=[];return"x".replace(/x(.)?/g,function(b,c){V(a,c)}),1===a.length&&"undefined"==typeof a[0]}();rb||(i.replace=function(a,c){var d=b(c),e=A(a)&&/\)[*?]/.test(a.source);if(d&&e){var f=function(b){var d=arguments.length,e=a.lastIndex;a.lastIndex=0;var f=a.exec(b)||[];return a.lastIndex=e,V(f,arguments[d-2],arguments[d-1]),c.apply(this,f)};return qb.call(this,a,f)}return qb.call(this,a,c)});var sb=i.substr,tb="".substr&&"b"!=="0b".substr(-1);J(i,{substr:function(a,b){var c=a;return 0>a&&(c=s(this.length+a,0)),sb.call(this,c,b)}},tb);var ub=" \n \f\r  ᠎              \u2028\u2029\ufeff",vb="​",wb="["+ub+"]",xb=new RegExp("^"+wb+wb+"*"),yb=new RegExp(wb+wb+"*$"),zb=i.trim&&(ub.trim()||!vb.trim());J(i,{trim:function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");return h(this).replace(xb,"").replace(yb,"")}},zb);var Ab=q.bind(String.prototype.trim),Bb=i.lastIndexOf&&-1!=="abcあい".lastIndexOf("あい",2);J(i,{lastIndexOf:function(a){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");for(var b=h(this),c=h(a),d=arguments.length>1?j(arguments[1]):NaN,e=L(d)?1/0:M.ToInteger(d),f=t(s(e,0),b.length),g=c.length,i=f+g;i>0;){i=s(0,i-g);var k=U(S(b,i,f+g),c);if(-1!==k)return i+k}return-1}},Bb);var Cb=i.lastIndexOf;if(J(i,{lastIndexOf:function(a){return Cb.apply(this,arguments)}},1!==i.lastIndexOf.length),(8!==parseInt(ub+"08")||22!==parseInt(ub+"0x16"))&&(parseInt=function(a){var b=/^[\-+]?0[xX]/;return function(c,d){var e=Ab(c),f=j(d)||(b.test(e)?16:10);return a(e,f)}}(parseInt)),1/parseFloat("-0")!==-(1/0)&&(parseFloat=function(a){return function(b){var c=Ab(b),d=a(c);return 0===d&&"-"===S(c,0,1)?-0:d}}(parseFloat)),"RangeError: test"!==String(new RangeError("test"))){var Db=function(){if("undefined"==typeof this||null===this)throw new TypeError("can't convert "+this+" to object");var a=this.name;"undefined"==typeof a?a="Error":"string"!=typeof a&&(a=h(a));var b=this.message;return"undefined"==typeof b?b="":"string"!=typeof b&&(b=h(b)),a?b?a+": "+b:a:b};Error.prototype.toString=Db}if(I){var Eb=function(a,b){if(W(a,b)){var c=Object.getOwnPropertyDescriptor(a,b);c.enumerable=!1,Object.defineProperty(a,b,c)}};Eb(Error.prototype,"message"),""!==Error.prototype.message&&(Error.prototype.message=""),Eb(Error.prototype,"name")}if("/a/gim"!==String(/a/gim)){var Fb=function(){var a="/"+this.source+"/";return this.global&&(a+="g"),this.ignoreCase&&(a+="i"),this.multiline&&(a+="m"),a};RegExp.prototype.toString=Fb}}),function(a,b){"use strict";"function"==typeof define&&define.amd?define(b):"object"==typeof exports?module.exports=b():a.returnExports=b()}(this,function(){var a,c,d,e,f=Function.call,g=Object.prototype,h=f.bind(g.hasOwnProperty),i=f.bind(g.propertyIsEnumerable),j=f.bind(g.toString),k=h(g,"__defineGetter__");k&&(a=f.bind(g.__defineGetter__),c=f.bind(g.__defineSetter__),d=f.bind(g.__lookupGetter__),e=f.bind(g.__lookupSetter__)),Object.getPrototypeOf||(Object.getPrototypeOf=function(a){var b=a.__proto__;return b||null===b?b:"[object Function]"===j(a.constructor)?a.constructor.prototype:a instanceof Object?g:null});var l=function(a){try{return a.sentinel=0,0===Object.getOwnPropertyDescriptor(a,"sentinel").value}catch(b){return!1}};if(Object.defineProperty){var m=l({}),n="undefined"==typeof b||l(b.createElement("div"));if(!n||!m)var o=Object.getOwnPropertyDescriptor}if(!Object.getOwnPropertyDescriptor||o){var p="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(a,b){if("object"!=typeof a&&"function"!=typeof a||null===a)throw new TypeError(p+a);if(o)try{return o.call(Object,a,b)}catch(c){}var f;if(!h(a,b))return f;if(f={enumerable:i(a,b),configurable:!0},k){var j=a.__proto__,l=a!==g;l&&(a.__proto__=g);var m=d(a,b),n=e(a,b);if(l&&(a.__proto__=j),m||n)return m&&(f.get=m),n&&(f.set=n),f}return f.value=a[b],f.writable=!0,f}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(a){return Object.keys(a)}),!Object.create){var q,r=!({__proto__:null}instanceof Object),s=function(){if(!b.domain)return!1;try{return!!new ActiveXObject("htmlfile")}catch(a){return!1}},t=function(){var a,b;return b=new ActiveXObject("htmlfile"),b.write(""),b.close(),a=b.parentWindow.Object.prototype,b=null,a},u=function(){var a,c=b.createElement("iframe"),d=b.body||b.documentElement;return c.style.display="none",d.appendChild(c),c.src="javascript:",a=c.contentWindow.Object.prototype,d.removeChild(c),c=null,a};q=r||"undefined"==typeof b?function(){return{__proto__:null}}:function(){var a=s()?t():u();delete a.constructor,delete a.hasOwnProperty,delete a.propertyIsEnumerable,delete a.isPrototypeOf,delete a.toLocaleString,delete a.toString,delete a.valueOf;var b=function(){};return b.prototype=a,q=function(){return new b},new b},Object.create=function(a,b){var c,d=function(){};if(null===a)c=q();else{if("object"!=typeof a&&"function"!=typeof a)throw new TypeError("Object prototype may only be an Object or null");d.prototype=a,c=new d,c.__proto__=a}return void 0!==b&&Object.defineProperties(c,b),c}}var v=function(a){try{return Object.defineProperty(a,"sentinel",{}),"sentinel"in a}catch(b){return!1}};if(Object.defineProperty){var w=v({}),x="undefined"==typeof b||v(b.createElement("div"));if(!w||!x)var y=Object.defineProperty,z=Object.defineProperties}if(!Object.defineProperty||y){var A="Property description must be an object: ",B="Object.defineProperty called on non-object: ",C="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(b,f,h){if("object"!=typeof b&&"function"!=typeof b||null===b)throw new TypeError(B+b);if("object"!=typeof h&&"function"!=typeof h||null===h)throw new TypeError(A+h);if(y)try{return y.call(Object,b,f,h)}catch(i){}if("value"in h)if(k&&(d(b,f)||e(b,f))){var j=b.__proto__;b.__proto__=g,delete b[f],b[f]=h.value,b.__proto__=j}else b[f]=h.value;else{if(!k&&("get"in h||"set"in h))throw new TypeError(C);"get"in h&&a(b,f,h.get),"set"in h&&c(b,f,h.set)}return b}}(!Object.defineProperties||z)&&(Object.defineProperties=function(a,b){if(z)try{return z.call(Object,a,b)}catch(c){}return Object.keys(b).forEach(function(c){"__proto__"!==c&&Object.defineProperty(a,c,b[c])}),a}),Object.seal||(Object.seal=function(a){if(Object(a)!==a)throw new TypeError("Object.seal can only be called on Objects.");return a}),Object.freeze||(Object.freeze=function(a){if(Object(a)!==a)throw new TypeError("Object.freeze can only be called on Objects.");return a});try{Object.freeze(function(){})}catch(D){Object.freeze=function(a){return function(b){return"function"==typeof b?b:a(b)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(a){if(Object(a)!==a)throw new TypeError("Object.preventExtensions can only be called on Objects.");return a}),Object.isSealed||(Object.isSealed=function(a){if(Object(a)!==a)throw new TypeError("Object.isSealed can only be called on Objects.");return!1}),Object.isFrozen||(Object.isFrozen=function(a){if(Object(a)!==a)throw new TypeError("Object.isFrozen can only be called on Objects.");return!1}),Object.isExtensible||(Object.isExtensible=function(a){if(Object(a)!==a)throw new TypeError("Object.isExtensible can only be called on Objects.");for(var b="";h(a,b);)b+="?";a[b]=!0;var c=h(a,b);return delete a[b],c})})}(window,document); (function(root,factory){if(typeof exports==="object"&&typeof module!=="undefined"){var videojs=require("video.js");module.exports=factory(videojs.default||videojs)}else if(typeof define==="function"&&define.amd){define(["videojs"],function(videojs){return root.Youtube=factory(videojs)})}else{root.Youtube=factory(root.videojs)}})(this,function(videojs){"use strict";var _isOnMobile=videojs.browser.IS_IOS||videojs.browser.IS_NATIVE_ANDROID;var Tech=videojs.getTech("Tech");var Youtube=videojs.extend(Tech,{constructor:function(options,ready){Tech.call(this,options,ready);this.setPoster(options.poster);this.setSrc(this.options_.source,true);this.setTimeout(function(){if(this.el_){this.el_.parentNode.className+=" vjs-youtube";if(_isOnMobile){this.el_.parentNode.className+=" vjs-youtube-mobile"}if(Youtube.isApiReady){this.initYTPlayer()}else{Youtube.apiReadyQueue.push(this)}}}.bind(this))},dispose:function(){if(this.ytPlayer){if(this.ytPlayer.stopVideo){this.ytPlayer.stopVideo()}if(this.ytPlayer.destroy){this.ytPlayer.destroy()}}else{var index=Youtube.apiReadyQueue.indexOf(this);if(index!==-1){Youtube.apiReadyQueue.splice(index,1)}}this.ytPlayer=null;this.el_.parentNode.className=this.el_.parentNode.className.replace(" vjs-youtube","").replace(" vjs-youtube-mobile","");this.el_.parentNode.removeChild(this.el_);Tech.prototype.dispose.call(this)},createEl:function(){var div=document.createElement("div");div.setAttribute("id",this.options_.techId);div.setAttribute("style","width:100%;height:100%;top:0;left:0;position:absolute");div.setAttribute("class","vjs-tech");var divWrapper=document.createElement("div");divWrapper.appendChild(div);if(!_isOnMobile&&!this.options_.ytControls){var divBlocker=document.createElement("div");divBlocker.setAttribute("class","vjs-iframe-blocker");divBlocker.setAttribute("style","position:absolute;top:0;left:0;width:100%;height:100%");divBlocker.onclick=function(){this.pause()}.bind(this);divWrapper.appendChild(divBlocker)}return divWrapper},initYTPlayer:function(){var playerVars={controls:0,modestbranding:1,rel:0,showinfo:0,loop:this.options_.loop?1:0};if(typeof this.options_.autohide!=="undefined"){playerVars.autohide=this.options_.autohide}if(typeof this.options_["cc_load_policy"]!=="undefined"){playerVars["cc_load_policy"]=this.options_["cc_load_policy"]}if(typeof this.options_.ytControls!=="undefined"){playerVars.controls=this.options_.ytControls}if(typeof this.options_.disablekb!=="undefined"){playerVars.disablekb=this.options_.disablekb}if(typeof this.options_.color!=="undefined"){playerVars.color=this.options_.color}if(!playerVars.controls){playerVars.fs=0}else if(typeof this.options_.fs!=="undefined"){playerVars.fs=this.options_.fs}if(this.options_.source.src.indexOf("end=")!==-1){var srcEndTime=this.options_.source.src.match(/end=([0-9]*)/);this.options_.end=parseInt(srcEndTime[1])}if(typeof this.options_.end!=="undefined"){playerVars.end=this.options_.end}if(typeof this.options_.hl!=="undefined"){playerVars.hl=this.options_.hl}else if(typeof this.options_.language!=="undefined"){playerVars.hl=this.options_.language.substr(0,2)}if(typeof this.options_["iv_load_policy"]!=="undefined"){playerVars["iv_load_policy"]=this.options_["iv_load_policy"]}if(typeof this.options_.list!=="undefined"){playerVars.list=this.options_.list}else if(this.url&&typeof this.url.listId!=="undefined"){playerVars.list=this.url.listId}if(typeof this.options_.listType!=="undefined"){playerVars.listType=this.options_.listType}if(typeof this.options_.modestbranding!=="undefined"){playerVars.modestbranding=this.options_.modestbranding}if(typeof this.options_.playlist!=="undefined"){playerVars.playlist=this.options_.playlist}if(typeof this.options_.playsinline!=="undefined"){playerVars.playsinline=this.options_.playsinline}if(typeof this.options_.rel!=="undefined"){playerVars.rel=this.options_.rel}if(typeof this.options_.showinfo!=="undefined"){playerVars.showinfo=this.options_.showinfo}if(this.options_.source.src.indexOf("start=")!==-1){var srcStartTime=this.options_.source.src.match(/start=([0-9]*)/);this.options_.start=parseInt(srcStartTime[1])}if(typeof this.options_.start!=="undefined"){playerVars.start=this.options_.start}if(typeof this.options_.theme!=="undefined"){playerVars.theme=this.options_.theme}if(typeof this.options_.customVars!=="undefined"){var customVars=this.options_.customVars;Object.keys(customVars).forEach(function(key){playerVars[key]=customVars[key]})}this.activeVideoId=this.url?this.url.videoId:null;this.activeList=playerVars.list;var playerConfig={videoId:this.activeVideoId,playerVars:playerVars,events:{onReady:this.onPlayerReady.bind(this),onPlaybackQualityChange:this.onPlayerPlaybackQualityChange.bind(this),onPlaybackRateChange:this.onPlayerPlaybackRateChange.bind(this),onStateChange:this.onPlayerStateChange.bind(this),onVolumeChange:this.onPlayerVolumeChange.bind(this),onError:this.onPlayerError.bind(this)}};if(typeof this.options_.enablePrivacyEnhancedMode!=="undefined"&&this.options_.enablePrivacyEnhancedMode){playerConfig.host="https://www.youtube-nocookie.com"}this.ytPlayer=new YT.Player(this.options_.techId,playerConfig)},onPlayerReady:function(){if(this.options_.muted){this.ytPlayer.mute()}var playbackRates=this.ytPlayer.getAvailablePlaybackRates();if(playbackRates.length>1){this.featuresPlaybackRate=true}this.playerReady_=true;this.triggerReady();if(this.playOnReady){this.play()}else if(this.cueOnReady){this.cueVideoById_(this.url.videoId);this.activeVideoId=this.url.videoId}},onPlayerPlaybackQualityChange:function(){},onPlayerPlaybackRateChange:function(){this.trigger("ratechange")},onPlayerStateChange:function(e){var state=e.data;if(state===this.lastState||this.errorNumber){return}this.lastState=state;switch(state){case-1:this.trigger("loadstart");this.trigger("loadedmetadata");this.trigger("durationchange");this.trigger("ratechange");break;case YT.PlayerState.ENDED:this.trigger("ended");break;case YT.PlayerState.PLAYING:this.trigger("timeupdate");this.trigger("durationchange");this.trigger("playing");this.trigger("play");if(this.isSeeking){this.onSeeked()}break;case YT.PlayerState.PAUSED:this.trigger("canplay");if(this.isSeeking){this.onSeeked()}else{this.trigger("pause")}break;case YT.PlayerState.BUFFERING:this.player_.trigger("timeupdate");this.player_.trigger("waiting");break}},onPlayerVolumeChange:function(){this.trigger("volumechange")},onPlayerError:function(e){this.errorNumber=e.data;this.trigger("pause");this.trigger("error")},error:function(){var code=1e3+this.errorNumber;switch(this.errorNumber){case 5:return{code:code,message:"Error while trying to play the video"};case 2:case 100:return{code:code,message:"Unable to find the video"};case 101:case 150:return{code:code,message:"Playback on other Websites has been disabled by the video owner."}}return{code:code,message:"YouTube unknown error ("+this.errorNumber+")"}},loadVideoById_:function(id){var options={videoId:id};if(this.options_.start){options.startSeconds=this.options_.start}if(this.options_.end){options.endEnd=this.options_.end}this.ytPlayer.loadVideoById(options)},cueVideoById_:function(id){var options={videoId:id};if(this.options_.start){options.startSeconds=this.options_.start}if(this.options_.end){options.endEnd=this.options_.end}this.ytPlayer.cueVideoById(options)},src:function(src){if(src){this.setSrc({src:src})}return this.source},poster:function(){if(_isOnMobile){return null}return this.poster_},setPoster:function(poster){this.poster_=poster},setSrc:function(source){if(!source||!source.src){return}delete this.errorNumber;this.source=source;this.url=Youtube.parseUrl(source.src);if(!this.options_.poster){if(this.url.videoId){this.poster_="https://img.youtube.com/vi/"+this.url.videoId+"/0.jpg";this.trigger("posterchange");this.checkHighResPoster()}}if(this.options_.autoplay&&!_isOnMobile){if(this.isReady_){this.play()}else{this.playOnReady=true}}else if(this.activeVideoId!==this.url.videoId){if(this.isReady_){this.cueVideoById_(this.url.videoId);this.activeVideoId=this.url.videoId}else{this.cueOnReady=true}}},autoplay:function(){return this.options_.autoplay},setAutoplay:function(val){this.options_.autoplay=val},loop:function(){return this.options_.loop},setLoop:function(val){this.options_.loop=val},play:function(){if(!this.url||!this.url.videoId){return}this.wasPausedBeforeSeek=false;if(this.isReady_){if(this.url.listId){if(this.activeList===this.url.listId){this.ytPlayer.playVideo()}else{this.ytPlayer.loadPlaylist(this.url.listId);this.activeList=this.url.listId}}if(this.activeVideoId===this.url.videoId){this.ytPlayer.playVideo()}else{this.loadVideoById_(this.url.videoId);this.activeVideoId=this.url.videoId}}else{this.trigger("waiting");this.playOnReady=true}},pause:function(){if(this.ytPlayer){this.ytPlayer.pauseVideo()}},paused:function(){return this.ytPlayer?this.lastState!==YT.PlayerState.PLAYING&&this.lastState!==YT.PlayerState.BUFFERING:true},currentTime:function(){return this.ytPlayer?this.ytPlayer.getCurrentTime():0},setCurrentTime:function(seconds){if(this.lastState===YT.PlayerState.PAUSED){this.timeBeforeSeek=this.currentTime()}if(!this.isSeeking){this.wasPausedBeforeSeek=this.paused()}this.ytPlayer.seekTo(seconds,true);this.trigger("timeupdate");this.trigger("seeking");this.isSeeking=true;if(this.lastState===YT.PlayerState.PAUSED&&this.timeBeforeSeek!==seconds){clearInterval(this.checkSeekedInPauseInterval);this.checkSeekedInPauseInterval=setInterval(function(){if(this.lastState!==YT.PlayerState.PAUSED||!this.isSeeking){clearInterval(this.checkSeekedInPauseInterval)}else if(this.currentTime()!==this.timeBeforeSeek){this.trigger("timeupdate");this.onSeeked()}}.bind(this),250)}},seeking:function(){return this.isSeeking},seekable:function(){if(!this.ytPlayer){return videojs.createTimeRange()}return videojs.createTimeRange(0,this.ytPlayer.getDuration())},onSeeked:function(){clearInterval(this.checkSeekedInPauseInterval);this.isSeeking=false;if(this.wasPausedBeforeSeek){this.pause()}this.trigger("seeked")},playbackRate:function(){return this.ytPlayer?this.ytPlayer.getPlaybackRate():1},setPlaybackRate:function(suggestedRate){if(!this.ytPlayer){return}this.ytPlayer.setPlaybackRate(suggestedRate)},duration:function(){return this.ytPlayer?this.ytPlayer.getDuration():0},currentSrc:function(){return this.source&&this.source.src},ended:function(){return this.ytPlayer?this.lastState===YT.PlayerState.ENDED:false},volume:function(){return this.ytPlayer?this.ytPlayer.getVolume()/100:1},setVolume:function(percentAsDecimal){if(!this.ytPlayer){return}this.ytPlayer.setVolume(percentAsDecimal*100)},muted:function(){return this.ytPlayer?this.ytPlayer.isMuted():false},setMuted:function(mute){if(!this.ytPlayer){return}else{this.muted(true)}if(mute){this.ytPlayer.mute()}else{this.ytPlayer.unMute()}this.setTimeout(function(){this.trigger("volumechange")},50)},buffered:function(){if(!this.ytPlayer||!this.ytPlayer.getVideoLoadedFraction){return videojs.createTimeRange()}var bufferedEnd=this.ytPlayer.getVideoLoadedFraction()*this.ytPlayer.getDuration();return videojs.createTimeRange(0,bufferedEnd)},preload:function(){},load:function(){},reset:function(){},networkState:function(){if(!this.ytPlayer){return 0}switch(this.ytPlayer.getPlayerState()){case-1:return 0;case 3:return 2;default:return 1}},readyState:function(){if(!this.ytPlayer){return 0}switch(this.ytPlayer.getPlayerState()){case-1:return 0;case 5:return 1;case 3:return 2;default:return 4}},supportsFullScreen:function(){return document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled},checkHighResPoster:function(){var uri="https://img.youtube.com/vi/"+this.url.videoId+"/maxresdefault.jpg";try{var image=new Image;image.onload=function(){if("naturalHeight"in image){if(image.naturalHeight<=90||image.naturalWidth<=120){return}}else if(image.height<=90||image.width<=120){return}this.poster_=uri;this.trigger("posterchange")}.bind(this);image.onerror=function(){};image.src=uri}catch(e){}}});Youtube.isSupported=function(){return true};Youtube.canPlaySource=function(e){return Youtube.canPlayType(e.type)};Youtube.canPlayType=function(e){return e==="video/youtube"};Youtube.parseUrl=function(url){var result={videoId:null};var regex=/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/;var match=url.match(regex);if(match&&match[2].length===11){result.videoId=match[2]}var regPlaylist=/[?&]list=([^#\&\?]+)/;match=url.match(regPlaylist);if(match&&match[1]){result.listId=match[1]}return result};function apiLoaded(){YT.ready(function(){Youtube.isApiReady=true;for(var i=0;i 1){ this.featuresPlaybackRate=true; } this.playerReady_=true; this.triggerReady(); if(this.playOnReady){ this.play(); }else if(this.cueOnReady){ this.activeVideoId=this.url.videoId; }}, onPlayerPlaybackQualityChange: function(){ }, onPlayerPlaybackRateChange: function(){ this.trigger('ratechange'); }, onPlayerStateChange: function(e){ var state=e.data; if(state===this.lastState||this.errorNumber){ return; } this.lastState=state; switch (state){ case -1: this.trigger('loadstart'); this.trigger('loadedmetadata'); this.trigger('durationchange'); this.trigger('ratechange'); break; case DM.PlayerState.ENDED: this.trigger('ended'); break; case DM.PlayerState.PLAYING: this.trigger('timeupdate'); this.trigger('durationchange'); this.trigger('playing'); this.trigger('play'); if(this.isSeeking){ this.onSeeked(); } break; case DM.PlayerState.PAUSED: this.trigger('canplay'); if(this.isSeeking){ this.onSeeked(); }else{ this.trigger('pause'); } break; case DM.PlayerState.BUFFERING: this.player_.trigger('timeupdate'); this.player_.trigger('waiting'); break; }}, onPlayerVolumeChange: function(){ this.trigger('volumechange'); }, onPlayerError: function(e){ this.errorNumber=e.data; this.trigger('pause'); this.trigger('error'); }, error: function(){ var code=1000 + this.errorNumber; switch (this.errorNumber){ case 5: return { code: code, message: 'Error while trying to play the video' }; case 2: case 100: return { code: code, message: 'Unable to find the video' }; case 101: case 150: return { code: code, message: 'Playback on other Websites has been disabled by the video owner.' };} return { code: code, message: 'Dailymotion unknown error (' + this.errorNumber + ')' };}, loadVideoById_: function(id){ var options={ video: id }; if(this.options_.start){ options.startSeconds=this.options_.start; } if(this.options_.end){ options.endEnd=this.options_.end; } console.log(options); this.dmPlayer.loadVideoById(options); }, cueVideoById_: function(id){ var options={ video: id }; if(this.options_.start){ options.startSeconds=this.options_.start; } if(this.options_.end){ options.endEnd=this.options_.end; } this.dmPlayer.cueVideoById(options); }, src: function(src){ if(src){ this.setSrc({ src: src }); } return this.source; }, poster: function(){ if(_isOnMobile){ return null; } return this.poster_; }, setPoster: function(poster){ this.poster_=poster; }, setSrc: function(source){ if(!source||!source.src){ return; } delete this.errorNumber; this.source=source; this.url=Dailymotion.parseUrl(source.src); if(!this.options_.poster){ if(this.url.videoId){ this.poster_='https://www.dailymotion.com/thumbnail/video/' + this.url.videoId; this.trigger('posterchange'); }} if(this.options_.autoplay&&!_isOnMobile){ if(this.isReady_){ this.play(); }else{ this.playOnReady=true; }}else if(this.activeVideoId!==this.url.videoId){ if(this.isReady_){ this.activeVideoId=this.url.videoId; }else{ this.cueOnReady=true; }} }, autoplay: function(){ return this.options_.autoplay; }, setAutoplay: function(val){ this.options_.autoplay=val; }, loop: function(){ return this.options_.loop; }, setLoop: function(val){ this.options_.loop=val; }, play: function(){ if(!this.url||!this.url.videoId){ return; } this.wasPausedBeforeSeek=false; if(this.isReady_){ if(this.url.listId){ if(this.activeList===this.url.listId){ this.dmPlayer.play(); }else{ this.dmPlayer.loadPlaylist(this.url.listId); this.activeList=this.url.listId; }} if(this.activeVideoId===this.url.videoId){ this.dmPlayer.play(); }else{ this.loadVideoById_(this.url.videoId); this.activeVideoId=this.url.videoId; }}else{ this.trigger('waiting'); this.playOnReady=true; }}, pause: function(){ if(this.dmPlayer){ alert('pause') this.dmPlayer.pause(); }}, paused: function(){ return (this.dmPlayer) ? (this.lastState!==DM.PlayerState.PLAYING&&this.lastState!==DM.PlayerState.BUFFERING) : true; }, currentTime: function(){ return this.dmPlayer ? this.dmPlayer.getCurrentTime():0; }, setCurrentTime: function(seconds){ if(this.lastState===DM.PlayerState.PAUSED){ this.timeBeforeSeek=this.currentTime(); } if(!this.isSeeking){ this.wasPausedBeforeSeek=this.paused(); } this.dmPlayer.seekTo(seconds, true); this.trigger('timeupdate'); this.trigger('seeking'); this.isSeeking=true; if(this.lastState===DM.PlayerState.PAUSED&&this.timeBeforeSeek!==seconds){ clearInterval(this.checkSeekedInPauseInterval); this.checkSeekedInPauseInterval=setInterval(function(){ if(this.lastState!==DM.PlayerState.PAUSED||!this.isSeeking){ clearInterval(this.checkSeekedInPauseInterval); }else if(this.currentTime()!==this.timeBeforeSeek){ this.trigger('timeupdate'); this.onSeeked(); }}.bind(this), 250); }}, seeking: function (){ return this.isSeeking; }, seekable: function (){ if(!this.dmPlayer){ return videojs.createTimeRange(); } return videojs.createTimeRange(0, this.dmPlayer.getDuration()); }, onSeeked: function(){ clearInterval(this.checkSeekedInPauseInterval); this.isSeeking=false; if(this.wasPausedBeforeSeek){ this.pause(); } this.trigger('seeked'); }, playbackRate: function(){ return this.dmPlayer ? this.dmPlayer.getPlaybackRate():1; }, setPlaybackRate: function(suggestedRate){ if(!this.dmPlayer){ return; } this.dmPlayer.setPlaybackRate(suggestedRate); }, duration: function(){ return this.dmPlayer ? this.dmPlayer.getDuration():0; }, currentSrc: function(){ return this.source&&this.source.src; }, ended: function(){ return this.dmPlayer ? (this.lastState===DM.PlayerState.ENDED):false; }, volume: function(){ return this.dmPlayer ? this.dmPlayer.getVolume() / 100.0:1; }, setVolume: function(percentAsDecimal){ if(!this.dmPlayer){ return; } this.dmPlayer.setVolume(percentAsDecimal * 100.0); }, muted: function(){ return this.dmPlayer ? this.dmPlayer.isMuted():false; }, setMuted: function(mute){ if(!this.dmPlayer){ return; }else{ this.muted(true); } if(mute){ this.dmPlayer.mute(); }else{ this.dmPlayer.unMute(); } this.setTimeout(function(){ this.trigger('volumechange'); }, 50); }, buffered: function(){ if(!this.dmPlayer||!this.dmPlayer.getVideoLoadedFraction){ return videojs.createTimeRange(); } var bufferedEnd=this.dmPlayer.getVideoLoadedFraction() * this.dmPlayer.getDuration(); return videojs.createTimeRange(0, bufferedEnd); }, preload: function(){}, load: function(){}, reset: function(){}, supportsFullScreen: function(){ return true; }, checkHighResPoster: function(){ var uri='https://img.dailymotion.com/vi/' + this.url.videoId + '/maxresdefault.jpg'; try { var image=new Image(); image.onload=function(){ if('naturalHeight' in image){ if(image.naturalHeight <=90||image.naturalWidth <=120){ return; }}else if(image.height <=90||image.width <=120){ return; } this.poster_=uri; this.trigger('posterchange'); }.bind(this); image.onerror=function(){}; image.src=uri; } catch(e){}} }); Dailymotion.isSupported=function(){ return true; }; Dailymotion.canPlaySource=function(e){ return Dailymotion.canPlayType(e.type); }; Dailymotion.canPlayType=function(e){ return (e==='video/dailymotion'); }; Dailymotion.parseUrl=function(url){ var result={ video: null }; var regex=/^.+dailymotion.com\/(video|hub)\/([^_]+)[^#]*(#video=([^_&]+))?/; var match=url.match(regex); if(match!==null){ if(match[4]!==undefined){ result.videoId=match[4]; } result.videoId=match[2]; } return result; }; function apiLoaded(){ setTimeout(function(){ Dailymotion.isApiReady=true; for (var i=0; i < Dailymotion.apiReadyQueue.length; ++i){ Dailymotion.apiReadyQueue[i].initDMPlayer(); }}, 0); } function loadScript(src, callback){ var loaded=false; var tag=document.createElement('script'); var firstScriptTag=document.getElementsByTagName('script')[0]; firstScriptTag.parentNode.insertBefore(tag, firstScriptTag); tag.onload=function (){ if(!loaded){ loaded=true; callback(); }}; tag.onreadystatechange=function (){ if(!loaded&&(this.readyState==='complete'||this.readyState==='loaded')){ loaded=true; callback(); }}; tag.src=src; } function injectCss(){ var css = '.vjs-dailymotion .vjs-iframe-blocker { display: none; }' + '.vjs-dailymotion.vjs-user-inactive .vjs-iframe-blocker { display: block; }' + '.vjs-dailymotion .vjs-poster { background-size: cover; }' + '.vjs-dailymotion-mobile .vjs-big-play-button { display: none; }'; var head=document.head||document.getElementsByTagName('head')[0]; var style=document.createElement('style'); style.type='text/css'; if(style.styleSheet){ style.styleSheet.cssText=css; }else{ style.appendChild(document.createTextNode(css)); } head.appendChild(style); } Dailymotion.apiReadyQueue=[]; if(typeof document!=='undefined'){ loadScript('https://api.dmcdn.net/all.js', apiLoaded); injectCss(); } if(typeof videojs.registerTech!=='undefined'){ videojs.registerTech('Dailymotion', Dailymotion); }else{ videojs.registerComponent('Dailymotion', Dailymotion); }})); window.addComment=function(v){var I,C,h,E=v.document,b={commentReplyClass:"comment-reply-link",commentReplyTitleId:"reply-title",cancelReplyId:"cancel-comment-reply-link",commentFormId:"commentform",temporaryFormId:"wp-temp-form-div",parentIdFieldId:"comment_parent",postIdFieldId:"comment_post_ID"},e=v.MutationObserver||v.WebKitMutationObserver||v.MozMutationObserver,r="querySelector"in E&&"addEventListener"in v,n=!!E.documentElement.dataset;function t(){d(),e&&new e(o).observe(E.body,{childList:!0,subtree:!0})}function d(e){if(r&&(I=g(b.cancelReplyId),C=g(b.commentFormId),I)){I.addEventListener("touchstart",l),I.addEventListener("click",l);function t(e){if((e.metaKey||e.ctrlKey)&&13===e.keyCode)return C.removeEventListener("keydown",t),e.preventDefault(),C.submit.click(),!1}C&&C.addEventListener("keydown",t);for(var n,d=function(e){var t=b.commentReplyClass;e&&e.childNodes||(e=E);e=E.getElementsByClassName?e.getElementsByClassName(t):e.querySelectorAll("."+t);return e}(e),o=0,i=d.length;o"']/g,T=RegExp(W.source),B=RegExp(U.source),M=/<%-([\s\S]+?)%>/g,D=/<%([\s\S]+?)%>/g,P=/<%=([\s\S]+?)%>/g,$=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,N=/^\w*$/,F=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,q=/[\\^$.*+?()[\]{}|]/g,Z=RegExp(q.source),K=/^\s+/,V=/\s/,G=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,H=/\{\n\/\* \[wrapped with (.+)\] \*/,J=/,? & /,Y=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Q=/[()=,{}\[\]\/\s]/,X=/\\(\\)?/g,nn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,tn=/\w*$/,rn=/^[-+]0x[0-9a-f]+$/i,en=/^0b[01]+$/i,un=/^\[object .+?Constructor\]$/,on=/^0o[0-7]+$/i,fn=/^(?:0|[1-9]\d*)$/,an=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,cn=/($^)/,ln=/['\n\r\u2028\u2029\\]/g,sn="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",vn="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",hn="[\\ud800-\\udfff]",pn="["+vn+"]",dn="["+sn+"]",_n="\\d+",gn="[\\u2700-\\u27bf]",yn="[a-z\\xdf-\\xf6\\xf8-\\xff]",bn="[^\\ud800-\\udfff"+vn+_n+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",wn="\\ud83c[\\udffb-\\udfff]",mn="[^\\ud800-\\udfff]",xn="(?:\\ud83c[\\udde6-\\uddff]){2}",jn="[\\ud800-\\udbff][\\udc00-\\udfff]",An="[A-Z\\xc0-\\xd6\\xd8-\\xde]",On="(?:"+yn+"|"+bn+")",kn="(?:"+An+"|"+bn+")",En="(?:"+dn+"|"+wn+")"+"?",In="[\\ufe0e\\ufe0f]?"+En+("(?:\\u200d(?:"+[mn,xn,jn].join("|")+")[\\ufe0e\\ufe0f]?"+En+")*"),Rn="(?:"+[gn,xn,jn].join("|")+")"+In,Sn="(?:"+[mn+dn+"?",dn,xn,jn,hn].join("|")+")",zn=RegExp("['’]","g"),Cn=RegExp(dn,"g"),Ln=RegExp(wn+"(?="+wn+")|"+Sn+In,"g"),Wn=RegExp([An+"?"+yn+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[pn,An,"$"].join("|")+")",kn+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[pn,An+On,"$"].join("|")+")",An+"?"+On+"+(?:['’](?:d|ll|m|re|s|t|ve))?",An+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",_n,Rn].join("|"),"g"),Un=RegExp("[\\u200d\\ud800-\\udfff"+sn+"\\ufe0e\\ufe0f]"),Tn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Bn=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Mn=-1,Dn={};Dn[j]=Dn[A]=Dn[O]=Dn[k]=Dn[E]=Dn[I]=Dn["[object Uint8ClampedArray]"]=Dn[R]=Dn[S]=!0,Dn[o]=Dn[f]=Dn[m]=Dn[a]=Dn[x]=Dn[c]=Dn[l]=Dn[s]=Dn[h]=Dn[p]=Dn[d]=Dn[_]=Dn[g]=Dn[y]=Dn[w]=!1;var Pn={};Pn[o]=Pn[f]=Pn[m]=Pn[x]=Pn[a]=Pn[c]=Pn[j]=Pn[A]=Pn[O]=Pn[k]=Pn[E]=Pn[h]=Pn[p]=Pn[d]=Pn[_]=Pn[g]=Pn[y]=Pn[b]=Pn[I]=Pn["[object Uint8ClampedArray]"]=Pn[R]=Pn[S]=!0,Pn[l]=Pn[s]=Pn[w]=!1;var $n={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Nn=parseFloat,Fn=parseInt,qn="object"==typeof n&&n&&n.Object===Object&&n,Zn="object"==typeof self&&self&&self.Object===Object&&self,Kn=qn||Zn||Function("return this")(),Vn=t&&!t.nodeType&&t,Gn=Vn&&"object"==typeof r&&r&&!r.nodeType&&r,Hn=Gn&&Gn.exports===Vn,Jn=Hn&&qn.process,Yn=function(){try{var n=Gn&&Gn.require&&Gn.require("util").types;return n||Jn&&Jn.binding&&Jn.binding("util")}catch(n){}}(),Qn=Yn&&Yn.isArrayBuffer,Xn=Yn&&Yn.isDate,nt=Yn&&Yn.isMap,tt=Yn&&Yn.isRegExp,rt=Yn&&Yn.isSet,et=Yn&&Yn.isTypedArray;function ut(n,t,r){switch(r.length){case 0:return n.call(t);case 1:return n.call(t,r[0]);case 2:return n.call(t,r[0],r[1]);case 3:return n.call(t,r[0],r[1],r[2])}return n.apply(t,r)}function it(n,t,r,e){for(var u=-1,i=null==n?0:n.length;++u-1}function st(n,t,r){for(var e=-1,u=null==n?0:n.length;++e-1;);return r}function Wt(n,t){for(var r=n.length;r--&&wt(t,n[r],0)>-1;);return r}function Ut(n,t){for(var r=n.length,e=0;r--;)n[r]===t&&++e;return e}var Tt=Ot({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Bt=Ot({"&":"&","<":"<",">":">",'"':""","'":"'"});function Mt(n){return"\\"+$n[n]}function Dt(n){return Un.test(n)}function Pt(n){var t=-1,r=Array(n.size);return n.forEach((function(n,e){r[++t]=[e,n]})),r}function $t(n,t){return function(r){return n(t(r))}}function Nt(n,t){for(var r=-1,e=n.length,i=0,o=[];++r",""":'"',"'":"'"});var Ht=function n(t){var r,V=(t=null==t?Kn:Ht.defaults(Kn.Object(),t,Ht.pick(Kn,Bn))).Array,sn=t.Date,vn=t.Error,hn=t.Function,pn=t.Math,dn=t.Object,_n=t.RegExp,gn=t.String,yn=t.TypeError,bn=V.prototype,wn=hn.prototype,mn=dn.prototype,xn=t["__core-js_shared__"],jn=wn.toString,An=mn.hasOwnProperty,On=0,kn=(r=/[^.]+$/.exec(xn&&xn.keys&&xn.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"",En=mn.toString,In=jn.call(dn),Rn=Kn._,Sn=_n("^"+jn.call(An).replace(q,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ln=Hn?t.Buffer:void 0,Un=t.Symbol,$n=t.Uint8Array,qn=Ln?Ln.allocUnsafe:void 0,Zn=$t(dn.getPrototypeOf,dn),Vn=dn.create,Gn=mn.propertyIsEnumerable,Jn=bn.splice,Yn=Un?Un.isConcatSpreadable:void 0,gt=Un?Un.iterator:void 0,Ot=Un?Un.toStringTag:void 0,Jt=function(){try{var n=ni(dn,"defineProperty");return n({},"",{}),n}catch(n){}}(),Yt=t.clearTimeout!==Kn.clearTimeout&&t.clearTimeout,Qt=sn&&sn.now!==Kn.Date.now&&sn.now,Xt=t.setTimeout!==Kn.setTimeout&&t.setTimeout,nr=pn.ceil,tr=pn.floor,rr=dn.getOwnPropertySymbols,er=Ln?Ln.isBuffer:void 0,ur=t.isFinite,ir=bn.join,or=$t(dn.keys,dn),fr=pn.max,ar=pn.min,cr=sn.now,lr=t.parseInt,sr=pn.random,vr=bn.reverse,hr=ni(t,"DataView"),pr=ni(t,"Map"),dr=ni(t,"Promise"),_r=ni(t,"Set"),gr=ni(t,"WeakMap"),yr=ni(dn,"create"),br=gr&&new gr,wr={},mr=Ei(hr),xr=Ei(pr),jr=Ei(dr),Ar=Ei(_r),Or=Ei(gr),kr=Un?Un.prototype:void 0,Er=kr?kr.valueOf:void 0,Ir=kr?kr.toString:void 0;function Rr(n){if(Zo(n)&&!Wo(n)&&!(n instanceof Lr)){if(n instanceof Cr)return n;if(An.call(n,"__wrapped__"))return Ii(n)}return new Cr(n)}var Sr=function(){function n(){}return function(t){if(!qo(t))return{};if(Vn)return Vn(t);n.prototype=t;var r=new n;return n.prototype=void 0,r}}();function zr(){}function Cr(n,t){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function Lr(n){this.__wrapped__=n,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Wr(n){var t=-1,r=null==n?0:n.length;for(this.clear();++t=t?n:t)),n}function Yr(n,t,r,e,u,i){var f,l=1&t,w=2&t,z=4&t;if(r&&(f=u?r(n,e,u,i):r(n)),void 0!==f)return f;if(!qo(n))return n;var C=Wo(n);if(C){if(f=function(n){var t=n.length,r=new n.constructor(t);t&&"string"==typeof n[0]&&An.call(n,"index")&&(r.index=n.index,r.input=n.input);return r}(n),!l)return yu(n,f)}else{var L=ei(n),W=L==s||L==v;if(Mo(n))return vu(n,l);if(L==d||L==o||W&&!u){if(f=w||W?{}:ii(n),!l)return w?function(n,t){return bu(n,ri(n),t)}(n,function(n,t){return n&&bu(t,jf(t),n)}(f,n)):function(n,t){return bu(n,ti(n),t)}(n,Vr(f,n))}else{if(!Pn[L])return u?n:{};f=function(n,t,r){var e=n.constructor;switch(t){case m:return hu(n);case a:case c:return new e(+n);case x:return function(n,t){var r=t?hu(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.byteLength)}(n,r);case j:case A:case O:case k:case E:case I:case"[object Uint8ClampedArray]":case R:case S:return pu(n,r);case h:return new e;case p:case y:return new e(n);case _:return function(n){var t=new n.constructor(n.source,tn.exec(n));return t.lastIndex=n.lastIndex,t}(n);case g:return new e;case b:return u=n,Er?dn(Er.call(u)):{}}var u}(n,L,l)}}i||(i=new Mr);var U=i.get(n);if(U)return U;i.set(n,f),Jo(n)?n.forEach((function(e){f.add(Yr(e,t,r,e,n,i))})):Ko(n)&&n.forEach((function(e,u){f.set(u,Yr(e,t,r,u,n,i))}));var T=C?void 0:(z?w?Vu:Ku:w?jf:xf)(n);return ot(T||n,(function(e,u){T&&(e=n[u=e]),qr(f,u,Yr(e,t,r,u,n,i))})),f}function Qr(n,t,r){var e=r.length;if(null==n)return!e;for(n=dn(n);e--;){var u=r[e],i=t[u],o=n[u];if(void 0===o&&!(u in n)||!i(o))return!1}return!0}function Xr(n,t,r){if("function"!=typeof n)throw new yn(e);return wi((function(){n.apply(void 0,r)}),t)}function ne(n,t,r,e){var u=-1,i=lt,o=!0,f=n.length,a=[],c=t.length;if(!f)return a;r&&(t=vt(t,St(r))),e?(i=st,o=!1):t.length>=200&&(i=Ct,o=!1,t=new Br(t));n:for(;++u-1},Ur.prototype.set=function(n,t){var r=this.__data__,e=Zr(r,n);return e<0?(++this.size,r.push([n,t])):r[e][1]=t,this},Tr.prototype.clear=function(){this.size=0,this.__data__={hash:new Wr,map:new(pr||Ur),string:new Wr}},Tr.prototype.delete=function(n){var t=Qu(this,n).delete(n);return this.size-=t?1:0,t},Tr.prototype.get=function(n){return Qu(this,n).get(n)},Tr.prototype.has=function(n){return Qu(this,n).has(n)},Tr.prototype.set=function(n,t){var r=Qu(this,n),e=r.size;return r.set(n,t),this.size+=r.size==e?0:1,this},Br.prototype.add=Br.prototype.push=function(n){return this.__data__.set(n,"__lodash_hash_undefined__"),this},Br.prototype.has=function(n){return this.__data__.has(n)},Mr.prototype.clear=function(){this.__data__=new Ur,this.size=0},Mr.prototype.delete=function(n){var t=this.__data__,r=t.delete(n);return this.size=t.size,r},Mr.prototype.get=function(n){return this.__data__.get(n)},Mr.prototype.has=function(n){return this.__data__.has(n)},Mr.prototype.set=function(n,t){var r=this.__data__;if(r instanceof Ur){var e=r.__data__;if(!pr||e.length<199)return e.push([n,t]),this.size=++r.size,this;r=this.__data__=new Tr(e)}return r.set(n,t),this.size=r.size,this};var te=xu(ce),re=xu(le,!0);function ee(n,t){var r=!0;return te(n,(function(n,e,u){return r=!!t(n,e,u)})),r}function ue(n,t,r){for(var e=-1,u=n.length;++e0&&r(f)?t>1?oe(f,t-1,r,e,u):ht(u,f):e||(u[u.length]=f)}return u}var fe=ju(),ae=ju(!0);function ce(n,t){return n&&fe(n,t,xf)}function le(n,t){return n&&ae(n,t,xf)}function se(n,t){return ct(t,(function(t){return $o(n[t])}))}function ve(n,t){for(var r=0,e=(t=au(t,n)).length;null!=n&&rt}function _e(n,t){return null!=n&&An.call(n,t)}function ge(n,t){return null!=n&&t in dn(n)}function ye(n,t,r){for(var e=r?st:lt,u=n[0].length,i=n.length,o=i,f=V(i),a=1/0,c=[];o--;){var l=n[o];o&&t&&(l=vt(l,St(t))),a=ar(l.length,a),f[o]=!r&&(t||u>=120&&l.length>=120)?new Br(o&&l):void 0}l=n[0];var s=-1,v=f[0];n:for(;++s=f)return a;var c=r[e];return a*("desc"==c?-1:1)}}return n.index-t.index}(n,t,r)}))}function We(n,t,r){for(var e=-1,u=t.length,i={};++e-1;)f!==n&&Jn.call(f,a,1),Jn.call(n,a,1);return n}function Te(n,t){for(var r=n?t.length:0,e=r-1;r--;){var u=t[r];if(r==e||u!==i){var i=u;fi(u)?Jn.call(n,u,1):nu(n,u)}}return n}function Be(n,t){return n+tr(sr()*(t-n+1))}function Me(n,t){var r="";if(!n||t<1||t>9007199254740991)return r;do{t%2&&(r+=n),(t=tr(t/2))&&(n+=n)}while(t);return r}function De(n,t){return mi(di(n,t,Gf),n+"")}function Pe(n){return Pr(zf(n))}function $e(n,t){var r=zf(n);return Ai(r,Jr(t,0,r.length))}function Ne(n,t,r,e){if(!qo(n))return n;for(var u=-1,i=(t=au(t,n)).length,o=i-1,f=n;null!=f&&++uu?0:u+t),(r=r>u?u:r)<0&&(r+=u),u=t>r?0:r-t>>>0,t>>>=0;for(var i=V(u);++e>>1,o=n[i];null!==o&&!Qo(o)&&(r?o<=t:o=200){var c=t?null:Mu(n);if(c)return Ft(c);o=!1,u=Ct,a=new Br}else a=t?[]:f;n:for(;++e=e?n:Ke(n,t,r)}var su=Yt||function(n){return Kn.clearTimeout(n)};function vu(n,t){if(t)return n.slice();var r=n.length,e=qn?qn(r):new n.constructor(r);return n.copy(e),e}function hu(n){var t=new n.constructor(n.byteLength);return new $n(t).set(new $n(n)),t}function pu(n,t){var r=t?hu(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.length)}function du(n,t){if(n!==t){var r=void 0!==n,e=null===n,u=n==n,i=Qo(n),o=void 0!==t,f=null===t,a=t==t,c=Qo(t);if(!f&&!c&&!i&&n>t||i&&o&&a&&!f&&!c||e&&o&&a||!r&&a||!u)return 1;if(!e&&!i&&!c&&n1?r[u-1]:void 0,o=u>2?r[2]:void 0;for(i=n.length>3&&"function"==typeof i?(u--,i):void 0,o&&ai(r[0],r[1],o)&&(i=u<3?void 0:i,u=1),t=dn(t);++e-1?u[i?t[o]:o]:void 0}}function Iu(n){return Zu((function(t){var r=t.length,u=r,i=Cr.prototype.thru;for(n&&t.reverse();u--;){var o=t[u];if("function"!=typeof o)throw new yn(e);if(i&&!f&&"wrapper"==Hu(o))var f=new Cr([],!0)}for(u=f?u:r;++u1&&y.reverse(),l&&af))return!1;var c=i.get(n),l=i.get(t);if(c&&l)return c==t&&l==n;var s=-1,v=!0,h=2&r?new Br:void 0;for(i.set(n,t),i.set(t,n);++s-1&&n%1==0&&n1?"& ":"")+t[e],t=t.join(r>2?", ":" "),n.replace(G,"{\n\n")}(e,function(n,t){return ot(i,(function(r){var e="_."+r[0];t&r[1]&&!lt(n,e)&&n.push(e)})),n.sort()}(function(n){var t=n.match(H);return t?t[1].split(J):[]}(e),r)))}function ji(n){var t=0,r=0;return function(){var e=cr(),u=16-(e-r);if(r=e,u>0){if(++t>=800)return arguments[0]}else t=0;return n.apply(void 0,arguments)}}function Ai(n,t){var r=-1,e=n.length,u=e-1;for(t=void 0===t?e:t;++r1?n[t-1]:void 0;return r="function"==typeof r?(n.pop(),r):void 0,Gi(n,r)}));function to(n){var t=Rr(n);return t.__chain__=!0,t}function ro(n,t){return t(n)}var eo=Zu((function(n){var t=n.length,r=t?n[0]:0,e=this.__wrapped__,u=function(t){return Hr(t,n)};return!(t>1||this.__actions__.length)&&e instanceof Lr&&fi(r)?((e=e.slice(r,+r+(t?1:0))).__actions__.push({func:ro,args:[u],thisArg:void 0}),new Cr(e,this.__chain__).thru((function(n){return t&&!n.length&&n.push(void 0),n}))):this.thru(u)}));var uo=wu((function(n,t,r){An.call(n,r)?++n[r]:Gr(n,r,1)}));var io=Eu(Ci),oo=Eu(Li);function fo(n,t){return(Wo(n)?ot:te)(n,Yu(t,3))}function ao(n,t){return(Wo(n)?ft:re)(n,Yu(t,3))}var co=wu((function(n,t,r){An.call(n,r)?n[r].push(t):Gr(n,r,[t])}));var lo=De((function(n,t,r){var e=-1,u="function"==typeof t,i=To(n)?V(n.length):[];return te(n,(function(n){i[++e]=u?ut(t,n,r):be(n,t,r)})),i})),so=wu((function(n,t,r){Gr(n,r,t)}));function vo(n,t){return(Wo(n)?vt:Ie)(n,Yu(t,3))}var ho=wu((function(n,t,r){n[r?0:1].push(t)}),(function(){return[[],[]]}));var po=De((function(n,t){if(null==n)return[];var r=t.length;return r>1&&ai(n,t[0],t[1])?t=[]:r>2&&ai(t[0],t[1],t[2])&&(t=[t[0]]),Le(n,oe(t,1),[])})),_o=Qt||function(){return Kn.Date.now()};function go(n,t,r){return t=r?void 0:t,Pu(n,128,void 0,void 0,void 0,void 0,t=n&&null==t?n.length:t)}function yo(n,t){var r;if("function"!=typeof t)throw new yn(e);return n=uf(n),function(){return--n>0&&(r=t.apply(this,arguments)),n<=1&&(t=void 0),r}}var bo=De((function(n,t,r){var e=1;if(r.length){var u=Nt(r,Ju(bo));e|=32}return Pu(n,e,t,r,u)})),wo=De((function(n,t,r){var e=3;if(r.length){var u=Nt(r,Ju(wo));e|=32}return Pu(t,e,n,r,u)}));function mo(n,t,r){var u,i,o,f,a,c,l=0,s=!1,v=!1,h=!0;if("function"!=typeof n)throw new yn(e);function p(t){var r=u,e=i;return u=i=void 0,l=t,f=n.apply(e,r)}function d(n){return l=n,a=wi(g,t),s?p(n):f}function _(n){var r=n-c;return void 0===c||r>=t||r<0||v&&n-l>=o}function g(){var n=_o();if(_(n))return y(n);a=wi(g,function(n){var r=t-(n-c);return v?ar(r,o-(n-l)):r}(n))}function y(n){return a=void 0,h&&u?p(n):(u=i=void 0,f)}function b(){var n=_o(),r=_(n);if(u=arguments,i=this,c=n,r){if(void 0===a)return d(c);if(v)return su(a),a=wi(g,t),p(c)}return void 0===a&&(a=wi(g,t)),f}return t=ff(t)||0,qo(r)&&(s=!!r.leading,o=(v="maxWait"in r)?fr(ff(r.maxWait)||0,t):o,h="trailing"in r?!!r.trailing:h),b.cancel=function(){void 0!==a&&su(a),l=0,u=c=i=a=void 0},b.flush=function(){return void 0===a?f:y(_o())},b}var xo=De((function(n,t){return Xr(n,1,t)})),jo=De((function(n,t,r){return Xr(n,ff(t)||0,r)}));function Ao(n,t){if("function"!=typeof n||null!=t&&"function"!=typeof t)throw new yn(e);var r=function(){var e=arguments,u=t?t.apply(this,e):e[0],i=r.cache;if(i.has(u))return i.get(u);var o=n.apply(this,e);return r.cache=i.set(u,o)||i,o};return r.cache=new(Ao.Cache||Tr),r}function Oo(n){if("function"!=typeof n)throw new yn(e);return function(){var t=arguments;switch(t.length){case 0:return!n.call(this);case 1:return!n.call(this,t[0]);case 2:return!n.call(this,t[0],t[1]);case 3:return!n.call(this,t[0],t[1],t[2])}return!n.apply(this,t)}}Ao.Cache=Tr;var ko=cu((function(n,t){var r=(t=1==t.length&&Wo(t[0])?vt(t[0],St(Yu())):vt(oe(t,1),St(Yu()))).length;return De((function(e){for(var u=-1,i=ar(e.length,r);++u=t})),Lo=we(function(){return arguments}())?we:function(n){return Zo(n)&&An.call(n,"callee")&&!Gn.call(n,"callee")},Wo=V.isArray,Uo=Qn?St(Qn):function(n){return Zo(n)&&pe(n)==m};function To(n){return null!=n&&Fo(n.length)&&!$o(n)}function Bo(n){return Zo(n)&&To(n)}var Mo=er||fa,Do=Xn?St(Xn):function(n){return Zo(n)&&pe(n)==c};function Po(n){if(!Zo(n))return!1;var t=pe(n);return t==l||"[object DOMException]"==t||"string"==typeof n.message&&"string"==typeof n.name&&!Go(n)}function $o(n){if(!qo(n))return!1;var t=pe(n);return t==s||t==v||"[object AsyncFunction]"==t||"[object Proxy]"==t}function No(n){return"number"==typeof n&&n==uf(n)}function Fo(n){return"number"==typeof n&&n>-1&&n%1==0&&n<=9007199254740991}function qo(n){var t=typeof n;return null!=n&&("object"==t||"function"==t)}function Zo(n){return null!=n&&"object"==typeof n}var Ko=nt?St(nt):function(n){return Zo(n)&&ei(n)==h};function Vo(n){return"number"==typeof n||Zo(n)&&pe(n)==p}function Go(n){if(!Zo(n)||pe(n)!=d)return!1;var t=Zn(n);if(null===t)return!0;var r=An.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&jn.call(r)==In}var Ho=tt?St(tt):function(n){return Zo(n)&&pe(n)==_};var Jo=rt?St(rt):function(n){return Zo(n)&&ei(n)==g};function Yo(n){return"string"==typeof n||!Wo(n)&&Zo(n)&&pe(n)==y}function Qo(n){return"symbol"==typeof n||Zo(n)&&pe(n)==b}var Xo=et?St(et):function(n){return Zo(n)&&Fo(n.length)&&!!Dn[pe(n)]};var nf=Uu(Ee),tf=Uu((function(n,t){return n<=t}));function rf(n){if(!n)return[];if(To(n))return Yo(n)?Kt(n):yu(n);if(gt&&n[gt])return function(n){for(var t,r=[];!(t=n.next()).done;)r.push(t.value);return r}(n[gt]());var t=ei(n);return(t==h?Pt:t==g?Ft:zf)(n)}function ef(n){return n?(n=ff(n))===1/0||n===-1/0?17976931348623157e292*(n<0?-1:1):n==n?n:0:0===n?n:0}function uf(n){var t=ef(n),r=t%1;return t==t?r?t-r:t:0}function of(n){return n?Jr(uf(n),0,4294967295):0}function ff(n){if("number"==typeof n)return n;if(Qo(n))return NaN;if(qo(n)){var t="function"==typeof n.valueOf?n.valueOf():n;n=qo(t)?t+"":t}if("string"!=typeof n)return 0===n?n:+n;n=Rt(n);var r=en.test(n);return r||on.test(n)?Fn(n.slice(2),r?2:8):rn.test(n)?NaN:+n}function af(n){return bu(n,jf(n))}function cf(n){return null==n?"":Qe(n)}var lf=mu((function(n,t){if(vi(t)||To(t))bu(t,xf(t),n);else for(var r in t)An.call(t,r)&&qr(n,r,t[r])})),sf=mu((function(n,t){bu(t,jf(t),n)})),vf=mu((function(n,t,r,e){bu(t,jf(t),n,e)})),hf=mu((function(n,t,r,e){bu(t,xf(t),n,e)})),pf=Zu(Hr);var df=De((function(n,t){n=dn(n);var r=-1,e=t.length,u=e>2?t[2]:void 0;for(u&&ai(t[0],t[1],u)&&(e=1);++r1),t})),bu(n,Vu(n),r),e&&(r=Yr(r,7,Fu));for(var u=t.length;u--;)nu(r,t[u]);return r}));var Ef=Zu((function(n,t){return null==n?{}:function(n,t){return We(n,t,(function(t,r){return yf(n,r)}))}(n,t)}));function If(n,t){if(null==n)return{};var r=vt(Vu(n),(function(n){return[n]}));return t=Yu(t),We(n,r,(function(n,r){return t(n,r[0])}))}var Rf=Du(xf),Sf=Du(jf);function zf(n){return null==n?[]:zt(n,xf(n))}var Cf=Ou((function(n,t,r){return t=t.toLowerCase(),n+(r?Lf(t):t)}));function Lf(n){return $f(cf(n).toLowerCase())}function Wf(n){return(n=cf(n))&&n.replace(an,Tt).replace(Cn,"")}var Uf=Ou((function(n,t,r){return n+(r?"-":"")+t.toLowerCase()})),Tf=Ou((function(n,t,r){return n+(r?" ":"")+t.toLowerCase()})),Bf=Au("toLowerCase");var Mf=Ou((function(n,t,r){return n+(r?"_":"")+t.toLowerCase()}));var Df=Ou((function(n,t,r){return n+(r?" ":"")+$f(t)}));var Pf=Ou((function(n,t,r){return n+(r?" ":"")+t.toUpperCase()})),$f=Au("toUpperCase");function Nf(n,t,r){return n=cf(n),void 0===(t=r?void 0:t)?function(n){return Tn.test(n)}(n)?function(n){return n.match(Wn)||[]}(n):function(n){return n.match(Y)||[]}(n):n.match(t)||[]}var Ff=De((function(n,t){try{return ut(n,void 0,t)}catch(n){return Po(n)?n:new vn(n)}})),qf=Zu((function(n,t){return ot(t,(function(t){t=ki(t),Gr(n,t,bo(n[t],n))})),n}));function Zf(n){return function(){return n}}var Kf=Iu(),Vf=Iu(!0);function Gf(n){return n}function Hf(n){return Ae("function"==typeof n?n:Yr(n,1))}var Jf=De((function(n,t){return function(r){return be(r,n,t)}})),Yf=De((function(n,t){return function(r){return be(n,r,t)}}));function Qf(n,t,r){var e=xf(t),u=se(t,e);null!=r||qo(t)&&(u.length||!e.length)||(r=t,t=n,n=this,u=se(t,xf(t)));var i=!(qo(r)&&"chain"in r&&!r.chain),o=$o(n);return ot(u,(function(r){var e=t[r];n[r]=e,o&&(n.prototype[r]=function(){var t=this.__chain__;if(i||t){var r=n(this.__wrapped__),u=r.__actions__=yu(this.__actions__);return u.push({func:e,args:arguments,thisArg:n}),r.__chain__=t,r}return e.apply(n,ht([this.value()],arguments))})})),n}function Xf(){}var na=Cu(vt),ta=Cu(at),ra=Cu(_t);function ea(n){return ci(n)?At(ki(n)):function(n){return function(t){return ve(t,n)}}(n)}var ua=Wu(),ia=Wu(!0);function oa(){return[]}function fa(){return!1}var aa=zu((function(n,t){return n+t}),0),ca=Bu("ceil"),la=zu((function(n,t){return n/t}),1),sa=Bu("floor");var va,ha=zu((function(n,t){return n*t}),1),pa=Bu("round"),da=zu((function(n,t){return n-t}),0);return Rr.after=function(n,t){if("function"!=typeof t)throw new yn(e);return n=uf(n),function(){if(--n<1)return t.apply(this,arguments)}},Rr.ary=go,Rr.assign=lf,Rr.assignIn=sf,Rr.assignInWith=vf,Rr.assignWith=hf,Rr.at=pf,Rr.before=yo,Rr.bind=bo,Rr.bindAll=qf,Rr.bindKey=wo,Rr.castArray=function(){if(!arguments.length)return[];var n=arguments[0];return Wo(n)?n:[n]},Rr.chain=to,Rr.chunk=function(n,t,r){t=(r?ai(n,t,r):void 0===t)?1:fr(uf(t),0);var e=null==n?0:n.length;if(!e||t<1)return[];for(var u=0,i=0,o=V(nr(e/t));uu?0:u+r),(e=void 0===e||e>u?u:uf(e))<0&&(e+=u),e=r>e?0:of(e);r>>0)?(n=cf(n))&&("string"==typeof t||null!=t&&!Ho(t))&&!(t=Qe(t))&&Dt(n)?lu(Kt(n),0,r):n.split(t,r):[]},Rr.spread=function(n,t){if("function"!=typeof n)throw new yn(e);return t=null==t?0:fr(uf(t),0),De((function(r){var e=r[t],u=lu(r,0,t);return e&&ht(u,e),ut(n,this,u)}))},Rr.tail=function(n){var t=null==n?0:n.length;return t?Ke(n,1,t):[]},Rr.take=function(n,t,r){return n&&n.length?Ke(n,0,(t=r||void 0===t?1:uf(t))<0?0:t):[]},Rr.takeRight=function(n,t,r){var e=null==n?0:n.length;return e?Ke(n,(t=e-(t=r||void 0===t?1:uf(t)))<0?0:t,e):[]},Rr.takeRightWhile=function(n,t){return n&&n.length?ru(n,Yu(t,3),!1,!0):[]},Rr.takeWhile=function(n,t){return n&&n.length?ru(n,Yu(t,3)):[]},Rr.tap=function(n,t){return t(n),n},Rr.throttle=function(n,t,r){var u=!0,i=!0;if("function"!=typeof n)throw new yn(e);return qo(r)&&(u="leading"in r?!!r.leading:u,i="trailing"in r?!!r.trailing:i),mo(n,t,{leading:u,maxWait:t,trailing:i})},Rr.thru=ro,Rr.toArray=rf,Rr.toPairs=Rf,Rr.toPairsIn=Sf,Rr.toPath=function(n){return Wo(n)?vt(n,ki):Qo(n)?[n]:yu(Oi(cf(n)))},Rr.toPlainObject=af,Rr.transform=function(n,t,r){var e=Wo(n),u=e||Mo(n)||Xo(n);if(t=Yu(t,4),null==r){var i=n&&n.constructor;r=u?e?new i:[]:qo(n)&&$o(i)?Sr(Zn(n)):{}}return(u?ot:ce)(n,(function(n,e,u){return t(r,n,e,u)})),r},Rr.unary=function(n){return go(n,1)},Rr.union=qi,Rr.unionBy=Zi,Rr.unionWith=Ki,Rr.uniq=function(n){return n&&n.length?Xe(n):[]},Rr.uniqBy=function(n,t){return n&&n.length?Xe(n,Yu(t,2)):[]},Rr.uniqWith=function(n,t){return t="function"==typeof t?t:void 0,n&&n.length?Xe(n,void 0,t):[]},Rr.unset=function(n,t){return null==n||nu(n,t)},Rr.unzip=Vi,Rr.unzipWith=Gi,Rr.update=function(n,t,r){return null==n?n:tu(n,t,fu(r))},Rr.updateWith=function(n,t,r,e){return e="function"==typeof e?e:void 0,null==n?n:tu(n,t,fu(r),e)},Rr.values=zf,Rr.valuesIn=function(n){return null==n?[]:zt(n,jf(n))},Rr.without=Hi,Rr.words=Nf,Rr.wrap=function(n,t){return Eo(fu(t),n)},Rr.xor=Ji,Rr.xorBy=Yi,Rr.xorWith=Qi,Rr.zip=Xi,Rr.zipObject=function(n,t){return iu(n||[],t||[],qr)},Rr.zipObjectDeep=function(n,t){return iu(n||[],t||[],Ne)},Rr.zipWith=no,Rr.entries=Rf,Rr.entriesIn=Sf,Rr.extend=sf,Rr.extendWith=vf,Qf(Rr,Rr),Rr.add=aa,Rr.attempt=Ff,Rr.camelCase=Cf,Rr.capitalize=Lf,Rr.ceil=ca,Rr.clamp=function(n,t,r){return void 0===r&&(r=t,t=void 0),void 0!==r&&(r=(r=ff(r))==r?r:0),void 0!==t&&(t=(t=ff(t))==t?t:0),Jr(ff(n),t,r)},Rr.clone=function(n){return Yr(n,4)},Rr.cloneDeep=function(n){return Yr(n,5)},Rr.cloneDeepWith=function(n,t){return Yr(n,5,t="function"==typeof t?t:void 0)},Rr.cloneWith=function(n,t){return Yr(n,4,t="function"==typeof t?t:void 0)},Rr.conformsTo=function(n,t){return null==t||Qr(n,t,xf(t))},Rr.deburr=Wf,Rr.defaultTo=function(n,t){return null==n||n!=n?t:n},Rr.divide=la,Rr.endsWith=function(n,t,r){n=cf(n),t=Qe(t);var e=n.length,u=r=void 0===r?e:Jr(uf(r),0,e);return(r-=t.length)>=0&&n.slice(r,u)==t},Rr.eq=So,Rr.escape=function(n){return(n=cf(n))&&B.test(n)?n.replace(U,Bt):n},Rr.escapeRegExp=function(n){return(n=cf(n))&&Z.test(n)?n.replace(q,"\\$&"):n},Rr.every=function(n,t,r){var e=Wo(n)?at:ee;return r&&ai(n,t,r)&&(t=void 0),e(n,Yu(t,3))},Rr.find=io,Rr.findIndex=Ci,Rr.findKey=function(n,t){return yt(n,Yu(t,3),ce)},Rr.findLast=oo,Rr.findLastIndex=Li,Rr.findLastKey=function(n,t){return yt(n,Yu(t,3),le)},Rr.floor=sa,Rr.forEach=fo,Rr.forEachRight=ao,Rr.forIn=function(n,t){return null==n?n:fe(n,Yu(t,3),jf)},Rr.forInRight=function(n,t){return null==n?n:ae(n,Yu(t,3),jf)},Rr.forOwn=function(n,t){return n&&ce(n,Yu(t,3))},Rr.forOwnRight=function(n,t){return n&&le(n,Yu(t,3))},Rr.get=gf,Rr.gt=zo,Rr.gte=Co,Rr.has=function(n,t){return null!=n&&ui(n,t,_e)},Rr.hasIn=yf,Rr.head=Ui,Rr.identity=Gf,Rr.includes=function(n,t,r,e){n=To(n)?n:zf(n),r=r&&!e?uf(r):0;var u=n.length;return r<0&&(r=fr(u+r,0)),Yo(n)?r<=u&&n.indexOf(t,r)>-1:!!u&&wt(n,t,r)>-1},Rr.indexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=null==r?0:uf(r);return u<0&&(u=fr(e+u,0)),wt(n,t,u)},Rr.inRange=function(n,t,r){return t=ef(t),void 0===r?(r=t,t=0):r=ef(r),function(n,t,r){return n>=ar(t,r)&&n=-9007199254740991&&n<=9007199254740991},Rr.isSet=Jo,Rr.isString=Yo,Rr.isSymbol=Qo,Rr.isTypedArray=Xo,Rr.isUndefined=function(n){return void 0===n},Rr.isWeakMap=function(n){return Zo(n)&&ei(n)==w},Rr.isWeakSet=function(n){return Zo(n)&&"[object WeakSet]"==pe(n)},Rr.join=function(n,t){return null==n?"":ir.call(n,t)},Rr.kebabCase=Uf,Rr.last=Di,Rr.lastIndexOf=function(n,t,r){var e=null==n?0:n.length;if(!e)return-1;var u=e;return void 0!==r&&(u=(u=uf(r))<0?fr(e+u,0):ar(u,e-1)),t==t?function(n,t,r){for(var e=r+1;e--;)if(n[e]===t)return e;return e}(n,t,u):bt(n,xt,u,!0)},Rr.lowerCase=Tf,Rr.lowerFirst=Bf,Rr.lt=nf,Rr.lte=tf,Rr.max=function(n){return n&&n.length?ue(n,Gf,de):void 0},Rr.maxBy=function(n,t){return n&&n.length?ue(n,Yu(t,2),de):void 0},Rr.mean=function(n){return jt(n,Gf)},Rr.meanBy=function(n,t){return jt(n,Yu(t,2))},Rr.min=function(n){return n&&n.length?ue(n,Gf,Ee):void 0},Rr.minBy=function(n,t){return n&&n.length?ue(n,Yu(t,2),Ee):void 0},Rr.stubArray=oa,Rr.stubFalse=fa,Rr.stubObject=function(){return{}},Rr.stubString=function(){return""},Rr.stubTrue=function(){return!0},Rr.multiply=ha,Rr.nth=function(n,t){return n&&n.length?Ce(n,uf(t)):void 0},Rr.noConflict=function(){return Kn._===this&&(Kn._=Rn),this},Rr.noop=Xf,Rr.now=_o,Rr.pad=function(n,t,r){n=cf(n);var e=(t=uf(t))?Zt(n):0;if(!t||e>=t)return n;var u=(t-e)/2;return Lu(tr(u),r)+n+Lu(nr(u),r)},Rr.padEnd=function(n,t,r){n=cf(n);var e=(t=uf(t))?Zt(n):0;return t&&et){var e=n;n=t,t=e}if(r||n%1||t%1){var u=sr();return ar(n+u*(t-n+Nn("1e-"+((u+"").length-1))),t)}return Be(n,t)},Rr.reduce=function(n,t,r){var e=Wo(n)?pt:kt,u=arguments.length<3;return e(n,Yu(t,4),r,u,te)},Rr.reduceRight=function(n,t,r){var e=Wo(n)?dt:kt,u=arguments.length<3;return e(n,Yu(t,4),r,u,re)},Rr.repeat=function(n,t,r){return t=(r?ai(n,t,r):void 0===t)?1:uf(t),Me(cf(n),t)},Rr.replace=function(){var n=arguments,t=cf(n[0]);return n.length<3?t:t.replace(n[1],n[2])},Rr.result=function(n,t,r){var e=-1,u=(t=au(t,n)).length;for(u||(u=1,n=void 0);++e9007199254740991)return[];var r=4294967295,e=ar(n,4294967295);n-=4294967295;for(var u=It(e,t=Yu(t));++r=i)return n;var f=r-Zt(e);if(f<1)return e;var a=o?lu(o,0,f).join(""):n.slice(0,f);if(void 0===u)return a+e;if(o&&(f+=a.length-f),Ho(u)){if(n.slice(f).search(u)){var c,l=a;for(u.global||(u=_n(u.source,cf(tn.exec(u))+"g")),u.lastIndex=0;c=u.exec(l);)var s=c.index;a=a.slice(0,void 0===s?f:s)}}else if(n.indexOf(Qe(u),f)!=f){var v=a.lastIndexOf(u);v>-1&&(a=a.slice(0,v))}return a+e},Rr.unescape=function(n){return(n=cf(n))&&T.test(n)?n.replace(W,Gt):n},Rr.uniqueId=function(n){var t=++On;return cf(n)+t},Rr.upperCase=Pf,Rr.upperFirst=$f,Rr.each=fo,Rr.eachRight=ao,Rr.first=Ui,Qf(Rr,(va={},ce(Rr,(function(n,t){An.call(Rr.prototype,t)||(va[t]=n)})),va),{chain:!1}),Rr.VERSION="4.17.21",ot(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(n){Rr[n].placeholder=Rr})),ot(["drop","take"],(function(n,t){Lr.prototype[n]=function(r){r=void 0===r?1:fr(uf(r),0);var e=this.__filtered__&&!t?new Lr(this):this.clone();return e.__filtered__?e.__takeCount__=ar(r,e.__takeCount__):e.__views__.push({size:ar(r,4294967295),type:n+(e.__dir__<0?"Right":"")}),e},Lr.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}})),ot(["filter","map","takeWhile"],(function(n,t){var r=t+1,e=1==r||3==r;Lr.prototype[n]=function(n){var t=this.clone();return t.__iteratees__.push({iteratee:Yu(n,3),type:r}),t.__filtered__=t.__filtered__||e,t}})),ot(["head","last"],(function(n,t){var r="take"+(t?"Right":"");Lr.prototype[n]=function(){return this[r](1).value()[0]}})),ot(["initial","tail"],(function(n,t){var r="drop"+(t?"":"Right");Lr.prototype[n]=function(){return this.__filtered__?new Lr(this):this[r](1)}})),Lr.prototype.compact=function(){return this.filter(Gf)},Lr.prototype.find=function(n){return this.filter(n).head()},Lr.prototype.findLast=function(n){return this.reverse().find(n)},Lr.prototype.invokeMap=De((function(n,t){return"function"==typeof n?new Lr(this):this.map((function(r){return be(r,n,t)}))})),Lr.prototype.reject=function(n){return this.filter(Oo(Yu(n)))},Lr.prototype.slice=function(n,t){n=uf(n);var r=this;return r.__filtered__&&(n>0||t<0)?new Lr(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),void 0!==t&&(r=(t=uf(t))<0?r.dropRight(-t):r.take(t-n)),r)},Lr.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Lr.prototype.toArray=function(){return this.take(4294967295)},ce(Lr.prototype,(function(n,t){var r=/^(?:filter|find|map|reject)|While$/.test(t),e=/^(?:head|last)$/.test(t),u=Rr[e?"take"+("last"==t?"Right":""):t],i=e||/^find/.test(t);u&&(Rr.prototype[t]=function(){var t=this.__wrapped__,o=e?[1]:arguments,f=t instanceof Lr,a=o[0],c=f||Wo(t),l=function(n){var t=u.apply(Rr,ht([n],o));return e&&s?t[0]:t};c&&r&&"function"==typeof a&&1!=a.length&&(f=c=!1);var s=this.__chain__,v=!!this.__actions__.length,h=i&&!s,p=f&&!v;if(!i&&c){t=p?t:new Lr(this);var d=n.apply(t,o);return d.__actions__.push({func:ro,args:[l],thisArg:void 0}),new Cr(d,s)}return h&&p?n.apply(this,o):(d=this.thru(l),h?e?d.value()[0]:d.value():d)})})),ot(["pop","push","shift","sort","splice","unshift"],(function(n){var t=bn[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",e=/^(?:pop|shift)$/.test(n);Rr.prototype[n]=function(){var n=arguments;if(e&&!this.__chain__){var u=this.value();return t.apply(Wo(u)?u:[],n)}return this[r]((function(r){return t.apply(Wo(r)?r:[],n)}))}})),ce(Lr.prototype,(function(n,t){var r=Rr[t];if(r){var e=r.name+"";An.call(wr,e)||(wr[e]=[]),wr[e].push({name:t,func:r})}})),wr[Ru(void 0,2).name]=[{name:"wrapper",func:void 0}],Lr.prototype.clone=function(){var n=new Lr(this.__wrapped__);return n.__actions__=yu(this.__actions__),n.__dir__=this.__dir__,n.__filtered__=this.__filtered__,n.__iteratees__=yu(this.__iteratees__),n.__takeCount__=this.__takeCount__,n.__views__=yu(this.__views__),n},Lr.prototype.reverse=function(){if(this.__filtered__){var n=new Lr(this);n.__dir__=-1,n.__filtered__=!0}else(n=this.clone()).__dir__*=-1;return n},Lr.prototype.value=function(){var n=this.__wrapped__.value(),t=this.__dir__,r=Wo(n),e=t<0,u=r?n.length:0,i=function(n,t,r){var e=-1,u=r.length;for(;++e=this.__values__.length;return{done:n,value:n?void 0:this.__values__[this.__index__++]}},Rr.prototype.plant=function(n){for(var t,r=this;r instanceof zr;){var e=Ii(r);e.__index__=0,e.__values__=void 0,t?u.__wrapped__=e:t=e;var u=e;r=r.__wrapped__}return u.__wrapped__=n,t},Rr.prototype.reverse=function(){var n=this.__wrapped__;if(n instanceof Lr){var t=n;return this.__actions__.length&&(t=new Lr(this)),(t=t.reverse()).__actions__.push({func:ro,args:[Fi],thisArg:void 0}),new Cr(t,this.__chain__)}return this.thru(Fi)},Rr.prototype.toJSON=Rr.prototype.valueOf=Rr.prototype.value=function(){return eu(this.__wrapped__,this.__actions__)},Rr.prototype.first=Rr.prototype.head,gt&&(Rr.prototype[gt]=function(){return this}),Rr}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Kn._=Ht,define((function(){return Ht}))):Gn?((Gn.exports=Ht)._=Ht,Vn._=Ht):Kn._=Ht}).call(this)}).call(this,r(0),r(3)(n))},function(n,t,r){"use strict";r.r(t),function(n){var t=r(1);!function(){function r(){if(!n.wp_consent_type&&!n.wp_fallback_consent_type)return;const r={};let e=!1;Object.entries(n._googlesitekitConsentCategoryMap).forEach(([t,u])=>{n.wp_has_consent&&n.wp_has_consent(t)&&(u.forEach(n=>{r[n]="granted"}),e=e||!!u.length)}),e&&!Object(t.isEqual)(r,n._googlesitekitConsents)&&(n.gtag("consent","update",r),n._googlesitekitConsents=r)}n.document.addEventListener("wp_listen_for_consent_change",(function(t){if(t.detail){const r={};let e=!1;Object.keys(t.detail).forEach(u=>{if(n._googlesitekitConsentCategoryMap[u]){const i="allow"===t.detail[u]?"granted":"denied",o=n._googlesitekitConsentCategoryMap[u];o.forEach(n=>{r[n]=i}),e=!!o.length}}),e&&n.gtag("consent","update",r)}})),n.document.addEventListener("wp_consent_type_defined",r),n.document.addEventListener("DOMContentLoaded",(function(){n.waitfor_consent_hook||r()}))}()}.call(this,r(0))},function(n,t){n.exports=function(n){return n.webpackPolyfill||(n.deprecate=function(){},n.paths=[],n.children||(n.children=[]),Object.defineProperty(n,"loaded",{enumerable:!0,get:function(){return n.l}}),Object.defineProperty(n,"id",{enumerable:!0,get:function(){return n.i}}),n.webpackPolyfill=1),n}}]);